@kedem/okdb 3.0.1 → 3.1.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/CHANGELOG.md +76 -0
- package/README.md +9 -5
- package/docs/auth-and-sync.md +1 -1
- package/docs/change-log.md +1 -1
- package/docs/data-model.md +3 -1
- package/docs/encryption.md +132 -0
- package/docs/files.md +11 -9
- package/docs/functions.md +5 -3
- package/docs/getting-started.md +0 -4
- package/docs/http-api.md +0 -2
- package/docs/licensing.md +2 -2
- package/docs/manifest.json +2 -1
- package/docs/migration.md +1 -1
- package/docs/pipelines.md +21 -20
- package/docs/queue.md +0 -2
- package/docs/sync.md +2 -2
- package/docs/time-machine.md +19 -10
- package/docs/upgrade-2.0.md +1 -1
- package/docs/views.md +47 -32
- package/native/linux-x64-gnu/okdb-node.linux-x64-gnu.node +0 -0
- package/okdb-native.js +1 -1
- package/package.json +1 -1
- package/public/features/files/parts/files-blob-status.ok.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kedem/okdb",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "A fast, type-oriented database — strong consistency and rich indexing at the core, with sync, vector embeddings, full-text search, and AI tooling built in. Designed for the AI era.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"engines": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default{tag:"files-blob-status",context:t=>({busy:!1,syncing:!1,blobs:[],error:null,syncResult:null,async load(){this.busy=!0,this.error=null;try{const t=await fetch(`${__ENV__.API}/files/blobs/status`),
|
|
1
|
+
import t from"@admin/stores/okdb-store.js";const n=()=>`?env=${encodeURIComponent(t.selectedEnv||"default")}`;export default{tag:"files-blob-status",context:t=>({busy:!1,syncing:!1,blobs:[],error:null,syncResult:null,async load(){this.busy=!0,this.error=null;try{const t=await fetch(`${__ENV__.API}/files/blobs/status${n()}`),e=await t.json();if(!t.ok)throw new Error(e?.error?.message||"failed");this.blobs=e.data??[]}catch(t){this.error=t?.message||String(t)}finally{this.busy=!1}},async triggerSync(){this.syncing=!0,this.syncResult=null;try{const t=await fetch(`${__ENV__.API}/files/blobs/sync${n()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),e=await t.json();if(!t.ok)throw new Error(e?.error?.message||"failed");this.syncResult=e.data,await this.load()}catch(t){this.error=t?.message||String(t)}finally{this.syncing=!1}},fmtSize:t=>null==t?"—":t<1024?t+" B":t<1048576?(t/1024).toFixed(1)+" KB":(t/1048576).toFixed(1)+" MB",nodeCount:t=>t&&"object"==typeof t?Object.values(t).filter(Boolean).length:0}),async mount(){await this.load()},template:'\n<div style="display:flex; flex-direction:column; gap:16px; height:100%; min-height:0;">\n\n <div style="display:flex; align-items:center; justify-content:space-between; gap:8px;">\n <div style="font-weight:600; font-size:15px;">Blob Mesh Sync</div>\n <div style="display:flex; gap:8px;">\n <button @click="load()" :disabled="busy" style="font-size:12px;">↻ Refresh</button>\n <button\n @click="triggerSync()"\n :disabled="syncing || busy"\n style="font-size:12px; background:var(--okdb-sky-soft-bg); border-color:var(--okdb-sky-soft-border); color:var(--okdb-sky);"\n >\n {{ syncing ? \'Syncing…\' : \'⇄ Sync Blobs\' }}\n </button>\n </div>\n </div>\n\n <if :="syncResult">\n <div style="\n padding:8px 12px;\n border-radius:8px;\n background:#1a2f1a;\n border:1px solid #2a4a2a;\n font-size:12px;\n color:#86efac;\n ">\n Sync complete — pulled <strong>{{ syncResult.synced }}</strong> blob(s).\n <if :="syncResult.errors?.length > 0">\n <span style="color:var(--okdb-danger); margin-left:8px;">{{ syncResult.errors.length }} error(s)</span>\n </if>\n </div>\n </if>\n\n <if :="error">\n <div style="color:var(--okdb-danger); font-size:12px;">{{ error }}</div>\n </if>\n\n <if :="busy">\n <div style="font-size:12px; opacity:.5;">Loading…</div>\n </if>\n\n <if :="!busy && blobs.length === 0">\n <div style="font-size:13px; opacity:.4; padding:24px 0; text-align:center;">\n No blobs tracked yet. Upload files to see them here.\n </div>\n </if>\n\n <if :="blobs.length > 0">\n <div style="flex:1; overflow:auto; min-height:0;">\n <table style="width:100%; border-collapse:collapse; font-size:12px;">\n <thead>\n <tr style="border-bottom:1px solid var(--okdb-app-border); opacity:.6;">\n <th style="text-align:left; padding:6px 8px; font-weight:500;">Hash</th>\n <th style="text-align:right; padding:6px 8px; font-weight:500;">Refs</th>\n <th style="text-align:center; padding:6px 8px; font-weight:500;">On Disk</th>\n <th style="text-align:right; padding:6px 8px; font-weight:500;">Size</th>\n <th style="text-align:right; padding:6px 8px; font-weight:500;">Nodes</th>\n </tr>\n </thead>\n <tbody>\n <tr as="repeat" :of="blobs" let:item="b" style="border-bottom:1px solid var(--okdb-app-surface-2);">\n <td style="padding:5px 8px; font-family:monospace; font-size:11px; opacity:.7;" :title="b.hash">\n {{ b.hash ? b.hash.slice(0, 12) : \'\' }}…\n </td>\n <td style="padding:5px 8px; text-align:right; font-family:monospace;">{{ b.refs }}</td>\n <td style="padding:5px 8px; text-align:center;">\n <span :style="b.onDisk ? \'color:var(--okdb-success);\' : \'color:var(--okdb-danger);\'">{{ b.onDisk ? \'✓\' : \'✗\' }}</span>\n </td>\n <td style="padding:5px 8px; text-align:right; font-family:monospace; opacity:.7;">\n {{ fmtSize(b.sizeBytes) }}\n </td>\n <td style="padding:5px 8px; text-align:right; opacity:.6;">{{ nodeCount(b.nodes) }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style="font-size:11px; opacity:.4; text-align:right;">{{ blobs.length }} blob(s) tracked</div>\n </if>\n\n</div>'};
|