UNPKG

@rushstack/heft

Version:

Build all your JavaScript projects the same way: A way that works.

25 lines 1.43 kB
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. import * as path from 'node:path'; export class HeftLifecycleSession { constructor(options) { this._options = options; this.logger = options.logger; this.metricsCollector = options.metricsCollector; this.hooks = options.lifecycleHooks; this.parameters = options.lifecycleParameters; this.debug = options.debug; // Guranteed to be unique since phases are forbidden from using the name 'lifecycle' // and lifecycle plugin names are enforced to be unique. const uniquePluginFolderName = `lifecycle.${options.pluginDefinition.pluginName}`; // <projectFolder>/temp/<phaseName>.<taskName> this.tempFolderPath = path.join(options.heftConfiguration.tempFolderPath, uniquePluginFolderName); this._pluginHost = options.pluginHost; } requestAccessToPluginByName(pluginToAccessPackage, pluginToAccessName, pluginApply) { const { pluginPackageName, pluginName } = this._options.pluginDefinition; const pluginHookName = this._pluginHost.getPluginHookName(pluginPackageName, pluginName); this._pluginHost.requestAccessToPluginByName(pluginHookName, pluginToAccessPackage, pluginToAccessName, pluginApply); } } //# sourceMappingURL=HeftLifecycleSession.js.map