@shopify/cli-kit
Version:
A set of utilities, interfaces, and models that are common across all the platform features
32 lines (31 loc) • 1.15 kB
TypeScript
import { PackageManager } from './node-package-manager.js';
/**
* Returns true if the current process is running in a global context.
*
* @param argv - The arguments passed to the process.
* @returns `true` if the current process is running in a global context.
*/
export declare function currentProcessIsGlobal(argv?: string[]): boolean;
/**
* Installs the global Shopify CLI, using the provided package manager.
*
* @param packageManager - The package manager to use.
*/
export declare function installGlobalShopifyCLI(packageManager: PackageManager): Promise<void>;
export interface InstallGlobalCLIPromptResult {
install: boolean;
alreadyInstalled: boolean;
}
/**
* Prompts the user to install the global CLI.
*
* @returns `true` if the user has installed the global CLI.
*/
export declare function installGlobalCLIPrompt(): Promise<InstallGlobalCLIPromptResult>;
/**
* Infers the package manager used by the global CLI.
*
* @param argv - The arguments passed to the process.
* @returns The package manager used by the global CLI.
*/
export declare function inferPackageManagerForGlobalCLI(argv?: string[]): PackageManager;