@forklaunch/better-auth-mikro-orm-fork 0.4.104 → 0.4.105

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/lib/adapter.cjs CHANGED
@@ -25,7 +25,7 @@ __export(src_exports, {
25
25
  module.exports = __toCommonJS(src_exports);
26
26
 
27
27
  // src/adapter.ts
28
- var import_adapters = require("better-auth/adapters");
28
+ var import_adapters = require("@forklaunch/better-auth/adapters");
29
29
  var import_dset2 = require("dset");
30
30
 
31
31
  // src/utils/adapterUtils.ts
@@ -188,14 +188,18 @@ function createAdapterUtils(orm) {
188
188
  }
189
189
  const result = {};
190
190
  where.filter(({ connector }) => !connector || connector === "AND").forEach(({ field, operator, value }, index) => {
191
- const path = ["$and", index].concat(getFieldPath(metadata2, field, true));
191
+ const path = ["$and", index].concat(
192
+ getFieldPath(metadata2, field, true)
193
+ );
192
194
  if (operator === "in") {
193
195
  return createWhereInClause(field, path, value, result);
194
196
  }
195
197
  return createWhereClause(path, value, "eq", result);
196
198
  });
197
199
  where.filter(({ connector }) => connector === "OR").forEach(({ field, value }, index) => {
198
- const path = ["$and", index].concat(getFieldPath(metadata2, field, true));
200
+ const path = ["$and", index].concat(
201
+ getFieldPath(metadata2, field, true)
202
+ );
199
203
  return createWhereClause(path, value, "eq", result);
200
204
  });
201
205
  return result;
package/lib/adapter.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import * as better_auth from 'better-auth';
1
+ import * as _forklaunch_better_auth from '@forklaunch/better-auth';
2
2
  import { MikroORM } from '@mikro-orm/core';
3
- import { AdapterDebugLogs } from 'better-auth/adapters';
3
+ import { AdapterDebugLogs } from '@forklaunch/better-auth/adapters';
4
4
 
5
5
  interface MikroOrmAdapterConfig {
6
6
  /**
@@ -32,6 +32,6 @@ interface MikroOrmAdapterConfig {
32
32
  * @param orm - Instance of Mikro ORM returned from `MikroORM.init` or `MikroORM.initSync` methods
33
33
  * @param config - Additional configuration for Mikro ORM adapter
34
34
  */
35
- declare const mikroOrmAdapter: (orm: MikroORM, { debugLogs, supportsJSON }?: MikroOrmAdapterConfig) => (options: better_auth.BetterAuthOptions) => better_auth.Adapter;
35
+ declare const mikroOrmAdapter: (orm: MikroORM, { debugLogs, supportsJSON }?: MikroOrmAdapterConfig) => (options: _forklaunch_better_auth.BetterAuthOptions) => _forklaunch_better_auth.Adapter;
36
36
 
37
37
  export { type MikroOrmAdapterConfig, mikroOrmAdapter };
package/lib/adapter.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as better_auth from 'better-auth';
1
+ import * as _forklaunch_better_auth from '@forklaunch/better-auth';
2
2
  import { MikroORM } from '@mikro-orm/core';
3
- import { AdapterDebugLogs } from 'better-auth/adapters';
3
+ import { AdapterDebugLogs } from '@forklaunch/better-auth/adapters';
4
4
 
5
5
  interface MikroOrmAdapterConfig {
6
6
  /**
@@ -32,6 +32,6 @@ interface MikroOrmAdapterConfig {
32
32
  * @param orm - Instance of Mikro ORM returned from `MikroORM.init` or `MikroORM.initSync` methods
33
33
  * @param config - Additional configuration for Mikro ORM adapter
34
34
  */
35
- declare const mikroOrmAdapter: (orm: MikroORM, { debugLogs, supportsJSON }?: MikroOrmAdapterConfig) => (options: better_auth.BetterAuthOptions) => better_auth.Adapter;
35
+ declare const mikroOrmAdapter: (orm: MikroORM, { debugLogs, supportsJSON }?: MikroOrmAdapterConfig) => (options: _forklaunch_better_auth.BetterAuthOptions) => _forklaunch_better_auth.Adapter;
36
36
 
37
37
  export { type MikroOrmAdapterConfig, mikroOrmAdapter };
package/lib/adapter.js CHANGED
@@ -1,5 +1,7 @@
1
1
  // src/adapter.ts
2
- import { createAdapter } from "better-auth/adapters";
2
+ import {
3
+ createAdapter
4
+ } from "@forklaunch/better-auth/adapters";
3
5
  import { dset as dset2 } from "dset";
4
6
 
5
7
  // src/utils/adapterUtils.ts
@@ -162,14 +164,18 @@ function createAdapterUtils(orm) {
162
164
  }
163
165
  const result = {};
164
166
  where.filter(({ connector }) => !connector || connector === "AND").forEach(({ field, operator, value }, index) => {
165
- const path = ["$and", index].concat(getFieldPath(metadata2, field, true));
167
+ const path = ["$and", index].concat(
168
+ getFieldPath(metadata2, field, true)
169
+ );
166
170
  if (operator === "in") {
167
171
  return createWhereInClause(field, path, value, result);
168
172
  }
169
173
  return createWhereClause(path, value, "eq", result);
170
174
  });
171
175
  where.filter(({ connector }) => connector === "OR").forEach(({ field, value }, index) => {
172
- const path = ["$and", index].concat(getFieldPath(metadata2, field, true));
176
+ const path = ["$and", index].concat(
177
+ getFieldPath(metadata2, field, true)
178
+ );
173
179
  return createWhereClause(path, value, "eq", result);
174
180
  });
175
181
  return result;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "type": "module",
4
4
  "name": "@forklaunch/better-auth-mikro-orm-fork",
5
- "version": "0.4.104",
5
+ "version": "0.4.105",
6
6
  "description": "Mikro ORM Adapter for Better Auth",
7
7
  "keywords": [
8
8
  "auth",
@@ -59,7 +59,7 @@
59
59
  "@types/uuid": "10.0.0",
60
60
  "@vitest/coverage-v8": "3.1.1",
61
61
  "@vitest/ui": "3.1.1",
62
- "better-auth": "1.2.9",
62
+ "@forklaunch/better-auth": "1.3.8",
63
63
  "del-cli": "6.0.0",
64
64
  "es-toolkit": "1.39.7",
65
65
  "husky": "9.1.7",