@bb-labs/next-router 0.0.5 → 0.0.6
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { useEffect, useRef, useMemo } from "react";
|
|
3
3
|
import { useParams, useSearchParams as useNextSearchParams, useRouter } from "next/navigation";
|
|
4
4
|
import { toZodObject } from "../../utils/to-zod-object";
|
|
5
|
+
import { z } from "zod";
|
|
5
6
|
const defaultOnError = (error, router) => {
|
|
6
7
|
console.log(error);
|
|
7
8
|
router.push("/404");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from "zod";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ZodObjectShape, InferZodObjectShapeOutput } from "../../../utils/types";
|
|
1
|
+
import type { ZodObjectShape, InferZodObjectShapeOutput } from "../../../utils/types";
|
|
2
2
|
export declare function zServerAction<P extends ZodObjectShape, R>(cfg: {
|
|
3
3
|
params: P;
|
|
4
4
|
handler: (inputs: InferZodObjectShapeOutput<P>) => Promise<R>;
|
package/dist/utils/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from "zod";
|
package/package.json
CHANGED
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bb-labs/next-router",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"author": "Beepbop",
|
|
5
|
-
"homepage": "https://github.com/beepbop-labs/next-router",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"next-router",
|
|
8
|
-
"router",
|
|
9
|
-
"next",
|
|
10
|
-
"nextjs"
|
|
11
|
-
],
|
|
12
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.0.6",
|
|
13
4
|
"repository": {
|
|
14
5
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/beepbop-labs/
|
|
6
|
+
"url": "https://github.com/beepbop-labs/libraries.git"
|
|
16
7
|
},
|
|
17
8
|
"description": "A library for routing in Next.js",
|
|
18
9
|
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
"README.md"
|
|
10
|
+
"dist"
|
|
21
11
|
],
|
|
22
12
|
"exports": {
|
|
23
13
|
".": "./dist/server/index.js",
|
|
@@ -25,16 +15,19 @@
|
|
|
25
15
|
"./common": "./dist/common/index.js"
|
|
26
16
|
},
|
|
27
17
|
"scripts": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
18
|
+
"build": "bldr",
|
|
19
|
+
"dev": "bldr -w",
|
|
20
|
+
"clean": "rm -rf node_modules bun.lock dist"
|
|
31
21
|
},
|
|
32
22
|
"dependencies": {
|
|
23
|
+
"@bb-labs/bldr": "^0.0.16",
|
|
24
|
+
"@bb-labs/tsconfigs": "^0.0.4",
|
|
33
25
|
"zod": "^4.2.1"
|
|
34
26
|
},
|
|
35
27
|
"devDependencies": {
|
|
36
28
|
"@types/bun": "latest",
|
|
37
|
-
"@types/react": "^19.2.7"
|
|
29
|
+
"@types/react": "^19.2.7",
|
|
30
|
+
"tsc-alias": "^1.8.16"
|
|
38
31
|
},
|
|
39
32
|
"peerDependencies": {
|
|
40
33
|
"typescript": "^5",
|