@pogodisco/val 0.0.1 → 0.0.3
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 +3 -3
- package/dist/index.js +3 -3
- package/dist/rules/index.d.ts +7 -7
- package/dist/rules/index.js +7 -7
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/core-rules.d.ts +1 -1
- package/dist/utils/core-rules.js +2 -2
- package/dist/utils/flatten-rules.d.ts +1 -1
- package/dist/utils/flatten-rules.js +1 -1
- package/dist/utils/index.d.ts +8 -8
- package/dist/utils/index.js +8 -8
- package/dist/utils/schema.d.ts +2 -2
- package/dist/utils/validate.d.ts +1 -1
- package/dist/utils/validation-rule-builder.d.ts +2 -2
- package/dist/utils/validation-rule-builder.js +1 -1
- package/dist/utils/validation-rule.d.ts +1 -1
- package/dist/utils/wrap-async-rule.d.ts +1 -1
- package/dist/utils/wrap-async-rule.js +1 -1
- package/dist/utils/wrap-sync-rule.d.ts +1 -1
- package/dist/utils/wrap-sync-rule.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./rules";
|
|
2
|
-
export * from "./utils";
|
|
3
|
-
export * from "./types";
|
|
1
|
+
export * from "./rules/index.js";
|
|
2
|
+
export * from "./utils/index.js";
|
|
3
|
+
export * from "./types/index.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./rules";
|
|
2
|
-
export * from "./utils";
|
|
3
|
-
export * from "./types";
|
|
1
|
+
export * from "./rules/index.js";
|
|
2
|
+
export * from "./utils/index.js";
|
|
3
|
+
export * from "./types/index.js";
|
package/dist/rules/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./number";
|
|
2
|
-
export * from "./array";
|
|
3
|
-
export * from "./string";
|
|
4
|
-
export * from "./boolean";
|
|
5
|
-
export * from "./helpers";
|
|
6
|
-
export * from "./date";
|
|
7
|
-
export * from "./object";
|
|
1
|
+
export * from "./number.js";
|
|
2
|
+
export * from "./array.js";
|
|
3
|
+
export * from "./string.js";
|
|
4
|
+
export * from "./boolean.js";
|
|
5
|
+
export * from "./helpers.js";
|
|
6
|
+
export * from "./date.js";
|
|
7
|
+
export * from "./object.js";
|
package/dist/rules/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./number";
|
|
2
|
-
export * from "./array";
|
|
3
|
-
export * from "./string";
|
|
4
|
-
export * from "./boolean";
|
|
5
|
-
export * from "./helpers";
|
|
6
|
-
export * from "./date";
|
|
7
|
-
export * from "./object";
|
|
1
|
+
export * from "./number.js";
|
|
2
|
+
export * from "./array.js";
|
|
3
|
+
export * from "./string.js";
|
|
4
|
+
export * from "./boolean.js";
|
|
5
|
+
export * from "./helpers.js";
|
|
6
|
+
export * from "./date.js";
|
|
7
|
+
export * from "./object.js";
|
package/dist/types/index.d.ts
CHANGED
package/dist/utils/core-rules.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { allEqual, each, arrayMax, arrayMin, charsMin, isEmail, isNotEmpty, isOneOf, mustBeEmptyIf, numberMax, numberMin, requiredIfElseEmpty, requiredIf, requiredUnless, numberGt, numberLt, isOptional, isTrue, isFalse, matchesRegex, isAlphanumeric, isAlpha, isSlug, hasLength, startsWith, endsWith, contains, isLowerCase, isUpperCase, isOdd, isEven, isFloat, isInteger, isPositive, isMultipleOf, isNegative, isDate, isBefore, isAfter, isBetween, isFutureDate, isPastDate, isObject, isArray, hasKeys, maxKeys, minKeys, } from "../rules";
|
|
2
|
-
import { wrapSyncRule } from "./wrap-sync-rule";
|
|
1
|
+
import { allEqual, each, arrayMax, arrayMin, charsMin, isEmail, isNotEmpty, isOneOf, mustBeEmptyIf, numberMax, numberMin, requiredIfElseEmpty, requiredIf, requiredUnless, numberGt, numberLt, isOptional, isTrue, isFalse, matchesRegex, isAlphanumeric, isAlpha, isSlug, hasLength, startsWith, endsWith, contains, isLowerCase, isUpperCase, isOdd, isEven, isFloat, isInteger, isPositive, isMultipleOf, isNegative, isDate, isBefore, isAfter, isBetween, isFutureDate, isPastDate, isObject, isArray, hasKeys, maxKeys, minKeys, } from "../rules/index.js";
|
|
2
|
+
import { wrapSyncRule } from "./wrap-sync-rule.js";
|
|
3
3
|
export const v = {
|
|
4
4
|
format: {
|
|
5
5
|
date: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidationRuleBuilder } from "./validation-rule-builder";
|
|
1
|
+
import { ValidationRuleBuilder } from "./validation-rule-builder.js";
|
|
2
2
|
export declare function flattenRuleBuilders(obj: unknown): ValidationRuleBuilder[];
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./validate";
|
|
2
|
-
export * from "./schema";
|
|
3
|
-
export * from "./core-rules";
|
|
4
|
-
export * from "./wrap-async-rule";
|
|
5
|
-
export * from "./wrap-sync-rule";
|
|
6
|
-
export * from "./flatten-rules";
|
|
7
|
-
export * from "./validation-rule";
|
|
8
|
-
export * from "./validation-rule-builder";
|
|
1
|
+
export * from "./validate.js";
|
|
2
|
+
export * from "./schema.js";
|
|
3
|
+
export * from "./core-rules.js";
|
|
4
|
+
export * from "./wrap-async-rule.js";
|
|
5
|
+
export * from "./wrap-sync-rule.js";
|
|
6
|
+
export * from "./flatten-rules.js";
|
|
7
|
+
export * from "./validation-rule.js";
|
|
8
|
+
export * from "./validation-rule-builder.js";
|
package/dist/utils/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./validate";
|
|
2
|
-
export * from "./schema";
|
|
3
|
-
export * from "./core-rules";
|
|
4
|
-
export * from "./wrap-async-rule";
|
|
5
|
-
export * from "./wrap-sync-rule";
|
|
6
|
-
export * from "./flatten-rules";
|
|
7
|
-
export * from "./validation-rule";
|
|
8
|
-
export * from "./validation-rule-builder";
|
|
1
|
+
export * from "./validate.js";
|
|
2
|
+
export * from "./schema.js";
|
|
3
|
+
export * from "./core-rules.js";
|
|
4
|
+
export * from "./wrap-async-rule.js";
|
|
5
|
+
export * from "./wrap-sync-rule.js";
|
|
6
|
+
export * from "./flatten-rules.js";
|
|
7
|
+
export * from "./validation-rule.js";
|
|
8
|
+
export * from "./validation-rule-builder.js";
|
package/dist/utils/schema.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { RuleBuilder } from "../types";
|
|
2
|
-
import { ValidationRule } from "./validation-rule";
|
|
1
|
+
import type { RuleBuilder } from "../types/index.js";
|
|
2
|
+
import { ValidationRule } from "./validation-rule.js";
|
|
3
3
|
export declare function schema<Ctx>(factory: (ctx: Ctx) => RuleBuilder[]): (ctx: Ctx) => ValidationRule[];
|
package/dist/utils/validate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RuleResult } from "../types";
|
|
2
|
-
import { ValidationRule } from "./validation-rule";
|
|
1
|
+
import type { RuleResult } from "../types/index.js";
|
|
2
|
+
import { ValidationRule } from "./validation-rule.js";
|
|
3
3
|
export declare class ValidationRuleBuilder {
|
|
4
4
|
private _rule;
|
|
5
5
|
private _bail?;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationRuleBuilder } from "./validation-rule-builder";
|
|
1
|
+
import { ValidationRuleBuilder } from "./validation-rule-builder.js";
|
|
2
2
|
export declare function wrapAsyncRule<T extends any[]>(fn: (...args: T) => Promise<{
|
|
3
3
|
ok: boolean;
|
|
4
4
|
}>): (...args: T) => ValidationRuleBuilder;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidationRuleBuilder } from "./validation-rule-builder";
|
|
1
|
+
import { ValidationRuleBuilder } from "./validation-rule-builder.js";
|
|
2
2
|
export declare function wrapSyncRule<T extends any[]>(fn: (...args: T) => boolean): (...args: T) => ValidationRuleBuilder;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pogodisco/val",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"prepublishOnly": "npm run build"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@pogodisco/response": "
|
|
31
|
+
"@pogodisco/response": "~0.0.1",
|
|
32
32
|
"typescript": "^5.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@pogodisco/response": "
|
|
35
|
+
"@pogodisco/response": "~0.0.1"
|
|
36
36
|
}
|
|
37
37
|
}
|