sonamu 0.2.52 → 0.2.54
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-wrapper.mjs +1 -2
- package/dist/bin/cli-wrapper.mjs.map +1 -1
- package/dist/bin/cli.js +48 -48
- package/dist/bin/cli.mjs +2 -3
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/{chunk-4EET56IE.js → chunk-JOHF7PK4.js} +24 -11
- package/dist/chunk-JOHF7PK4.js.map +1 -0
- package/dist/{chunk-HEPO4HGK.mjs → chunk-L4KELCY7.mjs} +16 -4
- package/dist/chunk-L4KELCY7.mjs.map +1 -0
- package/dist/{chunk-JXJTFHF7.mjs → chunk-PTFDTOJU.mjs} +1 -2
- package/dist/{chunk-JXJTFHF7.mjs.map → chunk-PTFDTOJU.mjs.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/code-converters.ts +19 -0
- package/dist/chunk-4EET56IE.js.map +0 -1
- package/dist/chunk-HEPO4HGK.mjs.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
const require = (await import('module')).createRequire(import.meta.url);
|
|
2
1
|
import {
|
|
3
2
|
__dirname,
|
|
4
3
|
__require
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PTFDTOJU.mjs";
|
|
6
5
|
|
|
7
6
|
// src/types/types.ts
|
|
8
7
|
import { z } from "zod";
|
|
@@ -355,6 +354,19 @@ function getZodTypeFromApiParamType(paramType, references) {
|
|
|
355
354
|
return reference;
|
|
356
355
|
case "union":
|
|
357
356
|
const unionType = paramType;
|
|
357
|
+
if (unionType.types.length === 2 && unionType.types.some((type) => type === "null")) {
|
|
358
|
+
if (unionType.types[0] === "null") {
|
|
359
|
+
return getZodTypeFromApiParamType(
|
|
360
|
+
unionType.types[1],
|
|
361
|
+
references
|
|
362
|
+
).nullable();
|
|
363
|
+
} else {
|
|
364
|
+
return getZodTypeFromApiParamType(
|
|
365
|
+
unionType.types[0],
|
|
366
|
+
references
|
|
367
|
+
).nullable();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
358
370
|
return z2.union(
|
|
359
371
|
unionType.types.map(
|
|
360
372
|
(type) => getZodTypeFromApiParamType(type, references)
|
|
@@ -4162,7 +4174,7 @@ var DBClass = class {
|
|
|
4162
4174
|
);
|
|
4163
4175
|
try {
|
|
4164
4176
|
const knexfileModule = await import(dbConfigPath);
|
|
4165
|
-
return knexfileModule.default;
|
|
4177
|
+
return knexfileModule.default?.default ?? knexfileModule.default ?? knexfileModule;
|
|
4166
4178
|
} catch {
|
|
4167
4179
|
}
|
|
4168
4180
|
throw new ServiceUnavailableException(
|
|
@@ -7831,4 +7843,4 @@ export {
|
|
|
7831
7843
|
FixtureManagerClass,
|
|
7832
7844
|
FixtureManager
|
|
7833
7845
|
};
|
|
7834
|
-
//# sourceMappingURL=chunk-
|
|
7846
|
+
//# sourceMappingURL=chunk-L4KELCY7.mjs.map
|