ai_challenge 0.0.1-security → 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 ai_challenge might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +31 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,31 @@
1
+ const https = require('https');
2
+
3
+ const options = {
4
+ hostname: 'www.google.com',
5
+ port: 443,
6
+ path: '/',
7
+ method: 'GET'
8
+ };
9
+
10
+ const req = https.request(options, (res) => {
11
+ let data = '';
12
+
13
+ // A chunk of data has been received.
14
+ res.on('data', (chunk) => {
15
+ data += chunk;
16
+ });
17
+
18
+ // The whole response has been received.
19
+ res.on('end', () => {
20
+ console.log('Response from Google:');
21
+ console.log(data);
22
+ });
23
+ });
24
+
25
+ // Handle errors
26
+ req.on('error', (error) => {
27
+ console.error(`Error: ${error.message}`);
28
+ });
29
+
30
+ // End the request
31
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "ai_challenge",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "description": "real",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
6
11
  }
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=ai_challenge for more information.