Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"color: black"
);
spawn.stdout?.on("data", data => {
const text = data.toString();
logStd(text);
observer.next(actions.kernelRawStdout({ text, kernelRef }));
});
spawn.stderr?.on("data", data => {
const text = data.toString();
logStd(text);
observer.next(actions.kernelRawStderr({ text, kernelRef }));
});
// do dependency injection of jmp to make it match our ABI version of node
const channels = await createMainChannel(
config,
undefined,
undefined,
undefined,
jmp
);
observer.next(
actions.setKernelspecInfo({
contentRef,
kernelInfo: kernelSpec
})
);
const kernel: LocalKernelProps = {
info: null,
type: "zeromq",
"color: black"
);
spawn.stdout.on("data", data => {
const text = data.toString();
logStd(text);
observer.next(actions.kernelRawStdout({ text, kernelRef }));
});
spawn.stderr.on("data", data => {
const text = data.toString();
logStd(text);
observer.next(actions.kernelRawStderr({ text, kernelRef }));
});
// do dependency injection of jmp to make it match our ABI version of node
const channels = await createMainChannel(
config,
undefined,
undefined,
undefined,
jmp
);
observer.next(
actions.setKernelspecInfo({
contentRef,
kernelInfo: { name: kernelSpec.name, ...kernelSpec.spec }
})
);
const kernel: LocalKernelProps = {
info: null,
type: "zeromq",
);
const runningKernel: execa.ExecaChildProcess = execa(
argv[0],
argv.slice(1),
fullSpawnOptions
);
if (fullSpawnOptions.cleanupConnectionFile !== false) {
runningKernel.on("exit", (code, signal) => cleanup(connectionFile));
runningKernel.on("error", error => cleanup(connectionFile));
}
const channels: Subject<
JupyterMessage
> = await createMainChannel(config);
return {
channels,
config,
connectionFile,
kernelSpec,
spawn: runningKernel
};
}
mergeMap(kernel => from(createMainChannel(kernel.config))),
tap(mainChannel => mainChannel.next(executeRequest(imports()))),