Skip to content

Commit

Permalink
move some dependencies to package
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Nov 7, 2024
1 parent 257688d commit 7d49cc7
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"@kbn/i18n-react": "link:packages/kbn-i18n-react",
"@kbn/iframe-embedded-plugin": "link:x-pack/test/functional_embedded/plugins/iframe_embedded",
"@kbn/image-embeddable-plugin": "link:src/plugins/image_embeddable",
"@kbn/index-lifecycle-management-common-shared": "link:x-pack/packages/index-lifecycle-management/index-lifecycle-management-common-shared",
"@kbn/index-lifecycle-management-plugin": "link:x-pack/plugins/index_lifecycle_management",
"@kbn/index-management-plugin": "link:x-pack/plugins/index_management",
"@kbn/index-management-shared-types": "link:x-pack/packages/index-management/index_management_shared_types",
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,8 @@
"@kbn/import-locator/*": ["packages/kbn-import-locator/*"],
"@kbn/import-resolver": ["packages/kbn-import-resolver"],
"@kbn/import-resolver/*": ["packages/kbn-import-resolver/*"],
"@kbn/index-lifecycle-management-common-shared": ["x-pack/packages/index-lifecycle-management/index-lifecycle-management-common-shared"],
"@kbn/index-lifecycle-management-common-shared/*": ["x-pack/packages/index-lifecycle-management/index-lifecycle-management-common-shared/*"],
"@kbn/index-lifecycle-management-plugin": ["x-pack/plugins/index_lifecycle_management"],
"@kbn/index-lifecycle-management-plugin/*": ["x-pack/plugins/index_lifecycle_management/*"],
"@kbn/index-management-plugin": ["x-pack/plugins/index_management"],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @kbn/index-lifecycle-management-common-shared

Contains types and functions used and exported by the index lifecycle management plugin. Primarily used to address dependency issues.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export const ILM_LOCATOR_ID = 'ILM_LOCATOR_ID';
export * from './src/policies';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/index-lifecycle-management-common-shared",
"owner": "@elastic/kibana-management"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "@kbn/index-lifecycle-management-common-shared",
"private": true,
"version": "1.0.0",
"license": "Elastic License 2.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
* 2.0.
*/

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export type Phase = keyof Phases;

export type PhaseWithAllocation = 'warm' | 'cold';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node",
"react"
]
},
"include": [
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"target/**/*"
],
"kbn_references": [
"@kbn/core-application-browser",
"@kbn/utility-types",
"@kbn/share-plugin",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

export * from './api';

export * from './policies';
export * from '@kbn/index-lifecycle-management-common-shared';

/**
* These roles reflect how nodes are stratified into different data tiers.
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/index_lifecycle_management/public/locator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import type { SerializableRecord } from '@kbn/utility-types';
import { ManagementAppLocator } from '@kbn/management-plugin/common';
import { LocatorDefinition } from '@kbn/share-plugin/public';
import { ILM_LOCATOR_ID } from '@kbn/index-lifecycle-management-common-shared';
import {
getPoliciesListPath,
getPolicyCreatePath,
getPolicyEditPath,
} from './application/services/navigation';
import { PLUGIN } from '../common/constants';

export const ILM_LOCATOR_ID = 'ILM_LOCATOR_ID';
export { ILM_LOCATOR_ID };

export interface IlmLocatorParams extends SerializableRecord {
page: 'policies_list' | 'policy_edit' | 'policy_create';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
"kibanaUtils",
"observability",
"spaces",
"indexLifecycleManagement",
"unifiedDocViewer"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { PolicyFromES } from '@kbn/index-lifecycle-management-plugin/common/types';
import { PolicyFromES } from '@kbn/index-lifecycle-management-common-shared';
import { DataStream } from '@kbn/index-management-plugin/common';
import { CatIndicesResponse } from '@elastic/elasticsearch/lib/api/types';
import { apiService } from '../../../../../utils/api_service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import { EuiIconTip, EuiLink, EuiSkeletonText, EuiToolTip, EuiText } from '@elastic/eui';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { ILM_LOCATOR_ID } from '@kbn/index-lifecycle-management-plugin/public';
import { ILM_LOCATOR_ID } from '@kbn/index-lifecycle-management-common-shared';
import { useFetcher } from '@kbn/observability-shared-plugin/public';
import { i18n } from '@kbn/i18n';
import { useSyntheticsSettingsContext } from '../../contexts';
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5328,6 +5328,10 @@
version "0.0.0"
uid ""

"@kbn/index-lifecycle-management-common-shared@link:x-pack/packages/index-lifecycle-management/index-lifecycle-management-common-shared":
version "0.0.0"
uid ""

"@kbn/index-management-plugin@link:x-pack/plugins/index_management":
version "0.0.0"
uid ""
Expand Down

0 comments on commit 7d49cc7

Please sign in to comment.