@rasputin-ai/core 0.1.2

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.
Files changed (52) hide show
  1. package/dist/announce-deploy/announce-deploy.d.ts +19 -0
  2. package/dist/announce-deploy/announce-deploy.d.ts.map +1 -0
  3. package/dist/create-client/create-client-types.d.ts +110 -0
  4. package/dist/create-client/create-client-types.d.ts.map +1 -0
  5. package/dist/create-client/create-client.d.ts +9 -0
  6. package/dist/create-client/create-client.d.ts.map +1 -0
  7. package/dist/create-client/is-client-enabled.d.ts +5 -0
  8. package/dist/create-client/is-client-enabled.d.ts.map +1 -0
  9. package/dist/create-client/resolve-endpoint-urls.d.ts +7 -0
  10. package/dist/create-client/resolve-endpoint-urls.d.ts.map +1 -0
  11. package/dist/create-ingest-event/create-ingest-event-types.d.ts +47 -0
  12. package/dist/create-ingest-event/create-ingest-event-types.d.ts.map +1 -0
  13. package/dist/create-ingest-event/create-ingest-event.d.ts +9 -0
  14. package/dist/create-ingest-event/create-ingest-event.d.ts.map +1 -0
  15. package/dist/create-ingest-event/finalize-resolution.d.ts +4 -0
  16. package/dist/create-ingest-event/finalize-resolution.d.ts.map +1 -0
  17. package/dist/detect-release/detect-release.d.ts +13 -0
  18. package/dist/detect-release/detect-release.d.ts.map +1 -0
  19. package/dist/index.d.ts +18 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +1013 -0
  22. package/dist/normalize-frames/normalize-frames.d.ts +24 -0
  23. package/dist/normalize-frames/normalize-frames.d.ts.map +1 -0
  24. package/dist/parse-stack/parse-stack.d.ts +4 -0
  25. package/dist/parse-stack/parse-stack.d.ts.map +1 -0
  26. package/dist/parse-stack/raw-frame.d.ts +8 -0
  27. package/dist/parse-stack/raw-frame.d.ts.map +1 -0
  28. package/dist/resolve-source-maps/resolve-source-maps.d.ts +7 -0
  29. package/dist/resolve-source-maps/resolve-source-maps.d.ts.map +1 -0
  30. package/dist/resolve-source-maps/resolved-frame.d.ts +25 -0
  31. package/dist/resolve-source-maps/resolved-frame.d.ts.map +1 -0
  32. package/dist/sdk-meta.d.ts +4 -0
  33. package/dist/sdk-meta.d.ts.map +1 -0
  34. package/dist/suppression/compute-burst-key.d.ts +7 -0
  35. package/dist/suppression/compute-burst-key.d.ts.map +1 -0
  36. package/dist/suppression/create-suppression.d.ts +12 -0
  37. package/dist/suppression/create-suppression.d.ts.map +1 -0
  38. package/dist/suppression/identity-needs-message-template.d.ts +6 -0
  39. package/dist/suppression/identity-needs-message-template.d.ts.map +1 -0
  40. package/dist/suppression/parameterize-message.d.ts +2 -0
  41. package/dist/suppression/parameterize-message.d.ts.map +1 -0
  42. package/dist/suppression/suppression-types.d.ts +46 -0
  43. package/dist/suppression/suppression-types.d.ts.map +1 -0
  44. package/dist/transport/create-transport.d.ts +3 -0
  45. package/dist/transport/create-transport.d.ts.map +1 -0
  46. package/dist/transport/send-batch.d.ts +19 -0
  47. package/dist/transport/send-batch.d.ts.map +1 -0
  48. package/dist/transport/transport-queue.d.ts +9 -0
  49. package/dist/transport/transport-queue.d.ts.map +1 -0
  50. package/dist/transport/transport-types.d.ts +53 -0
  51. package/dist/transport/transport-types.d.ts.map +1 -0
  52. package/package.json +40 -0
@@ -0,0 +1,19 @@
1
+ import type { TransportFetch } from '../transport/transport-types';
2
+ type AnnounceDeployOptions = {
3
+ /** Full URL for `POST /deploy` (apps/api post-deploy.handler). */
4
+ deployUrl: string;
5
+ projectApiKey: string;
6
+ environment: string;
7
+ /** Commit SHA / release. Skips the request when missing. */
8
+ release?: string | null;
9
+ /** When false, no-op. Default true. */
10
+ enabled?: boolean;
11
+ fetch?: TransportFetch;
12
+ };
13
+ /**
14
+ * Fire-and-forget deploy announcement so clean releases still land in `deploys`.
15
+ * Never throws — init must not crash the host app on network failure.
16
+ */
17
+ export declare const announceDeploy: (options: AnnounceDeployOptions) => Promise<"ok" | "skipped" | "failed">;
18
+ export {};
19
+ //# sourceMappingURL=announce-deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announce-deploy.d.ts","sourceRoot":"","sources":["../../src/announce-deploy/announce-deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,KAAK,qBAAqB,GAAG;IAC5B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAC1B,SAAS,qBAAqB,KAC5B,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAyBrC,CAAC"}
@@ -0,0 +1,110 @@
1
+ import type { RequestContext } from '../create-ingest-event/create-ingest-event-types';
2
+ import type { TransportFetch } from '../transport/transport-types';
3
+ /**
4
+ * Options passed to `RasputinInit` / `createClient`.
5
+ *
6
+ * Typical setup — call once at startup, then let the SDK capture errors for you:
7
+ *
8
+ * ```ts
9
+ * RasputinInit({
10
+ * projectApiKey: 'rp_…', // from your Rasputin project settings
11
+ * environment: 'production', // e.g. production | staging | preview
12
+ * release: process.env.GIT_SHA, // optional — auto-detected from CI env when omitted
13
+ * });
14
+ * ```
15
+ */
16
+ export type RasputinOptions = {
17
+ /** Project API key from the Rasputin dashboard. Required to send events. */
18
+ projectApiKey: string;
19
+ /**
20
+ * Where the error happened — e.g. `production`, `staging`, `preview`.
21
+ * Shown in the UI and used when grouping errors.
22
+ */
23
+ environment: string;
24
+ /**
25
+ * Deploy identifier, usually a git commit SHA.
26
+ * Links errors to a release so you can see what shipped when something broke.
27
+ *
28
+ * When omitted, Rasputin reads common CI env vars (`VERCEL_GIT_COMMIT_SHA`,
29
+ * `GIT_COMMIT`, etc.). Set explicitly if auto-detection does not match your setup.
30
+ */
31
+ release?: string | null;
32
+ /**
33
+ * Master on/off switch. When `false`, nothing is captured or sent.
34
+ * Useful for local dev or tests without removing init code.
35
+ *
36
+ * @default true
37
+ */
38
+ enabled?: boolean;
39
+ apiUrl?: string;
40
+ /**
41
+ * Root of your app on disk. Stack traces are trimmed to paths relative to this
42
+ * (e.g. `src/routes/users.ts` instead of `/app/src/routes/users.ts`).
43
+ *
44
+ * In a monorepo, pass the **repository root**, not the package directory, so
45
+ * paths line up with GitHub.
46
+ *
47
+ * @default `process.cwd()`
48
+ */
49
+ repoRoot?: string;
50
+ };
51
+ /**
52
+ * Extra context for a captured error.
53
+ * Framework plugins (Elysia, etc.) fill `request` automatically for route failures.
54
+ */
55
+ export type CaptureContext = {
56
+ /**
57
+ * HTTP details for API errors. Pass manually in `try/catch` when you handle
58
+ * a request yourself; omit for background jobs and scripts.
59
+ */
60
+ request?: RequestContext;
61
+ };
62
+ /**
63
+ * Client returned by `RasputinInit` / `createClient`.
64
+ *
65
+ * Most apps only need `captureException` in `try/catch`. Uncaught errors and
66
+ * framework route failures are handled by the Node/Elysia integrations.
67
+ * Events are sent in the background — you do not need to call `flush` on every error.
68
+ */
69
+ export type RasputinClient = {
70
+ /**
71
+ * Report an error to Rasputin.
72
+ *
73
+ * Safe to call from `try/catch` or anywhere you handle failures manually.
74
+ * Never throws. Duplicate bursts are deduplicated server-side.
75
+ *
76
+ * @param error — `Error`, rejected value, or any thrown value
77
+ * @param context — optional HTTP context (`method`, route pattern, status)
78
+ */
79
+ captureException: (error: unknown, context?: CaptureContext) => void;
80
+ /**
81
+ * Wait for queued events to be sent now.
82
+ *
83
+ * **When you need this:** short-lived processes (scripts, CLI, serverless)
84
+ * that may exit before the background sender runs. Call before `process.exit`
85
+ * or at the end of a Lambda handler.
86
+ *
87
+ * **When you can skip this:** long-running servers — events flush automatically
88
+ * every few seconds and on shutdown signals.
89
+ *
90
+ * @param timeoutMs — max time to wait for the API (including retries). Default `10000`.
91
+ * Use a low value (e.g. `300`) in serverless so you do not block the response.
92
+ */
93
+ flush: (timeoutMs?: number) => Promise<void>;
94
+ /**
95
+ * Flush pending events and shut down the background sender.
96
+ *
97
+ * Call on graceful shutdown (SIGTERM, server `close`, test teardown).
98
+ * After `close`, the client stops sending — create a new client if you restart.
99
+ */
100
+ close: () => Promise<void>;
101
+ };
102
+ /** Test / internal seams — second arg to createClient, not part of the public init API. */
103
+ export type CreateClientHooks = {
104
+ fetch?: TransportFetch;
105
+ announceDeploy?: boolean;
106
+ installTransportSignalHandlers?: boolean;
107
+ sdkVersion?: string;
108
+ sdkName?: string;
109
+ };
110
+ //# sourceMappingURL=create-client-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-client-types.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B;;;;;;;;OAQG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAErE;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;;;;OAKG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B,CAAC;AAEF,2FAA2F;AAC3F,MAAM,MAAM,iBAAiB,GAAG;IAC/B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { CreateClientHooks, RasputinClient, RasputinOptions } from './create-client-types';
2
+ /** Reset per-process warning state (for testing only). */
3
+ export declare const resetSourceMapWarnings: () => void;
4
+ /**
5
+ * Wire parse → suppress (generated frames) → queue.
6
+ * At flush: resolve source maps → re-normalize → rewrite stack_frames + resolution.
7
+ */
8
+ export declare const createClient: (options: RasputinOptions, hooks?: CreateClientHooks) => RasputinClient;
9
+ //# sourceMappingURL=create-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-client.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAuBhG,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,YAGlC,CAAC;AAwBF;;;GAGG;AACH,eAAO,MAAM,YAAY,GACxB,SAAS,eAAe,EACxB,QAAO,iBAAsB,KAC3B,cA8GF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { RasputinClient, RasputinOptions } from './create-client-types';
2
+ /** `enabled: false` or blank API key → fully inert. */
3
+ export declare const isClientEnabled: (options: Pick<RasputinOptions, "enabled">) => boolean;
4
+ export declare const noopClient: () => RasputinClient;
5
+ //# sourceMappingURL=is-client-enabled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-client-enabled.d.ts","sourceRoot":"","sources":["../../src/create-client/is-client-enabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7E,uDAAuD;AACvD,eAAO,MAAM,eAAe,GAAI,SAAS,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,KAAG,OACpD,CAAC;AAEzB,eAAO,MAAM,UAAU,QAAO,cAI5B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Production ingest API origin. Override via `apiUrl` for local / self-hosted. */
2
+ export declare const DEFAULT_API_URL = "https://rasputin-api.fly.dev";
3
+ export declare const resolveEndpointUrls: (apiUrl?: string) => {
4
+ ingestUrl: string;
5
+ deployUrl: string;
6
+ };
7
+ //# sourceMappingURL=resolve-endpoint-urls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-endpoint-urls.d.ts","sourceRoot":"","sources":["../../src/create-client/resolve-endpoint-urls.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,eAAO,MAAM,eAAe,iCAAiC,CAAC;AAE9D,eAAO,MAAM,mBAAmB,GAAI,eAAwB;;;CAM3D,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { Frame } from '../normalize-frames/normalize-frames';
2
+ export type IngestOrigin = 'server' | 'client';
3
+ export type FrameResolution = 'exact' | 'partial' | 'none';
4
+ /** Wire stack frame — matches apps/api ingest StackFrame. */
5
+ export type IngestStackFrame = {
6
+ filename: string;
7
+ function?: string;
8
+ lineno?: number;
9
+ colno?: number;
10
+ in_app: boolean;
11
+ };
12
+ /** Wire event — matches apps/api ingest IngestEvent. */
13
+ export type IngestEvent = {
14
+ type: string;
15
+ message: string;
16
+ stack_frames: IngestStackFrame[];
17
+ code?: string | null;
18
+ occurred_at: string;
19
+ environment: string;
20
+ origin: IngestOrigin;
21
+ /** Whether stack frames were source-map resolved before send. */
22
+ resolution?: FrameResolution;
23
+ release?: string | null;
24
+ request?: {
25
+ method?: string | null;
26
+ route?: string | null;
27
+ status?: number | null;
28
+ };
29
+ };
30
+ export type RequestContext = {
31
+ method?: string | null;
32
+ /** Route pattern (`/users/:id`), never a resolved URL with IDs. */
33
+ route?: string | null;
34
+ status?: number | null;
35
+ };
36
+ export type CreateIngestEventInput = {
37
+ error: unknown;
38
+ frames: Frame[];
39
+ environment: string;
40
+ resolution: FrameResolution;
41
+ release?: string | null;
42
+ request?: RequestContext;
43
+ origin: IngestOrigin;
44
+ occurredAt?: Date | string;
45
+ code?: string | null;
46
+ };
47
+ //# sourceMappingURL=create-ingest-event-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-ingest-event-types.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/create-ingest-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAElE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,iEAAiE;IACjE,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Frame } from '../normalize-frames/normalize-frames';
2
+ import type { CreateIngestEventInput, FrameResolution, IngestEvent, IngestStackFrame } from './create-ingest-event-types';
3
+ export declare const MAX_STACK_FRAMES = 50;
4
+ export declare const framesToStackFrames: (frames: Frame[]) => IngestStackFrame[];
5
+ /** Rewrite stack frames + resolution after flush-time source-map resolution. */
6
+ export declare const withResolvedFrames: (event: IngestEvent, frames: Frame[], resolution: FrameResolution) => IngestEvent;
7
+ /** Build a wire-ready ingest event from a captured error + normalized frames. */
8
+ export declare const createIngestEvent: (input: CreateIngestEventInput) => IngestEvent;
9
+ //# sourceMappingURL=create-ingest-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-ingest-event.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/create-ingest-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EACX,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,gBAAgB,EAEhB,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAuDnC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,KAAK,EAAE,KAAG,gBAAgB,EAIP,CAAC;AAEhE,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,GAC9B,OAAO,WAAW,EAClB,QAAQ,KAAK,EAAE,EACf,YAAY,eAAe,KACzB,WAID,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,KAAG,WA4BjE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { FrameResolution, IngestStackFrame } from './create-ingest-event-types';
2
+ /** Downgrade confident-but-unusable source-map resolution before send. */
3
+ export declare const finalizeResolution: (resolution: FrameResolution, stackFrames: IngestStackFrame[]) => FrameResolution;
4
+ //# sourceMappingURL=finalize-resolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finalize-resolution.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/finalize-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAQrF,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,GAC9B,YAAY,eAAe,EAC3B,aAAa,gBAAgB,EAAE,KAC7B,eAcF,CAAC"}
@@ -0,0 +1,13 @@
1
+ type DetectReleaseOptions = {
2
+ /** Explicit release (e.g. from RasputinInit). Wins over env when non-empty. */
3
+ release?: string | null;
4
+ /** Defaults to `process.env` — override in tests. */
5
+ env?: Record<string, string | undefined>;
6
+ };
7
+ /**
8
+ * Resolve the deploy release / commit SHA.
9
+ * Order: explicit option → platform env vars → generic git env vars → undefined (warns).
10
+ */
11
+ export declare const detectRelease: (options?: DetectReleaseOptions) => string | undefined;
12
+ export {};
13
+ //# sourceMappingURL=detect-release.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-release.d.ts","sourceRoot":"","sources":["../../src/detect-release/detect-release.ts"],"names":[],"mappings":"AAAA,KAAK,oBAAoB,GAAG;IAC3B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACzC,CAAC;AAYF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,UAAS,oBAAyB,KAAG,MAAM,GAAG,SAiB3E,CAAC"}
@@ -0,0 +1,18 @@
1
+ export { announceDeploy } from './announce-deploy/announce-deploy';
2
+ export { createClient } from './create-client/create-client';
3
+ export type { CaptureContext, RasputinClient, RasputinOptions, } from './create-client/create-client-types';
4
+ export { isClientEnabled } from './create-client/is-client-enabled';
5
+ export { createIngestEvent } from './create-ingest-event/create-ingest-event';
6
+ export type { RequestContext } from './create-ingest-event/create-ingest-event-types';
7
+ export { detectRelease } from './detect-release/detect-release';
8
+ export type { Frame } from './normalize-frames/normalize-frames';
9
+ export { normalizeFrames } from './normalize-frames/normalize-frames';
10
+ export { parseStack } from './parse-stack/parse-stack';
11
+ export type { RawFrame } from './parse-stack/raw-frame';
12
+ export { resolveSourceMaps } from './resolve-source-maps/resolve-source-maps';
13
+ export type { ResolvedFrame, ResolveSourceMapsResult, } from './resolve-source-maps/resolved-frame';
14
+ export { createSuppression } from './suppression/create-suppression';
15
+ export type { CreateSuppressionOptions, IngestSummary, PrepareSummaryFrames, SummaryIdentity, SuppressionDecideInput, SuppressionDecideResult, } from './suppression/suppression-types';
16
+ export { createTransport } from './transport/create-transport';
17
+ export type { CreateTransportOptions, Transport, TransportPriority, } from './transport/transport-types';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,YAAY,EACX,cAAc,EACd,cAAc,EACd,eAAe,GACf,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,YAAY,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EACX,aAAa,EACb,uBAAuB,GACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,YAAY,EACX,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EACX,sBAAsB,EACtB,SAAS,EACT,iBAAiB,GACjB,MAAM,6BAA6B,CAAC"}