@sentry/junior 0.10.3 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -17
- package/dist/app.d.ts +13 -0
- package/dist/{chunk-ASAQ64YN.js → app.js} +9490 -8761
- package/dist/chunk-2KG3PWR4.js +17 -0
- package/dist/{chunk-FNYLIUOK.js → chunk-IRE2LOEJ.js} +5 -4
- package/dist/{chunk-573MJIST.js → chunk-WELSSJJU.js} +2 -2
- package/dist/{chunk-KCLEEKYX.js → chunk-XH7TV4JS.js} +13 -5
- package/dist/chunk-Z3YD6NHK.js +12 -0
- package/dist/{chunk-AVIUX5XL.js → chunk-ZYB3U7Q4.js} +15 -13
- package/dist/cli/check.js +5 -3
- package/dist/cli/env.js +2 -0
- package/dist/cli/init.js +65 -45
- package/dist/cli/run.js +2 -0
- package/dist/cli/snapshot-warmup.js +9 -3
- package/dist/instrumentation.d.ts +3 -11
- package/dist/instrumentation.js +17 -26
- package/dist/nitro.d.ts +18 -0
- package/dist/nitro.js +59 -0
- package/package.json +16 -25
- package/dist/app/layout.d.ts +0 -11
- package/dist/app/layout.js +0 -8
- package/dist/chunk-4RBEYCOG.js +0 -12
- package/dist/handlers/health.d.ts +0 -6
- package/dist/handlers/health.js +0 -6
- package/dist/handlers/router.d.ts +0 -23
- package/dist/handlers/router.js +0 -827
- package/dist/handlers/webhooks.d.ts +0 -28
- package/dist/handlers/webhooks.js +0 -12
- package/dist/next-config.d.ts +0 -22
- package/dist/next-config.js +0 -114
package/README.md
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
# @sentry/junior
|
|
2
2
|
|
|
3
|
-
`@sentry/junior` is a Slack bot package
|
|
3
|
+
`@sentry/junior` is a Slack bot package built on [Hono](https://hono.dev/).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
pnpm add @sentry/junior
|
|
9
|
-
pnpm add next react react-dom @sentry/nextjs
|
|
8
|
+
pnpm add @sentry/junior hono @sentry/node
|
|
10
9
|
```
|
|
11
10
|
|
|
12
11
|
## Quick usage
|
|
13
12
|
|
|
14
|
-
`
|
|
13
|
+
`server.ts`:
|
|
15
14
|
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
```ts
|
|
16
|
+
import { initSentry } from "@sentry/junior/instrumentation";
|
|
17
|
+
initSentry();
|
|
18
|
+
|
|
19
|
+
import { createApp } from "@sentry/junior";
|
|
20
|
+
|
|
21
|
+
const app = await createApp();
|
|
22
|
+
|
|
23
|
+
export default app;
|
|
19
24
|
```
|
|
20
25
|
|
|
21
|
-
`
|
|
26
|
+
`nitro.config.ts`:
|
|
22
27
|
|
|
23
|
-
```
|
|
24
|
-
import {
|
|
28
|
+
```ts
|
|
29
|
+
import { juniorNitroConfig } from "@sentry/junior/nitro";
|
|
30
|
+
import { defineConfig } from "nitro";
|
|
25
31
|
|
|
26
|
-
export default
|
|
27
|
-
pluginPackages: [
|
|
28
|
-
"@sentry/junior-github",
|
|
29
|
-
"@sentry/junior-notion",
|
|
30
|
-
"@sentry/junior-sentry",
|
|
31
|
-
],
|
|
32
|
-
});
|
|
32
|
+
export default defineConfig(juniorNitroConfig());
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
Installed `@sentry/junior-*` plugin packages are discovered automatically. Use `createApp({ pluginPackages: [...] })` only when you need to restrict discovery to a specific allowlist.
|
|
36
|
+
|
|
35
37
|
## Full docs
|
|
36
38
|
|
|
37
39
|
Canonical docs: **https://junior.sentry.dev/**
|
package/dist/app.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
|
|
3
|
+
/** Callback to schedule background work that must finish before the function exits. */
|
|
4
|
+
type WaitUntilFn = (task: Promise<unknown> | (() => Promise<unknown>)) => void;
|
|
5
|
+
|
|
6
|
+
interface JuniorAppOptions {
|
|
7
|
+
pluginPackages?: string[];
|
|
8
|
+
waitUntil?: WaitUntilFn;
|
|
9
|
+
}
|
|
10
|
+
/** Create a Hono app with all Junior routes mounted under `/api`. */
|
|
11
|
+
declare function createApp(options?: JuniorAppOptions): Promise<Hono>;
|
|
12
|
+
|
|
13
|
+
export { type JuniorAppOptions, createApp };
|