()
| 367 | } |
| 368 | |
| 369 | function isDebugMode(): boolean { |
| 370 | const account = getGlobalDefaultAccount(); |
| 371 | if (account?.user.email.endsWith("@google.com")) { |
| 372 | try { |
| 373 | require("../tsconfig.json"); |
| 374 | logger.debug( |
| 375 | `Using Google Analytics in DEBUG mode. Emulators (+ UI) events will be shown in GA Debug View only.`, |
| 376 | ); |
| 377 | return true; |
| 378 | } catch { |
| 379 | // The file above present in the repo but not packaged to npm. If require |
| 380 | // fails, just turn off debug mode since the CLI is not in development. |
| 381 | } |
| 382 | } |
| 383 | return false; |
| 384 | } |
no test coverage detected
searching dependent graphs…