allsecurex-quantum-scanner 1.0.0 ā 1.0.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.
- package/README.md +1 -1
- package/bin/quantum-scanner-bin +0 -0
- package/package.json +1 -1
- package/scripts/install-binary.js +13 -4
package/README.md
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -14,7 +14,9 @@ const path = require('path');
|
|
|
14
14
|
const { execSync } = require('child_process');
|
|
15
15
|
const crypto = require('crypto');
|
|
16
16
|
|
|
17
|
+
// Primary URL (custom domain) with S3 fallback
|
|
17
18
|
const BINARY_BASE_URL = 'https://scanner.allsecurex.com/releases';
|
|
19
|
+
const BINARY_FALLBACK_URL = 'https://quantum-scanner-binaries.s3.ap-south-1.amazonaws.com/releases';
|
|
18
20
|
const VERSION = require('../package.json').version;
|
|
19
21
|
|
|
20
22
|
// Platform-specific binary mappings
|
|
@@ -29,7 +31,7 @@ const PLATFORM_BINARIES = {
|
|
|
29
31
|
// SHA256 checksums for each binary (updated with each release)
|
|
30
32
|
const CHECKSUMS = {
|
|
31
33
|
'darwin-x64': '',
|
|
32
|
-
'darwin-arm64': '',
|
|
34
|
+
'darwin-arm64': 'd66fb1427db6adb752059d3aed23993536d8e80b992922488c43ba23aaa40aee',
|
|
33
35
|
'linux-x64': '',
|
|
34
36
|
'linux-arm64': '',
|
|
35
37
|
'win32-x64': '',
|
|
@@ -150,7 +152,8 @@ async function install() {
|
|
|
150
152
|
|
|
151
153
|
const platformKey = getPlatformKey();
|
|
152
154
|
const binaryName = getBinaryName();
|
|
153
|
-
const
|
|
155
|
+
const primaryUrl = `${BINARY_BASE_URL}/v${VERSION}/${binaryName}`;
|
|
156
|
+
const fallbackUrl = `${BINARY_FALLBACK_URL}/v${VERSION}/${binaryName}`;
|
|
154
157
|
|
|
155
158
|
console.log(`š Platform: ${platformKey}`);
|
|
156
159
|
console.log(`š Version: ${VERSION}`);
|
|
@@ -165,7 +168,13 @@ async function install() {
|
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
try {
|
|
168
|
-
|
|
171
|
+
// Try primary URL first, fall back to S3 if it fails
|
|
172
|
+
try {
|
|
173
|
+
await downloadFile(primaryUrl, binaryPath);
|
|
174
|
+
} catch (primaryError) {
|
|
175
|
+
console.log(`ā ļø Primary download failed, trying fallback...`);
|
|
176
|
+
await downloadFile(fallbackUrl, binaryPath);
|
|
177
|
+
}
|
|
169
178
|
|
|
170
179
|
// Verify checksum
|
|
171
180
|
const expectedChecksum = CHECKSUMS[platformKey];
|
|
@@ -192,7 +201,7 @@ async function install() {
|
|
|
192
201
|
} catch (error) {
|
|
193
202
|
console.error(`\nā Installation failed: ${error.message}`);
|
|
194
203
|
console.error('\nManual installation:');
|
|
195
|
-
console.error(`1. Download the binary from:
|
|
204
|
+
console.error(`1. Download the binary from: ${fallbackUrl}`);
|
|
196
205
|
console.error(`2. Place it in your PATH as 'quantum-scanner'`);
|
|
197
206
|
console.error(`3. Make it executable: chmod +x quantum-scanner`);
|
|
198
207
|
process.exit(1);
|