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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3609
101
9
2
1
+ Addedboxen@^4.2.0
+ Addedchalk@^4.1.0
+ Addedclear@^0.1.0
+ Addedcli-spinners@^2.5.0
+ Addedcross-fetch@^4.0.0
+ Addedinquirer@^7.3.2
+ Addedopen@^7.0.4
+ Addedora@^5.1.0
+ Addedrequest@^2.88.2
+ Addedajv@6.12.6(transitive)
+ Addedansi-align@3.0.1(transitive)
+ Addedansi-escapes@4.3.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedboxen@4.2.0(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedchalk@3.0.04.1.2(transitive)
+ Addedchardet@0.7.0(transitive)
+ Addedclear@0.1.0(transitive)
+ Addedcli-boxes@2.2.1(transitive)
+ Addedcli-cursor@3.1.0(transitive)
+ Addedcli-spinners@2.9.2(transitive)
+ Addedcli-width@3.0.0(transitive)
+ Addedclone@1.0.4(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addedcross-fetch@4.0.0(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddefaults@1.0.4(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedexternal-editor@3.1.0(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfigures@3.2.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedinquirer@7.3.3(transitive)
+ Addedis-docker@2.2.1(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedis-interactive@1.0.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedis-unicode-supported@0.1.0(transitive)
+ Addedis-wsl@2.2.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlog-symbols@4.1.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedopen@7.4.2(transitive)
+ Addedora@5.4.1(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.13.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedrun-async@2.4.1(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedterm-size@2.2.1(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addedtype-fest@0.21.30.8.1(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
+ Addedwcwidth@1.0.1(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwidest-line@3.1.0(transitive)