owlservable 0.1.0 → 0.2.0

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 (3) hide show
  1. package/README.md +9 -5
  2. package/auto.cjs +2 -0
  3. package/package.json +6 -2
package/README.md CHANGED
@@ -30,6 +30,12 @@ import 'owlservable/auto'
30
30
 
31
31
  Every `fetch()`, `http.request()`, and `https.request()` your app makes will appear in the dashboard instantly.
32
32
 
33
+ **CJS projects** (TypeScript compiled to CommonJS, Firebase Functions, etc.) — the same import works, Node resolves the right wrapper automatically:
34
+
35
+ ```js
36
+ import 'owlservable/auto' // or require('owlservable/auto')
37
+ ```
38
+
33
39
  ## Manual init
34
40
 
35
41
  ```js
@@ -45,14 +51,12 @@ init({
45
51
  ## Dashboard
46
52
 
47
53
  - Live request log — method, status, latency, URL
48
- - Color-coded status: green 2xx · yellow 3xx · red 4xx/5xx
49
- - AI token counts for OpenAI, Anthropic, Gemini, Cohere including streaming
50
- - Optional log persistence (1h / 24h / 7d retention)
51
- - Clear logs button wipes memory and the log file
54
+ - AI token counts including streaming
55
+ - Optional 1h / 24h / 7d logs + clear logs
52
56
 
53
57
  ## How it works
54
58
 
55
- On import, `owlservable` monkey-patches `globalThis.fetch`, `node:http`, and `node:https`. Every outbound call passes through a thin wrapper that records timing and metadata, then forwards unchanged. A plain `http.createServer` serves one HTML file. Real-time updates arrive via Server-Sent Events — no WebSockets, no polling.
59
+ On import, `owlservable` monkey-patches `globalThis.fetch`, `node:http`, and `node:https`. Every outbound call passes through a thin wrapper that records timing and metadata, then forwards unchanged. A plain `http.createServer` serves one HTML file. Real-time updates arrive via Server-Sent Events
56
60
 
57
61
  ## Requirements
58
62
 
package/auto.cjs ADDED
@@ -0,0 +1,2 @@
1
+ // CJS wrapper — dynamic import works in CommonJS Node.js
2
+ import('./index.js').then(function(m) { m.init() }).catch(function() {})
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "owlservable",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Minimalist Observability Platform. Zero config, zero dependencies.",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "exports": {
8
8
  ".": "./index.js",
9
- "./auto": "./auto.js"
9
+ "./auto": {
10
+ "import": "./auto.js",
11
+ "require": "./auto.cjs"
12
+ }
10
13
  },
11
14
  "files": [
12
15
  "index.js",
13
16
  "auto.js",
17
+ "auto.cjs",
14
18
  "dashboard.html",
15
19
  "owl.png"
16
20
  ],