@dcl/blog-site 0.0.1-22113628803.commit-fff42a1
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/_redirects +3 -0
- package/assets/RoobertPRO-Bold-BLoSpx-h.otf +0 -0
- package/assets/RoobertPRO-Bold-zQ2qeH97.ttf +0 -0
- package/assets/add-HfZHK2fj.js +15 -0
- package/assets/all-wallets-m3Q_BdSv.js +6 -0
- package/assets/app-store-BNgLH0-z.js +17 -0
- package/assets/apple-ANuLUO8Y.js +18 -0
- package/assets/arrow-bottom-D6pToNHo.js +8 -0
- package/assets/arrow-bottom-circle-DUT2Dv51.js +11 -0
- package/assets/arrow-left-q4q9YVi3.js +8 -0
- package/assets/arrow-right-DASg5l5w.js +8 -0
- package/assets/arrow-top-DZCCNDTr.js +8 -0
- package/assets/bank-Dvo9jDr9.js +14 -0
- package/assets/basic-LHHyA19k.js +2128 -0
- package/assets/browser-31kcbL_C.js +14 -0
- package/assets/card-CFCq6F15.js +14 -0
- package/assets/ccip-Cohpddd_.js +1 -0
- package/assets/checkmark-QPkj1qQG.js +11 -0
- package/assets/checkmark-bold-zXuu-wcp.js +8 -0
- package/assets/chevron-bottom-Dqs_68n2.js +8 -0
- package/assets/chevron-left-CBd4ygRo.js +8 -0
- package/assets/chevron-right-nbeOSP6c.js +8 -0
- package/assets/chevron-top-DbymvkEQ.js +8 -0
- package/assets/chrome-store-DoEtpWNe.js +61 -0
- package/assets/clock-CS5E2MUj.js +8 -0
- package/assets/close-CX1C8CYJ.js +8 -0
- package/assets/coinPlaceholder-D2gtd8eC.js +8 -0
- package/assets/compass-slrJBlCv.js +8 -0
- package/assets/copy-CMih7tcA.js +15 -0
- package/assets/core-CjVm5NjM.js +908 -0
- package/assets/create-submenu-DEFVbrc5.png +0 -0
- package/assets/cursor-BRn1A03S.js +3 -0
- package/assets/cursor-transparent-MKJ02Hge.js +12 -0
- package/assets/desktop-DGd514Gx.js +9 -0
- package/assets/disconnect-BUq2N6Cm.js +8 -0
- package/assets/discord-BFKcUyQS.js +17 -0
- package/assets/etherscan-D33AWxxB.js +6 -0
- package/assets/exclamation-triangle-soJJPRXR.js +4 -0
- package/assets/explore-submenu-KVl6Dc-h.png +0 -0
- package/assets/extension-LP3zcSLt.js +8 -0
- package/assets/external-link-C0XMvtQk.js +8 -0
- package/assets/facebook-DGXac7rm.js +26 -0
- package/assets/farcaster-JzU9abAY.js +12 -0
- package/assets/filters-DuwyZN4x.js +8 -0
- package/assets/github-b1bWD_fH.js +18 -0
- package/assets/google-CmhYfZJv.js +18 -0
- package/assets/governance-submenu-CXxLX9nT.png +0 -0
- package/assets/help-circle-B2ObdIQa.js +12 -0
- package/assets/hooks.module-Dz_XB4AG.js +1 -0
- package/assets/id-JDEA4AYM.js +12 -0
- package/assets/image-tTtGLNDS.js +4 -0
- package/assets/index-BgDDpj9r.js +12 -0
- package/assets/index-Bpdy2MPa.js +5 -0
- package/assets/index-CgC_Ab1L.js +11 -0
- package/assets/index-D7Ixl_EB.js +395 -0
- package/assets/index-DZsTT0L6.js +895 -0
- package/assets/index-DfzECMTB.js +1 -0
- package/assets/index-iRCpTifY.js +1 -0
- package/assets/index-nibyPLVP.js +1 -0
- package/assets/index.es-WW4Bfhht.js +39 -0
- package/assets/info-R7mdJKyL.js +3 -0
- package/assets/info-circle-DHfjraJm.js +12 -0
- package/assets/learn-submenu-Xs1jOwfy.png +0 -0
- package/assets/lightbulb-Oueymsiy.js +3 -0
- package/assets/localBatchGatewayRequest-Cmlbv8SL.js +1 -0
- package/assets/mail-BKSx4Yuw.js +8 -0
- package/assets/man-default1-BEO13leF.png +0 -0
- package/assets/marketplace-submenu-CjxTqNhj.png +0 -0
- package/assets/mobile-QDZBxudi.js +9 -0
- package/assets/more-DAFugzVV.js +11 -0
- package/assets/network-placeholder-C_nY6s4Z.js +14 -0
- package/assets/nftPlaceholder--Be0HhIC.js +8 -0
- package/assets/off-D8lqix4E.js +8 -0
- package/assets/play-store-ZRhJ-ceS.js +32 -0
- package/assets/plus-BR9PIF2L.js +13 -0
- package/assets/qr-code-JGo7Egtx.js +6 -0
- package/assets/recycle-horizontal-DuUhAfmw.js +9 -0
- package/assets/refresh-BHEZJGlM.js +8 -0
- package/assets/reown-logo-KxRbVhfb.js +12 -0
- package/assets/search-hsNg53W1.js +8 -0
- package/assets/secp256k1-80N7tfNU.js +1 -0
- package/assets/secp256k1-BpOIzfuH.js +1 -0
- package/assets/send-iw4KzruG.js +15 -0
- package/assets/swapHorizontal-DW93SfcR.js +8 -0
- package/assets/swapHorizontalBold-B0-sTZrM.js +8 -0
- package/assets/swapHorizontalMedium-CojKMX5T.js +16 -0
- package/assets/swapHorizontalRoundedBold-BbH3JOq1.js +8 -0
- package/assets/swapVertical-By4Z0hO6.js +8 -0
- package/assets/telegram-BBJaS687.js +16 -0
- package/assets/three-dots-BnXK_CiH.js +5 -0
- package/assets/twitch-C-30YYiM.js +18 -0
- package/assets/twitterIcon-CQ5KzDGf.js +6 -0
- package/assets/verify-BpAxV_YQ.js +8 -0
- package/assets/verify-filled-Ct_OhT3a.js +8 -0
- package/assets/w3m-modal-KCWBSIxk.js +642 -0
- package/assets/wallet-BV62huv5.js +8 -0
- package/assets/wallet-placeholder-CNcppdv7.js +14 -0
- package/assets/walletconnect-C_tjBcnl.js +30 -0
- package/assets/warning-circle-64ldyNwf.js +12 -0
- package/assets/x-CtLwePcZ.js +12 -0
- package/favicon.ico +0 -0
- package/index.html +38 -0
- package/manifest.json +8 -0
- package/package.json +21 -0
- package/service-worker.js +166 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{w as o}from"./core-CjVm5NjM.js";import"./index-DZsTT0L6.js";import"./index.es-WW4Bfhht.js";import"./index-nibyPLVP.js";const r=o`<svg fill="none" viewBox="0 0 20 20">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
fill-rule="evenodd"
|
|
5
|
+
d="M0 5.5c0-1.8 1.46-3.25 3.25-3.25H14.5c1.8 0 3.25 1.46 3.25 3.25v.28A3.25 3.25 0 0 1 20 8.88v2.24c0 1.45-.94 2.68-2.25 3.1v.28c0 1.8-1.46 3.25-3.25 3.25H3.25A3.25 3.25 0 0 1 0 14.5v-9Zm15.75 8.88h-2.38a4.38 4.38 0 0 1 0-8.76h2.38V5.5c0-.69-.56-1.25-1.25-1.25H3.25C2.56 4.25 2 4.81 2 5.5v9c0 .69.56 1.25 1.25 1.25H14.5c.69 0 1.25-.56 1.25-1.25v-.13Zm-2.38-6.76a2.37 2.37 0 1 0 0 4.75h3.38c.69 0 1.25-.55 1.25-1.24V8.87c0-.69-.56-1.24-1.25-1.24h-3.38Z"
|
|
6
|
+
clip-rule="evenodd"
|
|
7
|
+
/>
|
|
8
|
+
</svg>`;export{r as walletSvg};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{w as a}from"./core-CjVm5NjM.js";import"./index-DZsTT0L6.js";import"./index.es-WW4Bfhht.js";import"./index-nibyPLVP.js";const r=a`
|
|
2
|
+
<svg fill="none" viewBox="0 0 48 44">
|
|
3
|
+
<path
|
|
4
|
+
style="fill: var(--wui-color-bg-300);"
|
|
5
|
+
d="M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.05 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z"
|
|
6
|
+
/>
|
|
7
|
+
<path
|
|
8
|
+
style="fill: var(--wui-color-fg-200);"
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
d="M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z"
|
|
11
|
+
clip-rule="evenodd"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
`;export{r as walletPlaceholderSvg};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{w as l}from"./core-CjVm5NjM.js";import"./index-DZsTT0L6.js";import"./index.es-WW4Bfhht.js";import"./index-nibyPLVP.js";const i=l`<svg fill="none" viewBox="0 0 96 67">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z"
|
|
5
|
+
/>
|
|
6
|
+
<path
|
|
7
|
+
stroke="#000"
|
|
8
|
+
stroke-opacity=".1"
|
|
9
|
+
d="M25.67 19.15a32.06 32.06 0 0 1 44.66 0l1.5 1.48c.43.42.43 1.09 0 1.5l-5.15 5.05a.31.31 0 0 1-.44 0l-2.07-2.03a23.21 23.21 0 0 0-32.34 0l-2.22 2.18a.31.31 0 0 1-.44 0l-5.15-5.05a1.05 1.05 0 0 1 0-1.5l1.65-1.63ZM81 29.6l4.6 4.5c.42.41.42 1.09 0 1.5l-20.7 20.26c-.43.43-1.14.43-1.57 0L48.63 41.47a.9.9 0 0 0-1.26 0L32.68 55.85c-.43.43-1.14.43-1.57 0L10.42 35.6a1.05 1.05 0 0 1 0-1.5l4.59-4.5a1.13 1.13 0 0 1 1.57 0l14.68 14.38a.9.9 0 0 0 1.27 0l-.35-.35.35.35L47.22 29.6a1.13 1.13 0 0 1 1.56 0l14.7 14.38a.9.9 0 0 0 1.26 0L79.42 29.6a1.13 1.13 0 0 1 1.57 0Z"
|
|
10
|
+
/>
|
|
11
|
+
</svg>`,c=l`
|
|
12
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
|
+
<g clip-path="url(#clip0_22274_4692)">
|
|
14
|
+
<path d="M0 6.64C0 4.17295 0 2.93942 0.525474 2.01817C0.880399 1.39592 1.39592 0.880399 2.01817 0.525474C2.93942 0 4.17295 0 6.64 0H9.36C11.8271 0 13.0606 0 13.9818 0.525474C14.6041 0.880399 15.1196 1.39592 15.4745 2.01817C16 2.93942 16 4.17295 16 6.64V9.36C16 11.8271 16 13.0606 15.4745 13.9818C15.1196 14.6041 14.6041 15.1196 13.9818 15.4745C13.0606 16 11.8271 16 9.36 16H6.64C4.17295 16 2.93942 16 2.01817 15.4745C1.39592 15.1196 0.880399 14.6041 0.525474 13.9818C0 13.0606 0 11.8271 0 9.36V6.64Z" fill="#C7B994"/>
|
|
15
|
+
<path d="M4.49038 5.76609C6.42869 3.86833 9.5713 3.86833 11.5096 5.76609L11.7429 5.99449C11.8398 6.08938 11.8398 6.24323 11.7429 6.33811L10.9449 7.11942C10.8964 7.16686 10.8179 7.16686 10.7694 7.11942L10.4484 6.80512C9.09617 5.48119 6.90381 5.48119 5.5516 6.80512L5.20782 7.14171C5.15936 7.18915 5.08079 7.18915 5.03234 7.14171L4.23434 6.3604C4.13742 6.26552 4.13742 6.11167 4.23434 6.01678L4.49038 5.76609ZM13.1599 7.38192L13.8702 8.07729C13.9671 8.17217 13.9671 8.32602 13.8702 8.4209L10.6677 11.5564C10.5708 11.6513 10.4137 11.6513 10.3168 11.5564L8.04388 9.33105C8.01965 9.30733 7.98037 9.30733 7.95614 9.33105L5.6833 11.5564C5.58638 11.6513 5.42925 11.6513 5.33234 11.5564L2.12982 8.42087C2.0329 8.32598 2.0329 8.17213 2.12982 8.07724L2.84004 7.38188C2.93695 7.28699 3.09408 7.28699 3.191 7.38188L5.46392 9.60726C5.48815 9.63098 5.52743 9.63098 5.55166 9.60726L7.82447 7.38188C7.92138 7.28699 8.07851 7.28699 8.17543 7.38187L10.4484 9.60726C10.4726 9.63098 10.5119 9.63098 10.5361 9.60726L12.809 7.38192C12.9059 7.28703 13.063 7.28703 13.1599 7.38192Z" fill="#202020"/>
|
|
16
|
+
</g>
|
|
17
|
+
<defs>
|
|
18
|
+
<clipPath id="clip0_22274_4692">
|
|
19
|
+
<path d="M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z" fill="white"/>
|
|
20
|
+
</clipPath>
|
|
21
|
+
</defs>
|
|
22
|
+
</svg>
|
|
23
|
+
`,o=l`
|
|
24
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
25
|
+
<circle cx="11" cy="11" r="11" transform="matrix(-1 0 0 1 23 1)" fill="#202020"/>
|
|
26
|
+
<circle cx="11" cy="11" r="11.5" transform="matrix(-1 0 0 1 23 1)" stroke="#C7B994" stroke-opacity="0.7"/>
|
|
27
|
+
<path d="M15.4523 11.0686L16.7472 9.78167C13.8205 6.87297 10.1838 6.87297 7.25708 9.78167L8.55201 11.0686C10.7779 8.85645 13.2279 8.85645 15.4538 11.0686H15.4523Z" fill="#C7B994"/>
|
|
28
|
+
<path d="M15.0199 14.067L12 11.0656L8.98 14.067L5.96004 11.0656L4.66663 12.3511L8.98 16.6393L12 13.638L15.0199 16.6393L19.3333 12.3511L18.0399 11.0656L15.0199 14.067Z" fill="#C7B994"/>
|
|
29
|
+
</svg>
|
|
30
|
+
`;export{o as walletConnectBrownSvg,c as walletConnectLightBrownSvg,i as walletConnectSvg};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{w as r}from"./core-CjVm5NjM.js";import"./index-DZsTT0L6.js";import"./index.es-WW4Bfhht.js";import"./index-nibyPLVP.js";const t=r`<svg fill="none" viewBox="0 0 20 20">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M11 6.67a1 1 0 1 0-2 0v2.66a1 1 0 0 0 2 0V6.67ZM10 14.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"
|
|
5
|
+
/>
|
|
6
|
+
<path
|
|
7
|
+
fill="currentColor"
|
|
8
|
+
fill-rule="evenodd"
|
|
9
|
+
d="M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm-7 9a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z"
|
|
10
|
+
clip-rule="evenodd"
|
|
11
|
+
/>
|
|
12
|
+
</svg>`;export{t as warningCircleSvg};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{w as l}from"./core-CjVm5NjM.js";import"./index-DZsTT0L6.js";import"./index.es-WW4Bfhht.js";import"./index-nibyPLVP.js";const t=l`<svg fill="none" viewBox="0 0 41 40">
|
|
2
|
+
<g clip-path="url(#a)">
|
|
3
|
+
<path fill="#000" d="M.8 0h40v40H.8z" />
|
|
4
|
+
<path
|
|
5
|
+
fill="#fff"
|
|
6
|
+
d="m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z"
|
|
7
|
+
/>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="a"><path fill="#fff" d="M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" /></clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>`;export{t as xSvg};
|
package/favicon.ico
ADDED
|
File without changes
|
package/index.html
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/blog-site/0.0.1-22113628803.commit-fff42a1/favicon.ico" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
+
<link href="https://fonts.googleapis.com/css?family=Inconsolata&display=swap" rel="stylesheet" />
|
|
9
|
+
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" />
|
|
10
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/blog-site/0.0.1-22113628803.commit-fff42a1/manifest.json" />
|
|
11
|
+
<meta name="theme-color" content="#000000" />
|
|
12
|
+
|
|
13
|
+
<!-- Default SEO tags - will be overridden by react-helmet -->
|
|
14
|
+
<title>Decentraland Blog</title>
|
|
15
|
+
<meta name="description" content="Stay up to date with Decentraland announcements, updates, community highlights, and more." />
|
|
16
|
+
<link rel="canonical" href="https://decentraland.org/blog/" />
|
|
17
|
+
|
|
18
|
+
<!-- Open Graph -->
|
|
19
|
+
<meta property="og:site_name" content="Decentraland" />
|
|
20
|
+
<meta property="og:title" content="Decentraland Blog" />
|
|
21
|
+
<meta property="og:description" content="Stay up to date with Decentraland announcements, updates, community highlights, and more." />
|
|
22
|
+
<meta property="og:image" content="https://cms-images.decentraland.org/ea2ybdmmn1kv/7tYISdowuJYIbSIDqij87H/f3524d454d8e29702792a6b674f5550d/GI_Landscape.Small.png" />
|
|
23
|
+
<meta property="og:type" content="website" />
|
|
24
|
+
<meta property="og:url" content="https://decentraland.org/blog/" />
|
|
25
|
+
|
|
26
|
+
<!-- Twitter Card -->
|
|
27
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
28
|
+
<meta name="twitter:title" content="Decentraland Blog" />
|
|
29
|
+
<meta name="twitter:description" content="Stay up to date with Decentraland announcements, updates, community highlights, and more." />
|
|
30
|
+
<meta name="twitter:image" content="https://cms-images.decentraland.org/ea2ybdmmn1kv/7tYISdowuJYIbSIDqij87H/f3524d454d8e29702792a6b674f5550d/GI_Landscape.Small.png" />
|
|
31
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/blog-site/0.0.1-22113628803.commit-fff42a1/assets/index-DZsTT0L6.js"></script>
|
|
32
|
+
</head>
|
|
33
|
+
|
|
34
|
+
<body>
|
|
35
|
+
<div id="root"></div>
|
|
36
|
+
</body>
|
|
37
|
+
|
|
38
|
+
</html>
|
package/manifest.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dcl/blog-site",
|
|
3
|
+
"version": "0.0.1-22113628803.commit-fff42a1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/decentraland/blog-site.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"decentraland",
|
|
15
|
+
"dapps"
|
|
16
|
+
],
|
|
17
|
+
"author": "Decentraland",
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"homepage": "https://cdn.decentraland.org/@dcl/blog-site/0.0.1-22113628803.commit-fff42a1",
|
|
20
|
+
"commit": "fff42a1fcf7c717d5785bff895b4925cb30e2576"
|
|
21
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* eslint-env serviceworker */
|
|
2
|
+
// Decentraland Blog - Service Worker for API Caching
|
|
3
|
+
// Cache version - increment to invalidate all caches
|
|
4
|
+
const CACHE_VERSION = 'dcl-blog-v1'
|
|
5
|
+
const API_CACHE = `${CACHE_VERSION}-api`
|
|
6
|
+
const ASSET_CACHE = `${CACHE_VERSION}-assets`
|
|
7
|
+
|
|
8
|
+
// Cache duration in milliseconds
|
|
9
|
+
const API_CACHE_DURATION = 5 * 60 * 1000 // 5 minutes
|
|
10
|
+
const ASSET_CACHE_DURATION = 24 * 60 * 60 * 1000 // 24 hours
|
|
11
|
+
|
|
12
|
+
// Patterns to match for caching
|
|
13
|
+
const API_PATTERNS = [/\/api\/cms\//, /cms\.decentraland\.org/, /contentful/]
|
|
14
|
+
|
|
15
|
+
const ASSET_PATTERNS = [/\.(?:png|jpg|jpeg|svg|gif|webp|avif)$/, /\/assets\//, /images\.ctfassets\.net/]
|
|
16
|
+
|
|
17
|
+
// Install event - cleanup old caches
|
|
18
|
+
self.addEventListener('install', () => {
|
|
19
|
+
console.log('[SW] Installing service worker...')
|
|
20
|
+
self.skipWaiting()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
// Activate event - cleanup old caches
|
|
24
|
+
self.addEventListener('activate', (event) => {
|
|
25
|
+
console.log('[SW] Activating service worker...')
|
|
26
|
+
event.waitUntil(
|
|
27
|
+
caches.keys().then((cacheNames) => {
|
|
28
|
+
return Promise.all(
|
|
29
|
+
cacheNames
|
|
30
|
+
.filter((cacheName) => {
|
|
31
|
+
// Delete old cache versions
|
|
32
|
+
return cacheName.startsWith('dcl-blog-') && !cacheName.startsWith(CACHE_VERSION)
|
|
33
|
+
})
|
|
34
|
+
.map((cacheName) => {
|
|
35
|
+
console.log('[SW] Deleting old cache:', cacheName)
|
|
36
|
+
return caches.delete(cacheName)
|
|
37
|
+
})
|
|
38
|
+
)
|
|
39
|
+
})
|
|
40
|
+
)
|
|
41
|
+
return self.clients.claim()
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
// Helper: Check if URL matches any pattern
|
|
45
|
+
function matchesPattern(url, patterns) {
|
|
46
|
+
return patterns.some((pattern) => pattern.test(url))
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Helper: Check if cached response is still fresh
|
|
50
|
+
function isFresh(response, maxAge) {
|
|
51
|
+
if (!response) return false
|
|
52
|
+
|
|
53
|
+
const cachedTime = response.headers.get('sw-cache-time')
|
|
54
|
+
if (!cachedTime) return false
|
|
55
|
+
|
|
56
|
+
const age = Date.now() - parseInt(cachedTime, 10)
|
|
57
|
+
return age < maxAge
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Helper: Add timestamp to response headers
|
|
61
|
+
async function addCacheTimestamp(response) {
|
|
62
|
+
const headers = new Headers(response.headers)
|
|
63
|
+
headers.set('sw-cache-time', Date.now().toString())
|
|
64
|
+
|
|
65
|
+
return new Response(response.body, {
|
|
66
|
+
status: response.status,
|
|
67
|
+
statusText: response.statusText,
|
|
68
|
+
headers
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Strategy: Stale-While-Revalidate for API calls
|
|
73
|
+
async function staleWhileRevalidate(request, cacheName, maxAge) {
|
|
74
|
+
const cache = await caches.open(cacheName)
|
|
75
|
+
const cachedResponse = await cache.match(request)
|
|
76
|
+
|
|
77
|
+
// Fetch from network
|
|
78
|
+
const fetchPromise = fetch(request)
|
|
79
|
+
.then(async (response) => {
|
|
80
|
+
// Only cache successful responses
|
|
81
|
+
if (response && response.status === 200) {
|
|
82
|
+
const responseToCache = await addCacheTimestamp(response.clone())
|
|
83
|
+
cache.put(request, responseToCache)
|
|
84
|
+
}
|
|
85
|
+
return response
|
|
86
|
+
})
|
|
87
|
+
.catch((error) => {
|
|
88
|
+
console.error('[SW] Fetch failed:', error)
|
|
89
|
+
// Return cached response even if stale on network error
|
|
90
|
+
return cachedResponse
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
// Return cached response if available and fresh, otherwise wait for network
|
|
94
|
+
if (cachedResponse && isFresh(cachedResponse, maxAge)) {
|
|
95
|
+
// Return cache immediately, update in background
|
|
96
|
+
fetchPromise.catch(() => {}) // Prevent unhandled rejection
|
|
97
|
+
return cachedResponse
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Wait for network response
|
|
101
|
+
return fetchPromise
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Strategy: Cache First for assets
|
|
105
|
+
async function cacheFirst(request, cacheName, maxAge) {
|
|
106
|
+
const cache = await caches.open(cacheName)
|
|
107
|
+
const cachedResponse = await cache.match(request)
|
|
108
|
+
|
|
109
|
+
// Return cached if fresh
|
|
110
|
+
if (cachedResponse && isFresh(cachedResponse, maxAge)) {
|
|
111
|
+
return cachedResponse
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Fetch from network and cache
|
|
115
|
+
try {
|
|
116
|
+
const response = await fetch(request)
|
|
117
|
+
if (response && response.status === 200) {
|
|
118
|
+
const responseToCache = await addCacheTimestamp(response.clone())
|
|
119
|
+
cache.put(request, responseToCache)
|
|
120
|
+
}
|
|
121
|
+
return response
|
|
122
|
+
} catch (error) {
|
|
123
|
+
console.error('[SW] Asset fetch failed:', error)
|
|
124
|
+
// Return stale cache if available
|
|
125
|
+
return cachedResponse || new Response('Network error', { status: 503 })
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Fetch event - intercept and cache
|
|
130
|
+
self.addEventListener('fetch', (event) => {
|
|
131
|
+
const { request } = event
|
|
132
|
+
const url = request.url
|
|
133
|
+
|
|
134
|
+
// Only handle GET requests
|
|
135
|
+
if (request.method !== 'GET') return
|
|
136
|
+
|
|
137
|
+
// Handle API requests with stale-while-revalidate
|
|
138
|
+
if (matchesPattern(url, API_PATTERNS)) {
|
|
139
|
+
event.respondWith(staleWhileRevalidate(request, API_CACHE, API_CACHE_DURATION))
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Handle assets with cache-first
|
|
144
|
+
if (matchesPattern(url, ASSET_PATTERNS)) {
|
|
145
|
+
event.respondWith(cacheFirst(request, ASSET_CACHE, ASSET_CACHE_DURATION))
|
|
146
|
+
return
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// For everything else, just fetch from network
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
// Message event - allow cache control from app
|
|
153
|
+
self.addEventListener('message', (event) => {
|
|
154
|
+
if (event.data && event.data.type === 'CLEAR_CACHE') {
|
|
155
|
+
event.waitUntil(
|
|
156
|
+
caches.keys().then((cacheNames) => {
|
|
157
|
+
return Promise.all(
|
|
158
|
+
cacheNames.map((cacheName) => {
|
|
159
|
+
console.log('[SW] Clearing cache:', cacheName)
|
|
160
|
+
return caches.delete(cacheName)
|
|
161
|
+
})
|
|
162
|
+
)
|
|
163
|
+
})
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
})
|