@plitzi/sdk-dev-tools 0.36.1 → 0.37.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 +74 -0
- package/dist/DevToolsContainer.mjs +54 -53
- package/dist/DevToolsRoot.d.ts +18 -0
- package/dist/DevToolsRoot.mjs +43 -0
- package/dist/components/DevToolsPanel/DevToolsBody.mjs +33 -31
- package/dist/components/DevToolsPanel/DevToolsHeader.mjs +5 -0
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/components/RunDetail/RunDetail.mjs +14 -14
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/helpers.d.ts +0 -1
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/helpers.mjs +1 -1
- package/dist/components/DevToolsPanel/tabs/CacheViewer/CacheViewer.d.ts +12 -0
- package/dist/components/DevToolsPanel/tabs/CacheViewer/CacheViewer.mjs +91 -0
- package/dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/CacheRow.d.ts +16 -0
- package/dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/CacheRow.mjs +87 -0
- package/dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/index.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/index.mjs +5 -0
- package/dist/components/DevToolsPanel/tabs/CacheViewer/index.d.ts +2 -0
- package/dist/components/DevToolsPanel/tabs/CacheViewer/index.mjs +5 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.mjs +52 -54
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/FreshnessMark.d.ts +16 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/FreshnessMark.mjs +13 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/index.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/{FreshnessPanel → FreshnessMark}/index.mjs +2 -2
- package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFreshnessKey.d.ts +14 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFreshnessKey.mjs +18 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/helpers.d.ts +5 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/helpers.mjs +65 -55
- package/dist/components/PayloadView/PayloadView.d.ts +11 -0
- package/dist/components/{DevToolsPanel/tabs/ActionsViewer/components/PayloadView → PayloadView}/PayloadView.mjs +1 -1
- package/dist/components/PayloadView/index.mjs +5 -0
- package/dist/freshness/describeQueryPath.d.ts +22 -0
- package/dist/freshness/describeQueryPath.mjs +22 -0
- package/dist/freshness/formatDuration.d.ts +3 -0
- package/dist/freshness/formatDuration.mjs +9 -0
- package/dist/freshness/index.d.ts +8 -0
- package/dist/freshness/index.mjs +6 -0
- package/dist/freshness/rows.d.ts +42 -0
- package/dist/freshness/rows.mjs +29 -0
- package/dist/freshness/useFreshnessByStore.d.ts +15 -0
- package/dist/freshness/useFreshnessByStore.mjs +20 -0
- package/dist/freshness/useSecondsClock.d.ts +8 -0
- package/dist/freshness/useSecondsClock.mjs +12 -0
- package/dist/scope/helpers.d.ts +1 -0
- package/dist/scope/helpers.mjs +7 -7
- package/dist/scope/useScope.d.ts +3 -1
- package/dist/scope/useScope.mjs +21 -18
- package/dist/useRegisterQueriesStore.mjs +3 -3
- package/package.json +89 -49
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/PayloadView.d.ts +0 -6
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/index.mjs +0 -5
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel.d.ts +0 -11
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel.mjs +0 -49
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/FreshnessRow.d.ts +0 -7
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/FreshnessRow.mjs +0 -43
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/index.d.ts +0 -3
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/index.mjs +0 -5
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/helpers.d.ts +0 -14
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/helpers.mjs +0 -18
- package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/index.d.ts +0 -3
- package/dist/scope/useFreshnessRecords.d.ts +0 -3
- package/dist/scope/useFreshnessRecords.mjs +0 -8
- /package/dist/components/{DevToolsPanel/tabs/ActionsViewer/components/PayloadView → PayloadView}/index.d.ts +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FreshnessGroup } from './useFreshnessByStore';
|
|
2
|
+
/** Whether anything is rendering what a path holds, and when it is let go of if nothing starts. */
|
|
3
|
+
export type PathUsage = {
|
|
4
|
+
inUse: boolean;
|
|
5
|
+
collectAt?: number;
|
|
6
|
+
};
|
|
7
|
+
/** What a path stands for, when the path itself is an opaque key — a query cache entry is a hash of its request. */
|
|
8
|
+
export type PathDescription = {
|
|
9
|
+
label: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
usage?: PathUsage;
|
|
12
|
+
};
|
|
13
|
+
export type DescribePath = (group: FreshnessGroup, path: string) => PathDescription | undefined;
|
|
14
|
+
export type FreshnessRowModel = {
|
|
15
|
+
/** The store and path together: two stores can hold the same path. */
|
|
16
|
+
key: string;
|
|
17
|
+
uid: string;
|
|
18
|
+
storeLabel: string;
|
|
19
|
+
path: string;
|
|
20
|
+
label: string;
|
|
21
|
+
tags: string[];
|
|
22
|
+
isStale: boolean;
|
|
23
|
+
/** How long ago it was written, e.g. `12s ago`. */
|
|
24
|
+
age: string;
|
|
25
|
+
/** `18s left` while current, `stale` once it is not. */
|
|
26
|
+
status: string;
|
|
27
|
+
/** The TTL it was written with — not what is left of it, which is what `status` says. */
|
|
28
|
+
ttl: string;
|
|
29
|
+
/** What is left of the TTL, `1` down to `0` — a bar says "half gone" in a glance that a countdown does not. */
|
|
30
|
+
progress: number;
|
|
31
|
+
/** Whether anything renders this, where that is known: only what can be let go of can be offered to. */
|
|
32
|
+
inUse?: boolean;
|
|
33
|
+
/** `forgotten in 3m 58s`, while a grace period is running. */
|
|
34
|
+
kept?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* One row per record of every store, stale ones last so what is still being served is what the panel shows first.
|
|
38
|
+
*
|
|
39
|
+
* `now` is never earlier than the newest write: the clock is a render-time snapshot, and a record written after it
|
|
40
|
+
* read as written in the future — "0s ago" and "0s left" on an answer that was never current at all.
|
|
41
|
+
*/
|
|
42
|
+
export declare const toRows: (groups: ReadonlyArray<FreshnessGroup>, labelOf: (group: FreshnessGroup) => string, now: number, describe?: DescribePath) => FreshnessRowModel[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import e from "./formatDuration.mjs";
|
|
2
|
+
//#region src/freshness/rows.ts
|
|
3
|
+
var t = (t, n, r, { updatedAt: i, expiresAt: a, ttl: o }, s, c) => {
|
|
4
|
+
let l = s >= a, u = Number.isFinite(a), d = "no expiry";
|
|
5
|
+
return l ? d = "stale" : u && (d = `${e(a - s)} left`), {
|
|
6
|
+
key: `${t.entry.uid}:${r}`,
|
|
7
|
+
uid: t.entry.uid,
|
|
8
|
+
storeLabel: n,
|
|
9
|
+
path: r,
|
|
10
|
+
label: c?.label ?? r,
|
|
11
|
+
tags: c?.tags ?? [],
|
|
12
|
+
isStale: l,
|
|
13
|
+
age: `${e(s - i)} ago`,
|
|
14
|
+
status: d,
|
|
15
|
+
ttl: Number.isFinite(o) ? e(o) : "∞",
|
|
16
|
+
inUse: c?.usage?.inUse,
|
|
17
|
+
kept: c?.usage?.collectAt ? `forgotten in ${e(c.usage.collectAt - s)}` : void 0,
|
|
18
|
+
progress: l ? 0 : Math.min(1, Number.isFinite(o) ? (a - s) / o : 1)
|
|
19
|
+
};
|
|
20
|
+
}, n = (e, n, r, i) => {
|
|
21
|
+
let a = r;
|
|
22
|
+
for (let t of e) for (let e of Object.values(t.records)) a = Math.max(a, e.updatedAt);
|
|
23
|
+
return e.flatMap((e) => {
|
|
24
|
+
let r = n(e);
|
|
25
|
+
return Object.entries(e.records).map(([n, o]) => t(e, r, n, o, a, i?.(e, n)));
|
|
26
|
+
}).sort((e, t) => Number(e.isStale) - Number(t.isStale) || e.storeLabel.localeCompare(t.storeLabel) || e.label.localeCompare(t.label));
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { n as toRows };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DevStoreEntry, PathFreshness } from '@plitzi/nexus';
|
|
2
|
+
export type FreshnessGroup = {
|
|
3
|
+
entry: DevStoreEntry;
|
|
4
|
+
records: Readonly<Record<string, PathFreshness>>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The paths written with a TTL, across every store given — the stores that hold none are left out.
|
|
8
|
+
*
|
|
9
|
+
* Across all of them because the one holding a TTL is rarely the one being looked at: a provider's answers live in the
|
|
10
|
+
* query cache, not in the provider's own scope, and a panel that only read the picked store showed nothing unless its
|
|
11
|
+
* reader already knew where to look. Each store hands out the same records object until one changes, so the list is
|
|
12
|
+
* rebuilt only when something did.
|
|
13
|
+
*/
|
|
14
|
+
declare const useFreshnessByStore: (entries: ReadonlyArray<DevStoreEntry>) => ReadonlyArray<FreshnessGroup>;
|
|
15
|
+
export default useFreshnessByStore;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useCallback as e, useRef as t, useSyncExternalStore as n } from "react";
|
|
2
|
+
//#region src/freshness/useFreshnessByStore.ts
|
|
3
|
+
var r = [], i = (e, t) => e.length === t.length && e.every((e, n) => e.entry === t[n].entry && e.records === t[n].records), a = (e) => Object.fromEntries(Object.entries(e).filter(([, e]) => e.ttl > 0)), o = (o) => {
|
|
4
|
+
let s = t(r), c = t(/* @__PURE__ */ new WeakMap()), l = e((e) => {
|
|
5
|
+
let t = o.map(({ store: t }) => t.watchFreshness(e));
|
|
6
|
+
return () => t.forEach((e) => e());
|
|
7
|
+
}, [o]), u = e(() => {
|
|
8
|
+
let e = o.map((e) => {
|
|
9
|
+
let t = e.store.getFreshnessRecords(), n = c.current.get(t);
|
|
10
|
+
return n || (n = a(t), c.current.set(t, n)), {
|
|
11
|
+
entry: e,
|
|
12
|
+
records: n
|
|
13
|
+
};
|
|
14
|
+
}).filter((e) => Object.keys(e.records).length > 0);
|
|
15
|
+
return i(s.current, e) || (s.current = e.length > 0 ? e : r), s.current;
|
|
16
|
+
}, [o]);
|
|
17
|
+
return n(l, u, u);
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { o as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Date.now()`, moving once a second while `active` — the finest step a countdown shows.
|
|
3
|
+
*
|
|
4
|
+
* Never earlier than `floor`: the clock is a render-time snapshot, and a value written after it read as written in
|
|
5
|
+
* the future — "0s ago" and "0s left" on an answer that was never current at all.
|
|
6
|
+
*/
|
|
7
|
+
declare const useSecondsClock: (active: boolean, floor?: number) => number;
|
|
8
|
+
export default useSecondsClock;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useEffect as e, useState as t } from "react";
|
|
2
|
+
//#region src/freshness/useSecondsClock.ts
|
|
3
|
+
var n = (n, r = 0) => {
|
|
4
|
+
let [i, a] = t(() => Date.now());
|
|
5
|
+
return e(() => {
|
|
6
|
+
if (!n) return;
|
|
7
|
+
let e = setInterval(() => a(Date.now()), 1e3);
|
|
8
|
+
return () => clearInterval(e);
|
|
9
|
+
}, [n]), Math.max(i, r);
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as default };
|
package/dist/scope/helpers.d.ts
CHANGED
|
@@ -9,5 +9,6 @@ export type ScopeOptionGroup = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const storeLabel: (entry: DevStoreEntry, rootKeys?: ReadonlySet<string>) => string;
|
|
11
11
|
export declare const rootKeysOf: (entries: ReadonlyArray<DevStoreEntry>) => ReadonlySet<string> | undefined;
|
|
12
|
+
export declare const instanceEntries: (entries: ReadonlyArray<DevStoreEntry>, instanceId: string | undefined, activeInstanceId: string | undefined) => DevStoreEntry[];
|
|
12
13
|
export declare const buildScopeOptions: (entries: ReadonlyArray<DevStoreEntry>, instanceIds: ReadonlyArray<string>, activeInstanceId: string | undefined) => ScopeOptionGroup[];
|
|
13
14
|
export declare const resolveSelectedUid: (entries: ReadonlyArray<DevStoreEntry>, selectedUid: string | undefined) => string | undefined;
|
package/dist/scope/helpers.mjs
CHANGED
|
@@ -9,15 +9,15 @@ var e = (e, t) => {
|
|
|
9
9
|
}, n = (e) => {
|
|
10
10
|
let t = e.find((e) => e.scopeId === void 0);
|
|
11
11
|
return t ? new Set(Object.keys(t.store.getState())) : void 0;
|
|
12
|
-
}, r = (e,
|
|
13
|
-
let
|
|
14
|
-
return
|
|
12
|
+
}, r = (e, t, n) => e.filter((e) => e.scopeId === t || e.scopeId === void 0 && t === n), i = (e, i, a) => {
|
|
13
|
+
let o = n(e);
|
|
14
|
+
return i.map((n) => ({
|
|
15
15
|
label: n,
|
|
16
|
-
options:
|
|
17
|
-
label: t(e,
|
|
16
|
+
options: r(e, n, a).map((e) => ({
|
|
17
|
+
label: t(e, o),
|
|
18
18
|
value: e.uid
|
|
19
19
|
}))
|
|
20
20
|
}));
|
|
21
|
-
},
|
|
21
|
+
}, a = (e, t) => t && e.some((e) => e.uid === t) ? t : (e.find((e) => e.scopeId === void 0) ?? e.at(0))?.uid;
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { i as buildScopeOptions, r as instanceEntries, a as resolveSelectedUid, n as rootKeysOf, t as storeLabel };
|
package/dist/scope/useScope.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ScopeOptionGroup } from './helpers';
|
|
2
|
-
import { DevStore } from '@plitzi/nexus';
|
|
2
|
+
import { DevStore, DevStoreEntry } from '@plitzi/nexus';
|
|
3
3
|
export type ScopeSelector = {
|
|
4
4
|
options: ScopeOptionGroup[];
|
|
5
5
|
value: string | undefined;
|
|
6
6
|
onSelect: (uid: string) => void;
|
|
7
7
|
};
|
|
8
8
|
export declare const useScopeSelector: () => ScopeSelector;
|
|
9
|
+
export declare const useSelectedStoreEntry: () => DevStoreEntry | undefined;
|
|
9
10
|
export declare const useSelectedStore: () => DevStore | undefined;
|
|
11
|
+
export declare const useInstanceStores: () => ReadonlyArray<DevStoreEntry>;
|
package/dist/scope/useScope.mjs
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { selectStore as
|
|
4
|
-
import
|
|
5
|
-
import { useCallback as
|
|
1
|
+
import { buildScopeOptions as e, instanceEntries as t, resolveSelectedUid as n } from "./helpers.mjs";
|
|
2
|
+
import { selectInstance as r, useDevInstances as i } from "../instanceRegistry.mjs";
|
|
3
|
+
import { selectStore as a, useSelectedStoreUid as o } from "./storeSelection.mjs";
|
|
4
|
+
import s from "./useDevStores.mjs";
|
|
5
|
+
import { useCallback as c, useMemo as l } from "react";
|
|
6
6
|
//#region src/scope/useScope.ts
|
|
7
|
-
var
|
|
8
|
-
let
|
|
7
|
+
var u = () => {
|
|
8
|
+
let t = s(), { instanceIds: u, selectedId: d } = i(), f = o();
|
|
9
9
|
return {
|
|
10
|
-
options:
|
|
11
|
-
|
|
10
|
+
options: l(() => e(t, u, d), [
|
|
11
|
+
t,
|
|
12
12
|
u,
|
|
13
13
|
d
|
|
14
14
|
]),
|
|
15
|
-
value:
|
|
16
|
-
onSelect:
|
|
17
|
-
let n =
|
|
18
|
-
n?.scopeId &&
|
|
19
|
-
}, [
|
|
15
|
+
value: l(() => n(t, f), [t, f]),
|
|
16
|
+
onSelect: c((e) => {
|
|
17
|
+
let n = t.find((t) => t.uid === e);
|
|
18
|
+
n?.scopeId && r(n.scopeId), a(e);
|
|
19
|
+
}, [t])
|
|
20
20
|
};
|
|
21
|
-
},
|
|
22
|
-
let e =
|
|
23
|
-
return
|
|
21
|
+
}, d = () => {
|
|
22
|
+
let e = s(), t = o(), r = l(() => n(e, t), [e, t]);
|
|
23
|
+
return l(() => e.find((e) => e.uid === r), [e, r]);
|
|
24
|
+
}, f = () => d()?.store, p = () => {
|
|
25
|
+
let e = s(), { selectedId: n } = i();
|
|
26
|
+
return l(() => t(e, n, n), [e, n]);
|
|
24
27
|
};
|
|
25
28
|
//#endregion
|
|
26
|
-
export {
|
|
29
|
+
export { p as useInstanceStores, u as useScopeSelector, f as useSelectedStore, d as useSelectedStoreEntry };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useEffect as e } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { queryCache as t } from "@plitzi/sdk-shared/queries";
|
|
3
|
+
import { registerDevStore as n } from "@plitzi/nexus";
|
|
4
4
|
//#region src/useRegisterQueriesStore.ts
|
|
5
5
|
var r = (r, i) => {
|
|
6
6
|
e(() => {
|
|
7
|
-
if (r) return t
|
|
7
|
+
if (r) return n(t.store, i, "Queries");
|
|
8
8
|
}, [r, i]);
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-dev-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./dist/DevToolsContextProvider.d.ts",
|
|
19
19
|
"import": "./dist/DevToolsContextProvider.mjs"
|
|
20
20
|
},
|
|
21
|
+
"./DevToolsRoot": {
|
|
22
|
+
"types": "./dist/DevToolsRoot.d.ts",
|
|
23
|
+
"import": "./dist/DevToolsRoot.mjs"
|
|
24
|
+
},
|
|
21
25
|
"./components/DevToolsIndicator": {
|
|
22
26
|
"types": "./dist/components/DevToolsIndicator/index.d.ts",
|
|
23
27
|
"import": "./dist/components/DevToolsIndicator/index.mjs"
|
|
@@ -118,18 +122,6 @@
|
|
|
118
122
|
"types": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/FlowTimeline/index.d.ts",
|
|
119
123
|
"import": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/FlowTimeline/index.mjs"
|
|
120
124
|
},
|
|
121
|
-
"./components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView": {
|
|
122
|
-
"types": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/index.d.ts",
|
|
123
|
-
"import": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/index.mjs"
|
|
124
|
-
},
|
|
125
|
-
"./components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/PayloadView": {
|
|
126
|
-
"types": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/PayloadView.d.ts",
|
|
127
|
-
"import": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/PayloadView.mjs"
|
|
128
|
-
},
|
|
129
|
-
"./components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/index": {
|
|
130
|
-
"types": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/index.d.ts",
|
|
131
|
-
"import": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/index.mjs"
|
|
132
|
-
},
|
|
133
125
|
"./components/DevToolsPanel/tabs/ActionsViewer/components/RunDetail": {
|
|
134
126
|
"types": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/RunDetail/index.d.ts",
|
|
135
127
|
"import": "./dist/components/DevToolsPanel/tabs/ActionsViewer/components/RunDetail/index.mjs"
|
|
@@ -186,6 +178,30 @@
|
|
|
186
178
|
"types": "./dist/components/DevToolsPanel/tabs/ActionsViewer/index.d.ts",
|
|
187
179
|
"import": "./dist/components/DevToolsPanel/tabs/ActionsViewer/index.mjs"
|
|
188
180
|
},
|
|
181
|
+
"./components/DevToolsPanel/tabs/CacheViewer": {
|
|
182
|
+
"types": "./dist/components/DevToolsPanel/tabs/CacheViewer/index.d.ts",
|
|
183
|
+
"import": "./dist/components/DevToolsPanel/tabs/CacheViewer/index.mjs"
|
|
184
|
+
},
|
|
185
|
+
"./components/DevToolsPanel/tabs/CacheViewer/CacheViewer": {
|
|
186
|
+
"types": "./dist/components/DevToolsPanel/tabs/CacheViewer/CacheViewer.d.ts",
|
|
187
|
+
"import": "./dist/components/DevToolsPanel/tabs/CacheViewer/CacheViewer.mjs"
|
|
188
|
+
},
|
|
189
|
+
"./components/DevToolsPanel/tabs/CacheViewer/components/CacheRow": {
|
|
190
|
+
"types": "./dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/index.d.ts",
|
|
191
|
+
"import": "./dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/index.mjs"
|
|
192
|
+
},
|
|
193
|
+
"./components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/CacheRow": {
|
|
194
|
+
"types": "./dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/CacheRow.d.ts",
|
|
195
|
+
"import": "./dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/CacheRow.mjs"
|
|
196
|
+
},
|
|
197
|
+
"./components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/index": {
|
|
198
|
+
"types": "./dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/index.d.ts",
|
|
199
|
+
"import": "./dist/components/DevToolsPanel/tabs/CacheViewer/components/CacheRow/index.mjs"
|
|
200
|
+
},
|
|
201
|
+
"./components/DevToolsPanel/tabs/CacheViewer/index": {
|
|
202
|
+
"types": "./dist/components/DevToolsPanel/tabs/CacheViewer/index.d.ts",
|
|
203
|
+
"import": "./dist/components/DevToolsPanel/tabs/CacheViewer/index.mjs"
|
|
204
|
+
},
|
|
189
205
|
"./components/DevToolsPanel/tabs/ElementsViewer": {
|
|
190
206
|
"types": "./dist/components/DevToolsPanel/tabs/ElementsViewer/index.d.ts",
|
|
191
207
|
"import": "./dist/components/DevToolsPanel/tabs/ElementsViewer/index.mjs"
|
|
@@ -478,38 +494,26 @@
|
|
|
478
494
|
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.d.ts",
|
|
479
495
|
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.mjs"
|
|
480
496
|
},
|
|
481
|
-
"./components/DevToolsPanel/tabs/StoreViewer/components/
|
|
482
|
-
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/
|
|
483
|
-
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/
|
|
484
|
-
},
|
|
485
|
-
"./components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel": {
|
|
486
|
-
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel.d.ts",
|
|
487
|
-
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel.mjs"
|
|
488
|
-
},
|
|
489
|
-
"./components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow": {
|
|
490
|
-
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/index.d.ts",
|
|
491
|
-
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/index.mjs"
|
|
492
|
-
},
|
|
493
|
-
"./components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/FreshnessRow": {
|
|
494
|
-
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/FreshnessRow.d.ts",
|
|
495
|
-
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/FreshnessRow.mjs"
|
|
497
|
+
"./components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark": {
|
|
498
|
+
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/index.d.ts",
|
|
499
|
+
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/index.mjs"
|
|
496
500
|
},
|
|
497
|
-
"./components/DevToolsPanel/tabs/StoreViewer/components/
|
|
498
|
-
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/
|
|
499
|
-
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/
|
|
501
|
+
"./components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/FreshnessMark": {
|
|
502
|
+
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/FreshnessMark.d.ts",
|
|
503
|
+
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/FreshnessMark.mjs"
|
|
500
504
|
},
|
|
501
|
-
"./components/DevToolsPanel/tabs/StoreViewer/components/
|
|
502
|
-
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/
|
|
503
|
-
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/
|
|
504
|
-
},
|
|
505
|
-
"./components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/index": {
|
|
506
|
-
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/index.d.ts",
|
|
507
|
-
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/index.mjs"
|
|
505
|
+
"./components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/index": {
|
|
506
|
+
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/index.d.ts",
|
|
507
|
+
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessMark/index.mjs"
|
|
508
508
|
},
|
|
509
509
|
"./components/DevToolsPanel/tabs/StoreViewer/helpers/mapFunctionValues": {
|
|
510
510
|
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/helpers/mapFunctionValues.d.ts",
|
|
511
511
|
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/helpers/mapFunctionValues.mjs"
|
|
512
512
|
},
|
|
513
|
+
"./components/DevToolsPanel/tabs/StoreViewer/helpers/renderFreshnessKey": {
|
|
514
|
+
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFreshnessKey.d.ts",
|
|
515
|
+
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFreshnessKey.mjs"
|
|
516
|
+
},
|
|
513
517
|
"./components/DevToolsPanel/tabs/StoreViewer/helpers/renderFunctionValue": {
|
|
514
518
|
"types": "./dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFunctionValue.d.ts",
|
|
515
519
|
"import": "./dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFunctionValue.mjs"
|
|
@@ -734,6 +738,46 @@
|
|
|
734
738
|
"types": "./dist/components/List/index.d.ts",
|
|
735
739
|
"import": "./dist/components/List/index.mjs"
|
|
736
740
|
},
|
|
741
|
+
"./components/PayloadView": {
|
|
742
|
+
"types": "./dist/components/PayloadView/index.d.ts",
|
|
743
|
+
"import": "./dist/components/PayloadView/index.mjs"
|
|
744
|
+
},
|
|
745
|
+
"./components/PayloadView/PayloadView": {
|
|
746
|
+
"types": "./dist/components/PayloadView/PayloadView.d.ts",
|
|
747
|
+
"import": "./dist/components/PayloadView/PayloadView.mjs"
|
|
748
|
+
},
|
|
749
|
+
"./components/PayloadView/index": {
|
|
750
|
+
"types": "./dist/components/PayloadView/index.d.ts",
|
|
751
|
+
"import": "./dist/components/PayloadView/index.mjs"
|
|
752
|
+
},
|
|
753
|
+
"./freshness": {
|
|
754
|
+
"types": "./dist/freshness/index.d.ts",
|
|
755
|
+
"import": "./dist/freshness/index.mjs"
|
|
756
|
+
},
|
|
757
|
+
"./freshness/describeQueryPath": {
|
|
758
|
+
"types": "./dist/freshness/describeQueryPath.d.ts",
|
|
759
|
+
"import": "./dist/freshness/describeQueryPath.mjs"
|
|
760
|
+
},
|
|
761
|
+
"./freshness/formatDuration": {
|
|
762
|
+
"types": "./dist/freshness/formatDuration.d.ts",
|
|
763
|
+
"import": "./dist/freshness/formatDuration.mjs"
|
|
764
|
+
},
|
|
765
|
+
"./freshness/index": {
|
|
766
|
+
"types": "./dist/freshness/index.d.ts",
|
|
767
|
+
"import": "./dist/freshness/index.mjs"
|
|
768
|
+
},
|
|
769
|
+
"./freshness/rows": {
|
|
770
|
+
"types": "./dist/freshness/rows.d.ts",
|
|
771
|
+
"import": "./dist/freshness/rows.mjs"
|
|
772
|
+
},
|
|
773
|
+
"./freshness/useFreshnessByStore": {
|
|
774
|
+
"types": "./dist/freshness/useFreshnessByStore.d.ts",
|
|
775
|
+
"import": "./dist/freshness/useFreshnessByStore.mjs"
|
|
776
|
+
},
|
|
777
|
+
"./freshness/useSecondsClock": {
|
|
778
|
+
"types": "./dist/freshness/useSecondsClock.d.ts",
|
|
779
|
+
"import": "./dist/freshness/useSecondsClock.mjs"
|
|
780
|
+
},
|
|
737
781
|
"./index": {
|
|
738
782
|
"types": "./dist/index.d.ts",
|
|
739
783
|
"import": "./dist/index.mjs"
|
|
@@ -754,10 +798,6 @@
|
|
|
754
798
|
"types": "./dist/scope/useDevStores.d.ts",
|
|
755
799
|
"import": "./dist/scope/useDevStores.mjs"
|
|
756
800
|
},
|
|
757
|
-
"./scope/useFreshnessRecords": {
|
|
758
|
-
"types": "./dist/scope/useFreshnessRecords.d.ts",
|
|
759
|
-
"import": "./dist/scope/useFreshnessRecords.mjs"
|
|
760
|
-
},
|
|
761
801
|
"./scope/useScope": {
|
|
762
802
|
"types": "./dist/scope/useScope.d.ts",
|
|
763
803
|
"import": "./dist/scope/useScope.mjs"
|
|
@@ -793,24 +833,24 @@
|
|
|
793
833
|
"devDependencies": {
|
|
794
834
|
"@testing-library/react": "^16.3.3",
|
|
795
835
|
"eslint": "^9.39.5",
|
|
796
|
-
"jsdom": "^30.0
|
|
836
|
+
"jsdom": "^30.1.0",
|
|
797
837
|
"react": "^19.3.0",
|
|
798
838
|
"react-dom": "^19.3.0",
|
|
799
839
|
"typescript": "^6.0.3",
|
|
800
840
|
"vite": "^8.3.0",
|
|
801
|
-
"vitest": "^5.0.
|
|
841
|
+
"vitest": "^5.0.1"
|
|
802
842
|
},
|
|
803
843
|
"peerDependencies": {
|
|
804
844
|
"react": "^19",
|
|
805
845
|
"react-dom": "^19"
|
|
806
846
|
},
|
|
807
847
|
"dependencies": {
|
|
808
|
-
"@plitzi/nexus": "^1.2.
|
|
848
|
+
"@plitzi/nexus": "^1.2.2",
|
|
809
849
|
"@plitzi/plitzi-ui": "^1.6.21",
|
|
810
|
-
"@plitzi/sdk-navigation": "0.
|
|
811
|
-
"@plitzi/sdk-schema": "0.
|
|
812
|
-
"@plitzi/sdk-shared": "0.
|
|
813
|
-
"@plitzi/sdk-style": "0.
|
|
850
|
+
"@plitzi/sdk-navigation": "0.37.0",
|
|
851
|
+
"@plitzi/sdk-schema": "0.37.0",
|
|
852
|
+
"@plitzi/sdk-shared": "0.37.0",
|
|
853
|
+
"@plitzi/sdk-style": "0.37.0",
|
|
814
854
|
"@uiw/react-json-view": "^2.0.0-alpha.43",
|
|
815
855
|
"clsx": "^2.1.1"
|
|
816
856
|
}
|
package/dist/components/DevToolsPanel/tabs/ActionsViewer/components/PayloadView/PayloadView.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type PayloadViewProps = {
|
|
2
|
-
value: unknown;
|
|
3
|
-
};
|
|
4
|
-
/** What a run was given, answered, or streamed — the same reader the Store tab uses, so it reads the same. */
|
|
5
|
-
declare const PayloadView: ({ value }: PayloadViewProps) => import("react").JSX.Element;
|
|
6
|
-
export default PayloadView;
|
package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DevStore } from '@plitzi/nexus';
|
|
2
|
-
export type FreshnessPanelProps = {
|
|
3
|
-
store: DevStore | undefined;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* The paths of the selected store that were written with a TTL: how old each one is, how long it has left, and a
|
|
7
|
-
* way to expire it — which is how a developer checks that whatever depends on it refreshes. Absent for a store that
|
|
8
|
-
* holds none, so it costs nothing to look at the others.
|
|
9
|
-
*/
|
|
10
|
-
declare const FreshnessPanel: ({ store }: FreshnessPanelProps) => import("react").JSX.Element | null;
|
|
11
|
-
export default FreshnessPanel;
|
package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel.mjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import e from "./components/FreshnessRow/index.mjs";
|
|
2
|
-
import { toRows as t } from "./helpers.mjs";
|
|
3
|
-
import n from "../../../../../../scope/useFreshnessRecords.mjs";
|
|
4
|
-
import { useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
|
|
5
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
-
//#region src/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/FreshnessPanel.tsx
|
|
7
|
-
var l = ({ store: l }) => {
|
|
8
|
-
let u = n(l), d = Object.keys(u).length, [f, p] = o(() => Date.now());
|
|
9
|
-
i(() => l?.watchFreshness(() => p(Date.now())), [l]), i(() => {
|
|
10
|
-
if (d === 0) return;
|
|
11
|
-
let e = setInterval(() => p(Date.now()), 1e3);
|
|
12
|
-
return () => clearInterval(e);
|
|
13
|
-
}, [d]);
|
|
14
|
-
let m = a(() => t(u, f), [u, f]), h = r((e) => {
|
|
15
|
-
l?.expire(e);
|
|
16
|
-
}, [l]), g = r(() => {
|
|
17
|
-
l?.expire();
|
|
18
|
-
}, [l]);
|
|
19
|
-
return d === 0 ? null : /* @__PURE__ */ c("div", {
|
|
20
|
-
className: "shrink-0 border-b border-zinc-200 text-[11px] dark:border-zinc-800",
|
|
21
|
-
children: [/* @__PURE__ */ c("div", {
|
|
22
|
-
className: "flex items-center gap-2 px-2 py-1",
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ s("span", {
|
|
25
|
-
className: "font-medium text-zinc-600 dark:text-zinc-300",
|
|
26
|
-
children: "TTL"
|
|
27
|
-
}),
|
|
28
|
-
/* @__PURE__ */ s("span", {
|
|
29
|
-
className: "text-zinc-400 tabular-nums dark:text-zinc-500",
|
|
30
|
-
children: d
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ s("button", {
|
|
33
|
-
className: "ml-auto cursor-pointer rounded px-1.5 text-violet-600 hover:bg-violet-500/15 dark:text-violet-300",
|
|
34
|
-
onClick: g,
|
|
35
|
-
title: "Mark every path stale now",
|
|
36
|
-
children: "Expire all"
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
}), /* @__PURE__ */ s("ul", {
|
|
40
|
-
className: "max-h-40 overflow-auto pb-1",
|
|
41
|
-
children: m.map((t) => /* @__PURE__ */ s(e, {
|
|
42
|
-
row: t,
|
|
43
|
-
onExpire: h
|
|
44
|
-
}, t.path))
|
|
45
|
-
})]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
//#endregion
|
|
49
|
-
export { l as default };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FreshnessRowModel } from '../../helpers';
|
|
2
|
-
export type FreshnessRowProps = {
|
|
3
|
-
row: FreshnessRowModel;
|
|
4
|
-
onExpire: (path: string) => void;
|
|
5
|
-
};
|
|
6
|
-
declare const FreshnessRow: ({ row, onExpire }: FreshnessRowProps) => import("react").JSX.Element;
|
|
7
|
-
export default FreshnessRow;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import e from "clsx";
|
|
2
|
-
import { useCallback as t } from "react";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/components/FreshnessRow/FreshnessRow.tsx
|
|
5
|
-
var i = ({ row: i, onExpire: a }) => {
|
|
6
|
-
let o = t(() => a(i.path), [a, i.path]);
|
|
7
|
-
return /* @__PURE__ */ r("li", {
|
|
8
|
-
className: "flex items-center gap-2 px-2 py-0.5",
|
|
9
|
-
children: [
|
|
10
|
-
/* @__PURE__ */ n("span", {
|
|
11
|
-
className: e("h-1.5 w-1.5 shrink-0 rounded-full", i.isStale ? "bg-zinc-400" : "bg-emerald-500"),
|
|
12
|
-
title: i.isStale ? "Stale" : "Current"
|
|
13
|
-
}),
|
|
14
|
-
/* @__PURE__ */ n("span", {
|
|
15
|
-
className: "min-w-0 grow truncate font-mono text-zinc-700 dark:text-zinc-200",
|
|
16
|
-
title: i.path,
|
|
17
|
-
children: i.path
|
|
18
|
-
}),
|
|
19
|
-
/* @__PURE__ */ n("span", {
|
|
20
|
-
className: "shrink-0 text-zinc-400 tabular-nums dark:text-zinc-500",
|
|
21
|
-
title: "Written",
|
|
22
|
-
children: i.age
|
|
23
|
-
}),
|
|
24
|
-
/* @__PURE__ */ r("span", {
|
|
25
|
-
className: "shrink-0 text-zinc-400 tabular-nums dark:text-zinc-500",
|
|
26
|
-
title: "TTL",
|
|
27
|
-
children: ["ttl ", i.ttl]
|
|
28
|
-
}),
|
|
29
|
-
/* @__PURE__ */ n("span", {
|
|
30
|
-
className: e("w-20 shrink-0 text-right tabular-nums", i.isStale ? "text-zinc-400 dark:text-zinc-500" : "text-emerald-600 dark:text-emerald-400"),
|
|
31
|
-
children: i.status
|
|
32
|
-
}),
|
|
33
|
-
/* @__PURE__ */ n("button", {
|
|
34
|
-
className: "shrink-0 cursor-pointer rounded px-1.5 text-violet-600 hover:bg-violet-500/15 dark:text-violet-300",
|
|
35
|
-
onClick: o,
|
|
36
|
-
title: "Mark stale now — anything listening refreshes it",
|
|
37
|
-
children: "Expire"
|
|
38
|
-
})
|
|
39
|
-
]
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
|
-
export { i as default };
|
package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/helpers.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PathFreshness } from '@plitzi/nexus';
|
|
2
|
-
export type FreshnessRowModel = {
|
|
3
|
-
path: string;
|
|
4
|
-
isStale: boolean;
|
|
5
|
-
/** How long ago it was written, e.g. `12s ago`. */
|
|
6
|
-
age: string;
|
|
7
|
-
/** `18s left` while current, `stale` once it is not. */
|
|
8
|
-
status: string;
|
|
9
|
-
/** The TTL it was written with, or what was left of it when an `expire` cut it short. */
|
|
10
|
-
ttl: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const formatDuration: (ms: number) => string;
|
|
13
|
-
/** One row per record, stale ones last so what is still being served is what the panel shows first. */
|
|
14
|
-
export declare const toRows: (records: Readonly<Record<string, PathFreshness>>, now: number) => FreshnessRowModel[];
|
package/dist/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/helpers.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region src/components/DevToolsPanel/tabs/StoreViewer/components/FreshnessPanel/helpers.ts
|
|
2
|
-
var e = (e) => {
|
|
3
|
-
let t = Math.max(0, Math.round(e / 1e3));
|
|
4
|
-
if (t < 60) return `${t}s`;
|
|
5
|
-
let n = Math.floor(t / 60);
|
|
6
|
-
return n < 60 ? `${n}m ${t % 60}s` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
7
|
-
}, t = (t, n) => Object.entries(t).map(([t, { updatedAt: r, expiresAt: i }]) => {
|
|
8
|
-
let a = n >= i, o = Number.isFinite(i), s = "no expiry";
|
|
9
|
-
return a ? s = "stale" : o && (s = `${e(i - n)} left`), {
|
|
10
|
-
path: t,
|
|
11
|
-
isStale: a,
|
|
12
|
-
age: `${e(n - r)} ago`,
|
|
13
|
-
status: s,
|
|
14
|
-
ttl: o ? e(i - r) : "∞"
|
|
15
|
-
};
|
|
16
|
-
}).sort((e, t) => Number(e.isStale) - Number(t.isStale) || e.path.localeCompare(t.path));
|
|
17
|
-
//#endregion
|
|
18
|
-
export { e as formatDuration, t as toRows };
|