sonamu 0.4.13 → 0.4.14
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/bin/cli.js +51 -51
- package/dist/bin/cli.mjs +2 -2
- package/dist/{chunk-DMJSNO2L.js → chunk-2WAC2GER.js} +44 -44
- package/dist/{chunk-DMJSNO2L.js.map → chunk-2WAC2GER.js.map} +1 -1
- package/dist/{chunk-NI37CY4T.mjs → chunk-C3IPIF6O.mjs} +2 -2
- package/dist/{chunk-DYFCACHD.js → chunk-EXHKSVTE.js} +7 -7
- package/dist/{chunk-QJFHDCBN.mjs → chunk-FCERKIIF.mjs} +2 -2
- package/dist/chunk-FCERKIIF.mjs.map +1 -0
- package/dist/{chunk-DDJ7T4MA.mjs → chunk-HGIBJYOU.mjs} +2 -2
- package/dist/{chunk-NIFOTHBW.mjs → chunk-JKSOJRQA.mjs} +2 -2
- package/dist/{chunk-CXAVBVKC.js → chunk-OTKKFP3Y.js} +100 -100
- package/dist/{chunk-J6S43O7G.js → chunk-UZ2IY5VE.js} +4 -4
- package/dist/database/drivers/knex/base-model.js +8 -8
- package/dist/database/drivers/knex/base-model.mjs +3 -3
- package/dist/database/drivers/kysely/base-model.js +9 -9
- package/dist/database/drivers/kysely/base-model.mjs +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
- package/src/api/caster.ts +2 -2
- package/dist/chunk-QJFHDCBN.mjs.map +0 -1
- /package/dist/{chunk-NI37CY4T.mjs.map → chunk-C3IPIF6O.mjs.map} +0 -0
- /package/dist/{chunk-DYFCACHD.js.map → chunk-EXHKSVTE.js.map} +0 -0
- /package/dist/{chunk-DDJ7T4MA.mjs.map → chunk-HGIBJYOU.mjs.map} +0 -0
- /package/dist/{chunk-NIFOTHBW.mjs.map → chunk-JKSOJRQA.mjs.map} +0 -0
- /package/dist/{chunk-CXAVBVKC.js.map → chunk-OTKKFP3Y.js.map} +0 -0
- /package/dist/{chunk-J6S43O7G.js.map → chunk-UZ2IY5VE.js.map} +0 -0
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isStringProp,
|
|
17
17
|
isTextProp,
|
|
18
18
|
isVirtualProp
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FCERKIIF.mjs";
|
|
20
20
|
|
|
21
21
|
// src/entity/migrator.ts
|
|
22
22
|
import _ from "lodash";
|
|
@@ -1578,4 +1578,4 @@ export {
|
|
|
1578
1578
|
FixtureManagerClass,
|
|
1579
1579
|
FixtureManager
|
|
1580
1580
|
};
|
|
1581
|
-
//# sourceMappingURL=chunk-
|
|
1581
|
+
//# sourceMappingURL=chunk-C3IPIF6O.mjs.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk2WAC2GERjs = require('./chunk-2WAC2GER.js');
|
|
6
6
|
|
|
7
7
|
// src/database/upsert-builder.ts
|
|
8
8
|
var _uuid = require('uuid');
|
|
@@ -20,7 +20,7 @@ async function batchUpdate(db, tableName, ids, rows, chunkSize = 50, trx = null)
|
|
|
20
20
|
};
|
|
21
21
|
if (trx) {
|
|
22
22
|
for (const chunk of chunks) {
|
|
23
|
-
await executeUpdate(chunk,
|
|
23
|
+
await executeUpdate(chunk, _chunk2WAC2GERjs.DB.toClient(trx));
|
|
24
24
|
}
|
|
25
25
|
} else {
|
|
26
26
|
await db.trx(async (newTrx) => {
|
|
@@ -87,7 +87,7 @@ var UpsertBuilder = class {
|
|
|
87
87
|
if (table === void 0) {
|
|
88
88
|
const tableSpec = (() => {
|
|
89
89
|
try {
|
|
90
|
-
return
|
|
90
|
+
return _chunk2WAC2GERjs.EntityManager.getTableSpec(tableName);
|
|
91
91
|
} catch (e) {
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
@@ -119,7 +119,7 @@ var UpsertBuilder = class {
|
|
|
119
119
|
return null;
|
|
120
120
|
}
|
|
121
121
|
return uniqueKeyArray.join("---delimiter--");
|
|
122
|
-
}).filter(
|
|
122
|
+
}).filter(_chunk2WAC2GERjs.nonNullable);
|
|
123
123
|
const uuid = (() => {
|
|
124
124
|
if (uniqueKeys.length > 0) {
|
|
125
125
|
for (const uniqueKey of uniqueKeys) {
|
|
@@ -180,7 +180,7 @@ var UpsertBuilder = class {
|
|
|
180
180
|
)) {
|
|
181
181
|
throw new Error(`${tableName} \uD574\uACB0\uB418\uC9C0 \uC54A\uC740 \uCC38\uC870\uAC00 \uC788\uC2B5\uB2C8\uB2E4.`);
|
|
182
182
|
}
|
|
183
|
-
const wdb =
|
|
183
|
+
const wdb = _chunk2WAC2GERjs.DB.toClient(_wdb);
|
|
184
184
|
const { references, refTables } = Array.from(this.tables).reduce(
|
|
185
185
|
(r, [, table2]) => {
|
|
186
186
|
const reference = Array.from(table2.references.values()).find(
|
|
@@ -264,7 +264,7 @@ var UpsertBuilder = class {
|
|
|
264
264
|
return row;
|
|
265
265
|
});
|
|
266
266
|
await batchUpdate(
|
|
267
|
-
|
|
267
|
+
_chunk2WAC2GERjs.DB.toClient(wdb),
|
|
268
268
|
tableName,
|
|
269
269
|
whereColumns,
|
|
270
270
|
rows,
|
|
@@ -277,4 +277,4 @@ var UpsertBuilder = class {
|
|
|
277
277
|
|
|
278
278
|
|
|
279
279
|
exports.isRefField = isRefField; exports.UpsertBuilder = UpsertBuilder;
|
|
280
|
-
//# sourceMappingURL=chunk-
|
|
280
|
+
//# sourceMappingURL=chunk-EXHKSVTE.js.map
|
|
@@ -989,7 +989,7 @@ function isZodNumberAnyway(zodType) {
|
|
|
989
989
|
} else if (zodType instanceof z3.ZodNullable && zodType._def.innerType instanceof z3.ZodNumber) {
|
|
990
990
|
return true;
|
|
991
991
|
} else if (zodType instanceof z3.ZodOptional && zodType._def.innerType instanceof z3.ZodNumber) {
|
|
992
|
-
} else if (zodType instanceof z3.ZodOptional && zodType._def
|
|
992
|
+
} else if (zodType instanceof z3.ZodOptional && zodType._def?.innerType instanceof z3.ZodOptional && zodType._type?.def?.innerType instanceof z3.ZodNumber) {
|
|
993
993
|
return true;
|
|
994
994
|
}
|
|
995
995
|
return false;
|
|
@@ -7620,4 +7620,4 @@ export {
|
|
|
7620
7620
|
isTest,
|
|
7621
7621
|
Sonamu
|
|
7622
7622
|
};
|
|
7623
|
-
//# sourceMappingURL=chunk-
|
|
7623
|
+
//# sourceMappingURL=chunk-FCERKIIF.mjs.map
|