agdi 2.11.0 → 2.11.2

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  loadConfig,
3
3
  saveConfig
4
- } from "./chunk-S45VXJEO.js";
4
+ } from "./chunk-OPFFFAQC.js";
5
5
 
6
6
  // src/core/telemetry/config.ts
7
7
  import { randomUUID } from "crypto";
@@ -10,21 +10,24 @@ var DEFAULT_CONFIG = {
10
10
  consentAsked: false
11
11
  };
12
12
  function isTelemetryEnabled() {
13
+ var _a;
13
14
  const config = loadConfig();
14
- return config.telemetry?.enabled ?? false;
15
+ return ((_a = config.telemetry) == null ? void 0 : _a.enabled) ?? false;
15
16
  }
16
17
  function hasAskedForConsent() {
18
+ var _a;
17
19
  const config = loadConfig();
18
- return config.telemetry?.consentAsked ?? false;
20
+ return ((_a = config.telemetry) == null ? void 0 : _a.consentAsked) ?? false;
19
21
  }
20
22
  function setTelemetryConsent(enabled) {
23
+ var _a;
21
24
  const config = loadConfig();
22
25
  config.telemetry = {
23
26
  ...DEFAULT_CONFIG,
24
27
  ...config.telemetry,
25
28
  enabled,
26
29
  consentAsked: true,
27
- anonymousId: config.telemetry?.anonymousId ?? generateAnonymousId()
30
+ anonymousId: ((_a = config.telemetry) == null ? void 0 : _a.anonymousId) ?? generateAnonymousId()
28
31
  };
29
32
  saveConfig(config);
30
33
  }
@@ -38,8 +41,9 @@ function markConsentAsked() {
38
41
  saveConfig(config);
39
42
  }
40
43
  function getAnonymousId() {
44
+ var _a;
41
45
  const config = loadConfig();
42
- if (config.telemetry?.anonymousId) {
46
+ if ((_a = config.telemetry) == null ? void 0 : _a.anonymousId) {
43
47
  return config.telemetry.anonymousId;
44
48
  }
45
49
  const anonymousId = generateAnonymousId();
@@ -5,9 +5,9 @@ import {
5
5
  isTelemetryEnabled,
6
6
  markConsentAsked,
7
7
  setTelemetryConsent
8
- } from "./chunk-M2FF7ETI.js";
9
- import "./chunk-S45VXJEO.js";
10
- import "./chunk-3RG5ZIWI.js";
8
+ } from "./chunk-UN5WZ5PG.js";
9
+ import "./chunk-OPFFFAQC.js";
10
+ import "./chunk-EAQYK3U2.js";
11
11
  export {
12
12
  getAnonymousId,
13
13
  getTelemetryConfig,
@@ -0,0 +1,13 @@
1
+ import {
2
+ getConfigDir,
3
+ loadConfig,
4
+ saveConfig,
5
+ secureDeleteConfig
6
+ } from "./chunk-OPFFFAQC.js";
7
+ import "./chunk-EAQYK3U2.js";
8
+ export {
9
+ getConfigDir,
10
+ loadConfig,
11
+ saveConfig,
12
+ secureDeleteConfig
13
+ };