zod-prisma-schemas 0.0.2 → 0.0.4
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ExtendedWriteFieldOptions } from '../../types';
|
|
2
|
-
export declare const writeDecimal: ({ writer, field,
|
|
2
|
+
export declare const writeDecimal: ({ writer, field, writeOptionalDefaults, }: ExtendedWriteFieldOptions) => void;
|
|
3
3
|
//# sourceMappingURL=writeModelDecimal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeModelDecimal.d.ts","sourceRoot":"","sources":["../../../src/functions/fieldWriters/writeModelDecimal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"writeModelDecimal.d.ts","sourceRoot":"","sources":["../../../src/functions/fieldWriters/writeModelDecimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,YAAY,GAAI,2CAI1B,yBAAyB,SAO3B,CAAC"}
|
|
@@ -2,17 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.writeDecimal = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
|
-
const
|
|
6
|
-
const writeDecimal = ({ writer, field, model, writeOptionalDefaults = false, }) => {
|
|
7
|
-
const { isPrismaClientGenerator } = (0, config_1.getConfig)();
|
|
8
|
-
const decimalTypeName = isPrismaClientGenerator
|
|
9
|
-
? 'PrismaDecimal'
|
|
10
|
-
: 'Prisma.Decimal';
|
|
5
|
+
const writeDecimal = ({ writer, field, writeOptionalDefaults = false, }) => {
|
|
11
6
|
writer
|
|
12
7
|
.conditionalWrite(field.omitInModel(), '// omitted: ')
|
|
13
8
|
.write(`${field.formattedNames.original}: `)
|
|
14
|
-
.write(`
|
|
15
|
-
.write(`})`);
|
|
9
|
+
.write(`DecimalJsLikeSchema`);
|
|
16
10
|
(0, _1.writeFieldAdditions)({ writer, field, writeOptionalDefaults });
|
|
17
11
|
};
|
|
18
12
|
exports.writeDecimal = writeDecimal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeModelDecimal.js","sourceRoot":"","sources":["../../../src/functions/fieldWriters/writeModelDecimal.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"writeModelDecimal.js","sourceRoot":"","sources":["../../../src/functions/fieldWriters/writeModelDecimal.ts"],"names":[],"mappings":";;;AAAA,wBAAwC;AAGjC,MAAM,YAAY,GAAG,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,qBAAqB,GAAG,KAAK,GACH,EAAE,EAAE;IAC9B,MAAM;SACH,gBAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,cAAc,CAAC;SACrD,KAAK,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,IAAI,CAAC;SAC3C,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAEhC,IAAA,sBAAmB,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC;AAChE,CAAC,CAAC;AAXW,QAAA,YAAY,gBAWvB"}
|