arkormx 2.4.6 → 2.4.7
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 +135 -22
- package/dist/{index-BgrakiJb.d.mts → index-Bn-2R_ax.d.mts} +44 -1
- package/dist/{index-BsXCqK-l.d.cts → index-DKqMpR3p.d.cts} +44 -1
- package/dist/index.cjs +24 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +23 -3
- package/dist/relationship/index.cjs +1 -1
- package/dist/relationship/index.d.cts +1 -1
- package/dist/relationship/index.d.mts +1 -1
- package/dist/relationship/index.mjs +1 -1
- package/dist/{relationship-DcvK5Xn-.mjs → relationship-BkNxySap.mjs} +136 -23
- package/dist/{relationship-Cku0y1Mt.cjs → relationship-CuPNAoHm.cjs} +147 -22
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as deriveInverseRelationAlias, $i as PrismaTransactionContext, $n as getRegisteredPaths, $o as AppliedMigrationsState, $r as RawQuerySpec, $t as getPersistedTableMetadata, A as resetArkormRuntimeForTests, Aa as AttributeWhereInput, Ai as DelegateUpdateData, An as MigrateRollbackCommand, Ao as FactoryDefinitionAttributes, Ar as AdapterTransactionContext, At as getLatestAppliedMigrations, B as applyMigrationRollbackToPrismaSchema, Ba as ModelEventHandlerConstructor, Bi as PaginationURLDriver, Bn as Attribute, Bo as HasManyRelationMetadata, Br as DeleteSpec, Bt as writeAppliedMigrationsStateToStore, C as getRuntimePaginationURLDriverFactory, Ca as QueryBuilder, Ci as DelegateInclude, Cn as SchemaBuilder, Co as LengthAwarePaginator, Cr as AdapterCapability, Ct as buildMigrationIdentity, D as isQuerySchemaLike, Da as AttributeSchemaDelegate, Di as DelegateSelect, Dn as SeedCommand, Do as FactoryAttributes, Dr as AdapterModelIntrospectionOptions, Dt as deleteAppliedMigrationsStateFromStore, E as isDelegateLike, Ea as AttributeQuerySchema, Ei as DelegateRows, En as ForeignKeyBuilder, Eo as FactoryAttributeResolver, Er as AdapterModelFieldStructure, Et as createEmptyAppliedMigrationsState, F as PRISMA_MODEL_REGEX, Fa as ModelAttributesOf, Fi as ModelQuerySchemaLike, Fn as MakeMigrationCommand, Fo as DatabaseTableOptions, Fr as DatabasePrimitive, Ft as readAppliedMigrationsStateFromStore, G as buildFieldLine, Ga as ModelRelationshipResult, Gi as PrismaLikeInclude, Gn as RegisteredModel, Go as MorphManyRelationMetadata, Gr as QueryCondition, Gt as PersistedTimestampColumn, H as applyMigrationToPrismaSchema, Ha as ModelEventName, Hi as PrismaClientLike, Hn as Arkorm, Ho as HasOneRelationMetadata, Hr as InsertSpec, Ht as PersistedMetadataFeatures, I as applyAlterTableOperation, Ia as ModelCreateData, Ii as ModelTableCase, In as MakeFactoryCommand, Io as DatabaseTablePersistedMetadataOptions, Ir as DatabaseRow, It as removeAppliedMigration, J as buildMigrationSource, Ja as RelatedModelClass, Ji as PrismaLikeSelect, Jn as RuntimePathKey, Jo as PivotModelStatic, Jr as QueryNotCondition, Jt as deletePersistedColumnMappingsState, K as buildIndexLine, Ka as ModelUpdateData, Ki as PrismaLikeOrderBy, Kn as RuntimeConstructor, Ko as MorphOneRelationMetadata, Kr as QueryGroupCondition, Kt as applyOperationsToPersistedColumnMappingsState, L as applyCreateTableOperation, La as ModelDeclaredAttributeKey, Li as PaginationCurrentPageResolver, Ln as InitCommand, Lo as BelongsToManyRelationMetadata, Lr as DatabaseRows, Lt as resolveMigrationStateFilePath, M as PrimaryKeyGenerationPlanner, Ma as GlobalScope, Mi as EagerLoadConstraint, Mn as MigrateCommand, Mo as FactoryRelationshipResolver, Mr as AggregateSelection, Mt as markMigrationApplied, N as PRISMA_ENUM_MEMBER_REGEX, Na as ModelAttributeValue, Ni as EagerLoadMap, Nn as MakeSeederCommand, No as FactoryState, Nr as AggregateSpec, Nt as markMigrationRun, O as isTransactionCapableClient, Oa as AttributeSelect, Oi as DelegateUniqueWhere, On as ModelsSyncCommand, Oo as FactoryCallback, Or as AdapterModelStructure, Ot as findAppliedMigration, P as PRISMA_ENUM_REGEX, Pa as ModelAttributes, Pi as GetUserConfig, Pn as MakeModelCommand, Po as MaybePromise, Pr as DatabaseAdapter, Pt as readAppliedMigrationsState, Q as deriveCollectionFieldName, Qa as defineFactory, Qi as PrismaTransactionCapableClient, Qn as getRegisteredModels, Qo as AppliedMigrationRun, Qr as QueryTarget, Qt as getPersistedPrimaryKeyGeneration, R as applyDropTableOperation, Ra as ModelEventDispatcher, Ri as PaginationMeta, Rn as CliApp, Ro as BelongsToRelationMetadata, Rr as DatabaseValue, Rt as supportsDatabaseMigrationState, S as getRuntimePaginationCurrentPageResolver, Sa as RelationshipModelStatic, Si as DelegateFindManyArgs, Sn as Migration, So as RelationTableLookupSpec, Sr as AdapterCapabilities, St as toModelName, T as getUserConfig, Ta as AttributeOrderBy, Ti as DelegateRow, Tn as TableBuilder, To as ArkormCollection, Tr as AdapterInspectionRequest, Tt as computeMigrationChecksum, U as applyOperationsToPrismaSchema, Ua as ModelLifecycleState, Ui as PrismaDelegateLike, Un as Arkormx, Uo as HasOneThroughRelationMetadata, Ur as QueryComparisonCondition, Ut as PersistedPrimaryKeyGeneration, V as applyMigrationToDatabase, Va as ModelEventListener, Vi as PaginationURLDriverFactory, Vn as AttributeOptions, Vo as HasManyThroughRelationMetadata, Vr as InsertManySpec, Vt as PersistedColumnMappingsState, W as buildEnumBlock, Wa as ModelRelationshipKey, Wi as PrismaFindManyArgsLike, Wn as RegisteredFactory, Wo as ModelMetadata, Wr as QueryComparisonOperator, Wt as PersistedTableMetadata, X as buildRelationLine, Xa as InlineFactory, Xi as PrismaLikeWhereInput, Xn as getRegisteredFactories, Xo as RelationMetadataType, Xr as QueryRawCondition, Xt as getPersistedEnumMap, Y as buildModelBlock, Ya as Model, Yi as PrismaLikeSortOrder, Yn as RuntimePathMap, Yo as RelationMetadata, Yr as QueryOrderBy, Yt as getPersistedColumnMap, Z as createMigrationTimestamp, Za as ModelFactory, Zi as PrismaTransactionCallback, Zn as getRegisteredMigrations, Zo as AppliedMigrationEntry, Zr as QuerySelectColumn, Zt as getPersistedEnumTsType, _ as getActiveTransactionClient, _a as TransactionCallback, _i as CastHandler, _n as MissingDelegateException, _o as RelationDefaultResolver, _r as PrismaDelegateNameMapping, _t as stripPrismaSchemaModelsAndEnums, a as resolveRuntimeCompatibilityQuerySchema, aa as QuerySchemaRow, ai as SoftDeleteQueryMode, an as resolvePersistedMetadataFeatures, ar as registerFactories, as as PrismaMigrationWorkflowOptions, at as findModelBlock, b as getRuntimeClient, ba as TransactionOptions, bi as ClientResolver, bn as DB, bo as RelationResult, br as KyselyDatabaseAdapter, bt as supportsDatabaseReset, c as createPrismaAdapter, ca as QuerySchemaUniqueWhere, ci as UpdateSpec, cn as writePersistedColumnMappingsState, cr as registerPaths, cs as SchemaColumnType, ct as formatRelationAction, d as bindAdapterToModels, da as QuerySchemaWhere, di as AdapterQueryInspection, dn as ScopeNotDefinedException, dr as SEEDER_BRAND, ds as SchemaIndex, dt as pad, ea as PrismaTransactionOptions, ei as RelationAggregateSpec, en as getPersistedTimestampColumns, er as getRegisteredSeeders, es as GenerateMigrationOptions, et as deriveRelationAlias, f as configureArkormRuntime, fa as RawSelectInput, fi as ArkormBootContext, fn as RelationResolutionException, fo as RelationAggregateConstraint, fr as Seeder, fs as SchemaOperation, ft as resolveEnumName, g as getActiveTransactionAdapter, ga as SoftDeleteConfig, gi as CastDefinition, gn as ModelNotFoundException, go as RelationConstraint, gr as PrismaDatabaseAdapter, gs as TimestampColumnBehavior, gt as runPrismaCommand, h as ensureArkormConfigLoading, ha as SimplePaginationMeta, hi as ArkormDebugHandler, hn as QueryConstraintException, ho as RelationColumnLookupSpec, hr as SeederInput, hs as SchemaTableDropOperation, ht as runMigrationWithPrisma, i as getRuntimeCompatibilityAdapter, ia as QuerySchemaOrderBy, ii as SelectSpec, in as resolveColumnMappingsFilePath, ir as loadSeedersFrom, is as PrimaryKeyGeneration, it as findEnumBlock, j as runArkormTransaction, ja as DelegateForModelSchema, ji as DelegateWhere, jn as MigrateFreshCommand, jo as FactoryModelConstructor, jr as AggregateOperation, jt as isMigrationApplied, k as loadArkormConfig, ka as AttributeUpdateInput, ki as DelegateUpdateArgs, kn as MigrationHistoryCommand, ko as FactoryDefinition, kr as AdapterQueryOperation, kt as getLastMigrationRun, l as createPrismaDelegateMap, la as QuerySchemaUpdateArgs, li as UpsertSpec, ln as UnsupportedAdapterFeatureException, lr as registerSeeders, ls as SchemaForeignKey, lt as generateMigrationFile, m as emitRuntimeDebugEvent, ma as Serializable, mi as ArkormDebugEvent, mn as QueryExecutionExceptionContext, mo as RelationAggregateType, mr as SeederConstructor, ms as SchemaTableCreateOperation, mt as resolvePrismaType, n as PivotModel, na as QuerySchemaFindManyArgs, ni as RelationLoadPlan, nn as rebuildPersistedColumnMappingsState, nr as loadMigrationsFrom, ns as MigrationClass, nt as deriveSingularFieldName, o as resolveRuntimeCompatibilityQuerySchemaOrThrow, oa as QuerySchemaRows, oi as SortDirection, on as syncPersistedColumnMappingsFromState, or as registerMigrations, os as PrismaSchemaSyncOptions, ot as formatDefaultValue, p as defineConfig, pa as RuntimeClientLike, pi as ArkormConfig, pn as QueryExecutionException, po as RelationAggregateInput, pr as SeederCallArgument, ps as SchemaTableAlterOperation, pt as resolveMigrationClassName, q as buildInverseRelationLine, qa as QuerySchemaForModel, qi as PrismaLikeScalarFilter, qn as RuntimePathInput, qo as MorphToManyRelationMetadata, qr as QueryLogicalOperator, qt as createEmptyPersistedColumnMappingsState, r as RuntimeModuleLoader, ra as QuerySchemaInclude, ri as RelationLoadSpec, rn as resetPersistedColumnMappingsCache, rr as loadModelsFrom, rs as MigrationInstanceLike, rt as escapeRegex, s as PrismaDelegateMap, sa as QuerySchemaSelect, si as UpdateManySpec, sn as validatePersistedMetadataFeaturesForMigrations, sr as registerModels, ss as SchemaColumn, st as formatEnumDefaultValue, t as URLDriver, ta as QuerySchemaCreateData, ti as RelationFilterSpec, tn as readPersistedColumnMappingsState, tr as loadFactoriesFrom, ts as GeneratedMigrationFile, tt as deriveRelationFieldName, u as inferDelegateName, ua as QuerySchemaUpdateData, ui as AdapterBindableModel, un as UniqueConstraintResolutionException, ur as resetRuntimeRegistryForTests, us as SchemaForeignKeyAction, ut as getMigrationPlan, v as getDefaultStubsPath, va as TransactionCapableClient, vi as CastMap, vn as ArkormErrorContext, vo as RelationDefaultValue, vr as createPrismaCompatibilityAdapter, vt as supportsDatabaseCreation, w as getRuntimePrismaClient, wa as AttributeCreateInput, wi as DelegateOrderBy, wn as EnumBuilder, wo as Paginator, wr as AdapterDatabaseCreationResult, wt as buildMigrationRunId, x as getRuntimeDebugHandler, xa as ModelStatic, xi as DelegateCreateData, xn as MIGRATION_BRAND, xo as RelationResultCache, xr as createKyselyAdapter, xt as toMigrationFileSlug, y as getRuntimeAdapter, ya as TransactionContext, yi as CastType, yn as ArkormException, yo as RelationMetadataProvider, yr as createPrismaDatabaseAdapter, yt as supportsDatabaseMigrationExecution, z as applyMigrationRollbackToDatabase, za as ModelEventHandler, zi as PaginationOptions, zn as resolveCast, zo as ColumnMap, zr as DeleteManySpec, zt as writeAppliedMigrationsState } from "./index-BsXCqK-l.cjs";
|
|
2
|
-
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, CastDefinition, CastHandler, CastMap, CastType, CliApp, ClientResolver, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EagerLoadConstraint, EagerLoadMap, EnumBuilder, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, GenerateMigrationOptions, GeneratedMigrationFile, GetUserConfig, GlobalScope, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InitCommand, InlineFactory, InsertManySpec, InsertSpec, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PersistedColumnMappingsState, PersistedMetadataFeatures, PersistedPrimaryKeyGeneration, PersistedTableMetadata, PersistedTimestampColumn, PivotModel, PivotModelStatic, PrimaryKeyGeneration, PrimaryKeyGenerationPlanner, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryExecutionException, QueryExecutionExceptionContext, QueryGroupCondition, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RelatedModelClass, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, 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
|
+
import { $ as createMigrationTimestamp, $a as ModelFactory, $i as PrismaTransactionCallback, $n as getRegisteredMigrations, $o as AppliedMigrationEntry, $r as QuerySelectColumn, $t as getPersistedEnumTsType, A as resetArkormRuntimeForTests, Aa as AttributeSelect, Ai as DelegateUniqueWhere, An as ModelsSyncCommand, Ao as FactoryCallback, Ar as AdapterModelStructure, At as findAppliedMigration, B as applyMigrationRollbackToPrismaSchema, Ba as ModelEventDispatcher, Bi as PaginationMeta, Bn as CliApp, Bo as BelongsToRelationMetadata, Br as DatabaseValue, Bt as supportsDatabaseMigrationState, C as getRuntimePaginationURLDriverFactory, Ca as ModelStatic, Ci as DelegateCreateData, Cn as MIGRATION_BRAND, Co as RelationResultCache, Cr as createKyselyAdapter, Ct as toMigrationFileSlug, D as isQuerySchemaLike, Da as AttributeOrderBy, Di as DelegateRow, Dn as TableBuilder, Do as ArkormCollection, Dr as AdapterInspectionRequest, Dt as computeMigrationChecksum, E as isDelegateLike, Ea as AttributeCreateInput, Ei as DelegateOrderBy, En as EnumBuilder, Eo as Paginator, Er as AdapterDatabaseCreationResult, Et as buildMigrationRunId, F as PRISMA_MODEL_REGEX, Fa as ModelAttributeValue, Fi as EagerLoadMap, Fn as MakeSeederCommand, Fo as FactoryState, Fr as AggregateSpec, Ft as markMigrationRun, G as buildFieldLine, Ga as ModelLifecycleState, Gi as PrismaDelegateLike, Gn as Arkormx, Go as HasOneThroughRelationMetadata, Gr as QueryComparisonCondition, Gt as PersistedPrimaryKeyGeneration, H as applyMigrationToPrismaSchema, Ha as ModelEventHandlerConstructor, Hi as PaginationURLDriver, Hn as Attribute, Ho as HasManyRelationMetadata, Hr as DeleteSpec, Ht as writeAppliedMigrationsStateToStore, I as applyAlterTableOperation, Ia as ModelAttributes, Ii as GetUserConfig, In as MakeModelCommand, Io as MaybePromise, Ir as DatabaseAdapter, It as readAppliedMigrationsState, J as buildMigrationSource, Ja as ModelUpdateData, Ji as PrismaLikeOrderBy, Jn as RuntimeConstructor, Jo as MorphOneRelationMetadata, Jr as QueryGroupCondition, Jt as applyOperationsToPersistedColumnMappingsState, K as buildIndexLine, Ka as ModelRelationshipKey, Ki as PrismaFindManyArgsLike, Kn as RegisteredFactory, Ko as ModelMetadata, Kr as QueryComparisonOperator, Kt as PersistedTableMetadata, L as applyCreateTableOperation, La as ModelAttributesOf, Li as ModelQuerySchemaLike, Ln as MakeMigrationCommand, Lo as DatabaseTableOptions, Lr as DatabasePrimitive, Lt as readAppliedMigrationsStateFromStore, M as PrimaryKeyGenerationPlanner, Ma as AttributeWhereInput, Mi as DelegateUpdateData, Mn as MigrateRollbackCommand, Mo as FactoryDefinitionAttributes, Mr as AdapterTransactionContext, Mt as getLatestAppliedMigrations, N as PRISMA_ENUM_MEMBER_REGEX, Na as DelegateForModelSchema, Ni as DelegateWhere, Nn as MigrateFreshCommand, No as FactoryModelConstructor, Nr as AggregateOperation, Nt as isMigrationApplied, O as isTransactionCapableClient, Oa as AttributeQuerySchema, Oi as DelegateRows, On as ForeignKeyBuilder, Oo as FactoryAttributeResolver, Or as AdapterModelFieldStructure, Ot as createEmptyAppliedMigrationsState, P as PRISMA_ENUM_REGEX, Pa as GlobalScope, Pi as EagerLoadConstraint, Pn as MigrateCommand, Po as FactoryRelationshipResolver, Pr as AggregateSelection, Pt as markMigrationApplied, Q as buildUniqueConstraintLine, Qa as InlineFactory, Qi as PrismaLikeWhereInput, Qn as getRegisteredFactories, Qo as RelationMetadataType, Qr as QueryRawCondition, Qt as getPersistedEnumMap, R as applyDropTableOperation, Ra as ModelCreateData, Ri as ModelTableCase, Rn as MakeFactoryCommand, Ro as DatabaseTablePersistedMetadataOptions, Rr as DatabaseRow, Rt as removeAppliedMigration, S as getRuntimePaginationCurrentPageResolver, Sa as TransactionOptions, Si as ClientResolver, Sn as DB, So as RelationResult, Sr as KyselyDatabaseAdapter, St as supportsDatabaseReset, T as getUserConfig, Ta as QueryBuilder, Ti as DelegateInclude, Tn as SchemaBuilder, To as LengthAwarePaginator, Tr as AdapterCapability, Tt as buildMigrationIdentity, U as applyOperationsToPrismaSchema, Ua as ModelEventListener, Ui as PaginationURLDriverFactory, Un as AttributeOptions, Uo as HasManyThroughRelationMetadata, Ur as InsertManySpec, Ut as PersistedColumnMappingsState, V as applyMigrationToDatabase, Va as ModelEventHandler, Vi as PaginationOptions, Vn as resolveCast, Vo as ColumnMap, Vr as DeleteManySpec, Vt as writeAppliedMigrationsState, W as buildEnumBlock, Wa as ModelEventName, Wi as PrismaClientLike, Wn as Arkorm, Wo as HasOneRelationMetadata, Wr as InsertSpec, Wt as PersistedMetadataFeatures, X as buildPrimaryKeyLine, Xa as RelatedModelClass, Xi as PrismaLikeSelect, Xn as RuntimePathKey, Xo as PivotModelStatic, Xr as QueryNotCondition, Xt as deletePersistedColumnMappingsState, Y as buildModelBlock, Ya as QuerySchemaForModel, Yi as PrismaLikeScalarFilter, Yn as RuntimePathInput, Yo as MorphToManyRelationMetadata, Yr as QueryLogicalOperator, Yt as createEmptyPersistedColumnMappingsState, Z as buildRelationLine, Za as Model, Zi as PrismaLikeSortOrder, Zn as RuntimePathMap, Zo as RelationMetadata, Zr as QueryOrderBy, Zt as getPersistedColumnMap, _ as getActiveTransactionClient, _a as SimplePaginationMeta, _i as ArkormDebugHandler, _n as QueryConstraintException, _o as RelationColumnLookupSpec, _r as SeederInput, _s as SchemaTableCreateOperation, _t as runMigrationWithPrisma, a as resolveRuntimeCompatibilityQuerySchema, aa as QuerySchemaInclude, ai as RelationLoadSpec, an as resetPersistedColumnMappingsCache, ar as loadModelsFrom, as as MigrationInstanceLike, at as escapeRegex, b as getRuntimeClient, ba as TransactionCapableClient, bi as CastMap, bn as ArkormErrorContext, bo as RelationDefaultValue, br as createPrismaCompatibilityAdapter, bs as TimestampColumnBehavior, bt as supportsDatabaseCreation, c as createPrismaAdapter, ca as QuerySchemaRows, ci as SortDirection, cn as syncPersistedColumnMappingsFromState, cr as registerMigrations, cs as PrismaSchemaSyncOptions, ct as formatDefaultValue, d as bindAdapterToModels, da as QuerySchemaUpdateArgs, di as UpsertSpec, dn as UnsupportedAdapterFeatureException, dr as registerSeeders, ds as SchemaForeignKey, dt as generateMigrationFile, ea as PrismaTransactionCapableClient, ei as QueryTarget, en as getPersistedPrimaryKeyGeneration, eo as defineFactory, er as getRegisteredModels, es as AppliedMigrationRun, et as deriveCollectionFieldName, f as configureArkormRuntime, fa as QuerySchemaUpdateData, fi as AdapterBindableModel, fn as UniqueConstraintResolutionException, fr as resetRuntimeRegistryForTests, fs as SchemaForeignKeyAction, ft as getMigrationPlan, g as getActiveTransactionAdapter, ga as Serializable, gi as ArkormDebugEvent, gn as QueryExecutionExceptionContext, go as RelationAggregateType, gr as SeederConstructor, gs as SchemaTableAlterOperation, gt as resolvePrismaType, h as ensureArkormConfigLoading, ha as RuntimeClientLike, hi as ArkormConfig, hn as QueryExecutionException, ho as RelationAggregateInput, hr as SeederCallArgument, hs as SchemaPrimaryKey, ht as resolveMigrationClassName, i as getRuntimeCompatibilityAdapter, ia as QuerySchemaFindManyArgs, ii as RelationLoadPlan, in as rebuildPersistedColumnMappingsState, ir as loadMigrationsFrom, is as MigrationClass, it as deriveSingularFieldName, j as runArkormTransaction, ja as AttributeUpdateInput, ji as DelegateUpdateArgs, jn as MigrationHistoryCommand, jo as FactoryDefinition, jr as AdapterQueryOperation, jt as getLastMigrationRun, k as loadArkormConfig, ka as AttributeSchemaDelegate, ki as DelegateSelect, kn as SeedCommand, ko as FactoryAttributes, kr as AdapterModelIntrospectionOptions, kt as deleteAppliedMigrationsStateFromStore, l as createPrismaDelegateMap, la as QuerySchemaSelect, li as UpdateManySpec, ln as validatePersistedMetadataFeaturesForMigrations, lr as registerModels, ls as SchemaColumn, lt as formatEnumDefaultValue, m as emitRuntimeDebugEvent, ma as RawSelectInput, mi as ArkormBootContext, mn as RelationResolutionException, mo as RelationAggregateConstraint, mr as Seeder, ms as SchemaOperation, mt as resolveEnumName, n as PivotModel, na as PrismaTransactionOptions, ni as RelationAggregateSpec, nn as getPersistedTimestampColumns, nr as getRegisteredSeeders, ns as GenerateMigrationOptions, nt as deriveRelationAlias, o as resolveRuntimeCompatibilityQuerySchemaOrThrow, oa as QuerySchemaOrderBy, oi as SelectSpec, on as resolveColumnMappingsFilePath, or as loadSeedersFrom, os as PrimaryKeyGeneration, ot as findEnumBlock, p as defineConfig, pa as QuerySchemaWhere, pi as AdapterQueryInspection, pn as ScopeNotDefinedException, pr as SEEDER_BRAND, ps as SchemaIndex, pt as pad, q as buildInverseRelationLine, qa as ModelRelationshipResult, qi as PrismaLikeInclude, qn as RegisteredModel, qo as MorphManyRelationMetadata, qr as QueryCondition, qt as PersistedTimestampColumn, r as RuntimeModuleLoader, ra as QuerySchemaCreateData, ri as RelationFilterSpec, rn as readPersistedColumnMappingsState, rr as loadFactoriesFrom, rs as GeneratedMigrationFile, rt as deriveRelationFieldName, s as PrismaDelegateMap, sa as QuerySchemaRow, si as SoftDeleteQueryMode, sn as resolvePersistedMetadataFeatures, sr as registerFactories, ss as PrismaMigrationWorkflowOptions, st as findModelBlock, t as URLDriver, ta as PrismaTransactionContext, ti as RawQuerySpec, tn as getPersistedTableMetadata, tr as getRegisteredPaths, ts as AppliedMigrationsState, tt as deriveInverseRelationAlias, u as inferDelegateName, ua as QuerySchemaUniqueWhere, ui as UpdateSpec, un as writePersistedColumnMappingsState, ur as registerPaths, us as SchemaColumnType, ut as formatRelationAction, v as getDefaultStubsPath, va as SoftDeleteConfig, vi as CastDefinition, vn as ModelNotFoundException, vo as RelationConstraint, vr as PrismaDatabaseAdapter, vs as SchemaTableDropOperation, vt as runPrismaCommand, w as getRuntimePrismaClient, wa as RelationshipModelStatic, wi as DelegateFindManyArgs, wn as Migration, wo as RelationTableLookupSpec, wr as AdapterCapabilities, wt as toModelName, x as getRuntimeDebugHandler, xa as TransactionContext, xi as CastType, xn as ArkormException, xo as RelationMetadataProvider, xr as createPrismaDatabaseAdapter, xt as supportsDatabaseMigrationExecution, y as getRuntimeAdapter, ya as TransactionCallback, yi as CastHandler, yn as MissingDelegateException, yo as RelationDefaultResolver, yr as PrismaDelegateNameMapping, ys as SchemaUniqueConstraint, yt as stripPrismaSchemaModelsAndEnums, z as applyMigrationRollbackToDatabase, za as ModelDeclaredAttributeKey, zi as PaginationCurrentPageResolver, zn as InitCommand, zo as BelongsToManyRelationMetadata, zr as DatabaseRows, zt as resolveMigrationStateFilePath } from "./index-DKqMpR3p.cjs";
|
|
2
|
+
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, CastDefinition, CastHandler, CastMap, CastType, CliApp, ClientResolver, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EagerLoadConstraint, EagerLoadMap, EnumBuilder, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, GenerateMigrationOptions, GeneratedMigrationFile, GetUserConfig, GlobalScope, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InitCommand, InlineFactory, InsertManySpec, InsertSpec, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PersistedColumnMappingsState, PersistedMetadataFeatures, PersistedPrimaryKeyGeneration, PersistedTableMetadata, PersistedTimestampColumn, PivotModel, PivotModelStatic, PrimaryKeyGeneration, PrimaryKeyGenerationPlanner, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryExecutionException, QueryExecutionExceptionContext, QueryGroupCondition, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RelatedModelClass, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, 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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as deriveInverseRelationAlias, $i as PrismaTransactionContext, $n as getRegisteredPaths, $o as AppliedMigrationsState, $r as RawQuerySpec, $t as getPersistedTableMetadata, A as resetArkormRuntimeForTests, Aa as AttributeWhereInput, Ai as DelegateUpdateData, An as MigrateRollbackCommand, Ao as FactoryDefinitionAttributes, Ar as AdapterTransactionContext, At as getLatestAppliedMigrations, B as applyMigrationRollbackToPrismaSchema, Ba as ModelEventHandlerConstructor, Bi as PaginationURLDriver, Bn as Attribute, Bo as HasManyRelationMetadata, Br as DeleteSpec, Bt as writeAppliedMigrationsStateToStore, C as getRuntimePaginationURLDriverFactory, Ca as QueryBuilder, Ci as DelegateInclude, Cn as SchemaBuilder, Co as LengthAwarePaginator, Cr as AdapterCapability, Ct as buildMigrationIdentity, D as isQuerySchemaLike, Da as AttributeSchemaDelegate, Di as DelegateSelect, Dn as SeedCommand, Do as FactoryAttributes, Dr as AdapterModelIntrospectionOptions, Dt as deleteAppliedMigrationsStateFromStore, E as isDelegateLike, Ea as AttributeQuerySchema, Ei as DelegateRows, En as ForeignKeyBuilder, Eo as FactoryAttributeResolver, Er as AdapterModelFieldStructure, Et as createEmptyAppliedMigrationsState, F as PRISMA_MODEL_REGEX, Fa as ModelAttributesOf, Fi as ModelQuerySchemaLike, Fn as MakeMigrationCommand, Fo as DatabaseTableOptions, Fr as DatabasePrimitive, Ft as readAppliedMigrationsStateFromStore, G as buildFieldLine, Ga as ModelRelationshipResult, Gi as PrismaLikeInclude, Gn as RegisteredModel, Go as MorphManyRelationMetadata, Gr as QueryCondition, Gt as PersistedTimestampColumn, H as applyMigrationToPrismaSchema, Ha as ModelEventName, Hi as PrismaClientLike, Hn as Arkorm, Ho as HasOneRelationMetadata, Hr as InsertSpec, Ht as PersistedMetadataFeatures, I as applyAlterTableOperation, Ia as ModelCreateData, Ii as ModelTableCase, In as MakeFactoryCommand, Io as DatabaseTablePersistedMetadataOptions, Ir as DatabaseRow, It as removeAppliedMigration, J as buildMigrationSource, Ja as RelatedModelClass, Ji as PrismaLikeSelect, Jn as RuntimePathKey, Jo as PivotModelStatic, Jr as QueryNotCondition, Jt as deletePersistedColumnMappingsState, K as buildIndexLine, Ka as ModelUpdateData, Ki as PrismaLikeOrderBy, Kn as RuntimeConstructor, Ko as MorphOneRelationMetadata, Kr as QueryGroupCondition, Kt as applyOperationsToPersistedColumnMappingsState, L as applyCreateTableOperation, La as ModelDeclaredAttributeKey, Li as PaginationCurrentPageResolver, Ln as InitCommand, Lo as BelongsToManyRelationMetadata, Lr as DatabaseRows, Lt as resolveMigrationStateFilePath, M as PrimaryKeyGenerationPlanner, Ma as GlobalScope, Mi as EagerLoadConstraint, Mn as MigrateCommand, Mo as FactoryRelationshipResolver, Mr as AggregateSelection, Mt as markMigrationApplied, N as PRISMA_ENUM_MEMBER_REGEX, Na as ModelAttributeValue, Ni as EagerLoadMap, Nn as MakeSeederCommand, No as FactoryState, Nr as AggregateSpec, Nt as markMigrationRun, O as isTransactionCapableClient, Oa as AttributeSelect, Oi as DelegateUniqueWhere, On as ModelsSyncCommand, Oo as FactoryCallback, Or as AdapterModelStructure, Ot as findAppliedMigration, P as PRISMA_ENUM_REGEX, Pa as ModelAttributes, Pi as GetUserConfig, Pn as MakeModelCommand, Po as MaybePromise, Pr as DatabaseAdapter, Pt as readAppliedMigrationsState, Q as deriveCollectionFieldName, Qa as defineFactory, Qi as PrismaTransactionCapableClient, Qn as getRegisteredModels, Qo as AppliedMigrationRun, Qr as QueryTarget, Qt as getPersistedPrimaryKeyGeneration, R as applyDropTableOperation, Ra as ModelEventDispatcher, Ri as PaginationMeta, Rn as CliApp, Ro as BelongsToRelationMetadata, Rr as DatabaseValue, Rt as supportsDatabaseMigrationState, S as getRuntimePaginationCurrentPageResolver, Sa as RelationshipModelStatic, Si as DelegateFindManyArgs, Sn as Migration, So as RelationTableLookupSpec, Sr as AdapterCapabilities, St as toModelName, T as getUserConfig, Ta as AttributeOrderBy, Ti as DelegateRow, Tn as TableBuilder, To as ArkormCollection, Tr as AdapterInspectionRequest, Tt as computeMigrationChecksum, U as applyOperationsToPrismaSchema, Ua as ModelLifecycleState, Ui as PrismaDelegateLike, Un as Arkormx, Uo as HasOneThroughRelationMetadata, Ur as QueryComparisonCondition, Ut as PersistedPrimaryKeyGeneration, V as applyMigrationToDatabase, Va as ModelEventListener, Vi as PaginationURLDriverFactory, Vn as AttributeOptions, Vo as HasManyThroughRelationMetadata, Vr as InsertManySpec, Vt as PersistedColumnMappingsState, W as buildEnumBlock, Wa as ModelRelationshipKey, Wi as PrismaFindManyArgsLike, Wn as RegisteredFactory, Wo as ModelMetadata, Wr as QueryComparisonOperator, Wt as PersistedTableMetadata, X as buildRelationLine, Xa as InlineFactory, Xi as PrismaLikeWhereInput, Xn as getRegisteredFactories, Xo as RelationMetadataType, Xr as QueryRawCondition, Xt as getPersistedEnumMap, Y as buildModelBlock, Ya as Model, Yi as PrismaLikeSortOrder, Yn as RuntimePathMap, Yo as RelationMetadata, Yr as QueryOrderBy, Yt as getPersistedColumnMap, Z as createMigrationTimestamp, Za as ModelFactory, Zi as PrismaTransactionCallback, Zn as getRegisteredMigrations, Zo as AppliedMigrationEntry, Zr as QuerySelectColumn, Zt as getPersistedEnumTsType, _ as getActiveTransactionClient, _a as TransactionCallback, _i as CastHandler, _n as MissingDelegateException, _o as RelationDefaultResolver, _r as PrismaDelegateNameMapping, _t as stripPrismaSchemaModelsAndEnums, a as resolveRuntimeCompatibilityQuerySchema, aa as QuerySchemaRow, ai as SoftDeleteQueryMode, an as resolvePersistedMetadataFeatures, ar as registerFactories, as as PrismaMigrationWorkflowOptions, at as findModelBlock, b as getRuntimeClient, ba as TransactionOptions, bi as ClientResolver, bn as DB, bo as RelationResult, br as KyselyDatabaseAdapter, bt as supportsDatabaseReset, c as createPrismaAdapter, ca as QuerySchemaUniqueWhere, ci as UpdateSpec, cn as writePersistedColumnMappingsState, cr as registerPaths, cs as SchemaColumnType, ct as formatRelationAction, d as bindAdapterToModels, da as QuerySchemaWhere, di as AdapterQueryInspection, dn as ScopeNotDefinedException, dr as SEEDER_BRAND, ds as SchemaIndex, dt as pad, ea as PrismaTransactionOptions, ei as RelationAggregateSpec, en as getPersistedTimestampColumns, er as getRegisteredSeeders, es as GenerateMigrationOptions, et as deriveRelationAlias, f as configureArkormRuntime, fa as RawSelectInput, fi as ArkormBootContext, fn as RelationResolutionException, fo as RelationAggregateConstraint, fr as Seeder, fs as SchemaOperation, ft as resolveEnumName, g as getActiveTransactionAdapter, ga as SoftDeleteConfig, gi as CastDefinition, gn as ModelNotFoundException, go as RelationConstraint, gr as PrismaDatabaseAdapter, gs as TimestampColumnBehavior, gt as runPrismaCommand, h as ensureArkormConfigLoading, ha as SimplePaginationMeta, hi as ArkormDebugHandler, hn as QueryConstraintException, ho as RelationColumnLookupSpec, hr as SeederInput, hs as SchemaTableDropOperation, ht as runMigrationWithPrisma, i as getRuntimeCompatibilityAdapter, ia as QuerySchemaOrderBy, ii as SelectSpec, in as resolveColumnMappingsFilePath, ir as loadSeedersFrom, is as PrimaryKeyGeneration, it as findEnumBlock, j as runArkormTransaction, ja as DelegateForModelSchema, ji as DelegateWhere, jn as MigrateFreshCommand, jo as FactoryModelConstructor, jr as AggregateOperation, jt as isMigrationApplied, k as loadArkormConfig, ka as AttributeUpdateInput, ki as DelegateUpdateArgs, kn as MigrationHistoryCommand, ko as FactoryDefinition, kr as AdapterQueryOperation, kt as getLastMigrationRun, l as createPrismaDelegateMap, la as QuerySchemaUpdateArgs, li as UpsertSpec, ln as UnsupportedAdapterFeatureException, lr as registerSeeders, ls as SchemaForeignKey, lt as generateMigrationFile, m as emitRuntimeDebugEvent, ma as Serializable, mi as ArkormDebugEvent, mn as QueryExecutionExceptionContext, mo as RelationAggregateType, mr as SeederConstructor, ms as SchemaTableCreateOperation, mt as resolvePrismaType, n as PivotModel, na as QuerySchemaFindManyArgs, ni as RelationLoadPlan, nn as rebuildPersistedColumnMappingsState, nr as loadMigrationsFrom, ns as MigrationClass, nt as deriveSingularFieldName, o as resolveRuntimeCompatibilityQuerySchemaOrThrow, oa as QuerySchemaRows, oi as SortDirection, on as syncPersistedColumnMappingsFromState, or as registerMigrations, os as PrismaSchemaSyncOptions, ot as formatDefaultValue, p as defineConfig, pa as RuntimeClientLike, pi as ArkormConfig, pn as QueryExecutionException, po as RelationAggregateInput, pr as SeederCallArgument, ps as SchemaTableAlterOperation, pt as resolveMigrationClassName, q as buildInverseRelationLine, qa as QuerySchemaForModel, qi as PrismaLikeScalarFilter, qn as RuntimePathInput, qo as MorphToManyRelationMetadata, qr as QueryLogicalOperator, qt as createEmptyPersistedColumnMappingsState, r as RuntimeModuleLoader, ra as QuerySchemaInclude, ri as RelationLoadSpec, rn as resetPersistedColumnMappingsCache, rr as loadModelsFrom, rs as MigrationInstanceLike, rt as escapeRegex, s as PrismaDelegateMap, sa as QuerySchemaSelect, si as UpdateManySpec, sn as validatePersistedMetadataFeaturesForMigrations, sr as registerModels, ss as SchemaColumn, st as formatEnumDefaultValue, t as URLDriver, ta as QuerySchemaCreateData, ti as RelationFilterSpec, tn as readPersistedColumnMappingsState, tr as loadFactoriesFrom, ts as GeneratedMigrationFile, tt as deriveRelationFieldName, u as inferDelegateName, ua as QuerySchemaUpdateData, ui as AdapterBindableModel, un as UniqueConstraintResolutionException, ur as resetRuntimeRegistryForTests, us as SchemaForeignKeyAction, ut as getMigrationPlan, v as getDefaultStubsPath, va as TransactionCapableClient, vi as CastMap, vn as ArkormErrorContext, vo as RelationDefaultValue, vr as createPrismaCompatibilityAdapter, vt as supportsDatabaseCreation, w as getRuntimePrismaClient, wa as AttributeCreateInput, wi as DelegateOrderBy, wn as EnumBuilder, wo as Paginator, wr as AdapterDatabaseCreationResult, wt as buildMigrationRunId, x as getRuntimeDebugHandler, xa as ModelStatic, xi as DelegateCreateData, xn as MIGRATION_BRAND, xo as RelationResultCache, xr as createKyselyAdapter, xt as toMigrationFileSlug, y as getRuntimeAdapter, ya as TransactionContext, yi as CastType, yn as ArkormException, yo as RelationMetadataProvider, yr as createPrismaDatabaseAdapter, yt as supportsDatabaseMigrationExecution, z as applyMigrationRollbackToDatabase, za as ModelEventHandler, zi as PaginationOptions, zn as resolveCast, zo as ColumnMap, zr as DeleteManySpec, zt as writeAppliedMigrationsState } from "./index-BgrakiJb.mjs";
|
|
2
|
-
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, CastDefinition, CastHandler, CastMap, CastType, CliApp, ClientResolver, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EagerLoadConstraint, EagerLoadMap, EnumBuilder, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, GenerateMigrationOptions, GeneratedMigrationFile, GetUserConfig, GlobalScope, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InitCommand, InlineFactory, InsertManySpec, InsertSpec, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PersistedColumnMappingsState, PersistedMetadataFeatures, PersistedPrimaryKeyGeneration, PersistedTableMetadata, PersistedTimestampColumn, PivotModel, PivotModelStatic, PrimaryKeyGeneration, PrimaryKeyGenerationPlanner, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryExecutionException, QueryExecutionExceptionContext, QueryGroupCondition, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RelatedModelClass, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, 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
|
+
import { $ as createMigrationTimestamp, $a as ModelFactory, $i as PrismaTransactionCallback, $n as getRegisteredMigrations, $o as AppliedMigrationEntry, $r as QuerySelectColumn, $t as getPersistedEnumTsType, A as resetArkormRuntimeForTests, Aa as AttributeSelect, Ai as DelegateUniqueWhere, An as ModelsSyncCommand, Ao as FactoryCallback, Ar as AdapterModelStructure, At as findAppliedMigration, B as applyMigrationRollbackToPrismaSchema, Ba as ModelEventDispatcher, Bi as PaginationMeta, Bn as CliApp, Bo as BelongsToRelationMetadata, Br as DatabaseValue, Bt as supportsDatabaseMigrationState, C as getRuntimePaginationURLDriverFactory, Ca as ModelStatic, Ci as DelegateCreateData, Cn as MIGRATION_BRAND, Co as RelationResultCache, Cr as createKyselyAdapter, Ct as toMigrationFileSlug, D as isQuerySchemaLike, Da as AttributeOrderBy, Di as DelegateRow, Dn as TableBuilder, Do as ArkormCollection, Dr as AdapterInspectionRequest, Dt as computeMigrationChecksum, E as isDelegateLike, Ea as AttributeCreateInput, Ei as DelegateOrderBy, En as EnumBuilder, Eo as Paginator, Er as AdapterDatabaseCreationResult, Et as buildMigrationRunId, F as PRISMA_MODEL_REGEX, Fa as ModelAttributeValue, Fi as EagerLoadMap, Fn as MakeSeederCommand, Fo as FactoryState, Fr as AggregateSpec, Ft as markMigrationRun, G as buildFieldLine, Ga as ModelLifecycleState, Gi as PrismaDelegateLike, Gn as Arkormx, Go as HasOneThroughRelationMetadata, Gr as QueryComparisonCondition, Gt as PersistedPrimaryKeyGeneration, H as applyMigrationToPrismaSchema, Ha as ModelEventHandlerConstructor, Hi as PaginationURLDriver, Hn as Attribute, Ho as HasManyRelationMetadata, Hr as DeleteSpec, Ht as writeAppliedMigrationsStateToStore, I as applyAlterTableOperation, Ia as ModelAttributes, Ii as GetUserConfig, In as MakeModelCommand, Io as MaybePromise, Ir as DatabaseAdapter, It as readAppliedMigrationsState, J as buildMigrationSource, Ja as ModelUpdateData, Ji as PrismaLikeOrderBy, Jn as RuntimeConstructor, Jo as MorphOneRelationMetadata, Jr as QueryGroupCondition, Jt as applyOperationsToPersistedColumnMappingsState, K as buildIndexLine, Ka as ModelRelationshipKey, Ki as PrismaFindManyArgsLike, Kn as RegisteredFactory, Ko as ModelMetadata, Kr as QueryComparisonOperator, Kt as PersistedTableMetadata, L as applyCreateTableOperation, La as ModelAttributesOf, Li as ModelQuerySchemaLike, Ln as MakeMigrationCommand, Lo as DatabaseTableOptions, Lr as DatabasePrimitive, Lt as readAppliedMigrationsStateFromStore, M as PrimaryKeyGenerationPlanner, Ma as AttributeWhereInput, Mi as DelegateUpdateData, Mn as MigrateRollbackCommand, Mo as FactoryDefinitionAttributes, Mr as AdapterTransactionContext, Mt as getLatestAppliedMigrations, N as PRISMA_ENUM_MEMBER_REGEX, Na as DelegateForModelSchema, Ni as DelegateWhere, Nn as MigrateFreshCommand, No as FactoryModelConstructor, Nr as AggregateOperation, Nt as isMigrationApplied, O as isTransactionCapableClient, Oa as AttributeQuerySchema, Oi as DelegateRows, On as ForeignKeyBuilder, Oo as FactoryAttributeResolver, Or as AdapterModelFieldStructure, Ot as createEmptyAppliedMigrationsState, P as PRISMA_ENUM_REGEX, Pa as GlobalScope, Pi as EagerLoadConstraint, Pn as MigrateCommand, Po as FactoryRelationshipResolver, Pr as AggregateSelection, Pt as markMigrationApplied, Q as buildUniqueConstraintLine, Qa as InlineFactory, Qi as PrismaLikeWhereInput, Qn as getRegisteredFactories, Qo as RelationMetadataType, Qr as QueryRawCondition, Qt as getPersistedEnumMap, R as applyDropTableOperation, Ra as ModelCreateData, Ri as ModelTableCase, Rn as MakeFactoryCommand, Ro as DatabaseTablePersistedMetadataOptions, Rr as DatabaseRow, Rt as removeAppliedMigration, S as getRuntimePaginationCurrentPageResolver, Sa as TransactionOptions, Si as ClientResolver, Sn as DB, So as RelationResult, Sr as KyselyDatabaseAdapter, St as supportsDatabaseReset, T as getUserConfig, Ta as QueryBuilder, Ti as DelegateInclude, Tn as SchemaBuilder, To as LengthAwarePaginator, Tr as AdapterCapability, Tt as buildMigrationIdentity, U as applyOperationsToPrismaSchema, Ua as ModelEventListener, Ui as PaginationURLDriverFactory, Un as AttributeOptions, Uo as HasManyThroughRelationMetadata, Ur as InsertManySpec, Ut as PersistedColumnMappingsState, V as applyMigrationToDatabase, Va as ModelEventHandler, Vi as PaginationOptions, Vn as resolveCast, Vo as ColumnMap, Vr as DeleteManySpec, Vt as writeAppliedMigrationsState, W as buildEnumBlock, Wa as ModelEventName, Wi as PrismaClientLike, Wn as Arkorm, Wo as HasOneRelationMetadata, Wr as InsertSpec, Wt as PersistedMetadataFeatures, X as buildPrimaryKeyLine, Xa as RelatedModelClass, Xi as PrismaLikeSelect, Xn as RuntimePathKey, Xo as PivotModelStatic, Xr as QueryNotCondition, Xt as deletePersistedColumnMappingsState, Y as buildModelBlock, Ya as QuerySchemaForModel, Yi as PrismaLikeScalarFilter, Yn as RuntimePathInput, Yo as MorphToManyRelationMetadata, Yr as QueryLogicalOperator, Yt as createEmptyPersistedColumnMappingsState, Z as buildRelationLine, Za as Model, Zi as PrismaLikeSortOrder, Zn as RuntimePathMap, Zo as RelationMetadata, Zr as QueryOrderBy, Zt as getPersistedColumnMap, _ as getActiveTransactionClient, _a as SimplePaginationMeta, _i as ArkormDebugHandler, _n as QueryConstraintException, _o as RelationColumnLookupSpec, _r as SeederInput, _s as SchemaTableCreateOperation, _t as runMigrationWithPrisma, a as resolveRuntimeCompatibilityQuerySchema, aa as QuerySchemaInclude, ai as RelationLoadSpec, an as resetPersistedColumnMappingsCache, ar as loadModelsFrom, as as MigrationInstanceLike, at as escapeRegex, b as getRuntimeClient, ba as TransactionCapableClient, bi as CastMap, bn as ArkormErrorContext, bo as RelationDefaultValue, br as createPrismaCompatibilityAdapter, bs as TimestampColumnBehavior, bt as supportsDatabaseCreation, c as createPrismaAdapter, ca as QuerySchemaRows, ci as SortDirection, cn as syncPersistedColumnMappingsFromState, cr as registerMigrations, cs as PrismaSchemaSyncOptions, ct as formatDefaultValue, d as bindAdapterToModels, da as QuerySchemaUpdateArgs, di as UpsertSpec, dn as UnsupportedAdapterFeatureException, dr as registerSeeders, ds as SchemaForeignKey, dt as generateMigrationFile, ea as PrismaTransactionCapableClient, ei as QueryTarget, en as getPersistedPrimaryKeyGeneration, eo as defineFactory, er as getRegisteredModels, es as AppliedMigrationRun, et as deriveCollectionFieldName, f as configureArkormRuntime, fa as QuerySchemaUpdateData, fi as AdapterBindableModel, fn as UniqueConstraintResolutionException, fr as resetRuntimeRegistryForTests, fs as SchemaForeignKeyAction, ft as getMigrationPlan, g as getActiveTransactionAdapter, ga as Serializable, gi as ArkormDebugEvent, gn as QueryExecutionExceptionContext, go as RelationAggregateType, gr as SeederConstructor, gs as SchemaTableAlterOperation, gt as resolvePrismaType, h as ensureArkormConfigLoading, ha as RuntimeClientLike, hi as ArkormConfig, hn as QueryExecutionException, ho as RelationAggregateInput, hr as SeederCallArgument, hs as SchemaPrimaryKey, ht as resolveMigrationClassName, i as getRuntimeCompatibilityAdapter, ia as QuerySchemaFindManyArgs, ii as RelationLoadPlan, in as rebuildPersistedColumnMappingsState, ir as loadMigrationsFrom, is as MigrationClass, it as deriveSingularFieldName, j as runArkormTransaction, ja as AttributeUpdateInput, ji as DelegateUpdateArgs, jn as MigrationHistoryCommand, jo as FactoryDefinition, jr as AdapterQueryOperation, jt as getLastMigrationRun, k as loadArkormConfig, ka as AttributeSchemaDelegate, ki as DelegateSelect, kn as SeedCommand, ko as FactoryAttributes, kr as AdapterModelIntrospectionOptions, kt as deleteAppliedMigrationsStateFromStore, l as createPrismaDelegateMap, la as QuerySchemaSelect, li as UpdateManySpec, ln as validatePersistedMetadataFeaturesForMigrations, lr as registerModels, ls as SchemaColumn, lt as formatEnumDefaultValue, m as emitRuntimeDebugEvent, ma as RawSelectInput, mi as ArkormBootContext, mn as RelationResolutionException, mo as RelationAggregateConstraint, mr as Seeder, ms as SchemaOperation, mt as resolveEnumName, n as PivotModel, na as PrismaTransactionOptions, ni as RelationAggregateSpec, nn as getPersistedTimestampColumns, nr as getRegisteredSeeders, ns as GenerateMigrationOptions, nt as deriveRelationAlias, o as resolveRuntimeCompatibilityQuerySchemaOrThrow, oa as QuerySchemaOrderBy, oi as SelectSpec, on as resolveColumnMappingsFilePath, or as loadSeedersFrom, os as PrimaryKeyGeneration, ot as findEnumBlock, p as defineConfig, pa as QuerySchemaWhere, pi as AdapterQueryInspection, pn as ScopeNotDefinedException, pr as SEEDER_BRAND, ps as SchemaIndex, pt as pad, q as buildInverseRelationLine, qa as ModelRelationshipResult, qi as PrismaLikeInclude, qn as RegisteredModel, qo as MorphManyRelationMetadata, qr as QueryCondition, qt as PersistedTimestampColumn, r as RuntimeModuleLoader, ra as QuerySchemaCreateData, ri as RelationFilterSpec, rn as readPersistedColumnMappingsState, rr as loadFactoriesFrom, rs as GeneratedMigrationFile, rt as deriveRelationFieldName, s as PrismaDelegateMap, sa as QuerySchemaRow, si as SoftDeleteQueryMode, sn as resolvePersistedMetadataFeatures, sr as registerFactories, ss as PrismaMigrationWorkflowOptions, st as findModelBlock, t as URLDriver, ta as PrismaTransactionContext, ti as RawQuerySpec, tn as getPersistedTableMetadata, tr as getRegisteredPaths, ts as AppliedMigrationsState, tt as deriveInverseRelationAlias, u as inferDelegateName, ua as QuerySchemaUniqueWhere, ui as UpdateSpec, un as writePersistedColumnMappingsState, ur as registerPaths, us as SchemaColumnType, ut as formatRelationAction, v as getDefaultStubsPath, va as SoftDeleteConfig, vi as CastDefinition, vn as ModelNotFoundException, vo as RelationConstraint, vr as PrismaDatabaseAdapter, vs as SchemaTableDropOperation, vt as runPrismaCommand, w as getRuntimePrismaClient, wa as RelationshipModelStatic, wi as DelegateFindManyArgs, wn as Migration, wo as RelationTableLookupSpec, wr as AdapterCapabilities, wt as toModelName, x as getRuntimeDebugHandler, xa as TransactionContext, xi as CastType, xn as ArkormException, xo as RelationMetadataProvider, xr as createPrismaDatabaseAdapter, xt as supportsDatabaseMigrationExecution, y as getRuntimeAdapter, ya as TransactionCallback, yi as CastHandler, yn as MissingDelegateException, yo as RelationDefaultResolver, yr as PrismaDelegateNameMapping, ys as SchemaUniqueConstraint, yt as stripPrismaSchemaModelsAndEnums, z as applyMigrationRollbackToDatabase, za as ModelDeclaredAttributeKey, zi as PaginationCurrentPageResolver, zn as InitCommand, zo as BelongsToManyRelationMetadata, zr as DatabaseRows, zt as resolveMigrationStateFilePath } from "./index-Bn-2R_ax.mjs";
|
|
2
|
+
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, CastDefinition, CastHandler, CastMap, CastType, CliApp, ClientResolver, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EagerLoadConstraint, EagerLoadMap, EnumBuilder, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, GenerateMigrationOptions, GeneratedMigrationFile, GetUserConfig, GlobalScope, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InitCommand, InlineFactory, InsertManySpec, InsertSpec, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PersistedColumnMappingsState, PersistedMetadataFeatures, PersistedPrimaryKeyGeneration, PersistedTableMetadata, PersistedTimestampColumn, PivotModel, PivotModelStatic, PrimaryKeyGeneration, PrimaryKeyGenerationPlanner, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryExecutionException, QueryExecutionExceptionContext, QueryGroupCondition, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RelatedModelClass, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as deletePersistedColumnMappingsState, $t as
|
|
1
|
+
import { $ as deletePersistedColumnMappingsState, $t as runPrismaCommand, A as isDelegateLike, An as UnsupportedAdapterFeatureException, At as buildModelBlock, B as getRegisteredSeeders, Bt as escapeRegex, C as getRuntimeAdapter, Cn as readAppliedMigrationsStateFromStore, Ct as applyMigrationToPrismaSchema, D as getRuntimePaginationURLDriverFactory, Dn as writeAppliedMigrationsState, Dt as buildIndexLine, E as getRuntimePaginationCurrentPageResolver, En as supportsDatabaseMigrationState, Et as buildFieldLine, F as runArkormTransaction, Fn as ArkormException, Ft as deriveCollectionFieldName, G as registerFactories, Gt as formatRelationAction, H as loadMigrationsFrom, Ht as findModelBlock, I as getRegisteredFactories, It as deriveInverseRelationAlias, J as registerPaths, Jt as pad, K as registerMigrations, Kt as generateMigrationFile, L as getRegisteredMigrations, Lt as deriveRelationAlias, M as isTransactionCapableClient, Mt as buildRelationLine, N as loadArkormConfig, Nn as RelationResolutionException, Nt as buildUniqueConstraintLine, O as getRuntimePrismaClient, On as writeAppliedMigrationsStateToStore, Ot as buildInverseRelationLine, P as resetArkormRuntimeForTests, Pn as ArkormCollection, Pt as createMigrationTimestamp, Q as createEmptyPersistedColumnMappingsState, Qt as runMigrationWithPrisma, R as getRegisteredModels, Rt as deriveRelationFieldName, S as getDefaultStubsPath, Sn as readAppliedMigrationsState, St as applyMigrationToDatabase, T as getRuntimeDebugHandler, Tn as resolveMigrationStateFilePath, Tt as buildEnumBlock, U as loadModelsFrom, Ut as formatDefaultValue, V as loadFactoriesFrom, Vt as findEnumBlock, W as loadSeedersFrom, Wt as formatEnumDefaultValue, X as resetRuntimeRegistryForTests, Xt as resolveMigrationClassName, Y as registerSeeders, Yt as resolveEnumName, Z as applyOperationsToPersistedColumnMappingsState, Zt as resolvePrismaType, _ as defineConfig, _n as getLastMigrationRun, _t as applyAlterTableOperation, a as HasOneRelation, an as toModelName, at as getPersistedTimestampColumns, b as getActiveTransactionAdapter, bn as markMigrationApplied, bt as applyMigrationRollbackToDatabase, c as BelongsToRelation, cn as TableBuilder, ct as resetPersistedColumnMappingsCache, d as Relation, dn as buildMigrationIdentity, dt as syncPersistedColumnMappingsFromState, en as stripPrismaSchemaModelsAndEnums, et as getPersistedColumnMap, f as LengthAwarePaginator, fn as buildMigrationRunId, ft as validatePersistedMetadataFeaturesForMigrations, g as configureArkormRuntime, gn as findAppliedMigration, gt as PRISMA_MODEL_REGEX, h as bindAdapterToModels, hn as deleteAppliedMigrationsStateFromStore, ht as PRISMA_ENUM_REGEX, i as HasOneThroughRelation, in as toMigrationFileSlug, it as getPersistedTableMetadata, j as isQuerySchemaLike, jn as SetBasedEagerLoader, jt as buildPrimaryKeyLine, k as getUserConfig, kn as RuntimeModuleLoader, kt as buildMigrationSource, ln as ForeignKeyBuilder, lt as resolveColumnMappingsFilePath, m as URLDriver, mn as createEmptyAppliedMigrationsState, mt as PRISMA_ENUM_MEMBER_REGEX, n as MorphOneRelation, nn as supportsDatabaseMigrationExecution, nt as getPersistedEnumTsType, o as HasManyThroughRelation, on as SchemaBuilder, ot as readPersistedColumnMappingsState, p as Paginator, pn as computeMigrationChecksum, pt as writePersistedColumnMappingsState, q as registerModels, qt as getMigrationPlan, r as MorphManyRelation, rn as supportsDatabaseReset, rt as getPersistedPrimaryKeyGeneration, s as HasManyRelation, sn as EnumBuilder, st as rebuildPersistedColumnMappingsState, t as MorphToManyRelation, tn as supportsDatabaseCreation, tt as getPersistedEnumMap, u as BelongsToManyRelation, un as PrimaryKeyGenerationPlanner, ut as resolvePersistedMetadataFeatures, v as emitRuntimeDebugEvent, vn as getLatestAppliedMigrations, vt as applyCreateTableOperation, w as getRuntimeClient, wn as removeAppliedMigration, wt as applyOperationsToPrismaSchema, x as getActiveTransactionClient, xn as markMigrationRun, xt as applyMigrationRollbackToPrismaSchema, y as ensureArkormConfigLoading, yn as isMigrationApplied, yt as applyDropTableOperation, z as getRegisteredPaths, zt as deriveSingularFieldName } from "./relationship-BkNxySap.mjs";
|
|
2
2
|
import { Pool } from "pg";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { createRequire } from "module";
|
|
@@ -188,6 +188,17 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
188
188
|
const mappedColumns = index.columns.map((column) => this.quoteIdentifier(this.resolveSchemaColumnName(column, columns))).join(", ");
|
|
189
189
|
return `create index if not exists ${this.quoteIdentifier(this.resolveSchemaIndexName(table, index))} on ${this.quoteIdentifier(table)} (${mappedColumns})`;
|
|
190
190
|
}
|
|
191
|
+
buildSchemaPrimaryKeyConstraint(table, primaryKey, columns = []) {
|
|
192
|
+
const name = primaryKey.name?.trim() || `${table}_pkey`;
|
|
193
|
+
const mappedColumns = primaryKey.columns.map((column) => this.quoteIdentifier(this.resolveSchemaColumnName(column, columns))).join(", ");
|
|
194
|
+
return `constraint ${this.quoteIdentifier(name)} primary key (${mappedColumns})`;
|
|
195
|
+
}
|
|
196
|
+
buildSchemaUniqueConstraint(table, constraint, columns = []) {
|
|
197
|
+
const mappedColumnNames = constraint.columns.map((column) => this.resolveSchemaColumnName(column, columns));
|
|
198
|
+
const name = constraint.name?.trim() || `${table}_${mappedColumnNames.join("_")}_key`;
|
|
199
|
+
const mappedColumns = mappedColumnNames.map((column) => this.quoteIdentifier(column)).join(", ");
|
|
200
|
+
return `constraint ${this.quoteIdentifier(name)} unique (${mappedColumns})`;
|
|
201
|
+
}
|
|
191
202
|
async ensureEnumTypes(table, columns, executor = this.db) {
|
|
192
203
|
for (const column of columns) {
|
|
193
204
|
if (column.type !== "enum") continue;
|
|
@@ -208,8 +219,15 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
208
219
|
const table = this.resolveMappedTable(operation.table);
|
|
209
220
|
await this.ensureEnumTypes(table, operation.columns, executor);
|
|
210
221
|
const columnDefinitions = operation.columns.map((column) => this.buildSchemaColumnDefinition(table, column));
|
|
222
|
+
const primaryKeys = operation.primaryKey ? [this.buildSchemaPrimaryKeyConstraint(table, operation.primaryKey, operation.columns)] : [];
|
|
223
|
+
const uniqueConstraints = (operation.uniqueConstraints ?? []).map((constraint) => this.buildSchemaUniqueConstraint(table, constraint, operation.columns));
|
|
211
224
|
const foreignKeys = (operation.foreignKeys ?? []).map((foreignKey) => this.buildSchemaForeignKeyConstraint(table, foreignKey, operation.columns));
|
|
212
|
-
const definitions = [
|
|
225
|
+
const definitions = [
|
|
226
|
+
...columnDefinitions,
|
|
227
|
+
...primaryKeys,
|
|
228
|
+
...uniqueConstraints,
|
|
229
|
+
...foreignKeys
|
|
230
|
+
].join(", ");
|
|
213
231
|
await this.executeRawStatement(`create table if not exists ${this.quoteIdentifier(table)} (${definitions})`, executor);
|
|
214
232
|
for (const index of operation.indexes ?? []) await this.executeRawStatement(this.buildSchemaIndexStatement(table, index, operation.columns), executor);
|
|
215
233
|
}
|
|
@@ -219,6 +237,8 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
219
237
|
for (const column of operation.addColumns) await this.executeRawStatement(`alter table ${this.quoteIdentifier(table)} add column if not exists ${this.buildSchemaColumnDefinition(table, column)}`, executor);
|
|
220
238
|
for (const column of operation.dropColumns) await this.executeRawStatement(`alter table ${this.quoteIdentifier(table)} drop column if exists ${this.quoteIdentifier(column)}`, executor);
|
|
221
239
|
for (const foreignKey of operation.addForeignKeys ?? []) await this.executeRawStatement(`alter table ${this.quoteIdentifier(table)} add ${this.buildSchemaForeignKeyConstraint(table, foreignKey, operation.addColumns)}`, executor);
|
|
240
|
+
if (operation.addPrimaryKey) await this.executeRawStatement(`alter table ${this.quoteIdentifier(table)} add ${this.buildSchemaPrimaryKeyConstraint(table, operation.addPrimaryKey, operation.addColumns)}`, executor);
|
|
241
|
+
for (const constraint of operation.addUniqueConstraints ?? []) await this.executeRawStatement(`alter table ${this.quoteIdentifier(table)} add ${this.buildSchemaUniqueConstraint(table, constraint, operation.addColumns)}`, executor);
|
|
222
242
|
for (const index of operation.addIndexes ?? []) await this.executeRawStatement(this.buildSchemaIndexStatement(table, index, operation.addColumns), executor);
|
|
223
243
|
}
|
|
224
244
|
async executeDropTableOperation(operation, executor) {
|
|
@@ -8003,4 +8023,4 @@ var PivotModel = class extends Model {
|
|
|
8003
8023
|
};
|
|
8004
8024
|
|
|
8005
8025
|
//#endregion
|
|
8006
|
-
export { Arkorm, ArkormCollection, ArkormException, Arkormx, 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 };
|
|
8026
|
+
export { Arkorm, ArkormCollection, ArkormException, Arkormx, 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, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, 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-
|
|
2
|
+
const require_relationship = require('../relationship-CuPNAoHm.cjs');
|
|
3
3
|
|
|
4
4
|
exports.BelongsToManyRelation = require_relationship.BelongsToManyRelation;
|
|
5
5
|
exports.BelongsToRelation = require_relationship.BelongsToRelation;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ao as HasOneThroughRelation, co as HasManyRelation, do as BelongsToManyRelation, fo as Relation, io as MorphManyRelation, lo as BelongsToRelation, no as MorphToManyRelation, oo as HasOneRelation, po as RelationTableLoader, ro as MorphOneRelation, so as HasManyThroughRelation, to as SetBasedEagerLoader, uo as SingleResultRelation } from "../index-DKqMpR3p.cjs";
|
|
2
2
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ao as HasOneThroughRelation, co as HasManyRelation, do as BelongsToManyRelation, fo as Relation, io as MorphManyRelation, lo as BelongsToRelation, no as MorphToManyRelation, oo as HasOneRelation, po as RelationTableLoader, ro as MorphOneRelation, so as HasManyThroughRelation, to as SetBasedEagerLoader, uo as SingleResultRelation } from "../index-Bn-2R_ax.mjs";
|
|
2
2
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mn as RelationTableLoader, a as HasOneRelation, c as BelongsToRelation, d as Relation, i as HasOneThroughRelation, jn 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-BkNxySap.mjs";
|
|
2
2
|
|
|
3
3
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|
|
@@ -1018,18 +1018,21 @@ var TableBuilder = class {
|
|
|
1018
1018
|
this.dropColumnNames = [];
|
|
1019
1019
|
this.indexes = [];
|
|
1020
1020
|
this.foreignKeys = [];
|
|
1021
|
+
this.compositeUniqueConstraints = [];
|
|
1021
1022
|
}
|
|
1022
|
-
/**
|
|
1023
|
-
* Defines a primary key column in the table.
|
|
1024
|
-
*
|
|
1025
|
-
* @param columnNameOrOptions
|
|
1026
|
-
* @param options
|
|
1027
|
-
* @returns
|
|
1028
|
-
*/
|
|
1029
1023
|
primary(columnNameOrOptions, options) {
|
|
1024
|
+
if (Array.isArray(columnNameOrOptions)) {
|
|
1025
|
+
const columns = this.normalizeCompositeColumns(columnNameOrOptions, "primary key");
|
|
1026
|
+
if (this.compositePrimaryKey) throw new Error("A composite primary key has already been defined for this table.");
|
|
1027
|
+
this.compositePrimaryKey = {
|
|
1028
|
+
columns,
|
|
1029
|
+
...typeof options === "string" && options.trim() ? { name: options.trim() } : {}
|
|
1030
|
+
};
|
|
1031
|
+
return this;
|
|
1032
|
+
}
|
|
1030
1033
|
const config = typeof columnNameOrOptions === "string" ? {
|
|
1031
1034
|
columnName: columnNameOrOptions,
|
|
1032
|
-
...options
|
|
1035
|
+
...typeof options === "object" ? options : {}
|
|
1033
1036
|
} : columnNameOrOptions ?? {};
|
|
1034
1037
|
const column = this.resolveColumn(config.columnName);
|
|
1035
1038
|
column.primary = true;
|
|
@@ -1129,15 +1132,19 @@ var TableBuilder = class {
|
|
|
1129
1132
|
float(name, options = {}) {
|
|
1130
1133
|
return this.column(name, "float", options);
|
|
1131
1134
|
}
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1135
|
+
unique(columnsOrName, name) {
|
|
1136
|
+
if (Array.isArray(columnsOrName)) {
|
|
1137
|
+
const columns = this.normalizeCompositeColumns(columnsOrName, "unique constraint");
|
|
1138
|
+
const normalizedName = name?.trim();
|
|
1139
|
+
if (this.compositeUniqueConstraints.find((constraint) => constraint.columns.length === columns.length && constraint.columns.every((column, index) => column === columns[index]))) throw new Error(`A unique constraint for columns [${columns.join(", ")}] has already been defined for this table.`);
|
|
1140
|
+
if (normalizedName && this.compositeUniqueConstraints.some((constraint) => constraint.name === normalizedName)) throw new Error(`A unique constraint named [${normalizedName}] has already been defined for this table.`);
|
|
1141
|
+
this.compositeUniqueConstraints.push({
|
|
1142
|
+
columns,
|
|
1143
|
+
...normalizedName ? { name: normalizedName } : {}
|
|
1144
|
+
});
|
|
1145
|
+
return this;
|
|
1146
|
+
}
|
|
1147
|
+
const column = this.resolveColumn(columnsOrName);
|
|
1141
1148
|
column.unique = true;
|
|
1142
1149
|
return this;
|
|
1143
1150
|
}
|
|
@@ -1379,6 +1386,24 @@ var TableBuilder = class {
|
|
|
1379
1386
|
return this.foreignKeys.map((foreignKey) => ({ ...foreignKey }));
|
|
1380
1387
|
}
|
|
1381
1388
|
/**
|
|
1389
|
+
* Returns a copy of the table-level composite primary key.
|
|
1390
|
+
*/
|
|
1391
|
+
getPrimaryKey() {
|
|
1392
|
+
return this.compositePrimaryKey ? {
|
|
1393
|
+
...this.compositePrimaryKey,
|
|
1394
|
+
columns: [...this.compositePrimaryKey.columns]
|
|
1395
|
+
} : void 0;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* Returns copies of table-level composite unique constraints.
|
|
1399
|
+
*/
|
|
1400
|
+
getUniqueConstraints() {
|
|
1401
|
+
return this.compositeUniqueConstraints.map((constraint) => ({
|
|
1402
|
+
...constraint,
|
|
1403
|
+
columns: [...constraint.columns]
|
|
1404
|
+
}));
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1382
1407
|
* Defines a column in the table with the given name.
|
|
1383
1408
|
*
|
|
1384
1409
|
* @param name The name of the column.
|
|
@@ -1420,6 +1445,13 @@ var TableBuilder = class {
|
|
|
1420
1445
|
if (!column) throw new Error(`Column [${targetName}] was not found in the table definition.`);
|
|
1421
1446
|
return column;
|
|
1422
1447
|
}
|
|
1448
|
+
normalizeCompositeColumns(columns, label) {
|
|
1449
|
+
const normalized = columns.map((column) => column.trim());
|
|
1450
|
+
if (normalized.length < 2) throw new Error(`A composite ${label} must contain at least two columns.`);
|
|
1451
|
+
if (normalized.some((column) => !column)) throw new Error(`Composite ${label} columns must be non-empty strings.`);
|
|
1452
|
+
if (new Set(normalized).size !== normalized.length) throw new Error(`Composite ${label} columns must be unique.`);
|
|
1453
|
+
return normalized;
|
|
1454
|
+
}
|
|
1423
1455
|
};
|
|
1424
1456
|
|
|
1425
1457
|
//#endregion
|
|
@@ -1445,12 +1477,17 @@ var SchemaBuilder = class {
|
|
|
1445
1477
|
createTable(table, callback) {
|
|
1446
1478
|
const builder = new TableBuilder();
|
|
1447
1479
|
callback(builder);
|
|
1480
|
+
const primaryKey = builder.getPrimaryKey();
|
|
1481
|
+
this.validateCompositePrimaryKey(table, primaryKey, builder.getColumns(), true);
|
|
1482
|
+
this.validateCompositeUniqueConstraints(table, builder.getUniqueConstraints(), builder.getColumns(), true);
|
|
1448
1483
|
this.operations.push({
|
|
1449
1484
|
type: "createTable",
|
|
1450
1485
|
table,
|
|
1451
1486
|
columns: builder.getColumns(),
|
|
1452
1487
|
indexes: builder.getIndexes(),
|
|
1453
|
-
foreignKeys: builder.getForeignKeys()
|
|
1488
|
+
foreignKeys: builder.getForeignKeys(),
|
|
1489
|
+
primaryKey,
|
|
1490
|
+
uniqueConstraints: builder.getUniqueConstraints()
|
|
1454
1491
|
});
|
|
1455
1492
|
return this;
|
|
1456
1493
|
}
|
|
@@ -1464,13 +1501,18 @@ var SchemaBuilder = class {
|
|
|
1464
1501
|
alterTable(table, callback) {
|
|
1465
1502
|
const builder = new TableBuilder();
|
|
1466
1503
|
callback(builder);
|
|
1504
|
+
const primaryKey = builder.getPrimaryKey();
|
|
1505
|
+
this.validateCompositePrimaryKey(table, primaryKey, builder.getColumns(), false);
|
|
1506
|
+
this.validateCompositeUniqueConstraints(table, builder.getUniqueConstraints(), builder.getColumns(), false);
|
|
1467
1507
|
this.operations.push({
|
|
1468
1508
|
type: "alterTable",
|
|
1469
1509
|
table,
|
|
1470
1510
|
addColumns: builder.getColumns(),
|
|
1471
1511
|
dropColumns: builder.getDropColumns(),
|
|
1472
1512
|
addIndexes: builder.getIndexes(),
|
|
1473
|
-
addForeignKeys: builder.getForeignKeys()
|
|
1513
|
+
addForeignKeys: builder.getForeignKeys(),
|
|
1514
|
+
addPrimaryKey: primaryKey,
|
|
1515
|
+
addUniqueConstraints: builder.getUniqueConstraints()
|
|
1474
1516
|
});
|
|
1475
1517
|
return this;
|
|
1476
1518
|
}
|
|
@@ -1504,7 +1546,15 @@ var SchemaBuilder = class {
|
|
|
1504
1546
|
...index,
|
|
1505
1547
|
columns: [...index.columns]
|
|
1506
1548
|
})),
|
|
1507
|
-
foreignKeys: operation.foreignKeys.map((foreignKey) => ({ ...foreignKey }))
|
|
1549
|
+
foreignKeys: operation.foreignKeys.map((foreignKey) => ({ ...foreignKey })),
|
|
1550
|
+
primaryKey: operation.primaryKey ? {
|
|
1551
|
+
...operation.primaryKey,
|
|
1552
|
+
columns: [...operation.primaryKey.columns]
|
|
1553
|
+
} : void 0,
|
|
1554
|
+
uniqueConstraints: operation.uniqueConstraints?.map((constraint) => ({
|
|
1555
|
+
...constraint,
|
|
1556
|
+
columns: [...constraint.columns]
|
|
1557
|
+
}))
|
|
1508
1558
|
};
|
|
1509
1559
|
if (operation.type === "alterTable") return {
|
|
1510
1560
|
...operation,
|
|
@@ -1517,11 +1567,37 @@ var SchemaBuilder = class {
|
|
|
1517
1567
|
...index,
|
|
1518
1568
|
columns: [...index.columns]
|
|
1519
1569
|
})),
|
|
1520
|
-
addForeignKeys: operation.addForeignKeys.map((foreignKey) => ({ ...foreignKey }))
|
|
1570
|
+
addForeignKeys: operation.addForeignKeys.map((foreignKey) => ({ ...foreignKey })),
|
|
1571
|
+
addPrimaryKey: operation.addPrimaryKey ? {
|
|
1572
|
+
...operation.addPrimaryKey,
|
|
1573
|
+
columns: [...operation.addPrimaryKey.columns]
|
|
1574
|
+
} : void 0,
|
|
1575
|
+
addUniqueConstraints: operation.addUniqueConstraints?.map((constraint) => ({
|
|
1576
|
+
...constraint,
|
|
1577
|
+
columns: [...constraint.columns]
|
|
1578
|
+
}))
|
|
1521
1579
|
};
|
|
1522
1580
|
return { ...operation };
|
|
1523
1581
|
});
|
|
1524
1582
|
}
|
|
1583
|
+
validateCompositePrimaryKey(table, primaryKey, columns, requireColumns) {
|
|
1584
|
+
if (!primaryKey) return;
|
|
1585
|
+
if (columns.some((column) => column.primary)) throw new Error(`Table [${table}] cannot combine column primary keys with a composite primary key.`);
|
|
1586
|
+
if (!requireColumns) return;
|
|
1587
|
+
primaryKey.columns.forEach((columnName) => {
|
|
1588
|
+
const column = columns.find((candidate) => candidate.name === columnName);
|
|
1589
|
+
if (!column) throw new Error(`Composite primary key column [${columnName}] was not found on table [${table}].`);
|
|
1590
|
+
if (column.nullable) throw new Error(`Composite primary key column [${columnName}] on table [${table}] cannot be nullable.`);
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1593
|
+
validateCompositeUniqueConstraints(table, constraints, columns, requireColumns) {
|
|
1594
|
+
if (!requireColumns) return;
|
|
1595
|
+
constraints.forEach((constraint) => {
|
|
1596
|
+
constraint.columns.forEach((columnName) => {
|
|
1597
|
+
if (!columns.some((column) => column.name === columnName)) throw new Error(`Composite unique constraint column [${columnName}] was not found on table [${table}].`);
|
|
1598
|
+
});
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1525
1601
|
};
|
|
1526
1602
|
|
|
1527
1603
|
//#endregion
|
|
@@ -1745,6 +1821,24 @@ const buildIndexLine = (index) => {
|
|
|
1745
1821
|
return ` @@index([${index.columns.join(", ")}]${typeof index.name === "string" && index.name.trim().length > 0 ? `, name: "${index.name.replace(/"/g, "\\\"")}"` : ""})`;
|
|
1746
1822
|
};
|
|
1747
1823
|
/**
|
|
1824
|
+
* Build a Prisma model-level composite primary key definition.
|
|
1825
|
+
*
|
|
1826
|
+
* @param primaryKey
|
|
1827
|
+
* @returns
|
|
1828
|
+
*/
|
|
1829
|
+
const buildPrimaryKeyLine = (primaryKey) => {
|
|
1830
|
+
return ` @@id([${primaryKey.columns.join(", ")}]${typeof primaryKey.name === "string" && primaryKey.name.trim().length > 0 ? `, name: "${primaryKey.name.replace(/"/g, "\\\"")}"` : ""})`;
|
|
1831
|
+
};
|
|
1832
|
+
/**
|
|
1833
|
+
* Build a Prisma model-level composite unique constraint definition.
|
|
1834
|
+
*
|
|
1835
|
+
* @param constraint
|
|
1836
|
+
* @returns
|
|
1837
|
+
*/
|
|
1838
|
+
const buildUniqueConstraintLine = (constraint) => {
|
|
1839
|
+
return ` @@unique([${constraint.columns.join(", ")}]${typeof constraint.name === "string" && constraint.name.trim().length > 0 ? `, name: "${constraint.name.replace(/"/g, "\\\"")}"` : ""})`;
|
|
1840
|
+
};
|
|
1841
|
+
/**
|
|
1748
1842
|
* Derive a relation field name from a foreign key column name by applying
|
|
1749
1843
|
* common conventions, such as removing "Id" suffixes and converting to camelCase.
|
|
1750
1844
|
*
|
|
@@ -1893,7 +1987,14 @@ const buildModelBlock = (operation) => {
|
|
|
1893
1987
|
const mapped = operation.table !== modelName.toLowerCase();
|
|
1894
1988
|
const fields = operation.columns.map(buildFieldLine);
|
|
1895
1989
|
const relations = (operation.foreignKeys ?? []).map((foreignKey) => buildRelationLine(modelName, foreignKey, operation.columns));
|
|
1896
|
-
const
|
|
1990
|
+
const indexes = (operation.indexes ?? []).map(buildIndexLine);
|
|
1991
|
+
const uniqueConstraints = (operation.uniqueConstraints ?? []).map(buildUniqueConstraintLine);
|
|
1992
|
+
const metadata = [
|
|
1993
|
+
...operation.primaryKey ? [buildPrimaryKeyLine(operation.primaryKey)] : [],
|
|
1994
|
+
...uniqueConstraints,
|
|
1995
|
+
...indexes,
|
|
1996
|
+
...mapped ? [` @@map("${str(operation.table).snake()}")`] : []
|
|
1997
|
+
];
|
|
1897
1998
|
return `model ${modelName} {\n${(metadata.length > 0 ? [
|
|
1898
1999
|
...fields,
|
|
1899
2000
|
...relations,
|
|
@@ -1990,6 +2091,18 @@ const applyAlterTableOperation = (schema, operation) => {
|
|
|
1990
2091
|
const insertIndex = Math.max(1, bodyLines.length - 1);
|
|
1991
2092
|
bodyLines.splice(insertIndex, 0, indexLine);
|
|
1992
2093
|
});
|
|
2094
|
+
if (operation.addPrimaryKey) {
|
|
2095
|
+
const primaryKeyLine = buildPrimaryKeyLine(operation.addPrimaryKey);
|
|
2096
|
+
if (bodyLines.some((line) => line.includes(" @id") || line.trim().startsWith("@@id("))) throw new ArkormException(`Prisma model for table [${operation.table}] already defines a primary key.`);
|
|
2097
|
+
const insertIndex = Math.max(1, bodyLines.length - 1);
|
|
2098
|
+
bodyLines.splice(insertIndex, 0, primaryKeyLine);
|
|
2099
|
+
}
|
|
2100
|
+
for (const constraint of operation.addUniqueConstraints ?? []) {
|
|
2101
|
+
const constraintLine = buildUniqueConstraintLine(constraint);
|
|
2102
|
+
if (bodyLines.some((line) => line.trim() === constraintLine.trim())) continue;
|
|
2103
|
+
const insertIndex = Math.max(1, bodyLines.length - 1);
|
|
2104
|
+
bodyLines.splice(insertIndex, 0, constraintLine);
|
|
2105
|
+
}
|
|
1993
2106
|
for (const foreignKey of operation.addForeignKeys ?? []) {
|
|
1994
2107
|
const relationLine = buildRelationLine(model.modelName, foreignKey, operation.addColumns);
|
|
1995
2108
|
const relationRegex = new RegExp(`^\\s*${escapeRegex(foreignKey.fieldAlias?.trim() || deriveRelationFieldName(foreignKey.column))}\\s+`);
|
|
@@ -4866,4 +4979,4 @@ var MorphToManyRelation = class extends Relation {
|
|
|
4866
4979
|
};
|
|
4867
4980
|
|
|
4868
4981
|
//#endregion
|
|
4869
|
-
export { deletePersistedColumnMappingsState as $,
|
|
4982
|
+
export { deletePersistedColumnMappingsState as $, runPrismaCommand as $t, isDelegateLike as A, UnsupportedAdapterFeatureException as An, buildModelBlock as At, getRegisteredSeeders as B, escapeRegex as Bt, getRuntimeAdapter as C, readAppliedMigrationsStateFromStore as Cn, applyMigrationToPrismaSchema as Ct, getRuntimePaginationURLDriverFactory as D, writeAppliedMigrationsState as Dn, buildIndexLine as Dt, getRuntimePaginationCurrentPageResolver as E, supportsDatabaseMigrationState as En, buildFieldLine as Et, runArkormTransaction as F, ArkormException as Fn, deriveCollectionFieldName as Ft, registerFactories as G, formatRelationAction as Gt, loadMigrationsFrom as H, findModelBlock as Ht, getRegisteredFactories as I, deriveInverseRelationAlias as It, registerPaths as J, pad as Jt, registerMigrations as K, generateMigrationFile as Kt, getRegisteredMigrations as L, deriveRelationAlias as Lt, isTransactionCapableClient as M, RelationTableLoader as Mn, buildRelationLine as Mt, loadArkormConfig as N, RelationResolutionException as Nn, buildUniqueConstraintLine as Nt, getRuntimePrismaClient as O, writeAppliedMigrationsStateToStore as On, buildInverseRelationLine as Ot, resetArkormRuntimeForTests as P, ArkormCollection as Pn, createMigrationTimestamp as Pt, createEmptyPersistedColumnMappingsState as Q, runMigrationWithPrisma as Qt, getRegisteredModels as R, deriveRelationFieldName as Rt, getDefaultStubsPath as S, readAppliedMigrationsState as Sn, applyMigrationToDatabase as St, getRuntimeDebugHandler as T, resolveMigrationStateFilePath as Tn, buildEnumBlock as Tt, loadModelsFrom as U, formatDefaultValue as Ut, loadFactoriesFrom as V, findEnumBlock as Vt, loadSeedersFrom as W, formatEnumDefaultValue as Wt, resetRuntimeRegistryForTests as X, resolveMigrationClassName as Xt, registerSeeders as Y, resolveEnumName as Yt, applyOperationsToPersistedColumnMappingsState as Z, resolvePrismaType as Zt, defineConfig as _, getLastMigrationRun as _n, applyAlterTableOperation as _t, HasOneRelation as a, toModelName as an, getPersistedTimestampColumns as at, getActiveTransactionAdapter as b, markMigrationApplied as bn, applyMigrationRollbackToDatabase as bt, BelongsToRelation as c, TableBuilder as cn, resetPersistedColumnMappingsCache as ct, Relation as d, buildMigrationIdentity as dn, syncPersistedColumnMappingsFromState as dt, stripPrismaSchemaModelsAndEnums as en, getPersistedColumnMap as et, LengthAwarePaginator as f, buildMigrationRunId as fn, validatePersistedMetadataFeaturesForMigrations as ft, configureArkormRuntime as g, findAppliedMigration as gn, PRISMA_MODEL_REGEX as gt, bindAdapterToModels as h, deleteAppliedMigrationsStateFromStore as hn, PRISMA_ENUM_REGEX as ht, HasOneThroughRelation as i, toMigrationFileSlug as in, getPersistedTableMetadata as it, isQuerySchemaLike as j, SetBasedEagerLoader as jn, buildPrimaryKeyLine as jt, getUserConfig as k, RuntimeModuleLoader as kn, buildMigrationSource as kt, SingleResultRelation as l, ForeignKeyBuilder as ln, resolveColumnMappingsFilePath as lt, URLDriver as m, createEmptyAppliedMigrationsState as mn, PRISMA_ENUM_MEMBER_REGEX as mt, MorphOneRelation as n, supportsDatabaseMigrationExecution as nn, getPersistedEnumTsType as nt, HasManyThroughRelation as o, SchemaBuilder as on, readPersistedColumnMappingsState as ot, Paginator as p, computeMigrationChecksum as pn, writePersistedColumnMappingsState as pt, registerModels as q, getMigrationPlan as qt, MorphManyRelation as r, supportsDatabaseReset as rn, getPersistedPrimaryKeyGeneration as rt, HasManyRelation as s, EnumBuilder as sn, rebuildPersistedColumnMappingsState as st, MorphToManyRelation as t, supportsDatabaseCreation as tn, getPersistedEnumMap as tt, BelongsToManyRelation as u, PrimaryKeyGenerationPlanner as un, resolvePersistedMetadataFeatures as ut, emitRuntimeDebugEvent as v, getLatestAppliedMigrations as vn, applyCreateTableOperation as vt, getRuntimeClient as w, removeAppliedMigration as wn, applyOperationsToPrismaSchema as wt, getActiveTransactionClient as x, markMigrationRun as xn, applyMigrationRollbackToPrismaSchema as xt, ensureArkormConfigLoading as y, isMigrationApplied as yn, applyDropTableOperation as yt, getRegisteredPaths as z, deriveSingularFieldName as zt };
|