diff --git a/goldens/public-api/angular_devkit/core/node/index.md b/goldens/public-api/angular_devkit/core/node/index.md index 6fa77ee73107..00edd946a816 100644 --- a/goldens/public-api/angular_devkit/core/node/index.md +++ b/goldens/public-api/angular_devkit/core/node/index.md @@ -18,858 +18,20 @@ import { SubscribableOrPromise } from 'rxjs'; import { Subscription } from 'rxjs'; import { ValidateFunction } from 'ajv'; -// @public (undocumented) -function addUndefinedDefaults(value: JsonValue, _pointer: JsonPointer, schema?: JsonSchema): JsonValue; - -// @public -class AliasHost extends ResolverHost { - // (undocumented) - get aliases(): Map; - // (undocumented) - protected _aliases: Map; - // (undocumented) - protected _resolve(path: Path): Path; -} - -// @public (undocumented) -function buildJsonPointer(fragments: string[]): JsonPointer; - -// @public (undocumented) -class ChannelAlreadyExistException extends BaseException { - constructor(name: string); -} - -// @public -class CordHost extends SimpleMemoryHost { - constructor(_back: ReadonlyHost); - // (undocumented) - protected _back: ReadonlyHost; - // (undocumented) - get backend(): ReadonlyHost; - // (undocumented) - get capabilities(): HostCapabilities; - clone(): CordHost; - commit(host: Host, force?: boolean): Observable; - create(path: Path, content: FileBuffer): Observable; - // (undocumented) - delete(path: Path): Observable; - // (undocumented) - exists(path: Path): Observable; - // (undocumented) - protected _filesToCreate: Set; - // (undocumented) - protected _filesToDelete: Set; - // (undocumented) - protected _filesToOverwrite: Set; - // (undocumented) - protected _filesToRename: Map; - // (undocumented) - protected _filesToRenameRevert: Map; - // (undocumented) - isDirectory(path: Path): Observable; - // (undocumented) - isFile(path: Path): Observable; - // (undocumented) - list(path: Path): Observable; - // (undocumented) - overwrite(path: Path, content: FileBuffer): Observable; - // (undocumented) - read(path: Path): Observable; - // (undocumented) - records(): CordHostRecord[]; - // (undocumented) - rename(from: Path, to: Path): Observable; - // (undocumented) - stat(path: Path): Observable | null; - // (undocumented) - watch(path: Path, options?: HostWatchOptions): null; - // (undocumented) - willCreate(path: Path): boolean; - // (undocumented) - willDelete(path: Path): boolean; - // (undocumented) - willOverwrite(path: Path): boolean; - // (undocumented) - willRename(path: Path): boolean; - // (undocumented) - willRenameTo(path: Path, to: Path): boolean; - // (undocumented) - write(path: Path, content: FileBuffer): Observable; -} - -// @public (undocumented) -interface CordHostCreate { - // (undocumented) - content: FileBuffer; - // (undocumented) - kind: 'create'; - // (undocumented) - path: Path; -} - -// @public (undocumented) -interface CordHostDelete { - // (undocumented) - kind: 'delete'; - // (undocumented) - path: Path; -} - -// @public (undocumented) -interface CordHostOverwrite { - // (undocumented) - content: FileBuffer; - // (undocumented) - kind: 'overwrite'; - // (undocumented) - path: Path; -} - -// @public (undocumented) -type CordHostRecord = CordHostCreate | CordHostOverwrite | CordHostRename | CordHostDelete; - -// @public (undocumented) -interface CordHostRename { - // (undocumented) - from: Path; - // (undocumented) - kind: 'rename'; - // (undocumented) - to: Path; -} - -// @public (undocumented) -class CoreSchemaRegistry implements SchemaRegistry { - constructor(formats?: SchemaFormat[]); - // (undocumented) - addFormat(format: SchemaFormat): void; - addPostTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void; - addPreTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void; - // (undocumented) - addSmartDefaultProvider(source: string, provider: SmartDefaultProvider): void; - compile(schema: JsonSchema): Observable; - // @deprecated - flatten(schema: JsonObject): Observable; - // (undocumented) - registerUriHandler(handler: UriHandler): void; - // (undocumented) - protected _resolver(ref: string, validate?: ValidateFunction): { - context?: ValidateFunction; - schema?: JsonObject; - }; - // (undocumented) - usePromptProvider(provider: PromptProvider): void; - // (undocumented) - useXDeprecatedProvider(onUsage: (message: string) => void): void; -} - -// @public -export function createConsoleLogger(verbose?: boolean, stdout?: ProcessOutput, stderr?: ProcessOutput, colors?: Partial string>>): logging.Logger; - -// @public -function createDispatcher(options?: Partial>): JobDispatcher; - -// @public -function createJobFactory(loader: () => Promise>, options?: Partial): JobHandler; - -// @public -function createJobHandler(fn: SimpleJobHandlerFn, options?: Partial): JobHandler; - -// @public -function createLoggerJob(job: JobHandler, logger: LoggerApi): JobHandler; - -// @public (undocumented) -function createSyncHost(handler: SyncHostHandler): Host; - -// @public (undocumented) -class Empty implements ReadonlyHost { - // (undocumented) - readonly capabilities: HostCapabilities; - // (undocumented) - exists(path: Path): Observable; - // (undocumented) - isDirectory(path: Path): Observable; - // (undocumented) - isFile(path: Path): Observable; - // (undocumented) - list(path: Path): Observable; - // (undocumented) - read(path: Path): Observable; - // (undocumented) - stat(path: Path): Observable | null>; -} - -declare namespace experimental { - export { - NodeModuleJobRegistry - } -} -export { experimental } - -// @public -class FallbackRegistry implements Registry { - constructor(_fallbacks?: Registry[]); - // (undocumented) - addFallback(registry: Registry): void; - // (undocumented) - protected _fallbacks: Registry[]; - // (undocumented) - get(name: JobName): Observable | null>; -} - -// @public (undocumented) -type FileBuffer = ArrayBuffer; - -// @public (undocumented) -const fileBuffer: TemplateTag; - -// @public (undocumented) -type FileBufferLike = ArrayBufferLike; - -// @public (undocumented) -function fileBufferToString(fileBuffer: FileBuffer): string; - -// @public (undocumented) -function getTypesOfSchema(schema: JsonSchema): Set; - -// @public (undocumented) -interface Host extends ReadonlyHost { - // (undocumented) - delete(path: Path): Observable; - // (undocumented) - rename(from: Path, to: Path): Observable; - // (undocumented) - watch(path: Path, options?: HostWatchOptions): Observable | null; - // (undocumented) - write(path: Path, content: FileBufferLike): Observable; -} - -// @public (undocumented) -interface HostCapabilities { - // (undocumented) - synchronous: boolean; -} - -// @public (undocumented) -interface HostWatchEvent { - // (undocumented) - readonly path: Path; - // (undocumented) - readonly time: Date; - // (undocumented) - readonly type: HostWatchEventType; -} - -// @public (undocumented) -const enum HostWatchEventType { - // (undocumented) - Changed = 0, - // (undocumented) - Created = 1, - // (undocumented) - Deleted = 2, - // (undocumented) - Renamed = 3 -} - -// @public (undocumented) -interface HostWatchOptions { - // (undocumented) - readonly persistent?: boolean; - // (undocumented) - readonly recursive?: boolean; -} - -// @public (undocumented) -class IndentLogger extends Logger { - constructor(name: string, parent?: Logger | null, indentation?: string); -} - -// @public (undocumented) -function isJobHandler(value: unknown): value is JobHandler; - -// @public (undocumented) -function isJsonSchema(value: unknown): value is JsonSchema; - -// @public -interface Job { - readonly argument: ArgumentT; - readonly description: Observable; - getChannel(name: string, schema?: schema.JsonSchema): Observable; - readonly inboundBus: Observer>; - readonly input: Observer; - readonly outboundBus: Observable>; - readonly output: Observable; - ping(): Observable; - readonly state: JobState; - stop(): void; -} - -// @public (undocumented) -class JobArgumentSchemaValidationError extends schema.SchemaValidationException { - constructor(errors?: schema.SchemaValidatorError[]); -} - -// @public -interface JobDescription extends JsonObject { - // (undocumented) - readonly argument: DeepReadonly; - // (undocumented) - readonly input: DeepReadonly; - // (undocumented) - readonly name: JobName; - // (undocumented) - readonly output: DeepReadonly; -} - -// @public -interface JobDispatcher extends JobHandler { - addConditionalJob(predicate: (args: A) => boolean, name: string): void; - setDefaultJob(name: JobName | null | JobHandler): void; -} - -// @public (undocumented) -class JobDoesNotExistException extends BaseException { - constructor(name: JobName); -} - -// @public -interface JobHandler { - // (undocumented) - (argument: ArgT, context: JobHandlerContext): Observable>; - // (undocumented) - jobDescription: Partial; -} - -// @public -interface JobHandlerContext { - // (undocumented) - readonly dependencies: Job[]; - // (undocumented) - readonly description: JobDescription; - // (undocumented) - readonly inboundBus: Observable>; - // (undocumented) - readonly scheduler: Scheduler; -} - -// @public (undocumented) -type JobInboundMessage = JobInboundMessagePing | JobInboundMessageStop | JobInboundMessageInput; - -// @public -interface JobInboundMessageBase extends JsonObject { - readonly kind: JobInboundMessageKind; -} - -// @public -interface JobInboundMessageInput extends JobInboundMessageBase { - // (undocumented) - readonly kind: JobInboundMessageKind.Input; - readonly value: InputT; -} - -// @public -enum JobInboundMessageKind { - // (undocumented) - Input = "in", - // (undocumented) - Ping = "ip", - // (undocumented) - Stop = "is" -} - -// @public -interface JobInboundMessagePing extends JobInboundMessageBase { - readonly id: number; - // (undocumented) - readonly kind: JobInboundMessageKind.Ping; -} - -// @public (undocumented) -class JobInboundMessageSchemaValidationError extends schema.SchemaValidationException { - constructor(errors?: schema.SchemaValidatorError[]); -} - -// @public -interface JobInboundMessageStop extends JobInboundMessageBase { - // (undocumented) - readonly kind: JobInboundMessageKind.Stop; -} - -// @public -type JobName = string; - -// @public (undocumented) -class JobNameAlreadyRegisteredException extends BaseException { - constructor(name: JobName); -} - -// @public -type JobOutboundMessage = JobOutboundMessageOnReady | JobOutboundMessageStart | JobOutboundMessageOutput | JobOutboundMessageChannelCreate | JobOutboundMessageChannelMessage | JobOutboundMessageChannelError | JobOutboundMessageChannelComplete | JobOutboundMessageEnd | JobOutboundMessagePong; - -// @public -interface JobOutboundMessageBase { - readonly description: JobDescription; - readonly kind: JobOutboundMessageKind; -} - -// @public -interface JobOutboundMessageChannelBase extends JobOutboundMessageBase { - readonly name: string; -} - -// @public -interface JobOutboundMessageChannelComplete extends JobOutboundMessageChannelBase { - // (undocumented) - readonly kind: JobOutboundMessageKind.ChannelComplete; -} - -// @public -interface JobOutboundMessageChannelCreate extends JobOutboundMessageChannelBase { - // (undocumented) - readonly kind: JobOutboundMessageKind.ChannelCreate; -} - -// @public -interface JobOutboundMessageChannelError extends JobOutboundMessageChannelBase { - readonly error: JsonValue; - // (undocumented) - readonly kind: JobOutboundMessageKind.ChannelError; -} - -// @public -interface JobOutboundMessageChannelMessage extends JobOutboundMessageChannelBase { - // (undocumented) - readonly kind: JobOutboundMessageKind.ChannelMessage; - readonly message: JsonValue; -} - -// @public -interface JobOutboundMessageEnd extends JobOutboundMessageBase { - // (undocumented) - readonly kind: JobOutboundMessageKind.End; -} - -// @public -enum JobOutboundMessageKind { - // (undocumented) - ChannelComplete = "cc", - // (undocumented) - ChannelCreate = "cn", - // (undocumented) - ChannelError = "ce", - // (undocumented) - ChannelMessage = "cm", - // (undocumented) - End = "e", - // (undocumented) - OnReady = "c", - // (undocumented) - Output = "o", - // (undocumented) - Pong = "p", - // (undocumented) - Start = "s" -} - -// @public -interface JobOutboundMessageOnReady extends JobOutboundMessageBase { - // (undocumented) - readonly kind: JobOutboundMessageKind.OnReady; -} - -// @public -interface JobOutboundMessageOutput extends JobOutboundMessageBase { - // (undocumented) - readonly kind: JobOutboundMessageKind.Output; - readonly value: OutputT; -} - -// @public -interface JobOutboundMessagePong extends JobOutboundMessageBase { - readonly id: number; - // (undocumented) - readonly kind: JobOutboundMessageKind.Pong; -} - -// @public -interface JobOutboundMessageStart extends JobOutboundMessageBase { - // (undocumented) - readonly kind: JobOutboundMessageKind.Start; -} - -// @public (undocumented) -class JobOutputSchemaValidationError extends schema.SchemaValidationException { - constructor(errors?: schema.SchemaValidatorError[]); -} - -declare namespace jobs { - export { - isJobHandler, - JobName, - JobHandler, - JobHandlerContext, - JobDescription, - JobInboundMessageKind, - JobInboundMessageBase, - JobInboundMessagePing, - JobInboundMessageStop, - JobInboundMessageInput, - JobInboundMessage, - JobOutboundMessageKind, - JobOutboundMessageBase, - JobOutboundMessageOnReady, - JobOutboundMessageStart, - JobOutboundMessageOutput, - JobOutboundMessageChannelBase, - JobOutboundMessageChannelMessage, - JobOutboundMessageChannelError, - JobOutboundMessageChannelCreate, - JobOutboundMessageChannelComplete, - JobOutboundMessageEnd, - JobOutboundMessagePong, - JobOutboundMessage, - JobState, - Job, - ScheduleJobOptions, - Registry, - Scheduler, - createJobHandler, - createJobFactory, - createLoggerJob, - ChannelAlreadyExistException, - SimpleJobHandlerContext, - SimpleJobHandlerFn, - JobNameAlreadyRegisteredException, - JobDoesNotExistException, - createDispatcher, - JobDispatcher, - FallbackRegistry, - RegisterJobOptions, - SimpleJobRegistry, - JobArgumentSchemaValidationError, - JobInboundMessageSchemaValidationError, - JobOutputSchemaValidationError, - SimpleScheduler, - strategy - } -} - -// @public -enum JobState { - Ended = "ended", - Errored = "errored", - Queued = "queued", - Ready = "ready", - Started = "started" -} - -// @public (undocumented) -function joinJsonPointer(root: JsonPointer, ...others: string[]): JsonPointer; - -// @public (undocumented) -type JsonPointer = string & { - __PRIVATE_DEVKIT_JSON_POINTER: void; -}; - -// @public -type JsonSchema = JsonObject | boolean; - -// @public (undocumented) -interface JsonSchemaVisitor { - // (undocumented) - (current: JsonObject | JsonArray, pointer: JsonPointer, parentSchema?: JsonObject | JsonArray, index?: string): void; -} - -// @public (undocumented) -interface JsonVisitor { - // (undocumented) - (value: JsonValue, pointer: JsonPointer, schema?: JsonObject, root?: JsonObject | JsonArray): Observable | JsonValue; -} - -// @public (undocumented) -class LevelCapLogger extends LevelTransformLogger { - constructor(name: string, parent: Logger | null, levelCap: LogLevel); - // (undocumented) - readonly levelCap: LogLevel; - // (undocumented) - static levelMap: { - [cap: string]: { - [level: string]: string; - }; - }; - // (undocumented) - readonly name: string; - // (undocumented) - readonly parent: Logger | null; -} - -// @public (undocumented) -class LevelTransformLogger extends Logger { - constructor(name: string, parent: Logger | null, levelTransform: (level: LogLevel) => LogLevel); - // (undocumented) - createChild(name: string): Logger; - // (undocumented) - readonly levelTransform: (level: LogLevel) => LogLevel; - // (undocumented) - log(level: LogLevel, message: string, metadata?: JsonObject): void; - // (undocumented) - readonly name: string; - // (undocumented) - readonly parent: Logger | null; -} - -// @public (undocumented) -interface LogEntry extends LoggerMetadata { - // (undocumented) - level: LogLevel; - // (undocumented) - message: string; - // (undocumented) - timestamp: number; -} - -// @public (undocumented) -class Logger extends Observable implements LoggerApi { - constructor(name: string, parent?: Logger | null); - // (undocumented) - asApi(): LoggerApi; - // (undocumented) - complete(): void; - // (undocumented) - createChild(name: string): Logger; - // (undocumented) - debug(message: string, metadata?: JsonObject): void; - // (undocumented) - error(message: string, metadata?: JsonObject): void; - // (undocumented) - fatal(message: string, metadata?: JsonObject): void; - // (undocumented) - forEach(next: (value: LogEntry) => void, PromiseCtor?: typeof Promise): Promise; - // (undocumented) - info(message: string, metadata?: JsonObject): void; - // (undocumented) - lift(operator: Operator): Observable; - // (undocumented) - log(level: LogLevel, message: string, metadata?: JsonObject): void; - // (undocumented) - protected _metadata: LoggerMetadata; - // (undocumented) - readonly name: string; - // (undocumented) - next(entry: LogEntry): void; - // (undocumented) - protected get _observable(): Observable; - protected set _observable(v: Observable); - // (undocumented) - readonly parent: Logger | null; - // (undocumented) - protected readonly _subject: Subject; - // (undocumented) - subscribe(): Subscription; - // (undocumented) - subscribe(observer: PartialObserver): Subscription; - // (undocumented) - subscribe(next?: (value: LogEntry) => void, error?: (error: Error) => void, complete?: () => void): Subscription; - // (undocumented) - toString(): string; - // (undocumented) - warn(message: string, metadata?: JsonObject): void; -} - -// @public (undocumented) -interface LoggerApi { - // (undocumented) - createChild(name: string): Logger; - // (undocumented) - debug(message: string, metadata?: JsonObject): void; - // (undocumented) - error(message: string, metadata?: JsonObject): void; - // (undocumented) - fatal(message: string, metadata?: JsonObject): void; - // (undocumented) - info(message: string, metadata?: JsonObject): void; - // (undocumented) - log(level: LogLevel, message: string, metadata?: JsonObject): void; - // (undocumented) - warn(message: string, metadata?: JsonObject): void; -} - -// @public (undocumented) -interface LoggerMetadata extends JsonObject { - // (undocumented) - name: string; - // (undocumented) - path: string[]; -} - -// @public (undocumented) -type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal'; - -// @public -function mergeSchemas(...schemas: (JsonSchema | undefined)[]): JsonSchema; - -// @public -export class NodeJsAsyncHost implements virtualFs.Host { - // (undocumented) - get capabilities(): virtualFs.HostCapabilities; - // (undocumented) - delete(path: Path): Observable; - // (undocumented) - exists(path: Path): Observable; - // (undocumented) - isDirectory(path: Path): Observable; - // (undocumented) - isFile(path: Path): Observable; - // (undocumented) - list(path: Path): Observable; - // (undocumented) - read(path: Path): Observable; - // (undocumented) - rename(from: Path, to: Path): Observable; - // (undocumented) - stat(path: Path): Observable>; - // (undocumented) - watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable | null; - // (undocumented) - write(path: Path, content: virtualFs.FileBuffer): Observable; -} - -// @public -export class NodeJsSyncHost implements virtualFs.Host { - // (undocumented) - get capabilities(): virtualFs.HostCapabilities; - // (undocumented) - delete(path: Path): Observable; - // (undocumented) - exists(path: Path): Observable; - // (undocumented) - isDirectory(path: Path): Observable; - // (undocumented) - isFile(path: Path): Observable; - // (undocumented) - list(path: Path): Observable; - // (undocumented) - read(path: Path): Observable; - // (undocumented) - rename(from: Path, to: Path): Observable; - // (undocumented) - stat(path: Path): Observable>; - // (undocumented) - watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable | null; - // (undocumented) - write(path: Path, content: virtualFs.FileBuffer): Observable; -} - -// @public (undocumented) -class NodeModuleJobRegistry implements experimental_2.jobs.Registry { - get(name: experimental_2.jobs.JobName): Observable | null>; - // (undocumented) - protected _resolve(name: string): string | null; -} - -// @public (undocumented) -class NullLogger extends Logger { - constructor(parent?: Logger | null); - // (undocumented) - asApi(): LoggerApi; -} - -// @public (undocumented) -function parseJsonPointer(pointer: JsonPointer): string[]; - -// @public (undocumented) -class PatternMatchingHost extends ResolverHost { - // (undocumented) - addPattern(pattern: string | string[], replacementFn: ReplacementFunction): void; - // (undocumented) - protected _patterns: Map; - // (undocumented) - protected _resolve(path: Path): Path; -} - -// @public (undocumented) -export interface ProcessOutput { - // (undocumented) - write(buffer: string | Buffer): boolean; -} - -// @public (undocumented) -interface PromptDefinition { - // (undocumented) - default?: string | string[] | number | boolean | null; - // (undocumented) - id: string; - // (undocumented) - items?: Array; - // (undocumented) - message: string; - // (undocumented) - multiselect?: boolean; - // (undocumented) - propertyTypes: Set; - // (undocumented) - raw?: string | JsonObject; - // (undocumented) - type: string; - // (undocumented) - validator?: (value: JsonValue) => boolean | string | Promise; -} - -// @public (undocumented) -type PromptProvider = (definitions: Array) => SubscribableOrPromise<{ - [id: string]: JsonValue; -}>; - -// @public (undocumented) -interface ReadonlyHost { - // (undocumented) - readonly capabilities: HostCapabilities; - // (undocumented) - exists(path: Path): Observable; - // (undocumented) - isDirectory(path: Path): Observable; - // (undocumented) - isFile(path: Path): Observable; - // (undocumented) - list(path: Path): Observable; - // (undocumented) - read(path: Path): Observable; - // (undocumented) - stat(path: Path): Observable | null> | null; -} - -// @public (undocumented) -interface ReferenceResolver { - // (undocumented) - (ref: string, context?: ContextT): { - context?: ContextT; - schema?: JsonObject; - }; -} - // @public -interface RegisterJobOptions extends Partial { -} +export function createConsoleLogger(verbose?: boolean, stdout?: ProcessOutput, stderr?: ProcessOutput, colors?: Partial string>>): logging.Logger; -// @public (undocumented) -interface Registry { - get(name: JobName): Observable | null>; +declare namespace experimental { + export { + NodeModuleJobRegistry + } } - -// @public (undocumented) -type ReplacementFunction = (path: Path) => Path; +export { experimental } // @public -abstract class ResolverHost implements Host { - constructor(_delegate: Host); - // (undocumented) - get capabilities(): HostCapabilities; +export class NodeJsAsyncHost implements virtualFs.Host { // (undocumented) - protected _delegate: Host; + get capabilities(): virtualFs.HostCapabilities; // (undocumented) delete(path: Path): Observable; // (undocumented) @@ -881,430 +43,56 @@ abstract class ResolverHost implements Host { // (undocumented) list(path: Path): Observable; // (undocumented) - read(path: Path): Observable; + read(path: Path): Observable; // (undocumented) rename(from: Path, to: Path): Observable; // (undocumented) - protected abstract _resolve(path: Path): Path; - // (undocumented) - stat(path: Path): Observable | null> | null; - // (undocumented) - watch(path: Path, options?: HostWatchOptions): Observable | null; - // (undocumented) - write(path: Path, content: FileBuffer): Observable; -} - -// @public -class SafeReadonlyHost implements ReadonlyHost { - constructor(_delegate: ReadonlyHost); - // (undocumented) - get capabilities(): HostCapabilities; - // (undocumented) - exists(path: Path): Observable; - // (undocumented) - isDirectory(path: Path): Observable; - // (undocumented) - isFile(path: Path): Observable; - // (undocumented) - list(path: Path): Observable; - // (undocumented) - read(path: Path): Observable; - // (undocumented) - stat(path: Path): Observable | null> | null; -} - -// @public -interface ScheduleJobOptions { - dependencies?: Job | Job[]; -} - -// @public -interface Scheduler { - getDescription(name: JobName): Observable; - has(name: JobName): Observable; - pause(): () => void; - schedule(name: JobName, argument: A, options?: ScheduleJobOptions): Job; -} - -// @public (undocumented) -interface SchemaFormat { - // (undocumented) - formatter: SchemaFormatter; - // (undocumented) - name: string; -} - -// @public (undocumented) -type SchemaFormatter = Format; - -// @public (undocumented) -interface SchemaKeywordValidator { - // (undocumented) - (data: JsonValue, schema: JsonValue, parent: JsonObject | JsonArray | undefined, parentProperty: string | number | undefined, pointer: JsonPointer, rootData: JsonValue): boolean | Observable; -} - -// @public (undocumented) -interface SchemaRegistry { - // (undocumented) - addFormat(format: SchemaFormat): void; - addPostTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void; - addPreTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void; - // (undocumented) - addSmartDefaultProvider(source: string, provider: SmartDefaultProvider): void; - // (undocumented) - compile(schema: Object): Observable; - // @deprecated (undocumented) - flatten(schema: JsonObject | string): Observable; - // (undocumented) - usePromptProvider(provider: PromptProvider): void; - // (undocumented) - useXDeprecatedProvider(onUsage: (message: string) => void): void; -} - -// @public (undocumented) -class SchemaValidationException extends BaseException { - constructor(errors?: SchemaValidatorError[], baseMessage?: string); - // (undocumented) - static createMessages(errors?: SchemaValidatorError[]): string[]; - // (undocumented) - readonly errors: SchemaValidatorError[]; -} - -// @public (undocumented) -interface SchemaValidator { - // (undocumented) - (data: JsonValue, options?: SchemaValidatorOptions): Observable; -} - -// @public (undocumented) -type SchemaValidatorError = Partial; - -// @public (undocumented) -interface SchemaValidatorOptions { - // (undocumented) - applyPostTransforms?: boolean; - // (undocumented) - applyPreTransforms?: boolean; - // (undocumented) - withPrompts?: boolean; -} - -// @public (undocumented) -interface SchemaValidatorResult { - // (undocumented) - data: JsonValue; - // (undocumented) - errors?: SchemaValidatorError[]; - // (undocumented) - success: boolean; -} - -// @public (undocumented) -class ScopedHost extends ResolverHost { - constructor(delegate: Host, _root?: Path); - // (undocumented) - protected _resolve(path: Path): Path; - // (undocumented) - protected _root: Path; -} - -// @public -interface SimpleJobHandlerContext extends JobHandlerContext { + stat(path: Path): Observable>; // (undocumented) - createChannel: (name: string) => Observer; + watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable | null; // (undocumented) - input: Observable; + write(path: Path, content: virtualFs.FileBuffer): Observable; } // @public -type SimpleJobHandlerFn = (input: A, context: SimpleJobHandlerContext) => O | Promise | Observable; - -// @public -class SimpleJobRegistry implements Registry { - // (undocumented) - get(name: JobName): Observable | null>; - getJobNames(): JobName[]; - register(name: JobName, handler: JobHandler, options?: RegisterJobOptions): void; - register(handler: JobHandler, options?: RegisterJobOptions & { - name: string; - }): void; - // (undocumented) - protected _register(name: JobName, handler: JobHandler, options: RegisterJobOptions): void; -} - -// @public (undocumented) -class SimpleMemoryHost implements Host<{}> { - constructor(); - // (undocumented) - protected _cache: Map>; +export class NodeJsSyncHost implements virtualFs.Host { // (undocumented) - get capabilities(): HostCapabilities; + get capabilities(): virtualFs.HostCapabilities; // (undocumented) delete(path: Path): Observable; // (undocumented) - protected _delete(path: Path): void; - // (undocumented) exists(path: Path): Observable; // (undocumented) - protected _exists(path: Path): boolean; - // (undocumented) isDirectory(path: Path): Observable; // (undocumented) - protected _isDirectory(path: Path): boolean; - // (undocumented) isFile(path: Path): Observable; // (undocumented) - protected _isFile(path: Path): boolean; - // (undocumented) list(path: Path): Observable; // (undocumented) - protected _list(path: Path): PathFragment[]; - // (undocumented) - protected _newDirStats(): { - inspect(): string; - isFile(): boolean; - isDirectory(): boolean; - size: number; - atime: Date; - ctime: Date; - mtime: Date; - birthtime: Date; - content: null; - }; - // (undocumented) - protected _newFileStats(content: FileBuffer, oldStats?: Stats): { - inspect(): string; - isFile(): boolean; - isDirectory(): boolean; - size: number; - atime: Date; - ctime: Date; - mtime: Date; - birthtime: Date; - content: ArrayBuffer; - }; - // (undocumented) - read(path: Path): Observable; - // (undocumented) - protected _read(path: Path): FileBuffer; + read(path: Path): Observable; // (undocumented) rename(from: Path, to: Path): Observable; // (undocumented) - protected _rename(from: Path, to: Path): void; - // (undocumented) - reset(): void; - // (undocumented) - stat(path: Path): Observable | null> | null; - // (undocumented) - protected _stat(path: Path): Stats | null; - // (undocumented) - protected _toAbsolute(path: Path): Path; - // (undocumented) - protected _updateWatchers(path: Path, type: HostWatchEventType): void; - // (undocumented) - watch(path: Path, options?: HostWatchOptions): Observable | null; - // (undocumented) - protected _watch(path: Path, options?: HostWatchOptions): Observable; - // (undocumented) - write(path: Path, content: FileBuffer): Observable; - protected _write(path: Path, content: FileBuffer): void; -} - -// @public (undocumented) -interface SimpleMemoryHostStats { - // (undocumented) - readonly content: FileBuffer | null; -} - -// @public -class SimpleScheduler implements Scheduler { - constructor(_jobRegistry: Registry, _schemaRegistry?: schema.SchemaRegistry); - getDescription(name: JobName): Observable; - has(name: JobName): Observable; - // (undocumented) - protected _jobRegistry: Registry; - pause(): () => void; - schedule(name: JobName, argument: A, options?: ScheduleJobOptions): Job; - // (undocumented) - protected _scheduleJob(name: JobName, argument: A, options: ScheduleJobOptions, waitable: Observable): Job; - // (undocumented) - protected _schemaRegistry: schema.SchemaRegistry; -} - -// @public (undocumented) -interface SmartDefaultProvider { - // (undocumented) - (schema: JsonObject): T | Observable; -} - -// @public (undocumented) -type Stats = T & { - isFile(): boolean; - isDirectory(): boolean; - readonly size: number; - readonly atime: Date; - readonly mtime: Date; - readonly ctime: Date; - readonly birthtime: Date; -}; - -// @public (undocumented) -namespace strategy { - // (undocumented) - type JobStrategy = (handler: JobHandler, options?: Partial>) => JobHandler; - function memoize(replayMessages?: boolean): JobStrategy; - function reuse(replayMessages?: boolean): JobStrategy; - function serialize(): JobStrategy; -} - -// @public (undocumented) -function stringToFileBuffer(str: string): FileBuffer; - -// @public -class SyncDelegateHost { - constructor(_delegate: Host); - // (undocumented) - get capabilities(): HostCapabilities; - // (undocumented) - get delegate(): Host; - // (undocumented) - protected _delegate: Host; - // (undocumented) - delete(path: Path): void; - // (undocumented) - protected _doSyncCall(observable: Observable): ResultT; - // (undocumented) - exists(path: Path): boolean; - // (undocumented) - isDirectory(path: Path): boolean; - // (undocumented) - isFile(path: Path): boolean; - // (undocumented) - list(path: Path): PathFragment[]; - // (undocumented) - read(path: Path): FileBuffer; - // (undocumented) - rename(from: Path, to: Path): void; - // (undocumented) - stat(path: Path): Stats | null; + stat(path: Path): Observable>; // (undocumented) - watch(path: Path, options?: HostWatchOptions): Observable | null; + watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable | null; // (undocumented) - write(path: Path, content: FileBufferLike): void; + write(path: Path, content: virtualFs.FileBuffer): Observable; } // @public (undocumented) -interface SyncHostHandler { - // (undocumented) - delete(path: Path): void; - // (undocumented) - exists(path: Path): boolean; - // (undocumented) - isDirectory(path: Path): boolean; - // (undocumented) - isFile(path: Path): boolean; - // (undocumented) - list(path: Path): PathFragment[]; - // (undocumented) - read(path: Path): FileBuffer; - // (undocumented) - rename(from: Path, to: Path): void; - // (undocumented) - stat(path: Path): Stats | null; +class NodeModuleJobRegistry implements experimental_2.jobs.Registry { + get(name: experimental_2.jobs.JobName): Observable | null>; // (undocumented) - write(path: Path, content: FileBufferLike): void; -} - -// @public (undocumented) -class SynchronousDelegateExpectedException extends BaseException { - constructor(); + protected _resolve(name: string): string | null; } // @public (undocumented) -namespace test { - // (undocumented) - class TestHost extends SimpleMemoryHost { - // (undocumented) - $exists(path: string): boolean; - // (undocumented) - $isDirectory(path: string): boolean; - // (undocumented) - $isFile(path: string): boolean; - // (undocumented) - $list(path: string): PathFragment[]; - // (undocumented) - $read(path: string): string; - // (undocumented) - $write(path: string, content: string): void; - constructor(map?: { - [path: string]: string; - }); - // (undocumented) - clearRecords(): void; - // (undocumented) - clone(): TestHost; - // (undocumented) - protected _delete(path: Path): void; - // (undocumented) - protected _exists(path: Path): boolean; - // (undocumented) - get files(): Path[]; - // (undocumented) - protected _isDirectory(path: Path): boolean; - // (undocumented) - protected _isFile(path: Path): boolean; - // (undocumented) - protected _list(path: Path): PathFragment[]; - // (undocumented) - protected _read(path: Path): ArrayBuffer; - // (undocumented) - get records(): TestLogRecord[]; - // (undocumented) - protected _records: TestLogRecord[]; - // (undocumented) - protected _rename(from: Path, to: Path): void; - // (undocumented) - protected _stat(path: Path): Stats | null; - // (undocumented) - get sync(): SyncDelegateHost<{}>; - // (undocumented) - protected _sync: SyncDelegateHost<{}> | null; - // (undocumented) - protected _watch(path: Path, options?: HostWatchOptions): Observable; - // (undocumented) - protected _write(path: Path, content: FileBuffer): void; - } +export interface ProcessOutput { // (undocumented) - type TestLogRecord = { - kind: 'write' | 'read' | 'delete' | 'list' | 'exists' | 'isDirectory' | 'isFile' | 'stat' | 'watch'; - path: Path; - } | { - kind: 'rename'; - from: Path; - to: Path; - }; -} - -// @public (undocumented) -class TransformLogger extends Logger { - constructor(name: string, transform: (stream: Observable) => Observable, parent?: Logger | null); -} - -declare namespace transforms { - export { - addUndefinedDefaults - } + write(buffer: string | Buffer): boolean; } -// @public (undocumented) -type UriHandler = (uri: string) => Observable | Promise | null | undefined; - -// @public -function visitJson(json: JsonValue, visitor: JsonVisitor, schema?: JsonSchema, refResolver?: ReferenceResolver, context?: ContextT): Observable; - -// @public (undocumented) -function visitJsonSchema(schema: JsonSchema, visitor: JsonSchemaVisitor): void; - // (No @packageDocumentation comment for this package) ```