Skip to content

Commit

Permalink
feat(cli): add identify on init (bigcommerce#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
chanceaclark authored Oct 22, 2024
1 parent 12ce1d7 commit 513a740
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-rivers-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/create-catalyst": patch
---

Adds a identify call on init.
5 changes: 5 additions & 0 deletions packages/create-catalyst/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import * as z from 'zod';
import { Https } from '../utils/https';
import { login } from '../utils/login';
import { parse } from '../utils/parse';
import { Telemetry } from '../utils/telemetry/telemetry';
import { writeEnv } from '../utils/write-env';

const telemetry = new Telemetry();

export const init = new Command('init')
.description('Connect a BigCommerce store with an existing Catalyst project')
.option('--store-hash <hash>', 'BigCommerce store hash')
Expand Down Expand Up @@ -50,6 +53,8 @@ export const init = new Command('init')
process.exit(1);
}

await telemetry.identify(storeHash);

const bc = new Https({ bigCommerceApiUrl, storeHash, accessToken });
const sampleDataApi = new Https({
sampleDataApiUrl,
Expand Down

0 comments on commit 513a740

Please sign in to comment.