@salesforce/telemetry 5.0.20 → 6.0.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.
@@ -10,7 +10,7 @@ export type Measurements = {
10
10
  export type Attributes = {
11
11
  [key: string]: string | number | boolean | null | undefined;
12
12
  };
13
- export interface TelemetryOptions {
13
+ export type TelemetryOptions = {
14
14
  project: string;
15
15
  key: string;
16
16
  commonProperties?: Properties;
@@ -20,7 +20,7 @@ export interface TelemetryOptions {
20
20
  userId?: string;
21
21
  sessionId?: string;
22
22
  waitForConnection?: boolean;
23
- }
23
+ };
24
24
  export declare function getPlatformVersion(): string;
25
25
  export declare function getCpus(): string;
26
26
  export declare function buildPropertiesAndMeasurements(attributes: Attributes): {
@@ -31,7 +31,7 @@ exports.AppInsights = exports.buildPropertiesAndMeasurements = exports.getCpus =
31
31
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
32
32
  */
33
33
  const os = __importStar(require("node:os"));
34
- const core_1 = require("@salesforce/core");
34
+ const logger_1 = require("@salesforce/core/logger");
35
35
  const kit_1 = require("@salesforce/kit");
36
36
  const appInsights = __importStar(require("applicationinsights"));
37
37
  var applicationinsights_1 = require("applicationinsights");
@@ -110,7 +110,7 @@ class AppInsights extends kit_1.AsyncCreatable {
110
110
  }
111
111
  }
112
112
  async init() {
113
- this.logger = await core_1.Logger.child('AppInsights');
113
+ this.logger = await logger_1.Logger.child('AppInsights');
114
114
  this.createAppInsightsClient();
115
115
  }
116
116
  /**
@@ -1,4 +1,4 @@
1
- import { ConfigAggregator } from '@salesforce/core/lib/config/configAggregator';
1
+ import { ConfigAggregator } from '@salesforce/core/configAggregator';
2
2
  /**
3
3
  *
4
4
  * Check ConfigAggregator once for telemetry opt-out. Returns true unless config/env has opt-out
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.isEnabled = void 0;
10
10
  // deep imports to avoid requiring the ENTIRE package (which will also pull in jsforce) until we get ESM done
11
- const configAggregator_1 = require("@salesforce/core/lib/config/configAggregator");
12
- const config_1 = require("@salesforce/core/lib/config/config");
11
+ const configAggregator_1 = require("@salesforce/core/configAggregator");
12
+ const config_1 = require("@salesforce/core/config");
13
13
  // store the result to reduce checks
14
14
  let enabled;
15
15
  /**
@@ -1,6 +1,6 @@
1
1
  import { AsyncCreatable } from '@salesforce/kit';
2
2
  import { type Attributes, type Properties, type TelemetryOptions } from './appInsights';
3
- import { TelemetryClient } from './exported';
3
+ import { TelemetryClient } from './appInsights';
4
4
  export { TelemetryOptions, Attributes, Properties, TelemetryClient } from './appInsights';
5
5
  /**
6
6
  * Reports telemetry events to app insights. We do not send if the config 'disableTelemetry' is set.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/telemetry",
3
- "version": "5.0.20",
3
+ "version": "6.0.0",
4
4
  "description": "Library for application insights",
5
5
  "main": "lib/exported",
6
6
  "exports": {
@@ -40,16 +40,16 @@
40
40
  "!lib/**/*.map"
41
41
  ],
42
42
  "dependencies": {
43
- "@salesforce/core": "^6.7.3",
43
+ "@salesforce/core": "^7.0.0",
44
44
  "@salesforce/kit": "^3.1.0",
45
45
  "applicationinsights": "^2.9.5",
46
46
  "got": "^11",
47
47
  "proxy-agent": "^6.4.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@salesforce/dev-scripts": "^8.4.2",
50
+ "@salesforce/dev-scripts": "^8.5.0",
51
51
  "ts-node": "^10.9.2",
52
- "typescript": "^5.4.3"
52
+ "typescript": "^5.4.4"
53
53
  },
54
54
  "types": "lib/exported.d.ts",
55
55
  "publishConfig": {