emailr-cli 1.0.0 → 1.1.0
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 +7 -7
- package/package.json +11 -10
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Command as Command9 } from "commander";
|
|
|
5
5
|
|
|
6
6
|
// src/commands/send.ts
|
|
7
7
|
import { Command } from "commander";
|
|
8
|
-
import { Emailr } from "
|
|
8
|
+
import { Emailr } from "emailr";
|
|
9
9
|
|
|
10
10
|
// src/config.ts
|
|
11
11
|
import fs from "fs";
|
|
@@ -204,7 +204,7 @@ function createSendCommand() {
|
|
|
204
204
|
|
|
205
205
|
// src/commands/contacts.ts
|
|
206
206
|
import { Command as Command2 } from "commander";
|
|
207
|
-
import { Emailr as Emailr2 } from "
|
|
207
|
+
import { Emailr as Emailr2 } from "emailr";
|
|
208
208
|
function createContactsCommand() {
|
|
209
209
|
const cmd = new Command2("contacts").description("Manage contacts");
|
|
210
210
|
cmd.command("list").description("List all contacts").option("--limit <number>", "Number of contacts to return", "20").option("--offset <number>", "Offset for pagination", "0").option("--subscribed", "Only show subscribed contacts").option("--unsubscribed", "Only show unsubscribed contacts").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
|
@@ -339,7 +339,7 @@ Total: ${result.total}`);
|
|
|
339
339
|
|
|
340
340
|
// src/commands/templates.ts
|
|
341
341
|
import { Command as Command3 } from "commander";
|
|
342
|
-
import { Emailr as Emailr3 } from "
|
|
342
|
+
import { Emailr as Emailr3 } from "emailr";
|
|
343
343
|
function createTemplatesCommand() {
|
|
344
344
|
const cmd = new Command3("templates").description("Manage email templates");
|
|
345
345
|
cmd.command("list").description("List all templates").option("--limit <number>", "Number of templates to return", "20").option("--page <number>", "Page number", "1").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
|
@@ -485,7 +485,7 @@ Total: ${result.length}`);
|
|
|
485
485
|
|
|
486
486
|
// src/commands/domains.ts
|
|
487
487
|
import { Command as Command4 } from "commander";
|
|
488
|
-
import { Emailr as Emailr4 } from "
|
|
488
|
+
import { Emailr as Emailr4 } from "emailr";
|
|
489
489
|
function createDomainsCommand() {
|
|
490
490
|
const cmd = new Command4("domains").description("Manage sending domains");
|
|
491
491
|
cmd.command("list").description("List all domains").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
|
@@ -761,7 +761,7 @@ function createConfigCommand() {
|
|
|
761
761
|
|
|
762
762
|
// src/commands/broadcasts.ts
|
|
763
763
|
import { Command as Command6 } from "commander";
|
|
764
|
-
import { Emailr as Emailr5 } from "
|
|
764
|
+
import { Emailr as Emailr5 } from "emailr";
|
|
765
765
|
function createBroadcastsCommand() {
|
|
766
766
|
const cmd = new Command6("broadcasts").description("Manage broadcast campaigns");
|
|
767
767
|
cmd.command("list").description("List all broadcasts").option("--status <status>", "Filter by status (draft, scheduled, sending, sent)").option("--limit <number>", "Number of broadcasts to return", "20").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
|
@@ -953,7 +953,7 @@ function createBroadcastsCommand() {
|
|
|
953
953
|
|
|
954
954
|
// src/commands/webhooks.ts
|
|
955
955
|
import { Command as Command7 } from "commander";
|
|
956
|
-
import { Emailr as Emailr6 } from "
|
|
956
|
+
import { Emailr as Emailr6 } from "emailr";
|
|
957
957
|
function createWebhooksCommand() {
|
|
958
958
|
const cmd = new Command7("webhooks").description("Manage webhooks");
|
|
959
959
|
cmd.command("list").description("List all webhooks").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
|
@@ -1128,7 +1128,7 @@ function createWebhooksCommand() {
|
|
|
1128
1128
|
|
|
1129
1129
|
// src/commands/segments.ts
|
|
1130
1130
|
import { Command as Command8 } from "commander";
|
|
1131
|
-
import { Emailr as Emailr7 } from "
|
|
1131
|
+
import { Emailr as Emailr7 } from "emailr";
|
|
1132
1132
|
function createSegmentsCommand() {
|
|
1133
1133
|
const cmd = new Command8("segments").description("Manage contact segments");
|
|
1134
1134
|
cmd.command("list").description("List all segments").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emailr-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Command-line interface for the Emailr email API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,11 +10,18 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
15
|
+
"build:standalone": "npm run build && node scripts/build-standalone.js",
|
|
16
|
+
"dev": "tsup src/index.ts --format esm --watch",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"prepublishOnly": "npm run build"
|
|
19
|
+
},
|
|
13
20
|
"dependencies": {
|
|
21
|
+
"emailr": "workspace:*",
|
|
14
22
|
"chalk": "^5.3.0",
|
|
15
23
|
"cli-table3": "^0.6.3",
|
|
16
|
-
"commander": "^12.0.0"
|
|
17
|
-
"@emailr/sdk": "1.0.0"
|
|
24
|
+
"commander": "^12.0.0"
|
|
18
25
|
},
|
|
19
26
|
"devDependencies": {
|
|
20
27
|
"@types/node": "^20.0.0",
|
|
@@ -47,11 +54,5 @@
|
|
|
47
54
|
},
|
|
48
55
|
"publishConfig": {
|
|
49
56
|
"access": "public"
|
|
50
|
-
},
|
|
51
|
-
"scripts": {
|
|
52
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
53
|
-
"build:standalone": "npm run build && node scripts/build-standalone.js",
|
|
54
|
-
"dev": "tsup src/index.ts --format esm --watch",
|
|
55
|
-
"typecheck": "tsc --noEmit"
|
|
56
57
|
}
|
|
57
|
-
}
|
|
58
|
+
}
|