Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit c09c281

Browse files
committed
fix: add props to config
1 parent 3721a5c commit c09c281

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {PJSON} from './pjson'
1010
import * as Plugin from './plugin'
1111
import {Topic} from './topic'
1212
import {tsPath} from './ts_node'
13-
import {compact, flatMap, loadJSONSync} from './util'
13+
import {compact, flatMap, loadJSONSync, uniq} from './util'
1414

1515
export type PlatformTypes = 'darwin' | 'linux' | 'win32' | 'aix' | 'freebsd' | 'openbsd' | 'sunos'
1616
export type ArchTypes = 'arm' | 'arm64' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x32' | 'x64' | 'x86'
@@ -22,6 +22,8 @@ export interface Options extends Plugin.Options {
2222
const debug = Debug()
2323

2424
export interface IConfig {
25+
name: string
26+
version: string
2527
pjson: PJSON.CLI
2628
/**
2729
* process.arch
@@ -261,7 +263,7 @@ export class Config implements IConfig {
261263
}
262264

263265
get commands(): Command.Plugin[] { return flatMap(this.plugins, p => p.commands) }
264-
get commandIDs() { return this.commands.map(c => c.id) }
266+
get commandIDs() { return uniq(this.commands.map(c => c.id)) }
265267

266268
protected dir(category: 'cache' | 'data' | 'config'): string {
267269
const base = process.env[`XDG_${category.toUpperCase()}_HOME`]

0 commit comments

Comments
 (0)