{"_id":"@dczy/tie-monitor","_rev":"2-077472bca01ef686779ffe88ed86cac6","name":"@dczy/tie-monitor","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@dczy/tie-monitor","version":"1.0.0","_id":"@dczy/tie-monitor@1.0.0","maintainers":[{"name":"yuk_yao","email":"yuk_yao@163.com"}],"dist":{"shasum":"2e9387fae13b8dc8b91b21bb6367b69c144ccda8","tarball":"https://registry.npmjs.org/@dczy/tie-monitor/-/tie-monitor-1.0.0.tgz","fileCount":18,"integrity":"sha512-7JoTv/VRTcswba/rtFeldez9IJ7EMtj+i3dyx2BL0SSyLGMAbMsUY9xRvXGolHrloVMAVrQgZ2p8+bG8T5rbMQ==","signatures":[{"sig":"MEQCIF+q1EJkzquYZ8AiVLwpk3wcGCaPfnxKxYJHFSCkZRYGAiBcklHhywg5wWSlTxgFy5DTOSWPdFcTKrkeVZ4qJai4vA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18594},"main":"./dist/index.js","type":"module","_from":"file:dczy-tie-monitor-1.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./vue":{"types":"./dist/vue/index.d.ts","import":"./dist/vue/index.js"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js"},"./legacy":{"types":"./dist/legacy/index.d.ts","import":"./dist/legacy/index.js"},"./router":{"types":"./dist/router/index.d.ts","import":"./dist/router/index.js"},"./sentry":{"types":"./dist/sentry/index.d.ts","import":"./dist/sentry/index.js"},"./sensors":{"types":"./dist/sensors/index.d.ts","import":"./dist/sensors/index.js"}},"private":false,"scripts":{"test":"vitest run --config ../../vitest.config.ts src","build":"vite build && tsc -p tsconfig.build.json --emitDeclarationOnly","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"yuk_yao","email":"yuk_yao@163.com"},"_resolved":"/private/var/folders/5b/k9xfdkrs5j387n5_7cvhwst80000gn/T/3a9bd77429355deaa96953bf6fa6d2de/dczy-tie-monitor-1.0.0.tgz","_integrity":"sha512-7JoTv/VRTcswba/rtFeldez9IJ7EMtj+i3dyx2BL0SSyLGMAbMsUY9xRvXGolHrloVMAVrQgZ2p8+bG8T5rbMQ==","_npmVersion":"10.9.2","description":"DCZY.Tie 的监控、埋点、错误采集与路由页面访问基础包。模块导入不会自动初始化，也不会注册全局监听器。","directories":{},"sideEffects":false,"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.4.0 || ^3.5.0","@sentry/vue":"^9.0.0","sa-sdk-javascript":"^1.27.0"},"peerDependenciesMeta":{"vue":{"optional":true},"@sentry/vue":{"optional":true},"sa-sdk-javascript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/tie-monitor_1.0.0_1784303209094_0.20912509436987925","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dczy/tie-monitor","version":"1.0.1","private":false,"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js"},"./vue":{"types":"./dist/vue/index.d.ts","import":"./dist/vue/index.js"},"./router":{"types":"./dist/router/index.d.ts","import":"./dist/router/index.js"},"./legacy":{"types":"./dist/legacy/index.d.ts","import":"./dist/legacy/index.js"},"./sentry":{"types":"./dist/sentry/index.d.ts","import":"./dist/sentry/index.js"},"./sensors":{"types":"./dist/sensors/index.d.ts","import":"./dist/sensors/index.js"}},"sideEffects":false,"peerDependencies":{"@sentry/vue":"^9.0.0","sa-sdk-javascript":"^1.27.0","vue":"^3.4.0 || ^3.5.0"},"peerDependenciesMeta":{"@sentry/vue":{"optional":true},"sa-sdk-javascript":{"optional":true},"vue":{"optional":true}},"scripts":{"build":"vite build && tsc -p tsconfig.build.json --emitDeclarationOnly","test":"vitest run --config ../../vitest.config.ts src","typecheck":"tsc -p tsconfig.json --noEmit"},"_id":"@dczy/tie-monitor@1.0.1","description":"DCZY.Tie 的监控、埋点、错误采集与路由页面访问基础包。模块导入不会自动初始化，也不会注册全局监听器。","_integrity":"sha512-13GMhoIoEbmdmrmxLOie8hu3ElDMuxPz8ZSfKOt77MOhvIr0sIFcxqZMNs5Ya/De2dPN0LBbs1YXpQZaIXEj/w==","_resolved":"/private/var/folders/5b/k9xfdkrs5j387n5_7cvhwst80000gn/T/7ef378071ba88c46a354e34d78a63a7d/dczy-tie-monitor-1.0.1.tgz","_from":"file:dczy-tie-monitor-1.0.1.tgz","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-13GMhoIoEbmdmrmxLOie8hu3ElDMuxPz8ZSfKOt77MOhvIr0sIFcxqZMNs5Ya/De2dPN0LBbs1YXpQZaIXEj/w==","shasum":"37917cbbc69c6586923715e5097d559b9ca2b212","tarball":"https://registry.npmjs.org/@dczy/tie-monitor/-/tie-monitor-1.0.1.tgz","fileCount":18,"unpackedSize":18594,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA4//96/0AkQmXmHzfFU2ZMGU76guZGt6qXW53QFEj22AiBOi8J9lUvthS56edEetQNgsCjPonIqflagI50s7MbBKA=="}]},"_npmUser":{"name":"yuk_yao","email":"yuk_yao@163.com"},"directories":{},"maintainers":[{"name":"yuk_yao","email":"yuk_yao@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tie-monitor_1.0.1_1786588252649_0.5928124929880207"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T15:46:48.918Z","modified":"2026-08-13T02:30:52.986Z","1.0.0":"2026-07-17T15:46:49.247Z","1.0.1":"2026-08-13T02:30:52.802Z"},"description":"DCZY.Tie 的监控、埋点、错误采集与路由页面访问基础包。模块导入不会自动初始化，也不会注册全局监听器。","maintainers":[{"name":"yuk_yao","email":"yuk_yao@163.com"}],"readme":"# @dczy/tie-monitor\n\nDCZY.Tie 的监控、埋点、错误采集与路由页面访问基础包。模块导入不会自动初始化，也不会注册全局监听器。\n\n移动端业务优先安装 `@dczy/tie-mobile`，由其统一创建 monitor；PC 或独立场景可直接安装本包。\n\n## 安装\n\n```bash\npnpm add @dczy/tie-monitor\n```\n\n只在启用相应适配器时安装可选 SDK：\n\n```bash\npnpm add @sentry/vue          # Sentry\npnpm add sa-sdk-javascript    # 神策\n```\n\n## 基础用法\n\n```ts\nimport { createMonitor } from \"@dczy/tie-monitor/core\"\nimport { createLegacyTransport } from \"@dczy/tie-monitor/legacy\"\n\nconst monitor = createMonitor({\n  enabled: true,\n  application: \"道臣智运\",\n  project: \"DCZY\",\n  platform: \"web\",\n  captureErrors: true,\n  transports: [createLegacyTransport({ endpoint: TRACE_URL })],\n})\n\nawait monitor.init()\nawait monitor.track(\"$CRStatistic\", {\n  operateType: \"$SELECT\",\n  module: \"个人设置\",\n  page_title: \"上传头像\",\n})\n\nmonitor.setUser({ id: \"10001\" })\nawait monitor.destroy()\n```\n\n默认通过 `GetUserInfo()` 读取 `localStorage.CurUser`，并使用 `DEFAULT_USER_FIELDS` 过滤统一用户画像。Legacy GIF 会自动写入顶层 `distinct_id`、`abp_user_id` 和 `erp_user_id`。\n\n## Vue 用法\n\n```ts\nimport { createMonitorVuePlugin } from \"@dczy/tie-monitor/vue\"\n\napp.use(createMonitorVuePlugin({ monitor, router }))\n```\n\n组件内可使用 `useMonitor()` 或兼容业务埋点习惯的 `useAnalyticsTrack()`。\n\n## 导出入口\n\n- `@dczy/tie-monitor`：全部公共 API。\n- `@dczy/tie-monitor/core`：monitor client、类型与 URL 脱敏。\n- `@dczy/tie-monitor/vue`：Vue 插件与 composables。\n- `@dczy/tie-monitor/router`：Router pageview 集成。\n- `@dczy/tie-monitor/legacy`：旧 GIF 网关适配器。\n- `@dczy/tie-monitor/sentry`：Sentry 动态适配器。\n- `@dczy/tie-monitor/sensors`：神策动态适配器。\n\n完整说明见项目文档站的 `docs/tie-monitor`，发布流程见 `docs/guide/release-tie-monitor.md`。\n","readmeFilename":"README.md"}