From 14c9caf5e40b29110e952abce8325201a5660989 Mon Sep 17 00:00:00 2001 From: Sindre Gulseth Date: Mon, 5 Aug 2024 20:57:27 +0200 Subject: [PATCH] chore(typegen): trace overloadClientMethods usage --- packages/@sanity/cli/src/actions/typegen/generate.telemetry.ts | 1 + packages/@sanity/cli/src/actions/typegen/generateAction.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/@sanity/cli/src/actions/typegen/generate.telemetry.ts b/packages/@sanity/cli/src/actions/typegen/generate.telemetry.ts index 91e654329e5..0b1ea340a84 100644 --- a/packages/@sanity/cli/src/actions/typegen/generate.telemetry.ts +++ b/packages/@sanity/cli/src/actions/typegen/generate.telemetry.ts @@ -10,6 +10,7 @@ interface TypesGeneratedTraceAttrubutes { unknownTypeNodesGenerated: number unknownTypeNodesRatio: number emptyUnionTypeNodesGenerated: number + configOverloadClientMethods: boolean } export const TypesGeneratedTrace = defineTrace({ diff --git a/packages/@sanity/cli/src/actions/typegen/generateAction.ts b/packages/@sanity/cli/src/actions/typegen/generateAction.ts index da4def4a376..e46358fd03a 100644 --- a/packages/@sanity/cli/src/actions/typegen/generateAction.ts +++ b/packages/@sanity/cli/src/actions/typegen/generateAction.ts @@ -175,6 +175,7 @@ export default async function typegenGenerateAction( unknownTypeNodesRatio: stats.typeNodesGenerated > 0 ? stats.unknownTypeNodesGenerated / stats.typeNodesGenerated : 0, emptyUnionTypeNodesGenerated: stats.emptyUnionTypeNodesGenerated, + configOverloadClientMethods: codegenConfig.overloadClientMethods, }) trace.complete()