ConfigManager class
Manages reading and writing the global config file (~/.neomage.json).
Constructors
- ConfigManager({required String configFilePath, required String cwd})
Properties
- configFilePath → String
-
Path to the global config file.
final
- cwd → String
-
Current working directory for project config resolution.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- writeCount → int
-
Get the write count for diagnostics.
no setter
Methods
-
checkHasTrustDialogAccepted(
) → bool - Check if the trust dialog has been accepted for the cwd.
-
getCurrentProjectConfig(
) → ProjectConfig - Get the current project config.
-
getGlobalConfig(
) → GlobalConfig - Get the global config, reading from disk if cache is stale.
-
invalidateCache(
) → void - Invalidate the config cache, forcing a re-read on next access.
-
isPathTrusted(
String dir) → bool - Check if a path is trusted (walks parents).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetTrustDialogAcceptedCacheForTesting(
) → void - Reset trust dialog cache for testing.
-
saveCurrentProjectConfig(
ProjectConfig updater(ProjectConfig current)) → void - Save the current project config.
-
saveGlobalConfig(
GlobalConfig updater(GlobalConfig current)) → void - Save the global config with an updater function.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- configWriteDisplayThreshold → const int
- Display threshold for write count warnings.