inibase 1.0.0-rc.63 → 1.0.0-rc.64

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.d.ts CHANGED
@@ -24,9 +24,9 @@ export interface Options {
24
24
  order?: Record<string, "asc" | "desc">;
25
25
  }
26
26
  export interface Config {
27
- compression: boolean;
28
- cache: boolean;
29
- prepend: boolean;
27
+ compression?: boolean;
28
+ cache?: boolean;
29
+ prepend?: boolean;
30
30
  }
31
31
  export interface TableObject {
32
32
  schema?: Schema;
package/dist/index.js CHANGED
@@ -251,7 +251,22 @@ export default class Inibase {
251
251
  throw this.throwError("INVALID_TYPE", [
252
252
  field.key,
253
253
  Array.isArray(field.type) ? field.type.join(", ") : field.type,
254
- typeof data[field.key],
254
+ Utils.detectFieldType(data[field.key], [
255
+ "string",
256
+ "number",
257
+ "boolean",
258
+ "date",
259
+ "email",
260
+ "url",
261
+ "table",
262
+ "object",
263
+ "array",
264
+ "password",
265
+ "html",
266
+ "ip",
267
+ "json",
268
+ "id",
269
+ ]) ?? "undefinedType",
255
270
  ]);
256
271
  if ((field.type === "array" || field.type === "object") &&
257
272
  field.children &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inibase",
3
- "version": "1.0.0-rc.63",
3
+ "version": "1.0.0-rc.64",
4
4
  "author": {
5
5
  "name": "Karim Amahtil",
6
6
  "email": "karim.amahtil@gmail.com"