@hamsterbase/evidra 0.3.0 → 0.3.2
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/sdk/main.d.ts +7 -1
- package/dist/sdk/main.js +14 -8
- package/dist/service/cli.js +20 -6
- package/dist/web/assets/{cssMode-N9cXKwMi.js → cssMode-BTAZgpQt.js} +1 -1
- package/dist/web/assets/{editor.api-DQVi2UMW.js → editor.api-CfnVkTAL.js} +1 -1
- package/dist/web/assets/{freemarker2-Bvgs91Zz.js → freemarker2-BV0isRRj.js} +1 -1
- package/dist/web/assets/{handlebars-BjYNaKwZ.js → handlebars-CbLz4Wc3.js} +1 -1
- package/dist/web/assets/{html-DYaGhp1Y.js → html-D2xBZbJh.js} +1 -1
- package/dist/web/assets/{htmlMode-Cytjzdia.js → htmlMode-DwPRG6d4.js} +1 -1
- package/dist/web/assets/index-CJuNTIx5.css +2 -0
- package/dist/web/assets/index-CqRUszBc.js +35 -0
- package/dist/web/assets/{javascript-BG3RI78V.js → javascript-D-gNVUGD.js} +1 -1
- package/dist/web/assets/{jsonMode-tKunAGWo.js → jsonMode-BMqe91Um.js} +1 -1
- package/dist/web/assets/{liquid-CyQio9RN.js → liquid-D6FHObSg.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CkQ_7-NP.js → lspLanguageFeatures-D6i7D2oO.js} +1 -1
- package/dist/web/assets/{mdx-C7agFNoG.js → mdx-CGtrE9A8.js} +1 -1
- package/dist/web/assets/{monaco-CdRk6sx6.js → monaco-C3WraHAR.js} +4 -4
- package/dist/web/assets/{python-Xk-DSDx5.js → python-B2ywaTtF.js} +1 -1
- package/dist/web/assets/{razor-SQg0PKrI.js → razor-zzTWj2fW.js} +1 -1
- package/dist/web/assets/{tsMode-njI9r4C-.js → tsMode-BrfjRJaR.js} +1 -1
- package/dist/web/assets/{typescript-BHUW13-O.js → typescript-xVM47PRQ.js} +1 -1
- package/dist/web/assets/{workers-ZUzAKd5C.js → workers-DEZ7PLe8.js} +1 -1
- package/dist/web/assets/{xml-B6qKvuxn.js → xml-kpizFTtc.js} +1 -1
- package/dist/web/assets/{yaml-BhUHqKCu.js → yaml-DDFZ3vPi.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
- package/dist/types/modules/core/contracts/comparison.d.ts +0 -41
- package/dist/types/modules/core/contracts/config.d.ts +0 -19
- package/dist/types/modules/core/contracts/context.d.ts +0 -6
- package/dist/types/modules/core/contracts/functions/addCase.d.ts +0 -128
- package/dist/types/modules/core/contracts/functions/addTask.d.ts +0 -14
- package/dist/types/modules/core/contracts/functions/approve.d.ts +0 -8
- package/dist/types/modules/core/contracts/functions/baselineChanges.d.ts +0 -14
- package/dist/types/modules/core/contracts/functions/compare.d.ts +0 -14
- package/dist/types/modules/core/contracts/functions/compareTask.d.ts +0 -6
- package/dist/types/modules/core/contracts/functions/compareTasks.d.ts +0 -18
- package/dist/types/modules/core/contracts/functions/deleteBaselineFile.d.ts +0 -8
- package/dist/types/modules/core/contracts/functions/finishTask.d.ts +0 -8
- package/dist/types/modules/core/contracts/functions/getBaseline.d.ts +0 -10
- package/dist/types/modules/core/contracts/functions/getBaselineChanges.d.ts +0 -6
- package/dist/types/modules/core/contracts/functions/getGitChanges.d.ts +0 -6
- package/dist/types/modules/core/contracts/functions/getGitDiff.d.ts +0 -8
- package/dist/types/modules/core/contracts/functions/getTaskCase.d.ts +0 -23
- package/dist/types/modules/core/contracts/functions/getTaskTree.d.ts +0 -21
- package/dist/types/modules/core/contracts/functions/gitChanges.d.ts +0 -25
- package/dist/types/modules/core/contracts/functions/index.d.ts +0 -18
- package/dist/types/modules/core/contracts/functions/listBaselines.d.ts +0 -5
- package/dist/types/modules/core/contracts/functions/listRuns.d.ts +0 -7
- package/dist/types/modules/core/contracts/functions/listTaskSummaries.d.ts +0 -15
- package/dist/types/modules/core/contracts/functions/listTasks.d.ts +0 -15
- package/dist/types/modules/core/contracts/functions/loadConfig.d.ts +0 -5
- package/dist/types/modules/core/contracts/functions/readProjectInfo.d.ts +0 -5
- package/dist/types/modules/core/contracts/functions/readTaskReport.d.ts +0 -6
- package/dist/types/modules/core/contracts/functions/resolveConfig.d.ts +0 -6
- package/dist/types/modules/core/contracts/functions/reviewBaselineChanges.d.ts +0 -9
- package/dist/types/modules/core/contracts/functions/reviewCodeChanges.d.ts +0 -9
- package/dist/types/modules/core/contracts/functions/taskRecords.d.ts +0 -6
- package/dist/types/modules/core/contracts/functions/updateBaseline.d.ts +0 -20
- package/dist/types/modules/core/contracts/git.d.ts +0 -14
- package/dist/types/modules/core/contracts/imageDiffPool.d.ts +0 -5
- package/dist/types/modules/core/contracts/index.d.ts +0 -30
- package/dist/types/modules/core/contracts/internal/compare.d.ts +0 -14
- package/dist/types/modules/core/contracts/internal/getBaseline.d.ts +0 -10
- package/dist/types/modules/core/contracts/internal/listTasks.d.ts +0 -12
- package/dist/types/modules/core/contracts/internal/taskRecords.d.ts +0 -6
- package/dist/types/modules/core/contracts/internal/updateBaseline.d.ts +0 -20
- package/dist/types/modules/core/contracts/model.d.ts +0 -80
- package/dist/types/modules/core/contracts/report.d.ts +0 -52
- package/dist/types/modules/core/contracts/repository.d.ts +0 -5
- package/dist/types/modules/core/contracts/requests.d.ts +0 -23
- package/dist/types/modules/core/contracts/scanCases.d.ts +0 -15
- package/dist/types/modules/core/contracts/shared.d.ts +0 -6
- package/dist/types/modules/core/contracts/snapshots.d.ts +0 -6
- package/dist/types/modules/core/contracts/taskRecord.d.ts +0 -76
- package/dist/types/modules/core/implementations/Functions/addCase.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/addTask.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/approve.d.ts +0 -6
- package/dist/types/modules/core/implementations/Functions/compare.d.ts +0 -15
- package/dist/types/modules/core/implementations/Functions/compareTask.d.ts +0 -3
- package/dist/types/modules/core/implementations/Functions/compareTasks.d.ts +0 -5
- package/dist/types/modules/core/implementations/Functions/deleteBaselineFile.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/finishTask.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/getBaseline.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/getBaselineChanges.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/getGitChanges.d.ts +0 -3
- package/dist/types/modules/core/implementations/Functions/getGitDiff.d.ts +0 -3
- package/dist/types/modules/core/implementations/Functions/getTaskCase.d.ts +0 -5
- package/dist/types/modules/core/implementations/Functions/getTaskTree.d.ts +0 -5
- package/dist/types/modules/core/implementations/Functions/listBaselines.d.ts +0 -3
- package/dist/types/modules/core/implementations/Functions/listTaskSummaries.d.ts +0 -2
- package/dist/types/modules/core/implementations/Functions/listTasks.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/loadConfig.d.ts +0 -3
- package/dist/types/modules/core/implementations/Functions/readProjectInfo.d.ts +0 -3
- package/dist/types/modules/core/implementations/Functions/readTaskReport.d.ts +0 -3
- package/dist/types/modules/core/implementations/Functions/resolveConfig.d.ts +0 -9
- package/dist/types/modules/core/implementations/Functions/reviewBaselineChanges.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/reviewCodeChanges.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/taskRecords.d.ts +0 -4
- package/dist/types/modules/core/implementations/Functions/updateBaseline.d.ts +0 -5
- package/dist/types/modules/core/implementations/Utils/assertNamespace.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/canonical.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/createTaskId.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/deletionAllowed.d.ts +0 -2
- package/dist/types/modules/core/implementations/Utils/download.d.ts +0 -3
- package/dist/types/modules/core/implementations/Utils/hash.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/imageDiffPool.d.ts +0 -18
- package/dist/types/modules/core/implementations/Utils/imageKey.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/loadBaseline.d.ts +0 -4
- package/dist/types/modules/core/implementations/Utils/mapLimit.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/observationKey.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/pngSize.d.ts +0 -4
- package/dist/types/modules/core/implementations/Utils/readJson.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/readTaskRecord.d.ts +0 -2
- package/dist/types/modules/core/implementations/Utils/scanCases.d.ts +0 -9
- package/dist/types/modules/core/implementations/Utils/taskDirectory.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/toCase.d.ts +0 -3
- package/dist/types/modules/core/implementations/Utils/toObservation.d.ts +0 -3
- package/dist/types/modules/core/implementations/Utils/toSnapshot.d.ts +0 -3
- package/dist/types/modules/core/implementations/Utils/writeBytesAtomic.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/writeJsonAtomic.d.ts +0 -1
- package/dist/types/modules/core/implementations/Utils/writeTextAtomic.d.ts +0 -1
- package/dist/types/modules/core/implementations/baselineChanges.d.ts +0 -6
- package/dist/types/modules/core/implementations/config.d.ts +0 -6
- package/dist/types/modules/core/implementations/content.d.ts +0 -1
- package/dist/types/modules/core/implementations/evidra.d.ts +0 -31
- package/dist/types/modules/core/implementations/git.d.ts +0 -11
- package/dist/types/modules/core/implementations/gitChanges.d.ts +0 -29
- package/dist/types/modules/core/implementations/index.d.ts +0 -17
- package/dist/types/modules/core/implementations/internal/compare.d.ts +0 -15
- package/dist/types/modules/core/implementations/internal/getBaseline.d.ts +0 -4
- package/dist/types/modules/core/implementations/internal/listTasks.d.ts +0 -2
- package/dist/types/modules/core/implementations/internal/taskRecords.d.ts +0 -4
- package/dist/types/modules/core/implementations/internal/updateBaseline.d.ts +0 -5
- package/dist/types/modules/core/implementations/paths.d.ts +0 -48
- package/dist/types/modules/core/implementations/report.d.ts +0 -3
- package/dist/types/modules/core/implementations/reportResources.d.ts +0 -4
- package/dist/types/modules/core/implementations/reportStatus.d.ts +0 -10
- package/dist/types/modules/core/implementations/reportTree.d.ts +0 -5
- package/dist/types/modules/core/implementations/repository.d.ts +0 -10
- package/dist/types/modules/core/implementations/requests.d.ts +0 -13
- package/dist/types/modules/core/implementations/snapshots.d.ts +0 -11
- package/dist/types/modules/core/implementations/storage/local.d.ts +0 -3
- package/dist/types/modules/core/implementations/storage/objects.d.ts +0 -3
- package/dist/types/modules/core/index.d.ts +0 -21
- package/dist/types/packages/sdk/src/index.d.ts +0 -21
- package/dist/types/packages/sdk/src/types.d.ts +0 -9
- package/dist/web/assets/index-C1ua-VrZ.css +0 -2
- package/dist/web/assets/index-CnwObt1E.js +0 -35
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type GetBaselineChangesInput } from '../../contracts/functions/getBaselineChanges.js';
|
|
2
|
-
import { type BaselineChanges } from '../../contracts/functions/baselineChanges.js';
|
|
3
|
-
export type { BaselineChange, BaselineChanges } from '../../contracts/functions/baselineChanges.js';
|
|
4
|
-
export declare function getBaselineChanges(input: GetBaselineChangesInput): Promise<BaselineChanges>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type GetTaskCaseInput, type GetTaskCaseOutput } from '../../contracts/functions/getTaskCase.js';
|
|
2
|
-
import type { FileStorage } from '../../contracts/context.js';
|
|
3
|
-
export { GetTaskCaseInputSchema } from '../../contracts/functions/getTaskCase.js';
|
|
4
|
-
export type { GetTaskCaseInput, GetTaskCaseOutput, TaskCaseObservation, } from '../../contracts/functions/getTaskCase.js';
|
|
5
|
-
export declare function getTaskCase(input: GetTaskCaseInput, cwd: string, baselineRoot: string, storage: FileStorage, concurrency?: number): Promise<GetTaskCaseOutput>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type GetTaskTreeInput, type GetTaskTreeOutput } from '../../contracts/functions/getTaskTree.js';
|
|
2
|
-
import type { FileStorage } from '../../contracts/context.js';
|
|
3
|
-
export { GetTaskTreeInputSchema } from '../../contracts/functions/getTaskTree.js';
|
|
4
|
-
export type { GetTaskTreeInput, GetTaskTreeOutput, TaskTreeNode, } from '../../contracts/functions/getTaskTree.js';
|
|
5
|
-
export declare function getTaskTree(input: GetTaskTreeInput, cwd: string, baselineRoot: string, storage: FileStorage, concurrency?: number): Promise<GetTaskTreeOutput>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type ListTasksInput, type ListTasksOutput } from '../../contracts/functions/listTasks.js';
|
|
2
|
-
export { ListTasksInputSchema } from '../../contracts/functions/listTasks.js';
|
|
3
|
-
export type { ListTasksInput, ListTasksOutput } from '../../contracts/functions/listTasks.js';
|
|
4
|
-
export declare function listTasks(input: ListTasksInput, cwd: string, namespaces: Set<string>): Promise<ListTasksOutput>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ResolveConfigInput } from '../../contracts/functions/resolveConfig.js';
|
|
2
|
-
/** 解析显式仓库路径;指定 namespace 时额外校验其已注册。 */
|
|
3
|
-
export declare function resolveConfig(input: ResolveConfigInput): Promise<{
|
|
4
|
-
absoluteReportPath: string;
|
|
5
|
-
namespaceList: {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
}[];
|
|
9
|
-
}>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type TaskRecordEntry } from '../../contracts/functions/taskRecords.js';
|
|
2
|
-
export type { TaskRecordEntry } from '../../contracts/functions/taskRecords.js';
|
|
3
|
-
/** 按 ID 索引读取任务;索引或任务不存在时返回 null,不扫描任务目录。 */
|
|
4
|
-
export declare function getTask(cwd: string, taskId: string): Promise<TaskRecordEntry | null>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type UpdateBaselineInput, type UpdateBaselineOutput } from '../../contracts/functions/updateBaseline.js';
|
|
2
|
-
import type { FileStorage } from '../../contracts/context.js';
|
|
3
|
-
export { UpdateBaselineInputSchema } from '../../contracts/functions/updateBaseline.js';
|
|
4
|
-
export type { UpdateBaselineInput, UpdateBaselineOutput, } from '../../contracts/functions/updateBaseline.js';
|
|
5
|
-
export declare function updateBaseline(input: UpdateBaselineInput, cwd: string, baselineRoot: string, storage: FileStorage, concurrency?: number): Promise<UpdateBaselineOutput>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function assertNamespace(namespaces: Set<string>, namespace: string): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function canonical(value: unknown): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createTaskId: () => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const hash: (value: string | Uint8Array) => string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type ImageDiffResult } from '../../contracts/imageDiffPool.js';
|
|
2
|
-
export type { ImageDiffResult } from '../../contracts/imageDiffPool.js';
|
|
3
|
-
export declare class ImageDiffPool {
|
|
4
|
-
private readonly size;
|
|
5
|
-
private readonly workers;
|
|
6
|
-
private readonly idle;
|
|
7
|
-
private readonly active;
|
|
8
|
-
private readonly queue;
|
|
9
|
-
private nextId;
|
|
10
|
-
constructor(size: number);
|
|
11
|
-
compare(oldBytes: Uint8Array, newBytes: Uint8Array): Promise<ImageDiffResult>;
|
|
12
|
-
close(): Promise<void>;
|
|
13
|
-
private ensureWorkers;
|
|
14
|
-
private addWorker;
|
|
15
|
-
private handleResult;
|
|
16
|
-
private failWorker;
|
|
17
|
-
private pump;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function imageKey(namespace: string, caseId: string, snapshotId: string, imageId: string): string;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { BaselineState } from '../../contracts/taskRecord.js';
|
|
2
|
-
export declare function baselineVersion(baseline: BaselineState): string;
|
|
3
|
-
export declare function loadBaseline(baselineRoot: string, namespace: string): Promise<BaselineState>;
|
|
4
|
-
export declare function readBaselineVersion(root: string, namespace: string): Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mapLimit<T, R>(items: T[], limit: number, fn: (item: T, index: number) => Promise<R>): Promise<R[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function observationKey(namespace: string, caseId: string, index: number, imageId: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function readJson<T>(file: string): Promise<T | null>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ScanCasesInput, type ScanCasesOutput } from '../../contracts/scanCases.js';
|
|
2
|
-
export { ScanCasesInputSchema } from '../../contracts/scanCases.js';
|
|
3
|
-
export type { CaseFile, ScanCasesInput, ScanCasesOutput } from '../../contracts/scanCases.js';
|
|
4
|
-
/**
|
|
5
|
-
* 扫描 root 下所有 baseline.json,解析内容并计算稳定 hash。
|
|
6
|
-
* case 路径相对于 root;hash 输入为排序后的相对文件路径和解析后的 JSON。
|
|
7
|
-
*/
|
|
8
|
-
export declare function scanCases(input: ScanCasesInput): Promise<ScanCasesOutput>;
|
|
9
|
-
export declare function baselineFiles(root: string): Promise<string[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function taskDirectory(cwd: string, taskPath: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function writeBytesAtomic(file: string, body: Uint8Array): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function writeJsonAtomic(file: string, value: unknown): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function writeTextAtomic(file: string, body: string): Promise<void>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type BaselineChanges } from '../contracts/functions/baselineChanges.js';
|
|
2
|
-
export type { BaselineChange, BaselineChanges } from '../contracts/functions/baselineChanges.js';
|
|
3
|
-
export declare function getBaselineChanges(root: string, ref: string): Promise<BaselineChanges>;
|
|
4
|
-
export declare function reviewChanges(root: string, ref: string, expected: string, ids: string[], reviewed?: boolean): Promise<{
|
|
5
|
-
reviewed: string[];
|
|
6
|
-
}>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type Config } from '../contracts/config.js';
|
|
2
|
-
export { ConfigSchema, NamespaceSchema } from '../contracts/config.js';
|
|
3
|
-
export type { Config } from '../contracts/config.js';
|
|
4
|
-
export declare const CONFIG_NAME = "evidra.config.json";
|
|
5
|
-
export declare function namespaceId(value: unknown): asserts value is string;
|
|
6
|
-
export declare function parseConfig(config: unknown): Config;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function coreErrorStatus(error: unknown): number;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type AddCaseInput, type AddCaseOutput } from './Functions/addCase.js';
|
|
2
|
-
import { type AddTaskInput, type AddTaskOutput } from './Functions/addTask.js';
|
|
3
|
-
import { type CompareInput, type CompareOutput } from './Functions/compare.js';
|
|
4
|
-
import { type CompareTasksInput, type CompareTasksOutput } from './Functions/compareTasks.js';
|
|
5
|
-
import { type FinishTaskInput, type FinishTaskOutput } from './Functions/finishTask.js';
|
|
6
|
-
import { type GetTaskCaseInput, type GetTaskCaseOutput } from './Functions/getTaskCase.js';
|
|
7
|
-
import { type GetTaskTreeInput, type GetTaskTreeOutput } from './Functions/getTaskTree.js';
|
|
8
|
-
import { type ListTasksInput, type ListTasksOutput } from './Functions/listTasks.js';
|
|
9
|
-
import { type UpdateBaselineInput, type UpdateBaselineOutput } from './Functions/updateBaseline.js';
|
|
10
|
-
import { type EvidraOptions } from '../contracts/context.js';
|
|
11
|
-
export type { TaskComparisonSummary } from './Functions/compareTasks.js';
|
|
12
|
-
export type { TaskCaseObservation } from './Functions/getTaskCase.js';
|
|
13
|
-
export type { TaskTreeNode } from './Functions/getTaskTree.js';
|
|
14
|
-
export type { EvidraOptions, FileStorage } from '../contracts/context.js';
|
|
15
|
-
export type { AddCaseInput, AddCaseOutput, AddTaskInput, AddTaskOutput, CompareInput, CompareOutput, CompareTasksInput, CompareTasksOutput, FinishTaskInput, FinishTaskOutput, GetTaskCaseInput, GetTaskCaseOutput, GetTaskTreeInput, GetTaskTreeOutput, ListTasksInput, ListTasksOutput, UpdateBaselineInput, UpdateBaselineOutput, };
|
|
16
|
-
export declare class Evidra {
|
|
17
|
-
private readonly cwd;
|
|
18
|
-
private readonly baselineRoot;
|
|
19
|
-
private readonly storage;
|
|
20
|
-
private readonly concurrency;
|
|
21
|
-
constructor(input: EvidraOptions);
|
|
22
|
-
addTask(input: AddTaskInput): Promise<AddTaskOutput>;
|
|
23
|
-
addCase(input: AddCaseInput): Promise<AddCaseOutput>;
|
|
24
|
-
finishTask(input: FinishTaskInput): Promise<FinishTaskOutput>;
|
|
25
|
-
compare(input: CompareInput): Promise<CompareOutput>;
|
|
26
|
-
updateBaseline(input: UpdateBaselineInput): Promise<UpdateBaselineOutput>;
|
|
27
|
-
listTasks(input?: ListTasksInput): Promise<ListTasksOutput>;
|
|
28
|
-
compareTasks(input: CompareTasksInput): Promise<CompareTasksOutput>;
|
|
29
|
-
getTaskTree(input: GetTaskTreeInput): Promise<GetTaskTreeOutput>;
|
|
30
|
-
getTaskCase(input: GetTaskCaseInput): Promise<GetTaskCaseOutput>;
|
|
31
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class GitError extends Error {
|
|
2
|
-
}
|
|
3
|
-
interface GitRunResult {
|
|
4
|
-
ok: boolean;
|
|
5
|
-
stdout: string;
|
|
6
|
-
stderr: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function runGit(repoRoot: string, args: string[], timeoutMs?: number): Promise<GitRunResult>;
|
|
9
|
-
export declare function gitOptional(repoRoot: string, args: string[]): Promise<string | null>;
|
|
10
|
-
export declare function resolveRef(repoRoot: string, ref: string): Promise<string | null>;
|
|
11
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type CodeChange } from '../contracts/functions/gitChanges.js';
|
|
2
|
-
export type { CodeChange, CodeChanges, CodeDiff, CodeReviewInput, } from '../contracts/functions/gitChanges.js';
|
|
3
|
-
interface Side {
|
|
4
|
-
mode: string;
|
|
5
|
-
hash: string;
|
|
6
|
-
}
|
|
7
|
-
interface ChangeMeta {
|
|
8
|
-
path: string;
|
|
9
|
-
oldPath?: string;
|
|
10
|
-
status: CodeChange['status'];
|
|
11
|
-
before: Side | null;
|
|
12
|
-
}
|
|
13
|
-
export declare const MAX_BYTES: number;
|
|
14
|
-
export declare function git(root: string, args: string[]): Promise<string>;
|
|
15
|
-
/** 读取 Git 记录的改动列表;只解析原始 diff,不读取工作区内容。 */
|
|
16
|
-
export declare function collectChanges(root: string, ref: string): Promise<{
|
|
17
|
-
sha: string;
|
|
18
|
-
files: ChangeMeta[];
|
|
19
|
-
}>;
|
|
20
|
-
/** 工作区一侧的内容指纹;符号链接取目标,子模块取提交。 */
|
|
21
|
-
export declare function worktreeSide(repo: string, file: string): Promise<Side | null>;
|
|
22
|
-
/**
|
|
23
|
-
* 审核键只依赖 diff 本身:路径、重命名前的路径、状态、两侧内容和文件模式。
|
|
24
|
-
* 分支名和提交号不参与,避免无关提交让已审核的差异失效。
|
|
25
|
-
*/
|
|
26
|
-
export declare function reviewKey(change: ChangeMeta, after: Side | null): string;
|
|
27
|
-
export declare function publicChange(change: ChangeMeta, after: Side | null): CodeChange;
|
|
28
|
-
export declare function reviewFile(root: string): Promise<string>;
|
|
29
|
-
export declare function readReviews(root: string): Promise<Record<string, string>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { addCase } from './Functions/addCase.js';
|
|
2
|
-
export { addTask } from './Functions/addTask.js';
|
|
3
|
-
export { finishTask } from './Functions/finishTask.js';
|
|
4
|
-
export { approve } from './Functions/approve.js';
|
|
5
|
-
export { reviewCodeChanges } from './Functions/reviewCodeChanges.js';
|
|
6
|
-
export { reviewBaselineChanges } from './Functions/reviewBaselineChanges.js';
|
|
7
|
-
export { deleteBaselineFile } from './Functions/deleteBaselineFile.js';
|
|
8
|
-
export { compareTask } from './Functions/compareTask.js';
|
|
9
|
-
export { getBaselineChanges } from './Functions/getBaselineChanges.js';
|
|
10
|
-
export { getGitChanges } from './Functions/getGitChanges.js';
|
|
11
|
-
export { getGitDiff } from './Functions/getGitDiff.js';
|
|
12
|
-
export { listTaskSummaries } from './Functions/listTaskSummaries.js';
|
|
13
|
-
export { loadConfig } from './Functions/loadConfig.js';
|
|
14
|
-
export { resolveConfig } from './Functions/resolveConfig.js';
|
|
15
|
-
export { readProjectInfo } from './Functions/readProjectInfo.js';
|
|
16
|
-
export { listBaselines } from './Functions/listBaselines.js';
|
|
17
|
-
export { readTaskReport } from './Functions/readTaskReport.js';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type CompareInput, type CompareOutput, type CompareRecordOptions } from '../../contracts/internal/compare.js';
|
|
2
|
-
import type { Comparison, ComparisonSummary } from '../../contracts/comparison.js';
|
|
3
|
-
import type { FileStorage } from '../../contracts/context.js';
|
|
4
|
-
import type { BaselineState, TaskRecord } from '../../contracts/taskRecord.js';
|
|
5
|
-
import { type ImageDiffResult } from '../Utils/imageDiffPool.js';
|
|
6
|
-
export { CompareInputSchema } from '../../contracts/internal/compare.js';
|
|
7
|
-
export type { CompareInput, CompareOutput, CompareRecordOptions, } from '../../contracts/internal/compare.js';
|
|
8
|
-
export declare function compare(input: CompareInput, cwd: string, baselineRoot: string, storage: FileStorage, concurrency?: number): Promise<CompareOutput>;
|
|
9
|
-
export declare function compareRecord(cwd: string, storage: FileStorage, record: TaskRecord, baseline: BaselineState, options?: CompareRecordOptions): Promise<Comparison>;
|
|
10
|
-
/**
|
|
11
|
-
* 只读取轻量 summary.json,不读取 case/diff 索引或计算图片差异。
|
|
12
|
-
* 摘要缺失、损坏或基线版本不一致时返回 null,列表显示未知。
|
|
13
|
-
*/
|
|
14
|
-
export declare function readCachedComparisonSummary(cwd: string, namespace: string, taskId: string, currentBaselineVersion: string): Promise<ComparisonSummary | null>;
|
|
15
|
-
export declare function localImageDiff(oldBytes: Uint8Array, newBytes: Uint8Array): ImageDiffResult;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type GetBaselineOutput } from '../../contracts/internal/getBaseline.js';
|
|
2
|
-
export type { GetBaselineOutput } from '../../contracts/internal/getBaseline.js';
|
|
3
|
-
/** 读取某个 namespace 的 core 基线;只扫描 baselines 目录,不做比较。 */
|
|
4
|
-
export declare function getBaseline(baselineRoot: string, namespace: string): Promise<GetBaselineOutput>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type TaskRecordEntry } from '../../contracts/internal/taskRecords.js';
|
|
2
|
-
export type { TaskRecordEntry } from '../../contracts/internal/taskRecords.js';
|
|
3
|
-
/** 按 ID 索引读取任务;索引或任务不存在时返回 null,不扫描任务目录。 */
|
|
4
|
-
export declare function getTask(cwd: string, taskId: string): Promise<TaskRecordEntry | null>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type UpdateBaselineInput, type UpdateBaselineOutput } from '../../contracts/internal/updateBaseline.js';
|
|
2
|
-
import type { FileStorage } from '../../contracts/context.js';
|
|
3
|
-
export { UpdateBaselineInputSchema } from '../../contracts/internal/updateBaseline.js';
|
|
4
|
-
export type { UpdateBaselineInput, UpdateBaselineOutput, } from '../../contracts/internal/updateBaseline.js';
|
|
5
|
-
export declare function updateBaseline(input: UpdateBaselineInput, cwd: string, baselineRoot: string, storage: FileStorage, concurrency?: number): Promise<UpdateBaselineOutput>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 本地路径组装器。参数由 SDK 入口校验,这里只做字符串拼装。
|
|
3
|
-
*
|
|
4
|
-
* 任务:
|
|
5
|
-
* <root>/tasks/<yyyy-MM-dd>/<HH-mm-ss>-<taskId>/task.json
|
|
6
|
-
* <root>/tasks/_index/<taskId 前两位>/<taskId 剩余部分>
|
|
7
|
-
*
|
|
8
|
-
* 基线(按 keypath 拆分,无 namespace 级 baseline.json;casePath 最后一段是 caseId):
|
|
9
|
-
* <root>/baselines/<namespace>/<casePath...>/baseline.json
|
|
10
|
-
* <root>/baselines/<namespace>/<casePath...>/snapshots/<snapshotId>.txt
|
|
11
|
-
*
|
|
12
|
-
* 缓存:
|
|
13
|
-
* <root>/cache/baselines/<namespace>/snapshot.json
|
|
14
|
-
* <root>/cache/comparisons/<namespace>/<taskId>/index.json
|
|
15
|
-
* <root>/cache/comparisons/<namespace>/<taskId>/diff/<caseId>/<snapshotId>.png
|
|
16
|
-
* <root>/cache/downloads/<hash(objectKey)>.png
|
|
17
|
-
*
|
|
18
|
-
* 时间按本地时区拆分。
|
|
19
|
-
*/
|
|
20
|
-
export declare const pathSchema: {
|
|
21
|
-
taskIndex(root: string, taskId: string): string;
|
|
22
|
-
task(root: string, startedAt: string, taskId: string): {
|
|
23
|
-
path: string;
|
|
24
|
-
directory: string;
|
|
25
|
-
manifest: string;
|
|
26
|
-
};
|
|
27
|
-
baseline(root: string, namespace: string, casePath: string[]): {
|
|
28
|
-
directory: string;
|
|
29
|
-
manifest: string;
|
|
30
|
-
snapshotDirectory: string;
|
|
31
|
-
text(snapshotId: string): string;
|
|
32
|
-
};
|
|
33
|
-
cache(root: string): {
|
|
34
|
-
directory: string;
|
|
35
|
-
baseline(namespace: string): {
|
|
36
|
-
directory: string;
|
|
37
|
-
snapshot: string;
|
|
38
|
-
};
|
|
39
|
-
comparison(namespace: string, taskId: string): {
|
|
40
|
-
directory: string;
|
|
41
|
-
index: string;
|
|
42
|
-
summary: string;
|
|
43
|
-
caseDiffDirectory: (caseId: string) => string;
|
|
44
|
-
diff: (caseId: string, snapshotId: string) => string;
|
|
45
|
-
};
|
|
46
|
-
download(hash: string): string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Snapshot } from '../contracts/model.js';
|
|
2
|
-
export declare function reportStaticUrl(reportDir: string, file: string): string;
|
|
3
|
-
/** 返回详情前确保基线图片已在本地,静态路由只负责读取文件。 */
|
|
4
|
-
export declare function prepareBaselineImages(root: string, snapshots: Snapshot[]): Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CaseDiff } from '../contracts/comparison.js';
|
|
2
|
-
import type { ReportStatus, TaskDisplay } from '../contracts/report.js';
|
|
3
|
-
import type { TaskSummaryItem } from '../contracts/functions/listTaskSummaries.js';
|
|
4
|
-
export declare function reviewCounts(items: CaseDiff[]): Record<string, number>;
|
|
5
|
-
export declare function taskStatus(execution: {
|
|
6
|
-
running?: boolean;
|
|
7
|
-
failed: number;
|
|
8
|
-
total: number;
|
|
9
|
-
}, counts: Record<string, number>): ReportStatus;
|
|
10
|
-
export declare function taskDisplay(task: Omit<TaskSummaryItem, 'display'>): TaskDisplay;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Namespace } from '../contracts/index.js';
|
|
2
|
-
import type { ReportEntry, ReportTreeNode } from '../contracts/report.js';
|
|
3
|
-
export declare const reportEntryKey: (namespace: string, id: string) => string;
|
|
4
|
-
/** Preserve submitted key/display segments and configured namespace order. */
|
|
5
|
-
export declare function buildReportTree(namespaces: Namespace[], entries: ReportEntry[], running: boolean): ReportTreeNode[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type TaskDetail } from '../contracts/repository.js';
|
|
2
|
-
import type { TaskRecord } from '../contracts/taskRecord.js';
|
|
3
|
-
export type { TaskDetail } from '../contracts/repository.js';
|
|
4
|
-
export declare function reportRoot(root: string): Promise<string>;
|
|
5
|
-
export declare function storageFor(reportDir: string, repoRoot: string): import("../contracts/context.js").FileStorage;
|
|
6
|
-
export declare function toTaskDetail(record: TaskRecord): TaskDetail;
|
|
7
|
-
/** 按 core task id 读取任务;taskPath 不暴露给旧 service API。 */
|
|
8
|
-
export declare function readCoreTask(root: string, id: string): Promise<TaskDetail | null>;
|
|
9
|
-
/** 读取任务对应的 core taskPath;不存在时抛错。 */
|
|
10
|
-
export declare function taskPathOf(root: string, id: string): Promise<string>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare function reviewCodeRequest(root: string, input: unknown): Promise<{
|
|
2
|
-
reviewed: string[];
|
|
3
|
-
}>;
|
|
4
|
-
export declare function reviewRequest(root: string, input: unknown): Promise<{
|
|
5
|
-
reviewed: string[];
|
|
6
|
-
}>;
|
|
7
|
-
export declare function deleteBaselineRequest(root: string, input: unknown): Promise<{
|
|
8
|
-
ok: boolean;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function approveRequest(root: string, input: unknown): Promise<{
|
|
11
|
-
conflict: boolean;
|
|
12
|
-
comparison: import("./snapshots.js").Comparison;
|
|
13
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Baseline } from '../contracts/snapshots.js';
|
|
2
|
-
import type { TaskDetail } from './repository.js';
|
|
3
|
-
export type { Baseline } from '../contracts/snapshots.js';
|
|
4
|
-
export type { CaseDiff, Change, Comparison, ComparisonSummary, SnapshotDiff, } from '../contracts/comparison.js';
|
|
5
|
-
export type { BaselineCase } from '../contracts/model.js';
|
|
6
|
-
export { reportRoot } from './repository.js';
|
|
7
|
-
export type { TaskDetail } from './repository.js';
|
|
8
|
-
export declare const canonical: (value: unknown) => string;
|
|
9
|
-
export declare const version: (value: unknown) => string;
|
|
10
|
-
export declare function readTask(root: string, id: string): Promise<TaskDetail>;
|
|
11
|
-
export declare function readBaseline(root: string, namespace: string): Promise<Baseline>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type { AddTaskInput, Baseline, BaselineChanges, CaseDiff, CaseInput, CaseResult, CaseStatus, CodeChanges, CodeDiff, Comparison, Config, Namespace, Observation, ObservationInput, ProjectInfo, TaskDetail, TaskSummaryItem, SnapshotDiff, SnapshotInput, TreeSegment, } from './contracts/index.js';
|
|
2
|
-
export { addCase, addTask, approve, reviewCodeChanges, reviewBaselineChanges, deleteBaselineFile, compareTask, finishTask, getBaselineChanges, getGitChanges, getGitDiff, listTaskSummaries, loadConfig, resolveConfig, readProjectInfo, } from './implementations/index.js';
|
|
3
|
-
export type { StoredCase, StoredSnapshot, StoredObservation } from './contracts/taskRecord.js';
|
|
4
|
-
export type { AddCaseInput } from './contracts/functions/addCase.js';
|
|
5
|
-
export type { FinishTaskInput } from './contracts/functions/finishTask.js';
|
|
6
|
-
export type { ApproveInput } from './contracts/functions/approve.js';
|
|
7
|
-
export type { CompareTaskInput } from './contracts/functions/compareTask.js';
|
|
8
|
-
export type { DeleteBaselineFileInput } from './contracts/functions/deleteBaselineFile.js';
|
|
9
|
-
export type { GetBaselineChangesInput } from './contracts/functions/getBaselineChanges.js';
|
|
10
|
-
export type { GetGitChangesInput } from './contracts/functions/getGitChanges.js';
|
|
11
|
-
export type { GetGitDiffInput } from './contracts/functions/getGitDiff.js';
|
|
12
|
-
export type { ListTaskSummariesInput } from './contracts/functions/listTaskSummaries.js';
|
|
13
|
-
export type { LoadConfigInput } from './contracts/functions/loadConfig.js';
|
|
14
|
-
export type { ReadProjectInfoInput } from './contracts/functions/readProjectInfo.js';
|
|
15
|
-
export type { ResolveConfigInput } from './contracts/functions/resolveConfig.js';
|
|
16
|
-
export type { ReviewBaselineChangesInput } from './contracts/functions/reviewBaselineChanges.js';
|
|
17
|
-
export type { ReviewCodeChangesInput } from './contracts/functions/reviewCodeChanges.js';
|
|
18
|
-
export type { ListBaselinesInput } from './contracts/functions/listBaselines.js';
|
|
19
|
-
export type { ReadTaskReportInput } from './contracts/functions/readTaskReport.js';
|
|
20
|
-
export type { ReportEntry, ReportTreeNode, BaselineList, TaskReport } from './contracts/report.js';
|
|
21
|
-
export { listBaselines, readTaskReport } from './implementations/index.js';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { CaseInput, StartInput } from './types.js';
|
|
2
|
-
export type * from './types.js';
|
|
3
|
-
export interface EvidraOptions {
|
|
4
|
-
repoRoot: string;
|
|
5
|
-
}
|
|
6
|
-
export type Evidra = Awaited<ReturnType<typeof createEvidra>>;
|
|
7
|
-
/**
|
|
8
|
-
* 本地、框架无关的任务写入入口。
|
|
9
|
-
*
|
|
10
|
-
* SDK 只做配置和输入转发;任务、快照校验、PNG 尺寸和原子写入
|
|
11
|
-
* 全部复用 core。图片只写入本地 objects 目录,文本随 task.json 保存。
|
|
12
|
-
*/
|
|
13
|
-
export declare function createEvidra(options: EvidraOptions): Promise<{
|
|
14
|
-
repoRoot: string;
|
|
15
|
-
reportDir: string;
|
|
16
|
-
start(input: StartInput): Promise<{
|
|
17
|
-
taskId: string;
|
|
18
|
-
}>;
|
|
19
|
-
case(id: string, input: CaseInput): Promise<void>;
|
|
20
|
-
finish(id: string): Promise<void>;
|
|
21
|
-
}>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AddTaskInput } from '../../../modules/core/index.js';
|
|
2
|
-
import type { ObservationInput } from '../../../modules/core/index.js';
|
|
3
|
-
export type { Namespace, TreeSegment, CaseStatus as Status, CaseResult as Result, } from '../../../modules/core/index.js';
|
|
4
|
-
export type { CaseInput, SnapshotInput, ObservationInput } from '../../../modules/core/index.js';
|
|
5
|
-
export type { StoredObservation as StoredContent, StoredSnapshot, StoredCase, } from '../../../modules/core/index.js';
|
|
6
|
-
export type { TaskDetail } from '../../../modules/core/index.js';
|
|
7
|
-
export type StartInput = Omit<AddTaskInput, 'startedAt' | 'repoRoot'>;
|
|
8
|
-
type WithoutName<T> = T extends unknown ? Omit<T, 'name'> : never;
|
|
9
|
-
export type ContentInput = WithoutName<ObservationInput>;
|