@flight-framework/core 0.6.5 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +541 -541
  3. package/dist/actions/index.d.ts +1 -58
  4. package/dist/actions/index.js +1 -1
  5. package/dist/adapters/index.js +1 -1
  6. package/dist/cache/index.js +1 -1
  7. package/dist/{chunk-FSJNOPYE.js → chunk-2JVEH76V.js} +3 -3
  8. package/dist/chunk-2JVEH76V.js.map +1 -0
  9. package/dist/{chunk-VPFMHGEV.js → chunk-3N5ZBVZJ.js} +2 -2
  10. package/dist/chunk-3N5ZBVZJ.js.map +1 -0
  11. package/dist/{chunk-2F2QU6RC.js → chunk-3UQJE3XZ.js} +2 -2
  12. package/dist/chunk-3UQJE3XZ.js.map +1 -0
  13. package/dist/{chunk-3KRBRSRJ.js → chunk-4U7CJVNQ.js} +2 -2
  14. package/dist/chunk-4U7CJVNQ.js.map +1 -0
  15. package/dist/{chunk-PDW5WCMW.js → chunk-5XHOLZBJ.js} +2 -2
  16. package/dist/chunk-5XHOLZBJ.js.map +1 -0
  17. package/dist/{chunk-MDQNNIHH.js → chunk-65JYF3DJ.js} +2 -2
  18. package/dist/chunk-65JYF3DJ.js.map +1 -0
  19. package/dist/{chunk-K2CQZPCG.js → chunk-6GI6HFSQ.js} +2 -2
  20. package/dist/chunk-6GI6HFSQ.js.map +1 -0
  21. package/dist/{chunk-LNV47HGV.js → chunk-6IG6XIXU.js} +2 -2
  22. package/dist/chunk-6IG6XIXU.js.map +1 -0
  23. package/dist/{chunk-PVUMB632.js → chunk-A2QRUBVE.js} +2 -2
  24. package/dist/chunk-A2QRUBVE.js.map +1 -0
  25. package/dist/{chunk-W6D62JCI.js → chunk-A4TKWQBU.js} +2 -2
  26. package/dist/chunk-A4TKWQBU.js.map +1 -0
  27. package/dist/{chunk-GCQZ4FHI.js → chunk-ARBKF6VI.js} +2 -2
  28. package/dist/{chunk-GCQZ4FHI.js.map → chunk-ARBKF6VI.js.map} +1 -1
  29. package/dist/{chunk-ZVC3ZWLM.js → chunk-B2LPSCES.js} +2 -2
  30. package/dist/chunk-B2LPSCES.js.map +1 -0
  31. package/dist/{chunk-62C7LX2E.js → chunk-CKJHJPKQ.js} +2 -2
  32. package/dist/chunk-CKJHJPKQ.js.map +1 -0
  33. package/dist/{chunk-RSVA2EYO.js → chunk-CNY3ZUVG.js} +2 -2
  34. package/dist/chunk-CNY3ZUVG.js.map +1 -0
  35. package/dist/{chunk-IXMD5QH2.js → chunk-EHVUAFNH.js} +2 -2
  36. package/dist/chunk-EHVUAFNH.js.map +1 -0
  37. package/dist/{chunk-P6WSBVDT.js → chunk-FRAH5QNY.js} +4 -4
  38. package/dist/chunk-FRAH5QNY.js.map +1 -0
  39. package/dist/{chunk-MQQLYWZZ.js → chunk-GNS2FGPC.js} +2 -2
  40. package/dist/chunk-GNS2FGPC.js.map +1 -0
  41. package/dist/{chunk-TASAT7KB.js → chunk-HNPO6LFW.js} +2 -2
  42. package/dist/chunk-HNPO6LFW.js.map +1 -0
  43. package/dist/{chunk-EGB7C73X.js → chunk-KDEA64UX.js} +5 -5
  44. package/dist/chunk-KDEA64UX.js.map +1 -0
  45. package/dist/{chunk-NWMJYTMB.js → chunk-LAKHYTHL.js} +3 -3
  46. package/dist/chunk-LAKHYTHL.js.map +1 -0
  47. package/dist/{chunk-R7SQAREQ.js → chunk-LKOPJ3GS.js} +2 -2
  48. package/dist/chunk-LKOPJ3GS.js.map +1 -0
  49. package/dist/{chunk-WOEIJWGJ.js → chunk-NZS2YJ43.js} +2 -2
  50. package/dist/chunk-NZS2YJ43.js.map +1 -0
  51. package/dist/{chunk-XGP3C2ZE.js → chunk-OZ3EXPLE.js} +4 -112
  52. package/dist/chunk-OZ3EXPLE.js.map +1 -0
  53. package/dist/{chunk-YHEVHRLH.js → chunk-OZBPR27I.js} +2 -2
  54. package/dist/chunk-OZBPR27I.js.map +1 -0
  55. package/dist/{chunk-T4Z4HM4W.js → chunk-PAVI5W6M.js} +3 -3
  56. package/dist/chunk-PAVI5W6M.js.map +1 -0
  57. package/dist/chunk-PL37KFRJ.js +3 -0
  58. package/dist/chunk-PL37KFRJ.js.map +1 -0
  59. package/dist/{chunk-XSY5AAXT.js → chunk-PO7IHPFF.js} +2 -2
  60. package/dist/chunk-PO7IHPFF.js.map +1 -0
  61. package/dist/{chunk-OYF2OAKS.js → chunk-R7MEVVA4.js} +2 -2
  62. package/dist/chunk-R7MEVVA4.js.map +1 -0
  63. package/dist/{chunk-WFAWAHJH.js → chunk-UFWGOJL7.js} +2 -2
  64. package/dist/chunk-UFWGOJL7.js.map +1 -0
  65. package/dist/{chunk-XOIYNY4I.js → chunk-VNO2YUVD.js} +2 -2
  66. package/dist/chunk-VNO2YUVD.js.map +1 -0
  67. package/dist/{chunk-ZIE56LCA.js → chunk-XU6MRYG2.js} +3 -3
  68. package/dist/chunk-XU6MRYG2.js.map +1 -0
  69. package/dist/{chunk-6BDCTUQY.js → chunk-YNTMYL36.js} +3 -3
  70. package/dist/chunk-YNTMYL36.js.map +1 -0
  71. package/dist/{chunk-77MJZCYD.js → chunk-ZQS3WBE7.js} +2 -2
  72. package/dist/chunk-ZQS3WBE7.js.map +1 -0
  73. package/dist/client.d.ts +1 -1
  74. package/dist/client.js +9 -9
  75. package/dist/client.js.map +1 -1
  76. package/dist/config/index.js +1 -1
  77. package/dist/errors/index.js +2 -2
  78. package/dist/file-router/index.js +1 -1
  79. package/dist/file-router/streaming-hints.js +1 -1
  80. package/dist/handlers/index.js +1 -1
  81. package/dist/index.d.ts +1 -3
  82. package/dist/index.js +31 -31
  83. package/dist/index.js.map +1 -1
  84. package/dist/islands/index.js +1 -1
  85. package/dist/middleware/index.js +1 -1
  86. package/dist/react/index.js +2 -2
  87. package/dist/react/index.js.map +1 -1
  88. package/dist/render/index.js +1 -1
  89. package/dist/router/index.js +1 -1
  90. package/dist/rsc/adapters/index.js +4 -4
  91. package/dist/rsc/adapters/preact.js +1 -1
  92. package/dist/rsc/adapters/react.js +1 -1
  93. package/dist/rsc/adapters/solid.js +1 -1
  94. package/dist/rsc/adapters/vue.js +1 -1
  95. package/dist/rsc/boundaries.js +1 -1
  96. package/dist/rsc/context.js +1 -1
  97. package/dist/rsc/index.js +11 -11
  98. package/dist/rsc/legacy.js +1 -1
  99. package/dist/rsc/payload.js +1 -1
  100. package/dist/rsc/plugins/esbuild.js +2 -2
  101. package/dist/rsc/plugins/index.js +4 -4
  102. package/dist/rsc/plugins/rollup.js +2 -2
  103. package/dist/rsc/renderer.js +3 -3
  104. package/dist/rsc/stream.js +1 -1
  105. package/dist/rsc/vite-plugin.js +2 -2
  106. package/dist/server/index.js +4 -4
  107. package/dist/streaming/adapters/index.js +1 -1
  108. package/dist/streaming/conditional.js +1 -1
  109. package/dist/streaming/index.js +1 -1
  110. package/dist/streaming/observability.js +2 -2
  111. package/dist/streaming/priority.js +1 -1
  112. package/dist/utils/index.d.ts +28 -83
  113. package/dist/utils/index.js +2 -2
  114. package/package.json +225 -235
  115. package/dist/chunk-2F2QU6RC.js.map +0 -1
  116. package/dist/chunk-3KRBRSRJ.js.map +0 -1
  117. package/dist/chunk-62C7LX2E.js.map +0 -1
  118. package/dist/chunk-6BDCTUQY.js.map +0 -1
  119. package/dist/chunk-77MJZCYD.js.map +0 -1
  120. package/dist/chunk-EGB7C73X.js.map +0 -1
  121. package/dist/chunk-FSJNOPYE.js.map +0 -1
  122. package/dist/chunk-IXMD5QH2.js.map +0 -1
  123. package/dist/chunk-J7WEZXWH.js +0 -14
  124. package/dist/chunk-J7WEZXWH.js.map +0 -1
  125. package/dist/chunk-K2CQZPCG.js.map +0 -1
  126. package/dist/chunk-LNV47HGV.js.map +0 -1
  127. package/dist/chunk-MDQNNIHH.js.map +0 -1
  128. package/dist/chunk-MFUJN7RV.js +0 -20
  129. package/dist/chunk-MFUJN7RV.js.map +0 -1
  130. package/dist/chunk-MQQLYWZZ.js.map +0 -1
  131. package/dist/chunk-NWMJYTMB.js.map +0 -1
  132. package/dist/chunk-OYF2OAKS.js.map +0 -1
  133. package/dist/chunk-P6WSBVDT.js.map +0 -1
  134. package/dist/chunk-PDW5WCMW.js.map +0 -1
  135. package/dist/chunk-PVUMB632.js.map +0 -1
  136. package/dist/chunk-R7SQAREQ.js.map +0 -1
  137. package/dist/chunk-RSVA2EYO.js.map +0 -1
  138. package/dist/chunk-T4Z4HM4W.js.map +0 -1
  139. package/dist/chunk-TASAT7KB.js.map +0 -1
  140. package/dist/chunk-VPFMHGEV.js.map +0 -1
  141. package/dist/chunk-W6D62JCI.js.map +0 -1
  142. package/dist/chunk-WF46NESN.js +0 -67
  143. package/dist/chunk-WF46NESN.js.map +0 -1
  144. package/dist/chunk-WFAWAHJH.js.map +0 -1
  145. package/dist/chunk-WOEIJWGJ.js.map +0 -1
  146. package/dist/chunk-XGP3C2ZE.js.map +0 -1
  147. package/dist/chunk-XOIYNY4I.js.map +0 -1
  148. package/dist/chunk-XSY5AAXT.js.map +0 -1
  149. package/dist/chunk-YHEVHRLH.js.map +0 -1
  150. package/dist/chunk-ZIE56LCA.js.map +0 -1
  151. package/dist/chunk-ZVC3ZWLM.js.map +0 -1
  152. package/dist/env-9do2c6yn.d.ts +0 -42
  153. package/dist/plugins/env-plugin.d.ts +0 -47
  154. package/dist/plugins/env-plugin.js +0 -3
  155. package/dist/plugins/env-plugin.js.map +0 -1
  156. package/dist/plugins/index.d.ts +0 -221
  157. package/dist/plugins/index.js +0 -192
  158. package/dist/plugins/index.js.map +0 -1
  159. package/dist/plugins/server-boundary-plugin.d.ts +0 -40
  160. package/dist/plugins/server-boundary-plugin.js +0 -3
  161. package/dist/plugins/server-boundary-plugin.js.map +0 -1
package/dist/rsc/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import '../chunk-63SCEXD7.js';
2
2
  import '../chunk-Y22AMGTM.js';
3
- export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../chunk-TASAT7KB.js';
4
- import '../chunk-2F2QU6RC.js';
5
- import '../chunk-VPFMHGEV.js';
6
- import '../chunk-MDQNNIHH.js';
7
- export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-62C7LX2E.js';
8
- export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-PVUMB632.js';
9
- export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-P6WSBVDT.js';
10
- export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-K2CQZPCG.js';
11
- export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary } from '../chunk-LNV47HGV.js';
12
- export { flightRSC } from '../chunk-ZIE56LCA.js';
13
- export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-PDW5WCMW.js';
3
+ export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../chunk-HNPO6LFW.js';
4
+ import '../chunk-3UQJE3XZ.js';
5
+ import '../chunk-3N5ZBVZJ.js';
6
+ import '../chunk-65JYF3DJ.js';
7
+ export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-CKJHJPKQ.js';
8
+ export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-A2QRUBVE.js';
9
+ export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-FRAH5QNY.js';
10
+ export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-6GI6HFSQ.js';
11
+ export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary } from '../chunk-6IG6XIXU.js';
12
+ export { flightRSC } from '../chunk-XU6MRYG2.js';
13
+ export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-5XHOLZBJ.js';
14
14
  //# sourceMappingURL=index.js.map
15
15
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary } from '../chunk-LNV47HGV.js';
1
+ export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary } from '../chunk-6IG6XIXU.js';
2
2
  //# sourceMappingURL=legacy.js.map
3
3
  //# sourceMappingURL=legacy.js.map
@@ -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-K2CQZPCG.js';
1
+ export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-6GI6HFSQ.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-T4Z4HM4W.js';
2
- import '../../chunk-PDW5WCMW.js';
1
+ export { esbuild_default as default, flightRSCEsbuild } from '../../chunk-PAVI5W6M.js';
2
+ import '../../chunk-5XHOLZBJ.js';
3
3
  //# sourceMappingURL=esbuild.js.map
4
4
  //# sourceMappingURL=esbuild.js.map
@@ -1,6 +1,6 @@
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';
1
+ export { flightRSCEsbuild } from '../../chunk-PAVI5W6M.js';
2
+ export { flightRSCRollup } from '../../chunk-LAKHYTHL.js';
3
+ export { flightRSC as flightRSCVite } from '../../chunk-XU6MRYG2.js';
4
+ import '../../chunk-5XHOLZBJ.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-NWMJYTMB.js';
2
- import '../../chunk-PDW5WCMW.js';
1
+ export { rollup_default as default, flightRSCRollup } from '../../chunk-LAKHYTHL.js';
2
+ import '../../chunk-5XHOLZBJ.js';
3
3
  //# sourceMappingURL=rollup.js.map
4
4
  //# sourceMappingURL=rollup.js.map
@@ -1,5 +1,5 @@
1
- export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-P6WSBVDT.js';
2
- import '../chunk-K2CQZPCG.js';
3
- import '../chunk-PDW5WCMW.js';
1
+ export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-FRAH5QNY.js';
2
+ import '../chunk-6GI6HFSQ.js';
3
+ import '../chunk-5XHOLZBJ.js';
4
4
  //# sourceMappingURL=renderer.js.map
5
5
  //# sourceMappingURL=renderer.js.map
@@ -1,3 +1,3 @@
1
- export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-PVUMB632.js';
1
+ export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-A2QRUBVE.js';
2
2
  //# sourceMappingURL=stream.js.map
3
3
  //# sourceMappingURL=stream.js.map
@@ -1,4 +1,4 @@
1
- export { vite_plugin_default as default, flightRSC } from '../chunk-ZIE56LCA.js';
2
- import '../chunk-PDW5WCMW.js';
1
+ export { vite_plugin_default as default, flightRSC } from '../chunk-XU6MRYG2.js';
2
+ import '../chunk-5XHOLZBJ.js';
3
3
  //# sourceMappingURL=vite-plugin.js.map
4
4
  //# sourceMappingURL=vite-plugin.js.map
@@ -1,6 +1,6 @@
1
- export { createServer, getRuntime, isFlightServer } from '../chunk-EGB7C73X.js';
2
- import '../chunk-OYF2OAKS.js';
3
- import '../chunk-IXMD5QH2.js';
4
- import '../chunk-GCQZ4FHI.js';
1
+ export { createServer, getRuntime, isFlightServer } from '../chunk-KDEA64UX.js';
2
+ import '../chunk-R7MEVVA4.js';
3
+ import '../chunk-EHVUAFNH.js';
4
+ import '../chunk-ARBKF6VI.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-MQQLYWZZ.js';
1
+ export { createHTMXStreamAdapter, createReactStreamAdapter, createSolidStreamAdapter, createStreamAdapter, createSvelteStreamAdapter, createVueStreamAdapter } from '../../chunk-GNS2FGPC.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-XOIYNY4I.js';
1
+ export { DEFAULT_BOT_PATTERNS, addStreamingHeaders, createConditionalStreamer, createStaticResponse, createStreamingResponse, isBot, isSlowConnection, prefersNoStream, streamIf, supportsStreaming } from '../chunk-VNO2YUVD.js';
2
2
  //# sourceMappingURL=conditional.js.map
3
3
  //# sourceMappingURL=conditional.js.map
@@ -1,3 +1,3 @@
1
- export { createLazyContent, createStreamingResponse, createStreamingSSR, renderWithStreaming, streamParallel, streamSequential } from '../chunk-RSVA2EYO.js';
1
+ export { createLazyContent, createStreamingResponse, createStreamingSSR, renderWithStreaming, streamParallel, streamSequential } from '../chunk-CNY3ZUVG.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-6BDCTUQY.js';
2
- import '../chunk-RSVA2EYO.js';
1
+ export { MetricsAggregator, createHttpObserver, createInstrumentedStream, createLoggerObserver } from '../chunk-YNTMYL36.js';
2
+ import '../chunk-CNY3ZUVG.js';
3
3
  //# sourceMappingURL=observability.js.map
4
4
  //# sourceMappingURL=observability.js.map
@@ -1,3 +1,3 @@
1
- export { streamWithPriority, validateDependencies } from '../chunk-WOEIJWGJ.js';
1
+ export { streamWithPriority, validateDependencies } from '../chunk-NZS2YJ43.js';
2
2
  //# sourceMappingURL=priority.js.map
3
3
  //# sourceMappingURL=priority.js.map
@@ -1,97 +1,42 @@
1
- export { g as getEnvironment, d as isBrowser, a as isDevelopment, i as isProduction, c as isServer, b as isTest } from '../env-9do2c6yn.js';
2
-
3
1
  /**
4
- * @flight-framework/core - Server/Client Boundaries
5
- *
6
- * Runtime utilities for server/client code separation.
7
- * These are OPTIONAL - use them if you want safety guards.
8
- * Flight doesn't force you to use them.
9
- *
10
- * @example
11
- * ```typescript
12
- * import { assertServer, getEnv } from '@flight-framework/core';
2
+ * @flight-framework/core - Environment Utilities
13
3
  *
14
- * export async function fetchFromDatabase() {
15
- * assertServer('fetchFromDatabase'); // Throws if called on client
16
- * const dbUrl = getEnv('DATABASE_URL'); // Returns undefined on client
17
- * // ... your code
18
- * }
19
- * ```
4
+ * Environment detection utilities that work across Node.js, browsers, and edge runtimes.
5
+ * No hardcoded values - detects environment dynamically.
20
6
  */
21
7
  /**
22
- * Assert that code is running on the server.
23
- * Throws an error if called from the client (browser).
24
- *
25
- * Use this to protect server-only code from being accidentally
26
- * called on the client.
27
- *
28
- * @param context - Optional context string for the error message
29
- * @throws Error if called on client
8
+ * Check if running in production environment.
30
9
  *
31
- * @example
32
- * ```typescript
33
- * export async function queryDatabase() {
34
- * assertServer('queryDatabase');
35
- * // Safe to use process.env, database connections, etc.
36
- * }
37
- * ```
10
+ * Detection order:
11
+ * 1. Node.js process.env.NODE_ENV
12
+ * 2. Vite/modern bundlers import.meta.env.MODE or import.meta.env.PROD
13
+ * 3. Default: false (not production)
38
14
  */
39
- declare function assertServer(context?: string): void;
15
+ declare function isProduction(): boolean;
40
16
  /**
41
- * Assert that code is running on the client.
42
- * Throws an error if called from the server.
17
+ * Check if running in development environment.
43
18
  *
44
- * Use this to protect client-only code (e.g., DOM manipulation,
45
- * browser APIs) from being accidentally called during SSR.
46
- *
47
- * @param context - Optional context string for the error message
48
- * @throws Error if called on server
49
- *
50
- * @example
51
- * ```typescript
52
- * export function scrollToTop() {
53
- * assertClient('scrollToTop');
54
- * window.scrollTo(0, 0);
55
- * }
56
- * ```
19
+ * Detection order:
20
+ * 1. Node.js process.env.NODE_ENV
21
+ * 2. Vite/modern bundlers import.meta.env.MODE or import.meta.env.DEV
22
+ * 3. Default: true (assume development if unknown)
57
23
  */
58
- declare function assertClient(context?: string): void;
24
+ declare function isDevelopment(): boolean;
59
25
  /**
60
- * Get an environment variable safely.
61
- *
62
- * On the server: Returns the variable value.
63
- * On the client: Returns undefined for non-public vars.
64
- *
65
- * Public variables (prefixed with FLIGHT_PUBLIC_) are always accessible.
66
- *
67
- * @param key - Environment variable name
68
- * @returns The value or undefined
69
- *
70
- * @example
71
- * ```typescript
72
- * // On server: returns actual value
73
- * // On client: returns undefined (safe!)
74
- * const dbUrl = getEnv('DATABASE_URL');
75
- *
76
- * // Works on both server and client
77
- * const apiUrl = getEnv('FLIGHT_PUBLIC_API_URL');
78
- * ```
26
+ * Check if running in test environment.
79
27
  */
80
- declare function getEnv(key: string): string | undefined;
28
+ declare function isTest(): boolean;
81
29
  /**
82
- * Get an environment variable, throwing if not found.
83
- * Use this when a variable is required.
84
- *
85
- * @param key - Environment variable name
86
- * @returns The value
87
- * @throws Error if variable is not set or inaccessible
88
- *
89
- * @example
90
- * ```typescript
91
- * // Throws if DATABASE_URL is not set
92
- * const dbUrl = requireEnv('DATABASE_URL');
93
- * ```
30
+ * Check if running on the server (not browser).
31
+ */
32
+ declare function isServer(): boolean;
33
+ /**
34
+ * Check if running in the browser.
35
+ */
36
+ declare function isBrowser(): boolean;
37
+ /**
38
+ * Get the current environment name.
94
39
  */
95
- declare function requireEnv(key: string): string;
40
+ declare function getEnvironment(): 'production' | 'development' | 'test' | 'unknown';
96
41
 
97
- export { assertClient, assertServer, getEnv, requireEnv };
42
+ export { getEnvironment, isBrowser, isDevelopment, isProduction, isServer, isTest };
@@ -1,4 +1,4 @@
1
- export { assertClient, assertServer, getEnv, requireEnv } from '../chunk-WF46NESN.js';
2
- export { getEnvironment, isBrowser, isDevelopment, isProduction, isServer, isTest } from '../chunk-YHEVHRLH.js';
1
+ import '../chunk-PL37KFRJ.js';
2
+ export { getEnvironment, isBrowser, isDevelopment, isProduction, isServer, isTest } from '../chunk-OZBPR27I.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map