@rasputin-ai/sveltekit 0.10.2 → 0.11.1
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/dist/runtime/node.d.ts.map +1 -1
- package/dist/runtime/node.js +21 -7
- package/dist/sdk-meta.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/runtime/node.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/runtime/node.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAW7D,OAAO,KAAK,EACX,aAAa,EAKb,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAsK3D;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,wBAAwB,GAAG,aAAa,CAAC"}
|
package/dist/runtime/node.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isClientEnabled
|
|
6
6
|
} from "@rasputin-ai/core";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
bindAdaptiveRecorder,
|
|
9
9
|
inertErrorObservation,
|
|
10
10
|
installAutomaticExecutionRuntime,
|
|
11
11
|
installGlobalHandlers,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
|
|
15
15
|
// src/sdk-meta.ts
|
|
16
16
|
var SDK_NAME = "@rasputin-ai/sveltekit";
|
|
17
|
-
var SDK_VERSION = "0.
|
|
17
|
+
var SDK_VERSION = "0.11.1";
|
|
18
18
|
|
|
19
19
|
// src/runtime/node.ts
|
|
20
20
|
var inertScope = () => ({
|
|
@@ -45,7 +45,7 @@ var publicScope = (runtime, request) => {
|
|
|
45
45
|
return inertScope();
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
var bindClient = (client, runtime, installRuntime, manifest, uninstallHandlers) => {
|
|
48
|
+
var bindClient = (client, runtime, installRuntime, manifest, uninstallHandlers, policy) => {
|
|
49
49
|
const uninstallRuntime = installRuntime ? installAutomaticExecutionRuntime(runtime) : () => {
|
|
50
50
|
};
|
|
51
51
|
const manifestUpload = scheduleInstrumentationManifestUpload({
|
|
@@ -58,6 +58,7 @@ var bindClient = (client, runtime, installRuntime, manifest, uninstallHandlers)
|
|
|
58
58
|
uninstallRuntime();
|
|
59
59
|
manifestUpload.disconnect();
|
|
60
60
|
const startedAt = Date.now();
|
|
61
|
+
await policy?.close();
|
|
61
62
|
await client.close();
|
|
62
63
|
await manifestUpload.wait(Math.max(0, 2e3 - (Date.now() - startedAt)));
|
|
63
64
|
};
|
|
@@ -73,9 +74,11 @@ var bindClient = (client, runtime, installRuntime, manifest, uninstallHandlers)
|
|
|
73
74
|
const startedAt = Date.now();
|
|
74
75
|
await client.flush(timeoutMs);
|
|
75
76
|
if (timeoutMs === void 0) {
|
|
77
|
+
await policy?.flush();
|
|
76
78
|
await manifestUpload.wait();
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
81
|
+
await policy?.flush(Math.max(0, timeoutMs - (Date.now() - startedAt)));
|
|
79
82
|
await manifestUpload.wait(Math.max(0, timeoutMs - (Date.now() - startedAt)));
|
|
80
83
|
},
|
|
81
84
|
close: shutdown
|
|
@@ -86,9 +89,19 @@ var bindClient = (client, runtime, installRuntime, manifest, uninstallHandlers)
|
|
|
86
89
|
var createBoundRuntime = (options, hooks, capture) => {
|
|
87
90
|
const enabled = capture && isClientEnabled(options);
|
|
88
91
|
const recorderEnabled = enabled && options.executionRecorder?.enabled !== false;
|
|
89
|
-
const runtime =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
const { runtime, policy } = bindAdaptiveRecorder({
|
|
93
|
+
executionRecorder: options.executionRecorder,
|
|
94
|
+
recorderEnabled,
|
|
95
|
+
dsn: options.dsn,
|
|
96
|
+
projectApiKey: options.projectApiKey,
|
|
97
|
+
apiUrl: options.apiUrl,
|
|
98
|
+
release: options.release,
|
|
99
|
+
environment: options.environment,
|
|
100
|
+
fetch: hooks.fetch,
|
|
101
|
+
enabled: options.enabled === false || !capture ? false : options.enabled,
|
|
102
|
+
sdkName: SDK_NAME,
|
|
103
|
+
sdkVersion: SDK_VERSION,
|
|
104
|
+
scrubPII: options.scrubPII
|
|
92
105
|
});
|
|
93
106
|
const client = createClient(
|
|
94
107
|
{ ...options, enabled },
|
|
@@ -118,7 +131,8 @@ var createBoundRuntime = (options, hooks, capture) => {
|
|
|
118
131
|
sourceRoots: options.sourceRoots,
|
|
119
132
|
logSuccess: options.logSuccess
|
|
120
133
|
},
|
|
121
|
-
() => uninstallHandlers()
|
|
134
|
+
() => uninstallHandlers(),
|
|
135
|
+
policy
|
|
122
136
|
);
|
|
123
137
|
if (enabled && (hooks.installGlobalHandlers ?? options.installGlobalHandlers) === true) {
|
|
124
138
|
uninstallHandlers = installGlobalHandlers(bound.client);
|
package/dist/sdk-meta.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/sveltekit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Official Rasputin AI SDK for SvelteKit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@rasputin-ai/browser": "0.
|
|
46
|
-
"@rasputin-ai/core": "0.
|
|
47
|
-
"@rasputin-ai/node": "0.
|
|
45
|
+
"@rasputin-ai/browser": "0.11.1",
|
|
46
|
+
"@rasputin-ai/core": "0.11.1",
|
|
47
|
+
"@rasputin-ai/node": "0.11.1",
|
|
48
48
|
"typescript": "5"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|