11import chalk from "chalk" ;
2- import { defineAlias , defineCommand , defineNamespace } from "../core" ;
2+ import {
3+ createAlias ,
4+ createCommand ,
5+ createNamespace ,
6+ } from "../core/create-command" ;
37import { getWranglerSendMetricsFromEnv } from "../environment-variables/misc-variables" ;
48import { logger } from "../logger" ;
59import { readMetricsConfig , updateMetricsPermission } from "./metrics-config" ;
610
7- defineNamespace ( {
8- command : "wrangler telemetry" ,
11+ export const telemetryNamespace = createNamespace ( {
912 metadata : {
1013 description : "📈 Configure whether Wrangler collects telemetry" ,
1114 owner : "Workers: Authoring and Testing" ,
@@ -14,13 +17,11 @@ defineNamespace({
1417 } ,
1518} ) ;
1619
17- defineAlias ( {
18- command : "wrangler metrics" ,
20+ export const metricsAlias = createAlias ( {
1921 aliasOf : "wrangler telemetry" ,
2022} ) ;
2123
22- defineCommand ( {
23- command : "wrangler telemetry disable" ,
24+ export const telemetryDisableCommand = createCommand ( {
2425 metadata : {
2526 description : "Disable Wrangler telemetry collection" ,
2627 owner : "Workers: Authoring and Testing" ,
@@ -35,8 +36,7 @@ defineCommand({
3536 } ,
3637} ) ;
3738
38- defineCommand ( {
39- command : "wrangler telemetry enable" ,
39+ export const telemetryEnableCommand = createCommand ( {
4040 metadata : {
4141 description : "Enable Wrangler telemetry collection" ,
4242 owner : "Workers: Authoring and Testing" ,
@@ -51,8 +51,7 @@ defineCommand({
5151 } ,
5252} ) ;
5353
54- defineCommand ( {
55- command : "wrangler telemetry status" ,
54+ export const telemetryStatusCommand = createCommand ( {
5655 metadata : {
5756 description : "Check whether Wrangler telemetry collection is enabled" ,
5857 owner : "Workers: Authoring and Testing" ,
0 commit comments