From d91ee3619280355d75f4d33b54f568438167e407 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Mon, 17 Oct 2022 03:57:25 +0530 Subject: [PATCH] feat: chrome extension --- .gitignore | 2 + package.json | 3 +- .../assets/images/logo-128x128.png | Bin 0 -> 14043 bytes .../assets/images/logo-16x16.png | Bin 0 -> 953 bytes .../assets/images/logo-19x19.png | Bin 0 -> 1283 bytes .../assets/images/logo-38x38.png | Bin 0 -> 3003 bytes .../assets/images/logo-48x48.png | Bin 0 -> 3955 bytes .../bruno-chrome-extension/js/background.js | 54 ++++++++++++++++++ packages/bruno-chrome-extension/manifest.json | 26 +++++++++ scripts/chrome-extension-files/manifest.json | 5 -- scripts/create-chrome-extension.sh | 9 +-- 11 files changed, 89 insertions(+), 10 deletions(-) create mode 100644 packages/bruno-chrome-extension/assets/images/logo-128x128.png create mode 100644 packages/bruno-chrome-extension/assets/images/logo-16x16.png create mode 100644 packages/bruno-chrome-extension/assets/images/logo-19x19.png create mode 100644 packages/bruno-chrome-extension/assets/images/logo-38x38.png create mode 100644 packages/bruno-chrome-extension/assets/images/logo-48x48.png create mode 100644 packages/bruno-chrome-extension/js/background.js create mode 100644 packages/bruno-chrome-extension/manifest.json delete mode 100644 scripts/chrome-extension-files/manifest.json diff --git a/.gitignore b/.gitignore index 3189aacdd..b004f7407 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ coverage # production build chrome-extension +chrome-extension.pem +chrome-extension.crx bruno.zip # misc diff --git a/package.json b/package.json index e2303653c..ebf204c72 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ }, "scripts": { "dev:web": "npm run dev --workspace=packages/bruno-app", + "build:web": "npm run build --workspace=packages/bruno-app", "dev:electron": "npm run dev --workspace=packages/bruno-electron", - "build-chrome-extension": "./scripts/create-chrome-extension.sh" + "build:chrome-extension": "./scripts/create-chrome-extension.sh" } } diff --git a/packages/bruno-chrome-extension/assets/images/logo-128x128.png b/packages/bruno-chrome-extension/assets/images/logo-128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..d8b58a315154e20df4234476ab0b6acf490541cf GIT binary patch literal 14043 zcmb`ubx>Tv^DnvtcPF?m?(P=c7GEqli!Bn|5+JzC;vU@Hf`&YJ6%LU5*ZV&!|55UP zrs3b{*KYuPG(a#Q7!d&<@CF|N5g*}o06_ikC*Qn5{Kp6UPeI2(MMFZtL`41%pB)c? zfb<6OpUfKsU@@fAQrurvk0ttpSCyni1+|$K;JOA!%((cS*}C*|0SZX+N(!Lu+&y!a#-LMNSxTs=C7ir#Cvf+#I$>2_ zHwP%*oe_3_r;M1EI~AyZfUR%xhDgbUvaz?FaV*tfadA}YNw-MB=s*A}Fy$NKBkU7G zoeVG-0hkX!glXOY0+_XESPv5~La*qCL36D!c8XW0gFsPSCP}VlIa>05KR4|#aa%b3 z3HF$gW<=pajsig|=5xqJmU3`0LzJ5G_pat$ZdIY!<$725!SoTZHD%^$4X;;uAHJAVBE@x}dTA zol6x$`%elxxXey z5Ktn#gUlz;*7Bsb)d+g*C(NsmYAxr4OvpUfyPt`rh6U~wh1XXV{AIFy`SdU**vsKU zBIDwcD?soe0M@FukVLbD&PcSBI1C&pe}d+a9b|Mr2>d+lq*?rwCe8cahk!RN2mEqE zJAY_r=!&7N^vfB#B=+Ei^R--S)wzi!N(r1!#p$$Vr1i4uGtm<-F*BS3r^un9XfVj{ z7}_P^GEBIYbIGlV5wSfl9(|T&a7Xol-40H|u|QY+cN9%5jFy>ZC9@w8PL&=4cq5sU zdQPJ6IF8Uyr>^>T@y`zO3Hy~F4CYxt!@s+$dFKpbCjIN>^8u~Z44-Ln=H}i^9Yx*J znD2t13oCe~O9U(O390p8VJe`HD^wkml=aFb#h_jAyBeC~MSC^2FN@63pj@xZq9 zD?qWHvLZj02U+DuPEHwo!=A1{vb}D;f}&+3OvyV0rmW34rYV7!v6E_)FYGprIYMik zGV#aF|Lu`HPve88MVI_qO|VKEPKR^pAlSPbD)Y51J}H>gL6nsJ>WxlVZnX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&4Yy#h>BT{s39#Eiy{i>ZsXNcccECMG?MDPH zU8xKS96ovRDNs`T-*d)yfkG~n`-54Z(AXXkwFkiRwyi_38r)IuG1!_ceYWiMmt-SOCx_D|D~MF=T^=+!vA{-=ah)946jYqh z=3yf3d`6}a*TzL5M2r-qRWIo`0iAXfXe|w2Ge}vX%4zX8LuD|6T6is1J@b^^t)+Ck zZu7zn1MJ=ciTHf?n(3>?1@xL)xfVa~Vf0#Kx!uQ9t5T)n&u#`KwqGEhwVXl?Zt3Uh zuDBxEhA|*VHt@27e8vj>bcD-49M!iQ;JyK98p}1THMjrU O#`u5Z##GO1eh5G8JGka znFSgDA7Kz@U|4zE)as6%FM#Z1k@`eEW#lu`u`RK56ECaW1DS5;y0nFvp%!mvMg+3&`lQF-sOCx zPV)F`qs)t6^Y*dCXosFSe|`qUGVv(U&_VLULr8mx7%8&Y3G0!uY<*{CG?cAF_K2{v>Q!+lE*Vt0J z)NkGMy-zQzJWGf^IRAv~y62H~;hRr8=Eh3Bye}QCcYh9_xN5uCKvPJSh(t}y6$Nga(8qz6tx|B{P~a&w6D=)ye>^kua3uFd>-n6CUu|WpQ(`Zie8o_c%XQaTPv!Q-XNUe4 z&e4f=j;UhWt;Kd;OomtJJky2Nm1TA}{kTt^Nl=-uyoYh;u?^t@mv&s=EVbg{d$ac6 z51poGFj)L&(1^8qarW}BeNRuhuY4uRxv!$;+{V`$H?OvBFV;ToF0*EVXzI@`KNp@j zyFNfyZfWtho7L?-HOs4PP5u9y0FBjLDgXcg literal 0 HcmV?d00001 diff --git a/packages/bruno-chrome-extension/assets/images/logo-19x19.png b/packages/bruno-chrome-extension/assets/images/logo-19x19.png new file mode 100644 index 0000000000000000000000000000000000000000..c3d30ca6001ba812bb6928f7e457b60739a9b0d8 GIT binary patch literal 1283 zcmex=Xfrpt9=nQ5-2787z{3+EF?|G+f zO1Y_d^OAIE(27M@Yp#9ScYJf8@jh>Z^z|>FY zDzco`hqdhkYM;DsuujUk6SKytC@*-8)eOtUnoc6uExA^?XB}W>GmI@M7s_bcq8+eX z{vBtdr%dg-x0*YD%)ff^>N0-0vwJ$$$0Tb;S!9?=bA8opQsfQIcQU$}Tex10|EHAg zM8Bwo)!S>1-99quKSOc!%cDo!zuugBTVv+7(tXF)mCfObEGZKS`S~n5BZjA@XV!M_ zO&7AJWb=+SJ&twETV)ZOwEEVhRU5Cp;XK{)l|R6SjV<$zwng0&nX6~6 zix@7L&R%=S$>WrPdykLruQZDu5V;`URL9^5Y~EQuERBxtsmaldoO-c;5s?9EjNH60z{~tfCdpg331*0A5xu^{x3*tMxA~x= zu}#VH+6|jmuOfAh?N@##|4DV~@u$0_Vm1d}T772Y!P8!Ppfu1w!4SF&H_%u2~km!2k>+U;TLlsx-ko^@7D;eUp(we@E_ z*I36(yG@#LNHk!khL)0gYxh2vJ&p_eo}4}xuWW3s>Z!AOTGPzap6lP5tef;W!YHVs zKQSd~{ic7)&+E-T%GHz#W!U7J-@BB?&XZwr`gmjTH4Wpmou`@QXa3;R^RCf+R%iNA zF8%ntE%CR19lx-!iR(qRY(-KtORG%D1U4I`!#B_JDb6;w?&Gs~ylBQIoo(!b*X`4E X9(CySJ(-uO^5Vsd^~c@g|K9`vdj#{F literal 0 HcmV?d00001 diff --git a/packages/bruno-chrome-extension/assets/images/logo-38x38.png b/packages/bruno-chrome-extension/assets/images/logo-38x38.png new file mode 100644 index 0000000000000000000000000000000000000000..79c08bcfc3a76cfd079bdcfacde1699ec7d07346 GIT binary patch literal 3003 zcmbu6c{J2}AIE=&8Dr^TY?-)3$X51AD%_AIOH5=a+1;!mYbM#QJ^MB;LUzM2_Cl%1 zJ{a2!iY&wBW}ECY&)nxc=RD^;|K9iKkI(s@*XRBIe9!sNXXxJmZlgPfcK{|P0AOMi zKqmt_jMqQY-y#1jf#IgV2VhV@3Xo!Ef&m~H6Elp7{s|BS0Or3x`#(Y1*a21sxx@{C z7>Ee~G1`AH7{biL3W72LY*)vb0ol#rl)m(Q`jjtK<;e(fhl;0S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?3Uy&PO=sK=(hDYVGY1C|rxJ#zB>O`{Qh?T&rV_>DrSA^Mry-50jj7 zI&fng`u_gx8$*HTm1!`&q)DuO01I~pd(TF8Mbs#~3roovRlB+-1nJtNDA=MRf{1s+ z_es?;O<4~s_(GnHrOvHx%3CV8rQNMJE7S=#pz6r}B*n#S5R>$s^4mCq{kxqW=Y09D zl>QL!iBC#|r&}KVNfNqGys(Gxj9y@?cEP$l5c0f22kdem1@>fFZylhK-wWLq=|D0~ zrj%M$^2zN8Fr3_zzVz@OjLcgR37w zK#!{;m!HCP+3lAdQH3E_r|MniQi@6dcE3d{L=i}c zahUq+L1N6EUhRN;C<}1 oo<-NTtm<8VT=Oy8os1L1gr^&x|HUsjWSkCgaa~(nT%*ta8`4yBtN;K2 literal 0 HcmV?d00001 diff --git a/packages/bruno-chrome-extension/assets/images/logo-48x48.png b/packages/bruno-chrome-extension/assets/images/logo-48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..f2d312f92bd79afdbf8f15f598b33b36307fb865 GIT binary patch literal 3955 zcmbtXX*ksH*Z(qP4P(oU5MyZ=Wou-K7<*+44azds$&%$~FxDg?`>re%l68!cC2Q80 z?2>&OnQZwXWXt3Kym+qbdHw&K`+jlm&$&P6oEP_X-RErLYysdf(9zccXlMX{=G=g@ zX#jQZ{df3}$bYABe*3Hq05bwIfDDKR4A6pUKwz4)PC($iP7wWhq5lUa-~#jc5d$OL zIW55f(9oYZLrV(+&eu8UXhHNB7-$#)CQdFew=j<^?WfC^U!K#49~EC3-gN0oMfMAdZ?WAvtWTP|?2{-LFM8YJjgG)h z7xp`Aj7zj7YmsfwLtPa#HOezYUi-R@3VvCak{3WNQT6>y$sc4ubs>U-U@2-d+p`cQ z%5IOH66IvOa^f%({ksKvBQ`fDy1bo?-ryAO_^hGJe_dAU$}#4d0OYdD^H*3$<-(da z3fpL+^3qt^TgI)Rc}o68Xzc9PkTqe_yxLm(S6$KKU(vXln`->oOW&1prZzumjmO<& zTenImFcG=-FTKI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pX6BQ%LxFtJ-Wx>&0k!p&GMV1Ap-yOBGddY(2Jy>FDMdq?wn9%%JBybm(_qQ4o{! zaUPP@dBA9fh#|+>c{`BYSqES4uQ))S*CmrNQp?2JszCmi^yN`p{1}!L$L+mBt$nkI zT1`Ip^T%*Sq#mRKR$=;h6gKG2E_E2hB$0$<kx0aTZDCQXMhtq#meV@|Ll8Cb3q> z9tG#93O;LhX8BHl=VP1`w z$%o2qx_vMcZdcXZf(=W_a?*ca6eLI#O{o8q)`X|t)4*n8s3*B~`}-0wU)amGiN@4S zmGr`Nk%o-Up{R%@BGSE)#kb=|Z>7Q$Q410D&-0I@a%aV#i*$DhBglnlXjwXC4eR~^l9Vvnv1f=c87zB0}!KpXXigW%d4fy6$ zl?K9csOkg0C)A#J<_{B4K}_LGMu^Saf;LWlVl zWo_eeAQ5!@rgcCWu3m5;Lp=lTRoprQLXE>U=x7-iB9!RD-mwou8!VI4hqDFroSeig z(IFA#j8~rRGpfc1Y_qG_wYZk@Ywva|W-oE~!rRM7Zal2cv@N(TfVpY>RL-mZ(@*eX zvZS5~ajC_(ACbwx=xjzcCS&ygW7_aHq30v%8PKK{Rl1{EIij}(BmT&pXe3e+EVELK T0Cv(J=uEy;nZo(xbT;`v4kH(n literal 0 HcmV?d00001 diff --git a/packages/bruno-chrome-extension/js/background.js b/packages/bruno-chrome-extension/js/background.js new file mode 100644 index 000000000..d1c393ef7 --- /dev/null +++ b/packages/bruno-chrome-extension/js/background.js @@ -0,0 +1,54 @@ +(function () { + let currentTab = { + id: null, + url: null, + }; + + const getExtensionId = () => { + const matches = chrome.runtime.getURL('x').match(/.*\/\/(.*)\/x$/); + if (matches) { + return matches[1]; + } + + return chrome.runtime.id; + }; + + // Create a new tab for the extension + function createNewTab() { + chrome.tabs.create({ url: 'index.html' }, function (tab) { + currentTab = { + id: tab.id, + url: tab.url + }; + }); + } + + // Focus on the open extension tab + function focusTab(tabId) { + var updateProperties = { "active": true }; + chrome.tabs.update(tabId, updateProperties, function (tab) { }); + } + + // Open the extension tab when the extension icon is clicked + chrome.browserAction.onClicked.addListener(function (tab) { + if (!currentTab || !currentTab.id) { + createNewTab(); + } else { + chrome.tabs.get(currentTab.id, function (tab) { + console.log(chrome.runtime.id, tab.url); + if (tab && tab.url && tab.url.includes(getExtensionId())) { + focusTab(currentTab.id); + } else { + createNewTab(); + } + }); + } + }); + + // When a tab is closed, check if it is the extension tab that was closed, and unset currentTabId + chrome.tabs.onRemoved.addListener(function (tabId) { + if (tabId === currentTab.id) { + currentTab = {}; + } + }); +})(); \ No newline at end of file diff --git a/packages/bruno-chrome-extension/manifest.json b/packages/bruno-chrome-extension/manifest.json new file mode 100644 index 000000000..5edb27871 --- /dev/null +++ b/packages/bruno-chrome-extension/manifest.json @@ -0,0 +1,26 @@ +{ + "manifest_version": 2, + "version": "0.1.0", + "name": "Bruno API Client", + "short_name": "Bruno", + "description": "Opensource API Client", + "icons": { + "16": "assets/images/logo-16x16.png", + "48": "assets/images/logo-48x48.png", + "128": "assets/images/logo-128x128.png" + }, + "background": { + "scripts": [ + "js/background.js" + ] + }, + "browser_action": { + "default_icon": "assets/images/logo-128x128.png" + }, + "permissions": [ + "http://*/", + "https://*/", + "tabs", + "storage" + ] +} \ No newline at end of file diff --git a/scripts/chrome-extension-files/manifest.json b/scripts/chrome-extension-files/manifest.json deleted file mode 100644 index 879937d31..000000000 --- a/scripts/chrome-extension-files/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "manifest_version": 2, - "name": "Bruno API Client", - "short_name": "Bruno" -} \ No newline at end of file diff --git a/scripts/create-chrome-extension.sh b/scripts/create-chrome-extension.sh index d5f561e37..c0636713b 100755 --- a/scripts/create-chrome-extension.sh +++ b/scripts/create-chrome-extension.sh @@ -13,10 +13,11 @@ mkdir chrome-extension cp -r packages/bruno-app/out/* chrome-extension # Copy the chrome extension files -cp -r scripts/chrome-extension-files/* chrome-extension +cp -r packages/bruno-chrome-extension/* chrome-extension + +# Filenames starting with "_" are reserved for use by the system +mv chrome-extension/_next chrome-extension/next +sed -i 's@/_next/@/next/@g' chrome-extension/**.html # Remove sourcemaps find chrome-extension -name '*.map' -type f -delete - -# Compress the chrome-extension directory into a zip file -zip -r bruno.zip chrome-extension \ No newline at end of file