@resolveio/server-lib 22.3.224 → 22.3.226

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.
@@ -1048,6 +1048,20 @@ function supportDiagnosisEvidenceIsTicketAttachment(entry) {
1048
1048
  || /(?:^|\/)manual-ticket\.request\.txt$/i.test(text)
1049
1049
  || /(?:^|\/)email\.metadata\.json$/i.test(text);
1050
1050
  }
1051
+ function supportDiagnosisEvidencePathAlias(value) {
1052
+ var text = cleanText(value, 500);
1053
+ if (!text) {
1054
+ return '';
1055
+ }
1056
+ if (/\b(?:support_ticket|git_commit|mongo|browser|qa|log|ticket|code|commit)\b/i.test(text) && !/[/.]/.test(text)) {
1057
+ return '';
1058
+ }
1059
+ if (/(?:^|\/)(?:angular|server|client|src|lib|test|tests|docs|qa-artifacts|runner-evidence|\.resolveio-support-context|\.resolveio-context)\//i.test(text)
1060
+ || /\.(?:ts|tsx|js|jsx|mjs|cjs|html|scss|css|json|md|png|jpe?g|webp|gif|pdf|csv|txt)(?::\d+(?:-\d+)?)?$/i.test(text)) {
1061
+ return text;
1062
+ }
1063
+ return '';
1064
+ }
1051
1065
  function normalizeSupportDiagnosisEvidence(values, ownerFiles) {
1052
1066
  if (ownerFiles === void 0) { ownerFiles = []; }
1053
1067
  var allowed = new Set(['ticket', 'browser', 'mongo', 'log', 'code', 'commit', 'qa', 'other']);
@@ -1079,7 +1093,16 @@ function normalizeSupportDiagnosisEvidence(values, ownerFiles) {
1079
1093
  .filter(function (entry) { return entry && typeof entry === 'object' && !Array.isArray(entry); })
1080
1094
  .map(function (entry) {
1081
1095
  var type = cleanText(entry.type, 80).toLowerCase();
1082
- var artifactPath = cleanText(entry.artifactPath || entry.artifact_path || entry.artifact || entry.path || entry.file, 500);
1096
+ var artifactPath = cleanText(entry.artifactPath
1097
+ || entry.artifact_path
1098
+ || entry.artifact
1099
+ || entry.path
1100
+ || entry.file
1101
+ || entry.filePath
1102
+ || entry.file_path
1103
+ || supportDiagnosisEvidencePathAlias(entry.source)
1104
+ || supportDiagnosisEvidencePathAlias(entry.sourcePath)
1105
+ || supportDiagnosisEvidencePathAlias(entry.source_path), 500);
1083
1106
  var summary = cleanText(entry.summary || entry.detail || entry.observation || entry.supports || entry.support || entry.message || entry.evidence || entry.reason || entry.rejection_reason || entry.rejectionReason || entry.fact || entry.finding || entry.description || entry.proof || entry.proof_required || entry.proofRequired, 1200)
1084
1107
  || (artifactPath ? "Evidence from ".concat(artifactPath) : '');
1085
1108
  var evidenceText = [summary, artifactPath].filter(Boolean).join(' ');