@yahoo/uds 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yahoo/uds",
3
3
  "description": "Yahoo Universal System",
4
- "version": "1.7.0",
4
+ "version": "1.7.1",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "uds": "./cli/uds-cli"
@@ -1,27 +0,0 @@
1
- import { getFeatureFlags } from '@yahoo/uds/flags';
2
- import { GA_MEASUREMENT_IDS, GA_MEASUREMENT_SECRETS } from 'analytics/providers/google/consts';
3
- import { track } from 'analytics/providers/google/server';
4
- import { EventName } from 'analytics/types';
5
-
6
- import { getAuthenticatedUser } from '../utils/auth';
7
-
8
- export async function setup() {
9
- const user = await getAuthenticatedUser();
10
- if (user) {
11
- await track.init({
12
- appName: 'cli',
13
- apiSecret: GA_MEASUREMENT_SECRETS.cli,
14
- measurementId: GA_MEASUREMENT_IDS.cli,
15
- // @ts-expect-error type is fine
16
- user,
17
- });
18
- }
19
- }
20
-
21
- export const trackEvent = async (...args: Parameters<typeof track.event<EventName['cli']>>) => {
22
- const { useCLIAuth } = getFeatureFlags();
23
- if (useCLIAuth) {
24
- await setup();
25
- return track.event(...args);
26
- }
27
- };