Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@mongosh/browser-repl
Advanced tools
React Browser component for Mongo Shell
import { Shell } from 'mongosh-browser-repl';
export () => {
return <Shell runtime={runtime} />;
}
Uses an iframe window as sandbox for code execution. NOTE: the execution is not really sandboxed, the top window is accessible.
import { IframeRuntime } from 'mongosh-browser-repl';
const runtime = new IframeRuntime(serviceProvider);
<Shell />
Shell is a React component with the following properties:
runtime: Runtime
: The runtime used to evaluate code.onOutputChanged?: (output: readonly ShellOutputEntry[]) => void
: A function called each time the output changes with an array of ShellOutputEntryes
.onHistoryChanged?: (history: readonly string[]) => void
: A function called each time the history changes with an array of history entries ordered from the most recent to the oldest entry.redactInfo?: boolean
: If set, the shell will omit or redact entries containing sensitive info from history. Defaults to false
.maxOutputLength?: number
: The maxiumum number of lines to keep in the output. Defaults to 1000
.maxHistoryLength?: number
: The maxiumum number of lines to keep in the history. Defaults to 1000
.initialOutput?: readonly ShellOutputEntry[]
: An array of entries to be displayed in the output area. Can be used to restore the output between sessions, or to setup a greeting message. Note: new entries will not be appended to the array.initialHistory?: readonly string[]
: An array of history entries to prepopulate the history.
Can be used to restore the history between sessions. Entries must be ordered from the most recent to the oldest. Note: new entries will not be appended to the array.ShellOutputEntry
An object representing an entry in the shell output, with the following properties:
format: 'input' | 'output' | 'error'
: the type of the entrytype?: string
: the shell api type if the entry value is a shell api object.value: any
: the value that has to be rendered in output.FAQs
Browser presentation component for Mongo Shell
The npm package @mongosh/browser-repl receives a total of 6,359 weekly downloads. As such, @mongosh/browser-repl popularity was classified as popular.
We found that @mongosh/browser-repl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.