{"id":20114621,"url":"https://github.com/alienzhou/grpc-static-pollute-demo","last_synced_at":"2025-03-02T19:15:13.676Z","repository":{"id":107435455,"uuid":"355616946","full_name":"alienzhou/grpc-static-pollute-demo","owner":"alienzhou","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-11T07:51:34.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-13T06:10:32.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alienzhou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-07T16:44:10.000Z","updated_at":"2021-04-11T07:51:36.000Z","dependencies_parsed_at":"2023-04-19T22:18:19.966Z","dependency_job_id":null,"html_url":"https://github.com/alienzhou/grpc-static-pollute-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fgrpc-static-pollute-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fgrpc-static-pollute-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fgrpc-static-pollute-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fgrpc-static-pollute-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alienzhou","download_url":"https://codeload.github.com/alienzhou/grpc-static-pollute-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241557193,"owners_count":19981881,"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":[],"created_at":"2024-11-13T18:30:52.642Z","updated_at":"2025-03-02T19:15:13.656Z","avatar_url":"https://github.com/alienzhou.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 《记一次 Node gRPC 静态生成文件引发的问题排查》\n# —— 配套 Demo\n\n对应文章：\n\n## 安装依赖\n\n```bash\nnpm i\n```\n## 运行示例效果\n\n### 1、运行异常case\n\n```bash\nnpm run start:error\n```\n\n### 2、运行四种正常case\n\n```bash\nnpm run start:correct-1\n```\n\n```bash\nnpm run start:correct-2\n```\n\n```bash\nnpm run start:correct-3\n```\n\n```bash\nnpm run start:correct-4\n```\n\n## 另一个更简单的示例\n\n同时 demo 还配套了一个极简版示例。在 `simple-demo` 目录下。\n\n代码创建了如下一个对象：\n\n```javascript\nglobal.exampleObj = {\n    name: 'AlienZHOU',\n    setName: function (params) {\n        global.exampleObj.name = 'Modified';\n    },\n};\n```\n\n预计调用 `.setName` 后会改变该对象的 name 值。\n\n运行正确代码：\n\n```bash\nnode simple-demo/correct.js\n\n# 输出：Modified\n# 符合预期\n```\n\n运行错误代码：\n\n```bash\nnode simple-demo/error.js\n\n# 输出：AlienZHOU\n# name 未修改，不符合预期\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falienzhou%2Fgrpc-static-pollute-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falienzhou%2Fgrpc-static-pollute-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falienzhou%2Fgrpc-static-pollute-demo/lists"}