@yahoo/uds 1.7.0 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/bin/uds-darwin-arm64-baseline +0 -0
- package/cli/bin/uds-linux-x64-baseline +0 -0
- package/cli/commands/codemod/codemod.ts +9 -12
- package/cli/commands/login.ts +0 -2
- package/cli/commands/logout.ts +0 -3
- package/cli/commands/purge.ts +0 -2
- package/cli/commands/sync.ts +0 -2
- package/cli/commands/uds.ts +0 -2
- package/cli/commands/version.ts +0 -2
- package/cli/tsconfig.json +4 -5
- package/cli/utils/auth.ts +1 -1
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
- package/cli/utils/analytics.ts +0 -27
package/package.json
CHANGED
package/cli/utils/analytics.ts
DELETED
@@ -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
|
-
};
|