rari 0.14.6 → 0.14.8
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/client.d.mts +4 -42
- package/dist/client.mjs +1 -2
- package/dist/index.d.mts +1 -1
- package/dist/mdx.mjs +1 -1
- package/dist/platform.mjs +2 -2
- package/dist/props-extractor-C8FRV5vW.mjs +1 -0
- package/dist/regex-constants-DQ2vkSU5.mjs +1 -0
- package/dist/runtime/AppRouterProvider.mjs +1 -1
- package/dist/runtime/ErrorBoundaryWrapper.mjs +1 -1
- package/dist/runtime/entry-client.mjs +2 -7
- package/dist/runtime/rsc-client-runtime.mjs +2 -2
- package/dist/server-config-D_oeQzpc.d.mts +102 -0
- package/dist/{sitemap-generator-BbD6Q3sO.mjs → sitemap-generator-BGu4N9qc.mjs} +1 -1
- package/dist/{types-pC5OZq29.d.mts → types-K8DF80Bq.d.mts} +16 -1
- package/dist/vite.d.mts +49 -3
- package/dist/vite.mjs +31 -108
- package/package.json +18 -14
- package/dist/regex-constants-s9cBkrFv.mjs +0 -1
- package/dist/runtime-client-DHeO6y_7.mjs +0 -6
- package/dist/server-config-CwWYmtA0.d.mts +0 -237
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,
|
|
1
|
+
import{C as e,E as t,S as n,T as r,w as i}from"./regex-constants-DQ2vkSU5.mjs";import{t as a}from"./alias-resolver-BintHkb_.mjs";import{Buffer as o}from"node:buffer";import{existsSync as s,promises as c}from"node:fs";import l from"node:path";const u=/[^\w-]/g,d=`\0virtual:sitemap`;function f(a){return a.replace(n,`&`).replace(r,`<`).replace(i,`>`).replace(t,`"`).replace(e,`'`)}function p(e){return(typeof e==`string`?new Date(e):e).toISOString()}function m(e){return[` <image:image>`,` <image:loc>${f(e)}</image:loc>`,` </image:image>`].join(`
|
|
2
2
|
`)}function h(e){let t=[` <image:image>`,` <image:loc>${f(e.loc)}</image:loc>`];return e.title&&t.push(` <image:title>${f(e.title)}</image:title>`),e.caption&&t.push(` <image:caption>${f(e.caption)}</image:caption>`),e.geoLocation&&t.push(` <image:geo_location>${f(e.geoLocation)}</image:geo_location>`),e.license&&t.push(` <image:license>${f(e.license)}</image:license>`),t.push(` </image:image>`),t.join(`
|
|
3
3
|
`)}function g(e){let t=[];for(let n of e)typeof n==`string`?t.push(m(n)):t.push(h(n));return t.join(`
|
|
4
4
|
`)}function _(e){let t=[];if(t.push(` <video:video>`),t.push(` <video:title>${f(e.title)}</video:title>`),t.push(` <video:thumbnail_loc>${f(e.thumbnail_loc)}</video:thumbnail_loc>`),t.push(` <video:description>${f(e.description)}</video:description>`),e.content_loc&&t.push(` <video:content_loc>${f(e.content_loc)}</video:content_loc>`),e.player_loc&&t.push(` <video:player_loc>${f(e.player_loc)}</video:player_loc>`),e.duration!==void 0&&t.push(` <video:duration>${e.duration}</video:duration>`),e.expiration_date&&t.push(` <video:expiration_date>${f(e.expiration_date)}</video:expiration_date>`),e.rating!==void 0&&t.push(` <video:rating>${e.rating}</video:rating>`),e.view_count!==void 0&&t.push(` <video:view_count>${e.view_count}</video:view_count>`),e.publication_date&&t.push(` <video:publication_date>${f(e.publication_date)}</video:publication_date>`),e.family_friendly!==void 0&&t.push(` <video:family_friendly>${e.family_friendly?`yes`:`no`}</video:family_friendly>`),e.requires_subscription!==void 0&&t.push(` <video:requires_subscription>${e.requires_subscription?`yes`:`no`}</video:requires_subscription>`),e.live!==void 0&&t.push(` <video:live>${e.live?`yes`:`no`}</video:live>`),e.restriction&&t.push(` <video:restriction relationship="${f(e.restriction.relationship)}">${f(e.restriction.content)}</video:restriction>`),e.platform&&t.push(` <video:platform relationship="${f(e.platform.relationship)}">${f(e.platform.content)}</video:platform>`),e.uploader){let n=e.uploader.info?` info="${f(e.uploader.info)}"`:``;t.push(` <video:uploader${n}>${f(e.uploader.name)}</video:uploader>`)}if(e.tag)for(let n of e.tag)t.push(` <video:tag>${f(n)}</video:tag>`);return t.push(` </video:video>`),t.join(`
|
|
@@ -24,24 +24,28 @@ interface LayoutEntry {
|
|
|
24
24
|
css?: string[];
|
|
25
25
|
componentId?: string;
|
|
26
26
|
parentPath?: string;
|
|
27
|
+
additionalPaths?: string[];
|
|
27
28
|
}
|
|
28
29
|
interface LoadingEntry {
|
|
29
30
|
path: string;
|
|
30
31
|
filePath: string;
|
|
31
32
|
css?: string[];
|
|
32
33
|
componentId?: string;
|
|
34
|
+
additionalPaths?: string[];
|
|
33
35
|
}
|
|
34
36
|
interface ErrorEntry {
|
|
35
37
|
path: string;
|
|
36
38
|
filePath: string;
|
|
37
39
|
css?: string[];
|
|
38
40
|
componentId?: string;
|
|
41
|
+
additionalPaths?: string[];
|
|
39
42
|
}
|
|
40
43
|
interface NotFoundEntry {
|
|
41
44
|
path: string;
|
|
42
45
|
filePath: string;
|
|
43
46
|
css?: string[];
|
|
44
47
|
componentId?: string;
|
|
48
|
+
additionalPaths?: string[];
|
|
45
49
|
}
|
|
46
50
|
interface OgImageEntry {
|
|
47
51
|
path: string;
|
|
@@ -49,6 +53,7 @@ interface OgImageEntry {
|
|
|
49
53
|
width?: number;
|
|
50
54
|
height?: number;
|
|
51
55
|
contentType?: string;
|
|
56
|
+
additionalPaths?: string[];
|
|
52
57
|
}
|
|
53
58
|
interface ApiRouteEntry {
|
|
54
59
|
path: string;
|
|
@@ -58,12 +63,21 @@ interface ApiRouteEntry {
|
|
|
58
63
|
isDynamic: boolean;
|
|
59
64
|
methods: string[];
|
|
60
65
|
}
|
|
66
|
+
interface TemplateEntry {
|
|
67
|
+
path: string;
|
|
68
|
+
filePath: string;
|
|
69
|
+
css?: string[];
|
|
70
|
+
componentId?: string;
|
|
71
|
+
parentPath?: string;
|
|
72
|
+
additionalPaths?: string[];
|
|
73
|
+
}
|
|
61
74
|
interface AppRouteManifest {
|
|
62
75
|
routes: AppRouteEntry[];
|
|
63
76
|
layouts: LayoutEntry[];
|
|
64
77
|
loading: LoadingEntry[];
|
|
65
78
|
errors: ErrorEntry[];
|
|
66
79
|
notFound: NotFoundEntry[];
|
|
80
|
+
templates: TemplateEntry[];
|
|
67
81
|
apiRoutes: ApiRouteEntry[];
|
|
68
82
|
ogImages: OgImageEntry[];
|
|
69
83
|
generated: string;
|
|
@@ -165,6 +179,7 @@ interface AppRouteMatch {
|
|
|
165
179
|
layouts: LayoutEntry[];
|
|
166
180
|
loading?: LoadingEntry;
|
|
167
181
|
error?: ErrorEntry;
|
|
182
|
+
templates: TemplateEntry[];
|
|
168
183
|
pathname: string;
|
|
169
184
|
}
|
|
170
185
|
type GenerateMetadata<TParams extends RouteParams = RouteParams, TSearchParams extends SearchParams = SearchParams> = (props: {
|
|
@@ -173,4 +188,4 @@ type GenerateMetadata<TParams extends RouteParams = RouteParams, TSearchParams e
|
|
|
173
188
|
}) => RouteMetadata | Promise<RouteMetadata>;
|
|
174
189
|
type GenerateStaticParams<TParams extends RouteParams = RouteParams> = () => TParams[] | Promise<TParams[]>;
|
|
175
190
|
//#endregion
|
|
176
|
-
export { ErrorProps as a, LayoutEntry as c, Metadata as d, NotFoundEntry as f, RouteSegmentType as h, ErrorEntry as i, LayoutProps as l, RouteSegment as m, AppRouteManifest as n, GenerateMetadata as o, PageProps as p, AppRouteMatch as r, GenerateStaticParams as s, AppRouteEntry as t, LoadingEntry as u };
|
|
191
|
+
export { ErrorProps as a, LayoutEntry as c, Metadata as d, NotFoundEntry as f, TemplateEntry as g, RouteSegmentType as h, ErrorEntry as i, LayoutProps as l, RouteSegment as m, AppRouteManifest as n, GenerateMetadata as o, PageProps as p, AppRouteMatch as r, GenerateStaticParams as s, AppRouteEntry as t, LoadingEntry as u };
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ErrorProps, c as LayoutEntry, d as Metadata, f as NotFoundEntry, 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 ServerSidePropsResult, c as clearPropsCacheForComponent, d as extractServerPropsWithCache, f as extractStaticParams, i as MetadataResult, l as extractMetadata, n as ServerCacheControlConfig, o as StaticParamsResult, p as hasServerSideDataFetching, r as ServerConfig, s as clearPropsCache, t as ServerCSPConfig, u as extractServerProps } from "./server-config-D_oeQzpc.mjs";
|
|
2
|
+
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-K8DF80Bq.mjs";
|
|
3
3
|
import { a as SitemapImage, i as SitemapEntry, n as RobotsRule, o as SitemapVideo, r as Sitemap, t as Robots } from "./metadata-route-85WvBQcW.mjs";
|
|
4
4
|
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-3dq9RGI5.mjs";
|
|
5
5
|
import { RariRequest } from "./proxy/RariRequest.mjs";
|
|
@@ -98,6 +98,52 @@ declare class ApiResponse extends Response {
|
|
|
98
98
|
static noContent(init?: ResponseInit): Response;
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
|
+
//#region src/http-runtime-client.d.ts
|
|
102
|
+
interface RuntimeClient {
|
|
103
|
+
initialize: () => Promise<void>;
|
|
104
|
+
registerComponent: (componentId: string, componentCode: string) => Promise<void>;
|
|
105
|
+
renderToStreamCallbacks: (componentId: string, props?: string) => Promise<any>;
|
|
106
|
+
registerClientComponent: (componentId: string, filePath: string, exportName: string) => void;
|
|
107
|
+
registerClientReference: (referenceId: string, filePath: string, exportName: string) => void;
|
|
108
|
+
listComponents: () => string[];
|
|
109
|
+
shutdown: () => Promise<void>;
|
|
110
|
+
}
|
|
111
|
+
interface HealthResponse {
|
|
112
|
+
status: string;
|
|
113
|
+
timestamp: string;
|
|
114
|
+
}
|
|
115
|
+
declare class HttpRuntimeClient implements RuntimeClient {
|
|
116
|
+
private baseUrl;
|
|
117
|
+
private timeout;
|
|
118
|
+
private components;
|
|
119
|
+
private initialized;
|
|
120
|
+
constructor(options?: {
|
|
121
|
+
host?: string;
|
|
122
|
+
port?: number;
|
|
123
|
+
timeout?: number;
|
|
124
|
+
ssl?: boolean;
|
|
125
|
+
});
|
|
126
|
+
private assertInitialized;
|
|
127
|
+
private request;
|
|
128
|
+
initialize(): Promise<void>;
|
|
129
|
+
registerComponent(componentId: string, componentCode: string): Promise<void>;
|
|
130
|
+
renderToStreamCallbacks(componentId: string, props?: string): Promise<any>;
|
|
131
|
+
registerClientComponent(componentId: string, filePath: string, exportName: string): void;
|
|
132
|
+
private queueClientComponentRegistration;
|
|
133
|
+
registerClientReference(referenceId: string, filePath: string, exportName: string): void;
|
|
134
|
+
listComponents(): string[];
|
|
135
|
+
shutdown(): Promise<void>;
|
|
136
|
+
checkHealth(): Promise<HealthResponse>;
|
|
137
|
+
isInitialized(): boolean;
|
|
138
|
+
getBaseUrl(): string;
|
|
139
|
+
}
|
|
140
|
+
declare function createHttpRuntimeClient(options?: {
|
|
141
|
+
host?: string;
|
|
142
|
+
port?: number;
|
|
143
|
+
timeout?: number;
|
|
144
|
+
ssl?: boolean;
|
|
145
|
+
}): RuntimeClient;
|
|
146
|
+
//#endregion
|
|
101
147
|
//#region src/router/routes.d.ts
|
|
102
148
|
interface AppRouteGeneratorOptions {
|
|
103
149
|
appDir: string;
|
|
@@ -119,4 +165,4 @@ type Request$1 = globalThis.Request;
|
|
|
119
165
|
type Response$1 = globalThis.Response;
|
|
120
166
|
declare function rari(options?: Parameters<typeof rari$1>[0]): any[];
|
|
121
167
|
//#endregion
|
|
122
|
-
export { ApiResponse, type ApiRouteHandlers, type AppRouteEntry, type AppRouteManifest, type AppRouteMatch, type CookieOptions, type ErrorEntry, type ErrorProps, type GenerateMetadata, type GenerateStaticParams, HttpRuntimeClient, 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, RariRequest, RariResponse, type RariURL, Request$1 as Request, type RequestCookies, Response$1 as Response, type ResponseCookies, type Robots, type RobotsRule, type RouteContext, type RouteHandler, type RouteSegment, type RouteSegmentType, type RuntimeClient, type ServerCSPConfig, type ServerConfig, type ServerSidePropsResult, type Sitemap, type SitemapEntry, type SitemapImage, type SitemapVideo, type StaticParamsResult, clearPropsCache, clearPropsCacheForComponent, createHttpRuntimeClient, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, rari, rariProxy, rariRouter };
|
|
168
|
+
export { ApiResponse, type ApiRouteHandlers, type AppRouteEntry, type AppRouteManifest, type AppRouteMatch, type CookieOptions, type ErrorEntry, type ErrorProps, type GenerateMetadata, type GenerateStaticParams, HttpRuntimeClient, 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, RariRequest, RariResponse, type RariURL, Request$1 as Request, type RequestCookies, Response$1 as Response, type ResponseCookies, type Robots, type RobotsRule, type RouteContext, type RouteHandler, type RouteSegment, type RouteSegmentType, type RuntimeClient, type ServerCSPConfig, type ServerConfig, type ServerSidePropsResult, type Sitemap, type SitemapEntry, type SitemapImage, type SitemapVideo, type StaticParamsResult, type TemplateEntry, clearPropsCache, clearPropsCacheForComponent, createHttpRuntimeClient, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, rari, rariProxy, rariRouter };
|