tinbase 0.8.0 → 0.9.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 +2 -2
- package/assets/logo.svg +9 -13
- package/dist/admin/ui.d.ts +1 -1
- package/dist/admin/ui.js +1 -1
- package/dist/auth/handler.d.ts +25 -0
- package/dist/auth/handler.js +127 -8
- package/dist/auth/handler.js.map +1 -1
- package/dist/auth/oauth.d.ts +1 -0
- package/dist/auth/oauth.js +28 -9
- package/dist/auth/oauth.js.map +1 -1
- package/dist/cron/service.js +2 -1
- package/dist/cron/service.js.map +1 -1
- package/dist/db/bootstrap.d.ts +2 -2
- package/dist/db/bootstrap.js +19 -0
- package/dist/db/bootstrap.js.map +1 -1
- package/dist/db/database.d.ts +3 -1
- package/dist/db/database.js +6 -1
- package/dist/db/database.js.map +1 -1
- package/dist/db/emulated.d.ts +3 -3
- package/dist/db/emulated.js +46 -13
- package/dist/db/emulated.js.map +1 -1
- package/dist/functions/deno-shim.d.ts +3 -2
- package/dist/functions/deno-shim.js +12 -4
- package/dist/functions/deno-shim.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/jwt.js +5 -0
- package/dist/jwt.js.map +1 -1
- package/dist/net/service.d.ts +9 -0
- package/dist/net/service.js +97 -10
- package/dist/net/service.js.map +1 -1
- package/dist/node/ws.d.ts +9 -0
- package/dist/node/ws.js +8 -2
- package/dist/node/ws.js.map +1 -1
- package/dist/realtime/engine.js +19 -1
- package/dist/realtime/engine.js.map +1 -1
- package/dist/retention/service.d.ts +37 -0
- package/dist/retention/service.js +66 -0
- package/dist/retention/service.js.map +1 -0
- package/dist/storage/handler.js +48 -21
- package/dist/storage/handler.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -182,14 +182,14 @@ Measured on an Apple Silicon Mac (48 GB), macOS 15. Same workload for all three:
|
|
|
182
182
|
| Runtime memory at boot | 49 MB | 59 MB | 71 MB | ~610 MB² | 15 MB | 1,441 MB |
|
|
183
183
|
| Runtime memory after workload | 66 MB | 100 MB | 185 MB | ~640 MB² | 24 MB | 1,626 MB |
|
|
184
184
|
| Data on disk (1k rows) | 39 MB | 39 MB | 0 (in-memory) | 40 MB | 7 MB | 70 MB |
|
|
185
|
-
| Install size | 92 MB (58 MB binary + PG) | 36 MB³ |
|
|
185
|
+
| Install size | 92 MB (58 MB binary + PG) | 36 MB³ | 6.7 MB³ | 27 MB³ | 30 MB | 2,291 MB⁴ |
|
|
186
186
|
| Processes | 2 | 2 | 1 | 1 | 1 | 12 containers + Docker |
|
|
187
187
|
| 1,000 inserts | 0.4 s | 0.5 s | 0.8 s | 0.8 s | 0.3 s | 1.1 s |
|
|
188
188
|
| 1,000 filtered reads | 0.3 s | 0.4 s | 0.8 s | 0.9 s | 0.3 s | 1.0 s |
|
|
189
189
|
|
|
190
190
|
¹ **pgmem** is a pure-JS in-memory engine (local dev / preview) via the [`@tinbase/pg-mem`](https://www.npmjs.com/package/@tinbase/pg-mem) fork. It now runs PL/pgSQL, triggers and RLS-policy DDL (migrations apply unchanged, nothing skipped), but the engine runs as superuser so RLS isn't enforced per-request (realtime/webhook events are unfiltered), and **cron**/**pgmq** are absent. Pure JS (no WASM), the lightest option for the browser. See [Engines](#engines).
|
|
191
191
|
² The wasm figure is essentially PGlite's WASM heap, which measures anywhere in ~575–650 MB depending on GC timing — treat it as a band, not a point. It does not shrink under load.
|
|
192
|
-
³ Native: Postgres
|
|
192
|
+
³ Full production `node_modules` + `dist`, excluding the Node runtime you already have. Native: `dist` + node-pg (Postgres binaries download to a shared cache on first run). pg-mem: `dist` + `@tinbase/pg-mem` and its deps — ~6.7 MB (the fork uses a zero-dependency date layer; no `moment`). Wasm: `dist` + `@electric-sql/pglite`.
|
|
193
193
|
⁴ Sum of the Docker image sizes the default local stack runs, excluding Docker Desktop itself.
|
|
194
194
|
|
|
195
195
|
**How to read this honestly:**
|
package/assets/logo.svg
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="
|
|
4
|
-
<stop stop-color="#10b981"/>
|
|
5
|
-
|
|
3
|
+
<linearGradient id="tinBody" x1="30" y1="30" x2="92" y2="102" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#10b981"/><stop offset="1" stop-color="#047857"/>
|
|
5
|
+
</linearGradient>
|
|
6
|
+
<linearGradient id="tinLid" x1="26" y1="19" x2="94" y2="49" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="#6ee7b7"/><stop offset="1" stop-color="#34d399"/>
|
|
6
8
|
</linearGradient>
|
|
7
9
|
</defs>
|
|
8
|
-
|
|
9
|
-
<path d="
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
<!-- lid -->
|
|
13
|
-
<ellipse cx="60" cy="34" rx="36" ry="16" fill="#34d399"/>
|
|
14
|
-
<ellipse cx="60" cy="34" rx="36" ry="16" stroke="#065f46" stroke-opacity="0.25" stroke-width="2"/>
|
|
15
|
-
<!-- pull tab -->
|
|
16
|
-
<circle cx="72" cy="31" r="7" fill="none" stroke="#065f46" stroke-width="4"/>
|
|
17
|
-
<rect x="54" y="27.5" width="14" height="5" rx="2.5" fill="#065f46" transform="rotate(8 54 30)"/>
|
|
10
|
+
<path d="M26 34v52c0 8.4 15.2 15.2 34 15.2s34-6.8 34-15.2V34Z" fill="url(#tinBody)"/>
|
|
11
|
+
<path d="M26 60c0 8.4 15.2 15.2 34 15.2S94 68.4 94 60" stroke="#6ee7b7" stroke-width="3" fill="none"/>
|
|
12
|
+
<ellipse cx="60" cy="34" rx="34" ry="15" fill="url(#tinLid)"/>
|
|
13
|
+
<ellipse cx="60" cy="34" rx="25" ry="10" fill="none" stroke="#059669" stroke-opacity="0.5" stroke-width="2.5"/>
|
|
18
14
|
</svg>
|