@meethive/vite 0.0.1
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/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2118 -0
- package/dist/index.mjs +2096 -0
- package/dist/src/federation/src/dev/expose-development.d.ts +5 -0
- package/dist/src/federation/src/dev/expose-development.d.ts.map +1 -0
- package/dist/src/federation/src/dev/remote-development.d.ts +5 -0
- package/dist/src/federation/src/dev/remote-development.d.ts.map +1 -0
- package/dist/src/federation/src/dev/shared-development.d.ts +5 -0
- package/dist/src/federation/src/dev/shared-development.d.ts.map +1 -0
- package/dist/src/federation/src/index.d.ts +7 -0
- package/dist/src/federation/src/index.d.ts.map +1 -0
- package/dist/src/federation/src/prod/expose-production.d.ts +5 -0
- package/dist/src/federation/src/prod/expose-production.d.ts.map +1 -0
- package/dist/src/federation/src/prod/remote-production.d.ts +7 -0
- package/dist/src/federation/src/prod/remote-production.d.ts.map +1 -0
- package/dist/src/federation/src/prod/shared-production.d.ts +5 -0
- package/dist/src/federation/src/prod/shared-production.d.ts.map +1 -0
- package/dist/src/federation/src/public.d.ts +40 -0
- package/dist/src/federation/src/public.d.ts.map +1 -0
- package/dist/src/federation/src/runtime/dynamic-remote.d.ts +79 -0
- package/dist/src/federation/src/runtime/dynamic-remote.d.ts.map +1 -0
- package/dist/src/federation/src/utils/html.d.ts +12 -0
- package/dist/src/federation/src/utils/html.d.ts.map +1 -0
- package/dist/src/federation/src/utils/index.d.ts +29 -0
- package/dist/src/federation/src/utils/index.d.ts.map +1 -0
- package/dist/src/federation/src/utils/semver/compare.d.ts +10 -0
- package/dist/src/federation/src/utils/semver/compare.d.ts.map +1 -0
- package/dist/src/federation/src/utils/semver/constants.d.ts +11 -0
- package/dist/src/federation/src/utils/semver/constants.d.ts.map +1 -0
- package/dist/src/federation/src/utils/semver/parser.d.ts +10 -0
- package/dist/src/federation/src/utils/semver/parser.d.ts.map +1 -0
- package/dist/src/federation/src/utils/semver/satisfy.d.ts +2 -0
- package/dist/src/federation/src/utils/semver/satisfy.d.ts.map +1 -0
- package/dist/src/federation/src/utils/semver/utils.d.ts +12 -0
- package/dist/src/federation/src/utils/semver/utils.d.ts.map +1 -0
- package/dist/src/monaco-editor/index.d.ts +35 -0
- package/dist/src/monaco-editor/index.d.ts.map +1 -0
- package/dist/src/monaco-editor/languageWork.d.ts +10 -0
- package/dist/src/monaco-editor/languageWork.d.ts.map +1 -0
- package/dist/src/monaco-editor/workerMiddleware.d.ts +9 -0
- package/dist/src/monaco-editor/workerMiddleware.d.ts.map +1 -0
- package/dist/src/sharp/index.d.ts +12 -0
- package/dist/src/sharp/index.d.ts.map +1 -0
- package/index.ts +3 -0
- package/package.json +48 -0
- package/src/federation/src/dev/expose-development.ts +29 -0
- package/src/federation/src/dev/remote-development.ts +435 -0
- package/src/federation/src/dev/shared-development.ts +29 -0
- package/src/federation/src/index.ts +242 -0
- package/src/federation/src/prod/expose-production.ts +333 -0
- package/src/federation/src/prod/federation_fn_import.js +75 -0
- package/src/federation/src/prod/remote-production.ts +658 -0
- package/src/federation/src/prod/shared-production.ts +268 -0
- package/src/federation/src/public.ts +54 -0
- package/src/federation/src/runtime/dynamic-remote.ts +247 -0
- package/src/federation/src/utils/html.ts +165 -0
- package/src/federation/src/utils/index.ts +255 -0
- package/src/federation/src/utils/semver/compare.ts +131 -0
- package/src/federation/src/utils/semver/constants.ts +46 -0
- package/src/federation/src/utils/semver/parser.ts +253 -0
- package/src/federation/src/utils/semver/satisfy.ts +151 -0
- package/src/federation/src/utils/semver/utils.ts +93 -0
- package/src/federation/types/dynamic-remote.d.ts +105 -0
- package/src/federation/types/index.d.ts +344 -0
- package/src/federation/types/pluginHooks.d.ts +4 -0
- package/src/federation/types/virtual-modules.d.ts +48 -0
- package/src/federation/types/viteDevServer.d.ts +22 -0
- package/src/monaco-editor/index.ts +205 -0
- package/src/monaco-editor/languageWork.ts +36 -0
- package/src/monaco-editor/workerMiddleware.ts +78 -0
- package/src/sharp/index.ts +93 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expose-development.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/dev/expose-development.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,wBAAgB,eAAe,CAC7B,OAAO,EAAE,2BAA2B,GACnC,WAAW,CAMb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-development.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/dev/remote-development.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAiB,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAgB7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,wBAAgB,eAAe,CAC7B,OAAO,EAAE,2BAA2B,GACnC,WAAW,CA8Yb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-development.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/dev/shared-development.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAE9D,wBAAgB,eAAe,CAC7B,OAAO,EAAE,2BAA2B,GACnC,WAAW,CAMb"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
import { VitePluginFederationOptions } from '../types';
|
|
3
|
+
|
|
4
|
+
export { VitePluginFederationVersion } from './public';
|
|
5
|
+
export * from './runtime/dynamic-remote';
|
|
6
|
+
export default function federation(options: VitePluginFederationOptions): Plugin;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/federation/src/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAEV,MAAM,EAIP,MAAM,MAAM,CAAA;AAIb,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAwB3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AACtD,cAAc,0BAA0B,CAAA;AACxC,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,OAAO,EAAE,2BAA2B,GACnC,MAAM,CA4LR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expose-production.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/prod/expose-production.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,2BAA2B,GACnC,WAAW,CAgSb"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigTypeSet, VitePluginFederationOptions } from '../../types';
|
|
2
|
+
import { PluginHooks } from '../../types/pluginHooks';
|
|
3
|
+
|
|
4
|
+
declare const sharedFileName2Prop: Map<string, ConfigTypeSet>;
|
|
5
|
+
export declare function prodRemotePlugin(options: VitePluginFederationOptions): PluginHooks;
|
|
6
|
+
export { sharedFileName2Prop };
|
|
7
|
+
//# sourceMappingURL=remote-production.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-production.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/prod/remote-production.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAiB1D,QAAA,MAAM,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAGjD,CAAA;AAoDH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,2BAA2B,GACnC,WAAW,CA6iBb;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-production.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/prod/shared-production.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,OAAO,KAAK,EAAiB,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAQ7E,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,2BAA2B,GACnC,WAAW,CA+Ob"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ConfigTypeSet, RemotesConfig } from '../types';
|
|
2
|
+
import { ResolvedConfig } from 'vite';
|
|
3
|
+
import { Remote } from './utils';
|
|
4
|
+
|
|
5
|
+
export declare const EXPOSES_MAP: Map<any, any>;
|
|
6
|
+
export declare const EXPOSES_KEY_MAP: Map<any, any>;
|
|
7
|
+
export declare const SHARED = "shared";
|
|
8
|
+
export declare const DYNAMIC_LOADING_CSS = "dynamicLoadingCss";
|
|
9
|
+
export declare const DYNAMIC_LOADING_CSS_PREFIX = "__v__css__";
|
|
10
|
+
export declare const DEFAULT_ENTRY_FILENAME = "remoteEntry.js";
|
|
11
|
+
export declare const EXTERNALS: string[];
|
|
12
|
+
export declare const ROLLUP = "rollup";
|
|
13
|
+
export declare const VITE = "vite";
|
|
14
|
+
export declare const VitePluginFederationVersion = "1.5.0";
|
|
15
|
+
export declare const builderInfo: {
|
|
16
|
+
builder: string;
|
|
17
|
+
version: string;
|
|
18
|
+
assetsDir: string;
|
|
19
|
+
isHost: boolean;
|
|
20
|
+
isRemote: boolean;
|
|
21
|
+
isShared: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const parsedOptions: {
|
|
24
|
+
prodExpose: (string | ConfigTypeSet)[];
|
|
25
|
+
prodRemote: (string | ConfigTypeSet)[];
|
|
26
|
+
prodShared: (string | ConfigTypeSet)[];
|
|
27
|
+
devShared: (string | ConfigTypeSet)[];
|
|
28
|
+
devExpose: (string | ConfigTypeSet)[];
|
|
29
|
+
devRemote: (string | ConfigTypeSet)[];
|
|
30
|
+
};
|
|
31
|
+
export declare const devRemotes: {
|
|
32
|
+
id: string;
|
|
33
|
+
regexp: RegExp;
|
|
34
|
+
config: RemotesConfig;
|
|
35
|
+
}[];
|
|
36
|
+
export declare const prodRemotes: Remote[];
|
|
37
|
+
export declare const viteConfigResolved: {
|
|
38
|
+
config: ResolvedConfig | undefined;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../src/federation/src/public.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,eAAO,MAAM,WAAW,eAAY,CAAA;AACpC,eAAO,MAAM,eAAe,eAAY,CAAA;AACxC,eAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,eAAO,MAAM,mBAAmB,sBAAsB,CAAA;AACtD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AACtD,eAAO,MAAM,sBAAsB,mBAAmB,CAAA;AACtD,eAAO,MAAM,SAAS,EAAE,MAAM,EAAO,CAAA;AACrC,eAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,eAAO,MAAM,IAAI,SAAS,CAAA;AAC1B,eAAO,MAAM,2BAA2B,UAAU,CAAA;AAClD,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAA;AACD,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAA;AACD,eAAO,MAAM,UAAU,EAAE;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,aAAa,CAAA;CACtB,EAAO,CAAA;AACR,eAAO,MAAM,WAAW,EAAE,MAAM,EAAO,CAAA;AACvC,eAAO,MAAM,kBAAkB,EAAE;IAAE,MAAM,EAAE,cAAc,GAAG,SAAS,CAAA;CAEpE,CAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic remote loader for runtime
|
|
3
|
+
* Provides utilities to dynamically load and manage remote components at runtime
|
|
4
|
+
*/
|
|
5
|
+
export interface RemoteOptions {
|
|
6
|
+
url: string | (() => string | Promise<string>);
|
|
7
|
+
format?: 'esm' | 'systemjs' | 'var';
|
|
8
|
+
from?: 'vite' | 'webpack';
|
|
9
|
+
shareScope?: string;
|
|
10
|
+
external?: string | string[];
|
|
11
|
+
externalType?: 'url' | 'promise';
|
|
12
|
+
}
|
|
13
|
+
export interface RemoteComponentConfig {
|
|
14
|
+
name: string;
|
|
15
|
+
component: string;
|
|
16
|
+
url: string | (() => string | Promise<string>);
|
|
17
|
+
options?: RemoteOptions;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Dynamic remote component manager
|
|
21
|
+
*/
|
|
22
|
+
export declare class DynamicRemoteManager {
|
|
23
|
+
private remoteCache;
|
|
24
|
+
private loadingPromises;
|
|
25
|
+
/**
|
|
26
|
+
* Add a remote dynamically at runtime
|
|
27
|
+
* @param name Remote name
|
|
28
|
+
* @param config Remote configuration
|
|
29
|
+
*/
|
|
30
|
+
addRemote(name: string, config: RemoteOptions): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Load a remote component dynamically
|
|
33
|
+
* @param remoteName Remote name
|
|
34
|
+
* @param componentName Component name to load from remote
|
|
35
|
+
* @returns Promise of the loaded component
|
|
36
|
+
*/
|
|
37
|
+
loadRemoteComponent(remoteName: string, componentName: string): Promise<any>;
|
|
38
|
+
private doLoadRemoteComponent;
|
|
39
|
+
/**
|
|
40
|
+
* Preload a remote component
|
|
41
|
+
* @param remoteName Remote name
|
|
42
|
+
* @param componentName Component name
|
|
43
|
+
*/
|
|
44
|
+
preloadRemoteComponent(remoteName: string, componentName: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Remove a remote component from cache
|
|
47
|
+
* @param remoteName Remote name
|
|
48
|
+
* @param componentName Component name
|
|
49
|
+
*/
|
|
50
|
+
clearRemoteComponentCache(remoteName: string, componentName?: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Get all cached remote components
|
|
53
|
+
*/
|
|
54
|
+
getCachedRemotes(): string[];
|
|
55
|
+
/**
|
|
56
|
+
* Check if a remote component is cached
|
|
57
|
+
* @param remoteName Remote name
|
|
58
|
+
* @param componentName Component name
|
|
59
|
+
*/
|
|
60
|
+
isRemoteComponentCached(remoteName: string, componentName: string): boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare const dynamicRemoteManager: DynamicRemoteManager;
|
|
63
|
+
/**
|
|
64
|
+
* Convenience function to dynamically load remote component
|
|
65
|
+
* @param config Remote component configuration
|
|
66
|
+
*/
|
|
67
|
+
export declare function loadDynamicRemoteComponent(config: RemoteComponentConfig): Promise<any>;
|
|
68
|
+
/**
|
|
69
|
+
* Vue 3 composable for dynamic remote loading
|
|
70
|
+
* @param remoteName Remote name
|
|
71
|
+
* @param componentName Component name
|
|
72
|
+
*/
|
|
73
|
+
export declare function useDynamicRemote(remoteName: string, componentName: string): {
|
|
74
|
+
component: any;
|
|
75
|
+
loading: any;
|
|
76
|
+
error: any;
|
|
77
|
+
reload: () => Promise<void>;
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=dynamic-remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-remote.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/runtime/dynamic-remote.ts"],"names":[],"m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,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO;CAI5E;AAGD,eAAO,MAAM,oBAAoB,sBAA6B,CAAC;AAE/D;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,CAW5F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;;;;;EA+BzE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface HtmlTagDescriptor {
|
|
2
|
+
tag: string;
|
|
3
|
+
attrs?: Record<string, string | boolean | undefined>;
|
|
4
|
+
children?: string | HtmlTagDescriptor[];
|
|
5
|
+
/**
|
|
6
|
+
* default: 'head-prepend'
|
|
7
|
+
*/
|
|
8
|
+
injectTo?: 'head' | 'body' | 'head-prepend' | 'body-prepend';
|
|
9
|
+
}
|
|
10
|
+
export declare const toPreloadTag: (href: string) => HtmlTagDescriptor;
|
|
11
|
+
export declare function injectToHead(html: string, tags: HtmlTagDescriptor[], prepend?: boolean): string;
|
|
12
|
+
//# sourceMappingURL=html.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/utils/html.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,GAAG,cAAc,CAAA;CAC7D;AAsGD,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,iBAO1C,CAAA;AAEF,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,iBAAiB,EAAE,EACzB,OAAO,UAAQ,UA+BhB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ConfigTypeSet, Exposes, Remotes, RemotesConfig, Shared, VitePluginFederationOptions } from '../../types';
|
|
2
|
+
import { PluginContext } from 'rollup';
|
|
3
|
+
|
|
4
|
+
export * from './html';
|
|
5
|
+
export declare function findDependencies(this: PluginContext, id: string, sets: Set<string>, sharedModuleIds: Map<string, string>, usedSharedModuleIds: Set<string>): void;
|
|
6
|
+
export declare function parseSharedOptions(options: VitePluginFederationOptions): (string | ConfigTypeSet)[];
|
|
7
|
+
export declare function parseExposeOptions(options: VitePluginFederationOptions): (string | ConfigTypeSet)[];
|
|
8
|
+
export declare function createContentHash(path: string): string;
|
|
9
|
+
export declare function parseRemoteOptions(options: VitePluginFederationOptions): (string | ConfigTypeSet)[];
|
|
10
|
+
export declare function parseOptions(options: Exposes | Remotes | Shared | undefined, normalizeSimple: (value: any, key: any) => ConfigTypeSet, normalizeOptions: (value: any, key: any) => ConfigTypeSet): (string | ConfigTypeSet)[];
|
|
11
|
+
export declare function removeNonRegLetter(str: string, reg?: RegExp): string;
|
|
12
|
+
export declare function getModuleMarker(value: string, type?: string): string;
|
|
13
|
+
export declare function normalizePath(id: string): string;
|
|
14
|
+
export declare function uniqueArr<T>(arr: T[]): T[];
|
|
15
|
+
export declare function isSameFilepath(src: string, dest: string): boolean;
|
|
16
|
+
export type Remote = {
|
|
17
|
+
id: string;
|
|
18
|
+
regexp: RegExp;
|
|
19
|
+
config: RemotesConfig;
|
|
20
|
+
};
|
|
21
|
+
export declare function createRemotesMap(remotes: Remote[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* get file extname from url
|
|
24
|
+
* @param url
|
|
25
|
+
*/
|
|
26
|
+
export declare function getFileExtname(url: string): string;
|
|
27
|
+
export declare const REMOTE_FROM_PARAMETER = "remoteFrom";
|
|
28
|
+
export declare const NAME_CHAR_REG: RegExp;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/federation/src/utils/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,OAAO,EACP,aAAa,EACb,MAAM,EACN,2BAA2B,EAC5B,MAAM,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE3C,cAAc,QAAQ,CAAA;AAEtB,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,aAAa,EACnB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,EACjB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC/B,IAAI,CAkBN;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,2BAA2B,GACnC,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,CAsB5B;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,2BAA2B,GACnC,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,CAgB5B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,2BAA2B,GACnC,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,CAkB5B;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,EAC/C,eAAe,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,aAAa,EACxD,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,aAAa,GACxD,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,CAmC5B;AAID,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAY,GAAG,MAAM,CAYvE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAE1C;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBjE;AAED,MAAM,MAAM,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAA;AAE1E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAoB1D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,eAAO,MAAM,qBAAqB,eAAe,CAAA;AACjD,eAAO,MAAM,aAAa,QAAgC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface CompareAtom {
|
|
2
|
+
operator: string;
|
|
3
|
+
version: string;
|
|
4
|
+
major: string;
|
|
5
|
+
minor: string;
|
|
6
|
+
patch: string;
|
|
7
|
+
preRelease?: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare function compare(rangeAtom: CompareAtom, versionAtom: CompareAtom): boolean;
|
|
10
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../../../../src/federation/src/utils/semver/compare.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB;AAiFD,wBAAgB,OAAO,CACrB,SAAS,EAAE,WAAW,EACtB,WAAW,EAAE,WAAW,GACvB,OAAO,CAwBT"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const hyphenRange: string;
|
|
2
|
+
export declare const comparatorTrim: string;
|
|
3
|
+
export declare const tildeTrim: string;
|
|
4
|
+
export declare const caretTrim: string;
|
|
5
|
+
export declare const star = "(<|>)?=?\\s*\\*";
|
|
6
|
+
export declare const caret: string;
|
|
7
|
+
export declare const tilde: string;
|
|
8
|
+
export declare const xRange: string;
|
|
9
|
+
export declare const comparator: string;
|
|
10
|
+
export declare const gte0 = "^\\s*>=\\s*0.0.0\\s*$";
|
|
11
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/federation/src/utils/semver/constants.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,WAAW,QAAwD,CAAA;AAIhF,eAAO,MAAM,cAAc,QAAoD,CAAA;AAE/E,eAAO,MAAM,SAAS,QAA2B,CAAA;AAEjD,eAAO,MAAM,SAAS,QAA2B,CAAA;AACjD,eAAO,MAAM,IAAI,oBAAoB,CAAA;AACrC,eAAO,MAAM,KAAK,QAAiC,CAAA;AAGnD,eAAO,MAAM,KAAK,QAAiC,CAAA;AACnD,eAAO,MAAM,MAAM,QAAgC,CAAA;AACnD,eAAO,MAAM,UAAU,QAAmC,CAAA;AAE1D,eAAO,MAAM,IAAI,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function parseHyphen(range: string): string;
|
|
2
|
+
export declare function parseComparatorTrim(range: string): string;
|
|
3
|
+
export declare function parseTildeTrim(range: string): string;
|
|
4
|
+
export declare function parseCaretTrim(range: string): string;
|
|
5
|
+
export declare function parseCarets(range: string): string;
|
|
6
|
+
export declare function parseTildes(range: string): string;
|
|
7
|
+
export declare function parseXRanges(range: string): string;
|
|
8
|
+
export declare function parseStar(range: string): string;
|
|
9
|
+
export declare function parseGTE0(comparatorString: string): string;
|
|
10
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../../../src/federation/src/utils/semver/parser.ts"],"names":[],"mappings":"AA4BA,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA0CjD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAqDjD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAyBjD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA8ElD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,SAAS,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAE1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"satisfy.d.ts","sourceRoot":"","sources":["../../../../../../src/federation/src/utils/semver/satisfy.ts"],"names":[],"mappings":"AAwEA,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CA8E/D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function parseRegex(source: string): RegExp;
|
|
2
|
+
export declare function isXVersion(version: string): boolean;
|
|
3
|
+
export declare function pipe<TArgs extends any[], R1, R2, R3, R4, R5, R6, R7>(f1: (...args: TArgs) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (...args: TArgs) => R7;
|
|
4
|
+
export declare function pipe<TArgs extends any[], R1, R2, R3, R4, R5, R6>(f1: (...args: TArgs) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (...args: TArgs) => R6;
|
|
5
|
+
export declare function pipe<TArgs extends any[], R1, R2, R3, R4, R5>(f1: (...args: TArgs) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (...args: TArgs) => R5;
|
|
6
|
+
export declare function pipe<TArgs extends any[], R1, R2, R3, R4>(f1: (...args: TArgs) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (...args: TArgs) => R4;
|
|
7
|
+
export declare function pipe<TArgs extends any[], R1, R2, R3>(f1: (...args: TArgs) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (...args: TArgs) => R3;
|
|
8
|
+
export declare function pipe<TArgs extends any[], R1, R2>(f1: (...args: TArgs) => R1, f2: (a: R1) => R2): (...args: TArgs) => R2;
|
|
9
|
+
export declare function pipe<TArgs extends any[], R1>(f1: (...args: TArgs) => R1): (...args: TArgs) => R1;
|
|
10
|
+
export declare function extractComparator(comparatorString: string): RegExpMatchArray | null;
|
|
11
|
+
export declare function combineVersion(major: string, minor: string, patch: string, preRelease: string): string;
|
|
12
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/federation/src/utils/semver/utils.ts"],"names":[],"mappings":"AAiBA,wBAAgB,UAAU,CAA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E,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,GAChB,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,EAAE,CAAA;AACzB,wBAAgB,IAAI,CAAC,KAAK,SAAS,GAAG,EAAE,EAAE,EAAE,EAC1C,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,EAAE,GACzB,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,EAAE,CAAA;AAOzB,wBAAgB,iBAAiB,CAC/B,gBAAgB,EAAE,MAAM,GACvB,gBAAgB,GAAG,IAAI,CAEzB;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,GACjB,MAAM,CAQR"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
import { EditorLanguageWorks, IWorkerDefinition } from './languageWork';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Return a resolved path for a given Monaco file.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveMonacoPath(filePath: string): string;
|
|
8
|
+
export declare function getWorks(options: IMonacoEditorOpts): IWorkerDefinition[];
|
|
9
|
+
export interface IMonacoEditorOpts {
|
|
10
|
+
/**
|
|
11
|
+
* include only a subset of the languageWorkers supported.
|
|
12
|
+
*/
|
|
13
|
+
languageWorkers?: EditorLanguageWorks[];
|
|
14
|
+
customWorkers?: IWorkerDefinition[];
|
|
15
|
+
/**
|
|
16
|
+
* Override the public path from which files generated by this plugin will be served.
|
|
17
|
+
* This wins out over Webpack's dynamic runtime path and can be useful to avoid attempting to load workers cross-
|
|
18
|
+
* origin when using a CDN for other static resources.
|
|
19
|
+
* Use e.g. '/' if you want to load your resources from the current origin.
|
|
20
|
+
*/
|
|
21
|
+
publicPath?: string;
|
|
22
|
+
customDistPath?: (root: string, buildOutDir: string, base: string) => string;
|
|
23
|
+
forceBuildCDN?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Specify whether the editor API should be exposed through a global `monaco` object or not. This
|
|
26
|
+
* option is applicable to `0.22.0` and newer version of `monaco-editor`. Since `0.22.0`, the ESM
|
|
27
|
+
* version of the monaco editor does no longer define a global `monaco` object unless
|
|
28
|
+
* `global.MonacoEnvironment = { globalAPI: true }` is set ([change
|
|
29
|
+
* log](https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md#0220-29012021)).
|
|
30
|
+
*/
|
|
31
|
+
globalAPI?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export default function monacoEditorPlugin(options: IMonacoEditorOpts): Plugin;
|
|
34
|
+
export declare function isCDN(publicPath: string): boolean;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/monaco-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,MAAM,EAAkB,MAAM,MAAM,CAAC;AAIjE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;AAG9F;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM1D;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,iBAAiB,uBAQlD;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAExC,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAEpC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAE7E,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAeD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CA6H7E;AAED,wBAAgB,KAAK,CAAC,UAAU,EAAE,MAAM,WAMvC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface IWorkerDefinition {
|
|
2
|
+
label: string;
|
|
3
|
+
entry: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const languageWorkAttr: IWorkerDefinition[];
|
|
6
|
+
export declare const languageWorksByLabel: {
|
|
7
|
+
[language: string]: IWorkerDefinition;
|
|
8
|
+
};
|
|
9
|
+
export type EditorLanguageWorks = 'css' | 'html' | 'json' | 'typescript' | 'editorWorkerService';
|
|
10
|
+
//# sourceMappingURL=languageWork.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languageWork.d.ts","sourceRoot":"","sources":["../../../src/monaco-editor/languageWork.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,EAqB/C,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAO,CAAC;AAMlF,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Connect, ResolvedConfig } from 'vite';
|
|
2
|
+
import { IMonacoEditorOpts } from './index';
|
|
3
|
+
import { IWorkerDefinition } from './languageWork';
|
|
4
|
+
|
|
5
|
+
export declare function getFilenameByEntry(entry: string): string;
|
|
6
|
+
export declare const cacheDir = "node_modules/.monaco/";
|
|
7
|
+
export declare function getWorkPath(works: IWorkerDefinition[], options: IMonacoEditorOpts, config: ResolvedConfig): {};
|
|
8
|
+
export declare function workerMiddleware(middlewares: Connect.Server, config: ResolvedConfig, options: IMonacoEditorOpts): void;
|
|
9
|
+
//# sourceMappingURL=workerMiddleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workerMiddleware.d.ts","sourceRoot":"","sources":["../../../src/monaco-editor/workerMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAY,iBAAiB,EAA4B,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKnD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,UAG/C;AAED,eAAO,MAAM,QAAQ,0BAA0B,CAAC;AAEhD,wBAAgB,WAAW,CACzB,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,cAAc,MA6BvB;AAED,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,OAAO,CAAC,MAAM,EAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,iBAAiB,GACzB,IAAI,CAyBN"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
|
|
3
|
+
export type SharpOptimizeOptions = {
|
|
4
|
+
include?: (string | RegExp)[];
|
|
5
|
+
exclude?: (string | RegExp)[];
|
|
6
|
+
jpegQuality?: number;
|
|
7
|
+
pngQuality?: number;
|
|
8
|
+
webpQuality?: number;
|
|
9
|
+
avifQuality?: number;
|
|
10
|
+
};
|
|
11
|
+
export default function sharpOptimize(options?: SharpOptimizeOptions): Plugin;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sharp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAMlC,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IAC7B,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AASD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,MAAM,CAsEhF"}
|
package/index.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@meethive/vite",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"keywords": ["@meethive/vite"],
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"src",
|
|
11
|
+
"index.ts"
|
|
12
|
+
],
|
|
13
|
+
"author": "",
|
|
14
|
+
"private": false,
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@rollup/plugin-virtual": "3.0.2",
|
|
18
|
+
"@types/estree": "1.0.8",
|
|
19
|
+
"@types/node": "18.6.4",
|
|
20
|
+
"chalk": "5.0.1",
|
|
21
|
+
"child_process": "1.0.2",
|
|
22
|
+
"esbuild": "0.25.5",
|
|
23
|
+
"estree-walker": "3.0.2",
|
|
24
|
+
"execa": "6.1.0",
|
|
25
|
+
"fs-extra": "10.0.0",
|
|
26
|
+
"kill-port": "2.0.1",
|
|
27
|
+
"lint-staged": "13.0.3",
|
|
28
|
+
"magic-string": "0.30.17",
|
|
29
|
+
"rollup": "4.48.1",
|
|
30
|
+
"typescript": "4.9.4",
|
|
31
|
+
"vite": "7.0.0",
|
|
32
|
+
"vite-plugin-dts": "4.5.4"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=14.0.0",
|
|
39
|
+
"pnpm": ">=7.0.1"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"sharp": "^0.34.3"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "vite build",
|
|
46
|
+
"clean": "pnpm rimraf node_modules && pnpm rimraf dist"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2022 Origin.js and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are licensed under Mulan PSL v2.
|
|
5
|
+
// You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
6
|
+
// You may obtain a copy of Mulan PSL v2 at:
|
|
7
|
+
// http://license.coscl.org.cn/MulanPSL2
|
|
8
|
+
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
9
|
+
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
10
|
+
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
11
|
+
// See the Mulan PSL v2 for more details.
|
|
12
|
+
//
|
|
13
|
+
// SPDX-License-Identifier: MulanPSL-2.0
|
|
14
|
+
// *****************************************************************************
|
|
15
|
+
|
|
16
|
+
import { parseExposeOptions } from '../utils'
|
|
17
|
+
import { parsedOptions } from '../public'
|
|
18
|
+
import type { VitePluginFederationOptions } from '../../types'
|
|
19
|
+
import type { PluginHooks } from '../../types/pluginHooks'
|
|
20
|
+
|
|
21
|
+
export function devExposePlugin(
|
|
22
|
+
options: VitePluginFederationOptions
|
|
23
|
+
): PluginHooks {
|
|
24
|
+
parsedOptions.devExpose = parseExposeOptions(options)
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
name: 'originjs:expose-development'
|
|
28
|
+
}
|
|
29
|
+
}
|