@trpc/client 10.0.0-alpha.20 → 10.0.0-alpha.21
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.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/internals/dataLoader.d.ts.map +1 -1
- package/links/httpBatchLink/dist/trpc-client-links-httpBatchLink.cjs.dev.js +4 -4
- package/links/httpBatchLink/dist/trpc-client-links-httpBatchLink.cjs.prod.js +4 -4
- package/links/httpBatchLink/dist/trpc-client-links-httpBatchLink.esm.js +4 -4
- package/package.json +12 -4
- package/src/internals/dataLoader.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -206,7 +206,8 @@ function dataLoader(fetchMany, opts) {
|
|
|
206
206
|
batchCopy.cancel = cancel;
|
|
207
207
|
promise.then(function (result) {
|
|
208
208
|
for (var i = 0; i < result.length; i++) {
|
|
209
|
-
var _value = result[i];
|
|
209
|
+
var _value = result[i]; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
210
|
+
|
|
210
211
|
batchCopy.items[i].resolve(_value);
|
|
211
212
|
}
|
|
212
213
|
}).catch(function (cause) {
|
package/dist/index.mjs
CHANGED
|
@@ -190,7 +190,8 @@ function dataLoader(fetchMany, opts) {
|
|
|
190
190
|
batchCopy.cancel = cancel;
|
|
191
191
|
promise.then(function (result) {
|
|
192
192
|
for (var i = 0; i < result.length; i++) {
|
|
193
|
-
var _value = result[i];
|
|
193
|
+
var _value = result[i]; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
194
|
+
|
|
194
195
|
batchCopy.items[i].resolve(_value);
|
|
195
196
|
}
|
|
196
197
|
}).catch(function (cause) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataLoader.d.ts","sourceRoot":"","sources":["../../src/internals/dataLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAY5D,aAAK,WAAW,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK;IACjD,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3B,MAAM,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EACrC,SAAS,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,EACpC,IAAI,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE;
|
|
1
|
+
{"version":3,"file":"dataLoader.d.ts","sourceRoot":"","sources":["../../src/internals/dataLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAY5D,aAAK,WAAW,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK;IACjD,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3B,MAAM,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EACrC,SAAS,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,EACpC,IAAI,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE;gBA+Bb,IAAI,KAAG,iBAAiB,MAAM,CAAC;EAiDnD"}
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
|
|
6
|
-
var transformRPCResponse = require('../../../dist/transformRPCResponse-0ad3cc9f.cjs.dev.js');
|
|
7
5
|
var TRPCClientError = require('../../../dist/TRPCClientError-bfee2bf5.cjs.dev.js');
|
|
8
|
-
require('
|
|
6
|
+
var transformRPCResponse = require('../../../dist/transformRPCResponse-0ad3cc9f.cjs.dev.js');
|
|
7
|
+
var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
|
|
8
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
9
9
|
require('@babel/runtime/helpers/classCallCheck');
|
|
10
|
+
require('@babel/runtime/helpers/createClass');
|
|
10
11
|
require('@babel/runtime/helpers/assertThisInitialized');
|
|
11
12
|
require('@babel/runtime/helpers/inherits');
|
|
12
13
|
require('@babel/runtime/helpers/createSuper');
|
|
13
14
|
require('@babel/runtime/helpers/wrapNativeSuper');
|
|
14
|
-
require('@babel/runtime/helpers/objectSpread2');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Dataloader that's very inspired by https://github.com/graphql/dataloader
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
|
|
6
|
-
var transformRPCResponse = require('../../../dist/transformRPCResponse-e6daeb02.cjs.prod.js');
|
|
7
5
|
var TRPCClientError = require('../../../dist/TRPCClientError-e9bf96e9.cjs.prod.js');
|
|
8
|
-
require('
|
|
6
|
+
var transformRPCResponse = require('../../../dist/transformRPCResponse-e6daeb02.cjs.prod.js');
|
|
7
|
+
var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
|
|
8
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
9
9
|
require('@babel/runtime/helpers/classCallCheck');
|
|
10
|
+
require('@babel/runtime/helpers/createClass');
|
|
10
11
|
require('@babel/runtime/helpers/assertThisInitialized');
|
|
11
12
|
require('@babel/runtime/helpers/inherits');
|
|
12
13
|
require('@babel/runtime/helpers/createSuper');
|
|
13
14
|
require('@babel/runtime/helpers/wrapNativeSuper');
|
|
14
|
-
require('@babel/runtime/helpers/objectSpread2');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Dataloader that's very inspired by https://github.com/graphql/dataloader
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import _createForOfIteratorHelper from '@babel/runtime/helpers/esm/createForOfIteratorHelper';
|
|
2
|
-
import { T as TRPCAbortError, t as transformRPCResponse, h as httpRequest } from '../../../dist/transformRPCResponse-3700ef8b.esm.js';
|
|
3
1
|
import { T as TRPCClientError } from '../../../dist/TRPCClientError-09b8a26b.esm.js';
|
|
4
|
-
import '
|
|
2
|
+
import { T as TRPCAbortError, t as transformRPCResponse, h as httpRequest } from '../../../dist/transformRPCResponse-3700ef8b.esm.js';
|
|
3
|
+
import _createForOfIteratorHelper from '@babel/runtime/helpers/esm/createForOfIteratorHelper';
|
|
4
|
+
import '@babel/runtime/helpers/objectSpread2';
|
|
5
5
|
import '@babel/runtime/helpers/classCallCheck';
|
|
6
|
+
import '@babel/runtime/helpers/createClass';
|
|
6
7
|
import '@babel/runtime/helpers/assertThisInitialized';
|
|
7
8
|
import '@babel/runtime/helpers/inherits';
|
|
8
9
|
import '@babel/runtime/helpers/createSuper';
|
|
9
10
|
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
10
|
-
import '@babel/runtime/helpers/objectSpread2';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Dataloader that's very inspired by https://github.com/graphql/dataloader
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/client",
|
|
3
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"version": "10.0.0-alpha.21",
|
|
4
4
|
"description": "tRPC Client lib",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
"url": "git+https://github.com/trpc/trpc.git",
|
|
11
11
|
"directory": "packages/client"
|
|
12
12
|
},
|
|
13
|
+
"eslintConfig": {
|
|
14
|
+
"rules": {
|
|
15
|
+
"no-restricted-imports": [
|
|
16
|
+
"error",
|
|
17
|
+
"@trpc/client"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
"main": "dist/index.js",
|
|
14
22
|
"module": "dist/index.mjs",
|
|
15
23
|
"typings": "dist/index.d.ts",
|
|
@@ -39,13 +47,13 @@
|
|
|
39
47
|
"@babel/runtime": "^7.9.0"
|
|
40
48
|
},
|
|
41
49
|
"peerDependencies": {
|
|
42
|
-
"@trpc/server": "10.0.0-alpha.
|
|
50
|
+
"@trpc/server": "10.0.0-alpha.21"
|
|
43
51
|
},
|
|
44
52
|
"devDependencies": {
|
|
45
|
-
"@trpc/server": "10.0.0-alpha.
|
|
53
|
+
"@trpc/server": "10.0.0-alpha.21"
|
|
46
54
|
},
|
|
47
55
|
"publishConfig": {
|
|
48
56
|
"access": "public"
|
|
49
57
|
},
|
|
50
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "0db16da18ee5fc1ea4b2149490c316a4a700d2ab"
|
|
51
59
|
}
|
|
@@ -43,7 +43,8 @@ export function dataLoader<TKey, TValue>(
|
|
|
43
43
|
.then((result) => {
|
|
44
44
|
for (let i = 0; i < result.length; i++) {
|
|
45
45
|
const value = result[i];
|
|
46
|
-
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
47
|
+
batchCopy.items[i]!.resolve(value!);
|
|
47
48
|
}
|
|
48
49
|
})
|
|
49
50
|
.catch((cause) => {
|