@akin01/mailgen 0.1.0 → 0.1.2
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/package.json +1 -1
- package/scripts/install.js +6 -6
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -5,7 +5,7 @@ const https = require('https');
|
|
|
5
5
|
const { execSync } = require('child_process');
|
|
6
6
|
|
|
7
7
|
const REPO = "akin01/emailgen";
|
|
8
|
-
const BIN_NAME = os.platform() === 'win32' ? '
|
|
8
|
+
const BIN_NAME = os.platform() === 'win32' ? 'mailgen.exe' : 'mailgen';
|
|
9
9
|
const DEST_DIR = path.join(__dirname, '..', 'bin');
|
|
10
10
|
|
|
11
11
|
if (!fs.existsSync(DEST_DIR)) {
|
|
@@ -17,14 +17,14 @@ const getPlatformAsset = () => {
|
|
|
17
17
|
const arch = os.arch();
|
|
18
18
|
|
|
19
19
|
if (platform === 'darwin') {
|
|
20
|
-
if (arch === 'arm64') return `
|
|
21
|
-
if (arch === 'x64') return `
|
|
20
|
+
if (arch === 'arm64') return `mailgen-macos-aarch64.tar.gz`;
|
|
21
|
+
if (arch === 'x64') return `mailgen-macos-x86_64.tar.gz`;
|
|
22
22
|
}
|
|
23
23
|
if (platform === 'linux') {
|
|
24
|
-
if (arch === 'x64') return `
|
|
24
|
+
if (arch === 'x64') return `mailgen-linux-x86_64.tar.gz`;
|
|
25
25
|
}
|
|
26
26
|
if (platform === 'win32') {
|
|
27
|
-
if (arch === 'x64') return `
|
|
27
|
+
if (arch === 'x64') return `mailgen-windows-x86_64.zip`;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
throw new Error(`Unsupported platform/architecture: ${platform}/${arch}`);
|
|
@@ -92,7 +92,7 @@ const install = async () => {
|
|
|
92
92
|
fs.chmodSync(path.join(DEST_DIR, BIN_NAME), 0o755);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
console.log(`Successfully installed
|
|
95
|
+
console.log(`Successfully installed mailgen!`);
|
|
96
96
|
fs.unlinkSync(tempPath);
|
|
97
97
|
} catch (err) {
|
|
98
98
|
console.error(`Error during installation: ${err.message}`);
|