qase-javascript-commons 2.2.17 → 2.2.19
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.
- package/changelog.md +6 -0
- package/dist/utils/hostData.js +9 -2
- package/package.json +1 -1
package/changelog.md
CHANGED
package/dist/utils/hostData.js
CHANGED
|
@@ -28,6 +28,7 @@ const os = __importStar(require("os"));
|
|
|
28
28
|
const cp = __importStar(require("child_process"));
|
|
29
29
|
const fs = __importStar(require("fs"));
|
|
30
30
|
const path = __importStar(require("path"));
|
|
31
|
+
const child_process_1 = require("child_process");
|
|
31
32
|
/**
|
|
32
33
|
* Gets detailed OS information based on the platform
|
|
33
34
|
* @returns {string} Detailed OS information
|
|
@@ -119,9 +120,15 @@ function getPackageVersion(packageName) {
|
|
|
119
120
|
return packageJson.version;
|
|
120
121
|
}
|
|
121
122
|
// Try using npm list as fallback with recursive search
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
let output = null;
|
|
124
|
+
try {
|
|
125
|
+
output = (0, child_process_1.execSync)(`npm list --depth=10 --json`, { stdio: "pipe" }).toString();
|
|
126
|
+
if (!output)
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
124
130
|
return null;
|
|
131
|
+
}
|
|
125
132
|
try {
|
|
126
133
|
const npmList = JSON.parse(output);
|
|
127
134
|
// Try direct dependency
|