@skyvern/client 1.0.6 → 1.0.10

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.
@@ -56,8 +56,8 @@ class SkyvernClient {
56
56
  "x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "@skyvern/client",
59
- "X-Fern-SDK-Version": "1.0.6",
60
- "User-Agent": "@skyvern/client/1.0.6",
59
+ "X-Fern-SDK-Version": "1.0.10",
60
+ "User-Agent": "@skyvern/client/1.0.10",
61
61
  "X-Fern-Runtime": core.RUNTIME.type,
62
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
63
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -231,12 +231,13 @@ class Skyvern extends Client_js_1.SkyvernClient {
231
231
  this._ensureCloudEnvironment();
232
232
  const browserSessions = yield this.getBrowserSessions();
233
233
  const browserSession = browserSessions
234
- .filter((s) => s.runnable_id == null)
234
+ .filter((s) => s.runnable_id == null && s.started_at != null && s.browser_address != null)
235
235
  .sort((a, b) => {
236
- const aTime = a.started_at ? new Date(a.started_at).getTime() : 0;
237
- const bTime = b.started_at ? new Date(b.started_at).getTime() : 0;
236
+ const aTime = new Date(a.started_at).getTime();
237
+ const bTime = new Date(b.started_at).getTime();
238
238
  return bTime - aTime;
239
- })[0];
239
+ })
240
+ .at(0);
240
241
  if (!browserSession) {
241
242
  logger_js_1.LOG.info("No existing cloud browser session found, launching a new session");
242
243
  return this.launchCloudBrowser(options);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.6";
1
+ export declare const SDK_VERSION = "1.0.10";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.0.6";
4
+ exports.SDK_VERSION = "1.0.10";
@@ -20,8 +20,8 @@ export class SkyvernClient {
20
20
  "x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
21
21
  "X-Fern-Language": "JavaScript",
22
22
  "X-Fern-SDK-Name": "@skyvern/client",
23
- "X-Fern-SDK-Version": "1.0.6",
24
- "User-Agent": "@skyvern/client/1.0.6",
23
+ "X-Fern-SDK-Version": "1.0.10",
24
+ "User-Agent": "@skyvern/client/1.0.10",
25
25
  "X-Fern-Runtime": core.RUNTIME.type,
26
26
  "X-Fern-Runtime-Version": core.RUNTIME.version,
27
27
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -195,12 +195,13 @@ export class Skyvern extends SkyvernClient {
195
195
  this._ensureCloudEnvironment();
196
196
  const browserSessions = yield this.getBrowserSessions();
197
197
  const browserSession = browserSessions
198
- .filter((s) => s.runnable_id == null)
198
+ .filter((s) => s.runnable_id == null && s.started_at != null && s.browser_address != null)
199
199
  .sort((a, b) => {
200
- const aTime = a.started_at ? new Date(a.started_at).getTime() : 0;
201
- const bTime = b.started_at ? new Date(b.started_at).getTime() : 0;
200
+ const aTime = new Date(a.started_at).getTime();
201
+ const bTime = new Date(b.started_at).getTime();
202
202
  return bTime - aTime;
203
- })[0];
203
+ })
204
+ .at(0);
204
205
  if (!browserSession) {
205
206
  LOG.info("No existing cloud browser session found, launching a new session");
206
207
  return this.launchCloudBrowser(options);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.6";
1
+ export declare const SDK_VERSION = "1.0.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.6";
1
+ export const SDK_VERSION = "1.0.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvern/client",
3
- "version": "1.0.6",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",