@atscript/moost-validator 0.2.5 → 0.2.7

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
@@ -85,8 +85,9 @@ function coerceDate(value) {
85
85
  * The pipe inspects the runtime metadata supplied by Moost; when the target
86
86
  * parameter type is an atscript‑annotated class or interface it first applies the
87
87
  * type's normalizers (`@normalize.trim` / `lowercase` / `uppercase`, see
88
- * `normalizeForType`), then calls `type.validator(opts).validate(value)` on the
89
- * normalized value, and hands the normalized value to the handler. Input without
88
+ * `normalizeForType`, judging union branches with the same `opts`), then calls
89
+ * `type.validator(opts).validate(value)` on the normalized value, and hands the
90
+ * normalized value to the handler. Input without
90
91
  * normalizers is passed on as it is (the same object).
91
92
  *
92
93
  * The pipe is registered at {@link TPipePriority.VALIDATE}, ensuring it fires
@@ -117,7 +118,7 @@ function coerceDate(value) {
117
118
  validator = type.validator(opts);
118
119
  validators.set(type, validator);
119
120
  }
120
- const normalized = (0, _atscript_typescript_utils.normalizeForType)(type, value);
121
+ const normalized = (0, _atscript_typescript_utils.normalizeForType)(type, value, opts);
121
122
  validator.validate(normalized);
122
123
  return normalized;
123
124
  }
package/dist/index.d.ts CHANGED
@@ -65,8 +65,9 @@ declare const UseCoercionPipe: (opts?: TCoercionOptions) => ClassDecorator & Met
65
65
  * The pipe inspects the runtime metadata supplied by Moost; when the target
66
66
  * parameter type is an atscript‑annotated class or interface it first applies the
67
67
  * type's normalizers (`@normalize.trim` / `lowercase` / `uppercase`, see
68
- * `normalizeForType`), then calls `type.validator(opts).validate(value)` on the
69
- * normalized value, and hands the normalized value to the handler. Input without
68
+ * `normalizeForType`, judging union branches with the same `opts`), then calls
69
+ * `type.validator(opts).validate(value)` on the normalized value, and hands the
70
+ * normalized value to the handler. Input without
70
71
  * normalizers is passed on as it is (the same object).
71
72
  *
72
73
  * The pipe is registered at {@link TPipePriority.VALIDATE}, ensuring it fires
package/dist/index.mjs CHANGED
@@ -84,8 +84,9 @@ function coerceDate(value) {
84
84
  * The pipe inspects the runtime metadata supplied by Moost; when the target
85
85
  * parameter type is an atscript‑annotated class or interface it first applies the
86
86
  * type's normalizers (`@normalize.trim` / `lowercase` / `uppercase`, see
87
- * `normalizeForType`), then calls `type.validator(opts).validate(value)` on the
88
- * normalized value, and hands the normalized value to the handler. Input without
87
+ * `normalizeForType`, judging union branches with the same `opts`), then calls
88
+ * `type.validator(opts).validate(value)` on the normalized value, and hands the
89
+ * normalized value to the handler. Input without
89
90
  * normalizers is passed on as it is (the same object).
90
91
  *
91
92
  * The pipe is registered at {@link TPipePriority.VALIDATE}, ensuring it fires
@@ -116,7 +117,7 @@ function coerceDate(value) {
116
117
  validator = type.validator(opts);
117
118
  validators.set(type, validator);
118
119
  }
119
- const normalized = normalizeForType(type, value);
120
+ const normalized = normalizeForType(type, value, opts);
120
121
  validator.validate(normalized);
121
122
  return normalized;
122
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/moost-validator",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Validator pipe and utils for Moost.",
5
5
  "keywords": [
6
6
  "annotations",
@@ -43,8 +43,8 @@
43
43
  "peerDependencies": {
44
44
  "@moostjs/event-http": "^0.7.0",
45
45
  "moost": "^0.7.0",
46
- "@atscript/core": "^0.2.5",
47
- "@atscript/typescript": "^0.2.5"
46
+ "@atscript/core": "^0.2.7",
47
+ "@atscript/typescript": "^0.2.7"
48
48
  },
49
49
  "scripts": {
50
50
  "pub": "pnpm publish --access public",