@kapeta/local-cluster-service 0.77.0 → 0.77.1
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,10 @@
|
|
1
|
+
## [0.77.1](https://github.com/kapetacom/local-cluster-service/compare/v0.77.0...v0.77.1) (2024-10-04)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* 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))
|
7
|
+
|
1
8
|
# [0.77.0](https://github.com/kapetacom/local-cluster-service/compare/v0.76.5...v0.77.0) (2024-10-04)
|
2
9
|
|
3
10
|
|
@@ -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,18 @@ 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
|
+
keepAliveTimeout: 0,
|
203
|
+
bodyTimeout: 0,
|
204
|
+
}),
|
198
205
|
});
|
199
206
|
if (!response.ok) {
|
200
207
|
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,18 @@ 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
|
+
keepAliveTimeout: 0,
|
203
|
+
bodyTimeout: 0,
|
204
|
+
}),
|
198
205
|
});
|
199
206
|
if (!response.ok) {
|
200
207
|
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.1",
|
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,18 @@ 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
|
+
keepAliveTimeout: 0,
|
332
|
+
bodyTimeout: 0,
|
333
|
+
}),
|
327
334
|
});
|
328
335
|
if (!response.ok) {
|
329
336
|
throw new Error(`HTTP error! Status: ${response.status}`);
|