@adobe/aio-cli-plugin-config
Advanced tools
Comparing version 3.0.1 to 4.0.0
@@ -1,1 +0,1 @@ | ||
{"version":"3.0.1","commands":{"config:clear":{"id":"config:clear","description":"clears all persistent config values","pluginName":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","hidden":true,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","hidden":true,"allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"do not prompt for confirmation","allowNo":false}},"args":[]},"config:delete":{"id":"config:delete","description":"deletes persistent config values","pluginName":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":["config:del","config:rm"],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","hidden":true,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","hidden":true,"allowNo":false}},"args":[{"name":"keys...","required":true}]},"config:edit":{"id":"config:edit","description":"edit config file","pluginName":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","hidden":true,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","hidden":true,"allowNo":false}},"args":[]},"config:get":{"id":"config:get","description":"gets a persistent config value","pluginName":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"output in json","hidden":false,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"output in yaml","hidden":false,"allowNo":false},"env":{"name":"env","type":"boolean","char":"e","description":"environment variables","allowNo":false}},"args":[{"name":"key","required":true}]},"config":{"id":"config","description":"list, get, set, delete, and edit persistent configuration data","pluginName":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":["config:ls"],"examples":["$ aio config:list","$ aio config:get KEY","$ aio config:set KEY VALUE","$ aio config:delete KEY","$ aio config:clear"],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"output in json","hidden":false,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"output in yaml","hidden":false,"allowNo":false},"env":{"name":"env","type":"boolean","char":"e","description":"environment variables","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"show all config values","allowNo":false}},"args":[]},"config:list":{"id":"config:list","description":"lists all persistent config values","pluginName":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":["config:ls"],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"output in json","hidden":false,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"output in yaml","hidden":false,"allowNo":false},"env":{"name":"env","type":"boolean","char":"e","description":"environment variables","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"show all config values","allowNo":false}},"args":[]},"config:set":{"id":"config:set","description":"sets a persistent config value","usage":["config set key 'a value' # set key to 'a value'","config set key -f value.json # set key to the json found in the file value.json","config set -j key < value.json # set key to the json found in the file value.json"],"pluginName":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"value is json","hidden":false,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"value is yaml","hidden":false,"allowNo":false},"file":{"name":"file","type":"boolean","char":"f","description":"value is a path to a file","allowNo":false},"interactive":{"name":"interactive","type":"boolean","char":"i","description":"prompt for value","allowNo":false}},"args":[{"name":"key","required":true},{"name":"value|filename","required":false}]}}} | ||
{"version":"4.0.0","commands":{"config:clear":{"id":"config:clear","description":"clears all persistent config values","strict":true,"pluginName":"@adobe/aio-cli-plugin-config","pluginAlias":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false,"exclusive":["global"]},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false,"exclusive":["local"]},"json":{"name":"json","type":"boolean","char":"j","hidden":true,"allowNo":false,"exclusive":["yaml"]},"yaml":{"name":"yaml","type":"boolean","char":"y","hidden":true,"allowNo":false,"exclusive":["json"]},"force":{"name":"force","type":"boolean","char":"f","description":"do not prompt for confirmation","allowNo":false}},"args":[]},"config:delete":{"id":"config:delete","description":"deletes persistent config values","strict":false,"pluginName":"@adobe/aio-cli-plugin-config","pluginAlias":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":["config:del","config:rm"],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false,"exclusive":["global"]},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false,"exclusive":["local"]},"json":{"name":"json","type":"boolean","char":"j","hidden":true,"allowNo":false,"exclusive":["yaml"]},"yaml":{"name":"yaml","type":"boolean","char":"y","hidden":true,"allowNo":false,"exclusive":["json"]}},"args":[{"name":"keys...","required":true}]},"config:edit":{"id":"config:edit","description":"edit config file","strict":true,"pluginName":"@adobe/aio-cli-plugin-config","pluginAlias":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false,"exclusive":["global"]},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false,"exclusive":["local"]},"json":{"name":"json","type":"boolean","char":"j","hidden":true,"allowNo":false,"exclusive":["yaml"]},"yaml":{"name":"yaml","type":"boolean","char":"y","hidden":true,"allowNo":false,"exclusive":["json"]}},"args":[]},"config:get":{"id":"config:get","description":"gets a persistent config value","strict":true,"pluginName":"@adobe/aio-cli-plugin-config","pluginAlias":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false,"exclusive":["global"]},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false,"exclusive":["local"]},"json":{"name":"json","type":"boolean","char":"j","description":"output in json","hidden":false,"allowNo":false,"exclusive":["yaml"]},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"output in yaml","hidden":false,"allowNo":false,"exclusive":["json"]},"env":{"name":"env","type":"boolean","char":"e","description":"environment variables","allowNo":false}},"args":[{"name":"key","required":true}]},"config":{"id":"config","description":"list, get, set, delete, and edit persistent configuration data","strict":true,"pluginName":"@adobe/aio-cli-plugin-config","pluginAlias":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":["config:ls"],"examples":["$ aio config:list","$ aio config:get KEY","$ aio config:set KEY VALUE","$ aio config:delete KEY","$ aio config:clear"],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false,"exclusive":["global"]},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false,"exclusive":["local"]},"json":{"name":"json","type":"boolean","char":"j","description":"output in json","hidden":false,"allowNo":false,"exclusive":["yaml"]},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"output in yaml","hidden":false,"allowNo":false,"exclusive":["json"]},"env":{"name":"env","type":"boolean","char":"e","description":"environment variables","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"show all config values","allowNo":false,"exclusive":["yaml","json"]}},"args":[]},"config:list":{"id":"config:list","description":"lists all persistent config values","strict":true,"pluginName":"@adobe/aio-cli-plugin-config","pluginAlias":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":["config:ls"],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false,"exclusive":["global"]},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false,"exclusive":["local"]},"json":{"name":"json","type":"boolean","char":"j","description":"output in json","hidden":false,"allowNo":false,"exclusive":["yaml"]},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"output in yaml","hidden":false,"allowNo":false,"exclusive":["json"]},"env":{"name":"env","type":"boolean","char":"e","description":"environment variables","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"show all config values","allowNo":false,"exclusive":["yaml","json"]}},"args":[]},"config:set":{"id":"config:set","description":"sets a persistent config value","strict":true,"usage":["config set key 'a value' # set key to 'a value'","config set key -f value.json # set key to the json found in the file value.json","config set -j key < value.json # set key to the json found in the file value.json"],"pluginName":"@adobe/aio-cli-plugin-config","pluginAlias":"@adobe/aio-cli-plugin-config","pluginType":"core","aliases":[],"flags":{"local":{"name":"local","type":"boolean","char":"l","description":"local config","allowNo":false,"exclusive":["global"]},"global":{"name":"global","type":"boolean","char":"g","description":"global config","allowNo":false,"exclusive":["local"]},"json":{"name":"json","type":"boolean","char":"j","description":"value is json","hidden":false,"allowNo":false},"yaml":{"name":"yaml","type":"boolean","char":"y","description":"value is yaml","hidden":false,"allowNo":false},"file":{"name":"file","type":"boolean","char":"f","description":"value is a path to a file","allowNo":false,"exclusive":["interactive"]},"interactive":{"name":"interactive","type":"boolean","char":"i","description":"prompt for value","allowNo":false,"exclusive":["file"]}},"args":[{"name":"key","required":true},{"name":"value|filename","required":false}]}}} |
{ | ||
"name": "@adobe/aio-cli-plugin-config", | ||
"description": "Config Plugin for the Adobe I/O CLI", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"author": "Adobe Inc.", | ||
"bugs": "https://github.com/adobe/aio-cli-plugin-config/issues", | ||
"dependencies": { | ||
"@adobe/aio-lib-core-config": "^2.0.0", | ||
"@oclif/command": "^1", | ||
"@oclif/config": "^1", | ||
"@oclif/errors": "^1.1.2", | ||
"cli-ux": "^5.4.1", | ||
"hjson": "^3.1.2", | ||
"js-yaml": "^3.13.0" | ||
"@adobe/aio-lib-core-config": "^3.0.0", | ||
"@oclif/core": "^1.3.5", | ||
"hjson": "^3.2.2", | ||
"js-yaml": "^3.14.1" | ||
}, | ||
"devDependencies": { | ||
"@adobe/eslint-config-aio-lib-config": "^1.2.0", | ||
"@oclif/dev-cli": "^1.21.2", | ||
"@oclif/plugin-help": "^2.1.4", | ||
"@oclif/test": "^1", | ||
"acorn": "^7.0.0", | ||
"@adobe/eslint-config-aio-lib-config": "^1.4.0", | ||
"acorn": "^8.7.0", | ||
"chalk": "^4.0.0", | ||
"eslint": "^6.2.2", | ||
"eslint-config-oclif": "^3.1.0", | ||
"eslint-config-standard": "^14.1.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-jest": "^23.13.2", | ||
"eslint-plugin-jsdoc": "^21.0.0", | ||
"eslint-plugin-node": "^10.0.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint": "^7.32.0", | ||
"eslint-config-oclif": "^4.0.0", | ||
"eslint-config-standard": "^16.0.3", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-jest": "^23.20.0", | ||
"eslint-plugin-jsdoc": "^37.2.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^5.2.0", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"execa": "^4.0.2", | ||
"globby": "^11.0.0", | ||
"jest": "^24.8.0", | ||
"jest-haste-map": "^26.0.0", | ||
"jest-junit": "^10.0.0", | ||
"jest-resolve": "^26.0.0", | ||
"stdout-stderr": "^0.1.9" | ||
"jest": "^27.5.1", | ||
"jest-haste-map": "^27.5.1", | ||
"jest-junit": "^13.0.0", | ||
"jest-resolve": "^27.5.1", | ||
"oclif": "^3.0.1", | ||
"stdout-stderr": "^0.1.13", | ||
"typescript": "^4.5.4" | ||
}, | ||
"engines": { | ||
"node": ">=12.0.0" | ||
"node": "^14.18 || ^16.13 || >=18" | ||
}, | ||
@@ -55,5 +51,2 @@ "files": [ | ||
"bin": "aio", | ||
"devPlugins": [ | ||
"@oclif/plugin-help" | ||
], | ||
"topics": { | ||
@@ -73,24 +66,7 @@ "config": { | ||
"unit-tests": "jest --ci", | ||
"prepack": "oclif-dev manifest && oclif-dev readme", | ||
"prepack": "oclif manifest && oclif readme", | ||
"postpack": "rm -f oclif.manifest.json", | ||
"version": "oclif-dev readme && git add README.md", | ||
"version": "oclif readme && git add README.md", | ||
"e2e": "jest --collectCoverage=false --testRegex './e2e/e2e.js'" | ||
}, | ||
"jest": { | ||
"collectCoverage": true, | ||
"testPathIgnorePatterns": [ | ||
"<rootDir>/tests/fixtures/" | ||
], | ||
"coveragePathIgnorePatterns": [ | ||
"<rootDir>/tests/fixtures/" | ||
], | ||
"reporters": [ | ||
"default", | ||
"jest-junit" | ||
], | ||
"testEnvironment": "node", | ||
"setupFilesAfterEnv": [ | ||
"./test/jest.setup.js" | ||
] | ||
} | ||
} |
152
README.md
@@ -42,2 +42,3 @@ <!-- | ||
* [`aio config:clear`](#aio-configclear) | ||
* [`aio config:del KEYS...`](#aio-configdel-keys) | ||
* [`aio config:delete KEYS...`](#aio-configdelete-keys) | ||
@@ -47,2 +48,4 @@ * [`aio config:edit`](#aio-configedit) | ||
* [`aio config:list`](#aio-configlist) | ||
* [`aio config:ls`](#aio-configls) | ||
* [`aio config:rm KEYS...`](#aio-configrm-keys) | ||
* [`aio config set key 'a value' # set key to 'a value'`](#aio-config-set-key-a-value--------set-key-to-a-value) | ||
@@ -55,8 +58,6 @@ | ||
``` | ||
list, get, set, delete, and edit persistent configuration data | ||
USAGE | ||
$ aio config | ||
$ aio config [-l | -g] [-e] [--verbose | | [-j | -y]] | ||
OPTIONS | ||
FLAGS | ||
-e, --env environment variables | ||
@@ -69,2 +70,5 @@ -g, --global global config | ||
DESCRIPTION | ||
list, get, set, delete, and edit persistent configuration data | ||
ALIASES | ||
@@ -75,9 +79,13 @@ $ aio config:ls | ||
$ aio config:list | ||
$ aio config:get KEY | ||
$ aio config:set KEY VALUE | ||
$ aio config:delete KEY | ||
$ aio config:clear | ||
``` | ||
_See code: [src/commands/config/index.js](https://github.com/adobe/aio-cli-plugin-config/blob/3.0.1/src/commands/config/index.js)_ | ||
_See code: [src/commands/config/index.ts](https://github.com/adobe/aio-cli-plugin-config/blob/4.0.0/src/commands/config/index.ts)_ | ||
@@ -89,16 +97,17 @@ ## `aio config:clear` | ||
``` | ||
clears all persistent config values | ||
USAGE | ||
$ aio config:clear | ||
$ aio config:clear [-l | -g] [-f] | ||
OPTIONS | ||
FLAGS | ||
-f, --force do not prompt for confirmation | ||
-g, --global global config | ||
-l, --local local config | ||
DESCRIPTION | ||
clears all persistent config values | ||
``` | ||
_See code: [src/commands/config/clear.js](https://github.com/adobe/aio-cli-plugin-config/blob/3.0.1/src/commands/config/clear.js)_ | ||
_See code: [src/commands/config/clear.ts](https://github.com/adobe/aio-cli-plugin-config/blob/4.0.0/src/commands/config/clear.ts)_ | ||
## `aio config:delete KEYS...` | ||
## `aio config:del KEYS...` | ||
@@ -108,11 +117,32 @@ deletes persistent config values | ||
``` | ||
USAGE | ||
$ aio config:del [KEYS...] [-l | -g] | ||
FLAGS | ||
-g, --global global config | ||
-l, --local local config | ||
DESCRIPTION | ||
deletes persistent config values | ||
ALIASES | ||
$ aio config:del | ||
$ aio config:rm | ||
``` | ||
## `aio config:delete KEYS...` | ||
deletes persistent config values | ||
``` | ||
USAGE | ||
$ aio config:delete KEYS... | ||
$ aio config:delete [KEYS...] [-l | -g] | ||
OPTIONS | ||
FLAGS | ||
-g, --global global config | ||
-l, --local local config | ||
DESCRIPTION | ||
deletes persistent config values | ||
ALIASES | ||
@@ -123,3 +153,3 @@ $ aio config:del | ||
_See code: [src/commands/config/delete.js](https://github.com/adobe/aio-cli-plugin-config/blob/3.0.1/src/commands/config/delete.js)_ | ||
_See code: [src/commands/config/delete.ts](https://github.com/adobe/aio-cli-plugin-config/blob/4.0.0/src/commands/config/delete.ts)_ | ||
@@ -131,13 +161,14 @@ ## `aio config:edit` | ||
``` | ||
edit config file | ||
USAGE | ||
$ aio config:edit | ||
$ aio config:edit [-l | -g] | ||
OPTIONS | ||
FLAGS | ||
-g, --global global config | ||
-l, --local local config | ||
DESCRIPTION | ||
edit config file | ||
``` | ||
_See code: [src/commands/config/edit.js](https://github.com/adobe/aio-cli-plugin-config/blob/3.0.1/src/commands/config/edit.js)_ | ||
_See code: [src/commands/config/edit.ts](https://github.com/adobe/aio-cli-plugin-config/blob/4.0.0/src/commands/config/edit.ts)_ | ||
@@ -149,8 +180,6 @@ ## `aio config:get KEY` | ||
``` | ||
gets a persistent config value | ||
USAGE | ||
$ aio config:get KEY | ||
$ aio config:get [KEY] [-l | -g] [-j | -y] [-e] | ||
OPTIONS | ||
FLAGS | ||
-e, --env environment variables | ||
@@ -161,5 +190,8 @@ -g, --global global config | ||
-y, --yaml output in yaml | ||
DESCRIPTION | ||
gets a persistent config value | ||
``` | ||
_See code: [src/commands/config/get.js](https://github.com/adobe/aio-cli-plugin-config/blob/3.0.1/src/commands/config/get.js)_ | ||
_See code: [src/commands/config/get.ts](https://github.com/adobe/aio-cli-plugin-config/blob/4.0.0/src/commands/config/get.ts)_ | ||
@@ -171,8 +203,31 @@ ## `aio config:list` | ||
``` | ||
lists all persistent config values | ||
USAGE | ||
$ aio config:list [-l | -g] [-e] [--verbose | | [-j | -y]] | ||
FLAGS | ||
-e, --env environment variables | ||
-g, --global global config | ||
-j, --json output in json | ||
-l, --local local config | ||
-y, --yaml output in yaml | ||
--verbose show all config values | ||
DESCRIPTION | ||
lists all persistent config values | ||
ALIASES | ||
$ aio config:ls | ||
``` | ||
_See code: [src/commands/config/list.ts](https://github.com/adobe/aio-cli-plugin-config/blob/4.0.0/src/commands/config/list.ts)_ | ||
## `aio config:ls` | ||
list, get, set, delete, and edit persistent configuration data | ||
``` | ||
USAGE | ||
$ aio config:list | ||
$ aio config:ls [-l | -g] [-e] [--verbose | | [-j | -y]] | ||
OPTIONS | ||
FLAGS | ||
-e, --env environment variables | ||
@@ -185,8 +240,40 @@ -g, --global global config | ||
DESCRIPTION | ||
list, get, set, delete, and edit persistent configuration data | ||
ALIASES | ||
$ aio config:ls | ||
EXAMPLES | ||
$ aio config:list | ||
$ aio config:get KEY | ||
$ aio config:set KEY VALUE | ||
$ aio config:delete KEY | ||
$ aio config:clear | ||
``` | ||
_See code: [src/commands/config/list.js](https://github.com/adobe/aio-cli-plugin-config/blob/3.0.1/src/commands/config/list.js)_ | ||
## `aio config:rm KEYS...` | ||
deletes persistent config values | ||
``` | ||
USAGE | ||
$ aio config:rm [KEYS...] [-l | -g] | ||
FLAGS | ||
-g, --global global config | ||
-l, --local local config | ||
DESCRIPTION | ||
deletes persistent config values | ||
ALIASES | ||
$ aio config:del | ||
$ aio config:rm | ||
``` | ||
## `aio config set key 'a value' # set key to 'a value'` | ||
@@ -197,4 +284,2 @@ | ||
``` | ||
sets a persistent config value | ||
USAGE | ||
@@ -205,3 +290,3 @@ $ aio config set key 'a value' # set key to 'a value' | ||
OPTIONS | ||
FLAGS | ||
-f, --file value is a path to a file | ||
@@ -213,5 +298,8 @@ -g, --global global config | ||
-y, --yaml value is yaml | ||
DESCRIPTION | ||
sets a persistent config value | ||
``` | ||
_See code: [src/commands/config/set.js](https://github.com/adobe/aio-cli-plugin-config/blob/3.0.1/src/commands/config/set.js)_ | ||
_See code: [src/commands/config/set.ts](https://github.com/adobe/aio-cli-plugin-config/blob/4.0.0/src/commands/config/set.ts)_ | ||
<!-- commandsstop --> |
@@ -13,3 +13,3 @@ /* | ||
const { Command, flags } = require('@oclif/command') | ||
const { Command, Flags } = require('@oclif/core') | ||
const Config = require('@adobe/aio-lib-core-config/src/Config') | ||
@@ -28,4 +28,4 @@ const hjson = require('hjson') | ||
printObject (obj) { | ||
const { flags } = this.parse(this.constructor) | ||
async printObject (obj) { | ||
const { flags } = await this.parse(this.constructor) | ||
@@ -64,8 +64,8 @@ let format = 'hjson' | ||
BaseCommand.flags = { | ||
local: flags.boolean({ char: 'l', description: 'local config', exclusive: ['global'] }), | ||
global: flags.boolean({ char: 'g', description: 'global config', exclusive: ['local'] }), | ||
json: flags.boolean({ char: 'j', hidden: true, exclusive: ['yaml'] }), | ||
yaml: flags.boolean({ char: 'y', hidden: true, exclusive: ['json'] }) | ||
local: Flags.boolean({ char: 'l', description: 'local config', exclusive: ['global'] }), | ||
global: Flags.boolean({ char: 'g', description: 'global config', exclusive: ['local'] }), | ||
json: Flags.boolean({ char: 'j', hidden: true, exclusive: ['yaml'] }), | ||
yaml: Flags.boolean({ char: 'y', hidden: true, exclusive: ['json'] }) | ||
} | ||
module.exports = BaseCommand |
@@ -13,9 +13,8 @@ /* | ||
const { flags } = require('@oclif/command') | ||
const { Flags, CliUx: { ux: cli } } = require('@oclif/core') | ||
const BaseCommand = require('../../base-command') | ||
const { cli } = require('cli-ux') | ||
class ClearCommand extends BaseCommand { | ||
async run () { | ||
const { flags } = this.parse(ClearCommand) | ||
const { flags } = await this.parse(ClearCommand) | ||
@@ -36,5 +35,5 @@ if (!flags.force) { | ||
...BaseCommand.flags, | ||
force: flags.boolean({ char: 'f', description: 'do not prompt for confirmation' }) | ||
force: Flags.boolean({ char: 'f', description: 'do not prompt for confirmation' }) | ||
} | ||
module.exports = ClearCommand |
@@ -17,3 +17,3 @@ /* | ||
async run () { | ||
const { argv, flags } = this.parse(DeleteCommand) | ||
const { argv, flags } = await this.parse(DeleteCommand) | ||
@@ -20,0 +20,0 @@ for (const arg of argv) { |
@@ -18,7 +18,9 @@ /* | ||
async run () { | ||
const { flags } = this.parse(EditCommand) | ||
const { flags } = await this.parse(EditCommand) | ||
const file = (flags.local) ? this.cliConfig.local.file : this.cliConfig.global.file | ||
const cmd = (process.platform === 'win32') ? `${process.env.EDITOR || 'notepad'}` : `${process.env.EDITOR || 'vi'}` | ||
const cmd = (process.platform === 'win32') | ||
? `${process.env.EDITOR || 'notepad'}` | ||
: `${process.env.EDITOR || 'vi'}` | ||
childProcess.spawn(cmd, [file], { | ||
@@ -25,0 +27,0 @@ stdio: 'inherit', |
@@ -13,3 +13,3 @@ /* | ||
const { flags } = require('@oclif/command') | ||
const { Flags } = require('@oclif/core') | ||
const BaseCommand = require('../../base-command') | ||
@@ -19,3 +19,3 @@ | ||
async run () { | ||
const { args, flags } = this.parse(GetCommand) | ||
const { args, flags } = await this.parse(GetCommand) | ||
@@ -31,3 +31,3 @@ let source | ||
this.printObject(vars) | ||
await this.printObject(vars) | ||
} | ||
@@ -40,5 +40,5 @@ } | ||
...BaseCommand.flags, | ||
env: flags.boolean({ char: 'e', description: 'environment variables' }), | ||
json: flags.boolean({ char: 'j', description: 'output in json', hidden: false, exclusive: ['yaml'] }), | ||
yaml: flags.boolean({ char: 'y', description: 'output in yaml', hidden: false, exclusive: ['json'] }) | ||
env: Flags.boolean({ char: 'e', description: 'environment variables' }), | ||
json: Flags.boolean({ char: 'j', description: 'output in json', hidden: false, exclusive: ['yaml'] }), | ||
yaml: Flags.boolean({ char: 'y', description: 'output in yaml', hidden: false, exclusive: ['json'] }) | ||
} | ||
@@ -45,0 +45,0 @@ |
@@ -13,3 +13,3 @@ /* | ||
const { flags } = require('@oclif/command') | ||
const { Flags } = require('@oclif/core') | ||
const BaseCommand = require('../../base-command') | ||
@@ -19,3 +19,3 @@ | ||
async run () { | ||
const { flags } = this.parse(ListCommand) | ||
const { flags } = await this.parse(ListCommand) | ||
let vars = this.cliConfig.values | ||
@@ -29,18 +29,18 @@ | ||
this.log(`---- Global configuration: ${this.cliConfig.global.file}`) | ||
this.printObject(this.cliConfig.global.values) | ||
await this.printObject(this.cliConfig.global.values) | ||
this.log() | ||
this.log(`---- Local configuration: ${this.cliConfig.local.file}`) | ||
this.printObject(this.cliConfig.local.values) | ||
await this.printObject(this.cliConfig.local.values) | ||
this.log() | ||
this.log('---- Environmental Variables') | ||
this.printObject(this.cliConfig.envs) | ||
await this.printObject(this.cliConfig.envs) | ||
this.log() | ||
this.log('---- Active Configuration') | ||
this.printObject(this.cliConfig.values) | ||
await this.printObject(this.cliConfig.values) | ||
this.log() | ||
} else { | ||
this.printObject(vars) | ||
await this.printObject(vars) | ||
} | ||
@@ -55,8 +55,8 @@ } | ||
...BaseCommand.flags, | ||
env: flags.boolean({ char: 'e', description: 'environment variables' }), | ||
verbose: flags.boolean({ description: 'show all config values', exclusive: ['yaml', 'json'] }), | ||
json: flags.boolean({ char: 'j', description: 'output in json', exclusive: ['yaml'], hidden: false }), | ||
yaml: flags.boolean({ char: 'y', description: 'output in yaml', exclusive: ['json'], hidden: false }) | ||
env: Flags.boolean({ char: 'e', description: 'environment variables' }), | ||
verbose: Flags.boolean({ description: 'show all config values', exclusive: ['yaml', 'json'] }), | ||
json: Flags.boolean({ char: 'j', description: 'output in json', exclusive: ['yaml'], hidden: false }), | ||
yaml: Flags.boolean({ char: 'y', description: 'output in yaml', exclusive: ['json'], hidden: false }) | ||
} | ||
module.exports = ListCommand |
@@ -13,3 +13,3 @@ /* | ||
const { flags } = require('@oclif/command') | ||
const { Flags, CliUx: { ux: cli } } = require('@oclif/core') | ||
const BaseCommand = require('../../base-command') | ||
@@ -20,3 +20,2 @@ const fs = require('fs') | ||
const { getPipedData } = require('@adobe/aio-lib-core-config') | ||
const { cli } = require('cli-ux') | ||
const path = require('path') | ||
@@ -26,3 +25,3 @@ | ||
async run () { | ||
const { args, flags } = this.parse(SetCommand) | ||
const { args, flags } = await this.parse(SetCommand) | ||
@@ -84,6 +83,6 @@ let value = args['value|filename'] | ||
...BaseCommand.flags, | ||
json: flags.boolean({ char: 'j', hidden: false, description: 'value is json' }), | ||
yaml: flags.boolean({ char: 'y', hidden: false, description: 'value is yaml' }), | ||
file: flags.boolean({ char: 'f', description: 'value is a path to a file', exclusive: ['interactive'] }), | ||
interactive: flags.boolean({ char: 'i', description: 'prompt for value', exclusive: ['file'] }) | ||
json: Flags.boolean({ char: 'j', hidden: false, description: 'value is json' }), | ||
yaml: Flags.boolean({ char: 'y', hidden: false, description: 'value is yaml' }), | ||
file: Flags.boolean({ char: 'f', description: 'value is a path to a file', exclusive: ['interactive'] }), | ||
interactive: Flags.boolean({ char: 'i', description: 'prompt for value', exclusive: ['file'] }) | ||
} | ||
@@ -90,0 +89,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
40673
4
21
290
1
+ Added@oclif/core@^1.3.5
+ Added@adobe/aio-lib-core-config@3.1.0(transitive)
+ Added@oclif/core@1.26.2(transitive)
+ Added@oclif/screen@3.0.8(transitive)
+ Addedasync@3.2.6(transitive)
+ Addedat-least-node@1.0.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.112.0.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedejs@3.1.10(transitive)
+ Addedfilelist@1.0.4(transitive)
+ Addedfs-extra@9.1.0(transitive)
+ Addedget-package-type@0.1.0(transitive)
+ Addedjake@10.9.2(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addedminimatch@3.1.25.1.6(transitive)
+ Addeduniversalify@2.0.1(transitive)
- Removed@oclif/command@^1
- Removed@oclif/config@^1
- Removed@oclif/errors@^1.1.2
- Removedcli-ux@^5.4.1
- Removed@adobe/aio-lib-core-config@2.0.1(transitive)
- Removed@oclif/command@1.8.36(transitive)
- Removed@oclif/config@1.18.161.18.17(transitive)
- Removed@oclif/errors@1.3.6(transitive)
- Removed@oclif/help@1.0.15(transitive)
- Removed@oclif/parser@3.8.17(transitive)
- Removed@oclif/screen@1.0.4(transitive)
- Removedcli-ux@5.6.7(transitive)
- Removedextract-stack@2.0.0(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removeduniversalify@0.1.2(transitive)
- Removedwrap-ansi@6.2.0(transitive)
Updatedhjson@^3.2.2
Updatedjs-yaml@^3.14.1