Skip to content

Commit

Permalink
Use new requirements config. Closes #122
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Nov 7, 2018
1 parent 7cc122b commit 08e2a10
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 46 deletions.
4 changes: 0 additions & 4 deletions lib/directory.js
@@ -1,7 +1,5 @@
'use strict';

// Load modules

const Path = require('path');

const Boom = require('boom');
Expand All @@ -13,8 +11,6 @@ const File = require('./file');
const Fs = require('./fs');


// Declare internals

const internals = {};


Expand Down
4 changes: 0 additions & 4 deletions lib/etag.js
@@ -1,16 +1,12 @@
'use strict';

// Load modules

const Crypto = require('crypto');

const Boom = require('boom');
const Bounce = require('bounce');
const LruCache = require('lru-cache');


// Declare internals

const internals = {
pendings: Object.create(null)
};
Expand Down
4 changes: 0 additions & 4 deletions lib/file.js
@@ -1,7 +1,5 @@
'use strict';

// Load modules

const Path = require('path');

const Ammo = require('ammo');
Expand All @@ -14,8 +12,6 @@ const Etag = require('./etag');
const Fs = require('./fs');


// Declare internals

const internals = {};


Expand Down
4 changes: 0 additions & 4 deletions lib/fs.js
@@ -1,7 +1,5 @@
'use strict';

// Load modules

const Fs = require('fs');
const Util = require('util');

Expand All @@ -10,8 +8,6 @@ const Bounce = require('bounce');
const Hoek = require('hoek');


// Declare internals

const internals = {
methods: {
promised: ['open', 'close', 'fstat', 'readdir'],
Expand Down
10 changes: 5 additions & 5 deletions lib/index.js
@@ -1,15 +1,12 @@
'use strict';

// Load modules
const Hoek = require('hoek');
const Joi = require('joi');

const Directory = require('./directory');
const Etag = require('./etag');
const File = require('./file');
const Hoek = require('hoek');
const Joi = require('joi');


// Declare internals

const internals = {
schema: Joi.object({
Expand Down Expand Up @@ -37,6 +34,9 @@ internals.fileMethod = function (path, responseOptions) {
exports.plugin = {
pkg: require('../package.json'),
once: true,
requirements: {
hapi: '>=17.7.0'
},

register(server, options) {

Expand Down
6 changes: 0 additions & 6 deletions package.json
Expand Up @@ -11,12 +11,6 @@
"hapi",
"plugin"
],
"engines": {
"node": ">=8.9.0"
},
"peerDependencies": {
"hapi": ">=17.0.0"
},
"dependencies": {
"ammo": "3.x.x",
"boom": "7.x.x",
Expand Down
6 changes: 0 additions & 6 deletions test/directory.js
@@ -1,7 +1,5 @@
'use strict';

// Load modules

const Fs = require('fs');
const Os = require('os');
const Path = require('path');
Expand All @@ -15,13 +13,9 @@ const InertFs = require('../lib/fs');
const Lab = require('lab');


// Declare internals

const internals = {};


// Test shortcuts

const lab = exports.lab = Lab.script();
const describe = lab.describe;
const it = lab.it;
Expand Down
8 changes: 1 addition & 7 deletions test/file.js
@@ -1,7 +1,5 @@
'use strict';

// Load modules

const ChildProcess = require('child_process');
const Fs = require('fs');
const Os = require('os');
Expand All @@ -16,13 +14,9 @@ const InertFs = require('../lib/fs');
const Lab = require('lab');


// Declare internals

const internals = {};


// Test shortcuts

const lab = exports.lab = Lab.script();
const { describe, it } = lab;
const expect = Code.expect;
Expand Down Expand Up @@ -305,7 +299,7 @@ describe('file', () => {

const res = await server.inject('/filefn/index.js');
expect(res.statusCode).to.equal(200);
expect(res.payload).to.contain('// Load modules');
expect(res.payload).to.contain('Set correct confine value');
expect(res.headers['content-type']).to.equal('application/javascript; charset=utf-8');
expect(res.headers['content-length']).to.exist();
});
Expand Down
6 changes: 0 additions & 6 deletions test/security.js
@@ -1,7 +1,5 @@
'use strict';

// Load modules

const Path = require('path');

const Code = require('code');
Expand All @@ -11,13 +9,9 @@ const Inert = require('..');
const Lab = require('lab');


// Declare internals

const internals = {};


// Test shortcuts

const lab = exports.lab = Lab.script();
const describe = lab.describe;
const it = lab.it;
Expand Down

0 comments on commit 08e2a10

Please sign in to comment.