@freshworks/shiftleft-tools 1.1.16 → 1.1.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freshworks/shiftleft-tools",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "CLI for managing Cursor rules/skills and Postman test infrastructure across Java Spring Boot and Node.js/Express projects",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -337,7 +337,7 @@ def extract_tests_from_item(item, collection_name, depth=0):
337
337
 
338
338
  # Try format with Reason and Env (flexible spacing/separators)
339
339
  skip_match = re.search(
340
- r"\[SKIP\].*?Reason:\s*([^|,;]+)(?:[|,;]\s*Env:\s*(\S+))?",
340
+ r"\[SKIP\].*?Reason:\s*([^|,;]+)(?:[|,;]\s*Env:\s*(\w+))?",
341
341
  prereq_text, re.IGNORECASE
342
342
  )
343
343
  if skip_match:
@@ -740,7 +740,7 @@ skips_with_reason = sum(1 for s in all_skipped_tests if s.get('reason'))
740
740
  skips_without_reason = total_skipped_tests - skips_with_reason
741
741
  skips_by_env = defaultdict(list)
742
742
  for skip in all_skipped_tests:
743
- env = skip.get('env', 'unknown')
743
+ env = skip.get('env') or 'unknown'
744
744
  skips_by_env[env].append(skip)
745
745
 
746
746
  # Query params metrics
@@ -1011,7 +1011,7 @@ def include_row(ep):
1011
1011
  include_rows = [include_row(ep) for ep in endpoints_with_include]
1012
1012
  include_html = collapsible('Include Parameter Details', f'{len(endpoints_with_include)} endpoints', [{'label':'Endpoint','style':'text-align:left;'},{'label':'Coverage'},{'label':'Expected Values'},{'label':'Tested Values'},{'label':'Missing'}], include_rows)
1013
1013
 
1014
- skip_rows = [f'<tr><td class="left"><span class="path">{s["collection"]}: {s["name"]}</span></td><td>{s.get("env","unknown").upper()}</td><td class="left" style="color:{"var(--color-error)" if not s.get("reason") else "inherit"};">{s.get("reason") or "Missing reason"}</td></tr>' for s in all_skipped_tests]
1014
+ skip_rows = [f'<tr><td class="left"><span class="path">{s.get("collection","")}: {s.get("name","")}</span></td><td>{(s.get("env") or "unknown").upper()}</td><td class="left" style="color:{"var(--color-error)" if not s.get("reason") else "inherit"};">{s.get("reason") or "Missing reason"}</td></tr>' for s in all_skipped_tests]
1015
1015
  skip_html = collapsible('Environment-Conditional Skips', f'{total_skipped_tests} tests', [{'label':'Test','style':'text-align:left;'},{'label':'Skipped In'},{'label':'Reason','style':'text-align:left;'}], skip_rows) if total_skipped_tests > 0 else ''
1016
1016
 
1017
1017
  # Assemble full HTML
@@ -385,7 +385,7 @@ def extract_tests_from_item(item, collection_name, depth=0):
385
385
 
386
386
  # Format 1: [SKIP] Reason: ... | Env: ...
387
387
  skip_match = re.search(
388
- r"\[SKIP\].*?Reason:\s*([^|,;]+)(?:[|,;]\s*Env:\s*(\S+))?",
388
+ r"\[SKIP\].*?Reason:\s*([^|,;]+)(?:[|,;]\s*Env:\s*(\w+))?",
389
389
  prereq_text, re.IGNORECASE
390
390
  )
391
391
  if skip_match: