@prismshadow/penguin-library-trace · library/trace/src/harness-history.ts:117

HarnessHistoryStore

component

No JSDoc comment in source yet.

API

@Component({
  name: "HarnessHistoryStoreImpl",
  key: "@prismshadow/penguin-server#HarnessHistoryStore",
})
export class HarnessHistoryStore implements HarnessHistoryIface {
  @Use() private readonly paths!: TracePaths;
  @Use() private readonly clock!: HarnessHistoryClock;
  @Use() private readonly log!: HarnessHistoryLog;
  @Use() private readonly hmrControl!: HarnessHistoryRuntime;
  @Use() private readonly channels!: HarnessHistoryChannels;
  @Use() private readonly builds!: HarnessHistoryBuilds;
  @Use() private readonly ownTable!: HarnessHistoryTable;
  setup({ effect }: ClassCtx): void;
  record(): Promise<void>;
  async rollback(id: string): Promise<boolean>;
  async entries(): Promise<HarnessHistoryEntry[]>;
  async list(): Promise<HarnessHistory>;
  async table(hash: string): Promise<unknown | null>;
}

Dependencies & Wiring

Extracted from class decorators
implementsinterfaces
@Userequires (7)

Methods (6)

setup

setup({ effect }: ClassCtx): void
@param{ effect }ClassCtx
@returnsvoid

record

record(): Promise<void>

Upserts the line for the runtime's current commit. A line already there for the same bundles is refreshed only when it carries THIS platform's table; one carrying another table belongs to the platform that recorded it and is left alone. Nothing is written when the line is already what it would be.

@returnsPromise<void>

rollback

async rollback(id: string): Promise<boolean>
@paramidstring
@returnsPromise<boolean>

entries

async entries(): Promise<HarnessHistoryEntry[]>

The entries on disk, newest first; a truncated or hand-edited file degrades to what still parses.

@returnsPromise<HarnessHistoryEntry[]>

list

async list(): Promise<HarnessHistory>
@returnsPromise<HarnessHistory>

table

async table(hash: string): Promise<unknown | null>
@paramhashstring
@returnsPromise<unknown | null>