Macos/pkg
@hivemq/macos/pkgv2026.05.20.61
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.
02Models
@hivemq/macos/pkgv2026.05.20.1macos_pkg/macos_pkg.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| pkgPath | string | Absolute 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`.
| Argument | Type | Description |
|---|---|---|
| root | string | Payload root directory to package. |
| identifier | string | Package identifier, e.g. com.example.tool. |
| version | string | Package version string. |
| installLocation? | string | Install location prefix (--install-location), e.g. /usr/local. |
| scripts? | string | Directory of preinstall/postinstall scripts (--scripts). |
| ownership? | enum | File ownership policy (--ownership). |
| signIdentity? | string | Developer 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
| Argument | Type | Description |
|---|---|---|
| distributionFile? | string | Path to a distribution definition XML (--distribution). |
| packages? | array | Component .pkg paths. When distributionFile is omitted these are |
| packagePath? | string | Directory searched for referenced component packages (--package-path). |
| resources? | string | Resources directory for the distribution (--resources). |
| signIdentity? | string | Developer 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
| Argument | Type | Description |
|---|---|---|
| identity | string | Signing identity (Developer ID Installer common name or SHA-1). |
| inputPath? | string | Unsigned input package. Defaults to this instance's pkgPath. |
| keychain? | string | Keychain 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`.
| Argument | Type | Description |
|---|---|---|
| destination | string | Target directory. Must not already exist (pkgutil refuses to overwrite). |
fn install(target: string)
Install the package with `installer -pkg ... -target`. Installing to
| Argument | Type | Description |
|---|---|---|
| target | string | Install 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