UNPKG

@vulcan-sql/extension-store-canner

Version:

Canner persistence store for Vulcan SQL

29 lines (28 loc) 1.08 kB
/// <reference types="node" /> import { APISchema, ArtifactBuilderOptions, PersistentStore } from '@vulcan-sql/core'; import * as oas3 from 'openapi3-ts'; export interface RawBuiltInArtifact { templates: Record<string, string>; schemas: APISchema[]; specs: Record<string, any>; } export declare type BuiltInArtifact = RawBuiltInArtifact & { specs: { oas3: oas3.OpenAPIObject; }; }; /** * Used the string to identify the extension Id not by the enum "ArtifactBuilderProviderType". * Because if we create another enum to extend the 'ArtifactBuilderProviderType', it seems unnecessary to give the new enum only has 'Canner' as its type." * */ export declare class CannerPersistenceStore extends PersistentStore { private filePath; private logger; private envConfig; constructor(options: ArtifactBuilderOptions, config: any, moduleName: string); save(data: Buffer): Promise<void>; load(): Promise<Buffer>; private getLatestArtifactsOfWorkspaces; private getWorkspaceArtifact; private mergeArtifactsOfWorkspaces; }