Skip to content
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

feat: add debug capabilities #19

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

feat: add debug capabilities #19

wants to merge 12 commits into from

Conversation

Convly
Copy link
Member

@Convly Convly commented Dec 20, 2024

What does it do?

  • adds a dependency to the npm debug package (54kB) and supports-color (10kB)
  • introduce debug logs for critical parts of the SDK lifecycle (initialization, validation, http client, auth, content-type managers)

Also

  • fix repo configuration around lint, tests and pre-commit scripts

Why is it needed?

Better traceability and maintainability of the codebase.

Easier issue management/reproduction with finegrained logs

How to test it?

DEBUG=* node main.js # debug everything
DEBUG=sdk:auth:* node main.js # debug every auth module
DEBUG=sdj:ct:* node main.js # debug content type managers
DEBUG=*,-sdk:validators:* node main.js # debug everything except validators

TODO

  • add documentation

@Convly Convly added pr: feature New or updates to features source: sdk Source is the main SDK object labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: feature New or updates to features source: sdk Source is the main SDK object
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant