Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@waline/client

Package Overview
Dependencies
Maintainers
2
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waline/client - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2

2

dist/comment.js

@@ -1,2 +0,2 @@

(function(o,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(o=typeof globalThis<"u"?globalThis:o||self,r(o.Waline={}))})(this,function(o){"use strict";const r=e=>`${e.replace(/\/?$/,"/")}api/`,l=(e,n="")=>{if(typeof e=="object"&&e.errno)throw new TypeError(`${n} failed with ${e.errno}: ${e.errmsg}`);return e},h=({serverURL:e,lang:n,paths:a,signal:s})=>fetch(`${r(e)}comment?type=count&url=${encodeURIComponent(a.join(","))}&lang=${n}`,{signal:s}).then(t=>t.json()).then(t=>l(t,"Get comment count").data),p=e=>{try{e=decodeURI(e)}catch{}return e},u=(e="")=>e.replace(/\/$/u,""),d=e=>/^(https?:)?\/\//.test(e),m=e=>{const n=u(e);return d(n)?n:`https://${n}`},f=e=>{e.name!=="AbortError"&&console.error(e.message)},g=e=>e.dataset.path||null,$=({serverURL:e,path:n=window.location.pathname,selector:a=".waline-comment-count",lang:s=navigator.language})=>{const t=new AbortController,c=document.querySelectorAll(a);return c.length&&h({serverURL:m(e),paths:Array.from(c).map(i=>p(g(i)||n)),lang:s,signal:t.signal}).then(i=>{c.forEach((v,w)=>{v.innerText=i[w].toString()})}).catch(f),t.abort.bind(t)},y="3.0.0-alpha.1";o.commentCount=$,o.version=y});
(function(o,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(o=typeof globalThis<"u"?globalThis:o||self,r(o.Waline={}))})(this,function(o){"use strict";const r=e=>`${e.replace(/\/?$/,"/")}api/`,l=(e,n="")=>{if(typeof e=="object"&&e.errno)throw new TypeError(`${n} failed with ${e.errno}: ${e.errmsg}`);return e},h=({serverURL:e,lang:n,paths:a,signal:s})=>fetch(`${r(e)}comment?type=count&url=${encodeURIComponent(a.join(","))}&lang=${n}`,{signal:s}).then(t=>t.json()).then(t=>l(t,"Get comment count").data),p=e=>{try{e=decodeURI(e)}catch{}return e},u=(e="")=>e.replace(/\/$/u,""),d=e=>/^(https?:)?\/\//.test(e),m=e=>{const n=u(e);return d(n)?n:`https://${n}`},f=e=>{e.name!=="AbortError"&&console.error(e.message)},g=e=>e.dataset.path||null,$=({serverURL:e,path:n=window.location.pathname,selector:a=".waline-comment-count",lang:s=navigator.language})=>{const t=new AbortController,c=document.querySelectorAll(a);return c.length&&h({serverURL:m(e),paths:Array.from(c).map(i=>p(g(i)||n)),lang:s,signal:t.signal}).then(i=>{c.forEach((v,w)=>{v.innerText=i[w].toString()})}).catch(f),t.abort.bind(t)},y="3.0.0-alpha.2";o.commentCount=$,o.version=y});
//# sourceMappingURL=comment.js.map

@@ -1,2 +0,2 @@

(function(l,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(l=typeof globalThis<"u"?globalThis:l||self,p(l.Waline={}))})(this,function(l){"use strict";const p="3.0.0-alpha.1",v={"Content-Type":"application/json"},g=e=>`${e.replace(/\/?$/,"/")}api/`,$=(e,t="")=>{if(typeof e=="object"&&e.errno)throw new TypeError(`${t} failed with ${e.errno}: ${e.errmsg}`);return e},w=({serverURL:e,lang:t,paths:r,type:o,signal:n})=>fetch(`${g(e)}article?path=${encodeURIComponent(r.join(","))}&type=${encodeURIComponent(o.join(","))}&lang=${t}`,{signal:n}).then(a=>a.json()),U=({serverURL:e,lang:t,path:r,type:o,action:n})=>fetch(`${g(e)}article?lang=${t}`,{method:"POST",headers:v,body:JSON.stringify({path:r,type:o,action:n})}).then(a=>a.json()).then(a=>$(a,"Update counter").data),R=({serverURL:e,lang:t,paths:r,signal:o})=>w({serverURL:e,lang:t,paths:r,type:["time"],signal:o}).then(n=>Array.isArray(n)?n:[n]),L=e=>U({...e,type:"time",action:"inc"}),j=(e="")=>e.replace(/\/$/u,""),b=e=>/^(https?:)?\/\//.test(e),d=e=>{const t=j(e);return b(t)?t:`https://${t}`},A=e=>{e.name!=="AbortError"&&console.error(e.message)},f=e=>e.dataset.path||null,u=(e,t)=>{t.forEach((r,o)=>{r.innerText=e[o].toString()})},C=({serverURL:e,path:t=window.location.pathname,selector:r=".waline-pageview-count",update:o=!0,lang:n=navigator.language})=>{const a=new AbortController,c=Array.from(document.querySelectorAll(r)),y=s=>{const i=f(s);return i!==null&&t!==i},m=s=>R({serverURL:d(e),paths:s.map(i=>f(i)||t),lang:n,signal:a.signal}).then(i=>u(i,s)).catch(A);if(o){const s=c.filter(h=>!y(h)),i=c.filter(y);L({serverURL:d(e),path:t,lang:n}).then(([h])=>u(new Array(s.length).fill(h),s)),i.length&&m(i)}else m(c);return a.abort.bind(a)};l.pageviewCount=C,l.version=p});
(function(l,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(l=typeof globalThis<"u"?globalThis:l||self,p(l.Waline={}))})(this,function(l){"use strict";const p="3.0.0-alpha.2",v={"Content-Type":"application/json"},g=e=>`${e.replace(/\/?$/,"/")}api/`,$=(e,t="")=>{if(typeof e=="object"&&e.errno)throw new TypeError(`${t} failed with ${e.errno}: ${e.errmsg}`);return e},w=({serverURL:e,lang:t,paths:r,type:o,signal:n})=>fetch(`${g(e)}article?path=${encodeURIComponent(r.join(","))}&type=${encodeURIComponent(o.join(","))}&lang=${t}`,{signal:n}).then(a=>a.json()),U=({serverURL:e,lang:t,path:r,type:o,action:n})=>fetch(`${g(e)}article?lang=${t}`,{method:"POST",headers:v,body:JSON.stringify({path:r,type:o,action:n})}).then(a=>a.json()).then(a=>$(a,"Update counter").data),R=({serverURL:e,lang:t,paths:r,signal:o})=>w({serverURL:e,lang:t,paths:r,type:["time"],signal:o}).then(n=>Array.isArray(n)?n:[n]),L=e=>U({...e,type:"time",action:"inc"}),j=(e="")=>e.replace(/\/$/u,""),b=e=>/^(https?:)?\/\//.test(e),d=e=>{const t=j(e);return b(t)?t:`https://${t}`},A=e=>{e.name!=="AbortError"&&console.error(e.message)},f=e=>e.dataset.path||null,u=(e,t)=>{t.forEach((r,o)=>{r.innerText=e[o].toString()})},C=({serverURL:e,path:t=window.location.pathname,selector:r=".waline-pageview-count",update:o=!0,lang:n=navigator.language})=>{const a=new AbortController,c=Array.from(document.querySelectorAll(r)),y=s=>{const i=f(s);return i!==null&&t!==i},m=s=>R({serverURL:d(e),paths:s.map(i=>f(i)||t),lang:n,signal:a.signal}).then(i=>u(i,s)).catch(A);if(o){const s=c.filter(h=>!y(h)),i=c.filter(y);L({serverURL:d(e),path:t,lang:n}).then(([h])=>u(new Array(s.length).fill(h),s)),i.length&&m(i)}else m(c);return a.abort.bind(a)};l.pageviewCount=C,l.version=p});
//# sourceMappingURL=pageview.js.map
{
"name": "@waline/client",
"version": "3.0.0-alpha.1",
"version": "3.0.0-alpha.2",
"description": "client for waline comment system",

@@ -95,20 +95,20 @@ "keywords": [

"dependencies": {
"@vueuse/core": "^10.5.0",
"@vueuse/core": "^10.6.1",
"autosize": "^6.0.1",
"marked": "^9.1.4",
"marked-highlight": "^2.0.6",
"vue": "^3.3.7"
"marked": "^10.0.0",
"marked-highlight": "^2.0.7",
"vue": "^3.3.8"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/core": "7.23.3",
"@babel/preset-env": "7.23.3",
"@giphy/js-types": "4.4.0",
"@types/autosize": "4.0.2",
"@types/autosize": "4.0.3",
"@types/marked": "5.0.2",
"@vitejs/plugin-vue": "4.4.0",
"@vitejs/plugin-vue": "4.5.0",
"@waline/api": "workspace:*",
"recaptcha-v3": "1.10.0",
"user-agent-data-types": "0.4.2",
"vite": "4.5.0"
"vite": "5.0.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc