-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
53 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/client-react-streaming/src/stream-utils/combined.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* TypeScript does not have the concept of these environments, | ||
* so we need to create a single entry point that combines all | ||
* possible exports. | ||
* That means that users will be offered "RSC" exports in a | ||
* "SSR/Browser" code file, but those will error in a compilation | ||
* step. | ||
* | ||
* This is a limitation of TypeScript, and we can't do anything | ||
* about it. | ||
* | ||
* The build process will only create `.d.ts`/`d.cts` files from | ||
* this, and not actual runtime code. | ||
*/ | ||
|
||
export * from "./index.ssr.js"; | ||
export * from "./index.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/client-react-streaming/src/stream-utils/index.shared.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export { | ||
JSONDecodeStream, | ||
JSONEncodeStream, | ||
type JsonString, | ||
} from "./JSONTransformStreams.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from "./index.js"; | ||
export * from "./index.shared.js"; | ||
export { createInjectionTransformStream } from "./createInjectionTransformStream.js"; | ||
export { pipeReaderToResponse } from "./pipeReaderToResponse.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
export { | ||
JSONDecodeStream, | ||
JSONEncodeStream, | ||
JsonString, | ||
} from "./JSONTransformStreams.js"; | ||
export * from "./index.shared.js"; |
2 changes: 2 additions & 0 deletions
2
packages/client-react-streaming/src/stream-utils/pipeReaderToResponse.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters