@fictjs/ssr 0.19.0 → 0.20.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/README.md +19 -0
- package/dist/chunk-DI4PFT6R.js +11 -0
- package/dist/fict-stream-runtime.js +1 -0
- package/dist/index.cjs +383 -67
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +382 -67
- package/dist/stream-runtime.cjs +36 -0
- package/dist/stream-runtime.d.cts +16 -0
- package/dist/stream-runtime.d.ts +16 -0
- package/dist/stream-runtime.js +8 -0
- package/package.json +14 -6
package/dist/index.d.cts
CHANGED
|
@@ -76,6 +76,10 @@ interface RenderToStringOptions {
|
|
|
76
76
|
* Defaults to 'container'.
|
|
77
77
|
*/
|
|
78
78
|
snapshotTarget?: 'container' | 'body' | 'head';
|
|
79
|
+
/**
|
|
80
|
+
* Nonce applied to generated <script> tags for CSP compatibility.
|
|
81
|
+
*/
|
|
82
|
+
scriptNonce?: string;
|
|
79
83
|
}
|
|
80
84
|
interface RenderToStreamOptions extends RenderToStringOptions {
|
|
81
85
|
/**
|
|
@@ -100,6 +104,20 @@ interface RenderToStreamOptions extends RenderToStringOptions {
|
|
|
100
104
|
* Abort signal to cancel the stream.
|
|
101
105
|
*/
|
|
102
106
|
signal?: AbortSignal;
|
|
107
|
+
/**
|
|
108
|
+
* How to load the streaming patch runtime.
|
|
109
|
+
* Defaults to 'inline'. Use 'external' with streamRuntimeSrc for strict CSP.
|
|
110
|
+
*/
|
|
111
|
+
streamRuntime?: 'inline' | 'external';
|
|
112
|
+
/**
|
|
113
|
+
* External streaming patch runtime URL when streamRuntime is 'external'.
|
|
114
|
+
*/
|
|
115
|
+
streamRuntimeSrc?: string;
|
|
116
|
+
/**
|
|
117
|
+
* How resolved Suspense patch chunks are applied.
|
|
118
|
+
* Defaults to 'inline' for inline runtimes and 'observer' for external runtimes.
|
|
119
|
+
*/
|
|
120
|
+
streamPatchMode?: 'inline' | 'observer';
|
|
103
121
|
}
|
|
104
122
|
interface PipeableStream {
|
|
105
123
|
pipe: (writable: NodeJS.WritableStream) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -76,6 +76,10 @@ interface RenderToStringOptions {
|
|
|
76
76
|
* Defaults to 'container'.
|
|
77
77
|
*/
|
|
78
78
|
snapshotTarget?: 'container' | 'body' | 'head';
|
|
79
|
+
/**
|
|
80
|
+
* Nonce applied to generated <script> tags for CSP compatibility.
|
|
81
|
+
*/
|
|
82
|
+
scriptNonce?: string;
|
|
79
83
|
}
|
|
80
84
|
interface RenderToStreamOptions extends RenderToStringOptions {
|
|
81
85
|
/**
|
|
@@ -100,6 +104,20 @@ interface RenderToStreamOptions extends RenderToStringOptions {
|
|
|
100
104
|
* Abort signal to cancel the stream.
|
|
101
105
|
*/
|
|
102
106
|
signal?: AbortSignal;
|
|
107
|
+
/**
|
|
108
|
+
* How to load the streaming patch runtime.
|
|
109
|
+
* Defaults to 'inline'. Use 'external' with streamRuntimeSrc for strict CSP.
|
|
110
|
+
*/
|
|
111
|
+
streamRuntime?: 'inline' | 'external';
|
|
112
|
+
/**
|
|
113
|
+
* External streaming patch runtime URL when streamRuntime is 'external'.
|
|
114
|
+
*/
|
|
115
|
+
streamRuntimeSrc?: string;
|
|
116
|
+
/**
|
|
117
|
+
* How resolved Suspense patch chunks are applied.
|
|
118
|
+
* Defaults to 'inline' for inline runtimes and 'observer' for external runtimes.
|
|
119
|
+
*/
|
|
120
|
+
streamPatchMode?: 'inline' | 'observer';
|
|
103
121
|
}
|
|
104
122
|
interface PipeableStream {
|
|
105
123
|
pipe: (writable: NodeJS.WritableStream) => void;
|