@storm-software/workspace-tools
Version:
Tools for managing a Storm workspace, including various Nx generators and executors for common development tasks.
50 lines (47 loc) • 1.6 kB
JavaScript
import {
getWorkspaceConfig
} from "./chunk-4PKTZSV2.mjs";
// src/release/js-version-actions.ts
import JsVersionActions from "@nx/js/src/release/version-actions.js";
var StormJsVersionActions = class extends JsVersionActions {
/**
* The Storm workspace configuration object, which is loaded from the `storm-workspace.json` file.
*
* @remarks
* This member variable is populated during the {@link init} method.
*/
workspaceConfig = null;
constructor(releaseGroup, projectGraphNode, finalConfigForProject) {
super(releaseGroup, projectGraphNode, finalConfigForProject);
}
/**
* Asynchronous initialization of the version actions and resolution of manifest paths.
*
* @remarks
* This does NOT validate that manifest files exist - that happens later in validate().
*
* @params tree - The file system tree to read from.
*/
async init(tree) {
this.workspaceConfig = await getWorkspaceConfig();
return super.init(tree);
}
/**
* Reads the current version of a package from the registry.
*
* @param tree - The file system tree to read from.
* @param currentVersionResolverMetadata - Metadata for resolving the current version.
* @returns The current version and log text.
*/
readCurrentVersionFromRegistry(tree, currentVersionResolverMetadata) {
currentVersionResolverMetadata ??= {};
currentVersionResolverMetadata.registry ??= this.workspaceConfig?.registry?.npm;
return super.readCurrentVersionFromRegistry(
tree,
currentVersionResolverMetadata
);
}
};
export {
StormJsVersionActions
};