@orpc/shared 0.0.0-next.ac518b6 → 0.0.0-next.add5acf
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/index.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.mjs +2 -9
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -8,13 +8,6 @@ declare function resolveMaybeOptionalOptions<T>(rest: MaybeOptionalOptions<T>):
|
|
|
8
8
|
declare function toArray<T>(value: T): T extends readonly any[] ? T : Exclude<T, undefined | null>[];
|
|
9
9
|
declare function splitInHalf<T>(arr: readonly T[]): [T[], T[]];
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Converts Request/Response/Blob/File/.. to a buffer (ArrayBuffer or Uint8Array).
|
|
13
|
-
*
|
|
14
|
-
* Prefers the newer `.bytes` method when available as it more efficient but not widely supported yet.
|
|
15
|
-
*/
|
|
16
|
-
declare function readAsBuffer(source: Pick<Blob, 'arrayBuffer' | 'bytes'>): Promise<ArrayBuffer | Uint8Array>;
|
|
17
|
-
|
|
18
11
|
type AnyFunction = (...args: any[]) => any;
|
|
19
12
|
declare function once<T extends () => any>(fn: T): () => ReturnType<T>;
|
|
20
13
|
declare function sequential<A extends any[], R>(fn: (...args: A) => Promise<R>): (...args: A) => Promise<R>;
|
|
@@ -211,5 +204,5 @@ declare class AsyncIdQueue<T> {
|
|
|
211
204
|
type Value<T, TArgs extends any[] = []> = T | ((...args: TArgs) => T);
|
|
212
205
|
declare function value<T, TArgs extends any[]>(value: Value<T, TArgs>, ...args: NoInfer<TArgs>): T extends Value<infer U, any> ? U : never;
|
|
213
206
|
|
|
214
|
-
export { AsyncIdQueue, AsyncIteratorClass, EventPublisher, NullProtoObj, SequentialIdGenerator, clone, defer, findDeepMatches, get, intercept, isAsyncIteratorObject, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, parseEmptyableJSON,
|
|
207
|
+
export { AsyncIdQueue, AsyncIteratorClass, EventPublisher, NullProtoObj, SequentialIdGenerator, clone, defer, findDeepMatches, get, intercept, isAsyncIteratorObject, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, parseEmptyableJSON, replicateAsyncIterator, resolveMaybeOptionalOptions, sequential, splitInHalf, stringifyJSON, toArray, value };
|
|
215
208
|
export type { AnyFunction, AsyncIdQueueCloseOptions, AsyncIteratorClassCleanupFn, AsyncIteratorClassNextFn, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, MaybeOptionalOptions, OmitChainMethodDeep, OnFinishState, PromiseWithError, Registry, Segment, SetOptional, ThrowableError, Value };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,13 +8,6 @@ declare function resolveMaybeOptionalOptions<T>(rest: MaybeOptionalOptions<T>):
|
|
|
8
8
|
declare function toArray<T>(value: T): T extends readonly any[] ? T : Exclude<T, undefined | null>[];
|
|
9
9
|
declare function splitInHalf<T>(arr: readonly T[]): [T[], T[]];
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Converts Request/Response/Blob/File/.. to a buffer (ArrayBuffer or Uint8Array).
|
|
13
|
-
*
|
|
14
|
-
* Prefers the newer `.bytes` method when available as it more efficient but not widely supported yet.
|
|
15
|
-
*/
|
|
16
|
-
declare function readAsBuffer(source: Pick<Blob, 'arrayBuffer' | 'bytes'>): Promise<ArrayBuffer | Uint8Array>;
|
|
17
|
-
|
|
18
11
|
type AnyFunction = (...args: any[]) => any;
|
|
19
12
|
declare function once<T extends () => any>(fn: T): () => ReturnType<T>;
|
|
20
13
|
declare function sequential<A extends any[], R>(fn: (...args: A) => Promise<R>): (...args: A) => Promise<R>;
|
|
@@ -211,5 +204,5 @@ declare class AsyncIdQueue<T> {
|
|
|
211
204
|
type Value<T, TArgs extends any[] = []> = T | ((...args: TArgs) => T);
|
|
212
205
|
declare function value<T, TArgs extends any[]>(value: Value<T, TArgs>, ...args: NoInfer<TArgs>): T extends Value<infer U, any> ? U : never;
|
|
213
206
|
|
|
214
|
-
export { AsyncIdQueue, AsyncIteratorClass, EventPublisher, NullProtoObj, SequentialIdGenerator, clone, defer, findDeepMatches, get, intercept, isAsyncIteratorObject, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, parseEmptyableJSON,
|
|
207
|
+
export { AsyncIdQueue, AsyncIteratorClass, EventPublisher, NullProtoObj, SequentialIdGenerator, clone, defer, findDeepMatches, get, intercept, isAsyncIteratorObject, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, parseEmptyableJSON, replicateAsyncIterator, resolveMaybeOptionalOptions, sequential, splitInHalf, stringifyJSON, toArray, value };
|
|
215
208
|
export type { AnyFunction, AsyncIdQueueCloseOptions, AsyncIteratorClassCleanupFn, AsyncIteratorClassNextFn, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, MaybeOptionalOptions, OmitChainMethodDeep, OnFinishState, PromiseWithError, Registry, Segment, SetOptional, ThrowableError, Value };
|
package/dist/index.mjs
CHANGED
|
@@ -12,13 +12,6 @@ function splitInHalf(arr) {
|
|
|
12
12
|
return [arr.slice(0, half), arr.slice(half)];
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
function readAsBuffer(source) {
|
|
16
|
-
if (typeof source.bytes === "function") {
|
|
17
|
-
return source.bytes();
|
|
18
|
-
}
|
|
19
|
-
return source.arrayBuffer();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
15
|
function once(fn) {
|
|
23
16
|
let cached;
|
|
24
17
|
return () => {
|
|
@@ -127,7 +120,7 @@ function isAsyncIteratorObject(maybe) {
|
|
|
127
120
|
if (!maybe || typeof maybe !== "object") {
|
|
128
121
|
return false;
|
|
129
122
|
}
|
|
130
|
-
return
|
|
123
|
+
return Symbol.asyncIterator in maybe && typeof maybe[Symbol.asyncIterator] === "function";
|
|
131
124
|
}
|
|
132
125
|
const fallbackAsyncDisposeSymbol = Symbol.for("asyncDispose");
|
|
133
126
|
const asyncDisposeSymbol = Symbol.asyncDispose ?? fallbackAsyncDisposeSymbol;
|
|
@@ -456,4 +449,4 @@ function value(value2, ...args) {
|
|
|
456
449
|
return value2;
|
|
457
450
|
}
|
|
458
451
|
|
|
459
|
-
export { AsyncIdQueue, AsyncIteratorClass, EventPublisher, NullProtoObj, SequentialIdGenerator, clone, defer, findDeepMatches, get, intercept, isAsyncIteratorObject, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, parseEmptyableJSON,
|
|
452
|
+
export { AsyncIdQueue, AsyncIteratorClass, EventPublisher, NullProtoObj, SequentialIdGenerator, clone, defer, findDeepMatches, get, intercept, isAsyncIteratorObject, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, parseEmptyableJSON, replicateAsyncIterator, resolveMaybeOptionalOptions, sequential, splitInHalf, stringifyJSON, toArray, value };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.add5acf",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"arktype": "2.1.20",
|
|
32
32
|
"valibot": "^1.1.0",
|
|
33
|
-
"zod": "^3.25.
|
|
33
|
+
"zod": "^3.25.67"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "unbuild",
|