mxroute-cli 0.1.1
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/LICENSE +21 -0
- package/README.md +464 -0
- package/dist/commands/accounts.d.ts +4 -0
- package/dist/commands/accounts.js +262 -0
- package/dist/commands/accounts.js.map +1 -0
- package/dist/commands/aliases.d.ts +3 -0
- package/dist/commands/aliases.js +190 -0
- package/dist/commands/aliases.js.map +1 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.js +143 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/autoresponder.d.ts +4 -0
- package/dist/commands/autoresponder.js +280 -0
- package/dist/commands/autoresponder.js.map +1 -0
- package/dist/commands/catchall.d.ts +2 -0
- package/dist/commands/catchall.js +173 -0
- package/dist/commands/catchall.js.map +1 -0
- package/dist/commands/config.d.ts +5 -0
- package/dist/commands/config.js +161 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/dns.d.ts +3 -0
- package/dist/commands/dns.js +160 -0
- package/dist/commands/dns.js.map +1 -0
- package/dist/commands/dnsapi.d.ts +4 -0
- package/dist/commands/dnsapi.js +397 -0
- package/dist/commands/dnsapi.js.map +1 -0
- package/dist/commands/domains.d.ts +2 -0
- package/dist/commands/domains.js +109 -0
- package/dist/commands/domains.js.map +1 -0
- package/dist/commands/filters.d.ts +3 -0
- package/dist/commands/filters.js +300 -0
- package/dist/commands/filters.js.map +1 -0
- package/dist/commands/forwarders.d.ts +3 -0
- package/dist/commands/forwarders.js +202 -0
- package/dist/commands/forwarders.js.map +1 -0
- package/dist/commands/info.d.ts +2 -0
- package/dist/commands/info.js +163 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/lists.d.ts +6 -0
- package/dist/commands/lists.js +372 -0
- package/dist/commands/lists.js.map +1 -0
- package/dist/commands/quota.d.ts +2 -0
- package/dist/commands/quota.js +184 -0
- package/dist/commands/quota.js.map +1 -0
- package/dist/commands/send.d.ts +9 -0
- package/dist/commands/send.js +107 -0
- package/dist/commands/send.js.map +1 -0
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.js +535 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/spam.d.ts +4 -0
- package/dist/commands/spam.js +215 -0
- package/dist/commands/spam.js.map +1 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +79 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/troubleshoot.d.ts +1 -0
- package/dist/commands/troubleshoot.js +324 -0
- package/dist/commands/troubleshoot.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +589 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.d.ts +2 -0
- package/dist/mcp.js +599 -0
- package/dist/mcp.js.map +1 -0
- package/dist/utils/api.d.ts +15 -0
- package/dist/utils/api.js +30 -0
- package/dist/utils/api.js.map +1 -0
- package/dist/utils/config.d.ts +24 -0
- package/dist/utils/config.js +150 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/directadmin.d.ts +49 -0
- package/dist/utils/directadmin.js +444 -0
- package/dist/utils/directadmin.js.map +1 -0
- package/dist/utils/dns.d.ts +14 -0
- package/dist/utils/dns.js +284 -0
- package/dist/utils/dns.js.map +1 -0
- package/dist/utils/theme.d.ts +24 -0
- package/dist/utils/theme.js +95 -0
- package/dist/utils/theme.js.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sendEmail = sendEmail;
|
|
7
|
+
exports.testConnection = testConnection;
|
|
8
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
9
|
+
const API_URL = 'https://smtpapi.mxroute.com/';
|
|
10
|
+
async function sendEmail(options) {
|
|
11
|
+
const response = await (0, node_fetch_1.default)(API_URL, {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
headers: { 'Content-Type': 'application/json' },
|
|
14
|
+
body: JSON.stringify(options),
|
|
15
|
+
});
|
|
16
|
+
const result = (await response.json());
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
async function testConnection(server, username, password) {
|
|
20
|
+
return sendEmail({
|
|
21
|
+
server,
|
|
22
|
+
username,
|
|
23
|
+
password,
|
|
24
|
+
from: username,
|
|
25
|
+
to: username,
|
|
26
|
+
subject: 'MXroute CLI Connection Test',
|
|
27
|
+
body: '<p>This is a test email sent from the MXroute CLI to verify your configuration.</p>',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/utils/api.ts"],"names":[],"mappings":";;;;;AAmBA,8BASC;AAED,wCAUC;AAxCD,4DAA+B;AAE/B,MAAM,OAAO,GAAG,8BAA8B,CAAC;AAiBxC,KAAK,UAAU,SAAS,CAAC,OAAyB;IACvD,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAK,EAAC,OAAO,EAAE;QACpC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;KAC9B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAgB,CAAC;IACtD,OAAO,MAAM,CAAC;AAChB,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,QAAgB,EAAE,QAAgB;IACrF,OAAO,SAAS,CAAC;QACf,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,6BAA6B;QACtC,IAAI,EAAE,qFAAqF;KAC5F,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface Profile {
|
|
2
|
+
server: string;
|
|
3
|
+
username: string;
|
|
4
|
+
password: string;
|
|
5
|
+
domain: string;
|
|
6
|
+
}
|
|
7
|
+
interface MXRouteConfig {
|
|
8
|
+
server: string;
|
|
9
|
+
username: string;
|
|
10
|
+
password: string;
|
|
11
|
+
domain: string;
|
|
12
|
+
profiles: Record<string, Profile>;
|
|
13
|
+
activeProfile: string;
|
|
14
|
+
daUsername: string;
|
|
15
|
+
daLoginKey: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function getConfig(): MXRouteConfig;
|
|
18
|
+
export declare function setConfig(key: string, value: any): void;
|
|
19
|
+
export declare function setProfile(name: string, profile: Profile): void;
|
|
20
|
+
export declare function switchProfile(name: string): boolean;
|
|
21
|
+
export declare function getProfiles(): Record<string, Profile>;
|
|
22
|
+
export declare function deleteProfile(name: string): boolean;
|
|
23
|
+
export declare function getConfigPath(): string;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getConfig = getConfig;
|
|
37
|
+
exports.setConfig = setConfig;
|
|
38
|
+
exports.setProfile = setProfile;
|
|
39
|
+
exports.switchProfile = switchProfile;
|
|
40
|
+
exports.getProfiles = getProfiles;
|
|
41
|
+
exports.deleteProfile = deleteProfile;
|
|
42
|
+
exports.getConfigPath = getConfigPath;
|
|
43
|
+
const fs = __importStar(require("fs"));
|
|
44
|
+
const path = __importStar(require("path"));
|
|
45
|
+
const os = __importStar(require("os"));
|
|
46
|
+
const CONFIG_DIR = path.join(os.homedir(), '.config', 'mxroute-cli');
|
|
47
|
+
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
|
|
48
|
+
function ensureDir() {
|
|
49
|
+
if (!fs.existsSync(CONFIG_DIR)) {
|
|
50
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function readConfig() {
|
|
54
|
+
ensureDir();
|
|
55
|
+
if (!fs.existsSync(CONFIG_FILE)) {
|
|
56
|
+
return {
|
|
57
|
+
server: '',
|
|
58
|
+
username: '',
|
|
59
|
+
password: '',
|
|
60
|
+
domain: '',
|
|
61
|
+
profiles: {},
|
|
62
|
+
activeProfile: 'default',
|
|
63
|
+
daUsername: '',
|
|
64
|
+
daLoginKey: '',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
return JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf-8'));
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return {
|
|
72
|
+
server: '',
|
|
73
|
+
username: '',
|
|
74
|
+
password: '',
|
|
75
|
+
domain: '',
|
|
76
|
+
profiles: {},
|
|
77
|
+
activeProfile: 'default',
|
|
78
|
+
daUsername: '',
|
|
79
|
+
daLoginKey: '',
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function writeConfig(config) {
|
|
84
|
+
ensureDir();
|
|
85
|
+
fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2), { mode: 0o600 });
|
|
86
|
+
}
|
|
87
|
+
function getConfig() {
|
|
88
|
+
return readConfig();
|
|
89
|
+
}
|
|
90
|
+
function setConfig(key, value) {
|
|
91
|
+
const config = readConfig();
|
|
92
|
+
config[key] = value;
|
|
93
|
+
writeConfig(config);
|
|
94
|
+
}
|
|
95
|
+
function setProfile(name, profile) {
|
|
96
|
+
const config = readConfig();
|
|
97
|
+
config.profiles[name] = profile;
|
|
98
|
+
config.activeProfile = name;
|
|
99
|
+
config.server = profile.server;
|
|
100
|
+
config.username = profile.username;
|
|
101
|
+
config.password = profile.password;
|
|
102
|
+
config.domain = profile.domain;
|
|
103
|
+
writeConfig(config);
|
|
104
|
+
}
|
|
105
|
+
function switchProfile(name) {
|
|
106
|
+
const config = readConfig();
|
|
107
|
+
if (!config.profiles[name])
|
|
108
|
+
return false;
|
|
109
|
+
const profile = config.profiles[name];
|
|
110
|
+
config.activeProfile = name;
|
|
111
|
+
config.server = profile.server;
|
|
112
|
+
config.username = profile.username;
|
|
113
|
+
config.password = profile.password;
|
|
114
|
+
config.domain = profile.domain;
|
|
115
|
+
writeConfig(config);
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
function getProfiles() {
|
|
119
|
+
return readConfig().profiles;
|
|
120
|
+
}
|
|
121
|
+
function deleteProfile(name) {
|
|
122
|
+
const config = readConfig();
|
|
123
|
+
if (!config.profiles[name])
|
|
124
|
+
return false;
|
|
125
|
+
delete config.profiles[name];
|
|
126
|
+
if (config.activeProfile === name) {
|
|
127
|
+
const remaining = Object.keys(config.profiles);
|
|
128
|
+
if (remaining.length > 0) {
|
|
129
|
+
const p = config.profiles[remaining[0]];
|
|
130
|
+
config.activeProfile = remaining[0];
|
|
131
|
+
config.server = p.server;
|
|
132
|
+
config.username = p.username;
|
|
133
|
+
config.password = p.password;
|
|
134
|
+
config.domain = p.domain;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
config.activeProfile = 'default';
|
|
138
|
+
config.server = '';
|
|
139
|
+
config.username = '';
|
|
140
|
+
config.password = '';
|
|
141
|
+
config.domain = '';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
writeConfig(config);
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
function getConfigPath() {
|
|
148
|
+
return CONFIG_FILE;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,8BAEC;AAED,8BAIC;AAED,gCASC;AAED,sCAWC;AAED,kCAEC;AAED,sCAuBC;AAED,sCAEC;AAnID,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAoBzB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,aAAa,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rB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface DACredentials {
|
|
2
|
+
server: string;
|
|
3
|
+
username: string;
|
|
4
|
+
loginKey: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function listDomains(creds: DACredentials): Promise<string[]>;
|
|
7
|
+
export declare function getDomainInfo(creds: DACredentials, domain: string): Promise<any>;
|
|
8
|
+
export declare function listEmailAccounts(creds: DACredentials, domain: string): Promise<string[]>;
|
|
9
|
+
export declare function getEmailAccountInfo(creds: DACredentials, domain: string, user: string): Promise<any>;
|
|
10
|
+
export declare function createEmailAccount(creds: DACredentials, domain: string, user: string, password: string, quota?: number): Promise<any>;
|
|
11
|
+
export declare function deleteEmailAccount(creds: DACredentials, domain: string, user: string): Promise<any>;
|
|
12
|
+
export declare function changeEmailPassword(creds: DACredentials, domain: string, user: string, password: string): Promise<any>;
|
|
13
|
+
export declare function changeEmailQuota(creds: DACredentials, domain: string, user: string, quota: number): Promise<any>;
|
|
14
|
+
export declare function listForwarders(creds: DACredentials, domain: string): Promise<string[]>;
|
|
15
|
+
export declare function getForwarderDestination(creds: DACredentials, domain: string, user: string): Promise<string>;
|
|
16
|
+
export declare function createForwarder(creds: DACredentials, domain: string, user: string, destination: string): Promise<any>;
|
|
17
|
+
export declare function deleteForwarder(creds: DACredentials, domain: string, user: string): Promise<any>;
|
|
18
|
+
export declare function getCatchAll(creds: DACredentials, domain: string): Promise<string>;
|
|
19
|
+
export declare function setCatchAll(creds: DACredentials, domain: string, value: string): Promise<any>;
|
|
20
|
+
export declare function getQuotaUsage(creds: DACredentials): Promise<any>;
|
|
21
|
+
export declare function getUserConfig(creds: DACredentials): Promise<any>;
|
|
22
|
+
export declare function listDomainPointers(creds: DACredentials, domain: string): Promise<Record<string, string>>;
|
|
23
|
+
export declare function getSpamConfig(creds: DACredentials, domain: string): Promise<any>;
|
|
24
|
+
export declare function setSpamConfig(creds: DACredentials, domain: string, settings: Record<string, string>): Promise<any>;
|
|
25
|
+
export declare function addDomainPointer(creds: DACredentials, domain: string, pointer: string): Promise<any>;
|
|
26
|
+
export declare function deleteDomainPointer(creds: DACredentials, domain: string, pointer: string): Promise<any>;
|
|
27
|
+
export declare function listEmailFilters(creds: DACredentials, domain: string, user: string): Promise<any[]>;
|
|
28
|
+
export declare function createEmailFilter(creds: DACredentials, domain: string, user: string, filterData: Record<string, string>): Promise<any>;
|
|
29
|
+
export declare function deleteEmailFilter(creds: DACredentials, domain: string, user: string, filterName: string): Promise<any>;
|
|
30
|
+
export declare function testAuth(creds: DACredentials): Promise<{
|
|
31
|
+
success: boolean;
|
|
32
|
+
message: string;
|
|
33
|
+
username?: string;
|
|
34
|
+
}>;
|
|
35
|
+
export declare function listAutoresponders(creds: DACredentials, domain: string): Promise<string[]>;
|
|
36
|
+
export declare function getAutoresponder(creds: DACredentials, domain: string, user: string): Promise<any>;
|
|
37
|
+
export declare function createAutoresponder(creds: DACredentials, domain: string, user: string, text: string, cc?: string): Promise<any>;
|
|
38
|
+
export declare function modifyAutoresponder(creds: DACredentials, domain: string, user: string, text: string, cc?: string): Promise<any>;
|
|
39
|
+
export declare function deleteAutoresponder(creds: DACredentials, domain: string, user: string): Promise<any>;
|
|
40
|
+
export declare function listDnsRecords(creds: DACredentials, domain: string): Promise<any>;
|
|
41
|
+
export declare function addDnsRecord(creds: DACredentials, domain: string, type: string, name: string, value: string, priority?: number): Promise<any>;
|
|
42
|
+
export declare function deleteDnsRecord(creds: DACredentials, domain: string, type: string, name: string, value: string): Promise<any>;
|
|
43
|
+
export declare function getDkimKey(creds: DACredentials, domain: string): Promise<string | null>;
|
|
44
|
+
export declare function listMailingLists(creds: DACredentials, domain: string): Promise<string[]>;
|
|
45
|
+
export declare function getMailingListMembers(creds: DACredentials, domain: string, name: string): Promise<string[]>;
|
|
46
|
+
export declare function createMailingList(creds: DACredentials, domain: string, name: string): Promise<any>;
|
|
47
|
+
export declare function deleteMailingList(creds: DACredentials, domain: string, name: string): Promise<any>;
|
|
48
|
+
export declare function addMailingListMember(creds: DACredentials, domain: string, name: string, email: string): Promise<any>;
|
|
49
|
+
export declare function removeMailingListMember(creds: DACredentials, domain: string, name: string, email: string): Promise<any>;
|