@orpc/shared 2.0.0-beta.36 → 2.0.0-beta.38
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 +5 -5
- package/dist/index.d.mts +3 -11
- package/dist/index.d.ts +3 -11
- package/dist/index.mjs +52 -75
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -38,11 +38,11 @@ You can read the documentation [here](https://orpc.dev).
|
|
|
38
38
|
|
|
39
39
|
**Schema validation**
|
|
40
40
|
|
|
41
|
-
| Package | Purpose
|
|
42
|
-
| ------------------------------------------------------------ |
|
|
43
|
-
| [@orpc/zod](https://www.npmjs.com/package/@orpc/zod) |
|
|
44
|
-
| [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot) |
|
|
45
|
-
| [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype) |
|
|
41
|
+
| Package | Purpose | Docs |
|
|
42
|
+
| ------------------------------------------------------------ | ---------------------------------------------------------- | ----------------------------------------------------- |
|
|
43
|
+
| [@orpc/zod](https://www.npmjs.com/package/@orpc/zod) | JSON Schema converter for [Zod](https://zod.dev/). | [Zod](https://orpc.dev/docs/integrations/zod) |
|
|
44
|
+
| [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot) | JSON Schema converter for [Valibot](https://valibot.dev/). | [Valibot](https://orpc.dev/docs/integrations/valibot) |
|
|
45
|
+
| [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype) | JSON Schema converter for [ArkType](https://arktype.io/). | [ArkType](https://orpc.dev/docs/integrations/arktype) |
|
|
46
46
|
|
|
47
47
|
**Built-in features**
|
|
48
48
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Arrayable, Promisable } from 'type-fest';
|
|
2
2
|
export { Arrayable, IsEqual, PartialDeep, Promisable, Writable } from 'type-fest';
|
|
3
3
|
import { AsyncIteratorClass } from '@standard-server/shared';
|
|
4
|
-
export { AbortError, AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, SequentialIdGenerator, getOrBind, isAsyncIteratorObject, isTypescriptObject, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray } from '@standard-server/shared';
|
|
4
|
+
export { AbortError, AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, SequentialIdGenerator, getOrBind, isAsyncIteratorObject, isTypescriptObject, parseEmptyableJSON, safeDecodeURIComponent, safeEncodeURIComponent, sequential, sleep, stringifyJSON, toArray } from '@standard-server/shared';
|
|
5
5
|
|
|
6
6
|
type MaybeOptionalOptions<TOptions> = object extends TOptions ? [options?: TOptions] : [options: TOptions];
|
|
7
7
|
declare function resolveMaybeOptionalOptions<T>(rest: MaybeOptionalOptions<T>): T;
|
|
@@ -318,6 +318,7 @@ declare function omit<T extends object, K extends keyof T>(obj: T, keys: readonl
|
|
|
318
318
|
* Circular and shared references are preserved in the copy.
|
|
319
319
|
*/
|
|
320
320
|
declare function clone<T>(value: T): T;
|
|
321
|
+
declare function copyOnWrite(parent: object, key: PropertyKey, original: unknown): unknown;
|
|
321
322
|
declare function isPropertyKey(value: unknown): value is PropertyKey;
|
|
322
323
|
declare const NullProtoObj: ({
|
|
323
324
|
new <T extends Record<PropertyKey, unknown>>(): T;
|
|
@@ -452,14 +453,5 @@ declare function asyncIteratorToStream<T>(iterator: AsyncIterator<T>): ReadableS
|
|
|
452
453
|
*/
|
|
453
454
|
declare function asyncIteratorToUnproxiedDataStream<T>(iterator: AsyncIterator<T>): ReadableStream<T>;
|
|
454
455
|
|
|
455
|
-
|
|
456
|
-
* `encodeURIComponent` that never throws, lone surrogates become U+FFFD.
|
|
457
|
-
*/
|
|
458
|
-
declare function safeEncodeURIComponent(value: string): string;
|
|
459
|
-
/**
|
|
460
|
-
* `decodeURIComponent` that never throws, malformed input is returned unchanged.
|
|
461
|
-
*/
|
|
462
|
-
declare function safeDecodeURIComponent(value: string): string;
|
|
463
|
-
|
|
464
|
-
export { AsyncIdQueue, NullProtoObj, ORPC_NAME, allAbortSignal, anyAbortSignal, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, bindMethods, clone, compareSequentialIds, consumeAsyncIterator, defer, findDeepMatches, get, getConstructor, getConstructors, getOwn, getTracer, intercept, isAbortError, isAsyncGeneratorFunction, isCompressibleContentType, isDeepEqual, isNoTransformCacheControl, isPlainObject, isPropertyKey, loadBytes, matchesHttpPath, matchesHttpPathPrefix, mergeHttpPath, mergeTwoLevels, normalizeHttpPath, omit, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, once, override, parseAcceptEncodingQualities, pathToHttpPath, promiseWithResolvers, recordSpanError, replicateAsyncIterator, replicateReadableStream, resolveMaybeOptionalOptions, runInSpanContext, runWithSignal, runWithSpan, safeDecodeURIComponent, safeEncodeURIComponent, set, setOwn, setSpanAttributeIfDefined, setTracer, sortPlugins, splitInHalf, startSpan, streamToAsyncIteratorObject, toSpanAttributeValue, toStringOrBytes, toTracingException, traceAsyncIterator, traceReadableStream, tryOrUndefined, value, varyByAcceptEncoding, wrapAsyncIterator, wrapReadableStream };
|
|
456
|
+
export { AsyncIdQueue, NullProtoObj, ORPC_NAME, allAbortSignal, anyAbortSignal, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, bindMethods, clone, compareSequentialIds, consumeAsyncIterator, copyOnWrite, defer, findDeepMatches, get, getConstructor, getConstructors, getOwn, getTracer, intercept, isAbortError, isAsyncGeneratorFunction, isCompressibleContentType, isDeepEqual, isNoTransformCacheControl, isPlainObject, isPropertyKey, loadBytes, matchesHttpPath, matchesHttpPathPrefix, mergeHttpPath, mergeTwoLevels, normalizeHttpPath, omit, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, once, override, parseAcceptEncodingQualities, pathToHttpPath, promiseWithResolvers, recordSpanError, replicateAsyncIterator, replicateReadableStream, resolveMaybeOptionalOptions, runInSpanContext, runWithSignal, runWithSpan, set, setOwn, setSpanAttributeIfDefined, setTracer, sortPlugins, splitInHalf, startSpan, streamToAsyncIteratorObject, toSpanAttributeValue, toStringOrBytes, toTracingException, traceAsyncIterator, traceReadableStream, tryOrUndefined, value, varyByAcceptEncoding, wrapAsyncIterator, wrapReadableStream };
|
|
465
457
|
export type { AnyFunction, AsyncIdQueueCloseOptions, ConsumeAsyncIteratorOptions, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, MaybeOptionalOptions, OnFinishState, OrderablePlugin, PromiseWithError, Public, ReadableStreamReadResult, Registry, Segment, StartSpanOptions, ThrowableError, Tracer, TracingAttributeValue, TracingException, TracingExceptionLevel, TracingHeaders, TracingSpan, Value, WrapAsyncIteratorOptions, WrapReadableStreamOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Arrayable, Promisable } from 'type-fest';
|
|
2
2
|
export { Arrayable, IsEqual, PartialDeep, Promisable, Writable } from 'type-fest';
|
|
3
3
|
import { AsyncIteratorClass } from '@standard-server/shared';
|
|
4
|
-
export { AbortError, AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, SequentialIdGenerator, getOrBind, isAsyncIteratorObject, isTypescriptObject, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray } from '@standard-server/shared';
|
|
4
|
+
export { AbortError, AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, SequentialIdGenerator, getOrBind, isAsyncIteratorObject, isTypescriptObject, parseEmptyableJSON, safeDecodeURIComponent, safeEncodeURIComponent, sequential, sleep, stringifyJSON, toArray } from '@standard-server/shared';
|
|
5
5
|
|
|
6
6
|
type MaybeOptionalOptions<TOptions> = object extends TOptions ? [options?: TOptions] : [options: TOptions];
|
|
7
7
|
declare function resolveMaybeOptionalOptions<T>(rest: MaybeOptionalOptions<T>): T;
|
|
@@ -318,6 +318,7 @@ declare function omit<T extends object, K extends keyof T>(obj: T, keys: readonl
|
|
|
318
318
|
* Circular and shared references are preserved in the copy.
|
|
319
319
|
*/
|
|
320
320
|
declare function clone<T>(value: T): T;
|
|
321
|
+
declare function copyOnWrite(parent: object, key: PropertyKey, original: unknown): unknown;
|
|
321
322
|
declare function isPropertyKey(value: unknown): value is PropertyKey;
|
|
322
323
|
declare const NullProtoObj: ({
|
|
323
324
|
new <T extends Record<PropertyKey, unknown>>(): T;
|
|
@@ -452,14 +453,5 @@ declare function asyncIteratorToStream<T>(iterator: AsyncIterator<T>): ReadableS
|
|
|
452
453
|
*/
|
|
453
454
|
declare function asyncIteratorToUnproxiedDataStream<T>(iterator: AsyncIterator<T>): ReadableStream<T>;
|
|
454
455
|
|
|
455
|
-
|
|
456
|
-
* `encodeURIComponent` that never throws, lone surrogates become U+FFFD.
|
|
457
|
-
*/
|
|
458
|
-
declare function safeEncodeURIComponent(value: string): string;
|
|
459
|
-
/**
|
|
460
|
-
* `decodeURIComponent` that never throws, malformed input is returned unchanged.
|
|
461
|
-
*/
|
|
462
|
-
declare function safeDecodeURIComponent(value: string): string;
|
|
463
|
-
|
|
464
|
-
export { AsyncIdQueue, NullProtoObj, ORPC_NAME, allAbortSignal, anyAbortSignal, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, bindMethods, clone, compareSequentialIds, consumeAsyncIterator, defer, findDeepMatches, get, getConstructor, getConstructors, getOwn, getTracer, intercept, isAbortError, isAsyncGeneratorFunction, isCompressibleContentType, isDeepEqual, isNoTransformCacheControl, isPlainObject, isPropertyKey, loadBytes, matchesHttpPath, matchesHttpPathPrefix, mergeHttpPath, mergeTwoLevels, normalizeHttpPath, omit, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, once, override, parseAcceptEncodingQualities, pathToHttpPath, promiseWithResolvers, recordSpanError, replicateAsyncIterator, replicateReadableStream, resolveMaybeOptionalOptions, runInSpanContext, runWithSignal, runWithSpan, safeDecodeURIComponent, safeEncodeURIComponent, set, setOwn, setSpanAttributeIfDefined, setTracer, sortPlugins, splitInHalf, startSpan, streamToAsyncIteratorObject, toSpanAttributeValue, toStringOrBytes, toTracingException, traceAsyncIterator, traceReadableStream, tryOrUndefined, value, varyByAcceptEncoding, wrapAsyncIterator, wrapReadableStream };
|
|
456
|
+
export { AsyncIdQueue, NullProtoObj, ORPC_NAME, allAbortSignal, anyAbortSignal, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, bindMethods, clone, compareSequentialIds, consumeAsyncIterator, copyOnWrite, defer, findDeepMatches, get, getConstructor, getConstructors, getOwn, getTracer, intercept, isAbortError, isAsyncGeneratorFunction, isCompressibleContentType, isDeepEqual, isNoTransformCacheControl, isPlainObject, isPropertyKey, loadBytes, matchesHttpPath, matchesHttpPathPrefix, mergeHttpPath, mergeTwoLevels, normalizeHttpPath, omit, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, once, override, parseAcceptEncodingQualities, pathToHttpPath, promiseWithResolvers, recordSpanError, replicateAsyncIterator, replicateReadableStream, resolveMaybeOptionalOptions, runInSpanContext, runWithSignal, runWithSpan, set, setOwn, setSpanAttributeIfDefined, setTracer, sortPlugins, splitInHalf, startSpan, streamToAsyncIteratorObject, toSpanAttributeValue, toStringOrBytes, toTracingException, traceAsyncIterator, traceReadableStream, tryOrUndefined, value, varyByAcceptEncoding, wrapAsyncIterator, wrapReadableStream };
|
|
465
457
|
export type { AnyFunction, AsyncIdQueueCloseOptions, ConsumeAsyncIteratorOptions, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, MaybeOptionalOptions, OnFinishState, OrderablePlugin, PromiseWithError, Public, ReadableStreamReadResult, Registry, Segment, StartSpanOptions, ThrowableError, Tracer, TracingAttributeValue, TracingException, TracingExceptionLevel, TracingHeaders, TracingSpan, Value, WrapAsyncIteratorOptions, WrapReadableStreamOptions };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbortError, AsyncIteratorClass, getOrBind, isTypescriptObject, isAsyncIteratorObject } from '@standard-server/shared';
|
|
2
|
-
export { AbortError, AsyncIteratorClass, SequentialIdGenerator, getOrBind, isAsyncIteratorObject, isTypescriptObject, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray } from '@standard-server/shared';
|
|
1
|
+
import { safeDecodeURIComponent, safeEncodeURIComponent, AbortError, AsyncIteratorClass, getOrBind, isTypescriptObject, isAsyncIteratorObject } from '@standard-server/shared';
|
|
2
|
+
export { AbortError, AsyncIteratorClass, SequentialIdGenerator, getOrBind, isAsyncIteratorObject, isTypescriptObject, parseEmptyableJSON, safeDecodeURIComponent, safeEncodeURIComponent, sequential, sleep, stringifyJSON, toArray } from '@standard-server/shared';
|
|
3
3
|
|
|
4
4
|
function resolveMaybeOptionalOptions(rest) {
|
|
5
5
|
return rest[0] ?? {};
|
|
@@ -142,25 +142,6 @@ function tryOrUndefined(fn) {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
const LONE_SURROGATE_REGEX = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;
|
|
146
|
-
function safeEncodeURIComponent(value) {
|
|
147
|
-
try {
|
|
148
|
-
return encodeURIComponent(value);
|
|
149
|
-
} catch {
|
|
150
|
-
return encodeURIComponent(value.replace(LONE_SURROGATE_REGEX, "\uFFFD"));
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function safeDecodeURIComponent(value) {
|
|
154
|
-
if (!value.includes("%")) {
|
|
155
|
-
return value;
|
|
156
|
-
}
|
|
157
|
-
try {
|
|
158
|
-
return decodeURIComponent(value);
|
|
159
|
-
} catch {
|
|
160
|
-
return value;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
145
|
function pathToHttpPath(path) {
|
|
165
146
|
return `/${path.map(safeEncodeURIComponent).join("/")}`;
|
|
166
147
|
}
|
|
@@ -554,8 +535,8 @@ function findDeepMatches(check, payload, segments = [], maps = [], values = [])
|
|
|
554
535
|
findDeepMatches(check, v, [...segments, i], maps, values);
|
|
555
536
|
});
|
|
556
537
|
} else if (isPlainObject(payload)) {
|
|
557
|
-
for (const
|
|
558
|
-
findDeepMatches(check,
|
|
538
|
+
for (const key of Object.keys(payload)) {
|
|
539
|
+
findDeepMatches(check, payload[key], [...segments, key], maps, values);
|
|
559
540
|
}
|
|
560
541
|
}
|
|
561
542
|
return { maps, values };
|
|
@@ -630,14 +611,14 @@ function mergeTwoLevels(first, second) {
|
|
|
630
611
|
return second;
|
|
631
612
|
}
|
|
632
613
|
const result = { ...first, ...second };
|
|
633
|
-
for (const key
|
|
614
|
+
for (const key of Object.keys(second)) {
|
|
634
615
|
if (!Object.hasOwn(first, key)) {
|
|
635
616
|
continue;
|
|
636
617
|
}
|
|
637
618
|
const firstValue = first[key];
|
|
638
619
|
const secondValue = second[key];
|
|
639
620
|
if (isPlainObject(firstValue) && isPlainObject(secondValue)) {
|
|
640
|
-
|
|
621
|
+
result[key] = { ...firstValue, ...secondValue };
|
|
641
622
|
}
|
|
642
623
|
}
|
|
643
624
|
return result;
|
|
@@ -672,8 +653,8 @@ function cloneWithVisited(value, visited) {
|
|
|
672
653
|
}
|
|
673
654
|
const result = {};
|
|
674
655
|
visited.set(value, result);
|
|
675
|
-
for (const
|
|
676
|
-
setOwn(result, key, cloneWithVisited(
|
|
656
|
+
for (const key of Object.keys(value)) {
|
|
657
|
+
setOwn(result, key, cloneWithVisited(value[key], visited));
|
|
677
658
|
}
|
|
678
659
|
for (const sym of Object.getOwnPropertySymbols(value)) {
|
|
679
660
|
setOwn(result, sym, cloneWithVisited(value[sym], visited));
|
|
@@ -682,6 +663,22 @@ function cloneWithVisited(value, visited) {
|
|
|
682
663
|
}
|
|
683
664
|
return value;
|
|
684
665
|
}
|
|
666
|
+
function copyOnWrite(parent, key, original) {
|
|
667
|
+
const value = parent[key];
|
|
668
|
+
if (value !== original) {
|
|
669
|
+
return value;
|
|
670
|
+
}
|
|
671
|
+
let copy;
|
|
672
|
+
if (Array.isArray(value)) {
|
|
673
|
+
copy = value.slice();
|
|
674
|
+
} else if (isPlainObject(value)) {
|
|
675
|
+
copy = { ...value };
|
|
676
|
+
} else {
|
|
677
|
+
return value;
|
|
678
|
+
}
|
|
679
|
+
setOwn(parent, key, copy);
|
|
680
|
+
return copy;
|
|
681
|
+
}
|
|
685
682
|
function isPropertyKey(value) {
|
|
686
683
|
const type = typeof value;
|
|
687
684
|
return type === "string" || type === "number" || type === "symbol";
|
|
@@ -955,71 +952,51 @@ function sortPlugins(plugins) {
|
|
|
955
952
|
indices.push(i);
|
|
956
953
|
}
|
|
957
954
|
}
|
|
958
|
-
const
|
|
959
|
-
{ length: pluginCount },
|
|
960
|
-
() => /* @__PURE__ */ new Set()
|
|
961
|
-
);
|
|
955
|
+
const dependencies = Array.from({ length: pluginCount }, () => []);
|
|
962
956
|
for (let i = 0; i < pluginCount; i++) {
|
|
963
957
|
const plugin = plugins[i];
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
for (const beforeId of beforeList) {
|
|
958
|
+
if (plugin.before !== void 0) {
|
|
959
|
+
for (const beforeId of plugin.before) {
|
|
967
960
|
const beforeIndices = pluginIdToIndices.get(beforeId);
|
|
968
|
-
if (beforeIndices
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
const beforeGraph = graph[beforeIndex];
|
|
972
|
-
if (beforeGraph !== void 0) {
|
|
973
|
-
beforeGraph.add(i);
|
|
961
|
+
if (beforeIndices !== void 0) {
|
|
962
|
+
for (const beforeIndex of beforeIndices) {
|
|
963
|
+
dependencies[beforeIndex].push(i);
|
|
974
964
|
}
|
|
975
965
|
}
|
|
976
966
|
}
|
|
977
967
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
for (const afterId of afterList) {
|
|
983
|
-
const afterIndices = pluginIdToIndices.get(afterId);
|
|
984
|
-
if (afterIndices === void 0)
|
|
985
|
-
continue;
|
|
968
|
+
if (plugin.after !== void 0) {
|
|
969
|
+
for (const afterId of plugin.after) {
|
|
970
|
+
const afterIndices = pluginIdToIndices.get(afterId);
|
|
971
|
+
if (afterIndices !== void 0) {
|
|
986
972
|
for (const afterIndex of afterIndices) {
|
|
987
|
-
|
|
973
|
+
dependencies[i].push(afterIndex);
|
|
988
974
|
}
|
|
989
975
|
}
|
|
990
976
|
}
|
|
991
977
|
}
|
|
992
978
|
}
|
|
993
979
|
const sorted = [];
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
if (
|
|
998
|
-
|
|
999
|
-
if (visiting.has(index)) {
|
|
1000
|
-
const plugin2 = plugins[index];
|
|
1001
|
-
const pluginId = plugin2 !== void 0 ? plugin2.name : "unknown";
|
|
1002
|
-
throw new Error(`Circular dependency detected involving plugin "${pluginId}"`);
|
|
1003
|
-
}
|
|
1004
|
-
visiting.add(index);
|
|
1005
|
-
const deps = graph[index];
|
|
1006
|
-
if (deps !== void 0) {
|
|
1007
|
-
for (const depIndex of deps) {
|
|
1008
|
-
visit(depIndex);
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
visiting.delete(index);
|
|
1012
|
-
visited.add(index);
|
|
1013
|
-
const plugin = plugins[index];
|
|
1014
|
-
if (plugin !== void 0) {
|
|
1015
|
-
sorted.push(plugin);
|
|
980
|
+
const placed = /* @__PURE__ */ new Set();
|
|
981
|
+
while (sorted.length < pluginCount) {
|
|
982
|
+
const next = plugins.findIndex((_, i) => !placed.has(i) && dependencies[i].every((dependency) => placed.has(dependency)));
|
|
983
|
+
if (next === -1) {
|
|
984
|
+
throw new Error(`Circular dependency detected involving plugin "${findCyclicPlugin(plugins, dependencies, placed).name}"`);
|
|
1016
985
|
}
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
visit(i);
|
|
986
|
+
placed.add(next);
|
|
987
|
+
sorted.push(plugins[next]);
|
|
1020
988
|
}
|
|
1021
989
|
return sorted;
|
|
1022
990
|
}
|
|
991
|
+
function findCyclicPlugin(plugins, dependencies, placed) {
|
|
992
|
+
const seen = /* @__PURE__ */ new Set();
|
|
993
|
+
let current = plugins.findIndex((_, i) => !placed.has(i));
|
|
994
|
+
while (!seen.has(current)) {
|
|
995
|
+
seen.add(current);
|
|
996
|
+
current = dependencies[current].find((dependency) => !placed.has(dependency));
|
|
997
|
+
}
|
|
998
|
+
return plugins[current];
|
|
999
|
+
}
|
|
1023
1000
|
|
|
1024
1001
|
function allAbortSignal(signals) {
|
|
1025
1002
|
const realSignals = signals.filter((signal) => signal !== void 0);
|
|
@@ -1090,4 +1067,4 @@ async function runWithSignal(signal, fn) {
|
|
|
1090
1067
|
}
|
|
1091
1068
|
}
|
|
1092
1069
|
|
|
1093
|
-
export { AsyncIdQueue, NullProtoObj, ORPC_NAME, allAbortSignal, anyAbortSignal, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, bindMethods, clone, compareSequentialIds, consumeAsyncIterator, defer, findDeepMatches, get, getConstructor, getConstructors, getOwn, getTracer, intercept, isAbortError, isAsyncGeneratorFunction, isCompressibleContentType, isDeepEqual, isNoTransformCacheControl, isPlainObject, isPropertyKey, loadBytes, matchesHttpPath, matchesHttpPathPrefix, mergeHttpPath, mergeTwoLevels, normalizeHttpPath, omit, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, once, override, parseAcceptEncodingQualities, pathToHttpPath, promiseWithResolvers, recordSpanError, replicateAsyncIterator, replicateReadableStream, resolveMaybeOptionalOptions, runInSpanContext, runWithSignal, runWithSpan,
|
|
1070
|
+
export { AsyncIdQueue, NullProtoObj, ORPC_NAME, allAbortSignal, anyAbortSignal, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, bindMethods, clone, compareSequentialIds, consumeAsyncIterator, copyOnWrite, defer, findDeepMatches, get, getConstructor, getConstructors, getOwn, getTracer, intercept, isAbortError, isAsyncGeneratorFunction, isCompressibleContentType, isDeepEqual, isNoTransformCacheControl, isPlainObject, isPropertyKey, loadBytes, matchesHttpPath, matchesHttpPathPrefix, mergeHttpPath, mergeTwoLevels, normalizeHttpPath, omit, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, once, override, parseAcceptEncodingQualities, pathToHttpPath, promiseWithResolvers, recordSpanError, replicateAsyncIterator, replicateReadableStream, resolveMaybeOptionalOptions, runInSpanContext, runWithSignal, runWithSpan, set, setOwn, setSpanAttributeIfDefined, setTracer, sortPlugins, splitInHalf, startSpan, streamToAsyncIteratorObject, toSpanAttributeValue, toStringOrBytes, toTracingException, traceAsyncIterator, traceReadableStream, tryOrUndefined, value, varyByAcceptEncoding, wrapAsyncIterator, wrapReadableStream };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.38",
|
|
5
5
|
"description": "Internal utilities shared across oRPC packages",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@standard-server/shared": "~0.9.
|
|
33
|
+
"@standard-server/shared": "~0.9.2",
|
|
34
34
|
"radash": "^12.1.1",
|
|
35
35
|
"type-fest": "^5.3.1"
|
|
36
36
|
},
|