@hot-updater/console 0.0.1 → 0.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/package.json +6 -4
- package/scripts/binary_rename.js +25 -0
- package/scripts/postinstall.js +13 -0
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/console",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": "./bin"
|
|
6
6
|
},
|
|
7
7
|
"files": [
|
|
8
8
|
"bin",
|
|
9
|
-
"package.json"
|
|
9
|
+
"package.json",
|
|
10
|
+
"scripts"
|
|
10
11
|
],
|
|
11
12
|
"publishConfig": {
|
|
12
13
|
"access": "public"
|
|
@@ -57,10 +58,11 @@
|
|
|
57
58
|
"vite-plugin-solid": "^2.10.2",
|
|
58
59
|
"wouter": "^3.3.5",
|
|
59
60
|
"zod": "^3.23.8",
|
|
60
|
-
"@hot-updater/
|
|
61
|
-
"@hot-updater/
|
|
61
|
+
"@hot-updater/plugin-core": "^0.0.4",
|
|
62
|
+
"@hot-updater/utils": "^0.0.4"
|
|
62
63
|
},
|
|
63
64
|
"scripts": {
|
|
65
|
+
"postinstall": "node ./scripts/postinstall.js",
|
|
64
66
|
"start": "vite",
|
|
65
67
|
"dev": "vite",
|
|
66
68
|
"build": "vite build",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { execSync } from 'child_process';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
|
|
4
|
+
const ext = process.platform === 'win32' ? '.exe' : '';
|
|
5
|
+
|
|
6
|
+
// aarch64-unknown-linux-gnu ARM64 Linux (kernel 4.1, glibc 2.17+)
|
|
7
|
+
// aarch64-apple-darwin ARM64 macOS (11.0+, Big Sur+)
|
|
8
|
+
// i686-pc-windows-gnu 32-bit MinGW (Windows 10+, Windows Server 2016+) 1
|
|
9
|
+
// i686-pc-windows-msvc 32-bit MSVC (Windows 10+, Windows Server 2016+) 1
|
|
10
|
+
// i686-unknown-linux-gnu 32-bit Linux (kernel 3.2+, glibc 2.17+) 1
|
|
11
|
+
// x86_64-apple-darwin 64-bit macOS (10.12+, Sierra+)
|
|
12
|
+
// x86_64-pc-windows-gnu 64-bit MinGW (Windows 10+, Windows Server 2016+)
|
|
13
|
+
// x86_64-pc-windows-msvc 64-bit MSVC (Windows 10+, Windows Server 2016+)
|
|
14
|
+
// x86_64-unknown-linux-gnu 64-bit Linux (kernel 3.2+, glibc 2.17+)
|
|
15
|
+
|
|
16
|
+
const rustInfo = execSync('rustc -vV');
|
|
17
|
+
const targetTriple = /host: (\S+)/g.exec(rustInfo)[1];
|
|
18
|
+
if (!targetTriple) {
|
|
19
|
+
console.error('Failed to determine platform target triple');
|
|
20
|
+
}
|
|
21
|
+
fs.mkdirSync(`./src-tauri/binaries`, { recursive: true });
|
|
22
|
+
fs.renameSync(
|
|
23
|
+
`./sidecar-app/app${ext}`,
|
|
24
|
+
`./src-tauri/binaries/app-${targetTriple}${ext}`
|
|
25
|
+
);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// 현재 경로 기준 ../bin/console.app/Contents/MacOS/HotUpdater를 chmod로 +x 권한 부여
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
|
+
import { execSync } from "child_process";
|
|
4
|
+
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
|
|
8
|
+
const __dirname = fileURLToPath(import.meta.url);
|
|
9
|
+
const binaryPath = path.resolve(__dirname, '../../bin/console.app/Contents/MacOS/HotUpdater');
|
|
10
|
+
|
|
11
|
+
if (fs.existsSync(binaryPath)) {
|
|
12
|
+
execSync(`chmod +x ${binaryPath}`);
|
|
13
|
+
}
|