0.0.16 • Published 2 years ago

skunk-works v0.0.16

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Session Recorder

Record list:

  • DOM mutation
  • Network(xhr, fetch, beacon)
  • Global Error, Unhandled rejection
  • Mouse, Scroll
  • Console

Output like:

[
  {"t": 0, "type": "snapshot", "snapshot": "#document snapshot", "scroll": ... },
  { "t": 1, "type": "node", "add": [{ "html": "<div id>textContent</div>" }], "target": 6 },
  { "t": 2, "type": "form", "target": 16, "k": "value", "v": "2312" },
  { "t": 3, "type": "attr", "target": 14, "attr": { "k": "class", "v": "a" } },
  { "t": 4, "type": "scroll", "x": 0, "y": 10 },
  { "t": 5, "type": "click", "x": 71, "y": 13 },
  { "t": 6, "type": "form", "target": 19, "k": "checked", "v": true },
  { "t": 7, "type": "jserr", "msg": "Type Error: ...", "url": "...", "err": "..." },
  { "t": 8, "type": "xhr", "url": "...", "method": "GET", "response": "21asdcxz" },
  { "t": 9, "type": "fetch", "status": 503, "response": "21asdcxz" },
  { "t": 10, "type": "move", "x": 38, "y": 510 },
  { "t": 11, "type": "console", "l": "warn", "msg": "..." }
]

Code intergration:

import SessionRecorder from 'session-recorder'

const myRecorder = new SessionRecorder(destinationLink: string)

myRecorder.start() // make sure start after DOMContentLoaded
myRecorder.sendRecording()
myRecorder.end() // stop record

TODO

  • Use VDOM record mutation
  • Using WebWorker store trail data

Build Setup

# serve file with hot reload at http://localhost:8000
npm run dev

# build with tsc, complie into ESModule
npm run build

Document (constructing)

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.1

2 years ago