@brightsideoy/kama 1.0.0-alpha.33 → 1.0.0-alpha.34
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.
|
@@ -29652,10 +29652,13 @@ async function yw(e) {
|
|
|
29652
29652
|
let e = r.FORMS_SMTP_HOST, t = Number(r.FORMS_SMTP_PORT || 465);
|
|
29653
29653
|
if (typeof e != "string" || !e.trim() || !Number.isInteger(t) || t < 1 || t > 65535) throw Error("FORMS_SMTP_HOST and a valid FORMS_SMTP_PORT are required for SMTP");
|
|
29654
29654
|
if (!!r.FORMS_SMTP_USER != !!r.FORMS_SMTP_PASSWORD) throw Error("FORMS_SMTP_USER and FORMS_SMTP_PASSWORD must be configured together");
|
|
29655
|
-
let n =
|
|
29655
|
+
let n = r.FORMS_SMTP_NAME;
|
|
29656
|
+
if (n !== void 0 && (typeof n != "string" || !n.trim() || /[\r\n]/.test(n))) throw Error("FORMS_SMTP_NAME must be a non-empty hostname without line breaks");
|
|
29657
|
+
let i = (await import("nodemailer")).createTransport({
|
|
29656
29658
|
host: e,
|
|
29657
29659
|
port: t,
|
|
29658
29660
|
secure: r.FORMS_SMTP_SECURE === void 0 ? t === 465 : r.FORMS_SMTP_SECURE === "true",
|
|
29661
|
+
name: n?.trim(),
|
|
29659
29662
|
...r.FORMS_SMTP_USER && r.FORMS_SMTP_PASSWORD ? { auth: {
|
|
29660
29663
|
user: r.FORMS_SMTP_USER,
|
|
29661
29664
|
pass: r.FORMS_SMTP_PASSWORD
|
|
@@ -29669,9 +29672,9 @@ async function yw(e) {
|
|
|
29669
29672
|
name: a.from.name
|
|
29670
29673
|
}
|
|
29671
29674
|
};
|
|
29672
|
-
await
|
|
29675
|
+
await i.sendMail(e);
|
|
29673
29676
|
} finally {
|
|
29674
|
-
|
|
29677
|
+
i.close();
|
|
29675
29678
|
}
|
|
29676
29679
|
return;
|
|
29677
29680
|
}
|
package/dist/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>KAMA</title>
|
|
7
7
|
<link rel="icon" href="/favicon.png">
|
|
8
8
|
<link rel="apple-touch-icon" sizes="180x180" href="/favicon.png">
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-BqYAx1k8.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-BK_c4R_m.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/useCmsState-CDENPbKL.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/useTaxonomies-_-T_4Iu-.js">
|
package/dist/index.js
CHANGED
|
@@ -29882,10 +29882,13 @@ async function yw(e) {
|
|
|
29882
29882
|
let e = r.FORMS_SMTP_HOST, t = Number(r.FORMS_SMTP_PORT || 465);
|
|
29883
29883
|
if (typeof e != "string" || !e.trim() || !Number.isInteger(t) || t < 1 || t > 65535) throw Error("FORMS_SMTP_HOST and a valid FORMS_SMTP_PORT are required for SMTP");
|
|
29884
29884
|
if (!!r.FORMS_SMTP_USER != !!r.FORMS_SMTP_PASSWORD) throw Error("FORMS_SMTP_USER and FORMS_SMTP_PASSWORD must be configured together");
|
|
29885
|
-
let n =
|
|
29885
|
+
let n = r.FORMS_SMTP_NAME;
|
|
29886
|
+
if (n !== void 0 && (typeof n != "string" || !n.trim() || /[\r\n]/.test(n))) throw Error("FORMS_SMTP_NAME must be a non-empty hostname without line breaks");
|
|
29887
|
+
let i = (await import("nodemailer")).createTransport({
|
|
29886
29888
|
host: e,
|
|
29887
29889
|
port: t,
|
|
29888
29890
|
secure: r.FORMS_SMTP_SECURE === void 0 ? t === 465 : r.FORMS_SMTP_SECURE === "true",
|
|
29891
|
+
name: n?.trim(),
|
|
29889
29892
|
...r.FORMS_SMTP_USER && r.FORMS_SMTP_PASSWORD ? { auth: {
|
|
29890
29893
|
user: r.FORMS_SMTP_USER,
|
|
29891
29894
|
pass: r.FORMS_SMTP_PASSWORD
|
|
@@ -29899,9 +29902,9 @@ async function yw(e) {
|
|
|
29899
29902
|
name: a.from.name
|
|
29900
29903
|
}
|
|
29901
29904
|
};
|
|
29902
|
-
await
|
|
29905
|
+
await i.sendMail(e);
|
|
29903
29906
|
} finally {
|
|
29904
|
-
|
|
29907
|
+
i.close();
|
|
29905
29908
|
}
|
|
29906
29909
|
return;
|
|
29907
29910
|
}
|
package/dist/schema-compiler.js
CHANGED
|
@@ -30,7 +30,7 @@ async function f() {
|
|
|
30
30
|
if (n(f)) l = (await import(t(f).href)).compileDefinitions;
|
|
31
31
|
else if (n(p)) l = (await import(t(p).href)).compileDefinitions;
|
|
32
32
|
else try {
|
|
33
|
-
l = (await import("./dist-
|
|
33
|
+
l = (await import("./dist-Ce_yqEAS.js")).compileDefinitions;
|
|
34
34
|
} catch (e) {
|
|
35
35
|
console.error("\x1B[31m ✖\x1B[0m \x1B[31mCould not resolve Kama Schema Engine:\x1B[0m", e), process.exit(1);
|
|
36
36
|
}
|
package/documentation/FORMS.md
CHANGED
|
@@ -195,12 +195,17 @@ FORMS_EMAIL_PROVIDER=smtp
|
|
|
195
195
|
FORMS_SMTP_HOST=smtp.example.com
|
|
196
196
|
FORMS_SMTP_PORT=465
|
|
197
197
|
FORMS_SMTP_SECURE=true
|
|
198
|
+
FORMS_SMTP_NAME=mailer.example.com
|
|
198
199
|
FORMS_SMTP_USER=...
|
|
199
200
|
FORMS_SMTP_PASSWORD=...
|
|
200
201
|
FORMS_EMAIL_FROM=forms@example.com
|
|
201
202
|
FORMS_EMAIL_FROM_NAME=KAMA
|
|
202
203
|
```
|
|
203
204
|
|
|
205
|
+
`FORMS_SMTP_NAME` is optional and sets the hostname sent in the SMTP `EHLO`
|
|
206
|
+
greeting. Set it to the sender server's fully qualified hostname when the SMTP
|
|
207
|
+
relay requires one; otherwise Nodemailer uses the Node process's OS hostname.
|
|
208
|
+
|
|
204
209
|
For Cloudflare authenticated SMTP, use `smtp.mx.cloudflare.net:465`, username
|
|
205
210
|
`api_token`, and an Email Sending: Edit API token as the password. Keep SMTP
|
|
206
211
|
credentials in the deployment's secret manager, never in form YAML. Use valid
|