🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@module-federation/error-codes

Package Overview
Dependencies
Maintainers
4
Versions
620
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/error-codes - npm Package Compare versions

Comparing version
2.1.0
to
2.2.0
+29
dist/_virtual/_rolldown/runtime.cjs
//#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;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_getShortErrorMsg = require('./getShortErrorMsg.cjs');
//#region src/browser.ts
function logAndReport(code, descMap, args, logger, originalErrorMsg, context) {
return logger(require_getShortErrorMsg.getShortErrorMsg(code, descMap, args, originalErrorMsg));
}
//#endregion
exports.logAndReport = logAndReport;
//# sourceMappingURL=browser.cjs.map
{"version":3,"file":"browser.cjs","names":["getShortErrorMsg"],"sources":["../src/browser.ts"],"sourcesContent":["import { getShortErrorMsg } from './getShortErrorMsg';\nimport type { MFContext } from './MFContext';\n\nexport function logAndReport<T extends (msg: string) => unknown>(\n code: string,\n descMap: Record<string, string>,\n args: Record<string, unknown>,\n logger: T,\n originalErrorMsg?: string,\n context?: Partial<MFContext>,\n): ReturnType<T> {\n const msg = getShortErrorMsg(code, descMap, args, originalErrorMsg);\n return logger(msg) as ReturnType<T>;\n}\n"],"mappings":";;;;AAGA,SAAgB,aACd,MACA,SACA,MACA,QACA,kBACA,SACe;AAEf,QAAO,OADKA,0CAAiB,MAAM,SAAS,MAAM,iBAAiB,CACjD"}
import { MFContext } from "./MFContext.mjs";
//#region src/browser.d.ts
declare function logAndReport<T extends (msg: string) => unknown>(code: string, descMap: Record<string, string>, args: Record<string, unknown>, logger: T, originalErrorMsg?: string, context?: Partial<MFContext>): ReturnType<T>;
//#endregion
export { logAndReport };
//# sourceMappingURL=browser.d.mts.map
import { MFContext } from "./MFContext.js";
//#region src/browser.d.ts
declare function logAndReport<T extends (msg: string) => unknown>(code: string, descMap: Record<string, string>, args: Record<string, unknown>, logger: T, originalErrorMsg?: string, context?: Partial<MFContext>): ReturnType<T>;
//#endregion
export { logAndReport };
//# sourceMappingURL=browser.d.ts.map
import { getShortErrorMsg } from "./getShortErrorMsg.mjs";
//#region src/browser.ts
function logAndReport(code, descMap, args, logger, originalErrorMsg, context) {
return logger(getShortErrorMsg(code, descMap, args, originalErrorMsg));
}
//#endregion
export { logAndReport };
//# sourceMappingURL=browser.mjs.map
{"version":3,"file":"browser.mjs","names":[],"sources":["../src/browser.ts"],"sourcesContent":["import { getShortErrorMsg } from './getShortErrorMsg';\nimport type { MFContext } from './MFContext';\n\nexport function logAndReport<T extends (msg: string) => unknown>(\n code: string,\n descMap: Record<string, string>,\n args: Record<string, unknown>,\n logger: T,\n originalErrorMsg?: string,\n context?: Partial<MFContext>,\n): ReturnType<T> {\n const msg = getShortErrorMsg(code, descMap, args, originalErrorMsg);\n return logger(msg) as ReturnType<T>;\n}\n"],"mappings":";;;AAGA,SAAgB,aACd,MACA,SACA,MACA,QACA,kBACA,SACe;AAEf,QAAO,OADK,iBAAiB,MAAM,SAAS,MAAM,iBAAiB,CACjD"}
//#region src/MFContext.d.ts
type PackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun';
type MFRole = 'host' | 'remote' | 'host+remote' | 'unknown';
type BundlerName = 'webpack' | 'rspack' | 'rsbuild' | 'vite' | 'unknown';
/** A single remote entry, mirrors runtime-core's Remote type (simplified for diagnostics) */
interface MFRemoteEntry {
name: string;
alias?: string;
/** URL or version string */
entry?: string;
version?: string;
type?: string;
entryGlobalName?: string;
shareScope?: string | string[];
}
/** Shared package entry, mirrors runtime-core's SharedConfig (simplified) */
interface MFSharedEntry {
version?: string;
singleton?: boolean;
requiredVersion?: string | false;
eager?: boolean;
strictVersion?: boolean;
}
/** Module Federation plugin configuration, extracted from bundler config file */
interface MFConfigInfo {
name?: string;
filename?: string;
remotes?: MFRemoteEntry[];
exposes?: Record<string, string>;
shared?: Record<string, MFSharedEntry>;
}
/** Basic project metadata */
interface MFProjectInfo {
name?: string;
root?: string;
packageManager?: PackageManager;
mfRole?: MFRole;
}
/** Bundler in use */
interface MFBundlerInfo {
name?: BundlerName;
configFile?: string;
version?: string;
}
/** Runtime environment snapshot */
interface MFEnvironmentInfo {
nodeVersion?: string;
os?: string;
isCI?: boolean;
}
/** Most recent diagnostic event (from .mf/diagnostics/latest.json) */
interface MFLatestErrorEvent {
code: string;
message: string;
args?: Record<string, unknown>;
timestamp: number;
}
/** Build artifacts from dist/ */
interface MFBuildArtifacts {
manifest?: Record<string, unknown>;
stats?: Record<string, unknown>;
}
/**
* Module Federation context.
*
* Produced by the `mf-context` Claude skill for full project analysis,
* or contributed partially by the runtime when an error occurs (only fields
* known at the time of the error are set).
*
* All fields are optional so both full and partial contexts are valid.
*/
interface MFContext {
project?: MFProjectInfo;
bundler?: MFBundlerInfo;
mfConfig?: MFConfigInfo;
/** Installed dependency versions: packageName → version */
dependencies?: Record<string, string>;
environment?: MFEnvironmentInfo;
latestErrorEvent?: MFLatestErrorEvent;
buildArtifacts?: MFBuildArtifacts;
}
//#endregion
export { BundlerName, MFBuildArtifacts, MFBundlerInfo, MFConfigInfo, MFContext, MFEnvironmentInfo, MFLatestErrorEvent, MFProjectInfo, MFRemoteEntry, MFRole, MFSharedEntry, PackageManager };
//# sourceMappingURL=MFContext.d.mts.map
//#region src/MFContext.d.ts
type PackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun';
type MFRole = 'host' | 'remote' | 'host+remote' | 'unknown';
type BundlerName = 'webpack' | 'rspack' | 'rsbuild' | 'vite' | 'unknown';
/** A single remote entry, mirrors runtime-core's Remote type (simplified for diagnostics) */
interface MFRemoteEntry {
name: string;
alias?: string;
/** URL or version string */
entry?: string;
version?: string;
type?: string;
entryGlobalName?: string;
shareScope?: string | string[];
}
/** Shared package entry, mirrors runtime-core's SharedConfig (simplified) */
interface MFSharedEntry {
version?: string;
singleton?: boolean;
requiredVersion?: string | false;
eager?: boolean;
strictVersion?: boolean;
}
/** Module Federation plugin configuration, extracted from bundler config file */
interface MFConfigInfo {
name?: string;
filename?: string;
remotes?: MFRemoteEntry[];
exposes?: Record<string, string>;
shared?: Record<string, MFSharedEntry>;
}
/** Basic project metadata */
interface MFProjectInfo {
name?: string;
root?: string;
packageManager?: PackageManager;
mfRole?: MFRole;
}
/** Bundler in use */
interface MFBundlerInfo {
name?: BundlerName;
configFile?: string;
version?: string;
}
/** Runtime environment snapshot */
interface MFEnvironmentInfo {
nodeVersion?: string;
os?: string;
isCI?: boolean;
}
/** Most recent diagnostic event (from .mf/diagnostics/latest.json) */
interface MFLatestErrorEvent {
code: string;
message: string;
args?: Record<string, unknown>;
timestamp: number;
}
/** Build artifacts from dist/ */
interface MFBuildArtifacts {
manifest?: Record<string, unknown>;
stats?: Record<string, unknown>;
}
/**
* Module Federation context.
*
* Produced by the `mf-context` Claude skill for full project analysis,
* or contributed partially by the runtime when an error occurs (only fields
* known at the time of the error are set).
*
* All fields are optional so both full and partial contexts are valid.
*/
interface MFContext {
project?: MFProjectInfo;
bundler?: MFBundlerInfo;
mfConfig?: MFConfigInfo;
/** Installed dependency versions: packageName → version */
dependencies?: Record<string, string>;
environment?: MFEnvironmentInfo;
latestErrorEvent?: MFLatestErrorEvent;
buildArtifacts?: MFBuildArtifacts;
}
//#endregion
export { BundlerName, MFBuildArtifacts, MFBundlerInfo, MFConfigInfo, MFContext, MFEnvironmentInfo, MFLatestErrorEvent, MFProjectInfo, MFRemoteEntry, MFRole, MFSharedEntry, PackageManager };
//# sourceMappingURL=MFContext.d.ts.map
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
const require_getShortErrorMsg = require('./getShortErrorMsg.cjs');
let fs = require("fs");
fs = require_runtime.__toESM(fs);
let path = require("path");
path = require_runtime.__toESM(path);
//#region src/node.ts
function reportDiagnostic(code, message, args, context) {
try {
const dir = path.default.resolve(process.cwd(), ".mf", "diagnostics");
fs.default.mkdirSync(dir, { recursive: true });
const output = {
...context,
latestErrorEvent: {
code,
message,
args,
timestamp: Date.now()
}
};
fs.default.writeFileSync(path.default.join(dir, "latest.json"), JSON.stringify(output, null, 2));
} catch {}
}
function logAndReport(code, descMap, args, logger, originalErrorMsg, context) {
const msg = require_getShortErrorMsg.getShortErrorMsg(code, descMap, args, originalErrorMsg);
reportDiagnostic(code, msg, args, context);
return logger(msg);
}
//#endregion
exports.logAndReport = logAndReport;
//# sourceMappingURL=node.cjs.map
{"version":3,"file":"node.cjs","names":["getShortErrorMsg"],"sources":["../src/node.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport { getShortErrorMsg } from './getShortErrorMsg';\nimport type { MFContext } from './MFContext';\n\nfunction reportDiagnostic(\n code: string,\n message: string,\n args: Record<string, unknown>,\n context?: Partial<MFContext>,\n): void {\n try {\n const dir = path.resolve(process.cwd(), '.mf', 'diagnostics');\n fs.mkdirSync(dir, { recursive: true });\n const output: MFContext = {\n ...context,\n latestErrorEvent: { code, message, args, timestamp: Date.now() },\n };\n fs.writeFileSync(\n path.join(dir, 'latest.json'),\n JSON.stringify(output, null, 2),\n );\n } catch {\n // noop - don't let diagnostic writing fail the build\n }\n}\n\nexport function logAndReport<T extends (msg: string) => unknown>(\n code: string,\n descMap: Record<string, string>,\n args: Record<string, unknown>,\n logger: T,\n originalErrorMsg?: string,\n context?: Partial<MFContext>,\n): ReturnType<T> {\n const msg = getShortErrorMsg(code, descMap, args, originalErrorMsg);\n reportDiagnostic(code, msg, args, context);\n return logger(msg) as ReturnType<T>;\n}\n"],"mappings":";;;;;;;;;AAKA,SAAS,iBACP,MACA,SACA,MACA,SACM;AACN,KAAI;EACF,MAAM,MAAM,aAAK,QAAQ,QAAQ,KAAK,EAAE,OAAO,cAAc;AAC7D,aAAG,UAAU,KAAK,EAAE,WAAW,MAAM,CAAC;EACtC,MAAM,SAAoB;GACxB,GAAG;GACH,kBAAkB;IAAE;IAAM;IAAS;IAAM,WAAW,KAAK,KAAK;IAAE;GACjE;AACD,aAAG,cACD,aAAK,KAAK,KAAK,cAAc,EAC7B,KAAK,UAAU,QAAQ,MAAM,EAAE,CAChC;SACK;;AAKV,SAAgB,aACd,MACA,SACA,MACA,QACA,kBACA,SACe;CACf,MAAM,MAAMA,0CAAiB,MAAM,SAAS,MAAM,iBAAiB;AACnE,kBAAiB,MAAM,KAAK,MAAM,QAAQ;AAC1C,QAAO,OAAO,IAAI"}
import { MFContext } from "./MFContext.mjs";
//#region src/node.d.ts
declare function logAndReport<T extends (msg: string) => unknown>(code: string, descMap: Record<string, string>, args: Record<string, unknown>, logger: T, originalErrorMsg?: string, context?: Partial<MFContext>): ReturnType<T>;
//#endregion
export { logAndReport };
//# sourceMappingURL=node.d.mts.map
import { MFContext } from "./MFContext.js";
//#region src/node.d.ts
declare function logAndReport<T extends (msg: string) => unknown>(code: string, descMap: Record<string, string>, args: Record<string, unknown>, logger: T, originalErrorMsg?: string, context?: Partial<MFContext>): ReturnType<T>;
//#endregion
export { logAndReport };
//# sourceMappingURL=node.d.ts.map
import { getShortErrorMsg } from "./getShortErrorMsg.mjs";
import fs from "fs";
import path from "path";
//#region src/node.ts
function reportDiagnostic(code, message, args, context) {
try {
const dir = path.resolve(process.cwd(), ".mf", "diagnostics");
fs.mkdirSync(dir, { recursive: true });
const output = {
...context,
latestErrorEvent: {
code,
message,
args,
timestamp: Date.now()
}
};
fs.writeFileSync(path.join(dir, "latest.json"), JSON.stringify(output, null, 2));
} catch {}
}
function logAndReport(code, descMap, args, logger, originalErrorMsg, context) {
const msg = getShortErrorMsg(code, descMap, args, originalErrorMsg);
reportDiagnostic(code, msg, args, context);
return logger(msg);
}
//#endregion
export { logAndReport };
//# sourceMappingURL=node.mjs.map
{"version":3,"file":"node.mjs","names":[],"sources":["../src/node.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport { getShortErrorMsg } from './getShortErrorMsg';\nimport type { MFContext } from './MFContext';\n\nfunction reportDiagnostic(\n code: string,\n message: string,\n args: Record<string, unknown>,\n context?: Partial<MFContext>,\n): void {\n try {\n const dir = path.resolve(process.cwd(), '.mf', 'diagnostics');\n fs.mkdirSync(dir, { recursive: true });\n const output: MFContext = {\n ...context,\n latestErrorEvent: { code, message, args, timestamp: Date.now() },\n };\n fs.writeFileSync(\n path.join(dir, 'latest.json'),\n JSON.stringify(output, null, 2),\n );\n } catch {\n // noop - don't let diagnostic writing fail the build\n }\n}\n\nexport function logAndReport<T extends (msg: string) => unknown>(\n code: string,\n descMap: Record<string, string>,\n args: Record<string, unknown>,\n logger: T,\n originalErrorMsg?: string,\n context?: Partial<MFContext>,\n): ReturnType<T> {\n const msg = getShortErrorMsg(code, descMap, args, originalErrorMsg);\n reportDiagnostic(code, msg, args, context);\n return logger(msg) as ReturnType<T>;\n}\n"],"mappings":";;;;;AAKA,SAAS,iBACP,MACA,SACA,MACA,SACM;AACN,KAAI;EACF,MAAM,MAAM,KAAK,QAAQ,QAAQ,KAAK,EAAE,OAAO,cAAc;AAC7D,KAAG,UAAU,KAAK,EAAE,WAAW,MAAM,CAAC;EACtC,MAAM,SAAoB;GACxB,GAAG;GACH,kBAAkB;IAAE;IAAM;IAAS;IAAM,WAAW,KAAK,KAAK;IAAE;GACjE;AACD,KAAG,cACD,KAAK,KAAK,KAAK,cAAc,EAC7B,KAAK,UAAU,QAAQ,MAAM,EAAE,CAChC;SACK;;AAKV,SAAgB,aACd,MACA,SACA,MACA,QACA,kBACA,SACe;CACf,MAAM,MAAM,iBAAiB,MAAM,SAAS,MAAM,iBAAiB;AACnE,kBAAiB,MAAM,KAAK,MAAM,QAAQ;AAC1C,QAAO,OAAO,IAAI"}
+2
-1

@@ -14,3 +14,4 @@ const require_error_codes = require('./error-codes.cjs');

[require_error_codes.RUNTIME_009]: "Please call createInstance first.",
[require_error_codes.RUNTIME_010]: "The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api."
[require_error_codes.RUNTIME_010]: "The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api.",
[require_error_codes.RUNTIME_011]: "The remoteEntry URL is missing from the remote snapshot."
};

@@ -17,0 +18,0 @@ const typeDescMap = { [require_error_codes.TYPE_001]: "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error." };

@@ -1,1 +0,1 @@

{"version":3,"file":"desc.cjs","names":["RUNTIME_001","RUNTIME_002","RUNTIME_003","RUNTIME_004","RUNTIME_005","RUNTIME_006","RUNTIME_007","RUNTIME_008","RUNTIME_009","RUNTIME_010","TYPE_001","BUILD_001","BUILD_002"],"sources":["../src/desc.ts"],"sourcesContent":["import {\n RUNTIME_001,\n RUNTIME_002,\n RUNTIME_003,\n RUNTIME_004,\n RUNTIME_005,\n RUNTIME_006,\n RUNTIME_007,\n RUNTIME_008,\n RUNTIME_009,\n RUNTIME_010,\n TYPE_001,\n BUILD_001,\n BUILD_002,\n} from './error-codes';\n\nexport const runtimeDescMap = {\n [RUNTIME_001]: 'Failed to get remoteEntry exports.',\n [RUNTIME_002]: 'The remote entry interface does not contain \"init\"',\n [RUNTIME_003]: 'Failed to get manifest.',\n [RUNTIME_004]: 'Failed to locate remote.',\n [RUNTIME_005]: 'Invalid loadShareSync function call from bundler runtime',\n [RUNTIME_006]: 'Invalid loadShareSync function call from runtime',\n [RUNTIME_007]: 'Failed to get remote snapshot.',\n [RUNTIME_008]: 'Failed to load script resources.',\n [RUNTIME_009]: 'Please call createInstance first.',\n [RUNTIME_010]:\n 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api.',\n};\n\nexport const typeDescMap = {\n [TYPE_001]:\n 'Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.',\n};\n\nexport const buildDescMap = {\n [BUILD_001]: 'Failed to find expose module.',\n [BUILD_002]: 'PublicPath is required in prod mode.',\n};\n\nexport const errorDescMap = {\n ...runtimeDescMap,\n ...typeDescMap,\n ...buildDescMap,\n};\n"],"mappings":";;;AAgBA,MAAa,iBAAiB;EAC3BA,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCACC;CACH;AAED,MAAa,cAAc,GACxBC,+BACC,8FACH;AAED,MAAa,eAAe;EACzBC,gCAAY;EACZC,gCAAY;CACd;AAED,MAAa,eAAe;CAC1B,GAAG;CACH,GAAG;CACH,GAAG;CACJ"}
{"version":3,"file":"desc.cjs","names":["RUNTIME_001","RUNTIME_002","RUNTIME_003","RUNTIME_004","RUNTIME_005","RUNTIME_006","RUNTIME_007","RUNTIME_008","RUNTIME_009","RUNTIME_010","RUNTIME_011","TYPE_001","BUILD_001","BUILD_002"],"sources":["../src/desc.ts"],"sourcesContent":["import {\n RUNTIME_001,\n RUNTIME_002,\n RUNTIME_003,\n RUNTIME_004,\n RUNTIME_005,\n RUNTIME_006,\n RUNTIME_007,\n RUNTIME_008,\n RUNTIME_009,\n RUNTIME_010,\n RUNTIME_011,\n TYPE_001,\n BUILD_001,\n BUILD_002,\n} from './error-codes';\n\nexport const runtimeDescMap = {\n [RUNTIME_001]: 'Failed to get remoteEntry exports.',\n [RUNTIME_002]: 'The remote entry interface does not contain \"init\"',\n [RUNTIME_003]: 'Failed to get manifest.',\n [RUNTIME_004]: 'Failed to locate remote.',\n [RUNTIME_005]: 'Invalid loadShareSync function call from bundler runtime',\n [RUNTIME_006]: 'Invalid loadShareSync function call from runtime',\n [RUNTIME_007]: 'Failed to get remote snapshot.',\n [RUNTIME_008]: 'Failed to load script resources.',\n [RUNTIME_009]: 'Please call createInstance first.',\n [RUNTIME_010]:\n 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api.',\n [RUNTIME_011]: 'The remoteEntry URL is missing from the remote snapshot.',\n};\n\nexport const typeDescMap = {\n [TYPE_001]:\n 'Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.',\n};\n\nexport const buildDescMap = {\n [BUILD_001]: 'Failed to find expose module.',\n [BUILD_002]: 'PublicPath is required in prod mode.',\n};\n\nexport const errorDescMap = {\n ...runtimeDescMap,\n ...typeDescMap,\n ...buildDescMap,\n};\n"],"mappings":";;;AAiBA,MAAa,iBAAiB;EAC3BA,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCAAc;EACdC,kCACC;EACDC,kCAAc;CAChB;AAED,MAAa,cAAc,GACxBC,+BACC,8FACH;AAED,MAAa,eAAe;EACzBC,gCAAY;EACZC,gCAAY;CACd;AAED,MAAa,eAAe;CAC1B,GAAG;CACH,GAAG;CACH,GAAG;CACJ"}

@@ -13,2 +13,3 @@ //#region src/desc.d.ts

"RUNTIME-010": string;
"RUNTIME-011": string;
};

@@ -36,2 +37,3 @@ declare const typeDescMap: {

"RUNTIME-010": string;
"RUNTIME-011": string;
};

@@ -38,0 +40,0 @@ //#endregion

@@ -13,2 +13,3 @@ //#region src/desc.d.ts

"RUNTIME-010": string;
"RUNTIME-011": string;
};

@@ -36,2 +37,3 @@ declare const typeDescMap: {

"RUNTIME-010": string;
"RUNTIME-011": string;
};

@@ -38,0 +40,0 @@ //#endregion

@@ -1,2 +0,2 @@

import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001 } from "./error-codes.mjs";
import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001 } from "./error-codes.mjs";

@@ -14,3 +14,4 @@ //#region src/desc.ts

[RUNTIME_009]: "Please call createInstance first.",
[RUNTIME_010]: "The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api."
[RUNTIME_010]: "The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api.",
[RUNTIME_011]: "The remoteEntry URL is missing from the remote snapshot."
};

@@ -17,0 +18,0 @@ const typeDescMap = { [TYPE_001]: "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error." };

@@ -1,1 +0,1 @@

{"version":3,"file":"desc.mjs","names":[],"sources":["../src/desc.ts"],"sourcesContent":["import {\n RUNTIME_001,\n RUNTIME_002,\n RUNTIME_003,\n RUNTIME_004,\n RUNTIME_005,\n RUNTIME_006,\n RUNTIME_007,\n RUNTIME_008,\n RUNTIME_009,\n RUNTIME_010,\n TYPE_001,\n BUILD_001,\n BUILD_002,\n} from './error-codes';\n\nexport const runtimeDescMap = {\n [RUNTIME_001]: 'Failed to get remoteEntry exports.',\n [RUNTIME_002]: 'The remote entry interface does not contain \"init\"',\n [RUNTIME_003]: 'Failed to get manifest.',\n [RUNTIME_004]: 'Failed to locate remote.',\n [RUNTIME_005]: 'Invalid loadShareSync function call from bundler runtime',\n [RUNTIME_006]: 'Invalid loadShareSync function call from runtime',\n [RUNTIME_007]: 'Failed to get remote snapshot.',\n [RUNTIME_008]: 'Failed to load script resources.',\n [RUNTIME_009]: 'Please call createInstance first.',\n [RUNTIME_010]:\n 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api.',\n};\n\nexport const typeDescMap = {\n [TYPE_001]:\n 'Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.',\n};\n\nexport const buildDescMap = {\n [BUILD_001]: 'Failed to find expose module.',\n [BUILD_002]: 'PublicPath is required in prod mode.',\n};\n\nexport const errorDescMap = {\n ...runtimeDescMap,\n ...typeDescMap,\n ...buildDescMap,\n};\n"],"mappings":";;;AAgBA,MAAa,iBAAiB;EAC3B,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cACC;CACH;AAED,MAAa,cAAc,GACxB,WACC,8FACH;AAED,MAAa,eAAe;EACzB,YAAY;EACZ,YAAY;CACd;AAED,MAAa,eAAe;CAC1B,GAAG;CACH,GAAG;CACH,GAAG;CACJ"}
{"version":3,"file":"desc.mjs","names":[],"sources":["../src/desc.ts"],"sourcesContent":["import {\n RUNTIME_001,\n RUNTIME_002,\n RUNTIME_003,\n RUNTIME_004,\n RUNTIME_005,\n RUNTIME_006,\n RUNTIME_007,\n RUNTIME_008,\n RUNTIME_009,\n RUNTIME_010,\n RUNTIME_011,\n TYPE_001,\n BUILD_001,\n BUILD_002,\n} from './error-codes';\n\nexport const runtimeDescMap = {\n [RUNTIME_001]: 'Failed to get remoteEntry exports.',\n [RUNTIME_002]: 'The remote entry interface does not contain \"init\"',\n [RUNTIME_003]: 'Failed to get manifest.',\n [RUNTIME_004]: 'Failed to locate remote.',\n [RUNTIME_005]: 'Invalid loadShareSync function call from bundler runtime',\n [RUNTIME_006]: 'Invalid loadShareSync function call from runtime',\n [RUNTIME_007]: 'Failed to get remote snapshot.',\n [RUNTIME_008]: 'Failed to load script resources.',\n [RUNTIME_009]: 'Please call createInstance first.',\n [RUNTIME_010]:\n 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \"createInstance\" api.',\n [RUNTIME_011]: 'The remoteEntry URL is missing from the remote snapshot.',\n};\n\nexport const typeDescMap = {\n [TYPE_001]:\n 'Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.',\n};\n\nexport const buildDescMap = {\n [BUILD_001]: 'Failed to find expose module.',\n [BUILD_002]: 'PublicPath is required in prod mode.',\n};\n\nexport const errorDescMap = {\n ...runtimeDescMap,\n ...typeDescMap,\n ...buildDescMap,\n};\n"],"mappings":";;;AAiBA,MAAa,iBAAiB;EAC3B,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cAAc;EACd,cACC;EACD,cAAc;CAChB;AAED,MAAa,cAAc,GACxB,WACC,8FACH;AAED,MAAa,eAAe;EACzB,YAAY;EACZ,YAAY;CACd;AAED,MAAa,eAAe;CAC1B,GAAG;CACH,GAAG;CACH,GAAG;CACJ"}

@@ -13,2 +13,3 @@

const RUNTIME_010 = "RUNTIME-010";
const RUNTIME_011 = "RUNTIME-011";
const TYPE_001 = "TYPE-001";

@@ -31,3 +32,4 @@ const BUILD_001 = "BUILD-001";

exports.RUNTIME_010 = RUNTIME_010;
exports.RUNTIME_011 = RUNTIME_011;
exports.TYPE_001 = TYPE_001;
//# sourceMappingURL=error-codes.cjs.map

@@ -1,1 +0,1 @@

{"version":3,"file":"error-codes.cjs","names":[],"sources":["../src/error-codes.ts"],"sourcesContent":["export const RUNTIME_001 = 'RUNTIME-001';\nexport const RUNTIME_002 = 'RUNTIME-002';\nexport const RUNTIME_003 = 'RUNTIME-003';\nexport const RUNTIME_004 = 'RUNTIME-004';\nexport const RUNTIME_005 = 'RUNTIME-005';\nexport const RUNTIME_006 = 'RUNTIME-006';\nexport const RUNTIME_007 = 'RUNTIME-007';\nexport const RUNTIME_008 = 'RUNTIME-008';\nexport const RUNTIME_009 = 'RUNTIME-009';\nexport const RUNTIME_010 = 'RUNTIME-010';\n\nexport const TYPE_001 = 'TYPE-001';\nexport const BUILD_001 = 'BUILD-001';\nexport const BUILD_002 = 'BUILD-002';\n"],"mappings":";;AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAE3B,MAAa,WAAW;AACxB,MAAa,YAAY;AACzB,MAAa,YAAY"}
{"version":3,"file":"error-codes.cjs","names":[],"sources":["../src/error-codes.ts"],"sourcesContent":["export const RUNTIME_001 = 'RUNTIME-001';\nexport const RUNTIME_002 = 'RUNTIME-002';\nexport const RUNTIME_003 = 'RUNTIME-003';\nexport const RUNTIME_004 = 'RUNTIME-004';\nexport const RUNTIME_005 = 'RUNTIME-005';\nexport const RUNTIME_006 = 'RUNTIME-006';\nexport const RUNTIME_007 = 'RUNTIME-007';\nexport const RUNTIME_008 = 'RUNTIME-008';\nexport const RUNTIME_009 = 'RUNTIME-009';\nexport const RUNTIME_010 = 'RUNTIME-010';\nexport const RUNTIME_011 = 'RUNTIME-011';\n\nexport const TYPE_001 = 'TYPE-001';\nexport const BUILD_001 = 'BUILD-001';\nexport const BUILD_002 = 'BUILD-002';\n"],"mappings":";;AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAE3B,MAAa,WAAW;AACxB,MAAa,YAAY;AACzB,MAAa,YAAY"}

@@ -12,2 +12,3 @@ //#region src/error-codes.d.ts

declare const RUNTIME_010 = "RUNTIME-010";
declare const RUNTIME_011 = "RUNTIME-011";
declare const TYPE_001 = "TYPE-001";

@@ -17,3 +18,3 @@ declare const BUILD_001 = "BUILD-001";

//#endregion
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001 };
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001 };
//# sourceMappingURL=error-codes.d.mts.map

@@ -12,2 +12,3 @@ //#region src/error-codes.d.ts

declare const RUNTIME_010 = "RUNTIME-010";
declare const RUNTIME_011 = "RUNTIME-011";
declare const TYPE_001 = "TYPE-001";

@@ -17,3 +18,3 @@ declare const BUILD_001 = "BUILD-001";

//#endregion
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001 };
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001 };
//# sourceMappingURL=error-codes.d.ts.map

@@ -12,2 +12,3 @@ //#region src/error-codes.ts

const RUNTIME_010 = "RUNTIME-010";
const RUNTIME_011 = "RUNTIME-011";
const TYPE_001 = "TYPE-001";

@@ -18,3 +19,3 @@ const BUILD_001 = "BUILD-001";

//#endregion
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001 };
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001 };
//# sourceMappingURL=error-codes.mjs.map

@@ -1,1 +0,1 @@

{"version":3,"file":"error-codes.mjs","names":[],"sources":["../src/error-codes.ts"],"sourcesContent":["export const RUNTIME_001 = 'RUNTIME-001';\nexport const RUNTIME_002 = 'RUNTIME-002';\nexport const RUNTIME_003 = 'RUNTIME-003';\nexport const RUNTIME_004 = 'RUNTIME-004';\nexport const RUNTIME_005 = 'RUNTIME-005';\nexport const RUNTIME_006 = 'RUNTIME-006';\nexport const RUNTIME_007 = 'RUNTIME-007';\nexport const RUNTIME_008 = 'RUNTIME-008';\nexport const RUNTIME_009 = 'RUNTIME-009';\nexport const RUNTIME_010 = 'RUNTIME-010';\n\nexport const TYPE_001 = 'TYPE-001';\nexport const BUILD_001 = 'BUILD-001';\nexport const BUILD_002 = 'BUILD-002';\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAE3B,MAAa,WAAW;AACxB,MAAa,YAAY;AACzB,MAAa,YAAY"}
{"version":3,"file":"error-codes.mjs","names":[],"sources":["../src/error-codes.ts"],"sourcesContent":["export const RUNTIME_001 = 'RUNTIME-001';\nexport const RUNTIME_002 = 'RUNTIME-002';\nexport const RUNTIME_003 = 'RUNTIME-003';\nexport const RUNTIME_004 = 'RUNTIME-004';\nexport const RUNTIME_005 = 'RUNTIME-005';\nexport const RUNTIME_006 = 'RUNTIME-006';\nexport const RUNTIME_007 = 'RUNTIME-007';\nexport const RUNTIME_008 = 'RUNTIME-008';\nexport const RUNTIME_009 = 'RUNTIME-009';\nexport const RUNTIME_010 = 'RUNTIME-010';\nexport const RUNTIME_011 = 'RUNTIME-011';\n\nexport const TYPE_001 = 'TYPE-001';\nexport const BUILD_001 = 'BUILD-001';\nexport const BUILD_002 = 'BUILD-002';\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAE3B,MAAa,WAAW;AACxB,MAAa,YAAY;AACzB,MAAa,YAAY"}

@@ -18,2 +18,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

exports.RUNTIME_010 = require_error_codes.RUNTIME_010;
exports.RUNTIME_011 = require_error_codes.RUNTIME_011;
exports.TYPE_001 = require_error_codes.TYPE_001;

@@ -20,0 +21,0 @@ exports.buildDescMap = require_desc.buildDescMap;

@@ -1,4 +0,5 @@

import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001 } from "./error-codes.mjs";
import { BundlerName, MFBuildArtifacts, MFBundlerInfo, MFConfigInfo, MFContext, MFEnvironmentInfo, MFLatestErrorEvent, MFProjectInfo, MFRemoteEntry, MFRole, MFSharedEntry, PackageManager } from "./MFContext.mjs";
import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001 } from "./error-codes.mjs";
import { getShortErrorMsg } from "./getShortErrorMsg.mjs";
import { buildDescMap, errorDescMap, runtimeDescMap, typeDescMap } from "./desc.mjs";
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001, buildDescMap, errorDescMap, getShortErrorMsg, runtimeDescMap, typeDescMap };
export { BUILD_001, BUILD_002, type BundlerName, type MFBuildArtifacts, type MFBundlerInfo, type MFConfigInfo, type MFContext, type MFEnvironmentInfo, type MFLatestErrorEvent, type MFProjectInfo, type MFRemoteEntry, type MFRole, type MFSharedEntry, type PackageManager, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001, buildDescMap, errorDescMap, getShortErrorMsg, runtimeDescMap, typeDescMap };

@@ -1,4 +0,5 @@

import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001 } from "./error-codes.js";
import { BundlerName, MFBuildArtifacts, MFBundlerInfo, MFConfigInfo, MFContext, MFEnvironmentInfo, MFLatestErrorEvent, MFProjectInfo, MFRemoteEntry, MFRole, MFSharedEntry, PackageManager } from "./MFContext.js";
import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001 } from "./error-codes.js";
import { getShortErrorMsg } from "./getShortErrorMsg.js";
import { buildDescMap, errorDescMap, runtimeDescMap, typeDescMap } from "./desc.js";
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001, buildDescMap, errorDescMap, getShortErrorMsg, runtimeDescMap, typeDescMap };
export { BUILD_001, BUILD_002, type BundlerName, type MFBuildArtifacts, type MFBundlerInfo, type MFConfigInfo, type MFContext, type MFEnvironmentInfo, type MFLatestErrorEvent, type MFProjectInfo, type MFRemoteEntry, type MFRole, type MFSharedEntry, type PackageManager, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001, buildDescMap, errorDescMap, getShortErrorMsg, runtimeDescMap, typeDescMap };

@@ -1,5 +0,5 @@

import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001 } from "./error-codes.mjs";
import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001 } from "./error-codes.mjs";
import { getShortErrorMsg } from "./getShortErrorMsg.mjs";
import { buildDescMap, errorDescMap, runtimeDescMap, typeDescMap } from "./desc.mjs";
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, TYPE_001, buildDescMap, errorDescMap, getShortErrorMsg, runtimeDescMap, typeDescMap };
export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, TYPE_001, buildDescMap, errorDescMap, getShortErrorMsg, runtimeDescMap, typeDescMap };

@@ -7,3 +7,3 @@ {

"sideEffects": false,
"version": "2.1.0",
"version": "2.2.0",
"license": "MIT",

@@ -42,2 +42,22 @@ "repository": {

}
},
"./browser": {
"import": {
"types": "./dist/browser.d.mts",
"default": "./dist/browser.mjs"
},
"require": {
"types": "./dist/browser.d.ts",
"default": "./dist/browser.cjs"
}
},
"./node": {
"import": {
"types": "./dist/node.d.mts",
"default": "./dist/node.mjs"
},
"require": {
"types": "./dist/node.d.ts",
"default": "./dist/node.cjs"
}
}

@@ -49,5 +69,18 @@ },

"./dist/index.d.ts"
],
"browser": [
"./dist/browser.d.ts"
],
"node": [
"./dist/node.d.ts"
]
}
},
"scripts": {
"build": "tsdown --config tsdown.config.ts --filter error-codes-build",
"lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
"test": "pnpm exec jest --config jest.config.js --passWithNoTests",
"test:ci": "pnpm exec jest --config jest.config.js --passWithNoTests --ci --coverage",
"pre-release": "pnpm run test && pnpm run build"
}
}