vovk 3.0.0-draft.457 → 3.0.0-draft.459
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.
|
@@ -100,9 +100,6 @@ const defaultStreamHandler = ({ response, abortController, }) => {
|
|
|
100
100
|
subscribers.delete(cb);
|
|
101
101
|
};
|
|
102
102
|
},
|
|
103
|
-
abort: (reason) => {
|
|
104
|
-
return abortController.abort(reason ?? 'Stream aborted intentionally');
|
|
105
|
-
},
|
|
106
103
|
};
|
|
107
104
|
};
|
|
108
105
|
exports.defaultStreamHandler = defaultStreamHandler;
|
package/cjs/client/types.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ export type VovkStreamAsyncIterable<T> = {
|
|
|
34
34
|
[Symbol.asyncDispose](): Promise<void> | void;
|
|
35
35
|
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
36
36
|
onIterate: (cb: (data: T, i: number) => void) => () => void;
|
|
37
|
-
abort: () => Promise<void> | void;
|
|
38
37
|
abortController: AbortController;
|
|
39
38
|
};
|
|
40
39
|
type StaticMethodReturn<T extends ControllerStaticMethod> = ReturnType<T> extends NextResponse<infer U> | Promise<NextResponse<infer U>> ? U : ReturnType<T> extends Response | Promise<Response> ? Awaited<ReturnType<T>> : ReturnType<T>;
|
|
@@ -39,9 +39,9 @@ function withValidationLibrary({ isForm, disableServerSideValidation, skipSchema
|
|
|
39
39
|
// Return a brand-new async generator that yields validated items
|
|
40
40
|
return (async function* () {
|
|
41
41
|
let i = 0;
|
|
42
|
-
for await (
|
|
42
|
+
for await (const item of data) {
|
|
43
43
|
if (validateEachIteration || i === 0) {
|
|
44
|
-
|
|
44
|
+
await validate(item, iteration, { type: 'iteration', req, status: 200, i });
|
|
45
45
|
}
|
|
46
46
|
i++;
|
|
47
47
|
yield item;
|
|
@@ -100,9 +100,6 @@ const defaultStreamHandler = ({ response, abortController, }) => {
|
|
|
100
100
|
subscribers.delete(cb);
|
|
101
101
|
};
|
|
102
102
|
},
|
|
103
|
-
abort: (reason) => {
|
|
104
|
-
return abortController.abort(reason ?? 'Stream aborted intentionally');
|
|
105
|
-
},
|
|
106
103
|
};
|
|
107
104
|
};
|
|
108
105
|
exports.defaultStreamHandler = defaultStreamHandler;
|
package/mjs/client/types.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ export type VovkStreamAsyncIterable<T> = {
|
|
|
34
34
|
[Symbol.asyncDispose](): Promise<void> | void;
|
|
35
35
|
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
36
36
|
onIterate: (cb: (data: T, i: number) => void) => () => void;
|
|
37
|
-
abort: () => Promise<void> | void;
|
|
38
37
|
abortController: AbortController;
|
|
39
38
|
};
|
|
40
39
|
type StaticMethodReturn<T extends ControllerStaticMethod> = ReturnType<T> extends NextResponse<infer U> | Promise<NextResponse<infer U>> ? U : ReturnType<T> extends Response | Promise<Response> ? Awaited<ReturnType<T>> : ReturnType<T>;
|
|
@@ -39,9 +39,9 @@ function withValidationLibrary({ isForm, disableServerSideValidation, skipSchema
|
|
|
39
39
|
// Return a brand-new async generator that yields validated items
|
|
40
40
|
return (async function* () {
|
|
41
41
|
let i = 0;
|
|
42
|
-
for await (
|
|
42
|
+
for await (const item of data) {
|
|
43
43
|
if (validateEachIteration || i === 0) {
|
|
44
|
-
|
|
44
|
+
await validate(item, iteration, { type: 'iteration', req, status: 200, i });
|
|
45
45
|
}
|
|
46
46
|
i++;
|
|
47
47
|
yield item;
|