nothumanallowed 13.5.121 → 13.5.122
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.122",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '13.5.
|
|
8
|
+
export const VERSION = '13.5.122';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ const DB_PATH = join(NHA_DIR, 'email.db');
|
|
|
18
18
|
let _db = null;
|
|
19
19
|
|
|
20
20
|
export function getDb() {
|
|
21
|
-
if (_db) return _db;
|
|
21
|
+
if (_db && _db.open) return _db;
|
|
22
22
|
mkdirSync(NHA_DIR, { recursive: true });
|
|
23
23
|
_db = new Database(DB_PATH);
|
|
24
24
|
_db.pragma('journal_mode = WAL');
|
|
@@ -56,14 +56,16 @@ export async function sendEmail(accountId, opts) {
|
|
|
56
56
|
const msgId = `<${randomUUID()}@nha.local>`;
|
|
57
57
|
const fromLine = creds.from_name ? `${creds.from_name} <${creds.email_address}>` : creds.email_address;
|
|
58
58
|
|
|
59
|
+
const toList = toArray(opts.to);
|
|
60
|
+
if (!toList.length) throw new Error('At least one recipient (To) is required');
|
|
61
|
+
|
|
59
62
|
const mailOpts = {
|
|
60
63
|
messageId: msgId,
|
|
61
64
|
from: fromLine,
|
|
62
|
-
to:
|
|
65
|
+
to: toList.join(', '),
|
|
63
66
|
subject: opts.subject || '',
|
|
64
67
|
html: opts.bodyHtml || '',
|
|
65
68
|
text: opts.bodyText || stripHtml(opts.bodyHtml || ''),
|
|
66
|
-
envelope: { from: creds.email_address, to: toArray(opts.to) },
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
if (opts.cc?.length) mailOpts.cc = Array.isArray(opts.cc) ? opts.cc.join(', ') : opts.cc;
|