diff --git a/secret-squirrel.cjs b/secret-squirrel.cjs new file mode 100644 index 0000000..8e9a4b4 --- /dev/null +++ b/secret-squirrel.cjs @@ -0,0 +1,12 @@ +module.exports = { + files: { + allow: [ + 'test/fixtures/config/sourcemap.js.map' + ], + allowOverrides: [] + }, + strings: { + deny: [], + denyOverrides: [] + } +}; diff --git a/secrets.js b/secrets.js deleted file mode 100644 index 444f6d8..0000000 --- a/secrets.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - whitelist: [ - '23077025-960d-11e6-afcc-07964ee4b5be', // test/fixtures/cloudWatchThresholdResponse.json - 'f8585BOxnGQDMbnkJoM1e' // test/fixtures/config/graphiteWorkingFixture.js - ] -}; diff --git a/src/startup.js b/src/startup.js index 42faa54..20057bf 100644 --- a/src/startup.js +++ b/src/startup.js @@ -45,6 +45,10 @@ function startup(configPath, additionalChecks){ return; } + if(configFile.endsWith('.map')){ + return; + } + const name = configFile.replace('.js', ''); const config = require(path.resolve(configDir, configFile)); const healthchecks = new HealthChecks(config, checks); diff --git a/test/fixtures/config/sourcemap.js.map b/test/fixtures/config/sourcemap.js.map new file mode 100644 index 0000000..8d26c8a --- /dev/null +++ b/test/fixtures/config/sourcemap.js.map @@ -0,0 +1,20 @@ +{ + "version": 3, + "file": "sourcemap.js", + "sourceRoot": "", + "sources": [ + "foo.js", + "bar.js" + ], + "sourcesContent": [ + null, + null + ], + "names": [ + "src", + "maps", + "are", + "fun" + ], + "mappings": "A,AAAB;;ABCDE;" +} diff --git a/test/startup.spec.js b/test/startup.spec.js index d9a253d..ae0b22e 100644 --- a/test/startup.spec.js +++ b/test/startup.spec.js @@ -10,6 +10,7 @@ describe('Startup', function(){ it('Should read in the config dir and create new healthcheck objects', function(){ const result = startup(path.resolve(__dirname, 'fixtures/config/')); + expect(result.get('sourcemap')).not.to.exist; expect(result.get('paywall')).to.exist; expect(result.get('paywall')).to.be.an.instanceOf(HealthChecks); });