@module-federation/error-codes
Advanced tools
| const require_error_codes = require('./error-codes.cjs'); | ||
| //#region src/desc.ts | ||
| const runtimeDescMap = { | ||
| [require_error_codes.RUNTIME_001]: "Failed to get remoteEntry exports.", | ||
| [require_error_codes.RUNTIME_002]: "The remote entry interface does not contain \"init\"", | ||
| [require_error_codes.RUNTIME_003]: "Failed to get manifest.", | ||
| [require_error_codes.RUNTIME_004]: "Failed to locate remote.", | ||
| [require_error_codes.RUNTIME_005]: "Invalid loadShareSync function call from bundler runtime", | ||
| [require_error_codes.RUNTIME_006]: "Invalid loadShareSync function call from runtime", | ||
| [require_error_codes.RUNTIME_007]: "Failed to get remote snapshot.", | ||
| [require_error_codes.RUNTIME_008]: "Failed to load script resources.", | ||
| [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." | ||
| }; | ||
| const typeDescMap = { [require_error_codes.TYPE_001]: "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error." }; | ||
| const buildDescMap = { | ||
| [require_error_codes.BUILD_001]: "Failed to find expose module.", | ||
| [require_error_codes.BUILD_002]: "PublicPath is required in prod mode." | ||
| }; | ||
| const errorDescMap = { | ||
| ...runtimeDescMap, | ||
| ...typeDescMap, | ||
| ...buildDescMap | ||
| }; | ||
| //#endregion | ||
| exports.buildDescMap = buildDescMap; | ||
| exports.errorDescMap = errorDescMap; | ||
| exports.runtimeDescMap = runtimeDescMap; | ||
| exports.typeDescMap = typeDescMap; | ||
| //# sourceMappingURL=desc.cjs.map |
| {"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"} |
| //#region src/desc.d.ts | ||
| declare const runtimeDescMap: { | ||
| "RUNTIME-001": string; | ||
| "RUNTIME-002": string; | ||
| "RUNTIME-003": string; | ||
| "RUNTIME-004": string; | ||
| "RUNTIME-005": string; | ||
| "RUNTIME-006": string; | ||
| "RUNTIME-007": string; | ||
| "RUNTIME-008": string; | ||
| "RUNTIME-009": string; | ||
| "RUNTIME-010": string; | ||
| }; | ||
| declare const typeDescMap: { | ||
| "TYPE-001": string; | ||
| }; | ||
| declare const buildDescMap: { | ||
| "BUILD-001": string; | ||
| "BUILD-002": string; | ||
| }; | ||
| declare const errorDescMap: { | ||
| "BUILD-001": string; | ||
| "BUILD-002": string; | ||
| "TYPE-001": string; | ||
| "RUNTIME-001": string; | ||
| "RUNTIME-002": string; | ||
| "RUNTIME-003": string; | ||
| "RUNTIME-004": string; | ||
| "RUNTIME-005": string; | ||
| "RUNTIME-006": string; | ||
| "RUNTIME-007": string; | ||
| "RUNTIME-008": string; | ||
| "RUNTIME-009": string; | ||
| "RUNTIME-010": string; | ||
| }; | ||
| //#endregion | ||
| export { buildDescMap, errorDescMap, runtimeDescMap, typeDescMap }; | ||
| //# sourceMappingURL=desc.d.mts.map |
| //#region src/desc.d.ts | ||
| declare const runtimeDescMap: { | ||
| "RUNTIME-001": string; | ||
| "RUNTIME-002": string; | ||
| "RUNTIME-003": string; | ||
| "RUNTIME-004": string; | ||
| "RUNTIME-005": string; | ||
| "RUNTIME-006": string; | ||
| "RUNTIME-007": string; | ||
| "RUNTIME-008": string; | ||
| "RUNTIME-009": string; | ||
| "RUNTIME-010": string; | ||
| }; | ||
| declare const typeDescMap: { | ||
| "TYPE-001": string; | ||
| }; | ||
| declare const buildDescMap: { | ||
| "BUILD-001": string; | ||
| "BUILD-002": string; | ||
| }; | ||
| declare const errorDescMap: { | ||
| "BUILD-001": string; | ||
| "BUILD-002": string; | ||
| "TYPE-001": string; | ||
| "RUNTIME-001": string; | ||
| "RUNTIME-002": string; | ||
| "RUNTIME-003": string; | ||
| "RUNTIME-004": string; | ||
| "RUNTIME-005": string; | ||
| "RUNTIME-006": string; | ||
| "RUNTIME-007": string; | ||
| "RUNTIME-008": string; | ||
| "RUNTIME-009": string; | ||
| "RUNTIME-010": string; | ||
| }; | ||
| //#endregion | ||
| export { buildDescMap, errorDescMap, runtimeDescMap, typeDescMap }; | ||
| //# sourceMappingURL=desc.d.ts.map |
| 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"; | ||
| //#region src/desc.ts | ||
| const runtimeDescMap = { | ||
| [RUNTIME_001]: "Failed to get remoteEntry exports.", | ||
| [RUNTIME_002]: "The remote entry interface does not contain \"init\"", | ||
| [RUNTIME_003]: "Failed to get manifest.", | ||
| [RUNTIME_004]: "Failed to locate remote.", | ||
| [RUNTIME_005]: "Invalid loadShareSync function call from bundler runtime", | ||
| [RUNTIME_006]: "Invalid loadShareSync function call from runtime", | ||
| [RUNTIME_007]: "Failed to get remote snapshot.", | ||
| [RUNTIME_008]: "Failed to load script resources.", | ||
| [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." | ||
| }; | ||
| const typeDescMap = { [TYPE_001]: "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error." }; | ||
| const buildDescMap = { | ||
| [BUILD_001]: "Failed to find expose module.", | ||
| [BUILD_002]: "PublicPath is required in prod mode." | ||
| }; | ||
| const errorDescMap = { | ||
| ...runtimeDescMap, | ||
| ...typeDescMap, | ||
| ...buildDescMap | ||
| }; | ||
| //#endregion | ||
| export { buildDescMap, errorDescMap, runtimeDescMap, typeDescMap }; | ||
| //# sourceMappingURL=desc.mjs.map |
| {"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"} |
| //#region src/error-codes.ts | ||
| const RUNTIME_001 = "RUNTIME-001"; | ||
| const RUNTIME_002 = "RUNTIME-002"; | ||
| const RUNTIME_003 = "RUNTIME-003"; | ||
| const RUNTIME_004 = "RUNTIME-004"; | ||
| const RUNTIME_005 = "RUNTIME-005"; | ||
| const RUNTIME_006 = "RUNTIME-006"; | ||
| const RUNTIME_007 = "RUNTIME-007"; | ||
| const RUNTIME_008 = "RUNTIME-008"; | ||
| const RUNTIME_009 = "RUNTIME-009"; | ||
| const RUNTIME_010 = "RUNTIME-010"; | ||
| const TYPE_001 = "TYPE-001"; | ||
| const BUILD_001 = "BUILD-001"; | ||
| const BUILD_002 = "BUILD-002"; | ||
| //#endregion | ||
| exports.BUILD_001 = BUILD_001; | ||
| exports.BUILD_002 = BUILD_002; | ||
| exports.RUNTIME_001 = RUNTIME_001; | ||
| exports.RUNTIME_002 = RUNTIME_002; | ||
| exports.RUNTIME_003 = RUNTIME_003; | ||
| exports.RUNTIME_004 = RUNTIME_004; | ||
| exports.RUNTIME_005 = RUNTIME_005; | ||
| exports.RUNTIME_006 = RUNTIME_006; | ||
| exports.RUNTIME_007 = RUNTIME_007; | ||
| exports.RUNTIME_008 = RUNTIME_008; | ||
| exports.RUNTIME_009 = RUNTIME_009; | ||
| exports.RUNTIME_010 = RUNTIME_010; | ||
| exports.TYPE_001 = TYPE_001; | ||
| //# sourceMappingURL=error-codes.cjs.map |
| {"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"} |
| //#region src/error-codes.d.ts | ||
| declare const RUNTIME_001 = "RUNTIME-001"; | ||
| declare const RUNTIME_002 = "RUNTIME-002"; | ||
| declare const RUNTIME_003 = "RUNTIME-003"; | ||
| declare const RUNTIME_004 = "RUNTIME-004"; | ||
| declare const RUNTIME_005 = "RUNTIME-005"; | ||
| declare const RUNTIME_006 = "RUNTIME-006"; | ||
| declare const RUNTIME_007 = "RUNTIME-007"; | ||
| declare const RUNTIME_008 = "RUNTIME-008"; | ||
| declare const RUNTIME_009 = "RUNTIME-009"; | ||
| declare const RUNTIME_010 = "RUNTIME-010"; | ||
| declare const TYPE_001 = "TYPE-001"; | ||
| declare const BUILD_001 = "BUILD-001"; | ||
| declare const BUILD_002 = "BUILD-002"; | ||
| //#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 }; | ||
| //# sourceMappingURL=error-codes.d.mts.map |
| //#region src/error-codes.d.ts | ||
| declare const RUNTIME_001 = "RUNTIME-001"; | ||
| declare const RUNTIME_002 = "RUNTIME-002"; | ||
| declare const RUNTIME_003 = "RUNTIME-003"; | ||
| declare const RUNTIME_004 = "RUNTIME-004"; | ||
| declare const RUNTIME_005 = "RUNTIME-005"; | ||
| declare const RUNTIME_006 = "RUNTIME-006"; | ||
| declare const RUNTIME_007 = "RUNTIME-007"; | ||
| declare const RUNTIME_008 = "RUNTIME-008"; | ||
| declare const RUNTIME_009 = "RUNTIME-009"; | ||
| declare const RUNTIME_010 = "RUNTIME-010"; | ||
| declare const TYPE_001 = "TYPE-001"; | ||
| declare const BUILD_001 = "BUILD-001"; | ||
| declare const BUILD_002 = "BUILD-002"; | ||
| //#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 }; | ||
| //# sourceMappingURL=error-codes.d.ts.map |
| //#region src/error-codes.ts | ||
| const RUNTIME_001 = "RUNTIME-001"; | ||
| const RUNTIME_002 = "RUNTIME-002"; | ||
| const RUNTIME_003 = "RUNTIME-003"; | ||
| const RUNTIME_004 = "RUNTIME-004"; | ||
| const RUNTIME_005 = "RUNTIME-005"; | ||
| const RUNTIME_006 = "RUNTIME-006"; | ||
| const RUNTIME_007 = "RUNTIME-007"; | ||
| const RUNTIME_008 = "RUNTIME-008"; | ||
| const RUNTIME_009 = "RUNTIME-009"; | ||
| const RUNTIME_010 = "RUNTIME-010"; | ||
| const TYPE_001 = "TYPE-001"; | ||
| const BUILD_001 = "BUILD-001"; | ||
| const BUILD_002 = "BUILD-002"; | ||
| //#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 }; | ||
| //# sourceMappingURL=error-codes.mjs.map |
| {"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"} |
| //#region src/getShortErrorMsg.ts | ||
| const getDocsUrl = (errorCode) => { | ||
| return `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${errorCode.split("-")[0].toLowerCase()}#${errorCode.toLowerCase()}`; | ||
| }; | ||
| const getShortErrorMsg = (errorCode, errorDescMap, args, originalErrorMsg) => { | ||
| const msg = [`${[errorDescMap[errorCode]]} #${errorCode}`]; | ||
| args && msg.push(`args: ${JSON.stringify(args)}`); | ||
| msg.push(getDocsUrl(errorCode)); | ||
| originalErrorMsg && msg.push(`Original Error Message:\n ${originalErrorMsg}`); | ||
| return msg.join("\n"); | ||
| }; | ||
| //#endregion | ||
| exports.getShortErrorMsg = getShortErrorMsg; | ||
| //# sourceMappingURL=getShortErrorMsg.cjs.map |
| {"version":3,"file":"getShortErrorMsg.cjs","names":[],"sources":["../src/getShortErrorMsg.ts"],"sourcesContent":["const getDocsUrl = (errorCode: string) => {\n const type = errorCode.split('-')[0].toLowerCase();\n return `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${type}#${errorCode.toLowerCase()}`;\n};\n\nexport const getShortErrorMsg = (\n errorCode: string,\n errorDescMap: Record<string, string>,\n args?: Record<string, unknown>,\n originalErrorMsg?: string,\n) => {\n const msg = [`${[errorDescMap[errorCode]]} #${errorCode}`];\n args && msg.push(`args: ${JSON.stringify(args)}`);\n msg.push(getDocsUrl(errorCode));\n originalErrorMsg && msg.push(`Original Error Message:\\n ${originalErrorMsg}`);\n return msg.join('\\n');\n};\n"],"mappings":";;AAAA,MAAM,cAAc,cAAsB;AAExC,QAAO,yFADM,UAAU,MAAM,IAAI,CAAC,GAAG,aAAa,CACmD,GAAG,UAAU,aAAa;;AAGjI,MAAa,oBACX,WACA,cACA,MACA,qBACG;CACH,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,WAAW,CAAC,IAAI,YAAY;AAC1D,SAAQ,IAAI,KAAK,SAAS,KAAK,UAAU,KAAK,GAAG;AACjD,KAAI,KAAK,WAAW,UAAU,CAAC;AAC/B,qBAAoB,IAAI,KAAK,6BAA6B,mBAAmB;AAC7E,QAAO,IAAI,KAAK,KAAK"} |
| //#region src/getShortErrorMsg.d.ts | ||
| declare const getShortErrorMsg: (errorCode: string, errorDescMap: Record<string, string>, args?: Record<string, unknown>, originalErrorMsg?: string) => string; | ||
| //#endregion | ||
| export { getShortErrorMsg }; | ||
| //# sourceMappingURL=getShortErrorMsg.d.mts.map |
| //#region src/getShortErrorMsg.d.ts | ||
| declare const getShortErrorMsg: (errorCode: string, errorDescMap: Record<string, string>, args?: Record<string, unknown>, originalErrorMsg?: string) => string; | ||
| //#endregion | ||
| export { getShortErrorMsg }; | ||
| //# sourceMappingURL=getShortErrorMsg.d.ts.map |
| //#region src/getShortErrorMsg.ts | ||
| const getDocsUrl = (errorCode) => { | ||
| return `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${errorCode.split("-")[0].toLowerCase()}#${errorCode.toLowerCase()}`; | ||
| }; | ||
| const getShortErrorMsg = (errorCode, errorDescMap, args, originalErrorMsg) => { | ||
| const msg = [`${[errorDescMap[errorCode]]} #${errorCode}`]; | ||
| args && msg.push(`args: ${JSON.stringify(args)}`); | ||
| msg.push(getDocsUrl(errorCode)); | ||
| originalErrorMsg && msg.push(`Original Error Message:\n ${originalErrorMsg}`); | ||
| return msg.join("\n"); | ||
| }; | ||
| //#endregion | ||
| export { getShortErrorMsg }; | ||
| //# sourceMappingURL=getShortErrorMsg.mjs.map |
| {"version":3,"file":"getShortErrorMsg.mjs","names":[],"sources":["../src/getShortErrorMsg.ts"],"sourcesContent":["const getDocsUrl = (errorCode: string) => {\n const type = errorCode.split('-')[0].toLowerCase();\n return `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${type}#${errorCode.toLowerCase()}`;\n};\n\nexport const getShortErrorMsg = (\n errorCode: string,\n errorDescMap: Record<string, string>,\n args?: Record<string, unknown>,\n originalErrorMsg?: string,\n) => {\n const msg = [`${[errorDescMap[errorCode]]} #${errorCode}`];\n args && msg.push(`args: ${JSON.stringify(args)}`);\n msg.push(getDocsUrl(errorCode));\n originalErrorMsg && msg.push(`Original Error Message:\\n ${originalErrorMsg}`);\n return msg.join('\\n');\n};\n"],"mappings":";AAAA,MAAM,cAAc,cAAsB;AAExC,QAAO,yFADM,UAAU,MAAM,IAAI,CAAC,GAAG,aAAa,CACmD,GAAG,UAAU,aAAa;;AAGjI,MAAa,oBACX,WACA,cACA,MACA,qBACG;CACH,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,WAAW,CAAC,IAAI,YAAY;AAC1D,SAAQ,IAAI,KAAK,SAAS,KAAK,UAAU,KAAK,GAAG;AACjD,KAAI,KAAK,WAAW,UAAU,CAAC;AAC/B,qBAAoB,IAAI,KAAK,6BAA6B,mBAAmB;AAC7E,QAAO,IAAI,KAAK,KAAK"} |
| Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
| const require_error_codes = require('./error-codes.cjs'); | ||
| const require_getShortErrorMsg = require('./getShortErrorMsg.cjs'); | ||
| const require_desc = require('./desc.cjs'); | ||
| exports.BUILD_001 = require_error_codes.BUILD_001; | ||
| exports.BUILD_002 = require_error_codes.BUILD_002; | ||
| exports.RUNTIME_001 = require_error_codes.RUNTIME_001; | ||
| exports.RUNTIME_002 = require_error_codes.RUNTIME_002; | ||
| exports.RUNTIME_003 = require_error_codes.RUNTIME_003; | ||
| exports.RUNTIME_004 = require_error_codes.RUNTIME_004; | ||
| exports.RUNTIME_005 = require_error_codes.RUNTIME_005; | ||
| exports.RUNTIME_006 = require_error_codes.RUNTIME_006; | ||
| exports.RUNTIME_007 = require_error_codes.RUNTIME_007; | ||
| exports.RUNTIME_008 = require_error_codes.RUNTIME_008; | ||
| exports.RUNTIME_009 = require_error_codes.RUNTIME_009; | ||
| exports.RUNTIME_010 = require_error_codes.RUNTIME_010; | ||
| exports.TYPE_001 = require_error_codes.TYPE_001; | ||
| exports.buildDescMap = require_desc.buildDescMap; | ||
| exports.errorDescMap = require_desc.errorDescMap; | ||
| exports.getShortErrorMsg = require_getShortErrorMsg.getShortErrorMsg; | ||
| exports.runtimeDescMap = require_desc.runtimeDescMap; | ||
| exports.typeDescMap = require_desc.typeDescMap; |
| 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 { 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 }; |
| 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 { 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 }; |
+4
-1
@@ -1,1 +0,4 @@ | ||
| export * from "./src/index"; | ||
| 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 { 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 }; |
+11
-6
@@ -7,3 +7,3 @@ { | ||
| "sideEffects": false, | ||
| "version": "2.0.1", | ||
| "version": "2.1.0", | ||
| "license": "MIT", | ||
@@ -29,10 +29,15 @@ "repository": { | ||
| }, | ||
| "main": "./dist/index.cjs.js", | ||
| "module": "./dist/index.esm.mjs", | ||
| "main": "./dist/index.cjs", | ||
| "module": "./dist/index.mjs", | ||
| "types": "./dist/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": "./dist/index.esm.mjs", | ||
| "require": "./dist/index.cjs.js" | ||
| "import": { | ||
| "types": "./dist/index.d.mts", | ||
| "default": "./dist/index.mjs" | ||
| }, | ||
| "require": { | ||
| "types": "./dist/index.d.ts", | ||
| "default": "./dist/index.cjs" | ||
| } | ||
| } | ||
@@ -39,0 +44,0 @@ }, |
| 'use strict'; | ||
| const RUNTIME_001 = 'RUNTIME-001'; | ||
| const RUNTIME_002 = 'RUNTIME-002'; | ||
| const RUNTIME_003 = 'RUNTIME-003'; | ||
| const RUNTIME_004 = 'RUNTIME-004'; | ||
| const RUNTIME_005 = 'RUNTIME-005'; | ||
| const RUNTIME_006 = 'RUNTIME-006'; | ||
| const RUNTIME_007 = 'RUNTIME-007'; | ||
| const RUNTIME_008 = 'RUNTIME-008'; | ||
| const RUNTIME_009 = 'RUNTIME-009'; | ||
| const TYPE_001 = 'TYPE-001'; | ||
| const BUILD_001 = 'BUILD-001'; | ||
| const BUILD_002 = 'BUILD-002'; | ||
| const getDocsUrl = (errorCode) => { | ||
| const type = errorCode.split('-')[0].toLowerCase(); | ||
| return `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${type}#${errorCode.toLowerCase()}`; | ||
| }; | ||
| const getShortErrorMsg = (errorCode, errorDescMap, args, originalErrorMsg) => { | ||
| const msg = [`${[errorDescMap[errorCode]]} #${errorCode}`]; | ||
| args && msg.push(`args: ${JSON.stringify(args)}`); | ||
| msg.push(getDocsUrl(errorCode)); | ||
| originalErrorMsg && msg.push(`Original Error Message:\n ${originalErrorMsg}`); | ||
| return msg.join('\n'); | ||
| }; | ||
| const runtimeDescMap = { | ||
| [RUNTIME_001]: 'Failed to get remoteEntry exports.', | ||
| [RUNTIME_002]: 'The remote entry interface does not contain "init"', | ||
| [RUNTIME_003]: 'Failed to get manifest.', | ||
| [RUNTIME_004]: 'Failed to locate remote.', | ||
| [RUNTIME_005]: 'Invalid loadShareSync function call from bundler runtime', | ||
| [RUNTIME_006]: 'Invalid loadShareSync function call from runtime', | ||
| [RUNTIME_007]: 'Failed to get remote snapshot.', | ||
| [RUNTIME_008]: 'Failed to load script resources.', | ||
| [RUNTIME_009]: 'Please call createInstance first.', | ||
| }; | ||
| const typeDescMap = { | ||
| [TYPE_001]: 'Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.', | ||
| }; | ||
| const buildDescMap = { | ||
| [BUILD_001]: 'Failed to find expose module.', | ||
| [BUILD_002]: 'PublicPath is required in prod mode.', | ||
| }; | ||
| const errorDescMap = { | ||
| ...runtimeDescMap, | ||
| ...typeDescMap, | ||
| ...buildDescMap, | ||
| }; | ||
| exports.BUILD_001 = BUILD_001; | ||
| exports.BUILD_002 = BUILD_002; | ||
| exports.RUNTIME_001 = RUNTIME_001; | ||
| exports.RUNTIME_002 = RUNTIME_002; | ||
| exports.RUNTIME_003 = RUNTIME_003; | ||
| exports.RUNTIME_004 = RUNTIME_004; | ||
| exports.RUNTIME_005 = RUNTIME_005; | ||
| exports.RUNTIME_006 = RUNTIME_006; | ||
| exports.RUNTIME_007 = RUNTIME_007; | ||
| exports.RUNTIME_008 = RUNTIME_008; | ||
| exports.RUNTIME_009 = RUNTIME_009; | ||
| exports.TYPE_001 = TYPE_001; | ||
| exports.buildDescMap = buildDescMap; | ||
| exports.errorDescMap = errorDescMap; | ||
| exports.getShortErrorMsg = getShortErrorMsg; | ||
| exports.runtimeDescMap = runtimeDescMap; | ||
| exports.typeDescMap = typeDescMap; | ||
| //# sourceMappingURL=index.cjs.js.map |
| {"version":3,"file":"index.cjs.js","sources":["../src/error-codes.ts","../src/getShortErrorMsg.ts","../src/desc.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;AAAO,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AAEpB,MAAM,QAAQ,GAAG;AACjB,MAAM,SAAS,GAAG;AAClB,MAAM,SAAS,GAAG;;ACZzB,MAAM,UAAU,GAAG,CAAC,SAAiB,KAAI;AACvC,IAAA,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;IAClD,OAAO,CAAA,sFAAA,EAAyF,IAAI,CAAA,CAAA,EAAI,SAAS,CAAC,WAAW,EAAE,EAAE;AACnI,CAAC;AAEM,MAAM,gBAAgB,GAAG,CAC9B,SAAiB,EACjB,YAAoC,EACpC,IAA8B,EAC9B,gBAAyB,KACvB;AACF,IAAA,MAAM,GAAG,GAAG,CAAC,CAAA,EAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,CAAC;AAC1D,IAAA,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA,MAAA,EAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC;IACjD,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC/B,gBAAgB,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA,0BAAA,EAA6B,gBAAgB,CAAA,CAAE,CAAC;AAC7E,IAAA,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AACvB;;ACDO,MAAM,cAAc,GAAG;IAC5B,CAAC,WAAW,GAAG,oCAAoC;IACnD,CAAC,WAAW,GAAG,oDAAoD;IACnE,CAAC,WAAW,GAAG,yBAAyB;IACxC,CAAC,WAAW,GAAG,0BAA0B;IACzC,CAAC,WAAW,GAAG,0DAA0D;IACzE,CAAC,WAAW,GAAG,kDAAkD;IACjE,CAAC,WAAW,GAAG,gCAAgC;IAC/C,CAAC,WAAW,GAAG,kCAAkC;IACjD,CAAC,WAAW,GAAG,mCAAmC;;AAG7C,MAAM,WAAW,GAAG;IACzB,CAAC,QAAQ,GACP,4FAA4F;;AAGzF,MAAM,YAAY,GAAG;IAC1B,CAAC,SAAS,GAAG,+BAA+B;IAC5C,CAAC,SAAS,GAAG,sCAAsC;;AAG9C,MAAM,YAAY,GAAG;AAC1B,IAAA,GAAG,cAAc;AACjB,IAAA,GAAG,WAAW;AACd,IAAA,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;"} |
| export * from "./src/index"; |
| const RUNTIME_001 = 'RUNTIME-001'; | ||
| const RUNTIME_002 = 'RUNTIME-002'; | ||
| const RUNTIME_003 = 'RUNTIME-003'; | ||
| const RUNTIME_004 = 'RUNTIME-004'; | ||
| const RUNTIME_005 = 'RUNTIME-005'; | ||
| const RUNTIME_006 = 'RUNTIME-006'; | ||
| const RUNTIME_007 = 'RUNTIME-007'; | ||
| const RUNTIME_008 = 'RUNTIME-008'; | ||
| const RUNTIME_009 = 'RUNTIME-009'; | ||
| const TYPE_001 = 'TYPE-001'; | ||
| const BUILD_001 = 'BUILD-001'; | ||
| const BUILD_002 = 'BUILD-002'; | ||
| const getDocsUrl = (errorCode) => { | ||
| const type = errorCode.split('-')[0].toLowerCase(); | ||
| return `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${type}#${errorCode.toLowerCase()}`; | ||
| }; | ||
| const getShortErrorMsg = (errorCode, errorDescMap, args, originalErrorMsg) => { | ||
| const msg = [`${[errorDescMap[errorCode]]} #${errorCode}`]; | ||
| args && msg.push(`args: ${JSON.stringify(args)}`); | ||
| msg.push(getDocsUrl(errorCode)); | ||
| originalErrorMsg && msg.push(`Original Error Message:\n ${originalErrorMsg}`); | ||
| return msg.join('\n'); | ||
| }; | ||
| const runtimeDescMap = { | ||
| [RUNTIME_001]: 'Failed to get remoteEntry exports.', | ||
| [RUNTIME_002]: 'The remote entry interface does not contain "init"', | ||
| [RUNTIME_003]: 'Failed to get manifest.', | ||
| [RUNTIME_004]: 'Failed to locate remote.', | ||
| [RUNTIME_005]: 'Invalid loadShareSync function call from bundler runtime', | ||
| [RUNTIME_006]: 'Invalid loadShareSync function call from runtime', | ||
| [RUNTIME_007]: 'Failed to get remote snapshot.', | ||
| [RUNTIME_008]: 'Failed to load script resources.', | ||
| [RUNTIME_009]: 'Please call createInstance first.', | ||
| }; | ||
| const typeDescMap = { | ||
| [TYPE_001]: 'Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.', | ||
| }; | ||
| const buildDescMap = { | ||
| [BUILD_001]: 'Failed to find expose module.', | ||
| [BUILD_002]: 'PublicPath is required in prod mode.', | ||
| }; | ||
| const errorDescMap = { | ||
| ...runtimeDescMap, | ||
| ...typeDescMap, | ||
| ...buildDescMap, | ||
| }; | ||
| export { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, TYPE_001, buildDescMap, errorDescMap, getShortErrorMsg, runtimeDescMap, typeDescMap }; | ||
| //# sourceMappingURL=index.esm.mjs.map |
| {"version":3,"file":"index.esm.mjs","sources":["../src/error-codes.ts","../src/getShortErrorMsg.ts","../src/desc.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":"AAAO,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AAEpB,MAAM,QAAQ,GAAG;AACjB,MAAM,SAAS,GAAG;AAClB,MAAM,SAAS,GAAG;;ACZzB,MAAM,UAAU,GAAG,CAAC,SAAiB,KAAI;AACvC,IAAA,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;IAClD,OAAO,CAAA,sFAAA,EAAyF,IAAI,CAAA,CAAA,EAAI,SAAS,CAAC,WAAW,EAAE,EAAE;AACnI,CAAC;AAEM,MAAM,gBAAgB,GAAG,CAC9B,SAAiB,EACjB,YAAoC,EACpC,IAA8B,EAC9B,gBAAyB,KACvB;AACF,IAAA,MAAM,GAAG,GAAG,CAAC,CAAA,EAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,CAAC;AAC1D,IAAA,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA,MAAA,EAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC;IACjD,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC/B,gBAAgB,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA,0BAAA,EAA6B,gBAAgB,CAAA,CAAE,CAAC;AAC7E,IAAA,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AACvB;;ACDO,MAAM,cAAc,GAAG;IAC5B,CAAC,WAAW,GAAG,oCAAoC;IACnD,CAAC,WAAW,GAAG,oDAAoD;IACnE,CAAC,WAAW,GAAG,yBAAyB;IACxC,CAAC,WAAW,GAAG,0BAA0B;IACzC,CAAC,WAAW,GAAG,0DAA0D;IACzE,CAAC,WAAW,GAAG,kDAAkD;IACjE,CAAC,WAAW,GAAG,gCAAgC;IAC/C,CAAC,WAAW,GAAG,kCAAkC;IACjD,CAAC,WAAW,GAAG,mCAAmC;;AAG7C,MAAM,WAAW,GAAG;IACzB,CAAC,QAAQ,GACP,4FAA4F;;AAGzF,MAAM,YAAY,GAAG;IAC1B,CAAC,SAAS,GAAG,+BAA+B;IAC5C,CAAC,SAAS,GAAG,sCAAsC;;AAG9C,MAAM,YAAY,GAAG;AAC1B,IAAA,GAAG,cAAc;AACjB,IAAA,GAAG,WAAW;AACd,IAAA,GAAG,YAAY;;;;;"} |
| export declare const runtimeDescMap: { | ||
| "RUNTIME-001": string; | ||
| "RUNTIME-002": string; | ||
| "RUNTIME-003": string; | ||
| "RUNTIME-004": string; | ||
| "RUNTIME-005": string; | ||
| "RUNTIME-006": string; | ||
| "RUNTIME-007": string; | ||
| "RUNTIME-008": string; | ||
| "RUNTIME-009": string; | ||
| }; | ||
| export declare const typeDescMap: { | ||
| "TYPE-001": string; | ||
| }; | ||
| export declare const buildDescMap: { | ||
| "BUILD-001": string; | ||
| "BUILD-002": string; | ||
| }; | ||
| export declare const errorDescMap: { | ||
| "BUILD-001": string; | ||
| "BUILD-002": string; | ||
| "TYPE-001": string; | ||
| "RUNTIME-001": string; | ||
| "RUNTIME-002": string; | ||
| "RUNTIME-003": string; | ||
| "RUNTIME-004": string; | ||
| "RUNTIME-005": string; | ||
| "RUNTIME-006": string; | ||
| "RUNTIME-007": string; | ||
| "RUNTIME-008": string; | ||
| "RUNTIME-009": string; | ||
| }; |
| export declare const RUNTIME_001 = "RUNTIME-001"; | ||
| export declare const RUNTIME_002 = "RUNTIME-002"; | ||
| export declare const RUNTIME_003 = "RUNTIME-003"; | ||
| export declare const RUNTIME_004 = "RUNTIME-004"; | ||
| export declare const RUNTIME_005 = "RUNTIME-005"; | ||
| export declare const RUNTIME_006 = "RUNTIME-006"; | ||
| export declare const RUNTIME_007 = "RUNTIME-007"; | ||
| export declare const RUNTIME_008 = "RUNTIME-008"; | ||
| export declare const RUNTIME_009 = "RUNTIME-009"; | ||
| export declare const TYPE_001 = "TYPE-001"; | ||
| export declare const BUILD_001 = "BUILD-001"; | ||
| export declare const BUILD_002 = "BUILD-002"; |
| export declare const getShortErrorMsg: (errorCode: string, errorDescMap: Record<string, string>, args?: Record<string, unknown>, originalErrorMsg?: string) => string; |
| export * from './error-codes'; | ||
| export { getShortErrorMsg } from './getShortErrorMsg'; | ||
| export { runtimeDescMap, typeDescMap, errorDescMap, buildDescMap, } from './desc'; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
22765
93.2%25
92.31%209
28.22%1
Infinity%