turbo-stream 2.2.0 → 2.2.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/dist/turbo-stream.js +4 -0
- package/dist/turbo-stream.mjs +4 -0
- package/package.json +1 -1
package/dist/turbo-stream.js
CHANGED
|
@@ -141,6 +141,8 @@ function encode(input, options) {
|
|
|
141
141
|
const id = flatten_js_1.flatten.call(encoder, resolved);
|
|
142
142
|
if (Array.isArray(id)) {
|
|
143
143
|
controller.enqueue(textEncoder.encode(`${utils_js_1.TYPE_PROMISE}${deferredId}:[["${utils_js_1.TYPE_PREVIOUS_RESOLVED}",${id[0]}]]\n`));
|
|
144
|
+
encoder.index++;
|
|
145
|
+
lastSentIndex++;
|
|
144
146
|
}
|
|
145
147
|
else if (id < 0) {
|
|
146
148
|
controller.enqueue(textEncoder.encode(`${utils_js_1.TYPE_PROMISE}${deferredId}:${id}\n`));
|
|
@@ -161,6 +163,8 @@ function encode(input, options) {
|
|
|
161
163
|
const id = flatten_js_1.flatten.call(encoder, reason);
|
|
162
164
|
if (Array.isArray(id)) {
|
|
163
165
|
controller.enqueue(textEncoder.encode(`${utils_js_1.TYPE_ERROR}${deferredId}:[["${utils_js_1.TYPE_PREVIOUS_RESOLVED}",${id[0]}]]\n`));
|
|
166
|
+
encoder.index++;
|
|
167
|
+
lastSentIndex++;
|
|
164
168
|
}
|
|
165
169
|
else if (id < 0) {
|
|
166
170
|
controller.enqueue(textEncoder.encode(`${utils_js_1.TYPE_ERROR}${deferredId}:${id}\n`));
|
package/dist/turbo-stream.mjs
CHANGED
|
@@ -452,6 +452,8 @@ function encode(input, options) {
|
|
|
452
452
|
`
|
|
453
453
|
)
|
|
454
454
|
);
|
|
455
|
+
encoder.index++;
|
|
456
|
+
lastSentIndex++;
|
|
455
457
|
} else if (id2 < 0) {
|
|
456
458
|
controller.enqueue(
|
|
457
459
|
textEncoder.encode(`${TYPE_PROMISE}${deferredId}:${id2}
|
|
@@ -480,6 +482,8 @@ function encode(input, options) {
|
|
|
480
482
|
`
|
|
481
483
|
)
|
|
482
484
|
);
|
|
485
|
+
encoder.index++;
|
|
486
|
+
lastSentIndex++;
|
|
483
487
|
} else if (id2 < 0) {
|
|
484
488
|
controller.enqueue(
|
|
485
489
|
textEncoder.encode(`${TYPE_ERROR}${deferredId}:${id2}
|
package/package.json
CHANGED