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:
commit
1ed700d7f9
|
@ -17,6 +17,7 @@
|
||||||
"imports": {
|
"imports": {
|
||||||
"@/": "./src/",
|
"@/": "./src/",
|
||||||
"@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.15.0",
|
"@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/cli": "jsr:@std/cli@^0.223.0",
|
||||||
"@std/crypto": "jsr:@std/crypto@^0.224.0",
|
"@std/crypto": "jsr:@std/crypto@^0.224.0",
|
||||||
"@std/encoding": "jsr:@std/encoding@^0.224.0",
|
"@std/encoding": "jsr:@std/encoding@^0.224.0",
|
||||||
|
|
14
src/app.ts
14
src/app.ts
|
@ -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 { type Context, Env as HonoEnv, type Handler, Hono, Input as HonoInput, type MiddlewareHandler } from 'hono';
|
||||||
import { cors, logger, serveStatic } from 'hono/middleware';
|
import { cors, logger, serveStatic } from 'hono/middleware';
|
||||||
|
|
||||||
import { Conf } from '@/config.ts';
|
|
||||||
import '@/cron.ts';
|
import '@/cron.ts';
|
||||||
import { type User } from '@/db/users.ts';
|
import { type User } from '@/db/users.ts';
|
||||||
import { Debug, sentryMiddleware } from '@/deps.ts';
|
import { Debug } from '@/deps.ts';
|
||||||
import '@/firehose.ts';
|
import '@/firehose.ts';
|
||||||
import { Time } from '@/utils.ts';
|
import { Time } from '@/utils.ts';
|
||||||
|
|
||||||
|
@ -101,17 +100,6 @@ type AppController = Handler<AppEnv, any, HonoInput, Response | Promise<Response
|
||||||
|
|
||||||
const app = new Hono<AppEnv>();
|
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');
|
const debug = Debug('ditto:http');
|
||||||
|
|
||||||
app.use('/api/*', logger(debug));
|
app.use('/api/*', logger(debug));
|
||||||
|
|
|
@ -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 IpfsHash } from 'npm:ipfs-only-hash@^4.0.0';
|
||||||
export { default as uuid62 } from 'npm:uuid62@^1.0.2';
|
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 { 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 * as Comlink from 'npm:comlink@^4.4.1';
|
||||||
export { EventEmitter } from 'npm:tseep@^1.1.3';
|
export { EventEmitter } from 'npm:tseep@^1.1.3';
|
||||||
export { default as stringifyStable } from 'npm:fast-stable-stringify@^1.0.0';
|
export { default as stringifyStable } from 'npm:fast-stable-stringify@^1.0.0';
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Conf } from './config.ts';
|
import * as Sentry from '@sentry/deno';
|
||||||
import { Sentry } from './deps.ts';
|
|
||||||
|
import { Conf } from '@/config.ts';
|
||||||
|
|
||||||
// Sentry
|
// Sentry
|
||||||
if (Conf.sentryDsn) {
|
if (Conf.sentryDsn) {
|
||||||
|
|
Loading…
Reference in New Issue