arkormx 2.11.1 → 2.11.3
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 +262 -44
- package/dist/{index-43R9yWVX.d.mts → index-KPekH7gI.d.mts} +67 -1
- package/dist/{index-DLNIbeRi.d.cts → index-WJEmy3Yu.d.cts} +67 -1
- package/dist/index.cjs +187 -49
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +185 -50
- 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-CP1xbMOa.mjs → relationship-4S2yHPIH.mjs} +67 -1
- package/dist/{relationship-IC-TAFyG.cjs → relationship-CQbj9Ahg.cjs} +78 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as buildRelationLine, $a as GroupByAggregateSpec, $i as DelegateUniqueWhere, $n as RuntimePathInput, $r as QueryDayCondition, $s as JsonExpressionNode, $t as getPersistedColumnMap, A as isTransactionCapableClient, Aa as QuerySchemaOrderBy, Ac as SchemaColumn, Ai as SoftDeleteQueryMode, An as GeneratedColumnExpression, Ao as AggregateExpression, Ar as AdapterDatabaseCreationResult, As as JoinClause, At as createEmptyAppliedMigrationsState, B as applyDropTableOperation, Ba as Serializable, Bc as SchemaUniqueConstraint, Bi as ArkormDebugHandler, Bn as MakeModelCommand, Bo as expressionBuilder, Br as DatabaseAdapter, Bs as FactoryRelationshipResolver, Bt as removeAppliedMigration, C as getRuntimeDebugHandler, Ca as PrismaTransactionCallback, Cc as GenerateMigrationOptions, Ci as QueryTimeCondition, Cn as ArkormException, Co as ModelRelationshipResult, Cr as PrismaDelegateNameMapping, Cs as RelationTableLookupSpec, Ct as supportsDatabaseMigrationExecution, D as getUserConfig, Da as QuerySchemaCreateData, Dc as PrimaryKeyGeneration, Di as RelationLoadPlan, Dn as SchemaBuilder, Do as QuerySchemaForModelInstance, Dr as createKyselyAdapter, Ds as RelatedModelForRelationship, Dt as buildMigrationIdentity, E as getRuntimePrismaClient, Ea as PrismaTransactionOptions, Ec as MigrationInstanceLike, Ei as RelationFilterSpec, En as Migration, Eo as QuerySchemaForModel, Er as KyselyDatabaseAdapter, Es as JoinSource, Et as toModelName, F as PRISMA_ENUM_MEMBER_REGEX, Fa as QuerySchemaUpdateArgs, Fc as SchemaOperation, Fi as AdapterBindableModel, Fn as MigrationHistoryCommand, Fo as avg, Fr as AdapterQueryOperation, Fs as FactoryAttributes, Ft as isMigrationApplied, G as applyOperationsToPrismaSchema, Ga as TransactionContext, Gi as ClientResolver, Gn as resolveCast, Go as min, Gr as DeleteManySpec, Gs as CaseExpressionBranch, Gt as PersistedColumnMappingsState, H as applyMigrationRollbackToPrismaSchema, Ha as SoftDeleteConfig, Hc as TimestampNames, Hi as CastHandler, Hn as MakeFactoryCommand, Ho as fromExpressionNode, Hr as DatabaseRow, Hs as MaybePromise, Ht as supportsDatabaseMigrationState, I as PRISMA_ENUM_REGEX, Ia as QuerySchemaUpdateData, Ic as SchemaPrimaryKey, Ii as AdapterQueryInspection, In as MigrateRollbackCommand, Io as caseWhen, Ir as AdapterTransactionContext, Is as FactoryCallback, It as markMigrationApplied, J as buildIndexLine, Ja as RelationshipModelStatic, Ji as DelegateInclude, Jn as Arkorm, Jo as val, Jr as InsertSpec, Js as ExpressionBinaryOperator, Jt as PersistedTableMetadata, K as buildEnumBlock, Ka as TransactionOptions, Ki as DelegateCreateData, Kn as Attribute, Ko as raw, Kr as DeleteSpec, Ks as CaseExpressionNode, Kt as PersistedMetadataFeatures, L as PRISMA_MODEL_REGEX, La as QuerySchemaWhere, Lc as SchemaTableAlterOperation, Li as ArkormBootContext, Ln as MigrateFreshCommand, Lo as coalesce, Lr as AggregateOperation, Ls as FactoryDefinition, Lt as markMigrationRun, M as resetArkormRuntimeForTests, Ma as QuerySchemaRows, Mc as SchemaForeignKey, Mi as UpdateManySpec, Mn as ForeignKeyBuilder, Mo as Expression, Mr as AdapterModelFieldStructure, Ms as Paginator, Mt as findAppliedMigration, N as runArkormTransaction, Na as QuerySchemaSelect, Nc as SchemaForeignKeyAction, Ni as UpdateSpec, Nn as SeedCommand, No as ExpressionBuilder, Nr as AdapterModelIntrospectionOptions, Ns as ArkormCollection, Nt as getLastMigrationRun, O as isDelegateLike, Oa as QuerySchemaFindManyArgs, Oc as PrismaMigrationWorkflowOptions, Oi as RelationLoadSpec, On as EnumBuilder, Oo as RelatedModelClass, Or as AdapterCapabilities, Os as RelatedModelFromResult, Ot as buildMigrationRunId, P as PrimaryKeyGenerationPlanner, Pa as QuerySchemaUniqueWhere, Pc as SchemaIndex, Pi as UpsertSpec, Pn as ModelsSyncCommand, Po as JsonExpression, Pr as AdapterModelStructure, Ps as FactoryAttributeResolver, Pt as getLatestAppliedMigrations, Q as buildPrimaryKeyLine, Qa as GroupByAggregateRow, Qi as DelegateSelect, Qn as RuntimeConstructor, Qo as defineFactory, Qr as QueryCondition, Qs as InExpressionNode, Qt as deletePersistedColumnMappingsState, R as applyAlterTableOperation, Ra as RawSelectInput, Rc as SchemaTableCreateOperation, Ri as ArkormConfig, Rn as MigrateCommand, Ro as col, Rr as AggregateSelection, Rs as FactoryDefinitionAttributes, Rt as readAppliedMigrationsState, S as getRuntimeClient, Sa as PrismaLikeWhereInput, Sc as AppliedMigrationsState, Si as QueryTarget, Sn as ArkormErrorContext, So as ModelRelationshipKey, Sr as PrismaDatabaseAdapter, Ss as RelationResultCache, St as supportsDatabaseCreation, T as getRuntimePaginationURLDriverFactory, Ta as PrismaTransactionContext, Tc as MigrationClass, Ti as RelationAggregateSpec, Tn as MIGRATION_BRAND, To as ModelWhereInput, Tr as createPrismaDatabaseAdapter, Ts as JoinOn, Tt as toMigrationFileSlug, U as applyMigrationToDatabase, Ua as TransactionCallback, Uc as TimestampNaming, Ui as CastMap, Un as InitCommand, Uo as json, Ur as DatabaseRows, Us as AggregateExpressionNode, Ut as writeAppliedMigrationsState, V as applyMigrationRollbackToDatabase, Va as SimplePaginationMeta, Vc as TimestampColumnBehavior, Vi as CastDefinition, Vn as MakeMigrationCommand, Vo as fn, Vr as DatabasePrimitive, Vs as FactoryState, Vt as resolveMigrationStateFilePath, W as applyMigrationToPrismaSchema, Wa as TransactionCapableClient, Wi as CastType, Wn as CliApp, Wo as max, Wr as DatabaseValue, Ws as BinaryExpressionNode, Wt as writeAppliedMigrationsStateToStore, X as buildMigrationSource, Xa as EachCallback, Xi as DelegateRow, Xn as RegisteredFactory, Xo as InlineFactory, Xr as QueryComparisonCondition, Xs as ExpressionNode, Xt as applyOperationsToPersistedColumnMappingsState, Y as buildInverseRelationLine, Ya as ChunkCallback, Yi as DelegateOrderBy, Yn as Arkormx, Yo as where, Yr as QueryColumnComparisonCondition, Ys as ExpressionJsonCast, Yt as PersistedTimestampColumn, Z as buildModelBlock, Za as ExpressionSelectMap, Zi as DelegateRows, Zn as RegisteredModel, Zo as ModelFactory, Zr as QueryComparisonOperator, Zs as FunctionExpressionNode, Zt as createEmptyPersistedColumnMappingsState, _ as ensureArkormConfigLoading, _a as PrismaLikeInclude, _c as PivotModelStatic, _i as QueryNotCondition, _n as QueryExecutionException, _o as ModelEventHandlerConstructor, _r as SEEDER_BRAND, _s as RelationConstraint, _t as resolveMigrationClassName, a as getRuntimeCompatibilityAdapter, aa as GetUserConfig, ac as BelongsToManyRelationMetadata, ai as QueryJoin, an as readPersistedColumnMappingsState, ao as AttributeSelect, ar as getRegisteredPaths, at as deriveRelationFieldName, b as getDefaultStubsPath, ba as PrismaLikeSelect, bc as AppliedMigrationEntry, bi as QueryScalarComparisonOperator, bn as ModelNotFoundException, bo as ModelLifecycleState, br as SeederConstructor, bs as RelationMetadataProvider, bt as runPrismaCommand, c as PrismaDelegateMap, ca as NamingCase, cc as HasManyRelationMetadata, ci as QueryJoinConstraint, cn as resolveColumnMappingsFilePath, co as DelegateForModelSchema, cr as loadMigrationsFrom, ct as findEnumBlock, d as inferDelegateName, da as PaginationOptions, dc as HasOneThroughRelationMetadata, di as QueryJoinRawConstraint, dn as validatePersistedMetadataFeaturesForMigrations, do as ModelAttributes, dr as registerFactories, dt as formatEnumDefaultValue, ea as DelegateUpdateArgs, ec as NullCheckExpressionNode, ei as QueryExistsCondition, en as getPersistedEnumMap, eo as QueryBuilder, er as RuntimePathKey, et as buildUniqueConstraintLine, f as awaitConfiguredModelsRegistration, fa as PaginationURLDriver, fc as ModelMetadata, fi as QueryJoinType, fn as writePersistedColumnMappingsState, fo as ModelAttributesOf, fr as registerMigrations, ft as formatRelationAction, g as emitRuntimeDebugEvent, ga as PrismaFindManyArgsLike, gc as MorphToRelationMetadata, gi as QueryLogicalOperator, gn as RelationResolutionException, go as ModelEventHandler, gr as resetRuntimeRegistryForTests, gs as RelationColumnLookupSpec, gt as resolveEnumName, h as defineConfig, ha as PrismaDelegateLike, hc as MorphToManyRelationMetadata, hi as QueryJsonConditionKind, hn as ScopeNotDefinedException, ho as ModelEventDispatcher, hr as registerSeeders, hs as RelationAggregateType, ht as pad, i as RuntimeModuleLoader, ia as EagerLoadMap, ic as DatabaseTablePersistedMetadataOptions, ii as QueryGroupCondition, in as getPersistedTimestampColumns, io as AttributeSchemaDelegate, ir as getRegisteredModels, it as deriveRelationAlias, j as loadArkormConfig, ja as QuerySchemaRow, jc as SchemaColumnType, ji as SortDirection, jn as resolveGeneratedExpression, jo as CaseExpression, jr as AdapterInspectionRequest, js as LengthAwarePaginator, jt as deleteAppliedMigrationsStateFromStore, k as isQuerySchemaLike, ka as QuerySchemaInclude, kc as PrismaSchemaSyncOptions, ki as SelectSpec, kn as TableBuilder, ko as Model, kr as AdapterCapability, ks as WhereCallback, kt as computeMigrationChecksum, l as createPrismaAdapter, la as PaginationCurrentPageResolver, lc as HasManyThroughRelationMetadata, li as QueryJoinNestedConstraint, ln as resolvePersistedMetadataFeatures, lo as GlobalScope, lr as loadModelsFrom, lt as findModelBlock, m as configureArkormRuntime, ma as PrismaClientLike, mc as MorphOneRelationMetadata, mi as QueryJsonCondition, mn as UniqueConstraintResolutionException, mo as ModelDeclaredAttributeKey, mr as registerPaths, ms as RelationAggregateInput, mt as getMigrationPlan, n as PivotModel, na as DelegateWhere, nc as ValueExpressionNode, ni as QueryFullTextCondition, nn as getPersistedPrimaryKeyGeneration, no as AttributeOrderBy, nr as getRegisteredFactories, nt as deriveCollectionFieldName, o as resolveRuntimeCompatibilityQuerySchema, oa as ModelQuerySchemaLike, oc as BelongsToRelationMetadata, oi as QueryJoinBoolean, on as rebuildPersistedColumnMappingsState, oo as AttributeUpdateInput, or as getRegisteredSeeders, ot as deriveSingularFieldName, p as bindAdapterToModels, pa as PaginationURLDriverFactory, pc as MorphManyRelationMetadata, pi as QueryJoinValueConstraint, pn as UnsupportedAdapterFeatureException, po as ModelCreateData, pr as registerModels, ps as RelationAggregateConstraint, pt as generateMigrationFile, q as buildFieldLine, qa as ModelStatic, qi as DelegateFindManyArgs, qn as AttributeOptions, qo as sum, qr as InsertManySpec, qs as ColumnExpressionNode, qt as PersistedPrimaryKeyGeneration, r as LoadedRuntimeModule, ra as EagerLoadConstraint, rc as DatabaseTableOptions, ri as QueryGroupByItem, rn as getPersistedTableMetadata, ro as AttributeQuerySchema, rr as getRegisteredMigrations, rt as deriveInverseRelationAlias, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as ModelTableCase, sc as ColumnMap, si as QueryJoinColumnConstraint, sn as resetPersistedColumnMappingsCache, so as AttributeWhereInput, sr as loadFactoriesFrom, st as escapeRegex, t as URLDriver, ta as DelegateUpdateData, tc as RawExpressionNode, ti as QueryExpressionCondition, tn as getPersistedEnumTsType, to as AttributeCreateInput, tr as RuntimePathMap, tt as createMigrationTimestamp, u as createPrismaDelegateMap, ua as PaginationMeta, uc as HasOneRelationMetadata, ui as QueryJoinNullConstraint, un as syncPersistedColumnMappingsFromState, uo as ModelAttributeValue, ur as loadSeedersFrom, ut as formatDefaultValue, v as getActiveTransactionAdapter, va as PrismaLikeOrderBy, vc as RelationMetadata, vi as QueryOrderBy, vn as QueryExecutionExceptionContext, vo as ModelEventListener, vr as Seeder, vs as RelationDefaultResolver, vt as resolvePrismaType, w as getRuntimePaginationCurrentPageResolver, wa as PrismaTransactionCapableClient, wc as GeneratedMigrationFile, wi as RawQuerySpec, wn as DB, wo as ModelUpdateData, wr as createPrismaCompatibilityAdapter, ws as EagerLoadRelations, wt as supportsDatabaseReset, x as getRuntimeAdapter, xa as PrismaLikeSortOrder, xc as AppliedMigrationRun, xi as QuerySelectColumn, xn as MissingDelegateException, xo as ModelOrderByInput, xr as SeederInput, xs as RelationResult, xt as stripPrismaSchemaModelsAndEnums, y as getActiveTransactionClient, ya as PrismaLikeScalarFilter, yc as RelationMetadataType, yi as QueryRawCondition, yn as QueryConstraintException, yo as ModelEventName, yr as SeederCallArgument, ys as RelationDefaultValue, yt as runMigrationWithPrisma, z as applyCreateTableOperation, za as RuntimeClientLike, zc as SchemaTableDropOperation, zi as ArkormDebugEvent, zn as MakeSeederCommand, zo as count, zr as AggregateSpec, zs as FactoryModelConstructor, zt as readAppliedMigrationsStateFromStore } from "./index-43R9yWVX.mjs";
|
|
2
|
-
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, 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, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, 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, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, NamingCase, NullCheckExpressionNode, 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, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, 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, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, 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, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
|
1
|
+
import { $ as buildPrimaryKeyLine, $a as EachCallback, $i as DelegateRow, $n as RegisteredFactory, $o as InlineFactory, $r as QueryComparisonCondition, $s as ExpressionNode, $t as createEmptyPersistedColumnMappingsState, A as isQuerySchemaLike, Aa as QuerySchemaCreateData, Ac as PrimaryKeyGeneration, Ai as RelationLoadPlan, An as EnumBuilder, Ao as QuerySchemaForModelInstance, Ar as createKyselyAdapter, As as RelatedModelForRelationship, At as computeMigrationChecksum, B as applyCreateTableOperation, Ba as QuerySchemaWhere, Bc as SchemaTableAlterOperation, Bi as ArkormBootContext, Bn as MigrateCommand, Bo as coalesce, Br as AggregateOperation, Bs as FactoryDefinition, Bt as readAppliedMigrationsState, C as getRuntimeClient, Ca as PrismaLikeSelect, Cc as AppliedMigrationEntry, Ci as QueryScalarComparisonOperator, Cn as MissingDelegateException, Co as ModelLifecycleState, Cr as SeederConstructor, Cs as RelationMetadataProvider, Ct as supportsDatabaseCreation, D as getRuntimePrismaClient, Da as PrismaTransactionCapableClient, Dc as GeneratedMigrationFile, Di as RawQuerySpec, Dn as MIGRATION_BRAND, Do as ModelUpdateData, Dr as createPrismaCompatibilityAdapter, Ds as EagerLoadRelations, Dt as toModelName, E as getRuntimePaginationURLDriverFactory, Ea as PrismaTransactionCallback, Ec as GenerateMigrationOptions, Ei as QueryTimeCondition, En as DB, Eo as ModelRelationshipResult, Er as PrismaDelegateNameMapping, Es as RelationTableLookupSpec, Et as toMigrationFileSlug, F as PrimaryKeyGenerationPlanner, Fa as QuerySchemaRows, Fc as SchemaForeignKey, Fi as UpdateManySpec, Fn as SeedCommand, Fo as Expression, Fr as AdapterModelFieldStructure, Fs as Paginator, Ft as getLastMigrationRun, G as applyMigrationToPrismaSchema, Ga as SoftDeleteConfig, Gc as TimestampNames, Gi as CastHandler, Gn as InitCommand, Go as fromExpressionNode, Gr as DatabaseRow, Gs as MaybePromise, Gt as writeAppliedMigrationsState, H as applyMigrationRollbackToDatabase, Ha as RuntimeClientLike, Hc as SchemaTableDropOperation, Hi as ArkormDebugEvent, Hn as MakeModelCommand, Ho as count, Hr as AggregateSpec, Hs as FactoryModelConstructor, Ht as removeAppliedMigration, I as PRISMA_ENUM_MEMBER_REGEX, Ia as QuerySchemaSelect, Ic as SchemaForeignKeyAction, Ii as UpdateSpec, In as ModelsSyncCommand, Io as ExpressionBuilder, Ir as AdapterModelIntrospectionOptions, Is as ArkormCollection, It as getLatestAppliedMigrations, J as buildFieldLine, Ja as TransactionContext, Ji as ClientResolver, Jn as resolveCast, Jo as min, Jr as DeleteManySpec, Js as CaseExpressionBranch, Jt as PersistedMetadataFeatures, K as applyOperationsToPrismaSchema, Ka as TransactionCallback, Kc as TimestampNaming, Ki as CastMap, Kn as DbCommand, Ko as json, Kr as DatabaseRows, Ks as AggregateExpressionNode, Kt as writeAppliedMigrationsStateToStore, L as PRISMA_ENUM_REGEX, La as QuerySchemaUniqueWhere, Lc as SchemaIndex, Li as UpsertSpec, Ln as MigrationHistoryCommand, Lo as JsonExpression, Lr as AdapterModelStructure, Ls as FactoryAttributeResolver, Lt as isMigrationApplied, M as loadArkormConfig, Ma as QuerySchemaInclude, Mc as PrismaSchemaSyncOptions, Mi as SelectSpec, Mn as GeneratedColumnExpression, Mo as Model, Mr as AdapterCapability, Ms as WhereCallback, Mt as deleteAppliedMigrationsStateFromStore, N as resetArkormRuntimeForTests, Na as QuerySchemaOrderBy, Nc as SchemaColumn, Ni as SoftDeleteQueryMode, Nn as resolveGeneratedExpression, No as AggregateExpression, Nr as AdapterDatabaseCreationResult, Ns as JoinClause, Nt as findAppliedMigration, O as getUserConfig, Oa as PrismaTransactionContext, Oc as MigrationClass, Oi as RelationAggregateSpec, On as Migration, Oo as ModelWhereInput, Or as createPrismaDatabaseAdapter, Os as JoinOn, Ot as buildMigrationIdentity, P as runArkormTransaction, Pa as QuerySchemaRow, Pc as SchemaColumnType, Pi as SortDirection, Pn as ForeignKeyBuilder, Po as CaseExpression, Pr as AdapterInspectionRequest, Ps as LengthAwarePaginator, Pt as getLastBatchMigrations, Q as buildModelBlock, Qa as ChunkCallback, Qi as DelegateOrderBy, Qn as Arkormx, Qo as where, Qr as QueryColumnComparisonCondition, Qs as ExpressionJsonCast, Qt as applyOperationsToPersistedColumnMappingsState, R as PRISMA_MODEL_REGEX, Ra as QuerySchemaUpdateArgs, Rc as SchemaOperation, Ri as AdapterBindableModel, Rn as MigrateRollbackCommand, Ro as avg, Rr as AdapterQueryOperation, Rs as FactoryAttributes, Rt as markMigrationApplied, S as getRuntimeAdapter, Sa as PrismaLikeScalarFilter, Sc as RelationMetadataType, Si as QueryRawCondition, Sn as ModelNotFoundException, So as ModelEventName, Sr as SeederCallArgument, Ss as RelationDefaultValue, St as stripPrismaSchemaModelsAndEnums, T as getRuntimePaginationCurrentPageResolver, Ta as PrismaLikeWhereInput, Tc as AppliedMigrationsState, Ti as QueryTarget, Tn as ArkormException, To as ModelRelationshipKey, Tr as PrismaDatabaseAdapter, Ts as RelationResultCache, Tt as supportsDatabaseReset, U as applyMigrationRollbackToPrismaSchema, Ua as Serializable, Uc as SchemaUniqueConstraint, Ui as ArkormDebugHandler, Un as MakeMigrationCommand, Uo as expressionBuilder, Ur as DatabaseAdapter, Us as FactoryRelationshipResolver, Ut as resolveMigrationStateFilePath, V as applyDropTableOperation, Va as RawSelectInput, Vc as SchemaTableCreateOperation, Vi as ArkormConfig, Vn as MakeSeederCommand, Vo as col, Vr as AggregateSelection, Vs as FactoryDefinitionAttributes, Vt as readAppliedMigrationsStateFromStore, W as applyMigrationToDatabase, Wa as SimplePaginationMeta, Wc as TimestampColumnBehavior, Wi as CastDefinition, Wn as MakeFactoryCommand, Wo as fn, Wr as DatabasePrimitive, Ws as FactoryState, Wt as supportsDatabaseMigrationState, X as buildInverseRelationLine, Xa as ModelStatic, Xi as DelegateFindManyArgs, Xn as AttributeOptions, Xo as sum, Xr as InsertManySpec, Xs as ColumnExpressionNode, Xt as PersistedTableMetadata, Y as buildIndexLine, Ya as TransactionOptions, Yi as DelegateCreateData, Yn as Attribute, Yo as raw, Yr as DeleteSpec, Ys as CaseExpressionNode, Yt as PersistedPrimaryKeyGeneration, Z as buildMigrationSource, Za as RelationshipModelStatic, Zi as DelegateInclude, Zn as Arkorm, Zo as val, Zr as InsertSpec, Zs as ExpressionBinaryOperator, Zt as PersistedTimestampColumn, _ as emitRuntimeDebugEvent, _a as PrismaClientLike, _c as MorphOneRelationMetadata, _i as QueryJsonCondition, _n as ScopeNotDefinedException, _o as ModelDeclaredAttributeKey, _r as registerPaths, _s as RelationAggregateInput, _t as resolveEnumName, a as getRuntimeCompatibilityAdapter, aa as DelegateWhere, ac as ValueExpressionNode, ai as QueryFullTextCondition, an as getPersistedTableMetadata, ao as AttributeOrderBy, ar as getRegisteredFactories, at as deriveRelationAlias, b as getActiveTransactionClient, ba as PrismaLikeInclude, bc as PivotModelStatic, bi as QueryNotCondition, bn as QueryExecutionExceptionContext, bo as ModelEventHandlerConstructor, br as SEEDER_BRAND, bs as RelationConstraint, bt as runMigrationWithPrisma, c as PrismaDelegateMap, ca as GetUserConfig, cc as BelongsToManyRelationMetadata, ci as QueryJoin, cn as rebuildPersistedColumnMappingsState, co as AttributeSelect, cr as getRegisteredPaths, ct as escapeRegex, d as inferDelegateName, da as NamingCase, dc as HasManyRelationMetadata, di as QueryJoinConstraint, dn as resolvePersistedMetadataFeatures, do as DelegateForModelSchema, dr as loadMigrationsFrom, dt as formatDefaultValue, ea as DelegateRows, ec as FunctionExpressionNode, ei as QueryComparisonOperator, en as deletePersistedColumnMappingsState, eo as ExpressionSelectMap, er as RegisteredModel, es as ModelFactory, et as buildRelationLine, f as awaitConfiguredModelsRegistration, fa as PaginationCurrentPageResolver, fc as HasManyThroughRelationMetadata, fi as QueryJoinNestedConstraint, fn as syncPersistedColumnMappingsFromState, fo as GlobalScope, fr as loadModelsFrom, ft as formatEnumDefaultValue, g as disposeArkormRuntime, ga as PaginationURLDriverFactory, gc as MorphManyRelationMetadata, gi as QueryJoinValueConstraint, gn as UniqueConstraintResolutionException, go as ModelCreateData, gr as registerModels, gs as RelationAggregateConstraint, gt as pad, h as defineConfig, ha as PaginationURLDriver, hc as ModelMetadata, hi as QueryJoinType, hn as UnsupportedAdapterFeatureException, ho as ModelAttributesOf, hr as registerMigrations, ht as getMigrationPlan, i as RuntimeModuleLoader, ia as DelegateUpdateData, ic as RawExpressionNode, ii as QueryExpressionCondition, in as getPersistedPrimaryKeyGeneration, io as AttributeCreateInput, ir as RuntimePathMap, it as deriveInverseRelationAlias, j as isTransactionCapableClient, ja as QuerySchemaFindManyArgs, jc as PrismaMigrationWorkflowOptions, ji as RelationLoadSpec, jn as TableBuilder, jo as RelatedModelClass, jr as AdapterCapabilities, js as RelatedModelFromResult, jt as createEmptyAppliedMigrationsState, k as isDelegateLike, ka as PrismaTransactionOptions, kc as MigrationInstanceLike, ki as RelationFilterSpec, kn as SchemaBuilder, ko as QuerySchemaForModel, kr as KyselyDatabaseAdapter, ks as JoinSource, kt as buildMigrationRunId, l as createPrismaAdapter, la as ModelQuerySchemaLike, lc as BelongsToRelationMetadata, li as QueryJoinBoolean, ln as resetPersistedColumnMappingsCache, lo as AttributeUpdateInput, lr as getRegisteredSeeders, lt as findEnumBlock, m as configureArkormRuntime, ma as PaginationOptions, mc as HasOneThroughRelationMetadata, mi as QueryJoinRawConstraint, mn as writePersistedColumnMappingsState, mo as ModelAttributes, mr as registerFactories, mt as generateMigrationFile, n as PivotModel, na as DelegateUniqueWhere, nc as JsonExpressionNode, ni as QueryDayCondition, nn as getPersistedEnumMap, no as GroupByAggregateSpec, nr as RuntimePathInput, nt as createMigrationTimestamp, o as resolveRuntimeCompatibilityQuerySchema, oa as EagerLoadConstraint, oc as DatabaseTableOptions, oi as QueryGroupByItem, on as getPersistedTimestampColumns, oo as AttributeQuerySchema, or as getRegisteredMigrations, ot as deriveRelationFieldName, p as bindAdapterToModels, pa as PaginationMeta, pc as HasOneRelationMetadata, pi as QueryJoinNullConstraint, pn as validatePersistedMetadataFeaturesForMigrations, po as ModelAttributeValue, pr as loadSeedersFrom, pt as formatRelationAction, q as buildEnumBlock, qa as TransactionCapableClient, qi as CastType, qn as CliApp, qo as max, qr as DatabaseValue, qs as BinaryExpressionNode, qt as PersistedColumnMappingsState, r as LoadedRuntimeModule, ra as DelegateUpdateArgs, rc as NullCheckExpressionNode, ri as QueryExistsCondition, rn as getPersistedEnumTsType, ro as QueryBuilder, rr as RuntimePathKey, rt as deriveCollectionFieldName, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as EagerLoadMap, sc as DatabaseTablePersistedMetadataOptions, si as QueryGroupCondition, sn as readPersistedColumnMappingsState, so as AttributeSchemaDelegate, sr as getRegisteredModels, st as deriveSingularFieldName, t as URLDriver, ta as DelegateSelect, tc as InExpressionNode, ti as QueryCondition, tn as getPersistedColumnMap, to as GroupByAggregateRow, tr as RuntimeConstructor, ts as defineFactory, tt as buildUniqueConstraintLine, u as createPrismaDelegateMap, ua as ModelTableCase, uc as ColumnMap, ui as QueryJoinColumnConstraint, un as resolveColumnMappingsFilePath, uo as AttributeWhereInput, ur as loadFactoriesFrom, ut as findModelBlock, v as ensureArkormConfigLoading, va as PrismaDelegateLike, vc as MorphToManyRelationMetadata, vi as QueryJsonConditionKind, vn as RelationResolutionException, vo as ModelEventDispatcher, vr as registerSeeders, vs as RelationAggregateType, vt as resolveMigrationClassName, w as getRuntimeDebugHandler, wa as PrismaLikeSortOrder, wc as AppliedMigrationRun, wi as QuerySelectColumn, wn as ArkormErrorContext, wo as ModelOrderByInput, wr as SeederInput, ws as RelationResult, wt as supportsDatabaseMigrationExecution, x as getDefaultStubsPath, xa as PrismaLikeOrderBy, xc as RelationMetadata, xi as QueryOrderBy, xn as QueryConstraintException, xo as ModelEventListener, xr as Seeder, xs as RelationDefaultResolver, xt as runPrismaCommand, y as getActiveTransactionAdapter, ya as PrismaFindManyArgsLike, yc as MorphToRelationMetadata, yi as QueryLogicalOperator, yn as QueryExecutionException, yo as ModelEventHandler, yr as resetRuntimeRegistryForTests, ys as RelationColumnLookupSpec, yt as resolvePrismaType, z as applyAlterTableOperation, za as QuerySchemaUpdateData, zc as SchemaPrimaryKey, zi as AdapterQueryInspection, zn as MigrateFreshCommand, zo as caseWhen, zr as AdapterTransactionContext, zs as FactoryCallback, zt as markMigrationRun } from "./index-KPekH7gI.mjs";
|
|
2
|
+
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, 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, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DbCommand, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, 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, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, NamingCase, NullCheckExpressionNode, 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, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, 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, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, 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, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as resetRuntimeRegistryForTests, $n as RuntimeModuleLoader, $t as resolveMigrationClassName, A as getRuntimePaginationURLDriverFactory, An as val, At as buildIndexLine, B as getRegisteredMigrations, Bn as getLastBatchMigrations, Bt as deriveRelationAlias, C as getActiveTransactionAdapter, Cn as fn, Ct as applyMigrationRollbackToDatabase, D as getRuntimeClient, Dn as min, Dt as applyOperationsToPrismaSchema, E as getRuntimeAdapter, En as max, Et as applyMigrationToPrismaSchema, F as isTransactionCapableClient, Fn as buildMigrationRunId, Ft as buildRelationLine, G as loadMigrationsFrom, Gn as markMigrationRun, Gt as findModelBlock, H as getRegisteredPaths, Hn as getLatestAppliedMigrations, Ht as deriveSingularFieldName, I as loadArkormConfig, In as computeMigrationChecksum, It as buildUniqueConstraintLine, J as registerFactories, Jn as removeAppliedMigration, Jt as formatRelationAction, K as loadModelsFrom, Kn as readAppliedMigrationsState, Kt as formatDefaultValue, L as resetArkormRuntimeForTests, Ln as createEmptyAppliedMigrationsState, Lt as createMigrationTimestamp, M as getUserConfig, Mn as PrimaryKeyGenerationPlanner, Mt as buildMigrationSource, N as isDelegateLike, Nn as ForeignKeyBuilder, Nt as buildModelBlock, O as getRuntimeDebugHandler, On as raw, Ot as buildEnumBlock, P as isQuerySchemaLike, Pn as buildMigrationIdentity, Pt as buildPrimaryKeyLine, Q as registerSeeders, Qn as writeAppliedMigrationsStateToStore, Qt as resolveEnumName, R as runArkormTransaction, Rn as deleteAppliedMigrationsStateFromStore, Rt as deriveCollectionFieldName, S as ensureArkormConfigLoading, Sn as expressionBuilder, St as applyDropTableOperation, T as getDefaultStubsPath, Tn as json, Tt as applyMigrationToDatabase, U as getRegisteredSeeders, Un as isMigrationApplied, Ut as escapeRegex, V as getRegisteredModels, Vn as getLastMigrationRun, Vt as deriveRelationFieldName, W as loadFactoriesFrom, Wn as markMigrationApplied, Wt as findEnumBlock, X as registerModels, Xn as supportsDatabaseMigrationState, Xt as getMigrationPlan, Y as registerMigrations, Yn as resolveMigrationStateFilePath, Yt as generateMigrationFile, Z as registerPaths, Zn as writeAppliedMigrationsState, Zt as pad, _ as bindAdapterToModels, _n as avg, _t as PRISMA_ENUM_MEMBER_REGEX, a as HasOneThroughRelation, an as supportsDatabaseMigrationExecution, ar as ArkormException, at as getPersistedEnumTsType, b as disposeArkormRuntime, bn as col, bt as applyAlterTableOperation, c as HasManyRelation, cn as toModelName, ct as getPersistedTimestampColumns, d as BelongsToManyRelation, dn as TableBuilder, dt as resetPersistedColumnMappingsCache, en as resolvePrismaType, er as UnsupportedAdapterFeatureException, et as applyOperationsToPersistedColumnMappingsState, f as Relation, fn as resolveGeneratedExpression, ft as resolveColumnMappingsFilePath, g as awaitConfiguredModelsRegistration, gn as JsonExpression, gt as writePersistedColumnMappingsState, h as URLDriver, hn as Expression, ht as validatePersistedMetadataFeaturesForMigrations, i as MorphManyRelation, in as supportsDatabaseCreation, ir as ArkormCollection, it as getPersistedEnumMap, j as getRuntimePrismaClient, jn as where, jt as buildInverseRelationLine, k as getRuntimePaginationCurrentPageResolver, kn as sum, kt as buildFieldLine, l as BelongsToRelation, ln as SchemaBuilder, lt as readPersistedColumnMappingsState, m as Paginator, mn as CaseExpression, mt as syncPersistedColumnMappingsFromState, n as MorphToManyRelation, nn as runPrismaCommand, nt as deletePersistedColumnMappingsState, o as HasOneRelation, on as supportsDatabaseReset, ot as getPersistedPrimaryKeyGeneration, p as LengthAwarePaginator, pn as AggregateExpression, pt as resolvePersistedMetadataFeatures, q as loadSeedersFrom, qn as readAppliedMigrationsStateFromStore, qt as formatEnumDefaultValue, r as MorphOneRelation, rn as stripPrismaSchemaModelsAndEnums, rr as RelationResolutionException, rt as getPersistedColumnMap, s as HasManyThroughRelation, sn as toMigrationFileSlug, st as getPersistedTableMetadata, t as MorphToRelation, tn as runMigrationWithPrisma, tr as SetBasedEagerLoader, tt as createEmptyPersistedColumnMappingsState, un as EnumBuilder, ut as rebuildPersistedColumnMappingsState, v as configureArkormRuntime, vn as caseWhen, vt as PRISMA_ENUM_REGEX, w as getActiveTransactionClient, wn as fromExpressionNode, wt as applyMigrationRollbackToPrismaSchema, x as emitRuntimeDebugEvent, xn as count, xt as applyCreateTableOperation, y as defineConfig, yn as coalesce, yt as PRISMA_MODEL_REGEX, z as getRegisteredFactories, zn as findAppliedMigration, zt as deriveInverseRelationAlias } from "./relationship-4S2yHPIH.mjs";
|
|
2
2
|
import { Pool } from "pg";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { createRequire } from "module";
|
|
@@ -68,6 +68,15 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
68
68
|
expressions: true
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Destroys the underlying Kysely instance, which ends its connection pool so a
|
|
73
|
+
* short-lived process (e.g. the CLI) can exit promptly. A no-op when `db` is a
|
|
74
|
+
* transaction executor, which does not own the pool.
|
|
75
|
+
*/
|
|
76
|
+
async dispose() {
|
|
77
|
+
const destroyable = this.db;
|
|
78
|
+
if (typeof destroyable.destroy === "function") await destroyable.destroy();
|
|
79
|
+
}
|
|
71
80
|
resolveConfiguredDatabaseName(connectionString) {
|
|
72
81
|
const parsed = new URL(connectionString);
|
|
73
82
|
const database = decodeURIComponent(parsed.pathname.replace(/^\/+/, ""));
|
|
@@ -1805,6 +1814,14 @@ var PrismaDatabaseAdapter = class PrismaDatabaseAdapter {
|
|
|
1805
1814
|
returning: false
|
|
1806
1815
|
};
|
|
1807
1816
|
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Disconnects the underlying Prisma client so a short-lived process (e.g. the
|
|
1819
|
+
* CLI) can exit promptly instead of waiting for the connection to idle out.
|
|
1820
|
+
*/
|
|
1821
|
+
async dispose() {
|
|
1822
|
+
const disconnectable = this.prisma;
|
|
1823
|
+
if (typeof disconnectable.$disconnect === "function") await disconnectable.$disconnect();
|
|
1824
|
+
}
|
|
1808
1825
|
hasTransactionSupport(client) {
|
|
1809
1826
|
return Boolean(client) && typeof client.$transaction === "function";
|
|
1810
1827
|
}
|
|
@@ -3304,6 +3321,162 @@ var CliApp = class {
|
|
|
3304
3321
|
}
|
|
3305
3322
|
};
|
|
3306
3323
|
|
|
3324
|
+
//#endregion
|
|
3325
|
+
//#region src/helpers/runtime-compatibility.ts
|
|
3326
|
+
const isObjectLike = (value) => {
|
|
3327
|
+
return Boolean(value) && typeof value === "object";
|
|
3328
|
+
};
|
|
3329
|
+
const isCompatibilityClient = (value) => {
|
|
3330
|
+
return Boolean(value) && typeof value === "object";
|
|
3331
|
+
};
|
|
3332
|
+
const getCompatibilitySources = (preferredClient) => {
|
|
3333
|
+
const activeTransactionClient = getActiveTransactionClient();
|
|
3334
|
+
const runtimeClient = getRuntimeClient();
|
|
3335
|
+
return activeTransactionClient ? [
|
|
3336
|
+
activeTransactionClient,
|
|
3337
|
+
preferredClient,
|
|
3338
|
+
runtimeClient
|
|
3339
|
+
] : [preferredClient, runtimeClient];
|
|
3340
|
+
};
|
|
3341
|
+
const getRuntimeCompatibilityAdapter = (preferredClient) => {
|
|
3342
|
+
const client = getCompatibilitySources(preferredClient).find((source) => isCompatibilityClient(source));
|
|
3343
|
+
if (!client) return void 0;
|
|
3344
|
+
return createPrismaCompatibilityAdapter(client);
|
|
3345
|
+
};
|
|
3346
|
+
const resolveRuntimeCompatibilityQuerySchema = (candidates, preferredClient) => {
|
|
3347
|
+
return getCompatibilitySources(preferredClient).flatMap((source) => {
|
|
3348
|
+
if (!isObjectLike(source)) return [];
|
|
3349
|
+
return candidates.map((candidate) => source[candidate]);
|
|
3350
|
+
}).find((candidate) => isQuerySchemaLike(candidate));
|
|
3351
|
+
};
|
|
3352
|
+
const resolveRuntimeCompatibilityQuerySchemaOrThrow = (key, candidates, modelName, preferredClient) => {
|
|
3353
|
+
const resolved = resolveRuntimeCompatibilityQuerySchema(candidates, preferredClient);
|
|
3354
|
+
if (!resolved) throw new MissingDelegateException(`Database delegate [${key}] is not configured.`, {
|
|
3355
|
+
operation: "getDelegate",
|
|
3356
|
+
model: modelName,
|
|
3357
|
+
delegate: key,
|
|
3358
|
+
meta: { candidates }
|
|
3359
|
+
});
|
|
3360
|
+
return resolved;
|
|
3361
|
+
};
|
|
3362
|
+
|
|
3363
|
+
//#endregion
|
|
3364
|
+
//#region src/cli/commands/DbCommand.ts
|
|
3365
|
+
/**
|
|
3366
|
+
* Executes a raw SQL statement against the configured database adapter and prints
|
|
3367
|
+
* the result — Arkorm's equivalent of `artisan db`.
|
|
3368
|
+
*
|
|
3369
|
+
* @author Legacy (3m1n3nc3)
|
|
3370
|
+
*/
|
|
3371
|
+
var DbCommand = class extends Command {
|
|
3372
|
+
constructor(..._args) {
|
|
3373
|
+
super(..._args);
|
|
3374
|
+
this.signature = `db
|
|
3375
|
+
{sql? : Raw SQL statement to execute (prompts for it when omitted)}
|
|
3376
|
+
{--file= : Read the SQL statement from a file instead of the argument}
|
|
3377
|
+
{--bindings= : JSON array of positional bindings for ? placeholders}
|
|
3378
|
+
{--json : Print result rows as JSON instead of a table}
|
|
3379
|
+
`;
|
|
3380
|
+
this.description = "Execute a raw SQL statement against the configured database";
|
|
3381
|
+
}
|
|
3382
|
+
async handle() {
|
|
3383
|
+
this.app.command = this;
|
|
3384
|
+
await loadArkormConfig();
|
|
3385
|
+
const sql = await this.resolveSql();
|
|
3386
|
+
if (sql === null) return;
|
|
3387
|
+
if (sql.trim().length === 0) return void this.error("Error: No SQL statement provided.");
|
|
3388
|
+
const bindings = this.resolveBindings();
|
|
3389
|
+
if (bindings === null) return;
|
|
3390
|
+
const adapter = getRuntimeAdapter() ?? getRuntimeCompatibilityAdapter();
|
|
3391
|
+
if (!adapter) return void this.error("Error: No database driver configured. Set an adapter or client in arkormx.config.");
|
|
3392
|
+
if (typeof adapter.rawQuery !== "function") return void this.error("Error: The configured adapter does not support raw queries. Use a SQL-backed adapter (e.g. the Kysely/PostgreSQL adapter).");
|
|
3393
|
+
let rows;
|
|
3394
|
+
try {
|
|
3395
|
+
rows = await adapter.rawQuery({
|
|
3396
|
+
sql,
|
|
3397
|
+
bindings
|
|
3398
|
+
});
|
|
3399
|
+
} catch (error) {
|
|
3400
|
+
this.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
3401
|
+
return;
|
|
3402
|
+
}
|
|
3403
|
+
this.render(rows);
|
|
3404
|
+
}
|
|
3405
|
+
/**
|
|
3406
|
+
* Resolves the SQL to run. Priority: the positional argument, then `--file`,
|
|
3407
|
+
* then an interactive editor prompt (so a bare `arkorm db` lets you compose a
|
|
3408
|
+
* statement). Returns `null` (after emitting an error) when a referenced file is
|
|
3409
|
+
* missing.
|
|
3410
|
+
*/
|
|
3411
|
+
async resolveSql() {
|
|
3412
|
+
const argument = this.argument("sql");
|
|
3413
|
+
if (typeof argument === "string" && argument.trim().length > 0) return argument;
|
|
3414
|
+
const filePath = this.option("file") ? String(this.option("file")) : void 0;
|
|
3415
|
+
if (filePath) {
|
|
3416
|
+
const resolved = resolve(filePath);
|
|
3417
|
+
if (!existsSync$1(resolved)) {
|
|
3418
|
+
this.error(`Error: SQL file not found: ${this.app.formatPathForLog(resolved)}`);
|
|
3419
|
+
return null;
|
|
3420
|
+
}
|
|
3421
|
+
return readFileSync$1(resolved, "utf-8");
|
|
3422
|
+
}
|
|
3423
|
+
return await this.multiline("Query", "Enter the SQL to execute");
|
|
3424
|
+
}
|
|
3425
|
+
/**
|
|
3426
|
+
* Parses `--bindings` as a JSON array. Returns `null` (after emitting an error)
|
|
3427
|
+
* when the value is present but not a valid JSON array.
|
|
3428
|
+
*/
|
|
3429
|
+
resolveBindings() {
|
|
3430
|
+
const raw = this.option("bindings");
|
|
3431
|
+
if (raw == null || raw === "") return [];
|
|
3432
|
+
try {
|
|
3433
|
+
const parsed = JSON.parse(String(raw));
|
|
3434
|
+
if (!Array.isArray(parsed)) {
|
|
3435
|
+
this.error("Error: --bindings must be a JSON array, e.g. --bindings=\"[1, \\\"active\\\"]\".");
|
|
3436
|
+
return null;
|
|
3437
|
+
}
|
|
3438
|
+
return parsed;
|
|
3439
|
+
} catch {
|
|
3440
|
+
this.error("Error: --bindings must be valid JSON, e.g. --bindings=\"[1, \\\"active\\\"]\".");
|
|
3441
|
+
return null;
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
render(rows) {
|
|
3445
|
+
if (this.option("json")) {
|
|
3446
|
+
this.line(JSON.stringify(rows, null, 2));
|
|
3447
|
+
return;
|
|
3448
|
+
}
|
|
3449
|
+
if (rows.length === 0) {
|
|
3450
|
+
this.success("Statement executed successfully. (0 rows returned)");
|
|
3451
|
+
return;
|
|
3452
|
+
}
|
|
3453
|
+
this.renderTable(rows);
|
|
3454
|
+
this.success(`(${rows.length} row${rows.length === 1 ? "" : "s"})`);
|
|
3455
|
+
}
|
|
3456
|
+
renderTable(rows) {
|
|
3457
|
+
const columns = rows.reduce((accumulator, row) => {
|
|
3458
|
+
Object.keys(row).forEach((key) => {
|
|
3459
|
+
if (!accumulator.includes(key)) accumulator.push(key);
|
|
3460
|
+
});
|
|
3461
|
+
return accumulator;
|
|
3462
|
+
}, []);
|
|
3463
|
+
const cell = (value) => {
|
|
3464
|
+
if (value === null || value === void 0) return "NULL";
|
|
3465
|
+
if (value instanceof Date) return value.toISOString();
|
|
3466
|
+
if (typeof value === "object") return JSON.stringify(value);
|
|
3467
|
+
return String(value);
|
|
3468
|
+
};
|
|
3469
|
+
const widths = columns.map((column) => rows.reduce((max, row) => Math.max(max, cell(row[column]).length), column.length));
|
|
3470
|
+
const separator = `+${widths.map((width) => "-".repeat(width + 2)).join("+")}+`;
|
|
3471
|
+
const formatRow = (values) => `| ${values.map((value, index) => value.padEnd(widths[index])).join(" | ")} |`;
|
|
3472
|
+
this.line(separator);
|
|
3473
|
+
this.line(formatRow(columns));
|
|
3474
|
+
this.line(separator);
|
|
3475
|
+
rows.forEach((row) => this.line(formatRow(columns.map((column) => cell(row[column])))));
|
|
3476
|
+
this.line(separator);
|
|
3477
|
+
}
|
|
3478
|
+
};
|
|
3479
|
+
|
|
3307
3480
|
//#endregion
|
|
3308
3481
|
//#region src/cli/commands/InitCommand.ts
|
|
3309
3482
|
/**
|
|
@@ -3755,6 +3928,7 @@ var MigrateFreshCommand = class extends Command {
|
|
|
3755
3928
|
}
|
|
3756
3929
|
async handle() {
|
|
3757
3930
|
this.app.command = this;
|
|
3931
|
+
await loadArkormConfig();
|
|
3758
3932
|
const configuredMigrationsDir = this.app.getConfig("paths")?.migrations ?? join(process.cwd(), "database", "migrations");
|
|
3759
3933
|
const migrationDirs = this.resolveMigrationDirectories(configuredMigrationsDir);
|
|
3760
3934
|
if (migrationDirs.length === 0 && getRegisteredMigrations().length === 0) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
|
|
@@ -3901,7 +4075,7 @@ var MigrateRollbackCommand = class extends Command {
|
|
|
3901
4075
|
constructor(..._args) {
|
|
3902
4076
|
super(..._args);
|
|
3903
4077
|
this.signature = `migrate:rollback
|
|
3904
|
-
{--step= : Number of
|
|
4078
|
+
{--step= : Number of batches to rollback (defaults to 1, the last batch)}
|
|
3905
4079
|
{--dry-run : Preview rollback targets without applying changes}
|
|
3906
4080
|
{--deploy : Use prisma migrate deploy instead of migrate dev (Prisma compatibility driver only)}
|
|
3907
4081
|
{--skip-generate : Skip prisma generate (Prisma compatibility driver only)}
|
|
@@ -3914,6 +4088,7 @@ var MigrateRollbackCommand = class extends Command {
|
|
|
3914
4088
|
}
|
|
3915
4089
|
async handle() {
|
|
3916
4090
|
this.app.command = this;
|
|
4091
|
+
await loadArkormConfig();
|
|
3917
4092
|
const configuredMigrationsDir = this.app.getConfig("paths")?.migrations ?? join(process.cwd(), "database", "migrations");
|
|
3918
4093
|
const migrationDirs = this.resolveMigrationDirectories(configuredMigrationsDir);
|
|
3919
4094
|
if (migrationDirs.length === 0 && getRegisteredMigrations().length === 0) return void this.error(`Error: Migrations directory not found: ${this.app.formatPathForLog(configuredMigrationsDir)}`);
|
|
@@ -3923,14 +4098,10 @@ var MigrateRollbackCommand = class extends Command {
|
|
|
3923
4098
|
const useDatabaseMigrations = supportsDatabaseMigrationExecution(adapter);
|
|
3924
4099
|
const persistedFeatures = resolvePersistedMetadataFeatures(this.app.getConfig("features"));
|
|
3925
4100
|
let appliedState = await readAppliedMigrationsStateFromStore(adapter, stateFilePath);
|
|
3926
|
-
const stepOption = this.option("step"
|
|
3927
|
-
const stepCount = stepOption == null ?
|
|
3928
|
-
if (
|
|
3929
|
-
const targets =
|
|
3930
|
-
const lastRun = getLastMigrationRun(appliedState);
|
|
3931
|
-
if (!lastRun) return [];
|
|
3932
|
-
return lastRun.migrationIds.map((id) => appliedState.migrations.find((migration) => migration.id === id)).filter((migration) => Boolean(migration));
|
|
3933
|
-
})();
|
|
4101
|
+
const stepOption = this.option("step");
|
|
4102
|
+
const stepCount = stepOption == null ? 1 : Number(stepOption);
|
|
4103
|
+
if (!Number.isFinite(stepCount) || stepCount <= 0 || !Number.isInteger(stepCount)) return void this.error("Error: --step must be a positive integer.");
|
|
4104
|
+
const targets = getLastBatchMigrations(appliedState, stepCount);
|
|
3934
4105
|
if (targets.length === 0) return void this.error("Error: No tracked migrations available to rollback.");
|
|
3935
4106
|
const available = await this.loadAllMigrations(migrationDirs);
|
|
3936
4107
|
const rollbackClasses = targets.map((target) => {
|
|
@@ -4015,6 +4186,7 @@ var MigrationHistoryCommand = class extends Command {
|
|
|
4015
4186
|
}
|
|
4016
4187
|
async handle() {
|
|
4017
4188
|
this.app.command = this;
|
|
4189
|
+
await loadArkormConfig();
|
|
4018
4190
|
const stateFilePath = resolveMigrationStateFilePath(process.cwd(), this.option("state-file") ? String(this.option("state-file")) : void 0);
|
|
4019
4191
|
const adapter = this.app.getConfig("adapter");
|
|
4020
4192
|
const usesDatabaseState = supportsDatabaseMigrationState(adapter);
|
|
@@ -4073,6 +4245,7 @@ var ModelsSyncCommand = class extends Command {
|
|
|
4073
4245
|
}
|
|
4074
4246
|
async handle() {
|
|
4075
4247
|
this.app.command = this;
|
|
4248
|
+
await loadArkormConfig();
|
|
4076
4249
|
let result;
|
|
4077
4250
|
try {
|
|
4078
4251
|
result = await this.app.syncModels({
|
|
@@ -4190,6 +4363,7 @@ var SeedCommand = class extends Command {
|
|
|
4190
4363
|
*/
|
|
4191
4364
|
async handle() {
|
|
4192
4365
|
this.app.command = this;
|
|
4366
|
+
await loadArkormConfig();
|
|
4193
4367
|
const configuredSeedersDir = this.app.getConfig("paths")?.seeders ?? join(process.cwd(), "database", "seeders");
|
|
4194
4368
|
const seederDirs = this.resolveSeederDirectories(configuredSeedersDir);
|
|
4195
4369
|
if (seederDirs.length === 0 && getRegisteredSeeders().length === 0) return void this.error(`ERROR: Seeders directory not found: ${this.app.formatPathForLog(configuredSeedersDir)}`);
|
|
@@ -4266,45 +4440,6 @@ var logo_default = String.raw`
|
|
|
4266
4440
|
███ ███ ██ ██ ▀█▄ ▀███▀ ██ ██ ██ ██
|
|
4267
4441
|
`;
|
|
4268
4442
|
|
|
4269
|
-
//#endregion
|
|
4270
|
-
//#region src/helpers/runtime-compatibility.ts
|
|
4271
|
-
const isObjectLike = (value) => {
|
|
4272
|
-
return Boolean(value) && typeof value === "object";
|
|
4273
|
-
};
|
|
4274
|
-
const isCompatibilityClient = (value) => {
|
|
4275
|
-
return Boolean(value) && typeof value === "object";
|
|
4276
|
-
};
|
|
4277
|
-
const getCompatibilitySources = (preferredClient) => {
|
|
4278
|
-
const activeTransactionClient = getActiveTransactionClient();
|
|
4279
|
-
const runtimeClient = getRuntimeClient();
|
|
4280
|
-
return activeTransactionClient ? [
|
|
4281
|
-
activeTransactionClient,
|
|
4282
|
-
preferredClient,
|
|
4283
|
-
runtimeClient
|
|
4284
|
-
] : [preferredClient, runtimeClient];
|
|
4285
|
-
};
|
|
4286
|
-
const getRuntimeCompatibilityAdapter = (preferredClient) => {
|
|
4287
|
-
const client = getCompatibilitySources(preferredClient).find((source) => isCompatibilityClient(source));
|
|
4288
|
-
if (!client) return void 0;
|
|
4289
|
-
return createPrismaCompatibilityAdapter(client);
|
|
4290
|
-
};
|
|
4291
|
-
const resolveRuntimeCompatibilityQuerySchema = (candidates, preferredClient) => {
|
|
4292
|
-
return getCompatibilitySources(preferredClient).flatMap((source) => {
|
|
4293
|
-
if (!isObjectLike(source)) return [];
|
|
4294
|
-
return candidates.map((candidate) => source[candidate]);
|
|
4295
|
-
}).find((candidate) => isQuerySchemaLike(candidate));
|
|
4296
|
-
};
|
|
4297
|
-
const resolveRuntimeCompatibilityQuerySchemaOrThrow = (key, candidates, modelName, preferredClient) => {
|
|
4298
|
-
const resolved = resolveRuntimeCompatibilityQuerySchema(candidates, preferredClient);
|
|
4299
|
-
if (!resolved) throw new MissingDelegateException(`Database delegate [${key}] is not configured.`, {
|
|
4300
|
-
operation: "getDelegate",
|
|
4301
|
-
model: modelName,
|
|
4302
|
-
delegate: key,
|
|
4303
|
-
meta: { candidates }
|
|
4304
|
-
});
|
|
4305
|
-
return resolved;
|
|
4306
|
-
};
|
|
4307
|
-
|
|
4308
4443
|
//#endregion
|
|
4309
4444
|
//#region src/JoinClause.ts
|
|
4310
4445
|
/**
|
|
@@ -10248,4 +10383,4 @@ var PivotModel = class extends Model {
|
|
|
10248
10383
|
};
|
|
10249
10384
|
|
|
10250
10385
|
//#endregion
|
|
10251
|
-
export { AggregateExpression, Arkorm, ArkormCollection, ArkormException, Arkormx, Attribute, CaseExpression, CliApp, DB, EnumBuilder, Expression, ForeignKeyBuilder, InitCommand, InlineFactory, JoinClause, JsonExpression, 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, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, 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, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
|
10386
|
+
export { AggregateExpression, Arkorm, ArkormCollection, ArkormException, Arkormx, Attribute, CaseExpression, CliApp, DB, DbCommand, EnumBuilder, Expression, ForeignKeyBuilder, InitCommand, InlineFactory, JoinClause, JsonExpression, 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, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, 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, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, 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-CQbj9Ahg.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 { as as MorphOneRelation, cs as HasOneRelation, ds as BelongsToRelation, fs as SingleResultRelation, hs as RelationTableLoader, is as MorphToManyRelation, ls as HasManyThroughRelation, ms as Relation, ns as SetBasedEagerLoader, os as MorphManyRelation, ps as BelongsToManyRelation, rs as MorphToRelation, ss as HasOneThroughRelation, us as HasManyRelation } from "../index-WJEmy3Yu.cjs";
|
|
2
2
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, MorphToRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { as as MorphOneRelation, cs as HasOneRelation, ds as BelongsToRelation, fs as SingleResultRelation, hs as RelationTableLoader, is as MorphToManyRelation, ls as HasManyThroughRelation, ms as Relation, ns as SetBasedEagerLoader, os as MorphManyRelation, ps as BelongsToManyRelation, rs as MorphToRelation, ss as HasOneThroughRelation, us as HasManyRelation } from "../index-KPekH7gI.mjs";
|
|
2
2
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, MorphToRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as HasOneThroughRelation, c as HasManyRelation, d as BelongsToManyRelation, f as Relation, i as MorphManyRelation, l as BelongsToRelation, n as MorphToManyRelation, nr as RelationTableLoader, o as HasOneRelation, r as MorphOneRelation, s as HasManyThroughRelation, t as MorphToRelation, tr as SetBasedEagerLoader, u as SingleResultRelation } from "../relationship-4S2yHPIH.mjs";
|
|
2
2
|
|
|
3
3
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, MorphToRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|
|
@@ -1008,6 +1008,49 @@ const getLatestAppliedMigrations = (state, steps) => {
|
|
|
1008
1008
|
return right.index - left.index;
|
|
1009
1009
|
}).slice(0, Math.max(0, steps)).map((entry) => entry.migration);
|
|
1010
1010
|
};
|
|
1011
|
+
/**
|
|
1012
|
+
* Groups the applied migrations into batches, oldest batch first, each batch
|
|
1013
|
+
* holding its migration ids in application order.
|
|
1014
|
+
*
|
|
1015
|
+
* A "batch" is one `migrate` run. When no runs were recorded (e.g. legacy state
|
|
1016
|
+
* written before run tracking), each applied migration is treated as its own
|
|
1017
|
+
* batch so `--step` still behaves predictably.
|
|
1018
|
+
*
|
|
1019
|
+
* @param state
|
|
1020
|
+
* @returns
|
|
1021
|
+
*/
|
|
1022
|
+
const resolveAppliedBatches = (state) => {
|
|
1023
|
+
const runs = state.runs ?? [];
|
|
1024
|
+
if (runs.length > 0) return runs.map((run, index) => ({
|
|
1025
|
+
run,
|
|
1026
|
+
index
|
|
1027
|
+
})).sort((left, right) => {
|
|
1028
|
+
const appliedAtOrder = left.run.appliedAt.localeCompare(right.run.appliedAt);
|
|
1029
|
+
if (appliedAtOrder !== 0) return appliedAtOrder;
|
|
1030
|
+
return left.index - right.index;
|
|
1031
|
+
}).map((entry) => entry.run.migrationIds);
|
|
1032
|
+
return state.migrations.map((migration) => [migration.id]);
|
|
1033
|
+
};
|
|
1034
|
+
/**
|
|
1035
|
+
* Resolves the migrations belonging to the most recent `batches` batches, ordered
|
|
1036
|
+
* for rollback — **reverse of the order they were applied** (most recent batch
|
|
1037
|
+
* first, and within each batch the migration that ran `up()` last runs `down()`
|
|
1038
|
+
* first), so a rollback exactly reverses how the migrations were applied.
|
|
1039
|
+
*
|
|
1040
|
+
* Defaults to a single batch (`migrate:rollback` with no `--step`); `--step=N`
|
|
1041
|
+
* rolls back the last N batches.
|
|
1042
|
+
*
|
|
1043
|
+
* @param state
|
|
1044
|
+
* @param batches
|
|
1045
|
+
* @returns
|
|
1046
|
+
*/
|
|
1047
|
+
const getLastBatchMigrations = (state, batches = 1) => {
|
|
1048
|
+
if (batches < 1) return [];
|
|
1049
|
+
const allBatches = resolveAppliedBatches(state);
|
|
1050
|
+
const selected = allBatches.slice(Math.max(0, allBatches.length - batches));
|
|
1051
|
+
const byId = new Map(state.migrations.map((migration) => [migration.id, migration]));
|
|
1052
|
+
return selected.reverse().flatMap((migrationIds) => [...migrationIds].reverse()).map((id) => byId.get(id)).filter((migration) => Boolean(migration));
|
|
1053
|
+
};
|
|
1011
1054
|
|
|
1012
1055
|
//#endregion
|
|
1013
1056
|
//#region src/database/ForeignKeyBuilder.ts
|
|
@@ -4064,6 +4107,29 @@ const getRuntimeAdapter = () => {
|
|
|
4064
4107
|
if (!runtimeConfigLoaded) loadRuntimeConfigSync();
|
|
4065
4108
|
return runtimeAdapter;
|
|
4066
4109
|
};
|
|
4110
|
+
/**
|
|
4111
|
+
* Releases the database resources held by the configured runtime — the adapter's
|
|
4112
|
+
* connection pool and/or the configured client. Intended for short-lived
|
|
4113
|
+
* processes (the CLI) so the Node event loop drains and the process exits
|
|
4114
|
+
* promptly instead of hanging on pool idle timeouts. Teardown failures are
|
|
4115
|
+
* swallowed because the process is shutting down anyway.
|
|
4116
|
+
*/
|
|
4117
|
+
const disposeArkormRuntime = async () => {
|
|
4118
|
+
let adapterDisposed = false;
|
|
4119
|
+
try {
|
|
4120
|
+
if (runtimeAdapter && typeof runtimeAdapter.dispose === "function") {
|
|
4121
|
+
await runtimeAdapter.dispose();
|
|
4122
|
+
adapterDisposed = true;
|
|
4123
|
+
}
|
|
4124
|
+
} catch {}
|
|
4125
|
+
const client = getRuntimeClient();
|
|
4126
|
+
if (!client) return;
|
|
4127
|
+
try {
|
|
4128
|
+
if (typeof client.$disconnect === "function") await client.$disconnect();
|
|
4129
|
+
else if (!adapterDisposed && typeof client.destroy === "function") await client.destroy();
|
|
4130
|
+
else if (!adapterDisposed && typeof client.end === "function") await client.end();
|
|
4131
|
+
} catch {}
|
|
4132
|
+
};
|
|
4067
4133
|
const getActiveTransactionClient = () => {
|
|
4068
4134
|
return transactionClientStorage.getStore();
|
|
4069
4135
|
};
|
|
@@ -6444,4 +6510,4 @@ var MorphToRelation = class extends Relation {
|
|
|
6444
6510
|
};
|
|
6445
6511
|
|
|
6446
6512
|
//#endregion
|
|
6447
|
-
export {
|
|
6513
|
+
export { resetRuntimeRegistryForTests as $, RuntimeModuleLoader as $n, resolveMigrationClassName as $t, getRuntimePaginationURLDriverFactory as A, val as An, buildIndexLine as At, getRegisteredMigrations as B, getLastBatchMigrations as Bn, deriveRelationAlias as Bt, getActiveTransactionAdapter as C, fn as Cn, applyMigrationRollbackToDatabase as Ct, getRuntimeClient as D, min as Dn, applyOperationsToPrismaSchema as Dt, getRuntimeAdapter as E, max as En, applyMigrationToPrismaSchema as Et, isTransactionCapableClient as F, buildMigrationRunId as Fn, buildRelationLine as Ft, loadMigrationsFrom as G, markMigrationRun as Gn, findModelBlock as Gt, getRegisteredPaths as H, getLatestAppliedMigrations as Hn, deriveSingularFieldName as Ht, loadArkormConfig as I, computeMigrationChecksum as In, buildUniqueConstraintLine as It, registerFactories as J, removeAppliedMigration as Jn, formatRelationAction as Jt, loadModelsFrom as K, readAppliedMigrationsState as Kn, formatDefaultValue as Kt, resetArkormRuntimeForTests as L, createEmptyAppliedMigrationsState as Ln, createMigrationTimestamp as Lt, getUserConfig as M, PrimaryKeyGenerationPlanner as Mn, buildMigrationSource as Mt, isDelegateLike as N, ForeignKeyBuilder as Nn, buildModelBlock as Nt, getRuntimeDebugHandler as O, raw as On, buildEnumBlock as Ot, isQuerySchemaLike as P, buildMigrationIdentity as Pn, buildPrimaryKeyLine as Pt, registerSeeders as Q, writeAppliedMigrationsStateToStore as Qn, resolveEnumName as Qt, runArkormTransaction as R, deleteAppliedMigrationsStateFromStore as Rn, deriveCollectionFieldName as Rt, ensureArkormConfigLoading as S, expressionBuilder as Sn, applyDropTableOperation as St, getDefaultStubsPath as T, json as Tn, applyMigrationToDatabase as Tt, getRegisteredSeeders as U, isMigrationApplied as Un, escapeRegex as Ut, getRegisteredModels as V, getLastMigrationRun as Vn, deriveRelationFieldName as Vt, loadFactoriesFrom as W, markMigrationApplied as Wn, findEnumBlock as Wt, registerModels as X, supportsDatabaseMigrationState as Xn, getMigrationPlan as Xt, registerMigrations as Y, resolveMigrationStateFilePath as Yn, generateMigrationFile as Yt, registerPaths as Z, writeAppliedMigrationsState as Zn, pad as Zt, bindAdapterToModels as _, avg as _n, PRISMA_ENUM_MEMBER_REGEX as _t, HasOneThroughRelation as a, supportsDatabaseMigrationExecution as an, ArkormException as ar, getPersistedEnumTsType as at, disposeArkormRuntime as b, col as bn, applyAlterTableOperation as bt, HasManyRelation as c, toModelName as cn, getPersistedTimestampColumns as ct, BelongsToManyRelation as d, TableBuilder as dn, resetPersistedColumnMappingsCache as dt, resolvePrismaType as en, UnsupportedAdapterFeatureException as er, applyOperationsToPersistedColumnMappingsState as et, Relation as f, resolveGeneratedExpression as fn, resolveColumnMappingsFilePath as ft, awaitConfiguredModelsRegistration as g, JsonExpression as gn, writePersistedColumnMappingsState as gt, URLDriver as h, Expression as hn, validatePersistedMetadataFeaturesForMigrations as ht, MorphManyRelation as i, supportsDatabaseCreation as in, ArkormCollection as ir, getPersistedEnumMap as it, getRuntimePrismaClient as j, where as jn, buildInverseRelationLine as jt, getRuntimePaginationCurrentPageResolver as k, sum as kn, buildFieldLine as kt, BelongsToRelation as l, SchemaBuilder as ln, readPersistedColumnMappingsState as lt, Paginator as m, CaseExpression as mn, syncPersistedColumnMappingsFromState as mt, MorphToManyRelation as n, runPrismaCommand as nn, RelationTableLoader as nr, deletePersistedColumnMappingsState as nt, HasOneRelation as o, supportsDatabaseReset as on, getPersistedPrimaryKeyGeneration as ot, LengthAwarePaginator as p, AggregateExpression as pn, resolvePersistedMetadataFeatures as pt, loadSeedersFrom as q, readAppliedMigrationsStateFromStore as qn, formatEnumDefaultValue as qt, MorphOneRelation as r, stripPrismaSchemaModelsAndEnums as rn, RelationResolutionException as rr, getPersistedColumnMap as rt, HasManyThroughRelation as s, toMigrationFileSlug as sn, getPersistedTableMetadata as st, MorphToRelation as t, runMigrationWithPrisma as tn, SetBasedEagerLoader as tr, createEmptyPersistedColumnMappingsState as tt, SingleResultRelation as u, EnumBuilder as un, rebuildPersistedColumnMappingsState as ut, configureArkormRuntime as v, caseWhen as vn, PRISMA_ENUM_REGEX as vt, getActiveTransactionClient as w, fromExpressionNode as wn, applyMigrationRollbackToPrismaSchema as wt, emitRuntimeDebugEvent as x, count as xn, applyCreateTableOperation as xt, defineConfig as y, coalesce as yn, PRISMA_MODEL_REGEX as yt, getRegisteredFactories as z, findAppliedMigration as zn, deriveInverseRelationAlias as zt };
|