Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > SubspacesConfiguration

SubspacesConfiguration class

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

This represents the subspace configurations for a repository, based on the "subspaces.json" configuration file.

Signature:

export declare class SubspacesConfiguration 

Properties

Property

Modifiers

Type

Description

preventSelectingAllSubspaces

readonly

boolean

(BETA) This determines if selectors are required when installing and building

splitWorkspaceCompatibility

readonly

boolean

(BETA) This determines if the subspaces feature supports adding configuration files under the project folder itself

subspaceJsonFilePath

readonly

string

(BETA) The absolute path to the "subspaces.json" configuration file that was loaded to construct this object.

subspaceNames

readonly

ReadonlySet<string>

(BETA) A set of the available subspaces

subspacesEnabled

readonly

boolean

(BETA)

Methods

Method

Modifiers

Description

explainIfInvalidSubspaceName(subspaceName, splitWorkspaceCompatibility)

static

(BETA) Checks whether the provided string could be used as a subspace name. Returns undefined if the name is valid; otherwise returns an error message.

requireValidSubspaceName(subspaceName, splitWorkspaceCompatibility)

static

(BETA) Checks whether the provided string could be used as a subspace name. If not, an exception is thrown.

tryLoadFromConfigurationFile(subspaceJsonFilePath)

static

(BETA)

tryLoadFromDefaultLocation(rushConfiguration)

static

(BETA)