Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

21
node_modules/@module-federation/cli/dist/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025-present hanric(2heal1)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

2
node_modules/@module-federation/cli/dist/cli.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { CliOptions } from './types';
export declare function runCli(options: CliOptions): void;

123
node_modules/@module-federation/cli/dist/cli.js generated vendored Normal file
View File

@@ -0,0 +1,123 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// webpack/runtime/compat_get_default_export
(() => {
// getDefaultExport function for compatibility with non-ESM modules
__webpack_require__.n = (module) => {
var getter = module && module.__esModule ?
() => (module['default']) :
() => (module);
__webpack_require__.d(getter, { a: getter });
return getter;
};
})();
// 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/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
runCli: () => (/* binding */ runCli)
});
;// CONCATENATED MODULE: external "commander"
const external_commander_namespaceObject = require("commander");
;// CONCATENATED MODULE: external "./utils/apply-common-options.js"
const apply_common_options_js_namespaceObject = require("./utils/apply-common-options.js");
;// CONCATENATED MODULE: external "./commands/dts.js"
const dts_js_namespaceObject = require("./commands/dts.js");
;// CONCATENATED MODULE: external "./utils/prepare.js"
const prepare_js_namespaceObject = require("./utils/prepare.js");
;// CONCATENATED MODULE: external "./utils/logger.js"
const logger_js_namespaceObject = require("./utils/logger.js");
var logger_js_default = /*#__PURE__*/__webpack_require__.n(logger_js_namespaceObject);
;// CONCATENATED MODULE: external "./utils/readConfig.js"
const readConfig_js_namespaceObject = require("./utils/readConfig.js");
;// CONCATENATED MODULE: ./src/cli.ts
function cli(cliOptions) {
const { name, version, applyCommands } = cliOptions;
external_commander_namespaceObject.program.name(name).usage('<command> [options]').version(version);
const dtsCommand = external_commander_namespaceObject.program.command('dts');
dtsCommand.option('--root <root>', 'specify the project root directory').option('--output <output>', 'specify the generated dts output directory').option('--fetch <boolean>', 'fetch types from remote, default is true', (value)=>value === 'true', true).option('--generate <boolean>', 'generate types, default is true', (value)=>value === 'true', true);
(0,apply_common_options_js_namespaceObject.applyCommonOptions)(dtsCommand);
dtsCommand.description('generate or fetch the mf types').action(async (options)=>{
try {
await (0,dts_js_namespaceObject.dts)(options, cliOptions);
} catch (err) {
console.error(err);
process.exit(1);
}
});
if (typeof applyCommands === 'function') {
applyCommands(external_commander_namespaceObject.program, apply_common_options_js_namespaceObject.applyCommonOptions);
}
external_commander_namespaceObject.program.parse();
}
function runCli(options) {
const normalizedOptions = {
loggerPrefix: logger_js_namespaceObject.PREFIX,
welcomeMsg: `${`Module Federation v${"2.5.0"}`}\n`,
name: 'mf',
readConfig: readConfig_js_namespaceObject.readConfig,
version: "2.5.0",
applyCommands: ()=>{},
...options
};
logger_js_default().setPrefix(normalizedOptions.loggerPrefix);
(0,prepare_js_namespaceObject.prepareCli)(normalizedOptions);
try {
cli(normalizedOptions);
} catch (err) {
console.error(err);
}
}
exports.runCli = __webpack_exports__.runCli;
for(var __webpack_i__ in __webpack_exports__) {
if(["runCli"].indexOf(__webpack_i__) === -1) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
}
Object.defineProperty(exports, '__esModule', { value: true });

View File

@@ -0,0 +1,2 @@
import type { CliOptions, DtsOptions } from '../types';
export declare function dts(options: DtsOptions, { readConfig }: Required<CliOptions>): Promise<void>;

View File

@@ -0,0 +1,130 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// webpack/runtime/compat_get_default_export
(() => {
// getDefaultExport function for compatibility with non-ESM modules
__webpack_require__.n = (module) => {
var getter = module && module.__esModule ?
() => (module['default']) :
() => (module);
__webpack_require__.d(getter, { a: getter });
return getter;
};
})();
// 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/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
dts: () => (/* binding */ dts)
});
;// CONCATENATED MODULE: external "@module-federation/dts-plugin"
const dts_plugin_namespaceObject = require("@module-federation/dts-plugin");
;// CONCATENATED MODULE: external "../utils/logger.js"
const logger_js_namespaceObject = require("../utils/logger.js");
var logger_js_default = /*#__PURE__*/__webpack_require__.n(logger_js_namespaceObject);
;// CONCATENATED MODULE: ./src/commands/dts.ts
async function dts(options, { readConfig }) {
const { fetch = true, generate = true, root = process.cwd(), output, config } = options;
const mfConfig = await readConfig(config);
if (!(0,dts_plugin_namespaceObject.isTSProject)(mfConfig.dts, root)) {
logger_js_default().error('dts is only supported for TypeScript projects');
return;
}
const normalizedDtsOptions = (0,dts_plugin_namespaceObject.normalizeDtsOptions)(mfConfig, root, {
defaultGenerateOptions: {
generateAPITypes: true,
compileInChildProcess: false,
abortOnError: true,
extractThirdParty: false,
extractRemoteTypes: false
},
defaultConsumeOptions: {
abortOnError: true,
consumeAPITypes: true
}
});
if (!normalizedDtsOptions) {
logger_js_default().error('dts is not enabled in module-federation.config.ts');
return;
}
if (fetch) {
const dtsManagerOptions = (0,dts_plugin_namespaceObject.normalizeConsumeTypesOptions)({
context: root,
dtsOptions: normalizedDtsOptions,
pluginOptions: mfConfig
});
if (!dtsManagerOptions) {
logger_js_default().warn('dts.consumeTypes is not enabled in module-federation.config.ts, skip fetching remote types');
} else {
logger_js_default().debug('start fetching remote types...');
await (0,dts_plugin_namespaceObject.consumeTypesAPI)(dtsManagerOptions);
logger_js_default().debug('fetch remote types success!');
}
}
if (generate) {
const dtsManagerOptions = (0,dts_plugin_namespaceObject.normalizeGenerateTypesOptions)({
context: root,
outputDir: output,
dtsOptions: normalizedDtsOptions,
pluginOptions: mfConfig
});
if (!dtsManagerOptions) {
logger_js_default().warn('dts.generateTypes is not enabled in module-federation.config.ts, skip generating types');
return;
}
logger_js_default().debug('start generating types...');
await (0,dts_plugin_namespaceObject.generateTypesAPI)({
dtsManagerOptions
});
logger_js_default().debug('generate types success!');
}
}
exports.dts = __webpack_exports__.dts;
for(var __webpack_i__ in __webpack_exports__) {
if(["dts"].indexOf(__webpack_i__) === -1) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
}
Object.defineProperty(exports, '__esModule', { value: true });

1
node_modules/@module-federation/cli/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { runCli } from './cli';

58
node_modules/@module-federation/cli/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// 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/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
runCli: () => (/* reexport */ external_cli_js_namespaceObject.runCli)
});
;// CONCATENATED MODULE: external "./cli.js"
const external_cli_js_namespaceObject = require("./cli.js");
;// CONCATENATED MODULE: ./src/index.ts
exports.runCli = __webpack_exports__.runCli;
for(var __webpack_i__ in __webpack_exports__) {
if(["runCli"].indexOf(__webpack_i__) === -1) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
}
Object.defineProperty(exports, '__esModule', { value: true });

20
node_modules/@module-federation/cli/dist/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import type { Command } from 'commander';
import type { moduleFederationPlugin } from '@module-federation/sdk';
export type CommonOptions = {
config?: string;
mode?: string;
};
export type DtsOptions = {
fetch?: boolean;
generate?: boolean;
root?: string;
output?: string;
} & CommonOptions;
export type CliOptions = {
welcomeMsg?: string;
loggerPrefix?: string;
name?: string;
version?: string;
readConfig?: (userConfigPath?: string) => Promise<moduleFederationPlugin.ModuleFederationPluginOptions>;
applyCommands?: (command: Command, applyCommonOptions: (command: Command) => void) => void;
};

31
node_modules/@module-federation/cli/dist/types.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
for(var __webpack_i__ in __webpack_exports__) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
Object.defineProperty(exports, '__esModule', { value: true });

View File

@@ -0,0 +1,2 @@
import type { Command } from 'commander';
export declare const applyCommonOptions: (command: Command) => void;

View File

@@ -0,0 +1,68 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// 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/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
applyCommonOptions: () => (applyCommonOptions)
});
const applyCommonOptions = (command)=>{
command.option('-c --config <config>', 'specify the configuration file, can be a relative or absolute path');
command.option('-m --mode <mode>', 'Specify the runtime environment. You can choose "dev" or "prod". The default value is "dev". After setting, the process.env.NODE_ENV environment variable will be automatically injected with "development" or "production" according to the value.', (value)=>{
const validChoices = {
dev: 'development',
prod: 'production'
};
if (!Object.keys(validChoices).includes(value)) {
throw new Error(`Invalid mode: ${value}. Valid choices are: ${Object.keys(validChoices).join(', ')}`);
}
const targetEnv = validChoices[value];
if (process.env.NODE_ENV !== targetEnv) {
console.log(`process.env.NODE_ENV is set to ${targetEnv}`);
}
process.env.NODE_ENV = targetEnv;
return value;
}, 'dev');
};
exports.applyCommonOptions = __webpack_exports__.applyCommonOptions;
for(var __webpack_i__ in __webpack_exports__) {
if(["applyCommonOptions"].indexOf(__webpack_i__) === -1) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
}
Object.defineProperty(exports, '__esModule', { value: true });

View File

@@ -0,0 +1,4 @@
import { type Logger } from '@module-federation/sdk';
export declare const PREFIX = "[ Module Federation CLI ]";
declare const logger: Logger;
export default logger;

View File

@@ -0,0 +1,69 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// 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/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
PREFIX: () => (/* binding */ PREFIX),
"default": () => (/* binding */ utils_logger)
});
;// CONCATENATED MODULE: external "node:util"
const external_node_util_namespaceObject = require("node:util");
;// CONCATENATED MODULE: external "@module-federation/sdk"
const sdk_namespaceObject = require("@module-federation/sdk");
;// CONCATENATED MODULE: ./src/utils/logger.ts
const PREFIX = '[ Module Federation CLI ]';
const logger = (0,sdk_namespaceObject.createLogger)((0,external_node_util_namespaceObject.styleText)([
'bold',
'cyan'
], PREFIX));
/* ESM default export */ const utils_logger = (logger);
exports.PREFIX = __webpack_exports__.PREFIX;
exports["default"] = __webpack_exports__["default"];
for(var __webpack_i__ in __webpack_exports__) {
if(["PREFIX","default"].indexOf(__webpack_i__) === -1) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
}
Object.defineProperty(exports, '__esModule', { value: true });

View File

@@ -0,0 +1,2 @@
import type { CliOptions } from '../types';
export declare function prepareCli({ welcomeMsg }: Required<CliOptions>): void;

View File

@@ -0,0 +1,83 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// webpack/runtime/compat_get_default_export
(() => {
// getDefaultExport function for compatibility with non-ESM modules
__webpack_require__.n = (module) => {
var getter = module && module.__esModule ?
() => (module['default']) :
() => (module);
__webpack_require__.d(getter, { a: getter });
return getter;
};
})();
// 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/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
prepareCli: () => (/* binding */ prepareCli)
});
;// CONCATENATED MODULE: external "./logger.js"
const external_logger_js_namespaceObject = require("./logger.js");
var external_logger_js_default = /*#__PURE__*/__webpack_require__.n(external_logger_js_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/prepare.ts
function prepareCli({ welcomeMsg }) {
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = 'development';
}
// Print a blank line to keep the greet log nice.
// Some package managers automatically output a blank line, some do not.
const { npm_execpath } = process.env;
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) {
console.log();
}
external_logger_js_default().info(welcomeMsg);
}
exports.prepareCli = __webpack_exports__.prepareCli;
for(var __webpack_i__ in __webpack_exports__) {
if(["prepareCli"].indexOf(__webpack_i__) === -1) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
}
Object.defineProperty(exports, '__esModule', { value: true });

View File

@@ -0,0 +1,3 @@
import type { moduleFederationPlugin } from '@module-federation/sdk';
export declare const getConfigPath: (userConfigPath?: string) => string;
export declare function readConfig(userConfigPath?: string): Promise<moduleFederationPlugin.ModuleFederationPluginOptions>;

View File

@@ -0,0 +1,91 @@
"use strict";
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
return typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href;
})();
;
// The require scope
var __webpack_require__ = {};
/************************************************************************/
// webpack/runtime/compat_get_default_export
(() => {
// getDefaultExport function for compatibility with non-ESM modules
__webpack_require__.n = (module) => {
var getter = module && module.__esModule ?
() => (module['default']) :
() => (module);
__webpack_require__.d(getter, { a: getter });
return getter;
};
})();
// 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/runtime/has_own_property
(() => {
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
})();
// webpack/runtime/make_namespace_object
(() => {
// define __esModule on exports
__webpack_require__.r = (exports) => {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
getConfigPath: () => (/* binding */ getConfigPath),
readConfig: () => (/* binding */ readConfig)
});
;// CONCATENATED MODULE: external "path"
const external_path_namespaceObject = require("path");
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject);
;// CONCATENATED MODULE: external "jiti"
const external_jiti_namespaceObject = require("jiti");
;// CONCATENATED MODULE: ./src/utils/readConfig.ts
const DEFAULT_CONFIG_PATH = 'module-federation.config.ts';
const getConfigPath = (userConfigPath)=>{
const defaultPath = external_path_default().resolve(process.cwd(), DEFAULT_CONFIG_PATH);
const filepath = userConfigPath ?? defaultPath;
return external_path_default().isAbsolute(filepath) ? filepath : external_path_default().resolve(process.cwd(), filepath);
};
async function readConfig(userConfigPath) {
const configPath = getConfigPath(userConfigPath);
const jit = (0,external_jiti_namespaceObject.createJiti)(__filename, {
interopDefault: true
});
const configModule = await jit(configPath);
const resolvedConfig = configModule && typeof configModule === 'object' && 'default' in configModule ? configModule.default : configModule;
return resolvedConfig;
}
exports.getConfigPath = __webpack_exports__.getConfigPath;
exports.readConfig = __webpack_exports__.readConfig;
for(var __webpack_i__ in __webpack_exports__) {
if(["getConfigPath","readConfig"].indexOf(__webpack_i__) === -1) {
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
}
}
Object.defineProperty(exports, '__esModule', { value: true });