@rasputin-ai/node 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 ADDED
@@ -0,0 +1,33 @@
1
+ # Official Rasputin AI SDK for Node
2
+
3
+ ## Usage
4
+
5
+ ```ts
6
+ import { RasputinInit } from '@rasputin-ai/node';
7
+
8
+ const rasputin = RasputinInit({
9
+ projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
10
+ environment: process.env.NODE_ENV ?? 'development',
11
+ release: process.env.GIT_COMMIT,
12
+ });
13
+
14
+ try {
15
+ // ...
16
+ } catch (error) {
17
+ rasputin.captureException(error);
18
+ }
19
+ ```
20
+
21
+ Call `RasputinInit` once at process startup. Uncaught errors and unhandled rejections are captured automatically.
22
+
23
+ For short-lived processes (scripts, serverless), call `await rasputin.flush()` before exit.
24
+
25
+ ## Options
26
+
27
+ | Field | Required | Description |
28
+ | --- | --- | --- |
29
+ | `projectApiKey` | yes | Project API key from the Rasputin dashboard |
30
+ | `environment` | yes | Where errors occur, e.g. `production`, `staging` |
31
+ | `release` | no | Deploy id (usually a git SHA). Auto-detected from common CI env vars when omitted |
32
+ | `enabled` | no | Master switch. Default `true` |
33
+ | `repoRoot` | no | Repo root for stack paths. |
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ import {
53
53
 
54
54
  // src/sdk-meta.ts
55
55
  var SDK_NAME = "@rasputin-ai/node";
56
- var SDK_VERSION = "0.1.2";
56
+ var SDK_VERSION = "0.1.3";
57
57
 
58
58
  // src/rasputin-init.ts
59
59
  var RasputinInit = (options) => {
@@ -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/node";
3
- export declare const SDK_VERSION = "0.1.2";
3
+ export declare const SDK_VERSION = "0.1.3";
4
4
  //# sourceMappingURL=sdk-meta.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@rasputin-ai/node",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
+ "description": "Official Rasputin AI SDK for Node and Bun.",
4
5
  "type": "module",
5
6
  "exports": {
6
7
  ".": {
@@ -25,7 +26,7 @@
25
26
  "access": "public"
26
27
  },
27
28
  "dependencies": {
28
- "@rasputin-ai/core": "0.1.2"
29
+ "@rasputin-ai/core": "0.1.3"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@rasputin-ai/core": "workspace:*",