caelum0x dbef356e6e feat(analytics-sdk): @railyard/analytics-js (web + Expo) and @railyard/analytics-node wrappers, tested with the unmodified SDKs (A1)
- analytics-js wraps posthog-js 1.435.1 and posthog-react-native 4.78.2:
  reads NEXT_PUBLIC_/EXPO_PUBLIC_/VITE_ANALYTICS_SITE and _HOST, waits for
  consent (no client, no storage, no request before it), masks all inputs,
  [data-private]/.ph-mask text, blocks [data-block], no canvas, headers or
  bodies; Expo entry keeps the queue on the device and sends $screen per
  route change (screenTracker).
- analytics-node wraps posthog-node 5.54.1.
- test/a1: posthog-node (gzip), posthog-js under jsdom, one Chromium run
  (cached 1243, full build in new headless mode), React Native offline for
  10 minutes plus a restart and a lost response: every event stored once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 03:58:53 +03:00

51 lines
1.1 KiB
JSON

{
"name": "@railyard/analytics-js",
"version": "0.1.0",
"description": "Event analytics for web and Expo apps on Railyard: capture, identify, groups, screens, consent-first privacy defaults.",
"license": "MIT",
"type": "module",
"main": "./src/index.mjs",
"types": "./src/index.d.ts",
"react-native": "./src/react-native.mjs",
"exports": {
".": {
"types": "./src/index.d.ts",
"react-native": "./src/react-native.mjs",
"default": "./src/index.mjs"
},
"./react-native": {
"types": "./src/react-native.d.ts",
"default": "./src/react-native.mjs"
}
},
"files": [
"src",
"README.md",
"NOTICE",
"LICENSE"
],
"dependencies": {
"posthog-js": "1.435.1",
"posthog-react-native": "4.78.2"
},
"peerDependencies": {
"react": ">=18",
"react-native": ">=0.72"
},
"peerDependenciesMeta": {
"react": {
"optional": true
},
"react-native": {
"optional": true
}
},
"devDependencies": {
"@babel/runtime": "7.28.4",
"react": "18.3.1"
},
"scripts": {
"test": "node --test test/*.test.mjs"
}
}