void 0.7.6 → 0.7.7
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/{auth-DrfOTMmr.d.mts → auth-DmuALf16.d.mts} +4 -4
- package/dist/{better-auth-shared-CZsIpjey.d.mts → better-auth-shared-HXlHRw02.d.mts} +15 -15
- package/dist/cli/cli.mjs +14 -14
- package/dist/{config-BIa9HwVX.mjs → config-DqkeX_Fa.mjs} +5 -5
- package/dist/{db-DvBg7Oc5.mjs → db-BnKZW1J7.mjs} +25 -21
- package/dist/{deploy-B5rTuzXw.mjs → deploy-D3t53kng.mjs} +8 -5
- package/dist/{domain-CDQhvYNZ.mjs → domain-ClDdX9I1.mjs} +24 -1
- package/dist/{dotenv-DwO4ti0Z.mjs → dotenv-zdFCCgFU.mjs} +26 -26
- package/dist/{env-CnrQY2b6.mjs → env-CU97_4YK.mjs} +1 -1
- package/dist/{env-helpers-CbeM_7-k.d.mts → env-helpers-Dw95CU8e.d.mts} +4 -4
- package/dist/{env-validation-DJKjR_8q.mjs → env-validation-Bc_aiBUm.mjs} +1 -1
- package/dist/{fetch-error-DflegrF3.d.mts → fetch-error-DZ868Xq4.d.mts} +4 -4
- package/dist/{gen-C0EY2k27.mjs → gen-CpeKIqlM.mjs} +2 -2
- package/dist/{handler-dKQWyF-G.d.mts → handler-DJTuxB10.d.mts} +24 -27
- package/dist/{head-CZGAunBV.d.mts → head-C7QW7UY1.d.mts} +5 -6
- package/dist/{headers-YVkHjOyq.mjs → headers-C7Yf6_CN.mjs} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +40 -31
- package/dist/{init-BiXWyKEf.mjs → init-CTtDfVVo.mjs} +2 -2
- package/dist/{node-DFqMcZR1.mjs → node-DHVCtkgt.mjs} +1 -1
- package/dist/pages/client.d.mts +35 -41
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +4 -4
- package/dist/pages/index.d.mts +6 -6
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.d.mts +3 -3
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/prefetch.d.mts +5 -5
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/{prepare-BrfiJBju.mjs → prepare-CKzO06-Z.mjs} +3 -3
- package/dist/{protocol-COz1NHxc.d.mts → protocol-D7r_deVZ.d.mts} +5 -5
- package/dist/{route-types-DReF1gUY.mjs → route-types-Cnqj_8a7.mjs} +2 -2
- package/dist/runtime/ai.d.mts +33 -40
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-helpers.mjs +3 -3
- package/dist/runtime/env-public-client.d.mts +3 -3
- package/dist/runtime/env-public.d.mts +7 -7
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +3 -3
- package/dist/runtime/isr.d.mts +2 -2
- package/dist/runtime/kv.d.mts +12 -12
- package/dist/runtime/live-server.d.mts +4 -4
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/migration-handler.d.mts +6 -6
- package/dist/runtime/seed.d.mts +4 -4
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +8 -8
- package/dist/runtime/ws.d.mts +21 -21
- package/dist/{scan-vv5u7rHu.mjs → scan-B8iEm8xn.mjs} +5 -5
- package/dist/{scan-Ba4hFwlH.mjs → scan-CWfLxtOe.mjs} +8 -8
- package/dist/{standard-schema-BfGDWXff.d.mts → standard-schema-D2qvCEYV.d.mts} +14 -14
- package/dist/sveltekit.d.mts +3 -5
- package/dist/types-DG_Ynnyd.d.mts +42 -0
- package/package.json +2 -2
- package/dist/types-D6AuY5Bf.d.mts +0 -65
package/dist/runtime/ws.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as AuthUser } from "../auth-
|
|
2
|
-
import { t as StandardSchemaV1 } from "../standard-schema-
|
|
3
|
-
import { i as CloudEnv } from "../handler-
|
|
1
|
+
import { r as AuthUser } from "../auth-DmuALf16.mjs";
|
|
2
|
+
import { t as StandardSchemaV1 } from "../standard-schema-D2qvCEYV.mjs";
|
|
3
|
+
import { i as CloudEnv } from "../handler-DJTuxB10.mjs";
|
|
4
4
|
import { WebSocketRouteMap } from "void/routes";
|
|
5
5
|
|
|
6
6
|
//#region src/runtime/ws.d.ts
|
|
@@ -17,34 +17,34 @@ type ServerEventOf<P extends keyof WebSocketRouteMap> = WsEntry<P> extends {
|
|
|
17
17
|
server: infer T;
|
|
18
18
|
} ? T : never;
|
|
19
19
|
type HasParams<P extends keyof WebSocketRouteMap> = ParamsOf<P> extends Record<string, never> ? false : [keyof ParamsOf<P>] extends [never] ? false : true;
|
|
20
|
-
|
|
20
|
+
type WebSocketConnection<ServerEvent = unknown> = {
|
|
21
21
|
readonly id: string;
|
|
22
22
|
readonly state: unknown;
|
|
23
23
|
send(event: ServerEvent): Promise<void>;
|
|
24
24
|
close(code?: number, reason?: string): void;
|
|
25
25
|
setState(data: unknown): void;
|
|
26
|
-
}
|
|
27
|
-
|
|
26
|
+
};
|
|
27
|
+
type RoomController<ServerEvent = unknown> = {
|
|
28
28
|
broadcast(event: ServerEvent, excludeIds?: Array<string>): Promise<void>;
|
|
29
29
|
getConnections(): Iterable<WebSocketConnection<ServerEvent>>;
|
|
30
30
|
getConnection(id: string): WebSocketConnection<ServerEvent> | undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
31
|
+
};
|
|
32
|
+
type WebSocketBaseContext = {
|
|
33
33
|
readonly id: string;
|
|
34
34
|
readonly params: ParamsRecord;
|
|
35
35
|
readonly user: AuthUser | null;
|
|
36
36
|
readonly request: Request;
|
|
37
37
|
readonly env: CloudEnv["Bindings"];
|
|
38
38
|
readonly storage: DurableObjectStorage;
|
|
39
|
-
}
|
|
40
|
-
|
|
39
|
+
};
|
|
40
|
+
type RoomContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
41
41
|
readonly room: RoomController<ServerEvent>;
|
|
42
42
|
readonly connection: WebSocketConnection<ServerEvent>;
|
|
43
|
-
}
|
|
44
|
-
|
|
43
|
+
};
|
|
44
|
+
type SocketContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
45
45
|
readonly socket: WebSocketConnection<ServerEvent>;
|
|
46
|
-
}
|
|
47
|
-
|
|
46
|
+
};
|
|
47
|
+
type RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
48
48
|
readonly __kind: "room";
|
|
49
49
|
readonly messages: {
|
|
50
50
|
client: ClientSchema;
|
|
@@ -59,8 +59,8 @@ interface RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV
|
|
|
59
59
|
wasClean: boolean;
|
|
60
60
|
}) => MaybePromise<void>;
|
|
61
61
|
onRequest?: (ctx: RoomContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response>;
|
|
62
|
-
}
|
|
63
|
-
|
|
62
|
+
};
|
|
63
|
+
type SocketDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
64
64
|
readonly __kind: "socket";
|
|
65
65
|
readonly messages: {
|
|
66
66
|
client: ClientSchema;
|
|
@@ -75,22 +75,22 @@ interface SocketDefinition<ClientSchema extends StandardSchemaV1 = StandardSchem
|
|
|
75
75
|
wasClean: boolean;
|
|
76
76
|
}) => MaybePromise<void>;
|
|
77
77
|
onRequest?: (ctx: SocketContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response>;
|
|
78
|
-
}
|
|
78
|
+
};
|
|
79
79
|
type AnyWebSocketDefinition = RoomDefinition | SocketDefinition;
|
|
80
80
|
declare function defineRoom<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<RoomDefinition<ClientSchema, ServerSchema>, "__kind">): RoomDefinition<ClientSchema, ServerSchema>;
|
|
81
81
|
declare function defineWebSocket<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<SocketDefinition<ClientSchema, ServerSchema>, "__kind">): SocketDefinition<ClientSchema, ServerSchema>;
|
|
82
|
-
|
|
82
|
+
type VoidSocketCloseEvent = {
|
|
83
83
|
code?: number;
|
|
84
84
|
reason?: string;
|
|
85
85
|
wasClean?: boolean;
|
|
86
|
-
}
|
|
87
|
-
|
|
86
|
+
};
|
|
87
|
+
type ConnectCommonOptions = {
|
|
88
88
|
baseURL?: string;
|
|
89
89
|
reconnect?: boolean;
|
|
90
90
|
reconnectDelayMs?: number;
|
|
91
91
|
maxReconnectAttempts?: number;
|
|
92
92
|
protocols?: string | Array<string>;
|
|
93
|
-
}
|
|
93
|
+
};
|
|
94
94
|
type ConnectOptions<P extends keyof WebSocketRouteMap> = ConnectCommonOptions & (HasParams<P> extends true ? {
|
|
95
95
|
params: ParamsOf<P>;
|
|
96
96
|
} : {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, t as basename } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
|
|
2
2
|
import { n as globSync, t as glob } from "./dist-DUyXJLkq.mjs";
|
|
3
3
|
import { d as isCallExpression, f as isIdentifier, h as isObjectExpression, p as isLiteral } from "./plugin-inference-CXUuq0aC.mjs";
|
|
4
|
-
import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-
|
|
4
|
+
import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-CWfLxtOe.mjs";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { parseSync } from "vite";
|
|
7
7
|
//#region src/crons/scan.ts
|
|
@@ -32,7 +32,7 @@ function extractCronExpressions(source, filePath) {
|
|
|
32
32
|
throw new Error(`cron: Invalid job file '${filePath}'. Add \`export const cron = "<schedule>"\`.`);
|
|
33
33
|
}
|
|
34
34
|
function parseJobFiles(root, jobsDir, files) {
|
|
35
|
-
return files.filter((
|
|
35
|
+
return files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort((leftFilePath, rightFilePath) => leftFilePath.localeCompare(rightFilePath)).map((filePath) => {
|
|
36
36
|
const source = readFileSync(join(root, jobsDir, filePath), "utf-8");
|
|
37
37
|
return {
|
|
38
38
|
filePath,
|
|
@@ -75,12 +75,12 @@ function deriveBindingName(name) {
|
|
|
75
75
|
return "QUEUE_" + name.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
76
76
|
}
|
|
77
77
|
function extractConsumerOption(source, name) {
|
|
78
|
-
const
|
|
79
|
-
const match = source.match(
|
|
78
|
+
const optionRe = new RegExp(`export\\s+const\\s+${name}\\s*=\\s*(\\d+)`);
|
|
79
|
+
const match = source.match(optionRe);
|
|
80
80
|
return match ? Number(match[1]) : void 0;
|
|
81
81
|
}
|
|
82
82
|
function parseQueueFiles(root, queuesDir, files) {
|
|
83
|
-
return files.filter((
|
|
83
|
+
return files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort((leftFilePath, rightFilePath) => leftFilePath.localeCompare(rightFilePath)).map((filePath) => {
|
|
84
84
|
const source = readFileSync(join(root, queuesDir, filePath), "utf-8");
|
|
85
85
|
const name = extractName(filePath);
|
|
86
86
|
return {
|
|
@@ -86,12 +86,12 @@ function toLayoutId(layout) {
|
|
|
86
86
|
function resolveLayoutChain(componentId, layouts) {
|
|
87
87
|
const parts = componentId.split("/");
|
|
88
88
|
const chain = [];
|
|
89
|
-
const root = layouts.find((
|
|
89
|
+
const root = layouts.find((layout) => layout.directory === "");
|
|
90
90
|
if (root) chain.push(root);
|
|
91
91
|
let dir = "";
|
|
92
|
-
for (let
|
|
93
|
-
dir = dir ? `${dir}/${parts[
|
|
94
|
-
const layout = layouts.find((
|
|
92
|
+
for (let partIndex = 0; partIndex < parts.length - 1; partIndex++) {
|
|
93
|
+
dir = dir ? `${dir}/${parts[partIndex]}` : parts[partIndex];
|
|
94
|
+
const layout = layouts.find((candidate) => candidate.directory === dir);
|
|
95
95
|
if (layout) chain.push(layout);
|
|
96
96
|
}
|
|
97
97
|
return chain;
|
|
@@ -101,14 +101,14 @@ function resolveNamedLayout(name, componentId, namedLayouts) {
|
|
|
101
101
|
const parts = componentId.split("/");
|
|
102
102
|
const dirs = [];
|
|
103
103
|
let dir = "";
|
|
104
|
-
for (let
|
|
105
|
-
dir = dir ? `${dir}/${parts[
|
|
104
|
+
for (let partIndex = 0; partIndex < parts.length - 1; partIndex++) {
|
|
105
|
+
dir = dir ? `${dir}/${parts[partIndex]}` : parts[partIndex];
|
|
106
106
|
dirs.push(dir);
|
|
107
107
|
}
|
|
108
108
|
dirs.reverse();
|
|
109
109
|
dirs.push("");
|
|
110
|
-
for (const
|
|
111
|
-
const found = namedLayouts.find((
|
|
110
|
+
for (const directory of dirs) {
|
|
111
|
+
const found = namedLayouts.find((namedLayout) => namedLayout.name === name && namedLayout.directory === directory);
|
|
112
112
|
if (found) return found;
|
|
113
113
|
}
|
|
114
114
|
return null;
|
|
@@ -6,35 +6,35 @@
|
|
|
6
6
|
* Per the spec's design, libraries may copy these types directly
|
|
7
7
|
* to avoid requiring `@standard-schema/spec` as a dependency.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
type StandardSchemaV1<Input = unknown, Output = Input> = {
|
|
10
10
|
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
declare namespace StandardSchemaV1 {
|
|
13
|
-
|
|
13
|
+
type Props<Input = unknown, Output = Input> = {
|
|
14
14
|
readonly version: 1;
|
|
15
15
|
readonly vendor: string;
|
|
16
16
|
readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
|
|
17
17
|
readonly types?: Types<Input, Output> | undefined;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
20
|
-
|
|
20
|
+
type SuccessResult<Output> = {
|
|
21
21
|
readonly value: Output;
|
|
22
22
|
readonly issues?: undefined;
|
|
23
|
-
}
|
|
24
|
-
|
|
23
|
+
};
|
|
24
|
+
type FailureResult = {
|
|
25
25
|
readonly issues: ReadonlyArray<Issue>;
|
|
26
|
-
}
|
|
27
|
-
|
|
26
|
+
};
|
|
27
|
+
type Issue = {
|
|
28
28
|
readonly message: string;
|
|
29
29
|
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
30
|
-
}
|
|
31
|
-
|
|
30
|
+
};
|
|
31
|
+
type PathSegment = {
|
|
32
32
|
readonly key: PropertyKey;
|
|
33
|
-
}
|
|
34
|
-
|
|
33
|
+
};
|
|
34
|
+
type Types<Input = unknown, Output = Input> = {
|
|
35
35
|
readonly input: Input;
|
|
36
36
|
readonly output: Output;
|
|
37
|
-
}
|
|
37
|
+
};
|
|
38
38
|
type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
39
39
|
type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
40
40
|
}
|
package/dist/sveltekit.d.mts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
//#region src/sveltekit.d.ts
|
|
2
2
|
type Tsconfig = Record<string, unknown>;
|
|
3
3
|
type TsconfigHook = (config: Tsconfig) => Tsconfig | void;
|
|
4
|
-
|
|
5
|
-
/** Project root. Defaults to process.cwd(). */
|
|
6
|
-
root?: string;
|
|
7
|
-
/** SvelteKit output directory. Defaults to ".svelte-kit". */
|
|
4
|
+
type VoidSvelteKitTsconfigOptions = {
|
|
5
|
+
/** Project root. Defaults to process.cwd(). */root?: string; /** SvelteKit output directory. Defaults to ".svelte-kit". */
|
|
8
6
|
outDir?: string;
|
|
9
|
-
}
|
|
7
|
+
};
|
|
10
8
|
/**
|
|
11
9
|
* Merge Void's generated tsconfig fragment into SvelteKit's generated
|
|
12
10
|
* tsconfig. Use from `kit.typescript.config` in `svelte.config.js`.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/pages/types.d.ts
|
|
2
|
+
type PageDefinition = {
|
|
3
|
+
/** URL pattern, e.g. "/users/:id" */pattern: string; /** Route params, e.g. ["id"] */
|
|
4
|
+
params: Array<string>; /** Whether this is a catch-all route */
|
|
5
|
+
catchAll: boolean; /** Component file relative path, e.g. "users/[id].vue" */
|
|
6
|
+
componentPath: string; /** Server handler file relative path, e.g. "users/[id].server.ts" */
|
|
7
|
+
serverPath: string | null; /** HTTP methods exported by server handler */
|
|
8
|
+
methods: Array<string>; /** Component ID used in page object, e.g. "users/[id]" */
|
|
9
|
+
componentId: string; /** Edge caching revalidate TTL in seconds, from .server.ts export */
|
|
10
|
+
revalidate?: number; /** Whether `export const prerender = true` is set in server handler */
|
|
11
|
+
prerender?: boolean; /** Whether `export function getPrerenderPaths` is defined in server handler */
|
|
12
|
+
hasGetPrerenderPaths?: boolean; /** Whether this is an island page (.island.tsx/.island.vue) */
|
|
13
|
+
island?: boolean; /** Frontmatter metadata extracted from .md files (title, description) */
|
|
14
|
+
metadata?: {
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
}; /** Named layout selection: "name", "!name", false, or relative path */
|
|
18
|
+
layout?: string | false;
|
|
19
|
+
};
|
|
20
|
+
type LayoutDefinition = {
|
|
21
|
+
/** Directory path relative to pages/, e.g. "" (root) or "users" */directory: string; /** Layout file relative path, e.g. "layout.vue" or "users/layout.vue" */
|
|
22
|
+
filePath: string; /** Whether this is an island layout (layout.island.tsx/.island.vue) */
|
|
23
|
+
island?: boolean;
|
|
24
|
+
};
|
|
25
|
+
type NamedLayoutDefinition = {
|
|
26
|
+
/** Layout name, e.g. "home", "post" */name: string; /** Directory containing _layouts/, e.g. "" (root) or "guide" */
|
|
27
|
+
directory: string; /** File path relative to pages/, e.g. "_layouts/home.vue" */
|
|
28
|
+
filePath: string; /** Whether this is an island layout */
|
|
29
|
+
island?: boolean;
|
|
30
|
+
};
|
|
31
|
+
type PageScanResult = {
|
|
32
|
+
pages: Array<PageDefinition>;
|
|
33
|
+
layouts: Array<LayoutDefinition>;
|
|
34
|
+
namedLayouts: Array<NamedLayoutDefinition>;
|
|
35
|
+
};
|
|
36
|
+
type DevCssAsset = {
|
|
37
|
+
/** Vite client URL used to request the CSS module. */url: string; /** Vite dev style id used by the client to adopt/update SSR-inlined styles. */
|
|
38
|
+
id?: string; /** CSS bytes returned by Vite's client environment transform with ?inline. */
|
|
39
|
+
css: string;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { PageScanResult as a, PageDefinition as i, LayoutDefinition as n, NamedLayoutDefinition as r, DevCssAsset as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "void",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/voidzero-dev/void.git",
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
"valibot": ">=1.0.0-beta.7",
|
|
333
333
|
"vite": "^8.0.0",
|
|
334
334
|
"zod": "^3.25.0 || ^4.0.0",
|
|
335
|
-
"@void/md": "0.7.
|
|
335
|
+
"@void/md": "0.7.7"
|
|
336
336
|
},
|
|
337
337
|
"peerDependenciesMeta": {
|
|
338
338
|
"@void/md": {
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
//#region src/pages/types.d.ts
|
|
2
|
-
interface PageDefinition {
|
|
3
|
-
/** URL pattern, e.g. "/users/:id" */
|
|
4
|
-
pattern: string;
|
|
5
|
-
/** Route params, e.g. ["id"] */
|
|
6
|
-
params: Array<string>;
|
|
7
|
-
/** Whether this is a catch-all route */
|
|
8
|
-
catchAll: boolean;
|
|
9
|
-
/** Component file relative path, e.g. "users/[id].vue" */
|
|
10
|
-
componentPath: string;
|
|
11
|
-
/** Server handler file relative path, e.g. "users/[id].server.ts" */
|
|
12
|
-
serverPath: string | null;
|
|
13
|
-
/** HTTP methods exported by server handler */
|
|
14
|
-
methods: Array<string>;
|
|
15
|
-
/** Component ID used in page object, e.g. "users/[id]" */
|
|
16
|
-
componentId: string;
|
|
17
|
-
/** Edge caching revalidate TTL in seconds, from .server.ts export */
|
|
18
|
-
revalidate?: number;
|
|
19
|
-
/** Whether `export const prerender = true` is set in server handler */
|
|
20
|
-
prerender?: boolean;
|
|
21
|
-
/** Whether `export function getPrerenderPaths` is defined in server handler */
|
|
22
|
-
hasGetPrerenderPaths?: boolean;
|
|
23
|
-
/** Whether this is an island page (.island.tsx/.island.vue) */
|
|
24
|
-
island?: boolean;
|
|
25
|
-
/** Frontmatter metadata extracted from .md files (title, description) */
|
|
26
|
-
metadata?: {
|
|
27
|
-
title?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
};
|
|
30
|
-
/** Named layout selection: "name", "!name", false, or relative path */
|
|
31
|
-
layout?: string | false;
|
|
32
|
-
}
|
|
33
|
-
interface LayoutDefinition {
|
|
34
|
-
/** Directory path relative to pages/, e.g. "" (root) or "users" */
|
|
35
|
-
directory: string;
|
|
36
|
-
/** Layout file relative path, e.g. "layout.vue" or "users/layout.vue" */
|
|
37
|
-
filePath: string;
|
|
38
|
-
/** Whether this is an island layout (layout.island.tsx/.island.vue) */
|
|
39
|
-
island?: boolean;
|
|
40
|
-
}
|
|
41
|
-
interface NamedLayoutDefinition {
|
|
42
|
-
/** Layout name, e.g. "home", "post" */
|
|
43
|
-
name: string;
|
|
44
|
-
/** Directory containing _layouts/, e.g. "" (root) or "guide" */
|
|
45
|
-
directory: string;
|
|
46
|
-
/** File path relative to pages/, e.g. "_layouts/home.vue" */
|
|
47
|
-
filePath: string;
|
|
48
|
-
/** Whether this is an island layout */
|
|
49
|
-
island?: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface PageScanResult {
|
|
52
|
-
pages: Array<PageDefinition>;
|
|
53
|
-
layouts: Array<LayoutDefinition>;
|
|
54
|
-
namedLayouts: Array<NamedLayoutDefinition>;
|
|
55
|
-
}
|
|
56
|
-
interface DevCssAsset {
|
|
57
|
-
/** Vite client URL used to request the CSS module. */
|
|
58
|
-
url: string;
|
|
59
|
-
/** Vite dev style id used by the client to adopt/update SSR-inlined styles. */
|
|
60
|
-
id?: string;
|
|
61
|
-
/** CSS bytes returned by Vite's client environment transform with ?inline. */
|
|
62
|
-
css: string;
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
export { PageScanResult as a, PageDefinition as i, LayoutDefinition as n, NamedLayoutDefinition as r, DevCssAsset as t };
|