Constructor for Config class. Don't use this directly. Await Config.load
instead.
Options to control how Config class behaves
Currently active layer whose properties will be manipulated
Cached version of Config APIs
App name used in config filenames (e.g., my_cli.config.json) It could be an absolute path, we recommend always using the getter method
Directory where global config files are located. Defaults to ~/.appName
.
List to store each of the config layers enumerated in layers
enum
Directory where project config files are located. Defaults to working directory.
Secure properties object stored in credential vault
Vault object with methods for loading and saving secure credentials
Options to control how Config class behaves
The trailing portion of a shared config file name
The trailing portion of a user-specific config file name
Access the config API for manipulating profiles, plugins, layers, and secure values.
App name used in config filenames (e.g., my_cli.config.json)
Filename used for config JSONC files
True if any config layers exist on disk, otherwise false.
List of all config layers. Returns a clone to prevent accidental edits of the original object.
List of properties across all config layers. Returns the original object, not a clone, so use with caution. This is used in internal code because cloning a JSONC object is slow.
The properties object with secure values masked.
List of absolute file paths for all config layers.
List of properties across all config layers. Returns a clone to prevent accidental edits of the original object.
Filename used for config schema JSON files
Filename used for user config JSONC files
Unset value of a property in the active config layer.
Property path
Include secure: false
to preserve property in secure array
Find the layer with the specified user and global properties.
True specifies that you want the user layer.
True specifies that you want the layer at the global level.
The desired layer object. Null if no layer matches.
Form the path name of the team config file to display in messages. Always return the team name (not the user name). If the a team configuration is active, return the full path to the config file.
a map containing option properties. Currently, the only property supported is a boolean named addPath. {addPath: true | false}
The path (if requested) and file name of the team config file.
Schema file path used by the active layer
Obtain the layer object that is currently active.
The active layer object
Check if a layer exists in the given path
The directory to which you want to look for the layer.
Merge the properties from multiple layers into a single Config object.
Options to control how config layers are merged
The resulting Config object
Get absolute file path for a config layer. For project config files, We search up from our current directory and ignore the Zowe hone directory (in case our current directory is under Zowe home.). For golbal config files we only retrieve config files from the Zowe home directory.
Enum value for config layer
Obtain the profiles object for a specified layer object.
Options to control how config layers are merged
The resulting profile object
Reload config files from disk in the current project directory.
Options to control how Config class behaves
Save config files to disk and store secure properties in vault.
Specify true to save all config layers instead of only the active one
Set value of a property in the active config layer. TODO: more validation
Property path
Property value
Optional parameters to change behavior
parseString
- If true, strings will be converted to a more specific type like boolean or number when possible
secure
- If true, the property will be stored securely. If false, the property will be stored in plain text.
Set the $schema value at the top of the config JSONC. Also save the schema to disk if an object is provided.
The URI of JSON schema, or a schema object to use
Return a Config interface with required fields initialized as empty.
Load config files from disk and secure properties from vault.
App name used in config filenames (e.g., my_cli.config.json)
Options to control how Config class behaves
Search up the directory tree for the directory containing the specified config file.
Contains the name of the desired config file
Contains an array of directory names to be ignored (skipped) during the search.
Contains the name of the directory where the search should be started. Defaults to working directory.
The full path name to config file or null if not found.
Generated using TypeDoc
The Config class provides facilities for reading and writing team configuration files. It is used by Imperative to perform low-level operations on a team configuration. The intent is that consumer apps will not typically use the Config class, since end-users are expected to write team configuration files by directly editing them in an editor like VSCode.