@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.
- package/dist/deriveScanNarrative.d.ts.map +1 -1
- package/dist/deriveScanNarrative.js +41 -8
- package/dist/deriveScanNarrative.test.js +4 -0
- package/dist/engineWireRegression.test.js +2 -2
- package/dist/fixtures/repoIntelligenceFixtures.d.ts.map +1 -1
- package/dist/fixtures/repoIntelligenceFixtures.js +8 -1
- package/dist/narrativeParity.test.js +3 -4
- package/dist/presentation/compose/narrativeChannels.d.ts +17 -0
- package/dist/presentation/compose/narrativeChannels.d.ts.map +1 -0
- package/dist/presentation/compose/narrativeChannels.js +75 -0
- package/dist/presentation/compose/narrativeChannels.test.d.ts +2 -0
- package/dist/presentation/compose/narrativeChannels.test.d.ts.map +1 -0
- package/dist/presentation/compose/narrativeChannels.test.js +42 -0
- package/dist/presentation/compose/narrativeCompose.d.ts +1 -0
- package/dist/presentation/compose/narrativeCompose.d.ts.map +1 -1
- package/dist/presentation/compose/narrativeCompose.js +17 -102
- package/dist/presentation/dto/dashboardCardPresentation.d.ts +29 -0
- package/dist/presentation/dto/dashboardCardPresentation.d.ts.map +1 -0
- package/dist/presentation/dto/scanDetailsPresentation.d.ts +2 -0
- package/dist/presentation/dto/scanDetailsPresentation.d.ts.map +1 -1
- package/dist/presentation/dto/types.d.ts +0 -9
- package/dist/presentation/dto/types.d.ts.map +1 -1
- package/dist/presentation/dto/types.js +1 -22
- package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts +2 -0
- package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts.map +1 -0
- package/dist/presentation/fixtures/dashboardCardGolden.test.js +31 -0
- package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts +11 -0
- package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts.map +1 -0
- package/dist/presentation/fixtures/presentationPersonaFixtures.js +197 -0
- package/dist/presentation/index.d.ts +8 -5
- package/dist/presentation/index.d.ts.map +1 -1
- package/dist/presentation/index.js +3 -3
- package/dist/presentation/intent/applyPostureVocabularyGuard.d.ts +5 -0
- package/dist/presentation/intent/applyPostureVocabularyGuard.d.ts.map +1 -0
- package/dist/presentation/intent/applyPostureVocabularyGuard.js +44 -0
- package/dist/presentation/intent/derivePresentationInterpretation.d.ts +4 -0
- package/dist/presentation/intent/derivePresentationInterpretation.d.ts.map +1 -0
- package/dist/presentation/intent/derivePresentationInterpretation.js +202 -0
- package/dist/presentation/intent/formatPresentationCopy.d.ts +8 -0
- package/dist/presentation/intent/formatPresentationCopy.d.ts.map +1 -0
- package/dist/presentation/intent/formatPresentationCopy.js +140 -0
- package/dist/presentation/intent/packageDisplayName.d.ts +4 -0
- package/dist/presentation/intent/packageDisplayName.d.ts.map +1 -0
- package/dist/presentation/intent/packageDisplayName.js +17 -0
- package/dist/presentation/intent/postureVocabularyGuard.test.d.ts +2 -0
- package/dist/presentation/intent/postureVocabularyGuard.test.d.ts.map +1 -0
- package/dist/presentation/intent/postureVocabularyGuard.test.js +23 -0
- package/dist/presentation/intent/presentationIntent.d.ts +14 -0
- package/dist/presentation/intent/presentationIntent.d.ts.map +1 -0
- package/dist/presentation/intent/presentationIntent.js +1 -0
- package/dist/presentation/intent/presentationIntent.test.d.ts +2 -0
- package/dist/presentation/intent/presentationIntent.test.d.ts.map +1 -0
- package/dist/presentation/intent/presentationIntent.test.js +29 -0
- package/dist/presentation/intent/verificationFocusLabels.d.ts +2 -0
- package/dist/presentation/intent/verificationFocusLabels.d.ts.map +1 -0
- package/dist/presentation/intent/verificationFocusLabels.js +45 -0
- package/dist/presentation/orchestration/buildScanCardPresentation.d.ts +2 -2
- package/dist/presentation/orchestration/buildScanCardPresentation.d.ts.map +1 -1
- package/dist/presentation/orchestration/buildScanCardPresentation.js +5 -6
- package/dist/presentation/presentation.test.js +18 -17
- package/dist/presentation/presentationPersonas.test.d.ts +2 -0
- package/dist/presentation/presentationPersonas.test.d.ts.map +1 -0
- package/dist/presentation/presentationPersonas.test.js +167 -0
- package/dist/presentation/presenters/presentCliScanSummary.d.ts.map +1 -1
- package/dist/presentation/presenters/presentCliScanSummary.js +2 -2
- package/dist/presentation/presenters/presentDashboardCard.d.ts +5 -0
- package/dist/presentation/presenters/presentDashboardCard.d.ts.map +1 -0
- package/dist/presentation/presenters/presentDashboardCard.js +117 -0
- package/dist/presentation/presenters/presentGitHubCheckRun.d.ts.map +1 -1
- package/dist/presentation/presenters/presentGitHubCheckRun.js +2 -2
- package/dist/presentation/presenters/presentScanDetails.d.ts.map +1 -1
- package/dist/presentation/presenters/presentScanDetails.js +13 -4
- package/dist/presentation/profile/derivePresentationProfile.d.ts.map +1 -1
- package/dist/presentation/profile/derivePresentationProfile.js +18 -27
- package/dist/presentation/profile/presentationProfile.d.ts +2 -0
- package/dist/presentation/profile/presentationProfile.d.ts.map +1 -1
- package/dist/repoIntelligenceSchema.d.ts +1 -1
- package/dist/scanCardSummary.d.ts +3 -4
- package/dist/scanCardSummary.d.ts.map +1 -1
- package/dist/scanCardSummary.test.js +16 -16
- package/dist/scanNarrativeFacts.d.ts +31 -7
- package/dist/scanNarrativeFacts.d.ts.map +1 -1
- package/dist/scanNarrativeFacts.js +1 -0
- package/dist/scanSurfaceCopy.d.ts +8 -0
- package/dist/scanSurfaceCopy.d.ts.map +1 -1
- package/dist/scanSurfaceCopy.js +8 -0
- package/package.json +1 -1
- package/dist/presentation/dto/scanCardPresentation.d.ts +0 -25
- package/dist/presentation/dto/scanCardPresentation.d.ts.map +0 -1
- package/dist/presentation/presenters/presentPipelineScanCard.d.ts +0 -3
- package/dist/presentation/presenters/presentPipelineScanCard.d.ts.map +0 -1
- package/dist/presentation/presenters/presentPipelineScanCard.js +0 -23
- package/dist/presentation/presenters/presentScanCard.d.ts +0 -7
- package/dist/presentation/presenters/presentScanCard.d.ts.map +0 -1
- package/dist/presentation/presenters/presentScanCard.js +0 -43
- /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
|
-
}
|
|
File without changes
|