resend-cli 1.0.0 → 1.0.2
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.
- package/README.md +6 -1
- package/package.json +22 -18
- package/src/index.js +19 -0
package/README.md
CHANGED
|
@@ -11,4 +11,9 @@ API keys must have full access for all features of the CLI to work properly. You
|
|
|
11
11
|
|
|
12
12
|
After this, the API key will be saved in plain text (!) at ~/.resend_config.json. For this reason, avoid installing resend-cli on public or shared computers.
|
|
13
13
|
|
|
14
|
-
To exit resend-cli, use the Ctrl+C keyboard shortcut.
|
|
14
|
+
To exit resend-cli, use the Ctrl+C keyboard shortcut.
|
|
15
|
+
|
|
16
|
+
## misc
|
|
17
|
+
visit the [project page](https://pablogracia.net/projects/resend-cli) to learn more about this project.
|
|
18
|
+
|
|
19
|
+
Contributions welcome. Stars encouraged.
|
package/package.json
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "resend-cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "GUI for sending emails via resend",
|
|
5
|
-
"main": "src/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "stretch07",
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"enquirer": "^2.4.1",
|
|
13
|
-
"figlet": "^1.7.0",
|
|
14
|
-
"ora": "^8.0.1",
|
|
15
|
-
"resend": "^3.2.0"
|
|
16
|
-
},
|
|
17
|
-
"
|
|
18
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "resend-cli",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "GUI for sending emails via resend",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "stretch07",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"enquirer": "^2.4.1",
|
|
13
|
+
"figlet": "^1.7.0",
|
|
14
|
+
"ora": "^8.0.1",
|
|
15
|
+
"resend": "^3.2.0"
|
|
16
|
+
},
|
|
17
|
+
"bin": "src/index.js",
|
|
18
|
+
"type": "module",
|
|
19
|
+
"files": [
|
|
20
|
+
"src"
|
|
21
|
+
]
|
|
22
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
1
3
|
import enquirer from "enquirer"
|
|
2
4
|
import * as fs from "fs/promises"
|
|
3
5
|
import {homedir} from "os"
|
|
@@ -9,6 +11,23 @@ import { Resend } from "resend"
|
|
|
9
11
|
import routes from "./routes.js"
|
|
10
12
|
import readline from "readline"
|
|
11
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
|
+
|
|
12
31
|
const text = await fig("resend-cli")
|
|
13
32
|
console.log(text)
|
|
14
33
|
const configPath = `${homedir()}/.resend_config.json`
|