diff --git a/CHANGELOG.md b/CHANGELOG.md index f81fd37..534695b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 3.0.5 +## Security + +- Remove hasbin dependency + ## Features - Add ability to provide function to execute when calling sls wsgi command diff --git a/index.js b/index.js index 872c75f..309ad9d 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ const _ = require("lodash"); const path = require("path"); const fse = BbPromise.promisifyAll(require("fs-extra")); const child_process = require("child_process"); -const hasbin = require("hasbin"); +const commandExists = require("command-exists"); const overrideStdoutWrite = require("process-utils/override-stdout-write"); class ServerlessWSGI { @@ -137,7 +137,7 @@ class ServerlessWSGI { } if (this.serverless.service.provider.runtime) { - if (hasbin.sync(this.serverless.service.provider.runtime)) { + if (commandExists.sync(this.serverless.service.provider.runtime)) { this.serverless.cli.log( `Using Python specified in "runtime": ${this.serverless.service.provider.runtime}` ); @@ -282,7 +282,7 @@ class ServerlessWSGI { if (linkConflict) { return reject( `Unable to link dependency '${file}' ` + - "because a file by the same name exists in this service" + "because a file by the same name exists in this service" ); } } @@ -498,7 +498,7 @@ class ServerlessWSGI { // remotely, we get a string back and we want it to appear in the console as it would have // if it was invoked locally. // - // We capture stdout output in order to parse the array returned from the lambda invocation, + // We capture stdout output in order to parse the array returned from the lambda invocation, // then restore stdout. let output = ""; diff --git a/index.test.js b/index.test.js index b265887..9e89e97 100644 --- a/index.test.js +++ b/index.test.js @@ -7,7 +7,7 @@ const Plugin = require("./index"); const child_process = require("child_process"); const path = require("path"); const fse = require("fs-extra"); -const hasbin = require("hasbin"); +const commandExists = require("command-exists"); const BbPromise = require("bluebird"); const chaiAsPromised = require("chai-as-promised"); @@ -70,13 +70,13 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var procStub = sandbox.stub(child_process, "spawnSync"); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(copyStub.called).to.be.false; expect(writeStub.called).to.be.false; expect(procStub.called).to.be.false; @@ -100,7 +100,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var procStub = sandbox @@ -108,7 +108,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( copyStub.calledWith( path.resolve(__dirname, "wsgi_handler.py"), @@ -163,13 +163,13 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); sandbox.stub(child_process, "spawnSync").returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(writeStub.calledWith("/tmp/.serverless-wsgi")).to.be.true; expect(JSON.parse(writeStub.lastCall.args[1])).to.deep.equal({ app: "api.app", @@ -199,7 +199,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(false); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(false); sandbox.stub(fse, "copyAsync"); sandbox.stub(fse, "writeFileAsync"); var procStub = sandbox @@ -207,7 +207,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python3.6")).to.be.true; + expect(commandExistsStub.calledWith("python3.6")).to.be.true; expect( procStub.calledWith("python", [ path.resolve(__dirname, "requirements.py"), @@ -266,7 +266,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var symlinkStub = sandbox.stub(fse, "symlinkSync"); @@ -277,7 +277,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( copyStub.calledWith( path.resolve(__dirname, "wsgi_handler.py"), @@ -337,7 +337,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var symlinkStub = sandbox.stub(fse, "symlinkSync"); @@ -348,7 +348,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( copyStub.calledWith( path.resolve(__dirname, "wsgi_handler.py"), @@ -407,7 +407,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var symlinkStub = sandbox.stub(fse, "symlinkSync"); @@ -418,7 +418,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(copyStub.called).to.be.true; expect(writeStub.called).to.be.true; expect(symlinkStub.called).to.be.true; @@ -462,7 +462,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var symlinkStub = sandbox.stub(fse, "symlinkSync"); @@ -473,7 +473,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.called).to.be.false; + expect(commandExistsStub.called).to.be.false; expect(copyStub.called).to.be.true; expect(writeStub.called).to.be.true; expect(symlinkStub.called).to.be.true; @@ -559,7 +559,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - sandbox.stub(hasbin, "sync").returns(true); + sandbox.stub(commandExists, "sync").returns(true); sandbox.stub(fse, "copyAsync"); sandbox.stub(fse, "writeFileAsync"); sandbox.stub(fse, "symlinkSync").throws(); @@ -586,7 +586,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - sandbox.stub(hasbin, "sync").returns(true); + sandbox.stub(commandExists, "sync").returns(true); sandbox.stub(fse, "copyAsync"); sandbox.stub(fse, "writeFileAsync"); sandbox.stub(fse, "symlinkSync").throws(); @@ -613,7 +613,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); sandbox.stub(fse, "symlinkSync").throws(); @@ -625,7 +625,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(copyStub.called).to.be.false; expect(writeStub.called).to.be.false; expect( @@ -655,7 +655,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); sandbox.stub(fse, "symlinkSync").throws(); @@ -667,7 +667,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python3.6")).to.be.true; + expect(commandExistsStub.calledWith("python3.6")).to.be.true; expect(copyStub.called).to.be.false; expect(writeStub.called).to.be.false; expect( @@ -696,7 +696,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); sandbox.stub(fse, "existsSync").returns(false); @@ -705,7 +705,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(copyStub.called).to.be.false; expect(writeStub.called).to.be.false; expect(procStub.called).to.be.false; @@ -732,7 +732,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - sandbox.stub(hasbin, "sync").returns(true); + sandbox.stub(commandExists, "sync").returns(true); sandbox.stub(fse, "existsSync").returns(true); sandbox.stub(child_process, "spawnSync").returns({ status: 1 }); @@ -755,7 +755,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - sandbox.stub(hasbin, "sync").returns(true); + sandbox.stub(commandExists, "sync").returns(true); sandbox.stub(fse, "existsSync").returns(true); sandbox .stub(child_process, "spawnSync") @@ -780,7 +780,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - sandbox.stub(hasbin, "sync").returns(true); + sandbox.stub(commandExists, "sync").returns(true); sandbox.stub(fse, "existsSync").returns(true); sandbox .stub(child_process, "spawnSync") @@ -808,7 +808,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var existsStub = sandbox.stub(fse, "existsSync").returns(true); @@ -817,7 +817,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(copyStub.called).to.be.true; expect(writeStub.called).to.be.true; expect(existsStub.called).to.be.false; @@ -873,7 +873,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var existsStub = sandbox.stub(fse, "existsSync").returns(true); @@ -882,7 +882,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:package:createDeploymentArtifacts"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(copyStub.called).to.be.true; expect(writeStub.called).to.be.true; expect(existsStub.called).to.be.false; @@ -916,7 +916,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); var procStub = sandbox @@ -924,7 +924,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:deploy:function:packageFunction"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect(copyStub.called).to.be.false; expect(writeStub.called).to.be.false; expect(procStub.called).to.be.true; @@ -952,7 +952,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); sandbox.stub(fse, "readdirSync").returns([]); @@ -962,7 +962,7 @@ describe("serverless-wsgi", () => { .returns({ status: 0 }); return plugin.hooks["before:deploy:function:packageFunction"]().then( () => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( copyStub.calledWith( path.resolve(__dirname, "wsgi_handler.py"), @@ -1058,10 +1058,10 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox.stub(child_process, "spawnSync").returns({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1094,14 +1094,14 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox .stub(child_process, "spawnSync") .returns({ error: "Something failed" }); return expect( plugin.hooks["wsgi:serve:serve"]() ).to.eventually.be.rejected.and.notify(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1134,14 +1134,14 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox .stub(child_process, "spawnSync") .returns({ error: { code: "ENOENT" } }); return expect( plugin.hooks["wsgi:serve:serve"]() ).to.eventually.be.rejected.and.notify(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1174,10 +1174,10 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox.stub(child_process, "spawnSync").returns({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1210,10 +1210,10 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox.stub(child_process, "spawnSync").returns({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1246,10 +1246,10 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox.stub(child_process, "spawnSync").returns({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1283,10 +1283,10 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox.stub(child_process, "spawnSync").returns({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1321,10 +1321,10 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox.stub(child_process, "spawnSync").returns({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1372,7 +1372,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - sandbox.stub(hasbin, "sync").returns(true); + sandbox.stub(commandExists, "sync").returns(true); sandbox.stub(child_process, "spawnSync").returns({}); sandbox.stub(process, "env").value({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { @@ -1403,10 +1403,10 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var procStub = sandbox.stub(child_process, "spawnSync").returns({}); return plugin.hooks["wsgi:serve:serve"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( procStub.calledWith( "python2.7", @@ -1441,7 +1441,7 @@ describe("serverless-wsgi", () => { ); var sandbox = sinon.createSandbox(); - var hasbinStub = sandbox.stub(hasbin, "sync").returns(true); + var commandExistsStub = sandbox.stub(commandExists, "sync").returns(true); var copyStub = sandbox.stub(fse, "copyAsync"); var writeStub = sandbox.stub(fse, "writeFileAsync"); sandbox.stub(fse, "readdirSync").returns([]); @@ -1450,7 +1450,7 @@ describe("serverless-wsgi", () => { .stub(child_process, "spawnSync") .returns({ status: 0 }); return plugin.hooks["wsgi:install:install"]().then(() => { - expect(hasbinStub.calledWith("python2.7")).to.be.true; + expect(commandExistsStub.calledWith("python2.7")).to.be.true; expect( copyStub.calledWith( path.resolve(__dirname, "wsgi_handler.py"), diff --git a/package-lock.json b/package-lock.json index 5bd7e18..8ee0074 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,8 @@ "license": "MIT", "dependencies": { "bluebird": "^3.7.2", - "fs-extra": "^11.1.1", - "hasbin": "^1.2.3", + "command-exists": "^1.2.9", + "fs-extra": "^11.2.0", "lodash": "^4.17.21", "process-utils": "^4.0.0" }, @@ -321,7 +321,8 @@ "node_modules/async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==" + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true }, "node_modules/balanced-match": { "version": "1.0.2", @@ -518,6 +519,11 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1068,9 +1074,9 @@ "dev": true }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -1228,17 +1234,6 @@ "node": ">=8" } }, - "node_modules/hasbin": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/hasbin/-/hasbin-1.2.3.tgz", - "integrity": "sha512-CCd8e/w2w28G8DyZvKgiHnQJ/5XXDz6qiUHnthvtag/6T5acUeN5lqq+HMoBqcmgWueWDhiCplrw0Kb1zDACRg==", - "dependencies": { - "async": "~1.5" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", diff --git a/package.json b/package.json index cdb60ad..992b7c7 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ }, "dependencies": { "bluebird": "^3.7.2", - "fs-extra": "^11.1.1", - "hasbin": "^1.2.3", + "command-exists": "^1.2.9", + "fs-extra": "^11.2.0", "lodash": "^4.17.21", "process-utils": "^4.0.0" },