satoridb 1.1.3 β 1.1.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/package.json +1 -1
- package/postinstall.js +3 -11
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -25,20 +25,15 @@ const installDir = path.join(os.homedir(), ".satori", "bin");
|
|
|
25
25
|
const binName = platform === "win32" ? "satori.exe" : "satori";
|
|
26
26
|
const binFullPath = path.join(installDir, binName);
|
|
27
27
|
|
|
28
|
-
console.log(`π Temp directory: ${tmpDir}`);
|
|
29
|
-
console.log(`π Install directory: ${installDir}`);
|
|
30
|
-
console.log(`π Zip path: ${zipPath}`);
|
|
31
28
|
|
|
32
29
|
// Crear directorio temporal y subdirectorios con mejor manejo de errores
|
|
33
30
|
try {
|
|
34
31
|
fs.mkdirSync(tmpDir, { recursive: true });
|
|
35
|
-
console.log(`β
Temp directory created/verified`);
|
|
36
32
|
|
|
37
33
|
// Crear el subdirectorio especΓfico de la plataforma si es necesario
|
|
38
34
|
const platformSubDir = path.dirname(zipPath);
|
|
39
35
|
if (platformSubDir !== tmpDir) {
|
|
40
36
|
fs.mkdirSync(platformSubDir, { recursive: true });
|
|
41
|
-
console.log(`β
Platform subdirectory created: ${platformSubDir}`);
|
|
42
37
|
}
|
|
43
38
|
} catch (err) {
|
|
44
39
|
console.error("β Error creating directories:", err.message);
|
|
@@ -69,7 +64,6 @@ function downloadZip(url, dest, cb) {
|
|
|
69
64
|
// Verificar que el archivo existe y tiene contenido
|
|
70
65
|
try {
|
|
71
66
|
const stats = fs.statSync(dest);
|
|
72
|
-
console.log(`π File size: ${stats.size} bytes`);
|
|
73
67
|
if (stats.size === 0) {
|
|
74
68
|
console.error("β Downloaded file is empty");
|
|
75
69
|
fs.unlink(dest, () => {});
|
|
@@ -108,8 +102,7 @@ function downloadZip(url, dest, cb) {
|
|
|
108
102
|
|
|
109
103
|
// Extraer ZIP con mejor manejo de errores
|
|
110
104
|
function extractZip(src, dest) {
|
|
111
|
-
|
|
112
|
-
console.log(`π¦ Extracting to: ${dest}`);
|
|
105
|
+
|
|
113
106
|
|
|
114
107
|
try {
|
|
115
108
|
// Verificar que el archivo ZIP existe
|
|
@@ -158,7 +151,6 @@ downloadZip(`${baseURL}/${fileName}`, zipPath, () => {
|
|
|
158
151
|
// Limpiar archivo temporal
|
|
159
152
|
try {
|
|
160
153
|
fs.unlinkSync(zipPath);
|
|
161
|
-
console.log(`π§Ή Cleaned up temporary file: ${zipPath}`);
|
|
162
154
|
} catch (err) {
|
|
163
155
|
console.warn(`β οΈ Could not clean up temporary file: ${err.message}`);
|
|
164
156
|
}
|
|
@@ -168,7 +160,7 @@ downloadZip(`${baseURL}/${fileName}`, zipPath, () => {
|
|
|
168
160
|
|
|
169
161
|
const exportLine = `export PATH="$HOME/.satori/bin:$PATH"`;
|
|
170
162
|
|
|
171
|
-
|
|
163
|
+
/* console.log(`π‘ Add this to your ~/${profileFile}:\n`);
|
|
172
164
|
console.log(` ${exportLine}\n`);
|
|
173
|
-
console.log(`Then run: source ~/${profileFile}\n`)
|
|
165
|
+
console.log(`Then run: source ~/${profileFile}\n`);*/
|
|
174
166
|
});
|