@real-router/validation-plugin 0.5.0 → 0.5.1
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/validators/plugins.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@real-router/validation-plugin",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "Route validation plugin with type guards and parameter validation",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
},
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@real-router/core": "^0.
|
|
47
|
+
"@real-router/core": "^0.48.0",
|
|
48
48
|
"@real-router/logger": "^0.3.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@real-router/core": "^0.
|
|
51
|
+
"@real-router/core": "^0.48.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"route-tree": "^0.3.4",
|
|
55
|
-
"type-guards": "^0.4.
|
|
55
|
+
"type-guards": "^0.4.8"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsdown --config-loader unrun",
|
|
@@ -63,7 +63,7 @@ export function validateCountThresholds(
|
|
|
63
63
|
|
|
64
64
|
export function validatePluginKeys(plugin: unknown): void {
|
|
65
65
|
for (const key in plugin as Record<string, unknown>) {
|
|
66
|
-
if (!(key === "teardown" || key
|
|
66
|
+
if (!(key === "teardown" || Object.hasOwn(PLUGIN_EVENTS_MAP, key))) {
|
|
67
67
|
throw new TypeError(
|
|
68
68
|
`[router.usePlugin] Unknown property '${key}'. Plugin must only contain event handlers and optional teardown.`,
|
|
69
69
|
);
|