0.2.1 • Published 5 years ago
@determapp/projectmanager v0.2.1
DetermApp-Projectmanager
This is a wrapper for the DetermApp project storage. It'S meant for an easy programmatically access to projects.
API
import { ProjectStorageCreator } from '@determapp/projectstorage';
import { ProjectsStatus as Status } from '@determapp/actions/lib/status/projects';
import { ProjectsRelatedAction as Action } from '@determapp/actions/lib/actions';
import * as Stream from 'stream';
export interface ProjectManager {
getStatus: () => Status;
subscribeToProjectsStatus: (listener: (status: Status) => void) => () => void;
subscribeToActions: (listener: (action: Action) => void) => () => void;
dispatch: (action: Action) => void;
addImage: (params: {
projectId: string;
branch: string;
originalFilename: string;
originalFile: Buffer;
scaledFiles: Array<Buffer>;
}) => Promise<{
imageId: string;
}>;
readImage: (imageFileName: string) => Stream.Readable;
addShutdownHook: (hook: () => Promise<void>) => void;
shutdown: () => Promise<void>;
}
export declare const createProjectManager: ({ storageCreator }: {
storageCreator: ProjectStorageCreator;
}) => Promise<ProjectManager>;
Commands
npm run build
- builds this component
- executed as
prepare
hook