stickynotes alias

This commit is contained in:
Alex Gleason 2024-05-01 16:14:50 -05:00
parent 9d0be2de0d
commit 3513206de1
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
22 changed files with 38 additions and 22 deletions

View File

@ -18,6 +18,7 @@
"@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.15.0",
"@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs",
"@soapbox/kysely-deno-sqlite": "jsr:@soapbox/kysely-deno-sqlite@^2.0.2",
"@soapbox/stickynotes": "jsr:@soapbox/stickynotes@^0.4.0",
"@std/cli": "jsr:@std/cli@^0.223.0",
"@std/crypto": "jsr:@std/crypto@^0.224.0",
"@std/encoding": "jsr:@std/encoding@^0.224.0",

View File

@ -4,6 +4,7 @@
"specifiers": {
"jsr:@nostrify/nostrify@^0.15.0": "jsr:@nostrify/nostrify@0.15.0",
"jsr:@soapbox/kysely-deno-sqlite@^2.0.2": "jsr:@soapbox/kysely-deno-sqlite@2.0.2",
"jsr:@soapbox/stickynotes@^0.4.0": "jsr:@soapbox/stickynotes@0.4.0",
"jsr:@std/assert@^0.224.0": "jsr:@std/assert@0.224.0",
"jsr:@std/crypto@^0.224.0": "jsr:@std/crypto@0.224.0",
"jsr:@std/encoding@^0.224.0": "jsr:@std/encoding@0.224.0",
@ -68,6 +69,9 @@
"npm:kysely@^0.27.2"
]
},
"@soapbox/stickynotes@0.4.0": {
"integrity": "60bfe61ab3d7e04bf708273b1e2d391a59534bdf29e54160e98d7afd328ca1ec"
},
"@std/assert@0.224.0": {
"integrity": "8643233ec7aec38a940a8264a6e3eed9bfa44e7a71cc6b3c8874213ff401967f"
},
@ -1496,6 +1500,7 @@
"dependencies": [
"jsr:@nostrify/nostrify@^0.15.0",
"jsr:@soapbox/kysely-deno-sqlite@^2.0.2",
"jsr:@soapbox/stickynotes@^0.4.0",
"jsr:@std/cli@^0.223.0",
"jsr:@std/crypto@^0.224.0",
"jsr:@std/encoding@^0.224.0",

View File

@ -1,9 +1,9 @@
import { NostrEvent, NStore } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { type Context, Env as HonoEnv, type Handler, Hono, Input as HonoInput, type MiddlewareHandler } from 'hono';
import { cors, logger, serveStatic } from 'hono/middleware';
import { type User } from '@/db/users.ts';
import { Debug } from '@/deps.ts';
import '@/firehose.ts';
import { Time } from '@/utils.ts';

View File

@ -1,9 +1,9 @@
import { NostrFilter } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { z } from 'zod';
import { type AppController } from '@/app.ts';
import { Conf } from '@/config.ts';
import { Debug } from '@/deps.ts';
import { getFeedPubkeys } from '@/queries.ts';
import { bech32ToPubkey } from '@/utils.ts';
import { renderReblog, renderStatus } from '@/views/mastodon/statuses.ts';

View File

@ -1,6 +1,7 @@
import { NostrFilter } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { Conf } from '@/config.ts';
import { Debug } from '@/deps.ts';
import * as pipeline from '@/pipeline.ts';
import { AdminSigner } from '@/signers/AdminSigner.ts';
import { Storages } from '@/storages.ts';

View File

@ -37,7 +37,5 @@ export { default as uuid62 } from 'npm:uuid62@^1.0.2';
export { Machina } from 'https://gitlab.com/soapbox-pub/nostr-machina/-/raw/08a157d39f2741c9a3a4364cb97db36e71d8c03a/mod.ts';
export { EventEmitter } from 'npm:tseep@^1.1.3';
export { default as stringifyStable } from 'npm:fast-stable-stringify@^1.0.0';
export { default as Debug } from 'https://gitlab.com/soapbox-pub/stickynotes/-/raw/v0.3.0/debug.ts';
export { Stickynotes } from 'https://gitlab.com/soapbox-pub/stickynotes/-/raw/v0.3.0/mod.ts';
export type * as TypeFest from 'npm:type-fest@^4.3.0';

View File

@ -1,5 +1,6 @@
import { NostrEvent } from '@nostrify/nostrify';
import { Debug } from '@/deps.ts';
import Debug from '@soapbox/stickynotes/debug';
import { activeRelays, pool } from '@/pool.ts';
import { nostrNow } from '@/utils.ts';

View File

@ -1,5 +1,6 @@
import Debug from '@soapbox/stickynotes/debug';
import { type MiddlewareHandler } from 'hono';
import { Debug } from '@/deps.ts';
import ExpiringCache from '@/utils/expiring-cache.ts';
const debug = Debug('ditto:middleware:cache');

View File

@ -1,12 +1,12 @@
import { NostrEvent, NSchema as n } from '@nostrify/nostrify';
import { LNURL } from '@nostrify/nostrify/ln';
import Debug from '@soapbox/stickynotes/debug';
import { sql } from 'kysely';
import { Conf } from '@/config.ts';
import { db } from '@/db.ts';
import { addRelays } from '@/db/relays.ts';
import { deleteAttachedMedia } from '@/db/unattached-media.ts';
import { Debug } from '@/deps.ts';
import { DittoEvent } from '@/interfaces/DittoEvent.ts';
import { isEphemeralKind } from '@/kinds.ts';
import { DVM } from '@/pipeline/DVM.ts';

View File

@ -1,7 +1,8 @@
import { NostrEvent, NostrFilter } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { Conf } from '@/config.ts';
import { Storages } from '@/storages.ts';
import { Debug } from '@/deps.ts';
import { type DittoEvent } from '@/interfaces/DittoEvent.ts';
import { type DittoRelation } from '@/interfaces/DittoFilter.ts';
import { findReplyTag, getTagSet } from '@/tags.ts';

View File

@ -1,9 +1,9 @@
import { NostrEvent } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { InsertQueryBuilder } from 'kysely';
import { db } from '@/db.ts';
import { DittoTables } from '@/db/DittoTables.ts';
import { Debug } from '@/deps.ts';
import { Storages } from '@/storages.ts';
import { findReplyTag } from '@/tags.ts';

View File

@ -1,9 +1,9 @@
import { NIP50, NostrEvent, NostrFilter, NStore } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { Kysely, type SelectQueryBuilder } from 'kysely';
import { Conf } from '@/config.ts';
import { DittoTables } from '@/db/DittoTables.ts';
import { Debug } from '@/deps.ts';
import { normalizeFilters } from '@/filter.ts';
import { DittoEvent } from '@/interfaces/DittoEvent.ts';
import { isDittoInternalKind, isParameterizedReplaceableKind, isReplaceableKind } from '@/kinds.ts';

View File

@ -1,5 +1,6 @@
import { NostrFilter, NSet, NStore } from '@nostrify/nostrify';
import { Debug } from '@/deps.ts';
import Debug from '@soapbox/stickynotes/debug';
import { normalizeFilters } from '@/filter.ts';
import { type DittoEvent } from '@/interfaces/DittoEvent.ts';
import { abortError } from '@/utils/abort.ts';

View File

@ -1,8 +1,8 @@
import { NostrEvent, NostrFilter, NSet, NStore } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { RelayPoolWorker } from 'nostr-relaypool';
import { matchFilters } from 'nostr-tools';
import { Debug } from '@/deps.ts';
import { normalizeFilters } from '@/filter.ts';
import { purifyEvent } from '@/storages/hydrate.ts';
import { abortError } from '@/utils/abort.ts';

View File

@ -1,5 +1,7 @@
import { NostrEvent, NostrFilter, NStore } from '@nostrify/nostrify';
import { Debug, EventEmitter } from '@/deps.ts';
import Debug from '@soapbox/stickynotes/debug';
import { EventEmitter } from '@/deps.ts';
import { eventToMicroFilter, getFilterId, isMicrofilter, type MicroFilter } from '@/filter.ts';
import { Time } from '@/utils/time.ts';
import { abortError } from '@/utils/abort.ts';

View File

@ -1,5 +1,6 @@
import { NostrEvent, NostrFilter, NRelay1, NStore } from '@nostrify/nostrify';
import { Debug } from '@/deps.ts';
import Debug from '@soapbox/stickynotes/debug';
import { normalizeFilters } from '@/filter.ts';
import { type DittoEvent } from '@/interfaces/DittoEvent.ts';
import { hydrateEvents } from '@/storages/hydrate.ts';

View File

@ -1,11 +1,12 @@
import { NostrEvent, NostrFilter } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { type Context, HTTPException } from 'hono';
import { EventTemplate } from 'nostr-tools';
import { z } from 'zod';
import { type AppContext } from '@/app.ts';
import { Conf } from '@/config.ts';
import { Debug, parseFormData, type TypeFest } from '@/deps.ts';
import { parseFormData, type TypeFest } from '@/deps.ts';
import * as pipeline from '@/pipeline.ts';
import { AdminSigner } from '@/signers/AdminSigner.ts';
import { APISigner } from '@/signers/APISigner.ts';

View File

@ -1,5 +1,6 @@
import { LNURL, LNURLDetails } from '@nostrify/nostrify/ln';
import { Debug } from '@/deps.ts';
import Debug from '@soapbox/stickynotes/debug';
import { SimpleLRU } from '@/utils/SimpleLRU.ts';
import { Time } from '@/utils/time.ts';
import { fetchWorker } from '@/workers/fetch.ts';

View File

@ -1,8 +1,8 @@
import { NIP05 } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { nip19 } from 'nostr-tools';
import { Conf } from '@/config.ts';
import { Debug } from '@/deps.ts';
import { SimpleLRU } from '@/utils/SimpleLRU.ts';
import { Time } from '@/utils/time.ts';
import { Storages } from '@/storages.ts';

View File

@ -1,4 +1,6 @@
import { Debug, sanitizeHtml, TTLCache, unfurl } from '@/deps.ts';
import Debug from '@soapbox/stickynotes/debug';
import { sanitizeHtml, TTLCache, unfurl } from '@/deps.ts';
import { Time } from '@/utils/time.ts';
import { fetchWorker } from '@/workers/fetch.ts';

View File

@ -1,7 +1,6 @@
import Debug from '@soapbox/stickynotes/debug';
import * as Comlink from 'comlink';
import { Debug } from '@/deps.ts';
import './handlers/abortsignal.ts';
const debug = Debug('ditto:fetch.worker');

View File

@ -1,9 +1,10 @@
/// <reference lib="webworker" />
import { ScopedPerformance } from 'https://deno.land/x/scoped_performance@v2.0.0/mod.ts';
import { Stickynotes } from '@soapbox/stickynotes';
import * as Comlink from 'comlink';
import { CompiledQuery, QueryResult } from 'kysely';
import { DenoSqlite3, Stickynotes } from '@/deps.ts';
import { DenoSqlite3 } from '@/deps.ts';
import '@/sentry.ts';
let db: DenoSqlite3 | undefined;