@introspection-sdk/introspection-browser 0.4.5 → 0.4.7
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/.turbo/turbo-build.log +1 -1
- package/README.md +32 -0
- package/package.json +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @introspection-sdk/introspection-browser@0.4.
|
|
2
|
+
> @introspection-sdk/introspection-browser@0.4.7 build /home/runner/work/introspection-js-sdk/introspection-js-sdk/packages/introspection-browser
|
|
3
3
|
> tsc
|
|
4
4
|
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @introspection-sdk/introspection-browser
|
|
2
|
+
|
|
3
|
+
Browser SDK for [Introspection](https://introspection.dev) — track events, feedback, and user identity with localStorage persistence.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
pnpm add @introspection-sdk/introspection-browser
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { IntrospectionClient } from "@introspection-sdk/introspection-browser";
|
|
15
|
+
|
|
16
|
+
const client = new IntrospectionClient({
|
|
17
|
+
token: "intro_xxx",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Set identity once
|
|
21
|
+
client.identify("user_123", { email: "user@example.com" });
|
|
22
|
+
|
|
23
|
+
// Track events
|
|
24
|
+
client.track("Button Clicked", { buttonId: "submit" });
|
|
25
|
+
|
|
26
|
+
// Track feedback
|
|
27
|
+
client.feedback("thumbs_up", { comments: "Very helpful response" });
|
|
28
|
+
client.feedback("thumbs_down", {
|
|
29
|
+
responseId: "msg_123",
|
|
30
|
+
comments: "Off topic",
|
|
31
|
+
});
|
|
32
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@introspection-sdk/introspection-browser",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Introspection observability SDK for the browser",
|
|
6
6
|
"engines": {
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"@types/node": "^22.19.19",
|
|
20
20
|
"eslint": "^9.39.4",
|
|
21
21
|
"typescript": "5.9.3",
|
|
22
|
-
"@repo/
|
|
23
|
-
"@repo/
|
|
22
|
+
"@repo/typescript-config": "0.0.0",
|
|
23
|
+
"@repo/eslint-config": "0.0.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@opentelemetry/api": "^1.9.1",
|
|
27
27
|
"@opentelemetry/api-logs": "^0.218.0",
|
|
28
28
|
"@opentelemetry/sdk-logs": "^0.218.0",
|
|
29
29
|
"@opentelemetry/exporter-logs-otlp-http": "^0.218.0",
|
|
30
|
-
"@introspection-sdk/types": "0.4.
|
|
30
|
+
"@introspection-sdk/types": "0.4.7"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"lint": "eslint . --max-warnings 0",
|