javascriptcontentful
Advanced tools
@@ -1,1 +0,1 @@ | ||
| import{createClient as e}from"contentful";import{format as n,parseISO as t}from"date-fns";const a=e({space:"ix8eqmh7slbd",accessToken:"VGat13fNbeGyZvBDRQA_dLB-kalAxoQ4VPLfiU4zhOI"}),i=async(e=6,n=0)=>{try{let t=(await a.getEntries({content_type:"page",limit:e,skip:n})).items;return t=t.map((e=>{const{id:n,createdAt:t}=e.sys,{title:a,description:i,userName:d,scheduledFor:s}=e.fields;return{id:n,title:a,featuerImage:e.fields.featureImage.fields.file.url,userName:d,description:i,createdAt:t,scheduledFor:s}})),console.log("RETURN"+t),t}catch(e){console.log(e)}},d=e=>`\n \n \n \n <div class="blog">\n \n <div class="blog-text">\n <h2>${e.title}\n </h2>\n <div class="d-flex">\n <div class="category">${e.description}</div>\n <div class="date">${n(t(e.scheduledFor),"PPP")}</div>\n </div>\n <div class="author d-flex">\n <div class="author-image">\n <img src="${e.featuerImage}" alt="" />\n </div>\n <div class="author-name">${e.userName}</div>\n </div>\n </div>\n </div>\n \n \n\n`,s=async()=>`\n <div class="overlay">\n <div class="dialog">\n <div class="dialog__content cont">\n \n <div>\n <div class="blog-layout container" id="blog-layout">\n ${(await i()).map((e=>`${d(e)}`)).join("\n")}\n </div>\n <div class="load-btn"><button class="load" id="load">Load more</button></div>\n </div></div></div></div>`,o=async()=>{const e=document.getElementById("content");e.innerHTML=await s(),await e.after_render()};window.addEventListener("load",o),window.addEventListener("hashchange",o);export{o as router}; | ||
| import{createClient as e}from"contentful";import{format as t,parseISO as n}from"date-fns";class s{constructor(t,n){console.log("NAME IS "+t+" APP NAME IS :: "+n),this.client=e({space:"ix8eqmh7slbd",accessToken:"VGat13fNbeGyZvBDRQA_dLB-kalAxoQ4VPLfiU4zhOI"})}async getMessages(e=6,t=0){try{let n=(await this.client.getEntries({content_type:"page",limit:e,skip:t})).items;return n=n.map((e=>{const{id:t,createdAt:n}=e.sys,{title:s,description:d,userName:i,scheduledFor:a}=e.fields;return{id:t,title:s,featuerImage:e.fields.featureImage.fields.file.url,userName:i,description:d,createdAt:n,scheduledFor:a}})),n}catch(e){console.log(e)}}async render(){let e=`\n <div class="overlay" id="wp">\n <div class="dialog">\n <div class="dialog__content cont">\n ${(await this.getMessages()).map((e=>`${this.renderMessage(e)}`)).join("\n")}\n <div>\n <div class="blog-layout container" id="blog-layout">\n </div>\n <div class="l-btn"><button class="ld" id="hRead" >I have read</button></div>\n </div></div></div></div>`;this.myFragment=document.createRange().createContextualFragment(e),document.body.appendChild(this.myFragment)}renderMessage(e){return`\n <div class="blog">\n <div class="blog-text">\n <h2>${e.title}\n </h2>\n <div class="d-flex">\n <div class="category">${e.description}</div>\n <div class="date">${t(n(e.scheduledFor),"PPP")}</div>\n </div>\n <div class="author d-flex">\n <div class="author-image">\n <img src="${e.featuerImage}" alt="" />\n </div>\n <div class="author-name">${e.userName}</div>\n </div>\n </div>\n </div>`}afterRender(){const e=document.getElementById("hRead");e&&e.addEventListener("click",(()=>{const e=document.getElementById("wp");document.body.removeChild(e)}))}close(){document.getElementById("wp").style.display="none"}}export{s as WhatsNew}; |
@@ -1,1 +0,1 @@ | ||
| !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("contentful"),require("date-fns")):"function"==typeof define&&define.amd?define(["exports","contentful","date-fns"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).bundle={},e.contentful,e.dateFns)}(this,(function(e,n,t){"use strict";const i=n.createClient({space:"ix8eqmh7slbd",accessToken:"VGat13fNbeGyZvBDRQA_dLB-kalAxoQ4VPLfiU4zhOI"}),d=async(e=6,n=0)=>{try{let t=(await i.getEntries({content_type:"page",limit:e,skip:n})).items;return t=t.map((e=>{const{id:n,createdAt:t}=e.sys,{title:i,description:d,userName:a,scheduledFor:s}=e.fields;return{id:n,title:i,featuerImage:e.fields.featureImage.fields.file.url,userName:a,description:d,createdAt:t,scheduledFor:s}})),console.log("RETURN"+t),t}catch(e){console.log(e)}},a=e=>`\n \n \n \n <div class="blog">\n \n <div class="blog-text">\n <h2>${e.title}\n </h2>\n <div class="d-flex">\n <div class="category">${e.description}</div>\n <div class="date">${t.format(t.parseISO(e.scheduledFor),"PPP")}</div>\n </div>\n <div class="author d-flex">\n <div class="author-image">\n <img src="${e.featuerImage}" alt="" />\n </div>\n <div class="author-name">${e.userName}</div>\n </div>\n </div>\n </div>\n \n \n\n`,s=async()=>`\n <div class="overlay">\n <div class="dialog">\n <div class="dialog__content cont">\n \n <div>\n <div class="blog-layout container" id="blog-layout">\n ${(await d()).map((e=>`${a(e)}`)).join("\n")}\n </div>\n <div class="load-btn"><button class="load" id="load">Load more</button></div>\n </div></div></div></div>`,o=async()=>{const e=document.getElementById("content");e.innerHTML=await s(),await e.after_render()};window.addEventListener("load",o),window.addEventListener("hashchange",o),e.router=o,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("contentful"),require("date-fns")):"function"==typeof define&&define.amd?define(["exports","contentful","date-fns"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bundle={},e.contentful,e.dateFns)}(this,(function(e,t,n){"use strict";e.WhatsNew=class{constructor(e,n){console.log("NAME IS "+e+" APP NAME IS :: "+n),this.client=t.createClient({space:"ix8eqmh7slbd",accessToken:"VGat13fNbeGyZvBDRQA_dLB-kalAxoQ4VPLfiU4zhOI"})}async getMessages(e=6,t=0){try{let n=(await this.client.getEntries({content_type:"page",limit:e,skip:t})).items;return n=n.map((e=>{const{id:t,createdAt:n}=e.sys,{title:s,description:d,userName:i,scheduledFor:a}=e.fields;return{id:t,title:s,featuerImage:e.fields.featureImage.fields.file.url,userName:i,description:d,createdAt:n,scheduledFor:a}})),n}catch(e){console.log(e)}}async render(){let e=`\n <div class="overlay" id="wp">\n <div class="dialog">\n <div class="dialog__content cont">\n ${(await this.getMessages()).map((e=>`${this.renderMessage(e)}`)).join("\n")}\n <div>\n <div class="blog-layout container" id="blog-layout">\n </div>\n <div class="l-btn"><button class="ld" id="hRead" >I have read</button></div>\n </div></div></div></div>`;this.myFragment=document.createRange().createContextualFragment(e),document.body.appendChild(this.myFragment)}renderMessage(e){return`\n <div class="blog">\n <div class="blog-text">\n <h2>${e.title}\n </h2>\n <div class="d-flex">\n <div class="category">${e.description}</div>\n <div class="date">${n.format(n.parseISO(e.scheduledFor),"PPP")}</div>\n </div>\n <div class="author d-flex">\n <div class="author-image">\n <img src="${e.featuerImage}" alt="" />\n </div>\n <div class="author-name">${e.userName}</div>\n </div>\n </div>\n </div>`}afterRender(){const e=document.getElementById("hRead");e&&e.addEventListener("click",(()=>{const e=document.getElementById("wp");document.body.removeChild(e)}))}close(){document.getElementById("wp").style.display="none"}},Object.defineProperty(e,"__esModule",{value:!0})})); |
+1
-1
| { | ||
| "name": "javascriptcontentful", | ||
| "version": "1.0.5", | ||
| "version": "1.0.6", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "private": false, |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
89
-2.2%123
-3.15%485537
-0.72%2397
-1.24%