Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Commit 5c2ed94

Browse files
committed
added date to report options and removed unwanted parameters
1 parent 9273875 commit 5c2ed94

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

packages/cdktf-cli/bin/cmds/helper/constructs-maker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async function providerTelemetry(language: string, providers: string[]): Promise
3838

3939
const payload = { language: language, name: name, fullName: fqname, version: version, type: 'provider' };
4040

41-
const reportParams: ReportParams = { product: product, version: versionNumber(), payload: payload };
41+
const reportParams: ReportParams = { product: product, version: versionNumber(), dateTime: new Date(), payload: payload };
4242

4343
await ReportRequest(reportParams);
4444
}
@@ -50,7 +50,7 @@ async function moduleTelemetry(language: string, modules: string[]): Promise<voi
5050

5151
const payload = { language: language, source: source, version: version, type: 'module' };
5252

53-
const reportParams: ReportParams = { product: product, version: versionNumber(), payload: payload };
53+
const reportParams: ReportParams = { product: product, version: versionNumber(), dateTime: new Date(), payload: payload };
5454

5555
await ReportRequest(reportParams);
5656
}

packages/cdktf-cli/lib/checkpoint.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,12 @@ const BASE_URL = `https://checkpoint-api.hashicorp.com/v1/`;
88
const VALID_ERROR_CODES = [200, 201];
99

1010
export interface ReportParams {
11-
signature?: string;
12-
signatureFile?: string;
13-
14-
startTime?: string;
15-
endTime?: string;
11+
dateTime?: Date;
1612
arch?: string;
1713
os?: string;
1814
payload: {};
1915
product: string;
2016
runID?: string;
21-
schemaVersion?: string;
2217
version?: string;
2318
}
2419

@@ -63,6 +58,10 @@ export async function ReportRequest(reportParams: ReportParams): Promise<void> {
6358
reportParams.runID = uuidv4();
6459
}
6560

61+
if (!reportParams.dateTime) {
62+
reportParams.dateTime = new Date();
63+
}
64+
6665
if (!reportParams.arch) {
6766
reportParams.arch = os.arch();
6867
}

0 commit comments

Comments
 (0)