Compare commits

...

12 Commits

Author SHA1 Message Date
dependabot-preview[bot] eee0aa95ea
Bump js-yaml from 3.14.0 to 4.0.0 (#186)
* Bump js-yaml from 3.14.0 to 4.0.0

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.0 to 4.0.0.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.0...4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updating js-yaml to 4.0

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: David Diaz <seich@martianwabbit.com>
2021-01-29 13:16:29 -06:00
David Díaz b54d2158df
Fixed how endpoints are displayed on the list command. (#190) 2021-01-29 12:49:05 -06:00
dependabot-preview[bot] 8b72a42af1
Bump better-ajv-errors from 0.6.7 to 0.7.0 (#189)
Bumps [better-ajv-errors](https://github.com/atlassian/better-ajv-errors) from 0.6.7 to 0.7.0.
- [Release notes](https://github.com/atlassian/better-ajv-errors/releases)
- [Changelog](https://github.com/atlassian/better-ajv-errors/blob/master/CHANGELOG.md)
- [Commits](https://github.com/atlassian/better-ajv-errors/compare/better-ajv-errors@0.6.7...better-ajv-errors@0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-12 19:57:07 -06:00
dependabot-preview[bot] ac432305b9
Bump globby from 11.0.1 to 11.0.2 (#188)
Bumps [globby](https://github.com/sindresorhus/globby) from 11.0.1 to 11.0.2.
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](https://github.com/sindresorhus/globby/compare/v11.0.1...v11.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-12 19:53:35 -06:00
dependabot-preview[bot] 98c6b4d941
Bump ajv from 7.0.0-beta.6 to 7.0.3 (#187)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 7.0.0-beta.6 to 7.0.3.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v7.0.0-beta.6...v7.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-12 19:49:41 -06:00
dependabot-preview[bot] 1027825091
Bump np from 7.0.0 to 7.2.0 (#185)
Bumps [np](https://github.com/sindresorhus/np) from 7.0.0 to 7.2.0.
- [Release notes](https://github.com/sindresorhus/np/releases)
- [Commits](https://github.com/sindresorhus/np/compare/v7.0.0...v7.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-12 19:46:22 -06:00
dependabot[bot] 7e7ae395f9
Bump node-notifier from 8.0.0 to 8.0.1 (#183)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-12 19:26:52 -06:00
dependabot-preview[bot] e0de623d1a
Bump @oclif/plugin-help from 3.2.0 to 3.2.1 (#179)
Bumps [@oclif/plugin-help](https://github.com/oclif/plugin-help) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/oclif/plugin-help/releases)
- [Changelog](https://github.com/oclif/plugin-help/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oclif/plugin-help/compare/v3.2.0...v3.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-12 19:23:28 -06:00
dependabot-preview[bot] 92485a5277
[Security] Bump ini from 1.3.5 to 1.3.8 (#176)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. **This update includes a security fix.**
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-12 19:06:39 -06:00
dependabot[bot] 3175e8c142
Bump ini from 1.3.5 to 1.3.7 (#175)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-06 15:01:53 -06:00
David Diaz 2302763503 0.11.3 2020-11-26 16:07:27 -06:00
David Diaz fd2cc609ea Fixed typo. 2020-11-26 16:06:22 -06:00
7 changed files with 520 additions and 829 deletions

View File

@ -18,7 +18,7 @@ class Base extends Command {
}
let config
yaml.safeLoadAll(fs.readFileSync(configFile, 'utf-8'), (doc) => {
yaml.loadAll(fs.readFileSync(configFile, 'utf-8'), (doc) => {
const valid = validate(doc)
if (!valid) {

View File

@ -1,5 +1,6 @@
const clc = require('cli-color')
const { Line } = require('clui')
const { expandPath } = require('../../../src/shared')
const Base = require('../base')
class ListCommand extends Base {
@ -31,9 +32,7 @@ class ListCommand extends Base {
.padding(2)
.column(VERB, 20, [clc.yellow])
.column(ALIAS, 30, [clc.yellow])
.column(
ENDPOINT.replace(/\/$/, '') + '/' + PATH.replace(/^\//, '')
)
.column(expandPath(ENDPOINT, PATH))
.output()
)

View File

@ -76,7 +76,7 @@ class RequestCommand extends Base {
const { name } = await prompts({
name: 'name',
message: 'Pick as Request to execute',
message: 'Pick a Request to execute',
type: 'select',
choices: requests
})

1306
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "beau",
"version": "0.11.2",
"version": "0.11.3",
"description": "Testing APIs made easy.",
"main": "./src/beau.js",
"author": "David Díaz <seich@martianwabbit.com>",
@ -17,19 +17,19 @@
"dependencies": {
"@oclif/command": "1.8.0",
"@oclif/config": "1.17.0",
"@oclif/plugin-help": "3.2.0",
"@oclif/plugin-help": "3.2.1",
"@oclif/plugin-warn-if-update-available": "1.7.0",
"ajv": "7.0.0-beta.6",
"ajv": "7.0.3",
"beau-std": "0.9.4",
"better-ajv-errors": "0.6.7",
"better-ajv-errors": "0.7.0",
"cli-color": "2.0.0",
"clui": "0.3.6",
"color-json": "2.0.1",
"deepmerge": "4.2.2",
"dotenv": "8.2.0",
"globby": "11.0.1",
"globby": "11.0.2",
"is-plain-object": "5.0.0",
"js-yaml": "3.14.0",
"js-yaml": "4.0.0",
"prompts": "2.4.0",
"request": "2.88.2",
"request-promise-native": "1.0.9",
@ -40,7 +40,7 @@
"jest": "26.6.3",
"jest-watch-typeahead": "0.6.1",
"strip-ansi": "6.0.0",
"np": "7.0.0"
"np": "7.2.0"
},
"oclif": {
"commands": "./bin/cli/commands",

View File

@ -11,7 +11,7 @@ describe(`Beau's config Loader.`, () => {
it('should load the config', () => {
moduleVersion.mockReturnValue(1)
const doc = yaml.safeLoad(`
const doc = yaml.load(`
version: 1
endpoint: 'http://example.com'
@ -27,7 +27,7 @@ describe(`Beau's config Loader.`, () => {
it(`should load the request list using the configuration`, () => {
moduleVersion.mockReturnValue(1)
const doc = yaml.safeLoad(`
const doc = yaml.load(`
version: 1
endpoint: 'http://example.com'

View File

@ -6,7 +6,7 @@ requireg.resolving = false
describe('Config', () => {
it('should load valid config keys', () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
version: 1
endpoint: http://martianwabbit.com
shouldntBeAdded: true
@ -19,7 +19,7 @@ describe('Config', () => {
})
it('should load requests', () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
endpoint: http://example.com
GET /profile: get-profile
@ -36,7 +36,7 @@ describe('Config', () => {
})
it('should set up defaults for all requests', () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
version: 1
endpoint: 'http://example.com'
@ -60,7 +60,7 @@ describe('Config', () => {
})
it('should load multiple hosts', () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
version: 1
endpoint: http://example.org
@ -105,7 +105,7 @@ describe('Config', () => {
})
it('should namespace all aliases within an host', () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
hosts:
- host: test1
endpoint: http://example.com
@ -122,7 +122,7 @@ describe('Config', () => {
})
it(`should throw if host doesn't have a host key`, () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
hosts:
- endpoint: http://example.com
GET /posts: posts
@ -136,7 +136,7 @@ describe('Config', () => {
})
it(`should merge host settings with global settings`, () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
defaults:
headers:
hello: 1
@ -159,7 +159,7 @@ describe('Config', () => {
})
it(`should allow different settings for the same request`, () => {
const doc = yaml.safeLoad(`
const doc = yaml.load(`
host: https://example.com
GET /1:
- alias: req1