Rename files
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Kieran 2023-06-21 16:48:35 +01:00
parent 0cd43a731e
commit 7ec602cc16
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
51 changed files with 98 additions and 98 deletions

View File

@ -4,7 +4,7 @@ import { HexKey, TaggedRawEvent } from "@snort/system";
import Note from "Element/Note";
import useLogin from "Hooks/useLogin";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import messages from "./messages";

View File

@ -10,7 +10,7 @@ import Icon from "Icons/Icon";
import { kvToObject } from "SnortUtils";
import AsyncButton from "Element/AsyncButton";
import { useWallet } from "Wallet";
import { PaymentsCache } from "Cache";
import { PaymentsCache } from "cache";
import { Payment } from "Db";
import PageSpinner from "Element/PageSpinner";
import { LiveVideoPlayer } from "Element/LiveVideoPlayer";

View File

@ -22,7 +22,7 @@ import useEventPublisher from "Feed/EventPublisher";
import { debounce } from "SnortUtils";
import useLogin from "Hooks/useLogin";
import SnortServiceProvider from "Nip05/SnortServiceProvider";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import messages from "./messages";
import { System } from "index";

View File

@ -24,7 +24,7 @@ import NoteFooter, { Translation } from "Element/NoteFooter";
import NoteTime from "Element/NoteTime";
import Reveal from "Element/Reveal";
import useModeration from "Hooks/useModeration";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import Poll from "Element/Poll";
import useLogin from "Hooks/useLogin";
import { setBookmarked, setPinned } from "Login";

View File

@ -8,7 +8,7 @@ import AsyncButton from "Element/AsyncButton";
import { useWallet } from "Wallet";
import { Toastore } from "Toaster";
import { getDisplayName } from "Element/ProfileImage";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import useLogin from "Hooks/useLogin";
import useEventPublisher from "Feed/EventPublisher";
import { WalletInvoiceState } from "Wallet";

View File

@ -9,7 +9,7 @@ import { NostrPrefix, MetadataCache } from "@snort/system";
import Avatar from "Element/Avatar";
import Nip05 from "Element/Nip05";
import { hexToBech32 } from "SnortUtils";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import messages from "./messages";

View File

@ -15,7 +15,7 @@ import NoteReaction from "Element/NoteReaction";
import useModeration from "Hooks/useModeration";
import ProfilePreview from "Element/ProfilePreview";
import Skeleton from "Element/Skeleton";
import { UserCache } from "Cache";
import { UserCache } from "cache";
export interface TimelineProps {
postsOnly: boolean;

View File

@ -12,7 +12,7 @@ import { addSubscription, setBlocked, setBookmarked, setFollows, setMuted, setPi
import { SnortPubKey } from "Const";
import { SubscriptionEvent } from "Subscription";
import useRelaysFeedFollows from "./RelaysFeedFollows";
import { UserRelays } from "Cache";
import { UserRelays } from "cache";
import { System } from "index";
import { Nip29Chats, Nip4Chats } from "chat";

View File

@ -12,7 +12,7 @@ import { useRequestBuilder } from "@snort/system-react";
import debug from "debug";
import { sanitizeRelayUrl } from "SnortUtils";
import { UserRelays } from "Cache";
import { UserRelays } from "cache";
import { System } from "index";
interface RelayList {

View File

@ -3,7 +3,7 @@ import { HexKey, EventKind, FlatNoteStore, RequestBuilder, parseZap } from "@sno
import { useRequestBuilder } from "@snort/system-react";
import { System } from "index";
import { UserCache } from "Cache";
import { UserCache } from "cache";
export default function useZapsFeed(pubkey?: HexKey) {
const sub = useMemo(() => {

View File

@ -1,7 +1,7 @@
import { useSyncExternalStore } from "react";
import { HexKey, u256 } from "@snort/system";
import { InteractionCache } from "Cache";
import { InteractionCache } from "cache";
import { EventInteraction } from "Db";
import { sha256, unwrap } from "SnortUtils";

View File

@ -4,7 +4,7 @@ import { TaggedRawEvent, EventKind, MetadataCache } from "@snort/system";
import { getDisplayName } from "Element/ProfileImage";
import { MentionRegex } from "Const";
import { tagFilterOfTextRepost, unwrap } from "SnortUtils";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import { LoginSession } from "Login";
export interface NotificationRequest {

View File

@ -7,7 +7,7 @@ import { useUserProfile } from "@snort/system-react";
import Logo from "Element/Logo";
import useEventPublisher from "Feed/EventPublisher";
import useLogin from "Hooks/useLogin";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import AvatarEditor from "Element/AvatarEditor";
import { DISCOVER } from ".";
import { System } from "index";

View File

@ -11,7 +11,7 @@ import useEventPublisher from "Feed/EventPublisher";
import { openFile } from "SnortUtils";
import useFileUpload from "Upload";
import AsyncButton from "Element/AsyncButton";
import { UserCache } from "Cache";
import { UserCache } from "cache";
import useLogin from "Hooks/useLogin";
import AvatarEditor from "Element/AvatarEditor";
import Icon from "Icons/Icon";

View File

@ -1,4 +1,4 @@
import { UserCache } from "Cache";
import { UserCache } from "cache";
import { getDisplayName } from "Element/ProfileImage";
import { LNURL, ExternalStore, unixNow } from "@snort/shared";
import { Toastore } from "Toaster";

View File

@ -2,7 +2,7 @@ import { useSyncExternalStore } from "react";
import { Nip4ChatSystem } from "./nip4";
import { EventKind, EventPublisher, NostrEvent, RequestBuilder, SystemInterface, UserMetadata } from "@snort/system";
import { unwrap } from "@snort/shared";
import { Chats } from "Cache";
import { Chats } from "cache";
import { findTag, unixNow } from "SnortUtils";
import { Nip29ChatSystem } from "./nip29";

View File

@ -34,7 +34,7 @@ import { SubscribeRoutes } from "Pages/subscribe";
import ZapPoolPage from "Pages/ZapPool";
import DebugPage from "Pages/Debug";
import { db } from "Db";
import { preload, RelayMetrics, UserCache, UserRelays } from "Cache";
import { preload, RelayMetrics, UserCache, UserRelays } from "cache";
import { LoginStore } from "Login";
import { LivePage } from "Pages/LivePage";

View File

@ -1,6 +1,6 @@
{
"name": "@snort/shared",
"version": "1.0.2",
"version": "1.0.3",
"description": "Shared components for Snort",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -34,8 +34,8 @@ export function decodeInvoice(pr: string): InvoiceDetails | undefined {
expire: timestamp && expire ? timestamp + expire : undefined,
timestamp: timestamp,
description: descriptionSection as string | undefined,
descriptionHash: descriptionHashSection ? bytesToHex(descriptionHashSection as Uint8Array) : undefined,
paymentHash: paymentHashSection ? bytesToHex(paymentHashSection as Uint8Array) : undefined,
descriptionHash: descriptionHashSection ? (typeof descriptionHashSection === "string" ? descriptionHashSection as string : bytesToHex(descriptionHashSection as Uint8Array)) : undefined,
paymentHash: paymentHashSection ? (typeof paymentHashSection === "string" ? paymentHashSection as string : bytesToHex(paymentHashSection as Uint8Array)) : undefined,
expired: false,
};
if (ret.expire) {

View File

@ -1,6 +1,6 @@
{
"name": "@snort/system-react",
"version": "1.0.4",
"version": "1.0.7",
"description": "React hooks for @snort/system",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@ -16,7 +16,7 @@
"dist"
],
"dependencies": {
"@snort/system": "^1.0.9",
"@snort/system": "^1.0.12",
"@snort/shared": "^1.0.2",
"react": "^18.2.0"
}

View File

@ -1,6 +1,6 @@
{
"name": "@snort/system",
"version": "1.0.9",
"version": "1.0.12",
"description": "Snort nostr system package",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@ -25,7 +25,7 @@
"typescript": "^5.0.4"
},
"dependencies": {
"@snort/shared": "^1.0.2",
"@snort/shared": "^1.0.3",
"@noble/curves": "^1.0.0",
"@scure/base": "^1.1.1",
"@stablelib/xchacha20": "^1.0.1",

View File

@ -2,10 +2,10 @@ import { v4 as uuid } from "uuid";
import debug from "debug";
import { unwrap, ExternalStore, unixNowMs } from "@snort/shared";
import { DefaultConnectTimeout } from "./Const";
import { ConnectionStats } from "./ConnectionStats";
import { NostrEvent, ReqCommand, TaggedRawEvent, u256 } from "./Nostr";
import { RelayInfo } from "./RelayInfo";
import { DefaultConnectTimeout } from "./const";
import { ConnectionStats } from "./connection-stats";
import { NostrEvent, ReqCommand, TaggedRawEvent, u256 } from "./nostr";
import { RelayInfo } from "./relay-info";
export type AuthHandler = (challenge: string, relay: string) => Promise<NostrEvent | undefined>;

View File

@ -1,6 +1,6 @@
import * as utils from "@noble/curves/abstract/utils";
import { bech32 } from "@scure/base";
import { HexKey } from "./Nostr";
import { HexKey } from "./nostr";
export enum NostrPrefix {
PublicKey = "npub",

View File

@ -1,4 +1,4 @@
import { RelaySettings } from "./Connection";
import { RelaySettings } from "./connection";
export interface NostrEvent {
id: u256;

View File

@ -3,11 +3,11 @@ import debug from "debug";
import { unixNowMs, unwrap } from "@snort/shared";
import { Connection, ReqFilter, Nips, TaggedRawEvent } from ".";
import { reqFilterEq } from "./Utils";
import { NoteStore } from "./NoteCollection";
import { flatMerge } from "./RequestMerger";
import { BuiltRawReqFilter } from "./RequestBuilder";
import { expandFilter } from "./RequestExpander";
import { reqFilterEq } from "./utisl";
import { NoteStore } from "./note-collection";
import { flatMerge } from "./request-merger";
import { BuiltRawReqFilter } from "./request-builder";
import { expandFilter } from "./request-expander";
/**
* Tracing for relay query status

View File

@ -1,8 +1,8 @@
import { FeedCache } from "@snort/shared";
import { sha256, decodeInvoice, InvoiceDetails } from "@snort/shared";
import { HexKey, NostrEvent } from "Nostr";
import { findTag } from "./Utils";
import { MetadataCache } from "./Cache";
import { HexKey, NostrEvent } from "./nostr";
import { findTag } from "./utisl";
import { MetadataCache } from "./cache";
function getInvoice(zap: NostrEvent): InvoiceDetails | undefined {
const bolt11 = findTag(zap, "bolt11");

View File

@ -1,5 +1,5 @@
import { MetadataCache, RelayMetrics, UsersRelays } from ".";
import { NostrEvent } from "../Nostr";
import { NostrEvent } from "../nostr";
import Dexie, { Table } from "dexie";
const NAME = "snort-system";

View File

@ -1,8 +1,8 @@
import { EventKind, HexKey, NostrPrefix, NostrEvent } from ".";
import { HashtagRegex } from "./Const";
import { HashtagRegex } from "./const";
import { getPublicKey, unixNow } from "@snort/shared";
import { EventExt } from "./EventExt";
import { tryParseNostrLink } from "./NostrLink";
import { EventExt } from "./event-ext";
import { tryParseNostrLink } from "./nostr-link";
export class EventBuilder {
#kind?: EventKind;

View File

@ -15,9 +15,9 @@ import {
UserMetadata,
} from ".";
import { EventBuilder } from "./EventBuilder";
import { EventExt } from "./EventExt";
import { findTag } from "./Utils";
import { EventBuilder } from "./event-builder";
import { EventExt } from "./event-ext";
import { findTag } from "./utisl";
const Nip7Queue: Array<WorkQueueItem> = [];
processWorkQueue(Nip7Queue);

View File

@ -1,32 +1,32 @@
import { AuthHandler, RelaySettings, ConnectionStateSnapshot } from "./Connection";
import { RequestBuilder } from "./RequestBuilder";
import { NoteStore } from "./NoteCollection";
import { Query } from "./Query";
import { NostrEvent, ReqFilter } from "./Nostr";
import { AuthHandler, RelaySettings, ConnectionStateSnapshot } from "./connection";
import { RequestBuilder } from "./request-builder";
import { NoteStore } from "./note-collection";
import { Query } from "./query";
import { NostrEvent, ReqFilter } from "./nostr";
export * from "./NostrSystem";
export { default as EventKind } from "./EventKind";
export * from "./Nostr";
export * from "./Links";
export * from "./Nips";
export * from "./RelayInfo";
export * from "./EventExt";
export * from "./Connection";
export * from "./NoteCollection";
export * from "./RequestBuilder";
export * from "./EventPublisher";
export * from "./EventBuilder";
export * from "./NostrLink";
export * from "./ProfileCache";
export * from "./Zaps";
export * from "./nostr-system";
export { default as EventKind } from "./event-kind";
export * from "./nostr";
export * from "./links";
export * from "./nips";
export * from "./relay-info";
export * from "./event-ext";
export * from "./connection";
export * from "./note-collection";
export * from "./request-builder";
export * from "./event-publisher";
export * from "./event-builder";
export * from "./nostr-link";
export * from "./profile-cache";
export * from "./zaps";
export * from "./impl/nip4";
export * from "./impl/nip44";
export * from "./Cache";
export * from "./Cache/UserRelayCache";
export * from "./Cache/UserCache";
export * from "./Cache/RelayMetricCache";
export * from "./cache/index";
export * from "./cache/user-relays";
export * from "./cache/user-metadata";
export * from "./cache/relay-metric";
export interface SystemInterface {
/**

View File

@ -1,13 +1,13 @@
import debug from "debug";
import { unwrap, sanitizeRelayUrl, ExternalStore, FeedCache } from "@snort/shared";
import { NostrEvent, TaggedRawEvent } from "./Nostr";
import { AuthHandler, Connection, RelaySettings, ConnectionStateSnapshot } from "./Connection";
import { Query } from "./Query";
import { RelayCache } from "./GossipModel";
import { NoteStore } from "./NoteCollection";
import { BuiltRawReqFilter, RequestBuilder } from "./RequestBuilder";
import { RelayMetricHandler } from "./RelayMetricHandler";
import { NostrEvent, TaggedRawEvent } from "./nostr";
import { AuthHandler, Connection, RelaySettings, ConnectionStateSnapshot } from "./connection";
import { Query } from "./query";
import { RelayCache } from "./gossip-model";
import { NoteStore } from "./note-collection";
import { BuiltRawReqFilter, RequestBuilder } from "./request-builder";
import { RelayMetricHandler } from "./relay-metric-handler";
import {
MetadataCache,
ProfileLoaderService,

View File

@ -1,6 +1,6 @@
import { appendDedupe } from "@snort/shared";
import { TaggedRawEvent, u256 } from ".";
import { findTag } from "./Utils";
import { findTag } from "./utisl";
export interface StoreSnapshot<TSnapshot> {
data: TSnapshot | undefined;

View File

@ -2,8 +2,8 @@
import debug from "debug";
import { unixNowMs, FeedCache } from "@snort/shared";
import { EventKind, HexKey, SystemInterface, TaggedRawEvent, PubkeyReplaceableNoteStore, RequestBuilder } from ".";
import { ProfileCacheExpire } from "./Const";
import { mapEventToProfile, MetadataCache } from "./Cache";
import { ProfileCacheExpire } from "./const";
import { mapEventToProfile, MetadataCache } from "./cache";
const MetadataRelays = [
"wss://purplepag.es"

View File

@ -1,6 +1,6 @@
import { FeedCache } from "@snort/shared";
import { Connection } from "Connection";
import { RelayMetrics } from "Cache";
import { Connection } from "connection";
import { RelayMetrics } from "cache";
export class RelayMetricHandler {
readonly #cache: FeedCache<RelayMetrics>;

View File

@ -3,10 +3,10 @@ import { v4 as uuid } from "uuid";
import { appendDedupe, sanitizeRelayUrl, unixNowMs } from "@snort/shared";
import { ReqFilter, u256, HexKey, EventKind } from ".";
import { diffFilters } from "./RequestSplitter";
import { RelayCache, splitAllByWriteRelays, splitByWriteRelays } from "./GossipModel";
import { mergeSimilar } from "./RequestMerger";
import { FlatReqFilter, expandFilter } from "./RequestExpander";
import { diffFilters } from "./request-splitter";
import { RelayCache, splitAllByWriteRelays, splitByWriteRelays } from "./gossip-model";
import { mergeSimilar } from "./request-merger";
import { FlatReqFilter, expandFilter } from "./request-expander";
/**
* Which strategy is used when building REQ filters

View File

@ -1,4 +1,4 @@
import { ReqFilter } from "./Nostr";
import { ReqFilter } from "./nostr";
export interface FlatReqFilter {
keys: number

View File

@ -1,4 +1,4 @@
import { NostrEvent, ReqFilter } from "./Nostr";
import { NostrEvent, ReqFilter } from "./nostr";
export function eventMatchesFilter(ev: NostrEvent, filter: ReqFilter) {
if (!(filter.ids?.includes(ev.id) ?? false)) {

View File

@ -1,6 +1,6 @@
import { distance } from "@snort/shared";
import { ReqFilter } from ".";
import { FlatReqFilter } from "./RequestExpander";
import { FlatReqFilter } from "./request-expander";
/**
* Keys which can change the entire meaning of the filter outside the array types

View File

@ -1,6 +1,6 @@
import { flatFilterEq } from "./Utils";
import { FlatReqFilter } from "./RequestExpander";
import { flatMerge } from "./RequestMerger";
import { flatFilterEq } from "./utisl";
import { FlatReqFilter } from "./request-expander";
import { flatMerge } from "./request-merger";
export function diffFilters(prev: Array<FlatReqFilter>, next: Array<FlatReqFilter>, calcRemoved?: boolean) {
const added = [];

View File

@ -1,11 +1,11 @@
import { ExternalStore } from "@snort/shared";
import { SystemSnapshot, SystemInterface } from ".";
import { AuthHandler, ConnectionStateSnapshot, RelaySettings } from "./Connection";
import { NostrEvent } from "./Nostr";
import { NoteStore } from "./NoteCollection";
import { Query } from "./Query";
import { RequestBuilder } from "./RequestBuilder";
import { AuthHandler, ConnectionStateSnapshot, RelaySettings } from "./connection";
import { NostrEvent } from "./nostr";
import { NoteStore } from "./note-collection";
import { Query } from "./query";
import { RequestBuilder } from "./request-builder";
export class SystemWorker extends ExternalStore<SystemSnapshot> implements SystemInterface {
#port: MessagePort;

View File

@ -1,7 +1,7 @@
import { equalProp } from "@snort/shared";
import { FlatReqFilter } from "./RequestExpander";
import { NostrEvent, ReqFilter } from "./Nostr";
import { FlatReqFilter } from "./request-expander";
import { NostrEvent, ReqFilter } from "./nostr";
export function findTag(e: NostrEvent, tag: string) {
const maybeTag = e.tags.find(evTag => {