@trpc/client 10.0.0-proxy-alpha.76 → 10.0.0-proxy-alpha.77

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 (34) hide show
  1. package/dist/TRPCClientError.d.ts +3 -3
  2. package/dist/TRPCClientError.d.ts.map +1 -1
  3. package/dist/createTRPCClient.d.ts +22 -3
  4. package/dist/createTRPCClient.d.ts.map +1 -1
  5. package/dist/createTRPCClientProxy.d.ts +7 -15
  6. package/dist/createTRPCClientProxy.d.ts.map +1 -1
  7. package/dist/{httpUtils-ad4258b6.mjs → httpUtils-5b17f7da.mjs} +36 -5
  8. package/dist/{httpUtils-0961d5e3.js → httpUtils-73a50af6.js} +37 -4
  9. package/dist/index.js +106 -138
  10. package/dist/index.mjs +107 -139
  11. package/dist/internals/TRPCClient.d.ts +5 -31
  12. package/dist/internals/TRPCClient.d.ts.map +1 -1
  13. package/dist/internals/fetchHelpers.d.ts +2 -1
  14. package/dist/internals/fetchHelpers.d.ts.map +1 -1
  15. package/dist/links/httpBatchLink.d.ts.map +1 -1
  16. package/dist/links/httpBatchLink.js +4 -3
  17. package/dist/links/httpBatchLink.mjs +4 -3
  18. package/dist/links/httpLink.d.ts.map +1 -1
  19. package/dist/links/httpLink.js +3 -3
  20. package/dist/links/httpLink.mjs +3 -3
  21. package/dist/links/internals/httpUtils.d.ts +26 -2
  22. package/dist/links/internals/httpUtils.d.ts.map +1 -1
  23. package/dist/links/types.d.ts +30 -3
  24. package/dist/links/types.d.ts.map +1 -1
  25. package/package.json +4 -4
  26. package/src/TRPCClientError.ts +3 -3
  27. package/src/createTRPCClient.ts +35 -5
  28. package/src/createTRPCClientProxy.ts +17 -15
  29. package/src/internals/TRPCClient.ts +12 -78
  30. package/src/internals/fetchHelpers.ts +5 -3
  31. package/src/links/httpBatchLink.ts +10 -2
  32. package/src/links/httpLink.ts +7 -3
  33. package/src/links/internals/httpUtils.ts +44 -6
  34. package/src/links/types.ts +30 -3
package/dist/index.mjs CHANGED
@@ -1,36 +1,108 @@
1
- import { observable, share, observableToPromise } from '@trpc/server/observable';
1
+ import { share, observableToPromise, observable } from '@trpc/server/observable';
2
2
  import { T as TRPCClientError } from './transformResult-106791d7.mjs';
3
3
  export { T as TRPCClientError } from './transformResult-106791d7.mjs';
4
- import { httpBatchLink } from './links/httpBatchLink.mjs';
5
- export { httpBatchLink } from './links/httpBatchLink.mjs';
6
4
  import { c as createChain } from './splitLink-ad44a55d.mjs';
7
5
  export { s as splitLink } from './splitLink-ad44a55d.mjs';
6
+ import { httpBatchLink } from './links/httpBatchLink.mjs';
7
+ export { httpBatchLink } from './links/httpBatchLink.mjs';
8
8
  import { createProxy } from '@trpc/server/shared';
9
+ export { g as getFetch } from './httpUtils-5b17f7da.mjs';
9
10
  export { httpLink } from './links/httpLink.mjs';
10
11
  export { loggerLink } from './links/loggerLink.mjs';
11
12
  export { createWSClient, wsLink } from './links/wsLink.mjs';
12
- import './httpUtils-ad4258b6.mjs';
13
13
 
14
- function getWindow() {
15
- if (typeof window !== 'undefined') {
16
- return window;
14
+ class TRPCClient {
15
+ getRequestId() {
16
+ return ++this.requestId;
17
17
  }
18
- return globalThis;
19
- }
20
- function getAbortController(ac) {
21
- return (ac ?? getWindow().AbortController) ?? undefined;
22
- }
23
-
24
- function getFetch(f) {
25
- if (f) {
26
- return f;
18
+ $request({ type , input , path , context ={} }) {
19
+ const chain$ = createChain({
20
+ links: this.links,
21
+ op: {
22
+ id: this.getRequestId(),
23
+ type,
24
+ path,
25
+ input,
26
+ context
27
+ }
28
+ });
29
+ return chain$.pipe(share());
30
+ }
31
+ requestAsPromise(opts) {
32
+ const req$ = this.$request(opts);
33
+ const { promise , abort } = observableToPromise(req$);
34
+ const abortablePromise = new Promise((resolve, reject)=>{
35
+ opts.signal?.addEventListener('abort', abort);
36
+ promise.then((envelope)=>{
37
+ resolve(envelope.result.data);
38
+ }).catch((err)=>{
39
+ reject(TRPCClientError.from(err));
40
+ });
41
+ });
42
+ return abortablePromise;
43
+ }
44
+ query(path, input, opts) {
45
+ return this.requestAsPromise({
46
+ type: 'query',
47
+ path,
48
+ input: input,
49
+ context: opts?.context,
50
+ signal: opts?.signal
51
+ });
52
+ }
53
+ mutation(path, input, opts) {
54
+ return this.requestAsPromise({
55
+ type: 'mutation',
56
+ path,
57
+ input: input,
58
+ context: opts?.context,
59
+ signal: opts?.signal
60
+ });
27
61
  }
28
- const win = getWindow();
29
- const globalFetch = win.fetch;
30
- if (globalFetch) {
31
- return typeof globalFetch.bind === 'function' ? globalFetch.bind(win) : globalFetch;
62
+ subscription(path, input, opts) {
63
+ const observable$ = this.$request({
64
+ type: 'subscription',
65
+ path,
66
+ input,
67
+ context: opts?.context
68
+ });
69
+ return observable$.subscribe({
70
+ next (envelope) {
71
+ if (envelope.result.type === 'started') {
72
+ opts.onStarted?.();
73
+ } else if (envelope.result.type === 'stopped') {
74
+ opts.onStopped?.();
75
+ } else {
76
+ opts.onData?.(envelope.result.data);
77
+ }
78
+ },
79
+ error (err) {
80
+ opts.onError?.(err);
81
+ },
82
+ complete () {
83
+ opts.onComplete?.();
84
+ }
85
+ });
86
+ }
87
+ constructor(opts){
88
+ this.requestId = 0;
89
+ function getTransformer() {
90
+ if (!opts.transformer) return {
91
+ serialize: (data)=>data,
92
+ deserialize: (data)=>data
93
+ };
94
+ if ('input' in opts.transformer) return {
95
+ serialize: opts.transformer.input.serialize,
96
+ deserialize: opts.transformer.output.deserialize
97
+ };
98
+ return opts.transformer;
99
+ }
100
+ this.runtime = {
101
+ transformer: getTransformer()
102
+ };
103
+ // Initialize the links
104
+ this.links = opts.links.map((link)=>link(this.runtime));
32
105
  }
33
- throw new Error('No fetch implementation found');
34
106
  }
35
107
 
36
108
  function dedupeLink() {
@@ -132,125 +204,21 @@ function retryLink(opts) {
132
204
  };
133
205
  }
134
206
 
135
- class TRPCClient {
136
- getRequestId() {
137
- return ++this.requestId;
138
- }
139
- $request({ type , input , path , context ={} }) {
140
- const chain$ = createChain({
141
- links: this.links,
142
- op: {
143
- id: this.getRequestId(),
144
- type,
145
- path,
146
- input,
147
- context
148
- }
149
- });
150
- return chain$.pipe(share());
151
- }
152
- requestAsPromise(opts) {
153
- const req$ = this.$request(opts);
154
- const { promise , abort } = observableToPromise(req$);
155
- const abortablePromise = new Promise((resolve, reject)=>{
156
- opts.signal?.addEventListener('abort', abort);
157
- promise.then((envelope)=>{
158
- resolve(envelope.result.data);
159
- }).catch((err)=>{
160
- reject(TRPCClientError.from(err));
161
- });
162
- });
163
- return abortablePromise;
164
- }
165
- query(path, input, opts) {
166
- return this.requestAsPromise({
167
- type: 'query',
168
- path,
169
- input: input,
170
- context: opts?.context,
171
- signal: opts?.signal
172
- });
173
- }
174
- mutation(path, input, opts) {
175
- return this.requestAsPromise({
176
- type: 'mutation',
177
- path,
178
- input: input,
179
- context: opts?.context,
180
- signal: opts?.signal
181
- });
182
- }
183
- subscription(path, input, opts) {
184
- const observable$ = this.$request({
185
- type: 'subscription',
186
- path,
187
- input,
188
- context: opts?.context
189
- });
190
- return observable$.subscribe({
191
- next (envelope) {
192
- if (envelope.result.type === 'started') {
193
- opts.onStarted?.();
194
- } else if (envelope.result.type === 'stopped') {
195
- opts.onStopped?.();
196
- } else {
197
- opts.onData?.(envelope.result.data);
198
- }
199
- },
200
- error (err) {
201
- opts.onError?.(err);
202
- },
203
- complete () {
204
- opts.onComplete?.();
205
- }
206
- });
207
- }
208
- constructor(opts){
209
- const _fetch = getFetch(opts?.fetch);
210
- const AC = getAbortController(opts?.AbortController);
211
- this.requestId = 0;
212
- function getHeadersFn() {
213
- if (opts.headers) {
214
- const headers = opts.headers;
215
- return typeof headers === 'function' ? headers : ()=>headers;
216
- }
217
- return ()=>({});
218
- }
219
- function getTransformer() {
220
- if (!opts.transformer) return {
221
- serialize: (data)=>data,
222
- deserialize: (data)=>data
223
- };
224
- if ('input' in opts.transformer) return {
225
- serialize: opts.transformer.input.serialize,
226
- deserialize: opts.transformer.output.deserialize
227
- };
228
- return opts.transformer;
229
- }
230
- this.runtime = {
231
- AbortController: AC,
232
- fetch: _fetch,
233
- headers: getHeadersFn(),
234
- transformer: getTransformer()
235
- };
236
- const getLinks = ()=>{
237
- if (opts.links) {
238
- return opts.links.map((link)=>link(this.runtime));
239
- }
240
- return [
241
- httpBatchLink({
242
- url: opts.url
243
- })(this.runtime)
244
- ];
245
- };
246
- this.links = getLinks();
247
- }
248
- }
249
-
250
207
  /**
251
208
  * @deprecated use `createTRPCProxyClient` instead
252
209
  */ function createTRPCClient(opts) {
253
- const client = new TRPCClient(opts);
210
+ const getLinks = ()=>{
211
+ if ('links' in opts) {
212
+ return opts.links;
213
+ }
214
+ return [
215
+ httpBatchLink(opts)
216
+ ];
217
+ };
218
+ const client = new TRPCClient({
219
+ transformer: opts.transformer,
220
+ links: getLinks()
221
+ });
254
222
  return client;
255
223
  }
256
224
 
@@ -275,9 +243,9 @@ const clientCallTypeMap = {
275
243
  return proxy;
276
244
  }
277
245
  function createTRPCProxyClient(opts) {
278
- const client = createTRPCClient(opts);
246
+ const client = new TRPCClient(opts);
279
247
  const proxy = createTRPCClientProxy(client);
280
248
  return proxy;
281
249
  }
282
250
 
283
- export { createTRPCClient, createTRPCClientProxy, createTRPCProxyClient, dedupeLink, getFetch, retryLink };
251
+ export { createTRPCClient, createTRPCClientProxy, createTRPCProxyClient, dedupeLink, retryLink };
@@ -1,22 +1,8 @@
1
1
  import { AnyRouter, ClientDataTransformerOptions, inferProcedureInput, inferProcedureOutput, inferSubscriptionOutput } from '@trpc/server';
2
- import { ProcedureRecord } from '@trpc/server';
3
2
  import { Unsubscribable } from '@trpc/server/observable';
4
3
  import { TRPCClientError } from '../TRPCClientError';
5
- import { HTTPHeaders, OperationContext, TRPCClientRuntime, TRPCLink } from '../links/types';
4
+ import { OperationContext, TRPCClientRuntime, TRPCLink } from '../links/types';
6
5
  interface CreateTRPCClientBaseOptions {
7
- /**
8
- * Add ponyfill for fetch
9
- */
10
- fetch?: typeof fetch;
11
- /**
12
- * Add ponyfill for AbortController
13
- */
14
- AbortController?: typeof AbortController;
15
- /**
16
- * Headers to be set on outgoing requests or a callback that of said headers
17
- * @link http://localhost:3000/docs/v10/header
18
- */
19
- headers?: HTTPHeaders | (() => HTTPHeaders | Promise<HTTPHeaders>);
20
6
  /**
21
7
  * Data transformer
22
8
  * @link https://trpc.io/docs/data-transformers
@@ -41,20 +27,8 @@ export interface TRPCSubscriptionObserver<TValue, TError> {
41
27
  * This type prohibits `url` from being provided along with `links`
42
28
  * @internal
43
29
  */
44
- export declare type CreateTRPCClientOptions<TRouter extends AnyRouter> = CreateTRPCClientBaseOptions & ({
30
+ export declare type CreateTRPCClientOptions<TRouter extends AnyRouter> = CreateTRPCClientBaseOptions & {
45
31
  links: TRPCLink<TRouter>[];
46
- } | {
47
- url: string;
48
- links?: never;
49
- });
50
- export declare type AssertType<T, K> = T extends K ? T : never;
51
- /**
52
- * @deprecated
53
- */
54
- export declare type AssertLegacyDef<TRouter extends AnyRouter> = TRouter['_def']['legacy'] extends Record<'subscriptions' | 'queries' | 'mutations', ProcedureRecord> ? TRouter['_def']['legacy'] : {
55
- subscriptions: {};
56
- queries: {};
57
- mutations: {};
58
32
  };
59
33
  export declare class TRPCClient<TRouter extends AnyRouter> {
60
34
  private readonly links;
@@ -64,9 +38,9 @@ export declare class TRPCClient<TRouter extends AnyRouter> {
64
38
  constructor(opts: CreateTRPCClientOptions<TRouter>);
65
39
  private $request;
66
40
  private requestAsPromise;
67
- query<TQueries extends AssertLegacyDef<TRouter>['queries'], TPath extends string & keyof TQueries, TInput extends inferProcedureInput<AssertType<TQueries, ProcedureRecord>[TPath]>>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TQueries[TPath]>>;
68
- mutation<TMutations extends AssertLegacyDef<TRouter>['mutations'], TPath extends string & keyof TMutations, TInput extends inferProcedureInput<AssertType<TMutations, ProcedureRecord>[TPath]>>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TMutations[TPath]>>;
69
- subscription<TSubscriptions extends AssertLegacyDef<TRouter>['subscriptions'], TPath extends string & keyof TSubscriptions, TOutput extends inferSubscriptionOutput<TRouter, TPath>, TInput extends inferProcedureInput<AssertType<TSubscriptions, ProcedureRecord>[TPath]>>(path: TPath, input: TInput, opts: TRPCRequestOptions & Partial<TRPCSubscriptionObserver<TOutput, TRPCClientError<TRouter>>>): Unsubscribable;
41
+ query<TQueries extends TRouter['_def']['queries'], TPath extends string & keyof TQueries, TInput extends inferProcedureInput<TQueries[TPath]>>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TQueries[TPath]>>;
42
+ mutation<TMutations extends TRouter['_def']['mutations'], TPath extends string & keyof TMutations, TInput extends inferProcedureInput<TMutations[TPath]>>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TMutations[TPath]>>;
43
+ subscription<TSubscriptions extends TRouter['_def']['subscriptions'], TPath extends string & keyof TSubscriptions, TOutput extends inferSubscriptionOutput<TRouter, TPath>, TInput extends inferProcedureInput<TSubscriptions[TPath]>>(path: TPath, input: TInput, opts: TRPCRequestOptions & Partial<TRPCSubscriptionObserver<TOutput, TRPCClientError<TRouter>>>): Unsubscribable;
70
44
  }
71
45
  export {};
72
46
  //# sourceMappingURL=TRPCClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TRPCClient.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/internals/TRPCClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,4BAA4B,EAE5B,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EACL,cAAc,EAIf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,EACL,WAAW,EACX,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K,CAAC,EACvD,MAAM,SAAS,mBAAmB,CAChC,UAAU,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,KAAK,CAAC,CACnD,EAED,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,kBAAkB,GACtB,OAAO,CAAC,wBAAwB,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,GACrE,cAAc;CAyBlB"}
1
+ {"version":3,"file":"TRPCClient.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/internals/TRPCClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,4BAA4B,EAG5B,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,cAAc,EAIf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,gBAAgB,EAEhB,iBAAiB,EACjB,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAExB,UAAU,2BAA2B;IACnC;;;QAGI;IACJ,WAAW,CAAC,EAAE,4BAA4B,CAAC;CAC5C;AAGD,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB,CAAC,MAAM,EAAE,MAAM;IACtD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;GAGG;AACH,oBAAY,uBAAuB,CAAC,OAAO,SAAS,SAAS,IACzD,2BAA2B,GAAG;IAC5B,KAAK,EAAE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e,CAAC,OAAO,CAAC,CAAC,CAAC,GACrE,cAAc;CAyBlB"}
@@ -1,3 +1,4 @@
1
+ import { Maybe } from '@trpc/server';
1
2
  export declare function getWindow(): typeof globalThis;
2
- export declare function getAbortController(ac?: typeof AbortController): typeof AbortController | undefined;
3
+ export declare function getAbortController(ac: Maybe<typeof AbortController>): typeof AbortController | null;
3
4
  //# sourceMappingURL=fetchHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchHelpers.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/internals/fetchHelpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,sBAKxB;AACD,wBAAgB,kBAAkB,CAChC,EAAE,CAAC,EAAE,OAAO,eAAe,GAC1B,OAAO,eAAe,GAAG,SAAS,CAEpC"}
1
+ {"version":3,"file":"fetchHelpers.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/internals/fetchHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,wBAAgB,SAAS,sBAKxB;AACD,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,KAAK,CAAC,OAAO,eAAe,CAAC,GAChC,OAAO,eAAe,GAAG,IAAI,CAE/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"httpBatchLink.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/links/httpBatchLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiB,MAAM,cAAc,CAAC;AAIxD,OAAO,EACL,eAAe,EAIhB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,OAAO,SAAS,SAAS,EACrD,IAAI,EAAE,oBAAoB,GACzB,QAAQ,CAAC,OAAO,CAAC,CA4FnB"}
1
+ {"version":3,"file":"httpBatchLink.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/links/httpBatchLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiB,MAAM,cAAc,CAAC;AAIxD,OAAO,EACL,eAAe,EAKhB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,OAAO,SAAS,SAAS,EACrD,IAAI,EAAE,oBAAoB,GACzB,QAAQ,CAAC,OAAO,CAAC,CAmGnB"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var observable = require('@trpc/server/observable');
6
6
  var transformResult = require('../transformResult-e15ccdf6.js');
7
- var httpUtils = require('../httpUtils-0961d5e3.js');
7
+ var httpUtils = require('../httpUtils-73a50af6.js');
8
8
 
9
9
  /* eslint-disable @typescript-eslint/no-non-null-assertion */ /**
10
10
  * A function that should never be called unless we messed something up.
@@ -128,6 +128,7 @@ var httpUtils = require('../httpUtils-0961d5e3.js');
128
128
  }
129
129
 
130
130
  function httpBatchLink(opts) {
131
+ const resolvedOpts = httpUtils.resolveHTTPLinkOptions(opts);
131
132
  // initialized config
132
133
  return (runtime)=>{
133
134
  const maxURLLength = opts.maxURLLength || Infinity;
@@ -140,7 +141,7 @@ function httpBatchLink(opts) {
140
141
  const path = batchOps.map((op)=>op.path).join(',');
141
142
  const inputs = batchOps.map((op)=>op.input);
142
143
  const url = httpUtils.getUrl({
143
- url: opts.url,
144
+ ...resolvedOpts,
144
145
  runtime,
145
146
  type,
146
147
  path,
@@ -152,7 +153,7 @@ function httpBatchLink(opts) {
152
153
  const path = batchOps.map((op)=>op.path).join(',');
153
154
  const inputs = batchOps.map((op)=>op.input);
154
155
  const { promise , cancel } = httpUtils.httpRequest({
155
- url: opts.url,
156
+ ...resolvedOpts,
156
157
  runtime,
157
158
  type,
158
159
  path,
@@ -1,6 +1,6 @@
1
1
  import { observable } from '@trpc/server/observable';
2
2
  import { t as transformResult, T as TRPCClientError } from '../transformResult-106791d7.mjs';
3
- import { g as getUrl, h as httpRequest } from '../httpUtils-ad4258b6.mjs';
3
+ import { r as resolveHTTPLinkOptions, a as getUrl, h as httpRequest } from '../httpUtils-5b17f7da.mjs';
4
4
 
5
5
  /* eslint-disable @typescript-eslint/no-non-null-assertion */ /**
6
6
  * A function that should never be called unless we messed something up.
@@ -124,6 +124,7 @@ import { g as getUrl, h as httpRequest } from '../httpUtils-ad4258b6.mjs';
124
124
  }
125
125
 
126
126
  function httpBatchLink(opts) {
127
+ const resolvedOpts = resolveHTTPLinkOptions(opts);
127
128
  // initialized config
128
129
  return (runtime)=>{
129
130
  const maxURLLength = opts.maxURLLength || Infinity;
@@ -136,7 +137,7 @@ function httpBatchLink(opts) {
136
137
  const path = batchOps.map((op)=>op.path).join(',');
137
138
  const inputs = batchOps.map((op)=>op.input);
138
139
  const url = getUrl({
139
- url: opts.url,
140
+ ...resolvedOpts,
140
141
  runtime,
141
142
  type,
142
143
  path,
@@ -148,7 +149,7 @@ function httpBatchLink(opts) {
148
149
  const path = batchOps.map((op)=>op.path).join(',');
149
150
  const inputs = batchOps.map((op)=>op.input);
150
151
  const { promise , cancel } = httpRequest({
151
- url: opts.url,
152
+ ...resolvedOpts,
152
153
  runtime,
153
154
  type,
154
155
  path,
@@ -1 +1 @@
1
- {"version":3,"file":"httpLink.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/links/httpLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAe,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,wBAAgB,QAAQ,CAAC,OAAO,SAAS,SAAS,EAChD,IAAI,EAAE,eAAe,GACpB,QAAQ,CAAC,OAAO,CAAC,CAqCnB"}
1
+ {"version":3,"file":"httpLink.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/links/httpLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EACL,eAAe,EAGhB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,wBAAgB,QAAQ,CAAC,OAAO,SAAS,SAAS,EAChD,IAAI,EAAE,eAAe,GACpB,QAAQ,CAAC,OAAO,CAAC,CAqCnB"}
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var observable = require('@trpc/server/observable');
6
6
  var transformResult = require('../transformResult-e15ccdf6.js');
7
- var httpUtils = require('../httpUtils-0961d5e3.js');
7
+ var httpUtils = require('../httpUtils-73a50af6.js');
8
8
 
9
9
  function httpLink(opts) {
10
- const { url } = opts;
10
+ const resolvedOpts = httpUtils.resolveHTTPLinkOptions(opts);
11
11
  return (runtime)=>({ op })=>observable.observable((observer)=>{
12
12
  const { path , input , type } = op;
13
13
  const { promise , cancel } = httpUtils.httpRequest({
14
- url,
14
+ ...resolvedOpts,
15
15
  runtime,
16
16
  type,
17
17
  path,
@@ -1,13 +1,13 @@
1
1
  import { observable } from '@trpc/server/observable';
2
2
  import { t as transformResult, T as TRPCClientError } from '../transformResult-106791d7.mjs';
3
- import { h as httpRequest } from '../httpUtils-ad4258b6.mjs';
3
+ import { r as resolveHTTPLinkOptions, h as httpRequest } from '../httpUtils-5b17f7da.mjs';
4
4
 
5
5
  function httpLink(opts) {
6
- const { url } = opts;
6
+ const resolvedOpts = resolveHTTPLinkOptions(opts);
7
7
  return (runtime)=>({ op })=>observable((observer)=>{
8
8
  const { path , input , type } = op;
9
9
  const { promise , cancel } = httpRequest({
10
- url,
10
+ ...resolvedOpts,
11
11
  runtime,
12
12
  type,
13
13
  path,
@@ -1,9 +1,33 @@
1
1
  import { ProcedureType } from '@trpc/server';
2
2
  import { TRPCResponse } from '@trpc/server/rpc';
3
- import { PromiseAndCancel, TRPCClientRuntime } from '../types';
3
+ import { HTTPHeaders, PromiseAndCancel, TRPCClientRuntime } from '../types';
4
4
  export interface HTTPLinkOptions {
5
5
  url: string;
6
+ /**
7
+ * Add ponyfill for fetch
8
+ */
9
+ fetch?: typeof fetch;
10
+ /**
11
+ * Add ponyfill for AbortController
12
+ */
13
+ AbortController?: typeof AbortController | null;
14
+ /**
15
+ * Headers to be set on outgoing requests or a callback that of said headers
16
+ * @link http://trpc.io/docs/v10/header
17
+ */
18
+ headers?: HTTPHeaders | (() => HTTPHeaders | Promise<HTTPHeaders>);
6
19
  }
20
+ export interface ResolvedHTTPLinkOptions {
21
+ url: string;
22
+ fetch: typeof fetch;
23
+ AbortController: typeof AbortController | null;
24
+ /**
25
+ * Headers to be set on outgoing request
26
+ * @link http://trpc.io/docs/v10/header
27
+ */
28
+ headers: () => HTTPHeaders | Promise<HTTPHeaders>;
29
+ }
30
+ export declare function resolveHTTPLinkOptions(opts: HTTPLinkOptions): ResolvedHTTPLinkOptions;
7
31
  export interface HTTPResult {
8
32
  json: TRPCResponse;
9
33
  meta: {
@@ -17,7 +41,7 @@ declare type GetInputOptions = {
17
41
  } | {
18
42
  input: unknown;
19
43
  });
20
- export declare type HTTPRequestOptions = HTTPLinkOptions & GetInputOptions & {
44
+ export declare type HTTPRequestOptions = ResolvedHTTPLinkOptions & GetInputOptions & {
21
45
  type: ProcedureType;
22
46
  path: string;
23
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"httpUtils.d.ts","sourceRoot":"","sources":["../../../../../packages/client/src/links/internals/httpUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB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D;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,eAAe,EAAE,OAAO,eAAe,GAAG,IAAI,CAAC;IAC/C;;;OAGG;IACH,OAAO,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACnD;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,eAAe,GACpB,uBAAuB,CAQzB;AAiBD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE;QACJ,QAAQ,EAAE,QAAQ,CAAC;KACpB,CAAC;CACH;AAED,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,GAAG,CAAC;IAAE,MAAM,EAAE,OAAO,EAAE,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAUjD,oBAAY,kBAAkB,GAAG,uBAAuB,GACtD,eAAe,GAAG;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEJ,wBAAgB,MAAM,CAAC,IAAI,EAAE,kBAAkB,UAgB9C;AAED,aAAK,cAAc,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG,eAAe,CAAC;AAEhE,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,sBAM3C;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,kBAAkB,GACvB,gBAAgB,CAAC,UAAU,CAAC,CAwC9B"}
@@ -2,12 +2,24 @@ import { AnyRouter, DataTransformer } from '@trpc/server';
2
2
  import { Observable, Observer } from '@trpc/server/observable';
3
3
  import { TRPCResultMessage, TRPCSuccessResponse } from '@trpc/server/rpc';
4
4
  import { TRPCClientError } from '../TRPCClientError';
5
+ /**
6
+ * @internal
7
+ */
5
8
  export declare type CancelFn = () => void;
9
+ /**
10
+ * @internal
11
+ */
6
12
  export declare type PromiseAndCancel<TValue> = {
7
13
  promise: Promise<TValue>;
8
14
  cancel: CancelFn;
9
15
  };
16
+ /**
17
+ * @internal
18
+ */
10
19
  export declare type OperationContext = Record<string, unknown>;
20
+ /**
21
+ * @internal
22
+ */
11
23
  export declare type Operation<TInput = unknown> = {
12
24
  id: number;
13
25
  type: 'query' | 'mutation' | 'subscription';
@@ -15,6 +27,9 @@ export declare type Operation<TInput = unknown> = {
15
27
  path: string;
16
28
  context: OperationContext;
17
29
  };
30
+ /**
31
+ * @internal
32
+ */
18
33
  export declare type HTTPHeaders = Record<string, string | string[] | undefined>;
19
34
  /**
20
35
  * The default `fetch` implementation has an overloaded signature. By convention this library
@@ -22,20 +37,32 @@ export declare type HTTPHeaders = Record<string, string | string[] | undefined>;
22
37
  */
23
38
  export declare type TRPCFetch = (url: string, options?: RequestInit) => Promise<Response>;
24
39
  export interface TRPCClientRuntime {
25
- fetch: TRPCFetch;
26
- AbortController?: typeof AbortController;
27
- headers: () => HTTPHeaders | Promise<HTTPHeaders>;
28
40
  transformer: DataTransformer;
29
41
  }
42
+ /**
43
+ * @internal
44
+ */
30
45
  export interface OperationResultEnvelope<TOutput> {
31
46
  result: TRPCSuccessResponse<TOutput>['result'] | TRPCResultMessage<TOutput>['result'];
32
47
  context?: OperationContext;
33
48
  }
49
+ /**
50
+ * @internal
51
+ */
34
52
  export declare type OperationResultObservable<TRouter extends AnyRouter, TOutput> = Observable<OperationResultEnvelope<TOutput>, TRPCClientError<TRouter>>;
53
+ /**
54
+ * @internal
55
+ */
35
56
  export declare type OperationResultObserver<TRouter extends AnyRouter, TOutput> = Observer<OperationResultEnvelope<TOutput>, TRPCClientError<TRouter>>;
57
+ /**
58
+ * @internal
59
+ */
36
60
  export declare type OperationLink<TRouter extends AnyRouter, TInput = unknown, TOutput = unknown> = (opts: {
37
61
  op: Operation<TInput>;
38
62
  next: (op: Operation<TInput>) => OperationResultObservable<TRouter, TOutput>;
39
63
  }) => OperationResultObservable<TRouter, TOutput>;
64
+ /**
65
+ * @public
66
+ */
40
67
  export declare type TRPCLink<TRouter extends AnyRouter> = (opts: TRPCClientRuntime) => OperationLink<TRouter>;
41
68
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/client/src/links/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,oBAAY,QAAQ,GAAG,MAAM,IAAI,CAAC;AAElC,oBAAY,gBAAgB,CAAC,MAAM,IAAI;IACrC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACvD,oBAAY,SAAS,CAAC,MAAM,GAAG,OAAO,IAAI;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,cAAc,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF,oBAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAExE;;;GAGG;AACH,oBAAY,SAAS,GAAG,CACtB,GAAG,EAAE,MAAM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,QAAQ,CAAC,GACtC,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;GAEG;AACH,oBAAY,yBAAyB,CACnC,OAAO,SAAS,SAAS,EACzB,OAAO,IACL,UAAU,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AAE3E;;GAEG;AACH,oBAAY,uBAAuB,CACjC,OAAO,SAAS,SAAS,EACzB,OAAO,IACL,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AAEzE;;GAEG;AACH,oBAAY,aAAa,CACvB,OAAO,SAAS,SAAS,EACzB,MAAM,GAAG,OAAO,EAChB,OAAO,GAAG,OAAO,IACf,CAAC,IAAI,EAAE;IACT,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;CAC9E,KAAK,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAElD;;GAEG;AACH,oBAAY,QAAQ,CAAC,OAAO,SAAS,SAAS,IAAI,CAChD,IAAI,EAAE,iBAAiB,KACpB,aAAa,CAAC,OAAO,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/client",
3
- "version": "10.0.0-proxy-alpha.76",
3
+ "version": "10.0.0-proxy-alpha.77",
4
4
  "description": "tRPC Client lib",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -63,13 +63,13 @@
63
63
  "ts-watch": "tsc --project tsconfig.watch.json"
64
64
  },
65
65
  "peerDependencies": {
66
- "@trpc/server": "10.0.0-proxy-alpha.76"
66
+ "@trpc/server": "10.0.0-proxy-alpha.77"
67
67
  },
68
68
  "devDependencies": {
69
- "@trpc/server": "10.0.0-proxy-alpha.76"
69
+ "@trpc/server": "10.0.0-proxy-alpha.77"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "56bcacc869da9ee04c78c1eff2b4f9ad6ae9dece"
74
+ "gitHead": "11f75af120ffea027f5be8eabcfb50c449185355"
75
75
  }