MelosWorkspace class

A representation of a workspace. This includes it's 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 String? sdkPath, required MelosLogger logger})

Properties

allPackages PackageMap
All packages according to MelosWorkspaceConfig.
final
canRunPubGetConcurrently bool
latefinal
childProcessPath String?
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
filteredPackages PackageMap
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
isPubspecOverridesSupported bool
latefinal
logger MelosLogger
final
melosToolPath String
Returns a string path to the 'melos_tool' directory in this workspace.
latefinal
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.
execInMelosToolPath(List<String> execArgs, {bool onlyOutputOnError = false}) Future<int>
Execute a command in the melos_tool directory of this workspace.
getDependencyGraph() Future<Map<String, Set<String>>>
Builds a dependency graph of dependencies and their dependents in 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, PackageFilter? filter, required MelosLogger logger}) Future<MelosWorkspace>
Build a MelosWorkspace from a workspace configuration.