@embeddable.com/sdk-core
Version:
Core Embeddable SDK module responsible for web-components bundling and publishing.
39 lines (38 loc) • 1.28 kB
TypeScript
export type CycleStatus = "ok" | "error";
export type Scope = "embeddable" | "dataModel" | "securityContext" | "clientContext" | "push" | "hmr";
export type IssueStage = "validate" | "sync";
export interface ValidationIssuePayload {
scope: Scope;
filePath: string;
message: string;
line?: number;
column?: number;
path?: string;
stage?: IssueStage;
}
export interface DevLoggerInitOptions {
logFile?: string;
eventsFile?: string;
}
declare const stripAnsi: (input: unknown) => string;
declare class DevLogger {
private logStream?;
private eventsStream?;
private cycleCounter;
private originalStdoutWrite?;
private originalStderrWrite?;
init(opts: DevLoggerInitOptions): Promise<void>;
close(): Promise<void>;
marker(event: string, payload?: Record<string, unknown>): void;
issue(payload: ValidationIssuePayload): void;
startCycle(scope: Scope, payload?: Record<string, unknown>): number;
endCycle(cycleId: number, scope: Scope, status: CycleStatus, payload?: Record<string, unknown>): void;
private writeEvent;
private openStream;
private installMirror;
private uninstallMirror;
private endStream;
}
declare const devLogger: DevLogger;
export default devLogger;
export { stripAnsi };