Skip to content

@ui5/project/graph/Workspace

@ui5/project/graph/Workspace

UI5 Workspace

Constructor

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

Source: project/lib/graph/Workspace.js, line 42

Parameters:
NameTypeDescription
optionsobject
Properties:
NameTypeDescription
cwdstringPath 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~ConfigurationWorkspace 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: project/lib/graph/Workspace.js, line 118

Parameters:
NameTypeDescription
nodeIdstringNode 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: project/lib/graph/Workspace.js, line 102

Parameters:
NameTypeDescription
projectNamestringName 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: project/lib/graph/Workspace.js, line 86

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: project/lib/graph/Workspace.js, line 74

Returns:

Name of this workspace configuration

Type: string

Type Definitions

Configuration

Description: Workspace configuration. For details, refer to the UI5 Workspaces documentation

Source: project/lib/graph/Workspace.js, line 14

Properties:
NameTypeDescription
node.specVersionstringWorkspace Specification Version
node.metadataobject
Properties
NameTypeDescription
namestringName of the workspace configuration
node.dependencyManagementobject
Properties
NameTypeDescription
resolutionsArray<@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: project/lib/graph/Workspace.js, line 27

Properties:
NameTypeDescription
pathstringRelative path to use for the workspace resolution process

A resolution entry for the dependency management section of the workspace configuration

Type:
  • object