Add tsconfig for url_forwarding (#81177)

Also add missing pieces to kibana_react, as a follow-up to #80992.

References #80508
References #81003
This commit is contained in:
Nathan L Smith 2020-10-27 15:18:30 -05:00 committed by GitHub
parent 5996bc3e3b
commit d1827dc461
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 173 additions and 29 deletions

View file

@ -19,6 +19,7 @@
jest.mock('@elastic/apm-rum');
import { init, apm } from '@elastic/apm-rum';
import { DeeplyMockedKeys } from '../typings';
import { ApmSystem } from './apm_system';
const initMock = init as jest.Mocked<typeof init>;

View file

@ -18,6 +18,7 @@
*/
import { BehaviorSubject } from 'rxjs';
import type { PublicMethodsOf } from '@kbn/utility-types';
import { DeeplyMockedKeys } from '../../typings';
import { ChromeBadge, ChromeBrand, ChromeBreadcrumb, ChromeService, InternalChromeStart } from './';
const createStartContractMock = () => {

View file

@ -17,6 +17,7 @@
* under the License.
*/
import type { PublicMethodsOf } from '@kbn/utility-types';
import { MockedKeys } from '../../typings';
import {
NotificationsService,
NotificationsSetup,

View file

@ -17,6 +17,7 @@
* under the License.
*/
import type { PublicMethodsOf } from '@kbn/utility-types';
import { DeeplyMockedKeys } from '../../typings';
import { OverlayService, OverlayStart } from './overlay_service';
import { overlayBannersServiceMock } from './banners/banners_service.mock';
import { overlayFlyoutServiceMock } from './flyout/flyout_service.mock';

View file

@ -18,6 +18,7 @@
*/
import { REPO_ROOT } from '@kbn/dev-utils';
import { DeeplyMockedKeys } from '../typings';
import { CoreContext } from './core_context';
import { Env, IConfigService } from './config';
import { configServiceMock, getEnvOptions } from './config/mocks';

View file

@ -18,6 +18,7 @@
*/
import { Client, ApiResponse } from '@elastic/elasticsearch';
import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport';
import { DeeplyMockedKeys } from '../../../typings';
import { ElasticsearchClient } from './types';
import { ICustomClusterClient } from './cluster_client';

View file

@ -19,6 +19,7 @@
import { of } from 'rxjs';
import { duration } from 'moment';
import { ByteSizeValue } from '@kbn/config-schema';
import { MockedKeys } from '../typings';
import { PluginInitializerContext, CoreSetup, CoreStart, StartServicesAccessor } from '.';
import { loggingSystemMock } from './logging/logging_system.mock';
import { loggingServiceMock } from './logging/logging_service.mock';

View file

@ -17,11 +17,11 @@
* under the License.
*/
type DeeplyMockedKeys<T> = {
export type DeeplyMockedKeys<T> = {
[P in keyof T]: T[P] extends (...args: any[]) => any
? jest.MockInstance<ReturnType<T[P]>, Parameters<T[P]>>
: DeeplyMockedKeys<T[P]>;
} &
T;
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<T[P]> };
export type MockedKeys<T> = { [P in keyof T]: jest.Mocked<T[P]> };

View file

@ -0,0 +1,31 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { Injectable, IDirectiveFactory, IScope, IAttributes, IController } from 'angular';
export const createTopNavDirective: Injectable<IDirectiveFactory<
IScope,
JQLite,
IAttributes,
IController
>>;
export const createTopNavHelper: (
options: unknown
) => Injectable<IDirectiveFactory<IScope, JQLite, IAttributes, IController>>;
export function loadKbnTopNavDirectives(navUi: unknown): void;

View file

@ -0,0 +1,20 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export function PromiseServiceCreator($q: unknown, $timeout: unknown): (fn: unknown) => unknown;

View file

@ -0,0 +1,20 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export function watchMultiDecorator($provide: unknown): void;

View file

@ -0,0 +1,27 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { Injectable, IDirectiveFactory, IScope, IAttributes, IController } from 'angular';
export const KbnAccessibleClickProvider: Injectable<IDirectiveFactory<
IScope,
JQLite,
IAttributes,
IController
>>;

View file

@ -17,4 +17,8 @@
* under the License.
*/
import { IServiceProvider } from 'angular';
export type IPrivate = <T>(provider: (...injectable: any[]) => T) => T;
export function PrivateProvider(): IServiceProvider;

View file

@ -0,0 +1,20 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export function registerListenEventListener($rootScope: unknown): void;

View file

@ -0,0 +1,15 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["public/**/*"],
"references": [
{ "path": "../../core/tsconfig.json" },
{ "path": "../kibana_legacy/tsconfig.json" }
]
}

View file

@ -9,13 +9,15 @@
"src/test_utils/**/*",
"src/core/**/*",
"src/plugins/kibana_legacy/**/*",
"src/plugins/kibana_usage_collection/**/*",
"src/plugins/kibana_utils/**/*",
"src/plugins/kibana_react/**/*",
"src/plugins/usage_collection/**/*",
"src/plugins/telemetry_collection_manager/**/*",
"src/plugins/kibana_utils/**/*",
"src/plugins/newsfeed/**/*",
"src/plugins/telemetry/**/*",
"src/plugins/kibana_usage_collection/**/*",
"src/plugins/newsfeed/**/*"
"src/plugins/telemetry_collection_manager/**/*",
"src/plugins/url_forwarding/**/*",
"src/plugins/usage_collection/**/*"
// In the build we actually exclude **/public/**/* from this config so that
// we can run the TSC on both this and the .browser version of this config
// file, but if we did it during development IDEs would not be able to find

View file

@ -1,14 +1,16 @@
{
"include": [],
"references": [
{ "path": "./src/test_utils/tsconfig.json" },
{ "path": "./src/core/tsconfig.json" },
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
{ "path": "./src/test_utils/tsconfig.json" },
{ "path": "./src/plugins/kibana_legacy/tsconfig.json" },
{ "path": "./src/plugins/kibana_react/tsconfig.json" },
{ "path": "./src/plugins/usage_collection/tsconfig.json" },
{ "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" },
{ "path": "./src/plugins/telemetry/tsconfig.json" },
{ "path": "./src/plugins/kibana_usage_collection/tsconfig.json" },
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
{ "path": "./src/plugins/newsfeed/tsconfig.json" },
{ "path": "./src/plugins/telemetry/tsconfig.json" },
{ "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" },
{ "path": "./src/plugins/url_forwarding/tsconfig.json" },
{ "path": "./src/plugins/usage_collection/tsconfig.json" }
]
}

View file

@ -1,20 +1,14 @@
{
"extends": "../tsconfig.base.json",
"include": [
"mocks.ts",
"typings/**/*",
"plugins/**/*",
"test_utils/**/*",
"tasks/**/*"
],
"include": ["mocks.ts", "typings/**/*", "plugins/**/*", "test_utils/**/*", "tasks/**/*"],
"exclude": [
"test/**/*",
"plugins/security_solution/cypress/**/*",
"plugins/apm/e2e/cypress/**/*",
"plugins/apm/scripts/**/*",
"plugins/licensing/**/*",
"plugins/global_search/**/*",
"plugins/telemetry_collection_xpack/**/*"
"plugins/licensing/**/*",
"plugins/security_solution/cypress/**/*",
"plugins/telemetry_collection_xpack/**/*",
"test/**/*"
],
"compilerOptions": {
"paths": {
@ -28,15 +22,17 @@
},
"references": [
{ "path": "../src/core/tsconfig.json" },
{ "path": "../src/plugins/kibana_utils/tsconfig.json" },
{ "path": "../src/plugins/kibana_legacy/tsconfig.json" },
{ "path": "../src/plugins/kibana_react/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
{ "path": "./plugins/global_search/tsconfig.json" },
{ "path": "../src/plugins/usage_collection/tsconfig.json" },
{ "path": "../src/plugins/telemetry_collection_manager/tsconfig.json" },
{ "path": "../src/plugins/telemetry/tsconfig.json" },
{ "path": "../src/plugins/kibana_usage_collection/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
{ "path": "../src/plugins/kibana_utils/tsconfig.json" },
{ "path": "../src/plugins/newsfeed/tsconfig.json" },
{ "path": "../src/plugins/telemetry/tsconfig.json" },
{ "path": "../src/plugins/telemetry_collection_manager/tsconfig.json" },
{ "path": "../src/plugins/url_forwarding/tsconfig.json" },
{ "path": "../src/plugins/usage_collection/tsconfig.json" },
{ "path": "./plugins/global_search/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" }
]
}