@alpha.consultings/eloquent-orm.js 1.0.10 → 1.1.0

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.
Files changed (159) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/PACKAGE-UPDATE-SUMMARY.md +10 -10
  3. package/README.md +5 -5
  4. package/dist/Model.d.ts +1 -1
  5. package/dist/Model.js +3 -3
  6. package/dist/cli/commands/cacheClear.js +12 -12
  7. package/dist/cli/commands/cacheStats.js +12 -12
  8. package/dist/cli/commands/dbSeed.d.ts +1 -1
  9. package/dist/cli/commands/dbSeed.js +23 -23
  10. package/dist/cli/commands/dbSeedBootstrapPrecheck.d.ts +1 -1
  11. package/dist/cli/commands/dbSeedBootstrapPrecheck.js +2 -2
  12. package/dist/cli/commands/dbSeedFresh.d.ts +1 -1
  13. package/dist/cli/commands/dbSeedFresh.js +10 -10
  14. package/dist/cli/commands/demoScenario.js +11 -11
  15. package/dist/cli/commands/factoryStatus.js +13 -13
  16. package/dist/cli/commands/makeController.js +11 -11
  17. package/dist/cli/commands/makeFactory.js +21 -21
  18. package/dist/cli/commands/makeMigration.d.ts +1 -1
  19. package/dist/cli/commands/makeMigration.js +19 -17
  20. package/dist/cli/commands/makeModel.js +30 -30
  21. package/dist/cli/commands/makeRegistry.d.ts +5 -8
  22. package/dist/cli/commands/makeRegistry.js +18 -68
  23. package/dist/cli/commands/makeScenario.js +49 -43
  24. package/dist/cli/commands/makeSeed.js +12 -9
  25. package/dist/cli/commands/makeService.js +10 -10
  26. package/dist/cli/commands/migrateFresh.d.ts +1 -1
  27. package/dist/cli/commands/migrateFresh.js +14 -14
  28. package/dist/cli/commands/migrateReset.d.ts +1 -1
  29. package/dist/cli/commands/migrateReset.js +4 -4
  30. package/dist/cli/commands/migrateRollback.d.ts +1 -1
  31. package/dist/cli/commands/migrateRollback.js +36 -36
  32. package/dist/cli/commands/migrateRun.d.ts +2 -2
  33. package/dist/cli/commands/migrateRun.js +34 -34
  34. package/dist/cli/commands/migrateStatus.d.ts +1 -1
  35. package/dist/cli/commands/migrateStatus.js +16 -16
  36. package/dist/cli/eloquent.d.ts +1 -1
  37. package/dist/cli/eloquent.js +30 -30
  38. package/dist/cli/utils/ArtifactRoutingReport.d.ts +1 -1
  39. package/dist/cli/utils/ArtifactRoutingReport.js +3 -3
  40. package/dist/cli/utils/ArtifactStorage.d.ts +2 -2
  41. package/dist/cli/utils/ArtifactStorage.js +30 -17
  42. package/dist/cli/utils/AuditTrail.js +2 -2
  43. package/dist/cli/utils/CliBootstrapSupport.d.ts +1 -1
  44. package/dist/cli/utils/CliCommandTargets.d.ts +2 -2
  45. package/dist/cli/utils/CliCommandTargets.js +2 -2
  46. package/dist/cli/utils/CliMakeArtifactCommandRegistration.js +15 -15
  47. package/dist/cli/utils/CliMigrationCommandRegistration.js +29 -29
  48. package/dist/cli/utils/CliProductionGuards.d.ts +1 -1
  49. package/dist/cli/utils/CliProductionGuards.js +6 -6
  50. package/dist/cli/utils/CliScaffoldCommandRegistration.js +13 -13
  51. package/dist/cli/utils/CliSeedScenarioCommandRegistration.js +23 -23
  52. package/dist/cli/utils/CliSupportCommandRegistration.js +8 -8
  53. package/dist/cli/utils/ImportResolver.d.ts +12 -3
  54. package/dist/cli/utils/ImportResolver.js +76 -17
  55. package/dist/cli/utils/ModelIntrospector.d.ts +1 -1
  56. package/dist/cli/utils/ModelIntrospector.js +4 -4
  57. package/dist/cli/utils/ScaffoldGeneratorSupport.js +2 -2
  58. package/dist/cli/utils/ScenarioMorphAliasRouting.js +8 -8
  59. package/dist/cli/utils/SeedBootstrapPrecheck.d.ts +1 -1
  60. package/dist/cli/utils/SeedBootstrapPrecheck.js +10 -10
  61. package/dist/cli/utils/TemplateEngine.js +2 -2
  62. package/dist/cli/utils/factories/Factory.d.ts +1 -1
  63. package/dist/cli/utils/factories/FactoryDisplay.d.ts +1 -1
  64. package/dist/cli/utils/factories/FactoryGraph.js +5 -5
  65. package/dist/cli/utils/factories/FactoryLoader.d.ts +1 -1
  66. package/dist/cli/utils/factories/FactoryLoader.js +4 -4
  67. package/dist/cli/utils/factories/FactoryRegistry.d.ts +3 -3
  68. package/dist/cli/utils/factories/FactoryRegistry.js +10 -10
  69. package/dist/cli/utils/migrations/MigrationLockStrategy.d.ts +1 -1
  70. package/dist/cli/utils/migrations/MigrationLockStrategy.js +2 -2
  71. package/dist/cli/utils/migrations/MigrationTracker.d.ts +2 -2
  72. package/dist/cli/utils/migrations/MigrationTracker.js +6 -6
  73. package/dist/cli/utils/migrations/MongoMigrationTracker.js +3 -3
  74. package/dist/cli/utils/resolveConnectionFlags.d.ts +1 -1
  75. package/dist/cli/utils/resolveConnectionFlags.js +3 -3
  76. package/dist/cli/utils/resolveSqlConnectionFlags.d.ts +1 -1
  77. package/dist/cli/utils/typescript/BaseCommand.d.ts +1 -1
  78. package/dist/cli/utils/typescript/BaseCommand.js +3 -3
  79. package/dist/cli/utils/typescript/TypeScriptCompiler.js +0 -1
  80. package/dist/cli/utils/typescript/tsRuntime.js +26 -4
  81. package/dist/config/database.js +9 -9
  82. package/dist/core/cache/CacheFallbackManager.d.ts +1 -1
  83. package/dist/core/cache/CacheManager.d.ts +1 -1
  84. package/dist/core/cache/CacheManager.js +2 -2
  85. package/dist/core/cache/CacheRegistry.js +4 -4
  86. package/dist/core/cache/drivers/FileCacheDriver.d.ts +1 -1
  87. package/dist/core/cache/drivers/FileCacheDriver.js +2 -2
  88. package/dist/core/cache/drivers/MemcachedCacheDriver.d.ts +1 -1
  89. package/dist/core/cache/drivers/MemcachedCacheDriver.js +2 -2
  90. package/dist/core/cache/drivers/MemoryCacheDriver.d.ts +1 -1
  91. package/dist/core/cache/drivers/MemoryCacheDriver.js +2 -2
  92. package/dist/core/cache/setupCache.js +12 -12
  93. package/dist/core/connection/ConnectionFactory.d.ts +2 -2
  94. package/dist/core/connection/ConnectionFactory.js +9 -9
  95. package/dist/core/connection/DatabaseConnection.d.ts +2 -2
  96. package/dist/core/connection/DatabaseConnection.js +4 -4
  97. package/dist/core/connection/DriverAdapter.d.ts +1 -1
  98. package/dist/core/connection/DriverAdapter.js +2 -2
  99. package/dist/core/connection/resolveConnectionName.d.ts +1 -1
  100. package/dist/core/connection/resolveConnectionName.js +7 -7
  101. package/dist/core/model/BaseModel.d.ts +31 -30
  102. package/dist/core/model/BaseModel.js +38 -38
  103. package/dist/core/model/BaseModelSafeFinderStatics.d.ts +1 -1
  104. package/dist/core/model/BaseModelSafeFinderStatics.js +19 -19
  105. package/dist/core/model/CoreModel.d.ts +6 -4
  106. package/dist/core/model/CoreModel.js +28 -28
  107. package/dist/core/model/CoreModelPersistenceState.d.ts +1 -1
  108. package/dist/core/model/CoreModelSafeFinderSupport.d.ts +2 -2
  109. package/dist/core/model/CoreModelSafeFinderSupport.js +2 -2
  110. package/dist/core/model/CoreModelValidationEvents.d.ts +2 -2
  111. package/dist/core/model/CoreModelValidationEvents.js +2 -2
  112. package/dist/core/model/SafeFinder.d.ts +1 -1
  113. package/dist/core/model/SafeFinder.js +2 -2
  114. package/dist/core/orm/mixins/CastsMixin.js +2 -2
  115. package/dist/core/orm/mixins/HooksMixin.js +8 -8
  116. package/dist/core/orm/mixins/MorphableMixin.js +4 -4
  117. package/dist/core/orm/mixins/PivotHelperMixin.js +3 -3
  118. package/dist/core/orm/mixins/QueryCacheMixin.js +20 -20
  119. package/dist/core/orm/mixins/ScopeMixin.js +2 -2
  120. package/dist/core/orm/mixins/SoftDeletesMixin.js +2 -2
  121. package/dist/core/orm/mixins/utils/HookStore.d.ts +1 -1
  122. package/dist/core/orm/mixins/utils/HookStore.js +2 -2
  123. package/dist/core/orm/mixins/utils/modelRegistration.d.ts +1 -1
  124. package/dist/core/orm/mixins/utils/modelRegistration.js +6 -6
  125. package/dist/core/orm/relations/BelongsTo.d.ts +1 -1
  126. package/dist/core/orm/relations/BelongsTo.js +2 -2
  127. package/dist/core/orm/relations/BelongsToMany.d.ts +1 -1
  128. package/dist/core/orm/relations/BelongsToMany.js +2 -2
  129. package/dist/core/orm/relations/HasMany.d.ts +1 -1
  130. package/dist/core/orm/relations/HasMany.js +2 -2
  131. package/dist/core/orm/relations/HasOne.d.ts +1 -1
  132. package/dist/core/orm/relations/HasOne.js +2 -2
  133. package/dist/core/orm/relations/MorphMany.d.ts +1 -1
  134. package/dist/core/orm/relations/MorphMany.js +2 -2
  135. package/dist/core/orm/relations/MorphOne.d.ts +1 -1
  136. package/dist/core/orm/relations/MorphOne.js +2 -2
  137. package/dist/core/orm/relations/MorphTo.d.ts +1 -1
  138. package/dist/core/orm/relations/MorphTo.js +5 -5
  139. package/dist/core/schema/SchemaBlueprint.d.ts +21 -0
  140. package/dist/core/schema/SchemaBuilder.d.ts +16 -3
  141. package/dist/core/schema/SchemaBuilder.js +191 -48
  142. package/dist/core/schema/SchemaValidator.d.ts +1 -1
  143. package/dist/core/security/AbstractSecurity.d.ts +1 -1
  144. package/dist/core/security/EnvKeySecurity.d.ts +1 -1
  145. package/dist/core/security/EnvKeySecurity.js +2 -2
  146. package/dist/core/security/NoSecurity.d.ts +1 -1
  147. package/dist/core/security/NoSecurity.js +2 -2
  148. package/dist/core/security/SecurityFactory.d.ts +1 -1
  149. package/dist/core/security/SecurityFactory.js +4 -4
  150. package/dist/core/security/index.d.ts +5 -5
  151. package/dist/core/security/index.js +5 -5
  152. package/dist/index.d.ts +10 -10
  153. package/dist/index.js +30 -30
  154. package/esm/Factory.mjs +113 -136
  155. package/esm/Model.mjs +4 -0
  156. package/esm/index.mjs +23 -28
  157. package/package.json +14 -5
  158. package/src/cli/templates/factory.tpl +1 -1
  159. package/src/cli/templates/seed.tpl +1 -1
package/esm/Factory.mjs CHANGED
@@ -1,143 +1,120 @@
1
- import { faker } from "@faker-js/faker";
2
-
3
- export class Factory {
4
- faker = faker;
5
-
6
- async create(attrs = {}, index = 0) {
7
- const base = this.definition(index);
8
- const merged = { ...base, ...attrs };
9
-
10
- if (this.beforeCreate) {
11
- const modified = await this.beforeCreate(merged, index);
12
- if (modified && typeof modified === "object") {
13
- Object.assign(merged, modified);
14
- }
15
- }
16
-
17
- let instance = new this.model();
18
-
19
- if (this.#hasInstanceCreate(instance)) {
20
- const created = await instance.create(merged);
21
- if (created) {
22
- instance = created;
23
- }
24
- } else if (this.#hasStaticCreate(this.model)) {
25
- return this.model.create(merged);
26
- } else if (this.#hasInstanceSave(instance)) {
27
- Object.assign(instance, merged);
28
- await instance.save();
29
- } else {
30
- throw new Error(`Model '${this.model.name}' has no valid create/save method.`);
1
+ import { createRequire } from "node:module";
2
+ const require = createRequire(import.meta.url);
3
+ let cachedFaker;
4
+ function getFaker() {
5
+ if (!cachedFaker) {
6
+ cachedFaker = require("@faker-js/faker").faker;
31
7
  }
32
-
33
- if (this.afterCreate) {
34
- await this.afterCreate(instance);
35
- }
36
-
37
- return instance;
38
- }
39
-
40
- async createMany(count, callback, concurrency = 1) {
41
- const results = [];
42
-
43
- const executeCreate = async (index) => {
44
- const model = await this.create({}, index);
45
- if (callback) {
46
- await callback(model, index);
47
- }
48
- results[index] = model;
49
- };
50
-
51
- if (concurrency <= 1) {
52
- for (let index = 0; index < count; index += 1) {
53
- await executeCreate(index);
54
- }
55
- return results;
8
+ return cachedFaker;
9
+ }
10
+ export class Factory {
11
+ get faker() {
12
+ return getFaker();
56
13
  }
57
-
58
- let active = 0;
59
- let index = 0;
60
- let settled = false;
61
-
62
- return new Promise((resolve, reject) => {
63
- const maybeResolve = () => {
64
- if (!settled && index >= count && active === 0) {
65
- settled = true;
66
- resolve(results);
14
+ async create(attrs = {}, index = 0) {
15
+ const base = this.definition(index);
16
+ const merged = { ...base, ...attrs };
17
+ if (this.beforeCreate) {
18
+ const modified = await this.beforeCreate(merged, index);
19
+ if (modified && typeof modified === "object") {
20
+ Object.assign(merged, modified);
21
+ }
22
+ }
23
+ let instance = new this.model();
24
+ if (this.hasInstanceCreate(instance)) {
25
+ const created = await instance.create(merged);
26
+ if (created) {
27
+ instance = created;
28
+ }
29
+ }
30
+ else if (this.hasStaticCreate(this.model)) {
31
+ return this.model.create(merged);
32
+ }
33
+ else if (this.hasInstanceSave(instance)) {
34
+ Object.assign(instance, merged);
35
+ await instance.save();
67
36
  }
68
- };
69
-
70
- const next = () => {
71
- if (settled) {
72
- return;
37
+ else {
38
+ throw new Error(`Model '${this.model.name}' has no valid create/save method.`);
73
39
  }
74
-
75
- while (active < concurrency && index < count && !settled) {
76
- const currentIndex = index++;
77
- active += 1;
78
-
79
- void executeCreate(currentIndex)
80
- .catch((error) => {
81
- if (settled) {
82
- return;
83
- }
84
- settled = true;
85
- reject(error);
86
- })
87
- .finally(() => {
88
- active -= 1;
89
- if (settled) {
90
- return;
91
- }
92
- next();
93
- });
40
+ if (this.afterCreate) {
41
+ await this.afterCreate(instance);
94
42
  }
95
-
96
- maybeResolve();
97
- };
98
-
99
- next();
100
- });
101
- }
102
-
103
- async related(factoryOrCtor, count = 1) {
104
- const factory =
105
- typeof factoryOrCtor === "function"
106
- ? new factoryOrCtor()
107
- : factoryOrCtor;
108
-
109
- if (count === 1) {
110
- return factory.create();
43
+ return instance;
44
+ }
45
+ async createMany(count, callback, concurrency = 1) {
46
+ const results = [];
47
+ const executeCreate = async (itemIndex) => {
48
+ const model = await this.create({}, itemIndex);
49
+ if (callback) {
50
+ await callback(model, itemIndex);
51
+ }
52
+ results[itemIndex] = model;
53
+ };
54
+ if (concurrency <= 1) {
55
+ for (let itemIndex = 0; itemIndex < count; itemIndex += 1) {
56
+ await executeCreate(itemIndex);
57
+ }
58
+ return results;
59
+ }
60
+ let active = 0;
61
+ let itemIndex = 0;
62
+ let settled = false;
63
+ return new Promise((resolve, reject) => {
64
+ const maybeResolve = () => {
65
+ if (!settled && itemIndex >= count && active === 0) {
66
+ settled = true;
67
+ resolve(results);
68
+ }
69
+ };
70
+ const next = () => {
71
+ if (settled) {
72
+ return;
73
+ }
74
+ while (active < concurrency && itemIndex < count && !settled) {
75
+ const currentIndex = itemIndex++;
76
+ active += 1;
77
+ void executeCreate(currentIndex)
78
+ .catch((error) => {
79
+ if (settled) {
80
+ return;
81
+ }
82
+ settled = true;
83
+ reject(error);
84
+ })
85
+ .finally(() => {
86
+ active -= 1;
87
+ if (settled) {
88
+ return;
89
+ }
90
+ next();
91
+ });
92
+ }
93
+ maybeResolve();
94
+ };
95
+ next();
96
+ });
97
+ }
98
+ async related(factoryOrCtor, count = 1) {
99
+ const factory = typeof factoryOrCtor === "function"
100
+ ? new factoryOrCtor()
101
+ : factoryOrCtor;
102
+ if (count === 1) {
103
+ return factory.create();
104
+ }
105
+ return factory.createMany(count);
106
+ }
107
+ async relatedPivot(factory, pivotTable, foreignKey, relatedKey, foreignId, relatedIds, extraPivotAttrs) {
108
+ await factory.createPivot(foreignId, relatedIds, extraPivotAttrs);
109
+ console.log(`[Pivot Attached] Table "${pivotTable}" (${foreignKey} -> ${relatedKey})`);
110
+ }
111
+ hasInstanceCreate(obj) {
112
+ return typeof obj.create === "function";
113
+ }
114
+ hasStaticCreate(ctor) {
115
+ return typeof ctor.create === "function";
116
+ }
117
+ hasInstanceSave(obj) {
118
+ return typeof obj.save === "function";
111
119
  }
112
-
113
- return factory.createMany(count);
114
- }
115
-
116
- async relatedPivot(
117
- factory,
118
- pivotTable,
119
- foreignKey,
120
- relatedKey,
121
- foreignId,
122
- relatedIds,
123
- extraPivotAttrs
124
- ) {
125
- await factory.createPivot(foreignId, relatedIds, extraPivotAttrs);
126
-
127
- console.log(
128
- `[Pivot Attached] Table "${pivotTable}" (${foreignKey} -> ${relatedKey})`
129
- );
130
- }
131
-
132
- #hasInstanceCreate(obj) {
133
- return typeof obj?.create === "function";
134
- }
135
-
136
- #hasStaticCreate(ctor) {
137
- return typeof ctor?.create === "function";
138
- }
139
-
140
- #hasInstanceSave(obj) {
141
- return typeof obj?.save === "function";
142
- }
143
120
  }
package/esm/Model.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import cjsModelPackage from "../dist/Model.js";
2
+ const { SqlModel, MongoModel, } = cjsModelPackage;
3
+ export { SqlModel, MongoModel, };
4
+ export default cjsModelPackage;
package/esm/index.mjs CHANGED
@@ -1,32 +1,27 @@
1
1
  import cjsPackage from "../dist/index.js";
2
2
  import { Factory } from "./Factory.mjs";
3
-
4
- export { Factory };
5
-
6
- export const {
7
- BaseModel,
8
- Model,
9
- SqlModel,
10
- MongoModel,
11
- MorphRegistry,
12
- PivotHelperMixin,
13
- CoreModel,
14
- column,
15
- validate,
16
- relation,
17
- mixin,
18
- validateSchema,
19
- SchemaValidator,
20
- SchemaBuilder,
21
- CacheManager,
22
- setupCache,
23
- registerModels,
24
- isModelRegistered,
25
- setModelRegistryStrictMode,
26
- isModelRegistryStrictMode,
27
- } = cjsPackage;
28
-
3
+ const { BaseModel, Model, SqlModel, MongoModel, MorphRegistry, PivotHelperMixin, CoreModel, column, validate, relation, mixin, validateSchema, SchemaValidator, SchemaBuilder, CacheManager, setupCache, registerModels, isModelRegistered, setModelRegistryStrictMode, isModelRegistryStrictMode, } = cjsPackage;
4
+ export { BaseModel, Model, SqlModel, MongoModel, MorphRegistry, PivotHelperMixin, CoreModel, column, validate, relation, mixin, validateSchema, SchemaValidator, SchemaBuilder, CacheManager, setupCache, registerModels, isModelRegistered, setModelRegistryStrictMode, isModelRegistryStrictMode, Factory, };
29
5
  export default {
30
- ...cjsPackage,
31
- Factory,
6
+ BaseModel,
7
+ Model,
8
+ SqlModel,
9
+ MongoModel,
10
+ MorphRegistry,
11
+ PivotHelperMixin,
12
+ CoreModel,
13
+ column,
14
+ validate,
15
+ relation,
16
+ mixin,
17
+ validateSchema,
18
+ SchemaValidator,
19
+ SchemaBuilder,
20
+ CacheManager,
21
+ setupCache,
22
+ registerModels,
23
+ isModelRegistered,
24
+ setModelRegistryStrictMode,
25
+ isModelRegistryStrictMode,
26
+ Factory,
32
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpha.consultings/eloquent-orm.js",
3
- "version": "1.0.10",
3
+ "version": "1.1.0",
4
4
  "description": "A Laravel Eloquent-inspired ORM Multi Driver SQL & NoSQL and Cache System and Artisan CLI like for Node.js Lovers",
5
5
  "keywords": [
6
6
  "orm",
@@ -58,8 +58,9 @@
58
58
  },
59
59
  "./Model": {
60
60
  "types": "./dist/Model.d.ts",
61
+ "import": "./esm/Model.mjs",
61
62
  "require": "./dist/Model.js",
62
- "default": "./dist/Model.js"
63
+ "default": "./esm/Model.mjs"
63
64
  },
64
65
  "./package.json": "./package.json"
65
66
  },
@@ -78,9 +79,11 @@
78
79
  "docs:sync-package-metadata": "node scripts/sync-package-metadata.cjs",
79
80
  "docs:sync-supported": "node scripts/sync-supported-versions.cjs",
80
81
  "docs:sync-config": "node scripts/sync-mintlify-configs.cjs",
81
- "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
82
- "build": "npm run docs:sync-package-metadata && npm run docs:sync-supported && npm run clean && tsc -p tsconfig.build.json && node scripts/patch-dist-cjs-factory-entry.cjs",
82
+ "audit:nodenext-blockers": "node scripts/generate-nodenext-blocker-inventory.cjs",
83
+ "clean": "node -e \"const fs=require('fs'); fs.rmSync('dist', { recursive: true, force: true }); fs.rmSync('esm', { recursive: true, force: true })\"",
84
+ "build": "npm run docs:sync-package-metadata && npm run docs:sync-supported && npm run clean && tsc -p tsconfig.build.json && tsc -p tsconfig.esm.json && node scripts/patch-dist-cjs-factory-entry.cjs",
83
85
  "typecheck": "tsc -p . --noEmit --skipLibCheck",
86
+ "typecheck:nodenext": "tsc -p . --noEmit --skipLibCheck",
84
87
  "docs:dev": "npm run docs:sync-package-metadata && npm run docs:sync-config && node scripts/run-mintlify.cjs dev",
85
88
  "docs:build": "npm run docs:sync-package-metadata && npm run docs:sync-supported && npm run docs:sync-config && node scripts/run-mintlify.cjs validate",
86
89
  "docs:validate": "npm run docs:sync-package-metadata && npm run docs:sync-supported && npm run docs:sync-config && node scripts/run-mintlify.cjs validate",
@@ -91,7 +94,8 @@
91
94
  "coverage:misses": "npm run test:coverage && node scripts/coverage-misses.cjs",
92
95
  "test:critical": "jest --runInBand src/lab_test/cli.integration.scenario.lifecycle.test.ts src/lab_test/cli.integration.make-migration.targeting.test.ts src/lab_test/cli.integration.migrate.targeting.test.ts src/lab_test/cli.integration.seed-and-demo.targeting.test.ts src/lab_test/cli.integration.factory-status.targeting.test.ts src/lab_test/migration.tracker.logic.test.ts src/lab_test/cache.commands.logic.test.ts",
93
96
  "test:pack-smoke": "npm run build && node scripts/pack-smoke.js",
94
- "test:pack-smoke:docker": "docker compose -f docker-compose.coverage-debug.yml run --rm pack-smoke",
97
+ "test:coverage:docker": "docker compose -f docker-compose.coverage-debug.yml build --no-cache coverage-debug && docker compose -f docker-compose.coverage-debug.yml run --rm coverage-debug",
98
+ "test:pack-smoke:docker": "docker compose -f docker-compose.coverage-debug.yml build --no-cache pack-smoke && docker compose -f docker-compose.coverage-debug.yml run --rm pack-smoke",
95
99
  "dev": "ts-node src/index.ts",
96
100
  "cli": "ts-node bin/eloquent.ts",
97
101
  "release": "npm run docs:sync-package-metadata && npm run docs:sync-supported && semantic-release"
@@ -128,5 +132,10 @@
128
132
  "jest": "^30.2.0",
129
133
  "semantic-release": "^24.2.9",
130
134
  "ts-jest": "^29.4.5"
135
+ },
136
+ "overrides": {
137
+ "@mintlify/link-rot": {
138
+ "@mintlify/scraping": "4.0.688"
139
+ }
131
140
  }
132
141
  }
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "{{packageImportPath}}";
2
- import { {{ModelName}} } from "../../models/{{ModelName}}";
2
+ import { {{ModelName}} } from "{{modelImportPath}}";
3
3
 
4
4
  export class {{FactoryName}} extends Factory<{{ModelName}}> {
5
5
  model = {{ModelName}};
@@ -5,7 +5,7 @@
5
5
  * Created at: {{Timestamp}}
6
6
  */
7
7
 
8
- import { {{FactoryName}} } from "../factories/{{FactoryName}}";
8
+ import { {{FactoryName}} } from "{{factoryImportPath}}";
9
9
 
10
10
  export async function {{SeederName}}() {
11
11
  console.log("Running seeder: {{SeederName}}");