@camstack/addon-benchmark 0.1.15 → 0.1.16

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.
@@ -1,7 +1,7 @@
1
1
  const e = {
2
2
  "@camstack/sdk": {
3
3
  name: "@camstack/sdk",
4
- version: "0.1.37",
4
+ version: "0.1.38",
5
5
  scope: ["default"],
6
6
  loaded: !1,
7
7
  from: "__mfe_internal__addon_benchmark_page",
@@ -10,13 +10,13 @@ const e = {
10
10
  },
11
11
  shareConfig: {
12
12
  singleton: !0,
13
- requiredVersion: "^0.1.37",
13
+ requiredVersion: "^0.1.38",
14
14
  import: !1
15
15
  }
16
16
  },
17
17
  "@camstack/types": {
18
18
  name: "@camstack/types",
19
- version: "0.1.16",
19
+ version: "0.1.17",
20
20
  scope: ["default"],
21
21
  loaded: !1,
22
22
  from: "__mfe_internal__addon_benchmark_page",
@@ -25,13 +25,13 @@ const e = {
25
25
  },
26
26
  shareConfig: {
27
27
  singleton: !0,
28
- requiredVersion: "^0.1.16",
28
+ requiredVersion: "^0.1.17",
29
29
  import: !1
30
30
  }
31
31
  },
32
32
  "@camstack/ui-library": {
33
33
  name: "@camstack/ui-library",
34
- version: "0.1.40",
34
+ version: "0.1.41",
35
35
  scope: ["default"],
36
36
  loaded: !1,
37
37
  from: "__mfe_internal__addon_benchmark_page",
@@ -40,7 +40,7 @@ const e = {
40
40
  },
41
41
  shareConfig: {
42
42
  singleton: !0,
43
- requiredVersion: "^0.1.40",
43
+ requiredVersion: "^0.1.41",
44
44
  import: !1
45
45
  }
46
46
  },
@@ -56,21 +56,21 @@ async function l() {
56
56
  }), r.share["react/jsx-runtime"] = e;
57
57
  }
58
58
  if (r.share["@camstack/sdk"] === void 0) {
59
- const e = { ...await import("./index-B9MIeX8E.mjs") };
59
+ const e = { ...await import("./index-BBYroIy-.mjs") };
60
60
  Object.defineProperty(e, "__esModule", {
61
61
  value: !0,
62
62
  enumerable: !1
63
63
  }), r.share["@camstack/sdk"] = e;
64
64
  }
65
65
  if (r.share["@camstack/types"] === void 0) {
66
- const e = { ...await import("./index-CRN37Hr9.mjs") };
66
+ const e = { ...await import("./index-BY_6d_z0.mjs") };
67
67
  Object.defineProperty(e, "__esModule", {
68
68
  value: !0,
69
69
  enumerable: !1
70
70
  }), r.share["@camstack/types"] = e;
71
71
  }
72
72
  if (r.share["@camstack/ui-library"] === void 0) {
73
- const e = { ...await import("./index-BHDPHRYK.mjs") };
73
+ const e = { ...await import("./index-UC6WY72C.mjs") };
74
74
  Object.defineProperty(e, "__esModule", {
75
75
  value: !0,
76
76
  enumerable: !1
@@ -101,21 +101,21 @@ async function l() {
101
101
  "@camstack/sdk": {
102
102
  shareConfig: {
103
103
  singleton: !0,
104
- requiredVersion: "^0.1.37",
104
+ requiredVersion: "^0.1.38",
105
105
  import: !1
106
106
  }
107
107
  },
108
108
  "@camstack/types": {
109
109
  shareConfig: {
110
110
  singleton: !0,
111
- requiredVersion: "^0.1.16",
111
+ requiredVersion: "^0.1.17",
112
112
  import: !1
113
113
  }
114
114
  },
115
115
  "@camstack/ui-library": {
116
116
  shareConfig: {
117
117
  singleton: !0,
118
- requiredVersion: "^0.1.40",
118
+ requiredVersion: "^0.1.41",
119
119
  import: !1
120
120
  }
121
121
  },
@@ -737,7 +737,7 @@ class tt {
737
737
  })(), n = s?.port ? Number(s.port) : s?.protocol === "https:" ? 443 : 80, i = s?.protocol === "https:" ? "https" : "http", a = this._trpcClient.localNetwork?.getConnectionEndpoints;
738
738
  if (!a)
739
739
  return { winner: this._serverUrl, switched: !1 };
740
- let c = [];
740
+ let c;
741
741
  try {
742
742
  c = (await a.query({ port: n, ipv4Only: t?.ipv4Only, scheme: i })).endpoints;
743
743
  } catch {
@@ -11356,7 +11356,7 @@ class qf {
11356
11356
  * (e.g. from older versions) without polluting the typed config.
11357
11357
  */
11358
11358
  async resolveConfig() {
11359
- const t = await this._ctx?.settings?.readAddonStore() ?? {}, n = { ...this.defaults };
11359
+ const t = await this.readAddonStoreWithRetry(), n = { ...this.defaults };
11360
11360
  for (const i of Object.keys(this.defaults)) {
11361
11361
  const r = t[i];
11362
11362
  if (r != null) {
@@ -11366,6 +11366,36 @@ class qf {
11366
11366
  }
11367
11367
  this._config = n;
11368
11368
  }
11369
+ /**
11370
+ * Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
11371
+ * transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
11372
+ * swap, or any race where the SqliteSettingsBackend is between shutdown and
11373
+ * re-initialize) doesn't propagate up into `initialize()` and leave the
11374
+ * addon permanently broken.
11375
+ *
11376
+ * Retry only the two known infra fingerprints. Anything else propagates so
11377
+ * real bugs surface immediately. After the budget expires we fall back to
11378
+ * `{}` (defaults) — the addon's first successful patch will rehydrate.
11379
+ */
11380
+ async readAddonStoreWithRetry() {
11381
+ const t = this._ctx?.settings;
11382
+ if (!t) return {};
11383
+ const n = [150, 350, 600, 900];
11384
+ let i;
11385
+ for (let r = 0; r <= n.length; r++)
11386
+ try {
11387
+ return await t.readAddonStore() ?? {};
11388
+ } catch (d) {
11389
+ i = d;
11390
+ const l = d instanceof Error ? d.message : String(d);
11391
+ if (!(l.includes("SqliteSettingsBackend not initialized") || l.includes("provider not available"))) throw d;
11392
+ if (r === n.length) break;
11393
+ await new Promise((h) => setTimeout(h, n[r]));
11394
+ }
11395
+ return this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", {
11396
+ meta: { error: i instanceof Error ? i.message : String(i) }
11397
+ }), {};
11398
+ }
11369
11399
  }
11370
11400
  function Zf(e) {
11371
11401
  if (e != null)
@@ -14013,12 +14013,12 @@ function ch({ field: e, values: t, disabled: r, onAction: n }) {
14013
14013
  const f = Vi(e, t);
14014
14014
  a(!0), l(null);
14015
14015
  try {
14016
- const h = await n(e.action, e.key, f);
14016
+ const h = await n(e.action, e.key, f), g = typeof h == "object" && h !== null ? h : null;
14017
14017
  l({
14018
14018
  kind: "ok",
14019
- text: e.successMessage ? e.successMessage.replace(/\{(\w+)\}/g, (g, b) => {
14020
- const v = h?.[b];
14021
- return v === void 0 ? "" : String(v);
14019
+ text: e.successMessage ? e.successMessage.replace(/\{(\w+)\}/g, (b, v) => {
14020
+ const x = g?.[v];
14021
+ return x === void 0 ? "" : String(x);
14022
14022
  }) : "Done."
14023
14023
  });
14024
14024
  } catch (h) {
@@ -2926,7 +2926,7 @@ async function wt(e) {
2926
2926
  }
2927
2927
  }
2928
2928
  async function ba() {
2929
- return Le || (Le = wt(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-BeLfGVa1.mjs")).catch((e) => {
2929
+ return Le || (Le = wt(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-BUKd6AUn.mjs")).catch((e) => {
2930
2930
  throw Le = void 0, e;
2931
2931
  })), Le;
2932
2932
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-benchmark",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Detection addon benchmarking with reference images, accuracy metrics, and distributed execution",
5
5
  "keywords": [
6
6
  "camstack",