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

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024-present zhanghang(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.

View File

@@ -0,0 +1,29 @@
//#region \0rolldown/runtime.js
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
key = keys[i];
if (!__hasOwnProp.call(to, key) && key !== except) {
__defProp(to, key, {
get: ((k) => from[k]).bind(null, key),
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
}
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
value: mod,
enumerable: true
}) : target, mod));
//#endregion
exports.__toESM = __toESM;

View File

@@ -0,0 +1,31 @@
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
let _module_federation_runtime_tools_runtime_core = require("@module-federation/runtime-tools/runtime-core");
_module_federation_runtime_tools_runtime_core = require_runtime.__toESM(_module_federation_runtime_tools_runtime_core);
//#region src/index.ts
function injectExternalRuntimeCorePlugin() {
return {
name: "inject-external-runtime-core-plugin",
version: "2.5.0",
beforeInit(args) {
const globalRef = _module_federation_runtime_tools_runtime_core.Global;
if (!globalRef || typeof globalRef !== "object") return args;
const name = args.options.name;
const version = "2.5.0";
if (globalRef._FEDERATION_RUNTIME_CORE && globalRef._FEDERATION_RUNTIME_CORE_FROM && (globalRef._FEDERATION_RUNTIME_CORE_FROM.name !== name || globalRef._FEDERATION_RUNTIME_CORE_FROM.version !== version)) {
console.warn(`Detect multiple module federation runtime! Injected runtime from ${globalRef._FEDERATION_RUNTIME_CORE_FROM.name}@${globalRef._FEDERATION_RUNTIME_CORE_FROM.version} and current is ${name}@${version}, pleasure ensure there is only one consumer to provider runtime!`);
return args;
}
globalRef._FEDERATION_RUNTIME_CORE = _module_federation_runtime_tools_runtime_core;
globalRef._FEDERATION_RUNTIME_CORE_FROM = {
version,
name
};
return args;
}
};
}
//#endregion
module.exports = injectExternalRuntimeCorePlugin;
//# sourceMappingURL=index.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.cjs","names":["runtimeCore"],"sources":["../src/index.ts"],"sourcesContent":["import * as runtimeCore from '@module-federation/runtime-tools/runtime-core';\n\nimport type { ModuleFederationRuntimePlugin } from '@module-federation/runtime-tools/runtime-core';\ndeclare global {\n var __VERSION__: string;\n var _FEDERATION_RUNTIME_CORE: typeof runtimeCore;\n var _FEDERATION_RUNTIME_CORE_FROM: {\n version: string;\n name: string;\n };\n}\n\nfunction injectExternalRuntimeCorePlugin(): ModuleFederationRuntimePlugin {\n return {\n name: 'inject-external-runtime-core-plugin',\n version: __VERSION__,\n beforeInit(args) {\n const globalRef = (\n runtimeCore as typeof runtimeCore & {\n Global?: typeof runtimeCore.Global;\n }\n ).Global;\n if (!globalRef || typeof globalRef !== 'object') {\n return args;\n }\n const name = args.options.name;\n const version = __VERSION__;\n if (\n globalRef._FEDERATION_RUNTIME_CORE &&\n globalRef._FEDERATION_RUNTIME_CORE_FROM &&\n (globalRef._FEDERATION_RUNTIME_CORE_FROM.name !== name ||\n globalRef._FEDERATION_RUNTIME_CORE_FROM.version !== version)\n ) {\n console.warn(\n `Detect multiple module federation runtime! Injected runtime from ${globalRef._FEDERATION_RUNTIME_CORE_FROM.name}@${globalRef._FEDERATION_RUNTIME_CORE_FROM.version} and current is ${name}@${version}, pleasure ensure there is only one consumer to provider runtime!`,\n );\n return args;\n }\n globalRef._FEDERATION_RUNTIME_CORE = runtimeCore;\n globalRef._FEDERATION_RUNTIME_CORE_FROM = {\n version,\n name,\n };\n return args;\n },\n };\n}\n\nexport default injectExternalRuntimeCorePlugin;\n"],"mappings":";;;;;AAYA,SAAS,kCAAiE;AACxE,QAAO;EACL,MAAM;EACN;EACA,WAAW,MAAM;GACf,MAAM,YACJA,8CAGA;AACF,OAAI,CAAC,aAAa,OAAO,cAAc,SACrC,QAAO;GAET,MAAM,OAAO,KAAK,QAAQ;GAC1B,MAAM;AACN,OACE,UAAU,4BACV,UAAU,kCACT,UAAU,8BAA8B,SAAS,QAChD,UAAU,8BAA8B,YAAY,UACtD;AACA,YAAQ,KACN,oEAAoE,UAAU,8BAA8B,KAAK,GAAG,UAAU,8BAA8B,QAAQ,kBAAkB,KAAK,GAAG,QAAQ,mEACvM;AACD,WAAO;;AAET,aAAU,2BAA2BA;AACrC,aAAU,gCAAgC;IACxC;IACA;IACD;AACD,UAAO;;EAEV"}

View File

@@ -0,0 +1,16 @@
import * as runtimeCore from "@module-federation/runtime-tools/runtime-core";
import { ModuleFederationRuntimePlugin } from "@module-federation/runtime-tools/runtime-core";
//#region src/index.d.ts
declare global {
var __VERSION__: string;
var _FEDERATION_RUNTIME_CORE: typeof runtimeCore;
var _FEDERATION_RUNTIME_CORE_FROM: {
version: string;
name: string;
};
}
declare function injectExternalRuntimeCorePlugin(): ModuleFederationRuntimePlugin;
//#endregion
export { injectExternalRuntimeCorePlugin as default };
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,29 @@
import * as runtimeCore from "@module-federation/runtime-tools/runtime-core";
//#region src/index.ts
function injectExternalRuntimeCorePlugin() {
return {
name: "inject-external-runtime-core-plugin",
version: "2.5.0",
beforeInit(args) {
const globalRef = runtimeCore.Global;
if (!globalRef || typeof globalRef !== "object") return args;
const name = args.options.name;
const version = "2.5.0";
if (globalRef._FEDERATION_RUNTIME_CORE && globalRef._FEDERATION_RUNTIME_CORE_FROM && (globalRef._FEDERATION_RUNTIME_CORE_FROM.name !== name || globalRef._FEDERATION_RUNTIME_CORE_FROM.version !== version)) {
console.warn(`Detect multiple module federation runtime! Injected runtime from ${globalRef._FEDERATION_RUNTIME_CORE_FROM.name}@${globalRef._FEDERATION_RUNTIME_CORE_FROM.version} and current is ${name}@${version}, pleasure ensure there is only one consumer to provider runtime!`);
return args;
}
globalRef._FEDERATION_RUNTIME_CORE = runtimeCore;
globalRef._FEDERATION_RUNTIME_CORE_FROM = {
version,
name
};
return args;
}
};
}
//#endregion
export { injectExternalRuntimeCorePlugin as default };
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import * as runtimeCore from '@module-federation/runtime-tools/runtime-core';\n\nimport type { ModuleFederationRuntimePlugin } from '@module-federation/runtime-tools/runtime-core';\ndeclare global {\n var __VERSION__: string;\n var _FEDERATION_RUNTIME_CORE: typeof runtimeCore;\n var _FEDERATION_RUNTIME_CORE_FROM: {\n version: string;\n name: string;\n };\n}\n\nfunction injectExternalRuntimeCorePlugin(): ModuleFederationRuntimePlugin {\n return {\n name: 'inject-external-runtime-core-plugin',\n version: __VERSION__,\n beforeInit(args) {\n const globalRef = (\n runtimeCore as typeof runtimeCore & {\n Global?: typeof runtimeCore.Global;\n }\n ).Global;\n if (!globalRef || typeof globalRef !== 'object') {\n return args;\n }\n const name = args.options.name;\n const version = __VERSION__;\n if (\n globalRef._FEDERATION_RUNTIME_CORE &&\n globalRef._FEDERATION_RUNTIME_CORE_FROM &&\n (globalRef._FEDERATION_RUNTIME_CORE_FROM.name !== name ||\n globalRef._FEDERATION_RUNTIME_CORE_FROM.version !== version)\n ) {\n console.warn(\n `Detect multiple module federation runtime! Injected runtime from ${globalRef._FEDERATION_RUNTIME_CORE_FROM.name}@${globalRef._FEDERATION_RUNTIME_CORE_FROM.version} and current is ${name}@${version}, pleasure ensure there is only one consumer to provider runtime!`,\n );\n return args;\n }\n globalRef._FEDERATION_RUNTIME_CORE = runtimeCore;\n globalRef._FEDERATION_RUNTIME_CORE_FROM = {\n version,\n name,\n };\n return args;\n },\n };\n}\n\nexport default injectExternalRuntimeCorePlugin;\n"],"mappings":";;;AAYA,SAAS,kCAAiE;AACxE,QAAO;EACL,MAAM;EACN;EACA,WAAW,MAAM;GACf,MAAM,YACJ,YAGA;AACF,OAAI,CAAC,aAAa,OAAO,cAAc,SACrC,QAAO;GAET,MAAM,OAAO,KAAK,QAAQ;GAC1B,MAAM;AACN,OACE,UAAU,4BACV,UAAU,kCACT,UAAU,8BAA8B,SAAS,QAChD,UAAU,8BAA8B,YAAY,UACtD;AACA,YAAQ,KACN,oEAAoE,UAAU,8BAA8B,KAAK,GAAG,UAAU,8BAA8B,QAAQ,kBAAkB,KAAK,GAAG,QAAQ,mEACvM;AACD,WAAO;;AAET,aAAU,2BAA2B;AACrC,aAAU,gCAAgC;IACxC;IACA;IACD;AACD,UAAO;;EAEV"}