Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cellMessages.pipe(
outputs() as any,
map((output: OnDiskOutput) =>
actions.appendOutput({ id, output, contentRef })
)
),
// clear_output display message
cellMessages.pipe(
ofMessageType("clear_output") as any,
mapTo(actions.clearOutputs({ id, contentRef }))
),
// Prompt the user for input
cellMessages.pipe(
inputRequests() as any,
map((inputRequest: InputRequestMessage) => {
return actions.promptInputRequest({
id,
contentRef,
prompt: inputRequest.prompt,
password: inputRequest.password
});
})
)
);
// On subscription, send the message
return Observable.create((observer: Observer) => {
const subscription = cellAction$.subscribe(observer);
channels.next(executeRequest);
return subscription;
cellMessages.pipe(
outputs() as any,
map((output: OnDiskOutput) =>
actions.appendOutput({ id, output, contentRef })
)
),
// clear_output display message
cellMessages.pipe(
ofMessageType("clear_output") as any,
mapTo(actions.clearOutputs({ id, contentRef }))
),
// Prompt the user for input
cellMessages.pipe(
inputRequests() as any,
map((inputRequest: InputRequestMessage) => {
return actions.promptInputRequest({
id,
contentRef,
prompt: inputRequest.prompt,
password: inputRequest.password
});
})
)
);
// On subscription, send the message
return Observable.create((observer: Observer) => {
const subscription = cellAction$.subscribe(observer);
channels.next(executeRequest);
return subscription;