mindsdb-js-sdk
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -1,1 +0,1 @@ | ||
define(["exports"],function(i){"use strict";const l=async(e,t="https://alpha.mindsdb.com")=>{const o=require("axios");let a=require("../utils/saveData");const{email:s,password:r}=e;if(!s||!r)return{error:!0,message:"Please add email or password"};try{const n=await o.post(`${t}/cloud/login`,e),c=n.headers["set-cookie"],q=await o.get(`${t}/cloud/status`,{headers:{Cookie:c}});return a.setItem("auth",JSON.stringify(n.data)),a.setItem("requestCookie",c[4]),q.data}catch(n){console.log(n)}},u=async()=>{let e=require("../utils/saveData");try{return console.log("post",e.getItem("requestCookie")),e.getItem("requestCookie")}catch(t){console.log(t)}},d=async()=>{let e=require("../utils/saveData");const t=require("axios"),o="https://alpha.mindsdb.com",a={query:"SHOW TABLES FROM files;",context:{db:"mindsdb"}};try{const s=e.getItem("requestCookie");return(await t.post(`${o}/api/sql/query`,a,{withCredentials:!0,headers:{Cookie:s}})).data}catch(s){console.log(s)}},g=async(e="")=>{let t=require("../utils/saveData");const o=require("axios"),a="https://alpha.mindsdb.com",s={query:e,context:{db:"mindsdb"}};try{const r=t.getItem("requestCookie");return(await o.post(`${a}/api/sql/query`,s,{withCredentials:!0,headers:{Cookie:r}})).data}catch(r){console.log(r)}};i.connect=l,i.getFiles=d,i.getStatus=u,i.setQuery=g,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
define(function(){"use strict";var c={connect:async(e,t="https://alpha.mindsdb.com")=>{const o=require("axios");let r=require("../utils/saveData");const{email:s,password:a}=e;if(!s||!a)return{error:!0,message:"Please add email or password"};try{const i=await o.post(`${t}/cloud/login`,e),n=i.headers["set-cookie"],l=await o.get(`${t}/cloud/status`,{headers:{Cookie:n}});return r.setItem("auth",JSON.stringify(i.data)),r.setItem("requestCookie",n[4]),l.data}catch(i){console.log(i)}},getStatus:async()=>{let e=require("../utils/saveData");try{return console.log("post",e.getItem("requestCookie")),e.getItem("requestCookie")}catch(t){console.log(t)}},getFiles:async()=>{let e=require("../utils/saveData");const t=require("axios"),o="https://alpha.mindsdb.com",r={query:"SHOW TABLES FROM files;",context:{db:"mindsdb"}};try{const s=e.getItem("requestCookie");return(await t.post(`${o}/api/sql/query`,r,{withCredentials:!0,headers:{Cookie:s}})).data}catch(s){console.log(s)}},setQuery:async(e="")=>{let t=require("../utils/saveData");const o=require("axios"),r="https://alpha.mindsdb.com",s={query:e,context:{db:"mindsdb"}};try{const a=t.getItem("requestCookie");return(await o.post(`${r}/api/sql/query`,s,{withCredentials:!0,headers:{Cookie:a}})).data}catch(a){console.log(a)}}};return c}); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=async(e,t="https://alpha.mindsdb.com")=>{const o=require("axios");let r=require("../utils/saveData");const{email:s,password:a}=e;if(!s||!a)return{error:!0,message:"Please add email or password"};try{const i=await o.post(`${t}/cloud/login`,e),n=i.headers["set-cookie"],c=await o.get(`${t}/cloud/status`,{headers:{Cookie:n}});return r.setItem("auth",JSON.stringify(i.data)),r.setItem("requestCookie",n[4]),c.data}catch(i){console.log(i)}},u=async()=>{let e=require("../utils/saveData");try{return console.log("post",e.getItem("requestCookie")),e.getItem("requestCookie")}catch(t){console.log(t)}},d=async()=>{let e=require("../utils/saveData");const t=require("axios"),o="https://alpha.mindsdb.com",r={query:"SHOW TABLES FROM files;",context:{db:"mindsdb"}};try{const s=e.getItem("requestCookie");return(await t.post(`${o}/api/sql/query`,r,{withCredentials:!0,headers:{Cookie:s}})).data}catch(s){console.log(s)}},g=async(e="")=>{let t=require("../utils/saveData");const o=require("axios"),r="https://alpha.mindsdb.com",s={query:e,context:{db:"mindsdb"}};try{const a=t.getItem("requestCookie");return(await o.post(`${r}/api/sql/query`,s,{withCredentials:!0,headers:{Cookie:a}})).data}catch(a){console.log(a)}};exports.connect=l;exports.getFiles=d;exports.getStatus=u;exports.setQuery=g; | ||
"use strict";const l=async(e,t="https://alpha.mindsdb.com")=>{const o=require("axios");let r=require("../utils/saveData");const{email:s,password:a}=e;if(!s||!a)return{error:!0,message:"Please add email or password"};try{const i=await o.post(`${t}/cloud/login`,e),n=i.headers["set-cookie"],c=await o.get(`${t}/cloud/status`,{headers:{Cookie:n}});return r.setItem("auth",JSON.stringify(i.data)),r.setItem("requestCookie",n[4]),c.data}catch(i){console.log(i)}},u=async()=>{let e=require("../utils/saveData");try{return console.log("post",e.getItem("requestCookie")),e.getItem("requestCookie")}catch(t){console.log(t)}},d=async()=>{let e=require("../utils/saveData");const t=require("axios"),o="https://alpha.mindsdb.com",r={query:"SHOW TABLES FROM files;",context:{db:"mindsdb"}};try{const s=e.getItem("requestCookie");return(await t.post(`${o}/api/sql/query`,r,{withCredentials:!0,headers:{Cookie:s}})).data}catch(s){console.log(s)}},g=async(e="")=>{let t=require("../utils/saveData");const o=require("axios"),r="https://alpha.mindsdb.com",s={query:e,context:{db:"mindsdb"}};try{const a=t.getItem("requestCookie");return(await o.post(`${r}/api/sql/query`,s,{withCredentials:!0,headers:{Cookie:a}})).data}catch(a){console.log(a)}};var q={connect:l,getStatus:u,getFiles:d,setQuery:g};module.exports=q; |
@@ -89,2 +89,3 @@ const connect = async (userData, env = "https://alpha.mindsdb.com") => { | ||
}; | ||
export { connect, getFiles, getStatus, setQuery }; | ||
var main = { connect, getStatus, getFiles, setQuery }; | ||
export { main as default }; |
@@ -1,1 +0,1 @@ | ||
(function(e,n){typeof exports=="object"&&typeof module!="undefined"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(e=typeof globalThis!="undefined"?globalThis:e||self,n(e["MindsDB-SDK"]={}))})(this,function(e){"use strict";const n=async(t,s="https://alpha.mindsdb.com")=>{const a=require("axios");let r=require("../utils/saveData");const{email:o,password:i}=t;if(!o||!i)return{error:!0,message:"Please add email or password"};try{const c=await a.post(`${s}/cloud/login`,t),l=c.headers["set-cookie"],p=await a.get(`${s}/cloud/status`,{headers:{Cookie:l}});return r.setItem("auth",JSON.stringify(c.data)),r.setItem("requestCookie",l[4]),p.data}catch(c){console.log(c)}},u=async()=>{let t=require("../utils/saveData");try{return console.log("post",t.getItem("requestCookie")),t.getItem("requestCookie")}catch(s){console.log(s)}},d=async()=>{let t=require("../utils/saveData");const s=require("axios"),a="https://alpha.mindsdb.com",r={query:"SHOW TABLES FROM files;",context:{db:"mindsdb"}};try{const o=t.getItem("requestCookie");return(await s.post(`${a}/api/sql/query`,r,{withCredentials:!0,headers:{Cookie:o}})).data}catch(o){console.log(o)}},g=async(t="")=>{let s=require("../utils/saveData");const a=require("axios"),r="https://alpha.mindsdb.com",o={query:t,context:{db:"mindsdb"}};try{const i=s.getItem("requestCookie");return(await a.post(`${r}/api/sql/query`,o,{withCredentials:!0,headers:{Cookie:i}})).data}catch(i){console.log(i)}};e.connect=n,e.getFiles=d,e.getStatus=u,e.setQuery=g,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(n,c){typeof exports=="object"&&typeof module!="undefined"?module.exports=c():typeof define=="function"&&define.amd?define(c):(n=typeof globalThis!="undefined"?globalThis:n||self,n["MindsDB-SDK"]=c())})(this,function(){"use strict";var l={connect:async(e,t="https://alpha.mindsdb.com")=>{const o=require("axios");let r=require("../utils/saveData");const{email:s,password:a}=e;if(!s||!a)return{error:!0,message:"Please add email or password"};try{const i=await o.post(`${t}/cloud/login`,e),u=i.headers["set-cookie"],d=await o.get(`${t}/cloud/status`,{headers:{Cookie:u}});return r.setItem("auth",JSON.stringify(i.data)),r.setItem("requestCookie",u[4]),d.data}catch(i){console.log(i)}},getStatus:async()=>{let e=require("../utils/saveData");try{return console.log("post",e.getItem("requestCookie")),e.getItem("requestCookie")}catch(t){console.log(t)}},getFiles:async()=>{let e=require("../utils/saveData");const t=require("axios"),o="https://alpha.mindsdb.com",r={query:"SHOW TABLES FROM files;",context:{db:"mindsdb"}};try{const s=e.getItem("requestCookie");return(await t.post(`${o}/api/sql/query`,r,{withCredentials:!0,headers:{Cookie:s}})).data}catch(s){console.log(s)}},setQuery:async(e="")=>{let t=require("../utils/saveData");const o=require("axios"),r="https://alpha.mindsdb.com",s={query:e,context:{db:"mindsdb"}};try{const a=t.getItem("requestCookie");return(await o.post(`${r}/api/sql/query`,s,{withCredentials:!0,headers:{Cookie:a}})).data}catch(a){console.log(a)}}};return l}); |
@@ -16,3 +16,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"homepage": "https://github.com/mindsdb/mindsdb_js_sdk#readme", | ||
@@ -19,0 +19,0 @@ "repository": { |
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
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
0
44681
112