rads-db 0.1.11 → 0.1.13

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 CHANGED
@@ -3,13 +3,12 @@
3
3
  const zod = require('zod');
4
4
  const _ = require('lodash');
5
5
  const pluralize = require('pluralize');
6
- const schema = require('_rads-db');
6
+ const _radsDb = 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);
13
12
 
14
13
  function generateValidators(schema) {
15
14
  const zodSchemas = {};
@@ -379,7 +378,7 @@ function field(meta) {
379
378
 
380
379
  function createRads(args) {
381
380
  args = { ...args };
382
- const s = args.schema || schema__default;
381
+ const s = args.schema || _radsDb.schema;
383
382
  const validators = generateValidators(s);
384
383
  return generateMethods(s, validators, args);
385
384
  }
package/dist/index.d.ts CHANGED
@@ -110,7 +110,7 @@ interface GenerateClientNormalizedOptions {
110
110
  declare function entity(meta?: EntityDecoratorArgs): (classConstructor: Function, _ctx?: ClassDecoratorContext<any>) => void;
111
111
  declare function field(meta?: FieldDecoratorArgs): (a: any, b?: ClassFieldDecoratorContext) => void;
112
112
 
113
- declare function createRads(args?: CreateRadsArgs): Record<string, any>;
113
+ declare function createRads(args?: CreateRadsArgs): RadsDb;
114
114
  declare function getRestRoutes(db: RadsDb, prefix?: string): Record<string, Record<string, Function>>;
115
115
 
116
116
  export { CreateRadsArgs, Driver, DriverOptions, EntityDecoratorArgs, EntityMethods, FieldDecoratorArgs, FieldDefinition, GenerateClientNormalizedOptions, GenerateClientOptions, GetArgs, GetArgsAny, GetArgsInclude, GetManyArgs, GetManyArgsAny, GetManyResponse, GetResponse, GetResponseInclude, GetResponseIncludeSelect, GetResponseNoInclude, MemoryDriverOptions, MinimalDriver, PutArgs, RestDriverOptions, Schema, SchemaValidators, TypeDefinition, createRads, entity, field, getRestRoutes };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import _ from 'lodash';
3
3
  import pluralize from 'pluralize';
4
- import schema from '_rads-db';
4
+ import { schema } from '_rads-db';
5
5
 
6
6
  function generateValidators(schema) {
7
7
  const zodSchemas = {};
package/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  "require": "./integrations/*.cjs"
29
29
  }
30
30
  },
31
- "version": "0.1.11",
31
+ "version": "0.1.13",
32
32
  "description": "Say goodbye to boilerplate code and hello to efficient and elegant syntax.",
33
33
  "keywords": [],
34
34
  "author": "",