sharec-core
Version:
[](https://github.com/lamartire/sharec/actions) [](https://npmjs.com/sharec)  • 1.23 kB
TypeScript
export type FlowContext = {
/**
* Target project path
*/
targetPath: string
/**
* Different options from CLI
*/
options: import('..').CliOptions
/**
* `package.json `from `targetPath`
*/
targetPackage?: any
/**
* Runtime configuration including hooks
*/
runtimeConfig?: import('..').RuntimeConfig
/**
* Original configs from upcoming package
*/
configs: import('..').ConfigPackage[]
/**
* Processed configs from upcoming package
*/
mergedConfigs?: any
/**
* Previously installed configuration
*/
cache?: any
}
export type FlowStep = (
context: import('..').FlowContext,
semaphore?: import('..').Semaphore,
) => Promise<import('..').FlowContext>
export type Semaphore = {
/**
* Starts the spinner
*/
start: (text: string) => void
/**
* Stops the spinner with success
*/
success: (text: string) => void
/**
* Stops the spinner with warning
*/
warn: (text: string) => void
/**
* Stops the spinner with failure, but doesn't terminate the program
*/
error: (text: string) => void
/**
* Stops the spinner with failure and terminates the program
*/
fail: (text: string) => void
}
export const commonFlow: Function