
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
boot-drive
Advanced tools
Run an app from a Hyperdrive or Localdrive
npm i boot-drive
First prepare the drive
const Boot = require('@holepunchto/boot-drive')
const boot = new Boot(drive)
await boot.warmup()
Then you can start it
const exported = boot.start()
console.log(exported)
Or you could just bundle it
const source = boot.stringify()
console.log(source) // eval(source) or save it into a file
const boot = new Boot(drive, [options])Creates a bootloader to run the drive.
Available options:
{
entrypoint: 'index.js', // Main file to be run at start
cwd: '.', // Working directory for `prebuilds/`
absolutePrebuilds: false, // If `true`, will use `cwd` for the stringified prebuilds path
cache: {}, // Used at runtime for `require.cache`, you can share it between boots
dependencies: new Map(), // Used in `warmup()`, you can share linker deps between boots
additionalBuiltins: [], // For adding modules to be imported by Node's native `require`
builtinsMap: {}, // mappings of core builtins, e.g. fs -> bare-fs
sourceOverwrites: {}, // Key/Value object where you can map filenames to source code
host: require.addon.host || process.platform + '-' + process.arch , // used for prebuilds sub-folder
platform: process.platform, // legacy
arch: process.arch // legacy
}
When running a drive, there is require.builtinRequire provided by the JS runtime itself.
await boot.warmup([entrypoint])Prepares the drive.
If entrypoint is not set, then it will try /package.json main property.
If it fails to find an entrypoint then it will use index.js by default.
const exports = boot.start([entrypoint])Runs the drive.
absolutePrebuilds is always forced to be true by default when using boot.start().
const source = boot.stringify([entrypoint])Bundles and stringifies the dependencies and source code of the drive.
Without absolutePrebuilds native modules has to always be in ./prebuilds/ related to the source file.
Apache-2.0
FAQs
Run an app from a Hyperdrive or Localdrive
The npm package boot-drive receives a total of 16 weekly downloads. As such, boot-drive popularity was classified as not popular.
We found that boot-drive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.