resend-cli 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "GUI for sending emails via resend",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -11,6 +11,23 @@ import { Resend } from "resend"
11
11
  import routes from "./routes.js"
12
12
  import readline from "readline"
13
13
 
14
+ if (process.platform === "win32") {
15
+ var rl = readline.createInterface({
16
+ input: process.stdin,
17
+ output: process.stdout
18
+ });
19
+
20
+ rl.on("SIGINT", function () {
21
+ process.emit("SIGINT");
22
+ });
23
+ }
24
+
25
+ process.on("SIGINT", function () {
26
+ //graceful shutdown
27
+ console.log("\nExiting...");
28
+ process.exit();
29
+ });
30
+
14
31
  const text = await fig("resend-cli")
15
32
  console.log(text)
16
33
  const configPath = `${homedir()}/.resend_config.json`