arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Package Lifecycle

hashtag
preInstall

Announced prior to installing a package. If a package has additional dependencies to install, each of them will fire this interception point.

interceptData

  • installArgs - Struct containing the following keys used in installation of the package.

    • ID - The ID of the package to install

    • directory - Directory to install to. May be null, if none supplied.

    • save

hashtag
onInstall

Announced while a package is being installed, after the package endpoint and installation directory has been resolved but before the actual installation occurs. This allows you to override things like the installation directory based on package type. Any values updated in the interceptData struct will override what the install command uses.

interceptData

  • installArgs - Same as preInstall above

  • installDirectory - Directory that the package will be installed in

hashtag
postInstall

Announced after an installation is complete. If a package has additional dependencies to install, each of them will fire this interception point. This fires even if an install is skipped due to an existing package that satisfies the dependencies, or if the package is already installed.

interceptData

  • installArgs - Same as preInstall above

hashtag
preUninstall

Announced before the uninstallation of a package.

interceptData

  • uninstallArgs - Struct containing the following keys used in removal of the package

    • ID - ID of the package to uninstall

hashtag
postUninstall

Announced after the uninstallation of a package.

interceptData

  • uninstallArgs - Same as preUninstall above

hashtag
preVersion

Announced before the new version is set in the package.

interceptData

  • versionArgs - A struct containing the following keys:

    • version - The new version about to be set

hashtag
postVersion

Announced after the new version is set in the package but before the Git repo is tagged.

interceptData

  • versionArgs - Same as preVersion above.

hashtag
onRelease

Announced after a new version is set using the bump command and after the Git repo is tagged.

interceptData

  • directory - The working directory of the package

  • version - The new version about was set

hashtag
prePublish

Announced prior to publishing a package to an endpoint

interceptData

  • publishArgs - A struct containing the following keys:

    • endpointName - The name of the endpoint being published to

hashtag
postPublish

Announced after publishing a package to an endpoint

interceptData

  • publishArgs - Same as prePublish above.

  • boxJSON - Same as prePublish above.

Announced prior to unpublishing a package from an endpoint

interceptData

  • unpublishArgs - A struct containing the following keys:

    • endpointName - The name of the endpoint being published to

hashtag
postUnpublish

Announced after unpublishing a package from an endpoint

interceptData

  • unpublishArgs - Same as preUnpublish above.

  • boxJSON - Same as preUnpublish above.

- Flag to save box.json dependency
  • saveDev - Flag to save box.json dev dependency

  • production - Flag to perform a production install

  • currentWorkingDirectory - Original working directory that requested installation

  • verbose - Flag to print verbose output

  • force - Flag to force installation

  • packagePathRequestingInstallation - Path to package requesting installing. This climbs the folders structure for nested dependencies.

  • containerBoxJSON - A struct containing the box.json of the page requesting the installation
  • artifactDescriptor - A struct containing the box.json of the package artifcat about to be installed

  • artifactPath - The folder containing the unzipped artifact, ready to be installed.

  • ignorePatterns - An array of file globbing patterns to ignore on installation

  • endpointData - A struct containing the following keys.

    • endpointName - The name of the endpoint. i.e. "forgebox" or "HTTP"

    • package - The name of the package. i.e. "cborm" or "coldbox"

    • ID - The canonical ID of the endpoint. i.e. "forgebox:coldbox" or "github:user/repo"

    • endpoint - The instance of the endpoint CFC that implements IEndpoint.

  • directory - The directory to be uninstalled from (used to find box.json)
  • save - Whether to update box.json

  • currentWorkingDirectory - Path to package requesting removal . This climbs the folders structure for nested dependencies.

  • tagVersion - Boolean that determines whether to tag a Git repo
  • message - Commit message to use when tagging Git repo

  • directory - The working directory of the package

  • force - If true, tag a Git repo even if it isn't clean

  • directory - The directory that the package lives in
  • boxJSON - A struct containing the defaulted box.json properties for the package

  • preUnpublish
    directory - The directory that the package lives in
  • version - The version being unpublished

  • force - Boolean to skip the interactive prompt

  • boxJSON - A struct containing the defaulted box.json properties for the package