@palmares/schemas 0.1.13 → 0.1.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @palmares/schemas
2
2
 
3
+ ## 0.1.14
4
+
5
+ ### Patch Changes
6
+
7
+ - 418abd3: - .validate was not working previously
8
+
3
9
  ## 0.1.13
4
10
 
5
11
  ### Patch Changes
@@ -21,15 +21,15 @@ export default domain('testingZodSchemas', __dirname, {
21
21
  getMigrations: () => [],
22
22
  getModels: () => models,
23
23
  getTests: () => [
24
- __dirname + '/test.test.ts',
25
- __dirname + '/numbers.test.ts',
26
- __dirname + '/boolean.test.ts',
27
- __dirname + '/datetime.test.ts',
28
- __dirname + '/object.test.ts',
29
- __dirname + '/union.test.ts',
30
- __dirname + '/array.test.ts',
31
- __dirname + '/types.test.ts',
32
- __dirname + '/string.test.ts',
24
+ //__dirname + '/test.test.ts',
25
+ //__dirname + '/numbers.test.ts',
26
+ //__dirname + '/boolean.test.ts',
27
+ //__dirname + '/datetime.test.ts',
28
+ //__dirname + '/object.test.ts',
29
+ //__dirname + '/union.test.ts',
30
+ //__dirname + '/array.test.ts',
31
+ //__dirname + '/types.test.ts',
32
+ //__dirname + '/string.test.ts',
33
33
  __dirname + '/model.test.ts'
34
34
  ]
35
35
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palmares/schemas",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "This defines a default schema definition for validation of data, it abstract popular schema validation libraries like zod, yup, valibot and others\"",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",
@@ -31,9 +31,9 @@
31
31
  },
32
32
  "homepage": "https://github.com/palmaresHQ/palmares#readme",
33
33
  "dependencies": {
34
- "@palmares/core": "0.1.9",
35
34
  "@palmares/databases": "0.1.11",
36
- "@palmares/server": "0.1.9"
35
+ "@palmares/server": "0.1.9",
36
+ "@palmares/core": "0.1.9"
37
37
  },
38
38
  "scripts": {
39
39
  "clear": "rimraf ./dist",
@@ -807,7 +807,7 @@ export default class Schema<
807
807
  ): Promise<{ isValid: false; errors: any[] } | { isValid: true; save: () => Promise<TType['representation']> }> {
808
808
  const { errors, parsed } = await this.__parse(value, [], { context } as any);
809
809
  // eslint-disable-next-line ts/no-unnecessary-condition
810
- if ((errors || []).length <= 0) return { isValid: false, errors: errors };
810
+ if ((errors || []).length >= 0) return { isValid: false, errors: errors };
811
811
  return { isValid: true, save: async () => this._save.bind(this)(parsed, context) };
812
812
  }
813
813