@flight-framework/core 0.3.0 → 0.3.1
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/README.md +541 -346
- package/dist/actions/index.js +1 -1
- package/dist/adapters/index.js +1 -1
- package/dist/cache/index.js +1 -1
- package/dist/{chunk-3UQJE3XZ.js → chunk-2F2QU6RC.js} +2 -2
- package/dist/chunk-2F2QU6RC.js.map +1 -0
- package/dist/{chunk-UGTETAJ2.js → chunk-3KRBRSRJ.js} +157 -3
- package/dist/chunk-3KRBRSRJ.js.map +1 -0
- package/dist/{chunk-OZ3EXPLE.js → chunk-3QP3E7HS.js} +2 -2
- package/dist/chunk-3QP3E7HS.js.map +1 -0
- package/dist/{chunk-2R23X5Z3.js → chunk-3ZSSRE6M.js} +2 -2
- package/dist/chunk-3ZSSRE6M.js.map +1 -0
- package/dist/{chunk-CKJHJPKQ.js → chunk-62C7LX2E.js} +2 -2
- package/dist/chunk-62C7LX2E.js.map +1 -0
- package/dist/{chunk-YNTMYL36.js → chunk-6BDCTUQY.js} +3 -3
- package/dist/chunk-6BDCTUQY.js.map +1 -0
- package/dist/{chunk-2JVEH76V.js → chunk-FSJNOPYE.js} +3 -3
- package/dist/chunk-FSJNOPYE.js.map +1 -0
- package/dist/{chunk-ARBKF6VI.js → chunk-GCQZ4FHI.js} +2 -2
- package/dist/{chunk-ARBKF6VI.js.map → chunk-GCQZ4FHI.js.map} +1 -1
- package/dist/{chunk-EHVUAFNH.js → chunk-IXMD5QH2.js} +2 -2
- package/dist/chunk-IXMD5QH2.js.map +1 -0
- package/dist/{chunk-6GI6HFSQ.js → chunk-K2CQZPCG.js} +2 -2
- package/dist/chunk-K2CQZPCG.js.map +1 -0
- package/dist/{chunk-65JYF3DJ.js → chunk-MDQNNIHH.js} +2 -2
- package/dist/chunk-MDQNNIHH.js.map +1 -0
- package/dist/{chunk-GNS2FGPC.js → chunk-MQQLYWZZ.js} +2 -2
- package/dist/chunk-MQQLYWZZ.js.map +1 -0
- package/dist/{chunk-LAKHYTHL.js → chunk-NWMJYTMB.js} +3 -3
- package/dist/chunk-NWMJYTMB.js.map +1 -0
- package/dist/{chunk-JFUKVWSO.js → chunk-OYF2OAKS.js} +115 -32
- package/dist/chunk-OYF2OAKS.js.map +1 -0
- package/dist/{chunk-FRAH5QNY.js → chunk-P6WSBVDT.js} +4 -4
- package/dist/chunk-P6WSBVDT.js.map +1 -0
- package/dist/{chunk-5XHOLZBJ.js → chunk-PDW5WCMW.js} +2 -2
- package/dist/chunk-PDW5WCMW.js.map +1 -0
- package/dist/{chunk-A2QRUBVE.js → chunk-PVUMB632.js} +2 -2
- package/dist/chunk-PVUMB632.js.map +1 -0
- package/dist/{chunk-LKOPJ3GS.js → chunk-R7SQAREQ.js} +2 -2
- package/dist/chunk-R7SQAREQ.js.map +1 -0
- package/dist/{chunk-UL4Q5CIJ.js → chunk-ROJFQCGV.js} +5 -5
- package/dist/chunk-ROJFQCGV.js.map +1 -0
- package/dist/{chunk-CNY3ZUVG.js → chunk-RSVA2EYO.js} +2 -2
- package/dist/chunk-RSVA2EYO.js.map +1 -0
- package/dist/{chunk-QK6UEQ75.js → chunk-SUILH4ID.js} +2 -2
- package/dist/chunk-SUILH4ID.js.map +1 -0
- package/dist/{chunk-PAVI5W6M.js → chunk-T4Z4HM4W.js} +3 -3
- package/dist/chunk-T4Z4HM4W.js.map +1 -0
- package/dist/{chunk-HNPO6LFW.js → chunk-TASAT7KB.js} +2 -2
- package/dist/chunk-TASAT7KB.js.map +1 -0
- package/dist/{chunk-3N5ZBVZJ.js → chunk-VPFMHGEV.js} +2 -2
- package/dist/chunk-VPFMHGEV.js.map +1 -0
- package/dist/{chunk-A4TKWQBU.js → chunk-W6D62JCI.js} +2 -2
- package/dist/chunk-W6D62JCI.js.map +1 -0
- package/dist/{chunk-UFWGOJL7.js → chunk-WFAWAHJH.js} +2 -2
- package/dist/chunk-WFAWAHJH.js.map +1 -0
- package/dist/{chunk-NZS2YJ43.js → chunk-WOEIJWGJ.js} +2 -2
- package/dist/chunk-WOEIJWGJ.js.map +1 -0
- package/dist/{chunk-VNO2YUVD.js → chunk-XOIYNY4I.js} +2 -2
- package/dist/chunk-XOIYNY4I.js.map +1 -0
- package/dist/{chunk-PO7IHPFF.js → chunk-XSY5AAXT.js} +2 -2
- package/dist/chunk-XSY5AAXT.js.map +1 -0
- package/dist/{chunk-OZBPR27I.js → chunk-YHEVHRLH.js} +2 -2
- package/dist/chunk-YHEVHRLH.js.map +1 -0
- package/dist/{chunk-XU6MRYG2.js → chunk-ZIE56LCA.js} +3 -3
- package/dist/chunk-ZIE56LCA.js.map +1 -0
- package/dist/{chunk-B2LPSCES.js → chunk-ZVC3ZWLM.js} +2 -2
- package/dist/chunk-ZVC3ZWLM.js.map +1 -0
- package/dist/config/index.js +1 -1
- package/dist/errors/index.js +2 -2
- package/dist/file-router/index.d.ts +95 -1
- package/dist/file-router/index.js +1 -1
- package/dist/file-router/streaming-hints.js +1 -1
- package/dist/handlers/index.js +1 -1
- package/dist/index.js +30 -30
- package/dist/index.js.map +1 -1
- package/dist/islands/index.js +1 -1
- package/dist/middleware/index.d.ts +163 -10
- package/dist/middleware/index.js +1 -1
- package/dist/react/index.js +2 -2
- package/dist/react/index.js.map +1 -1
- package/dist/render/index.js +1 -1
- package/dist/router/index.js +1 -1
- package/dist/rsc/adapters/index.js +4 -4
- package/dist/rsc/adapters/preact.js +1 -1
- package/dist/rsc/adapters/react.js +1 -1
- package/dist/rsc/adapters/solid.js +1 -1
- package/dist/rsc/adapters/vue.js +1 -1
- package/dist/rsc/boundaries.js +1 -1
- package/dist/rsc/context.js +1 -1
- package/dist/rsc/index.js +11 -11
- package/dist/rsc/legacy.js +1 -1
- package/dist/rsc/payload.js +1 -1
- package/dist/rsc/plugins/esbuild.js +2 -2
- package/dist/rsc/plugins/index.js +4 -4
- package/dist/rsc/plugins/rollup.js +2 -2
- package/dist/rsc/renderer.js +3 -3
- package/dist/rsc/stream.js +1 -1
- package/dist/rsc/vite-plugin.js +2 -2
- package/dist/server/index.js +4 -4
- package/dist/streaming/adapters/index.js +1 -1
- package/dist/streaming/conditional.js +1 -1
- package/dist/streaming/index.js +1 -1
- package/dist/streaming/observability.js +2 -2
- package/dist/streaming/priority.js +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +222 -210
- package/LICENSE +0 -21
- package/dist/chunk-2JVEH76V.js.map +0 -1
- package/dist/chunk-2R23X5Z3.js.map +0 -1
- package/dist/chunk-3N5ZBVZJ.js.map +0 -1
- package/dist/chunk-3UQJE3XZ.js.map +0 -1
- package/dist/chunk-5XHOLZBJ.js.map +0 -1
- package/dist/chunk-65JYF3DJ.js.map +0 -1
- package/dist/chunk-6GI6HFSQ.js.map +0 -1
- package/dist/chunk-A2QRUBVE.js.map +0 -1
- package/dist/chunk-A4TKWQBU.js.map +0 -1
- package/dist/chunk-B2LPSCES.js.map +0 -1
- package/dist/chunk-CKJHJPKQ.js.map +0 -1
- package/dist/chunk-CNY3ZUVG.js.map +0 -1
- package/dist/chunk-EHVUAFNH.js.map +0 -1
- package/dist/chunk-FRAH5QNY.js.map +0 -1
- package/dist/chunk-GNS2FGPC.js.map +0 -1
- package/dist/chunk-HNPO6LFW.js.map +0 -1
- package/dist/chunk-JFUKVWSO.js.map +0 -1
- package/dist/chunk-LAKHYTHL.js.map +0 -1
- package/dist/chunk-LKOPJ3GS.js.map +0 -1
- package/dist/chunk-NZS2YJ43.js.map +0 -1
- package/dist/chunk-OZ3EXPLE.js.map +0 -1
- package/dist/chunk-OZBPR27I.js.map +0 -1
- package/dist/chunk-PAVI5W6M.js.map +0 -1
- package/dist/chunk-PO7IHPFF.js.map +0 -1
- package/dist/chunk-QK6UEQ75.js.map +0 -1
- package/dist/chunk-UFWGOJL7.js.map +0 -1
- package/dist/chunk-UGTETAJ2.js.map +0 -1
- package/dist/chunk-UL4Q5CIJ.js.map +0 -1
- package/dist/chunk-VNO2YUVD.js.map +0 -1
- package/dist/chunk-XU6MRYG2.js.map +0 -1
- package/dist/chunk-YNTMYL36.js.map +0 -1
|
@@ -2,9 +2,41 @@
|
|
|
2
2
|
* Flight Middleware - Composable request/response handlers
|
|
3
3
|
*
|
|
4
4
|
* Framework-agnostic middleware system inspired by Koa/Hono.
|
|
5
|
+
* Provides primitives for building your own middleware solutions.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Type-safe middleware with custom variables (Hono pattern)
|
|
10
|
+
* interface MyLocals {
|
|
11
|
+
* user: { id: string; role: string };
|
|
12
|
+
* requestId: string;
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* const authMiddleware: Middleware<MyLocals> = async (ctx, next) => {
|
|
16
|
+
* ctx.locals.user = { id: '123', role: 'admin' };
|
|
17
|
+
* await next();
|
|
18
|
+
* };
|
|
19
|
+
* ```
|
|
5
20
|
*/
|
|
6
|
-
/**
|
|
7
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Request context passed through middleware chain.
|
|
23
|
+
*
|
|
24
|
+
* Supports generic type parameter for type-safe locals (like Hono Variables).
|
|
25
|
+
*
|
|
26
|
+
* @typeParam TLocals - Type of the locals object for type-safe middleware data sharing
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* interface AppLocals {
|
|
31
|
+
* user: User;
|
|
32
|
+
* db: DatabaseClient;
|
|
33
|
+
* }
|
|
34
|
+
*
|
|
35
|
+
* const ctx: MiddlewareContext<AppLocals> = createContextFromRequest(request);
|
|
36
|
+
* ctx.locals.user = currentUser; // Type-safe!
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
interface MiddlewareContext<TLocals extends Record<string, unknown> = Record<string, unknown>> {
|
|
8
40
|
/** Request URL */
|
|
9
41
|
url: URL;
|
|
10
42
|
/** Request method */
|
|
@@ -17,8 +49,8 @@ interface MiddlewareContext {
|
|
|
17
49
|
query: URLSearchParams;
|
|
18
50
|
/** Parsed request body (if any) */
|
|
19
51
|
body?: unknown;
|
|
20
|
-
/** Local data shared between middleware */
|
|
21
|
-
locals:
|
|
52
|
+
/** Local data shared between middleware - type-safe with generics */
|
|
53
|
+
locals: TLocals;
|
|
22
54
|
/** Original request (platform-specific) */
|
|
23
55
|
request?: Request;
|
|
24
56
|
/** Response status code */
|
|
@@ -30,8 +62,12 @@ interface MiddlewareContext {
|
|
|
30
62
|
}
|
|
31
63
|
/** Next function to call the next middleware */
|
|
32
64
|
type MiddlewareNext = () => Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Middleware function signature with optional typed locals.
|
|
67
|
+
*
|
|
68
|
+
* @typeParam TLocals - Type of the locals object for type-safe data sharing
|
|
69
|
+
*/
|
|
70
|
+
type Middleware<TLocals extends Record<string, unknown> = Record<string, unknown>> = (ctx: MiddlewareContext<TLocals>, next: MiddlewareNext) => Promise<void> | void;
|
|
35
71
|
/** Middleware with optional path matching */
|
|
36
72
|
interface MiddlewareDefinition {
|
|
37
73
|
/** Path pattern to match (undefined = match all) */
|
|
@@ -58,13 +94,52 @@ declare function createMiddlewareChain(): MiddlewareChain;
|
|
|
58
94
|
/**
|
|
59
95
|
* CORS middleware factory
|
|
60
96
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
97
|
+
/**
|
|
98
|
+
* CORS options for configuring cross-origin requests.
|
|
99
|
+
*/
|
|
100
|
+
interface CorsOptions {
|
|
101
|
+
/**
|
|
102
|
+
* Allowed origins. Can be:
|
|
103
|
+
* - '*' for any origin
|
|
104
|
+
* - A specific origin string
|
|
105
|
+
* - An array of allowed origins
|
|
106
|
+
* - A function that returns true if origin is allowed
|
|
107
|
+
* - An async function for dynamic origin validation
|
|
108
|
+
*/
|
|
109
|
+
origin?: string | string[] | ((origin: string) => boolean | Promise<boolean>);
|
|
110
|
+
/** Allowed HTTP methods */
|
|
63
111
|
methods?: string[];
|
|
112
|
+
/** Allowed headers */
|
|
64
113
|
headers?: string[];
|
|
114
|
+
/** Whether to include credentials */
|
|
65
115
|
credentials?: boolean;
|
|
116
|
+
/** Preflight cache duration in seconds */
|
|
66
117
|
maxAge?: number;
|
|
67
|
-
|
|
118
|
+
/** Exposed headers that can be accessed from the response */
|
|
119
|
+
exposeHeaders?: string[];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* CORS middleware factory.
|
|
123
|
+
*
|
|
124
|
+
* Handles cross-origin resource sharing with best practices:
|
|
125
|
+
* - Adds Vary: Origin for dynamic origins (CDN compatibility)
|
|
126
|
+
* - Supports async origin validation
|
|
127
|
+
* - Proper preflight handling
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* // Allow specific origins
|
|
132
|
+
* chain.use(cors({ origin: ['https://app.example.com'] }));
|
|
133
|
+
*
|
|
134
|
+
* // Dynamic validation
|
|
135
|
+
* chain.use(cors({
|
|
136
|
+
* origin: async (origin) => {
|
|
137
|
+
* return await db.allowedOrigins.exists(origin);
|
|
138
|
+
* }
|
|
139
|
+
* }));
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
declare function cors(options?: CorsOptions): Middleware;
|
|
68
143
|
/** Log levels in order of verbosity */
|
|
69
144
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
70
145
|
/** Log format types */
|
|
@@ -136,6 +211,84 @@ declare function securityHeaders(options?: {
|
|
|
136
211
|
* Compression middleware (requires implementation in adapter)
|
|
137
212
|
*/
|
|
138
213
|
declare function compress(): Middleware;
|
|
214
|
+
/**
|
|
215
|
+
* Error information passed to error handlers.
|
|
216
|
+
*/
|
|
217
|
+
interface ErrorInfo {
|
|
218
|
+
/** The original error */
|
|
219
|
+
error: Error;
|
|
220
|
+
/** HTTP status code (derived from error or default 500) */
|
|
221
|
+
status: number;
|
|
222
|
+
/** Error code for categorization */
|
|
223
|
+
code?: string;
|
|
224
|
+
/** Request context */
|
|
225
|
+
ctx: MiddlewareContext;
|
|
226
|
+
/** Request timestamp */
|
|
227
|
+
timestamp: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Error handler options.
|
|
231
|
+
*/
|
|
232
|
+
interface ErrorHandlerOptions {
|
|
233
|
+
/**
|
|
234
|
+
* Custom error handler function.
|
|
235
|
+
* Called when an error is caught. Can modify ctx to set response.
|
|
236
|
+
* If not provided, a default JSON response is sent.
|
|
237
|
+
*/
|
|
238
|
+
onError?: (info: ErrorInfo) => void | Promise<void>;
|
|
239
|
+
/**
|
|
240
|
+
* Whether to expose error details in response.
|
|
241
|
+
* Set to false in production to hide internal error messages.
|
|
242
|
+
* @default false
|
|
243
|
+
*/
|
|
244
|
+
expose?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Default status code for errors without a status property.
|
|
247
|
+
* @default 500
|
|
248
|
+
*/
|
|
249
|
+
defaultStatus?: number;
|
|
250
|
+
/**
|
|
251
|
+
* Emit error events for centralized logging (Koa pattern).
|
|
252
|
+
* Provide a function to receive error events.
|
|
253
|
+
*/
|
|
254
|
+
emit?: (error: Error, ctx: MiddlewareContext) => void;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Error handler middleware factory.
|
|
258
|
+
*
|
|
259
|
+
* Provides centralized error handling following Koa best practices:
|
|
260
|
+
* - Catches all downstream errors
|
|
261
|
+
* - Sets appropriate status codes
|
|
262
|
+
* - Supports custom error handlers
|
|
263
|
+
* - Supports error event emission for logging
|
|
264
|
+
*
|
|
265
|
+
* Place this as one of the FIRST middleware in your chain.
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```typescript
|
|
269
|
+
* // Basic usage - default JSON error response
|
|
270
|
+
* chain.use(errorHandler());
|
|
271
|
+
*
|
|
272
|
+
* // With custom handler
|
|
273
|
+
* chain.use(errorHandler({
|
|
274
|
+
* onError: ({ error, status, ctx }) => {
|
|
275
|
+
* ctx.status = status;
|
|
276
|
+
* ctx.responseBody = JSON.stringify({
|
|
277
|
+
* error: error.message,
|
|
278
|
+
* code: 'SERVER_ERROR'
|
|
279
|
+
* });
|
|
280
|
+
* },
|
|
281
|
+
* emit: (error, ctx) => {
|
|
282
|
+
* logger.error('Request error:', error);
|
|
283
|
+
* errorTracker.capture(error);
|
|
284
|
+
* }
|
|
285
|
+
* }));
|
|
286
|
+
*
|
|
287
|
+
* // Production-safe (hide error details)
|
|
288
|
+
* chain.use(errorHandler({ expose: false }));
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
declare function errorHandler(options?: ErrorHandlerOptions): Middleware;
|
|
139
292
|
/**
|
|
140
293
|
* Create a middleware context from a Web Request
|
|
141
294
|
*/
|
|
@@ -149,4 +302,4 @@ declare function createResponseFromContext(ctx: MiddlewareContext): Response;
|
|
|
149
302
|
*/
|
|
150
303
|
declare function compose(...middlewares: Middleware[]): Middleware;
|
|
151
304
|
|
|
152
|
-
export { type LogEntry, type LogFormat, type LogLevel, type LogWriter, type LoggerOptions, type Middleware, type MiddlewareChain, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareNext, compose, compress, cors, createContextFromRequest, createMiddlewareChain, createResponseFromContext, logger, securityHeaders };
|
|
305
|
+
export { type CorsOptions, type ErrorHandlerOptions, type ErrorInfo, type LogEntry, type LogFormat, type LogLevel, type LogWriter, type LoggerOptions, type Middleware, type MiddlewareChain, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareNext, compose, compress, cors, createContextFromRequest, createMiddlewareChain, createResponseFromContext, errorHandler, logger, securityHeaders };
|
package/dist/middleware/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { compose, compress, cors, createContextFromRequest, createMiddlewareChain, createResponseFromContext, logger, securityHeaders } from '../chunk-
|
|
1
|
+
export { compose, compress, cors, createContextFromRequest, createMiddlewareChain, createResponseFromContext, errorHandler, logger, securityHeaders } from '../chunk-OYF2OAKS.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getError, clearError } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { getError, clearError } from '../chunk-FSJNOPYE.js';
|
|
2
|
+
import '../chunk-YHEVHRLH.js';
|
|
3
3
|
import { createContext, useState, useEffect, useCallback, useContext } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/hooks/useError.tsx"],"names":["clearError"],"mappings":";;;;;AA0CA,IAAM,YAAA,GAAe,cAAwC,IAAI;AAwB1D,SAAS,aAAA,CAAc,EAAE,QAAA,EAAU,OAAA,EAAS,SAAQ,EAAkC;AACzF,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,IAAI,QAAA,CAA6B,MAAM,UAAU,CAAA;AAGvE,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,MAAM,WAAA,GAAc,CAAC,KAAA,KAAoC;AACrD,MAAA,QAAA,CAAS,MAAM,MAAM,CAAA;AACrB,MAAA,OAAA,GAAU,MAAM,MAAM,CAAA;AAAA,IAC1B,CAAA;AAEA,IAAA,MAAM,cAAc,MAAM;AACtB,MAAA,QAAA,CAAS,IAAI,CAAA;AACb,MAAA,OAAA,IAAU;AAAA,IACd,CAAA;AAEA,IAAA,MAAA,CAAO,gBAAA,CAAiB,gBAAgB,WAA4B,CAAA;AACpE,IAAA,MAAA,CAAO,gBAAA,CAAiB,sBAAsB,WAAW,CAAA;AAEzD,IAAA,OAAO,MAAM;AACT,MAAA,MAAA,CAAO,mBAAA,CAAoB,gBAAgB,WAA4B,CAAA;AACvE,MAAA,MAAA,CAAO,mBAAA,CAAoB,sBAAsB,WAAW,CAAA;AAAA,IAChE,CAAA;AAAA,EACJ,CAAA,EAAG,CAAC,OAAA,EAAS,OAAO,CAAC,CAAA;AAErB,EAAA,MAAMA,WAAAA,GAAa,WAAA,CAAY,CAAC,OAAA,KAAoC;AAChE,IAAA,UAAA,CAAiB,OAAO,CAAA;AACxB,IAAA,QAAA,CAAS,IAAI,CAAA;AACb,IAAA,OAAA,IAAU;AAAA,EACd,CAAA,EAAG,CAAC,OAAO,CAAC,CAAA;AAEZ,EAAA,MAAM,KAAA,GAA2B;AAAA,IAC7B,KAAA;AAAA,IACA,UAAA,EAAAA,WAAAA;AAAA,IACA,UAAU,KAAA,KAAU;AAAA,GACxB;AAEA,EAAA,uBACI,GAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,OAClB,QAAA,EACL,CAAA;AAER;AA6BO,SAAS,QAAA,GAA8B;AAC1C,EAAA,MAAM,OAAA,GAAU,WAAW,YAAY,CAAA;AAIvC,EAAA,IAAI,CAAC,OAAA,EAAS;AACV,IAAA,OAAO;AAAA,MACH,KAAA,EAAO,IAAA;AAAA,MACP,YAAY,MAAM;AAAA,MAAE,CAAA;AAAA,MACpB,QAAA,EAAU;AAAA,KACd;AAAA,EACJ;AAEA,EAAA,OAAO,OAAA;AACX","file":"index.js","sourcesContent":["/**\n * @flight-framework/core - React Error Hook\n * \n * Optional React hook for accessing error state.\n * Developers can use this or bring their own solution.\n */\n\nimport { createContext, useContext, useState, useEffect, useCallback } from 'react';\nimport type { ReactNode } from 'react';\nimport { FlightError, getError, clearError as clearGlobalError } from '../../errors/index.js';\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Error context value\n */\nexport interface ErrorContextValue {\n /** Current error, if any */\n error: FlightError | null;\n /** Clear the current error */\n clearError: (options?: { redirect?: string }) => void;\n /** Whether an error is currently active */\n hasError: boolean;\n}\n\n/**\n * Error provider props\n */\nexport interface ErrorProviderProps {\n children: ReactNode;\n /** Called when an error occurs */\n onError?: (error: FlightError) => void;\n /** Called when error is cleared */\n onClear?: () => void;\n}\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst ErrorContext = createContext<ErrorContextValue | null>(null);\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\n/**\n * Error context provider for React applications.\n * \n * Wraps your app to provide error state management via useError() hook.\n * \n * @example\n * ```tsx\n * import { ErrorProvider } from '@flight-framework/core/react';\n * \n * function App() {\n * return (\n * <ErrorProvider onError={(e) => console.log('Error:', e)}>\n * <MyApp />\n * </ErrorProvider>\n * );\n * }\n * ```\n */\nexport function ErrorProvider({ children, onError, onClear }: ErrorProviderProps): ReactNode {\n const [error, setError] = useState<FlightError | null>(() => getError());\n\n // Listen for error events from showError()\n useEffect(() => {\n const handleError = (event: CustomEvent<FlightError>) => {\n setError(event.detail);\n onError?.(event.detail);\n };\n\n const handleClear = () => {\n setError(null);\n onClear?.();\n };\n\n window.addEventListener('flight:error', handleError as EventListener);\n window.addEventListener('flight:error-clear', handleClear);\n\n return () => {\n window.removeEventListener('flight:error', handleError as EventListener);\n window.removeEventListener('flight:error-clear', handleClear);\n };\n }, [onError, onClear]);\n\n const clearError = useCallback((options?: { redirect?: string }) => {\n clearGlobalError(options);\n setError(null);\n onClear?.();\n }, [onClear]);\n\n const value: ErrorContextValue = {\n error,\n clearError,\n hasError: error !== null,\n };\n\n return (\n <ErrorContext.Provider value={value} >\n {children}\n </ErrorContext.Provider>\n );\n}\n\n// ============================================================================\n// Hook\n// ============================================================================\n\n/**\n * Access the current error state from anywhere in your React app.\n * \n * Returns null values if used outside of ErrorProvider (non-breaking behavior).\n * \n * @example\n * ```tsx\n * function MyComponent() {\n * const { error, clearError, hasError } = useError();\n * \n * if (hasError) {\n * return (\n * <div>\n * <p>Error: {error?.message}</p>\n * <button onClick={() => clearError()}>Dismiss</button>\n * </div>\n * );\n * }\n * \n * return <div>Normal content</div>;\n * }\n * ```\n */\nexport function useError(): ErrorContextValue {\n const context = useContext(ErrorContext);\n\n // Return safe defaults if used outside provider\n // This allows the hook to be used without forcing ErrorProvider\n if (!context) {\n return {\n error: null,\n clearError: () => { },\n hasError: false,\n };\n }\n\n return context;\n}\n\n// ============================================================================\n// Re-exports for convenience\n// ============================================================================\n\nexport { ErrorContext };\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/react/hooks/useError.tsx"],"names":["clearError"],"mappings":";;;;;AA0CA,IAAM,YAAA,GAAe,cAAwC,IAAI;AAwB1D,SAAS,aAAA,CAAc,EAAE,QAAA,EAAU,OAAA,EAAS,SAAQ,EAAkC;AACzF,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,IAAI,QAAA,CAA6B,MAAM,UAAU,CAAA;AAGvE,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,MAAM,WAAA,GAAc,CAAC,KAAA,KAAoC;AACrD,MAAA,QAAA,CAAS,MAAM,MAAM,CAAA;AACrB,MAAA,OAAA,GAAU,MAAM,MAAM,CAAA;AAAA,IAC1B,CAAA;AAEA,IAAA,MAAM,cAAc,MAAM;AACtB,MAAA,QAAA,CAAS,IAAI,CAAA;AACb,MAAA,OAAA,IAAU;AAAA,IACd,CAAA;AAEA,IAAA,MAAA,CAAO,gBAAA,CAAiB,gBAAgB,WAA4B,CAAA;AACpE,IAAA,MAAA,CAAO,gBAAA,CAAiB,sBAAsB,WAAW,CAAA;AAEzD,IAAA,OAAO,MAAM;AACT,MAAA,MAAA,CAAO,mBAAA,CAAoB,gBAAgB,WAA4B,CAAA;AACvE,MAAA,MAAA,CAAO,mBAAA,CAAoB,sBAAsB,WAAW,CAAA;AAAA,IAChE,CAAA;AAAA,EACJ,CAAA,EAAG,CAAC,OAAA,EAAS,OAAO,CAAC,CAAA;AAErB,EAAA,MAAMA,WAAAA,GAAa,WAAA,CAAY,CAAC,OAAA,KAAoC;AAChE,IAAA,UAAA,CAAiB,OAAO,CAAA;AACxB,IAAA,QAAA,CAAS,IAAI,CAAA;AACb,IAAA,OAAA,IAAU;AAAA,EACd,CAAA,EAAG,CAAC,OAAO,CAAC,CAAA;AAEZ,EAAA,MAAM,KAAA,GAA2B;AAAA,IAC7B,KAAA;AAAA,IACA,UAAA,EAAAA,WAAAA;AAAA,IACA,UAAU,KAAA,KAAU;AAAA,GACxB;AAEA,EAAA,uBACI,GAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,OAClB,QAAA,EACL,CAAA;AAER;AA6BO,SAAS,QAAA,GAA8B;AAC1C,EAAA,MAAM,OAAA,GAAU,WAAW,YAAY,CAAA;AAIvC,EAAA,IAAI,CAAC,OAAA,EAAS;AACV,IAAA,OAAO;AAAA,MACH,KAAA,EAAO,IAAA;AAAA,MACP,YAAY,MAAM;AAAA,MAAE,CAAA;AAAA,MACpB,QAAA,EAAU;AAAA,KACd;AAAA,EACJ;AAEA,EAAA,OAAO,OAAA;AACX","file":"index.js","sourcesContent":["/**\r\n * @flight-framework/core - React Error Hook\r\n * \r\n * Optional React hook for accessing error state.\r\n * Developers can use this or bring their own solution.\r\n */\r\n\r\nimport { createContext, useContext, useState, useEffect, useCallback } from 'react';\r\nimport type { ReactNode } from 'react';\r\nimport { FlightError, getError, clearError as clearGlobalError } from '../../errors/index.js';\r\n\r\n// ============================================================================\r\n// Types\r\n// ============================================================================\r\n\r\n/**\r\n * Error context value\r\n */\r\nexport interface ErrorContextValue {\r\n /** Current error, if any */\r\n error: FlightError | null;\r\n /** Clear the current error */\r\n clearError: (options?: { redirect?: string }) => void;\r\n /** Whether an error is currently active */\r\n hasError: boolean;\r\n}\r\n\r\n/**\r\n * Error provider props\r\n */\r\nexport interface ErrorProviderProps {\r\n children: ReactNode;\r\n /** Called when an error occurs */\r\n onError?: (error: FlightError) => void;\r\n /** Called when error is cleared */\r\n onClear?: () => void;\r\n}\r\n\r\n// ============================================================================\r\n// Context\r\n// ============================================================================\r\n\r\nconst ErrorContext = createContext<ErrorContextValue | null>(null);\r\n\r\n// ============================================================================\r\n// Provider Component\r\n// ============================================================================\r\n\r\n/**\r\n * Error context provider for React applications.\r\n * \r\n * Wraps your app to provide error state management via useError() hook.\r\n * \r\n * @example\r\n * ```tsx\r\n * import { ErrorProvider } from '@flight-framework/core/react';\r\n * \r\n * function App() {\r\n * return (\r\n * <ErrorProvider onError={(e) => console.log('Error:', e)}>\r\n * <MyApp />\r\n * </ErrorProvider>\r\n * );\r\n * }\r\n * ```\r\n */\r\nexport function ErrorProvider({ children, onError, onClear }: ErrorProviderProps): ReactNode {\r\n const [error, setError] = useState<FlightError | null>(() => getError());\r\n\r\n // Listen for error events from showError()\r\n useEffect(() => {\r\n const handleError = (event: CustomEvent<FlightError>) => {\r\n setError(event.detail);\r\n onError?.(event.detail);\r\n };\r\n\r\n const handleClear = () => {\r\n setError(null);\r\n onClear?.();\r\n };\r\n\r\n window.addEventListener('flight:error', handleError as EventListener);\r\n window.addEventListener('flight:error-clear', handleClear);\r\n\r\n return () => {\r\n window.removeEventListener('flight:error', handleError as EventListener);\r\n window.removeEventListener('flight:error-clear', handleClear);\r\n };\r\n }, [onError, onClear]);\r\n\r\n const clearError = useCallback((options?: { redirect?: string }) => {\r\n clearGlobalError(options);\r\n setError(null);\r\n onClear?.();\r\n }, [onClear]);\r\n\r\n const value: ErrorContextValue = {\r\n error,\r\n clearError,\r\n hasError: error !== null,\r\n };\r\n\r\n return (\r\n <ErrorContext.Provider value={value} >\r\n {children}\r\n </ErrorContext.Provider>\r\n );\r\n}\r\n\r\n// ============================================================================\r\n// Hook\r\n// ============================================================================\r\n\r\n/**\r\n * Access the current error state from anywhere in your React app.\r\n * \r\n * Returns null values if used outside of ErrorProvider (non-breaking behavior).\r\n * \r\n * @example\r\n * ```tsx\r\n * function MyComponent() {\r\n * const { error, clearError, hasError } = useError();\r\n * \r\n * if (hasError) {\r\n * return (\r\n * <div>\r\n * <p>Error: {error?.message}</p>\r\n * <button onClick={() => clearError()}>Dismiss</button>\r\n * </div>\r\n * );\r\n * }\r\n * \r\n * return <div>Normal content</div>;\r\n * }\r\n * ```\r\n */\r\nexport function useError(): ErrorContextValue {\r\n const context = useContext(ErrorContext);\r\n\r\n // Return safe defaults if used outside provider\r\n // This allows the hook to be used without forcing ErrorProvider\r\n if (!context) {\r\n return {\r\n error: null,\r\n clearError: () => { },\r\n hasError: false,\r\n };\r\n }\r\n\r\n return context;\r\n}\r\n\r\n// ============================================================================\r\n// Re-exports for convenience\r\n// ============================================================================\r\n\r\nexport { ErrorContext };\r\n"]}
|
package/dist/render/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { canBeStatic, createCSRShell, createHTMLShell, escapeHtml, isClientOnly, requiresServer } from '../chunk-
|
|
1
|
+
export { canBeStatic, createCSRShell, createHTMLShell, escapeHtml, isClientOnly, requiresServer } from '../chunk-ZVC3ZWLM.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/router/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../chunk-Y22AMGTM.js';
|
|
2
|
-
export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../../chunk-
|
|
3
|
-
export { createVueAdapter, createVueConsumer, markAsVueClientComponent } from '../../chunk-
|
|
4
|
-
export { createSolidAdapter, createSolidConsumer, isServer as isSolidServer, markAsSolidClientComponent } from '../../chunk-
|
|
5
|
-
export { createPreactAdapter, createPreactConsumer, markAsPreactClientComponent, lazy as preactLazy } from '../../chunk-
|
|
2
|
+
export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../../chunk-TASAT7KB.js';
|
|
3
|
+
export { createVueAdapter, createVueConsumer, markAsVueClientComponent } from '../../chunk-2F2QU6RC.js';
|
|
4
|
+
export { createSolidAdapter, createSolidConsumer, isServer as isSolidServer, markAsSolidClientComponent } from '../../chunk-VPFMHGEV.js';
|
|
5
|
+
export { createPreactAdapter, createPreactConsumer, markAsPreactClientComponent, lazy as preactLazy } from '../../chunk-MDQNNIHH.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createPreactAdapter, createPreactConsumer, lazy, markAsPreactClientComponent } from '../../chunk-
|
|
1
|
+
export { createPreactAdapter, createPreactConsumer, lazy, markAsPreactClientComponent } from '../../chunk-MDQNNIHH.js';
|
|
2
2
|
//# sourceMappingURL=preact.js.map
|
|
3
3
|
//# sourceMappingURL=preact.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../../chunk-
|
|
1
|
+
export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../../chunk-TASAT7KB.js';
|
|
2
2
|
//# sourceMappingURL=react.js.map
|
|
3
3
|
//# sourceMappingURL=react.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createSolidAdapter, createSolidConsumer, isServer, markAsSolidClientComponent } from '../../chunk-
|
|
1
|
+
export { createSolidAdapter, createSolidConsumer, isServer, markAsSolidClientComponent } from '../../chunk-VPFMHGEV.js';
|
|
2
2
|
//# sourceMappingURL=solid.js.map
|
|
3
3
|
//# sourceMappingURL=solid.js.map
|
package/dist/rsc/adapters/vue.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createVueAdapter, createVueConsumer, markAsVueClientComponent } from '../../chunk-
|
|
1
|
+
export { createVueAdapter, createVueConsumer, markAsVueClientComponent } from '../../chunk-2F2QU6RC.js';
|
|
2
2
|
//# sourceMappingURL=vue.js.map
|
|
3
3
|
//# sourceMappingURL=vue.js.map
|
package/dist/rsc/boundaries.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-
|
|
1
|
+
export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-PDW5WCMW.js';
|
|
2
2
|
//# sourceMappingURL=boundaries.js.map
|
|
3
3
|
//# sourceMappingURL=boundaries.js.map
|
package/dist/rsc/context.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-
|
|
1
|
+
export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-62C7LX2E.js';
|
|
2
2
|
//# sourceMappingURL=context.js.map
|
|
3
3
|
//# sourceMappingURL=context.js.map
|
package/dist/rsc/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import '../chunk-63SCEXD7.js';
|
|
2
|
-
export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-
|
|
3
|
-
export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-
|
|
4
|
-
export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-
|
|
5
|
-
export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-
|
|
6
|
-
export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary } from '../chunk-
|
|
7
|
-
export { flightRSC } from '../chunk-
|
|
8
|
-
export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-
|
|
2
|
+
export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-62C7LX2E.js';
|
|
3
|
+
export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-PVUMB632.js';
|
|
4
|
+
export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-P6WSBVDT.js';
|
|
5
|
+
export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-K2CQZPCG.js';
|
|
6
|
+
export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary } from '../chunk-3ZSSRE6M.js';
|
|
7
|
+
export { flightRSC } from '../chunk-ZIE56LCA.js';
|
|
8
|
+
export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-PDW5WCMW.js';
|
|
9
9
|
import '../chunk-Y22AMGTM.js';
|
|
10
|
-
export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
10
|
+
export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../chunk-TASAT7KB.js';
|
|
11
|
+
import '../chunk-2F2QU6RC.js';
|
|
12
|
+
import '../chunk-VPFMHGEV.js';
|
|
13
|
+
import '../chunk-MDQNNIHH.js';
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/dist/rsc/legacy.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary } from '../chunk-
|
|
1
|
+
export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary } from '../chunk-3ZSSRE6M.js';
|
|
2
2
|
//# sourceMappingURL=legacy.js.map
|
|
3
3
|
//# sourceMappingURL=legacy.js.map
|
package/dist/rsc/payload.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-
|
|
1
|
+
export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-K2CQZPCG.js';
|
|
2
2
|
//# sourceMappingURL=payload.js.map
|
|
3
3
|
//# sourceMappingURL=payload.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { esbuild_default as default, flightRSCEsbuild } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { esbuild_default as default, flightRSCEsbuild } from '../../chunk-T4Z4HM4W.js';
|
|
2
|
+
import '../../chunk-PDW5WCMW.js';
|
|
3
3
|
//# sourceMappingURL=esbuild.js.map
|
|
4
4
|
//# sourceMappingURL=esbuild.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { flightRSCEsbuild } from '../../chunk-
|
|
2
|
-
export { flightRSCRollup } from '../../chunk-
|
|
3
|
-
export { flightRSC as flightRSCVite } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
1
|
+
export { flightRSCEsbuild } from '../../chunk-T4Z4HM4W.js';
|
|
2
|
+
export { flightRSCRollup } from '../../chunk-NWMJYTMB.js';
|
|
3
|
+
export { flightRSC as flightRSCVite } from '../../chunk-ZIE56LCA.js';
|
|
4
|
+
import '../../chunk-PDW5WCMW.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { rollup_default as default, flightRSCRollup } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { rollup_default as default, flightRSCRollup } from '../../chunk-NWMJYTMB.js';
|
|
2
|
+
import '../../chunk-PDW5WCMW.js';
|
|
3
3
|
//# sourceMappingURL=rollup.js.map
|
|
4
4
|
//# sourceMappingURL=rollup.js.map
|
package/dist/rsc/renderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-P6WSBVDT.js';
|
|
2
|
+
import '../chunk-K2CQZPCG.js';
|
|
3
|
+
import '../chunk-PDW5WCMW.js';
|
|
4
4
|
//# sourceMappingURL=renderer.js.map
|
|
5
5
|
//# sourceMappingURL=renderer.js.map
|
package/dist/rsc/stream.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-
|
|
1
|
+
export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-PVUMB632.js';
|
|
2
2
|
//# sourceMappingURL=stream.js.map
|
|
3
3
|
//# sourceMappingURL=stream.js.map
|
package/dist/rsc/vite-plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { vite_plugin_default as default, flightRSC } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { vite_plugin_default as default, flightRSC } from '../chunk-ZIE56LCA.js';
|
|
2
|
+
import '../chunk-PDW5WCMW.js';
|
|
3
3
|
//# sourceMappingURL=vite-plugin.js.map
|
|
4
4
|
//# sourceMappingURL=vite-plugin.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { createServer, getRuntime, isFlightServer } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { createServer, getRuntime, isFlightServer } from '../chunk-ROJFQCGV.js';
|
|
2
|
+
import '../chunk-IXMD5QH2.js';
|
|
3
|
+
import '../chunk-GCQZ4FHI.js';
|
|
4
|
+
import '../chunk-OYF2OAKS.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createHTMXStreamAdapter, createReactStreamAdapter, createSolidStreamAdapter, createStreamAdapter, createSvelteStreamAdapter, createVueStreamAdapter } from '../../chunk-
|
|
1
|
+
export { createHTMXStreamAdapter, createReactStreamAdapter, createSolidStreamAdapter, createStreamAdapter, createSvelteStreamAdapter, createVueStreamAdapter } from '../../chunk-MQQLYWZZ.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DEFAULT_BOT_PATTERNS, addStreamingHeaders, createConditionalStreamer, createStaticResponse, createStreamingResponse, isBot, isSlowConnection, prefersNoStream, streamIf, supportsStreaming } from '../chunk-
|
|
1
|
+
export { DEFAULT_BOT_PATTERNS, addStreamingHeaders, createConditionalStreamer, createStaticResponse, createStreamingResponse, isBot, isSlowConnection, prefersNoStream, streamIf, supportsStreaming } from '../chunk-XOIYNY4I.js';
|
|
2
2
|
//# sourceMappingURL=conditional.js.map
|
|
3
3
|
//# sourceMappingURL=conditional.js.map
|
package/dist/streaming/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createLazyContent, createStreamingResponse, createStreamingSSR, renderWithStreaming, streamParallel, streamSequential } from '../chunk-
|
|
1
|
+
export { createLazyContent, createStreamingResponse, createStreamingSSR, renderWithStreaming, streamParallel, streamSequential } from '../chunk-RSVA2EYO.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MetricsAggregator, createHttpObserver, createInstrumentedStream, createLoggerObserver } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { MetricsAggregator, createHttpObserver, createInstrumentedStream, createLoggerObserver } from '../chunk-6BDCTUQY.js';
|
|
2
|
+
import '../chunk-RSVA2EYO.js';
|
|
3
3
|
//# sourceMappingURL=observability.js.map
|
|
4
4
|
//# sourceMappingURL=observability.js.map
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../chunk-PL37KFRJ.js';
|
|
2
|
-
export { getEnvironment, isBrowser, isDevelopment, isProduction, isServer, isTest } from '../chunk-
|
|
2
|
+
export { getEnvironment, isBrowser, isDevelopment, isProduction, isServer, isTest } from '../chunk-YHEVHRLH.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|