@trpc/server 11.0.0-next-alpha.153 → 11.0.0-next-alpha.154
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/adapters/aws-lambda/index.d.ts +1 -1
- package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/index.js +6 -13
- package/dist/adapters/aws-lambda/index.mjs +2 -9
- package/dist/adapters/aws-lambda/utils.d.ts +2 -3
- package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
- package/dist/adapters/express.d.ts +1 -1
- package/dist/adapters/express.d.ts.map +1 -1
- package/dist/adapters/express.js +3 -11
- package/dist/adapters/express.mjs +3 -11
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +1 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
- package/dist/adapters/fastify/index.js +6 -14
- package/dist/adapters/fastify/index.mjs +4 -12
- package/dist/adapters/fetch/fetchRequestHandler.d.ts +1 -1
- package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fetch/index.js +3 -12
- package/dist/adapters/fetch/index.mjs +1 -10
- package/dist/adapters/fetch/types.d.ts +1 -1
- package/dist/adapters/next.d.ts +3 -2
- package/dist/adapters/next.d.ts.map +1 -1
- package/dist/adapters/next.js +5 -13
- package/dist/adapters/next.mjs +3 -11
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/json/index.js +4 -5
- package/dist/adapters/node-http/content-type/json/index.mjs +2 -3
- package/dist/adapters/node-http/index.js +3 -11
- package/dist/adapters/node-http/index.mjs +3 -11
- package/dist/adapters/node-http/internals/contentType.d.ts +2 -2
- package/dist/adapters/node-http/internals/contentType.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/types.d.ts +1 -2
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/standalone.d.ts +1 -1
- package/dist/adapters/standalone.d.ts.map +1 -1
- package/dist/adapters/standalone.js +3 -11
- package/dist/adapters/standalone.mjs +3 -11
- package/dist/adapters/ws.d.ts +3 -3
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/adapters/ws.js +25 -31
- package/dist/adapters/ws.mjs +3 -9
- package/dist/bundle-analysis.json +74 -604
- package/dist/http.d.ts +2 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +14 -0
- package/dist/http.mjs +1 -0
- package/dist/index.d.ts +15 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -95
- package/dist/index.mjs +1 -90
- package/dist/{nodeHTTPRequestHandler-a7049e69.js → nodeHTTPRequestHandler-30028c9a.js} +3 -5
- package/dist/{nodeHTTPRequestHandler-ca65b7c9.mjs → nodeHTTPRequestHandler-36974696.mjs} +1 -3
- package/dist/{nodeHTTPRequestHandler-abbfb330.js → nodeHTTPRequestHandler-640c1f60.js} +1 -3
- package/dist/observable.d.ts +2 -0
- package/dist/observable.d.ts.map +1 -0
- package/dist/observable.js +14 -0
- package/dist/observable.mjs +1 -0
- package/dist/rpc.d.ts +2 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +14 -0
- package/dist/rpc.mjs +1 -0
- package/dist/unstableDoNotImportThis.d.ts +9 -0
- package/dist/unstableDoNotImportThis.d.ts.map +1 -0
- package/package.json +32 -41
- package/src/adapters/aws-lambda/index.ts +2 -3
- package/src/adapters/aws-lambda/utils.ts +3 -4
- package/src/adapters/express.ts +1 -1
- package/src/adapters/fastify/fastifyRequestHandler.ts +4 -3
- package/src/adapters/fastify/fastifyTRPCPlugin.ts +1 -1
- package/src/adapters/fetch/fetchRequestHandler.ts +4 -3
- package/src/adapters/fetch/types.ts +1 -1
- package/src/adapters/next.ts +3 -8
- package/src/adapters/node-http/content-type/form-data/index.ts +1 -1
- package/src/adapters/node-http/content-type/json/getPostBody.ts +2 -2
- package/src/adapters/node-http/content-type/json/index.ts +1 -1
- package/src/adapters/node-http/internals/contentType.ts +2 -2
- package/src/adapters/node-http/nodeHTTPRequestHandler.ts +4 -3
- package/src/adapters/node-http/types.ts +1 -2
- package/src/adapters/standalone.ts +1 -1
- package/src/adapters/ws.ts +14 -9
- package/src/http.ts +2 -0
- package/src/index.ts +30 -14
- package/src/observable.ts +1 -0
- package/src/rpc.ts +2 -0
- package/src/unstableDoNotImportThis.ts +9 -0
- package/dist/TRPCError-0b220715.js +0 -42
- package/dist/TRPCError-2bb6a7d0.js +0 -37
- package/dist/TRPCError-7e8e2a1b.mjs +0 -39
- package/dist/batchStreamFormatter-2c1405a1.js +0 -31
- package/dist/batchStreamFormatter-93cdcdd4.js +0 -32
- package/dist/batchStreamFormatter-fc1ffb26.mjs +0 -30
- package/dist/codes-62b059d2.js +0 -48
- package/dist/codes-87f6824b.js +0 -48
- package/dist/codes-c924c3db.mjs +0 -44
- package/dist/config-50853f49.mjs +0 -6
- package/dist/config-774dae36.js +0 -8
- package/dist/config-e3dd843b.js +0 -11
- package/dist/contentType-0447b256.js +0 -58
- package/dist/contentType-31223e57.mjs +0 -52
- package/dist/contentType-a229790b.js +0 -54
- package/dist/core/index.d.ts +0 -9
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/initTRPC.d.ts +0 -84
- package/dist/core/initTRPC.d.ts.map +0 -1
- package/dist/core/internals/config.d.ts +0 -75
- package/dist/core/internals/config.d.ts.map +0 -1
- package/dist/core/internals/getParseFn.d.ts +0 -4
- package/dist/core/internals/getParseFn.d.ts.map +0 -1
- package/dist/core/internals/mergeRouters.d.ts +0 -15
- package/dist/core/internals/mergeRouters.d.ts.map +0 -1
- package/dist/core/internals/mergeWithoutOverrides.d.ts +0 -5
- package/dist/core/internals/mergeWithoutOverrides.d.ts.map +0 -1
- package/dist/core/internals/omitPrototype.d.ts +0 -6
- package/dist/core/internals/omitPrototype.d.ts.map +0 -1
- package/dist/core/internals/procedureBuilder.d.ts +0 -99
- package/dist/core/internals/procedureBuilder.d.ts.map +0 -1
- package/dist/core/internals/utils.d.ts +0 -50
- package/dist/core/internals/utils.d.ts.map +0 -1
- package/dist/core/middleware.d.ts +0 -106
- package/dist/core/middleware.d.ts.map +0 -1
- package/dist/core/parser.d.ts +0 -28
- package/dist/core/parser.d.ts.map +0 -1
- package/dist/core/procedure.d.ts +0 -54
- package/dist/core/procedure.d.ts.map +0 -1
- package/dist/core/router.d.ts +0 -64
- package/dist/core/router.d.ts.map +0 -1
- package/dist/core/types.d.ts +0 -24
- package/dist/core/types.d.ts.map +0 -1
- package/dist/error/TRPCError.d.ts +0 -12
- package/dist/error/TRPCError.d.ts.map +0 -1
- package/dist/error/formatter.d.ts +0 -33
- package/dist/error/formatter.d.ts.map +0 -1
- package/dist/error/utils.d.ts +0 -9
- package/dist/error/utils.d.ts.map +0 -1
- package/dist/getCauseFromUnknown-2d66414a.mjs +0 -33
- package/dist/getCauseFromUnknown-ac5f46a2.js +0 -34
- package/dist/getCauseFromUnknown-d535264a.js +0 -35
- package/dist/http/batchStreamFormatter.d.ts +0 -24
- package/dist/http/batchStreamFormatter.d.ts.map +0 -1
- package/dist/http/contentType.d.ts +0 -29
- package/dist/http/contentType.d.ts.map +0 -1
- package/dist/http/getHTTPStatusCode.d.ts +0 -24
- package/dist/http/getHTTPStatusCode.d.ts.map +0 -1
- package/dist/http/index.d.ts +0 -5
- package/dist/http/index.d.ts.map +0 -1
- package/dist/http/index.js +0 -22
- package/dist/http/index.mjs +0 -10
- package/dist/http/internals/types.d.ts +0 -32
- package/dist/http/internals/types.d.ts.map +0 -1
- package/dist/http/resolveHTTPResponse.d.ts +0 -52
- package/dist/http/resolveHTTPResponse.d.ts.map +0 -1
- package/dist/http/types.d.ts +0 -46
- package/dist/http/types.d.ts.map +0 -1
- package/dist/index-8759c3db.js +0 -48
- package/dist/index-a496f86b.js +0 -52
- package/dist/index-a9e3e610.mjs +0 -49
- package/dist/internals/invert.d.ts +0 -12
- package/dist/internals/invert.d.ts.map +0 -1
- package/dist/internals/types.d.ts +0 -26
- package/dist/internals/types.d.ts.map +0 -1
- package/dist/observable/index.d.ts +0 -5
- package/dist/observable/index.d.ts.map +0 -1
- package/dist/observable/index.js +0 -156
- package/dist/observable/index.mjs +0 -147
- package/dist/observable/internals/identity.d.ts +0 -2
- package/dist/observable/internals/identity.d.ts.map +0 -1
- package/dist/observable/internals/observableToPromise.d.ts +0 -10
- package/dist/observable/internals/observableToPromise.d.ts.map +0 -1
- package/dist/observable/internals/pipe.d.ts +0 -4
- package/dist/observable/internals/pipe.d.ts.map +0 -1
- package/dist/observable/observable.d.ts +0 -5
- package/dist/observable/observable.d.ts.map +0 -1
- package/dist/observable/operators/index.d.ts +0 -4
- package/dist/observable/operators/index.d.ts.map +0 -1
- package/dist/observable/operators/map.d.ts +0 -3
- package/dist/observable/operators/map.d.ts.map +0 -1
- package/dist/observable/operators/share.d.ts +0 -6
- package/dist/observable/operators/share.d.ts.map +0 -1
- package/dist/observable/operators/tap.d.ts +0 -3
- package/dist/observable/operators/tap.d.ts.map +0 -1
- package/dist/observable/types.d.ts +0 -29
- package/dist/observable/types.d.ts.map +0 -1
- package/dist/observable-15588f28.js +0 -83
- package/dist/observable-464116ac.js +0 -84
- package/dist/observable-ade1bad8.mjs +0 -81
- package/dist/parseTRPCMessage-1377f305.js +0 -56
- package/dist/parseTRPCMessage-95955211.js +0 -63
- package/dist/parseTRPCMessage-a0f17853.mjs +0 -54
- package/dist/procedureBuilder-0446e596.js +0 -327
- package/dist/procedureBuilder-4b68e226.js +0 -349
- package/dist/procedureBuilder-cf58dadb.mjs +0 -340
- package/dist/resolveHTTPResponse-3ebaa4f6.mjs +0 -292
- package/dist/resolveHTTPResponse-7c84e387.js +0 -294
- package/dist/resolveHTTPResponse-fa37ffd7.js +0 -266
- package/dist/router-18d63731.js +0 -163
- package/dist/router-8dcebd61.js +0 -153
- package/dist/router-f9ce121f.mjs +0 -156
- package/dist/rpc/codes.d.ts +0 -51
- package/dist/rpc/codes.d.ts.map +0 -1
- package/dist/rpc/envelopes.d.ts +0 -95
- package/dist/rpc/envelopes.d.ts.map +0 -1
- package/dist/rpc/index.d.ts +0 -4
- package/dist/rpc/index.d.ts.map +0 -1
- package/dist/rpc/index.js +0 -12
- package/dist/rpc/index.mjs +0 -2
- package/dist/rpc/parseTRPCMessage.d.ts +0 -5
- package/dist/rpc/parseTRPCMessage.d.ts.map +0 -1
- package/dist/shared/createProxy/index.d.ts +0 -19
- package/dist/shared/createProxy/index.d.ts.map +0 -1
- package/dist/shared/getCauseFromUnknown.d.ts +0 -2
- package/dist/shared/getCauseFromUnknown.d.ts.map +0 -1
- package/dist/shared/getErrorShape.d.ts +0 -15
- package/dist/shared/getErrorShape.d.ts.map +0 -1
- package/dist/shared/index.d.ts +0 -8
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/index.js +0 -16
- package/dist/shared/index.mjs +0 -4
- package/dist/shared/internal/serialize.d.ts +0 -62
- package/dist/shared/internal/serialize.d.ts.map +0 -1
- package/dist/shared/jsonify.d.ts +0 -11
- package/dist/shared/jsonify.d.ts.map +0 -1
- package/dist/shared/transformTRPCResponse.d.ts +0 -9
- package/dist/shared/transformTRPCResponse.d.ts.map +0 -1
- package/dist/shared/types.d.ts +0 -6
- package/dist/shared/types.d.ts.map +0 -1
- package/dist/transformTRPCResponse-31040a38.mjs +0 -98
- package/dist/transformTRPCResponse-59486a84.js +0 -97
- package/dist/transformTRPCResponse-9f3b865f.js +0 -104
- package/dist/transformer.d.ts +0 -67
- package/dist/transformer.d.ts.map +0 -1
- package/dist/types.d.ts +0 -68
- package/dist/types.d.ts.map +0 -1
- package/dist/unstableInternalsExport.d.ts +0 -12
- package/dist/unstableInternalsExport.d.ts.map +0 -1
- package/dist/unstableInternalsExport.js +0 -16
- package/dist/unstableInternalsExport.mjs +0 -5
- package/src/core/index.ts +0 -28
- package/src/core/initTRPC.ts +0 -186
- package/src/core/internals/config.ts +0 -90
- package/src/core/internals/getParseFn.ts +0 -43
- package/src/core/internals/mergeRouters.ts +0 -90
- package/src/core/internals/mergeWithoutOverrides.ts +0 -19
- package/src/core/internals/omitPrototype.ts +0 -9
- package/src/core/internals/procedureBuilder.ts +0 -455
- package/src/core/internals/utils.ts +0 -79
- package/src/core/middleware.ts +0 -236
- package/src/core/parser.ts +0 -52
- package/src/core/procedure.ts +0 -68
- package/src/core/router.ts +0 -241
- package/src/core/types.ts +0 -67
- package/src/error/TRPCError.ts +0 -52
- package/src/error/formatter.ts +0 -54
- package/src/error/utils.ts +0 -23
- package/src/http/batchStreamFormatter.ts +0 -29
- package/src/http/contentType.ts +0 -99
- package/src/http/getHTTPStatusCode.ts +0 -61
- package/src/http/index.ts +0 -4
- package/src/http/internals/types.ts +0 -40
- package/src/http/resolveHTTPResponse.ts +0 -458
- package/src/http/types.ts +0 -51
- package/src/internals/invert.ts +0 -21
- package/src/internals/types.ts +0 -27
- package/src/observable/index.ts +0 -4
- package/src/observable/internals/identity.ts +0 -3
- package/src/observable/internals/observableToPromise.ts +0 -49
- package/src/observable/internals/pipe.ts +0 -23
- package/src/observable/observable.ts +0 -78
- package/src/observable/operators/index.ts +0 -3
- package/src/observable/operators/map.ts +0 -25
- package/src/observable/operators/share.ts +0 -65
- package/src/observable/operators/tap.ts +0 -26
- package/src/observable/types.ts +0 -80
- package/src/rpc/codes.ts +0 -44
- package/src/rpc/envelopes.ts +0 -136
- package/src/rpc/index.ts +0 -3
- package/src/rpc/parseTRPCMessage.ts +0 -84
- package/src/shared/createProxy/index.ts +0 -59
- package/src/shared/getCauseFromUnknown.ts +0 -31
- package/src/shared/getErrorShape.ts +0 -36
- package/src/shared/index.ts +0 -11
- package/src/shared/internal/serialize.ts +0 -122
- package/src/shared/jsonify.ts +0 -22
- package/src/shared/transformTRPCResponse.ts +0 -40
- package/src/shared/types.ts +0 -9
- package/src/transformer.ts +0 -84
- package/src/types.ts +0 -104
- package/src/unstableInternalsExport.ts +0 -13
- package/subscription/index.d.ts +0 -1
- package/subscription/index.js +0 -1
- package/unstableInternalsExport/index.d.ts +0 -1
- package/unstableInternalsExport/index.js +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface Unsubscribable {
|
|
2
|
-
unsubscribe(): void;
|
|
3
|
-
}
|
|
4
|
-
export type UnsubscribeFn = () => void;
|
|
5
|
-
export interface Subscribable<TValue, TError> {
|
|
6
|
-
subscribe(observer: Partial<Observer<TValue, TError>>): Unsubscribable;
|
|
7
|
-
}
|
|
8
|
-
export interface Observable<TValue, TError> extends Subscribable<TValue, TError> {
|
|
9
|
-
pipe(): Observable<TValue, TError>;
|
|
10
|
-
pipe<TValue1, TError1>(op1: OperatorFunction<TValue, TError, TValue1, TError1>): Observable<TValue1, TError1>;
|
|
11
|
-
pipe<TValue1, TError1, TValue2, TError2>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>): Observable<TValue2, TError2>;
|
|
12
|
-
pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>, op3: OperatorFunction<TValue2, TError2, TValue3, TError3>): Observable<TValue2, TError2>;
|
|
13
|
-
pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3, TValue4, TError4>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>, op3: OperatorFunction<TValue2, TError2, TValue3, TError3>, op4: OperatorFunction<TValue3, TError3, TValue4, TError4>): Observable<TValue2, TError2>;
|
|
14
|
-
pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3, TValue4, TError4, TValue5, TError5>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>, op3: OperatorFunction<TValue2, TError2, TValue3, TError3>, op4: OperatorFunction<TValue3, TError3, TValue4, TError4>, op5: OperatorFunction<TValue4, TError4, TValue5, TError5>): Observable<TValue2, TError2>;
|
|
15
|
-
}
|
|
16
|
-
export interface SubscriptionLike extends Unsubscribable {
|
|
17
|
-
unsubscribe(): void;
|
|
18
|
-
readonly closed: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface Observer<TValue, TError> {
|
|
21
|
-
next: (value: TValue) => void;
|
|
22
|
-
error: (err: TError) => void;
|
|
23
|
-
complete: () => void;
|
|
24
|
-
}
|
|
25
|
-
export type TeardownLogic = Unsubscribable | UnsubscribeFn | void;
|
|
26
|
-
export type UnaryFunction<TSource, TReturn> = (source: TSource) => TReturn;
|
|
27
|
-
export type OperatorFunction<TValueBefore, TErrorBefore, TValueAfter, TErrorAfter> = UnaryFunction<Subscribable<TValueBefore, TErrorBefore>, Subscribable<TValueAfter, TErrorAfter>>;
|
|
28
|
-
export type MonoTypeOperatorFunction<TValue, TError> = OperatorFunction<TValue, TError, TValue, TError>;
|
|
29
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/observable/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,IAAI,CAAC;CACrB;AACD,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AACvC,MAAM,WAAW,YAAY,CAAC,MAAM,EAAE,MAAM;IAC1C,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,cAAc,CAAC;CACxE;AACD,MAAM,WAAW,UAAU,CAAC,MAAM,EAAE,MAAM,CACxC,SAAQ,YAAY,CAAC,MAAM,EAAE,MAAM,C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Y,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,IACT,aAAa,CACf,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,EACxC,YAAY,CAAC,WAAW,EAAE,WAAW,CAAC,CACvC,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,MAAM,EAAE,MAAM,IAAI,gBAAgB,CACrE,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,CACP,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
function identity(x) {
|
|
2
|
-
return x;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/** @internal */
|
|
6
|
-
function pipeFromArray(fns) {
|
|
7
|
-
if (fns.length === 0) {
|
|
8
|
-
return identity;
|
|
9
|
-
}
|
|
10
|
-
if (fns.length === 1) {
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12
|
-
return fns[0];
|
|
13
|
-
}
|
|
14
|
-
return function piped(input) {
|
|
15
|
-
return fns.reduce((prev, fn) => fn(prev), input);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function isObservable(x) {
|
|
20
|
-
return typeof x === 'object' && x !== null && 'subscribe' in x;
|
|
21
|
-
}
|
|
22
|
-
function observable(subscribe) {
|
|
23
|
-
const self = {
|
|
24
|
-
subscribe(observer) {
|
|
25
|
-
let teardownRef = null;
|
|
26
|
-
let isDone = false;
|
|
27
|
-
let unsubscribed = false;
|
|
28
|
-
let teardownImmediately = false;
|
|
29
|
-
function unsubscribe() {
|
|
30
|
-
if (teardownRef === null) {
|
|
31
|
-
teardownImmediately = true;
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (unsubscribed) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
unsubscribed = true;
|
|
38
|
-
if (typeof teardownRef === 'function') {
|
|
39
|
-
teardownRef();
|
|
40
|
-
}
|
|
41
|
-
else if (teardownRef) {
|
|
42
|
-
teardownRef.unsubscribe();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
teardownRef = subscribe({
|
|
46
|
-
next(value) {
|
|
47
|
-
if (isDone) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
observer.next?.(value);
|
|
51
|
-
},
|
|
52
|
-
error(err) {
|
|
53
|
-
if (isDone) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
isDone = true;
|
|
57
|
-
observer.error?.(err);
|
|
58
|
-
unsubscribe();
|
|
59
|
-
},
|
|
60
|
-
complete() {
|
|
61
|
-
if (isDone) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
isDone = true;
|
|
65
|
-
observer.complete?.();
|
|
66
|
-
unsubscribe();
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
if (teardownImmediately) {
|
|
70
|
-
unsubscribe();
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
unsubscribe,
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
pipe(...operations) {
|
|
77
|
-
return pipeFromArray(operations)(self);
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
return self;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export { isObservable as i, observable as o };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function identity(x) {
|
|
4
|
-
return x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/** @internal */ function pipeFromArray(fns) {
|
|
8
|
-
if (fns.length === 0) {
|
|
9
|
-
return identity;
|
|
10
|
-
}
|
|
11
|
-
if (fns.length === 1) {
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
13
|
-
return fns[0];
|
|
14
|
-
}
|
|
15
|
-
return function piped(input) {
|
|
16
|
-
return fns.reduce((prev, fn)=>fn(prev), input);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function isObservable(x) {
|
|
21
|
-
return typeof x === 'object' && x !== null && 'subscribe' in x;
|
|
22
|
-
}
|
|
23
|
-
function observable(subscribe) {
|
|
24
|
-
const self = {
|
|
25
|
-
subscribe (observer) {
|
|
26
|
-
let teardownRef = null;
|
|
27
|
-
let isDone = false;
|
|
28
|
-
let unsubscribed = false;
|
|
29
|
-
let teardownImmediately = false;
|
|
30
|
-
function unsubscribe() {
|
|
31
|
-
if (teardownRef === null) {
|
|
32
|
-
teardownImmediately = true;
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (unsubscribed) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
unsubscribed = true;
|
|
39
|
-
if (typeof teardownRef === 'function') {
|
|
40
|
-
teardownRef();
|
|
41
|
-
} else if (teardownRef) {
|
|
42
|
-
teardownRef.unsubscribe();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
teardownRef = subscribe({
|
|
46
|
-
next (value) {
|
|
47
|
-
if (isDone) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
observer.next?.(value);
|
|
51
|
-
},
|
|
52
|
-
error (err) {
|
|
53
|
-
if (isDone) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
isDone = true;
|
|
57
|
-
observer.error?.(err);
|
|
58
|
-
unsubscribe();
|
|
59
|
-
},
|
|
60
|
-
complete () {
|
|
61
|
-
if (isDone) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
isDone = true;
|
|
65
|
-
observer.complete?.();
|
|
66
|
-
unsubscribe();
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
if (teardownImmediately) {
|
|
70
|
-
unsubscribe();
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
unsubscribe
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
pipe (...operations) {
|
|
77
|
-
return pipeFromArray(operations)(self);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
return self;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
exports.isObservable = isObservable;
|
|
84
|
-
exports.observable = observable;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
function identity(x) {
|
|
2
|
-
return x;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/** @internal */ function pipeFromArray(fns) {
|
|
6
|
-
if (fns.length === 0) {
|
|
7
|
-
return identity;
|
|
8
|
-
}
|
|
9
|
-
if (fns.length === 1) {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11
|
-
return fns[0];
|
|
12
|
-
}
|
|
13
|
-
return function piped(input) {
|
|
14
|
-
return fns.reduce((prev, fn)=>fn(prev), input);
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function isObservable(x) {
|
|
19
|
-
return typeof x === 'object' && x !== null && 'subscribe' in x;
|
|
20
|
-
}
|
|
21
|
-
function observable(subscribe) {
|
|
22
|
-
const self = {
|
|
23
|
-
subscribe (observer) {
|
|
24
|
-
let teardownRef = null;
|
|
25
|
-
let isDone = false;
|
|
26
|
-
let unsubscribed = false;
|
|
27
|
-
let teardownImmediately = false;
|
|
28
|
-
function unsubscribe() {
|
|
29
|
-
if (teardownRef === null) {
|
|
30
|
-
teardownImmediately = true;
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (unsubscribed) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
unsubscribed = true;
|
|
37
|
-
if (typeof teardownRef === 'function') {
|
|
38
|
-
teardownRef();
|
|
39
|
-
} else if (teardownRef) {
|
|
40
|
-
teardownRef.unsubscribe();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
teardownRef = subscribe({
|
|
44
|
-
next (value) {
|
|
45
|
-
if (isDone) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
observer.next?.(value);
|
|
49
|
-
},
|
|
50
|
-
error (err) {
|
|
51
|
-
if (isDone) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
isDone = true;
|
|
55
|
-
observer.error?.(err);
|
|
56
|
-
unsubscribe();
|
|
57
|
-
},
|
|
58
|
-
complete () {
|
|
59
|
-
if (isDone) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
isDone = true;
|
|
63
|
-
observer.complete?.();
|
|
64
|
-
unsubscribe();
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
if (teardownImmediately) {
|
|
68
|
-
unsubscribe();
|
|
69
|
-
}
|
|
70
|
-
return {
|
|
71
|
-
unsubscribe
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
pipe (...operations) {
|
|
75
|
-
return pipeFromArray(operations)(self);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
return self;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export { isObservable as i, observable as o };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/* istanbul ignore next -- @preserve */ function assertIsObject(obj) {
|
|
4
|
-
if (typeof obj !== 'object' || Array.isArray(obj) || !obj) {
|
|
5
|
-
throw new Error('Not an object');
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
/* istanbul ignore next -- @preserve */ function assertIsProcedureType(obj) {
|
|
9
|
-
if (obj !== 'query' && obj !== 'subscription' && obj !== 'mutation') {
|
|
10
|
-
throw new Error('Invalid procedure type');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
/* istanbul ignore next -- @preserve */ function assertIsRequestId(obj) {
|
|
14
|
-
if (obj !== null && typeof obj === 'number' && isNaN(obj) && typeof obj !== 'string') {
|
|
15
|
-
throw new Error('Invalid request id');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
/* istanbul ignore next -- @preserve */ function assertIsString(obj) {
|
|
19
|
-
if (typeof obj !== 'string') {
|
|
20
|
-
throw new Error('Invalid string');
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/* istanbul ignore next -- @preserve */ function assertIsJSONRPC2OrUndefined(obj) {
|
|
24
|
-
if (typeof obj !== 'undefined' && obj !== '2.0') {
|
|
25
|
-
throw new Error('Must be JSONRPC 2.0');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/** @public */ function parseTRPCMessage(obj, transformer) {
|
|
29
|
-
assertIsObject(obj);
|
|
30
|
-
const { id , jsonrpc , method , params } = obj;
|
|
31
|
-
assertIsRequestId(id);
|
|
32
|
-
assertIsJSONRPC2OrUndefined(jsonrpc);
|
|
33
|
-
if (method === 'subscription.stop') {
|
|
34
|
-
return {
|
|
35
|
-
id,
|
|
36
|
-
jsonrpc,
|
|
37
|
-
method
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
assertIsProcedureType(method);
|
|
41
|
-
assertIsObject(params);
|
|
42
|
-
const { input: rawInput , path } = params;
|
|
43
|
-
assertIsString(path);
|
|
44
|
-
const input = transformer.input.deserialize(rawInput);
|
|
45
|
-
return {
|
|
46
|
-
id,
|
|
47
|
-
jsonrpc,
|
|
48
|
-
method,
|
|
49
|
-
params: {
|
|
50
|
-
input,
|
|
51
|
-
path
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
exports.parseTRPCMessage = parseTRPCMessage;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/* istanbul ignore next -- @preserve */
|
|
2
|
-
function assertIsObject(obj) {
|
|
3
|
-
if (typeof obj !== 'object' || Array.isArray(obj) || !obj) {
|
|
4
|
-
throw new Error('Not an object');
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
/* istanbul ignore next -- @preserve */
|
|
8
|
-
function assertIsProcedureType(obj) {
|
|
9
|
-
if (obj !== 'query' && obj !== 'subscription' && obj !== 'mutation') {
|
|
10
|
-
throw new Error('Invalid procedure type');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
/* istanbul ignore next -- @preserve */
|
|
14
|
-
function assertIsRequestId(obj) {
|
|
15
|
-
if (obj !== null &&
|
|
16
|
-
typeof obj === 'number' &&
|
|
17
|
-
isNaN(obj) &&
|
|
18
|
-
typeof obj !== 'string') {
|
|
19
|
-
throw new Error('Invalid request id');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/* istanbul ignore next -- @preserve */
|
|
23
|
-
function assertIsString(obj) {
|
|
24
|
-
if (typeof obj !== 'string') {
|
|
25
|
-
throw new Error('Invalid string');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/* istanbul ignore next -- @preserve */
|
|
29
|
-
function assertIsJSONRPC2OrUndefined(obj) {
|
|
30
|
-
if (typeof obj !== 'undefined' && obj !== '2.0') {
|
|
31
|
-
throw new Error('Must be JSONRPC 2.0');
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/** @public */
|
|
35
|
-
function parseTRPCMessage(obj, transformer) {
|
|
36
|
-
assertIsObject(obj);
|
|
37
|
-
const { id, jsonrpc, method, params } = obj;
|
|
38
|
-
assertIsRequestId(id);
|
|
39
|
-
assertIsJSONRPC2OrUndefined(jsonrpc);
|
|
40
|
-
if (method === 'subscription.stop') {
|
|
41
|
-
return {
|
|
42
|
-
id,
|
|
43
|
-
jsonrpc,
|
|
44
|
-
method,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
assertIsProcedureType(method);
|
|
48
|
-
assertIsObject(params);
|
|
49
|
-
const { input: rawInput, path } = params;
|
|
50
|
-
assertIsString(path);
|
|
51
|
-
const input = transformer.input.deserialize(rawInput);
|
|
52
|
-
return {
|
|
53
|
-
id,
|
|
54
|
-
jsonrpc,
|
|
55
|
-
method,
|
|
56
|
-
params: {
|
|
57
|
-
input,
|
|
58
|
-
path,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export { parseTRPCMessage as p };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/* istanbul ignore next -- @preserve */ function assertIsObject(obj) {
|
|
2
|
-
if (typeof obj !== 'object' || Array.isArray(obj) || !obj) {
|
|
3
|
-
throw new Error('Not an object');
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
/* istanbul ignore next -- @preserve */ function assertIsProcedureType(obj) {
|
|
7
|
-
if (obj !== 'query' && obj !== 'subscription' && obj !== 'mutation') {
|
|
8
|
-
throw new Error('Invalid procedure type');
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/* istanbul ignore next -- @preserve */ function assertIsRequestId(obj) {
|
|
12
|
-
if (obj !== null && typeof obj === 'number' && isNaN(obj) && typeof obj !== 'string') {
|
|
13
|
-
throw new Error('Invalid request id');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/* istanbul ignore next -- @preserve */ function assertIsString(obj) {
|
|
17
|
-
if (typeof obj !== 'string') {
|
|
18
|
-
throw new Error('Invalid string');
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/* istanbul ignore next -- @preserve */ function assertIsJSONRPC2OrUndefined(obj) {
|
|
22
|
-
if (typeof obj !== 'undefined' && obj !== '2.0') {
|
|
23
|
-
throw new Error('Must be JSONRPC 2.0');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/** @public */ function parseTRPCMessage(obj, transformer) {
|
|
27
|
-
assertIsObject(obj);
|
|
28
|
-
const { id , jsonrpc , method , params } = obj;
|
|
29
|
-
assertIsRequestId(id);
|
|
30
|
-
assertIsJSONRPC2OrUndefined(jsonrpc);
|
|
31
|
-
if (method === 'subscription.stop') {
|
|
32
|
-
return {
|
|
33
|
-
id,
|
|
34
|
-
jsonrpc,
|
|
35
|
-
method
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
assertIsProcedureType(method);
|
|
39
|
-
assertIsObject(params);
|
|
40
|
-
const { input: rawInput , path } = params;
|
|
41
|
-
assertIsString(path);
|
|
42
|
-
const input = transformer.input.deserialize(rawInput);
|
|
43
|
-
return {
|
|
44
|
-
id,
|
|
45
|
-
jsonrpc,
|
|
46
|
-
method,
|
|
47
|
-
params: {
|
|
48
|
-
input,
|
|
49
|
-
path
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { parseTRPCMessage as p };
|