arkormx 2.4.6 → 2.4.8

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.
@@ -827,23 +827,6 @@ const getLatestAppliedMigrations = (state, steps) => {
827
827
  }).slice(0, Math.max(0, steps)).map((entry) => entry.migration);
828
828
  };
829
829
 
830
- //#endregion
831
- //#region src/helpers/PrimaryKeyGenerationPlanner.ts
832
- var PrimaryKeyGenerationPlanner = class {
833
- static plan(column) {
834
- if (!column.primary || column.default !== void 0) return void 0;
835
- if (column.type === "uuid" || column.type === "string") return {
836
- strategy: "uuid",
837
- prismaDefault: "@default(uuid())",
838
- databaseDefault: column.type === "uuid" ? "gen_random_uuid()" : "gen_random_uuid()::text",
839
- runtimeFactory: "uuid"
840
- };
841
- }
842
- static generate(generation) {
843
- if (generation?.runtimeFactory === "uuid") return randomUUID();
844
- }
845
- };
846
-
847
830
  //#endregion
848
831
  //#region src/database/ForeignKeyBuilder.ts
849
832
  /**
@@ -916,6 +899,23 @@ var ForeignKeyBuilder = class {
916
899
  }
917
900
  };
918
901
 
902
+ //#endregion
903
+ //#region src/helpers/PrimaryKeyGenerationPlanner.ts
904
+ var PrimaryKeyGenerationPlanner = class {
905
+ static plan(column) {
906
+ if (!column.primary || column.default !== void 0) return void 0;
907
+ if (column.type === "uuid" || column.type === "string") return {
908
+ strategy: "uuid",
909
+ prismaDefault: "@default(uuid())",
910
+ databaseDefault: column.type === "uuid" ? "gen_random_uuid()" : "gen_random_uuid()::text",
911
+ runtimeFactory: "uuid"
912
+ };
913
+ }
914
+ static generate(generation) {
915
+ if (generation?.runtimeFactory === "uuid") return randomUUID();
916
+ }
917
+ };
918
+
919
919
  //#endregion
920
920
  //#region src/database/TableBuilder.ts
921
921
  const PRISMA_ENUM_MEMBER_REGEX$1 = /^[A-Za-z][A-Za-z0-9_]*$/;
@@ -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
- * Marks a column as unique in the table.
1134
- *
1135
- * @param name Optional explicit column name.
1136
- * When omitted, applies to the latest defined column.
1137
- * @returns The current TableBuilder instance for chaining.
1138
- */
1139
- unique(name) {
1140
- const column = this.resolveColumn(name);
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
  }
@@ -1183,6 +1190,17 @@ var TableBuilder = class {
1183
1190
  return this;
1184
1191
  }
1185
1192
  /**
1193
+ * Defines columns for a polymorphic relationship in the table with UUID ID.
1194
+ *
1195
+ * @param name The base name for the polymorphic relationship columns.
1196
+ * @returns
1197
+ */
1198
+ uuidMorphs(name, nullable = false) {
1199
+ this.string(`${name}Type`, { nullable });
1200
+ this.uuid(`${name}Id`, { nullable });
1201
+ return this;
1202
+ }
1203
+ /**
1186
1204
  * Defines nullable columns for a polymorphic relationship in the table.
1187
1205
  *
1188
1206
  * @param name The base name for the polymorphic relationship columns.
@@ -1192,6 +1210,15 @@ var TableBuilder = class {
1192
1210
  return this.morphs(name, true);
1193
1211
  }
1194
1212
  /**
1213
+ * Defines nullable columns for a polymorphic relationship in the table with UUID ID.
1214
+ *
1215
+ * @param name The base name for the polymorphic relationship columns.
1216
+ * @returns
1217
+ */
1218
+ nullableUuidMorphs(name) {
1219
+ return this.uuidMorphs(name, true);
1220
+ }
1221
+ /**
1195
1222
  * Defines a timestamp column in the table.
1196
1223
  *
1197
1224
  * @param name The name of the timestamp column.
@@ -1379,6 +1406,24 @@ var TableBuilder = class {
1379
1406
  return this.foreignKeys.map((foreignKey) => ({ ...foreignKey }));
1380
1407
  }
1381
1408
  /**
1409
+ * Returns a copy of the table-level composite primary key.
1410
+ */
1411
+ getPrimaryKey() {
1412
+ return this.compositePrimaryKey ? {
1413
+ ...this.compositePrimaryKey,
1414
+ columns: [...this.compositePrimaryKey.columns]
1415
+ } : void 0;
1416
+ }
1417
+ /**
1418
+ * Returns copies of table-level composite unique constraints.
1419
+ */
1420
+ getUniqueConstraints() {
1421
+ return this.compositeUniqueConstraints.map((constraint) => ({
1422
+ ...constraint,
1423
+ columns: [...constraint.columns]
1424
+ }));
1425
+ }
1426
+ /**
1382
1427
  * Defines a column in the table with the given name.
1383
1428
  *
1384
1429
  * @param name The name of the column.
@@ -1420,6 +1465,13 @@ var TableBuilder = class {
1420
1465
  if (!column) throw new Error(`Column [${targetName}] was not found in the table definition.`);
1421
1466
  return column;
1422
1467
  }
1468
+ normalizeCompositeColumns(columns, label) {
1469
+ const normalized = columns.map((column) => column.trim());
1470
+ if (normalized.length < 2) throw new Error(`A composite ${label} must contain at least two columns.`);
1471
+ if (normalized.some((column) => !column)) throw new Error(`Composite ${label} columns must be non-empty strings.`);
1472
+ if (new Set(normalized).size !== normalized.length) throw new Error(`Composite ${label} columns must be unique.`);
1473
+ return normalized;
1474
+ }
1423
1475
  };
1424
1476
 
1425
1477
  //#endregion
@@ -1445,12 +1497,17 @@ var SchemaBuilder = class {
1445
1497
  createTable(table, callback) {
1446
1498
  const builder = new TableBuilder();
1447
1499
  callback(builder);
1500
+ const primaryKey = builder.getPrimaryKey();
1501
+ this.validateCompositePrimaryKey(table, primaryKey, builder.getColumns(), true);
1502
+ this.validateCompositeUniqueConstraints(table, builder.getUniqueConstraints(), builder.getColumns(), true);
1448
1503
  this.operations.push({
1449
1504
  type: "createTable",
1450
1505
  table,
1451
1506
  columns: builder.getColumns(),
1452
1507
  indexes: builder.getIndexes(),
1453
- foreignKeys: builder.getForeignKeys()
1508
+ foreignKeys: builder.getForeignKeys(),
1509
+ primaryKey,
1510
+ uniqueConstraints: builder.getUniqueConstraints()
1454
1511
  });
1455
1512
  return this;
1456
1513
  }
@@ -1464,13 +1521,18 @@ var SchemaBuilder = class {
1464
1521
  alterTable(table, callback) {
1465
1522
  const builder = new TableBuilder();
1466
1523
  callback(builder);
1524
+ const primaryKey = builder.getPrimaryKey();
1525
+ this.validateCompositePrimaryKey(table, primaryKey, builder.getColumns(), false);
1526
+ this.validateCompositeUniqueConstraints(table, builder.getUniqueConstraints(), builder.getColumns(), false);
1467
1527
  this.operations.push({
1468
1528
  type: "alterTable",
1469
1529
  table,
1470
1530
  addColumns: builder.getColumns(),
1471
1531
  dropColumns: builder.getDropColumns(),
1472
1532
  addIndexes: builder.getIndexes(),
1473
- addForeignKeys: builder.getForeignKeys()
1533
+ addForeignKeys: builder.getForeignKeys(),
1534
+ addPrimaryKey: primaryKey,
1535
+ addUniqueConstraints: builder.getUniqueConstraints()
1474
1536
  });
1475
1537
  return this;
1476
1538
  }
@@ -1504,7 +1566,15 @@ var SchemaBuilder = class {
1504
1566
  ...index,
1505
1567
  columns: [...index.columns]
1506
1568
  })),
1507
- foreignKeys: operation.foreignKeys.map((foreignKey) => ({ ...foreignKey }))
1569
+ foreignKeys: operation.foreignKeys.map((foreignKey) => ({ ...foreignKey })),
1570
+ primaryKey: operation.primaryKey ? {
1571
+ ...operation.primaryKey,
1572
+ columns: [...operation.primaryKey.columns]
1573
+ } : void 0,
1574
+ uniqueConstraints: operation.uniqueConstraints?.map((constraint) => ({
1575
+ ...constraint,
1576
+ columns: [...constraint.columns]
1577
+ }))
1508
1578
  };
1509
1579
  if (operation.type === "alterTable") return {
1510
1580
  ...operation,
@@ -1517,11 +1587,37 @@ var SchemaBuilder = class {
1517
1587
  ...index,
1518
1588
  columns: [...index.columns]
1519
1589
  })),
1520
- addForeignKeys: operation.addForeignKeys.map((foreignKey) => ({ ...foreignKey }))
1590
+ addForeignKeys: operation.addForeignKeys.map((foreignKey) => ({ ...foreignKey })),
1591
+ addPrimaryKey: operation.addPrimaryKey ? {
1592
+ ...operation.addPrimaryKey,
1593
+ columns: [...operation.addPrimaryKey.columns]
1594
+ } : void 0,
1595
+ addUniqueConstraints: operation.addUniqueConstraints?.map((constraint) => ({
1596
+ ...constraint,
1597
+ columns: [...constraint.columns]
1598
+ }))
1521
1599
  };
1522
1600
  return { ...operation };
1523
1601
  });
1524
1602
  }
1603
+ validateCompositePrimaryKey(table, primaryKey, columns, requireColumns) {
1604
+ if (!primaryKey) return;
1605
+ if (columns.some((column) => column.primary)) throw new Error(`Table [${table}] cannot combine column primary keys with a composite primary key.`);
1606
+ if (!requireColumns) return;
1607
+ primaryKey.columns.forEach((columnName) => {
1608
+ const column = columns.find((candidate) => candidate.name === columnName);
1609
+ if (!column) throw new Error(`Composite primary key column [${columnName}] was not found on table [${table}].`);
1610
+ if (column.nullable) throw new Error(`Composite primary key column [${columnName}] on table [${table}] cannot be nullable.`);
1611
+ });
1612
+ }
1613
+ validateCompositeUniqueConstraints(table, constraints, columns, requireColumns) {
1614
+ if (!requireColumns) return;
1615
+ constraints.forEach((constraint) => {
1616
+ constraint.columns.forEach((columnName) => {
1617
+ if (!columns.some((column) => column.name === columnName)) throw new Error(`Composite unique constraint column [${columnName}] was not found on table [${table}].`);
1618
+ });
1619
+ });
1620
+ }
1525
1621
  };
1526
1622
 
1527
1623
  //#endregion
@@ -1745,6 +1841,24 @@ const buildIndexLine = (index) => {
1745
1841
  return ` @@index([${index.columns.join(", ")}]${typeof index.name === "string" && index.name.trim().length > 0 ? `, name: "${index.name.replace(/"/g, "\\\"")}"` : ""})`;
1746
1842
  };
1747
1843
  /**
1844
+ * Build a Prisma model-level composite primary key definition.
1845
+ *
1846
+ * @param primaryKey
1847
+ * @returns
1848
+ */
1849
+ const buildPrimaryKeyLine = (primaryKey) => {
1850
+ return ` @@id([${primaryKey.columns.join(", ")}]${typeof primaryKey.name === "string" && primaryKey.name.trim().length > 0 ? `, name: "${primaryKey.name.replace(/"/g, "\\\"")}"` : ""})`;
1851
+ };
1852
+ /**
1853
+ * Build a Prisma model-level composite unique constraint definition.
1854
+ *
1855
+ * @param constraint
1856
+ * @returns
1857
+ */
1858
+ const buildUniqueConstraintLine = (constraint) => {
1859
+ return ` @@unique([${constraint.columns.join(", ")}]${typeof constraint.name === "string" && constraint.name.trim().length > 0 ? `, name: "${constraint.name.replace(/"/g, "\\\"")}"` : ""})`;
1860
+ };
1861
+ /**
1748
1862
  * Derive a relation field name from a foreign key column name by applying
1749
1863
  * common conventions, such as removing "Id" suffixes and converting to camelCase.
1750
1864
  *
@@ -1893,7 +2007,14 @@ const buildModelBlock = (operation) => {
1893
2007
  const mapped = operation.table !== modelName.toLowerCase();
1894
2008
  const fields = operation.columns.map(buildFieldLine);
1895
2009
  const relations = (operation.foreignKeys ?? []).map((foreignKey) => buildRelationLine(modelName, foreignKey, operation.columns));
1896
- const metadata = [...(operation.indexes ?? []).map(buildIndexLine), ...mapped ? [` @@map("${str(operation.table).snake()}")`] : []];
2010
+ const indexes = (operation.indexes ?? []).map(buildIndexLine);
2011
+ const uniqueConstraints = (operation.uniqueConstraints ?? []).map(buildUniqueConstraintLine);
2012
+ const metadata = [
2013
+ ...operation.primaryKey ? [buildPrimaryKeyLine(operation.primaryKey)] : [],
2014
+ ...uniqueConstraints,
2015
+ ...indexes,
2016
+ ...mapped ? [` @@map("${str(operation.table).snake()}")`] : []
2017
+ ];
1897
2018
  return `model ${modelName} {\n${(metadata.length > 0 ? [
1898
2019
  ...fields,
1899
2020
  ...relations,
@@ -1990,6 +2111,18 @@ const applyAlterTableOperation = (schema, operation) => {
1990
2111
  const insertIndex = Math.max(1, bodyLines.length - 1);
1991
2112
  bodyLines.splice(insertIndex, 0, indexLine);
1992
2113
  });
2114
+ if (operation.addPrimaryKey) {
2115
+ const primaryKeyLine = buildPrimaryKeyLine(operation.addPrimaryKey);
2116
+ 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.`);
2117
+ const insertIndex = Math.max(1, bodyLines.length - 1);
2118
+ bodyLines.splice(insertIndex, 0, primaryKeyLine);
2119
+ }
2120
+ for (const constraint of operation.addUniqueConstraints ?? []) {
2121
+ const constraintLine = buildUniqueConstraintLine(constraint);
2122
+ if (bodyLines.some((line) => line.trim() === constraintLine.trim())) continue;
2123
+ const insertIndex = Math.max(1, bodyLines.length - 1);
2124
+ bodyLines.splice(insertIndex, 0, constraintLine);
2125
+ }
1993
2126
  for (const foreignKey of operation.addForeignKeys ?? []) {
1994
2127
  const relationLine = buildRelationLine(model.modelName, foreignKey, operation.addColumns);
1995
2128
  const relationRegex = new RegExp(`^\\s*${escapeRegex(foreignKey.fieldAlias?.trim() || deriveRelationFieldName(foreignKey.column))}\\s+`);
@@ -4866,4 +4999,4 @@ var MorphToManyRelation = class extends Relation {
4866
4999
  };
4867
5000
 
4868
5001
  //#endregion
4869
- export { deletePersistedColumnMappingsState as $, supportsDatabaseCreation as $t, isDelegateLike as A, RelationTableLoader as An, buildModelBlock as At, getRegisteredSeeders as B, findModelBlock as Bt, getRuntimeAdapter as C, resolveMigrationStateFilePath as Cn, applyMigrationToPrismaSchema as Ct, getRuntimePaginationURLDriverFactory as D, RuntimeModuleLoader as Dn, buildIndexLine as Dt, getRuntimePaginationCurrentPageResolver as E, writeAppliedMigrationsStateToStore as En, buildFieldLine as Et, runArkormTransaction as F, deriveRelationAlias as Ft, registerFactories as G, getMigrationPlan as Gt, loadMigrationsFrom as H, formatEnumDefaultValue as Ht, getRegisteredFactories as I, deriveRelationFieldName as It, registerPaths as J, resolveMigrationClassName as Jt, registerMigrations as K, pad as Kt, getRegisteredMigrations as L, deriveSingularFieldName as Lt, isTransactionCapableClient as M, ArkormCollection as Mn, createMigrationTimestamp as Mt, loadArkormConfig as N, ArkormException as Nn, deriveCollectionFieldName as Nt, getRuntimePrismaClient as O, UnsupportedAdapterFeatureException as On, buildInverseRelationLine as Ot, resetArkormRuntimeForTests as P, deriveInverseRelationAlias as Pt, createEmptyPersistedColumnMappingsState as Q, stripPrismaSchemaModelsAndEnums as Qt, getRegisteredModels as R, escapeRegex as Rt, getDefaultStubsPath as S, removeAppliedMigration as Sn, applyMigrationToDatabase as St, getRuntimeDebugHandler as T, writeAppliedMigrationsState as Tn, buildEnumBlock as Tt, loadModelsFrom as U, formatRelationAction as Ut, loadFactoriesFrom as V, formatDefaultValue as Vt, loadSeedersFrom as W, generateMigrationFile as Wt, resetRuntimeRegistryForTests as X, runMigrationWithPrisma as Xt, registerSeeders as Y, resolvePrismaType as Yt, applyOperationsToPersistedColumnMappingsState as Z, runPrismaCommand as Zt, defineConfig as _, isMigrationApplied as _n, applyAlterTableOperation as _t, HasOneRelation as a, EnumBuilder as an, getPersistedTimestampColumns as at, getActiveTransactionAdapter as b, readAppliedMigrationsState as bn, applyMigrationRollbackToDatabase as bt, BelongsToRelation as c, PrimaryKeyGenerationPlanner as cn, resetPersistedColumnMappingsCache as ct, Relation as d, computeMigrationChecksum as dn, syncPersistedColumnMappingsFromState as dt, supportsDatabaseMigrationExecution as en, getPersistedColumnMap as et, LengthAwarePaginator as f, createEmptyAppliedMigrationsState as fn, validatePersistedMetadataFeaturesForMigrations as ft, configureArkormRuntime as g, getLatestAppliedMigrations as gn, PRISMA_MODEL_REGEX as gt, bindAdapterToModels as h, getLastMigrationRun as hn, PRISMA_ENUM_REGEX as ht, HasOneThroughRelation as i, SchemaBuilder as in, getPersistedTableMetadata as it, isQuerySchemaLike as j, RelationResolutionException as jn, buildRelationLine as jt, getUserConfig as k, SetBasedEagerLoader as kn, buildMigrationSource as kt, SingleResultRelation as l, buildMigrationIdentity as ln, resolveColumnMappingsFilePath as lt, URLDriver as m, findAppliedMigration as mn, PRISMA_ENUM_MEMBER_REGEX as mt, MorphOneRelation as n, toMigrationFileSlug as nn, getPersistedEnumTsType as nt, HasManyThroughRelation as o, TableBuilder as on, readPersistedColumnMappingsState as ot, Paginator as p, deleteAppliedMigrationsStateFromStore as pn, writePersistedColumnMappingsState as pt, registerModels as q, resolveEnumName as qt, MorphManyRelation as r, toModelName as rn, getPersistedPrimaryKeyGeneration as rt, HasManyRelation as s, ForeignKeyBuilder as sn, rebuildPersistedColumnMappingsState as st, MorphToManyRelation as t, supportsDatabaseReset as tn, getPersistedEnumMap as tt, BelongsToManyRelation as u, buildMigrationRunId as un, resolvePersistedMetadataFeatures as ut, emitRuntimeDebugEvent as v, markMigrationApplied as vn, applyCreateTableOperation as vt, getRuntimeClient as w, supportsDatabaseMigrationState as wn, applyOperationsToPrismaSchema as wt, getActiveTransactionClient as x, readAppliedMigrationsStateFromStore as xn, applyMigrationRollbackToPrismaSchema as xt, ensureArkormConfigLoading as y, markMigrationRun as yn, applyDropTableOperation as yt, getRegisteredPaths as z, findEnumBlock as zt };
5002
+ 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, PrimaryKeyGenerationPlanner 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, ForeignKeyBuilder 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkormx",
3
- "version": "2.4.6",
3
+ "version": "2.4.8",
4
4
  "description": "Modern TypeScript-first ORM for Node.js.",
5
5
  "keywords": [
6
6
  "orm",