arkormx 2.4.4 → 2.4.6
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/cli.mjs +25 -3
- package/dist/{index-CkArG8H3.d.mts → index-BgrakiJb.d.mts} +119 -5
- package/dist/{index-ZCGeN4Yi.d.cts → index-BsXCqK-l.d.cts} +119 -5
- package/dist/index.cjs +610 -344
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +610 -344
- package/dist/relationship/index.d.cts +1 -1
- package/dist/relationship/index.d.mts +1 -1
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import { spawnSync } from "node:child_process";
|
|
|
13
13
|
import { str } from "@h3ravel/support";
|
|
14
14
|
import { Logger } from "@h3ravel/shared";
|
|
15
15
|
import { Command, Kernel } from "@h3ravel/musket";
|
|
16
|
+
import { AsyncLocalStorage as AsyncLocalStorage$1 } from "node:async_hooks";
|
|
16
17
|
|
|
17
18
|
//#region src/Exceptions/ArkormException.ts
|
|
18
19
|
var ArkormException = class extends Error {
|
|
@@ -4305,6 +4306,9 @@ var Seeder = class Seeder {
|
|
|
4305
4306
|
static {
|
|
4306
4307
|
this[SEEDER_BRAND] = true;
|
|
4307
4308
|
}
|
|
4309
|
+
static {
|
|
4310
|
+
this.executionReport = new AsyncLocalStorage$1();
|
|
4311
|
+
}
|
|
4308
4312
|
/**
|
|
4309
4313
|
* Runs one or more seeders.
|
|
4310
4314
|
*
|
|
@@ -4314,6 +4318,19 @@ var Seeder = class Seeder {
|
|
|
4314
4318
|
await Seeder.runSeeders(...seeders);
|
|
4315
4319
|
}
|
|
4316
4320
|
/**
|
|
4321
|
+
* Run seeders and return every seeder class executed, including nested calls.
|
|
4322
|
+
*
|
|
4323
|
+
* @param seeders
|
|
4324
|
+
* @returns
|
|
4325
|
+
*/
|
|
4326
|
+
static async runWithReport(...seeders) {
|
|
4327
|
+
const report = [];
|
|
4328
|
+
await this.executionReport.run(report, async () => {
|
|
4329
|
+
await this.runSeeders(...seeders);
|
|
4330
|
+
});
|
|
4331
|
+
return report;
|
|
4332
|
+
}
|
|
4333
|
+
/**
|
|
4317
4334
|
* Converts a SeederInput into a Seeder instance.
|
|
4318
4335
|
*
|
|
4319
4336
|
* @param input The SeederInput to convert.
|
|
@@ -4337,7 +4354,11 @@ var Seeder = class Seeder {
|
|
|
4337
4354
|
all.push(current);
|
|
4338
4355
|
return all;
|
|
4339
4356
|
}, []);
|
|
4340
|
-
for (const seeder of queue)
|
|
4357
|
+
for (const seeder of queue) {
|
|
4358
|
+
const instance = this.toSeederInstance(seeder);
|
|
4359
|
+
this.executionReport.getStore()?.push(instance.constructor.name);
|
|
4360
|
+
await instance.run();
|
|
4361
|
+
}
|
|
4341
4362
|
}
|
|
4342
4363
|
};
|
|
4343
4364
|
|
|
@@ -4370,9 +4391,10 @@ var SeedCommand = class extends Command {
|
|
|
4370
4391
|
if (seederDirs.length === 0 && getRegisteredSeeders().length === 0) return void this.error(`ERROR: Seeders directory not found: ${this.app.formatPathForLog(configuredSeedersDir)}`);
|
|
4371
4392
|
const classes = this.option("all") ? await this.loadAllSeeders(seederDirs) : await this.loadNamedSeeder(seederDirs, this.argument("name") ?? "DatabaseSeeder");
|
|
4372
4393
|
if (classes.length === 0) return void this.error("ERROR: No seeder classes found to run.");
|
|
4373
|
-
|
|
4394
|
+
const executedSeeders = [];
|
|
4395
|
+
for (const SeederClassItem of classes) executedSeeders.push(...await Seeder.runWithReport(new SeederClassItem()));
|
|
4374
4396
|
this.success("Database seeding completed");
|
|
4375
|
-
|
|
4397
|
+
executedSeeders.forEach((name) => this.success(this.app.splitLogger("Seeded", name)));
|
|
4376
4398
|
}
|
|
4377
4399
|
/**
|
|
4378
4400
|
* Load all seeder classes from the specified directory.
|
|
@@ -221,9 +221,22 @@ type FactoryAttributes = Record<string, unknown>;
|
|
|
221
221
|
type MaybePromise<T> = T | Promise<T>;
|
|
222
222
|
interface FactoryModelConstructor<TModel> {
|
|
223
223
|
new (attributes?: Record<string, unknown>): TModel;
|
|
224
|
+
readonly name: string;
|
|
225
|
+
getPrimaryKey?: () => string;
|
|
226
|
+
getRelationMetadata?: (name: string) => unknown;
|
|
227
|
+
query?: () => {
|
|
228
|
+
create: (attributes: Record<string, unknown>) => Promise<TModel>;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
interface FactoryRelationshipResolver {
|
|
232
|
+
create: (overrides?: Record<string, unknown>) => Promise<unknown>;
|
|
233
|
+
getModelConstructor: () => FactoryModelConstructor<unknown>;
|
|
224
234
|
}
|
|
225
|
-
type
|
|
226
|
-
type
|
|
235
|
+
type FactoryAttributeResolver<TAttributes extends FactoryAttributes> = (attributes: TAttributes) => MaybePromise<unknown>;
|
|
236
|
+
type FactoryDefinitionAttributes<TAttributes extends FactoryAttributes> = { [TKey in keyof TAttributes]?: TAttributes[TKey] | FactoryRelationshipResolver | FactoryAttributeResolver<TAttributes> } & Record<string, unknown>;
|
|
237
|
+
type FactoryDefinition<TAttributes extends FactoryAttributes> = (sequence: number) => MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
238
|
+
type FactoryState<TAttributes extends FactoryAttributes> = (attributes: TAttributes, sequence: number) => MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
239
|
+
type FactoryCallback<TModel> = (model: TModel) => MaybePromise<void>;
|
|
227
240
|
//#endregion
|
|
228
241
|
//#region src/Collection.d.ts
|
|
229
242
|
declare class ArkormCollection<T = any, X = T[]> extends Collection<T, X> {}
|
|
@@ -1418,8 +1431,20 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1418
1431
|
private amount;
|
|
1419
1432
|
private sequence;
|
|
1420
1433
|
private states;
|
|
1434
|
+
private configured;
|
|
1435
|
+
private afterMakingCallbacks;
|
|
1436
|
+
private afterCreatingCallbacks;
|
|
1437
|
+
private hasRelations;
|
|
1438
|
+
private forRelations;
|
|
1439
|
+
private attachedRelations;
|
|
1440
|
+
private recyclePool;
|
|
1441
|
+
private recycleOffsets;
|
|
1421
1442
|
protected abstract model: FactoryModelConstructor<TModel>;
|
|
1422
|
-
protected abstract definition(sequence: number): MaybePromise<TAttributes
|
|
1443
|
+
protected abstract definition(sequence: number): MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Configure states and lifecycle callbacks for each new factory instance.
|
|
1446
|
+
*/
|
|
1447
|
+
protected configure(): void;
|
|
1423
1448
|
/**
|
|
1424
1449
|
* Set the number of models to create.
|
|
1425
1450
|
*
|
|
@@ -1435,6 +1460,20 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1435
1460
|
* @returns The factory instance for chaining.
|
|
1436
1461
|
*/
|
|
1437
1462
|
state(resolver: FactoryState<TAttributes>): this;
|
|
1463
|
+
/**
|
|
1464
|
+
* Register a callback that runs after a model is made.
|
|
1465
|
+
*
|
|
1466
|
+
* @param callback
|
|
1467
|
+
* @returns
|
|
1468
|
+
*/
|
|
1469
|
+
afterMaking(callback: FactoryCallback<TModel>): this;
|
|
1470
|
+
/**
|
|
1471
|
+
* Register a callback that runs after a model is persisted.
|
|
1472
|
+
*
|
|
1473
|
+
* @param callback
|
|
1474
|
+
* @returns
|
|
1475
|
+
*/
|
|
1476
|
+
afterCreating(callback: FactoryCallback<TModel>): this;
|
|
1438
1477
|
/**
|
|
1439
1478
|
* Create a new model instance without saving it to the database.
|
|
1440
1479
|
*
|
|
@@ -1482,6 +1521,46 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1482
1521
|
* @returns
|
|
1483
1522
|
*/
|
|
1484
1523
|
createMany(amount?: number, overrides?: Partial<TAttributes>): Promise<TModel[]>;
|
|
1524
|
+
/**
|
|
1525
|
+
* Create related models through a has-one or has-many relationship.
|
|
1526
|
+
*
|
|
1527
|
+
* @param factory
|
|
1528
|
+
* @param relationship
|
|
1529
|
+
* @returns
|
|
1530
|
+
*/
|
|
1531
|
+
has<F extends ModelFactory<any, any>>(factory: F, relationship?: string): this;
|
|
1532
|
+
/**
|
|
1533
|
+
* Associate the created model with a parent model or factory.
|
|
1534
|
+
*
|
|
1535
|
+
* @param related
|
|
1536
|
+
* @param relationship
|
|
1537
|
+
* @returns
|
|
1538
|
+
*/
|
|
1539
|
+
for(related: ModelFactory<any, any> | Model, relationship?: string): this;
|
|
1540
|
+
/**
|
|
1541
|
+
* Create or reuse related models and attach them through a many-to-many relationship.
|
|
1542
|
+
*
|
|
1543
|
+
* @param related
|
|
1544
|
+
* @param pivot
|
|
1545
|
+
* @param relationship
|
|
1546
|
+
* @returns
|
|
1547
|
+
*/
|
|
1548
|
+
hasAttached(related: ModelFactory<any, any> | Model | Model[], pivot?: Record<string, unknown>, relationship?: string): this;
|
|
1549
|
+
/**
|
|
1550
|
+
* Reuse existing models when resolving factory-backed relationships.
|
|
1551
|
+
*
|
|
1552
|
+
* @param models
|
|
1553
|
+
* @returns
|
|
1554
|
+
*/
|
|
1555
|
+
recycle(models: Model | Model[] | {
|
|
1556
|
+
all: () => Model[];
|
|
1557
|
+
}): this;
|
|
1558
|
+
/**
|
|
1559
|
+
* Get the model contgructor
|
|
1560
|
+
*
|
|
1561
|
+
* @returns
|
|
1562
|
+
*/
|
|
1563
|
+
getModelConstructor(): FactoryModelConstructor<TModel>;
|
|
1485
1564
|
/**
|
|
1486
1565
|
* Build the attributes for a model instance, applying the factory
|
|
1487
1566
|
* definition and any defined states, and merging in any overrides.
|
|
@@ -1497,7 +1576,25 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1497
1576
|
* @returns
|
|
1498
1577
|
*/
|
|
1499
1578
|
private buildAttributesAsync;
|
|
1579
|
+
private ensureConfigured;
|
|
1580
|
+
private resolveAttributesSync;
|
|
1581
|
+
private resolveAttributesAsync;
|
|
1582
|
+
private applyBelongsToRelationshipsSync;
|
|
1583
|
+
private applyBelongsToRelationships;
|
|
1584
|
+
private mergeBelongsToAttribute;
|
|
1585
|
+
private createPersisted;
|
|
1586
|
+
private saveModel;
|
|
1587
|
+
private createHasRelations;
|
|
1588
|
+
private createAttachedRelations;
|
|
1589
|
+
private resolveRelation;
|
|
1590
|
+
private resolveFactoryKey;
|
|
1591
|
+
private resolveFactoryModel;
|
|
1592
|
+
private inheritRecyclePool;
|
|
1593
|
+
private takeRecycledModel;
|
|
1594
|
+
private runCallbacksSync;
|
|
1595
|
+
private runCallbacks;
|
|
1500
1596
|
private static isPromiseLike;
|
|
1597
|
+
private static isFactory;
|
|
1501
1598
|
}
|
|
1502
1599
|
/**
|
|
1503
1600
|
* A helper class for defining factories using an inline definition
|
|
@@ -1512,7 +1609,7 @@ declare class InlineFactory<TModel, TAttributes extends FactoryAttributes> exten
|
|
|
1512
1609
|
private readonly resolver;
|
|
1513
1610
|
protected model: FactoryModelConstructor<TModel>;
|
|
1514
1611
|
constructor(model: FactoryModelConstructor<TModel>, resolver: FactoryDefinition<TAttributes>);
|
|
1515
|
-
protected definition(sequence: number): MaybePromise<TAttributes
|
|
1612
|
+
protected definition(sequence: number): MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
1516
1613
|
}
|
|
1517
1614
|
/**
|
|
1518
1615
|
* Define a factory for a given model using an inline definition function.
|
|
@@ -2829,6 +2926,15 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
|
|
|
2829
2926
|
*/
|
|
2830
2927
|
find<TKey extends keyof ModelAttributes<TModel> & string>(value: ModelAttributes<TModel>[TKey], key: TKey): Promise<TModel | null>;
|
|
2831
2928
|
find(value: string | number, key?: string): Promise<TModel | null>;
|
|
2929
|
+
/**
|
|
2930
|
+
* Find a related model by a specific key and value, applying relationship constraints, or
|
|
2931
|
+
* throw an error if not found.
|
|
2932
|
+
*
|
|
2933
|
+
* @param value
|
|
2934
|
+
* @param key
|
|
2935
|
+
*/
|
|
2936
|
+
findOrFail<TKey extends keyof ModelAttributes<TModel> & string>(value: ModelAttributes<TModel>[TKey], key: TKey): Promise<TModel>;
|
|
2937
|
+
findOrFail(value: string | number, key?: string): Promise<TModel>;
|
|
2832
2938
|
/**
|
|
2833
2939
|
* Finds a record by id/key and returns callback result when not found.
|
|
2834
2940
|
*
|
|
@@ -4152,6 +4258,7 @@ declare const SEEDER_BRAND: unique symbol;
|
|
|
4152
4258
|
*/
|
|
4153
4259
|
declare abstract class Seeder {
|
|
4154
4260
|
static readonly [SEEDER_BRAND] = true;
|
|
4261
|
+
private static readonly executionReport;
|
|
4155
4262
|
/**
|
|
4156
4263
|
* Defines the operations to be performed when running the seeder.
|
|
4157
4264
|
*/
|
|
@@ -4162,6 +4269,13 @@ declare abstract class Seeder {
|
|
|
4162
4269
|
* @param seeders The seeders to be run.
|
|
4163
4270
|
*/
|
|
4164
4271
|
call(...seeders: SeederCallArgument[]): Promise<void>;
|
|
4272
|
+
/**
|
|
4273
|
+
* Run seeders and return every seeder class executed, including nested calls.
|
|
4274
|
+
*
|
|
4275
|
+
* @param seeders
|
|
4276
|
+
* @returns
|
|
4277
|
+
*/
|
|
4278
|
+
static runWithReport(...seeders: SeederCallArgument[]): Promise<string[]>;
|
|
4165
4279
|
/**
|
|
4166
4280
|
* Converts a SeederInput into a Seeder instance.
|
|
4167
4281
|
*
|
|
@@ -6018,4 +6132,4 @@ declare class URLDriver {
|
|
|
6018
6132
|
url(page: number): string;
|
|
6019
6133
|
}
|
|
6020
6134
|
//#endregion
|
|
6021
|
-
export { deriveInverseRelationAlias as $, SetBasedEagerLoader as $a, PrismaTransactionContext as $i, getRegisteredPaths as $n, MigrationInstanceLike as $o, RawQuerySpec as $r, getPersistedTableMetadata as $t, resetArkormRuntimeForTests as A, AttributeWhereInput as Aa, DelegateUpdateData as Ai, MigrateRollbackCommand as An, MaybePromise as Ao, AdapterTransactionContext as Ar, getLatestAppliedMigrations as At, applyMigrationRollbackToPrismaSchema as B, ModelEventHandlerConstructor as Ba, PaginationURLDriver as Bi, Attribute as Bn, ModelMetadata as Bo, DeleteSpec as Br, writeAppliedMigrationsStateToStore as Bt, getRuntimePaginationURLDriverFactory as C, QueryBuilder as Ca, DelegateInclude as Ci, SchemaBuilder as Cn, LengthAwarePaginator as Co, AdapterCapability as Cr, buildMigrationIdentity as Ct, isQuerySchemaLike as D, AttributeSchemaDelegate as Da, DelegateSelect as Di, SeedCommand as Dn, FactoryDefinition as Do, AdapterModelIntrospectionOptions as Dr, deleteAppliedMigrationsStateFromStore as Dt, isDelegateLike as E, AttributeQuerySchema as Ea, DelegateRows as Ei, ForeignKeyBuilder as En, FactoryAttributes as Eo, AdapterModelFieldStructure as Er, createEmptyAppliedMigrationsState as Et, PRISMA_MODEL_REGEX as F, ModelAttributesOf as Fa, ModelQuerySchemaLike as Fi, MakeMigrationCommand as Fn, ColumnMap as Fo, DatabasePrimitive as Fr, readAppliedMigrationsStateFromStore as Ft, buildFieldLine as G, ModelRelationshipResult as Ga, PrismaLikeInclude as Gi, RegisteredModel as Gn, RelationMetadata as Go, QueryCondition as Gr, PersistedTimestampColumn as Gt, applyMigrationToPrismaSchema as H, ModelEventName as Ha, PrismaClientLike as Hi, Arkorm as Hn, MorphOneRelationMetadata as Ho, InsertSpec as Hr, PersistedMetadataFeatures as Ht, applyAlterTableOperation as I, ModelCreateData as Ia, ModelTableCase as Ii, MakeFactoryCommand as In, HasManyRelationMetadata as Io, DatabaseRow as Ir, removeAppliedMigration as It, buildMigrationSource as J, RelatedModelClass as Ja, PrismaLikeSelect as Ji, RuntimePathKey as Jn, AppliedMigrationRun as Jo, QueryNotCondition as Jr, deletePersistedColumnMappingsState as Jt, buildIndexLine as K, ModelUpdateData as Ka, PrismaLikeOrderBy as Ki, RuntimeConstructor as Kn, RelationMetadataType as Ko, QueryGroupCondition as Kr, applyOperationsToPersistedColumnMappingsState as Kt, applyCreateTableOperation as L, ModelDeclaredAttributeKey as La, PaginationCurrentPageResolver as Li, InitCommand as Ln, HasManyThroughRelationMetadata as Lo, DatabaseRows as Lr, resolveMigrationStateFilePath as Lt, PrimaryKeyGenerationPlanner as M, GlobalScope as Ma, EagerLoadConstraint as Mi, MigrateCommand as Mn, DatabaseTablePersistedMetadataOptions as Mo, AggregateSelection as Mr, markMigrationApplied as Mt, PRISMA_ENUM_MEMBER_REGEX as N, ModelAttributeValue as Na, EagerLoadMap as Ni, MakeSeederCommand as Nn, BelongsToManyRelationMetadata as No, AggregateSpec as Nr, markMigrationRun as Nt, isTransactionCapableClient as O, AttributeSelect as Oa, DelegateUniqueWhere as Oi, ModelsSyncCommand as On, FactoryModelConstructor as Oo, AdapterModelStructure as Or, findAppliedMigration as Ot, PRISMA_ENUM_REGEX as P, ModelAttributes as Pa, GetUserConfig as Pi, MakeModelCommand as Pn, BelongsToRelationMetadata as Po, DatabaseAdapter as Pr, readAppliedMigrationsState as Pt, deriveCollectionFieldName as Q, defineFactory as Qa, PrismaTransactionCapableClient as Qi, getRegisteredModels as Qn, MigrationClass as Qo, QueryTarget as Qr, getPersistedPrimaryKeyGeneration as Qt, applyDropTableOperation as R, ModelEventDispatcher as Ra, PaginationMeta as Ri, CliApp as Rn, HasOneRelationMetadata as Ro, DatabaseValue as Rr, supportsDatabaseMigrationState as Rt, getRuntimePaginationCurrentPageResolver as S, RelationshipModelStatic as Sa, DelegateFindManyArgs as Si, Migration as Sn, RelationTableLookupSpec as So, AdapterCapabilities as Sr, toModelName as St, getUserConfig as T, AttributeOrderBy as Ta, DelegateRow as Ti, TableBuilder as Tn, ArkormCollection as To, AdapterInspectionRequest as Tr, computeMigrationChecksum as Tt, applyOperationsToPrismaSchema as U, ModelLifecycleState as Ua, PrismaDelegateLike as Ui, Arkormx as Un, MorphToManyRelationMetadata as Uo, QueryComparisonCondition as Ur, PersistedPrimaryKeyGeneration as Ut, applyMigrationToDatabase as V, ModelEventListener as Va, PaginationURLDriverFactory as Vi, AttributeOptions as Vn, MorphManyRelationMetadata as Vo, InsertManySpec as Vr, PersistedColumnMappingsState as Vt, buildEnumBlock as W, ModelRelationshipKey as Wa, PrismaFindManyArgsLike as Wi, RegisteredFactory as Wn, PivotModelStatic as Wo, QueryComparisonOperator as Wr, PersistedTableMetadata as Wt, buildRelationLine as X, InlineFactory as Xa, PrismaLikeWhereInput as Xi, getRegisteredFactories as Xn, GenerateMigrationOptions as Xo, QueryRawCondition as Xr, getPersistedEnumMap as Xt, buildModelBlock as Y, Model as Ya, PrismaLikeSortOrder as Yi, RuntimePathMap as Yn, AppliedMigrationsState as Yo, QueryOrderBy as Yr, getPersistedColumnMap as Yt, createMigrationTimestamp as Z, ModelFactory as Za, PrismaTransactionCallback as Zi, getRegisteredMigrations as Zn, GeneratedMigrationFile as Zo, QuerySelectColumn as Zr, getPersistedEnumTsType as Zt, getActiveTransactionClient as _, TransactionCallback as _a, CastHandler as _i, MissingDelegateException as _n, RelationDefaultResolver as _o, PrismaDelegateNameMapping as _r, stripPrismaSchemaModelsAndEnums as _t, resolveRuntimeCompatibilityQuerySchema as a, QuerySchemaRow as aa, SoftDeleteQueryMode as ai, resolvePersistedMetadataFeatures as an, HasManyThroughRelation as ao, registerFactories as ar, SchemaForeignKey as as, findModelBlock as at, getRuntimeClient as b, TransactionOptions as ba, ClientResolver as bi, DB as bn, RelationResult as bo, KyselyDatabaseAdapter as br, supportsDatabaseReset as bt, createPrismaAdapter as c, QuerySchemaUniqueWhere as ca, UpdateSpec as ci, writePersistedColumnMappingsState as cn, SingleResultRelation as co, registerPaths as cr, SchemaOperation as cs, formatRelationAction as ct, bindAdapterToModels as d, QuerySchemaWhere as da, AdapterQueryInspection as di, ScopeNotDefinedException as dn, RelationTableLoader as do, SEEDER_BRAND as dr, SchemaTableDropOperation as ds, pad as dt, PrismaTransactionOptions as ea, RelationAggregateSpec as ei, getPersistedTimestampColumns as en, MorphToManyRelation as eo, getRegisteredSeeders as er, PrimaryKeyGeneration as es, deriveRelationAlias as et, configureArkormRuntime as f, RawSelectInput as fa, ArkormBootContext as fi, RelationResolutionException as fn, RelationAggregateConstraint as fo, Seeder as fr, TimestampColumnBehavior as fs, resolveEnumName as ft, getActiveTransactionAdapter as g, SoftDeleteConfig as ga, CastDefinition as gi, ModelNotFoundException as gn, RelationConstraint as go, PrismaDatabaseAdapter as gr, runPrismaCommand as gt, ensureArkormConfigLoading as h, SimplePaginationMeta as ha, ArkormDebugHandler as hi, QueryConstraintException as hn, RelationColumnLookupSpec as ho, SeederInput as hr, runMigrationWithPrisma as ht, getRuntimeCompatibilityAdapter as i, QuerySchemaOrderBy as ia, SelectSpec as ii, resolveColumnMappingsFilePath as in, HasOneRelation as io, loadSeedersFrom as ir, SchemaColumnType as is, findEnumBlock as it, runArkormTransaction as j, DelegateForModelSchema as ja, DelegateWhere as ji, MigrateFreshCommand as jn, DatabaseTableOptions as jo, AggregateOperation as jr, isMigrationApplied as jt, loadArkormConfig as k, AttributeUpdateInput as ka, DelegateUpdateArgs as ki, MigrationHistoryCommand as kn, FactoryState as ko, AdapterQueryOperation as kr, getLastMigrationRun as kt, createPrismaDelegateMap as l, QuerySchemaUpdateArgs as la, UpsertSpec as li, UnsupportedAdapterFeatureException as ln, BelongsToManyRelation as lo, registerSeeders as lr, SchemaTableAlterOperation as ls, generateMigrationFile as lt, emitRuntimeDebugEvent as m, Serializable as ma, ArkormDebugEvent as mi, QueryExecutionExceptionContext as mn, RelationAggregateType as mo, SeederConstructor as mr, resolvePrismaType as mt, PivotModel as n, QuerySchemaFindManyArgs as na, RelationLoadPlan as ni, rebuildPersistedColumnMappingsState as nn, MorphManyRelation as no, loadMigrationsFrom as nr, PrismaSchemaSyncOptions as ns, deriveSingularFieldName as nt, resolveRuntimeCompatibilityQuerySchemaOrThrow as o, QuerySchemaRows as oa, SortDirection as oi, syncPersistedColumnMappingsFromState as on, HasManyRelation as oo, registerMigrations as or, SchemaForeignKeyAction as os, formatDefaultValue as ot, defineConfig as p, RuntimeClientLike as pa, ArkormConfig as pi, QueryExecutionException as pn, RelationAggregateInput as po, SeederCallArgument as pr, resolveMigrationClassName as pt, buildInverseRelationLine as q, QuerySchemaForModel as qa, PrismaLikeScalarFilter as qi, RuntimePathInput as qn, AppliedMigrationEntry as qo, QueryLogicalOperator as qr, createEmptyPersistedColumnMappingsState as qt, RuntimeModuleLoader as r, QuerySchemaInclude as ra, RelationLoadSpec as ri, resetPersistedColumnMappingsCache as rn, HasOneThroughRelation as ro, loadModelsFrom as rr, SchemaColumn as rs, escapeRegex as rt, PrismaDelegateMap as s, QuerySchemaSelect as sa, UpdateManySpec as si, validatePersistedMetadataFeaturesForMigrations as sn, BelongsToRelation as so, registerModels as sr, SchemaIndex as ss, formatEnumDefaultValue as st, URLDriver as t, QuerySchemaCreateData as ta, RelationFilterSpec as ti, readPersistedColumnMappingsState as tn, MorphOneRelation as to, loadFactoriesFrom as tr, PrismaMigrationWorkflowOptions as ts, deriveRelationFieldName as tt, inferDelegateName as u, QuerySchemaUpdateData as ua, AdapterBindableModel as ui, UniqueConstraintResolutionException as un, Relation as uo, resetRuntimeRegistryForTests as ur, SchemaTableCreateOperation as us, getMigrationPlan as ut, getDefaultStubsPath as v, TransactionCapableClient as va, CastMap as vi, ArkormErrorContext as vn, RelationDefaultValue as vo, createPrismaCompatibilityAdapter as vr, supportsDatabaseCreation as vt, getRuntimePrismaClient as w, AttributeCreateInput as wa, DelegateOrderBy as wi, EnumBuilder as wn, Paginator as wo, AdapterDatabaseCreationResult as wr, buildMigrationRunId as wt, getRuntimeDebugHandler as x, ModelStatic as xa, DelegateCreateData as xi, MIGRATION_BRAND as xn, RelationResultCache as xo, createKyselyAdapter as xr, toMigrationFileSlug as xt, getRuntimeAdapter as y, TransactionContext as ya, CastType as yi, ArkormException as yn, RelationMetadataProvider as yo, createPrismaDatabaseAdapter as yr, supportsDatabaseMigrationExecution as yt, applyMigrationRollbackToDatabase as z, ModelEventHandler as za, PaginationOptions as zi, resolveCast as zn, HasOneThroughRelationMetadata as zo, DeleteManySpec as zr, writeAppliedMigrationsState as zt };
|
|
6135
|
+
export { deriveInverseRelationAlias as $, SetBasedEagerLoader as $a, PrismaTransactionContext as $i, getRegisteredPaths as $n, AppliedMigrationsState as $o, RawQuerySpec as $r, getPersistedTableMetadata as $t, resetArkormRuntimeForTests as A, AttributeWhereInput as Aa, DelegateUpdateData as Ai, MigrateRollbackCommand as An, FactoryDefinitionAttributes as Ao, AdapterTransactionContext as Ar, getLatestAppliedMigrations as At, applyMigrationRollbackToPrismaSchema as B, ModelEventHandlerConstructor as Ba, PaginationURLDriver as Bi, Attribute as Bn, HasManyRelationMetadata as Bo, DeleteSpec as Br, writeAppliedMigrationsStateToStore as Bt, getRuntimePaginationURLDriverFactory as C, QueryBuilder as Ca, DelegateInclude as Ci, SchemaBuilder as Cn, LengthAwarePaginator as Co, AdapterCapability as Cr, buildMigrationIdentity as Ct, isQuerySchemaLike as D, AttributeSchemaDelegate as Da, DelegateSelect as Di, SeedCommand as Dn, FactoryAttributes as Do, AdapterModelIntrospectionOptions as Dr, deleteAppliedMigrationsStateFromStore as Dt, isDelegateLike as E, AttributeQuerySchema as Ea, DelegateRows as Ei, ForeignKeyBuilder as En, FactoryAttributeResolver as Eo, AdapterModelFieldStructure as Er, createEmptyAppliedMigrationsState as Et, PRISMA_MODEL_REGEX as F, ModelAttributesOf as Fa, ModelQuerySchemaLike as Fi, MakeMigrationCommand as Fn, DatabaseTableOptions as Fo, DatabasePrimitive as Fr, readAppliedMigrationsStateFromStore as Ft, buildFieldLine as G, ModelRelationshipResult as Ga, PrismaLikeInclude as Gi, RegisteredModel as Gn, MorphManyRelationMetadata as Go, QueryCondition as Gr, PersistedTimestampColumn as Gt, applyMigrationToPrismaSchema as H, ModelEventName as Ha, PrismaClientLike as Hi, Arkorm as Hn, HasOneRelationMetadata as Ho, InsertSpec as Hr, PersistedMetadataFeatures as Ht, applyAlterTableOperation as I, ModelCreateData as Ia, ModelTableCase as Ii, MakeFactoryCommand as In, DatabaseTablePersistedMetadataOptions as Io, DatabaseRow as Ir, removeAppliedMigration as It, buildMigrationSource as J, RelatedModelClass as Ja, PrismaLikeSelect as Ji, RuntimePathKey as Jn, PivotModelStatic as Jo, QueryNotCondition as Jr, deletePersistedColumnMappingsState as Jt, buildIndexLine as K, ModelUpdateData as Ka, PrismaLikeOrderBy as Ki, RuntimeConstructor as Kn, MorphOneRelationMetadata as Ko, QueryGroupCondition as Kr, applyOperationsToPersistedColumnMappingsState as Kt, applyCreateTableOperation as L, ModelDeclaredAttributeKey as La, PaginationCurrentPageResolver as Li, InitCommand as Ln, BelongsToManyRelationMetadata as Lo, DatabaseRows as Lr, resolveMigrationStateFilePath as Lt, PrimaryKeyGenerationPlanner as M, GlobalScope as Ma, EagerLoadConstraint as Mi, MigrateCommand as Mn, FactoryRelationshipResolver as Mo, AggregateSelection as Mr, markMigrationApplied as Mt, PRISMA_ENUM_MEMBER_REGEX as N, ModelAttributeValue as Na, EagerLoadMap as Ni, MakeSeederCommand as Nn, FactoryState as No, AggregateSpec as Nr, markMigrationRun as Nt, isTransactionCapableClient as O, AttributeSelect as Oa, DelegateUniqueWhere as Oi, ModelsSyncCommand as On, FactoryCallback as Oo, AdapterModelStructure as Or, findAppliedMigration as Ot, PRISMA_ENUM_REGEX as P, ModelAttributes as Pa, GetUserConfig as Pi, MakeModelCommand as Pn, MaybePromise as Po, DatabaseAdapter as Pr, readAppliedMigrationsState as Pt, deriveCollectionFieldName as Q, defineFactory as Qa, PrismaTransactionCapableClient as Qi, getRegisteredModels as Qn, AppliedMigrationRun as Qo, QueryTarget as Qr, getPersistedPrimaryKeyGeneration as Qt, applyDropTableOperation as R, ModelEventDispatcher as Ra, PaginationMeta as Ri, CliApp as Rn, BelongsToRelationMetadata as Ro, DatabaseValue as Rr, supportsDatabaseMigrationState as Rt, getRuntimePaginationCurrentPageResolver as S, RelationshipModelStatic as Sa, DelegateFindManyArgs as Si, Migration as Sn, RelationTableLookupSpec as So, AdapterCapabilities as Sr, toModelName as St, getUserConfig as T, AttributeOrderBy as Ta, DelegateRow as Ti, TableBuilder as Tn, ArkormCollection as To, AdapterInspectionRequest as Tr, computeMigrationChecksum as Tt, applyOperationsToPrismaSchema as U, ModelLifecycleState as Ua, PrismaDelegateLike as Ui, Arkormx as Un, HasOneThroughRelationMetadata as Uo, QueryComparisonCondition as Ur, PersistedPrimaryKeyGeneration as Ut, applyMigrationToDatabase as V, ModelEventListener as Va, PaginationURLDriverFactory as Vi, AttributeOptions as Vn, HasManyThroughRelationMetadata as Vo, InsertManySpec as Vr, PersistedColumnMappingsState as Vt, buildEnumBlock as W, ModelRelationshipKey as Wa, PrismaFindManyArgsLike as Wi, RegisteredFactory as Wn, ModelMetadata as Wo, QueryComparisonOperator as Wr, PersistedTableMetadata as Wt, buildRelationLine as X, InlineFactory as Xa, PrismaLikeWhereInput as Xi, getRegisteredFactories as Xn, RelationMetadataType as Xo, QueryRawCondition as Xr, getPersistedEnumMap as Xt, buildModelBlock as Y, Model as Ya, PrismaLikeSortOrder as Yi, RuntimePathMap as Yn, RelationMetadata as Yo, QueryOrderBy as Yr, getPersistedColumnMap as Yt, createMigrationTimestamp as Z, ModelFactory as Za, PrismaTransactionCallback as Zi, getRegisteredMigrations as Zn, AppliedMigrationEntry as Zo, QuerySelectColumn as Zr, getPersistedEnumTsType as Zt, getActiveTransactionClient as _, TransactionCallback as _a, CastHandler as _i, MissingDelegateException as _n, RelationDefaultResolver as _o, PrismaDelegateNameMapping as _r, stripPrismaSchemaModelsAndEnums as _t, resolveRuntimeCompatibilityQuerySchema as a, QuerySchemaRow as aa, SoftDeleteQueryMode as ai, resolvePersistedMetadataFeatures as an, HasManyThroughRelation as ao, registerFactories as ar, PrismaMigrationWorkflowOptions as as, findModelBlock as at, getRuntimeClient as b, TransactionOptions as ba, ClientResolver as bi, DB as bn, RelationResult as bo, KyselyDatabaseAdapter as br, supportsDatabaseReset as bt, createPrismaAdapter as c, QuerySchemaUniqueWhere as ca, UpdateSpec as ci, writePersistedColumnMappingsState as cn, SingleResultRelation as co, registerPaths as cr, SchemaColumnType as cs, formatRelationAction as ct, bindAdapterToModels as d, QuerySchemaWhere as da, AdapterQueryInspection as di, ScopeNotDefinedException as dn, RelationTableLoader as do, SEEDER_BRAND as dr, SchemaIndex as ds, pad as dt, PrismaTransactionOptions as ea, RelationAggregateSpec as ei, getPersistedTimestampColumns as en, MorphToManyRelation as eo, getRegisteredSeeders as er, GenerateMigrationOptions as es, deriveRelationAlias as et, configureArkormRuntime as f, RawSelectInput as fa, ArkormBootContext as fi, RelationResolutionException as fn, RelationAggregateConstraint as fo, Seeder as fr, SchemaOperation as fs, resolveEnumName as ft, getActiveTransactionAdapter as g, SoftDeleteConfig as ga, CastDefinition as gi, ModelNotFoundException as gn, RelationConstraint as go, PrismaDatabaseAdapter as gr, TimestampColumnBehavior as gs, runPrismaCommand as gt, ensureArkormConfigLoading as h, SimplePaginationMeta as ha, ArkormDebugHandler as hi, QueryConstraintException as hn, RelationColumnLookupSpec as ho, SeederInput as hr, SchemaTableDropOperation as hs, runMigrationWithPrisma as ht, getRuntimeCompatibilityAdapter as i, QuerySchemaOrderBy as ia, SelectSpec as ii, resolveColumnMappingsFilePath as in, HasOneRelation as io, loadSeedersFrom as ir, PrimaryKeyGeneration as is, findEnumBlock as it, runArkormTransaction as j, DelegateForModelSchema as ja, DelegateWhere as ji, MigrateFreshCommand as jn, FactoryModelConstructor as jo, AggregateOperation as jr, isMigrationApplied as jt, loadArkormConfig as k, AttributeUpdateInput as ka, DelegateUpdateArgs as ki, MigrationHistoryCommand as kn, FactoryDefinition as ko, AdapterQueryOperation as kr, getLastMigrationRun as kt, createPrismaDelegateMap as l, QuerySchemaUpdateArgs as la, UpsertSpec as li, UnsupportedAdapterFeatureException as ln, BelongsToManyRelation as lo, registerSeeders as lr, SchemaForeignKey as ls, generateMigrationFile as lt, emitRuntimeDebugEvent as m, Serializable as ma, ArkormDebugEvent as mi, QueryExecutionExceptionContext as mn, RelationAggregateType as mo, SeederConstructor as mr, SchemaTableCreateOperation as ms, resolvePrismaType as mt, PivotModel as n, QuerySchemaFindManyArgs as na, RelationLoadPlan as ni, rebuildPersistedColumnMappingsState as nn, MorphManyRelation as no, loadMigrationsFrom as nr, MigrationClass as ns, deriveSingularFieldName as nt, resolveRuntimeCompatibilityQuerySchemaOrThrow as o, QuerySchemaRows as oa, SortDirection as oi, syncPersistedColumnMappingsFromState as on, HasManyRelation as oo, registerMigrations as or, PrismaSchemaSyncOptions as os, formatDefaultValue as ot, defineConfig as p, RuntimeClientLike as pa, ArkormConfig as pi, QueryExecutionException as pn, RelationAggregateInput as po, SeederCallArgument as pr, SchemaTableAlterOperation as ps, resolveMigrationClassName as pt, buildInverseRelationLine as q, QuerySchemaForModel as qa, PrismaLikeScalarFilter as qi, RuntimePathInput as qn, MorphToManyRelationMetadata as qo, QueryLogicalOperator as qr, createEmptyPersistedColumnMappingsState as qt, RuntimeModuleLoader as r, QuerySchemaInclude as ra, RelationLoadSpec as ri, resetPersistedColumnMappingsCache as rn, HasOneThroughRelation as ro, loadModelsFrom as rr, MigrationInstanceLike as rs, escapeRegex as rt, PrismaDelegateMap as s, QuerySchemaSelect as sa, UpdateManySpec as si, validatePersistedMetadataFeaturesForMigrations as sn, BelongsToRelation as so, registerModels as sr, SchemaColumn as ss, formatEnumDefaultValue as st, URLDriver as t, QuerySchemaCreateData as ta, RelationFilterSpec as ti, readPersistedColumnMappingsState as tn, MorphOneRelation as to, loadFactoriesFrom as tr, GeneratedMigrationFile as ts, deriveRelationFieldName as tt, inferDelegateName as u, QuerySchemaUpdateData as ua, AdapterBindableModel as ui, UniqueConstraintResolutionException as un, Relation as uo, resetRuntimeRegistryForTests as ur, SchemaForeignKeyAction as us, getMigrationPlan as ut, getDefaultStubsPath as v, TransactionCapableClient as va, CastMap as vi, ArkormErrorContext as vn, RelationDefaultValue as vo, createPrismaCompatibilityAdapter as vr, supportsDatabaseCreation as vt, getRuntimePrismaClient as w, AttributeCreateInput as wa, DelegateOrderBy as wi, EnumBuilder as wn, Paginator as wo, AdapterDatabaseCreationResult as wr, buildMigrationRunId as wt, getRuntimeDebugHandler as x, ModelStatic as xa, DelegateCreateData as xi, MIGRATION_BRAND as xn, RelationResultCache as xo, createKyselyAdapter as xr, toMigrationFileSlug as xt, getRuntimeAdapter as y, TransactionContext as ya, CastType as yi, ArkormException as yn, RelationMetadataProvider as yo, createPrismaDatabaseAdapter as yr, supportsDatabaseMigrationExecution as yt, applyMigrationRollbackToDatabase as z, ModelEventHandler as za, PaginationOptions as zi, resolveCast as zn, ColumnMap as zo, DeleteManySpec as zr, writeAppliedMigrationsState as zt };
|
|
@@ -221,9 +221,22 @@ type FactoryAttributes = Record<string, unknown>;
|
|
|
221
221
|
type MaybePromise<T> = T | Promise<T>;
|
|
222
222
|
interface FactoryModelConstructor<TModel> {
|
|
223
223
|
new (attributes?: Record<string, unknown>): TModel;
|
|
224
|
+
readonly name: string;
|
|
225
|
+
getPrimaryKey?: () => string;
|
|
226
|
+
getRelationMetadata?: (name: string) => unknown;
|
|
227
|
+
query?: () => {
|
|
228
|
+
create: (attributes: Record<string, unknown>) => Promise<TModel>;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
interface FactoryRelationshipResolver {
|
|
232
|
+
create: (overrides?: Record<string, unknown>) => Promise<unknown>;
|
|
233
|
+
getModelConstructor: () => FactoryModelConstructor<unknown>;
|
|
224
234
|
}
|
|
225
|
-
type
|
|
226
|
-
type
|
|
235
|
+
type FactoryAttributeResolver<TAttributes extends FactoryAttributes> = (attributes: TAttributes) => MaybePromise<unknown>;
|
|
236
|
+
type FactoryDefinitionAttributes<TAttributes extends FactoryAttributes> = { [TKey in keyof TAttributes]?: TAttributes[TKey] | FactoryRelationshipResolver | FactoryAttributeResolver<TAttributes> } & Record<string, unknown>;
|
|
237
|
+
type FactoryDefinition<TAttributes extends FactoryAttributes> = (sequence: number) => MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
238
|
+
type FactoryState<TAttributes extends FactoryAttributes> = (attributes: TAttributes, sequence: number) => MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
239
|
+
type FactoryCallback<TModel> = (model: TModel) => MaybePromise<void>;
|
|
227
240
|
//#endregion
|
|
228
241
|
//#region src/Collection.d.ts
|
|
229
242
|
declare class ArkormCollection<T = any, X = T[]> extends Collection<T, X> {}
|
|
@@ -1418,8 +1431,20 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1418
1431
|
private amount;
|
|
1419
1432
|
private sequence;
|
|
1420
1433
|
private states;
|
|
1434
|
+
private configured;
|
|
1435
|
+
private afterMakingCallbacks;
|
|
1436
|
+
private afterCreatingCallbacks;
|
|
1437
|
+
private hasRelations;
|
|
1438
|
+
private forRelations;
|
|
1439
|
+
private attachedRelations;
|
|
1440
|
+
private recyclePool;
|
|
1441
|
+
private recycleOffsets;
|
|
1421
1442
|
protected abstract model: FactoryModelConstructor<TModel>;
|
|
1422
|
-
protected abstract definition(sequence: number): MaybePromise<TAttributes
|
|
1443
|
+
protected abstract definition(sequence: number): MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Configure states and lifecycle callbacks for each new factory instance.
|
|
1446
|
+
*/
|
|
1447
|
+
protected configure(): void;
|
|
1423
1448
|
/**
|
|
1424
1449
|
* Set the number of models to create.
|
|
1425
1450
|
*
|
|
@@ -1435,6 +1460,20 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1435
1460
|
* @returns The factory instance for chaining.
|
|
1436
1461
|
*/
|
|
1437
1462
|
state(resolver: FactoryState<TAttributes>): this;
|
|
1463
|
+
/**
|
|
1464
|
+
* Register a callback that runs after a model is made.
|
|
1465
|
+
*
|
|
1466
|
+
* @param callback
|
|
1467
|
+
* @returns
|
|
1468
|
+
*/
|
|
1469
|
+
afterMaking(callback: FactoryCallback<TModel>): this;
|
|
1470
|
+
/**
|
|
1471
|
+
* Register a callback that runs after a model is persisted.
|
|
1472
|
+
*
|
|
1473
|
+
* @param callback
|
|
1474
|
+
* @returns
|
|
1475
|
+
*/
|
|
1476
|
+
afterCreating(callback: FactoryCallback<TModel>): this;
|
|
1438
1477
|
/**
|
|
1439
1478
|
* Create a new model instance without saving it to the database.
|
|
1440
1479
|
*
|
|
@@ -1482,6 +1521,46 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1482
1521
|
* @returns
|
|
1483
1522
|
*/
|
|
1484
1523
|
createMany(amount?: number, overrides?: Partial<TAttributes>): Promise<TModel[]>;
|
|
1524
|
+
/**
|
|
1525
|
+
* Create related models through a has-one or has-many relationship.
|
|
1526
|
+
*
|
|
1527
|
+
* @param factory
|
|
1528
|
+
* @param relationship
|
|
1529
|
+
* @returns
|
|
1530
|
+
*/
|
|
1531
|
+
has<F extends ModelFactory<any, any>>(factory: F, relationship?: string): this;
|
|
1532
|
+
/**
|
|
1533
|
+
* Associate the created model with a parent model or factory.
|
|
1534
|
+
*
|
|
1535
|
+
* @param related
|
|
1536
|
+
* @param relationship
|
|
1537
|
+
* @returns
|
|
1538
|
+
*/
|
|
1539
|
+
for(related: ModelFactory<any, any> | Model, relationship?: string): this;
|
|
1540
|
+
/**
|
|
1541
|
+
* Create or reuse related models and attach them through a many-to-many relationship.
|
|
1542
|
+
*
|
|
1543
|
+
* @param related
|
|
1544
|
+
* @param pivot
|
|
1545
|
+
* @param relationship
|
|
1546
|
+
* @returns
|
|
1547
|
+
*/
|
|
1548
|
+
hasAttached(related: ModelFactory<any, any> | Model | Model[], pivot?: Record<string, unknown>, relationship?: string): this;
|
|
1549
|
+
/**
|
|
1550
|
+
* Reuse existing models when resolving factory-backed relationships.
|
|
1551
|
+
*
|
|
1552
|
+
* @param models
|
|
1553
|
+
* @returns
|
|
1554
|
+
*/
|
|
1555
|
+
recycle(models: Model | Model[] | {
|
|
1556
|
+
all: () => Model[];
|
|
1557
|
+
}): this;
|
|
1558
|
+
/**
|
|
1559
|
+
* Get the model contgructor
|
|
1560
|
+
*
|
|
1561
|
+
* @returns
|
|
1562
|
+
*/
|
|
1563
|
+
getModelConstructor(): FactoryModelConstructor<TModel>;
|
|
1485
1564
|
/**
|
|
1486
1565
|
* Build the attributes for a model instance, applying the factory
|
|
1487
1566
|
* definition and any defined states, and merging in any overrides.
|
|
@@ -1497,7 +1576,25 @@ declare abstract class ModelFactory<TModel, TAttributes extends FactoryAttribute
|
|
|
1497
1576
|
* @returns
|
|
1498
1577
|
*/
|
|
1499
1578
|
private buildAttributesAsync;
|
|
1579
|
+
private ensureConfigured;
|
|
1580
|
+
private resolveAttributesSync;
|
|
1581
|
+
private resolveAttributesAsync;
|
|
1582
|
+
private applyBelongsToRelationshipsSync;
|
|
1583
|
+
private applyBelongsToRelationships;
|
|
1584
|
+
private mergeBelongsToAttribute;
|
|
1585
|
+
private createPersisted;
|
|
1586
|
+
private saveModel;
|
|
1587
|
+
private createHasRelations;
|
|
1588
|
+
private createAttachedRelations;
|
|
1589
|
+
private resolveRelation;
|
|
1590
|
+
private resolveFactoryKey;
|
|
1591
|
+
private resolveFactoryModel;
|
|
1592
|
+
private inheritRecyclePool;
|
|
1593
|
+
private takeRecycledModel;
|
|
1594
|
+
private runCallbacksSync;
|
|
1595
|
+
private runCallbacks;
|
|
1500
1596
|
private static isPromiseLike;
|
|
1597
|
+
private static isFactory;
|
|
1501
1598
|
}
|
|
1502
1599
|
/**
|
|
1503
1600
|
* A helper class for defining factories using an inline definition
|
|
@@ -1512,7 +1609,7 @@ declare class InlineFactory<TModel, TAttributes extends FactoryAttributes> exten
|
|
|
1512
1609
|
private readonly resolver;
|
|
1513
1610
|
protected model: FactoryModelConstructor<TModel>;
|
|
1514
1611
|
constructor(model: FactoryModelConstructor<TModel>, resolver: FactoryDefinition<TAttributes>);
|
|
1515
|
-
protected definition(sequence: number): MaybePromise<TAttributes
|
|
1612
|
+
protected definition(sequence: number): MaybePromise<FactoryDefinitionAttributes<TAttributes>>;
|
|
1516
1613
|
}
|
|
1517
1614
|
/**
|
|
1518
1615
|
* Define a factory for a given model using an inline definition function.
|
|
@@ -2829,6 +2926,15 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
|
|
|
2829
2926
|
*/
|
|
2830
2927
|
find<TKey extends keyof ModelAttributes<TModel> & string>(value: ModelAttributes<TModel>[TKey], key: TKey): Promise<TModel | null>;
|
|
2831
2928
|
find(value: string | number, key?: string): Promise<TModel | null>;
|
|
2929
|
+
/**
|
|
2930
|
+
* Find a related model by a specific key and value, applying relationship constraints, or
|
|
2931
|
+
* throw an error if not found.
|
|
2932
|
+
*
|
|
2933
|
+
* @param value
|
|
2934
|
+
* @param key
|
|
2935
|
+
*/
|
|
2936
|
+
findOrFail<TKey extends keyof ModelAttributes<TModel> & string>(value: ModelAttributes<TModel>[TKey], key: TKey): Promise<TModel>;
|
|
2937
|
+
findOrFail(value: string | number, key?: string): Promise<TModel>;
|
|
2832
2938
|
/**
|
|
2833
2939
|
* Finds a record by id/key and returns callback result when not found.
|
|
2834
2940
|
*
|
|
@@ -4152,6 +4258,7 @@ declare const SEEDER_BRAND: unique symbol;
|
|
|
4152
4258
|
*/
|
|
4153
4259
|
declare abstract class Seeder {
|
|
4154
4260
|
static readonly [SEEDER_BRAND] = true;
|
|
4261
|
+
private static readonly executionReport;
|
|
4155
4262
|
/**
|
|
4156
4263
|
* Defines the operations to be performed when running the seeder.
|
|
4157
4264
|
*/
|
|
@@ -4162,6 +4269,13 @@ declare abstract class Seeder {
|
|
|
4162
4269
|
* @param seeders The seeders to be run.
|
|
4163
4270
|
*/
|
|
4164
4271
|
call(...seeders: SeederCallArgument[]): Promise<void>;
|
|
4272
|
+
/**
|
|
4273
|
+
* Run seeders and return every seeder class executed, including nested calls.
|
|
4274
|
+
*
|
|
4275
|
+
* @param seeders
|
|
4276
|
+
* @returns
|
|
4277
|
+
*/
|
|
4278
|
+
static runWithReport(...seeders: SeederCallArgument[]): Promise<string[]>;
|
|
4165
4279
|
/**
|
|
4166
4280
|
* Converts a SeederInput into a Seeder instance.
|
|
4167
4281
|
*
|
|
@@ -6018,4 +6132,4 @@ declare class URLDriver {
|
|
|
6018
6132
|
url(page: number): string;
|
|
6019
6133
|
}
|
|
6020
6134
|
//#endregion
|
|
6021
|
-
export { deriveInverseRelationAlias as $, SetBasedEagerLoader as $a, PrismaTransactionContext as $i, getRegisteredPaths as $n, MigrationInstanceLike as $o, RawQuerySpec as $r, getPersistedTableMetadata as $t, resetArkormRuntimeForTests as A, AttributeWhereInput as Aa, DelegateUpdateData as Ai, MigrateRollbackCommand as An, MaybePromise as Ao, AdapterTransactionContext as Ar, getLatestAppliedMigrations as At, applyMigrationRollbackToPrismaSchema as B, ModelEventHandlerConstructor as Ba, PaginationURLDriver as Bi, Attribute as Bn, ModelMetadata as Bo, DeleteSpec as Br, writeAppliedMigrationsStateToStore as Bt, getRuntimePaginationURLDriverFactory as C, QueryBuilder as Ca, DelegateInclude as Ci, SchemaBuilder as Cn, LengthAwarePaginator as Co, AdapterCapability as Cr, buildMigrationIdentity as Ct, isQuerySchemaLike as D, AttributeSchemaDelegate as Da, DelegateSelect as Di, SeedCommand as Dn, FactoryDefinition as Do, AdapterModelIntrospectionOptions as Dr, deleteAppliedMigrationsStateFromStore as Dt, isDelegateLike as E, AttributeQuerySchema as Ea, DelegateRows as Ei, ForeignKeyBuilder as En, FactoryAttributes as Eo, AdapterModelFieldStructure as Er, createEmptyAppliedMigrationsState as Et, PRISMA_MODEL_REGEX as F, ModelAttributesOf as Fa, ModelQuerySchemaLike as Fi, MakeMigrationCommand as Fn, ColumnMap as Fo, DatabasePrimitive as Fr, readAppliedMigrationsStateFromStore as Ft, buildFieldLine as G, ModelRelationshipResult as Ga, PrismaLikeInclude as Gi, RegisteredModel as Gn, RelationMetadata as Go, QueryCondition as Gr, PersistedTimestampColumn as Gt, applyMigrationToPrismaSchema as H, ModelEventName as Ha, PrismaClientLike as Hi, Arkorm as Hn, MorphOneRelationMetadata as Ho, InsertSpec as Hr, PersistedMetadataFeatures as Ht, applyAlterTableOperation as I, ModelCreateData as Ia, ModelTableCase as Ii, MakeFactoryCommand as In, HasManyRelationMetadata as Io, DatabaseRow as Ir, removeAppliedMigration as It, buildMigrationSource as J, RelatedModelClass as Ja, PrismaLikeSelect as Ji, RuntimePathKey as Jn, AppliedMigrationRun as Jo, QueryNotCondition as Jr, deletePersistedColumnMappingsState as Jt, buildIndexLine as K, ModelUpdateData as Ka, PrismaLikeOrderBy as Ki, RuntimeConstructor as Kn, RelationMetadataType as Ko, QueryGroupCondition as Kr, applyOperationsToPersistedColumnMappingsState as Kt, applyCreateTableOperation as L, ModelDeclaredAttributeKey as La, PaginationCurrentPageResolver as Li, InitCommand as Ln, HasManyThroughRelationMetadata as Lo, DatabaseRows as Lr, resolveMigrationStateFilePath as Lt, PrimaryKeyGenerationPlanner as M, GlobalScope as Ma, EagerLoadConstraint as Mi, MigrateCommand as Mn, DatabaseTablePersistedMetadataOptions as Mo, AggregateSelection as Mr, markMigrationApplied as Mt, PRISMA_ENUM_MEMBER_REGEX as N, ModelAttributeValue as Na, EagerLoadMap as Ni, MakeSeederCommand as Nn, BelongsToManyRelationMetadata as No, AggregateSpec as Nr, markMigrationRun as Nt, isTransactionCapableClient as O, AttributeSelect as Oa, DelegateUniqueWhere as Oi, ModelsSyncCommand as On, FactoryModelConstructor as Oo, AdapterModelStructure as Or, findAppliedMigration as Ot, PRISMA_ENUM_REGEX as P, ModelAttributes as Pa, GetUserConfig as Pi, MakeModelCommand as Pn, BelongsToRelationMetadata as Po, DatabaseAdapter as Pr, readAppliedMigrationsState as Pt, deriveCollectionFieldName as Q, defineFactory as Qa, PrismaTransactionCapableClient as Qi, getRegisteredModels as Qn, MigrationClass as Qo, QueryTarget as Qr, getPersistedPrimaryKeyGeneration as Qt, applyDropTableOperation as R, ModelEventDispatcher as Ra, PaginationMeta as Ri, CliApp as Rn, HasOneRelationMetadata as Ro, DatabaseValue as Rr, supportsDatabaseMigrationState as Rt, getRuntimePaginationCurrentPageResolver as S, RelationshipModelStatic as Sa, DelegateFindManyArgs as Si, Migration as Sn, RelationTableLookupSpec as So, AdapterCapabilities as Sr, toModelName as St, getUserConfig as T, AttributeOrderBy as Ta, DelegateRow as Ti, TableBuilder as Tn, ArkormCollection as To, AdapterInspectionRequest as Tr, computeMigrationChecksum as Tt, applyOperationsToPrismaSchema as U, ModelLifecycleState as Ua, PrismaDelegateLike as Ui, Arkormx as Un, MorphToManyRelationMetadata as Uo, QueryComparisonCondition as Ur, PersistedPrimaryKeyGeneration as Ut, applyMigrationToDatabase as V, ModelEventListener as Va, PaginationURLDriverFactory as Vi, AttributeOptions as Vn, MorphManyRelationMetadata as Vo, InsertManySpec as Vr, PersistedColumnMappingsState as Vt, buildEnumBlock as W, ModelRelationshipKey as Wa, PrismaFindManyArgsLike as Wi, RegisteredFactory as Wn, PivotModelStatic as Wo, QueryComparisonOperator as Wr, PersistedTableMetadata as Wt, buildRelationLine as X, InlineFactory as Xa, PrismaLikeWhereInput as Xi, getRegisteredFactories as Xn, GenerateMigrationOptions as Xo, QueryRawCondition as Xr, getPersistedEnumMap as Xt, buildModelBlock as Y, Model as Ya, PrismaLikeSortOrder as Yi, RuntimePathMap as Yn, AppliedMigrationsState as Yo, QueryOrderBy as Yr, getPersistedColumnMap as Yt, createMigrationTimestamp as Z, ModelFactory as Za, PrismaTransactionCallback as Zi, getRegisteredMigrations as Zn, GeneratedMigrationFile as Zo, QuerySelectColumn as Zr, getPersistedEnumTsType as Zt, getActiveTransactionClient as _, TransactionCallback as _a, CastHandler as _i, MissingDelegateException as _n, RelationDefaultResolver as _o, PrismaDelegateNameMapping as _r, stripPrismaSchemaModelsAndEnums as _t, resolveRuntimeCompatibilityQuerySchema as a, QuerySchemaRow as aa, SoftDeleteQueryMode as ai, resolvePersistedMetadataFeatures as an, HasManyThroughRelation as ao, registerFactories as ar, SchemaForeignKey as as, findModelBlock as at, getRuntimeClient as b, TransactionOptions as ba, ClientResolver as bi, DB as bn, RelationResult as bo, KyselyDatabaseAdapter as br, supportsDatabaseReset as bt, createPrismaAdapter as c, QuerySchemaUniqueWhere as ca, UpdateSpec as ci, writePersistedColumnMappingsState as cn, SingleResultRelation as co, registerPaths as cr, SchemaOperation as cs, formatRelationAction as ct, bindAdapterToModels as d, QuerySchemaWhere as da, AdapterQueryInspection as di, ScopeNotDefinedException as dn, RelationTableLoader as do, SEEDER_BRAND as dr, SchemaTableDropOperation as ds, pad as dt, PrismaTransactionOptions as ea, RelationAggregateSpec as ei, getPersistedTimestampColumns as en, MorphToManyRelation as eo, getRegisteredSeeders as er, PrimaryKeyGeneration as es, deriveRelationAlias as et, configureArkormRuntime as f, RawSelectInput as fa, ArkormBootContext as fi, RelationResolutionException as fn, RelationAggregateConstraint as fo, Seeder as fr, TimestampColumnBehavior as fs, resolveEnumName as ft, getActiveTransactionAdapter as g, SoftDeleteConfig as ga, CastDefinition as gi, ModelNotFoundException as gn, RelationConstraint as go, PrismaDatabaseAdapter as gr, runPrismaCommand as gt, ensureArkormConfigLoading as h, SimplePaginationMeta as ha, ArkormDebugHandler as hi, QueryConstraintException as hn, RelationColumnLookupSpec as ho, SeederInput as hr, runMigrationWithPrisma as ht, getRuntimeCompatibilityAdapter as i, QuerySchemaOrderBy as ia, SelectSpec as ii, resolveColumnMappingsFilePath as in, HasOneRelation as io, loadSeedersFrom as ir, SchemaColumnType as is, findEnumBlock as it, runArkormTransaction as j, DelegateForModelSchema as ja, DelegateWhere as ji, MigrateFreshCommand as jn, DatabaseTableOptions as jo, AggregateOperation as jr, isMigrationApplied as jt, loadArkormConfig as k, AttributeUpdateInput as ka, DelegateUpdateArgs as ki, MigrationHistoryCommand as kn, FactoryState as ko, AdapterQueryOperation as kr, getLastMigrationRun as kt, createPrismaDelegateMap as l, QuerySchemaUpdateArgs as la, UpsertSpec as li, UnsupportedAdapterFeatureException as ln, BelongsToManyRelation as lo, registerSeeders as lr, SchemaTableAlterOperation as ls, generateMigrationFile as lt, emitRuntimeDebugEvent as m, Serializable as ma, ArkormDebugEvent as mi, QueryExecutionExceptionContext as mn, RelationAggregateType as mo, SeederConstructor as mr, resolvePrismaType as mt, PivotModel as n, QuerySchemaFindManyArgs as na, RelationLoadPlan as ni, rebuildPersistedColumnMappingsState as nn, MorphManyRelation as no, loadMigrationsFrom as nr, PrismaSchemaSyncOptions as ns, deriveSingularFieldName as nt, resolveRuntimeCompatibilityQuerySchemaOrThrow as o, QuerySchemaRows as oa, SortDirection as oi, syncPersistedColumnMappingsFromState as on, HasManyRelation as oo, registerMigrations as or, SchemaForeignKeyAction as os, formatDefaultValue as ot, defineConfig as p, RuntimeClientLike as pa, ArkormConfig as pi, QueryExecutionException as pn, RelationAggregateInput as po, SeederCallArgument as pr, resolveMigrationClassName as pt, buildInverseRelationLine as q, QuerySchemaForModel as qa, PrismaLikeScalarFilter as qi, RuntimePathInput as qn, AppliedMigrationEntry as qo, QueryLogicalOperator as qr, createEmptyPersistedColumnMappingsState as qt, RuntimeModuleLoader as r, QuerySchemaInclude as ra, RelationLoadSpec as ri, resetPersistedColumnMappingsCache as rn, HasOneThroughRelation as ro, loadModelsFrom as rr, SchemaColumn as rs, escapeRegex as rt, PrismaDelegateMap as s, QuerySchemaSelect as sa, UpdateManySpec as si, validatePersistedMetadataFeaturesForMigrations as sn, BelongsToRelation as so, registerModels as sr, SchemaIndex as ss, formatEnumDefaultValue as st, URLDriver as t, QuerySchemaCreateData as ta, RelationFilterSpec as ti, readPersistedColumnMappingsState as tn, MorphOneRelation as to, loadFactoriesFrom as tr, PrismaMigrationWorkflowOptions as ts, deriveRelationFieldName as tt, inferDelegateName as u, QuerySchemaUpdateData as ua, AdapterBindableModel as ui, UniqueConstraintResolutionException as un, Relation as uo, resetRuntimeRegistryForTests as ur, SchemaTableCreateOperation as us, getMigrationPlan as ut, getDefaultStubsPath as v, TransactionCapableClient as va, CastMap as vi, ArkormErrorContext as vn, RelationDefaultValue as vo, createPrismaCompatibilityAdapter as vr, supportsDatabaseCreation as vt, getRuntimePrismaClient as w, AttributeCreateInput as wa, DelegateOrderBy as wi, EnumBuilder as wn, Paginator as wo, AdapterDatabaseCreationResult as wr, buildMigrationRunId as wt, getRuntimeDebugHandler as x, ModelStatic as xa, DelegateCreateData as xi, MIGRATION_BRAND as xn, RelationResultCache as xo, createKyselyAdapter as xr, toMigrationFileSlug as xt, getRuntimeAdapter as y, TransactionContext as ya, CastType as yi, ArkormException as yn, RelationMetadataProvider as yo, createPrismaDatabaseAdapter as yr, supportsDatabaseMigrationExecution as yt, applyMigrationRollbackToDatabase as z, ModelEventHandler as za, PaginationOptions as zi, resolveCast as zn, HasOneThroughRelationMetadata as zo, DeleteManySpec as zr, writeAppliedMigrationsState as zt };
|
|
6135
|
+
export { deriveInverseRelationAlias as $, SetBasedEagerLoader as $a, PrismaTransactionContext as $i, getRegisteredPaths as $n, AppliedMigrationsState as $o, RawQuerySpec as $r, getPersistedTableMetadata as $t, resetArkormRuntimeForTests as A, AttributeWhereInput as Aa, DelegateUpdateData as Ai, MigrateRollbackCommand as An, FactoryDefinitionAttributes as Ao, AdapterTransactionContext as Ar, getLatestAppliedMigrations as At, applyMigrationRollbackToPrismaSchema as B, ModelEventHandlerConstructor as Ba, PaginationURLDriver as Bi, Attribute as Bn, HasManyRelationMetadata as Bo, DeleteSpec as Br, writeAppliedMigrationsStateToStore as Bt, getRuntimePaginationURLDriverFactory as C, QueryBuilder as Ca, DelegateInclude as Ci, SchemaBuilder as Cn, LengthAwarePaginator as Co, AdapterCapability as Cr, buildMigrationIdentity as Ct, isQuerySchemaLike as D, AttributeSchemaDelegate as Da, DelegateSelect as Di, SeedCommand as Dn, FactoryAttributes as Do, AdapterModelIntrospectionOptions as Dr, deleteAppliedMigrationsStateFromStore as Dt, isDelegateLike as E, AttributeQuerySchema as Ea, DelegateRows as Ei, ForeignKeyBuilder as En, FactoryAttributeResolver as Eo, AdapterModelFieldStructure as Er, createEmptyAppliedMigrationsState as Et, PRISMA_MODEL_REGEX as F, ModelAttributesOf as Fa, ModelQuerySchemaLike as Fi, MakeMigrationCommand as Fn, DatabaseTableOptions as Fo, DatabasePrimitive as Fr, readAppliedMigrationsStateFromStore as Ft, buildFieldLine as G, ModelRelationshipResult as Ga, PrismaLikeInclude as Gi, RegisteredModel as Gn, MorphManyRelationMetadata as Go, QueryCondition as Gr, PersistedTimestampColumn as Gt, applyMigrationToPrismaSchema as H, ModelEventName as Ha, PrismaClientLike as Hi, Arkorm as Hn, HasOneRelationMetadata as Ho, InsertSpec as Hr, PersistedMetadataFeatures as Ht, applyAlterTableOperation as I, ModelCreateData as Ia, ModelTableCase as Ii, MakeFactoryCommand as In, DatabaseTablePersistedMetadataOptions as Io, DatabaseRow as Ir, removeAppliedMigration as It, buildMigrationSource as J, RelatedModelClass as Ja, PrismaLikeSelect as Ji, RuntimePathKey as Jn, PivotModelStatic as Jo, QueryNotCondition as Jr, deletePersistedColumnMappingsState as Jt, buildIndexLine as K, ModelUpdateData as Ka, PrismaLikeOrderBy as Ki, RuntimeConstructor as Kn, MorphOneRelationMetadata as Ko, QueryGroupCondition as Kr, applyOperationsToPersistedColumnMappingsState as Kt, applyCreateTableOperation as L, ModelDeclaredAttributeKey as La, PaginationCurrentPageResolver as Li, InitCommand as Ln, BelongsToManyRelationMetadata as Lo, DatabaseRows as Lr, resolveMigrationStateFilePath as Lt, PrimaryKeyGenerationPlanner as M, GlobalScope as Ma, EagerLoadConstraint as Mi, MigrateCommand as Mn, FactoryRelationshipResolver as Mo, AggregateSelection as Mr, markMigrationApplied as Mt, PRISMA_ENUM_MEMBER_REGEX as N, ModelAttributeValue as Na, EagerLoadMap as Ni, MakeSeederCommand as Nn, FactoryState as No, AggregateSpec as Nr, markMigrationRun as Nt, isTransactionCapableClient as O, AttributeSelect as Oa, DelegateUniqueWhere as Oi, ModelsSyncCommand as On, FactoryCallback as Oo, AdapterModelStructure as Or, findAppliedMigration as Ot, PRISMA_ENUM_REGEX as P, ModelAttributes as Pa, GetUserConfig as Pi, MakeModelCommand as Pn, MaybePromise as Po, DatabaseAdapter as Pr, readAppliedMigrationsState as Pt, deriveCollectionFieldName as Q, defineFactory as Qa, PrismaTransactionCapableClient as Qi, getRegisteredModels as Qn, AppliedMigrationRun as Qo, QueryTarget as Qr, getPersistedPrimaryKeyGeneration as Qt, applyDropTableOperation as R, ModelEventDispatcher as Ra, PaginationMeta as Ri, CliApp as Rn, BelongsToRelationMetadata as Ro, DatabaseValue as Rr, supportsDatabaseMigrationState as Rt, getRuntimePaginationCurrentPageResolver as S, RelationshipModelStatic as Sa, DelegateFindManyArgs as Si, Migration as Sn, RelationTableLookupSpec as So, AdapterCapabilities as Sr, toModelName as St, getUserConfig as T, AttributeOrderBy as Ta, DelegateRow as Ti, TableBuilder as Tn, ArkormCollection as To, AdapterInspectionRequest as Tr, computeMigrationChecksum as Tt, applyOperationsToPrismaSchema as U, ModelLifecycleState as Ua, PrismaDelegateLike as Ui, Arkormx as Un, HasOneThroughRelationMetadata as Uo, QueryComparisonCondition as Ur, PersistedPrimaryKeyGeneration as Ut, applyMigrationToDatabase as V, ModelEventListener as Va, PaginationURLDriverFactory as Vi, AttributeOptions as Vn, HasManyThroughRelationMetadata as Vo, InsertManySpec as Vr, PersistedColumnMappingsState as Vt, buildEnumBlock as W, ModelRelationshipKey as Wa, PrismaFindManyArgsLike as Wi, RegisteredFactory as Wn, ModelMetadata as Wo, QueryComparisonOperator as Wr, PersistedTableMetadata as Wt, buildRelationLine as X, InlineFactory as Xa, PrismaLikeWhereInput as Xi, getRegisteredFactories as Xn, RelationMetadataType as Xo, QueryRawCondition as Xr, getPersistedEnumMap as Xt, buildModelBlock as Y, Model as Ya, PrismaLikeSortOrder as Yi, RuntimePathMap as Yn, RelationMetadata as Yo, QueryOrderBy as Yr, getPersistedColumnMap as Yt, createMigrationTimestamp as Z, ModelFactory as Za, PrismaTransactionCallback as Zi, getRegisteredMigrations as Zn, AppliedMigrationEntry as Zo, QuerySelectColumn as Zr, getPersistedEnumTsType as Zt, getActiveTransactionClient as _, TransactionCallback as _a, CastHandler as _i, MissingDelegateException as _n, RelationDefaultResolver as _o, PrismaDelegateNameMapping as _r, stripPrismaSchemaModelsAndEnums as _t, resolveRuntimeCompatibilityQuerySchema as a, QuerySchemaRow as aa, SoftDeleteQueryMode as ai, resolvePersistedMetadataFeatures as an, HasManyThroughRelation as ao, registerFactories as ar, PrismaMigrationWorkflowOptions as as, findModelBlock as at, getRuntimeClient as b, TransactionOptions as ba, ClientResolver as bi, DB as bn, RelationResult as bo, KyselyDatabaseAdapter as br, supportsDatabaseReset as bt, createPrismaAdapter as c, QuerySchemaUniqueWhere as ca, UpdateSpec as ci, writePersistedColumnMappingsState as cn, SingleResultRelation as co, registerPaths as cr, SchemaColumnType as cs, formatRelationAction as ct, bindAdapterToModels as d, QuerySchemaWhere as da, AdapterQueryInspection as di, ScopeNotDefinedException as dn, RelationTableLoader as do, SEEDER_BRAND as dr, SchemaIndex as ds, pad as dt, PrismaTransactionOptions as ea, RelationAggregateSpec as ei, getPersistedTimestampColumns as en, MorphToManyRelation as eo, getRegisteredSeeders as er, GenerateMigrationOptions as es, deriveRelationAlias as et, configureArkormRuntime as f, RawSelectInput as fa, ArkormBootContext as fi, RelationResolutionException as fn, RelationAggregateConstraint as fo, Seeder as fr, SchemaOperation as fs, resolveEnumName as ft, getActiveTransactionAdapter as g, SoftDeleteConfig as ga, CastDefinition as gi, ModelNotFoundException as gn, RelationConstraint as go, PrismaDatabaseAdapter as gr, TimestampColumnBehavior as gs, runPrismaCommand as gt, ensureArkormConfigLoading as h, SimplePaginationMeta as ha, ArkormDebugHandler as hi, QueryConstraintException as hn, RelationColumnLookupSpec as ho, SeederInput as hr, SchemaTableDropOperation as hs, runMigrationWithPrisma as ht, getRuntimeCompatibilityAdapter as i, QuerySchemaOrderBy as ia, SelectSpec as ii, resolveColumnMappingsFilePath as in, HasOneRelation as io, loadSeedersFrom as ir, PrimaryKeyGeneration as is, findEnumBlock as it, runArkormTransaction as j, DelegateForModelSchema as ja, DelegateWhere as ji, MigrateFreshCommand as jn, FactoryModelConstructor as jo, AggregateOperation as jr, isMigrationApplied as jt, loadArkormConfig as k, AttributeUpdateInput as ka, DelegateUpdateArgs as ki, MigrationHistoryCommand as kn, FactoryDefinition as ko, AdapterQueryOperation as kr, getLastMigrationRun as kt, createPrismaDelegateMap as l, QuerySchemaUpdateArgs as la, UpsertSpec as li, UnsupportedAdapterFeatureException as ln, BelongsToManyRelation as lo, registerSeeders as lr, SchemaForeignKey as ls, generateMigrationFile as lt, emitRuntimeDebugEvent as m, Serializable as ma, ArkormDebugEvent as mi, QueryExecutionExceptionContext as mn, RelationAggregateType as mo, SeederConstructor as mr, SchemaTableCreateOperation as ms, resolvePrismaType as mt, PivotModel as n, QuerySchemaFindManyArgs as na, RelationLoadPlan as ni, rebuildPersistedColumnMappingsState as nn, MorphManyRelation as no, loadMigrationsFrom as nr, MigrationClass as ns, deriveSingularFieldName as nt, resolveRuntimeCompatibilityQuerySchemaOrThrow as o, QuerySchemaRows as oa, SortDirection as oi, syncPersistedColumnMappingsFromState as on, HasManyRelation as oo, registerMigrations as or, PrismaSchemaSyncOptions as os, formatDefaultValue as ot, defineConfig as p, RuntimeClientLike as pa, ArkormConfig as pi, QueryExecutionException as pn, RelationAggregateInput as po, SeederCallArgument as pr, SchemaTableAlterOperation as ps, resolveMigrationClassName as pt, buildInverseRelationLine as q, QuerySchemaForModel as qa, PrismaLikeScalarFilter as qi, RuntimePathInput as qn, MorphToManyRelationMetadata as qo, QueryLogicalOperator as qr, createEmptyPersistedColumnMappingsState as qt, RuntimeModuleLoader as r, QuerySchemaInclude as ra, RelationLoadSpec as ri, resetPersistedColumnMappingsCache as rn, HasOneThroughRelation as ro, loadModelsFrom as rr, MigrationInstanceLike as rs, escapeRegex as rt, PrismaDelegateMap as s, QuerySchemaSelect as sa, UpdateManySpec as si, validatePersistedMetadataFeaturesForMigrations as sn, BelongsToRelation as so, registerModels as sr, SchemaColumn as ss, formatEnumDefaultValue as st, URLDriver as t, QuerySchemaCreateData as ta, RelationFilterSpec as ti, readPersistedColumnMappingsState as tn, MorphOneRelation as to, loadFactoriesFrom as tr, GeneratedMigrationFile as ts, deriveRelationFieldName as tt, inferDelegateName as u, QuerySchemaUpdateData as ua, AdapterBindableModel as ui, UniqueConstraintResolutionException as un, Relation as uo, resetRuntimeRegistryForTests as ur, SchemaForeignKeyAction as us, getMigrationPlan as ut, getDefaultStubsPath as v, TransactionCapableClient as va, CastMap as vi, ArkormErrorContext as vn, RelationDefaultValue as vo, createPrismaCompatibilityAdapter as vr, supportsDatabaseCreation as vt, getRuntimePrismaClient as w, AttributeCreateInput as wa, DelegateOrderBy as wi, EnumBuilder as wn, Paginator as wo, AdapterDatabaseCreationResult as wr, buildMigrationRunId as wt, getRuntimeDebugHandler as x, ModelStatic as xa, DelegateCreateData as xi, MIGRATION_BRAND as xn, RelationResultCache as xo, createKyselyAdapter as xr, toMigrationFileSlug as xt, getRuntimeAdapter as y, TransactionContext as ya, CastType as yi, ArkormException as yn, RelationMetadataProvider as yo, createPrismaDatabaseAdapter as yr, supportsDatabaseMigrationExecution as yt, applyMigrationRollbackToDatabase as z, ModelEventHandler as za, PaginationOptions as zi, resolveCast as zn, ColumnMap as zo, DeleteManySpec as zr, writeAppliedMigrationsState as zt };
|