@packt/ssm-helper
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -1,1 +0,1 @@ | ||
{"processes":{"5aaaf7d1-b895-4a49-afe4-95d573d3fb60":{"parent":null,"children":[]},"8c9dfb85-7ca7-4f04-98b1-db07b2a5c458":{"parent":null,"children":["de06a6f7-8862-43e4-a176-dd4db7f09c46"]},"cc8795f9-b92d-43b3-b83e-f9c6ed60007f":{"parent":"de06a6f7-8862-43e4-a176-dd4db7f09c46","children":[]},"de06a6f7-8862-43e4-a176-dd4db7f09c46":{"parent":"8c9dfb85-7ca7-4f04-98b1-db07b2a5c458","children":["cc8795f9-b92d-43b3-b83e-f9c6ed60007f"]}},"files":{"/home/mikee@packtpub.net/Development/packt/open-source/ssm-helper/src/index.js":["5aaaf7d1-b895-4a49-afe4-95d573d3fb60","cc8795f9-b92d-43b3-b83e-f9c6ed60007f"]},"externalIds":{}} | ||
{"processes":{"25aebaa6-4676-408c-a250-41772d0da7b3":{"parent":null,"children":[]},"3e833889-f2c9-40b6-be05-8a623d7b7375":{"parent":"b495a41c-8cff-4e9a-92b3-85365e69225d","children":["d4f7a69a-743b-4a86-95d5-4f41b4451517"]},"b495a41c-8cff-4e9a-92b3-85365e69225d":{"parent":null,"children":["3e833889-f2c9-40b6-be05-8a623d7b7375"]},"d4f7a69a-743b-4a86-95d5-4f41b4451517":{"parent":"3e833889-f2c9-40b6-be05-8a623d7b7375","children":[]}},"files":{"/home/mikee@packtpub.net/Development/packt/open-source/ssm-helper/src/index.js":["25aebaa6-4676-408c-a250-41772d0da7b3","d4f7a69a-743b-4a86-95d5-4f41b4451517"]},"externalIds":{}} |
@@ -45,3 +45,3 @@ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; | ||
this.OFFLINE = config.OFFLINE || false; | ||
this.cache = config.cache ? cache : false; | ||
this.cache = config.cache || typeof config.cache === 'undefined' ? cache : false; | ||
this.stage = config.stage || 'dev'; | ||
@@ -132,2 +132,2 @@ this.region = config.region || 'eu-west-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WdlS2V5fSB0byBjYWNoZWApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICB0aGlzLmxvZ2dlci5lcnJvcihlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZShWYWx1ZSk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICB0aGlzLmxvZ2dlci5lcnJvcihlcnJvcik7XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnJvcik7XG4gICAgICB9KTtcbiAgfVxufVxuIl19 |
{ | ||
"name": "@packt/ssm-helper", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Module and CLI tool to help handle SSM variables", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -57,3 +57,4 @@ /* eslint-env node, mocha */ | ||
it('successfully gets', (done) => { | ||
const testValue = 'itsatest'; | ||
const testENV = UUID(); | ||
const testValue = UUID(); | ||
AWSMock.mock('SSM', 'getParameter', (params, callback) => { | ||
@@ -63,3 +64,3 @@ callback(null, { | ||
{ | ||
Name: 'DEV_TESTY', | ||
Name: `DEV_${testENV}`, | ||
Type: 'SecureString', | ||
@@ -69,3 +70,3 @@ Value: testValue, | ||
LastModifiedDate: new Date().toISOString(), | ||
ARN: 'arn:aws:ssm:eu-west-1:*:parameter/DEV_TESTY', | ||
ARN: `arn:aws:ssm:eu-west-1:*:parameter/DEV_${testENV}`, | ||
}, | ||
@@ -75,4 +76,6 @@ }); | ||
const SSM = new SSMHelper(); | ||
SSM.get('TESTY') | ||
const SSM = new SSMHelper({ | ||
cache: false, | ||
}); | ||
SSM.get(testENV) | ||
.then((result) => { | ||
@@ -89,3 +92,5 @@ expect(result).to.eql(testValue); | ||
const SSM = new SSMHelper(); | ||
const SSM = new SSMHelper({ | ||
cache: false, | ||
}); | ||
SSM.get('TESTY') | ||
@@ -92,0 +97,0 @@ .then(() => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64513
451