@module-federation/managers
Advanced tools
@@ -12,11 +12,14 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/define_property_getters | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -38,8 +41,4 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
| __webpack_require__.r(__webpack_exports__); | ||
| __webpack_require__.d(__webpack_exports__, { | ||
| BasicPluginOptionsManager: () => (BasicPluginOptionsManager) | ||
| }); | ||
| class BasicPluginOptionsManager { | ||
@@ -66,8 +65,12 @@ get enable() { | ||
| __webpack_require__.d(__webpack_exports__, { | ||
| BasicPluginOptionsManager: () => (BasicPluginOptionsManager) | ||
| }); | ||
| exports.BasicPluginOptionsManager = __webpack_exports__.BasicPluginOptionsManager; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["BasicPluginOptionsManager"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["BasicPluginOptionsManager"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -1,3 +0,1 @@ | ||
| ;// CONCATENATED MODULE: ./src/BasicPluginOptionsManager.ts | ||
| class BasicPluginOptionsManager { | ||
@@ -4,0 +2,0 @@ get enable() { |
+19
-15
@@ -12,11 +12,14 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/define_property_getters | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -38,19 +41,20 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
| __webpack_require__.r(__webpack_exports__); | ||
| __webpack_require__.d(__webpack_exports__, { | ||
| LOCAL_BUILD_VERSION: () => (LOCAL_BUILD_VERSION), | ||
| UNKNOWN_MODULE_NAME: () => (UNKNOWN_MODULE_NAME) | ||
| }); | ||
| const LOCAL_BUILD_VERSION = 'local'; | ||
| const UNKNOWN_MODULE_NAME = 'UNKNOWN'; | ||
| __webpack_require__.d(__webpack_exports__, { | ||
| }, { | ||
| LOCAL_BUILD_VERSION: LOCAL_BUILD_VERSION, | ||
| UNKNOWN_MODULE_NAME: UNKNOWN_MODULE_NAME | ||
| }); | ||
| exports.LOCAL_BUILD_VERSION = __webpack_exports__.LOCAL_BUILD_VERSION; | ||
| exports.UNKNOWN_MODULE_NAME = __webpack_exports__.UNKNOWN_MODULE_NAME; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["LOCAL_BUILD_VERSION","UNKNOWN_MODULE_NAME"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["LOCAL_BUILD_VERSION","UNKNOWN_MODULE_NAME"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -1,3 +0,1 @@ | ||
| ;// CONCATENATED MODULE: ./src/constant.ts | ||
| const LOCAL_BUILD_VERSION = 'local'; | ||
@@ -4,0 +2,0 @@ const UNKNOWN_MODULE_NAME = 'UNKNOWN'; |
+13
-11
@@ -12,3 +12,2 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/compat_get_default_export | ||
@@ -28,8 +27,12 @@ (() => { | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -51,3 +54,2 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
@@ -226,7 +228,7 @@ // ESM COMPAT FLAG | ||
| exports.ContainerManager = __webpack_exports__.ContainerManager; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["ContainerManager"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["ContainerManager"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -6,11 +6,6 @@ import path from "path"; | ||
| ;// CONCATENATED MODULE: external "path" | ||
| ;// CONCATENATED MODULE: external "@module-federation/sdk" | ||
| ;// CONCATENATED MODULE: external "./utils.mjs" | ||
| ;// CONCATENATED MODULE: external "./BasicPluginOptionsManager.mjs" | ||
| ;// CONCATENATED MODULE: ./src/ContainerManager.ts | ||
@@ -17,0 +12,0 @@ |
+19
-17
@@ -12,11 +12,14 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/define_property_getters | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -38,3 +41,2 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
@@ -46,10 +48,10 @@ // ESM COMPAT FLAG | ||
| __webpack_require__.d(__webpack_exports__, { | ||
| BasicPluginOptionsManager: () => (/* reexport */ external_BasicPluginOptionsManager_js_namespaceObject.BasicPluginOptionsManager), | ||
| ContainerManager: () => (/* reexport */ external_ContainerManager_js_namespaceObject.ContainerManager), | ||
| PKGJsonManager: () => (/* reexport */ external_PKGJsonManager_js_namespaceObject.PKGJsonManager), | ||
| RemoteManager: () => (/* reexport */ external_RemoteManager_js_namespaceObject.RemoteManager), | ||
| SharedManager: () => (/* reexport */ external_SharedManager_js_namespaceObject.SharedManager), | ||
| UNKNOWN_MODULE_NAME: () => (/* reexport */ external_constant_js_namespaceObject.UNKNOWN_MODULE_NAME), | ||
| PKGJsonManager: () => (/* reexport */ external_PKGJsonManager_js_namespaceObject.PKGJsonManager), | ||
| types: () => (/* reexport */ external_types_js_namespaceObject), | ||
| SharedManager: () => (/* reexport */ external_SharedManager_js_namespaceObject.SharedManager), | ||
| ContainerManager: () => (/* reexport */ external_ContainerManager_js_namespaceObject.ContainerManager), | ||
| BasicPluginOptionsManager: () => (/* reexport */ external_BasicPluginOptionsManager_js_namespaceObject.BasicPluginOptionsManager), | ||
| utils: () => (/* reexport */ external_utils_js_namespaceObject), | ||
| RemoteManager: () => (/* reexport */ external_RemoteManager_js_namespaceObject.RemoteManager) | ||
| utils: () => (/* reexport */ external_utils_js_namespaceObject) | ||
| }); | ||
@@ -91,7 +93,7 @@ | ||
| exports.utils = __webpack_exports__.utils; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["BasicPluginOptionsManager","ContainerManager","PKGJsonManager","RemoteManager","SharedManager","UNKNOWN_MODULE_NAME","types","utils"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["BasicPluginOptionsManager","ContainerManager","PKGJsonManager","RemoteManager","SharedManager","UNKNOWN_MODULE_NAME","types","utils"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
+9
-18
@@ -1,27 +0,12 @@ | ||
| import { BasicPluginOptionsManager } from "./BasicPluginOptionsManager.mjs"; | ||
| import { ContainerManager } from "./ContainerManager.mjs"; | ||
| import { PKGJsonManager } from "./PKGJsonManager.mjs"; | ||
| import { RemoteManager } from "./RemoteManager.mjs"; | ||
| import { SharedManager } from "./SharedManager.mjs"; | ||
| import { UNKNOWN_MODULE_NAME } from "./constant.mjs"; | ||
| import * as __WEBPACK_EXTERNAL_MODULE__utils_mjs_25ece7d1__ from "./utils.mjs"; | ||
| import * as __WEBPACK_EXTERNAL_MODULE__types_mjs_4ad50757__ from "./types.mjs"; | ||
| import * as __rspack_external__types_mjs_4ad50757 from "./types.mjs"; | ||
| import * as __rspack_external__utils_mjs_25ece7d1 from "./utils.mjs"; | ||
| ;// CONCATENATED MODULE: external "./BasicPluginOptionsManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./ContainerManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./PKGJsonManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./RemoteManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./SharedManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./constant.mjs" | ||
| ;// CONCATENATED MODULE: external "./utils.mjs" | ||
| ;// CONCATENATED MODULE: external "./types.mjs" | ||
| ;// CONCATENATED MODULE: ./src/index.ts | ||
@@ -36,2 +21,8 @@ | ||
| export { BasicPluginOptionsManager, ContainerManager, PKGJsonManager, RemoteManager, SharedManager, UNKNOWN_MODULE_NAME, __WEBPACK_EXTERNAL_MODULE__types_mjs_4ad50757__ as types, __WEBPACK_EXTERNAL_MODULE__utils_mjs_25ece7d1__ as utils }; | ||
| export { __rspack_external__types_mjs_4ad50757 as types, __rspack_external__utils_mjs_25ece7d1 as utils }; | ||
| export { BasicPluginOptionsManager } from "./BasicPluginOptionsManager.mjs"; | ||
| export { ContainerManager } from "./ContainerManager.mjs"; | ||
| export { PKGJsonManager } from "./PKGJsonManager.mjs"; | ||
| export { RemoteManager } from "./RemoteManager.mjs"; | ||
| export { SharedManager } from "./SharedManager.mjs"; | ||
| export { UNKNOWN_MODULE_NAME } from "./constant.mjs"; |
+23
-18
@@ -12,3 +12,2 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/compat_get_default_export | ||
@@ -28,8 +27,12 @@ (() => { | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -51,3 +54,2 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
@@ -65,5 +67,4 @@ // ESM COMPAT FLAG | ||
| var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject); | ||
| ;// CONCATENATED MODULE: external "find-pkg" | ||
| const external_find_pkg_namespaceObject = require("find-pkg"); | ||
| var external_find_pkg_default = /*#__PURE__*/__webpack_require__.n(external_find_pkg_namespaceObject); | ||
| ;// CONCATENATED MODULE: external "empathic/package" | ||
| const package_namespaceObject = require("empathic/package"); | ||
| ;// CONCATENATED MODULE: external "fs" | ||
@@ -76,3 +77,2 @@ const external_fs_namespaceObject = require("fs"); | ||
| // @ts-ignore this pkg miss types | ||
@@ -96,3 +96,9 @@ | ||
| try { | ||
| const pkg = external_find_pkg_default().sync(root); | ||
| const pkgPath = (0,package_namespaceObject.up)({ | ||
| cwd: root | ||
| }); | ||
| if (!pkgPath) { | ||
| return {}; | ||
| } | ||
| const pkg = JSON.parse(external_fs_default().readFileSync(pkgPath, 'utf8')); | ||
| this._pkg = pkg; | ||
@@ -107,5 +113,4 @@ return pkg; | ||
| getExposeGarfishModuleType(root = process.cwd()) { | ||
| var _pkg_mf; | ||
| const pkg = this.readPKGJson(root); | ||
| return (pkg === null || pkg === void 0 ? void 0 : (_pkg_mf = pkg['mf']) === null || _pkg_mf === void 0 ? void 0 : _pkg_mf.type) === sdk_namespaceObject.MFModuleType.NPM ? sdk_namespaceObject.MFModuleType.NPM : sdk_namespaceObject.MFModuleType.APP; | ||
| return pkg?.['mf']?.type === sdk_namespaceObject.MFModuleType.NPM ? sdk_namespaceObject.MFModuleType.NPM : sdk_namespaceObject.MFModuleType.APP; | ||
| } | ||
@@ -115,7 +120,7 @@ } | ||
| exports.PKGJsonManager = __webpack_exports__.PKGJsonManager; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["PKGJsonManager"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["PKGJsonManager"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
| import path from "path"; | ||
| import find_pkg from "find-pkg"; | ||
| import { up } from "empathic/package"; | ||
| import fs from "fs"; | ||
| import { MFModuleType, logger } from "@module-federation/sdk"; | ||
| ;// CONCATENATED MODULE: external "path" | ||
| ;// CONCATENATED MODULE: external "find-pkg" | ||
| ;// CONCATENATED MODULE: external "fs" | ||
| ;// CONCATENATED MODULE: external "@module-federation/sdk" | ||
| ;// CONCATENATED MODULE: ./src/PKGJsonManager.ts | ||
| // @ts-ignore this pkg miss types | ||
@@ -35,3 +29,9 @@ | ||
| try { | ||
| const pkg = find_pkg.sync(root); | ||
| const pkgPath = up({ | ||
| cwd: root | ||
| }); | ||
| if (!pkgPath) { | ||
| return {}; | ||
| } | ||
| const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); | ||
| this._pkg = pkg; | ||
@@ -46,5 +46,4 @@ return pkg; | ||
| getExposeGarfishModuleType(root = process.cwd()) { | ||
| var _pkg_mf; | ||
| const pkg = this.readPKGJson(root); | ||
| return (pkg === null || pkg === void 0 ? void 0 : (_pkg_mf = pkg['mf']) === null || _pkg_mf === void 0 ? void 0 : _pkg_mf.type) === MFModuleType.NPM ? MFModuleType.NPM : MFModuleType.APP; | ||
| return pkg?.['mf']?.type === MFModuleType.NPM ? MFModuleType.NPM : MFModuleType.APP; | ||
| } | ||
@@ -51,0 +50,0 @@ } |
+13
-11
@@ -12,11 +12,14 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/define_property_getters | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -38,3 +41,2 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
@@ -157,7 +159,7 @@ // ESM COMPAT FLAG | ||
| exports.RemoteManager = __webpack_exports__.RemoteManager; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["RemoteManager"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["RemoteManager"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -5,9 +5,5 @@ import { composeKeyWithSeparator, parseEntry } from "@module-federation/sdk"; | ||
| ;// CONCATENATED MODULE: external "@module-federation/sdk" | ||
| ;// CONCATENATED MODULE: external "./BasicPluginOptionsManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./constant.mjs" | ||
| ;// CONCATENATED MODULE: ./src/RemoteManager.ts | ||
@@ -14,0 +10,0 @@ |
+18
-16
@@ -12,3 +12,2 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/compat_get_default_export | ||
@@ -28,8 +27,12 @@ (() => { | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -51,3 +54,2 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
@@ -62,5 +64,4 @@ // ESM COMPAT FLAG | ||
| ;// CONCATENATED MODULE: external "find-pkg" | ||
| const external_find_pkg_namespaceObject = require("find-pkg"); | ||
| var external_find_pkg_default = /*#__PURE__*/__webpack_require__.n(external_find_pkg_namespaceObject); | ||
| ;// CONCATENATED MODULE: external "empathic/package" | ||
| const package_namespaceObject = require("empathic/package"); | ||
| ;// CONCATENATED MODULE: external "path" | ||
@@ -79,3 +80,2 @@ const external_path_namespaceObject = require("path"); | ||
| ;// CONCATENATED MODULE: ./src/SharedManager.ts | ||
| // @ts-ignore this pkg miss types | ||
@@ -131,3 +131,5 @@ | ||
| }); | ||
| const pkgJsonPath = external_find_pkg_default().sync(pkgPath); | ||
| const pkgJsonPath = (0,package_namespaceObject.up)({ | ||
| cwd: external_path_default().dirname(pkgPath) | ||
| }); | ||
| return { | ||
@@ -197,7 +199,7 @@ pkg: JSON.parse(external_fs_default().readFileSync(pkgJsonPath, 'utf-8')), | ||
| exports.SharedManager = __webpack_exports__.SharedManager; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["SharedManager"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["SharedManager"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -1,2 +0,2 @@ | ||
| import find_pkg from "find-pkg"; | ||
| import { up } from "empathic/package"; | ||
| import path from "path"; | ||
@@ -8,16 +8,8 @@ import fs from "fs"; | ||
| ;// CONCATENATED MODULE: external "find-pkg" | ||
| ;// CONCATENATED MODULE: external "path" | ||
| ;// CONCATENATED MODULE: external "fs" | ||
| ;// CONCATENATED MODULE: external "@module-federation/sdk" | ||
| ;// CONCATENATED MODULE: external "./BasicPluginOptionsManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./utils.mjs" | ||
| ;// CONCATENATED MODULE: ./src/SharedManager.ts | ||
| // @ts-ignore this pkg miss types | ||
@@ -73,3 +65,5 @@ | ||
| }); | ||
| const pkgJsonPath = find_pkg.sync(pkgPath); | ||
| const pkgJsonPath = up({ | ||
| cwd: path.dirname(pkgPath) | ||
| }); | ||
| return { | ||
@@ -76,0 +70,0 @@ pkg: JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8')), |
+2
-4
@@ -12,3 +12,2 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/make_namespace_object | ||
@@ -24,3 +23,2 @@ (() => { | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
@@ -30,5 +28,5 @@ __webpack_require__.r(__webpack_exports__); | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
+1
-2
| ;// CONCATENATED MODULE: ./src/types.ts | ||
| export {}; |
+15
-13
@@ -12,11 +12,14 @@ "use strict"; | ||
| /************************************************************************/ | ||
| // webpack/runtime/define_property_getters | ||
| (() => { | ||
| __webpack_require__.d = (exports, definition) => { | ||
| for(var key in definition) { | ||
| if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
| } | ||
| } | ||
| __webpack_require__.d = (exports, getters, values) => { | ||
| var define = (defs, kind) => { | ||
| for(var key in defs) { | ||
| if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) { | ||
| Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] }); | ||
| } | ||
| } | ||
| }; | ||
| define(getters, "get"); | ||
| define(values, "value"); | ||
| }; | ||
@@ -38,3 +41,2 @@ })(); | ||
| })(); | ||
| /************************************************************************/ | ||
| var __webpack_exports__ = {}; | ||
@@ -46,4 +48,4 @@ // ESM COMPAT FLAG | ||
| __webpack_require__.d(__webpack_exports__, { | ||
| getBuildName: () => (/* binding */ getBuildName), | ||
| getBuildVersion: () => (/* binding */ getBuildVersion), | ||
| getBuildName: () => (/* binding */ getBuildName), | ||
| parseOptions: () => (/* binding */ parseOptions) | ||
@@ -105,3 +107,3 @@ }); | ||
| const pkg = new external_PKGJsonManager_js_namespaceObject.PKGJsonManager().readPKGJson(root); | ||
| if ((pkg === null || pkg === void 0 ? void 0 : pkg['version']) && typeof pkg['version'] === 'string') { | ||
| if (pkg?.['version'] && typeof pkg['version'] === 'string') { | ||
| return pkg['version']; | ||
@@ -118,7 +120,7 @@ } | ||
| exports.parseOptions = __webpack_exports__.parseOptions; | ||
| for(var __webpack_i__ in __webpack_exports__) { | ||
| if(["getBuildName","getBuildVersion","parseOptions"].indexOf(__webpack_i__) === -1) { | ||
| exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; | ||
| for(var __rspack_i in __webpack_exports__) { | ||
| if(["getBuildName","getBuildVersion","parseOptions"].indexOf(__rspack_i) === -1) { | ||
| exports[__rspack_i] = __webpack_exports__[__rspack_i]; | ||
| } | ||
| } | ||
| Object.defineProperty(exports, '__esModule', { value: true }); |
+1
-4
| import { PKGJsonManager } from "./PKGJsonManager.mjs"; | ||
| import { LOCAL_BUILD_VERSION } from "./constant.mjs"; | ||
| ;// CONCATENATED MODULE: external "./PKGJsonManager.mjs" | ||
| ;// CONCATENATED MODULE: external "./constant.mjs" | ||
| ;// CONCATENATED MODULE: ./src/utils.ts | ||
@@ -57,3 +54,3 @@ | ||
| const pkg = new PKGJsonManager().readPKGJson(root); | ||
| if ((pkg === null || pkg === void 0 ? void 0 : pkg['version']) && typeof pkg['version'] === 'string') { | ||
| if (pkg?.['version'] && typeof pkg['version'] === 'string') { | ||
| return pkg['version']; | ||
@@ -60,0 +57,0 @@ } |
+3
-3
| { | ||
| "name": "@module-federation/managers", | ||
| "version": "2.6.0", | ||
| "version": "2.7.0", | ||
| "license": "MIT", | ||
@@ -28,4 +28,4 @@ "description": "Provide managers for helping handle mf data .", | ||
| "dependencies": { | ||
| "find-pkg": "2.0.0", | ||
| "@module-federation/sdk": "2.6.0" | ||
| "empathic": "2.0.0", | ||
| "@module-federation/sdk": "2.7.0" | ||
| }, | ||
@@ -32,0 +32,0 @@ "devDependencies": { |
70969
-4.21%1617
-0.74%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated