quick-outerbase 0.2.0 → 0.3.5
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/launcher.mjs +6 -3
- package/package.json +1 -1
package/launcher.mjs
CHANGED
|
@@ -121,12 +121,9 @@ async function ensureBundle() {
|
|
|
121
121
|
const localOverride = process.env.QUICK_OUTERBASE_BUNDLE;
|
|
122
122
|
if (localOverride) {
|
|
123
123
|
if (!existsSync(localOverride)) fail(`QUICK_OUTERBASE_BUNDLE no existe: ${localOverride}`);
|
|
124
|
-
console.log(`• Usando bundle local: ${localOverride}`);
|
|
125
124
|
copyFileSync(localOverride, innerTgz);
|
|
126
125
|
} else {
|
|
127
|
-
console.log(`• Descargando runtime (${assetName}, ~28MB, una sola vez)…`);
|
|
128
126
|
await download(assetUrl, innerTgz);
|
|
129
|
-
console.log("• Extrayendo…");
|
|
130
127
|
}
|
|
131
128
|
extractInDir(bundleDir, "_bundle.tar.gz");
|
|
132
129
|
try {
|
|
@@ -219,6 +216,10 @@ async function main() {
|
|
|
219
216
|
if (!noOpen) {
|
|
220
217
|
const targetUrl = `http://localhost:${port}/env`;
|
|
221
218
|
const started = Date.now();
|
|
219
|
+
// Puede haber varios requests del poll en vuelo a la vez (el server tarda más
|
|
220
|
+
// que el intervalo en responder el primero). Sin este guard, dos respuestas OK
|
|
221
|
+
// abrían el navegador dos veces. `opened` asegura una sola apertura.
|
|
222
|
+
let opened = false;
|
|
222
223
|
const poll = setInterval(() => {
|
|
223
224
|
if (tearingDown) return clearInterval(poll);
|
|
224
225
|
const req = http.get(
|
|
@@ -226,6 +227,8 @@ async function main() {
|
|
|
226
227
|
(res) => {
|
|
227
228
|
res.destroy();
|
|
228
229
|
clearInterval(poll);
|
|
230
|
+
if (opened) return;
|
|
231
|
+
opened = true;
|
|
229
232
|
console.log(`✔ Listo en ${targetUrl}`);
|
|
230
233
|
openBrowser(targetUrl);
|
|
231
234
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quick-outerbase",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Launcher de quick-outerbase: baja un runtime precompilado y levanta una UI web local para tu DATABASE_URL (postgres/mysql/sqlite/libsql) en segundos. Fork de Outerbase Studio (AGPL-3.0).",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"bin": {
|