Skip to content

Commit fb3ddbe

Browse files
committed
release 1.1.0
1 parent 574343a commit fb3ddbe

File tree

8 files changed

+8
-7
lines changed

8 files changed

+8
-7
lines changed

dist/api.ts.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/api.ts.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/api.ts.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import n from"node-fetch";var r=n=>encodeURIComponent(n).replace(/[!'()*]/g,n=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`);function t(n,t){return t.encode?t.strict?r(n):encodeURIComponent(n):n}var e=function(r){return{social:function(n){return"https://"+r+".myshopify.com/apps/dimensionauth/"+n+"/1?native=1"},passwordless:function(e){try{var i=!1;function a(n){return i?n:{success:!1}}var s=e.email,c=o()+"   "+o()+"   "+Math.floor(10*Math.random()),u=function(){if(s&&s.length>5&&s.indexOf("@")>-1)return Promise.resolve(n("https://"+r+".myshopify.com/apps/dimensionauth/passwordless?"+((n,r)=>{if(!n)return"";const e=function(n){switch(n.arrayFormat){case"index":return r=>(e,o)=>{const i=e.length;return void 0===o?e:null===o?[...e,[t(r,n),"[",i,"]"].join("")]:[...e,[t(r,n),"[",t(i,n),"]=",t(o,n)].join("")]};case"bracket":return r=>(e,o)=>void 0===o?e:null===o?[...e,[t(r,n),"[]"].join("")]:[...e,[t(r,n),"[]=",t(o,n)].join("")];case"comma":return r=>(e,o,i)=>null==o||0===o.length?e:0===i?[[t(r,n),"=",t(o,n)].join("")]:[[e,t(o,n)].join(",")];default:return r=>(e,o)=>void 0===o?e:null===o?[...e,t(r,n)]:[...e,[t(r,n),"=",t(o,n)].join("")]}}(r=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},r)),o=Object.keys(n);return!1!==r.sort&&o.sort(r.sort),o.map(o=>{const i=n[o];return void 0===i?"":null===i?t(o,r):Array.isArray(i)?i.reduce(e(o),[]).join("&"):t(o,r)+"="+t(i,r)}).filter(n=>n.length>0).join("&")})({email:s,code:c,native:1}))).then(function(n){return i=!0,n.json()})}();return Promise.resolve(u&&u.then?u.then(a):a(u))}catch(n){return Promise.reject(n)}}}};function o(){var n=["a","e","i","o","u"],r=["b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"];return r[Math.floor(Math.random()*r.length)]+n[Math.floor(Math.random()*n.length)]}export{e as login};
1+
import n from"node-fetch";var e=n=>encodeURIComponent(n).replace(/[!'()*]/g,n=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`);function r(n,r){return r.encode?r.strict?e(n):encodeURIComponent(n):n}var t=function(e){return{social:function(n){return"https://"+o(e)+"/apps/dimensionauth/"+n+"/1?native=1"},passwordless:function(t){try{var a=!1;function s(n){return a?n:{success:!1}}var c=t.email,u=i()+" "+i()+" "+Math.floor(10*Math.random()),l=function(){if(c&&c.length>5&&c.indexOf("@")>-1)return Promise.resolve(n("https://"+o(e)+"/apps/dimensionauth/passwordless?"+((n,e)=>{if(!n)return"";const t=function(n){switch(n.arrayFormat){case"index":return e=>(t,o)=>{const i=t.length;return void 0===o?t:null===o?[...t,[r(e,n),"[",i,"]"].join("")]:[...t,[r(e,n),"[",r(i,n),"]=",r(o,n)].join("")]};case"bracket":return e=>(t,o)=>void 0===o?t:null===o?[...t,[r(e,n),"[]"].join("")]:[...t,[r(e,n),"[]=",r(o,n)].join("")];case"comma":return e=>(t,o,i)=>null==o||0===o.length?t:0===i?[[r(e,n),"=",r(o,n)].join("")]:[[t,r(o,n)].join(",")];default:return e=>(t,o)=>void 0===o?t:null===o?[...t,r(e,n)]:[...t,[r(e,n),"=",r(o,n)].join("")]}}(e=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},e)),o=Object.keys(n);return!1!==e.sort&&o.sort(e.sort),o.map(o=>{const i=n[o];return void 0===i?"":null===i?r(o,e):Array.isArray(i)?i.reduce(t(o),[]).join("&"):r(o,e)+"="+r(i,e)}).filter(n=>n.length>0).join("&")})({email:c,code:u,native:1}))).then(function(n){return Promise.resolve(n.json()).then(function(n){return a=!0,n})})}();return Promise.resolve(l&&l.then?l.then(s):s(l))}catch(n){return Promise.reject(n)}}}};function o(n){return n.indexOf("myshopify.com")>=0?n:-1===n.indexOf(".")?n+".myshopify.com":n}function i(){var n=["a","e","i","o","u"],e=["b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"];return e[Math.floor(Math.random()*e.length)]+n[Math.floor(Math.random()*n.length)]}export{t as login};
22
//# sourceMappingURL=api.ts.module.ts.map

dist/api.ts.module.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/api.ts.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)