{"id":23090999,"url":"https://github.com/liangskyli/mock","last_synced_at":"2025-06-24T09:40:48.259Z","repository":{"id":51993357,"uuid":"422848828","full_name":"liangskyli/mock","owner":"liangskyli","description":"Mock 数据是前端开发过程中必不可少的一环，是分离前后端开发的关键链路。全面支持http，socket，grpc接口。支持mock数据更改时热更新获取新数据，支持Mock数据自动生成和自定义场景化数据能力。","archived":false,"fork":false,"pushed_at":"2024-12-07T12:35:11.000Z","size":3770,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-07T13:26:15.782Z","etag":null,"topics":["grpc","mock","socket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liangskyli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-30T10:25:05.000Z","updated_at":"2024-12-07T12:34:57.000Z","dependencies_parsed_at":"2023-01-30T20:46:00.313Z","dependency_job_id":"bf543be2-12d0-425a-81c0-fc4906bb1806","html_url":"https://github.com/liangskyli/mock","commit_stats":{"total_commits":206,"total_committers":2,"mean_commits":103.0,"dds":"0.029126213592232997","last_synced_commit":"efc599af4620ee901b9d585cff755920ed42fd3d"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangskyli%2Fmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangskyli%2Fmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangskyli%2Fmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangskyli%2Fmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liangskyli","download_url":"https://codeload.github.com/liangskyli/mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230026358,"owners_count":18161593,"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":["grpc","mock","socket"],"created_at":"2024-12-16T21:16:43.345Z","updated_at":"2024-12-16T21:16:43.774Z","avatar_url":"https://github.com/liangskyli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 多种Mock服务提供MOCK数据，总有一种方式适合你。\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/liangskyli/mock/releases\"\u003e\n    \u003cimg alt=\"preview badge\" src=\"https://img.shields.io/github/v/release/liangskyli/mock\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@liangskyli/grpc-mock\"\u003e\n   \u003cimg alt=\"preview badge\" src=\"https://img.shields.io/npm/v/@liangskyli/grpc-mock?label=%40liangskyli%2Fgrpc-mock\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@liangskyli/http-mock-gen\"\u003e\n   \u003cimg alt=\"preview badge\" src=\"https://img.shields.io/npm/v/@liangskyli/http-mock-gen?label=%40liangskyli%2Fhttp-mock-gen\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@liangskyli/mock\"\u003e\n   \u003cimg alt=\"preview badge\" src=\"https://img.shields.io/npm/v/@liangskyli/mock?label=%40liangskyli%2Fmock\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Mock 数据是前端开发过程中必不可少的一环，是分离前后端开发的关键链路。通过预先跟服务器端约定好的接口，模拟请求数据甚至逻辑，能够让前端开发独立自主，不会被服务端的开发所阻塞。全面支持http，socket，grpc接口。支持mock数据更改时热更新获取新数据，支持Mock数据自动生成和自定义场景化数据能力。\n\n## mock 场景\n\n### 1、http 或 socket mock服务\n\u003e 提供http，socket接口的mock服务功能，mock数据场景化手动编写。支持mock数据更改时热更新获取新数据。\n\n### 安装:\n```bash\nyarn add @liangskyli/mock --dev\n```\n\n- Mock 数据修改指引 [文档](packages/mock/docs/mock.md)\n- 包含 http 和 socket 的mock功能 [文档](packages/mock/docs/http-mock.md)\n\n### 1.1 http mock 代码生成工具\n\u003e 提供http mock数据自动生成功能，减轻手动编写mock数据代码，mock数据填充默认值。\u003cbr/\u003e\n\u003e 支持生成数据和自定义数据分离。\n\n### 安装:\n```bash\nyarn add @liangskyli/http-mock-gen --dev\n```\n\n如果项目没有安装prettier，需要安装prettier(^2.0.0 || ^3.0.0)\n```bash\nyarn add prettier --dev\n```\n\n- [文档](packages/http-mock-gen/README.md)\n\n\n\n### 2、grpc mock\n\u003e 提供grpc mock数据自动生成和mock服务启动功能，减轻手动编写mock数据代码，mock数据填充默认值。\u003cbr/\u003e\n\u003e 支持生成数据和自定义数据分离。\u003cbr/\u003e\n\u003e 支持mock数据更改时热更新获取新数据。\n\n### 安装:\n```bash\nyarn add @liangskyli/grpc-mock --dev\n```\n\n如果项目没有安装prettier，需要安装prettier(^2.0.0 || ^3.0.0)\n```bash\nyarn add prettier --dev\n```\n\n- 基于node.js 实现 grpc mock 数据生成 [文档](packages/grpc-mock/docs/gen-grpc-mock.md)\n- Mock 数据修改指引 [文档](packages/grpc-mock/docs/grpc-mock-modify-guide.md)\n- 基于node.js 实现 grpc mock 服务 [文档](packages/grpc-mock/docs/grpc-mock-server.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangskyli%2Fmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliangskyli%2Fmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangskyli%2Fmock/lists"}