mongoose-data-seed
Version:
Seed mongodb with data using mongoose models
1,475 lines • 81.3 kB
JSON
{
"type": "File",
"start": 0,
"end": 559,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 559,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 52
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 25
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 25
},
"identifierName": "generateUsageGuide"
},
"name": "generateUsageGuide"
}
}
],
"source": {
"type": "StringLiteral",
"start": 31,
"end": 51,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 51
}
},
"extra": {
"rawValue": "command-line-usage",
"raw": "'command-line-usage'"
},
"value": "command-line-usage"
}
},
{
"type": "ImportDeclaration",
"start": 53,
"end": 106,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 53
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 60,
"end": 77,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 24
}
},
"local": {
"type": "Identifier",
"start": 60,
"end": 77,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 24
},
"identifierName": "optionDefinitions"
},
"name": "optionDefinitions"
}
}
],
"source": {
"type": "StringLiteral",
"start": 83,
"end": 105,
"loc": {
"start": {
"line": 2,
"column": 30
},
"end": {
"line": 2,
"column": 52
}
},
"extra": {
"rawValue": "./option-definitions",
"raw": "'./option-definitions'"
},
"value": "./option-definitions"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * @private\n ",
"start": 108,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
]
},
{
"type": "Identifier",
"start": 128,
"end": 530,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 24,
"column": 3
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 134,
"end": 529,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 24,
"column": 2
}
},
"id": {
"type": "Identifier",
"start": 134,
"end": 144,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 16
},
"identifierName": "usageGuide"
},
"name": "usageGuide",
"leadingComments": null
},
"init": {
"type": "CallExpression",
"start": 147,
"end": 529,
"loc": {
"start": {
"line": 7,
"column": 19
},
"end": {
"line": 24,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 147,
"end": 165,
"loc": {
"start": {
"line": 7,
"column": 19
},
"end": {
"line": 7,
"column": 37
},
"identifierName": "generateUsageGuide"
},
"name": "generateUsageGuide"
},
"arguments": [
{
"type": "ArrayExpression",
"start": 166,
"end": 528,
"loc": {
"start": {
"line": 7,
"column": 38
},
"end": {
"line": 24,
"column": 1
}
},
"elements": [
{
"type": "ObjectExpression",
"start": 170,
"end": 271,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 11,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 176,
"end": 201,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 29
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 176,
"end": 182,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
},
"identifierName": "header"
},
"name": "header"
},
"value": {
"type": "StringLiteral",
"start": 184,
"end": 201,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 29
}
},
"extra": {
"rawValue": "Generate Seeder",
"raw": "'Generate Seeder'"
},
"value": "Generate Seeder"
}
},
{
"type": "ObjectProperty",
"start": 207,
"end": 266,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 63
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 207,
"end": 214,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 11
},
"identifierName": "content"
},
"name": "content"
},
"value": {
"type": "StringLiteral",
"start": 216,
"end": 266,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 63
}
},
"extra": {
"rawValue": "Generate new seeder file into the seeder folder.",
"raw": "'Generate new seeder file into the seeder folder.'"
},
"value": "Generate new seeder file into the seeder folder."
}
}
]
},
{
"type": "ObjectExpression",
"start": 275,
"end": 458,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 19,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 281,
"end": 299,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 22
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 281,
"end": 287,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 10
},
"identifierName": "header"
},
"name": "header"
},
"value": {
"type": "StringLiteral",
"start": 289,
"end": 299,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 22
}
},
"extra": {
"rawValue": "Synopsis",
"raw": "'Synopsis'"
},
"value": "Synopsis"
}
},
{
"type": "ObjectProperty",
"start": 305,
"end": 453,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 305,
"end": 312,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 11
},
"identifierName": "content"
},
"name": "content"
},
"value": {
"type": "ArrayExpression",
"start": 314,
"end": 453,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 18,
"column": 5
}
},
"elements": [
{
"type": "StringLiteral",
"start": 322,
"end": 366,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 50
}
},
"extra": {
"rawValue": "$ md-seed generate {underline seeder-name}",
"raw": "'$ md-seed generate {underline seeder-name}'"
},
"value": "$ md-seed generate {underline seeder-name}"
},
{
"type": "StringLiteral",
"start": 374,
"end": 411,
"loc": {
"start": {
"line": 16,
"column": 6
},
"end": {
"line": 16,
"column": 43
}
},
"extra": {
"rawValue": "$ md-seed g {underline seeder-name}",
"raw": "'$ md-seed g {underline seeder-name}'"
},
"value": "$ md-seed g {underline seeder-name}"
},
{
"type": "StringLiteral",
"start": 419,
"end": 446,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 33
}
},
"extra": {
"rawValue": "$ md-seed g {bold --help}",
"raw": "'$ md-seed g {bold --help}'"
},
"value": "$ md-seed g {bold --help}"
}
]
}
}
]
},
{
"type": "ObjectExpression",
"start": 462,
"end": 525,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 23,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 468,
"end": 485,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 21
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 468,
"end": 474,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 10
},
"identifierName": "header"
},
"name": "header"
},
"value": {
"type": "StringLiteral",
"start": 476,
"end": 485,
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 21
}
},
"extra": {
"rawValue": "Options",
"raw": "'Options'"
},
"value": "Options"
}
},
{
"type": "ObjectProperty",
"start": 491,
"end": 520,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 33
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 491,
"end": 501,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 14
},
"identifierName": "optionList"
},
"name": "optionList"
},
"value": {
"type": "Identifier",
"start": 503,
"end": 520,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 22,
"column": 33
},
"identifierName": "optionDefinitions"
},
"name": "optionDefinitions"
}
}
]
}
]
}
]
},
"leadingComments": null
}
],
"kind": "const",
"leadingComments": [],
"name": "_",
"trailingComments": []
},
{
"type": "Identifier",
"start": 532,
"end": 558,
"loc": {
"start": {
"line": 26,
"column": 0
},
"end": {
"line": 26,
"column": 26
}
},
"declaration": {
"type": "Identifier",
"start": 547,
"end": 557,
"loc": {
"start": {
"line": 26,
"column": 15
},
"end": {
"line": 26,
"column": 25
},
"identifierName": "usageGuide"
},
"name": "usageGuide"
},
"name": "_",
"leadingComments": [],
"trailingComments": []
},
{
"type": "ExportDefaultDeclaration",
"start": 532,
"end": 558,
"loc": {
"start": {
"line": 26,
"column": 0
},
"end": {
"line": 26,
"column": 26
}
},
"declaration": {
"type": "VariableDeclaration",
"start": 128,
"end": 530,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 24,
"column": 3
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 134,
"end": 529,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 24,
"column": 2
}
},
"id": {
"type": "Identifier",
"start": 134,
"end": 144,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 16
},
"identifierName": "usageGuide"
},
"name": "usageGuide",
"leadingComments": null
},
"init": {
"type": "CallExpression",
"start": 147,
"end": 529,
"loc": {
"start": {
"line": 7,
"column": 19
},
"end": {
"line": 24,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 147,
"end": 165,
"loc": {
"start": {
"line": 7,
"column": 19
},
"end": {
"line": 7,
"column": 37
},
"identifierName": "generateUsageGuide"
},
"name": "generateUsageGuide"
},
"arguments": [
{
"type": "ArrayExpression",
"start": 166,
"end": 528,
"loc": {
"start": {
"line": 7,
"column": 38
},
"end": {
"line": 24,
"column": 1
}
},
"elements": [
{
"type": "ObjectExpression",
"start": 170,
"end": 271,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 11,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 176,
"end": 201,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 29
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 176,
"end": 182,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
},
"identifierName": "header"
},
"name": "header"
},
"value": {
"type": "StringLiteral",
"start": 184,
"end": 201,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 29
}
},
"extra": {
"rawValue": "Generate Seeder",
"raw": "'Generate Seeder'"
},
"value": "Generate Seeder"
}
},
{
"type": "ObjectProperty",
"start": 207,
"end": 266,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 63
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 207,
"end": 214,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 11
},
"identifierName": "content"
},
"name": "content"
},
"value": {
"type": "StringLiteral",
"start": 216,
"end": 266,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 63
}
},
"extra": {
"rawValue": "Generate new seeder file into the seeder folder.",
"raw": "'Generate new seeder file into the seeder folder.'"
},
"value": "Generate new seeder file into the seeder folder."
}
}
]
},
{
"type": "ObjectExpression",
"start": 275,
"end": 458,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 19,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 281,
"end": 299,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 22
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 281,
"end": 287,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 10
},
"identifierName": "header"
},
"name": "header"
},
"value": {
"type": "StringLiteral",
"start": 289,
"end": 299,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 22
}
},
"extra": {
"rawValue": "Synopsis",
"raw": "'Synopsis'"
},
"value": "Synopsis"
}
},
{
"type": "ObjectProperty",
"start": 305,
"end": 453,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 305,
"end": 312,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 11
},
"identifierName": "content"
},
"name": "content"
},
"value": {
"type": "ArrayExpression",
"start": 314,
"end": 453,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 18,
"column": 5
}
},
"elements": [
{
"type": "StringLiteral",
"start": 322,
"end": 366,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 50
}
},
"extra": {
"rawValue": "$ md-seed generate {underline seeder-name}",
"raw": "'$ md-seed generate {underline seeder-name}'"
},
"value": "$ md-seed generate {underline seeder-name}"
},
{
"type": "StringLiteral",
"start": 374,
"end": 411,
"loc": {
"start": {
"line": 16,
"column": 6
},
"end": {
"line": 16,
"column": 43
}
},
"extra": {
"rawValue": "$ md-seed g {underline seeder-name}",
"raw": "'$ md-seed g {underline seeder-name}'"
},
"value": "$ md-seed g {underline seeder-name}"
},
{
"type": "StringLiteral",
"start": 419,
"end": 446,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 33
}
},
"extra": {
"rawValue": "$ md-seed g {bold --help}",
"raw": "'$ md-seed g {bold --help}'"
},
"value": "$ md-seed g {bold --help}"
}
]
}
}
]
},
{
"type": "ObjectExpression",
"start": 462,
"end": 525,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 23,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 468,
"end": 485,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 21
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 468,
"end": 474,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 10
},
"identifierName": "header"
},
"name": "header"
},
"value": {
"type": "StringLiteral",
"start": 476,
"end": 485,
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 21
}
},
"extra": {
"rawValue": "Options",
"raw": "'Options'"
},
"value": "Options"
}
},
{
"type": "ObjectProperty",
"start": 491,
"end": 520,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 33
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 491,
"end": 501,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 14
},
"identifierName": "optionList"
},
"name": "optionList"
},
"value": {
"type": "Identifier",
"start": 503,
"end": 520,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 22,
"column": 33
},
"identifierName": "optionDefinitions"
},
"name": "optionDefinitions"
}
}
]
}
]
}
]
},
"leadingComments": null
}
],
"kind": "const",
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * @private\n ",
"start": 108,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
],
"trailingComments": []
}
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\n * @private\n ",
"start": 108,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 6,
"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": "generateUsageGuide",
"start": 7,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 25
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 26,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 30
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "command-line-usage",
"start": 31,
"end": 51,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 51
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"u