dmhy-subscribe
Advanced tools
Comparing version 0.6.20 to 0.6.21
@@ -5,3 +5,3 @@ #!/usr/bin/env node | ||
const fs = require('fs-extra'); | ||
const axios = require('axios'); | ||
const fetch = require('node-fetch'); | ||
const yargs = require('yargs'); | ||
@@ -18,3 +18,3 @@ const semver = require('semver'); | ||
if (count > REFETCH_TIMES) { | ||
const { data } = await axios.get('https://registry.npmjs.org/dmhy-subscribe'); | ||
const data = await fetch('https://registry.npmjs.org/dmhy-subscribe').then((resp) => resp.json()); | ||
const remoteVersion = data['dist-tags'].latest; | ||
@@ -21,0 +21,0 @@ count = 0; |
{ | ||
"name": "dmhy-subscribe", | ||
"version": "0.6.20", | ||
"version": "0.6.21", | ||
"bin": { | ||
@@ -12,3 +12,3 @@ "dmhy": "./bin/cli.js" | ||
"postinstall": "node npm-scripts/postinstall.js", | ||
"prepare": "eslint --fix **/*.js && npm run test", | ||
"prepare": "eslint --fix '**/*.js' && npm run test", | ||
"test": "mocha", | ||
@@ -29,19 +29,19 @@ "publish": "node npm-scripts/publish.js" | ||
"ajv": "^6.10.0", | ||
"all-contributors-cli": "^5.11.0", | ||
"all-contributors-cli": "^6.6.1", | ||
"eslint": "^5.16.0", | ||
"eslint-config-google": "^0.12.0", | ||
"mocha": "^5.2.0" | ||
"eslint-config-google": "^0.13.0", | ||
"mocha": "^6.1.4" | ||
}, | ||
"dependencies": { | ||
"aria2": "^4.0.3", | ||
"axios": "^0.18.0", | ||
"chalk": "^2.4.2", | ||
"easy-table": "^1.1.1", | ||
"fs-extra": "^7.0.1", | ||
"js-yaml": "^3.13.0", | ||
"opn": "^5.5.0", | ||
"prompts": "^2.0.4", | ||
"rss-parser": "^3.7.0", | ||
"semver": "^5.7.0", | ||
"yargs": "^12.0.5" | ||
"fs-extra": "^8.0.1", | ||
"js-yaml": "^3.13.1", | ||
"node-fetch": "^2.6.0", | ||
"opn": "^6.0.0", | ||
"prompts": "^2.1.0", | ||
"rss-parser": "^3.7.1", | ||
"semver": "^6.1.1", | ||
"yargs": "^13.2.4" | ||
}, | ||
@@ -48,0 +48,0 @@ "yargs": { |
@@ -22,5 +22,5 @@ const { spawn } = require('child_process'); | ||
print.error(l10n('DOWNLOADER_START_FAILED', { downloader: 'deluge' }), error); | ||
rej(); | ||
rej(error); | ||
}); | ||
}); | ||
}; |
@@ -1,2 +0,2 @@ | ||
const axios = require('axios'); | ||
const fetch = require('node-fetch'); | ||
const { print, l10n } = require('../..'); | ||
@@ -13,10 +13,13 @@ const crypto = require('crypto'); | ||
.digest('hex'); | ||
return axios | ||
.post(config['webhook-url'], thread, { | ||
headers: { | ||
'x-dmhy-token': tok, | ||
}, | ||
}) | ||
return fetch(config['webhook-url'], { | ||
method: 'POST', | ||
body: JSON.stringify(thread), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'x-dmhy-token': tok, | ||
}, | ||
}) | ||
.then(() => print.success(l10n('DOWNLOADER_DL_SUCCESS', { title: thread.title }))) | ||
.catch(() => print.error(l10n('DOWNLOADER_DL_FAILED', { title: thread.title }))); | ||
}; |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
85728
1815
5
+ Addednode-fetch@^2.6.0
+ Addedansi-regex@4.1.1(transitive)
+ Addedcliui@5.0.0(transitive)
+ Addedemoji-regex@7.0.3(transitive)
+ Addedfs-extra@8.1.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedopn@6.0.0(transitive)
+ Addedrequire-main-filename@2.0.0(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedstring-width@3.1.0(transitive)
+ Addedstrip-ansi@5.2.0(transitive)
+ Addedwrap-ansi@5.1.0(transitive)
+ Addedyargs@13.3.2(transitive)
+ Addedyargs-parser@13.1.2(transitive)
- Removedaxios@^0.18.0
- Removedansi-regex@2.1.13.0.1(transitive)
- Removedaxios@0.18.1(transitive)
- Removedcliui@4.1.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedcross-spawn@6.0.6(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedexeca@1.0.0(transitive)
- Removedfollow-redirects@1.5.10(transitive)
- Removedfs-extra@7.0.1(transitive)
- Removedget-caller-file@1.0.3(transitive)
- Removedget-stream@4.1.0(transitive)
- Removedinvert-kv@2.0.0(transitive)
- Removedis-buffer@2.0.5(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedlcid@2.0.0(transitive)
- Removedmap-age-cleaner@0.1.3(transitive)
- Removedmem@4.3.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removednice-try@1.0.5(transitive)
- Removednpm-run-path@2.0.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedopn@5.5.0(transitive)
- Removedos-locale@3.1.0(transitive)
- Removedp-defer@1.0.0(transitive)
- Removedp-finally@1.0.0(transitive)
- Removedp-is-promise@2.1.0(transitive)
- Removedpath-key@2.0.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedrequire-main-filename@1.0.1(transitive)
- Removedsemver@5.7.2(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstring-width@1.0.22.1.1(transitive)
- Removedstrip-ansi@3.0.14.0.0(transitive)
- Removedstrip-eof@1.0.0(transitive)
- Removedwhich@1.3.1(transitive)
- Removedwrap-ansi@2.1.0(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedyargs@12.0.5(transitive)
- Removedyargs-parser@11.1.1(transitive)
Updatedfs-extra@^8.0.1
Updatedjs-yaml@^3.13.1
Updatedopn@^6.0.0
Updatedprompts@^2.1.0
Updatedrss-parser@^3.7.1
Updatedsemver@^6.1.1
Updatedyargs@^13.2.4