@ui5/project/graph/Workspace

@ui5/project/graph/Workspace

UI5 Workspace

Constructor

new @ui5/project/graph/Workspace(options)

Source:
Parameters:
Name Type Description
options object
Properties
Name Type Description
cwd string Path to use for resolving all paths of the workspace configuration from. This should contain platform-specific path separators (i.e. must not be POSIX on non-POSIX systems)
configuration @ui5/project/graph/Workspace~Configuration Workspace configuration

Methods

(async) getModuleByNodeId(nodeId) → {Promise.<(@ui5/project/graph/Module|undefined)>}

Description:
  • For a given node id (e.g. the value of the name property in a package.json), returns a [Module]{ @ui5/project/graph/Module} instance or undefined depending on whether the module has been found in the configured dependency-management resolution paths of this workspace and contains at least one project or extension
Source:
Parameters:
Name Type Description
nodeId string Node ID of the module
Returns:
Module instance, or undefined if none is found
Type
Promise.<(@ui5/project/graph/Module|undefined)>

(async) getModuleByProjectName(projectName) → {Promise.<(@ui5/project/graph/Module|undefined)>}

Description:
  • For a given project name (e.g. the value of the metadata.name property in a ui5.yaml), returns a [Module]{ @ui5/project/graph/Module} instance or undefined depending on whether the project has been found in the configured dependency-management resolution paths of this workspace
Source:
Parameters:
Name Type Description
projectName string Name of the project
Returns:
Module instance, or undefined if none is found
Type
Promise.<(@ui5/project/graph/Module|undefined)>

(async) getModules() → {Promise.<Array.<@ui5/project/graph/Module>>}

Description:
  • Returns an array of [Module]{ @ui5/project/graph/Module} instances found in the configured dependency-management resolution paths of this workspace, sorted by module ID.
Source:
Returns:
Array of Module instances sorted by module ID
Type
Promise.<Array.<@ui5/project/graph/Module>>

getName() → {string}

Description:
  • Get the name of this workspace
Source:
Returns:
Name of this workspace configuration
Type
string

Type Definitions

Configuration

Description:
Source:
Properties:
Name Type Description
node.specVersion string Workspace Specification Version
node.metadata object
Properties
Name Type Description
name string Name of the workspace configuration
node.dependencyManagement object
Properties
Name Type Description
resolutions Array.<@ui5/project/graph/Workspace~DependencyManagementResolutions>
Workspace configuration. For details, refer to the UI5 Workspaces documentation
Type:
  • object

DependencyManagementResolution

Description:
  • A resolution entry for the dependency management section of the workspace configuration
Source:
Properties:
Name Type Description
path string Relative path to use for the workspace resolution process
A resolution entry for the dependency management section of the workspace configuration
Type:
  • object