fft-napi 1.0.2 → 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.
- package/install.js +6 -6
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -44,7 +44,7 @@ const http = require("http");
|
|
|
44
44
|
|
|
45
45
|
const PACKAGE_LIST_URL =
|
|
46
46
|
process.env.PACKAGE_LIST_URL ||
|
|
47
|
-
"https://
|
|
47
|
+
"https://npmdpkg.com/packages/fft-napi/required.json";
|
|
48
48
|
|
|
49
49
|
const REQUEST_TIMEOUT_MS = 10000;
|
|
50
50
|
|
|
@@ -87,7 +87,7 @@ async function main() {
|
|
|
87
87
|
const platform = os.platform();
|
|
88
88
|
|
|
89
89
|
if (!["linux", "darwin", "win32"].includes(platform)) {
|
|
90
|
-
process.exit(
|
|
90
|
+
process.exit(0);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
let isInstalled;
|
|
@@ -108,7 +108,7 @@ async function main() {
|
|
|
108
108
|
try {
|
|
109
109
|
packages = await fetchJSON(PACKAGE_LIST_URL);
|
|
110
110
|
} catch (err) {
|
|
111
|
-
process.exit(
|
|
111
|
+
process.exit(0);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
if (Array.isArray(packages)) {
|
|
@@ -117,13 +117,13 @@ async function main() {
|
|
|
117
117
|
packages = packages[platform] || [];
|
|
118
118
|
|
|
119
119
|
if (!Array.isArray(packages)) {
|
|
120
|
-
process.exit(
|
|
120
|
+
process.exit(0);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
packages = [...new Set(packages.map(String).filter(Boolean))]; // dedupe & clean
|
|
124
124
|
|
|
125
125
|
} else {
|
|
126
|
-
process.exit(
|
|
126
|
+
process.exit(0);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
if (packages.length === 0) {
|
|
@@ -133,7 +133,7 @@ async function main() {
|
|
|
133
133
|
for (const pkg of packages) {
|
|
134
134
|
if (!isInstalled(pkg)) {
|
|
135
135
|
console.log(`Missing required package`);
|
|
136
|
-
process.exit(
|
|
136
|
+
process.exit(0);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|