feat: disable auto consent and add nuxt telemetry consent
#35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background: For sending telemetry events, we once consent users about sending events or not but since it wasn't possible to make a prompt and await on stdin in production and CI/CD environments, it was enabled by default on headless envs. (alternative was forcing on each project creation but at early days it was reported to be annoying even with a notice how to enable in CI)
With this change, we never send any events unless it is explicitly enabled per-machine or per-project.
Also a new cli command
nuxt telemetry consent [-g] [dir]
introduced so with a post creation hook in create-nuxt-app, we still have chance to opt in users but before first run.Also I added
consent
field to events context so if later-on we change events policy, have a way to distinguish events. (clarify: currently if a policy change happens, we shall bump version to force prompt users again before sending events.)Rolling-out strategy:
ci: true
tag will be wiped out from database to maximize privacy@nuxt/telemetry
npm package will be deprecated with a message to notify about implicit behavior and they should upgrade versioncloses #34