MelosWorkspace class

A representation of a workspace. This includes its packages, configuration such as scripts and more.

Constructors

MelosWorkspace({required String name, required String path, required MelosWorkspaceConfig config, required PackageMap allPackages, required PackageMap filteredPackages, required PackageMap dependencyOverridePackages, required String? sdkPath, required MelosLogger logger})

Properties

allPackages PackageMap
All packages managed in this Melos workspace.
final
childProcessPath String?
EnvironmentVariableKey.path environment variable for child processes launched in this workspace.
latefinal
config MelosWorkspaceConfig
Configuration as defined in the "melos.yaml" file if it exists.
final
dependencyOverridePackages PackageMap
The packages specified in BootstrapCommandConfigs.dependencyOverridePaths.
final
filteredPackages PackageMap
The packages in this Melos workspace after applying filters.
final
hashCode int
The hash code for this object.
no setterinherited
ide IdeWorkspace
latefinal
isFlutterWorkspace bool
Returns true if this workspace contains ANY Flutter package.
latefinal
logger MelosLogger
final
name String
An optional name as defined in "melos.yaml". This name is used for logging purposes and also used when generating certain IDE files.
final
path String
Full file path to the location of this workspace.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sdkPath String?
Path to the Dart/Flutter SDK, if specified by the user.
final

Methods

exec(List<String> execArgs, {bool onlyOutputOnError = false}) Future<int>
Execute a command in the root of this workspace.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sdkTool(String tool) String
Returns the path to a tool from the Dart/Flutter SDK.
toString() String
A string representation of this object.
inherited
validate() → void
Validates this workspace against the environment.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromConfig(MelosWorkspaceConfig workspaceConfig, {GlobalOptions? global, PackageFilters? packageFilters, required MelosLogger logger}) Future<MelosWorkspace>
Build a MelosWorkspace from a workspace configuration.