emailr-cli 1.3.0 → 1.3.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/dist/index.js +16 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -920,7 +920,14 @@ Open the Preview URL in your browser to view the rendered template.`);
|
|
|
920
920
|
output(template, "json");
|
|
921
921
|
} else {
|
|
922
922
|
success(`Template updated: ${template.id}`);
|
|
923
|
-
|
|
923
|
+
const tableData = {
|
|
924
|
+
ID: template.id,
|
|
925
|
+
Name: template.name,
|
|
926
|
+
Subject: template.subject,
|
|
927
|
+
Variables: template.variables?.join(", ") || "-",
|
|
928
|
+
Updated: template.updated_at
|
|
929
|
+
};
|
|
930
|
+
output(tableData, "table");
|
|
924
931
|
}
|
|
925
932
|
} catch (err) {
|
|
926
933
|
error(err instanceof Error ? err.message : "Failed to update template");
|
|
@@ -986,7 +993,14 @@ Template: ${template.name}`);
|
|
|
986
993
|
process.exit(1);
|
|
987
994
|
}
|
|
988
995
|
});
|
|
989
|
-
cmd.command("edit <id>").description(
|
|
996
|
+
cmd.command("edit <id>").description(`Start a live editing session for a template.
|
|
997
|
+
|
|
998
|
+
AGENTIC WORKFLOW:
|
|
999
|
+
1. Run: emailr templates edit <id> --file ./template.html
|
|
1000
|
+
2. Edit the file at ./template.html - browser auto-refreshes on save
|
|
1001
|
+
3. When done: emailr templates update <id> --html-file ./template.html
|
|
1002
|
+
|
|
1003
|
+
This command fetches the template HTML, saves it locally, and starts a live preview server with hot-reload. Any changes to the file are instantly reflected in the browser.`).option("--file <path>", "Path to save the HTML file for editing", "./template.html").option("--no-open", "Do not automatically open browser").action(async (id, options) => {
|
|
990
1004
|
try {
|
|
991
1005
|
const config = loadConfig();
|
|
992
1006
|
const client = new Emailr3({
|