@lunora/values 1.0.0-alpha.18 → 1.0.0-alpha.19
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.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -38,7 +38,7 @@ declare const describeValue: (value: unknown, options?: {
|
|
|
38
38
|
literal?: boolean;
|
|
39
39
|
}) => string;
|
|
40
40
|
declare const formatPath: (path: ValidationPath) => string;
|
|
41
|
-
/** Branded id type, e.g. `Id
|
|
41
|
+
/** Branded id type, e.g. `Id<"users">`. */
|
|
42
42
|
type Id<TableName extends string> = string & {
|
|
43
43
|
readonly __table: TableName;
|
|
44
44
|
};
|
|
@@ -190,7 +190,7 @@ interface ColumnValidator<TSelect, TInsert> extends Column<TSelect, TInsert>, Va
|
|
|
190
190
|
$defaultFn: (function_: () => TSelect) => ColumnValidator<TSelect, TInsert | undefined>;
|
|
191
191
|
/** Recompute the field on every patch/replace when not explicitly provided. */
|
|
192
192
|
$onUpdateFn: (function_: () => TSelect) => ColumnValidator<TSelect, TInsert>;
|
|
193
|
-
/** Override the inferred select/insert type without changing runtime parsing (e.g. `v.string().$type
|
|
193
|
+
/** Override the inferred select/insert type without changing runtime parsing (e.g. `v.string().$type<Id<"users">>()`). */
|
|
194
194
|
$type: <TOverride>() => ColumnValidator<TOverride, TOverride>;
|
|
195
195
|
/** Refinement predicate run after parsing — see {@link Validator.check}. Chainable; preserves column modifiers. */
|
|
196
196
|
check: (predicate: (value: TSelect) => boolean, options?: CheckOptions | string) => ColumnValidator<TSelect, TInsert>;
|
|
@@ -593,7 +593,7 @@ declare const DEFER_VALIDATION: unique symbol;
|
|
|
593
593
|
declare const installCompiledValidatorMap: (validators: object, compiled: CompiledValidatorMap) => void;
|
|
594
594
|
/**
|
|
595
595
|
* Validate each declared field of `source` through its validator, re-wrapping
|
|
596
|
-
* any {@link ValidationError} with a `label
|
|
596
|
+
* any {@link ValidationError} with a `label.<key>:` prefix and the rebuilt path
|
|
597
597
|
* `[key, ...error.path]` so the failure points at the offending field. Optional
|
|
598
598
|
* fields absent from the source are skipped (so `v.optional` passes and a
|
|
599
599
|
* required validator fails on `undefined`).
|
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare const describeValue: (value: unknown, options?: {
|
|
|
38
38
|
literal?: boolean;
|
|
39
39
|
}) => string;
|
|
40
40
|
declare const formatPath: (path: ValidationPath) => string;
|
|
41
|
-
/** Branded id type, e.g. `Id
|
|
41
|
+
/** Branded id type, e.g. `Id<"users">`. */
|
|
42
42
|
type Id<TableName extends string> = string & {
|
|
43
43
|
readonly __table: TableName;
|
|
44
44
|
};
|
|
@@ -190,7 +190,7 @@ interface ColumnValidator<TSelect, TInsert> extends Column<TSelect, TInsert>, Va
|
|
|
190
190
|
$defaultFn: (function_: () => TSelect) => ColumnValidator<TSelect, TInsert | undefined>;
|
|
191
191
|
/** Recompute the field on every patch/replace when not explicitly provided. */
|
|
192
192
|
$onUpdateFn: (function_: () => TSelect) => ColumnValidator<TSelect, TInsert>;
|
|
193
|
-
/** Override the inferred select/insert type without changing runtime parsing (e.g. `v.string().$type
|
|
193
|
+
/** Override the inferred select/insert type without changing runtime parsing (e.g. `v.string().$type<Id<"users">>()`). */
|
|
194
194
|
$type: <TOverride>() => ColumnValidator<TOverride, TOverride>;
|
|
195
195
|
/** Refinement predicate run after parsing — see {@link Validator.check}. Chainable; preserves column modifiers. */
|
|
196
196
|
check: (predicate: (value: TSelect) => boolean, options?: CheckOptions | string) => ColumnValidator<TSelect, TInsert>;
|
|
@@ -593,7 +593,7 @@ declare const DEFER_VALIDATION: unique symbol;
|
|
|
593
593
|
declare const installCompiledValidatorMap: (validators: object, compiled: CompiledValidatorMap) => void;
|
|
594
594
|
/**
|
|
595
595
|
* Validate each declared field of `source` through its validator, re-wrapping
|
|
596
|
-
* any {@link ValidationError} with a `label
|
|
596
|
+
* any {@link ValidationError} with a `label.<key>:` prefix and the rebuilt path
|
|
597
597
|
* `[key, ...error.path]` so the failure points at the offending field. Optional
|
|
598
598
|
* fields absent from the source are skipped (so `v.optional` passes and a
|
|
599
599
|
* required validator fails on `undefined`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/values",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.19",
|
|
4
4
|
"description": "Validators for Lunora: the v.* validator suite with end-to-end return-type inference",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
49
|
+
"@lunora/errors": "1.0.0-alpha.14",
|
|
50
50
|
"@standard-schema/spec": "1.1.0"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|