Skip to main content

Macos/pkg

@hivemq/macos/pkgv2026.05.20.61· 3d agoMODELS
01README

Full-lifecycle handling of macOS installer packages (.pkg) by wrapping the native Apple toolchain. A model instance represents one .pkg file. Methods either produce it — build (pkgbuild), distribution (productbuild), sign (productsign) — or operate on it: verify (pkgutil --check-signature), assess (spctl Gatekeeper), info (size, signature, payload files), expand (pkgutil --expand-full), and install (installer -pkg -target). macOS-only: the underlying tools ship only with macOS, so on any other host the first tool invocation fails with a clear "requires macOS" message.

02Models1
@hivemq/macos/pkgv2026.05.20.1macos_pkg/macos_pkg.ts

Global Arguments

ArgumentTypeDescription
pkgPathstringAbsolute path to the .pkg file this instance represents — the output of
fn build(root: string, identifier: string, version: string, installLocation?: string, scripts?: string, ownership?: enum, signIdentity?: string)
Build a component package from a payload root with `pkgbuild`.
ArgumentTypeDescription
rootstringPayload root directory to package.
identifierstringPackage identifier, e.g. com.example.tool.
versionstringPackage version string.
installLocation?stringInstall location prefix (--install-location), e.g. /usr/local.
scripts?stringDirectory of preinstall/postinstall scripts (--scripts).
ownership?enumFile ownership policy (--ownership).
signIdentity?stringDeveloper ID Installer identity to sign with (--sign).
fn distribution(distributionFile?: string, packages?: array, packagePath?: string, resources?: string, signIdentity?: string)
Build a distribution (product) archive with `productbuild`. Provide
ArgumentTypeDescription
distributionFile?stringPath to a distribution definition XML (--distribution).
packages?arrayComponent .pkg paths. When distributionFile is omitted these are
packagePath?stringDirectory searched for referenced component packages (--package-path).
resources?stringResources directory for the distribution (--resources).
signIdentity?stringDeveloper ID Installer identity to sign with (--sign).
fn sign(identity: string, inputPath?: string, keychain?: string)
Sign a package with `productsign` using a Developer ID Installer
ArgumentTypeDescription
identitystringSigning identity (Developer ID Installer common name or SHA-1).
inputPath?stringUnsigned input package. Defaults to this instance's pkgPath.
keychain?stringKeychain to search for the identity (--keychain).
fn verify()
Verify the package signature with `pkgutil --check-signature`.
fn assess()
Run a Gatekeeper assessment with `spctl --assess` (install type).
fn info()
Inspect the package: size, signature status, and payload file list.
fn expand(destination: string)
Expand the package into a directory with `pkgutil --expand-full`.
ArgumentTypeDescription
destinationstringTarget directory. Must not already exist (pkgutil refuses to overwrite).
fn install(target: string)
Install the package with `installer -pkg ... -target`. Installing to
ArgumentTypeDescription
targetstringInstall target (-target). Defaults to the boot volume `/`.

Resources

build(infinite)— Result of a build/distribution/sign operation
signature(infinite)— Signature verification result (pkgutil --check-signature)
assessment(infinite)— Gatekeeper assessment result (spctl --assess)
info(infinite)— Inspection summary of the package
expansion(infinite)— Result of expanding the package to a directory
install(infinite)— Result of installing the package
03Stats
B
83 / 100
Downloads
0
Archive size
16.7 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository0/2missing
04Platforms
05Labels