Skip to content

Commit

Permalink
do not export all the types from licensing plugin (#110942) (#110963)
Browse files Browse the repository at this point in the history
* do not export all the types from licensing plugin

* another export issue

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
  • Loading branch information
kibanamachine and mshustov authored Sep 2, 2021
1 parent 90de809 commit 54cea57
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 23 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);
7 changes: 2 additions & 5 deletions x-pack/plugins/licensing/public/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
* 2.0.
*/

export {
FeatureUsageService,
FeatureUsageServiceSetup,
FeatureUsageServiceStart,
} from './feature_usage_service';
export { FeatureUsageService } from './feature_usage_service';
export type { FeatureUsageServiceSetup, FeatureUsageServiceStart } from './feature_usage_service';
33 changes: 26 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,35 @@
* 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 { LICENSE_TYPE } 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';
7 changes: 2 additions & 5 deletions x-pack/plugins/licensing/server/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
* 2.0.
*/

export {
FeatureUsageService,
FeatureUsageServiceSetup,
FeatureUsageServiceStart,
} from './feature_usage_service';
export { FeatureUsageService } from './feature_usage_service';
export type { FeatureUsageServiceSetup, FeatureUsageServiceStart } from './feature_usage_service';
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 54cea57

Please sign in to comment.