import { IOperationLog , IOperationLogsStorage , Operation , } from "@staticdeploy/core" ; import { toArray } from "lodash" ; import cloneMethodsIO from "./common/cloneMethodsIO" ; import convertErrors from "./common/convertErrors" ; import { ICollection } from "./common/ICollection" ; @ cloneMethodsIO @ convertErrors export default class OperationLogsStorage implements IOperationLogsStorage { constructor ( private operationLogs ) { } async findMany ( ) { return toArray ( this . operationLogs ) ; } async createOne ( toBeCreatedOperationLog ) { this . operationLogs [ toBeCreatedOperationLog . id ] = toBeCreatedOperationLog ; return toBeCreatedOperationLog ; } }