@dauflo/nest-fixtures 0.0.7 → 0.0.8
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/dist/fixtures.module.js
CHANGED
|
@@ -17,7 +17,7 @@ class FixturesModule {
|
|
|
17
17
|
static forRootAsync(fixturesPathPattern, entitiesPathPattern) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const fixturesPath = glob_1.glob.sync(fixturesPathPattern);
|
|
20
|
-
const fixturesRelativePath = fixturesPath.map((path) => path.replace('src/', './../../../../')).map((path) => path.replace('.ts', ''));
|
|
20
|
+
const fixturesRelativePath = fixturesPath.map((path) => path.replace('src/', './../../../../dist/')).map((path) => path.replace('.ts', ''));
|
|
21
21
|
const fixturesProviders = [];
|
|
22
22
|
console.log(fixturesRelativePath);
|
|
23
23
|
const importedFixtures = yield Promise.all(fixturesRelativePath.map((path) => Promise.resolve().then(() => require(path))));
|
|
@@ -25,7 +25,7 @@ class FixturesModule {
|
|
|
25
25
|
fixturesProviders.push(fixture[Object.keys(fixture)[0]]);
|
|
26
26
|
});
|
|
27
27
|
const entitiesPath = glob_1.glob.sync(entitiesPathPattern);
|
|
28
|
-
const entitiesRelativePath = entitiesPath.map((path) => path.replace('src/', './../../../../')).map((path) => path.replace('.ts', ''));
|
|
28
|
+
const entitiesRelativePath = entitiesPath.map((path) => path.replace('src/', './../../../../dist/')).map((path) => path.replace('.ts', ''));
|
|
29
29
|
const entitiesProviders = [];
|
|
30
30
|
const importedEntities = yield Promise.all(entitiesRelativePath.map((path) => Promise.resolve().then(() => require(path))));
|
|
31
31
|
importedEntities.forEach((entity) => {
|
package/package.json
CHANGED
package/src/fixtures.module.ts
CHANGED
|
@@ -7,7 +7,7 @@ export class FixturesModule {
|
|
|
7
7
|
static async forRootAsync(fixturesPathPattern: string, entitiesPathPattern: string): Promise<DynamicModule> {
|
|
8
8
|
// import fixtures
|
|
9
9
|
const fixturesPath = glob.sync(fixturesPathPattern)
|
|
10
|
-
const fixturesRelativePath = fixturesPath.map((path) => path.replace('src/', './../../../../')).map((path) => path.replace('.ts', ''))
|
|
10
|
+
const fixturesRelativePath = fixturesPath.map((path) => path.replace('src/', './../../../../dist/')).map((path) => path.replace('.ts', ''))
|
|
11
11
|
const fixturesProviders: any[] = []
|
|
12
12
|
console.log(fixturesRelativePath)
|
|
13
13
|
const importedFixtures = await Promise.all(fixturesRelativePath.map((path) => import(path)))
|
|
@@ -18,7 +18,7 @@ export class FixturesModule {
|
|
|
18
18
|
|
|
19
19
|
// import entities
|
|
20
20
|
const entitiesPath = glob.sync(entitiesPathPattern)
|
|
21
|
-
const entitiesRelativePath = entitiesPath.map((path) => path.replace('src/', './../../../../')).map((path) => path.replace('.ts', ''))
|
|
21
|
+
const entitiesRelativePath = entitiesPath.map((path) => path.replace('src/', './../../../../dist/')).map((path) => path.replace('.ts', ''))
|
|
22
22
|
const entitiesProviders: any[] = []
|
|
23
23
|
const importedEntities = await Promise.all(entitiesRelativePath.map((path) => import(path)))
|
|
24
24
|
|