@orpc/shared 2.0.0-beta.46 → 2.0.0-beta.48

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 (49) hide show
  1. package/README.md +6 -4
  2. package/dist/args.d.mts +2 -0
  3. package/dist/args.mjs +3 -0
  4. package/dist/array.d.mts +2 -0
  5. package/dist/array.mjs +7 -0
  6. package/dist/bigint.d.mts +9 -0
  7. package/dist/bigint.mjs +12 -0
  8. package/dist/buffer.d.mts +18 -0
  9. package/dist/buffer.mjs +66 -0
  10. package/dist/compare.d.mts +1 -0
  11. package/dist/compare.mjs +43 -0
  12. package/dist/consts.d.mts +1 -0
  13. package/dist/consts.mjs +1 -0
  14. package/dist/error.d.mts +1 -0
  15. package/dist/error.mjs +3 -0
  16. package/dist/function.d.mts +12 -0
  17. package/dist/function.mjs +31 -0
  18. package/dist/http.d.mts +29 -0
  19. package/dist/http.mjs +83 -0
  20. package/dist/id.d.mts +8 -0
  21. package/dist/id.mjs +7 -0
  22. package/dist/index.d.mts +25 -492
  23. package/dist/index.mjs +23 -1117
  24. package/dist/interceptor.d.mts +96 -0
  25. package/dist/interceptor.mjs +102 -0
  26. package/dist/iterator.d.mts +82 -0
  27. package/dist/iterator.mjs +151 -0
  28. package/dist/object.d.mts +64 -0
  29. package/dist/object.mjs +221 -0
  30. package/dist/plugin.d.mts +12 -0
  31. package/dist/plugin.mjs +58 -0
  32. package/dist/promise.d.mts +17 -0
  33. package/dist/promise.mjs +23 -0
  34. package/dist/proxy.d.mts +15 -0
  35. package/dist/proxy.mjs +15 -0
  36. package/dist/queue.d.mts +16 -0
  37. package/dist/queue.mjs +74 -0
  38. package/dist/signal.d.mts +13 -0
  39. package/dist/signal.mjs +74 -0
  40. package/dist/stream.d.mts +54 -0
  41. package/dist/stream.mjs +138 -0
  42. package/dist/tracing.d.mts +73 -0
  43. package/dist/tracing.mjs +89 -0
  44. package/dist/types.d.mts +32 -0
  45. package/dist/types.mjs +1 -0
  46. package/dist/value.d.mts +8 -0
  47. package/dist/value.mjs +6 -0
  48. package/package.json +3 -4
  49. package/dist/index.d.ts +0 -492
@@ -0,0 +1,221 @@
1
+ import { getOrBind, isTypescriptObject } from "@standard-server/shared";
2
+ export function findDeepMatches(check, payload, segments = [], maps = [], values = []) {
3
+ if (check(payload)) {
4
+ maps.push(segments);
5
+ values.push(payload);
6
+ } else if (Array.isArray(payload)) {
7
+ payload.forEach((v, i) => {
8
+ findDeepMatches(check, v, [...segments, i], maps, values);
9
+ });
10
+ } else if (isPlainObject(payload)) {
11
+ for (const key of Object.keys(payload)) {
12
+ findDeepMatches(check, payload[key], [...segments, key], maps, values);
13
+ }
14
+ }
15
+ return {
16
+ maps,
17
+ values
18
+ };
19
+ }
20
+
21
+ export function getConstructor(value) {
22
+
23
+ if (!isTypescriptObject(value)) {
24
+ return null;
25
+ }
26
+ return Object.getPrototypeOf(value)?.constructor;
27
+ }
28
+ export function* getConstructors(value) {
29
+ if (!isTypescriptObject(value)) {
30
+ return;
31
+ }
32
+ let proto = Object.getPrototypeOf(value);
33
+ while (proto != null) {
34
+ if (proto.constructor) {
35
+ yield proto.constructor;
36
+ }
37
+ proto = Object.getPrototypeOf(proto);
38
+ }
39
+ }
40
+
41
+ export function isPlainObject(value) {
42
+ if (!value || typeof value !== "object") {
43
+ return false;
44
+ }
45
+ const proto = Object.getPrototypeOf(value);
46
+ return proto === Object.prototype || !proto || !proto.constructor;
47
+ }
48
+
49
+ export function getOwn(object, key) {
50
+ return Object.hasOwn(object, key) ? object[key] : undefined;
51
+ }
52
+ export function get(object, path) {
53
+ let current = object;
54
+ for (const key of path) {
55
+ if (!isTypescriptObject(current)) {
56
+ return undefined;
57
+ }
58
+ current = getOwn(current, key);
59
+ }
60
+ return current;
61
+ }
62
+
63
+ export function set(root, path, value) {
64
+ let current = root;
65
+ for (let i = 0; i < path.length - 1; i++) {
66
+ const key = path[i];
67
+ const next = getOwn(current, key);
68
+ if (!isTypescriptObject(next)) {
69
+ const child = {};
70
+ setOwn(current, key, child);
71
+ current = child;
72
+ } else {
73
+ current = next;
74
+ }
75
+ }
76
+ setOwn(current, path.at(-1), value);
77
+ }
78
+
79
+ export function setOwn(object, key, value) {
80
+ if (key === "__proto__") {
81
+ Object.defineProperty(object, key, {
82
+ value,
83
+ writable: true,
84
+ enumerable: true,
85
+ configurable: true
86
+ });
87
+ } else {
88
+ object[key] = value;
89
+ }
90
+ }
91
+
92
+ export function mergeTwoLevels(first, second) {
93
+ if (!isPlainObject(first) || !isPlainObject(second)) {
94
+ return second;
95
+ }
96
+
97
+ const result = {
98
+ ...first,
99
+ ...second
100
+ };
101
+ for (const key of Object.keys(second)) {
102
+ if (!Object.hasOwn(first, key)) {
103
+ continue;
104
+ }
105
+ const firstValue = first[key];
106
+ const secondValue = second[key];
107
+ if (isPlainObject(firstValue) && isPlainObject(secondValue)) {
108
+ result[key] = {
109
+ ...firstValue,
110
+ ...secondValue
111
+ };
112
+ }
113
+ }
114
+ return result;
115
+ }
116
+ export function omit(obj, keys) {
117
+ const result = { ...obj };
118
+ for (const key of keys) {
119
+ delete result[key];
120
+ }
121
+ return result;
122
+ }
123
+ export function pick(obj, keys) {
124
+ const result = {};
125
+ for (const key of keys) {
126
+ if (Object.hasOwn(obj, key)) {
127
+ result[key] = obj[key];
128
+ }
129
+ }
130
+ return result;
131
+ }
132
+
133
+ export function clone(value) {
134
+ return cloneWithVisited(value, new WeakMap());
135
+ }
136
+ function cloneWithVisited(value, visited) {
137
+ if (Array.isArray(value)) {
138
+ const existing = visited.get(value);
139
+ if (existing) {
140
+ return existing;
141
+ }
142
+ const result = [];
143
+ visited.set(value, result);
144
+ for (const item of value) {
145
+ result.push(cloneWithVisited(item, visited));
146
+ }
147
+ return result;
148
+ }
149
+ if (isPlainObject(value)) {
150
+ const existing = visited.get(value);
151
+ if (existing) {
152
+ return existing;
153
+ }
154
+ const result = {};
155
+ visited.set(value, result);
156
+
157
+ for (const key of Object.keys(value)) {
158
+ setOwn(result, key, cloneWithVisited(value[key], visited));
159
+ }
160
+ for (const sym of Object.getOwnPropertySymbols(value)) {
161
+ setOwn(result, sym, cloneWithVisited(value[sym], visited));
162
+ }
163
+ return result;
164
+ }
165
+ return value;
166
+ }
167
+ export function copyOnWrite(parent, key, original) {
168
+ const value = parent[key];
169
+ if (value !== original) {
170
+ return value;
171
+ }
172
+ let copy;
173
+ if (Array.isArray(value)) {
174
+ copy = value.slice();
175
+ } else if (isPlainObject(value)) {
176
+ copy = { ...value };
177
+ } else {
178
+ return value;
179
+ }
180
+ setOwn(parent, key, copy);
181
+ return copy;
182
+ }
183
+ export function isPropertyKey(value) {
184
+ const type = typeof value;
185
+ return type === "string" || type === "number" || type === "symbol";
186
+ }
187
+ export const NullProtoObj = /* @__PURE__ */ (() => {
188
+ const e = function() {};
189
+ e.prototype = Object.create(null);
190
+ Object.freeze(e.prototype);
191
+ return e;
192
+ })();
193
+
194
+ export function bindMethods(obj, options = {}) {
195
+ const unbound = new Set(options.unbound);
196
+
197
+ const methods = new NullProtoObj();
198
+ let current = obj;
199
+ while (current && current !== Object.prototype) {
200
+ for (const key of Object.getOwnPropertyNames(current)) {
201
+ if (key === "constructor" || key in methods) {
202
+ continue;
203
+ }
204
+ const val = getOrBind(obj, key, { bind: !unbound.has(key) });
205
+ if (typeof val === "function") {
206
+ methods[key] = val;
207
+ }
208
+ }
209
+ for (const sym of Object.getOwnPropertySymbols(current)) {
210
+ if (sym in methods) {
211
+ continue;
212
+ }
213
+ const val = getOrBind(obj, sym, { bind: !unbound.has(sym) });
214
+ if (typeof val === "function") {
215
+ methods[sym] = val;
216
+ }
217
+ }
218
+ current = Object.getPrototypeOf(current);
219
+ }
220
+ return methods;
221
+ }
@@ -0,0 +1,12 @@
1
+ export interface OrderablePlugin {
2
+ /** Unique name of the plugin, used for ordering and identification. */
3
+ name: string;
4
+ /** Plugins this plugin should execute before. */
5
+ before?: string[] | undefined;
6
+ /** Plugins this plugin should execute after. */
7
+ after?: string[] | undefined;
8
+ }
9
+ /**
10
+ * Sorts plugins based on their `before` and `after` dependencies.
11
+ */
12
+ export declare function sortPlugins<T extends OrderablePlugin>(plugins: T[]): T[];
@@ -0,0 +1,58 @@
1
+
2
+ export function sortPlugins(plugins) {
3
+ const pluginCount = plugins.length;
4
+ const pluginIdToIndices = new Map();
5
+ for (let i = 0; i < pluginCount; i++) {
6
+ const plugin = plugins[i];
7
+ const indices = pluginIdToIndices.get(plugin.name);
8
+ if (indices === undefined) {
9
+ pluginIdToIndices.set(plugin.name, [i]);
10
+ } else {
11
+ indices.push(i);
12
+ }
13
+ }
14
+ const dependencies = Array.from({ length: pluginCount }, () => []);
15
+ for (let i = 0; i < pluginCount; i++) {
16
+ const plugin = plugins[i];
17
+ if (plugin.before !== undefined) {
18
+ for (const beforeId of plugin.before) {
19
+ const beforeIndices = pluginIdToIndices.get(beforeId);
20
+ if (beforeIndices !== undefined) {
21
+ for (const beforeIndex of beforeIndices) {
22
+ dependencies[beforeIndex].push(i);
23
+ }
24
+ }
25
+ }
26
+ }
27
+ if (plugin.after !== undefined) {
28
+ for (const afterId of plugin.after) {
29
+ const afterIndices = pluginIdToIndices.get(afterId);
30
+ if (afterIndices !== undefined) {
31
+ for (const afterIndex of afterIndices) {
32
+ dependencies[i].push(afterIndex);
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ const sorted = [];
39
+ const placed = new Set();
40
+ while (sorted.length < pluginCount) {
41
+ const next = plugins.findIndex((_, i) => !placed.has(i) && dependencies[i].every((dependency) => placed.has(dependency)));
42
+ if (next === -1) {
43
+ throw new Error(`Circular dependency detected involving plugin "${findCyclicPlugin(plugins, dependencies, placed).name}"`);
44
+ }
45
+ placed.add(next);
46
+ sorted.push(plugins[next]);
47
+ }
48
+ return sorted;
49
+ }
50
+ function findCyclicPlugin(plugins, dependencies, placed) {
51
+ const seen = new Set();
52
+ let current = plugins.findIndex((_, i) => !placed.has(i));
53
+ while (!seen.has(current)) {
54
+ seen.add(current);
55
+ current = dependencies[current].find((dependency) => !placed.has(dependency));
56
+ }
57
+ return plugins[current];
58
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Creates a promise together with its associated `resolve` and `reject`
3
+ * functions.
4
+ *
5
+ * Equivalent to `Promise.withResolvers()`, but works in environments
6
+ * where that API is not yet available.
7
+ */
8
+ export declare function promiseWithResolvers<T>(): {
9
+ promise: Promise<T>;
10
+ resolve: (v: T) => void;
11
+ reject: (reason: unknown) => void;
12
+ };
13
+ /**
14
+ * Captures the current async context (such as AsyncLocalStorage) through a promise reaction, so no runtime API is needed.
15
+ * The returned function runs a callback inside it once; later calls reject.
16
+ */
17
+ export declare function captureAsyncContext(): <T>(callback: () => Promise<T>) => Promise<T>;
@@ -0,0 +1,23 @@
1
+
2
+ export function promiseWithResolvers() {
3
+ const result = {};
4
+ result.promise = new Promise((resolve, reject) => {
5
+ result.resolve = resolve;
6
+ result.reject = reject;
7
+ });
8
+ return result;
9
+ }
10
+
11
+ export function captureAsyncContext() {
12
+ const { promise, resolve } = promiseWithResolvers();
13
+ const result = promise.then((callback) => callback());
14
+ let called = false;
15
+ return (callback) => {
16
+ if (called) {
17
+ return Promise.reject(new Error("A captured async context can be run only once."));
18
+ }
19
+ called = true;
20
+ resolve(callback);
21
+ return result;
22
+ };
23
+ }
@@ -0,0 +1,15 @@
1
+ import type { Value } from "./value.mjs";
2
+ /**
3
+ * Creates a proxy that overlays a `partial` object on top of a `target`.
4
+ *
5
+ * - Properties from `partial` take precedence.
6
+ * - Properties not present in `partial` fall back to the resolved `target`.
7
+ * - Methods are bound to the proxy to ensure a consistent `this` context.
8
+ *
9
+ * Useful for overriding specific properties of an object while delegating
10
+ * all other access to the original target without needing to know its full structure.
11
+ */
12
+ export declare function override<
13
+ T extends object,
14
+ U extends object
15
+ >(target: Value<T>, partial: U): U & Omit<T, keyof U>;
package/dist/proxy.mjs ADDED
@@ -0,0 +1,15 @@
1
+ import { getOrBind } from "@standard-server/shared";
2
+ import { value } from "./value.mjs";
3
+
4
+ export function override(target, partial) {
5
+ const proxy = new Proxy(typeof target === "function" ? partial : target, {
6
+ get(_, prop) {
7
+ const targetValue = prop in partial ? partial : value(target);
8
+ return getOrBind(targetValue, prop);
9
+ },
10
+ has(_, prop) {
11
+ return Reflect.has(partial, prop) || Reflect.has(value(target), prop);
12
+ }
13
+ });
14
+ return proxy;
15
+ }
@@ -0,0 +1,16 @@
1
+ export interface AsyncIdQueueCloseOptions {
2
+ id?: string | undefined;
3
+ reason?: unknown;
4
+ }
5
+ export declare class AsyncIdQueue<T> {
6
+ private readonly openIds;
7
+ private readonly queues;
8
+ private readonly waiters;
9
+ get size(): number;
10
+ open(id: string): void;
11
+ isOpen(id: string): boolean;
12
+ push(id: string, item: T): void;
13
+ pull(id: string): Promise<T>;
14
+ close({ id, reason }?: AsyncIdQueueCloseOptions): void;
15
+ private assertOpen;
16
+ }
package/dist/queue.mjs ADDED
@@ -0,0 +1,74 @@
1
+ import { AbortError } from "@standard-server/shared";
2
+ export class AsyncIdQueue {
3
+ openIds = new Set();
4
+ queues = new Map();
5
+ waiters = new Map();
6
+ get size() {
7
+ return this.openIds.size;
8
+ }
9
+ open(id) {
10
+ this.openIds.add(id);
11
+ }
12
+ isOpen(id) {
13
+ return this.openIds.has(id);
14
+ }
15
+ push(id, item) {
16
+ this.assertOpen(id);
17
+ const pending = this.waiters.get(id);
18
+ if (pending?.length) {
19
+ pending.shift()[0](item);
20
+ if (pending.length === 0) {
21
+ this.waiters.delete(id);
22
+ }
23
+ } else {
24
+ const items = this.queues.get(id);
25
+ if (items) {
26
+ items.push(item);
27
+ } else {
28
+ this.queues.set(id, [item]);
29
+ }
30
+ }
31
+ }
32
+ async pull(id) {
33
+ this.assertOpen(id);
34
+ const items = this.queues.get(id);
35
+ if (items?.length) {
36
+ const item = items.shift();
37
+ if (items.length === 0) {
38
+ this.queues.delete(id);
39
+ }
40
+ return item;
41
+ }
42
+ return new Promise((resolve, reject) => {
43
+ const waitingPulls = this.waiters.get(id);
44
+ const pending = [resolve, reject];
45
+ if (waitingPulls) {
46
+ waitingPulls.push(pending);
47
+ } else {
48
+ this.waiters.set(id, [pending]);
49
+ }
50
+ });
51
+ }
52
+ close({ id, reason } = {}) {
53
+ if (id === undefined) {
54
+ this.waiters.forEach((pendingPulls, id) => {
55
+ const error = reason ?? new AbortError(`[AsyncIdQueue] Queue[${id}] was closed or aborted while waiting for pulling.`);
56
+ pendingPulls.forEach(([, reject]) => reject(error));
57
+ });
58
+ this.waiters.clear();
59
+ this.openIds.clear();
60
+ this.queues.clear();
61
+ return;
62
+ }
63
+ const error = reason ?? new AbortError(`[AsyncIdQueue] Queue[${id}] was closed or aborted while waiting for pulling.`);
64
+ this.waiters.get(id)?.forEach(([, reject]) => reject(error));
65
+ this.waiters.delete(id);
66
+ this.openIds.delete(id);
67
+ this.queues.delete(id);
68
+ }
69
+ assertOpen(id) {
70
+ if (!this.isOpen(id)) {
71
+ throw new Error(`[AsyncIdQueue] Cannot access queue[${id}] because it is not open or aborted.`);
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Returns a signal that aborts only after all provided signals are aborted.
3
+ */
4
+ export declare function allAbortSignal(signals: readonly (AbortSignal | undefined)[]): AbortSignal | undefined;
5
+ /**
6
+ * Returns a signal that aborts as soon as any of the provided signals aborts,
7
+ * with the same abort reason.
8
+ *
9
+ * Prefers the native `AbortSignal.any` when available, and falls back to a manual
10
+ * implementation otherwise, including in runtimes without the `AbortSignal` global.
11
+ */
12
+ export declare function anyAbortSignal(signals: readonly (AbortSignal | undefined)[]): AbortSignal | undefined;
13
+ export declare function runWithSignal<T>(signal: AbortSignal | undefined, fn: () => Promise<T>): Promise<T>;
@@ -0,0 +1,74 @@
1
+ import { throwIfAborted } from "@standard-server/shared";
2
+ import { promiseWithResolvers } from "./promise.mjs";
3
+
4
+ export function allAbortSignal(signals) {
5
+ const realSignals = signals.filter((signal) => signal !== undefined);
6
+ if (realSignals.length === 0 || realSignals.length !== signals.length) {
7
+ return undefined;
8
+ }
9
+ const controller = new AbortController();
10
+ const abortIfAllAborted = () => {
11
+ if (realSignals.every((signal) => signal.aborted)) {
12
+ controller.abort();
13
+ }
14
+ };
15
+ abortIfAllAborted();
16
+ for (const signal of realSignals) {
17
+ signal.addEventListener("abort", () => {
18
+ abortIfAllAborted();
19
+ }, {
20
+ once: true,
21
+ signal: controller.signal
22
+ });
23
+ }
24
+ return controller.signal;
25
+ }
26
+
27
+ export function anyAbortSignal(signals) {
28
+ const realSignals = signals.filter((signal) => signal !== undefined);
29
+ if (realSignals.length === 0) {
30
+ return undefined;
31
+ }
32
+ if (realSignals.length === 1) {
33
+ return realSignals[0];
34
+ }
35
+
36
+ if (typeof AbortSignal !== "undefined" && typeof AbortSignal.any === "function") {
37
+
38
+ return AbortSignal.any(realSignals);
39
+ }
40
+ const controller = new AbortController();
41
+ for (const signal of realSignals) {
42
+ if (signal.aborted) {
43
+ controller.abort(signal.reason);
44
+ break;
45
+ }
46
+ signal.addEventListener("abort", () => {
47
+ controller.abort(signal.reason);
48
+ }, {
49
+ once: true,
50
+ signal: controller.signal
51
+ });
52
+ }
53
+ return controller.signal;
54
+ }
55
+ export async function runWithSignal(signal, fn) {
56
+ if (!signal) {
57
+ return fn();
58
+ }
59
+ throwIfAborted(signal);
60
+ const { promise, reject, resolve } = promiseWithResolvers();
61
+ let abortListener;
62
+ signal.addEventListener("abort", abortListener = () => {
63
+ reject(signal.reason);
64
+ abortListener = undefined;
65
+ });
66
+ try {
67
+ fn().then(resolve, reject);
68
+ return await promise;
69
+ } finally {
70
+ if (abortListener) {
71
+ signal.removeEventListener("abort", abortListener);
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,54 @@
1
+ import type { Promisable } from "type-fest";
2
+ import type { StartSpanOptions } from "./tracing.mjs";
3
+ import type { ThrowableError } from "./types.mjs";
4
+ import { AsyncIteratorClass } from "@standard-server/shared";
5
+ export declare function replicateReadableStream<T>(stream: ReadableStream<T>, count: number): ReadableStream<T>[];
6
+ export type ReadableStreamReadResult<T> = {
7
+ done: false;
8
+ value: T;
9
+ } | {
10
+ done: true;
11
+ value?: T | undefined;
12
+ };
13
+ export interface WrapReadableStreamOptions<
14
+ T,
15
+ TMapped
16
+ > {
17
+ /**
18
+ * Any call to the original stream reader will be executed inside this function.
19
+ * Useful when you want execution to happen within a specific context,
20
+ * such as AsyncLocalStorage.
21
+ */
22
+ runWith?: (<T>(run: () => Promise<T>) => Promisable<T>) | undefined;
23
+ mapResult?: ((result: ReadableStreamReadResult<T>) => Promisable<ReadableStreamReadResult<TMapped>>) | undefined;
24
+ mapError?: ((error: ThrowableError) => Promisable<ThrowableError>) | undefined;
25
+ onError?: ((error: ThrowableError) => Promisable<void>) | undefined;
26
+ /**
27
+ * Guaranteed to execute exactly once after the stream finishes or is cancelled.
28
+ */
29
+ onFinish?: (() => Promisable<void>) | undefined;
30
+ }
31
+ export declare function wrapReadableStream<
32
+ T,
33
+ TMapped = T
34
+ >(stream: ReadableStream<T>, { runWith, mapResult, mapError, onError, onFinish }: WrapReadableStreamOptions<T, TMapped>): NoInfer<ReadableStream<TMapped>>;
35
+ export declare function traceReadableStream<T>(options: StartSpanOptions | string, stream: ReadableStream<T>): ReadableStream<T>;
36
+ /**
37
+ * Converts a {@link ReadableStream} into an {@link AsyncIteratorClass}.
38
+ *
39
+ * @see {@link https://orpc.dev/docs/integrations/ai-sdk | AI SDK Integration}
40
+ */
41
+ export declare function streamToAsyncIteratorObject<T>(stream: ReadableStream<T>, { signal }?: {
42
+ signal?: AbortSignal | undefined;
43
+ }): AsyncIteratorClass<T>;
44
+ /**
45
+ * Converts an `AsyncIterator` into a `ReadableStream`.
46
+ */
47
+ export declare function asyncIteratorToStream<T>(iterator: AsyncIterator<T>): ReadableStream<T>;
48
+ /**
49
+ * Converts an `AsyncIterator` into a `ReadableStream`, ensuring that
50
+ * all emitted object values are *unproxied* before enqueuing.
51
+ *
52
+ * @see {@link https://orpc.dev/docs/integrations/ai-sdk | AI SDK Integration}
53
+ */
54
+ export declare function asyncIteratorToUnproxiedDataStream<T>(iterator: AsyncIterator<T>): ReadableStream<T>;