diff --git a/bin/cli/base.js b/bin/cli/base.js index f44e9a6..574782d 100644 --- a/bin/cli/base.js +++ b/bin/cli/base.js @@ -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) { diff --git a/package-lock.json b/package-lock.json index 58ea9e4..56794ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3820,7 +3820,8 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", - "dev": true + "dev": true, + "optional": true }, "har-schema": { "version": "2.0.0", @@ -7277,6 +7278,7 @@ "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.1.tgz", "integrity": "sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA==", "dev": true, + "optional": true, "requires": { "growly": "^1.3.0", "is-wsl": "^2.2.0", @@ -7291,6 +7293,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", "dev": true, + "optional": true, "requires": { "lru-cache": "^6.0.0" } @@ -7299,13 +7302,15 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true + "dev": true, + "optional": true }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "optional": true, "requires": { "isexe": "^2.0.0" } @@ -8746,7 +8751,8 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "dev": true + "dev": true, + "optional": true }, "signal-exit": { "version": "3.0.2", diff --git a/src/__tests__/beau.spec.js b/src/__tests__/beau.spec.js index 1bd2791..b0c4df5 100644 --- a/src/__tests__/beau.spec.js +++ b/src/__tests__/beau.spec.js @@ -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' diff --git a/src/__tests__/config.spec.js b/src/__tests__/config.spec.js index 463cf2d..68c4833 100644 --- a/src/__tests__/config.spec.js +++ b/src/__tests__/config.spec.js @@ -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