@sigil-dev/grimoire 0.7.5 → 0.7.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.
- package/.grimoire/_routes.dom.js +8 -0
- package/.grimoire/_routes.hydrate.js +8 -0
- package/.grimoire/tsconfig.generated.json +11 -0
- package/.grimoire/types/ambient.d.ts +59 -0
- package/.grimoire/types/api/hello/$types.d.ts +50 -0
- package/.grimoire/types/api/items/$types.d.ts +50 -0
- package/.grimoire/types/echo/$types.d.ts +50 -0
- package/.grimoire/types/env-private.d.ts +5 -0
- package/.grimoire/types/env-public.d.ts +5 -0
- package/.grimoire/types/mixed/$types.d.ts +50 -0
- package/.grimoire/types/params/[docId]/$types.d.ts +52 -0
- package/.grimoire/types/reject/$types.d.ts +50 -0
- package/index.ts +34 -34
- package/package.json +8 -4
- package/preload.js +2 -0
- package/public/__grimoire__/hydrate.js +585 -0
- package/public/__grimoire__/index.js +490 -0
- package/src/client/head.ts +29 -0
- package/src/client/router.ts +224 -76
- package/src/env/index.ts +25 -0
- package/src/env/plugin.ts +13 -0
- package/src/env/private.ts +5 -0
- package/src/env/public.ts +7 -0
- package/src/env/typegen.ts +51 -0
- package/src/integrations/vite.ts +72 -72
- package/src/rendering/head.ts +22 -2
- package/src/rendering/hydrate.ts +81 -27
- package/src/rendering/index.ts +199 -186
- package/src/rendering/ssrPlugin.ts +53 -47
- package/src/routing/manifest-gen.ts +39 -26
- package/src/routing/router.ts +106 -98
- package/src/routing/scanner.ts +135 -129
- package/src/routing/transform-routes.ts +101 -101
- package/src/server/build.ts +147 -90
- package/src/server/coordinator.ts +306 -297
- package/src/server/hooks.ts +24 -3
- package/src/server/index.ts +144 -70
- package/src/server/worker.ts +59 -59
- package/src/typegen/index.ts +353 -340
- package/src/types.ts +269 -260
- package/test/context.test.ts +52 -52
- package/test/hydration.test.ts +119 -119
- package/test/middleware.test.ts +223 -221
- package/test/rendering.test.ts +425 -425
- package/test/routing.test.ts +83 -45
- package/test/scanning.test.ts +181 -169
- package/test/server.test.ts +229 -229
- package/test/streaming.test.ts +106 -106
- package/test/transform-routes.test.ts +84 -84
- package/test/typegen.test.ts +19 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Auto-generated by @sigil-dev/grimoire — do not edit
|
|
2
|
+
|
|
3
|
+
declare namespace App {
|
|
4
|
+
// Extend this interface in your app's src/app.d.ts to add typed locals
|
|
5
|
+
interface Locals extends Record<string, unknown> {}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Available in all route files without import.
|
|
9
|
+
// Params default to Record<string,string>; for per-route typed params import from './$types'.
|
|
10
|
+
// Note: using these globals widens return types — PageData loses concrete keys.
|
|
11
|
+
// For precise data inference annotate load() with PageServerLoad from './$types'.
|
|
12
|
+
|
|
13
|
+
type PageServerLoad<
|
|
14
|
+
P extends Record<string, string> = Record<string, string>
|
|
15
|
+
> = (ctx: {
|
|
16
|
+
params: P;
|
|
17
|
+
request: Request;
|
|
18
|
+
url: URL;
|
|
19
|
+
locals: App.Locals;
|
|
20
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
21
|
+
|
|
22
|
+
type LayoutServerLoad<
|
|
23
|
+
P extends Record<string, string> = Record<string, string>
|
|
24
|
+
> = (ctx: {
|
|
25
|
+
params: P;
|
|
26
|
+
request: Request;
|
|
27
|
+
url: URL;
|
|
28
|
+
locals: App.Locals;
|
|
29
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
30
|
+
|
|
31
|
+
type RequestHandler<
|
|
32
|
+
P extends Record<string, string> = Record<string, string>
|
|
33
|
+
> = (ctx: {
|
|
34
|
+
params: P;
|
|
35
|
+
request: Request;
|
|
36
|
+
url: URL;
|
|
37
|
+
locals: App.Locals;
|
|
38
|
+
}) => Response | Promise<Response>;
|
|
39
|
+
|
|
40
|
+
type PageProps<
|
|
41
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
42
|
+
P extends Record<string, string> = Record<string, string>
|
|
43
|
+
> = { data: D; params: P };
|
|
44
|
+
|
|
45
|
+
type LayoutProps<
|
|
46
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
47
|
+
P extends Record<string, string> = Record<string, string>
|
|
48
|
+
> = { data: D; params: P; children?: unknown };
|
|
49
|
+
|
|
50
|
+
type ErrorProps = { status: number; message: string };
|
|
51
|
+
|
|
52
|
+
type UpgradeContext<
|
|
53
|
+
P extends Record<string, string> = Record<string, string>
|
|
54
|
+
> = {
|
|
55
|
+
params: P;
|
|
56
|
+
request: Request;
|
|
57
|
+
url: URL;
|
|
58
|
+
locals: App.Locals;
|
|
59
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Auto-generated by @sigil-dev/grimoire — do not edit
|
|
2
|
+
|
|
3
|
+
export type Params = {};
|
|
4
|
+
|
|
5
|
+
export type PageData = Record<string, never>;
|
|
6
|
+
export type PageProps = { data: PageData; params: Params };
|
|
7
|
+
export type PageServerLoad = never;
|
|
8
|
+
export type Actions = Record<string, never>;
|
|
9
|
+
|
|
10
|
+
export type LayoutData = Record<string, never>;
|
|
11
|
+
export type LayoutProps = { data: LayoutData; params: Params; children?: unknown };
|
|
12
|
+
export type LayoutServerLoad = (ctx: {
|
|
13
|
+
params: Params;
|
|
14
|
+
request: Request;
|
|
15
|
+
url: URL;
|
|
16
|
+
locals: App.Locals;
|
|
17
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
18
|
+
|
|
19
|
+
type _SRV = typeof import("C:/Users/Cane1712/AppData/Local/Temp/grimoire-server-1780769083225/api/hello/+server.js");
|
|
20
|
+
type _HttpMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
21
|
+
type _ServerKeys = Extract<keyof _SRV, _HttpMethods>;
|
|
22
|
+
export type ServerHandlers = {
|
|
23
|
+
[K in _ServerKeys]: (ctx: {
|
|
24
|
+
params: Params;
|
|
25
|
+
request: Request;
|
|
26
|
+
url: URL;
|
|
27
|
+
locals: App.Locals;
|
|
28
|
+
}) => Response | Promise<Response>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type UpgradeContext = {
|
|
32
|
+
request: Request;
|
|
33
|
+
params: Params;
|
|
34
|
+
url: URL;
|
|
35
|
+
locals: App.Locals;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type _UpgradeReturn = "upgrade" extends keyof _SRV
|
|
39
|
+
? _SRV["upgrade"] extends (...args: any[]) => any
|
|
40
|
+
? Awaited<ReturnType<_SRV["upgrade"]>>
|
|
41
|
+
: {}
|
|
42
|
+
: {};
|
|
43
|
+
export type WsData = { params: Params } & Omit<_UpgradeReturn, "__handler">;
|
|
44
|
+
|
|
45
|
+
export type WebSocketHandler = {
|
|
46
|
+
open?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
47
|
+
message?(ws: ServerWebSocket<WsData>, data: string | Buffer): void | Promise<void>;
|
|
48
|
+
close?(ws: ServerWebSocket<WsData>, code: number, reason?: string): void | Promise<void>;
|
|
49
|
+
drain?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
50
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Auto-generated by @sigil-dev/grimoire — do not edit
|
|
2
|
+
|
|
3
|
+
export type Params = {};
|
|
4
|
+
|
|
5
|
+
export type PageData = Record<string, never>;
|
|
6
|
+
export type PageProps = { data: PageData; params: Params };
|
|
7
|
+
export type PageServerLoad = never;
|
|
8
|
+
export type Actions = Record<string, never>;
|
|
9
|
+
|
|
10
|
+
export type LayoutData = Record<string, never>;
|
|
11
|
+
export type LayoutProps = { data: LayoutData; params: Params; children?: unknown };
|
|
12
|
+
export type LayoutServerLoad = (ctx: {
|
|
13
|
+
params: Params;
|
|
14
|
+
request: Request;
|
|
15
|
+
url: URL;
|
|
16
|
+
locals: App.Locals;
|
|
17
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
18
|
+
|
|
19
|
+
type _SRV = typeof import("C:/Users/Cane1712/AppData/Local/Temp/grimoire-server-1780769083225/api/items/+server.js");
|
|
20
|
+
type _HttpMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
21
|
+
type _ServerKeys = Extract<keyof _SRV, _HttpMethods>;
|
|
22
|
+
export type ServerHandlers = {
|
|
23
|
+
[K in _ServerKeys]: (ctx: {
|
|
24
|
+
params: Params;
|
|
25
|
+
request: Request;
|
|
26
|
+
url: URL;
|
|
27
|
+
locals: App.Locals;
|
|
28
|
+
}) => Response | Promise<Response>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type UpgradeContext = {
|
|
32
|
+
request: Request;
|
|
33
|
+
params: Params;
|
|
34
|
+
url: URL;
|
|
35
|
+
locals: App.Locals;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type _UpgradeReturn = "upgrade" extends keyof _SRV
|
|
39
|
+
? _SRV["upgrade"] extends (...args: any[]) => any
|
|
40
|
+
? Awaited<ReturnType<_SRV["upgrade"]>>
|
|
41
|
+
: {}
|
|
42
|
+
: {};
|
|
43
|
+
export type WsData = { params: Params } & Omit<_UpgradeReturn, "__handler">;
|
|
44
|
+
|
|
45
|
+
export type WebSocketHandler = {
|
|
46
|
+
open?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
47
|
+
message?(ws: ServerWebSocket<WsData>, data: string | Buffer): void | Promise<void>;
|
|
48
|
+
close?(ws: ServerWebSocket<WsData>, code: number, reason?: string): void | Promise<void>;
|
|
49
|
+
drain?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
50
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Auto-generated by @sigil-dev/grimoire — do not edit
|
|
2
|
+
|
|
3
|
+
export type Params = {};
|
|
4
|
+
|
|
5
|
+
export type PageData = Record<string, never>;
|
|
6
|
+
export type PageProps = { data: PageData; params: Params };
|
|
7
|
+
export type PageServerLoad = never;
|
|
8
|
+
export type Actions = Record<string, never>;
|
|
9
|
+
|
|
10
|
+
export type LayoutData = Record<string, never>;
|
|
11
|
+
export type LayoutProps = { data: LayoutData; params: Params; children?: unknown };
|
|
12
|
+
export type LayoutServerLoad = (ctx: {
|
|
13
|
+
params: Params;
|
|
14
|
+
request: Request;
|
|
15
|
+
url: URL;
|
|
16
|
+
locals: App.Locals;
|
|
17
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
18
|
+
|
|
19
|
+
type _SRV = typeof import("C:/Users/Cane1712/AppData/Local/Temp/grimoire-ws-1780769083320/echo/+server.js");
|
|
20
|
+
type _HttpMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
21
|
+
type _ServerKeys = Extract<keyof _SRV, _HttpMethods>;
|
|
22
|
+
export type ServerHandlers = {
|
|
23
|
+
[K in _ServerKeys]: (ctx: {
|
|
24
|
+
params: Params;
|
|
25
|
+
request: Request;
|
|
26
|
+
url: URL;
|
|
27
|
+
locals: App.Locals;
|
|
28
|
+
}) => Response | Promise<Response>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type UpgradeContext = {
|
|
32
|
+
request: Request;
|
|
33
|
+
params: Params;
|
|
34
|
+
url: URL;
|
|
35
|
+
locals: App.Locals;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type _UpgradeReturn = "upgrade" extends keyof _SRV
|
|
39
|
+
? _SRV["upgrade"] extends (...args: any[]) => any
|
|
40
|
+
? Awaited<ReturnType<_SRV["upgrade"]>>
|
|
41
|
+
: {}
|
|
42
|
+
: {};
|
|
43
|
+
export type WsData = { params: Params } & Omit<_UpgradeReturn, "__handler">;
|
|
44
|
+
|
|
45
|
+
export type WebSocketHandler = {
|
|
46
|
+
open?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
47
|
+
message?(ws: ServerWebSocket<WsData>, data: string | Buffer): void | Promise<void>;
|
|
48
|
+
close?(ws: ServerWebSocket<WsData>, code: number, reason?: string): void | Promise<void>;
|
|
49
|
+
drain?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
50
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Auto-generated by @sigil-dev/grimoire — do not edit
|
|
2
|
+
|
|
3
|
+
export type Params = {};
|
|
4
|
+
|
|
5
|
+
export type PageData = Record<string, never>;
|
|
6
|
+
export type PageProps = { data: PageData; params: Params };
|
|
7
|
+
export type PageServerLoad = never;
|
|
8
|
+
export type Actions = Record<string, never>;
|
|
9
|
+
|
|
10
|
+
export type LayoutData = Record<string, never>;
|
|
11
|
+
export type LayoutProps = { data: LayoutData; params: Params; children?: unknown };
|
|
12
|
+
export type LayoutServerLoad = (ctx: {
|
|
13
|
+
params: Params;
|
|
14
|
+
request: Request;
|
|
15
|
+
url: URL;
|
|
16
|
+
locals: App.Locals;
|
|
17
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
18
|
+
|
|
19
|
+
type _SRV = typeof import("C:/Users/Cane1712/AppData/Local/Temp/grimoire-ws-1780769083320/mixed/+server.js");
|
|
20
|
+
type _HttpMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
21
|
+
type _ServerKeys = Extract<keyof _SRV, _HttpMethods>;
|
|
22
|
+
export type ServerHandlers = {
|
|
23
|
+
[K in _ServerKeys]: (ctx: {
|
|
24
|
+
params: Params;
|
|
25
|
+
request: Request;
|
|
26
|
+
url: URL;
|
|
27
|
+
locals: App.Locals;
|
|
28
|
+
}) => Response | Promise<Response>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type UpgradeContext = {
|
|
32
|
+
request: Request;
|
|
33
|
+
params: Params;
|
|
34
|
+
url: URL;
|
|
35
|
+
locals: App.Locals;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type _UpgradeReturn = "upgrade" extends keyof _SRV
|
|
39
|
+
? _SRV["upgrade"] extends (...args: any[]) => any
|
|
40
|
+
? Awaited<ReturnType<_SRV["upgrade"]>>
|
|
41
|
+
: {}
|
|
42
|
+
: {};
|
|
43
|
+
export type WsData = { params: Params } & Omit<_UpgradeReturn, "__handler">;
|
|
44
|
+
|
|
45
|
+
export type WebSocketHandler = {
|
|
46
|
+
open?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
47
|
+
message?(ws: ServerWebSocket<WsData>, data: string | Buffer): void | Promise<void>;
|
|
48
|
+
close?(ws: ServerWebSocket<WsData>, code: number, reason?: string): void | Promise<void>;
|
|
49
|
+
drain?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
50
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Auto-generated by @sigil-dev/grimoire — do not edit
|
|
2
|
+
|
|
3
|
+
export type Params = {
|
|
4
|
+
docId: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type PageData = Record<string, never>;
|
|
8
|
+
export type PageProps = { data: PageData; params: Params };
|
|
9
|
+
export type PageServerLoad = never;
|
|
10
|
+
export type Actions = Record<string, never>;
|
|
11
|
+
|
|
12
|
+
export type LayoutData = Record<string, never>;
|
|
13
|
+
export type LayoutProps = { data: LayoutData; params: Params; children?: unknown };
|
|
14
|
+
export type LayoutServerLoad = (ctx: {
|
|
15
|
+
params: Params;
|
|
16
|
+
request: Request;
|
|
17
|
+
url: URL;
|
|
18
|
+
locals: App.Locals;
|
|
19
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
20
|
+
|
|
21
|
+
type _SRV = typeof import("C:/Users/Cane1712/AppData/Local/Temp/grimoire-ws-1780769083320/params/[docId]/+server.js");
|
|
22
|
+
type _HttpMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
23
|
+
type _ServerKeys = Extract<keyof _SRV, _HttpMethods>;
|
|
24
|
+
export type ServerHandlers = {
|
|
25
|
+
[K in _ServerKeys]: (ctx: {
|
|
26
|
+
params: Params;
|
|
27
|
+
request: Request;
|
|
28
|
+
url: URL;
|
|
29
|
+
locals: App.Locals;
|
|
30
|
+
}) => Response | Promise<Response>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type UpgradeContext = {
|
|
34
|
+
request: Request;
|
|
35
|
+
params: Params;
|
|
36
|
+
url: URL;
|
|
37
|
+
locals: App.Locals;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type _UpgradeReturn = "upgrade" extends keyof _SRV
|
|
41
|
+
? _SRV["upgrade"] extends (...args: any[]) => any
|
|
42
|
+
? Awaited<ReturnType<_SRV["upgrade"]>>
|
|
43
|
+
: {}
|
|
44
|
+
: {};
|
|
45
|
+
export type WsData = { params: Params } & Omit<_UpgradeReturn, "__handler">;
|
|
46
|
+
|
|
47
|
+
export type WebSocketHandler = {
|
|
48
|
+
open?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
49
|
+
message?(ws: ServerWebSocket<WsData>, data: string | Buffer): void | Promise<void>;
|
|
50
|
+
close?(ws: ServerWebSocket<WsData>, code: number, reason?: string): void | Promise<void>;
|
|
51
|
+
drain?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
52
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Auto-generated by @sigil-dev/grimoire — do not edit
|
|
2
|
+
|
|
3
|
+
export type Params = {};
|
|
4
|
+
|
|
5
|
+
export type PageData = Record<string, never>;
|
|
6
|
+
export type PageProps = { data: PageData; params: Params };
|
|
7
|
+
export type PageServerLoad = never;
|
|
8
|
+
export type Actions = Record<string, never>;
|
|
9
|
+
|
|
10
|
+
export type LayoutData = Record<string, never>;
|
|
11
|
+
export type LayoutProps = { data: LayoutData; params: Params; children?: unknown };
|
|
12
|
+
export type LayoutServerLoad = (ctx: {
|
|
13
|
+
params: Params;
|
|
14
|
+
request: Request;
|
|
15
|
+
url: URL;
|
|
16
|
+
locals: App.Locals;
|
|
17
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
18
|
+
|
|
19
|
+
type _SRV = typeof import("C:/Users/Cane1712/AppData/Local/Temp/grimoire-ws-1780769083320/reject/+server.js");
|
|
20
|
+
type _HttpMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
21
|
+
type _ServerKeys = Extract<keyof _SRV, _HttpMethods>;
|
|
22
|
+
export type ServerHandlers = {
|
|
23
|
+
[K in _ServerKeys]: (ctx: {
|
|
24
|
+
params: Params;
|
|
25
|
+
request: Request;
|
|
26
|
+
url: URL;
|
|
27
|
+
locals: App.Locals;
|
|
28
|
+
}) => Response | Promise<Response>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type UpgradeContext = {
|
|
32
|
+
request: Request;
|
|
33
|
+
params: Params;
|
|
34
|
+
url: URL;
|
|
35
|
+
locals: App.Locals;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type _UpgradeReturn = "upgrade" extends keyof _SRV
|
|
39
|
+
? _SRV["upgrade"] extends (...args: any[]) => any
|
|
40
|
+
? Awaited<ReturnType<_SRV["upgrade"]>>
|
|
41
|
+
: {}
|
|
42
|
+
: {};
|
|
43
|
+
export type WsData = { params: Params } & Omit<_UpgradeReturn, "__handler">;
|
|
44
|
+
|
|
45
|
+
export type WebSocketHandler = {
|
|
46
|
+
open?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
47
|
+
message?(ws: ServerWebSocket<WsData>, data: string | Buffer): void | Promise<void>;
|
|
48
|
+
close?(ws: ServerWebSocket<WsData>, code: number, reason?: string): void | Promise<void>;
|
|
49
|
+
drain?(ws: ServerWebSocket<WsData>): void | Promise<void>;
|
|
50
|
+
};
|
package/index.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export { Head } from "./src/rendering/head";
|
|
2
|
-
export type { RouteFile, RouteTree } from "./src/routing/scanner";
|
|
3
|
-
export type { ErrorResult } from "./src/sentinels/error.ts";
|
|
4
|
-
export { error, isErrorResult } from "./src/sentinels/error.ts";
|
|
5
|
-
export type { FailResult } from "./src/sentinels/fail.ts";
|
|
6
|
-
export { fail, isFailResult } from "./src/sentinels/fail.ts";
|
|
7
|
-
export type { RedirectResult } from "./src/sentinels/redirect.ts";
|
|
8
|
-
export { isRedirectResult, redirect } from "./src/sentinels/redirect.ts";
|
|
9
|
-
export type {
|
|
10
|
-
CookieOptions,
|
|
11
|
-
Cookies,
|
|
12
|
-
Handle,
|
|
13
|
-
RequestEvent,
|
|
14
|
-
ResolveFunction,
|
|
15
|
-
} from "./src/server/hooks";
|
|
16
|
-
export { createHooks, sequence } from "./src/server/hooks";
|
|
17
|
-
export type {
|
|
18
|
-
BuiltinWorkerMode,
|
|
19
|
-
CoordinatorContext,
|
|
20
|
-
GrimoireConfig,
|
|
21
|
-
GrimoirePlugin,
|
|
22
|
-
LayoutServerLoad,
|
|
23
|
-
LoadContext,
|
|
24
|
-
PageServerLoad,
|
|
25
|
-
RenderContext,
|
|
26
|
-
RequestHandler,
|
|
27
|
-
RouteInfo,
|
|
28
|
-
TypedLoadContext,
|
|
29
|
-
WorkerDescriptor,
|
|
30
|
-
WorkerEnv,
|
|
31
|
-
WorkerMode,
|
|
32
|
-
WsRouteHandler,
|
|
33
|
-
} from "./src/types";
|
|
34
|
-
export { defineConfig } from "./src/types";
|
|
1
|
+
export { Head } from "./src/rendering/head";
|
|
2
|
+
export type { RouteFile, RouteTree } from "./src/routing/scanner";
|
|
3
|
+
export type { ErrorResult } from "./src/sentinels/error.ts";
|
|
4
|
+
export { error, isErrorResult } from "./src/sentinels/error.ts";
|
|
5
|
+
export type { FailResult } from "./src/sentinels/fail.ts";
|
|
6
|
+
export { fail, isFailResult } from "./src/sentinels/fail.ts";
|
|
7
|
+
export type { RedirectResult } from "./src/sentinels/redirect.ts";
|
|
8
|
+
export { isRedirectResult, redirect } from "./src/sentinels/redirect.ts";
|
|
9
|
+
export type {
|
|
10
|
+
CookieOptions,
|
|
11
|
+
Cookies,
|
|
12
|
+
Handle,
|
|
13
|
+
RequestEvent,
|
|
14
|
+
ResolveFunction,
|
|
15
|
+
} from "./src/server/hooks";
|
|
16
|
+
export { createHooks, sequence } from "./src/server/hooks";
|
|
17
|
+
export type {
|
|
18
|
+
BuiltinWorkerMode,
|
|
19
|
+
CoordinatorContext,
|
|
20
|
+
GrimoireConfig,
|
|
21
|
+
GrimoirePlugin,
|
|
22
|
+
LayoutServerLoad,
|
|
23
|
+
LoadContext,
|
|
24
|
+
PageServerLoad,
|
|
25
|
+
RenderContext,
|
|
26
|
+
RequestHandler,
|
|
27
|
+
RouteInfo,
|
|
28
|
+
TypedLoadContext,
|
|
29
|
+
WorkerDescriptor,
|
|
30
|
+
WorkerEnv,
|
|
31
|
+
WorkerMode,
|
|
32
|
+
WsRouteHandler,
|
|
33
|
+
} from "./src/types";
|
|
34
|
+
export { defineConfig } from "./src/types";
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"module": "index.ts",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.7.
|
|
6
|
+
"version": "0.7.6",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@types/bun": "latest"
|
|
9
9
|
},
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"./client": "./src/client/enhance.ts",
|
|
15
15
|
"./headers": "./src/headers.ts",
|
|
16
16
|
"./hooks": "./src/server/hooks.ts",
|
|
17
|
-
"./vite": "./src/integrations/vite.ts"
|
|
17
|
+
"./vite": "./src/integrations/vite.ts",
|
|
18
|
+
"./bun": "./src/rendering/ssrPlugin.ts",
|
|
19
|
+
"./env/public": "./src/env/public.ts",
|
|
20
|
+
"./env/private": "./src/env/private.ts"
|
|
18
21
|
},
|
|
19
22
|
"bin": {
|
|
20
23
|
"grimoire": "src/sync.ts"
|
|
@@ -27,9 +30,10 @@
|
|
|
27
30
|
"@babel/core": "^8.0.0-rc.6",
|
|
28
31
|
"@babel/plugin-syntax-jsx": "^8.0.0-rc.6",
|
|
29
32
|
"@babel/plugin-syntax-typescript": "^8.0.0-rc.6",
|
|
33
|
+
"@babel/preset-typescript": "^8.0.0-rc.6",
|
|
30
34
|
"@babel/types": "^8.0.0-rc.6",
|
|
31
|
-
"@sigil-dev/compiler": "0.7.
|
|
32
|
-
"@sigil-dev/runtime": "0.7.
|
|
35
|
+
"@sigil-dev/compiler": "0.7.6",
|
|
36
|
+
"@sigil-dev/runtime": "0.7.6",
|
|
33
37
|
"vite": "^8.0.16"
|
|
34
38
|
},
|
|
35
39
|
"peerDependencies": {
|
package/preload.js
ADDED