@module-federation/modern-js 0.16.0 → 0.17.0
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.
- package/dist/cjs/cli/configPlugin.js +4 -3
- package/dist/cjs/cli/configPlugin.spec.js +1 -3
- package/dist/cjs/cli/server/data-fetch-server-plugin.js +2 -143
- package/dist/cjs/constant.js +2 -49
- package/dist/cjs/{runtime/wrapNoSSR.js → react/index.js} +22 -13
- package/dist/cjs/runtime/index.js +0 -28
- package/dist/cjs/ssr-runtime/devPlugin.js +2 -2
- package/dist/cjs/ssr-runtime/injectDataFetchFunctionPlugin.js +6 -102
- package/dist/esm/cli/configPlugin.js +4 -3
- package/dist/esm/cli/configPlugin.spec.js +1 -3
- package/dist/esm/cli/server/data-fetch-server-plugin.js +2 -219
- package/dist/esm/constant.js +1 -37
- package/dist/esm/react/index.js +12 -0
- package/dist/esm/runtime/index.js +0 -21
- package/dist/esm/ssr-runtime/devPlugin.js +1 -1
- package/dist/esm/ssr-runtime/injectDataFetchFunctionPlugin.js +4 -147
- package/dist/esm-node/cli/configPlugin.js +4 -3
- package/dist/esm-node/cli/configPlugin.spec.js +1 -3
- package/dist/esm-node/cli/server/data-fetch-server-plugin.js +2 -143
- package/dist/esm-node/constant.js +1 -37
- package/dist/esm-node/react/index.js +12 -0
- package/dist/esm-node/runtime/index.js +0 -21
- package/dist/esm-node/ssr-runtime/devPlugin.js +1 -1
- package/dist/esm-node/ssr-runtime/injectDataFetchFunctionPlugin.js +4 -89
- package/dist/types/cli/index.d.ts +1 -1
- package/dist/types/cli/mfRuntimePlugins/inject-node-fetch.d.ts +2 -2
- package/dist/types/cli/mfRuntimePlugins/resolve-entry-ipv4.d.ts +2 -2
- package/dist/types/cli/mfRuntimePlugins/shared-strategy.d.ts +2 -2
- package/dist/types/constant.d.ts +0 -23
- package/dist/types/react/index.d.ts +2 -0
- package/dist/types/runtime/index.d.ts +0 -9
- package/dist/types/ssr-runtime/injectDataFetchFunctionPlugin.d.ts +0 -3
- package/package.json +24 -24
- package/dist/cjs/cli/mfRuntimePlugins/auto-fetch-data.js +0 -100
- package/dist/cjs/interfaces/global.js +0 -16
- package/dist/cjs/runtime/AwaitDataFetch.js +0 -144
- package/dist/cjs/runtime/createRemoteComponent.js +0 -327
- package/dist/cjs/ssr-runtime/downgrade.js +0 -114
- package/dist/cjs/utils/dataFetch.js +0 -211
- package/dist/cjs/utils/index.js +0 -54
- package/dist/esm/cli/mfRuntimePlugins/auto-fetch-data.js +0 -76
- package/dist/esm/interfaces/global.js +0 -0
- package/dist/esm/runtime/AwaitDataFetch.js +0 -131
- package/dist/esm/runtime/createRemoteComponent.js +0 -417
- package/dist/esm/runtime/wrapNoSSR.js +0 -12
- package/dist/esm/ssr-runtime/downgrade.js +0 -150
- package/dist/esm/utils/dataFetch.js +0 -237
- package/dist/esm/utils/index.js +0 -28
- package/dist/esm-node/cli/mfRuntimePlugins/auto-fetch-data.js +0 -70
- package/dist/esm-node/interfaces/global.js +0 -0
- package/dist/esm-node/runtime/AwaitDataFetch.js +0 -109
- package/dist/esm-node/runtime/createRemoteComponent.js +0 -291
- package/dist/esm-node/runtime/wrapNoSSR.js +0 -11
- package/dist/esm-node/ssr-runtime/downgrade.js +0 -88
- package/dist/esm-node/utils/dataFetch.js +0 -166
- package/dist/esm-node/utils/index.js +0 -27
- package/dist/types/cli/mfRuntimePlugins/auto-fetch-data.d.ts +0 -3
- package/dist/types/interfaces/global.d.ts +0 -27
- package/dist/types/runtime/AwaitDataFetch.d.ts +0 -19
- package/dist/types/runtime/createRemoteComponent.d.ts +0 -26
- package/dist/types/runtime/wrapNoSSR.d.ts +0 -9
- package/dist/types/ssr-runtime/downgrade.d.ts +0 -4
- package/dist/types/utils/dataFetch.d.ts +0 -26
- package/dist/types/utils/index.d.ts +0 -15
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { GlobalModuleInfo } from '@module-federation/sdk';
|
|
2
|
-
import type { DataFetchParams, MF_DATA_FETCH_MAP, NoSSRRemoteInfo } from '../interfaces/global';
|
|
3
|
-
import type { FederationHost } from '@module-federation/enhanced/runtime';
|
|
4
|
-
export declare const getDataFetchInfo: ({ name, alias, id, remoteSnapshot, }: {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
remoteSnapshot: GlobalModuleInfo[string];
|
|
8
|
-
alias?: string;
|
|
9
|
-
}) => {
|
|
10
|
-
dataFetchName: string;
|
|
11
|
-
dataFetchId: string;
|
|
12
|
-
} | undefined;
|
|
13
|
-
export declare function initDataFetchMap(): void;
|
|
14
|
-
export declare function getDataFetchItem(id: string): import("../interfaces/global").MF_DATA_FETCH_MAP_VALUE;
|
|
15
|
-
export declare function getDataFetchMap(): MF_DATA_FETCH_MAP;
|
|
16
|
-
export declare const flushDataFetch: () => void;
|
|
17
|
-
export declare function setDataFetchItemLoadedStatus(id: string): void;
|
|
18
|
-
export declare const wrapDataFetchId: (id?: string) => string;
|
|
19
|
-
export declare const getDataFetchIdWithErrorMsgs: (errMsgs: string) => string | undefined;
|
|
20
|
-
export declare function fetchData(id: string, params: DataFetchParams, remoteInfo?: NoSSRRemoteInfo): Promise<unknown | undefined>;
|
|
21
|
-
export declare function getDataFetchMapKey(dataFetchInfo?: ReturnType<typeof getDataFetchInfo>, hostInfo?: {
|
|
22
|
-
name: string;
|
|
23
|
-
version?: string;
|
|
24
|
-
}): string | undefined;
|
|
25
|
-
export declare function loadDataFetchModule(instance: FederationHost, id: string): Promise<(params: DataFetchParams) => Promise<unknown>>;
|
|
26
|
-
export declare function isDataLoaderExpose(exposeKey: string): boolean;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { FederationHost } from '@module-federation/enhanced/runtime';
|
|
2
|
-
export declare function getLoadedRemoteInfos(id: string, instance: FederationHost | null): {
|
|
3
|
-
snapshot: import("@module-federation/sdk/.").ModuleInfo | import("@module-federation/sdk/.").ManifestProvider | import("@module-federation/sdk/.").PureEntryProvider | undefined;
|
|
4
|
-
expose: string;
|
|
5
|
-
alias?: string;
|
|
6
|
-
name: string;
|
|
7
|
-
version?: string;
|
|
8
|
-
buildVersion?: string;
|
|
9
|
-
entry: string;
|
|
10
|
-
type: import("@module-federation/sdk/.").RemoteEntryType;
|
|
11
|
-
entryGlobalName: string;
|
|
12
|
-
shareScope: string | string[];
|
|
13
|
-
} | undefined;
|
|
14
|
-
export declare function isCSROnly(): boolean;
|
|
15
|
-
export * from './dataFetch';
|