UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

24 lines 848 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowsPersistenceFactoryPreset = void 0; /** * An implementation of FlowsPersistenceFactory that always returns the same * persistence layers given at construction time. */ class FlowsPersistenceFactoryPreset { constructor(persistenceLayers) { this.persistenceLayers = persistenceLayers; } async createPersistenceLayer() { const persistenceLayer = this.persistenceLayers[0]; if (!persistenceLayer) { throw new Error('No persistence layer available'); } return persistenceLayer; } async createPersistenceLayers() { return this.persistenceLayers; } } exports.FlowsPersistenceFactoryPreset = FlowsPersistenceFactoryPreset; //# sourceMappingURL=FlowsPersistenceFactoryPreset.js.map