@btst/stack 1.1.3 → 1.1.4
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/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/hooks/index.d.cts +3 -3
- package/dist/plugins/blog/client/hooks/index.d.mts +3 -3
- package/dist/plugins/blog/client/hooks/index.d.ts +3 -3
- package/dist/plugins/blog/client/index.d.cts +178 -165
- package/dist/plugins/blog/client/index.d.mts +178 -165
- package/dist/plugins/blog/client/index.d.ts +178 -165
- package/dist/plugins/blog/query-keys.d.cts +5 -5
- package/dist/plugins/blog/query-keys.d.mts +5 -5
- package/dist/plugins/blog/query-keys.d.ts +5 -5
- package/dist/plugins/client/index.d.cts +3 -8
- package/dist/plugins/client/index.d.mts +3 -8
- package/dist/plugins/client/index.d.ts +3 -8
- package/package.json +1 -1
- package/src/plugins/client/index.ts +5 -15
- package/dist/shared/{stack.CoPoHVfV.d.cts → stack.CbuN2zVV.d.cts} +2 -2
- package/dist/shared/{stack.CoPoHVfV.d.mts → stack.CbuN2zVV.d.mts} +2 -2
- package/dist/shared/{stack.CoPoHVfV.d.ts → stack.CbuN2zVV.d.ts} +2 -2
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import type { ClientPlugin } from "../../types";
|
|
14
|
+
import type { Route } from "@btst/yar";
|
|
14
15
|
|
|
15
16
|
export type {
|
|
16
17
|
ClientPlugin,
|
|
@@ -25,21 +26,10 @@ export { createRoute, createRouter } from "@btst/yar";
|
|
|
25
26
|
|
|
26
27
|
export { createClient } from "better-call/client";
|
|
27
28
|
|
|
28
|
-
/**
|
|
29
|
-
* Helper type to extract plugin structure without leaking internal type references
|
|
30
|
-
* This ensures types are portable across package boundaries
|
|
31
|
-
*/
|
|
32
|
-
type PortableClientPlugin<TPlugin extends ClientPlugin<any, any>> =
|
|
33
|
-
ClientPlugin<
|
|
34
|
-
TPlugin extends ClientPlugin<infer TOverrides, any> ? TOverrides : never,
|
|
35
|
-
TPlugin extends ClientPlugin<any, infer TRoutes> ? TRoutes : never
|
|
36
|
-
>;
|
|
37
|
-
|
|
38
29
|
/**
|
|
39
30
|
* Helper to define a client plugin with full type inference
|
|
40
31
|
*
|
|
41
32
|
* Automatically infers route keys, hook names, and their types without needing casts.
|
|
42
|
-
* Returns a portable type that doesn't leak internal pnpm path references.
|
|
43
33
|
*
|
|
44
34
|
* @example
|
|
45
35
|
* ```ts
|
|
@@ -54,8 +44,8 @@ type PortableClientPlugin<TPlugin extends ClientPlugin<any, any>> =
|
|
|
54
44
|
*
|
|
55
45
|
* @template TPlugin - The exact plugin definition (auto-inferred)
|
|
56
46
|
*/
|
|
57
|
-
export function defineClientPlugin<
|
|
58
|
-
|
|
59
|
-
):
|
|
60
|
-
return plugin
|
|
47
|
+
export function defineClientPlugin<
|
|
48
|
+
TPlugin extends ClientPlugin<any, Record<string, Route>>,
|
|
49
|
+
>(plugin: TPlugin): TPlugin {
|
|
50
|
+
return plugin;
|
|
61
51
|
}
|
|
@@ -36,14 +36,14 @@ interface SerializedTag extends Omit<Tag, "createdAt" | "updatedAt"> {
|
|
|
36
36
|
|
|
37
37
|
declare const createPostSchema: z.ZodObject<{
|
|
38
38
|
slug: z.ZodOptional<z.ZodString>;
|
|
39
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
40
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
41
39
|
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
40
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
42
41
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
43
42
|
title: z.ZodString;
|
|
44
43
|
content: z.ZodString;
|
|
45
44
|
excerpt: z.ZodString;
|
|
46
45
|
image: z.ZodOptional<z.ZodString>;
|
|
46
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
47
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
48
48
|
name: z.ZodString;
|
|
49
49
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -36,14 +36,14 @@ interface SerializedTag extends Omit<Tag, "createdAt" | "updatedAt"> {
|
|
|
36
36
|
|
|
37
37
|
declare const createPostSchema: z.ZodObject<{
|
|
38
38
|
slug: z.ZodOptional<z.ZodString>;
|
|
39
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
40
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
41
39
|
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
40
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
42
41
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
43
42
|
title: z.ZodString;
|
|
44
43
|
content: z.ZodString;
|
|
45
44
|
excerpt: z.ZodString;
|
|
46
45
|
image: z.ZodOptional<z.ZodString>;
|
|
46
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
47
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
48
48
|
name: z.ZodString;
|
|
49
49
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -36,14 +36,14 @@ interface SerializedTag extends Omit<Tag, "createdAt" | "updatedAt"> {
|
|
|
36
36
|
|
|
37
37
|
declare const createPostSchema: z.ZodObject<{
|
|
38
38
|
slug: z.ZodOptional<z.ZodString>;
|
|
39
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
40
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
41
39
|
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
40
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
42
41
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
43
42
|
title: z.ZodString;
|
|
44
43
|
content: z.ZodString;
|
|
45
44
|
excerpt: z.ZodString;
|
|
46
45
|
image: z.ZodOptional<z.ZodString>;
|
|
46
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
47
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
48
48
|
name: z.ZodString;
|
|
49
49
|
}, z.core.$strip>, z.ZodObject<{
|