{"id":22184278,"url":"https://github.com/ohbug-org/ohbug-miniapp","last_synced_at":"2025-07-26T19:31:18.934Z","repository":{"id":55836140,"uuid":"293035107","full_name":"ohbug-org/ohbug-miniapp","owner":"ohbug-org","description":"Ohbug 小程序 SDK 用于小程序平台（支持微信、字节跳动、支付宝、QQ 小程序）","archived":false,"fork":false,"pushed_at":"2020-09-27T11:22:58.000Z","size":108,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T04:25:39.804Z","etag":null,"topics":["crash-reporting","crash-reports","error-monitoring","error-reporting","miniapp","monitoring","ohbug","ohbug-miniapp","weapp"],"latest_commit_sha":null,"homepage":"https://ohbug.net/docs/framework/MiniApp","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohbug-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-05T08:29:59.000Z","updated_at":"2024-09-10T10:14:50.000Z","dependencies_parsed_at":"2022-08-15T07:40:27.434Z","dependency_job_id":null,"html_url":"https://github.com/ohbug-org/ohbug-miniapp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbug-org%2Fohbug-miniapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbug-org%2Fohbug-miniapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbug-org%2Fohbug-miniapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbug-org%2Fohbug-miniapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohbug-org","download_url":"https://codeload.github.com/ohbug-org/ohbug-miniapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227707765,"owners_count":17807513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crash-reporting","crash-reports","error-monitoring","error-reporting","miniapp","monitoring","ohbug","ohbug-miniapp","weapp"],"created_at":"2024-12-02T10:12:31.572Z","updated_at":"2024-12-02T10:12:32.266Z","avatar_url":"https://github.com/ohbug-org.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://ohbug.net\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/ohbug-org/blog/master/images/ohbug_logo.svg\" alt=\"Ohbug\" height=\"72\"\u003e\n  \u003c/a\u003e\n  \n  \u003cp\u003e开源应用信息监控平台\u003c/p\u003e\n\u003c/div\u003e\n\n# `@ohbug/miniapp`\n\n[![npm](https://img.shields.io/npm/v/@ohbug/miniapp.svg?style=flat-square)](https://www.npmjs.com/package/@ohbug/miniapp)\n[![npm bundle size](https://img.shields.io/bundlephobia/min/@ohbug/miniapp?style=flat-square)](https://bundlephobia.com/result?p=@ohbug/miniapp)\n[![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n## Feature\n\n- 支持 微信小程序、支付宝小程序、字节跳动小程序、QQ 小程序\n- 支持 [Taro](https://taro.aotu.io/) 等第三方小程序框架\n- 监听小程序 `onError`、`onUnhandledRejection`、`onPageNotFound`、`onMemoryWarning` API\n- 收集小程序的设备、系统、应用信息\n- 收集异常发生时的路由栈\n\n## Usage\n\n1. 安装依赖\n```shell\nyarn add @ohbug/miniapp\n```\n或直接下载 [releases](https://github.com/ohbug-org/ohbug-miniapp/releases)\n\n2. 「微信开发者工具 - 工具 - 构建 npm」，更多内容可查询[文档](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html)\n\n3. 初始化\n```javascript\n// 新建文件 ohbug.js\n// 引入 SDK\nimport Ohbug from \"@ohbug/miniapp\";\n// 或者直接引入js\nimport Ohbug from \"./ohbug-miniapp.esm.prod.js\"\n// or\nconst Ohbug = require(\"./ohbug-miniapp.cjs.prod.js\")\n\nconst client = Ohbug.init({ apiKey: \"YOUR_API_KEY\" });\nexport default client;\n```\n\n```javascript\n// app.js\nimport './ohbug';\n\nApp({\n  onLaunch() {\n    // ...\n  }\n})\n```\n\n## Note\n\n- 请开启「微信开发者工具 - 设置 - 项目设置 - 增强编译」\n- 请在小程序管理后台配置 request 合法域名 `https://api.ohbug.net/report`\n- 目前字节跳动小程序不支持使用 npm 形式接入 请直接引入 js 文件\n\n## License\n\nThis project is licensed under the terms of the [Apache License 2.0](https://github.com/ohbug-org/ohbug-miniapp/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohbug-org%2Fohbug-miniapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohbug-org%2Fohbug-miniapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohbug-org%2Fohbug-miniapp/lists"}