{"_id":"@bluesyoung/reporter","_rev":"5-33bf9331dae9bb709bb1c12f5d5c3ebc","name":"@bluesyoung/reporter","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.1":{"name":"@bluesyoung/reporter","type":"module","version":"0.0.1","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"}},"main":"dist/index.cjs.js","module":"dist/index.es.js","unpkg":"dist/index.umd.js","jsdelivr":"dist/index.umd.js","types":"dist/index.d.ts","browser":"dist/index.umd.js","scripts":{"build":"vite build && tsup","lint":"eslint .","lint:fix":"eslint . --fix"},"dependencies":{"@bluesyoung/http":"^1.2.1","@bluesyoung/utils":"^0.3.0","consola":"^3.2.3","std-env":"^3.7.0","ua-parser-js":"^1.0.37"},"devDependencies":{"@antfu/eslint-config":"^2.14.0","@types/node":"20","@types/ua-parser-js":"^0.7.39","eslint":"^9.0.0","lint-staged":"^15.2.2","simple-git-hooks":"^2.11.1","tsup":"^8.0.2","typescript":"^5.0.0","vite":"^5.2.9","vitest":"^1.5.0"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"_id":"@bluesyoung/reporter@0.0.1","gitHead":"de2ad49597460339dd863d677b49b132a268a108","description":"[![](https://img.shields.io/badge/Author-BluesYoung--web-blue)](https://gitee.com/BluesYoung-web)","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-Bnpy8kx9s1EdQKEjh649QLna7CmZGQ7EPRllGCMgQoxOocJmXw4AU8IT0zKt0EzQwDwkwTcLLD4WeYLczduaoQ==","shasum":"a477b276adf774c819f605a80eb2bf43bf900a13","tarball":"https://registry.npmjs.org/@bluesyoung/reporter/-/reporter-0.0.1.tgz","fileCount":18,"unpackedSize":903893,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDbb6H747zDjrNkrlo6JK8ykSkuaR7BJXsL5JgyzKnTrAiEA4LxrJrprQ+uwPX8ElfEMuybaj1VMN6aJBwKHG+Hti0I="}]},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reporter_0.0.1_1713354924961_0.38866645231212016"},"_hasShrinkwrap":false},"0.0.2":{"name":"@bluesyoung/reporter","type":"module","version":"0.0.2","description":"数据打点上报SDK","author":{"name":"BluesYoung-web"},"license":"MIT","homepage":"https://github.com/BluesYoung-web/reporter#readme","repository":{"type":"git","url":"git+ssh://git@github.com/BluesYoung-web/reporter.git"},"bugs":{"url":"https://github.com/BluesYoung-web/reporter/issues"},"keywords":["data","reporter","report","page view"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"}},"main":"dist/index.cjs.js","module":"dist/index.es.js","unpkg":"dist/index.umd.js","jsdelivr":"dist/index.umd.js","types":"dist/index.d.ts","browser":"dist/index.umd.js","scripts":{"build":"vite build && tsup","lint":"eslint .","lint:fix":"eslint . --fix"},"dependencies":{"@bluesyoung/http":"^1.2.1","@bluesyoung/utils":"^0.3.0","consola":"^3.2.3","ua-parser-js":"^1.0.37"},"devDependencies":{"@antfu/eslint-config":"^2.14.0","@types/node":"20","@types/ua-parser-js":"^0.7.39","eslint":"^9.0.0","lint-staged":"^15.2.2","simple-git-hooks":"^2.11.1","tsup":"^8.0.2","typescript":"^5.0.0","vite":"^5.2.9","vitest":"^1.5.0"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"_id":"@bluesyoung/reporter@0.0.2","gitHead":"4dde9a8834aaea732d9201d39c7edc7be72d7377","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-10qSuAeXnzzHkgkv5a+5SH7NTVUiP/MVBmXgGNtRxqxgxnNooZvmPnIVm6afGurJtDNe+V4SIvE9ORV14CIkEg==","shasum":"a0368a836631db34b3882a988e56e9702c848e3e","tarball":"https://registry.npmjs.org/@bluesyoung/reporter/-/reporter-0.0.2.tgz","fileCount":8,"unpackedSize":232812,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlAADz9mSuRywW52kONJK1JjX5OFMRdL8QWISiPrRN3AiEAi2aTZLwzaYJFwSl5ZEPiLsxf1IJbHTf/d4iKhQKXHLs="}]},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reporter_0.0.2_1713400486445_0.4812579738375202"},"_hasShrinkwrap":false},"0.0.3":{"name":"@bluesyoung/reporter","type":"module","version":"0.0.3","description":"数据打点上报SDK","author":{"name":"BluesYoung-web"},"license":"MIT","homepage":"https://github.com/BluesYoung-web/reporter#readme","repository":{"type":"git","url":"git+ssh://git@github.com/BluesYoung-web/reporter.git"},"bugs":{"url":"https://github.com/BluesYoung-web/reporter/issues"},"keywords":["data","reporter","report","page view"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"}},"main":"dist/index.cjs.js","module":"dist/index.es.js","unpkg":"dist/index.umd.js","jsdelivr":"dist/index.umd.js","types":"dist/index.d.ts","browser":"dist/index.umd.js","scripts":{"build":"vite build && tsup","lint":"eslint .","lint:fix":"eslint . --fix"},"dependencies":{"@bluesyoung/http":"^1.2.1","@bluesyoung/utils":"^0.3.0","consola":"^3.2.3","ua-parser-js":"^1.0.37"},"devDependencies":{"@antfu/eslint-config":"^2.14.0","@types/node":"20","@types/ua-parser-js":"^0.7.39","eslint":"^9.0.0","lint-staged":"^15.2.2","simple-git-hooks":"^2.11.1","tsup":"^8.0.2","typescript":"^5.0.0","vite":"^5.2.9","vitest":"^1.5.0"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"_id":"@bluesyoung/reporter@0.0.3","gitHead":"d0fa53a3c71a26888299a13546f045c5011f1fa4","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-BReR8MSeDrtNOi5p5Do/nU5jjiJ9q2SBgQ7n1ArTE6EPMTfyl+mVVppjwBC3mNtNfcgfoIq0cjaycZ+pi+8NPQ==","shasum":"b1f50d45669baefd5d6b4272aaa53e45b22ef2f6","tarball":"https://registry.npmjs.org/@bluesyoung/reporter/-/reporter-0.0.3.tgz","fileCount":8,"unpackedSize":232753,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDGf7h+g410Uh7mFL8OupyaFkf1TIu6k3iRDwRp2hXjAIgRr557Ikn7hRQ56NoynYSExhruG+sl70UjtaGRyvF7ao="}]},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reporter_0.0.3_1713404083627_0.7138818028071874"},"_hasShrinkwrap":false},"0.1.0":{"name":"@bluesyoung/reporter","type":"module","version":"0.1.0","description":"数据打点上报SDK","author":{"name":"BluesYoung-web"},"license":"MIT","homepage":"https://github.com/BluesYoung-web/reporter#readme","repository":{"type":"git","url":"git+ssh://git@github.com/BluesYoung-web/reporter.git"},"bugs":{"url":"https://github.com/BluesYoung-web/reporter/issues"},"keywords":["data","reporter","report","page view"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"}},"main":"dist/index.cjs.js","module":"dist/index.es.js","unpkg":"dist/index.umd.js","jsdelivr":"dist/index.umd.js","types":"dist/index.d.ts","browser":"dist/index.umd.js","scripts":{"build":"vite build && tsup","lint":"eslint .","lint:fix":"eslint . --fix"},"dependencies":{"@bluesyoung/http":"^1.2.1","@bluesyoung/utils":"^0.3.0","consola":"^3.2.3","ua-parser-js":"^1.0.37"},"devDependencies":{"@antfu/eslint-config":"^2.14.0","@types/node":"20","@types/ua-parser-js":"^0.7.39","eslint":"^9.0.0","lint-staged":"^15.2.2","simple-git-hooks":"^2.11.1","tsup":"^8.0.2","typescript":"^5.0.0","vite":"^5.2.9","vitest":"^1.5.0"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"_id":"@bluesyoung/reporter@0.1.0","gitHead":"5328f893c2d2af5bebb795b601a0e02b719b3213","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-vFRLOfF3RCKU2iS+xymmKnrotyy27wrw95RrtA/2KkkLLT9i/nzX7Iczc3yesDjV36dgk00snG+/2ycbHZEU7w==","shasum":"8da9ff48404309608029aea22a559953a9e756ae","tarball":"https://registry.npmjs.org/@bluesyoung/reporter/-/reporter-0.1.0.tgz","fileCount":8,"unpackedSize":233379,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBNKi7IviP6xBqEUYZg1j/YKA/ksWlkR1ae9xb2M2SP0AiEA2d6tU/PYG9HuaX6Shoo/RW5I0gZ6VI6iZRkanYd8mk0="}]},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reporter_0.1.0_1713406902343_0.5985509881963307"},"_hasShrinkwrap":false},"0.2.0":{"name":"@bluesyoung/reporter","type":"module","version":"0.2.0","description":"数据打点上报SDK","author":{"name":"BluesYoung-web"},"license":"MIT","homepage":"https://github.com/BluesYoung-web/reporter#readme","repository":{"type":"git","url":"git+ssh://git@github.com/BluesYoung-web/reporter.git"},"bugs":{"url":"https://github.com/BluesYoung-web/reporter/issues"},"keywords":["data","reporter","report","page view"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"}},"main":"dist/index.cjs.js","module":"dist/index.es.js","unpkg":"dist/index.umd.js","jsdelivr":"dist/index.umd.js","types":"dist/index.d.ts","browser":"dist/index.umd.js","scripts":{"build":"vite build && tsup","test":"vitest","lint":"eslint .","lint:fix":"eslint . --fix"},"dependencies":{"@bluesyoung/http":"^1.2.1","@bluesyoung/utils":"^0.3.0","consola":"^3.2.3","ua-parser-js":"^1.0.37"},"devDependencies":{"@antfu/eslint-config":"^2.14.0","@types/node":"20","@types/ua-parser-js":"^0.7.39","eslint":"^9.0.0","happy-dom":"^14.7.1","lint-staged":"^15.2.2","simple-git-hooks":"^2.11.1","tsup":"^8.0.2","typescript":"^5.0.0","vite":"^5.2.9","vitest":"^1.5.0"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"_id":"@bluesyoung/reporter@0.2.0","gitHead":"50d15e593fe4ae515f6536c3546251cec27eb68e","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-JLHZ7QMOQfNdSycU6v6SxIRaZWNSt2jwKjc6LPAJ+B7iAhAFccRsFIc480+6JW/JcxSZ6lU5ItkACv5yxFiR+Q==","shasum":"2bd66a2ff5ede58a17ee49b371d0c6f82174f5d0","tarball":"https://registry.npmjs.org/@bluesyoung/reporter/-/reporter-0.2.0.tgz","fileCount":8,"unpackedSize":238469,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUV51UMvYrTsE7tiaFC27me2ar2ff1xT9xedZO+g5mdAIgB6EFbdZePUJx7UTFYUtqYTDiUPsieQL/eYddRRj+2DM="}]},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reporter_0.2.0_1713431607639_0.4476141812932706"},"_hasShrinkwrap":false},"0.2.1":{"name":"@bluesyoung/reporter","type":"module","version":"0.2.1","description":"数据打点上报SDK","author":{"name":"BluesYoung-web"},"license":"MIT","homepage":"https://github.com/BluesYoung-web/reporter#readme","repository":{"type":"git","url":"git+ssh://git@github.com/BluesYoung-web/reporter.git"},"bugs":{"url":"https://github.com/BluesYoung-web/reporter/issues"},"keywords":["data","reporter","report","page view"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"}},"main":"dist/index.cjs.js","module":"dist/index.es.js","unpkg":"dist/index.umd.js","jsdelivr":"dist/index.umd.js","types":"dist/index.d.ts","browser":"dist/index.umd.js","scripts":{"build":"vite build && tsup","test":"vitest","lint":"eslint .","lint:fix":"eslint . --fix"},"dependencies":{"@bluesyoung/http":"^1.2.1","@bluesyoung/utils":"^0.3.0","consola":"^3.2.3","ua-parser-js":"^1.0.37"},"devDependencies":{"@antfu/eslint-config":"^2.14.0","@types/node":"20","@types/ua-parser-js":"^0.7.39","eslint":"^9.0.0","happy-dom":"^14.7.1","lint-staged":"^15.2.2","simple-git-hooks":"^2.11.1","tsup":"^8.0.2","typescript":"^5.0.0","vite":"^5.2.9","vitest":"^1.5.0"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"_id":"@bluesyoung/reporter@0.2.1","gitHead":"203dac8c7b73ec96dd8159ef8f25fb9c400e1dab","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-ipAuULOhrQ6Dpw2RtnKyyOb6d90k0M3osS6SaAICF5vh6pWGM+8LjnsZG/SAq61tq6br6SSfKkYmp8kIuxJlmw==","shasum":"4cf3d3bef98bea1a7c227833e15523f2fd0eb110","tarball":"https://registry.npmjs.org/@bluesyoung/reporter/-/reporter-0.2.1.tgz","fileCount":8,"unpackedSize":238532,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICqxK+Id39X/R0VnKRps/zCBKxp+CHBUffZhwHmx+VQ9AiAq/xV2KJb9r0SeJF1lnPFSzmTP6mod/qPWRydC7+8p0g=="}]},"_npmUser":{"name":"bluesyoung","email":"15171255945@163.com"},"directories":{},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reporter_0.2.1_1713835927440_0.7768752318751364"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-17T11:55:24.864Z","0.0.1":"2024-04-17T11:55:25.140Z","modified":"2024-04-23T01:32:07.792Z","0.0.2":"2024-04-18T00:34:46.614Z","0.0.3":"2024-04-18T01:34:43.842Z","0.1.0":"2024-04-18T02:21:42.584Z","0.2.0":"2024-04-18T09:13:27.875Z","0.2.1":"2024-04-23T01:32:07.617Z"},"maintainers":[{"name":"bluesyoung","email":"15171255945@163.com"}],"description":"数据打点上报SDK","readme":"# @bluesyoung/reporter\n\n[![](https://img.shields.io/badge/Author-BluesYoung--web-blue)](https://gitee.com/BluesYoung-web)  [![npm](https://img.shields.io/npm/v/@bluesyoung/reporter)](https://www.npmjs.com/package/@bluesyoung/reporter)\n\n[![code style](https://antfu.me/badge-code-style.svg)](https://github.com/antfu/eslint-config)\n\n数据上报 SDK\n\n## 使用示例\n\n```ts\nimport YoungReporter from '@bluesyoung/reporter'\n\nconst reporter = new YoungReporter({\n  serverUrl: '上报服务器的地址',\n  appname: 'your appname',\n  appsecret: 'your appsecret',\n  // 是否打印中间过程日志，默认为 false\n  // 生产环境建议关闭\n  debug: true,\n  // 是否立即初始化 deviceId\n  // (纯浏览器环境，无需传递，默认为 true，自动使用 canvas 生成浏览器指纹)\n  initDeviceId: false\n})\n\n// 设置设备id，不传递则使用 canvas 生成浏览器指纹\nreporter.setDeviceId()\n\n// 登录(设置用户id, 非必须)\nreporter.login('userId')\n// 退出登录\nreporter.logout()\n\n// 事件上报\nreporter.track('eventName', {\n  // 事件属性\n  // [prop: string]: any\n})\n\n// 定时上报\nreporter.flush(args)\n```\n\n[详细示例，参见测试代码](./test/index.spec.ts)\n","readmeFilename":"README.md","homepage":"https://github.com/BluesYoung-web/reporter#readme","keywords":["data","reporter","report","page view"],"repository":{"type":"git","url":"git+ssh://git@github.com/BluesYoung-web/reporter.git"},"author":{"name":"BluesYoung-web"},"bugs":{"url":"https://github.com/BluesYoung-web/reporter/issues"},"license":"MIT"}