This commit is contained in:
Martti Malmi
2023-11-17 13:52:10 +02:00
parent 5942d92923
commit 52553adabf
215 changed files with 3265 additions and 2597 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
import { EventKind, NostrEvent, RequestBuilder, TaggedNostrEvent } from "@snort/system";
import { RefreshFeedCache, TWithCreated } from "./RefreshFeedCache";
import { LoginSession } from "Login";
import { NostrEventForSession, db } from "Db";
import { Day } from "Const";
import { LoginSession } from "@/Login";
import { NostrEventForSession, db } from "@/Db";
import { Day } from "@/Const";
import { unixNow } from "@snort/shared";
export class NotificationsCache extends RefreshFeedCache<NostrEventForSession> {

View File

@ -1,4 +1,4 @@
import { Payment, db } from "Db";
import { Payment, db } from "@/Db";
import { FeedCache } from "@snort/shared";
export class Payments extends FeedCache<Payment> {

View File

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