@validate.qa/runner 1.0.53 → 1.0.54

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.js CHANGED
@@ -5604,6 +5604,91 @@ var init_env_flags = __esm({
5604
5604
  }
5605
5605
  });
5606
5606
 
5607
+ // ../shared/dist/analytics-url.js
5608
+ function isSensitiveQueryKey(key) {
5609
+ return SENSITIVE_QUERY_KEY_RE.test(key);
5610
+ }
5611
+ function scrubSearchParams(search) {
5612
+ if (!search)
5613
+ return "";
5614
+ const raw = search.startsWith("?") ? search.slice(1) : search;
5615
+ if (!raw)
5616
+ return "";
5617
+ try {
5618
+ const params = new URLSearchParams(raw);
5619
+ let changed = false;
5620
+ for (const key of [...params.keys()]) {
5621
+ if (isSensitiveQueryKey(key)) {
5622
+ params.set(key, "[redacted]");
5623
+ changed = true;
5624
+ }
5625
+ }
5626
+ if (!changed) {
5627
+ return `?${raw}`;
5628
+ }
5629
+ const next = params.toString();
5630
+ return next ? `?${next}` : "";
5631
+ } catch {
5632
+ return "";
5633
+ }
5634
+ }
5635
+ function scrubUrl(url) {
5636
+ if (!url)
5637
+ return url;
5638
+ try {
5639
+ const parsed = new URL(url, typeof window !== "undefined" ? window.location.origin : "https://local.invalid");
5640
+ parsed.search = scrubSearchParams(parsed.search);
5641
+ parsed.hash = "";
5642
+ return parsed.toString();
5643
+ } catch {
5644
+ const noHash = url.split("#")[0] ?? url;
5645
+ const q = noHash.indexOf("?");
5646
+ if (q === -1)
5647
+ return noHash;
5648
+ return `${noHash.slice(0, q)}${scrubSearchParams(noHash.slice(q))}`;
5649
+ }
5650
+ }
5651
+ function safeCurrentUrl() {
5652
+ if (typeof window === "undefined")
5653
+ return "";
5654
+ try {
5655
+ return scrubUrl(window.location.href);
5656
+ } catch {
5657
+ return window.location.pathname;
5658
+ }
5659
+ }
5660
+ function stripQuery(value) {
5661
+ const idx = value.indexOf("?");
5662
+ return idx === -1 ? value : value.slice(0, idx);
5663
+ }
5664
+ function scrubUrlPropertyBag(props) {
5665
+ if (!props)
5666
+ return;
5667
+ const urlKeys = ["$current_url", "$referrer", "$initial_current_url", "$initial_referrer"];
5668
+ for (const key of urlKeys) {
5669
+ const value = props[key];
5670
+ if (typeof value === "string") {
5671
+ props[key] = scrubUrl(value);
5672
+ }
5673
+ }
5674
+ for (const key of ["$pathname", "$initial_pathname"]) {
5675
+ const value = props[key];
5676
+ if (typeof value === "string" && value.includes("?")) {
5677
+ props[key] = stripQuery(value);
5678
+ }
5679
+ }
5680
+ if (typeof props.search === "string") {
5681
+ props.search = scrubSearchParams(props.search) || void 0;
5682
+ }
5683
+ }
5684
+ var SENSITIVE_QUERY_KEY_RE;
5685
+ var init_analytics_url = __esm({
5686
+ "../shared/dist/analytics-url.js"() {
5687
+ "use strict";
5688
+ SENSITIVE_QUERY_KEY_RE = /^(access_token|refresh_token|id_token|token|code|state|password|secret|api[_-]?key|auth|authorization|session|jwt|otp|email|phone|magic[_-]?link)$|token|secret|password|credential|email|phone|(^|[_-])(otp|verification|auth)[_-]?code($|[_-])|(^|[_-])(state|session)$/i;
5689
+ }
5690
+ });
5691
+
5607
5692
  // ../shared/dist/index.js
5608
5693
  var dist_exports = {};
5609
5694
  __export(dist_exports, {
@@ -5746,6 +5831,7 @@ __export(dist_exports, {
5746
5831
  isRunnableStep: () => isRunnableStep,
5747
5832
  isSafeDeepLink: () => isSafeDeepLink,
5748
5833
  isSameRegistrableDomainHost: () => isSameRegistrableDomainHost,
5834
+ isSensitiveQueryKey: () => isSensitiveQueryKey,
5749
5835
  isSharedAuthInjectEnabled: () => isSharedAuthInjectEnabled,
5750
5836
  isSttModelForProvider: () => isSttModelForProvider,
5751
5837
  isTestReadyForPlatform: () => isTestReadyForPlatform,
@@ -5779,9 +5865,13 @@ __export(dist_exports, {
5779
5865
  resolveMobileStepValuePlaceholders: () => resolveMobileStepValuePlaceholders,
5780
5866
  resolvePlatformLocatorBundle: () => resolvePlatformLocatorBundle,
5781
5867
  resolveSttModelForProvider: () => resolveSttModelForProvider,
5868
+ safeCurrentUrl: () => safeCurrentUrl,
5782
5869
  safeOrigin: () => safeOrigin,
5783
5870
  sanitizeSttErrorMessage: () => sanitizeSttErrorMessage,
5784
5871
  sanitizeTestVariables: () => sanitizeTestVariables,
5872
+ scrubSearchParams: () => scrubSearchParams,
5873
+ scrubUrl: () => scrubUrl,
5874
+ scrubUrlPropertyBag: () => scrubUrlPropertyBag,
5785
5875
  selectorCandidatesForStep: () => selectorCandidatesForStep,
5786
5876
  selectorForValue: () => selectorForValue,
5787
5877
  stepAppliesToPlatform: () => stepAppliesToPlatform,
@@ -5825,6 +5915,7 @@ var init_dist = __esm({
5825
5915
  init_voice_config();
5826
5916
  init_feature_flags();
5827
5917
  init_env_flags();
5918
+ init_analytics_url();
5828
5919
  }
5829
5920
  });
5830
5921
 
@@ -347430,7 +347521,6 @@ var require_repo_analysis_runner = __commonJS({
347430
347521
  const softTestTarget = intEnv("REPO_ANALYSIS_SOFT_TEST_TARGET", 20, 1, 50);
347431
347522
  const maxEndpointsPerFeature = intEnv("REPO_ANALYSIS_MAX_ENDPOINTS_PER_FEATURE", 80, 1, 400);
347432
347523
  const maxFacts = intEnv("REPO_ANALYSIS_MAX_FACTS", 40, 1, 120);
347433
- const engine = (0, agentic_cli_constants_js_1.getAgenticEngine)(ctx.exploreModel);
347434
347524
  const provider = "anthropic";
347435
347525
  const model = agentic_cli_constants_js_1.CLAUDE_CODE_DEFAULT_MODEL;
347436
347526
  log2(`=== Repo Analysis Runner (Claude CLI, no browser${isMobileAnalysis ? ", mobile\u2192Appium" : ", web\u2192Playwright"}) ===`);
@@ -349134,7 +349224,7 @@ var require_package4 = __commonJS({
349134
349224
  "package.json"(exports2, module2) {
349135
349225
  module2.exports = {
349136
349226
  name: "@validate.qa/runner",
349137
- version: "1.0.53",
349227
+ version: "1.0.54",
349138
349228
  description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
349139
349229
  bin: {
349140
349230
  "validate-runner": "dist/cli.js"
package/dist/cli.mjs CHANGED
@@ -5609,6 +5609,91 @@ var init_env_flags = __esm({
5609
5609
  }
5610
5610
  });
5611
5611
 
5612
+ // ../shared/dist/analytics-url.js
5613
+ function isSensitiveQueryKey(key) {
5614
+ return SENSITIVE_QUERY_KEY_RE.test(key);
5615
+ }
5616
+ function scrubSearchParams(search) {
5617
+ if (!search)
5618
+ return "";
5619
+ const raw = search.startsWith("?") ? search.slice(1) : search;
5620
+ if (!raw)
5621
+ return "";
5622
+ try {
5623
+ const params = new URLSearchParams(raw);
5624
+ let changed = false;
5625
+ for (const key of [...params.keys()]) {
5626
+ if (isSensitiveQueryKey(key)) {
5627
+ params.set(key, "[redacted]");
5628
+ changed = true;
5629
+ }
5630
+ }
5631
+ if (!changed) {
5632
+ return `?${raw}`;
5633
+ }
5634
+ const next = params.toString();
5635
+ return next ? `?${next}` : "";
5636
+ } catch {
5637
+ return "";
5638
+ }
5639
+ }
5640
+ function scrubUrl(url) {
5641
+ if (!url)
5642
+ return url;
5643
+ try {
5644
+ const parsed = new URL(url, typeof window !== "undefined" ? window.location.origin : "https://local.invalid");
5645
+ parsed.search = scrubSearchParams(parsed.search);
5646
+ parsed.hash = "";
5647
+ return parsed.toString();
5648
+ } catch {
5649
+ const noHash = url.split("#")[0] ?? url;
5650
+ const q = noHash.indexOf("?");
5651
+ if (q === -1)
5652
+ return noHash;
5653
+ return `${noHash.slice(0, q)}${scrubSearchParams(noHash.slice(q))}`;
5654
+ }
5655
+ }
5656
+ function safeCurrentUrl() {
5657
+ if (typeof window === "undefined")
5658
+ return "";
5659
+ try {
5660
+ return scrubUrl(window.location.href);
5661
+ } catch {
5662
+ return window.location.pathname;
5663
+ }
5664
+ }
5665
+ function stripQuery(value) {
5666
+ const idx = value.indexOf("?");
5667
+ return idx === -1 ? value : value.slice(0, idx);
5668
+ }
5669
+ function scrubUrlPropertyBag(props) {
5670
+ if (!props)
5671
+ return;
5672
+ const urlKeys = ["$current_url", "$referrer", "$initial_current_url", "$initial_referrer"];
5673
+ for (const key of urlKeys) {
5674
+ const value = props[key];
5675
+ if (typeof value === "string") {
5676
+ props[key] = scrubUrl(value);
5677
+ }
5678
+ }
5679
+ for (const key of ["$pathname", "$initial_pathname"]) {
5680
+ const value = props[key];
5681
+ if (typeof value === "string" && value.includes("?")) {
5682
+ props[key] = stripQuery(value);
5683
+ }
5684
+ }
5685
+ if (typeof props.search === "string") {
5686
+ props.search = scrubSearchParams(props.search) || void 0;
5687
+ }
5688
+ }
5689
+ var SENSITIVE_QUERY_KEY_RE;
5690
+ var init_analytics_url = __esm({
5691
+ "../shared/dist/analytics-url.js"() {
5692
+ "use strict";
5693
+ SENSITIVE_QUERY_KEY_RE = /^(access_token|refresh_token|id_token|token|code|state|password|secret|api[_-]?key|auth|authorization|session|jwt|otp|email|phone|magic[_-]?link)$|token|secret|password|credential|email|phone|(^|[_-])(otp|verification|auth)[_-]?code($|[_-])|(^|[_-])(state|session)$/i;
5694
+ }
5695
+ });
5696
+
5612
5697
  // ../shared/dist/index.js
5613
5698
  var dist_exports = {};
5614
5699
  __export(dist_exports, {
@@ -5751,6 +5836,7 @@ __export(dist_exports, {
5751
5836
  isRunnableStep: () => isRunnableStep,
5752
5837
  isSafeDeepLink: () => isSafeDeepLink,
5753
5838
  isSameRegistrableDomainHost: () => isSameRegistrableDomainHost,
5839
+ isSensitiveQueryKey: () => isSensitiveQueryKey,
5754
5840
  isSharedAuthInjectEnabled: () => isSharedAuthInjectEnabled,
5755
5841
  isSttModelForProvider: () => isSttModelForProvider,
5756
5842
  isTestReadyForPlatform: () => isTestReadyForPlatform,
@@ -5784,9 +5870,13 @@ __export(dist_exports, {
5784
5870
  resolveMobileStepValuePlaceholders: () => resolveMobileStepValuePlaceholders,
5785
5871
  resolvePlatformLocatorBundle: () => resolvePlatformLocatorBundle,
5786
5872
  resolveSttModelForProvider: () => resolveSttModelForProvider,
5873
+ safeCurrentUrl: () => safeCurrentUrl,
5787
5874
  safeOrigin: () => safeOrigin,
5788
5875
  sanitizeSttErrorMessage: () => sanitizeSttErrorMessage,
5789
5876
  sanitizeTestVariables: () => sanitizeTestVariables,
5877
+ scrubSearchParams: () => scrubSearchParams,
5878
+ scrubUrl: () => scrubUrl,
5879
+ scrubUrlPropertyBag: () => scrubUrlPropertyBag,
5790
5880
  selectorCandidatesForStep: () => selectorCandidatesForStep,
5791
5881
  selectorForValue: () => selectorForValue,
5792
5882
  stepAppliesToPlatform: () => stepAppliesToPlatform,
@@ -5830,6 +5920,7 @@ var init_dist = __esm({
5830
5920
  init_voice_config();
5831
5921
  init_feature_flags();
5832
5922
  init_env_flags();
5923
+ init_analytics_url();
5833
5924
  }
5834
5925
  });
5835
5926
 
@@ -347435,7 +347526,6 @@ var require_repo_analysis_runner = __commonJS({
347435
347526
  const softTestTarget = intEnv("REPO_ANALYSIS_SOFT_TEST_TARGET", 20, 1, 50);
347436
347527
  const maxEndpointsPerFeature = intEnv("REPO_ANALYSIS_MAX_ENDPOINTS_PER_FEATURE", 80, 1, 400);
347437
347528
  const maxFacts = intEnv("REPO_ANALYSIS_MAX_FACTS", 40, 1, 120);
347438
- const engine = (0, agentic_cli_constants_js_1.getAgenticEngine)(ctx.exploreModel);
347439
347529
  const provider = "anthropic";
347440
347530
  const model = agentic_cli_constants_js_1.CLAUDE_CODE_DEFAULT_MODEL;
347441
347531
  log2(`=== Repo Analysis Runner (Claude CLI, no browser${isMobileAnalysis ? ", mobile\u2192Appium" : ", web\u2192Playwright"}) ===`);
@@ -349139,7 +349229,7 @@ var require_package4 = __commonJS({
349139
349229
  "package.json"(exports, module) {
349140
349230
  module.exports = {
349141
349231
  name: "@validate.qa/runner",
349142
- version: "1.0.53",
349232
+ version: "1.0.54",
349143
349233
  description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
349144
349234
  bin: {
349145
349235
  "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.53",
3
+ "version": "1.0.54",
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"