quick-outerbase 0.4.1 → 0.5.0

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 CHANGED
@@ -1,16 +1,21 @@
1
1
  # quick-outerbase
2
2
 
3
- Tomá un `DATABASE_URL` y levantá una **UI web local** para tu base
4
- (PostgreSQL / MySQL / SQLite / libSQL-Turso) con **un comando**, en segundos.
3
+ **Una GUI de base de datos en tu terminal.** Tomá un `DATABASE_URL` y levantá una **UI web
4
+ local** para explorar, consultar y editar tu base con **un comando**, en segundos.
5
+ Alternativa open-source y multi-motor a **Prisma Studio**, **Drizzle Studio**, **DbGate**,
6
+ **TablePlus** y **Outerbase Studio**.
5
7
 
6
8
  ```bash
7
9
  npx quick-outerbase --url "postgresql://user:pass@host:5432/midb?schema=public"
8
10
  ```
9
11
 
10
- Es un **launcher fino**: no compila nada en tu máquina. Detecta tu plataforma, baja
11
- **una sola vez** un runtime precompilado (`standalone`, ~28 MB) desde GitHub Releases,
12
- lo cachea y arranca. Primer run: segundos. Siguientes: instantáneo.
12
+ **Motores:** PostgreSQL · MySQL/MariaDB · SQLite · libSQL/Turso · **DynamoDB**.
13
13
 
14
+ Es un **launcher fino** (cero dependencias): no compila nada en tu máquina. Detecta tu
15
+ plataforma, baja **una sola vez** un runtime precompilado (`standalone`, ~28 MB) desde
16
+ GitHub Releases, lo cachea y arranca. Primer run: segundos. Siguientes: instantáneo.
17
+
18
+ > ⚠️ **Fork no oficial de la comunidad.** No está afiliado ni respaldado por Outerbase.
14
19
  > Fork de [Outerbase Studio](https://github.com/outerbase/studio), bajo **AGPL-3.0**.
15
20
  > Código fuente completo: https://github.com/joajo13/quick-outerbase
16
21
 
@@ -28,6 +33,10 @@ npx quick-outerbase --url "libsql://mi-db.turso.io?authToken=XXXX"
28
33
 
29
34
  # SQLite (el path relativo se resuelve contra tu carpeta actual)
30
35
  npx quick-outerbase --url "file:./datos.sqlite"
36
+
37
+ # DynamoDB (las creds NO van en la URL: las resuelve el server desde la cadena AWS)
38
+ AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... \
39
+ npx quick-outerbase --url "dynamodb://us-east-1"
31
40
  ```
32
41
 
33
42
  También podés pasar el URL por la env `DATABASE_URL`. Flags: `--port <n>` (default 3008),
package/checksum.mjs ADDED
@@ -0,0 +1,46 @@
1
+ // Verificación de integridad del bundle (cadena de confianza de quick-outerbase).
2
+ //
3
+ // El runtime (server.js standalone) viaja por GitHub Releases, un canal SIN firmar.
4
+ // El paquete npm, en cambio, está firmado por npm. Para atar los dos mundos, el CI
5
+ // embebe `checksums.json` (sha256 de cada bundle) DENTRO del paquete npm firmado.
6
+ // El launcher lee ese JSON local y verifica el .tar.gz descargado ANTES de extraer.
7
+ // Si alguien altera el asset del Release, el sha256 no matchea y abortamos.
8
+ //
9
+ // Cero dependencias de runtime: solo `node:crypto` y `node:fs`.
10
+ import { createHash } from "node:crypto";
11
+ import { readFileSync } from "node:fs";
12
+
13
+ /** sha256 hex de un archivo (lectura completa a memoria; los bundles son ~28 MB). */
14
+ export function sha256File(file) {
15
+ return createHash("sha256").update(readFileSync(file)).digest("hex");
16
+ }
17
+
18
+ /** Carga y parsea el mapa { "<plat>-<arch>": "<sha256hex>" } desde checksums.json. */
19
+ export function loadExpected(checksumsPath) {
20
+ return JSON.parse(readFileSync(checksumsPath, "utf8"));
21
+ }
22
+
23
+ /**
24
+ * Verifica que el bundle `file` coincida con el checksum esperado para `target`.
25
+ * Lanza Error (con mensaje claro) si falta el checksum o no matchea.
26
+ * Devuelve el sha256 calculado si todo OK.
27
+ */
28
+ export function verifyBundleChecksum(file, target, expected) {
29
+ const want = expected && expected[target];
30
+ if (!want) {
31
+ throw new Error(
32
+ `No tengo checksum esperado para "${target}" en checksums.json. ` +
33
+ "Aborto por seguridad (no puedo verificar la integridad del runtime)."
34
+ );
35
+ }
36
+ const got = sha256File(file);
37
+ if (got !== want) {
38
+ throw new Error(
39
+ `El runtime descargado NO coincide con el checksum esperado (${target}).\n` +
40
+ ` esperado=${want}\n` +
41
+ ` obtenido=${got}\n` +
42
+ "Abortado por seguridad: el bundle pudo ser alterado o corromperse en la descarga."
43
+ );
44
+ }
45
+ return got;
46
+ }
package/checksums.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "linux-x64": "778bbfc100b718671888c8a095dea2f85810964a6f0f6e1c0aaada8ede3a3faa",
3
+ "win32-x64": "9347bdd7116febc1ca931149779c3ff3407927e76ed89443127ff437c19ea681"
4
+ }