Two things helloeco ran into while wiring the gateway. grpc-js waits a second before its second reconnect attempt and backs off towards two minutes. That is right for a far-away service and wrong for a hub on the same network: after a restart or a deploy a gateway sits out the backoff with requests in hand. The client now sets initial 200 ms and a 5 s ceiling, and a caller's own channelOptions still win. The client exposes the options it ended up with, which is the only way to tell a default that applies from one that was silently replaced. The dependencies are pinned exactly instead of by range. This package is consumed by a handful of services, not by a library ecosystem, and a surprise minor of grpc-js is what breaks a portal at three in the morning. Raising one is a commit, with the skew job in front of it. Guards: the defaults and the precedence are asserted (probed by mutation), plus a case that a run works again once the hub is back. Signed-off-by: flemming-it <sf@flemming.it>
42 lines
1 KiB
JSON
42 lines
1 KiB
JSON
{
|
|
"name": "chain-client-sdk-ts",
|
|
"version": "0.1.0",
|
|
"description": "TypeScript client for a Ch∆In hub: run flows, follow them, decide approvals.",
|
|
"license": "Apache-2.0",
|
|
"author": "Dr. Stefan Flemming <chain@flemming.ai>",
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=20.11"
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./fake-hub": {
|
|
"types": "./dist/fake_hub.d.ts",
|
|
"default": "./dist/fake_hub.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"proto",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json",
|
|
"test": "tsc -p tsconfig.test.json && node --test --test-timeout=30000 \"build-test/test/*.test.js\"",
|
|
"check": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@grpc/grpc-js": "1.14.6",
|
|
"@grpc/proto-loader": "0.8.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "22.20.5",
|
|
"typescript": "5.9.3"
|
|
}
|
|
}
|