Skip to content

Commit

Permalink
Add @kbn/analytics to UI Shared Deps (#91810)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
afharo and kibanamachine authored Feb 19, 2021
1 parent 4e2601d commit fb2f6ab
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
13 changes: 9 additions & 4 deletions packages/kbn-analytics/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
* Side Public License, v 1.
*/

export { ReportHTTP, Reporter, ReporterConfig } from './reporter';
export { UiCounterMetricType, METRIC_TYPE } from './metrics';
export { Report, ReportManager } from './report';
// Export types separately to the actual run-time objects
export type { ReportHTTP, ReporterConfig } from './reporter';
export type { UiCounterMetricType } from './metrics';
export type { Report } from './report';
export type { Storage } from './storage';

export { Reporter } from './reporter';
export { METRIC_TYPE } from './metrics';
export { ReportManager } from './report';
export { ApplicationUsageTracker } from './application_usage_tracker';
export { Storage } from './storage';
14 changes: 9 additions & 5 deletions packages/kbn-analytics/src/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
* Side Public License, v 1.
*/

import { UiCounterMetric } from './ui_counter';
import { UserAgentMetric } from './user_agent';
import { ApplicationUsageMetric } from './application_usage';
import type { UiCounterMetric } from './ui_counter';
import type { UserAgentMetric } from './user_agent';
import type { ApplicationUsageMetric } from './application_usage';

export { UiCounterMetric, createUiCounterMetric, UiCounterMetricType } from './ui_counter';
// Export types separately to the actual run-time objects
export type { ApplicationUsageMetric } from './application_usage';
export type { UiCounterMetric, UiCounterMetricType } from './ui_counter';

export { createUiCounterMetric } from './ui_counter';
export { trackUsageAgent } from './user_agent';
export { createApplicationUsageMetric, ApplicationUsageMetric } from './application_usage';
export { createApplicationUsageMetric } from './application_usage';

export type Metric = UiCounterMetric | UserAgentMetric | ApplicationUsageMetric;
export enum METRIC_TYPE {
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ export const LodashFp = require('lodash/fp');

// runtime deps which don't need to be copied across all bundles
export const TsLib = require('tslib');
export const KbnAnalytics = require('@kbn/analytics');
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ exports.externals = {
* runtime deps which don't need to be copied across all bundles
*/
tslib: '__kbnSharedDeps__.TsLib',
'@kbn/analytics': '__kbnSharedDeps__.KbnAnalytics',
};
exports.publicPathLoader = require.resolve('./public_path_loader');

0 comments on commit fb2f6ab

Please sign in to comment.