Skip to content

Commit c31087e

Browse files
afharokibanamachine
andcommitted
Add @kbn/analytics to UI Shared Deps (#91810)
Co-authored-by: Kibana Machine <[email protected]>
1 parent 60c9fdc commit c31087e

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

packages/kbn-analytics/src/index.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
* Side Public License, v 1.
77
*/
88

9-
export { ReportHTTP, Reporter, ReporterConfig } from './reporter';
10-
export { UiCounterMetricType, METRIC_TYPE } from './metrics';
11-
export { Report, ReportManager } from './report';
9+
// Export types separately to the actual run-time objects
10+
export type { ReportHTTP, ReporterConfig } from './reporter';
11+
export type { UiCounterMetricType } from './metrics';
12+
export type { Report } from './report';
13+
export type { Storage } from './storage';
14+
15+
export { Reporter } from './reporter';
16+
export { METRIC_TYPE } from './metrics';
17+
export { ReportManager } from './report';
1218
export { ApplicationUsageTracker } from './application_usage_tracker';
13-
export { Storage } from './storage';

packages/kbn-analytics/src/metrics/index.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
* Side Public License, v 1.
77
*/
88

9-
import { UiCounterMetric } from './ui_counter';
10-
import { UserAgentMetric } from './user_agent';
11-
import { ApplicationUsageMetric } from './application_usage';
9+
import type { UiCounterMetric } from './ui_counter';
10+
import type { UserAgentMetric } from './user_agent';
11+
import type { ApplicationUsageMetric } from './application_usage';
1212

13-
export { UiCounterMetric, createUiCounterMetric, UiCounterMetricType } from './ui_counter';
13+
// Export types separately to the actual run-time objects
14+
export type { ApplicationUsageMetric } from './application_usage';
15+
export type { UiCounterMetric, UiCounterMetricType } from './ui_counter';
16+
17+
export { createUiCounterMetric } from './ui_counter';
1418
export { trackUsageAgent } from './user_agent';
15-
export { createApplicationUsageMetric, ApplicationUsageMetric } from './application_usage';
19+
export { createApplicationUsageMetric } from './application_usage';
1620

1721
export type Metric = UiCounterMetric | UserAgentMetric | ApplicationUsageMetric;
1822
export enum METRIC_TYPE {

packages/kbn-ui-shared-deps/entry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ export const LodashFp = require('lodash/fp');
4646

4747
// runtime deps which don't need to be copied across all bundles
4848
export const TsLib = require('tslib');
49+
export const KbnAnalytics = require('@kbn/analytics');

packages/kbn-ui-shared-deps/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ exports.externals = {
5757
* runtime deps which don't need to be copied across all bundles
5858
*/
5959
tslib: '__kbnSharedDeps__.TsLib',
60+
'@kbn/analytics': '__kbnSharedDeps__.KbnAnalytics',
6061
};
6162
exports.publicPathLoader = require.resolve('./public_path_loader');

0 commit comments

Comments
 (0)