Merge branch 'rm-toucan' into 'main'

Remove hono/sentry middleware, upgrade @sentry/deno

See merge request soapbox-pub/ditto!196
This commit is contained in:
Alex Gleason 2024-04-30 18:11:52 +00:00
commit 1ed700d7f9
4 changed files with 5 additions and 17 deletions

View File

@ -17,6 +17,7 @@
"imports": {
"@/": "./src/",
"@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.15.0",
"@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs",
"@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

@ -2,10 +2,9 @@ import { NostrEvent, NStore } from '@nostrify/nostrify';
import { type Context, Env as HonoEnv, type Handler, Hono, Input as HonoInput, type MiddlewareHandler } from 'hono';
import { cors, logger, serveStatic } from 'hono/middleware';
import { Conf } from '@/config.ts';
import '@/cron.ts';
import { type User } from '@/db/users.ts';
import { Debug, sentryMiddleware } from '@/deps.ts';
import { Debug } from '@/deps.ts';
import '@/firehose.ts';
import { Time } from '@/utils.ts';
@ -101,17 +100,6 @@ type AppController = Handler<AppEnv, any, HonoInput, Response | Promise<Response
const app = new Hono<AppEnv>();
if (Conf.sentryDsn) {
// @ts-ignore Mismatched hono types.
app.use(
'*',
sentryMiddleware({
dsn: Conf.sentryDsn,
ignoreErrors: ['No pubkey provided'],
}),
);
}
const debug = Debug('ditto:http');
app.use('/api/*', logger(debug));

View File

@ -62,8 +62,6 @@ 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 uuid62 } from 'npm:uuid62@^1.0.2';
export { Machina } from 'https://gitlab.com/soapbox-pub/nostr-machina/-/raw/08a157d39f2741c9a3a4364cb97db36e71d8c03a/mod.ts';
export * as Sentry from 'https://deno.land/x/sentry@7.78.0/index.js';
export { sentry as sentryMiddleware } from 'npm:@hono/sentry@^1.0.0';
export * as Comlink from 'npm:comlink@^4.4.1';
export { EventEmitter } from 'npm:tseep@^1.1.3';
export { default as stringifyStable } from 'npm:fast-stable-stringify@^1.0.0';

View File

@ -1,5 +1,6 @@
import { Conf } from './config.ts';
import { Sentry } from './deps.ts';
import * as Sentry from '@sentry/deno';
import { Conf } from '@/config.ts';
// Sentry
if (Conf.sentryDsn) {