@tensorix/metahub 0.1.6 → 0.1.7

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 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: () => mod[key],
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: (newValue) => all[name] = () => newValue
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
  }
@@ -3574,7 +3593,7 @@ async function runMain(cmd, opts = {}) {
3574
3593
  // package.json
3575
3594
  var package_default = {
3576
3595
  name: "@tensorix/metahub",
3577
- version: "0.1.6",
3596
+ version: "0.1.7",
3578
3597
  description: "Metahub core library and CLI",
3579
3598
  license: "AGPL-3.0-only",
3580
3599
  type: "module",
@@ -17261,7 +17280,7 @@ function finalize(ctx, schema) {
17261
17280
  result.$schema = "http://json-schema.org/draft-07/schema#";
17262
17281
  } else if (ctx.target === "draft-04") {
17263
17282
  result.$schema = "http://json-schema.org/draft-04/schema#";
17264
- } else if (ctx.target === "openapi-3.0") {} else {}
17283
+ } else if (ctx.target === "openapi-3.0") {}
17265
17284
  if (ctx.external?.uri) {
17266
17285
  const id = ctx.external.registry.get(schema)?.id;
17267
17286
  if (!id)
@@ -17505,7 +17524,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
17505
17524
  if (val === undefined) {
17506
17525
  if (ctx.unrepresentable === "throw") {
17507
17526
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
17508
- } else {}
17527
+ }
17509
17528
  } else if (typeof val === "bigint") {
17510
17529
  if (ctx.unrepresentable === "throw") {
17511
17530
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -23532,7 +23551,7 @@ function startServer(opts = {}) {
23532
23551
  let timer = null;
23533
23552
  if (autoSync && syncIntervalMs > 0) {
23534
23553
  timer = setInterval(() => {
23535
- syncAllPeers(db).catch(() => {});
23554
+ syncAllPeers(db).catch((e3) => console.error("[sync] auto-sync tick failed \u2014", e3));
23536
23555
  }, syncIntervalMs);
23537
23556
  timer.unref?.();
23538
23557
  }
@@ -23972,4 +23991,4 @@ if (argv2.includes("--server")) {
23972
23991
  runMain(main, { showUsage: showUsage2 });
23973
23992
  }
23974
23993
 
23975
- //# debugId=25AC050A4B6CCBA264756E2164756E21
23994
+ //# debugId=6697905C98729D8364756E2164756E21