@sidesuit/pkg-module-proxy 1.1.2 → 1.2.1

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 CHANGED
@@ -8,6 +8,24 @@ import {
8
8
  StoreFinderFunction,
9
9
  } from "./types";
10
10
 
11
+ // RelayStoreFinder 相关类型定义
12
+ interface Source {
13
+ __id: string;
14
+ __typename: string;
15
+ [key: string]:
16
+ | string
17
+ | {
18
+ __ref: string;
19
+ }
20
+ | {
21
+ __refs: string[];
22
+ };
23
+ }
24
+
25
+ interface SearchConfig {
26
+ depth?: number;
27
+ }
28
+
11
29
  export declare global {
12
30
  interface Window {
13
31
  // window.require
@@ -19,5 +37,28 @@ export declare global {
19
37
  storeFinder: StoreFinderFunction;
20
38
  moduleProxyImmediately: ModuleProxyImmediatelyFunction;
21
39
  ajaxHijack: AjaxHijackFunction;
40
+
41
+ // RelayStoreFinder Parents 函数
42
+ storeFinderFindParentsSourcesByStoreId: (
43
+ storeId: string,
44
+ configs?: SearchConfig
45
+ ) => Source[] | null;
46
+
47
+ storeFinderFindParentsTypenamesByStoreId: (
48
+ storeId: string,
49
+ configs?: SearchConfig
50
+ ) => string[] | null;
51
+
52
+ storeFinderFindParentSourceByTypename: (
53
+ storeId: string,
54
+ __typename: string,
55
+ configs?: SearchConfig
56
+ ) => Source | null;
57
+
58
+ storeFinderFindParentByExistingValue: (
59
+ storeId: string,
60
+ valueRule: string,
61
+ configs?: SearchConfig
62
+ ) => string | null;
22
63
  }
23
64
  }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import "./injector";
2
2
  import "./relayStoreFinder";
3
- import './ajaxParamsHijack';
3
+ import "./relayStoreFinderParents";
4
+ import "./ajaxParamsHijack";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";function e(e){return e.split("").reverse().map((e=>String.fromCharCode(e.charCodeAt(0)-1))).join("")}function n(n){const[t,r="default"]=e(n).split("|");return[t,r]}function t(e){const n=function(e){let n=e.slice(e.indexOf("{")+1,e.lastIndexOf("}"));return n||""}(e),t=function(e){let n=e.replace(r,""),t=n.slice(n.indexOf("(")+1,n.indexOf(")")).match(o);null===t&&(t=[]);return t}(e),i="id_"+function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==n?t:3&t|8).toString(16)}))}();let c=`window['__fnCache']["${i}"]= function(${t}){${n}}`,s=document.createElement("script");try{s.appendChild(document.createTextNode(c))}catch(a){s.text=c}let l=document.getElementsByTagName("head")[0]||document.documentElement;return l.appendChild(s),l.removeChild(s),window.__fnCache[`${i}`]}window.__fnCache=window.__fnCache||{};let r=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,o=/([^\s,]+)/g;function i(e,n,t=!1){const r=n.split(/\.|\[(\d+)\]/).filter(Boolean);let o,i=e;for(let c=0;c<r.length;c++){if(o=i,i=i[r[c]],void 0===i)return t?o:void 0}return t?o:i}(r=>{if(window.GZUAwCFuFf)return;window.GZUAwCFuFf=!0;const o={},c={},s={},l={},a={};let d=window.__d;window.__d&&(~d.toString().indexOf("__d_stub")?delete window.__d:d=new Proxy(window.__d,{apply:(e,n,t)=>(t=u(t),e.apply(n,t))})),Object.defineProperty(window,"__d",{get:function(){return d},set:function(e){d=new Proxy(e,{apply:(e,n,t)=>(t=u(t),e.apply(n,t))})}});const f=[];function u(e){let[n,r,a]=e;return"string"!=typeof n||f.includes(n)||(f.push(n),e[2]=function(e,n){if(!s[n])return e;const r=s[n];r.sort(((e,n)=>e.options.order-n.options.order));const o=r.find((e=>e.options.skipOthers));if(o)return t(o.replacement(e.toString()));return t(r.reduce(((e,n)=>e=n.replacement(e)),e.toString()))}(e[2],n),e[2]=function(e,n){return c[n]?new Proxy(e,{apply(e,t,r){if(r[5]&&r[5].dependencies)for(let n=0;n<r[5].dependencies.length;n++)r.push(r[5].dependencies[n].exports);const o=e.apply(t,r);return c[n].map((e=>{e(r)})),o}}):e}(e[2],n),e[2]=function(e,n){if(!o[n]||0===o[n].length)return e;const t=o[n];t.sort(((e,n)=>e.options.order-n.options.order));const r=t.reduce(((e,n)=>{const t=n.options.definerPath;return e[t]=e[t]||[],e[t].push(n),e}),{});return new Proxy(e,{apply(e,o,c){const s=e.apply(o,c);if(c[5]&&c[5].dependencies)for(let n=0;n<c[5].dependencies.length;n++)c.push(c[5].dependencies[n].exports);const l=c[3],a=(0,c[2])("CometErrorBoundary.react"),d=e=>(console.error(e),"Error");for(let f in r){const e=i(c,f,!0),o=f.split(".").pop(),s=i(c,f);e[o]=function(...e){const o=s.apply(s,e),i=e[0],{useState:u,useEffect:x,jsx:g,Fragment:w}=l("react"),[h,y]=u(0),v=()=>{if(!r[f])return _(o);const s=r[f].find((e=>e.options.skipOthers));if(s&&s.component)return g(s.fallback?a:w,{fallback:s.fallback,children:g(s.component,{payload:i,SourceCmp:o,lastCmp:_(o),definedArgs:c,callingArgs:e,extraPayloadFromDefiner:s.options.extraPayload,proxyCount:0,removeThisModuleProxy(){const e=r[f].indexOf(s);~e&&r[f].splice(e,1)}})});let l=0;return r[f].reduce(((s,d)=>(d.component&&(s=g(d.fallback?a:w,{fallback:d.fallback,children:g(d.component,{payload:i,SourceCmp:o,lastCmp:s,extraPayloadFromDefiner:d.options.extraPayload,proxyCount:l,definedArgs:c,callingArgs:e,removeThisModuleProxy(){const e=r[f].indexOf(d);if(~e){const o=t.indexOf(d);r[f].splice(e,1),t.splice(o,1),m(n)}}})}),l++),s)),_(o))};function _(e){return e&&e.$1&&"function"==typeof e.$1?g(e,e.props):e}return x((()=>{const e=p(n,(()=>{y(Math.random())}));return()=>e()}),[]),g(a,{fallback:d,children:v()})}}return s}})}(e[2],n),l[n]&&console.log(n,e)),e}function p(e,n){return a[e]=a[e]||[],a[e].push(n),()=>{const t=a[e].findIndex(n);a[e].splice(t,1)}}function m(e){if(a[e])for(let n of a[e])n()}r.zKjQYvgSmF=function(n){return window.require(e(n))},r.zKjQYvcSmF=(e,t,r)=>{const[i,c]=n(e);o[i]||console.error(`Undefined module ${i} from ${c} #1`);const s=o[i].find((e=>e.extensionId===c));if(!s)return console.error(`Undefined module ${i} from ${c} #2`);const{fallback:l}=r||{};s.component=t,s.fallback=l,m(i)},r.zKjQYVcSmF=(e,t)=>{const r=Object.assign({order:10,skipOthers:!1,beforeInject:()=>!0,afterInject:()=>{},extraPayload:void 0,definerPath:"[6].default"},t),[i,c]=n(e);o[i]=o[i]||[],o[i].push({extensionId:c,moduleName:i,options:r,component:void 0,fallback:void 0})},r.zKjQYwcSmF=n=>{l[e(n)]=!0},r.zKjQYvcSfF=(e,t,r)=>{const o=Object.assign({order:10,skipOthers:!1},r),[i,c]=n(e);s[i]=s[i]||[],s[i].push({moduleName:i,options:o,replacement:t})},r.zKGQYvcSmF=(n,t)=>{n=e(n),c[n]=c[n]||[],c[n].push(t)},r.zKjQYvcSfF("umvbgfe}spssf.cg",(e=>e.replace('debugjs.")','debugjs.");console.error(b.stackFrames.slice(0,10).map(e=>e.text).join("\\n"))'))),r.zKjQYvcSfF("umvbgfe}djttbmd/epsq.NPEudbfS",(e=>e.replace(/Error\(\w\(418\)\)/g,"void 0"))),r.zKjQYvcSfF("umvbgfe}fvfvRitjmcvQzbmfS0fsput0fnjuovs.zbmfs",(e=>e.replace(/,(\w)=new\(b\("relay-runtime\/mutations\/RelayRecordSourceProxy"/,',$1=window["RlbiULLGWt"]=new(b("relay-runtime/mutations/RelayRecordSourceProxy"'))),r.zKjQYvcSfF("umvbgfe}fvfvRitjmcvQzbmfS0fsput0fnjuovs.zbmfs",(e=>e=e.replace(/;(\w)\.commitPayload=function\(([\w,]+)\){/,";$1.commitPayload=function($2){try{if(arguments[0]){if(arguments[0]?.request?.variables?.__relay_internal__pv__CometUFIReactionEnableShortNamerelayprovider === true) return;};}catch(e){console.log('relayStoreCommitPayload',e)};")))})(window),(e=>{if(e.vTUNhjwVvX)return;e.vTUNhjwVvX=!0;e.zKjqYvcSmF=(n,t,r)=>{const o=e.RlbiULLGWt,i="string"==typeof n?o.get(n):n;if(void 0===i)return i;let c=(s=t.replace(/\[(\d+)\]/g,".$1"),s.replace(/\((.*?)\.(.*?)\)/g,"($1_*_*_*_*_$2)")).split(".");var s;c=c.map((e=>function(e){return e.replaceAll("_*_*_*_*_",".")}(e)));let l=i;for(let e=0;e<c.length;e++){const n=c[e];if("*"===n)return l;if(0===n.indexOf("^^")){const[e,t]=a(n.substring(2));if(l=l.getLinkedRecords(e,t),void 0===l)return d(n),l}else if(0===n.indexOf("^")){const[e,t]=a(n.substring(1));if(l=l.getLinkedRecord(e,t),null==l)return d(n),l}else if(n.match(/^\d+$/)){if(l=l[parseInt(n)],null==l)return d(n),l}else{const[e,t]=a(n);if(l=l.getValue(e,t),null==l)return d(n),l}}return l;function a(e){const[n,t]=e.split("{");if(!t)return[n,{}];if(!r)throw new Error("args undefined");return[n,r[t.substring(0,t.length-1)]||{}]}function d(o){~e.location.search.indexOf("debug")&&console.warn("undefined value",{id:n,path:t,args:r,currentPath:o})}}})(window),(n=>{if(window.xmxlgxMDjA)return;window.xmxlgxMDjA=!0;let t={};n.zKGQYvcSmF("sf{jmbjsfTbubEfmqnjTsiy",(e=>{const n=e[4].exports.default;e[4].exports.default=function(...e){const r=e[0].fb_api_req_friendly_name;return r&&t[r]&&(e[0]=t[r].reduce(((e,n)=>e=n(e)),e[0])),n.apply(n,e)}}));n.zkjQYvcSmF=(n,r)=>{n=e(n),t[n]=t[n]||[],t[n].push(r)}})(window)}();
1
+ !function(){"use strict";function n(n){return n.split("").reverse().map(n=>String.fromCharCode(n.charCodeAt(0)-1)).join("")}function t(t){const e={vPnEP:"default",dTTnr:function(n,t){return n(t)}},[r,o=e.vPnEP]=e.dTTnr(n,t).split("|");return[r,o]}function e(n){const t=function(n,t){return n(t)},e=t(r,n),o=t(i,n),u=function(n,t){return n+t}("id_",f());let c="window['__fnCache'][\""+u+'"]= function('+o+"){"+e+"}",s=document.createElement("script");try{s.appendChild(document.createTextNode(c))}catch(d){s.text=c}let l=document.getElementsByTagName("head")[0]||document.documentElement;return l.appendChild(s),l.removeChild(s),window.__fnCache[""+u]}function r(n){return function(n){return n||""}(n.slice(n.indexOf("{")+1,n.lastIndexOf("}")))}window.__fnCache=window.__fnCache||{};let o=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,u=/([^\s,]+)/g;function i(n){let t=n.replace(o,""),e=t.slice((r=t.indexOf("("),i=1,r+i),t.indexOf(")")).match(u);var r,i;return function(n,t){return n===t}(null,e)&&(e=[]),e}function c(n,t,e=!1){const r=function(n,t){return n<t},o=function(n,t){return n===t},u=t.split(/\.|\[(\d+)\]/).filter(Boolean);let i,c=n;for(let f=0;r(f,u.length);f++)if(i=c,c=c[u[f]],o(void 0,c))return e?i:void 0;return e?i:c}function f(){const n={aoBQH:function(n,t){return n|t},wkYUK:function(n,t){return n%t},SiJiU:function(n,t){return n+t},JODKn:function(n,t){return n*t},DlFBK:function(n,t){return n/t},yhZpg:function(n,t){return n==t},WBaqW:function(n,t){return n&t},UehXT:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"};let t=(new Date).getTime();return n.UehXT.replace(/[xy]/g,function(e){var r=n.aoBQH(n.wkYUK(n.SiJiU(t,n.JODKn(16,Math.random())),16),0);return t=Math.floor(n.DlFBK(t,16)),(n.yhZpg("x",e)?r:n.aoBQH(n.WBaqW(3,r),8)).toString(16)})}(r=>{const o=function(n,t){return n(t)},u=function(n,t,e){return n(t,e)},i=function(n,t){return n(t)},f="react",s=function(n,t,e){return n(t,e)},l=function(n,t,e){return n(t,e)},d=function(n){return n()},a=function(n,t){return n===t},p=function(n,t){return n(t)},m=function(n,t){return n<t},x=function(n,t){return n(t)},_=function(n,t,e){return n(t,e)},y=function(n,t){return n==t},h="function",g=function(n,t,e){return n(t,e)},w="CometErrorBoundary.react",v=function(n,t,e,r){return n(t,e,r)},b=function(n,t){return n!=t},j="string",S=function(n,t){return n(t)},k=function(n,t){return n||t},F=function(n,t){return n(t)},C="[6].default",O=function(n,t){return n(t)},z=function(n,t){return n(t)},P=function(n,t){return n(t)},K="__d_stub",Y="__d",E="umvbgfe}spssf.cg",T="umvbgfe}djttbmd/epsq.NPEudbfS",U="umvbgfe}fvfvRitjmcvQzbmfS0fsput0fnjuovs.zbmfs";if(window.GZUAwCFuFf)return;window.GZUAwCFuFf=!0;const A={},Q={},R={},X={},W={};let Z=window.__d;window.__d&&(~Z.toString().indexOf(K)?delete window.__d:Z=new Proxy(window.__d,{apply:(n,t,e)=>(e=B(e),n.apply(t,e))})),Object.defineProperty(window,Y,{get:function(){return Z},set:function(n){Z=new Proxy(n,{apply:(n,t,e)=>(e=B(e),n.apply(t,e))})}});const D=[];function B(n){const t={VebLX:function(n,t){return i(n,t)},bvemz:function(n,t){return p(n,t)},DEXiX:function(n,t){return m(n,t)},obYOd:function(n,t){return x(n,t)},UloUK:function(n,t){return x(n,t)},ZxYBT:function(n,t,e){return _(n,t,e)},COStd:function(n,t){return y(n,t)},ZxlWd:h,ZxgoC:function(n,t,e){return g(n,t,e)},ALaYE:function(n,t){return m(n,t)},KkuIj:w,WEuwr:function(n,t,e,r){return v(n,t,e,r)}};let[r,S,k]=n;return b(j,typeof r)||D.includes(r)||(D.push(r),n[2]=function(n,r){if(!R[r])return n;const o=R[r];o.sort((n,t)=>n.options.order-t.options.order);const u=o.find(n=>n.options.skipOthers);return t.VebLX(e,u?u.replacement(n.toString()):o.reduce((n,t)=>t.replacement(n),n.toString()))}(n[2],r),n[2]=function(n,e){const r=function(n,e){return t.DEXiX(n,e)};return Q[e]?new Proxy(n,{apply(n,o,u){const i=function(n,e){return function(n,e){return t.bvemz(n,e)}(n,e)};if(u[5]&&u[5].dependencies)for(let t=0;r(t,u[5].dependencies.length);t++)u.push(u[5].dependencies[t].exports);const c=n.apply(o,u);return Q[e].map(n=>{i(n,u)}),c}}):n}(n[2],r),n[2]=function(n,e){const r={Reozu:function(n,t){return o(n,t)},oaliG:function(n,t,e){return u(n,t,e)},bSDtv:function(n,t){return i(n,t)},gnKKo:f,dCjRl:function(n,t,e){return s(n,t,e)},kfzux:function(n,t,e){return l(n,t,e)},ydZMe:function(n){return d(n)}};if(!A[e]||a(0,A[e].length))return n;const p=A[e];p.sort((n,t)=>n.options.order-t.options.order);const m=p.reduce((n,t)=>{const e=t.options.definerPath;return n[e]=n[e]||[],n[e].push(t),n},{});return new Proxy(n,{apply(n,o,u){const i={WInCZ:function(n,e){return t.obYOd(n,e)},lXjAF:function(n,e){return t.UloUK(n,e)},PmdOT:function(n,e,r){return t.ZxYBT(n,e,r)},GzSfJ:function(n,e){return t.COStd(n,e)},dEpsa:t.ZxlWd,RWryE:function(n,e,r){return t.ZxgoC(n,e,r)}},f=n.apply(o,u);if(u[5]&&u[5].dependencies)for(let e=0;t.ALaYE(e,u[5].dependencies.length);e++)u.push(u[5].dependencies[e].exports);const s=u[3],l=(0,u[2])(t.KkuIj),d=n=>(console.error(n),"Error");for(let a in m){const n=t.WEuwr(c,u,a,!0),o=a.split(".").pop(),f=t.ZxgoC(c,u,a);n[o]=function(...n){const t=f.apply(f,n),o=n[0],{useState:c,useEffect:x,jsx:_,Fragment:y}=r.bSDtv(s,r.gnKKo),[h,g]=r.bSDtv(c,0);function w(n){return n&&n.$1&&i.GzSfJ(i.dEpsa,typeof n.$1)?i.RWryE(_,n,n.props):n}return r.dCjRl(x,()=>{const n=function(n,t,e){return r.oaliG(n,t,e)}(I,e,()=>{!function(n,t){r.Reozu(n,t)}(g,Math.random())});return()=>n()},[]),r.kfzux(_,l,{fallback:d,children:r.ydZMe(()=>{if(!m[a])return i.lXjAF(w,t);const r=m[a].find(n=>n.options.skipOthers);if(r&&r.component)return i.PmdOT(_,r.fallback?l:y,{fallback:r.fallback,children:i.PmdOT(_,r.component,{payload:o,SourceCmp:t,lastCmp:i.lXjAF(w,t),definedArgs:u,callingArgs:n,extraPayloadFromDefiner:r.options.extraPayload,proxyCount:0,removeThisModuleProxy(){const n=m[a].indexOf(r);~n&&m[a].splice(n,1)}})});let c=0;return m[a].reduce((r,f)=>(f.component&&(r=_(f.fallback?l:y,{fallback:f.fallback,children:_(f.component,{payload:o,SourceCmp:t,lastCmp:r,extraPayloadFromDefiner:f.options.extraPayload,proxyCount:c,definedArgs:u,callingArgs:n,removeThisModuleProxy(){const n=m[a].indexOf(f);if(~n){const t=p.indexOf(f);m[a].splice(n,1),p.splice(t,1),function(n,t){i.WInCZ(n,t)}(L,e)}}})}),c++),r),i.lXjAF(w,t))})})}}return f}})}(n[2],r),X[r]&&console.log(r,n)),n}function I(n,t){return W[n]=W[n]||[],W[n].push(t),()=>{const e=W[n].findIndex(t);W[n].splice(e,1)}}function L(n){if(W[n])for(let t of W[n])d(t)}r.zKjQYvgSmF=function(t){return window.require(S(n,t))},r.zKjQYvcSmF=(n,e,r)=>{const[o,u]=S(t,n);A[o]||console.error("Undefined module "+o+" from "+u+" #1");const i=A[o].find(n=>n.extensionId===u);if(!i)return console.error("Undefined module "+o+" from "+u+" #2");const{fallback:c}=k(r,{});i.component=e,i.fallback=c,F(L,o)},r.zKjQYVcSmF=(n,e)=>{const r=Object.assign({order:10,skipOthers:!1,beforeInject:()=>!0,afterInject:()=>{},extraPayload:void 0,definerPath:C},e),[o,u]=O(t,n);A[o]=A[o]||[],A[o].push({extensionId:u,moduleName:o,options:r,component:void 0,fallback:void 0})},r.zKjQYwcSmF=t=>{X[z(n,t)]=!0},r.zKjQYvcSfF=(n,e,r)=>{const o=Object.assign({order:10,skipOthers:!1},r),[u,i]=P(t,n);R[u]=R[u]||[],R[u].push({moduleName:u,options:o,replacement:e})},r.zKGQYvcSmF=(t,e)=>{t=P(n,t),Q[t]=Q[t]||[],Q[t].push(e)},r.zKjQYvcSfF(E,n=>n.replace('debugjs.")','debugjs.");console.error(b.stackFrames.slice(0,10).map(e=>e.text).join("\\n"))')),r.zKjQYvcSfF(T,n=>n.replace(/Error\(\w\(418\)\)/g,"void 0")),r.zKjQYvcSfF(U,n=>n.replace(/,(\w)=new\(b\("relay-runtime\/mutations\/RelayRecordSourceProxy"/,',$1=window["RlbiULLGWt"]=new(b("relay-runtime/mutations/RelayRecordSourceProxy"')),r.zKjQYvcSfF(U,n=>n.replace(/;(\w)\.commitPayload=function\(([\w,]+)\){/,";$1.commitPayload=function($2){try{if(arguments[0]){if(arguments[0]?.request?.variables?.__relay_internal__pv__CometUFIReactionEnableShortNamerelayprovider === true) return;};}catch(e){console.log('relayStoreCommitPayload',e)};"))})(window),(n=>{const t=function(n,t){return n-t},e=function(n,t){return n==t},r=function(n,t){return n===t},o=function(n,t){return n<t},u=function(n,t){return n===t},i=function(n,t){return n===t},c=function(n,t){return n(t)},f=function(n,t){return n==t},s=function(n,t){return n(t)},l=function(n,t){return n==t},d=function(n,t){return n(t)};n.vTUNhjwVvX||(n.vTUNhjwVvX=!0,n.zKjqYvcSmF=(a,p,m)=>{const x="_*_*_*_*_",_=n.RlbiULLGWt,y=e("string",typeof a)?_.get(a):a;if(r(void 0,y))return y;let h=(g=p.replace(/\[(\d+)\]/g,".$1"),g.replace(/\((.*?)\.(.*?)\)/g,"($1_*_*_*_*_$2)")).split(".");var g;h=h.map(n=>n.replaceAll(x,"."));let w=y;for(let n=0;o(n,h.length);n++){const t=h[n];if(u("*",t))return w;if(i(0,t.indexOf("^^"))){const[n,e]=c(v,t.substring(2));if(w=w.getLinkedRecords(n,e),u(void 0,w))return c(b,t),w}else if(r(0,t.indexOf("^"))){const[n,e]=c(v,t.substring(1));if(w=w.getLinkedRecord(n,e),f(null,w))return s(b,t),w}else if(t.match(/^\d+$/)){if(w=w[s(parseInt,t)],l(null,w))return s(b,t),w}else{const[n,r]=d(v,t);if(w=w.getValue(n,r),e(null,w))return s(b,t),w}}return w;function v(n){const[e,r]=n.split("{");if(!r)return[e,{}];if(!m)throw new Error("args undefined");return[e,m[r.substring(0,t(r.length,1))]||{}]}function b(t){~n.location.search.indexOf("debug")&&console.warn("undefined value",{id:a,path:p,args:m,currentPath:t})}})})(window),(n=>{const t=function(n,t){return n!==t},e=function(n,t){return n!==t},r=function(n,t){return n==t},o="object",u=function(n,t){return n in t},i=function(n,t){return n===t},c=function(n,t){return n in t},f=function(n,t){return n<t},s=function(n,t){return n(t)},l=function(n,t,e){return n(t,e)},d=function(n,t){return n!==t},a="continue",p=function(n,t){return n===t},m=function(n,t,e,r){return n(t,e,r)};function x(f){const s=function(){const t=function(n,t){return function(n,t){return n instanceof t}(n,t)},e=n.RlbiULLGWt.getRoot();let r=[];return Object.keys(e).forEach(n=>{const o=e[n];if(o.__sources&&Array.isArray(o.__sources)){const n=o.__sources;for(const e of n)for(const n in e){const o=e[n];t(o,Map)&&r.push(o)}}}),r}();for(const n of s)for(const[s,l]of n)for(const[n,d]of Object.entries(l))if(t("__id",n)&&e("__typename",n)){if(r(o,typeof d)&&e(null,d)&&u("__ref",d)&&i(d.__ref,f))return l;if(r(o,typeof d)&&t(null,d)&&c("__refs",d)&&Array.isArray(d.__refs)&&d.__refs.includes(f))return l}return null}function _(n,t,e){const r=[];let o=n,u=0;for(;f(u,t);){const n=s(x,o);if(!n)break;r.push(n);const t=l(e,n,r);if(d(a,t)){if(p("break",t))break;return t}o=n.__id,u++}return null}function y(n,t){const e=[];return m(_,n,(null==t?void 0:t.depth)||10,(n,t)=>(e.push(n),"continue")),function(n,t){return n>t}(e.length,0)?e:null}n.vTUNhJwVvX||(n.vTUNhJwVvX=!0,n.zkjQYvCSmF=y,n.zkJqYvcSmF=function(n,t){const e=l(y,n,t);return e?e.map(n=>n.__typename):null},n.zkJQyvcSmF=function(n,t,e){return m(_,n,(null==e?void 0:e.depth)||10,n=>n.__typename===t?n:"continue")},n.zkjQYvcSMf=function(t,e,r){return m(_,t,(null==r?void 0:r.depth)||10,t=>{try{if(function(n,t){return n!=t}(null,n.zKjqYvcSmF(t.__id,e)))return t.__id}catch(r){}return a})})})(window),(t=>{if(window.xmxlgxMDjA)return;window.xmxlgxMDjA=!0;let e={};t.zKGQYvcSmF("sf{jmbjsfTbubEfmqnjTsiy",n=>{const t=n[4].exports.default;n[4].exports.default=function(...n){const r=n[0].fb_api_req_friendly_name;return r&&e[r]&&(n[0]=e[r].reduce((n,t)=>t(n),n[0])),t.apply(t,n)}}),t.zkjQYvcSmF=(t,r)=>{t=function(n,t){return n(t)}(n,t),e[t]=e[t]||[],e[t].push(r)}})(window)}();
@@ -0,0 +1,12 @@
1
+ interface Source {
2
+ __id: string;
3
+ __typename: string;
4
+ [key: string]: string | {
5
+ __ref: string;
6
+ } | {
7
+ __refs: string[];
8
+ };
9
+ }
10
+ interface SearchConfig {
11
+ depth?: number;
12
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sidesuit/pkg-module-proxy",
3
3
  "private": false,
4
- "version": "1.1.2",
4
+ "version": "1.2.1",
5
5
  "type": "module",
6
6
  "main": "./dist/index.iife.js",
7
7
  "module": "./dist/index.iife.js",
@@ -17,21 +17,21 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@rollup/plugin-replace": "^5.0.5",
20
- "@sidesuit/pkg-vite-plugins": "^0.0.17",
20
+ "@sidesuit/pkg-vite-plugins": "^1.2.0",
21
21
  "@types/lodash-es": "^4.17.12",
22
- "@types/node": "^20.11.5",
23
- "@types/react": "^18.2.48",
22
+ "@types/node": "^20.11.24",
23
+ "@types/react": "^18.2.61",
24
24
  "@vitejs/plugin-react": "4.2.1",
25
25
  "glob": "10.3.10",
26
26
  "javascript-obfuscator-unstring-array": "^4.1.1",
27
27
  "lodash-es": "^4.17.21",
28
28
  "npm-check": "^6.0.1",
29
- "prettier": "^3.2.4",
29
+ "prettier": "^3.2.5",
30
30
  "react": "^18.2.0",
31
- "terser": "^5.27.0",
31
+ "terser": "^5.28.1",
32
32
  "tsc-alias": "^1.8.8",
33
33
  "typescript": "^5.3.3",
34
- "vite": "^4.4.4",
35
- "vite-plugin-static-copy": "^0.16.0"
34
+ "vite": "^5.1.4",
35
+ "vite-plugin-static-copy": "^1.0.1"
36
36
  }
37
37
  }