@blaxel/core 0.2.82-preview.147 → 0.2.83-dev.151

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.
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.markH2SessionIdleUnref = markH2SessionIdleUnref;
4
+ exports.refH2SessionForActiveRequest = refH2SessionForActiveRequest;
5
+ const idleUnrefSessions = new WeakSet();
6
+ const activeRequestCounts = new WeakMap();
7
+ function markH2SessionIdleUnref(session) {
8
+ idleUnrefSessions.add(session);
9
+ if ((activeRequestCounts.get(session) ?? 0) === 0) {
10
+ session.unref();
11
+ }
12
+ }
13
+ function refH2SessionForActiveRequest(session) {
14
+ if (!idleUnrefSessions.has(session))
15
+ return () => { };
16
+ const previousActiveRequests = activeRequestCounts.get(session) ?? 0;
17
+ activeRequestCounts.set(session, previousActiveRequests + 1);
18
+ if (previousActiveRequests === 0)
19
+ session.ref();
20
+ let released = false;
21
+ return () => {
22
+ if (released)
23
+ return;
24
+ released = true;
25
+ const activeRequests = activeRequestCounts.get(session);
26
+ if (activeRequests === undefined || activeRequests <= 1) {
27
+ activeRequestCounts.delete(session);
28
+ session.unref();
29
+ return;
30
+ }
31
+ activeRequestCounts.set(session, activeRequests - 1);
32
+ };
33
+ }
@@ -11,8 +11,8 @@ const index_js_1 = require("../authentication/index.js");
11
11
  const env_js_1 = require("../common/env.js");
12
12
  const node_js_1 = require("../common/node.js");
13
13
  // Build info - these placeholders are replaced at build time by build:replace-imports
14
- const BUILD_VERSION = "0.2.82-preview.147";
15
- const BUILD_COMMIT = "4d2b3531bdb9d8a065f6d83822343840ae0b8d65";
14
+ const BUILD_VERSION = "0.2.83-dev.151";
15
+ const BUILD_COMMIT = "772f4015ae11cd613a895993318cf7ffa19bead1";
16
16
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
17
17
  const BLAXEL_API_VERSION = "2026-04-16";
18
18
  // Cache for config.yaml tracking value
@@ -0,0 +1,3 @@
1
+ import type http2 from "http2";
2
+ export declare function markH2SessionIdleUnref(session: http2.ClientHttp2Session): void;
3
+ export declare function refH2SessionForActiveRequest(session: http2.ClientHttp2Session): () => void;