@forklaunch/better-auth-mikro-orm-fork 0.5.2 → 0.5.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/lib/adapter.cjs +0 -13
- package/lib/adapter.js +1 -14
- package/package.json +1 -1
package/lib/adapter.cjs
CHANGED
|
@@ -138,19 +138,6 @@ function createAdapterUtils(orm) {
|
|
|
138
138
|
return fields;
|
|
139
139
|
};
|
|
140
140
|
const normalizeOutput = (metadata2, output) => {
|
|
141
|
-
try {
|
|
142
|
-
const wrapped = (0, import_core.wrap)(output, true);
|
|
143
|
-
if (wrapped.__originalEntityData) {
|
|
144
|
-
for (const prop of metadata2.props) {
|
|
145
|
-
if (prop.kind !== import_core.ReferenceKind.SCALAR) continue;
|
|
146
|
-
const val = output[prop.name];
|
|
147
|
-
if (val !== void 0) {
|
|
148
|
-
wrapped.__originalEntityData[prop.name] = val;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
} catch {
|
|
153
|
-
}
|
|
154
141
|
const serialized = (0, import_core.serialize)(output);
|
|
155
142
|
const result = {};
|
|
156
143
|
Object.entries(serialized).map(([key, value]) => ({
|
package/lib/adapter.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import { dset as dset2 } from "dset";
|
|
6
6
|
|
|
7
7
|
// src/utils/adapterUtils.ts
|
|
8
|
-
import { ReferenceKind, serialize
|
|
8
|
+
import { ReferenceKind, serialize } from "@mikro-orm/core";
|
|
9
9
|
import { dset } from "dset";
|
|
10
10
|
|
|
11
11
|
// src/utils/createAdapterError.ts
|
|
@@ -114,19 +114,6 @@ function createAdapterUtils(orm) {
|
|
|
114
114
|
return fields;
|
|
115
115
|
};
|
|
116
116
|
const normalizeOutput = (metadata2, output) => {
|
|
117
|
-
try {
|
|
118
|
-
const wrapped = wrap(output, true);
|
|
119
|
-
if (wrapped.__originalEntityData) {
|
|
120
|
-
for (const prop of metadata2.props) {
|
|
121
|
-
if (prop.kind !== ReferenceKind.SCALAR) continue;
|
|
122
|
-
const val = output[prop.name];
|
|
123
|
-
if (val !== void 0) {
|
|
124
|
-
wrapped.__originalEntityData[prop.name] = val;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
} catch {
|
|
129
|
-
}
|
|
130
117
|
const serialized = serialize(output);
|
|
131
118
|
const result = {};
|
|
132
119
|
Object.entries(serialized).map(([key, value]) => ({
|