Skip to content

Conversation

@jonaslagoni
Copy link
Contributor

@jonaslagoni jonaslagoni commented Dec 11, 2025

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.

  • Telemetry (core):
    • Add persisted global config in ~/.the-codegen-project/config.json via src/PersistedConfig.ts (UUID, GA4 endpoint, flags).
    • Implement telemetry pipeline: anonymize, collector, events, notice, sender, and index (non-blocking, privacy-preserving).
    • Extend config schema with project-level overrides telemetry in src/codegen/types.ts.
  • CLI integration:
    • New command codegen telemetry {status|enable|disable} (src/commands/telemetry.ts).
    • Hook telemetry into generate (incl. watch) and init to emit events (command_executed, generator_used, watch_mode_started, init_executed, errors categorized).
  • Docs:
    • Add README Telemetry section; new docs/telemetry.md; link in docs/README.md.
  • Tests:
    • Add comprehensive unit tests for telemetry modules and commands; test configs updated to set telemetry.enabled=false.
  • Dependencies:
    • Add uuid and @types/uuid.
  • Website:
    • Update GA4 gtag tracking ID in website/docusaurus.config.ts.

Written by Cursor Bugbot for commit 2d98b65. This will update automatically on new commits. Configure here.

@netlify
Copy link

netlify bot commented Dec 11, 2025

Deploy Preview for the-codegen-project canceled.

Name Link
🔨 Latest commit 2d98b65
🔍 Latest deploy log https://app.netlify.com/projects/the-codegen-project/deploys/693c40ee8bbcc00008d23e7f

Copy link

@cursor cursor bot left a 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

cli/package.json

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

import fs from 'fs/promises';
import {v4 as uuidv4} from 'uuid';

Fix in Cursor Fix in Web


@jonaslagoni jonaslagoni merged commit bc6dcdd into main Dec 12, 2025
19 checks passed
@jonaslagoni jonaslagoni deleted the enable_tracking branch December 12, 2025 16:40
@jonaslagoni
Copy link
Contributor Author

🎉 This PR is included in version 0.58.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants