UNPKG

@cocalc/project

Version:
77 lines (76 loc) 3.04 kB
/// <reference types="node" /> /// <reference types="node" /> export declare const VERSION = "5.3"; import { EventEmitter } from "events"; import { Channels } from "@nteract/messaging"; import { SyncDB } from "@cocalc/sync/editor/db/sync"; import { ExecOpts, KernelInfo, CodeExecutionEmitterInterface } from "@cocalc/frontend/jupyter/project-interface"; import { CodeExecutionEmitter } from "./execute-code"; import { JupyterKernelInterface } from "@cocalc/frontend/jupyter/project-interface"; export declare function jupyter_backend(syncdb: SyncDB, client: any): void; export declare function remove_jupyter_backend(path: string, project_id: string): Promise<void>; interface KernelParams { name: string; path: string; actions?: any; } export declare function kernel(opts: KernelParams): JupyterKernel; export declare class JupyterKernel extends EventEmitter implements JupyterKernelInterface { name: string; store: any; readonly identity: string; private stderr; private _path; private _actions?; private _state; private _directory; private _filename; private _kernel; private _kernel_info; _execute_code_queue: CodeExecutionEmitter[]; channel?: Channels; private has_ensured_running; constructor(name: any, _path: any, _actions: any); get_path(): string; private _set_state; get_state(): string; spawn(spawn_opts?: any): Promise<void>; get_spawned_kernel(): any; get_connection_file(): string | undefined; private finish_spawn; _get_kernel_info(): Promise<void>; signal(signal: string): void; close(): Promise<void>; dbg(f: string): Function; low_level_dbg(): void; private ensure_running; execute_code(opts: ExecOpts): CodeExecutionEmitterInterface; cancel_execute(id: string): void; _process_execute_code_queue(): Promise<void>; clear_execute_code_queue(): void; execute_code_now(opts: ExecOpts): Promise<object[]>; get_blob_store(): import("./jupyter-blobs-sqlite").BlobStore | undefined; process_output(content: any): void; call(msg_type: string, content?: any): Promise<any>; complete(opts: { code: any; cursor_pos: any; }): Promise<any>; introspect(opts: { code: any; cursor_pos: any; detail_level: any; }): Promise<any>; kernel_info(): Promise<KernelInfo>; save_ipynb_file(): Promise<void>; more_output(id: string): any[]; nbconvert(args: string[], timeout?: number): Promise<void>; load_attachment(path: string): Promise<string>; process_attachment(base64: any, mime: any): string | undefined; process_comm_message_from_kernel(mesg: any): void; ipywidgetsGetBuffer(model_id: string, buffer_path: string): Buffer | undefined; send_comm_message_to_kernel(msg_id: string, comm_id: string, data: any): void; } export declare function get_existing_kernel(path: string): JupyterKernel | undefined; export declare function get_kernel_by_pid(pid: number): JupyterKernel | undefined; export {};