{"version":3,"sources":["../src/index.ts","../src/helper/index.ts","../src/helper/config.ts","../src/helper/rspack.ts","../src/plugins/rspack/plugin.ts","../src/plugins/rspack/runtimePlugin/registerRemotes.ts","../src/plugins/rspack/utils.ts","../src/plugins/rspack/share.ts","../src/framework/react/config.ts","../src/framework/vue/config.ts","../src/plugins/rspack/index.ts"],"sourcesContent":["import {default as pluginRspackEmpShare} from 'src/plugins/rspack'\nexport default pluginRspackEmpShare\nexport * from 'src/plugins/rspack'\n","export const importJsVm = (content: string) => `data:text/javascript,${content}`\n\nexport function deepAssign<T>(target: any, ...sources: any): T {\n  for (const source of sources) {\n    for (const k in source) {\n      const vs = source[k],\n        vt = target[k]\n      if (Object(vs) == vs && Object(vt) === vt) {\n        target[k] = deepAssign(vt, vs)\n        continue\n      }\n      target[k] = source[k]\n    }\n  }\n  return target\n}\n\nexport const checkVersion = (version: string) => (version ? Number(version.split('.')[0]) : 0)\nexport const isPromise = (p: any) => p && Object.prototype.toString.call(p) === '[object Promise]'\n\n//\nexport const isDev = process.env.EMPSHARE_ENV === 'dev'\nexport const log = isDev ? console.log.bind(console, '[EMP Share]') : () => {}\n","export const shareGlobalName = 'EMP_SHARE_RUNTIME'\nexport const shareGlobalVal = 'EMPShareGlobalVal'\nexport const shareForceRemote = 'EMP_FORCE_REMOTES'\n","// export {ModuleFederationPlugin} from '@module-federation/rspack'\nexport {ModuleFederationPlugin} from '@empjs/module-federation-rspack'\n","import {Compiler} from '@empjs/cli'\nimport {importJsVm} from 'src/helper'\nimport type {EMPSHARERuntimeOptions} from './types'\n\nconst getShareRuntimeEntry = url => {\n  const content = [`import '${url}'`].join('\\n')\n  return importJsVm(content)\n}\n// 当没有设置 runtimeLib 时候需要内置\nexport class EmpShareRemoteLibPlugin {\n  options: EMPSHARERuntimeOptions\n  constructor(op: EMPSHARERuntimeOptions) {\n    this.options = op\n  }\n  apply(compiler: Compiler) {\n    const {webpack} = compiler\n    const entry = getShareRuntimeEntry('@empjs/share/library')\n    new webpack.EntryPlugin(compiler.context, entry, {\n      name: undefined,\n    }).apply(compiler)\n  }\n}\n","import {type GlobalStore} from '@empjs/cli'\nimport {shareForceRemote} from 'src/helper/config'\nimport {ForceRemoteOptions} from '../types'\n\nexport const registerRemotes = (store: GlobalStore, forceRemotes: ForceRemoteOptions) => {\n  if (Object.keys(forceRemotes).length > 0) {\n    store.injectTags(\n      [\n        {\n          innerHTML: `window.${shareForceRemote} = ${JSON.stringify(forceRemotes)};`,\n          tagName: 'script',\n          pos: 'head',\n        },\n      ],\n      'EMP_FORCE_REMOTES',\n    )\n  }\n}\n","import type {EMPSHARERuntimeOptions} from './types'\nexport function getRuntimeLib(host: EMPSHARERuntimeOptions['frameworkLib'], mode: string, entry = 'runtime') {\n  if (typeof host === 'string') {\n    if (entry === 'runtime') {\n      return `${host}/runtime${mode === 'development' ? '.development' : ''}.umd.js`\n    } else {\n      return `${host}/${entry}.${mode}.umd.js`\n    }\n  } else if (typeof host === 'object') {\n    if (mode === 'development') return host.dev\n    else return host.prod\n  }\n  return ''\n}\n","import type {GlobalStore} from '@empjs/cli'\nimport {deepAssign} from 'src/helper'\nimport {shareGlobalName, shareGlobalVal} from 'src/helper/config'\nimport {ModuleFederationPlugin} from 'src/helper/rspack'\nimport {EmpShareRemoteLibPlugin} from './plugin'\nimport {registerRemotes} from './runtimePlugin/registerRemotes'\nimport type {\n  EMPPluginShareType,\n  ExternalsItemType,\n  frameworkOptions,\n  ModuleFederationPluginOptions,\n  runtimeLibType,\n} from './types'\nimport {getRuntimeLib} from './utils'\n\nconst exp = /^([0-9a-zA-Z_\\s]+)@(.*)/\nexport class EmpShare {\n  private op: EMPPluginShareType\n  private store: GlobalStore\n  /**\n   * 注入资源\n   */\n  private injectHtml: any[] = []\n  /**\n   * 兼容 shareLib\n   */\n  private externalsLib: ExternalsItemType[] = []\n  constructor(op: EMPPluginShareType, store: GlobalStore) {\n    this.op = op || {}\n    this.store = store\n  }\n  setup() {\n    this.resetRuntime()\n    this.resetFramework()\n    this.setMfName() //设置 mfName 默认为 uniqueName\n    this.setMF() // 设置 MF 配置\n    this.injectGlobalVal() // 插入全局变量 方便emp外的项目调用\n    this.injectFramework() // 插入ui框架库\n    this.setShareLib() //兼容 emp Sharelib的共享模型设置\n    this.setRuntimeLib() // 设置 MF SDK\n    this.injectToHtml() //触发插入动作\n    this.setExternal() // 设置 external 降低包体\n  }\n  private injectToHtml() {\n    const {store, injectHtml} = this\n    if (injectHtml.length > 0) {\n      store.injectTags(injectHtml, 'EMPShare')\n    }\n  }\n  private injectFramework() {\n    if (this.fk && this.fk.libs.length > 0) {\n      return this.injectFkLibs(this.fk.libs)\n    }\n    if (!this.op.empRuntime || !this.fk.lib) return\n    const {store, injectHtml} = this\n    if (this.fk.lib) {\n      const url = getRuntimeLib(this.fk.lib, store.mode, this.fk.entry)\n      injectHtml.push({\n        attributes: {\n          src: url,\n        },\n        tagName: 'script',\n      })\n    }\n  }\n  private injectFkLibs(libs: string[]) {\n    libs.map(url => {\n      if (url.endsWith('.css')) {\n        return this.injectHtml.push({\n          attributes: {\n            href: url,\n            rel: 'stylesheet',\n          },\n          tagName: 'link',\n        })\n      }\n      this.injectHtml.push({\n        attributes: {\n          src: url,\n        },\n        tagName: 'script',\n      })\n    })\n  }\n  private injectGlobalVal() {\n    if (!this.op.empRuntime) return\n    const {empRuntime} = this.op\n    const {injectHtml} = this\n    const frameworkGlobal = this.fk.global || (empRuntime.shareLib ? 'window' : '')\n    const injectGlobalValToHtml = empRuntime.injectGlobalValToHtml === false || !this.rt.lib ? false : true\n    // 插入全局引用变量 让 empRuntime 可以提前实例化 不需要在页面重复实例化\n    if (injectGlobalValToHtml) {\n      const injectData: any = {frameworkLib: frameworkGlobal, runtimeLib: this.rt.global}\n      if (this.fk.name && this.fk.name !== 'none') injectData.framework = this.fk.name\n      injectHtml.push({\n        // type: 'js',\n        tagName: 'script',\n        innerHTML: `window.${shareGlobalVal}=${JSON.stringify(injectData)}`,\n      })\n    }\n  }\n  public fk!: Required<frameworkOptions>\n  private resetFramework() {\n    if (!this.op.empRuntime) return\n    const {framework, frameworkGlobal, frameworkLib} = this.op.empRuntime\n    //\n    this.fk = {\n      name: 'none',\n      version: 0,\n      entry: '',\n      global: frameworkGlobal || '',\n      lib: frameworkLib || '',\n      libs: [],\n    }\n    //\n    if (typeof framework === 'string') {\n      this.fk.name = framework as any\n    }\n    // TODO 通用 CDN 的适配方案\n    else if (typeof framework === 'object' && Object.keys(framework).length > 0) {\n      // 默认 框架名 为入口\n      framework.entry = framework.entry ? framework.entry : framework.name\n      this.fk = deepAssign(this.fk, framework)\n    }\n  }\n  public rt!: Required<runtimeLibType>\n  private resetRuntime() {\n    const {empRuntime} = this.op\n    if (!empRuntime) return\n    const global = empRuntime.runtimeGlobal || shareGlobalName\n    const lib = empRuntime.runtimeLib ? empRuntime.runtimeLib : empRuntime.runtime?.lib ? empRuntime.runtime.lib : ''\n    this.rt = {\n      lib,\n      global,\n    }\n  }\n  private setExternal() {\n    if (!this.op.empRuntime) return\n    const {store, externalsLib} = this\n    const {empRuntime} = this.op\n    const {shareLib} = empRuntime\n    //\n    const externalRuntime = this.rt.lib\n      ? {\n          '@module-federation/runtime': `MFRuntime`,\n          '@module-federation/sdk': `MFSDK`,\n        }\n      : {}\n    const externals = {}\n    for (const [key, value] of Object.entries(externalRuntime)) {\n      externals[key] = `${this.rt.global}.${value}`\n    }\n    /**\n     * TODO\n     * 框架相关内容需要移除 share 由外部简化配置实现\n     */\n    if (this.fk.name === 'react' && !shareLib && this.fk.global) {\n      const version = this.fk.version\n      const externalReact = {\n        react: `React`,\n        'react-dom': `ReactDOM`,\n      }\n      if (this.fk.entry === 'reactRouter') {\n        externalReact['react-router-dom'] = 'ReactRouterDOM'\n      }\n      for (const [key, value] of Object.entries(externalReact)) {\n        externals[key] = `${this.fk.global}.${value}`\n      }\n      if ([17, 18, 19].includes(version)) {\n        externals['react-dom/client'] = this.fk.global\n        externals['react/jsx-runtime'] = this.fk.global\n        externals['react/jsx-dev-runtime'] = this.fk.global\n      }\n    }\n    if (shareLib) {\n      externalsLib.map(v => {\n        if (v.type === 'js' && v.module && v.global) {\n          externals[v.module] = `${this.fk.global}.${v.global}`\n        }\n      })\n    }\n    if (empRuntime.setExternals) empRuntime.setExternals(externals, this.fk.global, this.rt.global)\n    //\n    // console.log('externals in plugin', externals)\n    store.chain.merge({externals})\n  }\n  private setRuntimeLib() {\n    if (!this.op.empRuntime) return\n\n    const {shareLib} = this.op.empRuntime\n    const {store, injectHtml} = this\n    const {empRuntime} = this.op\n    if (!this.rt.lib) {\n      // 内置 this.rt.lib\n      store.chain.plugin('plugin-emp-share-framework').use(EmpShareRemoteLibPlugin, [empRuntime])\n    }\n    // 统一封装到 frameworkLib\n    else if (this.rt.lib === 'useFrameworkLib' && !shareLib) {\n    } else {\n      // 插入 runtime\n      injectHtml.push({tagName: 'script', pos: 'head', attributes: {src: this.rt.lib}})\n    }\n  }\n  private setMfName() {\n    if (this.op.name) {\n      this.op.name = this.store.encodeVarName(this.op.name)\n      if (this.op.name !== this.store.empConfig.output.uniqueName) {\n        this.store.chain.output.set('uniqueName', this.op.name)\n      }\n    } else {\n      this.op.name = this.store.empConfig.output.uniqueName\n    }\n  }\n  private setMF() {\n    const o = this.op\n    const {store} = this\n    if (o.name) {\n      const op = store.deepAssign<ModuleFederationPluginOptions & {empRuntime: any}>(\n        {\n          filename: 'emp.js',\n          // manifest: false,\n          // dts: false,\n          // dev: {\n          //   disableDynamicRemoteTypeHints: true,\n          // },\n        },\n        o,\n      )\n      //\n      // if (o.dev === false) op.dev = false\n      //\n      if (op.empRuntime) {\n        delete op.empRuntime\n      }\n      /**\n       * 注册 forceRemotes\n       */\n      if (o.forceRemotes) {\n        registerRemotes(store, o.forceRemotes)\n        delete o.forceRemotes\n        op.runtimePlugins?.push(require.resolve('@empjs/share/forceRemote'))\n      }\n      // console.log('op', op)\n      store.chain.plugin('plugin-emp-share').use(ModuleFederationPlugin, [op])\n    }\n  }\n  private setShareLib() {\n    if (!this.op.empRuntime) return\n    const {shareLib} = this.op.empRuntime\n    const {externalsLib, injectHtml} = this\n    if (shareLib && typeof shareLib === 'object') {\n      for (const [k, v] of Object.entries(shareLib)) {\n        let externalsItem: ExternalsItemType = {}\n        externalsItem.module = k\n        //增加下划线 支持lodash 等特殊符号的问题 如 _@http\n\n        if (typeof v === 'string') {\n          const cb: any = v.match(exp) || []\n          if (cb.length > 0) {\n            externalsItem.global = cb[1]\n            externalsItem.entry = cb[2]\n            externalsItem.type = 'js'\n            externalsLib.push(externalsItem)\n            externalsItem = {}\n          } else {\n            externalsItem.global = ''\n            externalsItem.entry = v\n            externalsItem.type = 'js'\n            externalsLib.push(externalsItem)\n            externalsItem = {}\n          }\n        } else if (Array.isArray(v)) {\n          v.map(vo => {\n            if (!vo) return\n            const isCSS = vo.split('?')[0].endsWith('.css')\n            if (isCSS) {\n              externalsItem.entry = vo\n              externalsItem.type = 'css'\n            } else {\n              const cb: any = vo.match(exp) || []\n              if (cb.length > 0) {\n                externalsItem.global = cb[1]\n                externalsItem.entry = cb[2]\n                externalsItem.type = 'js'\n              } else {\n                externalsItem.global = ''\n                externalsItem.entry = vo\n                externalsItem.type = 'js'\n              }\n            }\n            externalsLib.push(externalsItem)\n            externalsItem = {}\n          })\n        } else if (typeof v === 'object' && v.entry) {\n          externalsItem.entry = v.entry\n          externalsItem.global = v.global\n          externalsItem.type = v.type\n          externalsLib.push(externalsItem)\n          externalsItem = {}\n        }\n      }\n      // console.log(externalsLib)\n      externalsLib.map(v => {\n        if (v.type === 'js') {\n          injectHtml.push({\n            attributes: {\n              src: v.entry,\n            },\n            tagName: 'script',\n          })\n        } else if (v.type === 'css') {\n          injectHtml.push({\n            attributes: {\n              href: v.entry,\n              rel: 'stylesheet',\n            },\n            tagName: 'link',\n          })\n        }\n      })\n    }\n  }\n}\n","export const externalReact = (o: any, globalVal: string) => {\n  o = Object.assign(o, {\n    react: `${globalVal}.React`,\n    'react-dom': `${globalVal}.ReactDOM`,\n    'react-dom/client': globalVal,\n    'react/jsx-runtime': globalVal,\n    'react/jsx-dev-runtime': globalVal,\n    'react-router-dom': `${globalVal}.ReactRouterDOM`,\n  })\n  return o\n}\n","export const externalVue = (o: any, globalVal: string) => {\n  o = Object.assign(o, {\n    vue: `${globalVal}.Vue`,\n    'vue-router': `${globalVal}.VueRouter`,\n  })\n  return o\n}\n","import type {GlobalStore} from '@empjs/cli'\nimport {EmpShare} from './share'\nimport type {EMPPluginShareType} from './types'\nexport type {EMPPluginShareType}\n//\nexport * from 'src/framework/react/config'\nexport * from 'src/framework/vue/config'\nexport * from './types'\n//\nexport const pluginRspackEmpShare = (o: EMPPluginShareType = {}) => {\n  return {\n    name: '@empjs/share',\n    async rsConfig(store: GlobalStore) {\n      //\n      if (o.manifest === true) {\n        o.manifest = {\n          fileName: 'emp.json',\n        }\n      } else if (typeof o.manifest === 'object') {\n        o.manifest = store.deepAssign({fileName: 'emp.json'}, o.manifest)\n      } else {\n        // 默认情况下，如果 exposes 为空则不生成 manifest 避免冲突\n        const hasExposes = o.exposes && Object.keys(o.exposes).length > 0\n        if (hasExposes) {\n          o.manifest = {\n            fileName: 'emp.json',\n          }\n        } else {\n          o.manifest = false\n        }\n      }\n      const empShare = new EmpShare(o, store)\n      empShare.setup()\n    },\n  }\n}\nexport default pluginRspackEmpShare\n"],"mappings":"+4BAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,kBAAAC,EAAA,gBAAAC,EAAA,yBAAAC,IAAA,eAAAC,EAAAN,GCAO,IAAMO,EAAcC,GAAoB,wBAAwBA,CAAO,GAEvE,SAASC,EAAcC,KAAgBC,EAAiB,CAC7D,QAAWC,KAAUD,EACnB,QAAWE,KAAKD,EAAQ,CACtB,IAAME,EAAKF,EAAOC,CAAC,EACjBE,EAAKL,EAAOG,CAAC,EACf,GAAI,OAAOC,CAAE,GAAKA,GAAM,OAAOC,CAAE,IAAMA,EAAI,CACzCL,EAAOG,CAAC,EAAIJ,EAAW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IAAK,YACP,EACA,QAAS,MACX,CAAC,CAEL,CAAC,CACH,CACF,CACF,EClUO,IAAMQ,EAAgB,CAACC,EAAQC,KACpCD,EAAI,OAAO,OAAOA,EAAG,CACnB,MAAO,GAAGC,CAAS,SACnB,YAAa,GAAGA,CAAS,YACzB,mBAAoBA,EACpB,oBAAqBA,EACrB,wBAAyBA,EACzB,mBAAoB,GAAGA,CAAS,iBAClC,CAAC,EACMD,GCTF,IAAME,EAAc,CAACC,EAAQC,KAClCD,EAAI,OAAO,OAAOA,EAAG,CACnB,IAAK,GAAGC,CAAS,OACjB,aAAc,GAAGA,CAAS,YAC5B,CAAC,EACMD,GCIF,IAAME,EAAuB,CAACC,EAAwB,CAAC,KACrD,CACL,KAAM,eACA,SAASC,EAAoB,QAAAC,EAAA,sBAE7BF,EAAE,WAAa,GACjBA,EAAE,SAAW,CACX,SAAU,UACZ,EACS,OAAOA,EAAE,UAAa,SAC/BA,EAAE,SAAWC,EAAM,WAAW,CAAC,SAAU,UAAU,EAAGD,EAAE,QAAQ,EAG7CA,EAAE,SAAW,OAAO,KAAKA,EAAE,OAAO,EAAE,OAAS,EAE9DA,EAAE,SAAW,CACX,SAAU,UACZ,EAEAA,EAAE,SAAW,GAGA,IAAIG,EAASH,EAAGC,CAAK,EAC7B,MAAM,CACjB,GACF,GAEKG,EAAQL,EVnCf,IAAOM,EAAQC","names":["src_exports","__export","src_default","externalReact","externalVue","pluginRspackEmpShare","__toCommonJS","importJsVm","content","deepAssign","target","sources","source","k","vs","vt","isDev","log","shareGlobalName","shareGlobalVal","shareForceRemote","import_module_federation_rspack","getShareRuntimeEntry","url","content","importJsVm","EmpShareRemoteLibPlugin","op","__publicField","compiler","webpack","entry","registerRemotes","store","forceRemotes","shareForceRemote","getRuntimeLib","host","mode","entry","exp","EmpShare","op","store","__publicField","injectHtml","url","getRuntimeLib","libs","empRuntime","frameworkGlobal","injectData","shareGlobalVal","framework","frameworkLib","deepAssign","_a","global","shareGlobalName","lib","externalsLib","shareLib","externalRuntime","externals","key","value","version","externalReact","v","EmpShareRemoteLibPlugin","o","registerRemotes","k","externalsItem","cb","vo","externalReact","o","globalVal","externalVue","o","globalVal","pluginRspackEmpShare","o","store","__async","EmpShare","rspack_default","src_default","rspack_default"]}