@jorgebodega/typeorm-seeding 6.0.0-next.1 → 6.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/dist/commands/seed.command.js +3 -3
- package/dist/commands/seed.command.js.map +1 -1
- package/package.json +14 -14
- package/pnpm-lock.yaml +572 -472
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# [6.0.0-next.3](https://github.com/jorgebodega/typeorm-seeding/compare/v6.0.0-next.2...v6.0.0-next.3) (2022-10-15)
|
|
2
|
+
|
|
3
|
+
# [6.0.0-next.2](https://github.com/jorgebodega/typeorm-seeding/compare/v6.0.0-next.1...v6.0.0-next.2) (2022-08-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add support for multiple paths on cli ([6ffb5dd](https://github.com/jorgebodega/typeorm-seeding/commit/6ffb5dd00dcb83c06b62a616855b344ab01f2096))
|
|
9
|
+
|
|
1
10
|
# [6.0.0-next.1](https://github.com/jorgebodega/typeorm-seeding/compare/v5.0.1-next.1...v6.0.0-next.1) (2022-08-18)
|
|
2
11
|
|
|
3
12
|
|
package/README.md
CHANGED
|
@@ -139,7 +139,7 @@ Add the following script to your `package.json` file to configure them.
|
|
|
139
139
|
This command execute a seeder, that could be specified as a parameter. Glob pattern is supported.
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
|
-
typeorm-seeding seed <
|
|
142
|
+
typeorm-seeding seed <paths>
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
CLI command only executes default seeders.
|
|
@@ -10,7 +10,7 @@ const DataSourceImportationError_1 = require("../errors/DataSourceImportationErr
|
|
|
10
10
|
const SeederExecutionError_1 = require("../errors/SeederExecutionError");
|
|
11
11
|
const helpers_1 = require("../helpers");
|
|
12
12
|
const utils_1 = require("../utils");
|
|
13
|
-
async function run(
|
|
13
|
+
async function run(paths) {
|
|
14
14
|
const opts = seedCommand.opts();
|
|
15
15
|
const spinner = (0, ora_1.default)({ isSilent: process.env.NODE_ENV === 'test' }).start();
|
|
16
16
|
spinner.start('Loading datasource');
|
|
@@ -27,7 +27,7 @@ async function run(path) {
|
|
|
27
27
|
spinner.start('Importing seeders');
|
|
28
28
|
let seeders;
|
|
29
29
|
try {
|
|
30
|
-
const seederFiles = (
|
|
30
|
+
const seederFiles = paths.flatMap(utils_1.calculateFilePath);
|
|
31
31
|
seeders = await utils_1.CommandUtils.loadSeeders(seederFiles);
|
|
32
32
|
spinner.succeed('Seeder imported');
|
|
33
33
|
}
|
|
@@ -55,7 +55,7 @@ async function run(path) {
|
|
|
55
55
|
const seedCommand = new commander_1.Command('seed')
|
|
56
56
|
.description('Run the seeders specified by the path. Glob pattern is allowed.')
|
|
57
57
|
.requiredOption('-d, --dataSource <dataSourcePath>', 'Path to the file where your DataSource instance is defined.', './datasource.ts')
|
|
58
|
-
.argument('<path
|
|
58
|
+
.argument('<path...>', 'Paths to the seeders. Glob pattern is allowed.')
|
|
59
59
|
.action(run);
|
|
60
60
|
async function bootstrap(argv) {
|
|
61
61
|
await seedCommand.parseAsync(argv);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.command.js","sourceRoot":"","sources":["../../src/commands/seed.command.ts"],"names":[],"mappings":";;;;AAAA,yCAAmC;AACnC,yCAAmC;AACnC,sDAAqB;AAErB,sCAAkD;AAClD,qFAAiF;AACjF,yEAAqE;AACrE,wCAAsD;AAGtD,oCAA0D;AAE1D,KAAK,UAAU,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"seed.command.js","sourceRoot":"","sources":["../../src/commands/seed.command.ts"],"names":[],"mappings":";;;;AAAA,yCAAmC;AACnC,yCAAmC;AACnC,sDAAqB;AAErB,sCAAkD;AAClD,qFAAiF;AACjF,yEAAqE;AACrE,wCAAsD;AAGtD,oCAA0D;AAE1D,KAAK,UAAU,GA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BAAa,EAAC,UAAU,EAAE,IAAI,CAAC,CAAA;QAErC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC5B,OAAO,CAAC,KAAK,CAAC,aAAa,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;YACzC,MAAM,IAAA,oBAAU,EAAC,MAAM,CAAC,CAAA;YACxB,OAAO,CAAC,OAAO,CAAC,UAAU,MAAM,CAAC,IAAI,WAAW,CAAC,CAAA;SAClD;KACF;IAAC,OAAO,KAAU,EAAE;QACnB,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;QACzC,MAAM,UAAU,CAAC,OAAO,EAAE,CAAA;QAC1B,MAAM,IAAI,2CAAoB,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;KAC9E;IAED,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;IACnC,MAAM,UAAU,CAAC,OAAO,EAAE,CAAA;AAC5B,CAAC;AAED,MAAM,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;KACpC,WAAW,CAAC,iEAAiE,CAAC;KAC9E,cAAc,CACb,mCAAmC,EACnC,6DAA6D,EAC7D,iBAAiB,CAClB;KACA,QAAQ,CAAC,WAAW,EAAE,gDAAgD,CAAC;KACvE,MAAM,CAAC,GAAG,CAAC,CAAA;AAEP,KAAK,UAAU,SAAS,CAAC,IAAc;IAC5C,MAAM,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;AACpC,CAAC;AAFD,8BAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jorgebodega/typeorm-seeding",
|
|
3
|
-
"version": "6.0.0-next.
|
|
3
|
+
"version": "6.0.0-next.3",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"typeorm",
|
|
6
6
|
"seed",
|
|
@@ -38,29 +38,29 @@
|
|
|
38
38
|
"typecheck": "tsc --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@faker-js/faker": "7.
|
|
42
|
-
"@jorgebodega/typeorm-factory": "1.
|
|
41
|
+
"@faker-js/faker": "7.6.0",
|
|
42
|
+
"@jorgebodega/typeorm-factory": "1.2.0",
|
|
43
43
|
"@tsconfig/node16": "1.0.3",
|
|
44
|
-
"@types/glob": "
|
|
45
|
-
"@types/jest": "
|
|
44
|
+
"@types/glob": "8.0.0",
|
|
45
|
+
"@types/jest": "29.1.2",
|
|
46
46
|
"@types/node": "18.7.6",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
48
|
-
"@typescript-eslint/parser": "5.
|
|
49
|
-
"eslint": "8.
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "5.40.0",
|
|
48
|
+
"@typescript-eslint/parser": "5.40.0",
|
|
49
|
+
"eslint": "8.25.0",
|
|
50
50
|
"eslint-config-prettier": "8.5.0",
|
|
51
51
|
"eslint-plugin-import": "2.26.0",
|
|
52
|
-
"jest": "
|
|
52
|
+
"jest": "29.2.0",
|
|
53
53
|
"prettier": "2.7.1",
|
|
54
54
|
"rimraf": "3.0.2",
|
|
55
|
-
"sqlite3": "5.
|
|
56
|
-
"ts-jest": "
|
|
55
|
+
"sqlite3": "5.1.2",
|
|
56
|
+
"ts-jest": "29.0.3",
|
|
57
57
|
"ts-node": "10.9.1",
|
|
58
|
-
"typeorm": "0.3.
|
|
59
|
-
"typescript": "4.
|
|
58
|
+
"typeorm": "0.3.10",
|
|
59
|
+
"typescript": "4.8.4"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"chalk": "4.1.2",
|
|
63
|
-
"commander": "9.4.
|
|
63
|
+
"commander": "9.4.1",
|
|
64
64
|
"glob": "8.0.3",
|
|
65
65
|
"ora": "5.4.1",
|
|
66
66
|
"tslib": "2.4.0"
|