Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Installer

Hierarchy

  • Installer

Implemented by

Methods

attachCustomData

  • attachCustomData(customData: unknown): 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: unknown

    Returns void

attachExternalDependents

  • attachExternalDependents(locator: Locator, dependentPaths: Array<PortablePath>): Promise<void>
  • 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.

    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

  • attachInternalDependencies(locator: Locator, dependencies: Array<[]>): Promise<void>
  • Link a package and its internal (same-linker) dependencies.

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

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

    Parameters

    • locator: Locator

      The package itself

    • dependencies: Array<[]>

      The package dependencies

    Returns Promise<void>

finalizeInstall

getCustomDataKey

  • getCustomDataKey(): string
  • Return an arbitrary key.

    This key will be used to save and restore the installer's custom data. You typically will want to return the installer's name, but you can be fancy and send a stringified JSON payload that include the cache version, etc.

    This key will be used to save and restore the installer's custom data. You typically will want to return the installer's name, but you can be fancy and send a stringified JSON payload that include the cache version, etc.

    Returns string

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.

    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

    • pkg: Package

      The package being installed

    • fetchResult: FetchResult

      The fetched information about the package

    Returns Promise<InstallStatus>

Generated using TypeDoc