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

mindsdb-js-sdk

Package Overview
Dependencies
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mindsdb-js-sdk - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

dist/mindsdb-sdk.es.js

2

dist/mindsdb-sdk.cjs.js

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

"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;
"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)}},q={connect:l,getStatus:u,getFiles:d,setQuery:g};module.exports=q;

@@ -8,3 +8,3 @@ {

"license": "MIT",
"version": "1.0.2",
"version": "1.0.3",
"homepage": "https://github.com/mindsdb/mindsdb_js_sdk#readme",

@@ -35,2 +35,3 @@ "repository": {

"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
"prettier": "2.6.2",

@@ -37,0 +38,0 @@ "vite": "^2.9.9"

@@ -6,2 +6,3 @@ import { connect } from './connect';

export { connect, getStatus, getFiles, setQuery };
const MindsDB = { connect, getStatus, getFiles, setQuery }
export default MindsDB;
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