@shopify/cli-kit
Version:
A set of utilities, interfaces, and models that are common across all the platform features
29 lines • 615 B
JavaScript
let _globalContext;
/**
* Get the global context.
*
* @returns Global context.
*/
function getGlobalContext() {
if (!_globalContext) {
_globalContext = { currentCommandId: '' };
}
return _globalContext;
}
/**
* Get the current command ID.
*
* @returns Current command ID.
*/
export function getCurrentCommandId() {
return getGlobalContext().currentCommandId;
}
/**
* Set the current command ID.
*
* @param commandId - Command ID.
*/
export function setCurrentCommandId(commandId) {
getGlobalContext().currentCommandId = commandId;
}
//# sourceMappingURL=global-context.js.map