git improve npmextra.json config
This commit is contained in:
@@ -8,16 +8,18 @@ import { repo } from './npmci.env'
|
||||
import { KeyValueStore } from 'npmextra'
|
||||
|
||||
export interface INpmciOptions {
|
||||
globalNpmTools: string[]
|
||||
npmGlobalTools: string[]
|
||||
dockerRegistryRepoMap: any
|
||||
}
|
||||
|
||||
// instantiate a kvStorage for the current directory
|
||||
export let kvStorage = new KeyValueStore('custom', repo.user + repo.repo)
|
||||
export let kvStorage = new KeyValueStore('custom', `${repo.user}_${repo.repo}`)
|
||||
|
||||
export let getConfig = async (): Promise<INpmciOptions> => {
|
||||
let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd)
|
||||
let defaultConfig: INpmciOptions = {
|
||||
globalNpmTools: []
|
||||
npmGlobalTools: [],
|
||||
dockerRegistryRepoMap: {}
|
||||
}
|
||||
let npmciConfig = npmciNpmextra.dataFor<INpmciOptions>('npmci', defaultConfig)
|
||||
return npmciConfig
|
||||
|
||||
Reference in New Issue
Block a user