do not export all the types from licensing plugin (#110942)

* do not export all the types from licensing plugin

* another export issue
This commit is contained in:
Mikhail Shustov 2021-09-02 14:08:02 +03:00 committed by GitHub
parent 88617325f3
commit 1205ba4ce0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 23 deletions

View file

@ -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);

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -4,7 +4,8 @@
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
"declarationMap": true,
"isolatedModules": true,
},
"include": [
"public/**/*",