mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[chore] Bundle fp-ts into the shared bundle (#217034)
## Summary Just had some fun and made fp-ts available in the shared bundle, with support for partial imports. Changes in this PR: * aligned `fp-ts` direct imports to the format: `fp-ts/<module>` * Mapped the direct imports into the shared bundle re-using the same `fp-ts` module under the hood
This commit is contained in:
parent
f816e7b84f
commit
0a6bc1b46c
305 changed files with 494 additions and 482 deletions
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { estypes } from '@elastic/elasticsearch';
|
import type { estypes } from '@elastic/elasticsearch';
|
||||||
import { errors as esErrors } from '@elastic/elasticsearch';
|
import { errors as esErrors } from '@elastic/elasticsearch';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
import { withTimeout } from '@kbn/std';
|
import { withTimeout } from '@kbn/std';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { SavedObjectTypeExcludeFromUpgradeFilterHook } from '@kbn/core-saved-objects-server';
|
import type { SavedObjectTypeExcludeFromUpgradeFilterHook } from '@kbn/core-saved-objects-server';
|
||||||
import type { RetryableEsClientError } from '.';
|
import type { RetryableEsClientError } from '.';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { errors as EsErrors } from '@elastic/elasticsearch';
|
||||||
import { isRetryableEsClientError } from '@kbn/core-elasticsearch-server-internal';
|
import { isRetryableEsClientError } from '@kbn/core-elasticsearch-server-internal';
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
catchRetryableEsClientErrors,
|
catchRetryableEsClientErrors,
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { flatten } from 'lodash';
|
import { flatten } from 'lodash';
|
||||||
import type {
|
import type {
|
||||||
AggregationsMultiBucketAggregateBase,
|
AggregationsMultiBucketAggregateBase,
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
|
|
||||||
import type { IndexMapping, VirtualVersionMap } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexMapping, VirtualVersionMap } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
import { getNewAndUpdatedTypes } from '../core/compare_mappings';
|
import { getNewAndUpdatedTypes } from '../core/compare_mappings';
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { pipe } from 'fp-ts/lib/function';
|
import { pipe } from 'fp-ts/function';
|
||||||
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { SavedObjectTypeExcludeFromUpgradeFilterHook } from '@kbn/core-saved-objects-server';
|
import type { SavedObjectTypeExcludeFromUpgradeFilterHook } from '@kbn/core-saved-objects-server';
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { pipe } from 'fp-ts/lib/function';
|
import { pipe } from 'fp-ts/function';
|
||||||
import { errors as EsErrors } from '@elastic/elasticsearch';
|
import { errors as EsErrors } from '@elastic/elasticsearch';
|
||||||
import type {
|
import type {
|
||||||
ElasticsearchClient,
|
ElasticsearchClient,
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
catchRetryableEsClientErrors,
|
catchRetryableEsClientErrors,
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { pipe } from 'fp-ts/lib/function';
|
import { pipe } from 'fp-ts/function';
|
||||||
import type { estypes } from '@elastic/elasticsearch';
|
import type { estypes } from '@elastic/elasticsearch';
|
||||||
import type {
|
import type {
|
||||||
ElasticsearchClient,
|
ElasticsearchClient,
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { Conflicts, QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { Conflicts, QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Either } from 'fp-ts/lib/Either';
|
import type { Either } from 'fp-ts/Either';
|
||||||
import { right } from 'fp-ts/lib/Either';
|
import { right } from 'fp-ts/Either';
|
||||||
import type { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
import type { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
||||||
import type { DocumentsTransformFailed } from '../core/migrate_raw_docs';
|
import type { DocumentsTransformFailed } from '../core/migrate_raw_docs';
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
catchRetryableEsClientErrors,
|
catchRetryableEsClientErrors,
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { estypes } from '@elastic/elasticsearch';
|
import type { estypes } from '@elastic/elasticsearch';
|
||||||
import { errors as EsErrors } from '@elastic/elasticsearch';
|
import { errors as EsErrors } from '@elastic/elasticsearch';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
catchRetryableEsClientErrors,
|
catchRetryableEsClientErrors,
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { pipe } from 'fp-ts/lib/function';
|
import { pipe } from 'fp-ts/function';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
import type { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
||||||
import { DEFAULT_TIMEOUT, type SourceEqualsTarget, type IndexNotFound } from '.';
|
import { DEFAULT_TIMEOUT, type SourceEqualsTarget, type IndexNotFound } from '.';
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { errors as EsErrors } from '@elastic/elasticsearch';
|
import { errors as EsErrors } from '@elastic/elasticsearch';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { WaitGroup } from '../kibana_migrator_utils';
|
import type { WaitGroup } from '../kibana_migrator_utils';
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
|
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
|
||||||
import type { TransformRawDocs } from '../types';
|
import type { TransformRawDocs } from '../types';
|
||||||
import type { DocumentsTransformFailed, DocumentsTransformSuccess } from '../core/migrate_raw_docs';
|
import type { DocumentsTransformFailed, DocumentsTransformSuccess } from '../core/migrate_raw_docs';
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { errors as EsErrors } from '@elastic/elasticsearch';
|
import { errors as EsErrors } from '@elastic/elasticsearch';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { pipe } from 'fp-ts/lib/function';
|
import { pipe } from 'fp-ts/function';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors';
|
import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors';
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { omit } from 'lodash';
|
import { omit } from 'lodash';
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { pipe } from 'fp-ts/lib/function';
|
import { pipe } from 'fp-ts/function';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { IndexMapping, VirtualVersionMap } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexMapping, VirtualVersionMap } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
import { diffMappings } from '../core/diff_mappings';
|
import { diffMappings } from '../core/diff_mappings';
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import { flow } from 'fp-ts/lib/function';
|
import { flow } from 'fp-ts/function';
|
||||||
import { waitForTask } from './wait_for_task';
|
import { waitForTask } from './wait_for_task';
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
catchRetryableEsClientErrors,
|
catchRetryableEsClientErrors,
|
||||||
|
|
|
@ -7,14 +7,15 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import { flow } from 'fp-ts/lib/function';
|
import { flow } from 'fp-ts/function';
|
||||||
import {
|
import {
|
||||||
waitForTask,
|
waitForTask,
|
||||||
WaitForTaskCompletionTimeout,
|
WaitForTaskCompletionTimeout,
|
||||||
TaskCompletedWithRetriableError,
|
TaskCompletedWithRetriableError,
|
||||||
} from './wait_for_task';
|
} from './wait_for_task';
|
||||||
|
|
||||||
import { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
import { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
||||||
|
|
||||||
export const waitForPickupUpdatedMappingsTask = flow(
|
export const waitForPickupUpdatedMappingsTask = flow(
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import { flow } from 'fp-ts/lib/function';
|
import { flow } from 'fp-ts/function';
|
||||||
import type { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
import type { RetryableEsClientError } from './catch_retryable_es_client_errors';
|
||||||
import type { IndexNotFound, TargetIndexHadWriteBlock } from '.';
|
import type { IndexNotFound, TargetIndexHadWriteBlock } from '.';
|
||||||
import { waitForTask, type WaitForTaskCompletionTimeout } from './wait_for_task';
|
import { waitForTask, type WaitForTaskCompletionTimeout } from './wait_for_task';
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { estypes } from '@elastic/elasticsearch';
|
import type { estypes } from '@elastic/elasticsearch';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import { errors as EsErrors } from '@elastic/elasticsearch';
|
import { errors as EsErrors } from '@elastic/elasticsearch';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
/*
|
/*
|
||||||
* This file provides logic for migrating raw documents.
|
* This file provides logic for migrating raw documents.
|
||||||
*/
|
*/
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import type {
|
import type {
|
||||||
SavedObjectSanitizedDoc,
|
SavedObjectSanitizedDoc,
|
||||||
SavedObjectsRawDoc,
|
SavedObjectsRawDoc,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { errors as EsErrors } from '@elastic/elasticsearch';
|
import { errors as EsErrors } from '@elastic/elasticsearch';
|
||||||
import * as Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import type { Logger } from '@kbn/logging';
|
import type { Logger } from '@kbn/logging';
|
||||||
import {
|
import {
|
||||||
getErrorMessage,
|
getErrorMessage,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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, SavedObjectsRawDocSource } from '@kbn/core-saved-objects-server';
|
import type { SavedObjectsRawDoc, SavedObjectsRawDocSource } from '@kbn/core-saved-objects-server';
|
||||||
import type { BulkOperationContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { BulkOperationContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
import type { IndexTypesMap } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexTypesMap } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
|
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
QueryDslBoolQuery,
|
QueryDslBoolQuery,
|
||||||
QueryDslQueryContainer,
|
QueryDslQueryContainer,
|
||||||
} from '@elastic/elasticsearch/lib/api/types';
|
} from '@elastic/elasticsearch/lib/api/types';
|
||||||
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 type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
|
||||||
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
import type { AliasAction, FetchIndexResponse } from '../actions';
|
import type { AliasAction, FetchIndexResponse } from '../actions';
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
import type { IndexMapping } from '@kbn/core-saved-objects-base-server-internal';
|
||||||
|
|
||||||
import { isTypeof } from '../actions';
|
import { isTypeof } from '../actions';
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { pipe } from 'fp-ts/lib/pipeable';
|
import { pipe } from 'fp-ts/pipeable';
|
||||||
import * as Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import { omit } from 'lodash';
|
import { omit } from 'lodash';
|
||||||
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
|
||||||
import type { WaitGroup } from './kibana_migrator_utils';
|
import type { WaitGroup } from './kibana_migrator_utils';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||||
import type { DocLinks } from '@kbn/doc-links';
|
import type { DocLinks } from '@kbn/doc-links';
|
||||||
import type {
|
import type {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
|
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
|
||||||
import type { DocumentsTransformFailed, DocumentsTransformSuccess } from './core';
|
import type { DocumentsTransformFailed, DocumentsTransformSuccess } from './core';
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 TaskEither from 'fp-ts/lib/TaskEither';
|
import * as TaskEither from 'fp-ts/TaskEither';
|
||||||
|
|
||||||
export interface WaitForDelayParams {
|
export interface WaitForDelayParams {
|
||||||
delayInSec: number;
|
delayInSec: number;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { State, AllActionStates } from '../state';
|
import type { State, AllActionStates } from '../state';
|
||||||
import type { ResponseType } from '../next';
|
import type { ResponseType } from '../next';
|
||||||
import { delayRetryState, resetRetryState } from '../../model/retry_state';
|
import { delayRetryState, resetRetryState } from '../../model/retry_state';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { extractUnknownDocFailureReason } from '../../../model/extract_errors';
|
import { extractUnknownDocFailureReason } from '../../../model/extract_errors';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { delayRetryState } from '../../../model/retry_state';
|
import { delayRetryState } from '../../../model/retry_state';
|
||||||
import { isTypeof } from '../../actions';
|
import { isTypeof } from '../../actions';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import { delayRetryState } from '../../../model/retry_state';
|
import { delayRetryState } from '../../../model/retry_state';
|
||||||
import { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import { CLUSTER_SHARD_LIMIT_EXCEEDED_REASON } from '../../../common/constants';
|
import { CLUSTER_SHARD_LIMIT_EXCEEDED_REASON } from '../../../common/constants';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { MigrationLog } from '../../../types';
|
import type { MigrationLog } from '../../../types';
|
||||||
import { excludeUnusedTypesQuery } from '../../../core';
|
import { excludeUnusedTypesQuery } from '../../../core';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import type { MigrationLog } from '../../../types';
|
import type { MigrationLog } from '../../../types';
|
||||||
import { getAliases } from '../../../model/helpers';
|
import { getAliases } from '../../../model/helpers';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { FATAL_REASON_REQUEST_ENTITY_TOO_LARGE } from '../../../common/constants';
|
import { FATAL_REASON_REQUEST_ENTITY_TOO_LARGE } from '../../../common/constants';
|
||||||
import { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import { isTypeof } from '../../actions';
|
import { isTypeof } from '../../actions';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import { createInitialProgress } from '../../../model/progress';
|
import { createInitialProgress } from '../../../model/progress';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
import { logProgress, setProgressTotal } from '../../../model/progress';
|
import { logProgress, setProgressTotal } from '../../../model/progress';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
import { incrementProcessedProgress } from '../../../model/progress';
|
import { incrementProcessedProgress } from '../../../model/progress';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import { setMetaDocMigrationStarted } from '../../utils';
|
import { setMetaDocMigrationStarted } from '../../utils';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import { isTypeof } from '../../actions';
|
import { isTypeof } from '../../actions';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import { setMetaDocMigrationComplete } from '../../utils';
|
import { setMetaDocMigrationComplete } from '../../utils';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {} from 'lodash';
|
import {} from 'lodash';
|
||||||
import * as Either from 'fp-ts/lib/Either';
|
import * as Either from 'fp-ts/Either';
|
||||||
import { delayRetryState } from '../../../model/retry_state';
|
import { delayRetryState } from '../../../model/retry_state';
|
||||||
import { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import { isTypeof } from '../../actions';
|
import { isTypeof } from '../../actions';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 { throwBadResponse } from '../../../model/helpers';
|
import { throwBadResponse } from '../../../model/helpers';
|
||||||
import type { ModelStage } from '../types';
|
import type { ModelStage } from '../types';
|
||||||
import { setMetaMappingMigrationComplete } from '../../utils';
|
import { setMetaMappingMigrationComplete } from '../../utils';
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* 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 Option from 'fp-ts/lib/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import { errors } from '@elastic/elasticsearch';
|
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 { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
|
||||||
import type {
|
import type {
|
||||||
ElasticsearchClient,
|
ElasticsearchClient,
|
||||||
|
|
|
@ -63,6 +63,7 @@ RUNTIME_DEPS = [
|
||||||
"@npm//styled-components",
|
"@npm//styled-components",
|
||||||
"@npm//tslib",
|
"@npm//tslib",
|
||||||
"@npm//uuid",
|
"@npm//uuid",
|
||||||
|
"@npm//fp-ts",
|
||||||
"@npm//io-ts",
|
"@npm//io-ts",
|
||||||
"@npm//@reduxjs/toolkit",
|
"@npm//@reduxjs/toolkit",
|
||||||
"@npm//redux",
|
"@npm//redux",
|
||||||
|
@ -76,7 +77,6 @@ webpack_cli(
|
||||||
data = RUNTIME_DEPS + SRCS + [
|
data = RUNTIME_DEPS + SRCS + [
|
||||||
"//:.browserslistrc",
|
"//:.browserslistrc",
|
||||||
":webpack.config.js",
|
":webpack.config.js",
|
||||||
|
|
||||||
"@npm//webpack",
|
"@npm//webpack",
|
||||||
"@npm//clean-webpack-plugin",
|
"@npm//clean-webpack-plugin",
|
||||||
"@npm//mini-css-extract-plugin",
|
"@npm//mini-css-extract-plugin",
|
||||||
|
|
|
@ -81,6 +81,7 @@ module.exports = (_, argv) => {
|
||||||
'fflate',
|
'fflate',
|
||||||
'fastest-levenshtein',
|
'fastest-levenshtein',
|
||||||
'history',
|
'history',
|
||||||
|
'fp-ts',
|
||||||
'io-ts',
|
'io-ts',
|
||||||
'jquery',
|
'jquery',
|
||||||
'lodash',
|
'lodash',
|
||||||
|
|
|
@ -56,6 +56,15 @@ const externals = {
|
||||||
'@kbn/monaco': '__kbnSharedDeps__.KbnMonaco',
|
'@kbn/monaco': '__kbnSharedDeps__.KbnMonaco',
|
||||||
// this is how plugins/consumers from npm load monaco
|
// this is how plugins/consumers from npm load monaco
|
||||||
'monaco-editor/esm/vs/editor/editor.api': '__kbnSharedDeps__.MonacoBarePluginApi',
|
'monaco-editor/esm/vs/editor/editor.api': '__kbnSharedDeps__.MonacoBarePluginApi',
|
||||||
|
'fp-ts/Option': '__kbnSharedDeps__.FpTs.option',
|
||||||
|
'fp-ts/pipeable': '__kbnSharedDeps__.FpTs.pipeable',
|
||||||
|
'fp-ts/TaskEither': '__kbnSharedDeps__.FpTs.taskEither',
|
||||||
|
'fp-ts/Either': '__kbnSharedDeps__.FpTs.either',
|
||||||
|
'fp-ts/function': '__kbnSharedDeps__.FpTs.function',
|
||||||
|
'fp-ts/Task': '__kbnSharedDeps__.FpTs.task',
|
||||||
|
'fp-ts/Set': '__kbnSharedDeps__.FpTs.set',
|
||||||
|
'fp-ts/Ord': '__kbnSharedDeps__.FpTs.ord',
|
||||||
|
'fp-ts/Array': '__kbnSharedDeps__.FpTs.array',
|
||||||
'io-ts': '__kbnSharedDeps__.IoTs',
|
'io-ts': '__kbnSharedDeps__.IoTs',
|
||||||
'io-ts/lib/Reporter': '__kbnSharedDeps__.IoTsReporter',
|
'io-ts/lib/Reporter': '__kbnSharedDeps__.IoTsReporter',
|
||||||
'io-ts/lib/PathReporter': '__kbnSharedDeps__.IoTsPathReporter',
|
'io-ts/lib/PathReporter': '__kbnSharedDeps__.IoTsPathReporter',
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const EmotionReact = require('@emotion/react');
|
||||||
export const Moment = require('moment');
|
export const Moment = require('moment');
|
||||||
export const MomentTimezone = require('moment-timezone/moment-timezone');
|
export const MomentTimezone = require('moment-timezone/moment-timezone');
|
||||||
|
|
||||||
|
export const FpTs = require('fp-ts');
|
||||||
export const IoTs = require('io-ts');
|
export const IoTs = require('io-ts');
|
||||||
export const IoTsReporter = require('io-ts/Reporter');
|
export const IoTsReporter = require('io-ts/Reporter');
|
||||||
export const IoTsPathReporter = require('io-ts/PathReporter');
|
export const IoTsPathReporter = require('io-ts/PathReporter');
|
||||||
|
|
|
@ -267,7 +267,7 @@ const SchemaFileTemplate = `
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
import * as rt from 'io-ts';
|
||||||
import type { Either } from 'fp-ts/lib/Either';
|
import type { Either } from 'fp-ts/Either';
|
||||||
%%IMPORTS%%
|
%%IMPORTS%%
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
import * as rt from 'io-ts';
|
||||||
import type { Either } from 'fp-ts/lib/Either';
|
import type { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
import * as rt from 'io-ts';
|
||||||
import type { Either } from 'fp-ts/lib/Either';
|
import type { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
import * as rt from 'io-ts';
|
||||||
import type { Either } from 'fp-ts/lib/Either';
|
import type { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { LegacyAlertSchema } from './legacy_alert_schema';
|
import { LegacyAlertSchema } from './legacy_alert_schema';
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { EcsSchema } from './ecs_schema';
|
import { EcsSchema } from './ecs_schema';
|
||||||
import { LegacyAlertSchema } from './legacy_alert_schema';
|
import { LegacyAlertSchema } from './legacy_alert_schema';
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { EcsSchema } from './ecs_schema';
|
import { EcsSchema } from './ecs_schema';
|
||||||
import { LegacyAlertSchema } from './legacy_alert_schema';
|
import { LegacyAlertSchema } from './legacy_alert_schema';
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { EcsSchema } from './ecs_schema';
|
import { EcsSchema } from './ecs_schema';
|
||||||
import { LegacyAlertSchema } from './legacy_alert_schema';
|
import { LegacyAlertSchema } from './legacy_alert_schema';
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { EcsSchema } from './ecs_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$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { LegacyAlertSchema } from './legacy_alert_schema';
|
import { LegacyAlertSchema } from './legacy_alert_schema';
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { EcsSchema } from './ecs_schema';
|
import { EcsSchema } from './ecs_schema';
|
||||||
import { LegacyAlertSchema } from './legacy_alert_schema';
|
import { LegacyAlertSchema } from './legacy_alert_schema';
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
import { EcsSchema } from './ecs_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$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// this file was generated, and should not be edited by hand
|
// this file was generated, and should not be edited by hand
|
||||||
// ---------------------------------- WARNING ----------------------------------
|
// ---------------------------------- WARNING ----------------------------------
|
||||||
import * as rt from 'io-ts';
|
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 { AlertSchema } from './alert_schema';
|
||||||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
|
||||||
export const IsoDateString = new rt.Type<string, string, unknown>(
|
export const IsoDateString = new rt.Type<string, string, unknown>(
|
||||||
|
|
|
@ -11,8 +11,8 @@ import { Client, HttpConnection } from '@elastic/elasticsearch';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { Either, fromNullable, chain, getOrElse, toError } from 'fp-ts/Either';
|
import { Either, fromNullable, chain, getOrElse, toError } from 'fp-ts/Either';
|
||||||
import { flow, pipe } from 'fp-ts/function';
|
import { flow, pipe } from 'fp-ts/function';
|
||||||
import * as TE from 'fp-ts/lib/TaskEither';
|
import * as TE from 'fp-ts/TaskEither';
|
||||||
import * as T from 'fp-ts/lib/Task';
|
import * as T from 'fp-ts/Task';
|
||||||
import { ToolingLog } from '@kbn/tooling-log';
|
import { ToolingLog } from '@kbn/tooling-log';
|
||||||
import { FtrService } from '../ftr_provider_context';
|
import { FtrService } from '../ftr_provider_context';
|
||||||
import { print } from './utils';
|
import { print } from './utils';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { either } from 'fp-ts/lib/Either';
|
import { either } from 'fp-ts/Either';
|
||||||
import * as rt from 'io-ts';
|
import * as rt from 'io-ts';
|
||||||
|
|
||||||
export const arrayToStringRt = new rt.Type<unknown[], string, unknown>(
|
export const arrayToStringRt = new rt.Type<unknown[], string, unknown>(
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
import * as rt from 'io-ts';
|
import * as rt from 'io-ts';
|
||||||
import dateMath from '@kbn/datemath';
|
import dateMath from '@kbn/datemath';
|
||||||
import { chain } from 'fp-ts/lib/Either';
|
import { chain } from 'fp-ts/Either';
|
||||||
import { pipe } from 'fp-ts/lib/pipeable';
|
import { pipe } from 'fp-ts/pipeable';
|
||||||
|
|
||||||
const isValidDatemath = (value: string): boolean => {
|
const isValidDatemath = (value: string): boolean => {
|
||||||
const parsedValue = dateMath.parse(value);
|
const parsedValue = dateMath.parse(value);
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { fold } from 'fp-ts/lib/Either';
|
import { fold } from 'fp-ts/Either';
|
||||||
import { identity } from 'fp-ts/lib/function';
|
import { identity } from 'fp-ts/function';
|
||||||
import { pipe } from 'fp-ts/lib/pipeable';
|
import { pipe } from 'fp-ts/pipeable';
|
||||||
import { Context, Errors, IntersectionType, Type, UnionType, ValidationError } from 'io-ts';
|
import { Context, Errors, IntersectionType, Type, UnionType, ValidationError } from 'io-ts';
|
||||||
|
|
||||||
type ErrorFactory = (message: string) => Error;
|
type ErrorFactory = (message: string) => Error;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { either } from 'fp-ts/lib/Either';
|
import { either } from 'fp-ts/Either';
|
||||||
|
|
||||||
// Checks whether a string is a valid ISO timestamp,
|
// Checks whether a string is a valid ISO timestamp,
|
||||||
// and returns an epoch timestamp
|
// and returns an epoch timestamp
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { chain } from 'fp-ts/lib/Either';
|
import { chain } from 'fp-ts/Either';
|
||||||
import { pipe } from 'fp-ts/lib/function';
|
import { pipe } from 'fp-ts/function';
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { isoToEpochRt } from '../iso_to_epoch_rt';
|
import { isoToEpochRt } from '../iso_to_epoch_rt';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { either } from 'fp-ts/lib/Either';
|
import { either } from 'fp-ts/Either';
|
||||||
|
|
||||||
export const jsonRt = new t.Type<any, string, unknown>(
|
export const jsonRt = new t.Type<any, string, unknown>(
|
||||||
'JSON',
|
'JSON',
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { merge as lodashMerge } from 'lodash';
|
import { merge as lodashMerge } from 'lodash';
|
||||||
import { isLeft } from 'fp-ts/lib/Either';
|
import { isLeft } from 'fp-ts/Either';
|
||||||
|
|
||||||
type PlainObject = Record<string | number | symbol, any>;
|
type PlainObject = Record<string | number | symbol, any>;
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { RouteValidationFunction } from '@kbn/core/server';
|
import type { RouteValidationFunction } from '@kbn/core/server';
|
||||||
import { fold } from 'fp-ts/lib/Either';
|
import { fold } from 'fp-ts/Either';
|
||||||
import { pipe } from 'fp-ts/lib/pipeable';
|
import { pipe } from 'fp-ts/pipeable';
|
||||||
import { Context, Errors, IntersectionType, Type, UnionType, ValidationError } from 'io-ts';
|
import { Context, Errors, IntersectionType, Type, UnionType, ValidationError } from 'io-ts';
|
||||||
|
|
||||||
type ValdidationResult<Value> = ReturnType<RouteValidationFunction<Value>>;
|
type ValdidationResult<Value> = ReturnType<RouteValidationFunction<Value>>;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { either, isRight } from 'fp-ts/lib/Either';
|
import { either, isRight } from 'fp-ts/Either';
|
||||||
import { difference, isPlainObject, forEach, isArray, castArray } from 'lodash';
|
import { difference, isPlainObject, forEach, isArray, castArray } from 'lodash';
|
||||||
import { MergeType } from '../merge_rt';
|
import { MergeType } from '../merge_rt';
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
import * as rt from 'io-ts';
|
import * as rt from 'io-ts';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { pipe } from 'fp-ts/lib/pipeable';
|
import { pipe } from 'fp-ts/pipeable';
|
||||||
import { chain } from 'fp-ts/lib/Either';
|
import { chain } from 'fp-ts/Either';
|
||||||
|
|
||||||
const NANO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3,9}Z$/;
|
const NANO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3,9}Z$/;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { Either } from 'fp-ts/lib/Either';
|
import { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types the DefaultArray<C> as:
|
* Types the DefaultArray<C> as:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { Either } from 'fp-ts/lib/Either';
|
import { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types the DefaultBooleanFalse as:
|
* Types the DefaultBooleanFalse as:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { Either } from 'fp-ts/lib/Either';
|
import { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types the DefaultBooleanTrue as:
|
* Types the DefaultBooleanTrue as:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { Either } from 'fp-ts/lib/Either';
|
import { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a schema of an array that works in the following way:
|
* Creates a schema of an array that works in the following way:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as t from 'io-ts';
|
import * as t from 'io-ts';
|
||||||
import { Either } from 'fp-ts/lib/Either';
|
import { Either } from 'fp-ts/Either';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types the DefaultEmptyString as:
|
* Types the DefaultEmptyString as:
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue