rari 0.15.4 → 0.15.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/dist/alias-resolver-Cigam7Y7.mjs +1 -0
- package/dist/cli.mjs +39 -39
- package/dist/define-BafO1-XT.d.mts +13 -0
- package/dist/define-CzFpVAjt.mjs +1 -0
- package/dist/feed-Ixvy9L12.mjs +3 -0
- package/dist/get-client-component-CLpyIcLJ.mjs +1 -0
- package/dist/headers.d.mts +1 -36
- package/dist/headers.mjs +1 -1
- package/dist/image.d.mts +38 -34
- package/dist/image.mjs +1 -1
- package/dist/index.d.mts +3 -4
- package/dist/mdx/define.d.mts +1 -1
- package/dist/mdx/define.mjs +1 -1
- package/dist/mdx.d.mts +5 -19
- package/dist/mdx.mjs +1 -1
- package/dist/og.d.mts +18 -8
- package/dist/og.mjs +1 -1
- package/dist/platform.mjs +2 -2
- package/dist/preload-modules-QmSvKk0Q.mjs +2 -0
- package/dist/proxy/RariRequest.d.mts +10 -11
- package/dist/proxy/RariRequest.mjs +1 -1
- package/dist/proxy/RariResponse.d.mts +1 -16
- package/dist/proxy/RariResponse.mjs +1 -1
- package/dist/proxy/runtime-executor.d.mts +1 -27
- package/dist/proxy/runtime-executor.mjs +1 -1
- package/dist/{railway-fmDbDigI.mjs → railway-HYTbx27C.mjs} +1 -1
- package/dist/rari-global-5vGzhToD.mjs +1 -0
- package/dist/{render-2I7-kFd_.mjs → render-CG5rxWXV.mjs} +1 -1
- package/dist/robots-BGCTYwKN.mjs +2 -0
- package/dist/router-D6mkoDqJ.mjs +1 -0
- package/dist/router.d.mts +8 -10
- package/dist/router.mjs +1 -1
- package/dist/runtime/AppRouterProvider.d.mts +25 -19
- package/dist/runtime/AppRouterProvider.mjs +1 -1
- package/dist/runtime/ErrorBoundaryWrapper.d.mts +2 -3
- package/dist/runtime/ErrorBoundaryWrapper.mjs +1 -1
- package/dist/runtime/LoadingErrorBoundary.d.mts +0 -1
- package/dist/runtime/action-flight-refresh.d.mts +2 -4
- package/dist/runtime/action-flight-refresh.mjs +1 -1
- package/dist/runtime/action-revalidation-kind.mjs +1 -1
- package/dist/runtime/call-server.d.mts +1 -1
- package/dist/runtime/call-server.mjs +1 -1
- package/dist/runtime/entry-client.d.mts +2 -0
- package/dist/runtime/entry-client.mjs +3 -3
- package/dist/runtime/flight-route-cache.d.mts +0 -1
- package/dist/runtime/flight-route-cache.mjs +1 -1
- package/dist/runtime/flight-router-state.d.mts +3 -3
- package/dist/runtime/merge-flight-refresh.d.mts +0 -1
- package/dist/runtime/merge-flight-refresh.mjs +1 -1
- package/dist/runtime/rsc-client-runtime.d.mts +8 -1
- package/dist/runtime/rsc-client-runtime.mjs +1 -1
- package/dist/runtime/rsc-references.d.mts +1 -1
- package/dist/runtime/rsc-references.mjs +1 -1
- package/dist/sitemap-1n5BIACA.mjs +7 -0
- package/dist/type-guards-CTkEL8zw.mjs +1 -0
- package/dist/types-BYob0lqv.d.mts +185 -0
- package/dist/types-DAdRjhuk.d.mts +130 -0
- package/dist/{types-DlF9FHQc.d.mts → types-DCEyvFz7.d.mts} +22 -19
- package/dist/types-_vPM8QuJ.d.mts +125 -0
- package/dist/utils-C-LVG9QI-D-IHIad5.mjs +37 -0
- package/dist/vite.d.mts +199 -161
- package/dist/vite.mjs +35 -35
- package/package.json +16 -15
- package/dist/alias-resolver-CHTPYtdq.mjs +0 -1
- package/dist/define-CRFUKkcA.d.mts +0 -14
- package/dist/define-rCXgNOOk.mjs +0 -1
- package/dist/feed-B3mYPCnT.mjs +0 -3
- package/dist/get-client-component-CDaY3lOP.mjs +0 -1
- package/dist/http-C5Y9ZrK9.mjs +0 -1
- package/dist/preload-modules-CJQ_IouX.mjs +0 -2
- package/dist/rari-global-Dygfa818.mjs +0 -1
- package/dist/robots-CsTVq3Jp.mjs +0 -2
- package/dist/router-Ctpd1kcp.mjs +0 -1
- package/dist/sitemap-BekxZtgA.mjs +0 -7
- package/dist/types-BC33STEP.d.mts +0 -97
- package/dist/types-DJQFFYSj.d.mts +0 -160
- package/dist/utils-CW4FEV95-DI7wf2Fu.mjs +0 -37
package/dist/vite.d.mts
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { a as Sitemap, c as SitemapVideo, d as RouteContext, f as RouteHandler, i as RobotsRule, l as ApiResponse, o as SitemapEntry, r as Robots, s as SitemapImage, u as ApiRouteHandlers } from "./types-
|
|
2
|
-
import { a as ProxyModule, c as RariURL, i as ProxyMatcher, l as RequestCookies, n as ProxyConfig, o as ProxyResult, r as ProxyFunction, s as RariFetchEvent, t as CookieOptions, u as ResponseCookies } from "./types-
|
|
3
|
-
import { a as ErrorProps, c as LayoutEntry, d as Metadata, f as NotFoundEntry, g as TemplateEntry, h as RouteSegmentType, i as ErrorEntry, l as LayoutProps, m as RouteSegment, n as AppRouteManifest, o as GenerateMetadata, p as PageProps, r as AppRouteMatch, s as GenerateStaticParams, t as AppRouteEntry, u as LoadingEntry } from "./types-
|
|
1
|
+
import { a as Sitemap, c as SitemapVideo, d as RouteContext, f as RouteHandler, i as RobotsRule, l as ApiResponse, o as SitemapEntry, r as Robots, s as SitemapImage, u as ApiRouteHandlers } from "./types-BYob0lqv.mjs";
|
|
2
|
+
import { a as ProxyModule, c as RariURL, i as ProxyMatcher, l as RequestCookies, n as ProxyConfig, o as ProxyResult, r as ProxyFunction, s as RariFetchEvent, t as CookieOptions, u as ResponseCookies } from "./types-DAdRjhuk.mjs";
|
|
3
|
+
import { a as ErrorProps, c as LayoutEntry, d as Metadata, f as NotFoundEntry, g as TemplateEntry, h as RouteSegmentType, i as ErrorEntry, l as LayoutProps, m as RouteSegment, n as AppRouteManifest, o as GenerateMetadata, p as PageProps, r as AppRouteMatch, s as GenerateStaticParams, t as AppRouteEntry, u as LoadingEntry } from "./types-DCEyvFz7.mjs";
|
|
4
4
|
import { UserConfig } from "vite-plus";
|
|
5
|
-
|
|
6
5
|
//#region src/vite/analysis/directives.d.ts
|
|
7
6
|
interface DirectiveResult {
|
|
8
|
-
hasUseClient: boolean;
|
|
9
|
-
hasUseServer: boolean;
|
|
7
|
+
readonly hasUseClient: boolean;
|
|
8
|
+
readonly hasUseServer: boolean;
|
|
10
9
|
}
|
|
11
10
|
interface ModuleAnalysis {
|
|
12
|
-
directives: DirectiveResult;
|
|
13
|
-
topLevelUseClient: boolean;
|
|
14
|
-
topLevelUseServer: boolean;
|
|
15
|
-
hasDefaultExport: boolean;
|
|
16
|
-
hasComponentExport: boolean;
|
|
17
|
-
importSources: string[];
|
|
11
|
+
readonly directives: DirectiveResult;
|
|
12
|
+
readonly topLevelUseClient: boolean;
|
|
13
|
+
readonly topLevelUseServer: boolean;
|
|
14
|
+
readonly hasDefaultExport: boolean;
|
|
15
|
+
readonly hasComponentExport: boolean;
|
|
16
|
+
readonly importSources: readonly string[];
|
|
18
17
|
}
|
|
19
18
|
//#endregion
|
|
20
19
|
//#region src/vite/analysis/module-cache.d.ts
|
|
21
20
|
declare class ModuleAnalysisCache {
|
|
22
|
-
private cache;
|
|
21
|
+
private readonly cache;
|
|
23
22
|
get(filePath: string, source?: string): ModuleAnalysis;
|
|
24
23
|
getSource(filePath: string): string;
|
|
25
24
|
invalidate(filePath: string): void;
|
|
@@ -29,8 +28,8 @@ declare class ModuleAnalysisCache {
|
|
|
29
28
|
//#endregion
|
|
30
29
|
//#region src/vite/mdx/registry.d.ts
|
|
31
30
|
interface MdxPluginOptions {
|
|
32
|
-
componentsDir?: string;
|
|
33
|
-
contentDirs?: string[];
|
|
31
|
+
readonly componentsDir?: string;
|
|
32
|
+
readonly contentDirs?: readonly string[];
|
|
34
33
|
}
|
|
35
34
|
//#endregion
|
|
36
35
|
//#region src/vite/plugin/types.d.ts
|
|
@@ -48,64 +47,78 @@ interface RariPlugin {
|
|
|
48
47
|
//#endregion
|
|
49
48
|
//#region src/vite/server/config.d.ts
|
|
50
49
|
interface ServerCSPConfig {
|
|
51
|
-
scriptSrc?: string[];
|
|
52
|
-
styleSrc?: string[];
|
|
53
|
-
imgSrc?: string[];
|
|
54
|
-
fontSrc?: string[];
|
|
55
|
-
connectSrc?: string[];
|
|
56
|
-
defaultSrc?: string[];
|
|
57
|
-
workerSrc?: string[];
|
|
50
|
+
readonly scriptSrc?: readonly string[];
|
|
51
|
+
readonly styleSrc?: readonly string[];
|
|
52
|
+
readonly imgSrc?: readonly string[];
|
|
53
|
+
readonly fontSrc?: readonly string[];
|
|
54
|
+
readonly connectSrc?: readonly string[];
|
|
55
|
+
readonly defaultSrc?: readonly string[];
|
|
56
|
+
readonly workerSrc?: readonly string[];
|
|
57
|
+
readonly frameAncestors?: readonly string[];
|
|
58
|
+
readonly baseUri?: readonly string[];
|
|
59
|
+
readonly formAction?: readonly string[];
|
|
60
|
+
readonly useNonces?: boolean;
|
|
58
61
|
}
|
|
59
62
|
interface ServerCacheControlConfig {
|
|
60
|
-
routes: Record<string, string
|
|
63
|
+
readonly routes: Readonly<Record<string, string>>;
|
|
61
64
|
}
|
|
62
65
|
interface ServerCacheLayerConfig {
|
|
63
|
-
handler?: string;
|
|
64
|
-
url?: string;
|
|
65
|
-
maxEntries?: number;
|
|
66
|
-
defaultTtlSecs?: number;
|
|
66
|
+
readonly handler?: string;
|
|
67
|
+
readonly url?: string;
|
|
68
|
+
readonly maxEntries?: number;
|
|
69
|
+
readonly defaultTtlSecs?: number;
|
|
70
|
+
readonly maxBytes?: number;
|
|
67
71
|
}
|
|
68
72
|
interface ServerCacheConfig {
|
|
69
|
-
layers?: Record<string, ServerCacheLayerConfig
|
|
73
|
+
readonly layers?: Readonly<Record<string, ServerCacheLayerConfig>>;
|
|
70
74
|
}
|
|
71
75
|
interface ServerUseCacheConfig {
|
|
72
|
-
remote?: ServerCacheLayerConfig;
|
|
73
|
-
buildId?: string;
|
|
76
|
+
readonly remote?: ServerCacheLayerConfig;
|
|
77
|
+
readonly buildId?: string;
|
|
78
|
+
}
|
|
79
|
+
interface ServerActionConfig {
|
|
80
|
+
readonly allowedOrigins?: readonly string[];
|
|
74
81
|
}
|
|
75
82
|
interface ServerConfig {
|
|
76
83
|
csp?: ServerCSPConfig;
|
|
77
84
|
cacheControl?: ServerCacheControlConfig;
|
|
78
85
|
cache?: ServerCacheConfig;
|
|
79
86
|
useCache?: ServerUseCacheConfig;
|
|
87
|
+
action?: ServerActionConfig;
|
|
88
|
+
jsPoolSize?: number;
|
|
89
|
+
htmlLimitedBots?: string;
|
|
80
90
|
}
|
|
81
91
|
//#endregion
|
|
82
92
|
//#region src/vite/server/build.d.ts
|
|
83
93
|
interface ServerBuildOptions {
|
|
84
|
-
outDir?: string;
|
|
85
|
-
rscDir?: string;
|
|
86
|
-
manifestPath?: string;
|
|
87
|
-
serverConfigPath?: string;
|
|
88
|
-
minify?: boolean;
|
|
89
|
-
alias?: Record<string, string
|
|
90
|
-
define?: Record<string, string
|
|
91
|
-
csp?: ServerCSPConfig;
|
|
92
|
-
cacheControl?: ServerCacheControlConfig;
|
|
93
|
-
cache?: ServerCacheConfig;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
readonly outDir?: string;
|
|
95
|
+
readonly rscDir?: string;
|
|
96
|
+
readonly manifestPath?: string;
|
|
97
|
+
readonly serverConfigPath?: string;
|
|
98
|
+
readonly minify?: boolean;
|
|
99
|
+
readonly alias?: Readonly<Record<string, string>>;
|
|
100
|
+
readonly define?: Readonly<Record<string, string>>;
|
|
101
|
+
readonly csp?: ServerCSPConfig;
|
|
102
|
+
readonly cacheControl?: ServerCacheControlConfig;
|
|
103
|
+
readonly cache?: ServerCacheConfig;
|
|
104
|
+
readonly action?: ServerActionConfig;
|
|
105
|
+
readonly jsPoolSize?: number;
|
|
106
|
+
readonly htmlLimitedBots?: string;
|
|
107
|
+
readonly moduleAnalysisCache?: ModuleAnalysisCache;
|
|
108
|
+
readonly experimental?: {
|
|
109
|
+
readonly useCache?: boolean;
|
|
110
|
+
readonly useCacheRemote?: ServerCacheLayerConfig;
|
|
98
111
|
};
|
|
99
|
-
mdx?: MdxPluginOptions;
|
|
112
|
+
readonly mdx?: MdxPluginOptions;
|
|
100
113
|
}
|
|
101
114
|
//#endregion
|
|
102
115
|
//#region src/proxy/build/vite-plugin.d.ts
|
|
103
116
|
interface ProxyPluginOptions {
|
|
104
|
-
root?: string;
|
|
105
|
-
srcDir?: string;
|
|
106
|
-
proxyFileName?: string;
|
|
107
|
-
extensions?: string[];
|
|
108
|
-
verbose?: boolean;
|
|
117
|
+
readonly root?: string;
|
|
118
|
+
readonly srcDir?: string;
|
|
119
|
+
readonly proxyFileName?: string;
|
|
120
|
+
readonly extensions?: readonly string[];
|
|
121
|
+
readonly verbose?: boolean;
|
|
109
122
|
}
|
|
110
123
|
declare function rariProxy(options?: ProxyPluginOptions): RariPlugin;
|
|
111
124
|
//#endregion
|
|
@@ -117,157 +130,182 @@ interface ServerSidePropsResult {
|
|
|
117
130
|
redirect?: string;
|
|
118
131
|
}
|
|
119
132
|
interface MetadataResult {
|
|
120
|
-
title?: string | {
|
|
121
|
-
default?: string;
|
|
122
|
-
template?: string;
|
|
123
|
-
absolute?: string;
|
|
133
|
+
readonly title?: string | {
|
|
134
|
+
readonly default?: string;
|
|
135
|
+
readonly template?: string;
|
|
136
|
+
readonly absolute?: string;
|
|
124
137
|
};
|
|
125
|
-
description?: string;
|
|
126
|
-
keywords?: string[];
|
|
127
|
-
openGraph?: {
|
|
128
|
-
title?: string;
|
|
129
|
-
description?: string;
|
|
130
|
-
url?: string;
|
|
131
|
-
siteName?: string;
|
|
132
|
-
images?:
|
|
133
|
-
url: string;
|
|
134
|
-
width?: number;
|
|
135
|
-
height?: number;
|
|
136
|
-
alt?: string;
|
|
138
|
+
readonly description?: string;
|
|
139
|
+
readonly keywords?: readonly string[];
|
|
140
|
+
readonly openGraph?: {
|
|
141
|
+
readonly title?: string;
|
|
142
|
+
readonly description?: string;
|
|
143
|
+
readonly url?: string;
|
|
144
|
+
readonly siteName?: string;
|
|
145
|
+
readonly images?: ReadonlyArray<string | {
|
|
146
|
+
readonly url: string;
|
|
147
|
+
readonly width?: number;
|
|
148
|
+
readonly height?: number;
|
|
149
|
+
readonly alt?: string;
|
|
137
150
|
}>;
|
|
138
|
-
type?: string;
|
|
151
|
+
readonly type?: string;
|
|
139
152
|
};
|
|
140
|
-
twitter?: {
|
|
141
|
-
card?: 'summary' | 'summary_large_image' | 'app' | 'player';
|
|
142
|
-
site?: string;
|
|
143
|
-
creator?: string;
|
|
144
|
-
title?: string;
|
|
145
|
-
description?: string;
|
|
146
|
-
images?: string[];
|
|
153
|
+
readonly twitter?: {
|
|
154
|
+
readonly card?: 'summary' | 'summary_large_image' | 'app' | 'player';
|
|
155
|
+
readonly site?: string;
|
|
156
|
+
readonly creator?: string;
|
|
157
|
+
readonly title?: string;
|
|
158
|
+
readonly description?: string;
|
|
159
|
+
readonly images?: readonly string[];
|
|
147
160
|
};
|
|
148
|
-
robots?: {
|
|
149
|
-
index?: boolean;
|
|
150
|
-
follow?: boolean;
|
|
151
|
-
nocache?: boolean;
|
|
161
|
+
readonly robots?: {
|
|
162
|
+
readonly index?: boolean;
|
|
163
|
+
readonly follow?: boolean;
|
|
164
|
+
readonly nocache?: boolean;
|
|
152
165
|
};
|
|
153
|
-
icons?: {
|
|
154
|
-
icon?:
|
|
155
|
-
url: string;
|
|
156
|
-
type?: string;
|
|
157
|
-
sizes?: string;
|
|
158
|
-
rel?: string;
|
|
159
|
-
}> | string | string[];
|
|
160
|
-
apple?:
|
|
161
|
-
url: string;
|
|
162
|
-
sizes?: string;
|
|
163
|
-
rel?: string;
|
|
164
|
-
}> | string | string[];
|
|
165
|
-
other?:
|
|
166
|
-
url: string;
|
|
167
|
-
rel?: string;
|
|
168
|
-
type?: string;
|
|
169
|
-
sizes?: string;
|
|
170
|
-
color?: string;
|
|
166
|
+
readonly icons?: {
|
|
167
|
+
readonly icon?: ReadonlyArray<{
|
|
168
|
+
readonly url: string;
|
|
169
|
+
readonly type?: string;
|
|
170
|
+
readonly sizes?: string;
|
|
171
|
+
readonly rel?: string;
|
|
172
|
+
}> | string | readonly string[];
|
|
173
|
+
readonly apple?: ReadonlyArray<{
|
|
174
|
+
readonly url: string;
|
|
175
|
+
readonly sizes?: string;
|
|
176
|
+
readonly rel?: string;
|
|
177
|
+
}> | string | readonly string[];
|
|
178
|
+
readonly other?: ReadonlyArray<{
|
|
179
|
+
readonly url: string;
|
|
180
|
+
readonly rel?: string;
|
|
181
|
+
readonly type?: string;
|
|
182
|
+
readonly sizes?: string;
|
|
183
|
+
readonly color?: string;
|
|
171
184
|
}>;
|
|
172
185
|
};
|
|
173
|
-
manifest?: string;
|
|
174
|
-
themeColor?: string |
|
|
175
|
-
color: string;
|
|
176
|
-
media?: string;
|
|
186
|
+
readonly manifest?: string;
|
|
187
|
+
readonly themeColor?: string | ReadonlyArray<{
|
|
188
|
+
readonly color: string;
|
|
189
|
+
readonly media?: string;
|
|
177
190
|
}>;
|
|
178
|
-
appleWebApp?: {
|
|
179
|
-
title?: string;
|
|
180
|
-
statusBarStyle?: 'default' | 'black' | 'black-translucent';
|
|
181
|
-
capable?: boolean;
|
|
191
|
+
readonly appleWebApp?: {
|
|
192
|
+
readonly title?: string;
|
|
193
|
+
readonly statusBarStyle?: 'default' | 'black' | 'black-translucent';
|
|
194
|
+
readonly capable?: boolean;
|
|
182
195
|
};
|
|
183
|
-
viewport?: string;
|
|
184
|
-
canonical?: string;
|
|
185
|
-
alternates?: {
|
|
186
|
-
canonical?: string;
|
|
187
|
-
languages?:
|
|
188
|
-
|
|
196
|
+
readonly viewport?: string;
|
|
197
|
+
readonly canonical?: string;
|
|
198
|
+
readonly alternates?: {
|
|
199
|
+
readonly canonical?: string;
|
|
200
|
+
readonly languages?: {
|
|
201
|
+
readonly [key: string]: string;
|
|
202
|
+
};
|
|
203
|
+
readonly types?: {
|
|
204
|
+
readonly [key: string]: string;
|
|
205
|
+
};
|
|
189
206
|
};
|
|
190
207
|
}
|
|
191
|
-
type StaticParamsResult = Array<Record<string, string | string[]>>;
|
|
192
|
-
declare function extractServerProps(componentPath: string, params:
|
|
193
|
-
|
|
208
|
+
type StaticParamsResult = Array<Record<string, string | readonly string[]>>;
|
|
209
|
+
declare function extractServerProps(componentPath: string, params: Readonly<{
|
|
210
|
+
readonly [key: string]: string;
|
|
211
|
+
}>, searchParams: Readonly<{
|
|
212
|
+
readonly [key: string]: string;
|
|
213
|
+
}>): Promise<ServerSidePropsResult>;
|
|
214
|
+
declare function extractMetadata(componentPath: string, params: Readonly<{
|
|
215
|
+
readonly [key: string]: string;
|
|
216
|
+
}>, searchParams: Readonly<{
|
|
217
|
+
readonly [key: string]: string;
|
|
218
|
+
}>): Promise<MetadataResult>;
|
|
194
219
|
declare function extractStaticParams(componentPath: string): Promise<StaticParamsResult>;
|
|
195
220
|
declare function hasServerSideDataFetching(componentPath: string): Promise<boolean>;
|
|
196
|
-
declare function extractServerPropsWithCache(componentPath: string, params:
|
|
221
|
+
declare function extractServerPropsWithCache(componentPath: string, params: Readonly<{
|
|
222
|
+
readonly [key: string]: string;
|
|
223
|
+
}>, searchParams: Readonly<{
|
|
224
|
+
readonly [key: string]: string;
|
|
225
|
+
}>, cacheTime?: number): Promise<ServerSidePropsResult>;
|
|
197
226
|
declare function clearPropsCache(): void;
|
|
198
227
|
declare function clearPropsCacheForComponent(componentPath: string): void;
|
|
199
228
|
//#endregion
|
|
200
229
|
//#region src/router/build/routes.d.ts
|
|
201
230
|
interface AppRouteGeneratorOptions {
|
|
202
|
-
appDir: string;
|
|
203
|
-
extensions?: string[];
|
|
204
|
-
verbose?: boolean;
|
|
231
|
+
readonly appDir: string;
|
|
232
|
+
readonly extensions?: readonly string[];
|
|
233
|
+
readonly verbose?: boolean;
|
|
205
234
|
}
|
|
206
|
-
declare function generateAppRouteManifest(appDir: string, options?: Partial<AppRouteGeneratorOptions
|
|
235
|
+
declare function generateAppRouteManifest(appDir: string, options?: Readonly<Partial<AppRouteGeneratorOptions>>): Promise<AppRouteManifest>;
|
|
207
236
|
//#endregion
|
|
208
237
|
//#region src/router/build/vite-plugin.d.ts
|
|
209
238
|
interface RariRouterPluginOptions {
|
|
210
|
-
appDir?: string;
|
|
211
|
-
extensions?: string[];
|
|
212
|
-
outDir?: string;
|
|
239
|
+
readonly appDir?: string;
|
|
240
|
+
readonly extensions?: readonly string[];
|
|
241
|
+
readonly outDir?: string;
|
|
213
242
|
}
|
|
214
243
|
declare function rariRouter(options?: RariRouterPluginOptions): RariPlugin;
|
|
215
244
|
//#endregion
|
|
216
245
|
//#region src/vite/index.d.ts
|
|
217
246
|
interface RouterPluginOptions {
|
|
218
|
-
appDir?: string;
|
|
219
|
-
extensions?: string[];
|
|
247
|
+
readonly appDir?: string;
|
|
248
|
+
readonly extensions?: readonly string[];
|
|
220
249
|
}
|
|
221
250
|
interface RariOptions {
|
|
222
|
-
projectRoot?: string;
|
|
223
|
-
serverBuild?: ServerBuildOptions;
|
|
224
|
-
serverHandler?: boolean;
|
|
225
|
-
proxy?: ProxyPluginOptions | false;
|
|
226
|
-
router?: RouterPluginOptions | false;
|
|
227
|
-
images?: {
|
|
228
|
-
remotePatterns?:
|
|
229
|
-
protocol?: 'http' | 'https';
|
|
230
|
-
hostname: string;
|
|
231
|
-
port?: string;
|
|
232
|
-
pathname?: string;
|
|
233
|
-
search?: string;
|
|
251
|
+
readonly projectRoot?: string;
|
|
252
|
+
readonly serverBuild?: ServerBuildOptions;
|
|
253
|
+
readonly serverHandler?: boolean;
|
|
254
|
+
readonly proxy?: ProxyPluginOptions | false;
|
|
255
|
+
readonly router?: RouterPluginOptions | false;
|
|
256
|
+
readonly images?: {
|
|
257
|
+
readonly remotePatterns?: ReadonlyArray<{
|
|
258
|
+
readonly protocol?: 'http' | 'https';
|
|
259
|
+
readonly hostname: string;
|
|
260
|
+
readonly port?: string;
|
|
261
|
+
readonly pathname?: string;
|
|
262
|
+
readonly search?: string;
|
|
234
263
|
}>;
|
|
235
|
-
localPatterns?:
|
|
236
|
-
pathname: string;
|
|
237
|
-
search?: string;
|
|
264
|
+
readonly localPatterns?: ReadonlyArray<{
|
|
265
|
+
readonly pathname: string;
|
|
266
|
+
readonly search?: string;
|
|
238
267
|
}>;
|
|
239
|
-
deviceSizes?: number[];
|
|
240
|
-
imageSizes?: number[];
|
|
241
|
-
formats?: ('avif' | 'webp')[];
|
|
242
|
-
qualityAllowlist?: number[];
|
|
243
|
-
minimumCacheTTL?: number;
|
|
244
|
-
maxCacheSize?: number;
|
|
268
|
+
readonly deviceSizes?: readonly number[];
|
|
269
|
+
readonly imageSizes?: readonly number[];
|
|
270
|
+
readonly formats?: readonly ('avif' | 'webp')[];
|
|
271
|
+
readonly qualityAllowlist?: readonly number[];
|
|
272
|
+
readonly minimumCacheTTL?: number;
|
|
273
|
+
readonly maxCacheSize?: number;
|
|
245
274
|
};
|
|
246
|
-
csp?: {
|
|
247
|
-
scriptSrc?: string[];
|
|
248
|
-
styleSrc?: string[];
|
|
249
|
-
imgSrc?: string[];
|
|
250
|
-
fontSrc?: string[];
|
|
251
|
-
connectSrc?: string[];
|
|
252
|
-
defaultSrc?: string[];
|
|
253
|
-
workerSrc?: string[];
|
|
275
|
+
readonly csp?: {
|
|
276
|
+
readonly scriptSrc?: readonly string[];
|
|
277
|
+
readonly styleSrc?: readonly string[];
|
|
278
|
+
readonly imgSrc?: readonly string[];
|
|
279
|
+
readonly fontSrc?: readonly string[];
|
|
280
|
+
readonly connectSrc?: readonly string[];
|
|
281
|
+
readonly defaultSrc?: readonly string[];
|
|
282
|
+
readonly workerSrc?: readonly string[];
|
|
283
|
+
readonly frameAncestors?: readonly string[];
|
|
284
|
+
readonly baseUri?: readonly string[];
|
|
285
|
+
readonly formAction?: readonly string[];
|
|
286
|
+
readonly useNonces?: boolean;
|
|
254
287
|
};
|
|
255
|
-
cacheControl?: {
|
|
256
|
-
routes: Record<string, string
|
|
288
|
+
readonly cacheControl?: {
|
|
289
|
+
readonly routes: Readonly<Record<string, string>>;
|
|
257
290
|
};
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
291
|
+
readonly action?: {
|
|
292
|
+
readonly allowedOrigins?: readonly string[];
|
|
293
|
+
};
|
|
294
|
+
readonly jsPoolSize?: number;
|
|
295
|
+
readonly htmlLimitedBots?: string;
|
|
296
|
+
readonly cache?: ServerCacheConfig;
|
|
297
|
+
readonly experimental?: {
|
|
298
|
+
readonly useCache?: boolean;
|
|
299
|
+
readonly useCacheRemote?: ServerCacheLayerConfig;
|
|
262
300
|
};
|
|
263
|
-
mdx?: MdxPluginOptions;
|
|
301
|
+
readonly mdx?: MdxPluginOptions;
|
|
264
302
|
}
|
|
265
303
|
declare function defineRariOptions(config: RariOptions): RariOptions;
|
|
266
304
|
declare function rari(options?: RariOptions): RariPlugin[];
|
|
267
305
|
declare function defineRariConfig(config: UserConfig & {
|
|
268
|
-
plugins?: RariPlugin[];
|
|
306
|
+
readonly plugins?: readonly RariPlugin[];
|
|
269
307
|
}): UserConfig;
|
|
270
308
|
type Request = globalThis.Request;
|
|
271
309
|
type Response = globalThis.Response;
|
|
272
310
|
//#endregion
|
|
273
|
-
export { ApiResponse, type ApiRouteHandlers, type AppRouteEntry, type AppRouteManifest, type AppRouteMatch, type CookieOptions, type ErrorEntry, type ErrorProps, type GenerateMetadata, type GenerateStaticParams, type LayoutEntry, type LayoutProps, type LoadingEntry, type Metadata, type MetadataResult, type NotFoundEntry, type PageProps, type ProxyConfig, type ProxyFunction, type ProxyMatcher, type ProxyModule, type ProxyPluginOptions, type ProxyResult, type RariFetchEvent, RariOptions, type RariPlugin, type RariURL, Request, type RequestCookies, Response, type ResponseCookies, type Robots, type RobotsRule, type RouteContext, type RouteHandler, type RouteSegment, type RouteSegmentType, RouterPluginOptions, type ServerCSPConfig, type ServerCacheConfig, type ServerCacheControlConfig, type ServerCacheLayerConfig, type ServerConfig, type ServerSidePropsResult, type ServerUseCacheConfig, type Sitemap, type SitemapEntry, type SitemapImage, type SitemapVideo, type StaticParamsResult, type TemplateEntry, clearPropsCache, clearPropsCacheForComponent, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, rari, rariProxy, rariRouter };
|
|
311
|
+
export { ApiResponse, type ApiRouteHandlers, type AppRouteEntry, type AppRouteManifest, type AppRouteMatch, type CookieOptions, type ErrorEntry, type ErrorProps, type GenerateMetadata, type GenerateStaticParams, type LayoutEntry, type LayoutProps, type LoadingEntry, type Metadata, type MetadataResult, type NotFoundEntry, type PageProps, type ProxyConfig, type ProxyFunction, type ProxyMatcher, type ProxyModule, type ProxyPluginOptions, type ProxyResult, type RariFetchEvent, RariOptions, type RariPlugin, type RariURL, Request, type RequestCookies, Response, type ResponseCookies, type Robots, type RobotsRule, type RouteContext, type RouteHandler, type RouteSegment, type RouteSegmentType, RouterPluginOptions, type ServerActionConfig, type ServerCSPConfig, type ServerCacheConfig, type ServerCacheControlConfig, type ServerCacheLayerConfig, type ServerConfig, type ServerSidePropsResult, type ServerUseCacheConfig, type Sitemap, type SitemapEntry, type SitemapImage, type SitemapVideo, type StaticParamsResult, type TemplateEntry, clearPropsCache, clearPropsCacheForComponent, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, rari, rariProxy, rariRouter };
|