| const got = require("got"); | ||
| const { CurrencyService } = require("./currency"); | ||
| const { EmailService } = require("./email"); | ||
| const { DomainService } = require("./domain"); | ||
| const { IPService } = require("./ip"); | ||
| const { WebpageService } = require("./webpage"); | ||
| class Client { | ||
| constructor(key) { | ||
| this.key = key; | ||
| } | ||
| _request(method, url, query, body, json) { | ||
| console.log(method, url); | ||
| return got(url, { | ||
| method, | ||
| headers: { | ||
| Authorization: `Bearer ${this.key}` | ||
| }, | ||
| query, | ||
| body, | ||
| json | ||
| }) | ||
| .then(response => { | ||
| if (json) { | ||
| return response.body; | ||
| } | ||
| return JSON.parse(response.body); | ||
| }) | ||
| .catch(error => { | ||
| if (error instanceof got.HTTPError) { | ||
| const body = JSON.parse(error.response.body); | ||
| throw new LabStackError(body.code, body.message); | ||
| } else { | ||
| throw new LabStackError(0, error); | ||
| } | ||
| }); | ||
| } | ||
| currency() { | ||
| return new CurrencyService(this); | ||
| } | ||
| domain() { | ||
| return new DomainService(this); | ||
| } | ||
| email() { | ||
| return new EmailService(this); | ||
| } | ||
| ip() { | ||
| return new IPService(this); | ||
| } | ||
| webpage() { | ||
| return new WebpageService(this); | ||
| } | ||
| } | ||
| class LabStackError extends Error { | ||
| constructor(code, message) { | ||
| super(message); | ||
| this.code = code; | ||
| Error.captureStackTrace(this, LabStackError); | ||
| this.name = this.constructor.name; | ||
| } | ||
| } | ||
| module.exports = { | ||
| Client, | ||
| LabStackError | ||
| }; |
| class CurrencyService { | ||
| constructor(client) { | ||
| this.client = client; | ||
| this.url = "https://currency.labstack.com/api/v1"; | ||
| } | ||
| convert(request) { | ||
| return this.client._request( | ||
| "GET", | ||
| `${this.url}/convert/${request.amount}/${request.from}/${request.to}` | ||
| ); | ||
| } | ||
| list(request) { | ||
| return this.client._request("GET", `${this.url}/list`); | ||
| } | ||
| } | ||
| module.exports = { | ||
| CurrencyService | ||
| }; |
| class DomainService { | ||
| constructor(client) { | ||
| this.client = client; | ||
| this.url = "https://domain.labstack.com/api/v1"; | ||
| } | ||
| dns(request) { | ||
| return this.client._request( | ||
| "GET", | ||
| `${this.url}/${request.type}/${request.domain}` | ||
| ); | ||
| } | ||
| search(request) { | ||
| return this.client._request("GET", `${this.url}/search/${request.domain}`); | ||
| } | ||
| status(request) { | ||
| return this.client._request("GET", `${this.url}/status/${request.domain}`); | ||
| } | ||
| whois(request) { | ||
| return this.client._request("GET", `${this.url}/whois/${request.domain}`); | ||
| } | ||
| } | ||
| module.exports = { | ||
| DomainService | ||
| }; |
+14
| class EmailService { | ||
| constructor(client) { | ||
| this.client = client; | ||
| this.url = "https://email.labstack.com/api/v1"; | ||
| } | ||
| verify(request) { | ||
| return this.client._request("GET", `${this.url}/verify/${request.email}`); | ||
| } | ||
| } | ||
| module.exports = { | ||
| EmailService | ||
| }; |
+14
| class IPService { | ||
| constructor(client) { | ||
| this.client = client; | ||
| this.url = "https://ip.labstack.com/api/v1"; | ||
| } | ||
| lookup(request) { | ||
| return this.client._request("GET", `${this.url}/${request.ip}`); | ||
| } | ||
| } | ||
| module.exports = { | ||
| IPService | ||
| }; |
| class WebpageService { | ||
| constructor(client) { | ||
| this.client = client; | ||
| this.url = "https://webpage.labstack.com/api/v1"; | ||
| } | ||
| image(request) { | ||
| return this.client._request("GET", `${this.url}/image`, { | ||
| url: request.url | ||
| }); | ||
| } | ||
| pdf(request) { | ||
| return this.client._request("GET", `${this.url}/pdf`, { | ||
| url: request.url | ||
| }); | ||
| } | ||
| } | ||
| module.exports = { | ||
| WebpageService | ||
| }; |
| import test from "ava"; | ||
| import { Client } from ".."; | ||
| const cs = new Client(process.env.KEY).currency(); | ||
| test("convert", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await cs.convert({ | ||
| amount: 10, | ||
| from: "USD", | ||
| to: "INR" | ||
| }); | ||
| t.not(response.amount, "0"); | ||
| }); | ||
| }); | ||
| test("list", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await cs.list(); | ||
| t.not(response.currencies.length, "0"); | ||
| }); | ||
| }); |
| import test from "ava"; | ||
| import { Client } from ".."; | ||
| const ds = new Client(process.env.KEY).domain(); | ||
| test("dns", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await ds.dns({ | ||
| type: "A", | ||
| domain: "twilio.com" | ||
| }); | ||
| t.not(response.records.length, 0); | ||
| }); | ||
| }); | ||
| test("search", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await ds.search({ | ||
| domain: "twilio.com" | ||
| }); | ||
| t.not(response.results.length, 0); | ||
| }); | ||
| }); | ||
| test("status", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await ds.status({ | ||
| domain: "twilio.com" | ||
| }); | ||
| t.is(response.result, "unavailable"); | ||
| }); | ||
| }); | ||
| test("whois", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await ds.whois({ | ||
| domain: "twilio.com" | ||
| }); | ||
| t.not(response.raw, ""); | ||
| }); | ||
| }); |
| import test from "ava"; | ||
| import { Client } from ".."; | ||
| const es = new Client(process.env.KEY).email(); | ||
| test("verify", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await es.verify({ | ||
| email: "jon@labstack.com" | ||
| }); | ||
| t.is(response.result, "deliverable"); | ||
| }); | ||
| }); |
+13
| import test from "ava"; | ||
| import { Client } from ".."; | ||
| const is = new Client(process.env.KEY).ip(); | ||
| test("lookup", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await is.lookup({ | ||
| ip: "96.45.83.67" | ||
| }); | ||
| t.not(response.country, ""); | ||
| }); | ||
| }); |
| import test from "ava"; | ||
| import { Client } from ".."; | ||
| const ws = new Client(process.env.KEY).webpage(); | ||
| test("image", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await ws.image({ | ||
| url: "http://amazon.com" | ||
| }); | ||
| t.not(response.image, ""); | ||
| }); | ||
| }); | ||
| test("pdf", async t => { | ||
| await t.notThrowsAsync(async () => { | ||
| const response = await ws.pdf({ | ||
| url: "http://amazon.com" | ||
| }); | ||
| t.not(response.pdf, ""); | ||
| }); | ||
| }); |
+2
-2
| module.exports = { | ||
| Hub: require('./lib/hub') | ||
| } | ||
| Client: require("./lib/client").Client | ||
| }; |
+8
-6
| { | ||
| "name": "labstack", | ||
| "version": "0.50.1", | ||
| "description": "Official Node.js client library for the LabStack platform", | ||
| "version": "1.0.1", | ||
| "description": "Official Node.js client library for the LabStack API", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| "test": "ava" | ||
| }, | ||
@@ -21,8 +21,10 @@ "repository": { | ||
| "dependencies": { | ||
| "got": "^8.3.1", | ||
| "mqtt": "^2.18.1" | ||
| "got": "^9.6.0" | ||
| }, | ||
| "engines": { | ||
| "node": ">= 8" | ||
| "node": ">= 10" | ||
| }, | ||
| "devDependencies": { | ||
| "ava": "^2.2.0" | ||
| } | ||
| } |
-53
| const labstack = require('..'); | ||
| const {Hub} = labstack; | ||
| const hub = new Hub('9JOnhx05TBJIGzXCbZsDpUYTpAxD8bnM', 'node', { | ||
| messageHandler: (topic, message) => { | ||
| console.log(topic, message); | ||
| } | ||
| }); | ||
| (async () => { | ||
| try { | ||
| await hub.connect(); | ||
| hub.subscribe('new', (topic, message) => { | ||
| console.log(topic, message); | ||
| }); | ||
| } catch (error) { | ||
| console.error(error) | ||
| } | ||
| })(); | ||
| // (async () => { | ||
| // try { | ||
| // await hub.connect(() => console.log('connect')) | ||
| // } catch (error) { | ||
| // hub.subscribe('new', (topic, message) => { | ||
| // console.log(topic, message) | ||
| // }) | ||
| // } | ||
| // })() | ||
| // hub.publish('hello', '111') | ||
| // hub.subscribe('new', (topic, message) => { | ||
| // console.log(topic, message) | ||
| // }) | ||
| // const app = express() | ||
| // const {cube} = labstack.express | ||
| // app.use(cube(process.env.LABSTACK_KEY, { | ||
| // batchSize: 1 | ||
| // })) | ||
| // app.get('/', (req, res, next) => { | ||
| // res.send('Hello, World!') | ||
| // }) | ||
| // app.get('/error', (req, res, next) => { | ||
| // throw new Error('Error!') | ||
| // }) | ||
| // app.use((err, req, res, next) => { | ||
| // next(err) | ||
| // }) | ||
| // app.listen(3001) |
-88
| const got = require('got') | ||
| const mqtt = require('mqtt') | ||
| class Hub { | ||
| constructor(apiKey, deviceID, options) { | ||
| this.apiKey = apiKey | ||
| this.deviceID = deviceID | ||
| this.handlers = {} | ||
| this.options = options || {} | ||
| } | ||
| _normalizeDeviceID() { | ||
| return `${this.projectID}:${this.deviceID}` | ||
| } | ||
| _normalizeTopic(topic) { | ||
| return `${this.projectID}/${topic}` | ||
| } | ||
| _denormalizeTopic(topic) { | ||
| return topic.replace(this.projectID + '/', ''); | ||
| } | ||
| async _findKey() { | ||
| try { | ||
| const response = await got('https://api.labstack.com/keys', { | ||
| headers: { | ||
| 'Authorization': `Bearer ${this.apiKey}` | ||
| }, | ||
| json: true | ||
| }); | ||
| this.projectID = response.body.project_id | ||
| } catch (error) { | ||
| throw 'Unable to find the project' | ||
| } | ||
| } | ||
| async connect(handler) { | ||
| try { | ||
| await this._findKey() | ||
| } catch (error) { | ||
| throw error | ||
| } | ||
| this.client = mqtt.connect('mqtt://hub.labstack.com', { | ||
| username: this.projectID, | ||
| password: this.apiKey, | ||
| clientId: this._normalizeDeviceID() | ||
| }) | ||
| this.client.on('connect', () => { | ||
| if (handler) { | ||
| handler() | ||
| } | ||
| }) | ||
| this.client.on('message', (topic, message) => { | ||
| topic = this._denormalizeTopic(topic) | ||
| handler = this.handlers[topic] | ||
| if (this.options.messageHandler) { | ||
| this.options.messageHandler(topic, message) | ||
| } | ||
| if (handler) { | ||
| handler(topic, message) | ||
| } | ||
| }) | ||
| // this.client.on('end', () => { | ||
| // }) | ||
| } | ||
| publish(topic, message) { | ||
| this.client.publish(this._normalizeTopic(topic), message) | ||
| } | ||
| subscribe(topic, handler) { | ||
| this.client.subscribe(this._normalizeTopic(topic)) | ||
| this.handlers[topic] = handler | ||
| } | ||
| unsubscribe(self, topic) { | ||
| this.client.unsubscribe(this._normalizeTopic(topic)) | ||
| } | ||
| disconnect(self) { | ||
| this.client.end() | ||
| } | ||
| } | ||
| module.exports = Hub |
-592
| # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
| # yarn lockfile v1 | ||
| "@sindresorhus/is@^0.7.0": | ||
| version "0.7.0" | ||
| resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" | ||
| async-limiter@~1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" | ||
| balanced-match@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" | ||
| bl@^1.2.1: | ||
| version "1.2.2" | ||
| resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" | ||
| dependencies: | ||
| readable-stream "^2.3.5" | ||
| safe-buffer "^5.1.1" | ||
| brace-expansion@^1.1.7: | ||
| version "1.1.11" | ||
| resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" | ||
| dependencies: | ||
| balanced-match "^1.0.0" | ||
| concat-map "0.0.1" | ||
| buffer-from@^1.0.0: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" | ||
| cacheable-request@^2.1.1: | ||
| version "2.1.4" | ||
| resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" | ||
| dependencies: | ||
| clone-response "1.0.2" | ||
| get-stream "3.0.0" | ||
| http-cache-semantics "3.8.1" | ||
| keyv "3.0.0" | ||
| lowercase-keys "1.0.0" | ||
| normalize-url "2.0.1" | ||
| responselike "1.0.2" | ||
| callback-stream@^1.0.2: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/callback-stream/-/callback-stream-1.1.0.tgz#4701a51266f06e06eaa71fc17233822d875f4908" | ||
| dependencies: | ||
| inherits "^2.0.1" | ||
| readable-stream "> 1.0.0 < 3.0.0" | ||
| clone-response@1.0.2: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" | ||
| dependencies: | ||
| mimic-response "^1.0.0" | ||
| commist@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/commist/-/commist-1.0.0.tgz#c0c352501cf6f52e9124e3ef89c9806e2022ebef" | ||
| dependencies: | ||
| leven "^1.0.0" | ||
| minimist "^1.1.0" | ||
| concat-map@0.0.1: | ||
| version "0.0.1" | ||
| resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" | ||
| concat-stream@^1.6.2: | ||
| version "1.6.2" | ||
| resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" | ||
| dependencies: | ||
| buffer-from "^1.0.0" | ||
| inherits "^2.0.3" | ||
| readable-stream "^2.2.2" | ||
| typedarray "^0.0.6" | ||
| core-util-is@~1.0.0: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" | ||
| decode-uri-component@^0.2.0: | ||
| version "0.2.0" | ||
| resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" | ||
| decompress-response@^3.3.0: | ||
| version "3.3.0" | ||
| resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" | ||
| dependencies: | ||
| mimic-response "^1.0.0" | ||
| duplexer3@^0.1.4: | ||
| version "0.1.4" | ||
| resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" | ||
| duplexify@^3.5.1, duplexify@^3.6.0: | ||
| version "3.6.0" | ||
| resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" | ||
| dependencies: | ||
| end-of-stream "^1.0.0" | ||
| inherits "^2.0.1" | ||
| readable-stream "^2.0.0" | ||
| stream-shift "^1.0.0" | ||
| end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: | ||
| version "1.4.1" | ||
| resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" | ||
| dependencies: | ||
| once "^1.4.0" | ||
| extend@^3.0.0: | ||
| version "3.0.1" | ||
| resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" | ||
| from2@^2.1.1: | ||
| version "2.3.0" | ||
| resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" | ||
| dependencies: | ||
| inherits "^2.0.1" | ||
| readable-stream "^2.0.0" | ||
| fs.realpath@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" | ||
| get-stream@3.0.0, get-stream@^3.0.0: | ||
| version "3.0.0" | ||
| resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" | ||
| glob-parent@^3.1.0: | ||
| version "3.1.0" | ||
| resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" | ||
| dependencies: | ||
| is-glob "^3.1.0" | ||
| path-dirname "^1.0.0" | ||
| glob-stream@^6.1.0: | ||
| version "6.1.0" | ||
| resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" | ||
| dependencies: | ||
| extend "^3.0.0" | ||
| glob "^7.1.1" | ||
| glob-parent "^3.1.0" | ||
| is-negated-glob "^1.0.0" | ||
| ordered-read-streams "^1.0.0" | ||
| pumpify "^1.3.5" | ||
| readable-stream "^2.1.5" | ||
| remove-trailing-separator "^1.0.1" | ||
| to-absolute-glob "^2.0.0" | ||
| unique-stream "^2.0.2" | ||
| glob@^7.1.1: | ||
| version "7.1.2" | ||
| resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" | ||
| dependencies: | ||
| fs.realpath "^1.0.0" | ||
| inflight "^1.0.4" | ||
| inherits "2" | ||
| minimatch "^3.0.4" | ||
| once "^1.3.0" | ||
| path-is-absolute "^1.0.0" | ||
| got@^8.3.1: | ||
| version "8.3.1" | ||
| resolved "https://registry.yarnpkg.com/got/-/got-8.3.1.tgz#093324403d4d955f5a16a7a8d39955d055ae10ed" | ||
| dependencies: | ||
| "@sindresorhus/is" "^0.7.0" | ||
| cacheable-request "^2.1.1" | ||
| decompress-response "^3.3.0" | ||
| duplexer3 "^0.1.4" | ||
| get-stream "^3.0.0" | ||
| into-stream "^3.1.0" | ||
| is-retry-allowed "^1.1.0" | ||
| isurl "^1.0.0-alpha5" | ||
| lowercase-keys "^1.0.0" | ||
| mimic-response "^1.0.0" | ||
| p-cancelable "^0.4.0" | ||
| p-timeout "^2.0.1" | ||
| pify "^3.0.0" | ||
| safe-buffer "^5.1.1" | ||
| timed-out "^4.0.1" | ||
| url-parse-lax "^3.0.0" | ||
| url-to-options "^1.0.1" | ||
| has-symbol-support-x@^1.4.1: | ||
| version "1.4.2" | ||
| resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" | ||
| has-to-string-tag-x@^1.2.0: | ||
| version "1.4.1" | ||
| resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" | ||
| dependencies: | ||
| has-symbol-support-x "^1.4.1" | ||
| help-me@^1.0.1: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/help-me/-/help-me-1.1.0.tgz#8f2d508d0600b4a456da2f086556e7e5c056a3c6" | ||
| dependencies: | ||
| callback-stream "^1.0.2" | ||
| glob-stream "^6.1.0" | ||
| through2 "^2.0.1" | ||
| xtend "^4.0.0" | ||
| http-cache-semantics@3.8.1: | ||
| version "3.8.1" | ||
| resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" | ||
| inflight@^1.0.4: | ||
| version "1.0.6" | ||
| resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" | ||
| dependencies: | ||
| once "^1.3.0" | ||
| wrappy "1" | ||
| inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: | ||
| version "2.0.3" | ||
| resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" | ||
| into-stream@^3.1.0: | ||
| version "3.1.0" | ||
| resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" | ||
| dependencies: | ||
| from2 "^2.1.1" | ||
| p-is-promise "^1.1.0" | ||
| is-absolute@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" | ||
| dependencies: | ||
| is-relative "^1.0.0" | ||
| is-windows "^1.0.1" | ||
| is-extglob@^2.1.0: | ||
| version "2.1.1" | ||
| resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" | ||
| is-glob@^3.1.0: | ||
| version "3.1.0" | ||
| resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" | ||
| dependencies: | ||
| is-extglob "^2.1.0" | ||
| is-negated-glob@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" | ||
| is-object@^1.0.1: | ||
| version "1.0.1" | ||
| resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" | ||
| is-plain-obj@^1.0.0: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" | ||
| is-relative@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" | ||
| dependencies: | ||
| is-unc-path "^1.0.0" | ||
| is-retry-allowed@^1.1.0: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" | ||
| is-unc-path@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" | ||
| dependencies: | ||
| unc-path-regex "^0.1.2" | ||
| is-windows@^1.0.1: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" | ||
| isarray@~1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" | ||
| isurl@^1.0.0-alpha5: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" | ||
| dependencies: | ||
| has-to-string-tag-x "^1.2.0" | ||
| is-object "^1.0.1" | ||
| json-buffer@3.0.0: | ||
| version "3.0.0" | ||
| resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" | ||
| json-stable-stringify@^1.0.0: | ||
| version "1.0.1" | ||
| resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" | ||
| dependencies: | ||
| jsonify "~0.0.0" | ||
| jsonify@~0.0.0: | ||
| version "0.0.0" | ||
| resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" | ||
| keyv@3.0.0: | ||
| version "3.0.0" | ||
| resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" | ||
| dependencies: | ||
| json-buffer "3.0.0" | ||
| leven@^1.0.0: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/leven/-/leven-1.0.2.tgz#9144b6eebca5f1d0680169f1a6770dcea60b75c3" | ||
| lowercase-keys@1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" | ||
| lowercase-keys@^1.0.0: | ||
| version "1.0.1" | ||
| resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" | ||
| mimic-response@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e" | ||
| minimatch@^3.0.4: | ||
| version "3.0.4" | ||
| resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" | ||
| dependencies: | ||
| brace-expansion "^1.1.7" | ||
| minimist@^1.1.0, minimist@^1.2.0: | ||
| version "1.2.0" | ||
| resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" | ||
| mqtt-packet@^5.6.0: | ||
| version "5.6.0" | ||
| resolved "https://registry.yarnpkg.com/mqtt-packet/-/mqtt-packet-5.6.0.tgz#923fb704d0ce0bd6ac81c7e1cc09469b1512d2fd" | ||
| dependencies: | ||
| bl "^1.2.1" | ||
| inherits "^2.0.3" | ||
| process-nextick-args "^2.0.0" | ||
| safe-buffer "^5.1.0" | ||
| mqtt@^2.18.1: | ||
| version "2.18.1" | ||
| resolved "https://registry.yarnpkg.com/mqtt/-/mqtt-2.18.1.tgz#878af1068d690268bf5b571e044638ded8561b91" | ||
| dependencies: | ||
| commist "^1.0.0" | ||
| concat-stream "^1.6.2" | ||
| end-of-stream "^1.4.1" | ||
| help-me "^1.0.1" | ||
| inherits "^2.0.3" | ||
| minimist "^1.2.0" | ||
| mqtt-packet "^5.6.0" | ||
| pump "^3.0.0" | ||
| readable-stream "^2.3.6" | ||
| reinterval "^1.1.0" | ||
| split2 "^2.1.1" | ||
| websocket-stream "^5.1.2" | ||
| xtend "^4.0.1" | ||
| normalize-url@2.0.1: | ||
| version "2.0.1" | ||
| resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" | ||
| dependencies: | ||
| prepend-http "^2.0.0" | ||
| query-string "^5.0.1" | ||
| sort-keys "^2.0.0" | ||
| object-assign@^4.1.0: | ||
| version "4.1.1" | ||
| resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" | ||
| once@^1.3.0, once@^1.3.1, once@^1.4.0: | ||
| version "1.4.0" | ||
| resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" | ||
| dependencies: | ||
| wrappy "1" | ||
| ordered-read-streams@^1.0.0: | ||
| version "1.0.1" | ||
| resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" | ||
| dependencies: | ||
| readable-stream "^2.0.1" | ||
| p-cancelable@^0.4.0: | ||
| version "0.4.1" | ||
| resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" | ||
| p-finally@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" | ||
| p-is-promise@^1.1.0: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" | ||
| p-timeout@^2.0.1: | ||
| version "2.0.1" | ||
| resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" | ||
| dependencies: | ||
| p-finally "^1.0.0" | ||
| path-dirname@^1.0.0: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" | ||
| path-is-absolute@^1.0.0: | ||
| version "1.0.1" | ||
| resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" | ||
| pify@^3.0.0: | ||
| version "3.0.0" | ||
| resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" | ||
| prepend-http@^2.0.0: | ||
| version "2.0.0" | ||
| resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" | ||
| process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: | ||
| version "2.0.0" | ||
| resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" | ||
| pump@^2.0.0: | ||
| version "2.0.1" | ||
| resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" | ||
| dependencies: | ||
| end-of-stream "^1.1.0" | ||
| once "^1.3.1" | ||
| pump@^3.0.0: | ||
| version "3.0.0" | ||
| resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" | ||
| dependencies: | ||
| end-of-stream "^1.1.0" | ||
| once "^1.3.1" | ||
| pumpify@^1.3.5: | ||
| version "1.5.1" | ||
| resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" | ||
| dependencies: | ||
| duplexify "^3.6.0" | ||
| inherits "^2.0.3" | ||
| pump "^2.0.0" | ||
| query-string@^5.0.1: | ||
| version "5.1.1" | ||
| resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" | ||
| dependencies: | ||
| decode-uri-component "^0.2.0" | ||
| object-assign "^4.1.0" | ||
| strict-uri-encode "^1.0.0" | ||
| "readable-stream@> 1.0.0 < 3.0.0", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6: | ||
| version "2.3.6" | ||
| resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" | ||
| dependencies: | ||
| core-util-is "~1.0.0" | ||
| inherits "~2.0.3" | ||
| isarray "~1.0.0" | ||
| process-nextick-args "~2.0.0" | ||
| safe-buffer "~5.1.1" | ||
| string_decoder "~1.1.1" | ||
| util-deprecate "~1.0.1" | ||
| reinterval@^1.1.0: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/reinterval/-/reinterval-1.1.0.tgz#3361ecfa3ca6c18283380dd0bb9546f390f5ece7" | ||
| remove-trailing-separator@^1.0.1: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" | ||
| responselike@1.0.2: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" | ||
| dependencies: | ||
| lowercase-keys "^1.0.0" | ||
| safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: | ||
| version "5.1.2" | ||
| resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" | ||
| sort-keys@^2.0.0: | ||
| version "2.0.0" | ||
| resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" | ||
| dependencies: | ||
| is-plain-obj "^1.0.0" | ||
| split2@^2.1.1: | ||
| version "2.2.0" | ||
| resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" | ||
| dependencies: | ||
| through2 "^2.0.2" | ||
| stream-shift@^1.0.0: | ||
| version "1.0.0" | ||
| resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" | ||
| strict-uri-encode@^1.0.0: | ||
| version "1.1.0" | ||
| resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" | ||
| string_decoder@~1.1.1: | ||
| version "1.1.1" | ||
| resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" | ||
| dependencies: | ||
| safe-buffer "~5.1.0" | ||
| through2-filter@^2.0.0: | ||
| version "2.0.0" | ||
| resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" | ||
| dependencies: | ||
| through2 "~2.0.0" | ||
| xtend "~4.0.0" | ||
| through2@^2.0.1, through2@^2.0.2, through2@~2.0.0: | ||
| version "2.0.3" | ||
| resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" | ||
| dependencies: | ||
| readable-stream "^2.1.5" | ||
| xtend "~4.0.1" | ||
| timed-out@^4.0.1: | ||
| version "4.0.1" | ||
| resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" | ||
| to-absolute-glob@^2.0.0: | ||
| version "2.0.2" | ||
| resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" | ||
| dependencies: | ||
| is-absolute "^1.0.0" | ||
| is-negated-glob "^1.0.0" | ||
| typedarray@^0.0.6: | ||
| version "0.0.6" | ||
| resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" | ||
| ultron@~1.1.0: | ||
| version "1.1.1" | ||
| resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" | ||
| unc-path-regex@^0.1.2: | ||
| version "0.1.2" | ||
| resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" | ||
| unique-stream@^2.0.2: | ||
| version "2.2.1" | ||
| resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369" | ||
| dependencies: | ||
| json-stable-stringify "^1.0.0" | ||
| through2-filter "^2.0.0" | ||
| url-parse-lax@^3.0.0: | ||
| version "3.0.0" | ||
| resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" | ||
| dependencies: | ||
| prepend-http "^2.0.0" | ||
| url-to-options@^1.0.1: | ||
| version "1.0.1" | ||
| resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" | ||
| util-deprecate@~1.0.1: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" | ||
| websocket-stream@^5.1.2: | ||
| version "5.1.2" | ||
| resolved "https://registry.yarnpkg.com/websocket-stream/-/websocket-stream-5.1.2.tgz#1c31c627bcdf34f1a9bdacc9daa15bfa4816d9ad" | ||
| dependencies: | ||
| duplexify "^3.5.1" | ||
| inherits "^2.0.1" | ||
| readable-stream "^2.3.3" | ||
| safe-buffer "^5.1.1" | ||
| ws "^3.2.0" | ||
| xtend "^4.0.0" | ||
| wrappy@1: | ||
| version "1.0.2" | ||
| resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" | ||
| ws@^3.2.0: | ||
| version "3.3.3" | ||
| resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" | ||
| dependencies: | ||
| async-limiter "~1.0.0" | ||
| safe-buffer "~5.1.0" | ||
| ultron "~1.1.0" | ||
| xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: | ||
| version "4.0.1" | ||
| resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1
-50%14
133.33%248
104.96%0
-100%6819
-72.35%1
Infinity%6
200%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated