arkormx 2.1.0 → 2.2.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.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as PRISMA_ENUM_MEMBER_REGEX, $t as findAppliedMigration, A as isDelegateLike, At as getMigrationPlan, B as getPersistedEnumMap, Bt as supportsDatabaseReset, C as getRuntimeAdapter, Ct as escapeRegex, D as getRuntimePaginationURLDriverFactory, Dt as formatEnumDefaultValue, E as getRuntimePaginationCurrentPageResolver, Et as formatDefaultValue, F as runArkormTransaction, Ft as runMigrationWithPrisma, G as readPersistedColumnMappingsState, Gt as TableBuilder, H as getPersistedPrimaryKeyGeneration, Ht as toModelName, I as applyOperationsToPersistedColumnMappingsState, It as runPrismaCommand, J as resolveColumnMappingsFilePath, Jt as buildMigrationIdentity, K as rebuildPersistedColumnMappingsState, Kt as ForeignKeyBuilder, L as createEmptyPersistedColumnMappingsState, Lt as stripPrismaSchemaModelsAndEnums, M as isTransactionCapableClient, Mt as resolveEnumName, N as loadArkormConfig, Nt as resolveMigrationClassName, O as getRuntimePrismaClient, Ot as formatRelationAction, P as resetArkormRuntimeForTests, Pt as resolvePrismaType, Q as writePersistedColumnMappingsState, Qt as deleteAppliedMigrationsStateFromStore, R as deletePersistedColumnMappingsState, Rt as supportsDatabaseCreation, S as getDefaultStubsPath, St as deriveSingularFieldName, T as getRuntimeDebugHandler, Tt as findModelBlock, U as getPersistedTableMetadata, Ut as SchemaBuilder, V as getPersistedEnumTsType, Vt as toMigrationFileSlug, W as getPersistedTimestampColumns, Wt as EnumBuilder, X as syncPersistedColumnMappingsFromState, Xt as computeMigrationChecksum, Y as resolvePersistedMetadataFeatures, Yt as buildMigrationRunId, Z as validatePersistedMetadataFeaturesForMigrations, Zt as createEmptyAppliedMigrationsState, _ as defineConfig, _n as ArkormCollection, _t as createMigrationTimestamp, a as HasOneRelation, an as readAppliedMigrationsState, at as applyMigrationRollbackToDatabase, b as getActiveTransactionAdapter, bt as deriveRelationAlias, c as BelongsToRelation, cn as resolveMigrationStateFilePath, ct as applyMigrationToPrismaSchema, d as Relation, dn as writeAppliedMigrationsStateToStore, dt as buildFieldLine, en as getLastMigrationRun, et as PRISMA_ENUM_REGEX, f as LengthAwarePaginator, fn as RuntimeModuleLoader, ft as buildIndexLine, g as configureArkormRuntime, gn as RelationResolutionException, gt as buildRelationLine, h as bindAdapterToModels, ht as buildModelBlock, i as HasOneThroughRelation, in as markMigrationRun, it as applyDropTableOperation, j as isQuerySchemaLike, jt as pad, k as getUserConfig, kt as generateMigrationFile, ln as supportsDatabaseMigrationState, lt as applyOperationsToPrismaSchema, m as URLDriver, mn as SetBasedEagerLoader, mt as buildMigrationSource, n as MorphOneRelation, nn as isMigrationApplied, nt as applyAlterTableOperation, o as HasManyThroughRelation, on as readAppliedMigrationsStateFromStore, ot as applyMigrationRollbackToPrismaSchema, p as Paginator, pn as UnsupportedAdapterFeatureException, pt as buildInverseRelationLine, q as resetPersistedColumnMappingsCache, qt as PrimaryKeyGenerationPlanner, r as MorphManyRelation, rn as markMigrationApplied, rt as applyCreateTableOperation, s as HasManyRelation, sn as removeAppliedMigration, st as applyMigrationToDatabase, t as MorphToManyRelation, tn as getLatestAppliedMigrations, tt as PRISMA_MODEL_REGEX, u as BelongsToManyRelation, un as writeAppliedMigrationsState, ut as buildEnumBlock, v as emitRuntimeDebugEvent, vn as ArkormException, vt as deriveCollectionFieldName, w as getRuntimeClient, wt as findEnumBlock, x as getActiveTransactionClient, xt as deriveRelationFieldName, y as ensureArkormConfigLoading, yt as deriveInverseRelationAlias, z as getPersistedColumnMap, zt as supportsDatabaseMigrationExecution } from "./relationship-BBMs-1iK.mjs";
1
+ import { $ as deletePersistedColumnMappingsState, $t as supportsDatabaseCreation, A as isDelegateLike, At as buildModelBlock, B as getRegisteredSeeders, Bt as findModelBlock, C as getRuntimeAdapter, Cn as resolveMigrationStateFilePath, Ct as applyMigrationToPrismaSchema, D as getRuntimePaginationURLDriverFactory, Dn as RuntimeModuleLoader, Dt as buildIndexLine, E as getRuntimePaginationCurrentPageResolver, En as writeAppliedMigrationsStateToStore, Et as buildFieldLine, F as runArkormTransaction, Ft as deriveRelationAlias, G as registerFactories, Gt as getMigrationPlan, H as loadMigrationsFrom, Ht as formatEnumDefaultValue, I as getRegisteredFactories, It as deriveRelationFieldName, J as registerPaths, Jt as resolveMigrationClassName, K as registerMigrations, Kt as pad, L as getRegisteredMigrations, Lt as deriveSingularFieldName, M as isTransactionCapableClient, Mn as ArkormCollection, Mt as createMigrationTimestamp, N as loadArkormConfig, Nn as ArkormException, Nt as deriveCollectionFieldName, O as getRuntimePrismaClient, On as UnsupportedAdapterFeatureException, Ot as buildInverseRelationLine, P as resetArkormRuntimeForTests, Pt as deriveInverseRelationAlias, Q as createEmptyPersistedColumnMappingsState, Qt as stripPrismaSchemaModelsAndEnums, R as getRegisteredModels, Rt as escapeRegex, S as getDefaultStubsPath, Sn as removeAppliedMigration, St as applyMigrationToDatabase, T as getRuntimeDebugHandler, Tn as writeAppliedMigrationsState, Tt as buildEnumBlock, U as loadModelsFrom, Ut as formatRelationAction, V as loadFactoriesFrom, Vt as formatDefaultValue, W as loadSeedersFrom, Wt as generateMigrationFile, X as resetRuntimeRegistryForTests, Xt as runMigrationWithPrisma, Y as registerSeeders, Yt as resolvePrismaType, Z as applyOperationsToPersistedColumnMappingsState, Zt as runPrismaCommand, _ as defineConfig, _n as isMigrationApplied, _t as applyAlterTableOperation, a as HasOneRelation, an as EnumBuilder, at as getPersistedTimestampColumns, b as getActiveTransactionAdapter, bn as readAppliedMigrationsState, bt as applyMigrationRollbackToDatabase, c as BelongsToRelation, cn as PrimaryKeyGenerationPlanner, ct as resetPersistedColumnMappingsCache, d as Relation, dn as computeMigrationChecksum, dt as syncPersistedColumnMappingsFromState, en as supportsDatabaseMigrationExecution, et as getPersistedColumnMap, f as LengthAwarePaginator, fn as createEmptyAppliedMigrationsState, ft as validatePersistedMetadataFeaturesForMigrations, g as configureArkormRuntime, gn as getLatestAppliedMigrations, gt as PRISMA_MODEL_REGEX, h as bindAdapterToModels, hn as getLastMigrationRun, ht as PRISMA_ENUM_REGEX, i as HasOneThroughRelation, in as SchemaBuilder, it as getPersistedTableMetadata, j as isQuerySchemaLike, jn as RelationResolutionException, jt as buildRelationLine, k as getUserConfig, kn as SetBasedEagerLoader, kt as buildMigrationSource, ln as buildMigrationIdentity, lt as resolveColumnMappingsFilePath, m as URLDriver, mn as findAppliedMigration, mt as PRISMA_ENUM_MEMBER_REGEX, n as MorphOneRelation, nn as toMigrationFileSlug, nt as getPersistedEnumTsType, o as HasManyThroughRelation, on as TableBuilder, ot as readPersistedColumnMappingsState, p as Paginator, pn as deleteAppliedMigrationsStateFromStore, pt as writePersistedColumnMappingsState, q as registerModels, qt as resolveEnumName, r as MorphManyRelation, rn as toModelName, rt as getPersistedPrimaryKeyGeneration, s as HasManyRelation, sn as ForeignKeyBuilder, st as rebuildPersistedColumnMappingsState, t as MorphToManyRelation, tn as supportsDatabaseReset, tt as getPersistedEnumMap, u as BelongsToManyRelation, un as buildMigrationRunId, ut as resolvePersistedMetadataFeatures, v as emitRuntimeDebugEvent, vn as markMigrationApplied, vt as applyCreateTableOperation, w as getRuntimeClient, wn as supportsDatabaseMigrationState, wt as applyOperationsToPrismaSchema, x as getActiveTransactionClient, xn as readAppliedMigrationsStateFromStore, xt as applyMigrationRollbackToPrismaSchema, y as ensureArkormConfigLoading, yn as markMigrationRun, yt as applyDropTableOperation, z as getRegisteredPaths, zt as findEnumBlock } from "./relationship-AnKH8ZaV.mjs";
2
2
  import { Pool } from "pg";
3
3
  import { join, resolve } from "node:path";
4
4
  import { createRequire } from "module";
@@ -2788,10 +2788,10 @@ var MigrateCommand = class extends Command {
2788
2788
  async handle() {
2789
2789
  this.app.command = this;
2790
2790
  const configuredMigrationsDir = this.app.getConfig("paths")?.migrations ?? join(process.cwd(), "database", "migrations");
2791
- const migrationsDir = this.app.resolveRuntimeDirectoryPath(configuredMigrationsDir);
2792
- if (!existsSync$1(migrationsDir)) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
2791
+ const migrationDirs = this.resolveMigrationDirectories(configuredMigrationsDir);
2792
+ if (migrationDirs.length === 0 && getRegisteredMigrations().length === 0) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
2793
2793
  const schemaPath = this.option("schema") ? resolve(String(this.option("schema"))) : join(process.cwd(), "prisma", "schema.prisma");
2794
- const classes = this.option("all") || !this.argument("name") ? await this.loadAllMigrations(migrationsDir) : (await this.loadNamedMigration(migrationsDir, this.argument("name"))).filter(([cls]) => cls !== void 0);
2794
+ const classes = this.option("all") || !this.argument("name") ? await this.loadAllMigrations(migrationDirs) : (await this.loadNamedMigration(migrationDirs, this.argument("name"))).filter(([cls]) => cls !== void 0);
2795
2795
  if (classes.length === 0) return void this.error("Error: No migration classes found to run.");
2796
2796
  const stateFilePath = resolveMigrationStateFilePath(process.cwd(), this.option("state-file") ? String(this.option("state-file")) : void 0);
2797
2797
  const adapter = this.app.getConfig("adapter");
@@ -2819,7 +2819,7 @@ var MigrateCommand = class extends Command {
2819
2819
  });
2820
2820
  if (pending.length === 0) {
2821
2821
  if (appliedMigrationState) try {
2822
- await syncPersistedColumnMappingsFromState(process.cwd(), appliedMigrationState, await this.loadAllMigrations(migrationsDir), persistedFeatures);
2822
+ await syncPersistedColumnMappingsFromState(process.cwd(), appliedMigrationState, await this.loadAllMigrations(migrationDirs), persistedFeatures);
2823
2823
  } catch (error) {
2824
2824
  this.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
2825
2825
  return;
@@ -2863,7 +2863,7 @@ var MigrateCommand = class extends Command {
2863
2863
  });
2864
2864
  if (!(await this.runWithDatabaseCreationRetry(adapter, () => writeAppliedMigrationsStateToStore(adapter, stateFilePath, appliedMigrationState))).ok) return;
2865
2865
  try {
2866
- await syncPersistedColumnMappingsFromState(process.cwd(), appliedMigrationState, await this.loadAllMigrations(migrationsDir), persistedFeatures);
2866
+ await syncPersistedColumnMappingsFromState(process.cwd(), appliedMigrationState, await this.loadAllMigrations(migrationDirs), persistedFeatures);
2867
2867
  } catch (error) {
2868
2868
  this.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
2869
2869
  return;
@@ -2885,9 +2885,12 @@ var MigrateCommand = class extends Command {
2885
2885
  *
2886
2886
  * @param migrationsDir The directory to load migration classes from.
2887
2887
  */
2888
- async loadAllMigrations(migrationsDir) {
2889
- const files = readdirSync$1(migrationsDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).sort((left, right) => left.localeCompare(right)).map((file) => this.app.resolveRuntimeScriptPath(join(migrationsDir, file)));
2890
- return (await Promise.all(files.map(async (file) => (await this.loadMigrationClassesFromFile(file)).map((cls) => [cls, file])))).flat();
2888
+ resolveMigrationDirectories(configuredMigrationsDir) {
2889
+ return [this.app.resolveRuntimeDirectoryPath(configuredMigrationsDir), ...getRegisteredPaths("migrations").map((directory) => this.app.resolveRuntimeDirectoryPath(directory))].filter((directory, index, all) => existsSync$1(directory) && all.indexOf(directory) === index);
2890
+ }
2891
+ async loadAllMigrations(migrationsDirs) {
2892
+ const files = migrationsDirs.flatMap((migrationsDir) => readdirSync$1(migrationsDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).sort((left, right) => left.localeCompare(right)).map((file) => this.app.resolveRuntimeScriptPath(join(migrationsDir, file))));
2893
+ return [...(await Promise.all(files.map(async (file) => (await this.loadMigrationClassesFromFile(file)).map((cls) => [cls, file])))).flat(), ...getRegisteredMigrations().map((cls) => [cls, `registered:${cls.name}`])];
2891
2894
  }
2892
2895
  /**
2893
2896
  * Load migration classes from a specific file or by class name.
@@ -2896,10 +2899,12 @@ var MigrateCommand = class extends Command {
2896
2899
  * @param name
2897
2900
  * @returns
2898
2901
  */
2899
- async loadNamedMigration(migrationsDir, name) {
2902
+ async loadNamedMigration(migrationsDirs, name) {
2900
2903
  if (!name) return [[void 0, ""]];
2901
2904
  const base = name.replace(/Migration$/, "");
2902
- const target = [
2905
+ const registered = getRegisteredMigrations().find((cls) => cls.name === name || cls.name === `${base}Migration`);
2906
+ if (registered) return [[registered, `registered:${registered.name}`]];
2907
+ const target = migrationsDirs.flatMap((migrationsDir) => [
2903
2908
  `${name}.ts`,
2904
2909
  `${name}.js`,
2905
2910
  `${name}.mjs`,
@@ -2908,7 +2913,7 @@ var MigrateCommand = class extends Command {
2908
2913
  `${base}Migration.js`,
2909
2914
  `${base}Migration.mjs`,
2910
2915
  `${base}Migration.cjs`
2911
- ].map((file) => join(migrationsDir, file)).find((file) => existsSync$1(file));
2916
+ ].map((file) => join(migrationsDir, file))).find((file) => existsSync$1(file));
2912
2917
  if (!target) return [[void 0, name]];
2913
2918
  const runtimeTarget = this.app.resolveRuntimeScriptPath(target);
2914
2919
  return (await this.loadMigrationClassesFromFile(runtimeTarget)).map((cls) => [cls, runtimeTarget]);
@@ -2992,14 +2997,14 @@ var MigrateFreshCommand = class extends Command {
2992
2997
  async handle() {
2993
2998
  this.app.command = this;
2994
2999
  const configuredMigrationsDir = this.app.getConfig("paths")?.migrations ?? join(process.cwd(), "database", "migrations");
2995
- const migrationsDir = this.app.resolveRuntimeDirectoryPath(configuredMigrationsDir);
2996
- if (!existsSync$1(migrationsDir)) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
3000
+ const migrationDirs = this.resolveMigrationDirectories(configuredMigrationsDir);
3001
+ if (migrationDirs.length === 0 && getRegisteredMigrations().length === 0) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
2997
3002
  const adapter = this.app.getConfig("adapter");
2998
3003
  const useDatabaseMigrations = supportsDatabaseMigrationExecution(adapter);
2999
3004
  const persistedFeatures = resolvePersistedMetadataFeatures(this.app.getConfig("features"));
3000
3005
  const schemaPath = this.option("schema") ? resolve(String(this.option("schema"))) : join(process.cwd(), "prisma", "schema.prisma");
3001
3006
  const stateFilePath = resolveMigrationStateFilePath(process.cwd(), this.option("state-file") ? String(this.option("state-file")) : void 0);
3002
- const migrations = await this.loadAllMigrations(migrationsDir);
3007
+ const migrations = await this.loadAllMigrations(migrationDirs);
3003
3008
  if (migrations.length === 0) return void this.error("Error: No migration classes found to run.");
3004
3009
  if (useDatabaseMigrations) try {
3005
3010
  await validatePersistedMetadataFeaturesForMigrations(migrations, persistedFeatures);
@@ -3061,9 +3066,12 @@ var MigrateFreshCommand = class extends Command {
3061
3066
  this.success(`Refreshed database with ${migrations.length} migration(s).`);
3062
3067
  migrations.forEach(([_, file]) => this.success(this.app.splitLogger("Migrated", file)));
3063
3068
  }
3064
- async loadAllMigrations(migrationsDir) {
3065
- const files = readdirSync$1(migrationsDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).sort((left, right) => left.localeCompare(right)).map((file) => this.app.resolveRuntimeScriptPath(join(migrationsDir, file)));
3066
- return (await Promise.all(files.map(async (file) => (await this.loadMigrationClassesFromFile(file)).map((cls) => [cls, file])))).flat();
3069
+ resolveMigrationDirectories(configuredMigrationsDir) {
3070
+ return [this.app.resolveRuntimeDirectoryPath(configuredMigrationsDir), ...getRegisteredPaths("migrations").map((directory) => this.app.resolveRuntimeDirectoryPath(directory))].filter((directory, index, all) => existsSync$1(directory) && all.indexOf(directory) === index);
3071
+ }
3072
+ async loadAllMigrations(migrationsDirs) {
3073
+ const files = migrationsDirs.flatMap((migrationsDir) => readdirSync$1(migrationsDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).sort((left, right) => left.localeCompare(right)).map((file) => this.app.resolveRuntimeScriptPath(join(migrationsDir, file))));
3074
+ return [...(await Promise.all(files.map(async (file) => (await this.loadMigrationClassesFromFile(file)).map((cls) => [cls, file])))).flat(), ...getRegisteredMigrations().map((cls) => [cls, `registered:${cls.name}`])];
3067
3075
  }
3068
3076
  async loadMigrationClassesFromFile(filePath) {
3069
3077
  const imported = await RuntimeModuleLoader.load(filePath);
@@ -3148,8 +3156,8 @@ var MigrateRollbackCommand = class extends Command {
3148
3156
  async handle() {
3149
3157
  this.app.command = this;
3150
3158
  const configuredMigrationsDir = this.app.getConfig("paths")?.migrations ?? join(process.cwd(), "database", "migrations");
3151
- const migrationsDir = this.app.resolveRuntimeDirectoryPath(configuredMigrationsDir);
3152
- if (!existsSync$1(migrationsDir)) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
3159
+ const migrationDirs = this.resolveMigrationDirectories(configuredMigrationsDir);
3160
+ if (migrationDirs.length === 0 && getRegisteredMigrations().length === 0) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
3153
3161
  const schemaPath = this.option("schema") ? resolve(String(this.option("schema"))) : join(process.cwd(), "prisma", "schema.prisma");
3154
3162
  const stateFilePath = resolveMigrationStateFilePath(process.cwd(), this.option("state-file") ? String(this.option("state-file")) : void 0);
3155
3163
  const adapter = this.app.getConfig("adapter");
@@ -3165,7 +3173,7 @@ var MigrateRollbackCommand = class extends Command {
3165
3173
  return lastRun.migrationIds.map((id) => appliedState.migrations.find((migration) => migration.id === id)).filter((migration) => Boolean(migration));
3166
3174
  })();
3167
3175
  if (targets.length === 0) return void this.error("Error: No tracked migrations available to rollback.");
3168
- const available = await this.loadAllMigrations(migrationsDir);
3176
+ const available = await this.loadAllMigrations(migrationDirs);
3169
3177
  const rollbackClasses = targets.map((target) => {
3170
3178
  return available.find(([migrationClass, file]) => {
3171
3179
  return buildMigrationIdentity(file, migrationClass.name) === target.id || migrationClass.name === target.className;
@@ -3209,9 +3217,12 @@ var MigrateRollbackCommand = class extends Command {
3209
3217
  this.success(`Rolled back ${rollbackClasses.length} migration(s).`);
3210
3218
  rollbackClasses.forEach(([_, file]) => this.success(this.app.splitLogger("RolledBack", file)));
3211
3219
  }
3212
- async loadAllMigrations(migrationsDir) {
3213
- const files = readdirSync$1(migrationsDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).sort((left, right) => left.localeCompare(right)).map((file) => this.app.resolveRuntimeScriptPath(join(migrationsDir, file)));
3214
- return (await Promise.all(files.map(async (file) => (await this.loadMigrationClassesFromFile(file)).map((cls) => [cls, file])))).flat();
3220
+ resolveMigrationDirectories(configuredMigrationsDir) {
3221
+ return [this.app.resolveRuntimeDirectoryPath(configuredMigrationsDir), ...getRegisteredPaths("migrations").map((directory) => this.app.resolveRuntimeDirectoryPath(directory))].filter((directory, index, all) => existsSync$1(directory) && all.indexOf(directory) === index);
3222
+ }
3223
+ async loadAllMigrations(migrationsDirs) {
3224
+ const files = migrationsDirs.flatMap((migrationsDir) => readdirSync$1(migrationsDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).sort((left, right) => left.localeCompare(right)).map((file) => this.app.resolveRuntimeScriptPath(join(migrationsDir, file))));
3225
+ return [...(await Promise.all(files.map(async (file) => (await this.loadMigrationClassesFromFile(file)).map((cls) => [cls, file])))).flat(), ...getRegisteredMigrations().map((cls) => [cls, `registered:${cls.name}`])];
3215
3226
  }
3216
3227
  async loadMigrationClassesFromFile(filePath) {
3217
3228
  const imported = await RuntimeModuleLoader.load(filePath);
@@ -3401,9 +3412,9 @@ var SeedCommand = class extends Command {
3401
3412
  async handle() {
3402
3413
  this.app.command = this;
3403
3414
  const configuredSeedersDir = this.app.getConfig("paths")?.seeders ?? join(process.cwd(), "database", "seeders");
3404
- const seedersDir = this.app.resolveRuntimeDirectoryPath(configuredSeedersDir);
3405
- if (!existsSync$1(seedersDir)) return void this.error(`ERROR: Seeders directory not found: ${this.app.formatPathForLog(configuredSeedersDir)}`);
3406
- const classes = this.option("all") ? await this.loadAllSeeders(seedersDir) : await this.loadNamedSeeder(seedersDir, this.argument("name") ?? "DatabaseSeeder");
3415
+ const seederDirs = this.resolveSeederDirectories(configuredSeedersDir);
3416
+ if (seederDirs.length === 0 && getRegisteredSeeders().length === 0) return void this.error(`ERROR: Seeders directory not found: ${this.app.formatPathForLog(configuredSeedersDir)}`);
3417
+ const classes = this.option("all") ? await this.loadAllSeeders(seederDirs) : await this.loadNamedSeeder(seederDirs, this.argument("name") ?? "DatabaseSeeder");
3407
3418
  if (classes.length === 0) return void this.error("ERROR: No seeder classes found to run.");
3408
3419
  for (const SeederClassItem of classes) await new SeederClassItem().run();
3409
3420
  this.success("Database seeding completed");
@@ -3415,9 +3426,12 @@ var SeedCommand = class extends Command {
3415
3426
  * @param seedersDir
3416
3427
  * @returns
3417
3428
  */
3418
- async loadAllSeeders(seedersDir) {
3419
- const files = readdirSync$1(seedersDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).map((file) => this.app.resolveRuntimeScriptPath(join(seedersDir, file)));
3420
- return (await Promise.all(files.map(async (file) => await this.loadSeederClassesFromFile(file)))).flat();
3429
+ resolveSeederDirectories(configuredSeedersDir) {
3430
+ return [this.app.resolveRuntimeDirectoryPath(configuredSeedersDir), ...getRegisteredPaths("seeders").map((directory) => this.app.resolveRuntimeDirectoryPath(directory))].filter((directory, index, all) => existsSync$1(directory) && all.indexOf(directory) === index);
3431
+ }
3432
+ async loadAllSeeders(seedersDirs) {
3433
+ const files = seedersDirs.flatMap((seedersDir) => readdirSync$1(seedersDir).filter((file) => /\.(ts|js|mjs|cjs)$/i.test(file)).map((file) => this.app.resolveRuntimeScriptPath(join(seedersDir, file))));
3434
+ return [...(await Promise.all(files.map(async (file) => await this.loadSeederClassesFromFile(file)))).flat(), ...getRegisteredSeeders()];
3421
3435
  }
3422
3436
  /**
3423
3437
  * Load seeder classes from a specific file or by class name.
@@ -3426,9 +3440,11 @@ var SeedCommand = class extends Command {
3426
3440
  * @param name
3427
3441
  * @returns
3428
3442
  */
3429
- async loadNamedSeeder(seedersDir, name) {
3443
+ async loadNamedSeeder(seedersDirs, name) {
3430
3444
  const base = name.replace(/Seeder$/, "");
3431
- const target = [
3445
+ const registered = getRegisteredSeeders().find((cls) => cls.name === name || cls.name === `${base}Seeder`);
3446
+ if (registered) return [registered];
3447
+ const target = seedersDirs.flatMap((seedersDir) => [
3432
3448
  `${name}.ts`,
3433
3449
  `${name}.js`,
3434
3450
  `${name}.mjs`,
@@ -3437,7 +3453,7 @@ var SeedCommand = class extends Command {
3437
3453
  `${base}Seeder.js`,
3438
3454
  `${base}Seeder.mjs`,
3439
3455
  `${base}Seeder.cjs`
3440
- ].map((file) => join(seedersDir, file)).find((file) => existsSync$1(file));
3456
+ ].map((file) => join(seedersDir, file))).find((file) => existsSync$1(file));
3441
3457
  if (!target) return [];
3442
3458
  const runtimeTarget = this.app.resolveRuntimeScriptPath(target);
3443
3459
  return await this.loadSeederClassesFromFile(runtimeTarget);
@@ -7329,4 +7345,4 @@ var PivotModel = class extends Model {
7329
7345
  };
7330
7346
 
7331
7347
  //#endregion
7332
- export { ArkormCollection, ArkormException, Attribute, CliApp, DB, EnumBuilder, ForeignKeyBuilder, InitCommand, InlineFactory, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, MissingDelegateException, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, Paginator, PivotModel, PrimaryKeyGenerationPlanner, PrismaDatabaseAdapter, QueryBuilder, QueryConstraintException, QueryExecutionException, RelationResolutionException, RuntimeModuleLoader, SEEDER_BRAND, SchemaBuilder, ScopeNotDefinedException, SeedCommand, Seeder, TableBuilder, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findEnumBlock, findModelBlock, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isQuerySchemaLike, isTransactionCapableClient, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, validatePersistedMetadataFeaturesForMigrations, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
7348
+ export { ArkormCollection, ArkormException, Attribute, CliApp, DB, EnumBuilder, ForeignKeyBuilder, InitCommand, InlineFactory, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, MissingDelegateException, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, Paginator, PivotModel, PrimaryKeyGenerationPlanner, PrismaDatabaseAdapter, QueryBuilder, QueryConstraintException, QueryExecutionException, RelationResolutionException, RuntimeModuleLoader, SEEDER_BRAND, SchemaBuilder, ScopeNotDefinedException, SeedCommand, Seeder, TableBuilder, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findEnumBlock, findModelBlock, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRegisteredFactories, getRegisteredMigrations, getRegisteredModels, getRegisteredPaths, getRegisteredSeeders, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isQuerySchemaLike, isTransactionCapableClient, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, validatePersistedMetadataFeaturesForMigrations, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_relationship = require('../relationship-BRQjsdj3.cjs');
2
+ const require_relationship = require('../relationship-MzG94ypT.cjs');
3
3
 
4
4
  exports.BelongsToManyRelation = require_relationship.BelongsToManyRelation;
5
5
  exports.BelongsToRelation = require_relationship.BelongsToRelation;
@@ -1,2 +1,2 @@
1
- import { Ba as SingleResultRelation, Fa as HasOneThroughRelation, Ha as Relation, Ia as HasOneRelation, La as HasManyThroughRelation, Ma as MorphToManyRelation, Na as MorphOneRelation, Pa as MorphManyRelation, Ra as HasManyRelation, Ua as RelationTableLoader, Va as BelongsToManyRelation, ja as SetBasedEagerLoader, za as BelongsToRelation } from "../index-BQyFSgj_.cjs";
1
+ import { $a as HasOneRelation, Ja as SetBasedEagerLoader, Qa as HasOneThroughRelation, Xa as MorphOneRelation, Ya as MorphToManyRelation, Za as MorphManyRelation, ao as Relation, eo as HasManyThroughRelation, io as BelongsToManyRelation, no as BelongsToRelation, oo as RelationTableLoader, ro as SingleResultRelation, to as HasManyRelation } from "../index-isqbM3Ch.cjs";
2
2
  export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
@@ -1,2 +1,2 @@
1
- import { Ba as SingleResultRelation, Fa as HasOneThroughRelation, Ha as Relation, Ia as HasOneRelation, La as HasManyThroughRelation, Ma as MorphToManyRelation, Na as MorphOneRelation, Pa as MorphManyRelation, Ra as HasManyRelation, Ua as RelationTableLoader, Va as BelongsToManyRelation, ja as SetBasedEagerLoader, za as BelongsToRelation } from "../index-RvyusnXP.mjs";
1
+ import { $a as HasOneRelation, Ja as SetBasedEagerLoader, Qa as HasOneThroughRelation, Xa as MorphOneRelation, Ya as MorphToManyRelation, Za as MorphManyRelation, ao as Relation, eo as HasManyThroughRelation, io as BelongsToManyRelation, no as BelongsToRelation, oo as RelationTableLoader, ro as SingleResultRelation, to as HasManyRelation } from "../index-CAb-D9th.mjs";
2
2
  export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
@@ -1,3 +1,3 @@
1
- import { a as HasOneRelation, c as BelongsToRelation, d as Relation, hn as RelationTableLoader, i as HasOneThroughRelation, l as SingleResultRelation, mn as SetBasedEagerLoader, n as MorphOneRelation, o as HasManyThroughRelation, r as MorphManyRelation, s as HasManyRelation, t as MorphToManyRelation, u as BelongsToManyRelation } from "../relationship-BBMs-1iK.mjs";
1
+ import { An as RelationTableLoader, a as HasOneRelation, c as BelongsToRelation, d as Relation, i as HasOneThroughRelation, kn as SetBasedEagerLoader, l as SingleResultRelation, n as MorphOneRelation, o as HasManyThroughRelation, r as MorphManyRelation, s as HasManyRelation, t as MorphToManyRelation, u as BelongsToManyRelation } from "../relationship-AnKH8ZaV.mjs";
2
2
 
3
3
  export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
@@ -716,6 +716,7 @@ const buildMigrationIdentity = (filePath, className) => {
716
716
  return `${fileName.slice(0, fileName.length - extname(fileName).length)}:${className}`;
717
717
  };
718
718
  const computeMigrationChecksum = (filePath) => {
719
+ if (!existsSync$1(filePath)) return createHash("sha256").update(filePath).digest("hex");
719
720
  const source = readFileSync$1(filePath, "utf-8");
720
721
  return createHash("sha256").update(source).digest("hex");
721
722
  };
@@ -2590,6 +2591,149 @@ const getPersistedEnumTsType = (values) => {
2590
2591
  return buildEnumUnionType(values);
2591
2592
  };
2592
2593
 
2594
+ //#endregion
2595
+ //#region src/helpers/runtime-registry.ts
2596
+ const createEmptyRegistry = () => ({
2597
+ paths: {
2598
+ models: [],
2599
+ seeders: [],
2600
+ migrations: [],
2601
+ factories: []
2602
+ },
2603
+ migrations: [],
2604
+ seeders: [],
2605
+ models: [],
2606
+ factories: []
2607
+ });
2608
+ const registry = createEmptyRegistry();
2609
+ const pushUnique = (items, values) => {
2610
+ values.forEach((value) => {
2611
+ if (!items.includes(value)) items.push(value);
2612
+ });
2613
+ };
2614
+ const normalizePathInput = (paths) => {
2615
+ if (paths === void 0) return [];
2616
+ return (Array.isArray(paths) ? paths : [paths]).filter((path) => typeof path === "string" && path.trim().length > 0);
2617
+ };
2618
+ const normalizeConstructors = (items) => items.flatMap((item) => Array.isArray(item) ? item : [item]).filter(Boolean);
2619
+ /**
2620
+ * Register additional runtime discovery paths without replacing configured paths.
2621
+ *
2622
+ * @param paths
2623
+ */
2624
+ const registerPaths = (paths) => {
2625
+ Object.entries(paths).forEach(([key, value]) => {
2626
+ pushUnique(registry.paths[key], normalizePathInput(value));
2627
+ });
2628
+ };
2629
+ /**
2630
+ * Register additional runtime discovery paths for migrations without replacing configured paths.
2631
+ *
2632
+ * @param paths
2633
+ * @returns
2634
+ */
2635
+ const loadMigrationsFrom = (paths) => registerPaths({ migrations: paths });
2636
+ /**
2637
+ * Register additional runtime discovery paths for seeders without replacing configured paths.
2638
+ *
2639
+ * @param paths
2640
+ * @returns
2641
+ */
2642
+ const loadSeedersFrom = (paths) => registerPaths({ seeders: paths });
2643
+ /**
2644
+ * Register additional runtime discovery paths for models without replacing configured paths.
2645
+ *
2646
+ * @param paths
2647
+ * @returns
2648
+ */
2649
+ const loadModelsFrom = (paths) => registerPaths({ models: paths });
2650
+ /**
2651
+ * Register additional runtime discovery paths for factories without replacing configured paths.
2652
+ *
2653
+ * @param paths
2654
+ * @returns
2655
+ */
2656
+ const loadFactoriesFrom = (paths) => registerPaths({ factories: paths });
2657
+ /**
2658
+ * Register migration constructors directly without relying on runtime discovery.
2659
+ *
2660
+ * @param migrations
2661
+ */
2662
+ const registerMigrations = (...migrations) => {
2663
+ pushUnique(registry.migrations, normalizeConstructors(migrations));
2664
+ };
2665
+ /**
2666
+ * Register seeder constructors directly without relying on runtime discovery.
2667
+ *
2668
+ * @param seeders
2669
+ */
2670
+ const registerSeeders = (...seeders) => {
2671
+ pushUnique(registry.seeders, normalizeConstructors(seeders));
2672
+ };
2673
+ /**
2674
+ * Register model constructors directly without relying on runtime discovery.
2675
+ *
2676
+ * @param models
2677
+ */
2678
+ const registerModels = (...models) => {
2679
+ pushUnique(registry.models, normalizeConstructors(models));
2680
+ };
2681
+ /**
2682
+ * Register factory constructors or instances directly without relying on runtime discovery.
2683
+ *
2684
+ * @param factories
2685
+ */
2686
+ const registerFactories = (...factories) => {
2687
+ pushUnique(registry.factories, normalizeConstructors(factories));
2688
+ };
2689
+ /**
2690
+ * Get registered runtime discovery paths or registered constructors for a specific type.
2691
+ *
2692
+ * @param key
2693
+ * @returns
2694
+ */
2695
+ const getRegisteredPaths = (key) => {
2696
+ if (key) return [...registry.paths[key]];
2697
+ return {
2698
+ models: [...registry.paths.models],
2699
+ seeders: [...registry.paths.seeders],
2700
+ migrations: [...registry.paths.migrations],
2701
+ factories: [...registry.paths.factories]
2702
+ };
2703
+ };
2704
+ /**
2705
+ * Get registered migration constructors instances.
2706
+ *
2707
+ * @returns
2708
+ */
2709
+ const getRegisteredMigrations = () => [...registry.migrations];
2710
+ /**
2711
+ * Get registered seeder constructors instances.
2712
+ *
2713
+ * @returns
2714
+ */
2715
+ const getRegisteredSeeders = () => [...registry.seeders];
2716
+ /**
2717
+ * Get registered model constructors instances.
2718
+ *
2719
+ * @returns
2720
+ */
2721
+ const getRegisteredModels = () => [...registry.models];
2722
+ /**
2723
+ * Get registered factory constructors or instances.
2724
+ *
2725
+ * @returns
2726
+ */
2727
+ const getRegisteredFactories = () => [...registry.factories];
2728
+ const resetRuntimeRegistryForTests = () => {
2729
+ const empty = createEmptyRegistry();
2730
+ registry.paths = empty.paths;
2731
+ registry.migrations = empty.migrations;
2732
+ registry.seeders = empty.seeders;
2733
+ registry.models = empty.models;
2734
+ registry.factories = empty.factories;
2735
+ };
2736
+
2593
2737
  //#endregion
2594
2738
  //#region src/helpers/runtime-config.ts
2595
2739
  const resolveDefaultStubsPath = () => {
@@ -2777,6 +2921,7 @@ const resetArkormRuntimeForTests = () => {
2777
2921
  runtimePaginationCurrentPageResolver = void 0;
2778
2922
  runtimeDebugHandler = void 0;
2779
2923
  resetPersistedColumnMappingsCache();
2924
+ resetRuntimeRegistryForTests();
2780
2925
  };
2781
2926
  /**
2782
2927
  * Resolve a runtime client instance from the provided resolver, which can be either
@@ -4443,4 +4588,4 @@ var MorphToManyRelation = class extends Relation {
4443
4588
  };
4444
4589
 
4445
4590
  //#endregion
4446
- export { PRISMA_ENUM_MEMBER_REGEX as $, findAppliedMigration as $t, isDelegateLike as A, getMigrationPlan as At, getPersistedEnumMap as B, supportsDatabaseReset as Bt, getRuntimeAdapter as C, escapeRegex as Ct, getRuntimePaginationURLDriverFactory as D, formatEnumDefaultValue as Dt, getRuntimePaginationCurrentPageResolver as E, formatDefaultValue as Et, runArkormTransaction as F, runMigrationWithPrisma as Ft, readPersistedColumnMappingsState as G, TableBuilder as Gt, getPersistedPrimaryKeyGeneration as H, toModelName as Ht, applyOperationsToPersistedColumnMappingsState as I, runPrismaCommand as It, resolveColumnMappingsFilePath as J, buildMigrationIdentity as Jt, rebuildPersistedColumnMappingsState as K, ForeignKeyBuilder as Kt, createEmptyPersistedColumnMappingsState as L, stripPrismaSchemaModelsAndEnums as Lt, isTransactionCapableClient as M, resolveEnumName as Mt, loadArkormConfig as N, resolveMigrationClassName as Nt, getRuntimePrismaClient as O, formatRelationAction as Ot, resetArkormRuntimeForTests as P, resolvePrismaType as Pt, writePersistedColumnMappingsState as Q, deleteAppliedMigrationsStateFromStore as Qt, deletePersistedColumnMappingsState as R, supportsDatabaseCreation as Rt, getDefaultStubsPath as S, deriveSingularFieldName as St, getRuntimeDebugHandler as T, findModelBlock as Tt, getPersistedTableMetadata as U, SchemaBuilder as Ut, getPersistedEnumTsType as V, toMigrationFileSlug as Vt, getPersistedTimestampColumns as W, EnumBuilder as Wt, syncPersistedColumnMappingsFromState as X, computeMigrationChecksum as Xt, resolvePersistedMetadataFeatures as Y, buildMigrationRunId as Yt, validatePersistedMetadataFeaturesForMigrations as Z, createEmptyAppliedMigrationsState as Zt, defineConfig as _, ArkormCollection as _n, createMigrationTimestamp as _t, HasOneRelation as a, readAppliedMigrationsState as an, applyMigrationRollbackToDatabase as at, getActiveTransactionAdapter as b, deriveRelationAlias as bt, BelongsToRelation as c, resolveMigrationStateFilePath as cn, applyMigrationToPrismaSchema as ct, Relation as d, writeAppliedMigrationsStateToStore as dn, buildFieldLine as dt, getLastMigrationRun as en, PRISMA_ENUM_REGEX as et, LengthAwarePaginator as f, RuntimeModuleLoader as fn, buildIndexLine as ft, configureArkormRuntime as g, RelationResolutionException as gn, buildRelationLine as gt, bindAdapterToModels as h, RelationTableLoader as hn, buildModelBlock as ht, HasOneThroughRelation as i, markMigrationRun as in, applyDropTableOperation as it, isQuerySchemaLike as j, pad as jt, getUserConfig as k, generateMigrationFile as kt, SingleResultRelation as l, supportsDatabaseMigrationState as ln, applyOperationsToPrismaSchema as lt, URLDriver as m, SetBasedEagerLoader as mn, buildMigrationSource as mt, MorphOneRelation as n, isMigrationApplied as nn, applyAlterTableOperation as nt, HasManyThroughRelation as o, readAppliedMigrationsStateFromStore as on, applyMigrationRollbackToPrismaSchema as ot, Paginator as p, UnsupportedAdapterFeatureException as pn, buildInverseRelationLine as pt, resetPersistedColumnMappingsCache as q, PrimaryKeyGenerationPlanner as qt, MorphManyRelation as r, markMigrationApplied as rn, applyCreateTableOperation as rt, HasManyRelation as s, removeAppliedMigration as sn, applyMigrationToDatabase as st, MorphToManyRelation as t, getLatestAppliedMigrations as tn, PRISMA_MODEL_REGEX as tt, BelongsToManyRelation as u, writeAppliedMigrationsState as un, buildEnumBlock as ut, emitRuntimeDebugEvent as v, ArkormException as vn, deriveCollectionFieldName as vt, getRuntimeClient as w, findEnumBlock as wt, getActiveTransactionClient as x, deriveRelationFieldName as xt, ensureArkormConfigLoading as y, deriveInverseRelationAlias as yt, getPersistedColumnMap as z, supportsDatabaseMigrationExecution as zt };
4591
+ export { deletePersistedColumnMappingsState as $, supportsDatabaseCreation as $t, isDelegateLike as A, RelationTableLoader as An, buildModelBlock as At, getRegisteredSeeders as B, findModelBlock as Bt, getRuntimeAdapter as C, resolveMigrationStateFilePath as Cn, applyMigrationToPrismaSchema as Ct, getRuntimePaginationURLDriverFactory as D, RuntimeModuleLoader as Dn, buildIndexLine as Dt, getRuntimePaginationCurrentPageResolver as E, writeAppliedMigrationsStateToStore as En, buildFieldLine as Et, runArkormTransaction as F, deriveRelationAlias as Ft, registerFactories as G, getMigrationPlan as Gt, loadMigrationsFrom as H, formatEnumDefaultValue as Ht, getRegisteredFactories as I, deriveRelationFieldName as It, registerPaths as J, resolveMigrationClassName as Jt, registerMigrations as K, pad as Kt, getRegisteredMigrations as L, deriveSingularFieldName as Lt, isTransactionCapableClient as M, ArkormCollection as Mn, createMigrationTimestamp as Mt, loadArkormConfig as N, ArkormException as Nn, deriveCollectionFieldName as Nt, getRuntimePrismaClient as O, UnsupportedAdapterFeatureException as On, buildInverseRelationLine as Ot, resetArkormRuntimeForTests as P, deriveInverseRelationAlias as Pt, createEmptyPersistedColumnMappingsState as Q, stripPrismaSchemaModelsAndEnums as Qt, getRegisteredModels as R, escapeRegex as Rt, getDefaultStubsPath as S, removeAppliedMigration as Sn, applyMigrationToDatabase as St, getRuntimeDebugHandler as T, writeAppliedMigrationsState as Tn, buildEnumBlock as Tt, loadModelsFrom as U, formatRelationAction as Ut, loadFactoriesFrom as V, formatDefaultValue as Vt, loadSeedersFrom as W, generateMigrationFile as Wt, resetRuntimeRegistryForTests as X, runMigrationWithPrisma as Xt, registerSeeders as Y, resolvePrismaType as Yt, applyOperationsToPersistedColumnMappingsState as Z, runPrismaCommand as Zt, defineConfig as _, isMigrationApplied as _n, applyAlterTableOperation as _t, HasOneRelation as a, EnumBuilder as an, getPersistedTimestampColumns as at, getActiveTransactionAdapter as b, readAppliedMigrationsState as bn, applyMigrationRollbackToDatabase as bt, BelongsToRelation as c, PrimaryKeyGenerationPlanner as cn, resetPersistedColumnMappingsCache as ct, Relation as d, computeMigrationChecksum as dn, syncPersistedColumnMappingsFromState as dt, supportsDatabaseMigrationExecution as en, getPersistedColumnMap as et, LengthAwarePaginator as f, createEmptyAppliedMigrationsState as fn, validatePersistedMetadataFeaturesForMigrations as ft, configureArkormRuntime as g, getLatestAppliedMigrations as gn, PRISMA_MODEL_REGEX as gt, bindAdapterToModels as h, getLastMigrationRun as hn, PRISMA_ENUM_REGEX as ht, HasOneThroughRelation as i, SchemaBuilder as in, getPersistedTableMetadata as it, isQuerySchemaLike as j, RelationResolutionException as jn, buildRelationLine as jt, getUserConfig as k, SetBasedEagerLoader as kn, buildMigrationSource as kt, SingleResultRelation as l, buildMigrationIdentity as ln, resolveColumnMappingsFilePath as lt, URLDriver as m, findAppliedMigration as mn, PRISMA_ENUM_MEMBER_REGEX as mt, MorphOneRelation as n, toMigrationFileSlug as nn, getPersistedEnumTsType as nt, HasManyThroughRelation as o, TableBuilder as on, readPersistedColumnMappingsState as ot, Paginator as p, deleteAppliedMigrationsStateFromStore as pn, writePersistedColumnMappingsState as pt, registerModels as q, resolveEnumName as qt, MorphManyRelation as r, toModelName as rn, getPersistedPrimaryKeyGeneration as rt, HasManyRelation as s, ForeignKeyBuilder as sn, rebuildPersistedColumnMappingsState as st, MorphToManyRelation as t, supportsDatabaseReset as tn, getPersistedEnumMap as tt, BelongsToManyRelation as u, buildMigrationRunId as un, resolvePersistedMetadataFeatures as ut, emitRuntimeDebugEvent as v, markMigrationApplied as vn, applyCreateTableOperation as vt, getRuntimeClient as w, supportsDatabaseMigrationState as wn, applyOperationsToPrismaSchema as wt, getActiveTransactionClient as x, readAppliedMigrationsStateFromStore as xn, applyMigrationRollbackToPrismaSchema as xt, ensureArkormConfigLoading as y, markMigrationRun as yn, applyDropTableOperation as yt, getRegisteredPaths as z, findEnumBlock as zt };