@everymundo/aws-instance-identity
Advanced tools
Comparing version 0.1.1 to 0.2.0
17
index.js
@@ -1,5 +0,5 @@ | ||
const { urlToEndpoint, promiseDataTo } = require('@everymundo/promise-data-to'); | ||
const { urlToEndpoint, promiseGet } = require('@everymundo/promise-data-to'); | ||
const IDENTITY_ENDPOINT = urlToEndpoint('http://169.254.169.254/latest/dynamic/instance-identity/document'); | ||
IDENTITY_ENDPOINT.method = 'GET'; | ||
// IDENTITY_ENDPOINT.method = 'GET'; | ||
IDENTITY_ENDPOINT.maxRetry = 1; | ||
@@ -12,6 +12,11 @@ | ||
const getIdentityDocument = () => | ||
promiseDataTo(IDENTITY_ENDPOINT) | ||
.then(({resTxt}) => JSON.parse(resTxt)); | ||
const parseResponseText = ({resTxt}) => JSON.parse(resTxt); | ||
module.exports = { getIdentityDocument, IDENTITY_ENDPOINT }; | ||
const getIdentityDocument = () => promiseGet(IDENTITY_ENDPOINT) | ||
.then(parseResponseText); | ||
module.exports = { | ||
parseResponseText, | ||
getIdentityDocument, | ||
IDENTITY_ENDPOINT, | ||
}; |
{ | ||
"name": "@everymundo/aws-instance-identity", | ||
"version": "0.1.1", | ||
"description": "Returns information about the AWS Instance that calls it", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha" | ||
"_from": "@everymundo/aws-instance-identity@^0.1.1", | ||
"_id": "@everymundo/aws-instance-identity@0.1.1", | ||
"_inBundle": false, | ||
"_integrity": "sha512-Pm/QhfJt9otp5rMFbbGRxhHbQj18XAlHcYqMMhnXdXKL0TMBMJnwJL4P1RFBO53cK7VU0VbvSjOrPksRGFyFCQ==", | ||
"_location": "/@everymundo/aws-instance-identity", | ||
"_phantomChildren": { | ||
"@everymundo/json-utils": "1.0.0", | ||
"@everymundo/simple-logr": "1.1.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/EveryMundo/aws-instance-identity.git" | ||
"_requested": { | ||
"type": "range", | ||
"registry": true, | ||
"raw": "@everymundo/aws-instance-identity@^0.1.1", | ||
"name": "@everymundo/aws-instance-identity", | ||
"escapedName": "@everymundo%2faws-instance-identity", | ||
"scope": "@everymundo", | ||
"rawSpec": "^0.1.1", | ||
"saveSpec": null, | ||
"fetchSpec": "^0.1.1" | ||
}, | ||
"keywords": [], | ||
"_requiredBy": [ | ||
"/@everymundo/em-eureka" | ||
], | ||
"_resolved": "http://registry.npmjs.org/@everymundo/aws-instance-identity/-/aws-instance-identity-0.1.1.tgz", | ||
"_shasum": "1b0fefffe37a3ef2e16a98686ffb639fd9791a5e", | ||
"_spec": "@everymundo/aws-instance-identity@^0.1.1", | ||
"_where": "/home/everymundo/EM/microservices/google-ita-worker/node_modules/@everymundo/em-eureka", | ||
"author": { | ||
@@ -18,11 +33,25 @@ "name": "Daniel Santana", | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/EveryMundo/aws-instance-identity/issues" | ||
}, | ||
"bundleDependencies": false, | ||
"dependencies": { | ||
"@everymundo/promise-data-to": "^1.2.1", | ||
"socks-proxy-agent": "^4.0.1" | ||
}, | ||
"deprecated": false, | ||
"description": "Returns information about the AWS Instance that calls it", | ||
"homepage": "https://github.com/EveryMundo/aws-instance-identity#readme", | ||
"dependencies": { | ||
"@everymundo/promise-data-to": "^0.3.0", | ||
"socks-proxy-agent": "^3.0.1" | ||
} | ||
"keywords": [], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"name": "@everymundo/aws-instance-identity", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/EveryMundo/aws-instance-identity.git" | ||
}, | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"version": "0.2.0" | ||
} |
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
6181
16
4
+ Added@everymundo/promise-data-to@1.4.2(transitive)
+ Addedagent-base@4.2.1(transitive)
+ Addedip@1.1.5(transitive)
+ Addedsmart-buffer@4.2.0(transitive)
+ Addedsocks@2.3.3(transitive)
+ Addedsocks-proxy-agent@4.0.2(transitive)
- Removed@everymundo/promise-data-to@0.3.2(transitive)
- Removedagent-base@4.3.0(transitive)
- Removedip@1.1.9(transitive)
- Removedsmart-buffer@1.1.15(transitive)
- Removedsocks@1.1.10(transitive)
- Removedsocks-proxy-agent@3.0.1(transitive)
Updatedsocks-proxy-agent@^4.0.1