@rasputin-ai/elysia 0.1.4 → 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 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.GIT_COMMIT,
12
+ release: process.env.RASPUTIN_RELEASE,
13
+ moduleUrl: import.meta.url,
13
14
  });
14
15
 
15
16
  const app = new Elysia().use(plugin);
@@ -25,6 +26,7 @@ For short-lived processes, call `await client.flush()` before exit.
25
26
  | --- | --- | --- |
26
27
  | `projectApiKey` | yes | Project API key from the Rasputin dashboard |
27
28
  | `environment` | yes | Where errors occur, e.g. `production`, `staging` |
28
- | `release` | no | Deploy id (usually a git SHA). Auto-detected from common CI env vars when omitted |
29
+ | `release` | no | Git commit SHA. Prefer `process.env.RASPUTIN_RELEASE`; auto-detected from platform env / `.git` when omitted |
29
30
  | `enabled` | no | Master switch. Default `true` |
30
- | `repoRoot` | no | Repo root for stack paths. |
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
@@ -8,7 +8,7 @@ import { Elysia } from "elysia";
8
8
 
9
9
  // src/sdk-meta.ts
10
10
  var SDK_NAME = "@rasputin-ai/elysia";
11
- var SDK_VERSION = "0.1.4";
11
+ var SDK_VERSION = "0.2.0";
12
12
 
13
13
  // src/rasputin-init.ts
14
14
  var toStatus = (status) => {
@@ -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(options);
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;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GACxB,SAAS,eAAe,EACxB,QAAO,mBAAwB,KAC7B,cA0BF,CAAC"}
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"}
@@ -1,4 +1,4 @@
1
1
  /** Generated by packages/sdk/scripts/generate-sdk-meta.ts — do not edit. */
2
2
  export declare const SDK_NAME = "@rasputin-ai/elysia";
3
- export declare const SDK_VERSION = "0.1.4";
3
+ export declare const SDK_VERSION = "0.2.0";
4
4
  //# sourceMappingURL=sdk-meta.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasputin-ai/elysia",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "Official Rasputin AI SDK for Elysia.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,8 +25,8 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@rasputin-ai/core": "0.1.4",
29
- "@rasputin-ai/node": "0.1.4"
28
+ "@rasputin-ai/core": "0.2.0",
29
+ "@rasputin-ai/node": "0.2.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "elysia": ">=1.0.0"