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

dedomil

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dedomil - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

102

index.js

@@ -8,2 +8,10 @@ #!/usr/bin/env node

const clear = require("clear");
const inquirer = require("inquirer");
const fetch = require("cross-fetch");
const open = require("open");
const fs = require("fs");
const request = require("request");
const path = require("path");
const ora = require("ora");
const cliSpinners = require("cli-spinners");

@@ -25,20 +33,80 @@ clear();

const me = boxen(
[
`${data.name}`,
``,
`${data.labelTwitter} ${data.twitter}`,
`${data.labelGitHub} ${data.github}`,
`${data.labelLinkedIn} ${data.linkedin}`,
`${data.labelWeb} ${data.web}`,
].join("\n"),
{
margin: 1,
padding: 1,
float: "center",
borderStyle: "round",
borderColor: "green",
}
console.log(
boxen(
[
`${data.name}`,
``,
`${data.labelTwitter} ${data.twitter}`,
`${data.labelGitHub} ${data.github}`,
`${data.labelLinkedIn} ${data.linkedin}`,
`${data.labelWeb} ${data.web}`,
].join("\n"),
{
margin: 1,
padding: 1,
float: "center",
borderStyle: "round",
borderColor: "green",
}
)
);
console.log(me);
const prompt = inquirer.createPromptModule();
const questions = [
{
type: "list",
name: "action",
message: "What would you like to do?",
choices: [
{
name: `Send me an ${chalk.green.bold("anonymous message")}?`,
value: async () => {
let { message } = await inquirer.prompt([
{
name: "message",
message: "Type a message:",
},
]);
if (!message) return console.log("- Message empty, couldn't send!");
let response = await fetch(
"https://api.dedomil.workers.dev/message",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ message }),
}
);
let { status } = await response.json();
if (status === 200) {
console.log("- Message sent successfully!");
} else {
console.log("- Internal server error, please contact via email");
}
},
},
{
name: `Send me an ${chalk.green.bold("email")}?`,
value: async () => {
await open("mailto:dedomil@skiff.com");
console.log("- Done, see you soon at inbox!");
},
},
{
name: `Download my ${chalk.magentaBright.bold("Resume")}?`,
value: async () => {
await open("https://api.dedomil.workers.dev/files/cv.pdf");
console.log("- Resume opened in browser!");
},
},
{
name: "Quit!",
value: () => {
console.log("- Thank you for visiting, good bye!");
},
},
],
},
];
prompt(questions).then((answer) => answer.action());
{
"name": "dedomil",
"version": "1.0.2",
"version": "1.0.3",
"description": "my npx card to contact me from terminal",

@@ -13,3 +13,14 @@ "main": "index.js",

"author": "dedomil <dedomil@skiff.com>",
"license": "ISC"
"license": "ISC",
"dependencies": {
"boxen": "^4.2.0",
"chalk": "^4.1.0",
"clear": "^0.1.0",
"cli-spinners": "^2.5.0",
"cross-fetch": "^4.0.0",
"inquirer": "^7.3.2",
"open": "^7.0.4",
"ora": "^5.1.0",
"request": "^2.88.2"
}
}
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