在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:n-riesco/jp-kernel开源软件地址:https://github.com/n-riesco/jp-kernel开源编程语言:JavaScript 100.0%开源软件介绍:jp-kernel
Anouncements
InstallThe latest stable release is published on
npm install jp-kernel The master branch in the github repository provides the latest development version and can be installed by: git clone https://github.com/n-riesco/jp-kernel.git
cd jp-kernel
npm install UsageThe source code documentation generated using JSDoc can be found here. For real examples of usage, see the source documentation for: ContributionsFirst of all, thank you for taking the time to contribute. Please, read CONTRIBUTING.md and use the issue tracker for any contributions: support requests, bug reports, enhancement requests, pull requests, ... Next API v2The class Kernel {
constructor(config) {
this.config = config;
this.executionCount = 0;
this.session = new Session({
cwd: this.config.cwd,
parser: this.config.parser,
transpile: this.config.transpile,
});
this._init();
}
_init(initCB) {}
interrupt(interruptCB) {}
destroy(destroyCB) {}
restart(restartCB) {}
_onShellMessage(message) {}
_onControlMessage(message) {}
_onIOPubMessage(message) {}
_onHBMessage(message) {}
} class KernelV4 extends Kernel {
onStdout(data) {}
onStderr(data) {}
onShell_xxx(request) {}
} class KernelV5 extends Kernel {
onStdout(data) {}
onStderr(data) {}
onShell_xxx(request) {}
} class Config {
constructor(kernelConfig) {
this.hideUndefined = kernelConfig.hideUndefined;
this.initSession = kernelConfig.initSession;
this.initScripts = kernelConfig.initScripts;
this.kernelInfoReply = kernelConfig.kernelInfoReply;
this.protocolVersion = kernelConfig.protocolVersion;
this.connection = kernelConfig.connection;
this.parser = kernelConfig.parser;
}
} class Connection {
constructor(connectionConfig) {
this.config = connectionConfig;
this.socket = {
control: new jmp.Socket("router", scheme, key),
shell: new jmp.Socket("router", scheme, key),
iopub: new jmp.Socket("pub", scheme, key),
hb: zmq.createSocket("rep"),
};
}
connect(listeners) {}
disconnect() {}
} class Parser{
constructor() {
throw new Error("Cannot construct an abstract class");
}
getIdentifier(code, position) {
throw new Error("Not implemented");
}
validate(code) {
throw new Error("Not implemented");
}
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论