@sidesuit/pkg-module-proxy 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global.d.ts +0 -7
- package/dist/index.js +1 -1
- package/package.json +17 -14
package/dist/global.d.ts
CHANGED
|
@@ -12,19 +12,12 @@ export declare global {
|
|
|
12
12
|
interface Window {
|
|
13
13
|
// window.require
|
|
14
14
|
rq(module: string): any;
|
|
15
|
-
// 定义需要代理的模块
|
|
16
15
|
defineModule: DefineModuleFunction<any, any>;
|
|
17
|
-
// 模块代理
|
|
18
16
|
moduleProxyDefine: ModuleProxyDefineFunction<any, any>;
|
|
19
|
-
// 模块 debug
|
|
20
17
|
moduleDebugDefine: ModuleDebugDefineFunction;
|
|
21
|
-
// 模块代码替换
|
|
22
18
|
moduleCodeReplace: ModuleCodeReplaceFunction;
|
|
23
|
-
// replay store 查找
|
|
24
19
|
storeFinder: StoreFinderFunction;
|
|
25
|
-
// 跟旧版本的立刻替换一样
|
|
26
20
|
moduleProxyImmediately: ModuleProxyImmediatelyFunction;
|
|
27
|
-
// ajax 参数拦截
|
|
28
21
|
ajaxHijack: AjaxHijackFunction;
|
|
29
22
|
}
|
|
30
23
|
}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function
|
|
1
|
+
!function(){"use strict";function n(n){return n.split("").reverse().map((n=>String.fromCharCode(n.charCodeAt(0)-1))).join("")}function e(e){const t={yTfwK:"default",AxrYM:function(n,e){return n(e)}},[r,o=t.yTfwK]=t.AxrYM(n,e).split("|");return[r,o]}function t(n){const e=function(n,e){return n(e)},t=function(n,e){return n+e},o="id_",u=function(n){return n()},i="script",s="head",d="__fnCache",l=e(r,n),a=e(c,n),p=t(o,u(f));let x="window['__fnCache'][\""+p+'"]= function('+a+"){"+l+"}";var m=document.createElement(i);try{m.appendChild(document.createTextNode(x))}catch(v){m.text=x}let w=document.getElementsByTagName(s)[0]||document.documentElement;return w.appendChild(m),w.removeChild(m),window[d][""+p]}function r(n){let e=n.slice(n.indexOf("{")+1,n.lastIndexOf("}"));return e||""}window.__fnCache=window.__fnCache||{};let o=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,u=/([^\s,]+)/g;function c(n){const e=function(n,e){return n+e},t=function(n,e){return n===e};let r=n.replace(o,""),c=r.slice(e(r.indexOf("("),1),r.indexOf(")")).match(u);return t(c,null)&&(c=[]),c}function i(n,e,t=!1){const r=function(n,e){return n<e},o=function(n,e){return n===e},u=e.split(/\.|\[(\d+)\]/).filter(Boolean);let c,i=n;for(let f=0;r(f,u.length);f++){if(c=i,i=i[u[f]],o(i,void 0))return t?c:void 0}return t?c:i}function f(){const n={SrcrZ:function(n,e){return n|e},qMeds:function(n,e){return n%e},rVjFS:function(n,e){return n+e},gpCYx:function(n,e){return n*e},IwaKy:function(n,e){return n/e},ZNwLr:function(n,e){return n==e},YvTeV:function(n,e){return n&e},wmfLG:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"};let e=(new Date).getTime();return n.wmfLG.replace(/[xy]/g,(function(t){var r=n.SrcrZ(n.qMeds(n.rVjFS(e,n.gpCYx(Math.random(),16)),16),0);return e=Math.floor(n.IwaKy(e,16)),(n.ZNwLr(t,"x")?r:n.SrcrZ(n.YvTeV(r,3),8)).toString(16)}))}(r=>{const o={UeZcv:function(n,e){return n(e)},cDrFs:function(n,e){return n!==e},efMUO:"string",cbdaz:function(n,e,t){return n(e,t)},IEloi:function(n,e,t){return n(e,t)},dqjNl:function(n,e){return n(e)},zHbfo:function(n,e){return n||e},pxCcl:function(n,e){return n(e)},PcadH:"[6].default",ELokA:function(n,e){return n(e)},OwlBl:"Error",vvwOl:function(n,e){return n(e)},QbydU:function(n,e,t){return n(e,t)},mubLJ:function(n,e){return n(e)},bCBFK:function(n,e,t){return n(e,t)},vHkLp:function(n,e){return n(e)},aBFVB:function(n,e){return n<e},wFNFy:function(n,e){return n(e)},xAheI:"CometErrorBoundary.react",ciaEK:function(n,e,t,r){return n(e,t,r)},HumzG:function(n,e){return n===e},eruZy:"function",vUvmH:"react",Jomqn:function(n,e,t){return n(e,t)},tMLeQ:function(n){return n()},wUxIb:function(n,e){return n(e)},fConN:function(n,e){return n<e},vySrP:function(n,e){return n(e)},BqXKh:function(n,e){return n(e)},QywoM:"GZUAwCFuFf",ipXCC:"__d_stub",WfJfn:"__d",QsvqG:"umvbgfe}spssf.cg",FtOEq:"umvbgfe}djttbmd/epsq.NPEudbfS",gbwik:"umvbgfe}fvfvRitjmcvQzbmfS0fsput0fnjuovs.zbmfs"};if(window[o.QywoM])return;window[o.QywoM]=!0;const u={},c={},f={},s={},d={};let l=window.__d;window.__d&&(~l.toString().indexOf(o.ipXCC)?delete window.__d:l=new Proxy(window.__d,{apply:(n,e,t)=>(t=o.UeZcv(p,t),n.apply(e,t))})),Object.defineProperty(window,o.WfJfn,{get:function(){return l},set:function(n){const e=function(n,e){return o.UeZcv(n,e)};l=new Proxy(n,{apply:(n,t,r)=>(r=e(p,r),n.apply(t,r))})}});const a=[];function p(n){let[e,t,r]=n;return o.cDrFs(typeof e,o.efMUO)||a.includes(e)||(a.push(e),n[2]=o.cbdaz(w,n[2],e),n[2]=o.cbdaz(m,n[2],e),n[2]=o.IEloi(x,n[2],e),s[e]&&console.log(e,n)),n}function x(n,e){const t={sZFUa:function(n,e){return o.HumzG(n,e)},nJMOe:o.eruZy,rRhrv:function(n,e,t){return o.IEloi(n,e,t)},pgIha:function(n,e){return o.pxCcl(n,e)},FMaOd:o.vUvmH,LvGfi:function(n,e,t){return o.Jomqn(n,e,t)},zFISc:function(n){return o.tMLeQ(n)}};if(!u[e]||o.HumzG(u[e].length,0))return n;const r=u[e];r.sort(((n,e)=>n.options.order-e.options.order));const c=r.reduce(((n,e)=>{const t=e.options.definerPath;return n[t]=n[t]||[],n[t].push(e),n}),{});return new Proxy(n,{apply(n,u,f){const s={axZcM:o.OwlBl,VcdSY:function(n,e){return o.vvwOl(n,e)},saleA:function(n,e,t){return o.QbydU(n,e,t)},WtcXq:function(n,e){return o.mubLJ(n,e)},GocEM:function(n,e,t){return o.QbydU(n,e,t)},LcfuM:function(n,e,t){return o.bCBFK(n,e,t)},xqdXn:function(n,e){return o.vHkLp(n,e)},wGTdp:function(n,e,t){return o.cbdaz(n,e,t)}},d=n.apply(u,f);if(f[5]&&f[5].dependencies)for(let e=0;o.aBFVB(e,f[5].dependencies.length);e++)f.push(f[5].dependencies[e].exports);const l=f[3],a=f[2],p=o.wFNFy(a,o.xAheI),x=n=>(console.error(n),s.axZcM);for(let m in c){const n=o.ciaEK(i,f,m,!0),u=m.split(".").pop(),d=o.cbdaz(i,f,m);n[u]=function(...n){const o={gAEUn:function(n,e){return t.sZFUa(n,e)},FXhtv:t.nJMOe,ZkhxD:function(n,e,r){return t.rRhrv(n,e,r)}},u=d.apply(d,n),i=n[0],{useState:a,useEffect:w,jsx:h,Fragment:y}=t.pgIha(l,t.FMaOd),[b,F]=t.pgIha(a,0);function S(n){return n&&n.$1&&o.gAEUn(typeof n.$1,o.FXhtv)?o.ZkhxD(h,n,n.props):n}return t.LvGfi(w,(()=>{const n=function(n,e){return s.xqdXn(n,e)},t=s.wGTdp(v,e,(()=>{n(F,Math.random())}));return()=>t()}),[]),t.LvGfi(h,p,{fallback:x,children:t.zFISc((()=>{const t=function(n,e){return s.VcdSY(n,e)},o=function(n,e,t){return s.saleA(n,e,t)};if(!c[m])return s.WtcXq(S,u);const d=c[m].find((n=>n.options.skipOthers));if(d&&d.component)return s.GocEM(h,d.fallback?p:y,{fallback:d.fallback,children:s.LcfuM(h,d.component,{payload:i,SourceCmp:u,lastCmp:s.VcdSY(S,u),definedArgs:f,callingArgs:n,extraPayloadFromDefiner:d.options.extraPayload,proxyCount:0,removeThisModuleProxy(){const n=c[m].indexOf(d);~n&&c[m].splice(n,1)}})});let l=0;return c[m].reduce(((s,d)=>(d.component&&(s=o(h,d.fallback?p:y,{fallback:d.fallback,children:o(h,d.component,{payload:i,SourceCmp:u,lastCmp:s,extraPayloadFromDefiner:d.options.extraPayload,proxyCount:l,definedArgs:f,callingArgs:n,removeThisModuleProxy(){const n=c[m].indexOf(d);if(~n){const o=r.indexOf(d);c[m].splice(n,1),r.splice(o,1),t(g,e)}}})}),l++),s)),s.VcdSY(S,u))}))})}}return d}})}function m(n,e){const t=function(n,e){return o.wUxIb(n,e)},r=function(n,e){return o.fConN(n,e)};return c[e]?new Proxy(n,{apply(n,o,u){const i=function(n,e){return t(n,e)};if(u[5]&&u[5].dependencies)for(let e=0;r(e,u[5].dependencies.length);e++)u.push(u[5].dependencies[e].exports);const f=n.apply(o,u);return c[e].map((n=>{i(n,u)})),f}}):n}function w(n,e){if(!f[e])return n;const r=f[e];r.sort(((n,e)=>n.options.order-e.options.order));const u=r.find((n=>n.options.skipOthers));return u?o.vySrP(t,u.replacement(n.toString())):o.BqXKh(t,r.reduce(((n,e)=>n=e.replacement(n)),n.toString()))}function v(n,e){return d[n]=d[n]||[],d[n].push(e),()=>{const t=d[n].findIndex(e);d[n].splice(t,1)}}function g(n){if(d[n])for(let e of d[n])o.tMLeQ(e)}r.zKjQYvgSmF=function(e){return window.require(o.UeZcv(n,e))},r.zKjQYvcSmF=(n,t,r)=>{const[c,i]=o.dqjNl(e,n);u[c]||console.error("Undefined module "+c+" from "+i+" #1");const f=u[c].find((n=>n.extensionId===i));if(!f)return console.error("Undefined module "+c+" from "+i+" #2");const{fallback:s}=o.zHbfo(r,{});f.component=t,f.fallback=s,o.UeZcv(g,c)},r.zKjQYVcSmF=(n,t)=>{const r=Object.assign({order:10,skipOthers:!1,beforeInject:()=>!0,afterInject:()=>{},extraPayload:void 0,definerPath:o.PcadH},t),[c,i]=o.ELokA(e,n);u[c]=u[c]||[],u[c].push({extensionId:i,moduleName:c,options:r,component:void 0,fallback:void 0})},r.zKjQYwcSmF=e=>{s[o.UeZcv(n,e)]=!0},r.zKjQYvcSfF=(n,t,r)=>{const u=Object.assign({order:10,skipOthers:!1},r),[c,i]=o.pxCcl(e,n);f[c]=f[c]||[],f[c].push({moduleName:c,options:u,replacement:t})},r.zKGQYvcSmF=(e,t)=>{e=o.pxCcl(n,e),c[e]=c[e]||[],c[e].push(t)},r.zKjQYvcSfF(o.QsvqG,(n=>n.replace('debugjs.")','debugjs.");console.error(b.stackFrames.slice(0,10).map(e=>e.text).join("\\n"))'))),r.zKjQYvcSfF(o.FtOEq,(n=>n.replace(/Error\(\w\(418\)\)/g,"void 0"))),r.zKjQYvcSfF(o.gbwik,(n=>n.replace(/,(\w)=new\(b\("relay-runtime\/mutations\/RelayRecordSourceProxy"/,',$1=window["RlbiULLGWt"]=new(b("relay-runtime/mutations/RelayRecordSourceProxy"')))})(window),(n=>{const e="args undefined",t=function(n,e){return n-e},r="debug",o="undefined value",u="($1_*_*_*_*_$2)",c="_*_*_*_*_",i="RlbiULLGWt",f=function(n,e){return n===e},s="string",d=function(n,e){return n===e},l=function(n,e){return n(e)},a=".$1",p=function(n,e){return n<e},x=function(n,e){return n===e},m=function(n,e){return n===e},w=function(n,e){return n(e)},v=function(n,e){return n(e)},g=function(n,e){return n===e},h="vTUNhjwVvX";if(n[h])return;n[h]=!0;n.zKjqYvcSmF=(h,y,b)=>{const F={jUidm:u,nXsUC:c},S=n[i],_=f(typeof h,s)?S.get(h):h;if(d(_,void 0))return _;let j=l((function(n){return n.replace(/\((.*?)\.(.*?)\)/g,F.jUidm)}),y.replace(/\[(\d+)\]/g,a)).split(".");j=j.map((n=>n.replaceAll(F.nXsUC,".")));let C=_;for(let n=0;p(n,j.length);n++){const e=j[n];if(f(e,"*"))return C;if(d(e.indexOf("^^"),0)){const[n,t]=l(O,e.substring(2));if(C=C.getLinkedRecords(n,t),x(C,void 0))return l(U,e),C}else if(x(e.indexOf("^"),0)){const[n,t]=l(O,e.substring(1));if(C=C.getLinkedRecord(n,t),f(C,void 0)||m(C,null))return w(U,e),C}else if(e.match(/^\d+$/)){if(C=C[v(parseInt,e)],f(C,void 0)||m(C,null))return l(U,e),C}else{const[n,t]=w(O,e);if(C=C.getValue(n,t),g(C,void 0)||d(C,null))return l(U,e),C}}return C;function O(n){const[r,o]=n.split("{");if(!o)return[r,{}];if(!b)throw new Error(e);return[r,b[o.substring(0,t(o.length,1))]||{}]}function U(e){~n.location.search.indexOf(r)&&console.warn(o,{id:h,path:y,args:b,currentPath:e})}}})(window),(e=>{const t=function(n,e){return n(e)},r="xmxlgxMDjA",o="sf{jmbjsfTbubEfmqnjTsiy";if(window[r])return;window[r]=!0;let u={};e.zKGQYvcSmF(o,(n=>{const e=function(n,e){return t(n,e)},r=n[4].exports.default;n[4].exports.default=function(...n){const t=n[0].fb_api_req_friendly_name;return t&&u[t]&&(n[0]=u[t].reduce(((n,t)=>n=e(t,n)),n[0])),r.apply(r,n)}}));e.zkjQYvcSmF=(e,r)=>{e=t(n,e),u[e]=u[e]||[],u[e].push(r)}})(window)}();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sidesuit/pkg-module-proxy",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.iife.js",
|
|
7
7
|
"module": "./dist/index.iife.js",
|
|
@@ -12,23 +12,26 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"serve": "vite",
|
|
14
14
|
"build": "vite build && tsc -p ./tsconfig.dist.json -emitDeclarationOnly && tsc-alias -p ./tsconfig.dist.json",
|
|
15
|
-
"preview": "vite preview"
|
|
15
|
+
"preview": "vite preview",
|
|
16
|
+
"checkUpdate": "NPM_CHECK_INSTALLER=pnpm npm-check -u -i"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"@rollup/plugin-replace": "^5.0.2",
|
|
19
|
-
"@rollup/plugin-terser": "^0.4.
|
|
20
|
-
"@sidesuit/pkg-vite-plugins": "^0.0.
|
|
21
|
-
"@types/lodash-es": "^4.17.
|
|
22
|
-
"@types/node": "^
|
|
23
|
-
"@types/react": "^18.
|
|
24
|
-
"@vitejs/plugin-react": "
|
|
25
|
-
"glob": "
|
|
20
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
21
|
+
"@sidesuit/pkg-vite-plugins": "^0.0.16",
|
|
22
|
+
"@types/lodash-es": "^4.17.8",
|
|
23
|
+
"@types/node": "^20.4.2",
|
|
24
|
+
"@types/react": "^18.2.15",
|
|
25
|
+
"@vitejs/plugin-react": "4.0.3",
|
|
26
|
+
"glob": "10.3.3",
|
|
27
|
+
"javascript-obfuscator": "^4.0.2",
|
|
26
28
|
"lodash-es": "^4.17.21",
|
|
27
|
-
"
|
|
29
|
+
"npm-check": "^6.0.1",
|
|
30
|
+
"prettier": "^3.0.0",
|
|
28
31
|
"react": "^18.2.0",
|
|
29
|
-
"tsc-alias": "^1.8.
|
|
30
|
-
"typescript": "^
|
|
31
|
-
"vite": "^4.
|
|
32
|
-
"vite-plugin-static-copy": "^0.
|
|
32
|
+
"tsc-alias": "^1.8.7",
|
|
33
|
+
"typescript": "^5.1.6",
|
|
34
|
+
"vite": "^4.4.4",
|
|
35
|
+
"vite-plugin-static-copy": "^0.16.0"
|
|
33
36
|
}
|
|
34
37
|
}
|