@bunt/cli
Advanced tools
Comparing version 0.18.3 to 0.19.0
@@ -6,2 +6,19 @@ # Change Log | ||
# [0.19.0](https://github.com/izatop/bunt/compare/v0.18.3...v0.19.0) (2021-05-26) | ||
### Bug Fixes | ||
* command ([9a277a0](https://github.com/izatop/bunt/commit/9a277a0587313c4f22077d7e7303ac3ae026f5cd)) | ||
* tests, disposable ([99ead5a](https://github.com/izatop/bunt/commit/99ead5a2b518bb6160687afcf1d12311b38d1c44)) | ||
### Features | ||
* update unit types ([6a7124c](https://github.com/izatop/bunt/commit/6a7124cb8074892a0d4ce4e86d551d34289b42ee)) | ||
## [0.18.3](https://github.com/izatop/bunt/compare/v0.18.2...v0.18.3) (2021-05-25) | ||
@@ -8,0 +25,0 @@ |
import { Action, Heartbeat, IDisposable, IRunnable, StateType } from "@bunt/unit"; | ||
import { Argv, Logger, Program, Promisify } from "@bunt/util"; | ||
import { ICommandContext } from "../Context/CommandContext"; | ||
export declare abstract class Command<C extends ICommandContext = ICommandContext, S extends StateType | null = null> extends Action<C, S, IRunnable> implements IDisposable, IRunnable { | ||
import { Argv, Logger, Program } from "@bunt/util"; | ||
import { CommandContext } from "../Context/CommandContext"; | ||
export declare abstract class Command<C extends CommandContext, S extends StateType | null = null> extends Action<C, S, IRunnable | void> implements IDisposable, IRunnable { | ||
protected logger: Logger; | ||
get args(): Argv; | ||
get program(): Program; | ||
getHeartbeat(): Heartbeat; | ||
dispose(): Promise<void>; | ||
getHeartbeat(): Heartbeat; | ||
run(): Promise<this>; | ||
abstract execute(): Promisify<void>; | ||
} |
@@ -19,12 +19,8 @@ "use strict"; | ||
} | ||
getHeartbeat() { | ||
return unit_1.Heartbeat.create(this); | ||
} | ||
async dispose() { | ||
return; | ||
} | ||
getHeartbeat() { | ||
return unit_1.Heartbeat.create(this, (fn) => unit_1.Disposable.attach(this, fn)); | ||
} | ||
async run() { | ||
await this.execute(); | ||
return this; | ||
} | ||
} | ||
@@ -31,0 +27,0 @@ __decorate([ |
import { Application, IRoute } from "@bunt/app"; | ||
import { Action, ApplyContext, ContextArg, Heartbeat, IDisposable, IRunnable } from "@bunt/unit"; | ||
import { CommandContext, ICommandContext } from "./Context/CommandContext"; | ||
export declare class Commander<C extends ICommandContext> implements IRunnable, IDisposable { | ||
import { Action, ContextArg, Heartbeat, IDisposable, IRunnable } from "@bunt/unit"; | ||
import { CommandContext } from "./Context/CommandContext"; | ||
export declare class Commander<C extends CommandContext> implements IRunnable, IDisposable { | ||
#private; | ||
protected constructor(application: Application<C>); | ||
static execute<C extends CommandContext>(context: ContextArg<C>, routes?: IRoute<Action<C, any, IRunnable>>[]): Promise<Commander<ApplyContext<C>>>; | ||
handle(): Promise<Commander<any>>; | ||
static execute<C extends CommandContext>(context: ContextArg<C>, routes?: IRoute<Action<C, any, IRunnable>>[]): Promise<Commander<C>>; | ||
handle(): Promise<Commander<C>>; | ||
dispose(): Promise<void>; | ||
getHeartbeat(): Heartbeat; | ||
} |
@@ -39,3 +39,3 @@ "use strict"; | ||
getHeartbeat() { | ||
return unit_1.Heartbeat.create(this, (fn) => unit_1.Disposable.attach(this, fn)); | ||
return unit_1.Heartbeat.create(this); | ||
} | ||
@@ -42,0 +42,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { ApplyContext, Context } from "@bunt/unit"; | ||
import { Context } from "@bunt/unit"; | ||
import { Argv, Program } from "@bunt/util"; | ||
@@ -8,2 +8,1 @@ export declare class CommandContext extends Context { | ||
} | ||
export declare type ICommandContext = ApplyContext<CommandContext>; |
{ | ||
"name": "@bunt/cli", | ||
"version": "0.18.3", | ||
"version": "0.19.0", | ||
"keywords": [ | ||
@@ -29,8 +29,8 @@ "typescript" | ||
"dependencies": { | ||
"@bunt/app": "^0.18.3", | ||
"@bunt/util": "^0.18.2", | ||
"@bunt/app": "^0.19.0", | ||
"@bunt/util": "^0.19.0", | ||
"path-to-regexp": "^6.2.0" | ||
}, | ||
"license": "MIT", | ||
"gitHead": "55fa5286572395dbf967f7770a06cdeda179d7d9" | ||
"gitHead": "8e62b6bb684e9b7cc47b50f0be41c04020e1f9e7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20950
194
+ Added@bunt/app@0.19.18(transitive)
+ Added@bunt/input@0.19.18(transitive)
+ Added@bunt/unit@0.19.18(transitive)
+ Added@bunt/util@0.19.18(transitive)
- Removed@bunt/app@0.18.3(transitive)
- Removed@bunt/input@0.18.2(transitive)
- Removed@bunt/unit@0.18.3(transitive)
- Removed@bunt/util@0.18.2(transitive)
Updated@bunt/app@^0.19.0
Updated@bunt/util@^0.19.0