New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xiaobai-world/upload

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xiaobai-world/upload - npm Package Compare versions

Comparing version 0.0.70 to 0.0.71

2

package.json
{
"name": "@xiaobai-world/upload",
"version": "0.0.70",
"version": "0.0.71",
"description": "upload to xiaobai store",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -6,3 +6,2 @@ const prompts = require("prompts");

const fs = require("fs");
const path = require("path");
const { getXiaobaiConfigPath, getAxiosHeader } = require("./utils");

@@ -15,14 +14,11 @@

async function login() {
console.log(chalk.green("Logining in..."));
try {
const user = await axios.get(`${base}/user/info`, {
headers: {
...getAxiosHeader(),
},
});
if (user.data && user.data.email) {
return user.data;
}
} catch (e) {
// show login ui
console.log(chalk.green("Logining in..."), base);
const user = await axios.get(`${base}/user/info`, {
headers: {
...getAxiosHeader(),
},
});
if (user.data && user.data.email) {
return user.data;
}

@@ -48,7 +44,7 @@

.catch((e) => {
return e.response;
return e;
});
if (login.status !== 201) {
return null;
throw new Error("Login fail");
}

@@ -55,0 +51,0 @@

@@ -10,3 +10,3 @@ const fs = require("fs");

function getXiaobaiConfigPath() {
return path.join(process.env.HOME, `xiaobai-world-config-${baseHash}.json`);
return path.join(process.env.HOME, `.xiaobai-world-config-${baseHash}.json`);
}

@@ -13,0 +13,0 @@

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