@rasputin-ai/elysia 0.1.2 → 0.1.3
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 +32 -0
- package/dist/index.js +1 -1
- package/dist/sdk-meta.d.ts +1 -1
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Official Rasputin AI SDK for Elysia
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { Elysia } from 'elysia';
|
|
7
|
+
import { RasputinInit } from '@rasputin-ai/elysia';
|
|
8
|
+
|
|
9
|
+
const { client, plugin } = RasputinInit({
|
|
10
|
+
projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
|
|
11
|
+
environment: process.env.NODE_ENV ?? 'development',
|
|
12
|
+
release: process.env.GIT_COMMIT,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const app = new Elysia().use(plugin);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Route errors are captured via the plugin. Use `client.captureException(error)` for manual reporting.
|
|
19
|
+
|
|
20
|
+
For short-lived processes, call `await client.flush()` before exit.
|
|
21
|
+
|
|
22
|
+
## Options
|
|
23
|
+
|
|
24
|
+
Same as `@rasputin-ai/node`:
|
|
25
|
+
|
|
26
|
+
| Field | Required | Description |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| `projectApiKey` | yes | Project API key from the Rasputin dashboard |
|
|
29
|
+
| `environment` | yes | Where errors occur, e.g. `production`, `staging` |
|
|
30
|
+
| `release` | no | Deploy id (usually a git SHA). Auto-detected from common CI env vars when omitted |
|
|
31
|
+
| `enabled` | no | Master switch. Default `true` |
|
|
32
|
+
| `repoRoot` | no | Repo root for stack paths. |
|
package/dist/index.js
CHANGED
package/dist/sdk-meta.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/elysia",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Official Rasputin AI SDK for Elysia.",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"exports": {
|
|
6
7
|
".": {
|
|
@@ -25,8 +26,8 @@
|
|
|
25
26
|
"access": "public"
|
|
26
27
|
},
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@rasputin-ai/core": "0.1.
|
|
29
|
-
"@rasputin-ai/node": "0.1.
|
|
29
|
+
"@rasputin-ai/core": "0.1.3",
|
|
30
|
+
"@rasputin-ai/node": "0.1.3"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
33
|
"elysia": ">=1.0.0"
|