@appshell/react 1.0.0-alpha.14 → 1.0.0-alpha.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +36 -49
  2. package/dist/main.js +1 -1
  3. package/dist/types/config/src/axios.d.ts +0 -1
  4. package/dist/types/config/src/configmap.d.ts +0 -1
  5. package/dist/types/config/src/context.d.ts +3 -4
  6. package/dist/types/config/src/credentials.d.ts +0 -2
  7. package/dist/types/config/src/generate.manifest.d.ts +0 -1
  8. package/dist/types/config/src/index.d.ts +2 -7
  9. package/dist/types/config/src/mappers/appshell.config.d.ts +0 -1
  10. package/dist/types/config/src/outdated.d.ts +0 -1
  11. package/dist/types/config/src/publish.d.ts +3 -4
  12. package/dist/types/config/src/sync.d.ts +0 -1
  13. package/dist/types/config/src/types.d.ts +9 -15
  14. package/dist/types/config/src/utils/blur.d.ts +0 -1
  15. package/dist/types/config/src/utils/compare.d.ts +0 -1
  16. package/dist/types/config/src/utils/config.d.ts +0 -1
  17. package/dist/types/config/src/utils/copy.d.ts +0 -1
  18. package/dist/types/config/src/utils/index.d.ts +0 -4
  19. package/dist/types/config/src/utils/list.d.ts +0 -1
  20. package/dist/types/config/src/utils/load.d.ts +0 -1
  21. package/dist/types/config/src/validators/AppshellTemplateValidator.d.ts +0 -1
  22. package/dist/types/config/src/validators/index.d.ts +0 -3
  23. package/dist/types/loader/src/index.d.ts +0 -1
  24. package/dist/types/loader/src/loadAppshellComponent.d.ts +0 -1
  25. package/dist/types/loader/src/remoteLoader.d.ts +2 -4
  26. package/dist/types/loader/src/resolvers.d.ts +4 -12
  27. package/dist/types/loader/src/types.d.ts +0 -1
  28. package/dist/types/react/src/components/LoadingError.d.ts +0 -1
  29. package/dist/types/react/src/components/{AppshellComponent.d.ts → RemoteSlot.d.ts} +4 -21
  30. package/dist/types/react/src/contexts/RemoteContext.d.ts +0 -1
  31. package/dist/types/react/src/hooks/useRemote.d.ts +1 -2
  32. package/dist/types/react/src/index.d.ts +1 -9
  33. package/dist/types/react/src/resources/jsonResource.d.ts +0 -1
  34. package/dist/types/react/src/types.d.ts +0 -1
  35. package/dist/types/runtime/src/errors.d.ts +25 -0
  36. package/dist/types/runtime/src/index.d.ts +3 -0
  37. package/dist/types/runtime/src/store.d.ts +25 -0
  38. package/dist/types/runtime/src/types.d.ts +9 -0
  39. package/package.json +12 -3
  40. package/CHANGELOG.md +0 -231
  41. package/__tests__/AppshellComponent.spec.tsx +0 -53
  42. package/__tests__/LoadingError.spec.tsx +0 -14
  43. package/__tests__/ManifestContext.spec.tsx +0 -50
  44. package/__tests__/ReactHost.spec.tsx +0 -136
  45. package/__tests__/__snapshots__/AppshellComponent.spec.tsx.snap +0 -9
  46. package/__tests__/__snapshots__/LoadingError.spec.tsx.snap +0 -88
  47. package/__tests__/__snapshots__/ReactHost.spec.tsx.snap +0 -11
  48. package/__tests__/fixtures/Manifest.ts +0 -16
  49. package/__tests__/fixtures/TestComponent.tsx +0 -5
  50. package/__tests__/fixtures/TestGlobalConfig.ts +0 -8
  51. package/__tests__/jsonResource.spec.ts +0 -27
  52. package/__tests__/useRemote.spec.tsx +0 -36
  53. package/__tests__/utils/waitForResource.ts +0 -15
  54. package/dist/types/config/src/axios.d.ts.map +0 -1
  55. package/dist/types/config/src/configmap.d.ts.map +0 -1
  56. package/dist/types/config/src/context.d.ts.map +0 -1
  57. package/dist/types/config/src/credentials.d.ts.map +0 -1
  58. package/dist/types/config/src/deregister.d.ts +0 -3
  59. package/dist/types/config/src/deregister.d.ts.map +0 -1
  60. package/dist/types/config/src/generate.env.d.ts +0 -3
  61. package/dist/types/config/src/generate.env.d.ts.map +0 -1
  62. package/dist/types/config/src/generate.global-config.d.ts +0 -10
  63. package/dist/types/config/src/generate.global-config.d.ts.map +0 -1
  64. package/dist/types/config/src/generate.manifest.d.ts.map +0 -1
  65. package/dist/types/config/src/index.d.ts.map +0 -1
  66. package/dist/types/config/src/mappers/appshell.config.d.ts.map +0 -1
  67. package/dist/types/config/src/outdated.d.ts.map +0 -1
  68. package/dist/types/config/src/publish.d.ts.map +0 -1
  69. package/dist/types/config/src/register.d.ts +0 -4
  70. package/dist/types/config/src/register.d.ts.map +0 -1
  71. package/dist/types/config/src/sync.d.ts.map +0 -1
  72. package/dist/types/config/src/types.d.ts.map +0 -1
  73. package/dist/types/config/src/utils/blur.d.ts.map +0 -1
  74. package/dist/types/config/src/utils/compare.d.ts.map +0 -1
  75. package/dist/types/config/src/utils/config.d.ts.map +0 -1
  76. package/dist/types/config/src/utils/copy.d.ts.map +0 -1
  77. package/dist/types/config/src/utils/index.d.ts.map +0 -1
  78. package/dist/types/config/src/utils/isValidUrl.d.ts +0 -3
  79. package/dist/types/config/src/utils/isValidUrl.d.ts.map +0 -1
  80. package/dist/types/config/src/utils/list.d.ts.map +0 -1
  81. package/dist/types/config/src/utils/load.d.ts.map +0 -1
  82. package/dist/types/config/src/utils/loadJson.d.ts +0 -10
  83. package/dist/types/config/src/utils/loadJson.d.ts.map +0 -1
  84. package/dist/types/config/src/utils/merge.d.ts +0 -4
  85. package/dist/types/config/src/utils/merge.d.ts.map +0 -1
  86. package/dist/types/config/src/validators/AppshellGlobalConfigValidator.d.ts +0 -4
  87. package/dist/types/config/src/validators/AppshellGlobalConfigValidator.d.ts.map +0 -1
  88. package/dist/types/config/src/validators/AppshellManifestValidator.d.ts +0 -4
  89. package/dist/types/config/src/validators/AppshellManifestValidator.d.ts.map +0 -1
  90. package/dist/types/config/src/validators/AppshellTemplateValidator.d.ts.map +0 -1
  91. package/dist/types/config/src/validators/index.d.ts.map +0 -1
  92. package/dist/types/loader/src/index.d.ts.map +0 -1
  93. package/dist/types/loader/src/loadAppshellComponent.d.ts.map +0 -1
  94. package/dist/types/loader/src/remoteLoader.d.ts.map +0 -1
  95. package/dist/types/loader/src/resolvers.d.ts.map +0 -1
  96. package/dist/types/loader/src/types.d.ts.map +0 -1
  97. package/dist/types/react/src/components/AppshellComponent.d.ts.map +0 -1
  98. package/dist/types/react/src/components/LoadingError.d.ts.map +0 -1
  99. package/dist/types/react/src/components/ReactHost.d.ts +0 -9
  100. package/dist/types/react/src/components/ReactHost.d.ts.map +0 -1
  101. package/dist/types/react/src/contexts/GlobalConfigContext.d.ts +0 -11
  102. package/dist/types/react/src/contexts/GlobalConfigContext.d.ts.map +0 -1
  103. package/dist/types/react/src/contexts/ManifestContext.d.ts +0 -12
  104. package/dist/types/react/src/contexts/ManifestContext.d.ts.map +0 -1
  105. package/dist/types/react/src/contexts/MetadataContext.d.ts +0 -11
  106. package/dist/types/react/src/contexts/MetadataContext.d.ts.map +0 -1
  107. package/dist/types/react/src/contexts/RemoteContext.d.ts.map +0 -1
  108. package/dist/types/react/src/hooks/useGlobalConfig.d.ts +0 -4
  109. package/dist/types/react/src/hooks/useGlobalConfig.d.ts.map +0 -1
  110. package/dist/types/react/src/hooks/useManifest.d.ts +0 -4
  111. package/dist/types/react/src/hooks/useManifest.d.ts.map +0 -1
  112. package/dist/types/react/src/hooks/useMetadata.d.ts +0 -4
  113. package/dist/types/react/src/hooks/useMetadata.d.ts.map +0 -1
  114. package/dist/types/react/src/hooks/useRemote.d.ts.map +0 -1
  115. package/dist/types/react/src/index.d.ts.map +0 -1
  116. package/dist/types/react/src/resources/jsonResource.d.ts.map +0 -1
  117. package/dist/types/react/src/types.d.ts.map +0 -1
  118. package/src/components/AppshellComponent.tsx +0 -97
  119. package/src/components/LoadingError.tsx +0 -15
  120. package/src/components/ReactHost.tsx +0 -55
  121. package/src/contexts/GlobalConfigContext.tsx +0 -17
  122. package/src/contexts/ManifestContext.tsx +0 -40
  123. package/src/contexts/MetadataContext.tsx +0 -17
  124. package/src/contexts/RemoteContext.tsx +0 -22
  125. package/src/hooks/useGlobalConfig.ts +0 -7
  126. package/src/hooks/useManifest.ts +0 -7
  127. package/src/hooks/useMetadata.ts +0 -6
  128. package/src/hooks/useRemote.ts +0 -7
  129. package/src/index.ts +0 -11
  130. package/src/resources/jsonResource.ts +0 -35
  131. package/src/types.ts +0 -3
  132. package/tsconfig.json +0 -7
  133. package/webpack.config.js +0 -42
@@ -1,53 +0,0 @@
1
- /** @jest-environment jsdom */
2
- import * as remoteLoader from '@appshell/loader';
3
- import '@testing-library/jest-dom';
4
- import { act, render, screen } from '@testing-library/react';
5
- import React from 'react';
6
- import AppshellComponent from '../src/components/AppshellComponent';
7
- import * as useGlobalConfig from '../src/hooks/useGlobalConfig';
8
- import manifest from './fixtures/Manifest';
9
- import TestComponent from './fixtures/TestComponent';
10
- import config from './fixtures/TestGlobalConfig';
11
-
12
- jest.mock('../src/hooks/useGlobalConfig');
13
-
14
- const TestFallback = () => <div>loading...</div>;
15
-
16
- describe('AppshellComponent', () => {
17
- it('should match snapshot', async () => {
18
- jest.spyOn(useGlobalConfig, 'default').mockReturnValue(config);
19
- jest.spyOn(remoteLoader, 'default').mockReturnValueOnce(async () => [TestComponent, manifest]);
20
-
21
- const { container, findByText } = await act(() =>
22
- render(<AppshellComponent remote="TestModule/TestComponent" />),
23
- );
24
- const view = await findByText(/test component/i);
25
-
26
- expect(view).toBeInTheDocument();
27
- expect(container).toMatchSnapshot();
28
- });
29
-
30
- it('should render fallback while resource is pending', async () => {
31
- jest.spyOn(useGlobalConfig, 'default').mockReturnValue(config);
32
- jest.spyOn(remoteLoader, 'default').mockReturnValueOnce(() => [null, null]);
33
-
34
- await act(() =>
35
- render(<AppshellComponent remote="TestModule/TestComponent" fallback={<TestFallback />} />),
36
- );
37
-
38
- expect(screen.getByText(/loading/i)).toBeInTheDocument();
39
- });
40
-
41
- it('should render error when resource fails', async () => {
42
- jest.spyOn(useGlobalConfig, 'default').mockReturnValue(config);
43
- jest
44
- .spyOn(remoteLoader, 'default')
45
- .mockImplementationOnce(() => new Error('Failed to get resource'));
46
-
47
- await act(() =>
48
- render(<AppshellComponent remote="TestModule/TestComponent" fallback={<TestFallback />} />),
49
- );
50
-
51
- expect(screen.getByText(/Error loading Appshell component/i)).toBeInTheDocument();
52
- });
53
- });
@@ -1,14 +0,0 @@
1
- /** @jest-environment jsdom */
2
- import { render } from '@testing-library/react';
3
- import React from 'react';
4
- import LoadingError from '../src/components/LoadingError';
5
-
6
- describe('LoadingError', () => {
7
- it('should match snapshot', () => {
8
- const view = render(
9
- <LoadingError remote="TestModule/TestComponent" reason="Could not find component" />,
10
- );
11
-
12
- expect(view).toMatchSnapshot();
13
- });
14
- });
@@ -1,50 +0,0 @@
1
- /** @jest-environment jsdom */
2
- import '@testing-library/jest-dom';
3
- import { render, screen } from '@testing-library/react';
4
- import React from 'react';
5
- import { ManifestProvider } from '../src/contexts/ManifestContext';
6
- import useManifest from '../src/hooks/useManifest';
7
- import manifest from './fixtures/Manifest';
8
- import TestComponent from './fixtures/TestComponent';
9
-
10
- const ComponentUsingManifest = () => {
11
- const res = useManifest();
12
-
13
- return <div>{JSON.stringify(res.remotes)}</div>;
14
- };
15
-
16
- describe('ManifestProvider', () => {
17
- it('should render children', async () => {
18
- render(
19
- <ManifestProvider manifest={manifest}>
20
- <TestComponent />
21
- </ManifestProvider>,
22
- );
23
-
24
- await expect(screen.getByText(/test component/i)).toBeInTheDocument();
25
- });
26
-
27
- it('should make the manifest context available', async () => {
28
- render(
29
- <ManifestProvider manifest={manifest}>
30
- <ComponentUsingManifest />
31
- </ManifestProvider>,
32
- );
33
-
34
- await expect(screen.getByText(/TestModule\/TestComponent/i)).toBeInTheDocument();
35
- });
36
-
37
- it('should warn when a consumer reads the deprecated modules field', () => {
38
- const warn = jest.spyOn(console, 'warn').mockImplementation(() => {});
39
- const ComponentUsingModules = () => <div>{Object.keys(useManifest().modules).length}</div>;
40
-
41
- render(
42
- <ManifestProvider manifest={manifest}>
43
- <ComponentUsingModules />
44
- </ManifestProvider>,
45
- );
46
-
47
- expect(warn).toHaveBeenCalledWith(expect.stringMatching(/modules is deprecated/i));
48
- warn.mockRestore();
49
- });
50
- });
@@ -1,136 +0,0 @@
1
- /** @jest-environment jsdom */
2
- import '@testing-library/jest-dom';
3
- import { act, render, screen } from '@testing-library/react';
4
- import fetch, { enableFetchMocks } from 'jest-fetch-mock';
5
- import React from 'react';
6
- import * as AppshellComponent from '../src/components/AppshellComponent';
7
- import ReactHost from '../src/components/ReactHost';
8
-
9
- enableFetchMocks();
10
-
11
- jest.mock('@appshell/core', () => ({
12
- APPSHELL_ENV: {
13
- APPSHELL_REGISTRY: 'appshell_registry',
14
- APPSHELL_PUBLIC_URL: 'http://test.com',
15
- APPSHELL_ROOT: 'TestModule/TestComponent',
16
- APPSHELL_ROOT_PROPS: '{"foo":"bar"}',
17
- },
18
- }));
19
-
20
- jest.mock('../src/components/AppshellComponent', () => ({
21
- __esModule: true,
22
- default: () => <div>test component</div>,
23
- }));
24
-
25
- describe('RenderHost', () => {
26
- const configUrl = 'http://test.com/appshell.config.json';
27
- const remote = 'TestModule/TestComponent';
28
-
29
- let useState: jest.SpyInstance;
30
- const mockUseState = (val) => {
31
- useState.mockImplementationOnce(() => [val, () => {}]);
32
- };
33
-
34
- beforeEach(() => {
35
- useState = jest.spyOn(React, 'useState');
36
- fetch.mockIf(
37
- (req) => req.url === 'http://test.com/appshell.config.json',
38
- () => Promise.resolve({ ok: true, body: JSON.stringify({ test: 'data' }) }),
39
- );
40
- });
41
-
42
- afterEach(() => {
43
- useState.mockReset();
44
- });
45
-
46
- it('should match snapshot', async () => {
47
- mockUseState({ config: 'foo' });
48
- const { container } = await act(() =>
49
- render(<ReactHost configUrl={configUrl} remote={remote} fallback="Loading" />),
50
- );
51
-
52
- expect(container).toMatchSnapshot();
53
- });
54
-
55
- it('should render empty when config is pending', async () => {
56
- mockUseState(undefined);
57
- const { container } = render(
58
- <ReactHost configUrl={configUrl} remote={remote} fallback="Loading" />,
59
- );
60
-
61
- expect(container).toMatchSnapshot();
62
- });
63
-
64
- it('should render component when config is available', async () => {
65
- mockUseState({ config: 'foo' });
66
- await act(() => render(<ReactHost configUrl={configUrl} remote={remote} fallback="Loading" />));
67
-
68
- expect(screen.getByText(/test component/i)).toBeInTheDocument();
69
- });
70
-
71
- it('should pass props to Appshell component when available', async () => {
72
- mockUseState({ config: 'foo' });
73
- const appshellComponentSpy = jest.spyOn(AppshellComponent, 'default');
74
- await act(() =>
75
- render(<ReactHost configUrl={configUrl} remote={remote} foo="bar" fallback="Loading" />),
76
- );
77
-
78
- expect(screen.getByText(/test component/i)).toBeInTheDocument();
79
-
80
- expect(appshellComponentSpy).toHaveBeenCalledWith(
81
- { fallback: 'Loading', foo: 'bar', remote: 'TestModule/TestComponent' },
82
- {},
83
- );
84
- });
85
-
86
- describe('when the registry inlined the composition', () => {
87
- afterEach(() => {
88
- delete window.__appshell_config__;
89
- });
90
-
91
- const inline = (index = { 'TestModule/TestComponent': 'http://test.com/manifest.json' }) => {
92
- window.__appshell_config__ = {
93
- environmentId: 'acme/prod',
94
- revision: 1,
95
- root: remote,
96
- rootProps: {},
97
- index,
98
- remotes: {},
99
- environment: {},
100
- };
101
- };
102
-
103
- it('should render without fetching a config', async () => {
104
- inline();
105
- useState.mockRestore();
106
- fetch.resetMocks();
107
-
108
- await act(() => render(<ReactHost remote={remote} fallback="Loading" />));
109
-
110
- expect(screen.getByText(/test component/i)).toBeInTheDocument();
111
- expect(fetch).not.toHaveBeenCalled();
112
- });
113
-
114
- it('should prefer the inlined config over a configUrl', async () => {
115
- inline();
116
- useState.mockRestore();
117
- fetch.resetMocks();
118
-
119
- await act(() =>
120
- render(<ReactHost configUrl={configUrl} remote={remote} fallback="Loading" />),
121
- );
122
-
123
- expect(fetch).not.toHaveBeenCalled();
124
- });
125
- });
126
-
127
- it('should render with an empty index when neither a config nor a url is available', async () => {
128
- useState.mockRestore();
129
- fetch.resetMocks();
130
-
131
- await act(() => render(<ReactHost remote={remote} fallback="Loading" />));
132
-
133
- expect(screen.getByText(/test component/i)).toBeInTheDocument();
134
- expect(fetch).not.toHaveBeenCalled();
135
- });
136
- });
@@ -1,9 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`AppshellComponent should match snapshot 1`] = `
4
- <div>
5
- <div>
6
- test component
7
- </div>
8
- </div>
9
- `;
@@ -1,88 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`LoadingError should match snapshot 1`] = `
4
- {
5
- "asFragment": [Function],
6
- "baseElement": <body>
7
- <div>
8
- <div
9
- style="border: 3px solid red;"
10
- >
11
- <h5>
12
- Error loading Appshell component 'TestModule/TestComponent.'
13
- </h5>
14
- <span
15
- style="font-size: 1rem;"
16
- >
17
- Could not find component
18
- </span>
19
- </div>
20
- </div>
21
- </body>,
22
- "container": <div>
23
- <div
24
- style="border: 3px solid red;"
25
- >
26
- <h5>
27
- Error loading Appshell component 'TestModule/TestComponent.'
28
- </h5>
29
- <span
30
- style="font-size: 1rem;"
31
- >
32
- Could not find component
33
- </span>
34
- </div>
35
- </div>,
36
- "debug": [Function],
37
- "findAllByAltText": [Function],
38
- "findAllByDisplayValue": [Function],
39
- "findAllByLabelText": [Function],
40
- "findAllByPlaceholderText": [Function],
41
- "findAllByRole": [Function],
42
- "findAllByTestId": [Function],
43
- "findAllByText": [Function],
44
- "findAllByTitle": [Function],
45
- "findByAltText": [Function],
46
- "findByDisplayValue": [Function],
47
- "findByLabelText": [Function],
48
- "findByPlaceholderText": [Function],
49
- "findByRole": [Function],
50
- "findByTestId": [Function],
51
- "findByText": [Function],
52
- "findByTitle": [Function],
53
- "getAllByAltText": [Function],
54
- "getAllByDisplayValue": [Function],
55
- "getAllByLabelText": [Function],
56
- "getAllByPlaceholderText": [Function],
57
- "getAllByRole": [Function],
58
- "getAllByTestId": [Function],
59
- "getAllByText": [Function],
60
- "getAllByTitle": [Function],
61
- "getByAltText": [Function],
62
- "getByDisplayValue": [Function],
63
- "getByLabelText": [Function],
64
- "getByPlaceholderText": [Function],
65
- "getByRole": [Function],
66
- "getByTestId": [Function],
67
- "getByText": [Function],
68
- "getByTitle": [Function],
69
- "queryAllByAltText": [Function],
70
- "queryAllByDisplayValue": [Function],
71
- "queryAllByLabelText": [Function],
72
- "queryAllByPlaceholderText": [Function],
73
- "queryAllByRole": [Function],
74
- "queryAllByTestId": [Function],
75
- "queryAllByText": [Function],
76
- "queryAllByTitle": [Function],
77
- "queryByAltText": [Function],
78
- "queryByDisplayValue": [Function],
79
- "queryByLabelText": [Function],
80
- "queryByPlaceholderText": [Function],
81
- "queryByRole": [Function],
82
- "queryByTestId": [Function],
83
- "queryByText": [Function],
84
- "queryByTitle": [Function],
85
- "rerender": [Function],
86
- "unmount": [Function],
87
- }
88
- `;
@@ -1,11 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`RenderHost should match snapshot 1`] = `
4
- <div>
5
- <div>
6
- test component
7
- </div>
8
- </div>
9
- `;
10
-
11
- exports[`RenderHost should render empty when config is pending 1`] = `<div />`;
@@ -1,16 +0,0 @@
1
- import { AppshellManifest } from '@appshell/config';
2
-
3
- export default {
4
- remotes: {
5
- 'TestModule/TestComponent': {
6
- id: 'test-component',
7
- scope: 'TestModule',
8
- module: './TestComponent',
9
- manifestUrl: 'http://test.com/appshell.manifest.json',
10
- remoteEntryUrl: 'http://test.com/remoteEntry.js',
11
- metadata: {},
12
- },
13
- },
14
- modules: {},
15
- environment: {},
16
- } as AppshellManifest;
@@ -1,5 +0,0 @@
1
- import React, { FC } from 'react';
2
-
3
- const TestComponent: FC = () => <div>test component</div>;
4
-
5
- export default TestComponent;
@@ -1,8 +0,0 @@
1
- import { AppshellGlobalConfig } from '@appshell/config';
2
-
3
- export default {
4
- index: {
5
- 'TestModule/TestComponent': 'fixtures/appshell.manifest.json',
6
- },
7
- metadata: {},
8
- } as AppshellGlobalConfig;
@@ -1,27 +0,0 @@
1
- /** @jest-environment jsdom */
2
- import { AppshellManifest } from '@appshell/config';
3
- import fetch, { enableFetchMocks } from 'jest-fetch-mock';
4
- import jsonResource from '../src/resources/jsonResource';
5
- import manifest from './fixtures/Manifest';
6
- import waitForResource from './utils/waitForResource';
7
-
8
- enableFetchMocks();
9
-
10
- describe('jsonResource', () => {
11
- it('should return data when fetch succeeds', async () => {
12
- fetch.mockResponseOnce(() => Promise.resolve(JSON.stringify(manifest)));
13
- const resource = jsonResource<AppshellManifest>('http://test.com/some-resource.json');
14
- const data = await waitForResource(resource);
15
-
16
- expect(data).toEqual(manifest);
17
- });
18
-
19
- it('should return error when fetch fails', async () => {
20
- fetch.mockResponseOnce(() =>
21
- Promise.resolve({ ok: false, status: 404, statusText: 'Failed to fetch resource.' }),
22
- );
23
- const resource = jsonResource<AppshellManifest>('http://test.com/some-resource.json');
24
-
25
- await expect(waitForResource(resource)).rejects.toThrow(/failed to fetch resource/i);
26
- });
27
- });
@@ -1,36 +0,0 @@
1
- /** @jest-environment jsdom */
2
- import { AppshellRemote } from '@appshell/config';
3
- import '@testing-library/jest-dom';
4
- import { render, screen } from '@testing-library/react';
5
- import React from 'react';
6
- import { RemoteProvider } from '../src/contexts/RemoteContext';
7
- import useRemote from '../src/hooks/useRemote';
8
-
9
- const remote: AppshellRemote = {
10
- id: 'ping',
11
- scope: 'PingModule',
12
- module: './Ping',
13
- manifestUrl: 'http://test.com/appshell.manifest.json',
14
- remoteEntryUrl: 'http://test.com/remoteEntry.js',
15
- metadata: { title: 'Ping' },
16
- };
17
-
18
- const Probe = () => <span>{useRemote()?.remoteEntryUrl ?? 'none'}</span>;
19
-
20
- describe('useRemote', () => {
21
- it('returns the remote backing the surrounding component', () => {
22
- render(
23
- <RemoteProvider remote={remote}>
24
- <Probe />
25
- </RemoteProvider>,
26
- );
27
-
28
- expect(screen.getByText(remote.remoteEntryUrl)).toBeInTheDocument();
29
- });
30
-
31
- it('returns undefined outside a provider, so hosts render standalone', () => {
32
- render(<Probe />);
33
-
34
- expect(screen.getByText('none')).toBeInTheDocument();
35
- });
36
- });
@@ -1,15 +0,0 @@
1
- import { Resource } from '../../src/types';
2
-
3
- const waitForResource = async <TResource>(
4
- resource: Resource<TResource>,
5
- ): Promise<TResource | Error | undefined> => {
6
- try {
7
- return resource.read();
8
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
- } catch (suspender: any) {
10
- await suspender;
11
- return resource.read();
12
- }
13
- };
14
-
15
- export default waitForResource;
@@ -1 +0,0 @@
1
- {"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../../../../config/src/axios.ts"],"names":[],"mappings":";AAEA,wBAA8B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configmap.d.ts","sourceRoot":"","sources":["../../../../../config/src/configmap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;;YA0BrC,CAAC,SAAS,MAAM,OAAO,CAAC,aAAa,SAAS,KAAG,CAAC;qBAuBzC,cAAc;;AAEtC,wBAGE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../config/src/context.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAaF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QAAO,eAQjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAK5E,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../../config/src/credentials.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAKF,eAAO,MAAM,eAAe,cAC6D,CAAC;AAqB1F,eAAO,MAAM,cAAc,aAAc,MAAM,cAAc,UAAU,SAEtE,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,MAAM,SAI/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,aAAc,MAAM,KAAG,MAAM,GAAG,SAexD,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,MAAM,KAAG,MAO/C,CAAC"}
@@ -1,3 +0,0 @@
1
- declare const _default: (moduleName: string, registry: string) => Promise<void>;
2
- export default _default;
3
- //# sourceMappingURL=deregister.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deregister.d.ts","sourceRoot":"","sources":["../../../../../config/src/deregister.ts"],"names":[],"mappings":"qCAoGkC,MAAM,YAAY,MAAM;AAA1D,wBAeE"}
@@ -1,3 +0,0 @@
1
- declare const _default: (prefix?: string) => Promise<Map<string, string | undefined>>;
2
- export default _default;
3
- //# sourceMappingURL=generate.env.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.env.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.env.ts"],"names":[],"mappings":";AAGA,wBAuBK"}
@@ -1,10 +0,0 @@
1
- import { AppshellGlobalConfig } from './types';
2
- type GenerateGlobalConfigOptions = {
3
- insecure: boolean;
4
- apiKey?: string;
5
- apiKeyHeader?: string;
6
- proxyUrl?: string;
7
- };
8
- declare const _default: (registries: string[], options?: GenerateGlobalConfigOptions) => Promise<AppshellGlobalConfig>;
9
- export default _default;
10
- //# sourceMappingURL=generate.global-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.global-config.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.global-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;qCAGY,MAAM,EAAE,YACX,2BAA2B,KACnC,OAAO,CAAC,oBAAoB,CAAC;AAHhC,wBA8CE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.manifest.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.manifest.ts"],"names":[],"mappings":"AAOA;;;;GAIG;yBACmB,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,MAAM;AAArF,wBAaE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../config/src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC7D,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,eAAe,EACf,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EACR,6BAA6B,EAC7B,WAAW,EACX,cAAc,EACd,MAAM,EACN,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"appshell.config.d.ts","sourceRoot":"","sources":["../../../../../../config/src/mappers/appshell.config.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,gBAAgB,EAEhB,gBAAgB,EAChB,SAAS,EACV,MAAM,UAAU,CAAC;AAiElB,eAAO,MAAM,kBAAkB,GAAI,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAChE,gBAAgB,QACpB,SAAS,gCAQhB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"outdated.d.ts","sourceRoot":"","sources":["../../../../../config/src/outdated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;sCAGrB,WAAW,oBAAoB,gBAAgB;AAAlF,wBAYE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../../config/src/publish.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAmBF;;;;GAIG;AACH,eAAO,MAAM,OAAO,+EASjB,cAAc,KAAG,OAAO,CAAC,aAAa,CAYxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,aACT,MAAM,eACH,MAAM,SACZ,MAAM,UACL,MAAM,KACb,OAAO,CAAC,IAAI,CAgBd,CAAC"}
@@ -1,4 +0,0 @@
1
- import { AppshellManifest } from './types';
2
- declare const _default: (manifest: AppshellManifest, registryPathOrUrl: string, allowOverrides?: boolean) => Promise<void>;
3
- export default _default;
4
- //# sourceMappingURL=register.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../config/src/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,gBAAgB,EAAmB,MAAM,SAAS,CAAC;mCAetE,gBAAgB,qBACP,MAAM;AAF3B,wBA2CE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../../config/src/sync.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5C,eAAO,MAAM,mBAAmB,cAAe,gBAAgB,EAAE,SAuBhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,eACf,MAAM,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c,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EACP,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,iBAAiB,GACjB,KAAK,GACL,aAAa,GACb,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,eAAe,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,GAAG,aAAa,CAAC;IAErD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,YAAY,CAAC,EAAE,GAAG,YAAY,CAAC;CACnD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/blur.ts"],"names":[],"mappings":";AAAA,wBAA8F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/compare.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,mBAAmB,iBAAkB,gBAAgB,uCAMpB,CAAC;AAE/C,eAAO,MAAM,iBAAiB,gBACf,MAAM,gBACL,MAAM,iBACL,MAAM,GAAG,SAAS,kBACjB,MAAM,mBACL,MAAM,GAAG,SAAS,WAC1B,iBAAiB,sBAiD3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,WAAY,gBAAgB,YAAY,gBAAgB,sBAYrF,CAAC;AAEJ,eAAO,MAAM,yBAAyB,gBACvB,WAAW,gBACV,gBAAgB,sBAoB/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,eACnB,gBAAgB,gBACd,gBAAgB,sBAY/B,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,iBAAiB,SAsBtD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,UAAU,eAAgB,MAAM,cAkB5C,CAAC;AAEF,eAAO,MAAM,WAAW,eAAgB,MAAM,UAAU,SAAS,SAchE,CAAC;AAEF,eAAO,MAAM,mBAAmB,WAAY,SAAS,QAAQ,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,SAe7F,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/copy.ts"],"names":[],"mappings":"AAGA;;;;GAIG;kCACsB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AAArD,wBAOE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- declare const _default: (urlString: string) => boolean;
2
- export default _default;
3
- //# sourceMappingURL=isValidUrl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isValidUrl.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/isValidUrl.ts"],"names":[],"mappings":"oCAA2B,MAAM;AAAjC,wBAME"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/list.ts"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,QAAA,MAAM,IAAI,YAAa,MAAM,2BAAqB,MAAM,GAAG,MAAM,aAMhE,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/load.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,QAAA,MAAM,IAAI,GAAI,OAAO,cAAc,MAAM,KAAG,OAU3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,MAAM,EAAE,KAAG,OAAO,EAAqC,CAAC;AAEnG,eAAe,IAAI,CAAC"}
@@ -1,10 +0,0 @@
1
- type LoadJsonOptions = {
2
- insecure: boolean;
3
- target: string | RegExp;
4
- apiKey?: string;
5
- apiKeyHeader?: string;
6
- proxyUrl?: string;
7
- };
8
- declare const _default: <T = Record<string, unknown>>(jsonPathOrUrl: string, options?: LoadJsonOptions) => Promise<T[]>;
9
- export default _default;
10
- //# sourceMappingURL=loadJson.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadJson.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/loadJson.ts"],"names":[],"mappings":"AAOA,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;yBAsDoB,CAAC,2CACN,MAAM,YACZ,eAAe,KAOvB,OAAO,CAAC,CAAC,EAAE,CAAC;AATf,wBAqBE"}