@tensorix/metahub 0.1.6 → 0.1.8
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/dist/cli.js +42 -8
- package/dist/cli.js.map +4 -4
- package/dist/core/sync/server.d.ts.map +1 -1
- package/dist/core/sync/webui.d.ts.map +1 -1
- package/dist/index.js +26 -6
- package/dist/index.js.map +4 -4
- package/dist/webui.js +114 -33
- package/package.json +4 -1
package/dist/cli.js
CHANGED
|
@@ -5,25 +5,43 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
8
13
|
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
9
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
23
|
for (let key of __getOwnPropNames(mod))
|
|
12
24
|
if (!__hasOwnProp.call(to, key))
|
|
13
25
|
__defProp(to, key, {
|
|
14
|
-
get: (
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
15
27
|
enumerable: true
|
|
16
28
|
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
17
31
|
return to;
|
|
18
32
|
};
|
|
19
33
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
+
var __returnValue = (v) => v;
|
|
35
|
+
function __exportSetter(name, newValue) {
|
|
36
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
37
|
+
}
|
|
20
38
|
var __export = (target, all) => {
|
|
21
39
|
for (var name in all)
|
|
22
40
|
__defProp(target, name, {
|
|
23
41
|
get: all[name],
|
|
24
42
|
enumerable: true,
|
|
25
43
|
configurable: true,
|
|
26
|
-
set: (
|
|
44
|
+
set: __exportSetter.bind(all, name)
|
|
27
45
|
});
|
|
28
46
|
};
|
|
29
47
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -667,7 +685,7 @@ var init_prompt = __esm(() => {
|
|
|
667
685
|
Object.keys(r.modifier);
|
|
668
686
|
tD = Object.keys(r.color);
|
|
669
687
|
eD = Object.keys(r.bgColor);
|
|
670
|
-
[...tD];
|
|
688
|
+
[...tD, ...eD];
|
|
671
689
|
iD = sD();
|
|
672
690
|
v = new Set(["\x1B", "\x9B"]);
|
|
673
691
|
y = `${rD}8;;`;
|
|
@@ -1396,6 +1414,7 @@ async function serveWebui(req) {
|
|
|
1396
1414
|
headers: { "content-type": "text/javascript; charset=utf-8" }
|
|
1397
1415
|
});
|
|
1398
1416
|
} catch (e3) {
|
|
1417
|
+
console.error("[webui] failed to serve /webui.js \u2014", e3);
|
|
1399
1418
|
return new Response(`webui build failed: ${e3}`, { status: 500 });
|
|
1400
1419
|
}
|
|
1401
1420
|
}
|
|
@@ -1597,6 +1616,18 @@ var HTML = `<!doctype html>
|
|
|
1597
1616
|
.btn-primary:hover { filter:brightness(1.07); }
|
|
1598
1617
|
.btn-danger { background:var(--danger); color:#fff; } .btn-danger:hover { filter:brightness(1.05); }
|
|
1599
1618
|
|
|
1619
|
+
/* desktop app (frameless): drop the sidebar logo; on macOS reserve a draggable
|
|
1620
|
+
strip for the inset traffic lights so they never overlap our controls */
|
|
1621
|
+
body.desktop .brand { display:none; }
|
|
1622
|
+
/* logo gone \u2192 keep the collapse button on the right (where .brand's flex used to push it) */
|
|
1623
|
+
body.desktop .sb-head .iconbtn { margin-left:auto; }
|
|
1624
|
+
body.desktop-mac .sb-head { -webkit-app-region:drag; }
|
|
1625
|
+
body.desktop-mac .sb-head .iconbtn { -webkit-app-region:no-drag; }
|
|
1626
|
+
body.desktop-mac .topbar { -webkit-app-region:drag; }
|
|
1627
|
+
body.desktop-mac .topbar .iconbtn, body.desktop-mac .topbar .btn { -webkit-app-region:no-drag; }
|
|
1628
|
+
/* sidebar collapsed \u2192 traffic lights sit over the main header; clear the hamburger */
|
|
1629
|
+
body.desktop-mac .sidebar.collapsed ~ .main .topbar { padding-left:80px; }
|
|
1630
|
+
|
|
1600
1631
|
/* document editor */
|
|
1601
1632
|
.doc { max-width:740px; margin:0 auto; padding:60px 60px 36vh; }
|
|
1602
1633
|
.doc-title { font-size:38px; font-weight:700; letter-spacing:-.02em; outline:none; line-height:1.15; margin-bottom:4px; }
|
|
@@ -3574,7 +3605,7 @@ async function runMain(cmd, opts = {}) {
|
|
|
3574
3605
|
// package.json
|
|
3575
3606
|
var package_default = {
|
|
3576
3607
|
name: "@tensorix/metahub",
|
|
3577
|
-
version: "0.1.
|
|
3608
|
+
version: "0.1.8",
|
|
3578
3609
|
description: "Metahub core library and CLI",
|
|
3579
3610
|
license: "AGPL-3.0-only",
|
|
3580
3611
|
type: "module",
|
|
@@ -3611,10 +3642,13 @@ var package_default = {
|
|
|
3611
3642
|
citty: "^0.1.6",
|
|
3612
3643
|
"highlight.js": "^11.11.1",
|
|
3613
3644
|
preact: "^10.29.2",
|
|
3645
|
+
turndown: "^7.2.4",
|
|
3646
|
+
"turndown-plugin-gfm": "^1.0.2",
|
|
3614
3647
|
zod: "^4.4.3"
|
|
3615
3648
|
},
|
|
3616
3649
|
devDependencies: {
|
|
3617
3650
|
"@types/bun": "latest",
|
|
3651
|
+
"@types/turndown": "^5.0.6",
|
|
3618
3652
|
typescript: "^5"
|
|
3619
3653
|
}
|
|
3620
3654
|
};
|
|
@@ -17261,7 +17295,7 @@ function finalize(ctx, schema) {
|
|
|
17261
17295
|
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
17262
17296
|
} else if (ctx.target === "draft-04") {
|
|
17263
17297
|
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
17264
|
-
} else if (ctx.target === "openapi-3.0") {}
|
|
17298
|
+
} else if (ctx.target === "openapi-3.0") {}
|
|
17265
17299
|
if (ctx.external?.uri) {
|
|
17266
17300
|
const id = ctx.external.registry.get(schema)?.id;
|
|
17267
17301
|
if (!id)
|
|
@@ -17505,7 +17539,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
17505
17539
|
if (val === undefined) {
|
|
17506
17540
|
if (ctx.unrepresentable === "throw") {
|
|
17507
17541
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
17508
|
-
}
|
|
17542
|
+
}
|
|
17509
17543
|
} else if (typeof val === "bigint") {
|
|
17510
17544
|
if (ctx.unrepresentable === "throw") {
|
|
17511
17545
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
@@ -23532,7 +23566,7 @@ function startServer(opts = {}) {
|
|
|
23532
23566
|
let timer = null;
|
|
23533
23567
|
if (autoSync && syncIntervalMs > 0) {
|
|
23534
23568
|
timer = setInterval(() => {
|
|
23535
|
-
syncAllPeers(db).catch(() =>
|
|
23569
|
+
syncAllPeers(db).catch((e3) => console.error("[sync] auto-sync tick failed \u2014", e3));
|
|
23536
23570
|
}, syncIntervalMs);
|
|
23537
23571
|
timer.unref?.();
|
|
23538
23572
|
}
|
|
@@ -23972,4 +24006,4 @@ if (argv2.includes("--server")) {
|
|
|
23972
24006
|
runMain(main, { showUsage: showUsage2 });
|
|
23973
24007
|
}
|
|
23974
24008
|
|
|
23975
|
-
//# debugId=
|
|
24009
|
+
//# debugId=BD44ACF4937BFB2064756E2164756E21
|