Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dmg-utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmg-utils

Util lib for DMG files.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

dmg-utils [WIP]

Util lib for DMG files.

npm libera manifesto

By now it only works on macOS.

Install

npm install dmg-utils

API

mount

declare const mount: (
  dmgPath: string,
  callback?: ((volumePath: string) => void) | undefined
) => Promise<string>

Returns mounted volume path.

unmount

declare const unmount: (
  volumePath: string,
  callback?: (() => void) | undefined
) => Promise<void>

extract

declare const extract: (dmgPath: string, destPath: string) => Promise<void>

Uses copy from fs-extra.

generateCommand

declare type Action = 'mount -nobrowse' | 'unmount'
declare type Command = `hdiutil ${Action} "${string}"`
declare const generateCommand: ({
  mount
}: {
  mount: boolean
}) => (path: string) => Command
import { generateCommand } from 'dmg-utils'

generateCommand({ mount: true })('./App.dmg')
// => 'hdiutil mount -nobrowse "./App.dmg"'

generateCommand({ mount: false })('/Volumes/App')
// => 'hdiutil unmount "/Volumes/App"'

License

MIT License © 2020 Exuanbo

Keywords

FAQs

Package last updated on 10 Feb 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc