All files / lib/types CliOptions.d.ts

0% Statements 0/168
0% Branches 0/1
0% Functions 0/1
0% Lines 0/168

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169                                                                                                                                                                                                                                                                                                                                                 
export interface CliOptions {
    /**
     * positional arguments that specify which tasks to run
     *
     * Commands are collected as an array like this:
     *
     * ```
     * lage build test bundle
     * ```
     *
     * This will tell `lage` to execute all three commands against all the packages
     */
    command: string[];
    /**
     * number of parallel tasks that can be run at a time
     *
     * By default, this is the number of CPU cores detected by `os.cpus().length`,
     * change to any number to achieve desired concurrency.
     */
    concurrency: number;
    /**
     * Which specific packages to consider as in scope for the run
     *
     * This act as the "entry point" of the package-task graph traversal. To prevent
     * running tasks for dependent package, use the `--no-deps` flag in combination.
     *
     * You can specify multiple scoped packages like this:
     *
     * ```
     * lage build --scope foo --scope bar --scope baz
     * ```
     */
    scope: string[];
    /**
     * Scopes a list of packages, and not built their dependents (consuming packages).
     * This implies `--scope` and `--no-deps`.
     *
     * Just like the `--scope` argument, you can specify multiple packages like this:
     *
     * ```
     * lage build --to foo --to bar
     * ```
     */
    to: string[];
    /**
     * calculate which packages are in scope based on changed packages since a mergebase
     *
     * This uses the `git diff ${target_branch}...` mechanism to identify which packages
     * have changed. There is an assumption of all the input files for a package exist
     * inside their respective package folders.
     */
    since: string;
    /**
     * only run the commands, do not consider dependent tasks
     *
     * For example, if `test` depends on `build`, `lage` will always run `build` before `test`.
     *
     * You can type this `lage test --only` to skip running `build` task altogether. This is much
     * like what is the default of `lerna` or `rush`.
     */
    only: boolean;
    /**
     * default: true, --no-deps will skip dependent packages and tasks
     *
     * This has the semantic of running tasks up to what is specified in the command line
     * such as with `--scope` or `--since`
     */
    deps: boolean;
    /**
     * default: true, --no-cache will skip fetching cache or saving cache
     *
     * `lage` by default will skip tasks that it has already done recently. As long as the source file and the command called to `lage` has not changed, those packages will be skipped. Sometimes, this incremental behavior is not desired. You can override the caching behavior by using the `no-cache` argument.
     *
     * ```
     * $ lage build --no-cache
     * ```
     */
    cache: boolean;
    /**
     * --reset-cache will skip fetching cache, but will overwrite cache
     *
     * ```
     * lage --reset-cache
     * ```
     *
     * Will always run the tasks, while reseting the saved cache
     */
    resetCache: boolean;
    /** node arguments to be passed into the npm lifecycle scripts
     *
     * For example:
     *
     * To increase the amount of memory to use for the npm tasks
     * ```
     * lage --node="--max_old_space_size=8192"
     * ```
     */
    node: string[];
    /**
     * Verbose mode, turns on all logging
     *
     * `lage` by default will hide the output from successful tasks. If you want to see the
     * output as they are being generated, call `lage` with the `verbose` argument.
     *
     *  ```
     *  $ lage build --verbose
     *  ```
     */
    verbose: boolean;
    /**
     * Creates a flamegraph-profile JSON for Chromium-based devtool
     *
     * Pay attention to the output summary to find the location of the JSON file.
     */
    profile: boolean | string;
    /**
     * Ignores certain files when calculating the scope with `--since`
     *
     * Certain files might need to be changed during the preparation of a build
     * job. In that situation, `lage` can ignore those files when calculating what
     * has changed with the `--since` flag.
     */
    ignore: string[];
    /**
     * Specify whether to use the JSON Reporter to create a parsable log output
     *
     * Example: `lage --reporter json`
     */
    reporter: string;
    /**
     * Specify whether to make the console logger to group the logs per package task
     *
     * Example: `lage --grouped`
     */
    grouped: boolean;
    /**
     * Run a single command in parallel
     */
    parallel: boolean;
    /**
     * Should we try to run the task graph as much as we can even though one task has failed
     */
    continue: boolean;
    /**
     * Runs currently executing tasks to completion before exiting
     */
    safeExit: boolean;
    /**
     * A flag for the cache command only: clears all the cache in all the package folders
     */
    clear: boolean;
    /**
     * A flag for the cache command only: prunes the cache older than 30 days by default, or specify a number of days
     */
    prune: string;
    /**
     * The highest log level to report. All logs up to "info" are reported by default.
     *
     * Specifying "verbose" is equivalent to running with the `--verbose` argument.
     */
    logLevel: string;
    /**
     * Specify a custom cache key salt with this option: --cache-key xyz_build_environemnt
     */
    cacheOptions: {
        cacheKey: string;
    };
}