@flight-framework/core 0.3.1 → 0.4.0

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/package.json CHANGED
@@ -1,222 +1,228 @@
1
- {
2
- "name": "@flight-framework/core",
3
- "version": "0.3.1",
4
- "description": "Core primitives for Flight Framework - routing, rendering, caching",
5
- "keywords": [
6
- "flight",
7
- "framework",
8
- "core",
9
- "ssr",
10
- "routing"
11
- ],
12
- "license": "MIT",
13
- "author": "Flight Contributors",
14
- "type": "module",
15
- "exports": {
16
- ".": {
17
- "types": "./dist/index.d.ts",
18
- "import": "./dist/index.js"
19
- },
20
- "./errors": {
21
- "types": "./dist/errors/index.d.ts",
22
- "import": "./dist/errors/index.js"
23
- },
24
- "./react": {
25
- "types": "./dist/react/index.d.ts",
26
- "import": "./dist/react/index.js"
27
- },
28
- "./utils": {
29
- "types": "./dist/utils/index.d.ts",
30
- "import": "./dist/utils/index.js"
31
- },
32
- "./router": {
33
- "types": "./dist/router/index.d.ts",
34
- "import": "./dist/router/index.js"
35
- },
36
- "./render": {
37
- "types": "./dist/render/index.d.ts",
38
- "import": "./dist/render/index.js"
39
- },
40
- "./cache": {
41
- "types": "./dist/cache/index.d.ts",
42
- "import": "./dist/cache/index.js"
43
- },
44
- "./middleware": {
45
- "types": "./dist/middleware/index.d.ts",
46
- "import": "./dist/middleware/index.js"
47
- },
48
- "./config": {
49
- "types": "./dist/config/index.d.ts",
50
- "import": "./dist/config/index.js"
51
- },
52
- "./adapters": {
53
- "types": "./dist/adapters/index.d.ts",
54
- "import": "./dist/adapters/index.js"
55
- },
56
- "./server": {
57
- "types": "./dist/server/index.d.ts",
58
- "import": "./dist/server/index.js"
59
- },
60
- "./file-router": {
61
- "types": "./dist/file-router/index.d.ts",
62
- "import": "./dist/file-router/index.js"
63
- },
64
- "./actions": {
65
- "types": "./dist/actions/index.d.ts",
66
- "import": "./dist/actions/index.js"
67
- },
68
- "./actions/middleware": {
69
- "types": "./dist/actions/middleware.d.ts",
70
- "import": "./dist/actions/middleware.js"
71
- },
72
- "./actions/streaming": {
73
- "types": "./dist/actions/streaming.d.ts",
74
- "import": "./dist/actions/streaming.js"
75
- },
76
- "./actions/queue": {
77
- "types": "./dist/actions/queue.d.ts",
78
- "import": "./dist/actions/queue.js"
79
- },
80
- "./handlers": {
81
- "types": "./dist/handlers/index.d.ts",
82
- "import": "./dist/handlers/index.js"
83
- },
84
- "./streaming": {
85
- "types": "./dist/streaming/index.d.ts",
86
- "import": "./dist/streaming/index.js"
87
- },
88
- "./streaming/priority": {
89
- "types": "./dist/streaming/priority.d.ts",
90
- "import": "./dist/streaming/priority.js"
91
- },
92
- "./streaming/observability": {
93
- "types": "./dist/streaming/observability.d.ts",
94
- "import": "./dist/streaming/observability.js"
95
- },
96
- "./streaming/conditional": {
97
- "types": "./dist/streaming/conditional.d.ts",
98
- "import": "./dist/streaming/conditional.js"
99
- },
100
- "./streaming/adapters": {
101
- "types": "./dist/streaming/adapters/index.d.ts",
102
- "import": "./dist/streaming/adapters/index.js"
103
- },
104
- "./islands": {
105
- "types": "./dist/islands/index.d.ts",
106
- "import": "./dist/islands/index.js"
107
- },
108
- "./file-router/streaming-hints": {
109
- "types": "./dist/file-router/streaming-hints.d.ts",
110
- "import": "./dist/file-router/streaming-hints.js"
111
- },
112
- "./rsc": {
113
- "types": "./dist/rsc/index.d.ts",
114
- "import": "./dist/rsc/index.js"
115
- },
116
- "./rsc/payload": {
117
- "types": "./dist/rsc/payload.d.ts",
118
- "import": "./dist/rsc/payload.js"
119
- },
120
- "./rsc/boundaries": {
121
- "types": "./dist/rsc/boundaries.d.ts",
122
- "import": "./dist/rsc/boundaries.js"
123
- },
124
- "./rsc/context": {
125
- "types": "./dist/rsc/context.d.ts",
126
- "import": "./dist/rsc/context.js"
127
- },
128
- "./rsc/stream": {
129
- "types": "./dist/rsc/stream.d.ts",
130
- "import": "./dist/rsc/stream.js"
131
- },
132
- "./rsc/renderer": {
133
- "types": "./dist/rsc/renderer.d.ts",
134
- "import": "./dist/rsc/renderer.js"
135
- },
136
- "./rsc/vite-plugin": {
137
- "types": "./dist/rsc/vite-plugin.d.ts",
138
- "import": "./dist/rsc/vite-plugin.js"
139
- },
140
- "./rsc/adapters": {
141
- "types": "./dist/rsc/adapters/index.d.ts",
142
- "import": "./dist/rsc/adapters/index.js"
143
- },
144
- "./rsc/adapters/react": {
145
- "types": "./dist/rsc/adapters/react.d.ts",
146
- "import": "./dist/rsc/adapters/react.js"
147
- },
148
- "./rsc/adapters/vue": {
149
- "types": "./dist/rsc/adapters/vue.d.ts",
150
- "import": "./dist/rsc/adapters/vue.js"
151
- },
152
- "./rsc/adapters/solid": {
153
- "types": "./dist/rsc/adapters/solid.d.ts",
154
- "import": "./dist/rsc/adapters/solid.js"
155
- },
156
- "./rsc/adapters/preact": {
157
- "types": "./dist/rsc/adapters/preact.d.ts",
158
- "import": "./dist/rsc/adapters/preact.js"
159
- },
160
- "./rsc/plugins": {
161
- "types": "./dist/rsc/plugins/index.d.ts",
162
- "import": "./dist/rsc/plugins/index.js"
163
- },
164
- "./rsc/plugins/esbuild": {
165
- "types": "./dist/rsc/plugins/esbuild.d.ts",
166
- "import": "./dist/rsc/plugins/esbuild.js"
167
- },
168
- "./rsc/plugins/rollup": {
169
- "types": "./dist/rsc/plugins/rollup.d.ts",
170
- "import": "./dist/rsc/plugins/rollup.js"
171
- },
172
- "./plugins": {
173
- "types": "./dist/plugins/index.d.ts",
174
- "import": "./dist/plugins/index.js"
175
- },
176
- "./plugins/critical-css": {
177
- "types": "./dist/plugins/critical-css.d.ts",
178
- "import": "./dist/plugins/critical-css.js"
179
- }
180
- },
181
- "main": "./dist/index.js",
182
- "types": "./dist/index.d.ts",
183
- "files": [
184
- "dist"
185
- ],
186
- "scripts": {
187
- "build": "tsup",
188
- "dev": "tsup --watch",
189
- "test": "vitest run",
190
- "test:watch": "vitest",
191
- "lint": "eslint src/",
192
- "clean": "rimraf dist",
193
- "typecheck": "tsc --noEmit"
194
- },
195
- "dependencies": {
196
- "radix3": "^1.1.0"
197
- },
198
- "devDependencies": {
199
- "@types/node": "^22.0.0",
200
- "@types/react": "^19.0.0",
201
- "rimraf": "^6.0.0",
202
- "tsup": "^8.0.0",
203
- "typescript": "^5.7.0",
204
- "vitest": "^2.0.0"
205
- },
206
- "peerDependencies": {
207
- "react": "^18.0.0 || ^19.0.0",
208
- "vite": "^6.0.0 || ^7.0.0",
209
- "critters": ">=0.0.20"
210
- },
211
- "peerDependenciesMeta": {
212
- "react": {
213
- "optional": true
214
- },
215
- "vite": {
216
- "optional": true
217
- },
218
- "critters": {
219
- "optional": true
220
- }
221
- }
222
- }
1
+ {
2
+ "name": "@flight-framework/core",
3
+ "version": "0.4.0",
4
+ "description": "Core primitives for Flight Framework - routing, rendering, caching",
5
+ "keywords": [
6
+ "flight",
7
+ "framework",
8
+ "core",
9
+ "ssr",
10
+ "routing"
11
+ ],
12
+ "license": "MIT",
13
+ "author": "Flight Contributors",
14
+ "type": "module",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "node": "./dist/index.js",
19
+ "default": "./dist/client.js"
20
+ },
21
+ "./client": {
22
+ "types": "./dist/client.d.ts",
23
+ "browser": "./dist/client.js",
24
+ "import": "./dist/client.js"
25
+ },
26
+ "./errors": {
27
+ "types": "./dist/errors/index.d.ts",
28
+ "import": "./dist/errors/index.js"
29
+ },
30
+ "./react": {
31
+ "types": "./dist/react/index.d.ts",
32
+ "import": "./dist/react/index.js"
33
+ },
34
+ "./utils": {
35
+ "types": "./dist/utils/index.d.ts",
36
+ "import": "./dist/utils/index.js"
37
+ },
38
+ "./router": {
39
+ "types": "./dist/router/index.d.ts",
40
+ "import": "./dist/router/index.js"
41
+ },
42
+ "./render": {
43
+ "types": "./dist/render/index.d.ts",
44
+ "import": "./dist/render/index.js"
45
+ },
46
+ "./cache": {
47
+ "types": "./dist/cache/index.d.ts",
48
+ "import": "./dist/cache/index.js"
49
+ },
50
+ "./middleware": {
51
+ "types": "./dist/middleware/index.d.ts",
52
+ "import": "./dist/middleware/index.js"
53
+ },
54
+ "./config": {
55
+ "types": "./dist/config/index.d.ts",
56
+ "import": "./dist/config/index.js"
57
+ },
58
+ "./adapters": {
59
+ "types": "./dist/adapters/index.d.ts",
60
+ "import": "./dist/adapters/index.js"
61
+ },
62
+ "./server": {
63
+ "types": "./dist/server/index.d.ts",
64
+ "import": "./dist/server/index.js"
65
+ },
66
+ "./file-router": {
67
+ "types": "./dist/file-router/index.d.ts",
68
+ "import": "./dist/file-router/index.js"
69
+ },
70
+ "./actions": {
71
+ "types": "./dist/actions/index.d.ts",
72
+ "import": "./dist/actions/index.js"
73
+ },
74
+ "./actions/middleware": {
75
+ "types": "./dist/actions/middleware.d.ts",
76
+ "import": "./dist/actions/middleware.js"
77
+ },
78
+ "./actions/streaming": {
79
+ "types": "./dist/actions/streaming.d.ts",
80
+ "import": "./dist/actions/streaming.js"
81
+ },
82
+ "./actions/queue": {
83
+ "types": "./dist/actions/queue.d.ts",
84
+ "import": "./dist/actions/queue.js"
85
+ },
86
+ "./handlers": {
87
+ "types": "./dist/handlers/index.d.ts",
88
+ "import": "./dist/handlers/index.js"
89
+ },
90
+ "./streaming": {
91
+ "types": "./dist/streaming/index.d.ts",
92
+ "import": "./dist/streaming/index.js"
93
+ },
94
+ "./streaming/priority": {
95
+ "types": "./dist/streaming/priority.d.ts",
96
+ "import": "./dist/streaming/priority.js"
97
+ },
98
+ "./streaming/observability": {
99
+ "types": "./dist/streaming/observability.d.ts",
100
+ "import": "./dist/streaming/observability.js"
101
+ },
102
+ "./streaming/conditional": {
103
+ "types": "./dist/streaming/conditional.d.ts",
104
+ "import": "./dist/streaming/conditional.js"
105
+ },
106
+ "./streaming/adapters": {
107
+ "types": "./dist/streaming/adapters/index.d.ts",
108
+ "import": "./dist/streaming/adapters/index.js"
109
+ },
110
+ "./islands": {
111
+ "types": "./dist/islands/index.d.ts",
112
+ "import": "./dist/islands/index.js"
113
+ },
114
+ "./file-router/streaming-hints": {
115
+ "types": "./dist/file-router/streaming-hints.d.ts",
116
+ "import": "./dist/file-router/streaming-hints.js"
117
+ },
118
+ "./rsc": {
119
+ "types": "./dist/rsc/index.d.ts",
120
+ "import": "./dist/rsc/index.js"
121
+ },
122
+ "./rsc/payload": {
123
+ "types": "./dist/rsc/payload.d.ts",
124
+ "import": "./dist/rsc/payload.js"
125
+ },
126
+ "./rsc/boundaries": {
127
+ "types": "./dist/rsc/boundaries.d.ts",
128
+ "import": "./dist/rsc/boundaries.js"
129
+ },
130
+ "./rsc/context": {
131
+ "types": "./dist/rsc/context.d.ts",
132
+ "import": "./dist/rsc/context.js"
133
+ },
134
+ "./rsc/stream": {
135
+ "types": "./dist/rsc/stream.d.ts",
136
+ "import": "./dist/rsc/stream.js"
137
+ },
138
+ "./rsc/renderer": {
139
+ "types": "./dist/rsc/renderer.d.ts",
140
+ "import": "./dist/rsc/renderer.js"
141
+ },
142
+ "./rsc/vite-plugin": {
143
+ "types": "./dist/rsc/vite-plugin.d.ts",
144
+ "import": "./dist/rsc/vite-plugin.js"
145
+ },
146
+ "./rsc/adapters": {
147
+ "types": "./dist/rsc/adapters/index.d.ts",
148
+ "import": "./dist/rsc/adapters/index.js"
149
+ },
150
+ "./rsc/adapters/react": {
151
+ "types": "./dist/rsc/adapters/react.d.ts",
152
+ "import": "./dist/rsc/adapters/react.js"
153
+ },
154
+ "./rsc/adapters/vue": {
155
+ "types": "./dist/rsc/adapters/vue.d.ts",
156
+ "import": "./dist/rsc/adapters/vue.js"
157
+ },
158
+ "./rsc/adapters/solid": {
159
+ "types": "./dist/rsc/adapters/solid.d.ts",
160
+ "import": "./dist/rsc/adapters/solid.js"
161
+ },
162
+ "./rsc/adapters/preact": {
163
+ "types": "./dist/rsc/adapters/preact.d.ts",
164
+ "import": "./dist/rsc/adapters/preact.js"
165
+ },
166
+ "./rsc/plugins": {
167
+ "types": "./dist/rsc/plugins/index.d.ts",
168
+ "import": "./dist/rsc/plugins/index.js"
169
+ },
170
+ "./rsc/plugins/esbuild": {
171
+ "types": "./dist/rsc/plugins/esbuild.d.ts",
172
+ "import": "./dist/rsc/plugins/esbuild.js"
173
+ },
174
+ "./rsc/plugins/rollup": {
175
+ "types": "./dist/rsc/plugins/rollup.d.ts",
176
+ "import": "./dist/rsc/plugins/rollup.js"
177
+ },
178
+ "./plugins": {
179
+ "types": "./dist/plugins/index.d.ts",
180
+ "import": "./dist/plugins/index.js"
181
+ },
182
+ "./plugins/critical-css": {
183
+ "types": "./dist/plugins/critical-css.d.ts",
184
+ "import": "./dist/plugins/critical-css.js"
185
+ }
186
+ },
187
+ "main": "./dist/index.js",
188
+ "types": "./dist/index.d.ts",
189
+ "files": [
190
+ "dist"
191
+ ],
192
+ "dependencies": {
193
+ "radix3": "^1.1.0"
194
+ },
195
+ "devDependencies": {
196
+ "@types/node": "^22.0.0",
197
+ "@types/react": "^19.0.0",
198
+ "rimraf": "^6.0.0",
199
+ "tsup": "^8.0.0",
200
+ "typescript": "^5.7.0",
201
+ "vitest": "^2.0.0"
202
+ },
203
+ "peerDependencies": {
204
+ "react": "^18.0.0 || ^19.0.0",
205
+ "vite": "^6.0.0 || ^7.0.0",
206
+ "critters": ">=0.0.20"
207
+ },
208
+ "peerDependenciesMeta": {
209
+ "react": {
210
+ "optional": true
211
+ },
212
+ "vite": {
213
+ "optional": true
214
+ },
215
+ "critters": {
216
+ "optional": true
217
+ }
218
+ },
219
+ "scripts": {
220
+ "build": "tsup",
221
+ "dev": "tsup --watch",
222
+ "test": "vitest run",
223
+ "test:watch": "vitest",
224
+ "lint": "eslint src/",
225
+ "clean": "rimraf dist",
226
+ "typecheck": "tsc --noEmit"
227
+ }
228
+ }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/rsc/legacy.ts"],"names":[],"mappings":";AAoEA,eAAsB,sBAAA,CAClB,SAAA,EACA,KAAA,EACA,OAAA,EACe;AACf,EAAA,IAAI;AACA,IAAA,MAAM,MAAA,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AoB,EAAE,GAAA,EAAK,IAAA,EAAK;AACxG,EAAA,MAAM,KAAA;AACV;AAMO,SAAS,gBAAgB,KAAA,EAAsD;AAClF,EAAA,IAAI,KAAA,YAAiB,KAAA,IAAU,KAAA,CAAkD,iBAAA,EAAmB;AAChG,IAAA,OAAQ,KAAA,CAAuE,iBAAA;AAAA,EACnF;AACA,EAAA,OAAO,IAAA;AACX","file":"chunk-3ZSSRE6M.js","sourcesContent":["/**\r\n * @flight-framework/core - Legacy RSC Support\r\n * \r\n * Backward compatibility module for the original RSC implementation.\r\n * Use the new API from './index.js' for new features.\r\n * \r\n * @deprecated Use the new RSC API instead\r\n * @module @flight-framework/core/rsc/legacy\r\n */\r\n\r\n// ============================================================================\r\n// Types\r\n// ============================================================================\r\n\r\n/**\r\n * Component rendering context\r\n * @deprecated Use ServerContext from './context.js' instead\r\n */\r\nexport interface RenderContext {\r\n /** Current request */\r\n request: Request;\r\n /** Route params */\r\n params: Record<string, string>;\r\n /** Search params */\r\n searchParams: URLSearchParams;\r\n /** Request headers */\r\n headers: Headers;\r\n /** Cookies */\r\n cookies: Map<string, string>;\r\n}\r\n\r\n/**\r\n * Server component definition\r\n * @deprecated Use ServerComponentFn from './index.js' instead\r\n */\r\nexport interface ServerComponent<P = unknown> {\r\n (props: P, context: RenderContext): Promise<string> | string;\r\n /** Mark as server component */\r\n __flight_server?: true;\r\n /** Dependencies for hydration */\r\n __flight_deps?: string[];\r\n}\r\n\r\n/**\r\n * Client component definition\r\n * @deprecated Use ClientReference from './boundaries.js' instead\r\n */\r\nexport interface ClientComponent<P = unknown> {\r\n (props: P): unknown;\r\n /** Mark as client component */\r\n __flight_client?: true;\r\n /** Client bundle path */\r\n __flight_bundle?: string;\r\n}\r\n\r\n/**\r\n * Component type detection\r\n */\r\nexport type ComponentType = 'server' | 'client' | 'hybrid';\r\n\r\n// ============================================================================\r\n// Server Component Execution\r\n// ============================================================================\r\n\r\n/**\r\n * Execute an async server component\r\n * @deprecated Use the new rendering pipeline instead\r\n */\r\nexport async function executeServerComponent<P>(\r\n component: ServerComponent<P>,\r\n props: P,\r\n context: RenderContext\r\n): Promise<string> {\r\n try {\r\n const result = await component(props, context);\r\n return result;\r\n } catch (error) {\r\n console.error('[Flight] Server component error:', error);\r\n throw error;\r\n }\r\n}\r\n\r\n/**\r\n * Create a render context from a Request\r\n * @deprecated Use createServerContext from './context.js' instead\r\n */\r\nexport function createRenderContext(request: Request, params: Record<string, string> = {}): RenderContext {\r\n const url = new URL(request.url);\r\n\r\n // Parse cookies\r\n const cookies = new Map<string, string>();\r\n const cookieHeader = request.headers.get('cookie') || '';\r\n cookieHeader.split(';').forEach(cookie => {\r\n const [key, value] = cookie.trim().split('=');\r\n if (key && value) cookies.set(key, value);\r\n });\r\n\r\n return {\r\n request,\r\n params,\r\n searchParams: url.searchParams,\r\n headers: request.headers,\r\n cookies,\r\n };\r\n}\r\n\r\n// ============================================================================\r\n// Data Fetching Helpers\r\n// ============================================================================\r\n\r\n/**\r\n * Cache for server-side fetch requests\r\n */\r\nconst fetchCache = new Map<string, { data: unknown; timestamp: number }>();\r\n\r\n/**\r\n * Server-side fetch with automatic caching\r\n */\r\nexport async function serverFetch<T>(\r\n url: string,\r\n options: RequestInit & {\r\n revalidate?: number | false;\r\n tags?: string[];\r\n } = {}\r\n): Promise<T> {\r\n const { revalidate = 60, ...fetchOptions } = options;\r\n const cacheKey = `${url}:${JSON.stringify(fetchOptions)}`;\r\n\r\n // Check cache\r\n const cached = fetchCache.get(cacheKey);\r\n if (cached) {\r\n const age = Date.now() - cached.timestamp;\r\n if (revalidate === false || age < (revalidate * 1000)) {\r\n return cached.data as T;\r\n }\r\n }\r\n\r\n // Fetch fresh data\r\n const response = await fetch(url, fetchOptions);\r\n\r\n if (!response.ok) {\r\n throw new Error(`Fetch failed: ${response.status} ${response.statusText}`);\r\n }\r\n\r\n const data = await response.json();\r\n\r\n // Cache the result\r\n if (revalidate !== false) {\r\n fetchCache.set(cacheKey, {\r\n data,\r\n timestamp: Date.now(),\r\n });\r\n }\r\n\r\n return data as T;\r\n}\r\n\r\n/**\r\n * Invalidate cache by tag\r\n */\r\nexport function revalidateTag(tag: string): void {\r\n console.log(`[Flight] Revalidating tag: ${tag}`);\r\n}\r\n\r\n/**\r\n * Invalidate cache by path\r\n */\r\nexport function revalidatePath(path: string): void {\r\n console.log(`[Flight] Revalidating path: ${path}`);\r\n}\r\n\r\n// ============================================================================\r\n// Component Serialization\r\n// ============================================================================\r\n\r\n/**\r\n * Serialize props for transmission to client\r\n * @deprecated Use serialize from './payload.js' instead\r\n */\r\nexport function serializeProps(props: unknown): string {\r\n function preProcess(value: unknown): unknown {\r\n if (value instanceof Date) {\r\n return { __type: 'Date', value: value.toISOString() };\r\n }\r\n if (value instanceof Map) {\r\n return { __type: 'Map', value: Array.from(value.entries()).map(([k, v]) => [preProcess(k), preProcess(v)]) };\r\n }\r\n if (value instanceof Set) {\r\n return { __type: 'Set', value: Array.from(value).map(preProcess) };\r\n }\r\n if (typeof value === 'bigint') {\r\n return { __type: 'BigInt', value: value.toString() };\r\n }\r\n if (typeof value === 'function') {\r\n return undefined;\r\n }\r\n if (Array.isArray(value)) {\r\n return value.map(preProcess);\r\n }\r\n if (value && typeof value === 'object') {\r\n const result: Record<string, unknown> = {};\r\n for (const [k, v] of Object.entries(value)) {\r\n result[k] = preProcess(v);\r\n }\r\n return result;\r\n }\r\n return value;\r\n }\r\n\r\n return JSON.stringify(preProcess(props));\r\n}\r\n\r\n/**\r\n * Deserialize props on client\r\n * @deprecated Use deserialize from './payload.js' instead\r\n */\r\nexport function deserializeProps<T>(serialized: string): T {\r\n return JSON.parse(serialized, (_key, value) => {\r\n if (value && typeof value === 'object' && '__type' in value) {\r\n switch (value.__type) {\r\n case 'Date':\r\n return new Date(value.value);\r\n case 'Map':\r\n return new Map(value.value);\r\n case 'Set':\r\n return new Set(value.value);\r\n case 'BigInt':\r\n return BigInt(value.value);\r\n }\r\n }\r\n return value;\r\n });\r\n}\r\n\r\n// ============================================================================\r\n// Client Component Boundary\r\n// ============================================================================\r\n\r\n/**\r\n * Create a client boundary placeholder\r\n * @deprecated Use clientRef from './payload.js' instead\r\n */\r\nexport function createClientBoundary(\r\n componentId: string,\r\n props: unknown,\r\n fallback?: string\r\n): string {\r\n const serializedProps = serializeProps(props);\r\n\r\n return `\r\n<!--flight-client:${componentId}-->\r\n<div data-flight-component=\"${componentId}\" data-flight-props='${serializedProps.replace(/'/g, \"&#39;\")}'>\r\n ${fallback || '<div>Loading...</div>'}\r\n</div>\r\n<!--/flight-client-->\r\n<script type=\"module\">\r\n(async function() {\r\n const component = await import('/_flight/components/${componentId}.js');\r\n const props = JSON.parse('${serializedProps.replace(/'/g, \"\\\\'\")}');\r\n const container = document.querySelector('[data-flight-component=\"${componentId}\"]');\r\n if (container && component.default) {\r\n if (typeof component.hydrate === 'function') {\r\n component.hydrate(container, props);\r\n }\r\n }\r\n})();\r\n</script>`;\r\n}\r\n\r\n// ============================================================================\r\n// Async Component Helpers\r\n// ============================================================================\r\n\r\n/**\r\n * Helper to create an async server component\r\n * @deprecated Use async Server Components directly\r\n */\r\nexport function createAsyncComponent<P, T>(\r\n fetcher: (props: P, context: RenderContext) => Promise<T>,\r\n renderer: (data: T, props: P) => string\r\n): ServerComponent<P> {\r\n const component: ServerComponent<P> = async (props, context) => {\r\n const data = await fetcher(props, context);\r\n return renderer(data, props);\r\n };\r\n component.__flight_server = true;\r\n return component;\r\n}\r\n\r\n/**\r\n * Compose multiple server components\r\n * @deprecated Use Promise.all with async components\r\n */\r\nexport function composeComponents(\r\n ...components: Array<() => Promise<string> | string>\r\n): () => Promise<string> {\r\n return async () => {\r\n const results = await Promise.all(\r\n components.map(async (comp) => await comp())\r\n );\r\n return results.join('');\r\n };\r\n}\r\n\r\n// ============================================================================\r\n// Error Boundary for Server Components\r\n// ============================================================================\r\n\r\n/**\r\n * Wrap a server component with error handling\r\n * @deprecated Use try/catch in async components\r\n */\r\nexport function withErrorBoundary<P>(\r\n component: ServerComponent<P>,\r\n errorFallback: (error: Error) => string\r\n): ServerComponent<P> {\r\n return async (props: P, context: RenderContext) => {\r\n try {\r\n return await component(props, context);\r\n } catch (error) {\r\n console.error('[Flight] Server component error:', error);\r\n return errorFallback(error as Error);\r\n }\r\n };\r\n}\r\n\r\n// ============================================================================\r\n// Not Found / Redirect Helpers\r\n// ============================================================================\r\n\r\n/**\r\n * Throw a not found error\r\n * @deprecated Use notFound from './context.js' instead\r\n */\r\nexport function notFound(): never {\r\n const error = new Error('Not Found');\r\n (error as Error & { __flight_not_found: boolean }).__flight_not_found = true;\r\n throw error;\r\n}\r\n\r\n/**\r\n * Check if error is not found\r\n * @deprecated Use isNotFoundError from './context.js' instead\r\n */\r\nexport function isNotFoundError(error: unknown): boolean {\r\n return error instanceof Error && (error as Error & { __flight_not_found?: boolean }).__flight_not_found === true;\r\n}\r\n\r\n/**\r\n * Server-side redirect\r\n * @deprecated Use redirect from './context.js' instead\r\n */\r\nexport function redirect(url: string, type: 'replace' | 'push' = 'replace'): never {\r\n const error = new Error(`Redirect: ${url}`);\r\n (error as Error & { __flight_redirect: { url: string; type: string } }).__flight_redirect = { url, type };\r\n throw error;\r\n}\r\n\r\n/**\r\n * Check if error is redirect\r\n * @deprecated Use isRedirectError from './context.js' instead\r\n */\r\nexport function isRedirectError(error: unknown): { url: string; type: string } | null {\r\n if (error instanceof Error && (error as Error & { __flight_redirect?: unknown }).__flight_redirect) {\r\n return (error as Error & { __flight_redirect: { url: string; type: string } }).__flight_redirect;\r\n }\r\n return null;\r\n}\r\n"]}
@@ -1,13 +0,0 @@
1
- // src/adapters/index.ts
2
- function createAdapter(options) {
3
- return {
4
- name: options.name,
5
- adapt: options.adapt,
6
- emulate: options.emulate,
7
- supports: options.supports
8
- };
9
- }
10
-
11
- export { createAdapter };
12
- //# sourceMappingURL=chunk-SUILH4ID.js.map
13
- //# sourceMappingURL=chunk-SUILH4ID.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/adapters/index.ts"],"names":[],"mappings":";AA2IO,SAAS,cAAc,OAAA,EAAwC;AAClE,EAAA,OAAO;AAAA,IACH,MAAM,OAAA,CAAQ,IAAA;AAAA,IACd,OAAO,OAAA,CAAQ,KAAA;AAAA,IACf,SAAS,OAAA,CAAQ,OAAA;AAAA,IACjB,UAAU,OAAA,CAAQ;AAAA,GACtB;AACJ","file":"chunk-SUILH4ID.js","sourcesContent":["/**\r\n * Flight Adapters - Universal deployment adapters\r\n * \r\n * Adapters transform Flight's output for different deployment targets.\r\n * The user chooses where to deploy - Flight provides the adapters.\r\n */\r\n\r\n// ============================================================================\r\n// Types\r\n// ============================================================================\r\n\r\n/** Build manifest containing all generated assets */\r\nexport interface BuildManifest {\r\n /** Entry points by name */\r\n entries: Record<string, string>;\r\n /** All generated files */\r\n files: string[];\r\n /** Route information */\r\n routes: RouteManifestEntry[];\r\n /** Server entry point (if applicable) */\r\n serverEntry?: string;\r\n /** Client entry point */\r\n clientEntry?: string;\r\n}\r\n\r\n/** Route information in manifest */\r\nexport interface RouteManifestEntry {\r\n /** Route path pattern */\r\n path: string;\r\n /** Render mode for this route */\r\n mode: 'ssr' | 'ssg' | 'csr' | 'isr';\r\n /** Component/handler file path */\r\n component: string;\r\n /** Pre-rendered paths (for SSG/ISR) */\r\n prerendered?: string[];\r\n}\r\n\r\n/** Builder utilities passed to adapters */\r\nexport interface AdapterBuilder {\r\n /** Build manifest */\r\n manifest: BuildManifest;\r\n /** Project root directory */\r\n root: string;\r\n /** Build output directory */\r\n outDir: string;\r\n\r\n /** Read a file from the build output */\r\n readFile(path: string): Promise<string>;\r\n /** Write a file to the adapter output */\r\n writeFile(path: string, content: string): Promise<void>;\r\n /** Copy files from build to adapter output */\r\n copy(from: string, to: string): Promise<void>;\r\n /** Get all files matching a pattern */\r\n glob(pattern: string): Promise<string[]>;\r\n /** Compress files for production */\r\n compress?(files: string[]): Promise<void>;\r\n\r\n /** Log info message */\r\n log: {\r\n info(message: string): void;\r\n warn(message: string): void;\r\n error(message: string): void;\r\n };\r\n}\r\n\r\n/** Flight adapter interface */\r\nexport interface FlightAdapter {\r\n /** Adapter name */\r\n name: string;\r\n\r\n /** \r\n * Transform the build output for the target platform\r\n * This is called after Flight's build process completes\r\n */\r\n adapt(builder: AdapterBuilder): Promise<void>;\r\n\r\n /**\r\n * Optional: Start listening for requests (for Node.js/Bun adapters)\r\n */\r\n listen?(server: unknown, port: number): Promise<void>;\r\n\r\n /**\r\n * Optional: Emulate the platform during development\r\n * Useful for testing platform-specific behavior locally\r\n */\r\n emulate?(): {\r\n /** Platform-specific env vars */\r\n env?: Record<string, string>;\r\n /** Custom middleware for dev server */\r\n middleware?: unknown[];\r\n };\r\n\r\n /**\r\n * Optional: Declare what this adapter supports\r\n * Flight uses this to warn about incompatible features\r\n */\r\n supports?: {\r\n /** Can read files at runtime (for dynamic content) */\r\n read?: () => boolean;\r\n /** Supports streaming responses */\r\n streaming?: () => boolean;\r\n /** Supports WebSockets */\r\n websockets?: () => boolean;\r\n /** Supports edge runtime */\r\n edge?: () => boolean;\r\n /** Supports Node.js runtime */\r\n node?: () => boolean;\r\n };\r\n}\r\n\r\n\r\n// ============================================================================\r\n// Adapter Factory Helper\r\n// ============================================================================\r\n\r\nexport interface AdapterOptions {\r\n name: string;\r\n adapt: (builder: AdapterBuilder) => Promise<void>;\r\n emulate?: FlightAdapter['emulate'];\r\n supports?: FlightAdapter['supports'];\r\n}\r\n\r\n/**\r\n * Create a Flight adapter\r\n * \r\n * @example\r\n * ```typescript\r\n * import { createAdapter } from '@flight-framework/core/adapters';\r\n * \r\n * export default function myAdapter(options = {}) {\r\n * return createAdapter({\r\n * name: 'my-adapter',\r\n * async adapt(builder) {\r\n * // Transform build output for your platform\r\n * },\r\n * });\r\n * }\r\n * ```\r\n */\r\nexport function createAdapter(options: AdapterOptions): FlightAdapter {\r\n return {\r\n name: options.name,\r\n adapt: options.adapt,\r\n emulate: options.emulate,\r\n supports: options.supports,\r\n };\r\n}\r\n\r\n// ============================================================================\r\n// Agnostic Service Adapters (Interfaces)\r\n// ============================================================================\r\n\r\n/**\r\n * Storage Adapter Interface\r\n * \r\n * Implement this to use any storage provider:\r\n * S3, Supabase Storage, Cloudflare R2, local filesystem, etc.\r\n */\r\nexport interface StorageAdapter {\r\n name: string;\r\n\r\n /** Upload a file */\r\n upload(path: string, data: Buffer | Uint8Array | string, options?: {\r\n contentType?: string;\r\n metadata?: Record<string, string>;\r\n }): Promise<{ url: string; path: string }>;\r\n\r\n /** Download a file */\r\n download(path: string): Promise<Buffer>;\r\n\r\n /** Delete a file */\r\n delete(path: string): Promise<void>;\r\n\r\n /** List files with optional prefix */\r\n list(prefix?: string): Promise<string[]>;\r\n\r\n /** Get a signed URL for direct access */\r\n getSignedUrl?(path: string, options?: {\r\n expiresIn?: number;\r\n operation?: 'read' | 'write';\r\n }): Promise<string>;\r\n}\r\n\r\n/**\r\n * Auth Adapter Interface\r\n * \r\n * Implement this to use any auth provider:\r\n * Better Auth, Supabase Auth, Lucia, Auth.js, etc.\r\n */\r\nexport interface AuthAdapter {\r\n name: string;\r\n\r\n /** Get the current user from a request */\r\n getUser(request: Request): Promise<AuthUser | null>;\r\n\r\n /** Verify a session token */\r\n verifySession(token: string): Promise<AuthSession | null>;\r\n\r\n /** Optional middleware for handling auth-specific routes (e.g., /api/auth/*) */\r\n middleware?: (req: Request) => Promise<Response | null>;\r\n}\r\n\r\nexport interface AuthUser {\r\n id: string;\r\n email?: string;\r\n name?: string;\r\n avatar?: string;\r\n metadata?: Record<string, unknown>;\r\n}\r\n\r\nexport interface AuthSession {\r\n user: AuthUser;\r\n expiresAt: Date;\r\n token: string;\r\n}\r\n\r\n/**\r\n * Email Adapter Interface\r\n * \r\n * Implement this to use any email provider:\r\n * Resend, SendGrid, Postmark, SMTP, etc.\r\n */\r\nexport interface EmailAdapter {\r\n name: string;\r\n\r\n /** Send an email */\r\n send(options: {\r\n to: string | string[];\r\n subject: string;\r\n html?: string;\r\n text?: string;\r\n from?: string;\r\n replyTo?: string;\r\n attachments?: Array<{\r\n filename: string;\r\n content: Buffer | string;\r\n contentType?: string;\r\n }>;\r\n }): Promise<{ id: string; success: boolean }>;\r\n}\r\n\r\n/**\r\n * Queue/Jobs Adapter Interface\r\n * \r\n * Implement this to use any job queue:\r\n * BullMQ, Quirrel, Inngest, custom, etc.\r\n */\r\nexport interface JobsAdapter {\r\n name: string;\r\n\r\n /** Add a job to the queue */\r\n enqueue<T>(jobName: string, data: T, options?: {\r\n delay?: number;\r\n priority?: number;\r\n retries?: number;\r\n }): Promise<{ id: string }>;\r\n\r\n /** Schedule a recurring job */\r\n schedule?(jobName: string, cron: string, data?: unknown): Promise<{ id: string }>;\r\n\r\n /** Cancel a job */\r\n cancel?(jobId: string): Promise<void>;\r\n}\r\n\r\n/**\r\n * Database Adapter Interface\r\n * \r\n * Note: This is intentionally minimal. \r\n * For databases, use your preferred ORM/query builder directly.\r\n * This interface is for Flight's internal use (sessions, cache, etc.)\r\n */\r\nexport interface DatabaseAdapter {\r\n name: string;\r\n\r\n /** Raw query execution */\r\n query<T = unknown>(sql: string, params?: unknown[]): Promise<T[]>;\r\n\r\n /** Execute a mutation */\r\n execute(sql: string, params?: unknown[]): Promise<{ rowsAffected: number }>;\r\n\r\n /** Transaction support */\r\n transaction?<T>(fn: (tx: DatabaseAdapter) => Promise<T>): Promise<T>;\r\n}\r\n"]}