arkormx 2.12.0 → 2.12.2

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.
@@ -6624,81 +6624,6 @@ var HasOneThroughRelation = class extends SingleResultRelation {
6624
6624
  }
6625
6625
  };
6626
6626
 
6627
- //#endregion
6628
- //#region src/relationship/MorphedByManyRelation.ts
6629
- /**
6630
- * Defines the inverse side of a polymorphic many-to-many relationship.
6631
- *
6632
- * @author Legacy (3m1n3nc3)
6633
- * @since 2.12.0
6634
- */
6635
- var MorphedByManyRelation = class extends Relation {
6636
- constructor(parent, related, throughTable, morphName, foreignPivotKey, morphTypeColumn, relatedPivotKey, parentKey, relatedKey) {
6637
- super();
6638
- this.parent = parent;
6639
- this.related = related;
6640
- this.throughTable = throughTable;
6641
- this.morphName = morphName;
6642
- this.foreignPivotKey = foreignPivotKey;
6643
- this.morphTypeColumn = morphTypeColumn;
6644
- this.relatedPivotKey = relatedPivotKey;
6645
- this.parentKey = parentKey;
6646
- this.relatedKey = relatedKey;
6647
- }
6648
- /**
6649
- * Build the relationship query.
6650
- *
6651
- * @returns
6652
- */
6653
- async getQuery() {
6654
- const parentValue = this.parent.getAttribute(this.parentKey);
6655
- const morphType = this.related.name;
6656
- const ids = await this.createRelationTableLoader().selectColumnValues({
6657
- lookup: {
6658
- table: this.throughTable,
6659
- where: {
6660
- type: "group",
6661
- operator: "and",
6662
- conditions: [{
6663
- type: "comparison",
6664
- column: this.foreignPivotKey,
6665
- operator: "=",
6666
- value: parentValue
6667
- }, {
6668
- type: "comparison",
6669
- column: this.morphTypeColumn,
6670
- operator: "=",
6671
- value: morphType
6672
- }]
6673
- }
6674
- },
6675
- column: this.relatedPivotKey
6676
- });
6677
- return this.applyConstraint(this.related.query().where({ [this.relatedKey]: { in: ids } }));
6678
- }
6679
- getMetadata() {
6680
- return {
6681
- type: "morphedByMany",
6682
- relatedModel: this.related,
6683
- throughTable: this.throughTable,
6684
- morphName: this.morphName,
6685
- foreignPivotKey: this.foreignPivotKey,
6686
- morphTypeColumn: this.morphTypeColumn,
6687
- relatedPivotKey: this.relatedPivotKey,
6688
- parentKey: this.parentKey,
6689
- relatedKey: this.relatedKey
6690
- };
6691
- }
6692
- /**
6693
- * Fetch the related models.
6694
- *
6695
- * @returns
6696
- */
6697
- async getResults() {
6698
- return (await this.getQuery()).get();
6699
- }
6700
- };
6701
-
6702
6627
  //#endregion
6703
6628
  //#region src/relationship/MorphManyRelation.ts
6704
6629
  /**
@@ -6886,6 +6811,81 @@ var MorphToManyRelation = class extends Relation {
6886
6811
  }
6887
6812
  };
6888
6813
 
6814
+ //#endregion
6815
+ //#region src/relationship/MorphedByManyRelation.ts
6816
+ /**
6817
+ * Defines the inverse side of a polymorphic many-to-many relationship.
6818
+ *
6819
+ * @author Legacy (3m1n3nc3)
6820
+ * @since 2.12.0
6821
+ */
6822
+ var MorphedByManyRelation = class extends Relation {
6823
+ constructor(parent, related, throughTable, morphName, foreignPivotKey, morphTypeColumn, relatedPivotKey, parentKey, relatedKey) {
6824
+ super();
6825
+ this.parent = parent;
6826
+ this.related = related;
6827
+ this.throughTable = throughTable;
6828
+ this.morphName = morphName;
6829
+ this.foreignPivotKey = foreignPivotKey;
6830
+ this.morphTypeColumn = morphTypeColumn;
6831
+ this.relatedPivotKey = relatedPivotKey;
6832
+ this.parentKey = parentKey;
6833
+ this.relatedKey = relatedKey;
6834
+ }
6835
+ /**
6836
+ * Build the relationship query.
6837
+ *
6838
+ * @returns
6839
+ */
6840
+ async getQuery() {
6841
+ const parentValue = this.parent.getAttribute(this.parentKey);
6842
+ const morphType = this.related.name;
6843
+ const ids = await this.createRelationTableLoader().selectColumnValues({
6844
+ lookup: {
6845
+ table: this.throughTable,
6846
+ where: {
6847
+ type: "group",
6848
+ operator: "and",
6849
+ conditions: [{
6850
+ type: "comparison",
6851
+ column: this.foreignPivotKey,
6852
+ operator: "=",
6853
+ value: parentValue
6854
+ }, {
6855
+ type: "comparison",
6856
+ column: this.morphTypeColumn,
6857
+ operator: "=",
6858
+ value: morphType
6859
+ }]
6860
+ }
6861
+ },
6862
+ column: this.relatedPivotKey
6863
+ });
6864
+ return this.applyConstraint(this.related.query().where({ [this.relatedKey]: { in: ids } }));
6865
+ }
6866
+ getMetadata() {
6867
+ return {
6868
+ type: "morphedByMany",
6869
+ relatedModel: this.related,
6870
+ throughTable: this.throughTable,
6871
+ morphName: this.morphName,
6872
+ foreignPivotKey: this.foreignPivotKey,
6873
+ morphTypeColumn: this.morphTypeColumn,
6874
+ relatedPivotKey: this.relatedPivotKey,
6875
+ parentKey: this.parentKey,
6876
+ relatedKey: this.relatedKey
6877
+ };
6878
+ }
6879
+ /**
6880
+ * Fetch the related models.
6881
+ *
6882
+ * @returns
6883
+ */
6884
+ async getResults() {
6885
+ return (await this.getQuery()).get();
6886
+ }
6887
+ };
6888
+
6889
6889
  //#endregion
6890
6890
  //#region src/relationship/MorphToRelation.ts
6891
6891
  /**
@@ -6969,4 +6969,4 @@ var MorphToRelation = class extends Relation {
6969
6969
  };
6970
6970
 
6971
6971
  //#endregion
6972
- export { buildPrimaryKeyLine as $, markMigrationRun as $n, awaitConfiguredModelsRegistration as $t, resetPersistedColumnMappingsCache as A, loadSeedersFrom as An, SchemaBuilder as At, applyCreateTableOperation as B, PrimaryKeyGenerationPlanner as Bn, coalesce as Bt, getPersistedEnumMap as C, getRegisteredMigrations as Cn, supportsDatabaseCreation as Ct, getPersistedTimestampColumns as D, loadFactoriesFrom as Dn, toModelName as Dt, getPersistedTableMetadata as E, getRegisteredSeeders as En, toMigrationFileSlug as Et, writePersistedColumnMappingsState as F, registerSeeders as Fn, CaseExpression as Ft, applyMigrationToPrismaSchema as G, createEmptyAppliedMigrationsState as Gn, fromExpressionNode as Gt, applyMigrationRollbackToDatabase as H, buildMigrationIdentity as Hn, count as Ht, PRISMA_ENUM_MEMBER_REGEX as I, resetRuntimeRegistryForTests as In, Expression as It, buildFieldLine as J, getLastBatchMigrations as Jn, min as Jt, applyOperationsToPrismaSchema as K, deleteAppliedMigrationsStateFromStore as Kn, json as Kt, PRISMA_ENUM_REGEX as L, resolveRegisteredModel as Ln, JsonExpression as Lt, resolvePersistedMetadataFeatures as M, registerMigrations as Mn, TableBuilder as Mt, syncPersistedColumnMappingsFromState as N, registerModels as Nn, resolveGeneratedExpression as Nt, readPersistedColumnMappingsState as O, loadMigrationsFrom as On, isMigrationPlanningActive as Ot, validatePersistedMetadataFeaturesForMigrations as P, registerPaths as Pn, AggregateExpression as Pt, buildModelBlock as Q, markMigrationApplied as Qn, where as Qt, PRISMA_MODEL_REGEX as R, UnsupportedAdapterFeatureException as Rn, avg as Rt, getPersistedColumnMap as S, getRegisteredFactories as Sn, stripPrismaSchemaModelsAndEnums as St, getPersistedPrimaryKeyGeneration as T, getRegisteredPaths as Tn, supportsDatabaseReset as Tt, applyMigrationRollbackToPrismaSchema as U, buildMigrationRunId as Un, expressionBuilder as Ut, applyDropTableOperation as V, ForeignKeyBuilder as Vn, col as Vt, applyMigrationToDatabase as W, computeMigrationChecksum as Wn, fn as Wt, buildInverseRelationLine as X, getLatestAppliedMigrations as Xn, sum as Xt, buildIndexLine as Y, getLastMigrationRun as Yn, raw as Yt, buildMigrationSource as Z, isMigrationApplied as Zn, val as Zt, SetBasedEagerLoader as _, isQuerySchemaLike as _n, resolveEnumName as _t, MorphedByManyRelation as a, ensureArkormConfigLoading as an, writeAppliedMigrationsState as ar, deriveRelationAlias as at, createEmptyPersistedColumnMappingsState as b, resetArkormRuntimeForTests as bn, runMigrationWithPrisma as bt, HasManyThroughRelation as c, getDefaultStubsPath as cn, ArkormCollection as cr, escapeRegex as ct, SingleResultRelation as d, getRuntimeDebugHandler as dn, formatDefaultValue as dt, bindAdapterToModels as en, readAppliedMigrationsState as er, buildRelationLine as et, BelongsToManyRelation as f, getRuntimePaginationCurrentPageResolver as fn, formatEnumDefaultValue as ft, URLDriver as g, isDelegateLike as gn, pad as gt, Paginator as h, getUserConfig as hn, getMigrationPlan as ht, MorphManyRelation as i, emitRuntimeDebugEvent as in, supportsDatabaseMigrationState as ir, deriveInverseRelationAlias as it, resolveColumnMappingsFilePath as j, registerFactories as jn, EnumBuilder as jt, rebuildPersistedColumnMappingsState as k, loadModelsFrom as kn, runInMigrationPlanning as kt, HasManyRelation as l, getRuntimeAdapter as ln, ArkormException as lr, findEnumBlock as lt, LengthAwarePaginator as m, getRuntimePrismaClient as mn, generateMigrationFile as mt, MorphToManyRelation as n, defineConfig as nn, removeAppliedMigration as nr, createMigrationTimestamp as nt, HasOneThroughRelation as o, getActiveTransactionAdapter as on, writeAppliedMigrationsStateToStore as or, deriveRelationFieldName as ot, Relation as p, getRuntimePaginationURLDriverFactory as pn, formatRelationAction as pt, buildEnumBlock as q, findAppliedMigration as qn, max as qt, MorphOneRelation as r, disposeArkormRuntime as rn, resolveMigrationStateFilePath as rr, deriveCollectionFieldName as rt, HasOneRelation as s, getActiveTransactionClient as sn, RelationResolutionException as sr, deriveSingularFieldName as st, MorphToRelation as t, configureArkormRuntime as tn, readAppliedMigrationsStateFromStore as tr, buildUniqueConstraintLine as tt, BelongsToRelation as u, getRuntimeClient as un, findModelBlock as ut, RelationTableLoader as v, isTransactionCapableClient as vn, resolveMigrationClassName as vt, getPersistedEnumTsType as w, getRegisteredModels as wn, supportsDatabaseMigrationExecution as wt, deletePersistedColumnMappingsState as x, runArkormTransaction as xn, runPrismaCommand as xt, applyOperationsToPersistedColumnMappingsState as y, loadArkormConfig as yn, resolvePrismaType as yt, applyAlterTableOperation as z, RuntimeModuleLoader as zn, caseWhen as zt };
6972
+ export { buildPrimaryKeyLine as $, readAppliedMigrationsState as $n, bindAdapterToModels as $t, resetPersistedColumnMappingsCache as A, registerFactories as An, EnumBuilder as At, applyCreateTableOperation as B, ForeignKeyBuilder as Bn, col as Bt, getPersistedEnumMap as C, getRegisteredModels as Cn, supportsDatabaseCreation as Ct, getPersistedTimestampColumns as D, loadMigrationsFrom as Dn, toModelName as Dt, getPersistedTableMetadata as E, loadFactoriesFrom as En, toMigrationFileSlug as Et, writePersistedColumnMappingsState as F, resetRuntimeRegistryForTests as Fn, Expression as Ft, applyMigrationToPrismaSchema as G, deleteAppliedMigrationsStateFromStore as Gn, json as Gt, applyMigrationRollbackToDatabase as H, buildMigrationRunId as Hn, expressionBuilder as Ht, PRISMA_ENUM_MEMBER_REGEX as I, resolveRegisteredModel as In, JsonExpression as It, buildFieldLine as J, getLastMigrationRun as Jn, raw as Jt, applyOperationsToPrismaSchema as K, findAppliedMigration as Kn, max as Kt, PRISMA_ENUM_REGEX as L, UnsupportedAdapterFeatureException as Ln, avg as Lt, resolvePersistedMetadataFeatures as M, registerModels as Mn, resolveGeneratedExpression as Mt, syncPersistedColumnMappingsFromState as N, registerPaths as Nn, AggregateExpression as Nt, readPersistedColumnMappingsState as O, loadModelsFrom as On, isMigrationPlanningActive as Ot, validatePersistedMetadataFeaturesForMigrations as P, registerSeeders as Pn, CaseExpression as Pt, buildModelBlock as Q, markMigrationRun as Qn, awaitConfiguredModelsRegistration as Qt, PRISMA_MODEL_REGEX as R, RuntimeModuleLoader as Rn, caseWhen as Rt, getPersistedColumnMap as S, getRegisteredMigrations as Sn, stripPrismaSchemaModelsAndEnums as St, getPersistedPrimaryKeyGeneration as T, getRegisteredSeeders as Tn, supportsDatabaseReset as Tt, applyMigrationRollbackToPrismaSchema as U, computeMigrationChecksum as Un, fn as Ut, applyDropTableOperation as V, buildMigrationIdentity as Vn, count as Vt, applyMigrationToDatabase as W, createEmptyAppliedMigrationsState as Wn, fromExpressionNode as Wt, buildInverseRelationLine as X, isMigrationApplied as Xn, val as Xt, buildIndexLine as Y, getLatestAppliedMigrations as Yn, sum as Yt, buildMigrationSource as Z, markMigrationApplied as Zn, where as Zt, SetBasedEagerLoader as _, isTransactionCapableClient as _n, resolveEnumName as _t, MorphManyRelation as a, getActiveTransactionAdapter as an, writeAppliedMigrationsStateToStore as ar, deriveRelationAlias as at, createEmptyPersistedColumnMappingsState as b, runArkormTransaction as bn, runMigrationWithPrisma as bt, HasManyThroughRelation as c, getRuntimeAdapter as cn, ArkormException as cr, escapeRegex as ct, SingleResultRelation as d, getRuntimePaginationCurrentPageResolver as dn, formatDefaultValue as dt, configureArkormRuntime as en, readAppliedMigrationsStateFromStore as er, buildRelationLine as et, BelongsToManyRelation as f, getRuntimePaginationURLDriverFactory as fn, formatEnumDefaultValue as ft, URLDriver as g, isQuerySchemaLike as gn, pad as gt, Paginator as h, isDelegateLike as hn, getMigrationPlan as ht, MorphOneRelation as i, ensureArkormConfigLoading as in, writeAppliedMigrationsState as ir, deriveInverseRelationAlias as it, resolveColumnMappingsFilePath as j, registerMigrations as jn, TableBuilder as jt, rebuildPersistedColumnMappingsState as k, loadSeedersFrom as kn, SchemaBuilder as kt, HasManyRelation as l, getRuntimeClient as ln, findEnumBlock as lt, LengthAwarePaginator as m, getUserConfig as mn, generateMigrationFile as mt, MorphedByManyRelation as n, disposeArkormRuntime as nn, resolveMigrationStateFilePath as nr, createMigrationTimestamp as nt, HasOneThroughRelation as o, getActiveTransactionClient as on, RelationResolutionException as or, deriveRelationFieldName as ot, Relation as p, getRuntimePrismaClient as pn, formatRelationAction as pt, buildEnumBlock as q, getLastBatchMigrations as qn, min as qt, MorphToManyRelation as r, emitRuntimeDebugEvent as rn, supportsDatabaseMigrationState as rr, deriveCollectionFieldName as rt, HasOneRelation as s, getDefaultStubsPath as sn, ArkormCollection as sr, deriveSingularFieldName as st, MorphToRelation as t, defineConfig as tn, removeAppliedMigration as tr, buildUniqueConstraintLine as tt, BelongsToRelation as u, getRuntimeDebugHandler as un, findModelBlock as ut, RelationTableLoader as v, loadArkormConfig as vn, resolveMigrationClassName as vt, getPersistedEnumTsType as w, getRegisteredPaths as wn, supportsDatabaseMigrationExecution as wt, deletePersistedColumnMappingsState as x, getRegisteredFactories as xn, runPrismaCommand as xt, applyOperationsToPersistedColumnMappingsState as y, resetArkormRuntimeForTests as yn, resolvePrismaType as yt, applyAlterTableOperation as z, PrimaryKeyGenerationPlanner as zn, coalesce as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkormx",
3
- "version": "2.12.0",
3
+ "version": "2.12.2",
4
4
  "description": "Modern TypeScript-first ORM for Node.js.",
5
5
  "keywords": [
6
6
  "orm",
@@ -106,6 +106,7 @@
106
106
  "build": "tsdown",
107
107
  "barrel": "barrelize",
108
108
  "release": "pnpm publish --access public --tag latest --no-git-checks",
109
+ "release:ci": "pnpm publish --access public --tag latest --no-git-checks --ignore-scripts",
109
110
  "docs:dev": "vitepress dev docs",
110
111
  "docs:build": "vitepress build docs",
111
112
  "docs:preview": "vitepress preview docs",