-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add telemetry module #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for the-codegen-project canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing `uuid` runtime dependency causes production failure
The uuid package is imported and used at runtime in PersistedConfig.ts to generate anonymous IDs, but it's not listed in the dependencies section of package.json. Only @types/uuid is present in devDependencies. This will cause a runtime error when the CLI is installed in production because the uuid package won't be available.
package.json#L8-L30
Lines 8 to 30 in 85523a1
| "bugs": "https://github.com/the-codegen-project/cli/issues", | |
| "dependencies": { | |
| "@asyncapi/avro-schema-parser": "^3.0.24", | |
| "@asyncapi/modelina": "^6.0.0-next.3", | |
| "@asyncapi/openapi-schema-parser": "^3.0.24", | |
| "@asyncapi/parser": "^3.4.0", | |
| "@asyncapi/protobuf-schema-parser": "^3.5.1", | |
| "@asyncapi/raml-dt-schema-parser": "^4.0.24", | |
| "@oclif/core": "^3.26.3", | |
| "@oclif/errors": "^1.3.6", | |
| "@oclif/plugin-autocomplete": "^3.0.16", | |
| "@oclif/plugin-help": "^6.0.21", | |
| "@oclif/plugin-version": "^2.0.17", | |
| "@readme/openapi-parser": "^5.0.1", | |
| "chokidar": "^4.0.3", | |
| "cosmiconfig": "^9.0.0", | |
| "graphology": "^0.26.0", | |
| "inquirer": "^8.2.6", | |
| "openapi-types": "^12.1.3", | |
| "yaml": "^2.8.0", | |
| "zod": "^3.25.76", | |
| "zod-validation-error": "^3.3.0" | |
| }, |
src/PersistedConfig.ts#L3-L4
Lines 3 to 4 in 85523a1
| import fs from 'fs/promises'; | |
| import {v4 as uuidv4} from 'uuid'; |
|
🎉 This PR is included in version 0.58.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Note
Introduces anonymous telemetry across the CLI (with a management command), integrates tracking into generate/init, adds docs and tests, and updates deps and website tracking.
~/.the-codegen-project/config.jsonviasrc/PersistedConfig.ts(UUID, GA4 endpoint, flags).anonymize,collector,events,notice,sender, andindex(non-blocking, privacy-preserving).telemetryinsrc/codegen/types.ts.codegen telemetry {status|enable|disable}(src/commands/telemetry.ts).generate(incl. watch) andinitto emit events (command_executed,generator_used,watch_mode_started,init_executed, errors categorized).docs/telemetry.md; link indocs/README.md.telemetry.enabled=false.uuidand@types/uuid.gtagtracking ID inwebsite/docusaurus.config.ts.Written by Cursor Bugbot for commit 2d98b65. This will update automatically on new commits. Configure here.