mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 08:32:56 +00:00
48 lines
1.8 KiB
JavaScript
48 lines
1.8 KiB
JavaScript
//#region src/constant.ts
|
|
const FederationModuleManifest = "federation-manifest.json";
|
|
const MANIFEST_EXT = ".json";
|
|
const BROWSER_LOG_KEY = "FEDERATION_DEBUG";
|
|
const NameTransformSymbol = {
|
|
AT: "@",
|
|
HYPHEN: "-",
|
|
SLASH: "/"
|
|
};
|
|
const NameTransformMap = {
|
|
[NameTransformSymbol.AT]: "scope_",
|
|
[NameTransformSymbol.HYPHEN]: "_",
|
|
[NameTransformSymbol.SLASH]: "__"
|
|
};
|
|
const EncodedNameTransformMap = {
|
|
[NameTransformMap[NameTransformSymbol.AT]]: NameTransformSymbol.AT,
|
|
[NameTransformMap[NameTransformSymbol.HYPHEN]]: NameTransformSymbol.HYPHEN,
|
|
[NameTransformMap[NameTransformSymbol.SLASH]]: NameTransformSymbol.SLASH
|
|
};
|
|
const SEPARATOR = ":";
|
|
const ManifestFileName = "mf-manifest.json";
|
|
const StatsFileName = "mf-stats.json";
|
|
const MFModuleType = {
|
|
NPM: "npm",
|
|
APP: "app"
|
|
};
|
|
const MODULE_DEVTOOL_IDENTIFIER = "__MF_DEVTOOLS_MODULE_INFO__";
|
|
const ENCODE_NAME_PREFIX = "ENCODE_NAME_PREFIX";
|
|
const TEMP_DIR = ".federation";
|
|
let TreeShakingStatus = /* @__PURE__ */ function(TreeShakingStatus) {
|
|
/**
|
|
* Not handled by deploy server, needs to infer by the real runtime period.
|
|
*/
|
|
TreeShakingStatus[TreeShakingStatus["UNKNOWN"] = 1] = "UNKNOWN";
|
|
/**
|
|
* It means the shared has been calculated , runtime should take this shared as first choice.
|
|
*/
|
|
TreeShakingStatus[TreeShakingStatus["CALCULATED"] = 2] = "CALCULATED";
|
|
/**
|
|
* It means the shared has been calculated, and marked as no used
|
|
*/
|
|
TreeShakingStatus[TreeShakingStatus["NO_USE"] = 0] = "NO_USE";
|
|
return TreeShakingStatus;
|
|
}({});
|
|
|
|
//#endregion
|
|
export { BROWSER_LOG_KEY, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, MANIFEST_EXT, MFModuleType, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, TreeShakingStatus };
|
|
//# sourceMappingURL=constant.js.map
|