@depup/firebase__analytics 0.10.20-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +31 -0
  2. package/changes.json +10 -0
  3. package/dist/analytics-public.d.ts +763 -0
  4. package/dist/analytics.d.ts +763 -0
  5. package/dist/esm/index.esm.js +1272 -0
  6. package/dist/esm/index.esm.js.map +1 -0
  7. package/dist/esm/package.json +1 -0
  8. package/dist/esm/src/api.d.ts +453 -0
  9. package/dist/esm/src/constants.d.ts +32 -0
  10. package/dist/esm/src/errors.d.ts +57 -0
  11. package/dist/esm/src/factory.d.ts +74 -0
  12. package/dist/esm/src/functions.d.ts +85 -0
  13. package/dist/esm/src/get-config.d.ts +72 -0
  14. package/dist/esm/src/helpers.d.ts +70 -0
  15. package/dist/esm/src/index.d.ts +14 -0
  16. package/dist/esm/src/initialize-analytics.d.ts +36 -0
  17. package/dist/esm/src/logger.d.ts +18 -0
  18. package/dist/esm/src/public-types.d.ts +282 -0
  19. package/dist/esm/src/types.d.ts +55 -0
  20. package/dist/esm/testing/get-fake-firebase-services.d.ts +29 -0
  21. package/dist/esm/testing/gtag-script-util.d.ts +1 -0
  22. package/dist/esm/testing/integration-tests/integration.d.ts +18 -0
  23. package/dist/esm/testing/setup.d.ts +17 -0
  24. package/dist/index.cjs.js +1287 -0
  25. package/dist/index.cjs.js.map +1 -0
  26. package/dist/src/api.d.ts +453 -0
  27. package/dist/src/constants.d.ts +32 -0
  28. package/dist/src/errors.d.ts +57 -0
  29. package/dist/src/factory.d.ts +74 -0
  30. package/dist/src/functions.d.ts +85 -0
  31. package/dist/src/get-config.d.ts +72 -0
  32. package/dist/src/global_index.d.ts +1056 -0
  33. package/dist/src/helpers.d.ts +70 -0
  34. package/dist/src/index.d.ts +14 -0
  35. package/dist/src/initialize-analytics.d.ts +36 -0
  36. package/dist/src/logger.d.ts +18 -0
  37. package/dist/src/public-types.d.ts +282 -0
  38. package/dist/src/tsdoc-metadata.json +11 -0
  39. package/dist/src/types.d.ts +55 -0
  40. package/dist/testing/get-fake-firebase-services.d.ts +29 -0
  41. package/dist/testing/gtag-script-util.d.ts +1 -0
  42. package/dist/testing/integration-tests/integration.d.ts +18 -0
  43. package/dist/testing/setup.d.ts +17 -0
  44. package/package.json +95 -0
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { DynamicConfig, DataLayer, Gtag, MinimalDynamicConfig } from './types';
18
+ /**
19
+ * Verifies and creates a TrustedScriptURL.
20
+ */
21
+ export declare function createGtagTrustedTypesScriptURL(url: string): string;
22
+ /**
23
+ * Makeshift polyfill for Promise.allSettled(). Resolves when all promises
24
+ * have either resolved or rejected.
25
+ *
26
+ * @param promises Array of promises to wait for.
27
+ */
28
+ export declare function promiseAllSettled<T>(promises: Array<Promise<T>>): Promise<T[]>;
29
+ /**
30
+ * Creates a TrustedTypePolicy object that implements the rules passed as policyOptions.
31
+ *
32
+ * @param policyName A string containing the name of the policy
33
+ * @param policyOptions Object containing implementations of instance methods for TrustedTypesPolicy, see {@link https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy#instance_methods
34
+ * | the TrustedTypePolicy reference documentation}.
35
+ */
36
+ export declare function createTrustedTypesPolicy(policyName: string, policyOptions: Partial<TrustedTypePolicyOptions>): Partial<TrustedTypePolicy> | undefined;
37
+ /**
38
+ * Inserts gtag script tag into the page to asynchronously download gtag.
39
+ * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").
40
+ */
41
+ export declare function insertScriptTag(dataLayerName: string, measurementId: string): void;
42
+ /**
43
+ * Get reference to, or create, global datalayer.
44
+ * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").
45
+ */
46
+ export declare function getOrCreateDataLayer(dataLayerName: string): DataLayer;
47
+ /**
48
+ * Creates global gtag function or wraps existing one if found.
49
+ * This wrapped function attaches Firebase instance ID (FID) to gtag 'config' and
50
+ * 'event' calls that belong to the GAID associated with this Firebase instance.
51
+ *
52
+ * @param initializationPromisesMap Map of appIds to their initialization promises.
53
+ * @param dynamicConfigPromisesList Array of dynamic config fetch promises.
54
+ * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.
55
+ * @param dataLayerName Name of global GA datalayer array.
56
+ * @param gtagFunctionName Name of global gtag function ("gtag" if not user-specified).
57
+ */
58
+ export declare function wrapOrCreateGtag(initializationPromisesMap: {
59
+ [appId: string]: Promise<string>;
60
+ }, dynamicConfigPromisesList: Array<Promise<DynamicConfig | MinimalDynamicConfig>>, measurementIdToAppId: {
61
+ [measurementId: string]: string;
62
+ }, dataLayerName: string, gtagFunctionName: string): {
63
+ gtagCore: Gtag;
64
+ wrappedGtag: Gtag;
65
+ };
66
+ /**
67
+ * Returns the script tag in the DOM matching both the gtag url pattern
68
+ * and the provided data layer name.
69
+ */
70
+ export declare function findGtagScriptOnPage(dataLayerName: string): HTMLScriptElement | null;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The Firebase Analytics Web SDK.
3
+ * This SDK does not work in a Node.js environment.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ import '@firebase/installations';
8
+ declare global {
9
+ interface Window {
10
+ [key: string]: unknown;
11
+ }
12
+ }
13
+ export * from './api';
14
+ export * from './public-types';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { DynamicConfig, Gtag, MinimalDynamicConfig } from './types';
18
+ import { _FirebaseInstallationsInternal } from '@firebase/installations';
19
+ import { FirebaseApp } from '@firebase/app';
20
+ import { AnalyticsSettings } from './public-types';
21
+ /**
22
+ * Initialize the analytics instance in gtag.js by calling config command with fid.
23
+ *
24
+ * NOTE: We combine analytics initialization and setting fid together because we want fid to be
25
+ * part of the `page_view` event that's sent during the initialization
26
+ * @param app Firebase app
27
+ * @param gtagCore The gtag function that's not wrapped.
28
+ * @param dynamicConfigPromisesList Array of all dynamic config promises.
29
+ * @param measurementIdToAppId Maps measurementID to appID.
30
+ * @param installations _FirebaseInstallationsInternal instance.
31
+ *
32
+ * @returns Measurement ID.
33
+ */
34
+ export declare function _initializeAnalytics(app: FirebaseApp, dynamicConfigPromisesList: Array<Promise<DynamicConfig | MinimalDynamicConfig>>, measurementIdToAppId: {
35
+ [key: string]: string;
36
+ }, installations: _FirebaseInstallationsInternal, gtagCore: Gtag, dataLayerName: string, options?: AnalyticsSettings): Promise<string>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { Logger } from '@firebase/logger';
18
+ export declare const logger: Logger;
@@ -0,0 +1,282 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { FirebaseApp } from '@firebase/app';
18
+ /**
19
+ * A set of common Google Analytics config settings recognized by
20
+ * `gtag.js`.
21
+ * @public
22
+ */
23
+ export interface GtagConfigParams {
24
+ /**
25
+ * Whether or not a page view should be sent.
26
+ * If set to true (default), a page view is automatically sent upon initialization
27
+ * of analytics.
28
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/views | Page views }
29
+ */
30
+ 'send_page_view'?: boolean;
31
+ /**
32
+ * The title of the page.
33
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/views | Page views }
34
+ */
35
+ 'page_title'?: string;
36
+ /**
37
+ * The URL of the page.
38
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/views | Page views }
39
+ */
40
+ 'page_location'?: string;
41
+ /**
42
+ * Defaults to `auto`.
43
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
44
+ */
45
+ 'cookie_domain'?: string;
46
+ /**
47
+ * Defaults to 63072000 (two years, in seconds).
48
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
49
+ */
50
+ 'cookie_expires'?: number;
51
+ /**
52
+ * Defaults to `_ga`.
53
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
54
+ */
55
+ 'cookie_prefix'?: string;
56
+ /**
57
+ * If set to true, will update cookies on each page load.
58
+ * Defaults to true.
59
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
60
+ */
61
+ 'cookie_update'?: boolean;
62
+ /**
63
+ * Appends additional flags to the cookie when set.
64
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
65
+ */
66
+ 'cookie_flags'?: string;
67
+ /**
68
+ * If set to false, disables all advertising features with `gtag.js`.
69
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
70
+ */
71
+ 'allow_google_signals'?: boolean;
72
+ /**
73
+ * If set to false, disables all advertising personalization with `gtag.js`.
74
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
75
+ */
76
+ 'allow_ad_personalization_signals'?: boolean;
77
+ [key: string]: unknown;
78
+ }
79
+ /**
80
+ * {@link Analytics} instance initialization options.
81
+ * @public
82
+ */
83
+ export interface AnalyticsSettings {
84
+ /**
85
+ * Params to be passed in the initial `gtag` config call during Firebase
86
+ * Analytics initialization.
87
+ */
88
+ config?: GtagConfigParams | EventParams;
89
+ }
90
+ /**
91
+ * Additional options that can be passed to Analytics method
92
+ * calls such as `logEvent`, etc.
93
+ * @public
94
+ */
95
+ export interface AnalyticsCallOptions {
96
+ /**
97
+ * If true, this config or event call applies globally to all
98
+ * Google Analytics properties on the page.
99
+ */
100
+ global: boolean;
101
+ }
102
+ /**
103
+ * An instance of Firebase Analytics.
104
+ * @public
105
+ */
106
+ export interface Analytics {
107
+ /**
108
+ * The {@link @firebase/app#FirebaseApp} this {@link Analytics} instance is associated with.
109
+ */
110
+ app: FirebaseApp;
111
+ }
112
+ /**
113
+ * Specifies custom options for your Firebase Analytics instance.
114
+ * You must set these before initializing `firebase.analytics()`.
115
+ * @public
116
+ */
117
+ export interface SettingsOptions {
118
+ /** Sets custom name for `gtag` function. */
119
+ gtagName?: string;
120
+ /** Sets custom name for `dataLayer` array used by `gtag.js`. */
121
+ dataLayerName?: string;
122
+ }
123
+ /**
124
+ * Any custom params the user may pass to `gtag`.
125
+ * @public
126
+ */
127
+ export interface CustomParams {
128
+ [key: string]: unknown;
129
+ }
130
+ /**
131
+ * Type for standard Google Analytics event names. `logEvent` also accepts any
132
+ * custom string and interprets it as a custom event name.
133
+ * @public
134
+ */
135
+ export type EventNameString = 'add_payment_info' | 'add_shipping_info' | 'add_to_cart' | 'add_to_wishlist' | 'begin_checkout' | 'checkout_progress' | 'exception' | 'generate_lead' | 'login' | 'page_view' | 'purchase' | 'refund' | 'remove_from_cart' | 'screen_view' | 'search' | 'select_content' | 'select_item' | 'select_promotion' | 'set_checkout_option' | 'share' | 'sign_up' | 'timing_complete' | 'view_cart' | 'view_item' | 'view_item_list' | 'view_promotion' | 'view_search_results';
136
+ /**
137
+ * Standard Google Analytics currency type.
138
+ * @public
139
+ */
140
+ export type Currency = string | number;
141
+ /**
142
+ * Standard Google Analytics `Item` type.
143
+ * @public
144
+ */
145
+ export interface Item {
146
+ item_id?: string;
147
+ item_name?: string;
148
+ item_brand?: string;
149
+ item_category?: string;
150
+ item_category2?: string;
151
+ item_category3?: string;
152
+ item_category4?: string;
153
+ item_category5?: string;
154
+ item_variant?: string;
155
+ price?: Currency;
156
+ quantity?: number;
157
+ index?: number;
158
+ coupon?: string;
159
+ item_list_name?: string;
160
+ item_list_id?: string;
161
+ discount?: Currency;
162
+ affiliation?: string;
163
+ creative_name?: string;
164
+ creative_slot?: string;
165
+ promotion_id?: string;
166
+ promotion_name?: string;
167
+ location_id?: string;
168
+ /** @deprecated Use item_brand instead. */
169
+ brand?: string;
170
+ /** @deprecated Use item_category instead. */
171
+ category?: string;
172
+ /** @deprecated Use item_id instead. */
173
+ id?: string;
174
+ /** @deprecated Use item_name instead. */
175
+ name?: string;
176
+ }
177
+ /**
178
+ * Field previously used by some Google Analytics events.
179
+ * @deprecated Use `Item` instead.
180
+ * @public
181
+ */
182
+ export interface Promotion {
183
+ creative_name?: string;
184
+ creative_slot?: string;
185
+ id?: string;
186
+ name?: string;
187
+ }
188
+ /**
189
+ * Standard `gtag.js` control parameters.
190
+ * For more information, see
191
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
192
+ * | the GA4 reference documentation}.
193
+ * @public
194
+ */
195
+ export interface ControlParams {
196
+ groups?: string | string[];
197
+ send_to?: string | string[];
198
+ event_callback?: () => void;
199
+ event_timeout?: number;
200
+ }
201
+ /**
202
+ * Standard `gtag.js` event parameters.
203
+ * For more information, see
204
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
205
+ * | the GA4 reference documentation}.
206
+ * @public
207
+ */
208
+ export interface EventParams {
209
+ checkout_option?: string;
210
+ checkout_step?: number;
211
+ item_id?: string;
212
+ content_type?: string;
213
+ coupon?: string;
214
+ currency?: string;
215
+ description?: string;
216
+ fatal?: boolean;
217
+ items?: Item[];
218
+ method?: string;
219
+ number?: string;
220
+ promotions?: Promotion[];
221
+ screen_name?: string;
222
+ /**
223
+ * Firebase-specific. Use to log a `screen_name` to Firebase Analytics.
224
+ */
225
+ firebase_screen?: string;
226
+ /**
227
+ * Firebase-specific. Use to log a `screen_class` to Firebase Analytics.
228
+ */
229
+ firebase_screen_class?: string;
230
+ search_term?: string;
231
+ shipping?: Currency;
232
+ tax?: Currency;
233
+ transaction_id?: string;
234
+ value?: number;
235
+ event_label?: string;
236
+ event_category?: string;
237
+ shipping_tier?: string;
238
+ item_list_id?: string;
239
+ item_list_name?: string;
240
+ promotion_id?: string;
241
+ promotion_name?: string;
242
+ payment_type?: string;
243
+ affiliation?: string;
244
+ page_title?: string;
245
+ page_location?: string;
246
+ page_path?: string;
247
+ [key: string]: unknown;
248
+ }
249
+ /**
250
+ * Consent status settings for each consent type.
251
+ * For more information, see
252
+ * {@link https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
253
+ * | the GA4 reference documentation for consent state and consent types}.
254
+ * @public
255
+ */
256
+ export interface ConsentSettings {
257
+ /** Enables storage, such as cookies, related to advertising */
258
+ ad_storage?: ConsentStatusString;
259
+ /** Sets consent for sending user data to Google for advertising purposes. */
260
+ ad_user_data?: ConsentStatusString;
261
+ /** Sets consent for personalized advertising. */
262
+ ad_personalization?: ConsentStatusString;
263
+ /** Enables storage, such as cookies, related to analytics (for example, visit duration) */
264
+ analytics_storage?: ConsentStatusString;
265
+ /**
266
+ * Enables storage that supports the functionality of the website or app such as language settings
267
+ */
268
+ functionality_storage?: ConsentStatusString;
269
+ /** Enables storage related to personalization such as video recommendations */
270
+ personalization_storage?: ConsentStatusString;
271
+ /**
272
+ * Enables storage related to security such as authentication functionality, fraud prevention,
273
+ * and other user protection.
274
+ */
275
+ security_storage?: ConsentStatusString;
276
+ [key: string]: unknown;
277
+ }
278
+ /**
279
+ * Whether a particular consent type has been granted or denied.
280
+ * @public
281
+ */
282
+ export type ConsentStatusString = 'granted' | 'denied';
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "0.1.2"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { ControlParams, EventParams, CustomParams, ConsentSettings } from './public-types';
18
+ /**
19
+ * Encapsulates metadata concerning throttled fetch requests.
20
+ */
21
+ export interface ThrottleMetadata {
22
+ backoffCount: number;
23
+ throttleEndTimeMillis: number;
24
+ }
25
+ /**
26
+ * Dynamic configuration fetched from server.
27
+ * See https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps/getConfig
28
+ */
29
+ export interface DynamicConfig {
30
+ projectId: string;
31
+ appId: string;
32
+ databaseURL: string;
33
+ storageBucket: string;
34
+ locationId: string;
35
+ apiKey: string;
36
+ authDomain: string;
37
+ messagingSenderId: string;
38
+ measurementId: string;
39
+ }
40
+ export interface MinimalDynamicConfig {
41
+ appId: string;
42
+ measurementId: string;
43
+ }
44
+ /**
45
+ * Standard `gtag` function provided by gtag.js.
46
+ */
47
+ export interface Gtag {
48
+ (command: 'config', targetId: string, config?: ControlParams | EventParams | CustomParams): void;
49
+ (command: 'set', config: CustomParams): void;
50
+ (command: 'event', eventName: string, eventParams?: ControlParams | EventParams | CustomParams): void;
51
+ (command: 'consent', subCommand: 'default' | 'update', consentSettings: ConsentSettings): void;
52
+ (command: 'get', measurementId: string, fieldName: string, callback: (...args: unknown[]) => void): void;
53
+ (command: string, ...args: unknown[]): void;
54
+ }
55
+ export type DataLayer = IArguments[];
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { FirebaseApp } from '@firebase/app';
18
+ import { _FirebaseInstallationsInternal } from '@firebase/installations';
19
+ export declare function getFakeApp(fakeAppParams?: {
20
+ appId?: string;
21
+ apiKey?: string;
22
+ measurementId?: string;
23
+ }): FirebaseApp;
24
+ export declare function getFakeInstallations(fid?: string, onFidResolve?: Function): _FirebaseInstallationsInternal;
25
+ export declare function getFullApp(fakeAppParams?: {
26
+ appId?: string;
27
+ apiKey?: string;
28
+ measurementId?: string;
29
+ }): FirebaseApp;
@@ -0,0 +1 @@
1
+ export declare function removeGtagScripts(): void;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '@firebase/installations';
18
+ import '../setup';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export {};
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "@depup/firebase__analytics",
3
+ "version": "0.10.20-depup.0",
4
+ "description": "[DepUp] A analytics package for new firebase packages",
5
+ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
+ "main": "dist/index.cjs.js",
7
+ "browser": "dist/esm/index.esm.js",
8
+ "module": "dist/esm/index.esm.js",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/analytics-public.d.ts",
12
+ "require": "./dist/index.cjs.js",
13
+ "default": "./dist/esm/index.esm.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "changes.json",
20
+ "README.md"
21
+ ],
22
+ "scripts": {
23
+ "lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
24
+ "lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
25
+ "build": "rollup -c && yarn api-report",
26
+ "build:release": "yarn build && yarn typings:public",
27
+ "build:deps": "lerna run --scope @firebase/analytics --include-dependencies build",
28
+ "dev": "rollup -c -w",
29
+ "test": "run-p --npm-path npm lint test:all",
30
+ "test:all": "run-p --npm-path npm test:browser test:integration",
31
+ "test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
32
+ "test:browser": "karma start --nocache",
33
+ "test:integration": "karma start ./karma.integration.conf.js --nocache",
34
+ "trusted-type-check": "tsec -p tsconfig.json --noEmit",
35
+ "api-report": "api-extractor run --local --verbose",
36
+ "doc": "api-documenter markdown --input temp --output docs",
37
+ "build:doc": "yarn build && yarn doc",
38
+ "typings:public": "node ../../scripts/build/use_typings.js ./dist/analytics-public.d.ts"
39
+ },
40
+ "peerDependencies": {
41
+ "@firebase/app": "0.x"
42
+ },
43
+ "dependencies": {
44
+ "@firebase/installations": "0.6.20",
45
+ "@firebase/logger": "0.5.0",
46
+ "@firebase/util": "1.14.0",
47
+ "@firebase/component": "0.7.1",
48
+ "tslib": "^2.8.1"
49
+ },
50
+ "license": "Apache-2.0",
51
+ "devDependencies": {
52
+ "@firebase/app": "0.14.9",
53
+ "rollup": "2.79.2",
54
+ "rollup-plugin-dts": "5.3.1",
55
+ "@rollup/plugin-commonjs": "21.1.0",
56
+ "@rollup/plugin-json": "6.1.0",
57
+ "@rollup/plugin-node-resolve": "16.0.0",
58
+ "rollup-plugin-typescript2": "0.36.0",
59
+ "typescript": "5.5.4"
60
+ },
61
+ "repository": {
62
+ "directory": "packages/analytics",
63
+ "type": "git",
64
+ "url": "git+https://github.com/firebase/firebase-js-sdk.git"
65
+ },
66
+ "bugs": {
67
+ "url": "https://github.com/firebase/firebase-js-sdk/issues"
68
+ },
69
+ "typings": "./dist/analytics-public.d.ts",
70
+ "nyc": {
71
+ "extension": [
72
+ ".ts"
73
+ ],
74
+ "reportDir": "./coverage/node"
75
+ },
76
+ "keywords": [
77
+ "depup",
78
+ "dependency-bumped",
79
+ "updated-deps",
80
+ "@firebase/analytics"
81
+ ],
82
+ "depup": {
83
+ "changes": {
84
+ "tslib": {
85
+ "from": "^2.1.0",
86
+ "to": "^2.8.1"
87
+ }
88
+ },
89
+ "depsUpdated": 1,
90
+ "originalPackage": "@firebase/analytics",
91
+ "originalVersion": "0.10.20",
92
+ "processedAt": "2026-03-17T16:31:28.119Z",
93
+ "smokeTest": "failed"
94
+ }
95
+ }