diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cb8b66..3ae1787 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +#### 0.2.15 (2021-11-26) + +##### Bug Fixes + +* time log ([554505ef](https://github.com/zaaack/foy/commit/554505efec4b87661d1d935bf8948d90a0f599c3)) + #### 0.2.14 (2021-11-19) #### 0.2.13 (2021-11-19) diff --git a/docs/api/classes/cliloading.html b/docs/api/classes/cliloading.html index 7b88690..29edb71 100644 --- a/docs/api/classes/cliloading.html +++ b/docs/api/classes/cliloading.html @@ -117,7 +117,7 @@

constructor

  • Parameters

    @@ -139,7 +139,7 @@

    _loadingFrameMap

    _loadingFrameMap: Map<string, number> = new Map<string, number>()
    @@ -149,7 +149,7 @@

    Optional id

    id: NodeJS.Timer
    @@ -159,7 +159,7 @@

    linesToClear

    linesToClear: number = 0
    @@ -169,7 +169,7 @@

    props

    props: Required<Props>
    @@ -186,7 +186,7 @@

    clear

  • Returns this

    @@ -203,7 +203,7 @@

    count

  • Parameters

    @@ -226,7 +226,7 @@

    render

  • Returns void

    @@ -243,7 +243,7 @@

    renderDepsTree

  • Parameters

    @@ -269,7 +269,7 @@

    start

  • Returns void

    @@ -286,7 +286,7 @@

    stop

  • Returns void

    diff --git a/docs/api/classes/depbuilder.html b/docs/api/classes/depbuilder.html index 126bcbf..b35d083 100644 --- a/docs/api/classes/depbuilder.html +++ b/docs/api/classes/depbuilder.html @@ -120,7 +120,7 @@

    constructor

  • Parameters

    @@ -142,7 +142,7 @@

    Readonly _isDepBuild
    _isDepBuilder: true = true
    @@ -159,7 +159,7 @@

    async

  • @@ -192,7 +192,7 @@

    force

  • Returns this

    @@ -209,7 +209,7 @@

    options

  • Parameters

    @@ -232,7 +232,7 @@

    toTaskDep

  • Returns TaskDep<O>

    diff --git a/docs/api/classes/logger.html b/docs/api/classes/logger.html index e5722a5..07470e4 100644 --- a/docs/api/classes/logger.html +++ b/docs/api/classes/logger.html @@ -113,7 +113,7 @@

    constructor

  • Parameters

    @@ -135,7 +135,7 @@

    debug

    debug: (Anonymous function) = makeLogger('debug', this)
    @@ -145,7 +145,7 @@

    error

    error: (Anonymous function) = makeLogger('error', this)
    @@ -155,7 +155,7 @@

    info

    info: (Anonymous function) = makeLogger('info', this)
    @@ -165,7 +165,7 @@

    log

    log: (Anonymous function) = makeLogger('info', this)
    @@ -175,7 +175,7 @@

    warn

    warn: (Anonymous function) = makeLogger('warn', this)
    @@ -192,7 +192,7 @@

    Static defaultProps

  • Returns ILoggerProps

    diff --git a/docs/api/classes/shellcontext.html b/docs/api/classes/shellcontext.html index ad507bd..80d12e3 100644 --- a/docs/api/classes/shellcontext.html +++ b/docs/api/classes/shellcontext.html @@ -120,7 +120,7 @@

    Protected _logger

    _logger: Logger = logger
    @@ -130,7 +130,7 @@

    logCommand

    logCommand: boolean = false
    @@ -140,7 +140,7 @@

    sleep

    sleep: sleep = sleep
    @@ -157,7 +157,7 @@

    cwd

  • @@ -182,7 +182,7 @@

    cd

  • @@ -213,7 +213,7 @@

    env

  • @@ -237,7 +237,7 @@

    Returns string

    Parameters

    @@ -264,7 +264,7 @@

    exec

  • @@ -288,7 +288,7 @@

    Returns execa.Exe
  • Parameters

    @@ -314,7 +314,7 @@

    exec_unix

  • @@ -346,7 +346,7 @@

    monitor

  • @@ -392,7 +392,7 @@

    popd

  • @@ -414,7 +414,7 @@

    pushd

  • @@ -444,7 +444,7 @@

    resetEnv

  • @@ -466,7 +466,7 @@

    spawn

  • diff --git a/docs/api/classes/taskcontext.html b/docs/api/classes/taskcontext.html index c85f421..f7d0610 100644 --- a/docs/api/classes/taskcontext.html +++ b/docs/api/classes/taskcontext.html @@ -148,7 +148,7 @@

    constructor

  • Parameters

    @@ -174,7 +174,7 @@

    Protected _logger

    @@ -184,7 +184,7 @@

    fs

    fs: { access: __promisify__; appendFile: __promisify__; chmod: __promisify__; chown: __promisify__; constants: constants; copy: copy; copyFile: __promisify__ | (Anonymous function); createReadString: createReadStream; createWriteStream: createWriteStream; existsSync: existsSync; link: __promisify__; lstat: __promisify__; mkdir: __promisify__; mkdtemp: __promisify__; open: __promisify__; readFile: __promisify__; readdir: __promisify__; readlink: __promisify__; realpath: __promisify__; rename: __promisify__; rmdir: __promisify__; stat: __promisify__; symlink: __promisify__; truncate: __promisify__; unlink: __promisify__; utimes: __promisify__; watchDir: watchDir; writeFile: __promisify__; exists: any; isDirectory: any; isFile: any; isSymbolicLink: any; iter: any; lexists: any; mkdirp: any; mkdirpSync: any; outputFile: any; outputFileSync: any; outputJson: any; outputJsonSync: any; readJson: any; readJsonSync: any; rmrf: any } = fs
    @@ -283,7 +283,7 @@
    exists: function
  • Parameters

    @@ -305,7 +305,7 @@
    isDirectory: function
  • Parameters

    @@ -327,7 +327,7 @@
    isFile: function
  • Parameters

    @@ -349,7 +349,7 @@
    isSymbolicLink: function
  • Parameters

    @@ -371,7 +371,7 @@
    iter: function
  • Parameters

    @@ -417,7 +417,7 @@
    lexists: function
  • @@ -444,7 +444,7 @@
    mkdirp: function
  • @@ -473,7 +473,7 @@
    mkdirpSync: function
  • @@ -502,7 +502,7 @@
    outputFile: function
  • Parameters

    @@ -530,7 +530,7 @@
    outputFileSync: function
  • Parameters

    @@ -558,7 +558,7 @@
    outputJson: function
  • Parameters

    @@ -586,7 +586,7 @@
    outputJsonSync: function
  • Parameters

    @@ -614,7 +614,7 @@
    readJson: function
  • Type parameters

    @@ -645,7 +645,7 @@
    readJsonSync: function

    Type parameters

    @@ -676,7 +676,7 @@
    rmrf: function
  • @@ -706,7 +706,7 @@

    global

    @@ -717,7 +717,7 @@

    logCommand

    @@ -728,7 +728,7 @@

    sleep

    @@ -738,7 +738,7 @@

    task

    task: Task<O>
    @@ -756,7 +756,7 @@

    cwd

    @@ -778,7 +778,7 @@

    debug

  • Returns (Anonymous function)

    @@ -795,7 +795,7 @@

    error

  • Returns (Anonymous function)

    @@ -812,7 +812,7 @@

    info

  • Returns (Anonymous function)

    @@ -829,7 +829,7 @@

    log

  • Returns (Anonymous function)

    @@ -846,7 +846,7 @@

    options

  • @@ -868,7 +868,7 @@

    warn

  • Returns (Anonymous function)

    @@ -889,7 +889,7 @@

    cd

    @@ -921,7 +921,7 @@

    env

    @@ -946,7 +946,7 @@

    Returns string

    Inherited from ShellContext.env

    Parameters

    @@ -974,7 +974,7 @@

    exec

    @@ -999,7 +999,7 @@

    Returns execa.Exe

    Parameters

    @@ -1026,7 +1026,7 @@

    exec_unix

    @@ -1059,7 +1059,7 @@

    monitor

    @@ -1106,7 +1106,7 @@

    popd

    @@ -1129,7 +1129,7 @@

    pushd

    @@ -1160,7 +1160,7 @@

    resetEnv

    @@ -1182,7 +1182,7 @@

    run

  • @@ -1216,7 +1216,7 @@

    spawn

    diff --git a/docs/api/classes/taskmanager.html b/docs/api/classes/taskmanager.html index bea13df..1c02606 100644 --- a/docs/api/classes/taskmanager.html +++ b/docs/api/classes/taskmanager.html @@ -112,7 +112,7 @@

    namespaces

    namespaces: string[] = []
    @@ -129,7 +129,7 @@

    addTask

  • Parameters

    @@ -152,7 +152,7 @@

    getTasks

  • Returns Task<any>[]

    @@ -169,7 +169,7 @@

    isLoading

  • Parameters

    @@ -195,7 +195,7 @@

    resolveDependencyTree

  • Parameters

    @@ -221,7 +221,7 @@

    run

  • Parameters

    @@ -247,7 +247,7 @@

    runDepsTree

  • Parameters

    @@ -273,7 +273,7 @@

    runListner

  • Parameters

    @@ -301,7 +301,7 @@

    globalOptions

    globalOptions: object
    @@ -310,7 +310,7 @@

    indent

    indent: number = 3
    @@ -320,7 +320,7 @@

    loading

    loading: true = true
    @@ -330,7 +330,7 @@

    logCommand

    logCommand: true = true
    @@ -340,7 +340,7 @@

    logger

    logger: {}
    @@ -355,7 +355,7 @@

    options

    options: {}
    @@ -370,7 +370,7 @@

    showTaskDuration

    showTaskDuration: true = true
    @@ -381,7 +381,7 @@

    listeners

    listeners: object
    @@ -390,7 +390,7 @@

    after

    after: Callback[] = [] as Callback[]
    @@ -400,7 +400,7 @@

    before

    before: Callback[] = [] as Callback[]
    @@ -410,7 +410,7 @@

    onerror

    onerror: Callback[] = [] as Callback[]
    diff --git a/docs/api/enums/taskstate.html b/docs/api/enums/taskstate.html index 6ba8d3b..64399e2 100644 --- a/docs/api/enums/taskstate.html +++ b/docs/api/enums/taskstate.html @@ -90,7 +90,7 @@

    failed

    failed: = "failed"
    @@ -100,7 +100,7 @@

    loading

    loading: = "loading"
    @@ -110,7 +110,7 @@

    pending

    pending: = "pending"
    @@ -120,7 +120,7 @@

    skipped

    skipped: = "skipped"
    @@ -130,7 +130,7 @@

    succeeded

    succeeded: = "succeeded"
    @@ -140,7 +140,7 @@

    waiting

    waiting: = "waiting"
    diff --git a/docs/api/globals.html b/docs/api/globals.html index b230661..e8db9f2 100644 --- a/docs/api/globals.html +++ b/docs/api/globals.html @@ -145,6 +145,7 @@

    Functions

  • desc
  • exec
  • formatDate
  • +
  • formatDuration
  • makeLogger
  • namespace
  • onerror
  • @@ -178,7 +179,7 @@

    Callback

    Callback: { fn: (args?: any) => void | Promise<void>; namespaces: string[] }
    @@ -217,7 +218,7 @@

    Dependency

    Dependency: TaskDep | string | DepBuilder
    @@ -227,7 +228,7 @@

    ListenerNames

    ListenerNames: "before" | "after" | "onerror"
    @@ -237,7 +238,7 @@

    LogLevels

    LogLevels: keyof typeof LogLevels
    @@ -247,7 +248,7 @@

    OptionDef

    OptionDef: [string, string, OptionConfig | undefined]
    @@ -257,7 +258,7 @@

    TaskFn

    TaskFn<O, T>: (ctx: TaskContext<O>) => T | Promise<T>

    Type parameters

    @@ -297,7 +298,7 @@

    WatchDirHandler

    WatchDirHandler: (event: string, filename: string) => void
    @@ -331,7 +332,7 @@

    WatchDirOptions

    WatchDirOptions: { persistent?: undefined | false | true; threshold?: undefined | number }
    @@ -360,7 +361,7 @@

    Const DefaultLogFileDefaultLogFile: string = join(process.cwd(), 'foy.log')

    @@ -370,7 +371,7 @@

    Const EEXIST

    EEXIST: "EEXIST" = "EEXIST"
    @@ -380,7 +381,7 @@

    Const ENOENT

    ENOENT: "ENOENT" = "ENOENT"
    @@ -390,7 +391,7 @@

    Const TMKey

    TMKey: string = `@foy${require('../package.json').version}/taskManager`
    @@ -400,7 +401,7 @@

    Const logger

    logger: Logger = new Logger()
    @@ -410,7 +411,7 @@

    Let objUid

    objUid: number = 0
    @@ -420,7 +421,7 @@

    Let objUidMap

    objUidMap: WeakMap<object, number> = new WeakMap<object, number>()
    @@ -430,7 +431,7 @@

    Const shellParser

    shellParser: any = require('shell-parser')
    @@ -440,7 +441,7 @@

    Const spawn

    spawn: { command: any; commandSync: any; node: any; sync: any } = execa
    @@ -881,7 +882,7 @@

    _exec

  • Parameters

    @@ -907,7 +908,7 @@

    Const after

  • Parameters

    @@ -948,7 +949,7 @@

    appendCallback

  • Type parameters

    @@ -980,7 +981,7 @@

    Const before

  • Parameters

    @@ -1021,7 +1022,7 @@

    copy

  • Parameters

    @@ -1050,7 +1051,7 @@

    debounce

  • Type parameters

    @@ -1107,7 +1108,7 @@

    defaults

  • Type parameters

    @@ -1130,7 +1131,7 @@

    Returns T<
  • Type parameters

    @@ -1156,7 +1157,7 @@

    Returns T<
  • Type parameters

    @@ -1185,7 +1186,7 @@

    Returns T<
  • Type parameters

    @@ -1217,7 +1218,7 @@

    Returns T<
  • Type parameters

    @@ -1261,7 +1262,7 @@

    dep

  • Parameters

    @@ -1284,7 +1285,7 @@

    desc

  • @@ -1315,7 +1316,7 @@

    exec

  • Parameters

    @@ -1332,7 +1333,7 @@

    Returns execa.Exe
  • Parameters

    @@ -1358,7 +1359,7 @@

    Const formatDate

  • Parameters

    @@ -1371,6 +1372,29 @@

    Returns string +
    + +

    formatDuration

    +
      +
    • formatDuration(ms: number): string
    • +
    +
      +
    • + +

      Parameters

      +
        +
      • +
        ms: number
        +
      • +
      +

      Returns string

      +
    • +
    +

    makeLogger

    @@ -1381,7 +1405,7 @@

    makeLogger

  • Parameters

    @@ -1407,7 +1431,7 @@

    namespace

  • @@ -1478,7 +1502,7 @@

    Const onerror

  • Parameters

    @@ -1522,7 +1546,7 @@

    option

  • @@ -1558,7 +1582,7 @@

    promiseQueue

  • Type parameters

    @@ -1608,7 +1632,7 @@

    setGlobalOptions

  • @@ -1638,7 +1662,7 @@

    setOption

  • @@ -1668,7 +1692,7 @@

    shell

  • Parameters

    @@ -1709,7 +1733,7 @@

    Const sleep

  • Parameters

    @@ -1732,7 +1756,7 @@

    strict

  • @@ -1755,7 +1779,7 @@

    task

  • @@ -1787,7 +1811,7 @@

    Returns
    @@ -1828,7 +1852,7 @@

    watchDir

  • Parameters

    @@ -1845,7 +1869,7 @@

    Returns void

    Parameters

    @@ -1873,7 +1897,7 @@

    Const Is

    Is: object
    @@ -1886,7 +1910,7 @@

    bool

  • Parameters

    @@ -1909,7 +1933,7 @@

    defed

  • Type parameters

    @@ -1938,7 +1962,7 @@

    fn

  • Parameters

    @@ -1961,7 +1985,7 @@

    num

  • Parameters

    @@ -1984,7 +2008,7 @@

    obj

  • Parameters

    @@ -2007,7 +2031,7 @@

    str

  • Parameters

    @@ -2027,7 +2051,7 @@

    Const LogLevels

    LogLevels: object
    @@ -2036,7 +2060,7 @@

    debug

    debug: number = 0
    @@ -2046,7 +2070,7 @@

    error

    error: number = 3
  • @@ -2056,7 +2080,7 @@

    info

    info: number = 1

  • @@ -2066,7 +2090,7 @@

    warn

    warn: number = 2
    @@ -2077,7 +2101,7 @@

    Const fs

    fs: object
    @@ -2086,7 +2110,7 @@

    access

    access: __promisify__ = util.promisify(_fs.access)
    @@ -2096,7 +2120,7 @@

    appendFile

    appendFile: __promisify__ = util.promisify(_fs.appendFile)
    @@ -2106,7 +2130,7 @@

    chmod

    chmod: __promisify__ = util.promisify(_fs.chmod)
    @@ -2116,7 +2140,7 @@

    chown

    chown: __promisify__ = util.promisify(_fs.chown)
    @@ -2126,7 +2150,7 @@

    constants

    constants: constants = _fs.constants
    @@ -2136,7 +2160,7 @@

    copy

    copy: copy
    @@ -2146,7 +2170,7 @@

    copyFile

    copyFile: __promisify__ | (Anonymous function) = _fs.copyFile ? util.promisify(_fs.copyFile) : async (src: _fs.PathLike, dist: _fs.PathLike) => {await fs.stat(src)return new Promise((res, rej) => {fs.createReadStream(src, { highWaterMark: 2 * 1024 * 1024 }).pipe(fs.createWriteStream(dist)).on('error', rej).on('close', res)})}
    @@ -2156,7 +2180,7 @@

    createReadString

    createReadString: createReadStream = _fs.createReadStream
    @@ -2166,7 +2190,7 @@

    createWriteStream

    createWriteStream: createWriteStream = _fs.createWriteStream
    @@ -2176,7 +2200,7 @@

    existsSync

    existsSync: existsSync = _fs.existsSync
    @@ -2186,7 +2210,7 @@

    link

    link: __promisify__ = util.promisify(_fs.link)
    @@ -2196,7 +2220,7 @@

    lstat

    lstat: __promisify__ = util.promisify(_fs.lstat)
    @@ -2206,7 +2230,7 @@

    mkdir

    mkdir: __promisify__ = util.promisify(_fs.mkdir)
    @@ -2216,7 +2240,7 @@

    mkdtemp

    mkdtemp: __promisify__ = util.promisify(_fs.mkdtemp)
    @@ -2226,7 +2250,7 @@

    open

    open: __promisify__ = util.promisify(_fs.open)
    @@ -2236,7 +2260,7 @@

    readFile

    readFile: __promisify__ = util.promisify(_fs.readFile)
    @@ -2246,7 +2270,7 @@

    readdir

    readdir: __promisify__ = util.promisify(_fs.readdir)
    @@ -2256,7 +2280,7 @@

    readlink

    readlink: __promisify__ = util.promisify(_fs.readlink)
    @@ -2266,7 +2290,7 @@

    realpath

    realpath: __promisify__ = util.promisify(_fs.realpath)
    @@ -2276,7 +2300,7 @@

    rename

    rename: __promisify__ = util.promisify(_fs.rename)
    @@ -2286,7 +2310,7 @@

    rmdir

    rmdir: __promisify__ = util.promisify(_fs.rmdir)
    @@ -2296,7 +2320,7 @@

    stat

    stat: __promisify__ = util.promisify(_fs.stat)
    @@ -2306,7 +2330,7 @@

    symlink

    symlink: __promisify__ = util.promisify(_fs.symlink)
    @@ -2316,7 +2340,7 @@

    truncate

    truncate: __promisify__ = util.promisify(_fs.truncate)
    @@ -2326,7 +2350,7 @@

    unlink

    unlink: __promisify__ = util.promisify(_fs.unlink)
    @@ -2336,7 +2360,7 @@

    utimes

    utimes: __promisify__ = util.promisify(_fs.utimes)
    @@ -2346,7 +2370,7 @@

    watchDir

    watchDir: watchDir
    @@ -2356,7 +2380,7 @@

    writeFile

    writeFile: __promisify__ = util.promisify(_fs.writeFile)
    @@ -2370,7 +2394,7 @@

    exists

  • Parameters

    @@ -2393,7 +2417,7 @@

    isDirectory

  • Parameters

    @@ -2416,7 +2440,7 @@

    isFile

  • Parameters

    @@ -2439,7 +2463,7 @@

    isSymbolicLink

  • Parameters

    @@ -2462,7 +2486,7 @@

    iter

  • Parameters

    @@ -2509,7 +2533,7 @@

    lexists

  • @@ -2537,7 +2561,7 @@

    mkdirp

  • @@ -2567,7 +2591,7 @@

    mkdirpSync

  • @@ -2597,7 +2621,7 @@

    outputFile

  • Parameters

    @@ -2626,7 +2650,7 @@

    outputFileSync

  • Parameters

    @@ -2655,7 +2679,7 @@

    outputJson

  • Parameters

    @@ -2684,7 +2708,7 @@

    outputJsonSync

  • Parameters

    @@ -2713,7 +2737,7 @@

    readJson

  • Type parameters

    @@ -2745,7 +2769,7 @@

    readJsonSync

  • Type parameters

    @@ -2777,7 +2801,7 @@

    rmrf

  • @@ -2955,6 +2979,9 @@

    Returns Promise formatDate

  • +
  • + formatDuration +
  • makeLogger
  • diff --git a/docs/api/index.html b/docs/api/index.html index ce7e263..13cc1fb 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -650,6 +650,9 @@

    License

  • formatDate
  • +
  • + formatDuration +
  • makeLogger
  • diff --git a/docs/api/interfaces/__global.string.html b/docs/api/interfaces/__global.string.html index 32527cb..e8ada7f 100644 --- a/docs/api/interfaces/__global.string.html +++ b/docs/api/interfaces/__global.string.html @@ -102,7 +102,7 @@

    async

  • @@ -133,7 +133,7 @@

    force

  • Returns DepBuilder

    @@ -150,7 +150,7 @@

    options

  • Type parameters

    diff --git a/docs/api/interfaces/depstree.html b/docs/api/interfaces/depstree.html index f4ee390..234d059 100644 --- a/docs/api/interfaces/depstree.html +++ b/docs/api/interfaces/depstree.html @@ -81,6 +81,7 @@

    Properties