1 | /**
|
2 | * @license
|
3 | * Copyright Google LLC All Rights Reserved.
|
4 | *
|
5 | * Use of this source code is governed by an MIT-style license that can be
|
6 | * found in the LICENSE file at https://angular.io/license
|
7 | */
|
8 | import type { CommandContext } from '../command-builder/command-module';
|
9 | /**
|
10 | * This is the ultimate safelist for checking if a package name is safe to report to analytics.
|
11 | */
|
12 | export declare const analyticsPackageSafelist: (string | RegExp)[];
|
13 | export declare function isPackageNameSafeForAnalytics(name: string): boolean;
|
14 | /**
|
15 | * Set analytics settings. This does not work if the user is not inside a project.
|
16 | * @param global Which config to use. "global" for user-level, and "local" for project-level.
|
17 | * @param value Either a user ID, true to generate a new User ID, or false to disable analytics.
|
18 | */
|
19 | export declare function setAnalyticsConfig(global: boolean, value: string | boolean): Promise<void>;
|
20 | /**
|
21 | * Prompt the user for usage gathering permission.
|
22 | * @param force Whether to ask regardless of whether or not the user is using an interactive shell.
|
23 | * @return Whether or not the user was shown a prompt.
|
24 | */
|
25 | export declare function promptAnalytics(context: CommandContext, global: boolean, force?: boolean): Promise<boolean>;
|
26 | export declare function getAnalyticsUserId(context: CommandContext, skipPrompt?: boolean): Promise<string | undefined>;
|
27 | export declare function getAnalyticsInfoString(context: CommandContext): Promise<string>;
|