Skip to content

Commit 26bb685

Browse files
committed
optimize bundle slightly, fix routes
1 parent 36e3bf9 commit 26bb685

File tree

8 files changed

+27
-6
lines changed

8 files changed

+27
-6
lines changed

apps/gui/src/lib/components/DataView/map/MapHeat.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { points } from '@unovis/ts/components/topojson-map/style';
77
import { WorldMapTopoJSON } from '@unovis/ts/maps';
88
import { map } from 'lodash';
9-
import { pauseLiveSync } from '$utils/lifecycle';
9+
import { pauseLiveSync } from '$utils/live-sync';
1010
import { throttledDerived } from '$utils/stores';
1111
1212
export let data: Readable<any[]>;

apps/gui/src/lib/components/partials/MonitorActions.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import { onMount } from 'svelte';
1313
import { eventKey } from '$lib/utils/event-keys';
1414
import { activeMonitorChecksCount } from '$lib/stores';
15-
import { pauseLiveSync } from '$lib/utils/lifecycle';
15+
import { pauseLiveSync } from '$lib/utils/live-sync';
1616
1717
export let data: any;
1818
export let view: 'head' | 'cell' = 'cell';

apps/gui/src/lib/utils/cache.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import type Route66 from '@nostrwatch/route66';
22
import { get } from 'svelte/store';
33
import { hasBeenBootstrapped, isBootstrapping, isLivesyncing, isSeeded, route66Ready } from '../stores/app';
4-
import { instance, stopLiveSync } from './lifecycle';
4+
import { instance } from './lifecycle';
5+
import { stopLiveSync } from './live-sync'
56
import { StateManager } from '@nostrwatch/route66';
67
import { delay } from '@nostrwatch/utils';
78

apps/gui/src/routes/relays/[protocol]/[...relay]/(components)/RelayAudits.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
88
// Assume pauseLiveSync is imported from a utility module
9-
import { pauseLiveSync } from '$lib/utils/lifecycle.js'; // Update the path as necessary
9+
import { pauseLiveSync } from '$utils/live-sync.js'; // Update the path as necessary
1010
import type { Note } from "nostr-tools/nip19";
1111
// import Badge from "../../ui/badge/badge.svelte";
1212
import type { Nip11 } from "@nostrwatch/route66/models";

apps/gui/src/routes/relays/[protocol]/[...relay]/___+page.OLD.svelte

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
import { isHex } from '$lib/utils/nostr.js';
1212
import { Nip11 } from '@nostrwatch/route66/models';
1313
import { isLivesyncing, doAggregateCache, hasBeenBootstrapped } from '$lib/stores/app';
14-
import { pauseLiveSync, beginLiveSync, seedFromCache } from '$lib/utils/lifecycle';
14+
import { seedFromCache } from '$utils/lifecycle';
15+
import { pauseLiveSync, beginLiveSync } from '$utils/live-sync';
1516
import { publishEventsToMemoryRelay } from '$lib/stores/events-helpers';
16-
import { clickToCopy, observeViewport } from '$lib/utils/ux';
17+
import { clickToCopy, observeViewport } from '$utils/ux';
1718
import { Skeleton } from "$lib/components/ui/skeleton";
1819
import { route66Ready } from '$lib/stores/app';
1920
import { route66 } from '$lib/stores';

apps/gui/svelte.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const config = {
1414
"$components": "./src/components",
1515
"$layouts": "./src/layouts",
1616
"$routes": "./src/routes",
17+
"$relay": './src/routes/relays/[protocol]/[...relay]',
18+
"$relays": './src/routes/relays',
1719
"$lib": "./src/lib"
1820
},
1921
adapter: adapter({
@@ -33,6 +35,12 @@ const config = {
3335
'/relays',
3436
'/relays/map',
3537
'/relays/[protocol]/[...relay]',
38+
'/relays/[protocol]/[...relay]/audits',
39+
'/relays/[protocol]/[...relay]/checks',
40+
'/relays/[protocol]/[...relay]/feed',
41+
'/relays/[protocol]/[...relay]/insights',
42+
'/relays/[protocol]/[...relay]/nip-11',
43+
'/relays/[protocol]/[...relay]/operator',
3644
'/reload/[...path]',
3745
'/unsupported',
3846
'/mobile',

apps/gui/tsconfig.json

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"$components/*": ["src/components/*"],
1919
"$layouts/*": ["src/layouts/*"],
2020
"$routes/*": ["src/routes/*"],
21+
"$relay/*": ["src/routes/relays/[protocol]/[...relay]/*"],
22+
"$relays/*": ["src/routes/relays/*"],
2123
"$lib/*": ["src/lib/*"],
2224
"src/*": ["src/*"]
2325
},

apps/gui/vite.config.ts

+9
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ export default defineConfig(({ mode }) => {
6969
'@': path.resolve(__dirname, './src'),
7070
'@dist': path.resolve(__dirname, './dist'),
7171
'@components': path.resolve(__dirname, './src/components'),
72+
"$stores": path.resolve(__dirname, "./src/lib/stores"),
73+
"$utils": path.resolve(__dirname, "./src/lib/utils"),
74+
"$ui": path.resolve(__dirname, "./src/lib/components/ui"),
75+
"$components": path.resolve(__dirname, "./src/components"),
76+
"$layouts": path.resolve(__dirname, "./src/layouts"),
77+
"$routes": path.resolve(__dirname, "./src/routes"),
78+
"$relay": path.resolve(__dirname, "./src/routes/relays/[protocol]/[...relay]"),
79+
"$relays": path.resolve(__dirname, "./src/routes/relays"),
80+
"$lib": path.resolve(__dirname, "./src/lib")
7281
},
7382
},
7483
plugins: [

0 commit comments

Comments
 (0)