The Zowe SDK Core package contains functionality that is shared across all other SDK packages, such as
Important! You must install the Core package to satisfy the peer dependency requirement for all other SDK packages.
The following libraries are included in this package:
apiml - Defines the
Services class, which facilitates managing services hosted by the Zowe API Mediation Layer. It defines methods to load API ML config data for installed CLI plug-ins, obtain data from the API ML services endpoint, and convert this data to a config JSON file.
auth - Contains the
Logout classes, which let you handle login and logout from the Zowe API Mediation Layer (or other token-based authentication services). Use the functions
Logout.apimlLogout to store a web token in a local "base profile", which enables a secure connection to the server.
rest - Defines the
ZosmfRestClient class, which lets you access z/OSMF REST APIs and is an extension of the Imperative CLI Framework
RestClient class. It provides convenience methods, such as
processError, that can be used for any z/OSMF request.
utils - Contains miscellaneous utility methods, such as
ProfileUtils.loadDefaultProfile, which automatically loads the username, host, port, etc... that is defined in your default profile configuration. To learn about all available utilities, refer to the comments in the
core/utils source code.
Execute multiple promises in a pool with a maximum number of promises executing at once
limit of how many promises should execute at once
array of objects to convert to promises with iteratorFn
the function that turns an entry in the array into a promise
Loads default z/OSMF profile. The profile must have already been created using Zowe CLI, and not rely on base profiles
The name of the profile type
Whether or not to merge with the base profile
Produces formatted context of a given error in the specified location of the contents
NOTE: The lineIndex is zero-based indexed
Indicates the contents or the file path to the file containing the contents to get the error from
Zero-basd indexed location of the error to be printed
Few lines (separated by \n) containing error context
Retrieves the Zowe CLI home directory. In the situation Imperative has not initialized it we mock a default value.
Adds padding in case you want a longer string.
string to add the padding to
final length of the padded string
Utility function to read complete standard in contents from a handler Can be awaited from async methods
This is a simple sleep function to help when waiting for a certain period of time before continuing.
Resolves after the specified time is up.
Trims a given line based on the terminal's width. It also replaces tabs with spaces.
string to be trimmed
Error message that no session was supplied.
Error message that no z/OSMF version parameter string was supplied.
Generated using TypeDoc