@solarisdk/browser 0.1.1 → 0.1.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.
@@ -11,8 +11,7 @@ export declare class BrowserSession {
11
11
  get id(): string;
12
12
  /** Plan-tier deadline (ISO 8601 UTC); session auto-releases at this point. */
13
13
  get expiresAt(): string;
14
- /** Resolved proxy confirmation (country/tier/timezone — no credentials),
15
- * when a proxy was requested. */
14
+ /** Resolved proxy credentials, when a proxy was requested. */
16
15
  get proxy(): Session["proxy"];
17
16
  /** Playwright wire-protocol endpoint (loopback-wrapped). */
18
17
  get wsEndpoint(): string;
@@ -16,8 +16,7 @@ export class BrowserSession {
16
16
  get expiresAt() {
17
17
  return this.session.expiresAt;
18
18
  }
19
- /** Resolved proxy confirmation (country/tier/timezone — no credentials),
20
- * when a proxy was requested. */
19
+ /** Resolved proxy credentials, when a proxy was requested. */
21
20
  get proxy() {
22
21
  return this.session.proxy;
23
22
  }
@@ -24,6 +24,15 @@ export class LocalProxy {
24
24
  const addr = server.address();
25
25
  this.server = server;
26
26
  this.localPort = addr.port;
27
+ // Don't let the idle listener socket keep the Node event loop
28
+ // alive. While a session is active the browser's connection
29
+ // THROUGH this proxy is a live socket that holds the process
30
+ // open on its own; once the caller does `browser.close()` and
31
+ // those drain, an un-unref'd listener would still block exit,
32
+ // so a script that never calls `client.close()` hangs forever.
33
+ // unref() fixes that footgun while leaving active proxying and
34
+ // retries untouched (only the listener stops pinning the loop).
35
+ server.unref();
27
36
  server.off("error", reject);
28
37
  server.on("error", (err) => {
29
38
  console.error("[solari-sdk:local-proxy] server error:", err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solarisdk/browser",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Official client SDK for Solari Browser.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
39
39
  "prepublishOnly": "node ../scripts/check-sdk-version-pin.mjs && tsc"
40
40
  },
41
41
  "dependencies": {
42
- "patchright-core": "1.59.3"
42
+ "patchright-core": "1.62.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^20.0.0",