@validate.qa/runner 1.0.61 → 1.0.62

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.
Files changed (3) hide show
  1. package/dist/cli.js +137 -13
  2. package/dist/cli.mjs +137 -13
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -320223,6 +320223,9 @@ var require_survey_link_frontier = __commonJS({
320223
320223
  exports2.markLinkNavigationAttempt = markLinkNavigationAttempt;
320224
320224
  exports2.getFinishBlockingFrontier = getFinishBlockingFrontier;
320225
320225
  exports2.describeBlockingRoutes = describeBlockingRoutes;
320226
+ exports2.isTransientLanding = isTransientLanding;
320227
+ exports2.getAdaptiveDebtRoutes = getAdaptiveDebtRoutes;
320228
+ exports2.listTransientDebtSuppressions = listTransientDebtSuppressions;
320226
320229
  var exploration_state_js_1 = require_exploration_state();
320227
320230
  var exploration_parser_js_1 = require_exploration_parser();
320228
320231
  exports2.MAX_FINISH_REDIRECTS = 2;
@@ -320582,6 +320585,132 @@ var require_survey_link_frontier = __commonJS({
320582
320585
  function describeBlockingRoutes(items, max = 3) {
320583
320586
  return items.slice(0, max).map((i) => i.label ? `${i.label} (${i.route})` : i.route).join(", ");
320584
320587
  }
320588
+ function isOpaqueToken(v) {
320589
+ if (!v)
320590
+ return false;
320591
+ if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v))
320592
+ return true;
320593
+ if (v.length >= 20 && /^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/.test(v))
320594
+ return true;
320595
+ if (v.length >= 20 && !/[\s_-]/.test(v) && /[A-Za-z]/.test(v) && /\d/.test(v))
320596
+ return true;
320597
+ if (v.length >= 24 && /^[A-Za-z0-9+/=]+$/.test(v) && /\d/.test(v))
320598
+ return true;
320599
+ return false;
320600
+ }
320601
+ var FLASH_QUERY_KEYS = /* @__PURE__ */ new Set(["toast", "flash", "snackbar"]);
320602
+ var SESSION_TOKEN_QUERY_KEYS = /* @__PURE__ */ new Set([
320603
+ "sid",
320604
+ "sess",
320605
+ "sessid",
320606
+ "session",
320607
+ "sessionid",
320608
+ "jsessionid",
320609
+ "phpsessid"
320610
+ ]);
320611
+ var ONE_TIME_TOKEN_QUERY_KEYS = /* @__PURE__ */ new Set([
320612
+ "token",
320613
+ "oobcode",
320614
+ "confirmation_token",
320615
+ "reset_token",
320616
+ "reset_password_token",
320617
+ "verification_token",
320618
+ "activation_token",
320619
+ "invitation_token",
320620
+ "unsubscribe_token"
320621
+ ]);
320622
+ var ERROR_PATH_RE = /^\/(?:404|500|503|403|401|error|not[-_]?found|maintenance|oops|unauthorized|forbidden)(?:\/|$)/i;
320623
+ var OAUTH_CALLBACK_PATH_RE = /(?:^|\/)(?:oauth2?\/callback|auth\/callback|sso\/callback|oidc\/callback|signin[-_]oidc|auth\/response)(?:\/|$)/i;
320624
+ var ONE_TIME_PATH_PREFIX_RE = /^\/(?:verify|verify[-_]email|confirm|confirmation|activate|activation|reset[-_]password|password[-_]reset|magic[-_]?link|invitation|invite|unsubscribe|email[-_]confirm)\/([^/?#]+)/i;
320625
+ var INFRA_PATH_RE = /^\/(?:cdn-cgi|__\/auth|\.well-known|_next\/(?:static|data|image)|_nuxt|_vercel)(?:\/|$)/i;
320626
+ var DOWNLOAD_PATH_RE = /(?:^|\/)(?:download|export)\/([^/?#]+)$/i;
320627
+ function isTransientLanding(route2, depth = 0) {
320628
+ if (!route2 || route2 === "/" || depth > 4)
320629
+ return false;
320630
+ let url;
320631
+ try {
320632
+ url = new URL(route2, "http://transient.invalid");
320633
+ } catch {
320634
+ return false;
320635
+ }
320636
+ const path = url.pathname;
320637
+ const params = url.searchParams;
320638
+ if (url.hash.startsWith("#/") && isTransientLanding(url.hash.slice(1), depth + 1))
320639
+ return true;
320640
+ if (ERROR_PATH_RE.test(path))
320641
+ return true;
320642
+ if (INFRA_PATH_RE.test(path))
320643
+ return true;
320644
+ if (OAUTH_CALLBACK_PATH_RE.test(path))
320645
+ return true;
320646
+ if (isOpaqueToken(params.get("code")) && isOpaqueToken(params.get("state")))
320647
+ return true;
320648
+ if (params.has("error") && isOpaqueToken(params.get("state")))
320649
+ return true;
320650
+ if (/[#&?](?:access_token|id_token)=/.test(url.hash) || params.has("access_token") || params.has("id_token")) {
320651
+ return true;
320652
+ }
320653
+ for (const key of params.keys()) {
320654
+ if (FLASH_QUERY_KEYS.has(key.toLowerCase()))
320655
+ return true;
320656
+ }
320657
+ const otPath = ONE_TIME_PATH_PREFIX_RE.exec(path);
320658
+ if (otPath) {
320659
+ let seg = otPath[1];
320660
+ try {
320661
+ seg = decodeURIComponent(seg);
320662
+ } catch {
320663
+ }
320664
+ if (isOpaqueToken(seg))
320665
+ return true;
320666
+ }
320667
+ for (const [key, value] of params) {
320668
+ if (ONE_TIME_TOKEN_QUERY_KEYS.has(key.toLowerCase()) && isOpaqueToken(value))
320669
+ return true;
320670
+ }
320671
+ const dl = DOWNLOAD_PATH_RE.exec(path);
320672
+ if (dl && (/\.[a-z0-9]{2,5}$/i.test(dl[1]) || /\d/.test(dl[1])))
320673
+ return true;
320674
+ for (const [key, value] of params) {
320675
+ if (SESSION_TOKEN_QUERY_KEYS.has(key.toLowerCase()) && isOpaqueToken(value))
320676
+ return true;
320677
+ }
320678
+ return false;
320679
+ }
320680
+ function getAdaptiveDebtRoutes(state2) {
320681
+ const excluded = (r) => {
320682
+ if (r === "/")
320683
+ return true;
320684
+ const item = state2.frontier.get(r);
320685
+ if (item?.source === "link-seen" && item.attempted === true)
320686
+ return true;
320687
+ if (visitedSatisfies(state2, r))
320688
+ return true;
320689
+ if (item?.source !== "link-seen" && isTransientLanding(r))
320690
+ return true;
320691
+ return false;
320692
+ };
320693
+ const ranked = (0, exploration_state_js_1.getRankedFrontier)(state2, { preferShallow: true }).filter((r) => !excluded(r));
320694
+ const rankedSet = new Set(ranked);
320695
+ const navigatedUncaptured = [];
320696
+ for (const r of state2.frontier.keys()) {
320697
+ if (!rankedSet.has(r) && !excluded(r))
320698
+ navigatedUncaptured.push(r);
320699
+ }
320700
+ return ranked.concat(navigatedUncaptured);
320701
+ }
320702
+ function listTransientDebtSuppressions(state2) {
320703
+ const out = [];
320704
+ for (const [r, item] of state2.frontier) {
320705
+ if (r === "/" || item.source === "link-seen")
320706
+ continue;
320707
+ if (visitedSatisfies(state2, r))
320708
+ continue;
320709
+ if (isTransientLanding(r))
320710
+ out.push(r);
320711
+ }
320712
+ return out;
320713
+ }
320585
320714
  }
320586
320715
  });
320587
320716
 
@@ -324659,21 +324788,16 @@ ${inboxPromptBlock}`;
324659
324788
  let discoveryCreditedThrough = 0;
324660
324789
  let adaptiveLastDiscoveryIteration = Number.NEGATIVE_INFINITY;
324661
324790
  let adaptiveDiscoveryLeaseUsed = false;
324791
+ let loggedTransientDebtSuppression = false;
324662
324792
  const adaptiveDebtRoutes = () => {
324663
- const isAttemptedLinkEntry = (r) => {
324664
- const item = state2.frontier.get(r);
324665
- return item?.source === "link-seen" && item.attempted === true;
324666
- };
324667
- const isSatisfied = (r) => (0, survey_link_frontier_js_1.visitedSatisfies)(state2, r);
324668
- const ranked = (0, exploration_state_js_1.getRankedFrontier)(state2, { preferShallow: true }).filter((r) => r !== "/" && !isAttemptedLinkEntry(r) && !isSatisfied(r));
324669
- const rankedSet = new Set(ranked);
324670
- const navigatedUncaptured = [];
324671
- for (const r of state2.frontier.keys()) {
324672
- if (r !== "/" && !rankedSet.has(r) && !isAttemptedLinkEntry(r) && !isSatisfied(r)) {
324673
- navigatedUncaptured.push(r);
324793
+ if (!loggedTransientDebtSuppression) {
324794
+ const suppressed = (0, survey_link_frontier_js_1.listTransientDebtSuppressions)(state2);
324795
+ if (suppressed.length > 0) {
324796
+ loggedTransientDebtSuppression = true;
324797
+ logs2.push(` [debt-hygiene] excluded ${suppressed.length} transient landing(s) from adaptive debt: ${suppressed.slice(0, 6).join(", ")}${suppressed.length > 6 ? ` \u2026+${suppressed.length - 6}` : ""}`);
324674
324798
  }
324675
324799
  }
324676
- return ranked.concat(navigatedUncaptured);
324800
+ return (0, survey_link_frontier_js_1.getAdaptiveDebtRoutes)(state2);
324677
324801
  };
324678
324802
  const describeRankedRoutes = (routes, max) => routes.slice(0, max).map((r) => {
324679
324803
  const label = state2.frontier.get(r)?.label;
@@ -350727,7 +350851,7 @@ var require_package4 = __commonJS({
350727
350851
  "package.json"(exports2, module2) {
350728
350852
  module2.exports = {
350729
350853
  name: "@validate.qa/runner",
350730
- version: "1.0.61",
350854
+ version: "1.0.62",
350731
350855
  description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
350732
350856
  bin: {
350733
350857
  "validate-runner": "dist/cli.js"
package/dist/cli.mjs CHANGED
@@ -320228,6 +320228,9 @@ var require_survey_link_frontier = __commonJS({
320228
320228
  exports.markLinkNavigationAttempt = markLinkNavigationAttempt;
320229
320229
  exports.getFinishBlockingFrontier = getFinishBlockingFrontier;
320230
320230
  exports.describeBlockingRoutes = describeBlockingRoutes;
320231
+ exports.isTransientLanding = isTransientLanding;
320232
+ exports.getAdaptiveDebtRoutes = getAdaptiveDebtRoutes;
320233
+ exports.listTransientDebtSuppressions = listTransientDebtSuppressions;
320231
320234
  var exploration_state_js_1 = require_exploration_state();
320232
320235
  var exploration_parser_js_1 = require_exploration_parser();
320233
320236
  exports.MAX_FINISH_REDIRECTS = 2;
@@ -320587,6 +320590,132 @@ var require_survey_link_frontier = __commonJS({
320587
320590
  function describeBlockingRoutes(items, max = 3) {
320588
320591
  return items.slice(0, max).map((i) => i.label ? `${i.label} (${i.route})` : i.route).join(", ");
320589
320592
  }
320593
+ function isOpaqueToken(v) {
320594
+ if (!v)
320595
+ return false;
320596
+ if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v))
320597
+ return true;
320598
+ if (v.length >= 20 && /^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/.test(v))
320599
+ return true;
320600
+ if (v.length >= 20 && !/[\s_-]/.test(v) && /[A-Za-z]/.test(v) && /\d/.test(v))
320601
+ return true;
320602
+ if (v.length >= 24 && /^[A-Za-z0-9+/=]+$/.test(v) && /\d/.test(v))
320603
+ return true;
320604
+ return false;
320605
+ }
320606
+ var FLASH_QUERY_KEYS = /* @__PURE__ */ new Set(["toast", "flash", "snackbar"]);
320607
+ var SESSION_TOKEN_QUERY_KEYS = /* @__PURE__ */ new Set([
320608
+ "sid",
320609
+ "sess",
320610
+ "sessid",
320611
+ "session",
320612
+ "sessionid",
320613
+ "jsessionid",
320614
+ "phpsessid"
320615
+ ]);
320616
+ var ONE_TIME_TOKEN_QUERY_KEYS = /* @__PURE__ */ new Set([
320617
+ "token",
320618
+ "oobcode",
320619
+ "confirmation_token",
320620
+ "reset_token",
320621
+ "reset_password_token",
320622
+ "verification_token",
320623
+ "activation_token",
320624
+ "invitation_token",
320625
+ "unsubscribe_token"
320626
+ ]);
320627
+ var ERROR_PATH_RE = /^\/(?:404|500|503|403|401|error|not[-_]?found|maintenance|oops|unauthorized|forbidden)(?:\/|$)/i;
320628
+ var OAUTH_CALLBACK_PATH_RE = /(?:^|\/)(?:oauth2?\/callback|auth\/callback|sso\/callback|oidc\/callback|signin[-_]oidc|auth\/response)(?:\/|$)/i;
320629
+ var ONE_TIME_PATH_PREFIX_RE = /^\/(?:verify|verify[-_]email|confirm|confirmation|activate|activation|reset[-_]password|password[-_]reset|magic[-_]?link|invitation|invite|unsubscribe|email[-_]confirm)\/([^/?#]+)/i;
320630
+ var INFRA_PATH_RE = /^\/(?:cdn-cgi|__\/auth|\.well-known|_next\/(?:static|data|image)|_nuxt|_vercel)(?:\/|$)/i;
320631
+ var DOWNLOAD_PATH_RE = /(?:^|\/)(?:download|export)\/([^/?#]+)$/i;
320632
+ function isTransientLanding(route2, depth = 0) {
320633
+ if (!route2 || route2 === "/" || depth > 4)
320634
+ return false;
320635
+ let url;
320636
+ try {
320637
+ url = new URL(route2, "http://transient.invalid");
320638
+ } catch {
320639
+ return false;
320640
+ }
320641
+ const path = url.pathname;
320642
+ const params = url.searchParams;
320643
+ if (url.hash.startsWith("#/") && isTransientLanding(url.hash.slice(1), depth + 1))
320644
+ return true;
320645
+ if (ERROR_PATH_RE.test(path))
320646
+ return true;
320647
+ if (INFRA_PATH_RE.test(path))
320648
+ return true;
320649
+ if (OAUTH_CALLBACK_PATH_RE.test(path))
320650
+ return true;
320651
+ if (isOpaqueToken(params.get("code")) && isOpaqueToken(params.get("state")))
320652
+ return true;
320653
+ if (params.has("error") && isOpaqueToken(params.get("state")))
320654
+ return true;
320655
+ if (/[#&?](?:access_token|id_token)=/.test(url.hash) || params.has("access_token") || params.has("id_token")) {
320656
+ return true;
320657
+ }
320658
+ for (const key of params.keys()) {
320659
+ if (FLASH_QUERY_KEYS.has(key.toLowerCase()))
320660
+ return true;
320661
+ }
320662
+ const otPath = ONE_TIME_PATH_PREFIX_RE.exec(path);
320663
+ if (otPath) {
320664
+ let seg = otPath[1];
320665
+ try {
320666
+ seg = decodeURIComponent(seg);
320667
+ } catch {
320668
+ }
320669
+ if (isOpaqueToken(seg))
320670
+ return true;
320671
+ }
320672
+ for (const [key, value] of params) {
320673
+ if (ONE_TIME_TOKEN_QUERY_KEYS.has(key.toLowerCase()) && isOpaqueToken(value))
320674
+ return true;
320675
+ }
320676
+ const dl = DOWNLOAD_PATH_RE.exec(path);
320677
+ if (dl && (/\.[a-z0-9]{2,5}$/i.test(dl[1]) || /\d/.test(dl[1])))
320678
+ return true;
320679
+ for (const [key, value] of params) {
320680
+ if (SESSION_TOKEN_QUERY_KEYS.has(key.toLowerCase()) && isOpaqueToken(value))
320681
+ return true;
320682
+ }
320683
+ return false;
320684
+ }
320685
+ function getAdaptiveDebtRoutes(state2) {
320686
+ const excluded = (r) => {
320687
+ if (r === "/")
320688
+ return true;
320689
+ const item = state2.frontier.get(r);
320690
+ if (item?.source === "link-seen" && item.attempted === true)
320691
+ return true;
320692
+ if (visitedSatisfies(state2, r))
320693
+ return true;
320694
+ if (item?.source !== "link-seen" && isTransientLanding(r))
320695
+ return true;
320696
+ return false;
320697
+ };
320698
+ const ranked = (0, exploration_state_js_1.getRankedFrontier)(state2, { preferShallow: true }).filter((r) => !excluded(r));
320699
+ const rankedSet = new Set(ranked);
320700
+ const navigatedUncaptured = [];
320701
+ for (const r of state2.frontier.keys()) {
320702
+ if (!rankedSet.has(r) && !excluded(r))
320703
+ navigatedUncaptured.push(r);
320704
+ }
320705
+ return ranked.concat(navigatedUncaptured);
320706
+ }
320707
+ function listTransientDebtSuppressions(state2) {
320708
+ const out = [];
320709
+ for (const [r, item] of state2.frontier) {
320710
+ if (r === "/" || item.source === "link-seen")
320711
+ continue;
320712
+ if (visitedSatisfies(state2, r))
320713
+ continue;
320714
+ if (isTransientLanding(r))
320715
+ out.push(r);
320716
+ }
320717
+ return out;
320718
+ }
320590
320719
  }
320591
320720
  });
320592
320721
 
@@ -324664,21 +324793,16 @@ ${inboxPromptBlock}`;
324664
324793
  let discoveryCreditedThrough = 0;
324665
324794
  let adaptiveLastDiscoveryIteration = Number.NEGATIVE_INFINITY;
324666
324795
  let adaptiveDiscoveryLeaseUsed = false;
324796
+ let loggedTransientDebtSuppression = false;
324667
324797
  const adaptiveDebtRoutes = () => {
324668
- const isAttemptedLinkEntry = (r) => {
324669
- const item = state2.frontier.get(r);
324670
- return item?.source === "link-seen" && item.attempted === true;
324671
- };
324672
- const isSatisfied = (r) => (0, survey_link_frontier_js_1.visitedSatisfies)(state2, r);
324673
- const ranked = (0, exploration_state_js_1.getRankedFrontier)(state2, { preferShallow: true }).filter((r) => r !== "/" && !isAttemptedLinkEntry(r) && !isSatisfied(r));
324674
- const rankedSet = new Set(ranked);
324675
- const navigatedUncaptured = [];
324676
- for (const r of state2.frontier.keys()) {
324677
- if (r !== "/" && !rankedSet.has(r) && !isAttemptedLinkEntry(r) && !isSatisfied(r)) {
324678
- navigatedUncaptured.push(r);
324798
+ if (!loggedTransientDebtSuppression) {
324799
+ const suppressed = (0, survey_link_frontier_js_1.listTransientDebtSuppressions)(state2);
324800
+ if (suppressed.length > 0) {
324801
+ loggedTransientDebtSuppression = true;
324802
+ logs2.push(` [debt-hygiene] excluded ${suppressed.length} transient landing(s) from adaptive debt: ${suppressed.slice(0, 6).join(", ")}${suppressed.length > 6 ? ` \u2026+${suppressed.length - 6}` : ""}`);
324679
324803
  }
324680
324804
  }
324681
- return ranked.concat(navigatedUncaptured);
324805
+ return (0, survey_link_frontier_js_1.getAdaptiveDebtRoutes)(state2);
324682
324806
  };
324683
324807
  const describeRankedRoutes = (routes, max) => routes.slice(0, max).map((r) => {
324684
324808
  const label = state2.frontier.get(r)?.label;
@@ -350732,7 +350856,7 @@ var require_package4 = __commonJS({
350732
350856
  "package.json"(exports, module) {
350733
350857
  module.exports = {
350734
350858
  name: "@validate.qa/runner",
350735
- version: "1.0.61",
350859
+ version: "1.0.62",
350736
350860
  description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
350737
350861
  bin: {
350738
350862
  "validate-runner": "dist/cli.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@validate.qa/runner",
3
- "version": "1.0.61",
3
+ "version": "1.0.62",
4
4
  "description": "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
5
5
  "bin": {
6
6
  "validate-runner": "dist/cli.js"