repometry 0.10.1 → 0.11.0
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/README.md +4 -2
- package/package.json +1 -1
- package/target/main/resources/config/process-plugins-v1.schema.json +22 -0
- package/target/main/resources/report/json/config-v1.schema.json +41 -0
- package/target/main/resources/report/json/file-metrics-v1.schema.json +23 -1
- package/target/main/resources/report/json/pull-review-v2.schema.json +100 -0
- package/target/main/ts/api/cache/root.d.ts +1 -1
- package/target/main/ts/api/cache/root.js +2 -2
- package/target/main/ts/api/gh/github.d.ts +0 -4
- package/target/main/ts/api/gh/github.js +3 -33
- package/target/main/ts/api/git/commit-metadata.d.ts +0 -1
- package/target/main/ts/api/git/commit-metadata.js +1 -10
- package/target/main/ts/api/import/cobertura.d.ts +2 -0
- package/target/main/ts/api/import/cobertura.js +160 -0
- package/target/main/ts/api/import/coverage-xml.d.ts +7 -0
- package/target/main/ts/api/import/coverage-xml.js +135 -0
- package/target/main/ts/api/import/lcov-files.d.ts +3 -1
- package/target/main/ts/api/import/lcov-files.js +23 -4
- package/target/main/ts/cli/arguments.js +2 -4
- package/target/main/ts/cli/config.d.ts +10 -6
- package/target/main/ts/cli/config.js +36 -6
- package/target/main/ts/cli/imports.d.ts +1 -0
- package/target/main/ts/cli/imports.js +6 -2
- package/target/main/ts/cli/main.js +47 -139
- package/target/main/ts/cli/range-inspection.d.ts +0 -3
- package/target/main/ts/cli/range-inspection.js +5 -17
- package/target/main/ts/cli/range-jobs.js +1 -3
- package/target/main/ts/cli/reporting.d.ts +2 -7
- package/target/main/ts/cli/reporting.js +23 -37
- package/target/main/ts/compose/analysis-report.d.ts +1 -1
- package/target/main/ts/compose/analysis-report.js +4 -5
- package/target/main/ts/compose/analysis-results.d.ts +1 -1
- package/target/main/ts/compose/analysis-results.js +4 -6
- package/target/main/ts/compose/analysis-steps.d.ts +23 -0
- package/target/main/ts/compose/analysis-steps.js +215 -0
- package/target/main/ts/compose/analyze-snapshot.d.ts +1 -1
- package/target/main/ts/compose/analyze-snapshot.js +8 -12
- package/target/main/ts/compose/built-ins.d.ts +3 -0
- package/target/main/ts/compose/built-ins.js +5 -0
- package/target/main/ts/compose/diff-coverage.d.ts +2 -4
- package/target/main/ts/compose/diff-coverage.js +15 -12
- package/target/main/ts/compose/history-cache.d.ts +1 -1
- package/target/main/ts/compose/inspect.d.ts +6 -9
- package/target/main/ts/compose/inspect.js +8 -9
- package/target/main/ts/compose/languages.d.ts +4 -1
- package/target/main/ts/compose/languages.js +9 -6
- package/target/main/ts/compose/native-language-plugins.d.ts +0 -1
- package/target/main/ts/compose/native-language-plugins.js +4 -11
- package/target/main/ts/compose/phases.d.ts +126 -0
- package/target/main/ts/compose/phases.js +154 -0
- package/target/main/ts/compose/plugin-list.d.ts +8 -2
- package/target/main/ts/compose/plugin-list.js +4 -13
- package/target/main/ts/compose/process-plugins.js +1 -1
- package/target/main/ts/compose/review.d.ts +2 -4
- package/target/main/ts/compose/review.js +10 -9
- package/target/main/ts/compose/sources.d.ts +1 -2
- package/target/main/ts/compose/sources.js +7 -7
- package/target/main/ts/core/engine/execute.d.ts +4 -1
- package/target/main/ts/core/engine/execute.js +1 -1
- package/target/main/ts/core/engine/manifest.d.ts +0 -1
- package/target/main/ts/core/engine/manifest.js +9 -13
- package/target/main/ts/core/engine/plugin.d.ts +1 -1
- package/target/main/ts/core/engine/report-products.js +3 -2
- package/target/main/ts/core/model/changes.d.ts +2 -0
- package/target/main/ts/core/model/changes.js +5 -1
- package/target/main/ts/core/model/clone-source.d.ts +2 -0
- package/target/main/ts/core/model/clone-source.js +4 -0
- package/target/main/ts/core/model/code-structure.d.ts +4 -1
- package/target/main/ts/core/model/code-structure.js +3 -1
- package/target/main/ts/core/model/coverage-input.d.ts +12 -0
- package/target/main/ts/core/model/coverage-input.js +11 -0
- package/target/main/ts/core/model/diff-coverage.d.ts +2 -0
- package/target/main/ts/core/model/diff-coverage.js +9 -1
- package/target/main/ts/core/model/language.d.ts +28 -0
- package/target/main/ts/core/model/language.js +25 -1
- package/target/main/ts/core/model/quality-summary.js +1 -1
- package/target/main/ts/core/model/report.d.ts +0 -2
- package/target/main/ts/core/model/report.js +0 -20
- package/target/main/ts/core/ports/tool-runner.d.ts +13 -0
- package/target/main/ts/core/usecases/inspect.d.ts +1 -2
- package/target/main/ts/core/usecases/review.js +11 -3
- package/target/main/ts/index.d.ts +6 -33
- package/target/main/ts/index.js +3 -18
- package/target/main/ts/plugin.d.ts +7 -3
- package/target/main/ts/plugin.js +3 -0
- package/target/main/ts/plugins/built-in.d.ts +6 -0
- package/target/main/ts/plugins/built-in.js +39 -0
- package/target/main/ts/plugins/coverage/coverage.d.ts +3 -24
- package/target/main/ts/plugins/coverage/coverage.js +8 -11
- package/target/main/ts/plugins/coverage/diff-coverage.d.ts +1 -5
- package/target/main/ts/plugins/coverage/diff-coverage.js +5 -14
- package/target/main/ts/plugins/duplication/duplication.d.ts +1 -3
- package/target/main/ts/plugins/duplication/duplication.js +2 -6
- package/target/main/ts/plugins/language-js/babel-provider.js +3 -2
- package/target/main/ts/plugins/language-js/structural-observations.js +1 -1
- package/target/main/ts/plugins/language-js/syntax.d.ts +2 -0
- package/target/main/ts/plugins/language-js/syntax.js +11 -0
- package/target/main/ts/plugins/maintainability/maintainability.d.ts +1 -8
- package/target/main/ts/plugins/maintainability/maintainability.js +4 -10
- package/target/main/ts/plugins/source/forges.js +1 -1
- package/target/main/ts/report/html/app/viewer-languages.d.ts +3 -1
- package/target/main/ts/report/html/app/viewer-languages.js +11 -1
- package/target/main/ts/report/html/app/viewer-metrics-view.js +1 -1
- package/target/main/ts/report/html/app/viewer-source-view.js +2 -2
- package/target/main/ts/report/html/app/viewer-tokenizer.d.ts +7 -6
- package/target/main/ts/report/html/app/viewer-tokenizer.js +72 -71
- package/target/main/ts/report/html/site/export-site.d.ts +1 -5
- package/target/main/ts/report/html/site/export-site.js +2 -6
- package/target/main/ts/report/html/site/projects.d.ts +1 -3
- package/target/main/ts/report/html/site/projects.js +2 -4
- package/target/main/ts/report/json/projections/file-metrics.js +1 -1
- package/target/main/ts/report/json/projections/inspection-context.d.ts +1 -0
- package/target/main/ts/report/json/projections/inspection-context.js +19 -1
- package/target/main/ts/report/json/projections/inspection-details.js +7 -2
- package/target/main/ts/report/json/store/local-store.js +2 -0
- package/target/main/ts/report/json/store/replace-file.d.ts +1 -1
- package/target/main/ts/report/json/store/replace-file.js +24 -3
- package/target/main/ts/report/json/store/store-check.js +10 -1
- package/target/main/ts/report/json/validation/metabranch.d.ts +1 -1
- package/target/main/ts/report/json/validation/metabranch.js +6 -3
- package/target/main/ts/report/json/wire/file-metrics-model.d.ts +3 -1
- package/target/main/ts/report.d.ts +13 -1
- package/target/main/ts/report.js +7 -1
- package/target/main/ts/api/git/metabranch-worktree.d.ts +0 -1
- package/target/main/ts/api/git/metabranch-worktree.js +0 -35
- package/target/main/ts/api/worker/remote-executor.d.ts +0 -2
- package/target/main/ts/api/worker/remote-executor.js +0 -46
- package/target/main/ts/api/worker/worker-protocol.d.ts +0 -7
- package/target/main/ts/api/worker/worker-protocol.js +0 -127
- package/target/main/ts/api/worker/worker.d.ts +0 -5
- package/target/main/ts/api/worker/worker.js +0 -86
- package/target/main/ts/compose/analysis-files.d.ts +0 -15
- package/target/main/ts/compose/analysis-files.js +0 -129
- package/target/main/ts/compose/analysis-imports.d.ts +0 -7
- package/target/main/ts/compose/analysis-imports.js +0 -36
- package/target/main/ts/compose/analysis-repository.d.ts +0 -7
- package/target/main/ts/compose/analysis-repository.js +0 -99
- package/target/main/ts/compose/analysis-sources.d.ts +0 -48
- package/target/main/ts/compose/analysis-sources.js +0 -54
- package/target/main/ts/compose/prepare-metabranch.d.ts +0 -9
- package/target/main/ts/compose/prepare-metabranch.js +0 -17
- package/target/main/ts/compose/security-plugins.d.ts +0 -1
- package/target/main/ts/compose/security-plugins.js +0 -7
- package/target/main/ts/core/usecases/compare.d.ts +0 -6
- package/target/main/ts/core/usecases/compare.js +0 -189
- package/target/main/ts/report/json/store/components.d.ts +0 -2
- package/target/main/ts/report/json/store/components.js +0 -32
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { readReport, reportSchema } from './report/json/validation/report.js';
|
|
2
2
|
export type { Diagnostic, Report, ReportReader, ReportStore } from './report/json/validation/report.js';
|
|
3
3
|
export type { ReportWriter } from './core/ports/report.js';
|
|
4
|
-
export {
|
|
4
|
+
export { LocalReportStore } from './report/json/store/local-store.js';
|
|
5
|
+
export { GitReportReader } from './api/git/git-reader.js';
|
|
5
6
|
export { validateSummary } from './report/json/validation/summary-validation.js';
|
|
6
7
|
export type { PublicHistoryEntry } from './report/json/wire/public-history-model.js';
|
|
7
8
|
export { summarySchema } from './report/json/wire/summary-model.js';
|
|
@@ -9,3 +10,14 @@ export type { CommitSummary, RepositorySummary } from './report/json/wire/summar
|
|
|
9
10
|
export type { SourceLocator } from './report/json/wire/summary-model.js';
|
|
10
11
|
export { fileMetricsSchema } from './report/json/wire/file-metrics-model.js';
|
|
11
12
|
export type { FileMetricsReport } from './report/json/wire/file-metrics-model.js';
|
|
13
|
+
export { fileMetrics } from './report/json/projections/file-metrics.js';
|
|
14
|
+
export { coverageGrade, qualitySummary } from './core/model/quality-summary.js';
|
|
15
|
+
export type { Grade, QualitySummary } from './core/model/quality-summary.js';
|
|
16
|
+
export { diffCoverageSchema } from './core/usecases/diff-coverage.js';
|
|
17
|
+
export type { DiffCoverageReport } from './core/usecases/diff-coverage.js';
|
|
18
|
+
export { pullReviewSchema } from './core/model/pull-review.js';
|
|
19
|
+
export type { IssueEffect, PullReview, ReviewedIssue, ReviewReason } from './core/model/pull-review.js';
|
|
20
|
+
export { pullReviewsSchema } from './report/json/wire/pull-review-model.js';
|
|
21
|
+
export type { PullReviews } from './report/json/wire/pull-review-model.js';
|
|
22
|
+
export type { IgnoredFinding } from './core/model/finding-ignore.js';
|
|
23
|
+
export type { Subject } from './core/model/snapshot.js';
|
package/target/main/ts/report.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export { readReport, reportSchema } from './report/json/validation/report.js';
|
|
2
|
-
export {
|
|
2
|
+
export { LocalReportStore } from './report/json/store/local-store.js';
|
|
3
|
+
export { GitReportReader } from './api/git/git-reader.js';
|
|
3
4
|
export { validateSummary } from './report/json/validation/summary-validation.js';
|
|
4
5
|
export { summarySchema } from './report/json/wire/summary-model.js';
|
|
5
6
|
export { fileMetricsSchema } from './report/json/wire/file-metrics-model.js';
|
|
7
|
+
export { fileMetrics } from './report/json/projections/file-metrics.js';
|
|
8
|
+
export { coverageGrade, qualitySummary } from './core/model/quality-summary.js';
|
|
9
|
+
export { diffCoverageSchema } from './core/usecases/diff-coverage.js';
|
|
10
|
+
export { pullReviewSchema } from './core/model/pull-review.js';
|
|
11
|
+
export { pullReviewsSchema } from './report/json/wire/pull-review-model.js';
|
|
6
12
|
//# sourceMappingURL=report.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function openMetabranchWorktree(repository: string, worktree: string, branch: string, sourceCommit: string): Promise<string>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { lstat, readFile, readdir, realpath, writeFile } from 'node:fs/promises';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { gitRoot, gitText, resolveGitCommit } from './git.js';
|
|
4
|
-
import { containsPath } from './local.js';
|
|
5
|
-
import { checkMetaManifest, metaManifest } from '../../report/json/validation/metabranch.js';
|
|
6
|
-
export async function openMetabranchWorktree(repository, worktree, branch, sourceCommit) {
|
|
7
|
-
await resolveGitCommit(repository, sourceCommit);
|
|
8
|
-
const source = await realpath(await gitRoot(repository));
|
|
9
|
-
const target = await realpath(worktree);
|
|
10
|
-
if (containsPath(source, target) || containsPath(target, source) || await realpath(await gitRoot(target)) !== target) {
|
|
11
|
-
throw new Error('Select the root of a separate worktree outside the source checkout');
|
|
12
|
-
}
|
|
13
|
-
const commonDir = async (path) => realpath((await gitText(path, ['rev-parse', '--path-format=absolute', '--git-common-dir'])).replace(/\r?\n$/, ''));
|
|
14
|
-
if (await commonDir(source) !== await commonDir(target))
|
|
15
|
-
throw new Error('Metabranch worktree must belong to the source repository');
|
|
16
|
-
const expectedRef = `refs/heads/${branch}`;
|
|
17
|
-
await gitText(target, ['check-ref-format', expectedRef]);
|
|
18
|
-
if ((await gitText(target, ['symbolic-ref', '--quiet', 'HEAD'])).trim() !== expectedRef) {
|
|
19
|
-
throw new Error(`Metabranch worktree must be on ${expectedRef}`);
|
|
20
|
-
}
|
|
21
|
-
const marker = join(target, 'manifest.json');
|
|
22
|
-
const entries = await readdir(target);
|
|
23
|
-
if (entries.includes('manifest.json')) {
|
|
24
|
-
if (!(await lstat(marker)).isFile())
|
|
25
|
-
throw new Error('The metabranch manifest must be a regular file');
|
|
26
|
-
checkMetaManifest(await readFile(marker, 'utf8'));
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
if (entries.some(name => name !== '.git'))
|
|
30
|
-
throw new Error('Start from an empty metabranch worktree or an existing Repometry manifest');
|
|
31
|
-
await writeFile(marker, `${JSON.stringify(metaManifest, null, 2)}\n`, { flag: 'wx', mode: 0o600 });
|
|
32
|
-
}
|
|
33
|
-
return target;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=metabranch-worktree.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { readReport } from '../../report/json/validation/report.js';
|
|
2
|
-
import { encodeWorkerInput, maxWorkerInput, maxWorkerResult, workerRoute } from './worker-protocol.js';
|
|
3
|
-
export function remoteExecutor(endpoint, token, isSource) {
|
|
4
|
-
const base = new URL(endpoint);
|
|
5
|
-
const local = ['127.0.0.1', '[::1]', 'localhost'].includes(base.hostname);
|
|
6
|
-
if (base.protocol !== 'https:' && !(base.protocol === 'http:' && local)) {
|
|
7
|
-
throw new Error('Use HTTPS for a remote worker or HTTP over loopback');
|
|
8
|
-
}
|
|
9
|
-
if (base.username || base.password || base.search || base.hash)
|
|
10
|
-
throw new Error('Invalid worker base URL');
|
|
11
|
-
base.pathname = base.pathname.replace(/\/+$/, '') + workerRoute;
|
|
12
|
-
return async (input) => {
|
|
13
|
-
const body = encodeWorkerInput(input, isSource);
|
|
14
|
-
if (Buffer.byteLength(body) > maxWorkerInput)
|
|
15
|
-
throw new Error('Worker input exceeds 16 MiB');
|
|
16
|
-
const response = await fetch(base, { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
|
|
17
|
-
body, signal: AbortSignal.timeout(60_000), redirect: 'error' });
|
|
18
|
-
if (!response.ok) {
|
|
19
|
-
await response.body?.cancel();
|
|
20
|
-
throw new Error(`Worker request failed (HTTP ${response.status})`);
|
|
21
|
-
}
|
|
22
|
-
if (!response.body)
|
|
23
|
-
throw new Error('Missing worker response');
|
|
24
|
-
const reader = response.body.getReader();
|
|
25
|
-
const parts = [];
|
|
26
|
-
let size = 0;
|
|
27
|
-
try {
|
|
28
|
-
for (;;) {
|
|
29
|
-
const part = await reader.read();
|
|
30
|
-
if (part.done)
|
|
31
|
-
break;
|
|
32
|
-
size += part.value.byteLength;
|
|
33
|
-
if (size > maxWorkerResult) {
|
|
34
|
-
await reader.cancel();
|
|
35
|
-
throw new Error('Worker response exceeds 64 MiB');
|
|
36
|
-
}
|
|
37
|
-
parts.push(part.value);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
finally {
|
|
41
|
-
reader.releaseLock();
|
|
42
|
-
}
|
|
43
|
-
return readReport(JSON.parse(Buffer.concat(parts).toString('utf8')));
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=remote-executor.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AnalysisInput } from '../../core/usecases/inspect.js';
|
|
2
|
-
export declare const workerRoute = "/v1/inspect";
|
|
3
|
-
export declare const maxWorkerInput: number;
|
|
4
|
-
export declare const maxWorkerResult: number;
|
|
5
|
-
export declare function workerToken(value?: string | undefined): string;
|
|
6
|
-
export declare function encodeWorkerInput(input: AnalysisInput, isSource: (path: string) => boolean): string;
|
|
7
|
-
export declare function decodeWorkerInput(value: unknown, isSource: (path: string) => boolean): AnalysisInput;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { isRecord } from '../../core/engine/plugin.js';
|
|
2
|
-
import { validSubjectId } from '../../report/json/validation/report.js';
|
|
3
|
-
import { exclusionMatcher, normalizeExclusions, sourceExclusionMatcher } from '../../core/profile/exclusions.js';
|
|
4
|
-
import { comparePaths, isExcludedDirectory, workingSnapshot } from '../../core/model/snapshot.js';
|
|
5
|
-
import { isClaimedText } from '../../core/model/source.js';
|
|
6
|
-
const schemaV1 = 'urn:repometry:schema:worker-input:1';
|
|
7
|
-
const schemaV2 = 'urn:repometry:schema:worker-input:2';
|
|
8
|
-
const schemaV3 = 'urn:repometry:schema:worker-input:3';
|
|
9
|
-
export const workerRoute = '/v1/inspect';
|
|
10
|
-
export const maxWorkerInput = 16 * 1024 * 1024;
|
|
11
|
-
export const maxWorkerResult = 64 * 1024 * 1024;
|
|
12
|
-
export function workerToken(value = process.env.REPOMETRY_WORKER_TOKEN) {
|
|
13
|
-
if (!value || !/^[A-Za-z0-9._~-]+$/.test(value))
|
|
14
|
-
throw new Error('Set REPOMETRY_WORKER_TOKEN before using the worker');
|
|
15
|
-
return value;
|
|
16
|
-
}
|
|
17
|
-
export function encodeWorkerInput(input, isSource) {
|
|
18
|
-
const { subject, files, inventory, generatedExcluded, oversizedClaims } = input.snapshot;
|
|
19
|
-
const excludedPaths = input.excludedPaths ?? [];
|
|
20
|
-
const hasClaims = oversizedClaims?.length || files.some(file => !isSource(file.path));
|
|
21
|
-
const profile = hasClaims ? { schema: schemaV3, excludedPaths, oversizedClaims: oversizedClaims ?? [] }
|
|
22
|
-
: excludedPaths.length === 0 ? { schema: schemaV1 } : { schema: schemaV2, excludedPaths };
|
|
23
|
-
return JSON.stringify({ ...profile, subject, excludedOutput: input.excludedOutput, coverage: input.coverage ?? null,
|
|
24
|
-
files: files.map(({ path, bytes }) => ({ path, base64: Buffer.from(bytes).toString('base64') })),
|
|
25
|
-
...(inventory === undefined ? {} : { inventory }), ...(generatedExcluded?.length ? { generatedExcluded } : {}) });
|
|
26
|
-
}
|
|
27
|
-
export function decodeWorkerInput(value, isSource) {
|
|
28
|
-
if (!isRecord(value) || (value.schema !== schemaV1 && value.schema !== schemaV2 && value.schema !== schemaV3)
|
|
29
|
-
|| !isSubject(value.subject) || !Array.isArray(value.files)) {
|
|
30
|
-
throw new Error('Invalid worker input envelope');
|
|
31
|
-
}
|
|
32
|
-
const { subject, excludedOutput } = value;
|
|
33
|
-
const excludedPaths = value.schema === schemaV1 ? [] : normalizeExclusions(value.excludedPaths);
|
|
34
|
-
const excludes = value.schema === schemaV3 ? sourceExclusionMatcher(excludedPaths) : exclusionMatcher(excludedPaths);
|
|
35
|
-
if (excludedOutput !== null && (typeof excludedOutput !== 'string' || !safePath(excludedOutput)))
|
|
36
|
-
throw new Error('Invalid excluded output');
|
|
37
|
-
if (subject.kind === 'commit' && excludedOutput !== null)
|
|
38
|
-
throw new Error('Invalid excluded output for the Git snapshot');
|
|
39
|
-
const files = [];
|
|
40
|
-
const paths = new Set();
|
|
41
|
-
for (const item of value.files) {
|
|
42
|
-
if (!isRecord(item) || typeof item.path !== 'string' || !safePath(item.path) || excludes(item.path)
|
|
43
|
-
|| typeof item.base64 !== 'string') {
|
|
44
|
-
throw new Error('Invalid worker source file');
|
|
45
|
-
}
|
|
46
|
-
if (paths.has(item.path))
|
|
47
|
-
throw new Error('Duplicate worker source path');
|
|
48
|
-
const bytes = Buffer.from(item.base64, 'base64');
|
|
49
|
-
if (bytes.toString('base64') !== item.base64)
|
|
50
|
-
throw new Error('Invalid worker source encoding');
|
|
51
|
-
if (!isSource(item.path) && (value.schema !== schemaV3 || !isClaimedText(bytes) || excludedParent(item.path))) {
|
|
52
|
-
throw new Error('Invalid worker claimed file');
|
|
53
|
-
}
|
|
54
|
-
paths.add(item.path);
|
|
55
|
-
files.push({ path: item.path, bytes });
|
|
56
|
-
}
|
|
57
|
-
if (subject.kind === 'working-tree' && workingSnapshot(files).subject.id !== subject.id) {
|
|
58
|
-
throw new Error('Invalid working snapshot digest');
|
|
59
|
-
}
|
|
60
|
-
files.sort((a, b) => comparePaths(a.path, b.path));
|
|
61
|
-
const inventory = readInventory(value.inventory, excludes);
|
|
62
|
-
const generatedExcluded = readGeneratedExclusions(value.generatedExcluded, paths, isSource, inventory);
|
|
63
|
-
const oversizedClaims = value.schema === schemaV3 ? readOversizedClaims(value.oversizedClaims, paths, excludes) : [];
|
|
64
|
-
return { snapshot: { subject, files, ...(inventory === undefined ? {} : { inventory }), generatedExcluded,
|
|
65
|
-
...(oversizedClaims.length ? { oversizedClaims } : {}) },
|
|
66
|
-
excludedOutput, excludedPaths, coverage: readCoverage(value.coverage) };
|
|
67
|
-
}
|
|
68
|
-
function readOversizedClaims(value, paths, excludes) {
|
|
69
|
-
if (!Array.isArray(value))
|
|
70
|
-
throw new Error('Invalid worker oversized claims');
|
|
71
|
-
const claimed = new Set();
|
|
72
|
-
for (const path of value) {
|
|
73
|
-
if (typeof path !== 'string' || !safePath(path) || excludedParent(path) || excludes(path) || paths.has(path)) {
|
|
74
|
-
throw new Error('Invalid worker oversized claim');
|
|
75
|
-
}
|
|
76
|
-
claimed.add(path);
|
|
77
|
-
}
|
|
78
|
-
return [...claimed].sort(comparePaths);
|
|
79
|
-
}
|
|
80
|
-
function excludedParent(path) {
|
|
81
|
-
return path.split('/').slice(0, -1).some(isExcludedDirectory);
|
|
82
|
-
}
|
|
83
|
-
function readGeneratedExclusions(value, sourcePaths, isSource, inventory) {
|
|
84
|
-
if (value === undefined)
|
|
85
|
-
return [];
|
|
86
|
-
if (!Array.isArray(value))
|
|
87
|
-
throw new Error('Invalid worker generated exclusions');
|
|
88
|
-
const listed = new Set([...sourcePaths, ...(inventory ?? []).map(file => file.path)]);
|
|
89
|
-
const excluded = new Set();
|
|
90
|
-
for (const path of value) {
|
|
91
|
-
if (typeof path !== 'string' || !safePath(path) || !isSource(path) || listed.has(path) || excluded.has(path)) {
|
|
92
|
-
throw new Error('Invalid worker generated exclusion');
|
|
93
|
-
}
|
|
94
|
-
excluded.add(path);
|
|
95
|
-
}
|
|
96
|
-
return [...excluded].sort(comparePaths);
|
|
97
|
-
}
|
|
98
|
-
function readInventory(value, excludes) {
|
|
99
|
-
if (value === undefined)
|
|
100
|
-
return undefined;
|
|
101
|
-
if (!Array.isArray(value))
|
|
102
|
-
throw new Error('Invalid worker file inventory');
|
|
103
|
-
const inventory = new Map();
|
|
104
|
-
for (const item of value) {
|
|
105
|
-
if (!isRecord(item) || typeof item.path !== 'string' || !safePath(item.path) || excludes(item.path) || inventory.has(item.path)
|
|
106
|
-
|| (item.lines !== null && (typeof item.lines !== 'number' || !Number.isSafeInteger(item.lines) || item.lines < 0))
|
|
107
|
-
|| (item.bytes !== undefined && (typeof item.bytes !== 'number' || !Number.isSafeInteger(item.bytes) || item.bytes < 0))) {
|
|
108
|
-
throw new Error('Invalid worker inventory file');
|
|
109
|
-
}
|
|
110
|
-
inventory.set(item.path, { path: item.path, lines: item.lines, ...(item.bytes === undefined ? {} : { bytes: item.bytes }) });
|
|
111
|
-
}
|
|
112
|
-
return [...inventory.values()];
|
|
113
|
-
}
|
|
114
|
-
function isSubject(value) {
|
|
115
|
-
return isRecord(value) && (value.kind === 'commit' || value.kind === 'working-tree') && typeof value.id === 'string' && validSubjectId(value.kind, value.id);
|
|
116
|
-
}
|
|
117
|
-
function safePath(path) {
|
|
118
|
-
return !path.includes('\0') && !path.split('/').some(part => part === '' || part === '.' || part === '..');
|
|
119
|
-
}
|
|
120
|
-
function readCoverage(value) {
|
|
121
|
-
if (value === null)
|
|
122
|
-
return undefined;
|
|
123
|
-
if (!isRecord(value) || typeof value.text !== 'string' || typeof value.sourceRoot !== 'string')
|
|
124
|
-
throw new Error('Invalid worker LCOV input');
|
|
125
|
-
return { text: value.text, sourceRoot: value.sourceRoot };
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=worker-protocol.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AnalysisExecutor } from '../../core/usecases/inspect.js';
|
|
2
|
-
export declare function serveWorker(host: '127.0.0.1' | '0.0.0.0', port: number, token: string, analyze: AnalysisExecutor, isSource: (path: string) => boolean): Promise<{
|
|
3
|
-
url: string;
|
|
4
|
-
close: () => void;
|
|
5
|
-
}>;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { timingSafeEqual } from 'node:crypto';
|
|
2
|
-
import { createServer } from 'node:http';
|
|
3
|
-
import { utf8 } from '../../core/model/snapshot.js';
|
|
4
|
-
import { decodeWorkerInput, maxWorkerInput, maxWorkerResult, workerRoute } from './worker-protocol.js';
|
|
5
|
-
export async function serveWorker(host, port, token, analyze, isSource) {
|
|
6
|
-
let busy = false;
|
|
7
|
-
const server = createServer({ headersTimeout: 10_000, requestTimeout: 30_000, connectionsCheckingInterval: 5_000 }, (request, response) => {
|
|
8
|
-
if (request.url !== workerRoute) {
|
|
9
|
-
reply(response, 404, 'Unknown worker route');
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (request.method !== 'POST') {
|
|
13
|
-
reply(response, 405, 'Use POST');
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (!authorized(request, token)) {
|
|
17
|
-
reply(response, 401, 'Invalid token');
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
if (busy) {
|
|
21
|
-
reply(response, 503, 'Worker is busy');
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
busy = true;
|
|
25
|
-
void handle(request, response, analyze, isSource).finally(() => { busy = false; });
|
|
26
|
-
});
|
|
27
|
-
await new Promise((resolve, reject) => {
|
|
28
|
-
server.once('error', reject);
|
|
29
|
-
server.listen(port, host, () => { server.removeListener('error', reject); resolve(); });
|
|
30
|
-
});
|
|
31
|
-
const address = server.address();
|
|
32
|
-
if (!address || typeof address === 'string') {
|
|
33
|
-
server.close();
|
|
34
|
-
throw new Error('Cannot determine the worker address');
|
|
35
|
-
}
|
|
36
|
-
return { url: `http://${host}:${address.port}/`, close: () => server.close() };
|
|
37
|
-
}
|
|
38
|
-
async function handle(request, response, analyze, isSource) {
|
|
39
|
-
const declared = Number(request.headers['content-length']);
|
|
40
|
-
if (declared > maxWorkerInput) {
|
|
41
|
-
reply(response, 413, 'Worker input exceeds 16 MiB');
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const parts = [];
|
|
45
|
-
let size = 0;
|
|
46
|
-
let payload;
|
|
47
|
-
try {
|
|
48
|
-
for await (const chunk of request.iterator({ destroyOnReturn: false })) {
|
|
49
|
-
const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
50
|
-
size += bytes.length;
|
|
51
|
-
if (size > maxWorkerInput) {
|
|
52
|
-
reply(response, 413, 'Worker input exceeds 16 MiB');
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
parts.push(bytes);
|
|
56
|
-
}
|
|
57
|
-
payload = decodeWorkerInput(JSON.parse(utf8(Buffer.concat(parts))), isSource);
|
|
58
|
-
}
|
|
59
|
-
catch {
|
|
60
|
-
reply(response, 400, 'Invalid worker input');
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
try {
|
|
64
|
-
const result = JSON.stringify(await analyze(payload));
|
|
65
|
-
if (Buffer.byteLength(result) > maxWorkerResult) {
|
|
66
|
-
reply(response, 422, 'Report exceeds 64 MiB');
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
response.writeHead(200, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' }).end(result);
|
|
70
|
-
}
|
|
71
|
-
catch {
|
|
72
|
-
reply(response, 500, 'Worker analysis failed');
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function authorized(request, token) {
|
|
76
|
-
const actual = Buffer.from(request.headers.authorization ?? '');
|
|
77
|
-
const expected = Buffer.from(`Bearer ${token}`);
|
|
78
|
-
return actual.length === expected.length && timingSafeEqual(actual, expected);
|
|
79
|
-
}
|
|
80
|
-
function reply(response, status, error) {
|
|
81
|
-
if (response.destroyed)
|
|
82
|
-
return;
|
|
83
|
-
response.writeHead(status, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store', Connection: 'close' });
|
|
84
|
-
response.end(JSON.stringify({ error }));
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=worker.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { OperationCacheOptions } from '../core/engine/operation-cache.js';
|
|
2
|
-
import type { PlannedOperation } from '../core/engine/plan.js';
|
|
3
|
-
import type { CloneSource } from '../core/model/clone-source.js';
|
|
4
|
-
import type { CodeStructure } from '../core/model/code-structure.js';
|
|
5
|
-
import type { SourceLineRange } from '../core/model/source.js';
|
|
6
|
-
import type { AnalysisResults } from './analysis-results.js';
|
|
7
|
-
import type { AnalysisSources } from './analysis-sources.js';
|
|
8
|
-
import type { HistoryFiles } from './history-cache.js';
|
|
9
|
-
export declare const defaultFilePlan: readonly PlannedOperation[];
|
|
10
|
-
export interface FileAnalysis {
|
|
11
|
-
readonly cloneSources: readonly CloneSource[];
|
|
12
|
-
readonly codeLines: ReadonlyMap<string, ReadonlySet<number>>;
|
|
13
|
-
readonly functionBodies: ReadonlyMap<string, readonly SourceLineRange[]>;
|
|
14
|
-
}
|
|
15
|
-
export declare function inspectFiles(sources: AnalysisSources, batchFacts: ReadonlyMap<string, CodeStructure>, results: AnalysisResults, withCoverage: boolean, cache?: OperationCacheOptions, history?: HistoryFiles): Promise<FileAnalysis>;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { execute } from '../core/engine/execute.js';
|
|
2
|
-
import { plan } from '../core/engine/plan.js';
|
|
3
|
-
import { codeStructure, structuralCheckIds, structureCodeLines } from '../core/model/code-structure.js';
|
|
4
|
-
import { sourceFile } from '../core/model/snapshot.js';
|
|
5
|
-
import { isClaimedText, maxClaimedFileBytes } from '../core/model/source.js';
|
|
6
|
-
import { fileQuality } from '../plugins/maintainability/maintainability.js';
|
|
7
|
-
import { oversizedClaim } from './analysis-results.js';
|
|
8
|
-
import { defaultProvider, inspectionKeys, pluginForScope, structuralInspections } from './analysis-sources.js';
|
|
9
|
-
import { canReuseBatch } from './history-cache.js';
|
|
10
|
-
import { unmeasuredStructure } from './structure-measures.js';
|
|
11
|
-
const standardInspections = ['structure/size', 'structure/complexity', 'maintainability/file'];
|
|
12
|
-
const fileInput = new Map([['file', sourceFile.id]]);
|
|
13
|
-
const batchFileInput = new Map([...fileInput, ['syntax', codeStructure.id]]);
|
|
14
|
-
export const defaultFilePlan = filePlan(defaultProvider, []);
|
|
15
|
-
export async function inspectFiles(sources, batchFacts, results, withCoverage, cache, history) {
|
|
16
|
-
const plans = new Map([[filePlanKey(defaultProvider, []), defaultFilePlan]]);
|
|
17
|
-
const cloneSources = [];
|
|
18
|
-
const codeLines = new Map();
|
|
19
|
-
const functionBodies = new Map();
|
|
20
|
-
for (const source of sources.sources) {
|
|
21
|
-
const plugins = matchedInspections(source, sources, results);
|
|
22
|
-
const { file, provider } = source;
|
|
23
|
-
if (!provider && !plugins.length)
|
|
24
|
-
continue;
|
|
25
|
-
const tasks = findFilePlan(provider, plugins, plans, results);
|
|
26
|
-
const facts = batchFacts.get(file.path);
|
|
27
|
-
const reusable = provider?.batch && (!facts || !canReuseBatch(provider)) ? undefined : history;
|
|
28
|
-
const outcomes = await fileOutcomes(source, tasks, facts, cache, reusable);
|
|
29
|
-
const syntax = provider && outcomes.get(provider.key);
|
|
30
|
-
const parsed = recordFileSyntax(source, syntax, facts, results, withCoverage);
|
|
31
|
-
if (withCoverage && parsed) {
|
|
32
|
-
const lines = structureCodeLines(parsed);
|
|
33
|
-
if (lines !== undefined)
|
|
34
|
-
codeLines.set(file.path, new Set(lines));
|
|
35
|
-
if (parsed.functionBodies !== undefined)
|
|
36
|
-
functionBodies.set(file.path, parsed.functionBodies);
|
|
37
|
-
}
|
|
38
|
-
collectFileProducts(tasks, outcomes, source, cloneSources, results);
|
|
39
|
-
}
|
|
40
|
-
return { cloneSources, codeLines, functionBodies };
|
|
41
|
-
}
|
|
42
|
-
async function fileOutcomes({ file }, tasks, facts, cache, history) {
|
|
43
|
-
const saved = history?.read(file.path)?.outcomes;
|
|
44
|
-
if (saved) {
|
|
45
|
-
history?.retain(file.path, { outcomes: saved });
|
|
46
|
-
return saved;
|
|
47
|
-
}
|
|
48
|
-
const products = new Map([['file', { contract: sourceFile.id, value: file }]]);
|
|
49
|
-
if (facts)
|
|
50
|
-
products.set('syntax', { contract: codeStructure.id, value: facts });
|
|
51
|
-
const outcomes = await execute(tasks, products, cache);
|
|
52
|
-
if (history && [...outcomes.values()].every(outcome => outcome.state === 'completed' && !outcome.diagnostics?.length)) {
|
|
53
|
-
history.retain(file.path, { outcomes });
|
|
54
|
-
}
|
|
55
|
-
return outcomes;
|
|
56
|
-
}
|
|
57
|
-
function matchedInspections({ file }, sources, results) {
|
|
58
|
-
const claimed = sources.perFile.filter(({ matches }) => matches(file.path));
|
|
59
|
-
if (claimed.length && file.bytes.byteLength > maxClaimedFileBytes)
|
|
60
|
-
results.diagnostics.push(oversizedClaim(file.path));
|
|
61
|
-
return isClaimedText(file.bytes) ? claimed.map(({ plugin }) => plugin) : [];
|
|
62
|
-
}
|
|
63
|
-
function findFilePlan(provider, plugins, plans, results) {
|
|
64
|
-
const key = filePlanKey(provider, plugins);
|
|
65
|
-
const cached = plans.get(key);
|
|
66
|
-
if (cached)
|
|
67
|
-
return cached;
|
|
68
|
-
const tasks = filePlan(provider, plugins);
|
|
69
|
-
plans.set(key, tasks);
|
|
70
|
-
for (const task of tasks) {
|
|
71
|
-
const consumesBatch = provider?.batch && [...task.inputs.values()].some(input => 'external' in input && input.external === 'syntax');
|
|
72
|
-
results.remember(task, consumesBatch ? provider.key : undefined);
|
|
73
|
-
}
|
|
74
|
-
return tasks;
|
|
75
|
-
}
|
|
76
|
-
function filePlan(provider, plugins) {
|
|
77
|
-
const inspections = plugins.flatMap(inspectionKeys);
|
|
78
|
-
if (!provider)
|
|
79
|
-
return plan({ plugins, select: inspections, inputs: fileInput });
|
|
80
|
-
const needsProvider = !provider.batch && plugins.every(plugin => plugin.id !== provider.plugin.id);
|
|
81
|
-
const syntax = provider.batch ? { external: 'syntax' } : { operation: provider.key };
|
|
82
|
-
const providers = needsProvider ? [pluginForScope(provider.plugin, 'file')] : [];
|
|
83
|
-
return plan({
|
|
84
|
-
plugins: [...providers, ...structuralInspections, ...plugins],
|
|
85
|
-
select: [...standardInspections, ...inspections],
|
|
86
|
-
inputs: provider.batch ? batchFileInput : fileInput,
|
|
87
|
-
bindings: new Map(standardInspections.map(operation => [operation, { syntax }])),
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function filePlanKey(provider, plugins) {
|
|
91
|
-
return JSON.stringify([provider?.key ?? null, ...plugins.map(plugin => plugin.id)]);
|
|
92
|
-
}
|
|
93
|
-
function recordFileSyntax({ file, provider }, outcome, batch, results, withCoverage) {
|
|
94
|
-
const value = outcome?.state === 'completed' ? outcome.product.value : undefined;
|
|
95
|
-
const builtinParsed = provider === defaultProvider && value !== undefined;
|
|
96
|
-
const facts = batch ?? ((!builtinParsed || withCoverage) && codeStructure.accepts(value) ? value : undefined);
|
|
97
|
-
if (facts || builtinParsed)
|
|
98
|
-
results.parsed.add(file.path);
|
|
99
|
-
if (facts && !builtinParsed)
|
|
100
|
-
recordUnmeasured(file.path, facts, results);
|
|
101
|
-
return facts;
|
|
102
|
-
}
|
|
103
|
-
function recordUnmeasured(path, facts, results) {
|
|
104
|
-
const unmeasured = unmeasuredStructure(facts);
|
|
105
|
-
if (unmeasured.length)
|
|
106
|
-
results.unmeasured.set(path, unmeasured);
|
|
107
|
-
if (facts.observations === undefined) {
|
|
108
|
-
results.ruleSkips.push({ path, plugin: 'maintainability', rules: structuralCheckIds, reason: 'unmeasured' });
|
|
109
|
-
}
|
|
110
|
-
if (facts.clones === undefined) {
|
|
111
|
-
results.ruleSkips.push({ path, plugin: 'duplication', rules: ['identical-code', 'similar-code'], reason: 'unmeasured' });
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function collectFileProducts(tasks, outcomes, { file, provider }, clones, results) {
|
|
115
|
-
for (const task of tasks) {
|
|
116
|
-
const outcome = outcomes.get(task.key);
|
|
117
|
-
results.record(task, outcome, file.path);
|
|
118
|
-
const source = cloneSource(outcome, provider);
|
|
119
|
-
if (source)
|
|
120
|
-
clones.push(source);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function cloneSource(outcome, provider) {
|
|
124
|
-
if (outcome.state !== 'completed' || outcome.product.contract !== fileQuality.id || !fileQuality.accepts(outcome.product.value))
|
|
125
|
-
return;
|
|
126
|
-
const source = outcome.product.value.cloneSource;
|
|
127
|
-
return source && provider && source.scheme === undefined ? { ...source, scheme: provider.plugin.id } : source;
|
|
128
|
-
}
|
|
129
|
-
//# sourceMappingURL=analysis-files.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { OperationCacheOptions } from '../core/engine/operation-cache.js';
|
|
2
|
-
import type { AnalysisInput } from '../core/usecases/inspect.js';
|
|
3
|
-
import type { FileAnalysis } from './analysis-files.js';
|
|
4
|
-
import type { AnalysisResults } from './analysis-results.js';
|
|
5
|
-
import type { AnalysisSources } from './analysis-sources.js';
|
|
6
|
-
export declare function inspectDuplication(files: FileAnalysis, results: AnalysisResults, cache?: OperationCacheOptions): Promise<void>;
|
|
7
|
-
export declare function importAnalysisCoverage({ coverage: input, excludedPaths, snapshot }: AnalysisInput, sources: AnalysisSources, files: FileAnalysis, results: AnalysisResults, cache?: OperationCacheOptions): Promise<void>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { execute } from '../core/engine/execute.js';
|
|
2
|
-
import { plan } from '../core/engine/plan.js';
|
|
3
|
-
import { sourceLineCounts } from '../core/model/snapshot.js';
|
|
4
|
-
import { sourceExclusionMatcher } from '../core/profile/exclusions.js';
|
|
5
|
-
import { coverage, coverageResult, lcovInput } from '../plugins/coverage/coverage.js';
|
|
6
|
-
import { duplication, duplicationInput } from '../plugins/duplication/duplication.js';
|
|
7
|
-
const duplicationPlan = plan({ plugins: [duplication], select: ['duplication/detect'], inputs: new Map([['sources', duplicationInput.id]]) });
|
|
8
|
-
const coveragePlan = plan({ plugins: [coverage], select: ['lcov/import', 'lcov/lines'], inputs: new Map([['lcov', lcovInput.id]]) });
|
|
9
|
-
export async function inspectDuplication(files, results, cache) {
|
|
10
|
-
const inputs = new Map([['sources', { contract: duplicationInput.id, value: files.cloneSources }]]);
|
|
11
|
-
const outcomes = await execute(duplicationPlan, inputs, cache);
|
|
12
|
-
const [task] = duplicationPlan;
|
|
13
|
-
results.remember(task);
|
|
14
|
-
results.record(task, outcomes.get(task.key));
|
|
15
|
-
}
|
|
16
|
-
export async function importAnalysisCoverage({ coverage: input, excludedPaths = [], snapshot }, sources, files, results, cache) {
|
|
17
|
-
if (input === undefined)
|
|
18
|
-
return;
|
|
19
|
-
const unclassified = new Set([...results.unmeasured].filter(([, missing]) => missing.includes('codeLines')).map(([path]) => path));
|
|
20
|
-
const excludes = sourceExclusionMatcher(excludedPaths, snapshot.generatedExcluded);
|
|
21
|
-
const value = { text: input.text, root: input.sourceRoot, sourceLines: sourceLineCounts(sources.sourceFiles),
|
|
22
|
-
codeLines: files.codeLines, unclassified, functionBodies: files.functionBodies,
|
|
23
|
-
excludes: (path) => excludes(path) || sources.unavailableFiles.has(path) };
|
|
24
|
-
const outcomes = await execute(coveragePlan, new Map([['lcov', { contract: lcovInput.id, value }]]), cache);
|
|
25
|
-
for (const task of coveragePlan) {
|
|
26
|
-
results.remember(task);
|
|
27
|
-
results.record(task, outcomes.get(task.key));
|
|
28
|
-
}
|
|
29
|
-
const outcome = outcomes.get('lcov/import');
|
|
30
|
-
if (outcome?.state !== 'completed' || !coverageResult.accepts(outcome.product.value))
|
|
31
|
-
return;
|
|
32
|
-
for (const { path, reason } of outcome.product.value.gaps) {
|
|
33
|
-
results.diagnostics.push({ operation: 'lcov/import', state: 'partial', path, message: reason });
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=analysis-imports.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { OperationCacheOptions } from '../core/engine/operation-cache.js';
|
|
2
|
-
import type { CodeStructure } from '../core/model/code-structure.js';
|
|
3
|
-
import type { AnalysisResults } from './analysis-results.js';
|
|
4
|
-
import type { AnalysisSources } from './analysis-sources.js';
|
|
5
|
-
import type { HistoryFiles } from './history-cache.js';
|
|
6
|
-
export declare function collectRepositorySyntax(sources: AnalysisSources, results: AnalysisResults, cache?: OperationCacheOptions, history?: HistoryFiles): Promise<Map<string, CodeStructure>>;
|
|
7
|
-
export declare function inspectRepositories(sources: AnalysisSources, results: AnalysisResults, cache?: OperationCacheOptions): Promise<void>;
|