@module-federation/managers 0.1.3 → 0.1.5

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/package.json DELETED
@@ -1,43 +0,0 @@
1
- {
2
- "name": "@module-federation/managers",
3
- "version": "0.1.3",
4
- "license": "MIT",
5
- "description": "Provide managers for helping handle mf data .",
6
- "keywords": [
7
- "Module Federation"
8
- ],
9
- "files": [
10
- "dist/",
11
- "README.md"
12
- ],
13
- "publishConfig": {
14
- "access": "public"
15
- },
16
- "author": "hanric <hanric.zhang@gmail.com>",
17
- "sideEffects": false,
18
- "main": "./index.cjs.js",
19
- "module": "./index.esm.js",
20
- "types": "./dist/index.cjs.d.ts",
21
- "dependencies": {
22
- "@module-federation/sdk": "workspace:*",
23
- "find-pkg": "2.0.0",
24
- "fs-extra": "9.1.0"
25
- },
26
- "devDependencies": {
27
- "webpack": "5.76.0"
28
- },
29
- "exports": {
30
- ".": {
31
- "import": "./dist/index.esm.js",
32
- "require": "./dist/index.cjs.js",
33
- "types": "./dist/index.cjs.d.ts"
34
- }
35
- },
36
- "typesVersions": {
37
- "*": {
38
- ".": [
39
- "./dist/index.cjs.d.ts"
40
- ]
41
- }
42
- }
43
- }
@@ -1,7 +0,0 @@
1
- export declare class BasicPluginOptionsManager<T> {
2
- private _options?;
3
- get enable(): boolean;
4
- get options(): T;
5
- init(options: T, extraArgs?: Record<string, any>): void;
6
- setOptions(options: T): void;
7
- }
@@ -1,19 +0,0 @@
1
- import type { containerPlugin, ManifestModuleInfos, moduleFederationPlugin } from '@module-federation/sdk';
2
- import type { EntryObject } from 'webpack';
3
- import { BasicPluginOptionsManager } from './BasicPluginOptionsManager';
4
- declare class ContainerManager extends BasicPluginOptionsManager<moduleFederationPlugin.ModuleFederationPluginOptions> {
5
- private _manifestModuleInfos?;
6
- private _parsedOptions?;
7
- get enable(): boolean;
8
- get globalEntryName(): string | undefined;
9
- get containerPluginExposesOptions(): containerPlugin.ContainerPluginOptions['exposes'];
10
- get exposeFileNameImportMap(): Record<string, string[]>;
11
- get exposeObject(): Record<string, string>;
12
- get exposeFiles(): string[];
13
- get manifestModuleInfos(): ManifestModuleInfos;
14
- get webpackEntry(): EntryObject;
15
- private _parseOptions;
16
- init(options: moduleFederationPlugin.ModuleFederationPluginOptions): void;
17
- validate(name?: string): void;
18
- }
19
- export { ContainerManager };
@@ -1,6 +0,0 @@
1
- export declare class PKGJsonManager {
2
- private _pkg?;
3
- setPKGJson(pkg: Record<string, any>): void;
4
- readPKGJson(ctx?: string): Record<string, any>;
5
- getExposeGarfishModuleType(ctx?: string): string;
6
- }
@@ -1,18 +0,0 @@
1
- import { RemoteEntryInfo, StatsRemote, containerReferencePlugin, moduleFederationPlugin } from '@module-federation/sdk';
2
- import { BasicPluginOptionsManager } from './BasicPluginOptionsManager';
3
- interface NormalizedRemote {
4
- [remoteName: string]: RemoteEntryInfo & {
5
- alias: string;
6
- shareScope: string;
7
- };
8
- }
9
- declare class RemoteManager extends BasicPluginOptionsManager<moduleFederationPlugin.ModuleFederationPluginOptions> {
10
- normalizedOptions: NormalizedRemote;
11
- get enable(): boolean;
12
- get statsRemoteWithEmptyUsedIn(): StatsRemote[];
13
- get dtsRemotes(): Record<string, string>;
14
- get remotes(): moduleFederationPlugin.ModuleFederationPluginOptions['remotes'];
15
- normalizeOptions(options?: containerReferencePlugin.ContainerReferencePluginOptions['remotes']): void;
16
- init(options: moduleFederationPlugin.ModuleFederationPluginOptions): void;
17
- }
18
- export { RemoteManager };
@@ -1,19 +0,0 @@
1
- import { sharing } from 'webpack';
2
- import { moduleFederationPlugin, sharePlugin } from '@module-federation/sdk';
3
- import { NormalizedSharedOptions } from './types';
4
- import { BasicPluginOptionsManager } from './BasicPluginOptionsManager';
5
- type SharePluginOptions = ConstructorParameters<typeof sharing.SharePlugin>[0];
6
- declare class SharedManager extends BasicPluginOptionsManager<moduleFederationPlugin.ModuleFederationPluginOptions> {
7
- normalizedOptions: NormalizedSharedOptions;
8
- get enable(): boolean;
9
- get sharedPluginOptions(): SharePluginOptions;
10
- findPkg(name: string, shareConfig: sharePlugin.SharedConfig): {
11
- pkg: Record<string, any>;
12
- path: string;
13
- pkgPath: string;
14
- };
15
- transformSharedConfig(sharedConfig: sharePlugin.SharedConfig): sharePlugin.SharedConfig;
16
- normalizeOptions(options: moduleFederationPlugin.ModuleFederationPluginOptions['shared']): void;
17
- init(options: moduleFederationPlugin.ModuleFederationPluginOptions): void;
18
- }
19
- export { SharedManager };
@@ -1 +0,0 @@
1
- export declare const LOCAL_BUILD_VERSION = "local";
@@ -1,7 +0,0 @@
1
- export { BasicPluginOptionsManager } from './BasicPluginOptionsManager';
2
- export { ContainerManager } from './ContainerManager';
3
- export { PKGJsonManager } from './PKGJsonManager';
4
- export { RemoteManager } from './RemoteManager';
5
- export { SharedManager } from './SharedManager';
6
- export * as utils from './utils';
7
- export * as types from './types';
@@ -1,16 +0,0 @@
1
- import { WebpackOptionsNormalized } from 'webpack';
2
- import { sharePlugin } from '@module-federation/sdk';
3
- export type EntryStaticNormalized = Awaited<ReturnType<Extract<WebpackOptionsNormalized['entry'], () => any>>>;
4
- export type EntryDescriptionNormalized = EntryStaticNormalized[keyof EntryStaticNormalized];
5
- export type ContainerOptionsFormat<T> = (string | Record<string, string | string[] | T>)[] | Record<string, string | string[] | T>;
6
- export type NormalizeSimple<R> = (value: string | string[], key: string) => R;
7
- export type NormalizeOptions<T, R> = (value: T, key: string) => R;
8
- export type ProcessFN<R> = (key: string, normalizedOptions: R) => void;
9
- export type ParsedContainerOptions<T> = [string, T][];
10
- export type NormalizedSharedOption = {
11
- name: string;
12
- version: string;
13
- } & sharePlugin.SharedConfig;
14
- export interface NormalizedSharedOptions {
15
- [depName: string]: NormalizedSharedOption;
16
- }
@@ -1,5 +0,0 @@
1
- import { ContainerOptionsFormat, NormalizeSimple, NormalizeOptions, ParsedContainerOptions } from './types';
2
- export declare function parseOptions<T, R>(options: ContainerOptionsFormat<T>, normalizeSimple: NormalizeSimple<R>, normalizeOptions: NormalizeOptions<T, R>): ParsedContainerOptions<R>;
3
- export declare function getBuildVersion(): string;
4
- export declare function getBuildName(): string | undefined;
5
- export declare function isRequiredVersion(str: string): boolean;