@sentry/junior 0.62.0 → 0.64.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 CHANGED
@@ -25,7 +25,11 @@ export default app;
25
25
 
26
26
  Run `junior init my-bot` to scaffold a complete project including `vercel.json` for Vercel deployment.
27
27
 
28
- Use `juniorNitro({ plugins: { packages: [...] } })` in `nitro.config.ts` to declare which plugin packages to bundle and load at runtime. Packages with trusted runtime hooks, such as `@sentry/junior-github`, also need to be registered in app code with `createApp({ plugins: [...] })`.
28
+ Use `defineJuniorPlugins([...])` in a runtime-safe plugin module, then point
29
+ `juniorNitro({ plugins: "./plugins" })` at that module. `createApp()` reads the
30
+ same enabled set from Nitro's virtual module. Manifest-only packages use
31
+ package-name strings; trusted factories such as `githubPlugin()` register their
32
+ manifest and in-process hooks together.
29
33
 
30
34
  ## Full docs
31
35
 
@@ -3,5 +3,7 @@ export type { JuniorAppOptions } from "./app";
3
3
  export { initSentry } from "./instrumentation";
4
4
  export { juniorNitro } from "./nitro";
5
5
  export type { JuniorNitroOptions } from "./nitro";
6
+ export { defineJuniorPlugins } from "./plugins";
7
+ export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "./plugins";
6
8
  export { juniorVercelConfig } from "./vercel";
7
9
  export type { JuniorVercelConfigOptions } from "./vercel";
package/dist/app.d.ts CHANGED
@@ -1,18 +1,13 @@
1
1
  import { Hono } from "hono";
2
- import type { PluginConfig } from "@/chat/plugins/types";
3
- import type { JuniorPlugin } from "@sentry/junior-plugin-api";
2
+ import { type JuniorPluginSet } from "@/plugins";
4
3
  import type { WaitUntilFn } from "@/handlers/types";
4
+ export { defineJuniorPlugins } from "@/plugins";
5
+ export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "@/plugins";
5
6
  export interface JuniorAppOptions {
6
7
  /** Install-wide provider defaults (`provider.key` format). Channel overrides take precedence. */
7
8
  configDefaults?: Record<string, unknown>;
8
- /**
9
- * Plugin packages/overrides, or trusted plugin instances loaded by this app.
10
- *
11
- * Use `PluginConfig` for declarative package lists and manifest overrides.
12
- * Use `JuniorPlugin[]` for trusted plugin factories such as `githubPlugin()`;
13
- * their package config is merged with the catalog bundled by `juniorNitro()`.
14
- */
15
- plugins?: PluginConfig | JuniorPlugin[];
9
+ /** Direct plugin set override. Usually omitted when `juniorNitro()` uses a plugin module. */
10
+ plugins?: JuniorPluginSet;
16
11
  waitUntil?: WaitUntilFn;
17
12
  }
18
13
  /** Create a Hono app with all Junior routes. */