@arirocha/openrisk-client 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +22 -10
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,21 +1,33 @@
1
- # openrisk-client
1
+ # @arirocha/openrisk-client
2
2
 
3
- To install dependencies:
3
+ Browser SDK for OpenRisk. Collects client signals and sends them to your OpenRisk ingest endpoint.
4
+
5
+ ## Install
4
6
 
5
7
  ```bash
6
- bun install
8
+ npm i @arirocha/openrisk-client
7
9
  ```
8
10
 
9
- To run tests:
11
+ ## Usage
10
12
 
11
- ```bash
12
- bun test
13
+ ```ts
14
+ import { OpenRiskClient } from "@arirocha/openrisk-client";
15
+
16
+ const client = new OpenRiskClient({
17
+ projectKey: "pk_test",
18
+ endpoint: "https://your-server.com/ingest",
19
+ debug: true,
20
+ });
13
21
  ```
14
22
 
15
- To build:
23
+ ## Browser bundle
16
24
 
17
- ```bash
18
- bun run build
25
+ If you prefer a plain browser import:
26
+
27
+ ```ts
28
+ import { OpenRiskClient } from "@arirocha/openrisk-client/browser";
19
29
  ```
20
30
 
21
- This project was created using `bun init` in bun v1.3.1. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
31
+ ## Repo
32
+
33
+ OpenRisk monorepo: https://github.com/ari-rocha/openrisk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arirocha/openrisk-client",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",