ts-proto 1.153.1 → 1.153.3
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/build/generate-services.js +4 -4
- package/package.json +25 -25
|
@@ -205,7 +205,7 @@ function generateBatchingRpcMethod(ctx, batchMethod) {
|
|
|
205
205
|
if (mapType) {
|
|
206
206
|
// If the return type is a map, lookup each key in the result
|
|
207
207
|
lambda.push((0, ts_poet_1.code) `
|
|
208
|
-
return this.${methodDesc.formattedName}(ctx, request).then(res => {
|
|
208
|
+
return this.${methodDesc.formattedName}(ctx, request as any).then(res => {
|
|
209
209
|
return ${inputFieldName}.map(key => res.${outputFieldName}[key] ?? ${ctx.utils.fail}())
|
|
210
210
|
});
|
|
211
211
|
`);
|
|
@@ -213,7 +213,7 @@ function generateBatchingRpcMethod(ctx, batchMethod) {
|
|
|
213
213
|
else {
|
|
214
214
|
// Otherwise assume they come back in order
|
|
215
215
|
lambda.push((0, ts_poet_1.code) `
|
|
216
|
-
return this.${methodDesc.formattedName}(ctx, request).then(res => res.${outputFieldName})
|
|
216
|
+
return this.${methodDesc.formattedName}(ctx, request as any).then(res => res.${outputFieldName})
|
|
217
217
|
`);
|
|
218
218
|
}
|
|
219
219
|
lambda.push((0, ts_poet_1.code) `}`);
|
|
@@ -223,7 +223,7 @@ function generateBatchingRpcMethod(ctx, batchMethod) {
|
|
|
223
223
|
${(0, utils_1.singular)(inputFieldName)}: ${inputType}
|
|
224
224
|
): Promise<${outputType}> {
|
|
225
225
|
const dl = ctx.getDataLoader("${uniqueIdentifier}", () => {
|
|
226
|
-
return new ${dataloader}<${inputType}, ${outputType}>(
|
|
226
|
+
return new ${dataloader}<${inputType}, ${outputType}, string>(
|
|
227
227
|
${(0, ts_poet_1.joinCode)(lambda)},
|
|
228
228
|
{ cacheKeyFn: ${hash}, ...ctx.rpcDataLoaderOptions }
|
|
229
229
|
);
|
|
@@ -258,7 +258,7 @@ function generateCachingRpcMethod(ctx, fileDesc, serviceDesc, methodDesc) {
|
|
|
258
258
|
request: ${inputType},
|
|
259
259
|
): Promise<${outputType}> {
|
|
260
260
|
const dl = ctx.getDataLoader("${uniqueIdentifier}", () => {
|
|
261
|
-
return new ${dataloader}<${inputType}, ${outputType}>(
|
|
261
|
+
return new ${dataloader}<${inputType}, ${outputType}, string>(
|
|
262
262
|
${lambda},
|
|
263
263
|
{ cacheKeyFn: ${hash}, ...ctx.rpcDataLoaderOptions },
|
|
264
264
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-proto",
|
|
3
|
-
"version": "1.153.
|
|
3
|
+
"version": "1.153.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/plugin.js",
|
|
6
6
|
"repository": "github:stephenh/ts-proto",
|
|
@@ -29,46 +29,46 @@
|
|
|
29
29
|
"author": "",
|
|
30
30
|
"license": "ISC",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@grpc/grpc-js": "^1.8.
|
|
33
|
-
"@grpc/proto-loader": "^0.7.
|
|
34
|
-
"@improbable-eng/grpc-web": "^0.14.
|
|
35
|
-
"@improbable-eng/grpc-web-node-http-transport": "^0.14.
|
|
36
|
-
"@nestjs/common": "^9.4.
|
|
37
|
-
"@nestjs/core": "^9.4.
|
|
38
|
-
"@nestjs/microservices": "^9.4.
|
|
32
|
+
"@grpc/grpc-js": "^1.8.17",
|
|
33
|
+
"@grpc/proto-loader": "^0.7.8",
|
|
34
|
+
"@improbable-eng/grpc-web": "^0.14.1",
|
|
35
|
+
"@improbable-eng/grpc-web-node-http-transport": "^0.14.1",
|
|
36
|
+
"@nestjs/common": "^9.4.3",
|
|
37
|
+
"@nestjs/core": "^9.4.3",
|
|
38
|
+
"@nestjs/microservices": "^9.4.3",
|
|
39
39
|
"@semantic-release/changelog": "^6.0.3",
|
|
40
|
-
"@semantic-release/commit-analyzer": "^10.0.
|
|
40
|
+
"@semantic-release/commit-analyzer": "^10.0.1",
|
|
41
41
|
"@semantic-release/exec": "^6.0.3",
|
|
42
42
|
"@semantic-release/git": "^10.0.1",
|
|
43
|
-
"@semantic-release/github": "^9.0.
|
|
44
|
-
"@semantic-release/npm": "^10.0.
|
|
45
|
-
"@semantic-release/release-notes-generator": "^11.0.
|
|
43
|
+
"@semantic-release/github": "^9.0.3",
|
|
44
|
+
"@semantic-release/npm": "^10.0.4",
|
|
45
|
+
"@semantic-release/release-notes-generator": "^11.0.4",
|
|
46
46
|
"@tsconfig/strictest": "^2.0.1",
|
|
47
|
-
"@types/jest": "^29.5.
|
|
47
|
+
"@types/jest": "^29.5.3",
|
|
48
48
|
"@types/node": "^16.18.38",
|
|
49
|
+
"@types/object-hash": "^3.0.2",
|
|
49
50
|
"chokidar": "^3.5.3",
|
|
50
|
-
"
|
|
51
|
+
"dataloader": "^2.2.2",
|
|
52
|
+
"jest": "^29.6.1",
|
|
51
53
|
"jest-ts-webcompat-resolver": "^1.0.0",
|
|
52
|
-
"mongodb": "^
|
|
54
|
+
"mongodb": "^5.7.0",
|
|
53
55
|
"nice-grpc": "^2.1.4",
|
|
54
|
-
"
|
|
56
|
+
"object-hash": "^3.0.0",
|
|
57
|
+
"prettier": "^3.0.0",
|
|
55
58
|
"protobufjs-cli": "^1.1.1",
|
|
56
59
|
"reflect-metadata": "^0.1.13",
|
|
57
|
-
"rxjs": "^7.
|
|
58
|
-
"semantic-release": "^21.0.
|
|
59
|
-
"ts-jest": "^29.1.
|
|
60
|
+
"rxjs": "^7.8.1",
|
|
61
|
+
"semantic-release": "^21.0.7",
|
|
62
|
+
"ts-jest": "^29.1.1",
|
|
60
63
|
"tsx": "^3.12.7",
|
|
61
|
-
"typescript": "^5.1.
|
|
64
|
+
"typescript": "^5.1.6",
|
|
62
65
|
"uglify-js": "^3.17.4"
|
|
63
66
|
},
|
|
64
67
|
"dependencies": {
|
|
65
|
-
"
|
|
66
|
-
"case-anything": "^2.1.10",
|
|
67
|
-
"dataloader": "^1.4.0",
|
|
68
|
-
"object-hash": "^3.0.0",
|
|
68
|
+
"case-anything": "^2.1.13",
|
|
69
69
|
"protobufjs": "^7.2.4",
|
|
70
70
|
"ts-poet": "^6.4.1",
|
|
71
|
-
"ts-proto-descriptors": "1.
|
|
71
|
+
"ts-proto-descriptors": "1.12.0"
|
|
72
72
|
},
|
|
73
73
|
"packageManager": "yarn@3.6.0"
|
|
74
74
|
}
|