Skip to content

Commit

Permalink
do not export all the types from licensing plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Sep 2, 2021
1 parent fb77be2 commit 06effae
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 13 deletions.
18 changes: 13 additions & 5 deletions x-pack/plugins/licensing/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
* 2.0.
*/

// TODO: https://github.com/elastic/kibana/issues/110902
/* eslint-disable @kbn/eslint/no_export_all */
import type { PluginInitializerContext } from 'src/core/public';

import { PluginInitializerContext } from 'src/core/public';
import { LicensingPlugin } from './plugin';

export * from '../common/types';
export { LicensingPluginSetup, LicensingPluginStart } from './types';
export type {
LicenseCheckState,
LicenseType,
LicenseStatus,
LicenseFeature,
PublicLicense,
PublicFeatures,
PublicLicenseJSON,
LicenseCheck,
ILicense,
} from '../common/types';
export type { LicensingPluginSetup, LicensingPluginStart } from './types';
export const plugin = (context: PluginInitializerContext) => new LicensingPlugin(context);
31 changes: 24 additions & 7 deletions x-pack/plugins/licensing/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,33 @@
* 2.0.
*/

// TODO: https://github.com/elastic/kibana/issues/110902
/* eslint-disable @kbn/eslint/no_export_all */

import { PluginInitializerContext } from 'src/core/server';
import { LicensingPlugin } from './plugin';

export const plugin = (context: PluginInitializerContext) => new LicensingPlugin(context);

export * from '../common/types';
export { FeatureUsageServiceSetup, FeatureUsageServiceStart } from './services';
export * from './types';
export type {
LicenseCheckState,
LicenseType,
LicenseStatus,
LicenseFeature,
PublicLicense,
PublicFeatures,
PublicLicenseJSON,
LicenseCheck,
ILicense,
} from '../common/types';

export type { FeatureUsageServiceSetup, FeatureUsageServiceStart } from './services';

export type {
ElasticsearchError,
LicensingApiRequestHandlerContext,
LicensingPluginSetup,
LicensingPluginStart,
} from './types';

export { config } from './licensing_config';
export { CheckLicense, wrapRouteWithLicenseCheck } from './wrap_route_with_license_check';

export type { CheckLicense } from './wrap_route_with_license_check';
export { wrapRouteWithLicenseCheck } from './wrap_route_with_license_check';
3 changes: 2 additions & 1 deletion x-pack/plugins/licensing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
"declarationMap": true,
"isolatedModules": true,
},
"include": [
"public/**/*",
Expand Down

0 comments on commit 06effae

Please sign in to comment.