@3dnest/garage-host
Advanced tools
Comparing version 0.1.0 to 0.1.1
/*! | ||
* @3dnest/garage-host v0.1.0 | ||
* @3dnest/garage-host v0.1.1 | ||
* (c) 2021-2022 3dnest | ||
@@ -188,3 +188,3 @@ * Released under the MIT License. | ||
const meta = await response.json(); | ||
const { scriptList, solution: name, version } = meta; | ||
const { scriptList, name, version } = meta; | ||
@@ -191,0 +191,0 @@ if (isNotArray(scriptList)) { |
/*! | ||
* @3dnest/garage-host v0.1.0 | ||
* @3dnest/garage-host v0.1.1 | ||
* (c) 2021-2022 3dnest | ||
* Released under the MIT License. | ||
*/ | ||
const e=(e,t=Error)=>{throw new t(e)},t=t=>e(t,TypeError),i=(e,t)=>(e=>typeof e)(e)===t,n=Array.isArray,r=e=>!(e=>i(e,"string"))(e),o=e=>!(e=>i(e,"object"))(e),a=e=>!(e=>i(e,"function"))(e),c=document,s=c.body,d=async e=>{const t=(i="script",c.createElement(i));var i;return new Promise(((i,n)=>{var r;return t.onload=i,t.onerror=n,t.src=e,r=t,s.appendChild(r),t})).finally((()=>{return((e,t)=>e.removeChild(t))((e=t).parentElement,e);var e}))},l=async(i,c)=>{const{origin:s,ticket:l}=(e=>{o(e)&&t("Invalid options, a plain object expected.");const i={},{origin:n,ticket:a}=e;return r(n)&&t("Invalid .origin, a url string expected."),r(a)&&t("Invalid .ticket, a ticket string expected."),i.origin=n,i.ticket=a,i})(i);a(c)&&t("Invalid installer, a function expected.");const p=new URL(`/validate?ticket=${l}`,s),_=await fetch(p);_.ok||e("Authentication failed.");const v=await _.json(),{scriptList:w,solution:I,version:u}=v;n(w)||t("Service: Invalid scriptList, an array expected."),w.forEach(((e,i)=>{r(e)&&t(`Service: Invalid scriptList[${i}], a string expected.`)})),r(I)&&t("Service: Invalid solution name, a string expected."),r(u)&&t("Service: Invalid version, a string expected.");for(const e of w)await d(e);const E=window.__GARAGE_SOLUTION_PROVIDER__,g=window.__SPOKE__;delete window.__GARAGE_SOLUTION_PROVIDER__,delete window.__SPOKE__,c(E,g,v)};export{l as Solution}; | ||
const e=(e,t=Error)=>{throw new t(e)},t=t=>e(t,TypeError),i=(e,t)=>(e=>typeof e)(e)===t,n=Array.isArray,r=e=>!(e=>i(e,"string"))(e),a=e=>!(e=>i(e,"object"))(e),o=e=>!(e=>i(e,"function"))(e),c=document,s=c.body,d=async e=>{const t=(i="script",c.createElement(i));var i;return new Promise(((i,n)=>{var r;return t.onload=i,t.onerror=n,t.src=e,r=t,s.appendChild(r),t})).finally((()=>{return((e,t)=>e.removeChild(t))((e=t).parentElement,e);var e}))},l=async(i,c)=>{const{origin:s,ticket:l}=(e=>{a(e)&&t("Invalid options, a plain object expected.");const i={},{origin:n,ticket:o}=e;return r(n)&&t("Invalid .origin, a url string expected."),r(o)&&t("Invalid .ticket, a ticket string expected."),i.origin=n,i.ticket=o,i})(i);o(c)&&t("Invalid installer, a function expected.");const p=new URL(`/validate?ticket=${l}`,s),_=await fetch(p);_.ok||e("Authentication failed.");const v=await _.json(),{scriptList:w,name:I,version:E}=v;n(w)||t("Service: Invalid scriptList, an array expected."),w.forEach(((e,i)=>{r(e)&&t(`Service: Invalid scriptList[${i}], a string expected.`)})),r(I)&&t("Service: Invalid solution name, a string expected."),r(E)&&t("Service: Invalid version, a string expected.");for(const e of w)await d(e);const g=window.__GARAGE_SOLUTION_PROVIDER__,u=window.__SPOKE__;delete window.__GARAGE_SOLUTION_PROVIDER__,delete window.__SPOKE__,c(g,u,v)};export{l as Solution}; |
/*! | ||
* @3dnest/garage-host v0.1.0 | ||
* @3dnest/garage-host v0.1.1 | ||
* (c) 2021-2022 3dnest | ||
@@ -194,3 +194,3 @@ * Released under the MIT License. | ||
const meta = await response.json(); | ||
const { scriptList, solution: name, version } = meta; | ||
const { scriptList, name, version } = meta; | ||
@@ -197,0 +197,0 @@ if (isNotArray(scriptList)) { |
/*! | ||
* @3dnest/garage-host v0.1.0 | ||
* @3dnest/garage-host v0.1.1 | ||
* (c) 2021-2022 3dnest | ||
* Released under the MIT License. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["garage-host"]={})}(this,(function(e){"use strict";const t=(e,t=Error)=>{throw new t(e)},i=e=>t(e,TypeError),n=(e,t)=>(e=>typeof e)(e)===t,o=Array.isArray,r=e=>!(e=>n(e,"string"))(e),a=e=>!(e=>n(e,"object"))(e),c=e=>!(e=>n(e,"function"))(e),s=document,d=s.body,l=async e=>{const t=(i="script",s.createElement(i));var i;return new Promise(((i,n)=>{var o;return t.onload=i,t.onerror=n,t.src=e,o=t,d.appendChild(o),t})).finally((()=>{return((e,t)=>e.removeChild(t))((e=t).parentElement,e);var e}))};e.Solution=async(e,n)=>{const{origin:s,ticket:d}=(e=>{a(e)&&i("Invalid options, a plain object expected.");const t={},{origin:n,ticket:o}=e;return r(n)&&i("Invalid .origin, a url string expected."),r(o)&&i("Invalid .ticket, a ticket string expected."),t.origin=n,t.ticket=o,t})(e);c(n)&&i("Invalid installer, a function expected.");const p=new URL(`/validate?ticket=${d}`,s),f=await fetch(p);f.ok||t("Authentication failed.");const _=await f.json(),{scriptList:u,solution:v,version:w}=_;o(u)||i("Service: Invalid scriptList, an array expected."),u.forEach(((e,t)=>{r(e)&&i(`Service: Invalid scriptList[${t}], a string expected.`)})),r(v)&&i("Service: Invalid solution name, a string expected."),r(w)&&i("Service: Invalid version, a string expected.");for(const e of u)await l(e);const g=window.__GARAGE_SOLUTION_PROVIDER__,y=window.__SPOKE__;delete window.__GARAGE_SOLUTION_PROVIDER__,delete window.__SPOKE__,n(g,y,_)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["garage-host"]={})}(this,(function(e){"use strict";const t=(e,t=Error)=>{throw new t(e)},n=e=>t(e,TypeError),i=(e,t)=>(e=>typeof e)(e)===t,o=Array.isArray,r=e=>!(e=>i(e,"string"))(e),a=e=>!(e=>i(e,"object"))(e),c=e=>!(e=>i(e,"function"))(e),s=document,d=s.body,l=async e=>{const t=(n="script",s.createElement(n));var n;return new Promise(((n,i)=>{var o;return t.onload=n,t.onerror=i,t.src=e,o=t,d.appendChild(o),t})).finally((()=>{return((e,t)=>e.removeChild(t))((e=t).parentElement,e);var e}))};e.Solution=async(e,i)=>{const{origin:s,ticket:d}=(e=>{a(e)&&n("Invalid options, a plain object expected.");const t={},{origin:i,ticket:o}=e;return r(i)&&n("Invalid .origin, a url string expected."),r(o)&&n("Invalid .ticket, a ticket string expected."),t.origin=i,t.ticket=o,t})(e);c(i)&&n("Invalid installer, a function expected.");const p=new URL(`/validate?ticket=${d}`,s),f=await fetch(p);f.ok||t("Authentication failed.");const _=await f.json(),{scriptList:u,name:v,version:w}=_;o(u)||n("Service: Invalid scriptList, an array expected."),u.forEach(((e,t)=>{r(e)&&n(`Service: Invalid scriptList[${t}], a string expected.`)})),r(v)&&n("Service: Invalid solution name, a string expected."),r(w)&&n("Service: Invalid version, a string expected.");for(const e of u)await l(e);const g=window.__GARAGE_SOLUTION_PROVIDER__,y=window.__SPOKE__;delete window.__GARAGE_SOLUTION_PROVIDER__,delete window.__SPOKE__,i(g,y,_)},Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -58,3 +58,3 @@ import { Lang, Type } from '@produck/charon'; | ||
const meta = await response.json(); | ||
const { scriptList, solution: name, version } = meta; | ||
const { scriptList, name, version } = meta; | ||
@@ -61,0 +61,0 @@ if (Type.Not.Array(scriptList)) { |
{ | ||
"name": "@3dnest/garage-host", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "> TODO: description", | ||
@@ -43,3 +43,3 @@ "author": "Chaos Lee <chaos2lee@qq.com>", | ||
}, | ||
"gitHead": "e0ee2c27bd1f8a653b172b9576a867a5a9854fa3" | ||
"gitHead": "1b4c0659f4add3fe898af44cf255d264919a340a" | ||
} |
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
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
18728