Skip to content

Commit

Permalink
chore(cmds,logs): improve defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Aug 8, 2024
1 parent 8e54326 commit 80cde96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmds/cmds.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class CommandContext extends Logged {
info: string
}> = {}) {
super()
this.name = options.name ?? new.target.constructor.name
this.name = options.name ?? ''
this.info = options.info ?? 'CLI by @hackbg/cmds'
this.log.label = this.name
hideProperties(this, 'cwd', 'env')
Expand Down
2 changes: 1 addition & 1 deletion logs/logs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Console extends defineCallable(function log(...args){

constructor (label, options = {}) {
super()
this.label = options.label ?? label ?? ''
this.label = options.label ?? label ?? this.label ?? ''
this.parent = options.parent ?? console
hideProperties(this,
'label', 'tags', 'tag', '_tag', 'parent', 'sub',
Expand Down

0 comments on commit 80cde96

Please sign in to comment.