eslint: sort imports & exports

This commit is contained in:
Martti Malmi
2024-01-04 19:01:18 +02:00
parent 046d4d97bd
commit 3fe3c7a98d
267 changed files with 1281 additions and 1037 deletions

View File

@ -1,5 +1,6 @@
import { NostrEvent } from "@snort/system";
import { FeedCache } from "@snort/shared";
import { NostrEvent } from "@snort/system";
import { db } from "@/Db";
export class ChatCache extends FeedCache<NostrEvent> {

View File

@ -1,7 +1,8 @@
import { FeedCache } from "@snort/shared";
import { db, EventInteraction } from "@/Db";
import { LoginStore } from "@/Utils/Login";
import { sha256 } from "@/Utils";
import { LoginStore } from "@/Utils/Login";
export class EventInteractionCache extends FeedCache<EventInteraction> {
constructor() {

View File

@ -1,9 +1,11 @@
import { db } from "@/Db";
import { unixNowMs } from "@snort/shared";
import { EventKind, RequestBuilder, socialGraphInstance, TaggedNostrEvent } from "@snort/system";
import { RefreshFeedCache } from "./RefreshFeedCache";
import { db } from "@/Db";
import { LoginSession } from "@/Utils/Login";
import { RefreshFeedCache } from "./RefreshFeedCache";
export class FollowListCache extends RefreshFeedCache<TaggedNostrEvent> {
constructor() {
super("FollowListCache", db.followLists);

View File

@ -1,11 +1,12 @@
import debug from "debug";
import { EventKind, RequestBuilder, SystemInterface, TaggedNostrEvent } from "@snort/system";
import { unixNow, unixNowMs } from "@snort/shared";
import { EventKind, RequestBuilder, SystemInterface, TaggedNostrEvent } from "@snort/system";
import debug from "debug";
import { db } from "@/Db";
import { RefreshFeedCache, TWithCreated } from "./RefreshFeedCache";
import { LoginSession } from "@/Utils/Login";
import { Day, Hour } from "@/Utils/Const";
import { LoginSession } from "@/Utils/Login";
import { RefreshFeedCache, TWithCreated } from "./RefreshFeedCache";
const WindowSize = Hour * 6;
const MaxCacheWindow = Day * 7;

View File

@ -1,9 +1,11 @@
import { EventKind, EventPublisher, RequestBuilder, TaggedNostrEvent } from "@snort/system";
import { UnwrappedGift, db } from "@/Db";
import { db,UnwrappedGift } from "@/Db";
import { findTag, unwrap } from "@/Utils";
import { RefreshFeedCache } from "./RefreshFeedCache";
import { LoginSession, LoginSessionType } from "@/Utils/Login";
import { RefreshFeedCache } from "./RefreshFeedCache";
export class GiftWrapCache extends RefreshFeedCache<UnwrappedGift> {
constructor() {
super("GiftWrapCache", db.gifts);

View File

@ -1,9 +1,11 @@
import { EventKind, NostrEvent, RequestBuilder, TaggedNostrEvent } from "@snort/system";
import { RefreshFeedCache, TWithCreated } from "./RefreshFeedCache";
import { LoginSession } from "@/Utils/Login";
import { NostrEventForSession, db } from "@/Db";
import { Day } from "@/Utils/Const";
import { unixNow } from "@snort/shared";
import { EventKind, NostrEvent, RequestBuilder, TaggedNostrEvent } from "@snort/system";
import { db,NostrEventForSession } from "@/Db";
import { Day } from "@/Utils/Const";
import { LoginSession } from "@/Utils/Login";
import { RefreshFeedCache, TWithCreated } from "./RefreshFeedCache";
export class NotificationsCache extends RefreshFeedCache<NostrEventForSession> {
#kinds = [EventKind.TextNote, EventKind.Reaction, EventKind.Repost, EventKind.ZapReceipt];

View File

@ -1,6 +1,7 @@
import { Payment, db } from "@/Db";
import { FeedCache } from "@snort/shared";
import { db,Payment } from "@/Db";
export class Payments extends FeedCache<Payment> {
constructor() {
super("PaymentsCache", db.payments);

View File

@ -1,5 +1,6 @@
import { FeedCache } from "@snort/shared";
import { EventPublisher, RequestBuilder, TaggedNostrEvent } from "@snort/system";
import { LoginSession } from "@/Utils/Login";
export type TWithCreated<T> = (T | Readonly<T>) & { created_at: number };

View File

@ -1,13 +1,13 @@
import { UserProfileCache, UserRelaysCache, RelayMetricCache } from "@snort/system";
import { RelayMetricCache,UserProfileCache, UserRelaysCache } from "@snort/system";
import { SnortSystemDb } from "@snort/system-web";
import { EventInteractionCache } from "./EventInteractionCache";
import { ChatCache } from "./ChatCache";
import { Payments } from "./PaymentsCache";
import { EventInteractionCache } from "./EventInteractionCache";
import { FollowListCache } from "./FollowListCache";
import { FollowsFeedCache } from "./FollowsFeed";
import { GiftWrapCache } from "./GiftWrapCache";
import { NotificationsCache } from "./Notifications";
import { FollowsFeedCache } from "./FollowsFeed";
import { FollowListCache } from "./FollowListCache";
import { Payments } from "./PaymentsCache";
export const SystemDb = new SnortSystemDb();
export const UserCache = new UserProfileCache(SystemDb.users);