[chore] Add rule to avoid duplicate fp-ts imports (#218593)

## Summary

This PR is the counter part of
https://github.com/elastic/kibana/pull/217034 to avoid making the same
mistake again in the future.
This commit is contained in:
Marco Liberati 2025-04-23 16:35:17 +02:00 committed by GitHub
parent 98fa0f8ef4
commit 20ad78de1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
207 changed files with 455 additions and 345 deletions

View file

@ -275,6 +275,116 @@ const RESTRICTED_IMPORTS = [
name: '@testing-library/react-hooks',
message: 'Please use @testing-library/react instead',
},
...[
'Alt',
'Alternative',
'Applicative',
'Apply',
'Array',
'Bifunctor',
'boolean',
'BooleanAlgebra',
'Bounded',
'BoundedDistributiveLattice',
'BoundedJoinSemilattice',
'BoundedLattice',
'BoundedMeetSemilattice',
'Category',
'Chain',
'ChainRec',
'Choice',
'Comonad',
'Compactable',
'Console',
'Const',
'Contravariant',
'Date',
'DistributiveLattice',
'Either',
'EitherT',
'Eq',
'Extend',
'Field',
'Filterable',
'FilterableWithIndex',
'Foldable',
'FoldableWithIndex',
'function',
'Functor',
'FunctorWithIndex',
'Group',
'HeytingAlgebra',
'Identity',
'Invariant',
'IO',
'IOEither',
'IORef',
'JoinSemilattice',
'Lattice',
'Magma',
'Map',
'MeetSemilattice',
'Monad',
'MonadIO',
'MonadTask',
'MonadThrow',
'Monoid',
'NonEmptyArray',
'Option',
'OptionT',
'Ord',
'Ordering',
'pipeable',
'Profunctor',
'Random',
'Reader',
'ReaderEither',
'ReaderT',
'ReaderTask',
'ReaderTaskEither',
'ReadonlyArray',
'ReadonlyMap',
'ReadonlyNonEmptyArray',
'ReadonlyRecord',
'ReadonlySet',
'ReadonlyTuple',
'Record',
'Ring',
'Semigroup',
'Semigroupoid',
'Semiring',
'Set',
'Show',
'State',
'StateReaderTaskEither',
'StateT',
'Store',
'Strong',
'Task',
'TaskEither',
'TaskThese',
'These',
'TheseT',
'Traced',
'Traversable',
'TraversableWithIndex',
'Tree',
'Tuple',
'Unfoldable',
'ValidationT',
'Witherable',
'Writer',
'WriterT',
].map((subset) => {
return {
name: `fp-ts/lib/${subset}`,
message: `Please, use fp-ts/${subset} to avoid duplicating the package import`,
};
}),
{
name: `fp-ts/lib`,
message: `Please, use fp-ts to avoid duplicating the package import`,
},
];
module.exports = {

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { errors as esErrors } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { calculateExcludeFilters } from './calculate_exclude_filters';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors';
import { errors as EsErrors } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import * as errorHandlers from './catch_retryable_es_client_errors';
import { errors as EsErrors } from '@elastic/elasticsearch';
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
import type { SavedObjectsMappingProperties } from '@kbn/core-saved-objects-server';
import { checkTargetTypesMappings } from './check_target_mappings';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
import { checkForUnknownDocs, type DocumentIdAndType } from './check_for_unknown_docs';
import { cleanupUnknownAndExcluded } from './cleanup_unknown_and_excluded';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors';
import { errors as EsErrors } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { errors as EsErrors } from '@elastic/elasticsearch';
import * as errorHandlers from './catch_retryable_es_client_errors';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { errors as EsErrors } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { readWithPit } from './read_with_pit';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Option from 'fp-ts/lib/Option';
import * as Option from 'fp-ts/Option';
import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors';
import { errors as EsErrors } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as TaskEither from 'fp-ts/lib/TaskEither';
import * as Either from 'fp-ts/Either';
import * as TaskEither from 'fp-ts/TaskEither';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { safeWriteBlock } from './safe_write_block';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import type { TransportResult } from '@elastic/elasticsearch';
import { errors as EsErrors } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';

View file

@ -8,7 +8,7 @@
*/
import { chain } from 'lodash';
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import {
updateSourceMappingsProperties,

View file

@ -7,9 +7,9 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as TaskEither from 'fp-ts/lib/TaskEither';
import * as Option from 'fp-ts/lib/Option';
import * as Either from 'fp-ts/Either';
import * as TaskEither from 'fp-ts/TaskEither';
import * as Option from 'fp-ts/Option';
import { errors as EsErrors, TransportResult } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { waitForDeleteByQueryTask } from './wait_for_delete_by_query_task';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { errors as EsErrors, TransportResult } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { waitForTask } from './wait_for_task';

View file

@ -8,7 +8,7 @@
*/
import { set } from '@kbn/safer-lodash-set';
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import _ from 'lodash';
import {
SavedObjectTypeRegistry,

View file

@ -12,8 +12,8 @@ import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks';
import { loggingSystemMock } from '@kbn/core-logging-server-mocks';
import { LoggerAdapter } from '@kbn/core-logging-server-internal';
import { typeRegistryMock } from '@kbn/core-saved-objects-base-server-mocks';
import * as Either from 'fp-ts/lib/Either';
import * as Option from 'fp-ts/lib/Option';
import * as Either from 'fp-ts/Either';
import * as Option from 'fp-ts/Option';
import { errors } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
import { buildTempIndexMap, createBatches } from './create_batches';

View file

@ -8,8 +8,8 @@
*/
import { chain } from 'lodash';
import * as Either from 'fp-ts/lib/Either';
import * as Option from 'fp-ts/lib/Option';
import * as Either from 'fp-ts/Either';
import * as Option from 'fp-ts/Option';
import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks';
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
import {

View file

@ -8,7 +8,7 @@
*/
import { stateActionMachine } from './state_action_machine';
import * as E from 'fp-ts/lib/Either';
import * as E from 'fp-ts/Either';
describe('state action machine', () => {
const state = { controlState: 'INIT', count: 1 };

View file

@ -8,7 +8,7 @@
*/
import './model.test.mocks';
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { createContextMock, MockedMigratorContext } from '../test_helpers';
import type { FetchIndexResponse, RetryableEsClientError } from '../../actions';
import type { State, BaseState, FatalState, AllActionStates } from '../state';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostInitState,

View file

@ -12,7 +12,7 @@ import {
createDocumentTransformFnMock,
checkVersionCompatibilityMock,
} from './documents_update_init.test.mocks';
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -17,7 +17,7 @@ import {
getAliasesMock,
getCreationAliasesMock,
} from './init.test.mocks';
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import { FetchIndexResponse } from '../../../actions';
import { createContextMock, MockedMigratorContext } from '../../test_helpers';
import type { InitState } from '../../state';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createOutdatedDocumentSearchState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createOutdatedDocumentSearchState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createOutdatedDocumentSearchState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createOutdatedDocumentSearchState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createOutdatedDocumentSearchState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createOutdatedDocumentSearchState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostDocInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostInitState,

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Either from 'fp-ts/Either';
import {
createContextMock,
createPostInitState,

View file

@ -7,10 +7,10 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import * as Either from 'fp-ts/lib/Either';
import * as Option from 'fp-ts/lib/Option';
import * as Either from 'fp-ts/Either';
import * as Option from 'fp-ts/Option';
import { errors } from '@elastic/elasticsearch';
import type { TaskEither } from 'fp-ts/lib/TaskEither';
import type { TaskEither } from 'fp-ts/TaskEither';
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks';

View file

@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import type { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;

View file

@ -9,8 +9,8 @@
import * as rt from 'io-ts';
import { arrayToStringRt } from '.';
import { isRight, Either, fold } from 'fp-ts/lib/Either';
import { identity } from 'fp-ts/lib/function';
import { isRight, Either, fold } from 'fp-ts/Either';
import { identity } from 'fp-ts/function';
function getValueOrThrow(either: Either<unknown, any>) {
return fold(() => {

View file

@ -8,7 +8,7 @@
*/
import { dateRt } from '.';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('dateRt', () => {
it('passes if it is a valid date/time', () => {

View file

@ -8,7 +8,7 @@
*/
import { datemathStringRt } from '.';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('datemathStringRt', () => {
it('passes if it is a valid dateMath', () => {

View file

@ -8,7 +8,7 @@
*/
import { inRangeRt } from '.';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('inRangeRT', () => {
test('passes if value is within range', () => {

View file

@ -8,7 +8,7 @@
*/
import { indexPatternRt } from '.';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('indexPatternRt', () => {
test('passes on valid index pattern strings', () => {

View file

@ -8,7 +8,7 @@
*/
import { isGreaterOrEqualRt } from '.';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('inRangeRT', () => {
test('passes if value is a positive number', () => {

View file

@ -8,7 +8,7 @@
*/
import { isoToEpochRt } from '.';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('isoToEpochRt', () => {
it('validates whether its input is a valid ISO timestamp', () => {

View file

@ -8,7 +8,7 @@
*/
import { isoToEpochSecsRt } from '.';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('isoToEpochSecsRt', () => {
it('validates whether its input is a valid ISO timestamp', () => {

View file

@ -9,10 +9,10 @@
import * as t from 'io-ts';
import { jsonRt } from '.';
import { isRight, Either, isLeft, fold } from 'fp-ts/lib/Either';
import { Right } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/lib/pipeable';
import { identity } from 'fp-ts/lib/function';
import { isRight, Either, isLeft, fold } from 'fp-ts/Either';
import { Right } from 'fp-ts/Either';
import { pipe } from 'fp-ts/pipeable';
import { identity } from 'fp-ts/function';
function getValueOrThrow<TEither extends Either<any, any>>(either: TEither): Right<TEither> {
const value = pipe(

View file

@ -8,7 +8,7 @@
*/
import * as t from 'io-ts';
import { isLeft } from 'fp-ts/lib/Either';
import { isLeft } from 'fp-ts/Either';
import { mergeRt } from '.';
import { jsonRt } from '../json_rt';

View file

@ -8,7 +8,7 @@
*/
import { nonEmptyStringRt } from '.';
import { isLeft, isRight } from 'fp-ts/lib/Either';
import { isLeft, isRight } from 'fp-ts/Either';
describe('nonEmptyStringRt', () => {
it('fails on empty strings', () => {

View file

@ -8,7 +8,7 @@
*/
import * as t from 'io-ts';
import { isRight, isLeft } from 'fp-ts/lib/Either';
import { isRight, isLeft } from 'fp-ts/Either';
import { strictKeysRt } from '.';
import { jsonRt } from '../json_rt';
import { PathReporter } from 'io-ts/lib/PathReporter';

View file

@ -9,8 +9,8 @@
import * as t from 'io-ts';
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultArray } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultBooleanFalse } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultBooleanTrue } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -8,8 +8,8 @@
*/
import * as t from 'io-ts';
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
import { defaultCsvArray } from '.';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultEmptyString } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultStringArray } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultStringBooleanFalse } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultUuid } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -8,8 +8,8 @@
*/
import * as t from 'io-ts';
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
import { defaultValue } from '.';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { DefaultVersionNumber } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { EmptyStringArray, EmptyStringArrayEncoded } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { left } from 'fp-ts/lib/Either';
import { left } from 'fp-ts/Either';
import { enumeration } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { left } from 'fp-ts/lib/Either';
import { left } from 'fp-ts/Either';
import { ImportQuerySchema, importQuerySchema } from '.';
import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { IsoDateString } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -9,8 +9,8 @@
import * as t from 'io-ts';
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { LimitedSizeArray } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -9,8 +9,8 @@
import * as t from 'io-ts';
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { NonEmptyArray } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { nonEmptyOrNullableStringArray } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
import { NonEmptyString } from '.';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
import { NonEmptyStringArray } from '.';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { NumberBetweenZeroAndOneInclusive } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { OnlyFalseAllowed } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { PositiveInteger } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { PositiveIntegerGreaterThanZero } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { left } from 'fp-ts/lib/Either';
import { left } from 'fp-ts/Either';
import { TimeDuration } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { UUID } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';

View file

@ -8,8 +8,8 @@
*/
import * as t from 'io-ts';
import { left, right, Either } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/lib/pipeable';
import { left, right, Either } from 'fp-ts/Either';
import { pipe } from 'fp-ts/pipeable';
import { exactCheck, findDifferencesRecursive } from '.';
import { foldLeftRight, getPaths } from '../test_utils';

View file

@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { left, right } from 'fp-ts/lib/Either';
import { left, right } from 'fp-ts/Either';
import * as t from 'io-ts';
import { validate, validateEither } from '.';

View file

@ -6,8 +6,8 @@
*/
import * as t from 'io-ts';
import { fold } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/lib/pipeable';
import { fold } from 'fp-ts/Either';
import { pipe } from 'fp-ts/pipeable';
import { dateType } from './common';

View file

@ -6,8 +6,8 @@
*/
import { DefaultUuid } from './default_uuid';
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
describe('default_uuid', () => {

View file

@ -6,8 +6,8 @@
*/
import { NonEmptyString } from './non_empty_string';
import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/pipeable';
import { left } from 'fp-ts/Either';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
describe('non_empty_string', () => {

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { left, right } from 'fp-ts/lib/Either';
import { left, right } from 'fp-ts/Either';
import { errors } from '@elastic/elasticsearch';
import type { estypes } from '@elastic/elasticsearch';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { none } from 'fp-ts/lib/Option';
import { none } from 'fp-ts/Option';
import { FillPoolResult } from '../lib/fill_pool';
import { asOk, asErr } from '../lib/result_type';
import { PollingError, PollingErrorType } from '../polling';

View file

@ -7,7 +7,7 @@
import sinon from 'sinon';
import { of, BehaviorSubject } from 'rxjs';
import { none } from 'fp-ts/lib/Option';
import { none } from 'fp-ts/Option';
import { createTaskPoller, PollingError, PollingErrorType } from './task_poller';
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { asOk, asErr } from '../lib/result_type';

View file

@ -8,7 +8,7 @@
import React, { lazy } from 'react';
import { I18nProvider } from '@kbn/i18n-react';
import TestConnectorForm from './test_connector_form';
import { none, some } from 'fp-ts/lib/Option';
import { none, some } from 'fp-ts/Option';
import {
ActionConnector,
ActionConnectorMode,

View file

@ -6,7 +6,7 @@
*/
import { agentConfigurationIntakeRt } from './agent_configuration_intake_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('agentConfigurationIntakeRt', () => {
it('is valid when "transaction_sample_rate" is string', () => {

View file

@ -6,7 +6,7 @@
*/
import { booleanRt } from './boolean_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('booleanRt', () => {
describe('it should not accept', () => {

View file

@ -6,7 +6,7 @@
*/
import { getBytesRt } from './bytes_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
describe('bytesRt', () => {

View file

@ -6,7 +6,7 @@
*/
import { captureBodyRt } from './capture_body_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('captureBodyRt', () => {
describe('it should not accept', () => {

View file

@ -6,7 +6,7 @@
*/
import { getDurationRt } from './duration_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
describe('getDurationRt', () => {

View file

@ -6,7 +6,7 @@
*/
import { floatFourDecimalPlacesRt } from './float_four_decimal_places_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('floatFourDecimalPlacesRt', () => {
it('does not accept empty values', () => {

View file

@ -6,7 +6,7 @@
*/
import { floatThreeDecimalPlacesRt } from './float_three_decimal_places_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
describe('floatThreeDecimalPlacesRt', () => {
it('does not accept empty values', () => {

View file

@ -6,7 +6,7 @@
*/
import { getIntegerRt } from './integer_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
describe('getIntegerRt', () => {

View file

@ -6,7 +6,7 @@
*/
import { getStorageSizeRt } from './storage_size_rt';
import { isRight } from 'fp-ts/lib/Either';
import { isRight } from 'fp-ts/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
describe('storageSizeRt', () => {

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { isLeft } from 'fp-ts/lib/Either';
import { isLeft } from 'fp-ts/Either';
import { filtersRt } from './default_api_types';
describe('filtersRt', () => {

Some files were not shown because too many files have changed in this diff Show more