@hasna/testers 0.0.41 → 0.0.42
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/dist/cli/index.js +5 -2
- package/dist/index.js +4 -1
- package/dist/lib/persona-auth.d.ts +1 -0
- package/dist/lib/persona-auth.d.ts.map +1 -1
- package/dist/mcp/index.js +5 -2
- package/dist/server/index.js +5 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -16940,6 +16940,9 @@ var init_secrets_resolver = () => {};
|
|
|
16940
16940
|
function isSessionCookie(cookieName) {
|
|
16941
16941
|
return !/(?:csrf|xsrf)/i.test(cookieName);
|
|
16942
16942
|
}
|
|
16943
|
+
function isPrimarySessionCookie(cookieName) {
|
|
16944
|
+
return isSessionCookie(cookieName) && !/refresh/i.test(cookieName);
|
|
16945
|
+
}
|
|
16943
16946
|
function getCookieExpires(cookie) {
|
|
16944
16947
|
if (typeof cookie.expires === "number" && Number.isFinite(cookie.expires)) {
|
|
16945
16948
|
return cookie.expires;
|
|
@@ -16954,7 +16957,7 @@ function hasFreshAuthCookies(persona) {
|
|
|
16954
16957
|
if (!persona.auth?.cookies?.length)
|
|
16955
16958
|
return false;
|
|
16956
16959
|
const cookies = persona.auth.cookies;
|
|
16957
|
-
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) &&
|
|
16960
|
+
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) && isPrimarySessionCookie(String(cookie.name)));
|
|
16958
16961
|
if (sessionCookies.length === 0) {
|
|
16959
16962
|
return false;
|
|
16960
16963
|
}
|
|
@@ -94037,7 +94040,7 @@ import chalk6 from "chalk";
|
|
|
94037
94040
|
// package.json
|
|
94038
94041
|
var package_default = {
|
|
94039
94042
|
name: "@hasna/testers",
|
|
94040
|
-
version: "0.0.
|
|
94043
|
+
version: "0.0.42",
|
|
94041
94044
|
description: "AI-powered QA testing CLI \u2014 spawns cheap AI agents to test web apps with headless browsers",
|
|
94042
94045
|
type: "module",
|
|
94043
94046
|
main: "dist/index.js",
|
package/dist/index.js
CHANGED
|
@@ -15499,6 +15499,9 @@ var COOKIE_MAX_AGE_MS = 60 * 60 * 1000;
|
|
|
15499
15499
|
function isSessionCookie(cookieName) {
|
|
15500
15500
|
return !/(?:csrf|xsrf)/i.test(cookieName);
|
|
15501
15501
|
}
|
|
15502
|
+
function isPrimarySessionCookie(cookieName) {
|
|
15503
|
+
return isSessionCookie(cookieName) && !/refresh/i.test(cookieName);
|
|
15504
|
+
}
|
|
15502
15505
|
function getCookieExpires(cookie) {
|
|
15503
15506
|
if (typeof cookie.expires === "number" && Number.isFinite(cookie.expires)) {
|
|
15504
15507
|
return cookie.expires;
|
|
@@ -15513,7 +15516,7 @@ function hasFreshAuthCookies(persona) {
|
|
|
15513
15516
|
if (!persona.auth?.cookies?.length)
|
|
15514
15517
|
return false;
|
|
15515
15518
|
const cookies = persona.auth.cookies;
|
|
15516
|
-
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) &&
|
|
15519
|
+
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) && isPrimarySessionCookie(String(cookie.name)));
|
|
15517
15520
|
if (sessionCookies.length === 0) {
|
|
15518
15521
|
return false;
|
|
15519
15522
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Page } from "playwright";
|
|
2
2
|
import type { Persona } from "../types/index.js";
|
|
3
3
|
export declare function isSessionCookie(cookieName: string): boolean;
|
|
4
|
+
export declare function isPrimarySessionCookie(cookieName: string): boolean;
|
|
4
5
|
export interface LoginResult {
|
|
5
6
|
success: boolean;
|
|
6
7
|
method: "cookies" | "login" | "none";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persona-auth.d.ts","sourceRoot":"","sources":["../../src/lib/persona-auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,C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,CAAC;CAChB;AAkBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAsB7D;AA2ND;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EACvG,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,CAAC,CAgCtB;AAED;;;;;;;;;GASG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,CAAC,CAsBtB"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "@hasna/testers",
|
|
55
|
-
version: "0.0.
|
|
55
|
+
version: "0.0.42",
|
|
56
56
|
description: "AI-powered QA testing CLI \u2014 spawns cheap AI agents to test web apps with headless browsers",
|
|
57
57
|
type: "module",
|
|
58
58
|
main: "dist/index.js",
|
|
@@ -20048,6 +20048,9 @@ var init_secrets_resolver = () => {};
|
|
|
20048
20048
|
function isSessionCookie(cookieName) {
|
|
20049
20049
|
return !/(?:csrf|xsrf)/i.test(cookieName);
|
|
20050
20050
|
}
|
|
20051
|
+
function isPrimarySessionCookie(cookieName) {
|
|
20052
|
+
return isSessionCookie(cookieName) && !/refresh/i.test(cookieName);
|
|
20053
|
+
}
|
|
20051
20054
|
function getCookieExpires(cookie) {
|
|
20052
20055
|
if (typeof cookie.expires === "number" && Number.isFinite(cookie.expires)) {
|
|
20053
20056
|
return cookie.expires;
|
|
@@ -20062,7 +20065,7 @@ function hasFreshAuthCookies(persona) {
|
|
|
20062
20065
|
if (!persona.auth?.cookies?.length)
|
|
20063
20066
|
return false;
|
|
20064
20067
|
const cookies = persona.auth.cookies;
|
|
20065
|
-
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) &&
|
|
20068
|
+
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) && isPrimarySessionCookie(String(cookie.name)));
|
|
20066
20069
|
if (sessionCookies.length === 0) {
|
|
20067
20070
|
return false;
|
|
20068
20071
|
}
|
package/dist/server/index.js
CHANGED
|
@@ -46910,7 +46910,7 @@ import { join as join14 } from "path";
|
|
|
46910
46910
|
// package.json
|
|
46911
46911
|
var package_default = {
|
|
46912
46912
|
name: "@hasna/testers",
|
|
46913
|
-
version: "0.0.
|
|
46913
|
+
version: "0.0.42",
|
|
46914
46914
|
description: "AI-powered QA testing CLI \u2014 spawns cheap AI agents to test web apps with headless browsers",
|
|
46915
46915
|
type: "module",
|
|
46916
46916
|
main: "dist/index.js",
|
|
@@ -48543,6 +48543,9 @@ var COOKIE_MAX_AGE_MS = 60 * 60 * 1000;
|
|
|
48543
48543
|
function isSessionCookie(cookieName) {
|
|
48544
48544
|
return !/(?:csrf|xsrf)/i.test(cookieName);
|
|
48545
48545
|
}
|
|
48546
|
+
function isPrimarySessionCookie(cookieName) {
|
|
48547
|
+
return isSessionCookie(cookieName) && !/refresh/i.test(cookieName);
|
|
48548
|
+
}
|
|
48546
48549
|
function getCookieExpires(cookie) {
|
|
48547
48550
|
if (typeof cookie.expires === "number" && Number.isFinite(cookie.expires)) {
|
|
48548
48551
|
return cookie.expires;
|
|
@@ -48557,7 +48560,7 @@ function hasFreshAuthCookies(persona) {
|
|
|
48557
48560
|
if (!persona.auth?.cookies?.length)
|
|
48558
48561
|
return false;
|
|
48559
48562
|
const cookies = persona.auth.cookies;
|
|
48560
|
-
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) &&
|
|
48563
|
+
const sessionCookies = cookies.filter((cookie) => ("name" in cookie) && isPrimarySessionCookie(String(cookie.name)));
|
|
48561
48564
|
if (sessionCookies.length === 0) {
|
|
48562
48565
|
return false;
|
|
48563
48566
|
}
|