@teyik0/furin 0.1.0-alpha.10 → 0.1.0-alpha.11
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/build/index.js +141 -23
- package/dist/cli/index.js +141 -23
- package/dist/dev-inspector.d.ts +89 -0
- package/dist/furin.js +444 -86
- package/dist/link.js +84 -10
- package/dist/render/dev-cache.d.ts +91 -0
- package/dist/render/index.d.ts +2 -1
- package/dist/router.d.ts +14 -0
- package/dist/router.js +346 -57
- package/package.json +4 -4
- package/src/dev-inspector.ts +60 -0
- package/src/dev-page-plugin.ts +7 -0
- package/src/env.d.ts +1 -0
- package/src/furin.ts +3 -0
- package/src/render/dev-cache.ts +223 -0
- package/src/render/index.ts +20 -18
- package/src/router.ts +299 -44
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
/**
|
|
3
|
+
* Dev "Live ISR" inspector.
|
|
4
|
+
*
|
|
5
|
+
* Mounts read-only JSON endpoints that surface the active entries of the
|
|
6
|
+
* dev-mode loader caches. Designed to back a future browser DevTools panel:
|
|
7
|
+
* the JSON shape is stable and carries enough information for a UI to render
|
|
8
|
+
* a freshness-aware entry list with dependencies and a data preview.
|
|
9
|
+
*
|
|
10
|
+
* The plugin always registers the routes — caller is responsible for gating
|
|
11
|
+
* on `IS_DEV` to keep them out of production builds.
|
|
12
|
+
*/
|
|
13
|
+
/** Public response shape — keep stable for downstream UI consumers. */
|
|
14
|
+
export interface InspectorEntry {
|
|
15
|
+
/** Per-entry preview of the cached loader output. */
|
|
16
|
+
dataPreview: Record<string, unknown>;
|
|
17
|
+
/** Source files whose change drops this entry. */
|
|
18
|
+
dependencies: string[];
|
|
19
|
+
/** ms timestamp at which the entry was written. */
|
|
20
|
+
generatedAt: number;
|
|
21
|
+
/** True iff the entry is still within its `revalidate` window. */
|
|
22
|
+
isFresh: boolean;
|
|
23
|
+
/** Resolved cache key (the same path used by `revalidatePath`). */
|
|
24
|
+
key: string;
|
|
25
|
+
/** Cache origin — surfaced verbatim so a UI can group by mode. */
|
|
26
|
+
mode: "isr" | "ssg";
|
|
27
|
+
/** Revalidate window in seconds. SSG entries report `-1` for "indefinite". */
|
|
28
|
+
revalidate: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function createDevInspectorPlugin(): Elysia<"", {
|
|
31
|
+
decorator: {};
|
|
32
|
+
store: {};
|
|
33
|
+
derive: {};
|
|
34
|
+
resolve: {};
|
|
35
|
+
}, {
|
|
36
|
+
typebox: {};
|
|
37
|
+
error: {};
|
|
38
|
+
}, {
|
|
39
|
+
schema: {};
|
|
40
|
+
standaloneSchema: {};
|
|
41
|
+
macro: {};
|
|
42
|
+
macroFn: {};
|
|
43
|
+
parser: {};
|
|
44
|
+
response: {};
|
|
45
|
+
}, {
|
|
46
|
+
__furin: {
|
|
47
|
+
_inspect: {
|
|
48
|
+
isr: {
|
|
49
|
+
get: {
|
|
50
|
+
body: unknown;
|
|
51
|
+
params: {};
|
|
52
|
+
query: unknown;
|
|
53
|
+
headers: unknown;
|
|
54
|
+
response: {
|
|
55
|
+
200: InspectorEntry[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
} & {
|
|
62
|
+
__furin: {
|
|
63
|
+
_inspect: {
|
|
64
|
+
ssg: {
|
|
65
|
+
get: {
|
|
66
|
+
body: unknown;
|
|
67
|
+
params: {};
|
|
68
|
+
query: unknown;
|
|
69
|
+
headers: unknown;
|
|
70
|
+
response: {
|
|
71
|
+
200: InspectorEntry[];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}, {
|
|
78
|
+
derive: {};
|
|
79
|
+
resolve: {};
|
|
80
|
+
schema: {};
|
|
81
|
+
standaloneSchema: {};
|
|
82
|
+
response: {};
|
|
83
|
+
}, {
|
|
84
|
+
derive: {};
|
|
85
|
+
resolve: {};
|
|
86
|
+
schema: {};
|
|
87
|
+
standaloneSchema: {};
|
|
88
|
+
response: {};
|
|
89
|
+
}>;
|