@waline/client
Advanced tools
Comparing version 2.15.1 to 2.15.2
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.commentCount=void 0;const t=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},n=e=>{"AbortError"!==e.name&&console.error(e.message)};e.version="2.15.1",e.commentCount=e=>{let{serverURL:o,path:r=window.location.pathname,selector:a=".waline-comment-count",lang:s=navigator.language}=e;const i=new AbortController,l=document.querySelectorAll(a);return l.length&&(e=>{let{serverURL:t,lang:n,paths:o,signal:r}=e;return fetch(`${t}/comment?type=count&url=${encodeURIComponent(o.join(","))}&lang=${n}`,{signal:r}).then((e=>e.json())).then((e=>Array.isArray(e)?e:[e]))})({serverURL:t(o),paths:Array.from(l).map((e=>(e=>{try{e=decodeURI(e)}catch(e){}return e})(e.dataset.path||e.getAttribute("id")||r))),lang:s,signal:i.signal}).then((e=>{l.forEach(((t,n)=>{t.innerText=e[n].toString()}))})).catch(n),i.abort.bind(i)}})); | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.commentCount=void 0;const t=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},n=e=>{"AbortError"!==e.name&&console.error(e.message)};e.version="2.15.2",e.commentCount=e=>{let{serverURL:o,path:r=window.location.pathname,selector:a=".waline-comment-count",lang:s=navigator.language}=e;const i=new AbortController,l=document.querySelectorAll(a);return l.length&&(e=>{let{serverURL:t,lang:n,paths:o,signal:r}=e;return fetch(`${t}/comment?type=count&url=${encodeURIComponent(o.join(","))}&lang=${n}`,{signal:r}).then((e=>e.json())).then((e=>Array.isArray(e)?e:[e]))})({serverURL:t(o),paths:Array.from(l).map((e=>(e=>{try{e=decodeURI(e)}catch(e){}return e})(e.dataset.path||e.getAttribute("id")||r))),lang:s,signal:i.signal}).then((e=>{l.forEach(((t,n)=>{t.innerText=e[n].toString()}))})).catch(n),i.abort.bind(i)}})); | ||
//# sourceMappingURL=comment.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.pageviewCount=void 0;const t={"Content-Type":"application/json"},n=e=>(e=>{let{serverURL:n,lang:r,path:o,type:a,action:i}=e;return fetch(`${n}/article?lang=${r}`,{method:"POST",headers:t,body:JSON.stringify({path:o,type:a,action:i})}).then((e=>e.json()))})({...e,type:"time",action:"inc"}),r=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},o=e=>{"AbortError"!==e.name&&console.error(e.message)},a=e=>e.dataset.path||e.getAttribute("id"),i=(e,t)=>{t.forEach(((t,n)=>{t.innerText=e[n].toString()}))};e.pageviewCount=e=>{let{serverURL:t,path:l=window.location.pathname,selector:s=".waline-pageview-count",update:p=!0,lang:c=navigator.language}=e;const g=new AbortController,h=Array.from(document.querySelectorAll(s)),f=e=>{const t=a(e);return null!==t&&l!==t},u=e=>(e=>{let{serverURL:t,lang:n,paths:r,signal:o}=e;return(e=>{let{serverURL:t,lang:n,paths:r,type:o,signal:a}=e;return fetch(`${t}/article?path=${encodeURIComponent(r.join(","))}&type=${encodeURIComponent(o.join(","))}&lang=${n}`,{signal:a}).then((e=>e.json()))})({serverURL:t,lang:n,paths:r,type:["time"],signal:o}).then((e=>Array.isArray(e)?e:[e]))})({serverURL:r(t),paths:e.map((e=>a(e)||l)),lang:c,signal:g.signal}).then((t=>i(t,e))).catch(o);if(p){const e=h.filter((e=>!f(e))),o=h.filter(f);n({serverURL:r(t),path:l,lang:c}).then((t=>i(new Array(e.length).fill(t),e))),o.length&&u(o)}else u(h);return g.abort.bind(g)},e.version="2.15.1"})); | ||
!function(e,t){if("function"==typeof define&&define.amd)define("Waline",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.Waline=n.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.pageviewCount=void 0;const t={"Content-Type":"application/json"},n=e=>(e=>{let{serverURL:n,lang:r,path:o,type:a,action:i}=e;return fetch(`${n}/article?lang=${r}`,{method:"POST",headers:t,body:JSON.stringify({path:o,type:a,action:i})}).then((e=>e.json()))})({...e,type:"time",action:"inc"}),r=e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\/$/u,"")}(e);return/^(https?:)?\/\//.test(t)?t:`https://${t}`},o=e=>{"AbortError"!==e.name&&console.error(e.message)},a=e=>e.dataset.path||e.getAttribute("id"),i=(e,t)=>{t.forEach(((t,n)=>{t.innerText=e[n].toString()}))};e.pageviewCount=e=>{let{serverURL:t,path:l=window.location.pathname,selector:s=".waline-pageview-count",update:p=!0,lang:c=navigator.language}=e;const g=new AbortController,h=Array.from(document.querySelectorAll(s)),f=e=>{const t=a(e);return null!==t&&l!==t},u=e=>(e=>{let{serverURL:t,lang:n,paths:r,signal:o}=e;return(e=>{let{serverURL:t,lang:n,paths:r,type:o,signal:a}=e;return fetch(`${t}/article?path=${encodeURIComponent(r.join(","))}&type=${encodeURIComponent(o.join(","))}&lang=${n}`,{signal:a}).then((e=>e.json()))})({serverURL:t,lang:n,paths:r,type:["time"],signal:o}).then((e=>Array.isArray(e)?e:[e]))})({serverURL:r(t),paths:e.map((e=>a(e)||l)),lang:c,signal:g.signal}).then((t=>i(t,e))).catch(o);if(p){const e=h.filter((e=>!f(e))),o=h.filter(f);n({serverURL:r(t),path:l,lang:c}).then((t=>i(new Array(e.length).fill(t),e))),o.length&&u(o)}else u(h);return g.abort.bind(g)},e.version="2.15.2"})); | ||
//# sourceMappingURL=pageview.js.map |
{ | ||
"name": "@waline/client", | ||
"version": "2.15.1", | ||
"version": "2.15.2", | ||
"description": "client for waline comment system", | ||
@@ -96,12 +96,2 @@ "keywords": [ | ||
], | ||
"scripts": { | ||
"build": "pnpm rollup && pnpm style", | ||
"clean": "rimraf ./dist", | ||
"dev": "vite", | ||
"prepublishOnly": "pnpm clean && pnpm build", | ||
"rollup": "rollup -c", | ||
"style": "pnpm style:main && pnpm style:meta", | ||
"style:main": "sass ./src/styles/index.scss ./dist/waline.css --style=compressed", | ||
"style:meta": "sass ./src/styles/meta.scss ./dist/waline-meta.css --style=compressed" | ||
}, | ||
"browserslist": { | ||
@@ -123,3 +113,3 @@ "production": [ | ||
"dependencies": { | ||
"@vueuse/core": "^9.13.0", | ||
"@vueuse/core": "^10.1.0", | ||
"autosize": "^6.0.1", | ||
@@ -138,7 +128,16 @@ "marked": "^4.3.0", | ||
"user-agent-data-types": "0.3.1", | ||
"vite": "4.2.1" | ||
"vite": "4.3.1" | ||
}, | ||
"engines": { | ||
"node": ">=14" | ||
}, | ||
"scripts": { | ||
"build": "pnpm rollup && pnpm style", | ||
"clean": "rimraf ./dist", | ||
"dev": "vite", | ||
"rollup": "rollup -c", | ||
"style": "pnpm style:main && pnpm style:meta", | ||
"style:main": "sass ./src/styles/index.scss ./dist/waline.css --style=compressed", | ||
"style:meta": "sass ./src/styles/meta.scss ./dist/waline-meta.css --style=compressed" | ||
} | ||
} | ||
} |
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
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2573044
144
9307
3
5
119
+ Added@types/web-bluetooth@0.0.20(transitive)
+ Added@vueuse/core@10.11.1(transitive)
+ Added@vueuse/metadata@10.11.1(transitive)
+ Added@vueuse/shared@10.11.1(transitive)
- Removed@types/web-bluetooth@0.0.16(transitive)
- Removed@vueuse/core@9.13.0(transitive)
- Removed@vueuse/metadata@9.13.0(transitive)
- Removed@vueuse/shared@9.13.0(transitive)
Updated@vueuse/core@^10.1.0