Skip to main content

PnpInstaller

Implements

Index

Constructors

constructor

Methods

attachCustomData

  • attachCustomData(customData: any): void
  • Only called if the installer has a custom data key matching one currently stored. Will be called with whatever finalizeInstall returned in its customData field.


    Parameters

    • customData: any

    Returns void

attachExternalDependents

  • Link a package to the location of the external packages that depend on it (only the location is available, since two linkers should be generic enough to not have to make custom integrations).

    Will never be called for packages supported by the same linker (they'll be linked through the attachInternalDependencies hook instead).

    This function is guaranteed to be called for all packages before the install is finalized.


    Parameters

    Returns Promise<void>

attachInternalDependencies

  • Link a package and its internal (same-linker) dependencies.

    This function is guaranteed to be called for all packages before the install is finalized.


    Parameters

    Returns Promise<void>

finalizeInstall

  • finalizeInstall(): Promise<undefined | { customData: { store: Map<LocatorHash, { manifest: { preferUnplugged: null | boolean; scripts: Map<string, string>; type: null | string }; misc: { extractHint: boolean; hasBindingGyp: boolean } }> } }>
  • Finalize the install by writing miscellaneous files to the disk.


    Returns Promise<undefined | { customData: { store: Map<LocatorHash, { manifest: { preferUnplugged: null | boolean; scripts: Map<string, string>; type: null | string }; misc: { extractHint: boolean; hasBindingGyp: boolean } }> } }>

finalizeInstallWithPnp

  • finalizeInstallWithPnp(pnpSettings: PnpSettings): Promise<void>
  • Parameters

    Returns Promise<void>

installPackage

  • Install a package on the disk.

    Should return null if the package has no install steps, or an object describing the various scripts that need to be run otherwise.

    Note that this function isn't called in any specific order. In particular, this means that the order in which this function is called will not necessarily match the order in which the packages will be built.

    This function is guaranteed to be called for all packages before the dependencies start to be attached.


    Parameters

    Returns Promise<{ buildRequest: null | BuildRequest; packageLocation: PortablePath }>

transformPnpSettings

  • transformPnpSettings(pnpSettings: PnpSettings): Promise<void>
  • Parameters

    Returns Promise<void>