Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

kpo

rafamel317MIT0.28.0TypeScript support: included

A task runner that goes where npm scripts won't, for the true capo

task runner, task, runner, run, cli, nps, jake

readme

kpo

Version Types License

A task runner that goes where npm scripts won't, for the true capo.

Install

Run npm install -g kpo for a global install.

Table of Contents

Usage

kpo can be used programmatically or with its CLI.

Tasks (see definition) are plain synchronous or asynchronous functions that take a Context as an argument.

Tasks can be used in an exclusively programmatic manner or with kpo's CLI. The CLI expects a kpo.tasks.js file exporting a a Task.Record as a default.

Contexts are used by tasks to determine things such as the current working directory, environment variables, cancellation state, logging level, or stdio streams. In that sense, tasks, at least those created with kpo's creation functions, are independent of the process current state and can be cancelled. A task's context can in turn be manipulated to be different only for certain tasks, even within a group of serial or parallel tasks.

Programmatic Usage

  • Tasks
    • Creation
      • create: a task creation helper.
      • context: manipulates the context of a task.
    • Aggregate
      • series: runs a group of tasks in series.
      • parallel: runs a group of tasks in parallel.
      • combine: selects a task of group of tasks from a nested tasks record to run in series.
    • Exception
      • raises: raises an error.
      • catches: catches an error in a task and optionally run an alternate task.
      • finalize: executes a task after another regardless of whether the first task errored.
    • Filesystem
      • mkdir: creates a directory.
      • write: writes a file.
      • edit: edits a file.
      • copy: copies files or directories.
      • move: moves files or directories.
      • remove: removes files or directories.
      • watch: watches for changes and runs a task for change events.
    • Process
      • exec: spawns a process.
    • Schedule
      • sleep: stops execution for a given time.
      • repeat: repeats a task for a number of times.
      • timeout: sets a timeout for a task.
    • Stdio
      • log: prints a message with a given logging level.
      • print: prints a message.
      • clear: clears the stdout.
      • silence: suppresses the stdio for a task.
      • announce: logs a task route before execution and/or upon success.
      • interactive: marks a task as interactive to error or run an alternate task on non-interactive environments.
      • progress: shows a spinner while the task is in progress.
      • prompt: prompts for a user response.
      • confirm: executes a task in response to user confirmation or rejection.
      • select: executes a task in response to user selection.
    • Reflection
      • lift: lifts tasks on a record to a package.json file.
      • list: prints all available tasks on a task record.
  • Utils
    • run: runs a task.
    • style: styles a string.
    • fetch: fetches a file with a tasks record as a default export.
    • recreate: maps all tasks in a tasks record.
    • isCI: indicates whether a context environment variables indicate it's running in a CI.
    • isCancelled: resolves with the current cancellation state for a context.
    • isInteractive: indicates whether a context is that of an interactive environment.
    • isLevelActive: indicates whether a logging level is enabled for a context.

CLI Usage

Common options

These are common options for all kpo subcommands. They must always be passed before any subcommand or scope.

Usage:
  $ kpo [options] [command]

Options:
  -f, --file <path>       Configuration file
  -d, --dir <path>        Project directory
  -e, --env <value>       Environment variables
  --level <value>         Logging level
  --prefix                Prefix tasks output with their route
  -h, --help              Show help
  -v, --version           Show version number

Commands:
  :run          Runs tasks (default)
  :watch        Watch paths and run tasks on change events
  :list         List available tasks
  :lift         Lift tasks to package

Examples:
  $ kpo foo bar baz
  $ kpo -e NODE_ENV=development -e BABEL_ENV=node :run foo

kpo :run

Runs tasks.

kpo :run doesn't take additional options, other than the common options.

Note that the :run command can be omitted. When no command is passed, kpo will assume you're passing it tasks to run. Hence, kpo :run foo bar and kpo foo bar are equivalent.

kpo :watch

Watch a path and run tasks on change events

Usage:
  $ kpo :watch [options] -- [args]

Options:
  -g, --glob              Parse globs in paths
  -p, --prime             Runs the task once when ready to wait for changes
  -f, --fail              Finalizes the watch effort if a given task fails
  -c, --clear             Clear stdout before tasks execution
  -i, --include <value>   Paths to include
  -e, --exclude <value>   Paths to exclude
  -s, --symlinks          Follow symlinks
  --parallel              Don't cancel running tasks
  --debounce <number>     Avoid rapid task restarts (ms)
  --depth <number>        Limit subdirectories to traverse
  --poll <number>         Use polling for every ms interval
  -h, --help              Show help

Examples:
  $ kpo :watch -i ./src foo bar baz
  $ kpo :watch -i ./src -i ./test foo
  $ kpo -e NODE_ENV=development :watch -i ./src bar

kpo :list

List available tasks

Usage:
  $ kpo :list [options]

Options:
  --defaults      List default tasks and subtasks by their own
  -h, --help      Show help

kpo :lift

Lift tasks to a package.json

Usage:
  $ kpo :lift [options]

Options:
  --purge             Purge all non-kpo scripts
  --defaults          Lift default tasks and subtasks by their own
  --mode <value>      Lift mode of operation (confirm, fix, dry, audit)
  -h, --help          Show help

changelog

0.28.0 (2024-07-16)

Bug Fixes

  • fetch with property doesn't fail when tasks file exports a Promise (fb1c39d)

Features

  • add option to keep package tasks as they are on lift purge (71feaa7)

0.27.0 (2024-07-09)

Bug Fixes

  • print correct values on select (55f8e95)
  • update dependencies (035280b)

Features

  • edit callback param file changed to location (801c52d)

BREAKING CHANGES

  • edit task callback params have changed: file has been replaced by location.

0.26.0 (2024-07-08)

Code Refactoring

  • more strict function signatures and internal types for exported functions (440b86e)

Features

  • add atValue util to assist on new confirm, prompt, select api (6e79ea0)
  • confirm, prompt, and select take a callback to pass responses (1e83846)
  • tmp task passes directory and files to callback (d8bd3d2)

BREAKING CHANGES

  • Exported functions taking Empty type (void | undefined | null) only take explicit null values in most cases. Additionally, the function signatures for the edit and tmp tasks have changed significantly. Review the latest documentation.
  • tmp task callback takes an object as an argument, with fields files and directory
  • Tasks confirm, prompt, and select, have a different signature. Review the lastest documentation.

0.25.0 (2024-07-05)

Bug Fixes

  • ensure path sources are children of options.from (76fdddb)

Features

  • tmp task creates a temporal directory and can create none or multiple temporal files (e3334d5)

BREAKING CHANGES

  • Task tmp signature has changed. Review the latest documentation.

0.24.0 (2024-06-29)

Bug Fixes

  • update dependencies (75d0730)
  • update setup and dependencies (d94d5f9)

Features

  • add tmp task (69bbdf2)
  • copy and move take a from option (5a6a273)
  • does not force error capitalization (52976dd)
  • uses AbortSignal for cancellation (0dc55a5)

BREAKING CHANGES

  • Context.cancellation is no longer a Promise, but an AbortSignal

0.23.2 (2022-03-24)

Bug Fixes

0.23.1 (2022-03-23)

Bug Fixes

  • deps: update dependencies (09d301c)
  • use package name to import all kpo functions on fetch (b7a9872)

0.23.0 (2022-03-15)

Bug Fixes

  • coerce unknown thrown objects into errors (38b9e22)
  • tasks: mkdir rejects on failed operations (660bcca)

Code Refactoring

Reverts

  • tasks: create doesn't take multiple arguments (2685277)

BREAKING CHANGES

  • Drops node <16 support

0.22.0 (2021-06-18)

Bug Fixes

  • deps: update dependencies (e265161)

Features

  • takes a task record or task record returning function as default export for kpo.tasks.js (74b04cb)

0.21.0 (2021-04-20)

Features

  • all functions taking options and tasks take options as a parameter before tasks (44f5479)
  • cli: don't notify of updates when run in npm scripts by default (4e4d542)
  • tasks: take any number of tasks on finalize (e0f1cc6)
  • utils: add isLevelActive (700ce5c)

0.20.0 (2021-04-18)

Bug Fixes

  • deps: update dependencies (d74828f)
  • tasks: add badge to prompt message (3de514a)
  • tasks: clear listeners and input stream on select finalization (048ca7d)
  • tasks: fix prompt block on windows (38978d7)

Features

  • cli: add update notifier (ab0d23f)

0.19.0 (2021-04-15)

Bug Fixes

  • tasks: prefix stdout for progress, prompt, select (0e25098)

Features

  • adapt lift for multitask; change lift mode names and default (afb6efd)

0.18.0 (2021-04-09)

Bug Fixes

  • deps: update ci-info to 3.1.1 (9f360e8)
  • fixes bin path in package.json (95a0e18)
  • tasks: catches and finalize stop on cancellation (7527388)
  • tasks: exec uses first argument for errors when executing node (ffbd42c)
  • tasks: fix select feedback messages (0cf4fd8)
  • utils: run doesn't throw when cancelled (f3cf37b)

Features

  • allow for context stdio streams to be null; remove interactive option for context and bin (2655d06)
  • cli: rename bin function to cli, allow for command extensions and single/multi task modes (1d26381)
  • implement interactive/non-interactive contexts; add task and utils (756fab7)
  • improve logging format on unicode supporting environments; add success log level (f410ac6)
  • log all errors w/ trace level (96425e0)
  • tasks,bin: add fail option to watch task and command (a329ad5)
  • tasks: add confirm task (ff3cecc)
  • tasks: add name option for announce (6b32f6b)
  • tasks: add progress task (a3709d8)
  • tasks: add prompt task (1404baf)
  • tasks: add repeat task (67db390)
  • tasks: add silence task (ef894a2)
  • tasks: add timeout task (df676d6)
  • tasks: create pipes passed functions and checks for cancellation (f28c215)
  • tasks: optionally log task success on announce (8463a82)
  • tasks: suppress stdin on parallel tasks (cd91867)
  • utils: export style util (cc6bb50)

0.17.1 (2021-04-04)

Bug Fixes

  • fix type definitions build (fada578)

0.17.0 (2021-04-04)

Bug Fixes

  • default options assignment for undefined values -uses merge-strategies (b3f430c)
  • fix stdout clear for watch task and command (a1cc544)
  • tasks: fix context merge (2ff3f85)
  • tasks: fix lift confirm mode when there are no pending changes (cc7576d)

Features

  • allow combine task and recreate util to take a Task.Record returning function (2b409da)
  • allow context prefix to be a boolean (405b0ce)
  • differentiate between print and key route names (11e8755)
  • lift and list tasks can fetch default tasks file; fetch will use the default tasks file name when none is provided (2c939b0)
  • tasks: add announce task (3182d0a)
  • tasks: add clear option to watch task; modify watch options names and function signature (165233b)
  • tasks: allow log task to take silent as a level (19170ca)
  • tasks: combine task takes include, exclude, and defaults options (c9f948a)
  • tasks: lift and list tasks can no longer fetch task files (2079576)
  • tasks: remove defaults option for combine: default tasks will be combined unless explicitly excluded (ba1f0cc)
  • treat 'default' keys in Task.Record as the task to be run for its top level (90c1527)

0.16.0 (2021-04-02)

Features

0.15.0 (2021-04-01)

Bug Fixes

  • propagate bin name at lift and list subcommand and task (ad142f6)

Features

  • add exclude to watch task; add exclude and clear to watch subcommand (9be1ae5)
  • bin: add description and version options to exported bin function (97a4ab2)

0.14.0 (2021-03-31)

Bug Fixes

  • tasks: set briefError option for exec task as optional (07e3b6f)

Features

  • bin: add :watch subcommand (6d2c994)

0.13.0 (2021-03-29)

Bug Fixes

chore

  • reboots package development (7dc8bae)

Features

  • bin: adds cli (0acf8bb)
  • bin: allow for custom bin name, export as function (870ed67)
  • definitions: adds initial definitions (89f1d1f)
  • removes parse util in favor of added combine task and recreate util (dbca481)
  • routes are stringified by introducing a ':' character separation (a381d34)
  • tasks: add briefError option to exec task (166e37d)
  • tasks: adds catches transform (c7bb182)
  • tasks: adds clear task (94ed15c)
  • tasks: adds consume function parse (a104a06)
  • tasks: adds context transform (4494630)
  • tasks: adds copy task (1a6da16)
  • tasks: adds edit task (8f09b48)
  • tasks: adds exec task (3e88259)
  • tasks: adds finalizes transform task (581461c)
  • tasks: adds lift command (b1cef1f)
  • tasks: adds list command (7b4d29d)
  • tasks: adds log task (2883ee0)
  • tasks: adds mkdir task (b560772)
  • tasks: adds move task (192ed1c)
  • tasks: adds parallel transform (689c555)
  • tasks: adds print task (7949e39)
  • tasks: adds raises task (f3f0c5d)
  • tasks: adds remove task (fb53a87)
  • tasks: adds select transform (b788530)
  • tasks: adds series transform (e9b12d0)
  • tasks: adds sleep task (1964dc8)
  • tasks: adds task runner function run (c6afed2)
  • tasks: adds watch task (28e4aa4)
  • tasks: adds write task (86a44ed)
  • tasks: list prints the command for tasks and their indented structure (6bcb47e)
  • tasks: list takes a map function (71cea40)
  • tasks: print can take no arguments (df08e29)
  • tasks: raises can take a string as an argument (f0dbd5a)
  • tasks: series and parallel can take a task array or record as a first argument (8ab3802)
  • utils: adds fetch util (ec932be)
  • utils: adds isCancelled (8535df8)

BREAKING CHANGES

  • This package api has been entirely redesigned. Please check the latest docs.

0.11.1 (2019-11-01)

Bug Fixes

  • updates setup and dependencies (e6492a4)

Reverts

  • public/tags: runs kpo without spawning a new process (8fe287f)

0.11.0 (2019-06-17)

Bug Fixes

  • utils/exec: fixes arguments not being properly parsed as spawn is always used w/ shell=true (d864efb)

Features

  • core/tasks: binds function tasks to their parent object (29c43dd)

Reverts

  • public/stages: removes stages (8a17831)

BREAKING CHANGES

  • public/stages: Removes public stages function

0.10.0 (2019-06-11)

Bug Fixes

  • deps: updates dependencies (a2043f5)
  • public: fixes json typings (7e6e89f)

Features

0.9.1 (2019-05-22)

Bug Fixes

  • core: ensures core initialization on retrieval (333cb26)
  • deps: updates dependencies (e5abae6)
  • public/fs: correctly identifies skipped copies for !options.overwrite and destination is an exi (7da1874)
  • public/fs: guarantees utils src/dest resolver callbacks run serially (8111110)

0.9.0 (2019-05-20)

Code Refactoring

  • public/fs: armonizes callbacks behavior for fs functions (74f0bec)
  • public/fs: write, rw, and json callbacks take an object instead of several params (d43f33a)

Features

  • public/fs: rw and json can take a dest param (d6bbd0a)

BREAKING CHANGES

  • public/fs: Callbacks for fs functions now receive an object with the appropriate data for each case
  • public/fs: write, rw, and json callbacks signature has changed

0.8.0 (2019-05-20)

Features

  • fs/tags: globs is an exposed function (cf99127)
  • public/fs: allows all fs functions to take sources arrays; unifies behavior (d0f6536)
  • public/fs: allows destination to be a from/to map for copy and move (8369346)
  • public/fs: allows sources to be array returning functions (1c5786b)
  • public/fs: exports types (ee7a7b6)
  • public/fs: options take a logger key to disable logging (33209be)

BREAKING CHANGES

  • fs/tags: Glob previously returned a promise; it now returns a promise returning function

0.7.0 (2019-05-19)

Bug Fixes

  • core/paths: gets kpo scripts file path when not in cwd and a sibling to package.json (02b0548)
  • public/tags: resets logger level after kpo calls (83ed074)
  • utils/env-manager: fixes undefined being coherced into a string when setting environment variab (885c26d)

Features

  • public/fs: allows copy, move, remove to take promises as src (3747dba)
  • public/fs: allows rw and json to take overwrite option (IFsWriteOptions) (cc6db76)
  • public/fs: allows write to take a function for the file content (4419db2)
  • public/fs: makes errors occurred in user provided callbacks instances of OpenError (a5784f5)
  • public/tags: adds glob tag (69e3d9a)

0.6.0 (2019-05-17)

Bug Fixes

  • core: sets project directory as cwd before scripts file is loaded (9985cfd)
  • deps: removes semver as a dependency (ded943f)
  • deps: updates dependencies (87de4de)
  • deps: updates dependencies (eab831b)
  • deps: updates exits to v1 (13594e2)
  • public/fs: fixes copy types (5446492)
  • utils/logger: prevents logger methodFactory from being registered twice (1958d56)

Features

  • utils/errors: KpoError takes data as third argument; ensures isKpoError returns a boolean; imp (b75f82c)

0.5.2 (2019-05-13)

Bug Fixes

  • bin/attach, utils/guardian: identifies triggered exit via environment variable to account for d (dc77e13)
  • deps: updates dependencies (d5f9fa3)
  • utils/env-manager: fixes setting of default environment variables; sets empty as undefined (9a09e8c)

0.5.1 (2019-05-12)

Bug Fixes

  • public/write: fixes directory ensure (f6d1e69)

0.5.0 (2019-05-11)

Bug Fixes

  • bin: filters empty values for comma separated flags (33c67dd)
  • deps: updates dependencies (b5bd7df)
  • fixes logging level restore; initializes on reset (48da81b)
  • utils/env-manager: fixes environment variables setting and restoring when undefined (db4dda5)
  • utils/logger: ensures methodFactory is used immediately after it is set (2bace5a)

Features

  • commands/raise, bin/raise: adds purge option (626ead1)
  • public/fs: adds read (41b3118)
  • uses SilentError to fail silently; logs it as warning (f9d8ad3)
  • utils/errors: adds SilentError (c72844d)
  • utils/logger: exits messages are logged w/ the same level as kpo's ones (c4333be)

0.4.0 (2019-05-08)

Bug Fixes

  • core/options: fixes setters; doesn't call initialize on set on get; rolls back to using object (05b6308)
  • core: uses cache relative to options.id for children and tasks (dc9e645)
  • deps: moves slimconf to devDependencies (5e3c765)
  • public/exec: fixes stream commands to match current globals management (5600b8e)
  • utils/terminate-children: replaces ps-manager w/ terminate-children; actually sents kill signal (30dac3a)

Code Refactoring

  • public, commands: removes internal kpo commands from public, moves them to commands (7acaea6)

Features

  • bin, core: explicitly calls initialize: ensures initialization has always happened -at least o (b887980)
  • bin, utils/exec: uses exits to control spawned processes; exits w/ code 1 for signals (572f5fe)
  • bin: adds exits hook to manage child processes termination (85b4ef8)
  • bin: strips out -- fromk logged command when no arguments are passed after it (3df0061)
  • core, utils: uses globals to manage core and options state; removes unused utils (f2674d9)
  • core/scope: uses only children names to identify childre; removes matcher from IChild (685d023)
  • duck types errors to avoid issues w/ different instances; removes redundant error normalizatio (97f2f8e)
  • errors out on tasks, core, and spawned processes calls if exit has already been triggered (201dc7a)
  • globals; utils: globals manages environment variables; places version range validation in utils (ba9d3d2)
  • globals: adds globals (b1e8f44)
  • globals: doesn't pollute global when process is not kpo owned (de56134)
  • public: removes public options; kpo file, when js, should also export an options and scripts o (1508fc4)
  • utils/cache: allows for getId to be null or return string or number types (fad3fd6)
  • utils/env-manager: adds environment variables manager (442029b)
  • utils/env-manager: adds get, set, and default methods (b83c138)
  • utils/env-manager: adds purePaths; updates initial; exports initialized manager as default (4c27842)
  • utils/errors: uses source as message when it's a string (bbf86d2)
  • utils/exec, core/exec: uses child_process spawn and fork in order to manage child processes in (19467fa)
  • utils/exec: doesn't reset paths; doesn't add paths unless options.cwd exists (fe9da49)
  • utils/logger: prefixes messages w/ level and app name (05fce07)
  • utils/paths: adds getPaths (eda621b)
  • utils/ps-manager: adds child processes manager (c90f121)
  • utils/ps-manager: can kill processes for all children of a process (1157ff3)
  • utils: adds guardian (5b5e698)

BREAKING CHANGES

  • public, commands: run, list, raise, and stream are no longer exported
  • public: doesn't further export options(); kpo file should have a scripts and options key containing an object, even when a js file; kpo file can't export a default function

0.3.0 (2019-05-05)

Bug Fixes

  • core: doesn't preserve state when cwd has changed (2d4d9be)
  • public/exec: stream arguments get passed to command (0e96323)

Features

  • public/exec: allows for arguments to be passed in options; arguments in options overwrite glob (1c341ef)
  • public/kpo: adds -- to kpo commands on raise so they can take arguments out of the box (ef05508)
  • utils/version-range: returns boolean instead of throwing for mismatches (09e9ef6)

0.2.0 (2019-05-04)

Bug Fixes

  • core/tasks: fails on tasks starting with "_" (2439812)
  • utils/cache: saves only last result, otherwise side effects (options changes) won't be register (0073f48)

Features

  • core/scope: checks for children name conflicts when inferred from directory name (0cf24eb)
  • properly passes state between kpo instances and processes via KPO_STATE env var (4cb9957)

0.1.0 (2019-05-03)

Bug Fixes

  • core/options: setBase doesn't strip undefined values to fully preserve passed options (479165b)
  • core/tasks: fixes path parsing and printing (51d34a3)
  • core/tasks: tries to run package.json tasks only when task is not found on kpo, but not for any (20344a8)
  • overwrites error constructors and helpers for locally imported kpo instances (0a420d4)

Features

  • core/load: passes public functions if kpo scripts file exports a function (04a93b8)
  • core: deals with different executing and imported kpo instances (2b7478a)

0.0.4 (2019-05-02)

Bug Fixes

  • utils/cache, core: removes cache callback arguments (dfbd213)
  • utils/confirm: forces import of transpiled prompts (8b752d2)

Features

  • public/fs: takes string array as src for copy and move (0521531)

0.0.3 (2019-05-01)

Bug Fixes

  • public/prompts: forces import of transpiled prompts for confirm and select (5d5d0d3)

0.0.2 (2019-05-01)

Bug Fixes

  • public/prompts: forces transpiled prompts usage (c7b2697)

0.0.1 (2019-05-01)

Bug Fixes

  • bin: catches errors when getting silent option (856c793)
  • bin: fixes help usage instructions (52381ad)
  • commands/list: fixes list to use core.cwd instead of core.paths (714835c)
  • commands/run: throws when task is not found (7906ae7)
  • core/paths: doesn't throw when root paths retrieval fails and it's not explicitly defined in op (a7261a4)
  • core/tasks: fixes purePath regex -default cannot be an intermediary value (4fdef72)
  • core/tasks: fixes task names formatting on error messages for getFromKpo (4bf1fba)
  • core/tasks: takes IScripts being an instance of Error into account (a19b394)
  • core: ensures options have been loaded when requesting options; makes options part of core (492c737)
  • deps: adds missing dependency js-yaml; removes dangling (a3a8183)
  • deps: updates errorish to v0.2.0 (0c2e4fa)
  • deps: updates errorish to v0.2.1 (cc8db44)
  • deps: updates errorish to v0.3.0 (a576f09)
  • exposed/fs: fixes copy, destination existence should be recursively evaluated, hence handled by (6e709b8)
  • exposed/fs: fixes relative paths (0513950)
  • exposed/line: fixes tag typings (9f33f15)
  • exposed/tags: fixes silent (f0ac3ea)
  • exposed: uses core.cwd() instead of core.paths() to determine cwd (dd02f9c)
  • ore/tasks: fixes error message at getFromKpo (b3d9d43)
  • public/exec: fixes parallel args (7c2b0ea)
  • public/exec: fixes series.fn types (5b72565)
  • public/fs: fixes rw fs.ensureDir call (9fad602)
  • state/paths: converts root directory path to absolute, if needed (aad9f6e)
  • state/paths: fixes directory normalization and equality evaluation (2f5fc9b)
  • state/paths: get paths root scope recursively from directory (05c6d31)
  • state: fixes state merging (c146b7b)
  • uses WrappedError constructor when an error overwrite is intended (f72b5a7)
  • utils/as-tag: only considers arguments as coming from a template literal if their number matche (c494a08)
  • utils/errors: fixes wrap configuration to always overwrite message (dc341f4)
  • utils/file: fixes exists to return void as per typings (6776e59)

Features

  • adds optional name field to IChild (6596a1e)
  • bin, commands: adds list (1a6bd2a)
  • bin/kpo: exists w/ code 1 only if not silent (610420e)
  • bin/list, commands/list: lists scopes (14306a3)
  • bin/main: updates base state w/ cli options (2e49b5e)
  • bin: adds cmd (bb50bf9)
  • bin: adds kpo bin and main (eb0774b)
  • bin: adds parallel (1c4098e)
  • bin: adds raise (583c6ad)
  • bin: adds scopes logic (4d9f822)
  • bin: adds series (d38be22)
  • bin: adds stream (a402da5)
  • bin: ensures param is an Error before logging (5985ff9)
  • bin: improves parallel and series help prompt (dc38d92)
  • bin: logs full command to be run w/ resolved scopes (4fc97bc)
  • bin: removes --node argument (cc072b9)
  • bin: uses commands/run (b31e3a7)
  • commands/run: gets default key for task if it exists (2787459)
  • commands: adds run (86d40b5)
  • core/load: gets scripts key and sets options from options key from kpo scripts file if not a j (5c54850)
  • core/options: adds forceUpdate (1dd5648)
  • core/options: allows directory to also be defined at IScopeOptions (8b0f221)
  • core/options: gives priority to cli options (c9a2b5b)
  • core/options: uses object hash to identify options (fcd9122)
  • core/scope: recurses up to @root looking for children scopes (c3640b0)
  • core/tasks: adds tasks to core (de93899)
  • core: adds children to core entry (95bda68)
  • core: adds cwd option for IScopeOptions; improves type definitions for package, cli, and core (63766bc)
  • core: adds run (7ca5479)
  • core: allows exec to take cwd and env options (757559c)
  • core: allows options to be defined at kpo package.json key (6297145)
  • core: allows relative paths as cwd on exec (a294f8b)
  • errors: adds CustomError and WrappedError (06e7010)
  • exposed/exec: adds series.env and parallel.env (063fcba)
  • exposed/exists: adds exists (758ad8d)
  • exposed/file: adds json (6e7efb2)
  • exposed/file: adds remove (75d114f)
  • exposed/fs, exposed/tags: adds mkdir; uses mkdir on ensure (6109bf8)
  • exposed/fs: adds copy (9a5c313)
  • exposed/fs: adds move (0acf5a5)
  • exposed/fs: adds write (8706280)
  • exposed/fs: improves logger messages (98d3474)
  • exposed/fs: moves file to fs; improves functions implementation and typings; adds rw (3a235cd)
  • exposed/prompts: adds select prompt (71cdfa7)
  • exposed/prompts: confirm shows timeout if passed (316da0e)
  • exposed/tags: adds ensure (28adb76)
  • exposed/tags: adds exists (2808b7c)
  • exposed/tags: adds log (c9b3a1c)
  • exposed/tags: adds rm (aba9763)
  • exposed: adds confirm prompt (76f99e5)
  • exposed: adds exposed w/ options (a65f650)
  • exposed: adds parallel (9a735f6)
  • exposed: adds series (dcdb7c7)
  • exposed: adds silent (312c676)
  • exposed: adds trim (164e7eb)
  • exposed: replaces trim w/ line -adds line (7d3baab)
  • exposed: wraps all exposed fns errors as WrappedError, so their stacktrace doesn't get logged (ec911e3)
  • improves logged messages (d1c7751)
  • options: implements and exports options from entry point (3f0ae47)
  • parse/load: returns package.json and redesigns getFile (23480a7)
  • parse: adds getFile (4da7cd9)
  • parse: adds readFile and IScripts type (1cd195c)
  • passes arguments to tasks, both for commands and functions (18042df)
  • public/exec: adds stream (76da0d0)
  • public/kpo: adds raise (4408633)
  • public/kpo: takes scripts to replace into account on raise (33e0e83)
  • state/load: sets cwd as default directory (f673347)
  • state/paths: retrieves bin paths recursively for current and root scopes (a92997e)
  • state/scope: adds getChildren (9fb9ddf)
  • state: adds paths (96fd89b)
  • state: adds scope (c691501)
  • state: adds state, moves parse/load (aba1998)
  • state: allows root scope to be set as null (87e80b9)
  • state: get unsafely retrieves values for keys (cb6a334)
  • state: separates load into paths and load; gets root paths (ea2b809)
  • state: sets logger level on state merging (7e7e190)
  • types: allows circular renference as Array and falsy values for TScript (657ad24)
  • types: improves TScript typings (57bfc0c)
  • types: separates IOptions into IBaseOptions and IScopeOptions; ensures IBaseOptions are preser (78d5fd7)
  • uses OpenError to log full errors as long as logger is not silent when it ocurrs on task funct (282fdfc)
  • utils/errors: adds custom name getter for error classes (3a5191b)
  • utils/exec, core/exec: adds forking capability to exec (5e4aa6a)
  • utils/exec: adds exec (74e1ed2)
  • utils/exec: kills dangling child processes on main process exit (f955538)
  • utils/exec: passes environment variables w/ state envs and paths by default; returns a promise (6ed1eef)
  • utils/exec: sets options as optional (0f68e72)
  • utils/exec: spawns w/ project directory as cwd (ab692bc)
  • utils/file: adds absolute (69532e0)
  • utils/file: adds load (e9f823f)
  • utils/logger: adds logger (78676b4)
  • utils: adds asTag (87eae18)
  • utils: adds confirm (fc40be3)
  • utils: adds ensure (91d12ab)
  • utils: adds expose (a3ba5ca)
  • utils: adds file utils (c8b5c75)
  • utils: adds memoize (24212ed)
  • utils: adds open (4ceb22b)
  • utils: substitutes memoize w/ cache; cache now takes a getId function to identify state (d2cc870)