@yuantest/playwright - v1.0.5
    正在准备搜索索引...

    类 ArtifactManager

    Abstract base class for managers that require asynchronous initialization. Extends EventEmitter to allow managers to emit events.

    class MyManager extends BaseManager {
    protected async doInitialize(): Promise<void> {
    // Load resources, connect to database, etc.
    }
    }

    const manager = new MyManager();
    await manager.initialize();
    // or
    await manager.ready(); // Auto-initializes if needed

    层级 (查看层级一览)

    索引

    构造函数

    属性

    _initialized: boolean = false
    initPromise: Promise<void> | null = null
    log: ChildLogger = ...

    方法

    • Subclasses must implement this method to perform actual initialization. This method is called exactly once, when initialize() is first called.

      返回 Promise<void>

    • 参数

      • filePath: string

      返回 Promise<Buffer<ArrayBufferLike> | null>

    • 参数

      • filePath: string

      返回 Promise<boolean>

    • 参数

      • 可选olderThan: number

      返回 Promise<number>

    • 参数

      • 可选runId: string

      返回 Promise<
          {
              total: number;
              totalArtifacts: number;
              byType: Record<string, number>;
              totalSize: number;
              byTypeSize: Record<string, number>;
          },
      >

    • Initialize the manager. This method is idempotent. If already initialized, returns immediately. If initialization is in progress, waits for it to complete.

      返回 Promise<void>

    • Wait for the manager to be ready. Automatically calls initialize() if not already initialized.

      返回 Promise<void>