@empiricalrun/playwright-utils 0.15.5 → 0.15.7

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,5 +1,18 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.15.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [bd5c945]
8
+ - @empiricalrun/llm@0.9.26
9
+
10
+ ## 0.15.6
11
+
12
+ ### Patch Changes
13
+
14
+ - b16b12c: fix: close new page opened for auth store
15
+
3
16
  ## 0.15.5
4
17
 
5
18
  ### Patch Changes
@@ -17,7 +17,7 @@ export declare class AuthStore<T extends WithKey<{}>> {
17
17
  appType?: AppType;
18
18
  });
19
19
  loginIfRequired(): Promise<void>;
20
- private pageWithAuthState;
20
+ private newPageWithAuthState;
21
21
  private saveAuthState;
22
22
  static location(userContext: {
23
23
  key: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAU,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE/D,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,OAAO,GAAG,SAAS,GAAG,kBAAkB,CAAC;AAE9C,qBAAa,SAAS,CAAC,CAAC,SAAS,OAAO,CAAC,EAAE,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,CAAC,CAAC;IACf,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;g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,CAAC,CAAC;gBACxD,EACV,IAAI,EACJ,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,OAAmB,GACpB,EAAE;QACD,IAAI,EAAE,IAAI,CAAC;QACX,WAAW,EAAE,CAAC,CAAC;QACf,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QACzD,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;QACpE,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAQK,eAAe;YA6BP,oBAAoB;YAsBpB,aAAa;IA6B3B,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;WAIxC,eAAe,CAC1B,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC;CAoB5B"}
@@ -27,10 +27,11 @@ class AuthStore {
27
27
  shouldDoLogin = true;
28
28
  }
29
29
  else {
30
- const page = await this.pageWithAuthState(this.page, storagePath);
30
+ const page = await this.newPageWithAuthState(this.page, storagePath);
31
31
  try {
32
32
  const hasLoggedIn = await this.checkLoggedInFunc(page, this.userContext);
33
33
  shouldDoLogin = !hasLoggedIn;
34
+ await page.close();
34
35
  }
35
36
  catch (err) {
36
37
  if (err instanceof playwright_core_1.errors.TimeoutError) {
@@ -46,7 +47,7 @@ class AuthStore {
46
47
  await this.saveAuthState(storagePath);
47
48
  }
48
49
  }
49
- async pageWithAuthState(page, storagePath) {
50
+ async newPageWithAuthState(page, storagePath) {
50
51
  if (this.appType === "web-app") {
51
52
  // Load state from the file in a new context
52
53
  // We create a new context because of Playwright APIs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.15.5",
3
+ "version": "0.15.7",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -40,7 +40,7 @@
40
40
  "playwright-core": "1.47.1",
41
41
  "playwright-extra": "^4.3.6",
42
42
  "puppeteer-extra-plugin-recaptcha": "^3.6.8",
43
- "@empiricalrun/llm": "^0.9.25",
43
+ "@empiricalrun/llm": "^0.9.26",
44
44
  "@empiricalrun/r2-uploader": "^0.3.6"
45
45
  },
46
46
  "scripts": {