rads-db 0.1.10 → 0.1.11
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/index.cjs +3 -2
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const _ = require('lodash');
|
|
5
5
|
const pluralize = require('pluralize');
|
|
6
|
-
const
|
|
6
|
+
const schema = require('_rads-db');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
9
9
|
|
|
10
10
|
const ___default = /*#__PURE__*/_interopDefaultCompat(_);
|
|
11
11
|
const pluralize__default = /*#__PURE__*/_interopDefaultCompat(pluralize);
|
|
12
|
+
const schema__default = /*#__PURE__*/_interopDefaultCompat(schema);
|
|
12
13
|
|
|
13
14
|
function generateValidators(schema) {
|
|
14
15
|
const zodSchemas = {};
|
|
@@ -378,7 +379,7 @@ function field(meta) {
|
|
|
378
379
|
|
|
379
380
|
function createRads(args) {
|
|
380
381
|
args = { ...args };
|
|
381
|
-
const s = args.schema ||
|
|
382
|
+
const s = args.schema || schema__default;
|
|
382
383
|
const validators = generateValidators(s);
|
|
383
384
|
return generateMethods(s, validators, args);
|
|
384
385
|
}
|
package/dist/index.mjs
CHANGED