@mergesignal/shared 0.4.1 → 0.4.3

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 (96) hide show
  1. package/dist/deriveScanNarrative.d.ts.map +1 -1
  2. package/dist/deriveScanNarrative.js +41 -8
  3. package/dist/deriveScanNarrative.test.js +4 -0
  4. package/dist/engineWireRegression.test.js +2 -2
  5. package/dist/fixtures/repoIntelligenceFixtures.d.ts.map +1 -1
  6. package/dist/fixtures/repoIntelligenceFixtures.js +8 -1
  7. package/dist/narrativeParity.test.js +3 -4
  8. package/dist/presentation/compose/narrativeChannels.d.ts +17 -0
  9. package/dist/presentation/compose/narrativeChannels.d.ts.map +1 -0
  10. package/dist/presentation/compose/narrativeChannels.js +75 -0
  11. package/dist/presentation/compose/narrativeChannels.test.d.ts +2 -0
  12. package/dist/presentation/compose/narrativeChannels.test.d.ts.map +1 -0
  13. package/dist/presentation/compose/narrativeChannels.test.js +42 -0
  14. package/dist/presentation/compose/narrativeCompose.d.ts +1 -0
  15. package/dist/presentation/compose/narrativeCompose.d.ts.map +1 -1
  16. package/dist/presentation/compose/narrativeCompose.js +17 -102
  17. package/dist/presentation/dto/dashboardCardPresentation.d.ts +29 -0
  18. package/dist/presentation/dto/dashboardCardPresentation.d.ts.map +1 -0
  19. package/dist/presentation/dto/scanDetailsPresentation.d.ts +2 -0
  20. package/dist/presentation/dto/scanDetailsPresentation.d.ts.map +1 -1
  21. package/dist/presentation/dto/types.d.ts +0 -9
  22. package/dist/presentation/dto/types.d.ts.map +1 -1
  23. package/dist/presentation/dto/types.js +1 -22
  24. package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts +2 -0
  25. package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts.map +1 -0
  26. package/dist/presentation/fixtures/dashboardCardGolden.test.js +31 -0
  27. package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts +11 -0
  28. package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts.map +1 -0
  29. package/dist/presentation/fixtures/presentationPersonaFixtures.js +197 -0
  30. package/dist/presentation/index.d.ts +8 -5
  31. package/dist/presentation/index.d.ts.map +1 -1
  32. package/dist/presentation/index.js +3 -3
  33. package/dist/presentation/intent/applyPostureVocabularyGuard.d.ts +5 -0
  34. package/dist/presentation/intent/applyPostureVocabularyGuard.d.ts.map +1 -0
  35. package/dist/presentation/intent/applyPostureVocabularyGuard.js +44 -0
  36. package/dist/presentation/intent/derivePresentationInterpretation.d.ts +4 -0
  37. package/dist/presentation/intent/derivePresentationInterpretation.d.ts.map +1 -0
  38. package/dist/presentation/intent/derivePresentationInterpretation.js +202 -0
  39. package/dist/presentation/intent/formatPresentationCopy.d.ts +8 -0
  40. package/dist/presentation/intent/formatPresentationCopy.d.ts.map +1 -0
  41. package/dist/presentation/intent/formatPresentationCopy.js +140 -0
  42. package/dist/presentation/intent/packageDisplayName.d.ts +4 -0
  43. package/dist/presentation/intent/packageDisplayName.d.ts.map +1 -0
  44. package/dist/presentation/intent/packageDisplayName.js +17 -0
  45. package/dist/presentation/intent/postureVocabularyGuard.test.d.ts +2 -0
  46. package/dist/presentation/intent/postureVocabularyGuard.test.d.ts.map +1 -0
  47. package/dist/presentation/intent/postureVocabularyGuard.test.js +23 -0
  48. package/dist/presentation/intent/presentationIntent.d.ts +14 -0
  49. package/dist/presentation/intent/presentationIntent.d.ts.map +1 -0
  50. package/dist/presentation/intent/presentationIntent.js +1 -0
  51. package/dist/presentation/intent/presentationIntent.test.d.ts +2 -0
  52. package/dist/presentation/intent/presentationIntent.test.d.ts.map +1 -0
  53. package/dist/presentation/intent/presentationIntent.test.js +29 -0
  54. package/dist/presentation/intent/verificationFocusLabels.d.ts +2 -0
  55. package/dist/presentation/intent/verificationFocusLabels.d.ts.map +1 -0
  56. package/dist/presentation/intent/verificationFocusLabels.js +45 -0
  57. package/dist/presentation/orchestration/buildScanCardPresentation.d.ts +2 -2
  58. package/dist/presentation/orchestration/buildScanCardPresentation.d.ts.map +1 -1
  59. package/dist/presentation/orchestration/buildScanCardPresentation.js +5 -6
  60. package/dist/presentation/presentation.test.js +18 -17
  61. package/dist/presentation/presentationPersonas.test.d.ts +2 -0
  62. package/dist/presentation/presentationPersonas.test.d.ts.map +1 -0
  63. package/dist/presentation/presentationPersonas.test.js +167 -0
  64. package/dist/presentation/presenters/presentCliScanSummary.d.ts.map +1 -1
  65. package/dist/presentation/presenters/presentCliScanSummary.js +2 -2
  66. package/dist/presentation/presenters/presentDashboardCard.d.ts +5 -0
  67. package/dist/presentation/presenters/presentDashboardCard.d.ts.map +1 -0
  68. package/dist/presentation/presenters/presentDashboardCard.js +117 -0
  69. package/dist/presentation/presenters/presentGitHubCheckRun.d.ts.map +1 -1
  70. package/dist/presentation/presenters/presentGitHubCheckRun.js +2 -2
  71. package/dist/presentation/presenters/presentScanDetails.d.ts.map +1 -1
  72. package/dist/presentation/presenters/presentScanDetails.js +13 -4
  73. package/dist/presentation/profile/derivePresentationProfile.d.ts.map +1 -1
  74. package/dist/presentation/profile/derivePresentationProfile.js +18 -27
  75. package/dist/presentation/profile/presentationProfile.d.ts +2 -0
  76. package/dist/presentation/profile/presentationProfile.d.ts.map +1 -1
  77. package/dist/repoIntelligenceSchema.d.ts +1 -1
  78. package/dist/scanCardSummary.d.ts +3 -4
  79. package/dist/scanCardSummary.d.ts.map +1 -1
  80. package/dist/scanCardSummary.test.js +16 -16
  81. package/dist/scanNarrativeFacts.d.ts +31 -7
  82. package/dist/scanNarrativeFacts.d.ts.map +1 -1
  83. package/dist/scanNarrativeFacts.js +1 -0
  84. package/dist/scanSurfaceCopy.d.ts +8 -0
  85. package/dist/scanSurfaceCopy.d.ts.map +1 -1
  86. package/dist/scanSurfaceCopy.js +8 -0
  87. package/package.json +1 -1
  88. package/dist/presentation/dto/scanCardPresentation.d.ts +0 -25
  89. package/dist/presentation/dto/scanCardPresentation.d.ts.map +0 -1
  90. package/dist/presentation/presenters/presentPipelineScanCard.d.ts +0 -3
  91. package/dist/presentation/presenters/presentPipelineScanCard.d.ts.map +0 -1
  92. package/dist/presentation/presenters/presentPipelineScanCard.js +0 -23
  93. package/dist/presentation/presenters/presentScanCard.d.ts +0 -7
  94. package/dist/presentation/presenters/presentScanCard.d.ts.map +0 -1
  95. package/dist/presentation/presenters/presentScanCard.js +0 -43
  96. /package/dist/presentation/dto/{scanCardPresentation.js → dashboardCardPresentation.js} +0 -0
@@ -1,23 +0,0 @@
1
- import { scanSurfaceCopy } from "../../scanSurfaceCopy.js";
2
- import { normalizeGeneratedText, } from "../../normalizeGeneratedText.js";
3
- export function presentPipelineScanCard(pipelineStatus) {
4
- const isRunning = pipelineStatus === "queued" || pipelineStatus === "running";
5
- const headline = isRunning
6
- ? scanSurfaceCopy.pipeline.scanRunning
7
- : scanSurfaceCopy.pipeline.analysisIncomplete;
8
- return {
9
- pipeline: {
10
- status: pipelineStatus,
11
- headline: normalizeGeneratedText(headline),
12
- subheadline: isRunning
13
- ? scanSurfaceCopy.pipeline.scanIncomplete
14
- : undefined,
15
- },
16
- headline: normalizeGeneratedText(headline),
17
- changedPackages: [],
18
- keyPoints: [],
19
- affectedAreas: [],
20
- verificationActions: [],
21
- evidence: [],
22
- };
23
- }
@@ -1,7 +0,0 @@
1
- import type { ScanCardPresentation } from "../dto/scanCardPresentation.js";
2
- import type { ScanPresentationBundle } from "../orchestration/scanPresentationBundle.js";
3
- export type PresentScanCardContext = {
4
- includeFindingCounts?: boolean;
5
- };
6
- export declare function presentScanCard(bundle: ScanPresentationBundle, ctx?: PresentScanCardContext): ScanCardPresentation;
7
- //# sourceMappingURL=presentScanCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"presentScanCard.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentScanCard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAgB3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEzF,MAAM,MAAM,sBAAsB,GAAG;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAsBF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,sBAAsB,EAC9B,GAAG,GAAE,sBAA2B,GAC/B,oBAAoB,CAyBtB"}
@@ -1,43 +0,0 @@
1
- import { aggregateFindingCounts } from "../dto/types.js";
2
- import { composeAffectedAreaLabels, composeEvidenceRows, composeHeadline, composeKeyPoints, composeSubheadline, composeSupportingContext, composeVerificationActions, evidenceContextFromProfile, } from "../compose/narrativeCompose.js";
3
- import { normalizeGeneratedText, normalizeGeneratedTextNullable, } from "../../normalizeGeneratedText.js";
4
- import { scanSurfaceCopy } from "../../scanSurfaceCopy.js";
5
- function normalizeCard(p) {
6
- return {
7
- ...p,
8
- headline: normalizeGeneratedText(p.headline),
9
- subheadline: normalizeGeneratedTextNullable(p.subheadline) ?? undefined,
10
- keyPoints: p.keyPoints.map((k) => normalizeGeneratedText(k)),
11
- affectedAreas: p.affectedAreas.map((a) => normalizeGeneratedText(a)),
12
- verificationActions: p.verificationActions.map((v) => normalizeGeneratedText(v)),
13
- evidence: p.evidence.map((e) => ({
14
- label: normalizeGeneratedText(e.label),
15
- value: normalizeGeneratedText(e.value),
16
- })),
17
- supportingContext: p.supportingContext?.map((s) => normalizeGeneratedText(s)),
18
- };
19
- }
20
- export function presentScanCard(bundle, ctx = {}) {
21
- const { facts, profile, result } = bundle;
22
- const presentation = {
23
- status: profile.status,
24
- density: profile.density,
25
- confidence: profile.confidence,
26
- evidenceContext: evidenceContextFromProfile(bundle),
27
- headline: composeHeadline(bundle),
28
- subheadline: composeSubheadline(bundle) ?? undefined,
29
- changedPackages: facts.changedPackages.all,
30
- primaryPackage: facts.changedPackages.primary ?? undefined,
31
- keyPoints: composeKeyPoints(bundle, 3),
32
- affectedAreas: composeAffectedAreaLabels(bundle, 2),
33
- verificationActions: composeVerificationActions(bundle, 2),
34
- evidence: composeEvidenceRows(bundle, 3),
35
- supportingContext: composeSupportingContext(bundle),
36
- riskIndex: facts.riskIndex,
37
- findingCounts: ctx.includeFindingCounts
38
- ? aggregateFindingCounts(result.findings)
39
- : null,
40
- actionLabel: scanSurfaceCopy.presentation.actionLabelReview,
41
- };
42
- return normalizeCard(presentation);
43
- }