convex-route-query 0.0.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/LICENSE +21 -0
- package/README.md +72 -0
- package/dist/index.cjs +24 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +22 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +22 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +23 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +96 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ludicrous
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# convex-route-query
|
|
2
|
+
|
|
3
|
+
Type-safe Convex query helpers for TanStack Router loaders and React Query Suspense.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createConvexRouteQuery } from "convex-route-query";
|
|
7
|
+
import { api } from "../convex/_generated/api";
|
|
8
|
+
|
|
9
|
+
const listExperiences = createConvexRouteQuery(
|
|
10
|
+
api.resume.queries.listExperiences,
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export const Route = createFileRoute("/experience/")({
|
|
14
|
+
loader: async ({ context }) => {
|
|
15
|
+
await listExperiences.prefetchQuery(context.queryClient);
|
|
16
|
+
},
|
|
17
|
+
component: ExperiencePage,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
function ExperiencePage() {
|
|
21
|
+
const { data } = listExperiences.useSuspenseQuery();
|
|
22
|
+
|
|
23
|
+
return <ExperienceList experiences={data} />;
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Queries with arguments infer their argument object from the Convex function reference.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
const getPost = createConvexRouteQuery(api.blog.queries.getPost);
|
|
31
|
+
|
|
32
|
+
export const Route = createFileRoute("/blog/$slug")({
|
|
33
|
+
loader: async ({ context, params }) => {
|
|
34
|
+
const post = await getPost.fetchQuery(context.queryClient, {
|
|
35
|
+
slug: params.slug,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
if (!post) {
|
|
39
|
+
throw notFound();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return { post };
|
|
43
|
+
},
|
|
44
|
+
component: BlogPostPage,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
function BlogPostPage() {
|
|
48
|
+
const { slug } = Route.useParams();
|
|
49
|
+
const { data: post } = getPost.useSuspenseQuery({ slug });
|
|
50
|
+
|
|
51
|
+
return <Post post={post} />;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
bun add convex-route-query
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## API
|
|
62
|
+
|
|
63
|
+
### `createConvexRouteQuery(query)`
|
|
64
|
+
|
|
65
|
+
Returns an object with:
|
|
66
|
+
|
|
67
|
+
- `options(...args)` - the underlying `convexQuery(...)` options.
|
|
68
|
+
- `fetchQuery(queryClient, ...args)` - calls `queryClient.fetchQuery(...)`.
|
|
69
|
+
- `prefetchQuery(queryClient, ...args)` - calls `queryClient.prefetchQuery(...)`.
|
|
70
|
+
- `useSuspenseQuery(...args)` - calls React Query's `useSuspenseQuery(...)`.
|
|
71
|
+
|
|
72
|
+
The loader helpers need a `QueryClient` because loaders run outside React context. The hook reads the `QueryClient` from React context.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _convex_dev_react_query = require("@convex-dev/react-query");
|
|
3
|
+
let _tanstack_react_query = require("@tanstack/react-query");
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
function createConvexRouteQuery(query) {
|
|
6
|
+
const createOptions = _convex_dev_react_query.convexQuery;
|
|
7
|
+
const options = (...args) => createOptions(query, ...args);
|
|
8
|
+
return {
|
|
9
|
+
options,
|
|
10
|
+
fetchQuery(queryClient, ...args) {
|
|
11
|
+
return queryClient.fetchQuery(options(...args));
|
|
12
|
+
},
|
|
13
|
+
prefetchQuery(queryClient, ...args) {
|
|
14
|
+
return queryClient.prefetchQuery(options(...args));
|
|
15
|
+
},
|
|
16
|
+
useSuspenseQuery(...args) {
|
|
17
|
+
return (0, _tanstack_react_query.useSuspenseQuery)(options(...args));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.createConvexRouteQuery = createConvexRouteQuery;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["convexQuery"],"sources":["../src/index.ts"],"sourcesContent":["import { convexQuery } from \"@convex-dev/react-query\";\nimport {\n useSuspenseQuery as useTanStackSuspenseQuery,\n type UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\nimport type {\n FunctionArgs,\n FunctionReference,\n FunctionReturnType,\n OptionalRestArgs,\n} from \"convex/server\";\n\nexport type ConvexRouteQueryOptions<Query extends FunctionReference<\"query\">> =\n {\n queryKey: [\"convexQuery\", Query, FunctionArgs<Query>];\n staleTime: number;\n };\n\nexport type ConvexRouteQuery<Query extends FunctionReference<\"query\">> = {\n options: (...args: OptionalRestArgs<Query>) => ConvexRouteQueryOptions<Query>;\n fetchQuery: (\n queryClient: ConvexRouteQueryClient<Query>,\n ...args: OptionalRestArgs<Query>\n ) => Promise<FunctionReturnType<Query>>;\n prefetchQuery: (\n queryClient: ConvexRouteQueryClient<Query>,\n ...args: OptionalRestArgs<Query>\n ) => Promise<void>;\n useSuspenseQuery: (\n ...args: OptionalRestArgs<Query>\n ) => UseSuspenseQueryResult<FunctionReturnType<Query>, Error>;\n};\n\nexport type ConvexRouteQueryClient<Query extends FunctionReference<\"query\">> = {\n fetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<unknown>;\n prefetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<void>;\n};\n\ntype CreateConvexQueryOptions<Query extends FunctionReference<\"query\">> = (\n query: Query,\n ...args: OptionalRestArgs<Query>\n) => ConvexRouteQueryOptions<Query>;\n\nexport function createConvexRouteQuery<\n Query extends FunctionReference<\"query\">,\n>(query: Query): ConvexRouteQuery<Query> {\n const createOptions =\n convexQuery as unknown as CreateConvexQueryOptions<Query>;\n const options = (...args: OptionalRestArgs<Query>) =>\n createOptions(query, ...args);\n\n return {\n options,\n fetchQuery(queryClient, ...args) {\n return queryClient.fetchQuery(options(...args)) as Promise<\n FunctionReturnType<Query>\n >;\n },\n prefetchQuery(queryClient, ...args) {\n return queryClient.prefetchQuery(options(...args));\n },\n useSuspenseQuery(...args) {\n return useTanStackSuspenseQuery(options(...args));\n },\n };\n}\n"],"mappings":";;;;AA2CA,SAAgB,uBAEd,OAAuC;CACvC,MAAM,gBACJA,wBAAAA;CACF,MAAM,WAAW,GAAG,SAClB,cAAc,OAAO,GAAG,IAAI;CAE9B,OAAO;EACL;EACA,WAAW,aAAa,GAAG,MAAM;GAC/B,OAAO,YAAY,WAAW,QAAQ,GAAG,IAAI,CAAC;EAGhD;EACA,cAAc,aAAa,GAAG,MAAM;GAClC,OAAO,YAAY,cAAc,QAAQ,GAAG,IAAI,CAAC;EACnD;EACA,iBAAiB,GAAG,MAAM;GACxB,QAAA,GAAA,sBAAA,iBAAA,CAAgC,QAAQ,GAAG,IAAI,CAAC;EAClD;CACF;AACF"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import { FunctionArgs, FunctionReference, FunctionReturnType, OptionalRestArgs } from "convex/server";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
type ConvexRouteQueryOptions<Query extends FunctionReference<"query">> = {
|
|
6
|
+
queryKey: ["convexQuery", Query, FunctionArgs<Query>];
|
|
7
|
+
staleTime: number;
|
|
8
|
+
};
|
|
9
|
+
type ConvexRouteQuery<Query extends FunctionReference<"query">> = {
|
|
10
|
+
options: (...args: OptionalRestArgs<Query>) => ConvexRouteQueryOptions<Query>;
|
|
11
|
+
fetchQuery: (queryClient: ConvexRouteQueryClient<Query>, ...args: OptionalRestArgs<Query>) => Promise<FunctionReturnType<Query>>;
|
|
12
|
+
prefetchQuery: (queryClient: ConvexRouteQueryClient<Query>, ...args: OptionalRestArgs<Query>) => Promise<void>;
|
|
13
|
+
useSuspenseQuery: (...args: OptionalRestArgs<Query>) => UseSuspenseQueryResult<FunctionReturnType<Query>, Error>;
|
|
14
|
+
};
|
|
15
|
+
type ConvexRouteQueryClient<Query extends FunctionReference<"query">> = {
|
|
16
|
+
fetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<unknown>;
|
|
17
|
+
prefetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
declare function createConvexRouteQuery<Query extends FunctionReference<"query">>(query: Query): ConvexRouteQuery<Query>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ConvexRouteQuery, ConvexRouteQueryClient, ConvexRouteQueryOptions, createConvexRouteQuery };
|
|
22
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;KAYY,uBAAA,eAAsC,iBAAA;EAE9C,QAAA,kBAA0B,KAAA,EAAO,YAAA,CAAa,KAAA;EAC9C,SAAA;AAAA;AAAA,KAGQ,gBAAA,eAA+B,iBAAA;EACzC,OAAA,MAAa,IAAA,EAAM,gBAAA,CAAiB,KAAA,MAAW,uBAAA,CAAwB,KAAA;EACvE,UAAA,GACE,WAAA,EAAa,sBAAA,CAAuB,KAAA,MACjC,IAAA,EAAM,gBAAA,CAAiB,KAAA,MACvB,OAAA,CAAQ,kBAAA,CAAmB,KAAA;EAChC,aAAA,GACE,WAAA,EAAa,sBAAA,CAAuB,KAAA,MACjC,IAAA,EAAM,gBAAA,CAAiB,KAAA,MACvB,OAAA;EACL,gBAAA,MACK,IAAA,EAAM,gBAAA,CAAiB,KAAA,MACvB,sBAAA,CAAuB,kBAAA,CAAmB,KAAA,GAAQ,KAAA;AAAA;AAAA,KAG7C,sBAAA,eAAqC,iBAAA;EAC/C,UAAA,GAAa,OAAA,EAAS,uBAAA,CAAwB,KAAA,MAAW,OAAA;EACzD,aAAA,GAAgB,OAAA,EAAS,uBAAA,CAAwB,KAAA,MAAW,OAAA;AAAA;AAAA,iBAQ9C,sBAAA,eACA,iBAAA,WACd,KAAA,EAAO,KAAA,GAAQ,gBAAA,CAAiB,KAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import { FunctionArgs, FunctionReference, FunctionReturnType, OptionalRestArgs } from "convex/server";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
type ConvexRouteQueryOptions<Query extends FunctionReference<"query">> = {
|
|
6
|
+
queryKey: ["convexQuery", Query, FunctionArgs<Query>];
|
|
7
|
+
staleTime: number;
|
|
8
|
+
};
|
|
9
|
+
type ConvexRouteQuery<Query extends FunctionReference<"query">> = {
|
|
10
|
+
options: (...args: OptionalRestArgs<Query>) => ConvexRouteQueryOptions<Query>;
|
|
11
|
+
fetchQuery: (queryClient: ConvexRouteQueryClient<Query>, ...args: OptionalRestArgs<Query>) => Promise<FunctionReturnType<Query>>;
|
|
12
|
+
prefetchQuery: (queryClient: ConvexRouteQueryClient<Query>, ...args: OptionalRestArgs<Query>) => Promise<void>;
|
|
13
|
+
useSuspenseQuery: (...args: OptionalRestArgs<Query>) => UseSuspenseQueryResult<FunctionReturnType<Query>, Error>;
|
|
14
|
+
};
|
|
15
|
+
type ConvexRouteQueryClient<Query extends FunctionReference<"query">> = {
|
|
16
|
+
fetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<unknown>;
|
|
17
|
+
prefetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
declare function createConvexRouteQuery<Query extends FunctionReference<"query">>(query: Query): ConvexRouteQuery<Query>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ConvexRouteQuery, ConvexRouteQueryClient, ConvexRouteQueryOptions, createConvexRouteQuery };
|
|
22
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;KAYY,uBAAA,eAAsC,iBAAA;EAE9C,QAAA,kBAA0B,KAAA,EAAO,YAAA,CAAa,KAAA;EAC9C,SAAA;AAAA;AAAA,KAGQ,gBAAA,eAA+B,iBAAA;EACzC,OAAA,MAAa,IAAA,EAAM,gBAAA,CAAiB,KAAA,MAAW,uBAAA,CAAwB,KAAA;EACvE,UAAA,GACE,WAAA,EAAa,sBAAA,CAAuB,KAAA,MACjC,IAAA,EAAM,gBAAA,CAAiB,KAAA,MACvB,OAAA,CAAQ,kBAAA,CAAmB,KAAA;EAChC,aAAA,GACE,WAAA,EAAa,sBAAA,CAAuB,KAAA,MACjC,IAAA,EAAM,gBAAA,CAAiB,KAAA,MACvB,OAAA;EACL,gBAAA,MACK,IAAA,EAAM,gBAAA,CAAiB,KAAA,MACvB,sBAAA,CAAuB,kBAAA,CAAmB,KAAA,GAAQ,KAAA;AAAA;AAAA,KAG7C,sBAAA,eAAqC,iBAAA;EAC/C,UAAA,GAAa,OAAA,EAAS,uBAAA,CAAwB,KAAA,MAAW,OAAA;EACzD,aAAA,GAAgB,OAAA,EAAS,uBAAA,CAAwB,KAAA,MAAW,OAAA;AAAA;AAAA,iBAQ9C,sBAAA,eACA,iBAAA,WACd,KAAA,EAAO,KAAA,GAAQ,gBAAA,CAAiB,KAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { convexQuery } from "@convex-dev/react-query";
|
|
2
|
+
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
function createConvexRouteQuery(query) {
|
|
5
|
+
const createOptions = convexQuery;
|
|
6
|
+
const options = (...args) => createOptions(query, ...args);
|
|
7
|
+
return {
|
|
8
|
+
options,
|
|
9
|
+
fetchQuery(queryClient, ...args) {
|
|
10
|
+
return queryClient.fetchQuery(options(...args));
|
|
11
|
+
},
|
|
12
|
+
prefetchQuery(queryClient, ...args) {
|
|
13
|
+
return queryClient.prefetchQuery(options(...args));
|
|
14
|
+
},
|
|
15
|
+
useSuspenseQuery(...args) {
|
|
16
|
+
return useSuspenseQuery(options(...args));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { createConvexRouteQuery };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["useTanStackSuspenseQuery"],"sources":["../src/index.ts"],"sourcesContent":["import { convexQuery } from \"@convex-dev/react-query\";\nimport {\n useSuspenseQuery as useTanStackSuspenseQuery,\n type UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\nimport type {\n FunctionArgs,\n FunctionReference,\n FunctionReturnType,\n OptionalRestArgs,\n} from \"convex/server\";\n\nexport type ConvexRouteQueryOptions<Query extends FunctionReference<\"query\">> =\n {\n queryKey: [\"convexQuery\", Query, FunctionArgs<Query>];\n staleTime: number;\n };\n\nexport type ConvexRouteQuery<Query extends FunctionReference<\"query\">> = {\n options: (...args: OptionalRestArgs<Query>) => ConvexRouteQueryOptions<Query>;\n fetchQuery: (\n queryClient: ConvexRouteQueryClient<Query>,\n ...args: OptionalRestArgs<Query>\n ) => Promise<FunctionReturnType<Query>>;\n prefetchQuery: (\n queryClient: ConvexRouteQueryClient<Query>,\n ...args: OptionalRestArgs<Query>\n ) => Promise<void>;\n useSuspenseQuery: (\n ...args: OptionalRestArgs<Query>\n ) => UseSuspenseQueryResult<FunctionReturnType<Query>, Error>;\n};\n\nexport type ConvexRouteQueryClient<Query extends FunctionReference<\"query\">> = {\n fetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<unknown>;\n prefetchQuery: (options: ConvexRouteQueryOptions<Query>) => Promise<void>;\n};\n\ntype CreateConvexQueryOptions<Query extends FunctionReference<\"query\">> = (\n query: Query,\n ...args: OptionalRestArgs<Query>\n) => ConvexRouteQueryOptions<Query>;\n\nexport function createConvexRouteQuery<\n Query extends FunctionReference<\"query\">,\n>(query: Query): ConvexRouteQuery<Query> {\n const createOptions =\n convexQuery as unknown as CreateConvexQueryOptions<Query>;\n const options = (...args: OptionalRestArgs<Query>) =>\n createOptions(query, ...args);\n\n return {\n options,\n fetchQuery(queryClient, ...args) {\n return queryClient.fetchQuery(options(...args)) as Promise<\n FunctionReturnType<Query>\n >;\n },\n prefetchQuery(queryClient, ...args) {\n return queryClient.prefetchQuery(options(...args));\n },\n useSuspenseQuery(...args) {\n return useTanStackSuspenseQuery(options(...args));\n },\n };\n}\n"],"mappings":";;;AA2CA,SAAgB,uBAEd,OAAuC;CACvC,MAAM,gBACJ;CACF,MAAM,WAAW,GAAG,SAClB,cAAc,OAAO,GAAG,IAAI;CAE9B,OAAO;EACL;EACA,WAAW,aAAa,GAAG,MAAM;GAC/B,OAAO,YAAY,WAAW,QAAQ,GAAG,IAAI,CAAC;EAGhD;EACA,cAAc,aAAa,GAAG,MAAM;GAClC,OAAO,YAAY,cAAc,QAAQ,GAAG,IAAI,CAAC;EACnD;EACA,iBAAiB,GAAG,MAAM;GACxB,OAAOA,iBAAyB,QAAQ,GAAG,IAAI,CAAC;EAClD;CACF;AACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "convex-route-query",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Type-safe Convex query helpers for TanStack Router loaders and React Query Suspense.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": {
|
|
10
|
+
"import": "./dist/index.d.mts",
|
|
11
|
+
"require": "./dist/index.d.cts"
|
|
12
|
+
},
|
|
13
|
+
"import": "./dist/index.mjs",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"main": "./dist/index.cjs",
|
|
18
|
+
"module": "./dist/index.mjs",
|
|
19
|
+
"types": "./dist/index.d.mts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "concurrently --raw --names tsdown \"bun run build:tsdown\"",
|
|
27
|
+
"build:tsdown": "tsdown",
|
|
28
|
+
"ci": "bun run ci:test && bun run build && bun run lint:pkg",
|
|
29
|
+
"ci:test": "concurrently --raw --names runtime,types,xo \"bun run ci:test:runtime\" \"bun run ci:test:types\" \"bun run ci:test:xo\"",
|
|
30
|
+
"ci:test:runtime": "vitest run",
|
|
31
|
+
"ci:test:types": "tsc --noEmit",
|
|
32
|
+
"ci:test:xo": "xo",
|
|
33
|
+
"dev": "concurrently --raw --names tsdown \"bun run dev:tsdown\"",
|
|
34
|
+
"dev:tsdown": "tsdown --watch",
|
|
35
|
+
"lint:pkg": "concurrently --raw --names publint,attw \"bun run lint:pkg:publint\" \"bun run lint:pkg:attw\"",
|
|
36
|
+
"lint:pkg:attw": "attw --pack .",
|
|
37
|
+
"lint:pkg:publint": "publint",
|
|
38
|
+
"prepublishOnly": "bun run ci",
|
|
39
|
+
"release": "bun run build && changeset publish",
|
|
40
|
+
"test": "concurrently --raw --names runtime,types,xo \"bun run test:runtime\" \"bun run test:types\" \"bun run test:xo\"",
|
|
41
|
+
"test:runtime": "vitest run",
|
|
42
|
+
"test:types": "tsc --noEmit",
|
|
43
|
+
"test:xo": "xo",
|
|
44
|
+
"typecheck": "bun run test:types",
|
|
45
|
+
"version": "changeset version && bun install --lockfile-only"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"convex",
|
|
49
|
+
"tanstack",
|
|
50
|
+
"tanstack-router",
|
|
51
|
+
"react-query",
|
|
52
|
+
"suspense",
|
|
53
|
+
"typescript"
|
|
54
|
+
],
|
|
55
|
+
"author": "ludicrous",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"homepage": "https://github.com/ludicroushq/convex-route-query#readme",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/ludicroushq/convex-route-query.git"
|
|
61
|
+
},
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/ludicroushq/convex-route-query/issues"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=20.0.0"
|
|
70
|
+
},
|
|
71
|
+
"packageManager": "bun@1.3.14",
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"@convex-dev/react-query": ">=0.1.0",
|
|
74
|
+
"@tanstack/react-query": ">=5.0.0",
|
|
75
|
+
"convex": ">=1.0.0",
|
|
76
|
+
"react": ">=18.0.0"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@arethetypeswrong/cli": "^0.18.3",
|
|
80
|
+
"@changesets/cli": "^2.31.0",
|
|
81
|
+
"@convex-dev/react-query": "^0.1.0",
|
|
82
|
+
"@tanstack/react-query": "^5.101.0",
|
|
83
|
+
"@types/react": "^19.2.7",
|
|
84
|
+
"concurrently": "^10.0.3",
|
|
85
|
+
"convex": "^1.41.0",
|
|
86
|
+
"expect-type": "^1.3.0",
|
|
87
|
+
"lefthook": "^2.1.9",
|
|
88
|
+
"prettier": "^3.8.4",
|
|
89
|
+
"publint": "^0.3.21",
|
|
90
|
+
"react": "^19.2.7",
|
|
91
|
+
"tsdown": "^0.22.2",
|
|
92
|
+
"typescript": "^6.0.3",
|
|
93
|
+
"vitest": "^4.1.8",
|
|
94
|
+
"xo": "^2.0.2"
|
|
95
|
+
}
|
|
96
|
+
}
|