@rasputin-ai/elysia 0.1.3 → 0.2.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 +5 -5
- package/dist/index.js +1 -1
- package/dist/rasputin-init.d.ts +6 -1
- package/dist/rasputin-init.d.ts.map +1 -1
- package/dist/sdk-meta.d.ts +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -9,7 +9,8 @@ import { RasputinInit } from '@rasputin-ai/elysia';
|
|
|
9
9
|
const { client, plugin } = RasputinInit({
|
|
10
10
|
projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
|
|
11
11
|
environment: process.env.NODE_ENV ?? 'development',
|
|
12
|
-
release: process.env.
|
|
12
|
+
release: process.env.RASPUTIN_RELEASE,
|
|
13
|
+
moduleUrl: import.meta.url,
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
const app = new Elysia().use(plugin);
|
|
@@ -21,12 +22,11 @@ For short-lived processes, call `await client.flush()` before exit.
|
|
|
21
22
|
|
|
22
23
|
## Options
|
|
23
24
|
|
|
24
|
-
Same as `@rasputin-ai/node`:
|
|
25
|
-
|
|
26
25
|
| Field | Required | Description |
|
|
27
26
|
| --- | --- | --- |
|
|
28
27
|
| `projectApiKey` | yes | Project API key from the Rasputin dashboard |
|
|
29
28
|
| `environment` | yes | Where errors occur, e.g. `production`, `staging` |
|
|
30
|
-
| `release` | no |
|
|
29
|
+
| `release` | no | Git commit SHA. Prefer `process.env.RASPUTIN_RELEASE`; auto-detected from platform env / `.git` when omitted |
|
|
31
30
|
| `enabled` | no | Master switch. Default `true` |
|
|
32
|
-
| `
|
|
31
|
+
| `moduleUrl` | one of these two | `import.meta.url` from the file where you call `RasputinInit`. Lets Rasputin find your project folder. |
|
|
32
|
+
| `repoRoot` | one of these two | Your project folder — the one you open in your editor. Use this when `moduleUrl` isn't enough (for example in Docker). |
|
package/dist/index.js
CHANGED
package/dist/rasputin-init.d.ts
CHANGED
|
@@ -47,7 +47,12 @@ declare const buildPlugin: (client: RasputinClient) => Elysia<"", {
|
|
|
47
47
|
* Boot Rasputin for Elysia: process handlers + request `onError` plugin.
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
|
-
* const { client, plugin } = RasputinInit(
|
|
50
|
+
* const { client, plugin } = RasputinInit({
|
|
51
|
+
* projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
|
|
52
|
+
* environment: process.env.NODE_ENV ?? 'development',
|
|
53
|
+
* release: process.env.RASPUTIN_RELEASE,
|
|
54
|
+
* moduleUrl: import.meta.url,
|
|
55
|
+
* });
|
|
51
56
|
* app.use(plugin);
|
|
52
57
|
* client.captureException(err); // manual capture
|
|
53
58
|
* await client.flush(); // serverless shutdown
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rasputin-init.d.ts","sourceRoot":"","sources":["../src/rasputin-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,oBAAoB,CAAC;CAC7B,CAAC;AAEF,+DAA+D;AAC/D,KAAK,mBAAmB,GAAG;IAC1B,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,iEAAiE;IACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAWF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvC,CAAC;AAEL
|
|
1
|
+
{"version":3,"file":"rasputin-init.d.ts","sourceRoot":"","sources":["../src/rasputin-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,oBAAoB,CAAC;CAC7B,CAAC;AAEF,+DAA+D;AAC/D,KAAK,mBAAmB,GAAG;IAC1B,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,iEAAiE;IACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAWF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvC,CAAC;AAEL;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GACxB,SAAS,eAAe,EACxB,QAAO,mBAAwB,KAC7B,cA0BF,CAAC"}
|
package/dist/sdk-meta.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/elysia",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Official Rasputin AI SDK for Elysia.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"bun": "./src/index.ts",
|
|
9
8
|
"types": "./dist/index.d.ts",
|
|
10
9
|
"import": "./dist/index.js",
|
|
11
10
|
"default": "./dist/index.js"
|
|
@@ -26,8 +25,8 @@
|
|
|
26
25
|
"access": "public"
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@rasputin-ai/core": "0.
|
|
30
|
-
"@rasputin-ai/node": "0.
|
|
28
|
+
"@rasputin-ai/core": "0.2.0",
|
|
29
|
+
"@rasputin-ai/node": "0.2.0"
|
|
31
30
|
},
|
|
32
31
|
"peerDependencies": {
|
|
33
32
|
"elysia": ">=1.0.0"
|