New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mydata-cli

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mydata-cli - npm Package Compare versions

Comparing version
1.0.6
to
1.0.7
+19
-0
commands/login.js

@@ -5,3 +5,8 @@ import { Command } from "commander";

import readline from "readline";
import fs from "fs";
import path from "path";
const GITIGNORE = path.join(process.cwd(), ".gitignore");
const CONFIG_LINE = ".mycli-config.json";
const login = new Command("login")

@@ -14,2 +19,3 @@ .description("Login to your account")

});
rl.question("Email: ", (email) => {

@@ -28,2 +34,14 @@ rl.question("Password: ", async (password) => {

console.log("✅ Login successful!");
// --- Add .mycli-config.json to .gitignore ---
if (!fs.existsSync(GITIGNORE)) {
fs.writeFileSync(GITIGNORE, CONFIG_LINE + "\n");
console.log("📝 Created .gitignore and added .mycli-config.json");
} else {
const current = fs.readFileSync(GITIGNORE, "utf8").split("\n");
if (!current.includes(CONFIG_LINE)) {
fs.appendFileSync(GITIGNORE, CONFIG_LINE + "\n");
console.log("🛡️ Added .mycli-config.json to .gitignore");
}
}
} catch (err) {

@@ -35,2 +53,3 @@ console.error(

}
rl.close();

@@ -37,0 +56,0 @@ });

+1
-1
{
"name": "mydata-cli",
"version": "1.0.6",
"version": "1.0.7",
"description": "",

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

import fs from "fs-extra";
const configPath = "./mycli-config.json";
const configPath = "./.mycli-config.json";

@@ -4,0 +4,0 @@ export function saveToken(token) {