@jorgebodega/typeorm-seeding 6.0.0-next.1 → 6.0.0-next.2
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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [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)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add support for multiple paths on cli ([6ffb5dd](https://github.com/jorgebodega/typeorm-seeding/commit/6ffb5dd00dcb83c06b62a616855b344ab01f2096))
|
|
7
|
+
|
|
1
8
|
# [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
9
|
|
|
3
10
|
|
|
@@ -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,GAAG,CAAC,KAAe;IAChC,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAwB,CAAA;IACrD,MAAM,OAAO,GAAG,IAAA,aAAG,EAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAA;IAE1E,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA;IACnC,IAAI,UAAuB,CAAA;IAC3B,IAAI;QACF,MAAM,cAAc,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;QAE9D,UAAU,GAAG,MAAM,oBAAY,CAAC,cAAc,CAAC,cAAc,CAAC,CAAA;QAE9D,OAAO,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AAC,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.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"typeorm",
|
|
6
6
|
"seed",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@faker-js/faker": "7.4.0",
|
|
42
|
-
"@jorgebodega/typeorm-factory": "1.
|
|
42
|
+
"@jorgebodega/typeorm-factory": "1.2.0",
|
|
43
43
|
"@tsconfig/node16": "1.0.3",
|
|
44
44
|
"@types/glob": "7.2.0",
|
|
45
45
|
"@types/jest": "28.1.7",
|
package/pnpm-lock.yaml
CHANGED
|
@@ -2,7 +2,7 @@ lockfileVersion: 5.4
|
|
|
2
2
|
|
|
3
3
|
specifiers:
|
|
4
4
|
'@faker-js/faker': 7.4.0
|
|
5
|
-
'@jorgebodega/typeorm-factory': 1.
|
|
5
|
+
'@jorgebodega/typeorm-factory': 1.2.0
|
|
6
6
|
'@tsconfig/node16': 1.0.3
|
|
7
7
|
'@types/glob': 7.2.0
|
|
8
8
|
'@types/jest': 28.1.7
|
|
@@ -35,7 +35,7 @@ dependencies:
|
|
|
35
35
|
|
|
36
36
|
devDependencies:
|
|
37
37
|
'@faker-js/faker': 7.4.0
|
|
38
|
-
'@jorgebodega/typeorm-factory': 1.
|
|
38
|
+
'@jorgebodega/typeorm-factory': 1.2.0_typeorm@0.3.7
|
|
39
39
|
'@tsconfig/node16': 1.0.3
|
|
40
40
|
'@types/glob': 7.2.0
|
|
41
41
|
'@types/jest': 28.1.7
|
|
@@ -668,8 +668,8 @@ packages:
|
|
|
668
668
|
chalk: 4.1.2
|
|
669
669
|
dev: true
|
|
670
670
|
|
|
671
|
-
/@jorgebodega/typeorm-factory/1.
|
|
672
|
-
resolution: {integrity: sha512
|
|
671
|
+
/@jorgebodega/typeorm-factory/1.2.0_typeorm@0.3.7:
|
|
672
|
+
resolution: {integrity: sha512-/Hv//5E/MPswRI+UUh+ORjy8bMPqDx4LC/VlTY+lVIU1Fkq8W4tVZxlAJsom6Dwd89eMu984eFmob3rJtrWagA==}
|
|
673
673
|
engines: {node: '>=14'}
|
|
674
674
|
peerDependencies:
|
|
675
675
|
typeorm: ^0.3.0
|