Move more deps to aliases

This commit is contained in:
Alex Gleason 2024-05-01 16:29:21 -05:00
parent ea665eed12
commit e5c8030960
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
8 changed files with 44 additions and 9 deletions

View File

@ -15,6 +15,7 @@
"exclude": ["./public"],
"imports": {
"@/": "./src/",
"@bradenmacdonald/s3-lite-client": "jsr:@bradenmacdonald/s3-lite-client@^0.7.4",
"@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",
@ -27,15 +28,18 @@
"@std/media-types": "jsr:@std/media-types@^0.224.0",
"@std/streams": "jsr:@std/streams@^0.223.0",
"comlink": "npm:comlink@^4.4.1",
"fast-stable-stringify": "npm:fast-stable-stringify@^1.0.0",
"hono": "https://deno.land/x/hono@v3.10.1/mod.ts",
"hono/middleware": "https://deno.land/x/hono@v3.10.1/middleware.ts",
"iso-639-1": "npm:iso-639-1@2.1.15",
"kysely": "npm:kysely@^0.27.3",
"kysely_deno_postgres": "https://deno.land/x/kysely_deno_postgres@v0.4.0/mod.ts",
"lru-cache": "npm:lru-cache@^10.2.2",
"nostr-relaypool": "npm:nostr-relaypool2@0.6.34",
"nostr-tools": "npm:nostr-tools@^2.5.1",
"nostr-wasm": "npm:nostr-wasm@^0.1.0",
"tldts": "npm:tldts@^6.0.14",
"tseep": "npm:tseep@^1.2.1",
"type-fest": "npm:type-fest@^4.3.0",
"uuid62": "npm:uuid62@^1.0.2",
"zod": "npm:zod@^3.23.4",

View File

@ -2,13 +2,17 @@
"version": "3",
"packages": {
"specifiers": {
"jsr:@bradenmacdonald/s3-lite-client@^0.7.4": "jsr:@bradenmacdonald/s3-lite-client@0.7.4",
"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.218.2": "jsr:@std/assert@0.218.2",
"jsr:@std/assert@^0.224.0": "jsr:@std/assert@0.224.0",
"jsr:@std/bytes@^0.218.2": "jsr:@std/bytes@0.218.2",
"jsr:@std/crypto@^0.224.0": "jsr:@std/crypto@0.224.0",
"jsr:@std/dotenv@^0.224.0": "jsr:@std/dotenv@0.224.0",
"jsr:@std/encoding@^0.224.0": "jsr:@std/encoding@0.224.0",
"jsr:@std/io@^0.218": "jsr:@std/io@0.218.2",
"jsr:@std/media-types@^0.224.0": "jsr:@std/media-types@0.224.0",
"npm:@isaacs/ttlcache@^1.4.1": "npm:@isaacs/ttlcache@1.4.1",
"npm:@noble/hashes@^1.4.0": "npm:@noble/hashes@1.4.0",
@ -32,6 +36,7 @@
"npm:linkify-string@^4.1.1": "npm:linkify-string@4.1.3_linkifyjs@4.1.3",
"npm:linkifyjs@^4.1.1": "npm:linkifyjs@4.1.3",
"npm:lru-cache@^10.2.0": "npm:lru-cache@10.2.0",
"npm:lru-cache@^10.2.2": "npm:lru-cache@10.2.2",
"npm:mime@^3.0.0": "npm:mime@3.0.0",
"npm:node-forge@^1.3.1": "npm:node-forge@1.3.1",
"npm:nostr-relaypool2@0.6.34": "npm:nostr-relaypool2@0.6.34",
@ -42,6 +47,7 @@
"npm:sanitize-html@^2.11.0": "npm:sanitize-html@2.13.0",
"npm:tldts@^6.0.14": "npm:tldts@6.1.18",
"npm:tseep@^1.1.3": "npm:tseep@1.2.1",
"npm:tseep@^1.2.1": "npm:tseep@1.2.1",
"npm:type-fest@^4.3.0": "npm:type-fest@4.15.0",
"npm:unfurl.js@^6.4.0": "npm:unfurl.js@6.4.0",
"npm:uuid62@^1.0.2": "npm:uuid62@1.0.2",
@ -50,6 +56,12 @@
"npm:zod@^3.23.4": "npm:zod@3.23.4"
},
"jsr": {
"@bradenmacdonald/s3-lite-client@0.7.4": {
"integrity": "602666ef40d09621d35aa3ea8813e0bfd58b3558e3f0a1d20404b0e61aa0b37e",
"dependencies": [
"jsr:@std/io@^0.218"
]
},
"@nostrify/nostrify@0.15.0": {
"integrity": "51c2fe9ac7264d22567cd1919a5bf5101a5207f651e65bc00b3de43f9038dfc8",
"dependencies": [
@ -73,9 +85,15 @@
"@soapbox/stickynotes@0.4.0": {
"integrity": "60bfe61ab3d7e04bf708273b1e2d391a59534bdf29e54160e98d7afd328ca1ec"
},
"@std/assert@0.218.2": {
"integrity": "7f0a5a1a8cf86607cd6c2c030584096e1ffad27fc9271429a8cb48cfbdee5eaf"
},
"@std/assert@0.224.0": {
"integrity": "8643233ec7aec38a940a8264a6e3eed9bfa44e7a71cc6b3c8874213ff401967f"
},
"@std/bytes@0.218.2": {
"integrity": "91fe54b232dcca73856b79a817247f4a651dbb60d51baafafb6408c137241670"
},
"@std/crypto@0.224.0": {
"integrity": "154ef3ff08ef535562ef1a718718c5b2c5fc3808f0f9100daad69e829bfcdf2d",
"dependencies": [
@ -89,6 +107,13 @@
"@std/encoding@0.224.0": {
"integrity": "efb6dca97d3e9c31392bd5c8cfd9f9fc9decf5a1f4d1f78af7900a493bcf89b5"
},
"@std/io@0.218.2": {
"integrity": "c64fbfa087b7c9d4d386c5672f291f607d88cb7d44fc299c20c713e345f2785f",
"dependencies": [
"jsr:@std/assert@^0.218.2",
"jsr:@std/bytes@^0.218.2"
]
},
"@std/media-types@0.224.0": {
"integrity": "5ac87989393f8cb1c81bee02aef6f5d4c8289b416deabc04f9ad25dff292d0b0"
}
@ -686,6 +711,10 @@
"integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==",
"dependencies": {}
},
"lru-cache@10.2.2": {
"integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
"dependencies": {}
},
"lru-cache@6.0.0": {
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
@ -1502,6 +1531,7 @@
},
"workspace": {
"dependencies": [
"jsr:@bradenmacdonald/s3-lite-client@^0.7.4",
"jsr:@nostrify/nostrify@^0.15.0",
"jsr:@soapbox/kysely-deno-sqlite@^2.0.2",
"jsr:@soapbox/stickynotes@^0.4.0",
@ -1513,12 +1543,15 @@
"jsr:@std/media-types@^0.224.0",
"jsr:@std/streams@^0.223.0",
"npm:comlink@^4.4.1",
"npm:fast-stable-stringify@^1.0.0",
"npm:iso-639-1@2.1.15",
"npm:kysely@^0.27.3",
"npm:lru-cache@^10.2.2",
"npm:nostr-relaypool2@0.6.34",
"npm:nostr-tools@^2.5.1",
"npm:nostr-wasm@^0.1.0",
"npm:tldts@^6.0.14",
"npm:tseep@^1.2.1",
"npm:type-fest@^4.3.0",
"npm:uuid62@^1.0.2",
"npm:zod@^3.23.4"

View File

@ -21,13 +21,9 @@ export {
} from 'https://gitlab.com/soapbox-pub/fedisign/-/raw/v0.2.1/mod.ts';
export { generateSeededRsa } from 'https://gitlab.com/soapbox-pub/seeded-rsa/-/raw/v1.0.0/mod.ts';
export * as secp from 'npm:@noble/secp256k1@^2.0.0';
export { LRUCache } from 'npm:lru-cache@^10.2.0';
export {
DB as Sqlite,
SqliteError,
} from 'https://raw.githubusercontent.com/alexgleason/deno-sqlite/325f66d8c395e7f6f5ee78ebfa42a0eeea4a942b/mod.ts';
export { Database as DenoSqlite3 } from 'https://deno.land/x/sqlite3@0.9.1/mod.ts';
export * as cron from 'https://deno.land/x/deno_cron@v1.0.0/cron.ts';
export { S3Client } from 'https://deno.land/x/s3_lite_client@0.6.1/mod.ts';
export { default as IpfsHash } from 'npm:ipfs-only-hash@^4.0.0';
export { default as stringifyStable } from 'npm:fast-stable-stringify@^1.0.0';

View File

@ -1,7 +1,7 @@
import { NostrEvent, NostrFilter } from '@nostrify/nostrify';
import { stringifyStable } from 'fast-stable-stringify';
import { z } from 'zod';
import { stringifyStable } from '@/deps.ts';
import { isReplaceableKind } from '@/kinds.ts';
import { nostrIdSchema } from '@/schemas/nostr.ts';

View File

@ -1,7 +1,7 @@
import { NostrEvent, NostrFilter, NStore } from '@nostrify/nostrify';
import Debug from '@soapbox/stickynotes/debug';
import { EventEmitter } from 'tseep';
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,11 +1,11 @@
import { join } from 'node:path';
import { S3Client } from '@bradenmacdonald/s3-lite-client';
import { crypto } from '@std/crypto';
import { encodeHex } from '@std/encoding/hex';
import { extensionsByType } from '@std/media-types';
import { Conf } from '@/config.ts';
import { S3Client } from '@/deps.ts';
import type { Uploader } from './types.ts';

View File

@ -1,6 +1,6 @@
// deno-lint-ignore-file ban-types
import { LRUCache } from '@/deps.ts';
import { LRUCache } from 'lru-cache';
type FetchFn<K extends {}, V extends {}, O extends {}> = (key: K, opts: O) => Promise<V>;

View File

@ -1,5 +1,7 @@
import { LRUCache } from 'lru-cache';
import { Conf } from '@/config.ts';
import { generateSeededRsa, LRUCache, publicKeyToPem, secp } from '@/deps.ts';
import { generateSeededRsa, publicKeyToPem, secp } from '@/deps.ts';
const opts = {
bits: 2048,