Skip to content

Commit c549689

Browse files
committed
CONSOLE-5063: Remove AppInitSDK
1 parent a00af1a commit c549689

16 files changed

Lines changed: 201 additions & 455 deletions

File tree

frontend/@types/console/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ declare interface Window {
2626
customFaviconsConfigured: boolean;
2727
customProductName: string;
2828
documentationBaseURL: string;
29+
kubeAdminLogoutURL: string;
2930
kubeAPIServerURL: string;
3031
loadTestFactor: number;
3132
loginErrorURL: string;

frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ table in [Console dynamic plugins README](./README.md).
1313
## 4.22.0-prerelease.2 - TBD
1414

1515
- **Breaking**: Removed `pluginID` from the result in `useResolvedExtensions` hook ([CONSOLE-3769], [#15904])
16+
- **Breaking**: Removed `AppInitSDK`, `useReduxStore` ([CONSOLE-5063], [#16019])
1617
- The following types are now re-exported from `@openshift/dynamic-plugin-sdk` instead of being defined
1718
by Console: `CodeRef`, `EncodedCodeRef`, `LoadedExtension`, and `ResolvedExtension` ([CONSOLE-3769], [#15904])
1819

@@ -250,3 +251,4 @@ table in [Console dynamic plugins README](./README.md).
250251
[#15893]: https://github.com/openshift/console/pull/15893
251252
[#15904]: https://github.com/openshift/console/pull/15904
252253
[#15934]: https://github.com/openshift/console/pull/15934
254+
[#16019]: https://github.com/openshift/console/pull/16019

frontend/packages/console-dynamic-plugin-sdk/src/app/AppInitSDK.tsx

Lines changed: 0 additions & 53 deletions
This file was deleted.

frontend/packages/console-dynamic-plugin-sdk/src/app/__tests__/AppInitSDK.spec.tsx

Lines changed: 0 additions & 89 deletions
This file was deleted.

frontend/packages/console-dynamic-plugin-sdk/src/app/__tests__/configSetup.spec.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

frontend/packages/console-dynamic-plugin-sdk/src/app/configSetup.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

frontend/packages/console-dynamic-plugin-sdk/src/app/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export { default as AppInitSDK } from './AppInitSDK';
21
export { SDKReducers } from './redux';
32
export * from './components';
43
export * from './core';

frontend/packages/console-dynamic-plugin-sdk/src/app/useReduxStore.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

frontend/public/__tests__/co-fetch.spec.ts renamed to frontend/packages/console-dynamic-plugin-sdk/src/utils/fetch/__tests__/console-fetch.spec.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { RetryError } from '@console/dynamic-plugin-sdk/src/utils/error/http-error';
2-
import { consoleFetch } from '@console/dynamic-plugin-sdk/src/utils/fetch';
3-
import { setUtilsConfig } from '@console/dynamic-plugin-sdk/src/app/configSetup';
4-
import { shouldLogout, validateStatus, appInternalFetch } from '../co-fetch';
1+
import { RetryError } from '../../error/http-error';
2+
import { consoleFetch } from '../console-fetch';
3+
import { shouldLogout, validateStatus } from '../console-fetch-utils';
54

6-
describe('coFetch', () => {
5+
describe('consoleFetch', () => {
76
const json = async () => ({
87
details: {
98
kind: 'clusterresourcequotas',
@@ -80,7 +79,6 @@ describe('coFetch', () => {
8079
window.fetch = jest.fn(() =>
8180
Promise.resolve({ status: 404, headers: emptyHeaders } as Response),
8281
);
83-
setUtilsConfig({ appFetch: appInternalFetch });
8482
try {
8583
await consoleFetch('');
8684
} catch {

0 commit comments

Comments
 (0)