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

pixelblock-cli

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixelblock-cli - npm Package Compare versions

Comparing version 0.0.34 to 0.0.35

28

bin/install.js

@@ -7,2 +7,3 @@ #!/usr/bin/env node

const { execSync } = require('child_process');
const readline = require('readline'); // Import readline for user input
const packageJson = require('../package.json'); // Ensure this path is correct

@@ -12,4 +13,19 @@

// Function to ask the user a yes/no question
const askQuestion = (question) => {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
return new Promise((resolve) => {
rl.question(`${question} (yes/no): `, (answer) => {
rl.close();
resolve(answer.toLowerCase() === 'yes');
});
});
};
program
.version(packageJson.version) // Set the version from package.json
.version(packageJson.version)
.command('add <component>')

@@ -27,2 +43,12 @@ .description('Add a PixelBlockUI component')

fs.ensureDirSync(destinationDir);
if (fs.existsSync(destinationFile)) {
// Ask the user if they want to replace the existing file
const shouldReplace = await askQuestion(`File ${component}.tsx already exists. Do you want to replace it?`);
if (!shouldReplace) {
console.log('Operation canceled. No files were changed.');
return;
}
}
fs.copyFileSync(sourceFile, destinationFile);

@@ -29,0 +55,0 @@ console.log(`Component ${component} installed successfully.`);

2

package.json
{
"name": "pixelblock-cli",
"version": "0.0.34",
"version": "0.0.35",
"main": "bin/install.js",

@@ -5,0 +5,0 @@ "bin": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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