@kapeta/local-cluster-service 0.77.0 → 0.77.2
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/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [0.77.2](https://github.com/kapetacom/local-cluster-service/compare/v0.77.1...v0.77.2) (2024-10-04)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* tweak for timeouts in createSimpleBackend ([#271](https://github.com/kapetacom/local-cluster-service/issues/271)) ([dd1a6e5](https://github.com/kapetacom/local-cluster-service/commit/dd1a6e57b0baf0a1d6b92e8edee13eafe2566866))
|
7
|
+
|
8
|
+
## [0.77.1](https://github.com/kapetacom/local-cluster-service/compare/v0.77.0...v0.77.1) (2024-10-04)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* disable timeouts for createSimpleBackend call ([#270](https://github.com/kapetacom/local-cluster-service/issues/270)) ([9a6ba9c](https://github.com/kapetacom/local-cluster-service/commit/9a6ba9cb09ff99a3e31e93e33c027232ddeff8fb))
|
14
|
+
|
1
15
|
# [0.77.0](https://github.com/kapetacom/local-cluster-service/compare/v0.76.5...v0.77.0) (2024-10-04)
|
2
16
|
|
3
17
|
|
@@ -14,6 +14,7 @@ const promises_1 = __importDefault(require("node:readline/promises"));
|
|
14
14
|
const node_stream_1 = require("node:stream");
|
15
15
|
const stream_1 = require("./stream");
|
16
16
|
const fetch_retry_1 = __importDefault(require("fetch-retry"));
|
17
|
+
const undici_1 = require("undici");
|
17
18
|
const fetchWithRetries = (0, fetch_retry_1.default)(global.fetch, { retries: 5, retryDelay: 10 });
|
18
19
|
exports.STORM_ID = 'storm';
|
19
20
|
exports.ConversationIdHeader = 'Conversation-Id';
|
@@ -189,12 +190,17 @@ class StormClient {
|
|
189
190
|
headers[exports.HandleHeader] = this._handle;
|
190
191
|
headers[exports.ConversationIdHeader] = this._systemId;
|
191
192
|
headers[exports.SystemIdHeader] = this._systemId;
|
192
|
-
|
193
|
+
// Fetch with undici to override the default timeouts
|
194
|
+
const response = await (0, undici_1.fetch)(u, {
|
193
195
|
method: 'POST',
|
194
196
|
body: JSON.stringify({
|
195
197
|
pages: input.pages,
|
196
198
|
}),
|
197
199
|
headers: headers,
|
200
|
+
dispatcher: new undici_1.Agent({
|
201
|
+
headersTimeout: 0,
|
202
|
+
bodyTimeout: 0,
|
203
|
+
}),
|
198
204
|
});
|
199
205
|
if (!response.ok) {
|
200
206
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
@@ -14,6 +14,7 @@ const promises_1 = __importDefault(require("node:readline/promises"));
|
|
14
14
|
const node_stream_1 = require("node:stream");
|
15
15
|
const stream_1 = require("./stream");
|
16
16
|
const fetch_retry_1 = __importDefault(require("fetch-retry"));
|
17
|
+
const undici_1 = require("undici");
|
17
18
|
const fetchWithRetries = (0, fetch_retry_1.default)(global.fetch, { retries: 5, retryDelay: 10 });
|
18
19
|
exports.STORM_ID = 'storm';
|
19
20
|
exports.ConversationIdHeader = 'Conversation-Id';
|
@@ -189,12 +190,17 @@ class StormClient {
|
|
189
190
|
headers[exports.HandleHeader] = this._handle;
|
190
191
|
headers[exports.ConversationIdHeader] = this._systemId;
|
191
192
|
headers[exports.SystemIdHeader] = this._systemId;
|
192
|
-
|
193
|
+
// Fetch with undici to override the default timeouts
|
194
|
+
const response = await (0, undici_1.fetch)(u, {
|
193
195
|
method: 'POST',
|
194
196
|
body: JSON.stringify({
|
195
197
|
pages: input.pages,
|
196
198
|
}),
|
197
199
|
headers: headers,
|
200
|
+
dispatcher: new undici_1.Agent({
|
201
|
+
headersTimeout: 0,
|
202
|
+
bodyTimeout: 0,
|
203
|
+
}),
|
198
204
|
});
|
199
205
|
if (!response.ok) {
|
200
206
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kapeta/local-cluster-service",
|
3
|
-
"version": "0.77.
|
3
|
+
"version": "0.77.2",
|
4
4
|
"description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
|
5
5
|
"type": "commonjs",
|
6
6
|
"exports": {
|
@@ -90,6 +90,7 @@
|
|
90
90
|
"tar": "^7.4.3",
|
91
91
|
"tar-stream": "^3.1.6",
|
92
92
|
"typescript": "^5.1.6",
|
93
|
+
"undici": "^6.19.8",
|
93
94
|
"uuid": "^9.0.1",
|
94
95
|
"yaml": "^1.6.0"
|
95
96
|
},
|
package/src/storm/stormClient.ts
CHANGED
@@ -19,6 +19,7 @@ import {
|
|
19
19
|
} from './stream';
|
20
20
|
import { Page, StormEventPageUrl } from './events';
|
21
21
|
import createFetch from 'fetch-retry';
|
22
|
+
import { Agent, fetch as undiciFetch } from 'undici';
|
22
23
|
const fetchWithRetries = createFetch(global.fetch, { retries: 5, retryDelay: 10 });
|
23
24
|
|
24
25
|
export const STORM_ID = 'storm';
|
@@ -318,12 +319,17 @@ export class StormClient {
|
|
318
319
|
headers[ConversationIdHeader] = this._systemId;
|
319
320
|
headers[SystemIdHeader] = this._systemId;
|
320
321
|
|
321
|
-
|
322
|
+
// Fetch with undici to override the default timeouts
|
323
|
+
const response = await undiciFetch(u, {
|
322
324
|
method: 'POST',
|
323
325
|
body: JSON.stringify({
|
324
326
|
pages: input.pages,
|
325
327
|
}),
|
326
328
|
headers: headers,
|
329
|
+
dispatcher: new Agent({
|
330
|
+
headersTimeout: 0,
|
331
|
+
bodyTimeout: 0,
|
332
|
+
}),
|
327
333
|
});
|
328
334
|
if (!response.ok) {
|
329
335
|
throw new Error(`HTTP error! Status: ${response.status}`);
|