@blazetrails/actionmailbox 0.0.0-stage → 0.1.0-alpha0.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/LICENSE +21 -0
- package/dist/.trails/views/layouts/trails/conductor.html.tse.js +20 -0
- package/dist/.trails/views/layouts/trails/conductor.html.tse.js.map +1 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/index.html.tse.js +46 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/index.html.tse.js.map +1 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/new.html.tse.js +75 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/new.html.tse.js.map +1 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/show.html.tse.js +45 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/show.html.tse.js.map +1 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/sources/new.html.tse.js +43 -0
- package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/sources/new.html.tse.js.map +1 -0
- package/dist/action-mailbox.js +26 -0
- package/dist/action-mailbox.js.map +1 -0
- package/dist/app/controllers/action-mailbox/base-controller.js +56 -0
- package/dist/app/controllers/action-mailbox/base-controller.js.map +1 -0
- package/dist/app/controllers/action-mailbox/ingresses/mailgun/inbound-emails-controller.js +83 -0
- package/dist/app/controllers/action-mailbox/ingresses/mailgun/inbound-emails-controller.js.map +1 -0
- package/dist/app/controllers/action-mailbox/ingresses/mandrill/inbound-emails-controller.js +88 -0
- package/dist/app/controllers/action-mailbox/ingresses/mandrill/inbound-emails-controller.js.map +1 -0
- package/dist/app/controllers/action-mailbox/ingresses/postmark/inbound-emails-controller.js +35 -0
- package/dist/app/controllers/action-mailbox/ingresses/postmark/inbound-emails-controller.js.map +1 -0
- package/dist/app/controllers/action-mailbox/ingresses/relay/inbound-emails-controller.js +25 -0
- package/dist/app/controllers/action-mailbox/ingresses/relay/inbound-emails-controller.js.map +1 -0
- package/dist/app/controllers/action-mailbox/ingresses/sendgrid/inbound-emails-controller.js +37 -0
- package/dist/app/controllers/action-mailbox/ingresses/sendgrid/inbound-emails-controller.js.map +1 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/inbound-emails/sources-controller.js +13 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/inbound-emails/sources-controller.js.map +1 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/inbound-emails-controller.js +53 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/inbound-emails-controller.js.map +1 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/incinerates-controller.js +12 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/incinerates-controller.js.map +1 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/reroutes-controller.js +18 -0
- package/dist/app/controllers/trails/conductor/action-mailbox/reroutes-controller.js.map +1 -0
- package/dist/app/models/action-mailbox/inbound-email/incineratable/incineration.js +22 -0
- package/dist/app/models/action-mailbox/inbound-email/incineratable/incineration.js.map +1 -0
- package/dist/app/models/action-mailbox/inbound-email/incineratable.js +24 -0
- package/dist/app/models/action-mailbox/inbound-email/incineratable.js.map +1 -0
- package/dist/app/models/action-mailbox/inbound-email/message-id.js +57 -0
- package/dist/app/models/action-mailbox/inbound-email/message-id.js.map +1 -0
- package/dist/app/models/action-mailbox/inbound-email/routable.js +17 -0
- package/dist/app/models/action-mailbox/inbound-email/routable.js.map +1 -0
- package/dist/app/models/action-mailbox/inbound-email.js +50 -0
- package/dist/app/models/action-mailbox/inbound-email.js.map +1 -0
- package/dist/app/models/action-mailbox/record.js +12 -0
- package/dist/app/models/action-mailbox/record.js.map +1 -0
- package/dist/app/views/layouts/trails/conductor.html.tse +8 -0
- package/dist/app/views/trails/conductor/action-mailbox/inbound-emails/index.html.tse +16 -0
- package/dist/app/views/trails/conductor/action-mailbox/inbound-emails/new.html.tse +52 -0
- package/dist/app/views/trails/conductor/action-mailbox/inbound-emails/show.html.tse +15 -0
- package/dist/app/views/trails/conductor/action-mailbox/inbound-emails/sources/new.html.tse +12 -0
- package/dist/base.js +71 -0
- package/dist/base.js.map +1 -0
- package/dist/callbacks.js +30 -0
- package/dist/callbacks.js.map +1 -0
- package/dist/config/routes.js +52 -0
- package/dist/config/routes.js.map +1 -0
- package/dist/constants.action-mailbox-install-install-generator.generated.js +4 -0
- package/dist/constants.action-mailbox-install-install-generator.generated.js.map +1 -0
- package/dist/constants.engine.generated.js +4 -0
- package/dist/constants.engine.generated.js.map +1 -0
- package/dist/constants.generated.js +80 -0
- package/dist/constants.generated.js.map +1 -0
- package/dist/constants.inbound-email.generated.js +4 -0
- package/dist/constants.inbound-email.generated.js.map +1 -0
- package/dist/constants.incineratable-incineration.generated.js +6 -0
- package/dist/constants.incineratable-incineration.generated.js.map +1 -0
- package/dist/constants.incineratable.generated.js +4 -0
- package/dist/constants.incineratable.generated.js.map +1 -0
- package/dist/constants.message-id.generated.js +7 -0
- package/dist/constants.message-id.generated.js.map +1 -0
- package/dist/constants.routable.generated.js +4 -0
- package/dist/constants.routable.generated.js.map +1 -0
- package/dist/db/migrate/20180917164000_create_action_mailbox_tables.js +23 -0
- package/dist/db/migrate/20180917164000_create_action_mailbox_tables.js.map +1 -0
- package/dist/deprecator.js +9 -0
- package/dist/deprecator.js.map +1 -0
- package/dist/engine.js +55 -0
- package/dist/engine.js.map +1 -0
- package/dist/gem-version.js +16 -0
- package/dist/gem-version.js.map +1 -0
- package/dist/generators/action-mailbox/install/install-generator.js +29 -0
- package/dist/generators/action-mailbox/install/install-generator.js.map +1 -0
- package/dist/incineration-job.js +17 -0
- package/dist/incineration-job.js.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/mail-ext/address-equality.js +8 -0
- package/dist/mail-ext/address-equality.js.map +1 -0
- package/dist/mail-ext/address-wrapping.js +6 -0
- package/dist/mail-ext/address-wrapping.js.map +1 -0
- package/dist/mail-ext/addresses.js +48 -0
- package/dist/mail-ext/addresses.js.map +1 -0
- package/dist/mail-ext/from-source.js +7 -0
- package/dist/mail-ext/from-source.js.map +1 -0
- package/dist/mail-ext/recipients.js +14 -0
- package/dist/mail-ext/recipients.js.map +1 -0
- package/dist/mail-ext.js +6 -0
- package/dist/mail-ext.js.map +1 -0
- package/dist/relayer.js +79 -0
- package/dist/relayer.js.map +1 -0
- package/dist/router/route.js +46 -0
- package/dist/router/route.js.map +1 -0
- package/dist/router.js +43 -0
- package/dist/router.js.map +1 -0
- package/dist/routing-job.js +12 -0
- package/dist/routing-job.js.map +1 -0
- package/dist/routing.js +21 -0
- package/dist/routing.js.map +1 -0
- package/dist/tasks/ingress.rake.js +62 -0
- package/dist/tasks/ingress.rake.js.map +1 -0
- package/dist/tasks/install.rake.js +8 -0
- package/dist/tasks/install.rake.js.map +1 -0
- package/dist/test-case.js +12 -0
- package/dist/test-case.js.map +1 -0
- package/dist/test-helper.js +41 -0
- package/dist/test-helper.js.map +1 -0
- package/dist/trails/generators/mailbox/USAGE +10 -0
- package/dist/trails/generators/mailbox/USAGE.js +12 -0
- package/dist/trails/generators/mailbox/mailbox-generator.js +32 -0
- package/dist/trails/generators/mailbox/mailbox-generator.js.map +1 -0
- package/dist/trails/generators/mailbox/templates/application_mailbox.ts.tt +5 -0
- package/dist/trails/generators/mailbox/templates/application_mailbox.ts.tt.js +12 -0
- package/dist/trails/generators/mailbox/templates/mailbox.ts.tt +5 -0
- package/dist/trails/generators/mailbox/templates/mailbox.ts.tt.js +18 -0
- package/dist/trails/generators/test-unit/mailbox/mailbox-generator.js +24 -0
- package/dist/trails/generators/test-unit/mailbox/mailbox-generator.js.map +1 -0
- package/dist/trails/generators/test-unit/mailbox/templates/mailbox_test.ts.tt +13 -0
- package/dist/trails/generators/test-unit/mailbox/templates/mailbox_test.ts.tt.js +18 -0
- package/dist/types/action-mailbox.d.ts +40 -0
- package/dist/types/app/controllers/action-mailbox/base-controller.d.ts +33 -0
- package/dist/types/app/controllers/action-mailbox/ingresses/mailgun/inbound-emails-controller.d.ts +33 -0
- package/dist/types/app/controllers/action-mailbox/ingresses/mandrill/inbound-emails-controller.d.ts +33 -0
- package/dist/types/app/controllers/action-mailbox/ingresses/postmark/inbound-emails-controller.d.ts +7 -0
- package/dist/types/app/controllers/action-mailbox/ingresses/relay/inbound-emails-controller.d.ts +7 -0
- package/dist/types/app/controllers/action-mailbox/ingresses/sendgrid/inbound-emails-controller.d.ts +9 -0
- package/dist/types/app/controllers/trails/conductor/action-mailbox/inbound-emails/sources-controller.d.ts +7 -0
- package/dist/types/app/controllers/trails/conductor/action-mailbox/inbound-emails-controller.d.ts +18 -0
- package/dist/types/app/controllers/trails/conductor/action-mailbox/incinerates-controller.d.ts +6 -0
- package/dist/types/app/controllers/trails/conductor/action-mailbox/reroutes-controller.d.ts +8 -0
- package/dist/types/app/models/action-mailbox/inbound-email/incineratable/incineration.d.ts +12 -0
- package/dist/types/app/models/action-mailbox/inbound-email/incineratable.d.ts +9 -0
- package/dist/types/app/models/action-mailbox/inbound-email/message-id.d.ts +27 -0
- package/dist/types/app/models/action-mailbox/inbound-email/routable.d.ts +14 -0
- package/dist/types/app/models/action-mailbox/inbound-email.d.ts +46 -0
- package/dist/types/app/models/action-mailbox/record.d.ts +5 -0
- package/dist/types/base.d.ts +44 -0
- package/dist/types/callbacks.d.ts +29 -0
- package/dist/types/config/routes.d.ts +2 -0
- package/dist/types/constants.action-mailbox-install-install-generator.generated.d.ts +2 -0
- package/dist/types/constants.engine.generated.d.ts +2 -0
- package/dist/types/constants.generated.d.ts +2 -0
- package/dist/types/constants.inbound-email.generated.d.ts +2 -0
- package/dist/types/constants.incineratable-incineration.generated.d.ts +2 -0
- package/dist/types/constants.incineratable.generated.d.ts +2 -0
- package/dist/types/constants.message-id.generated.d.ts +2 -0
- package/dist/types/constants.routable.generated.d.ts +2 -0
- package/dist/types/db/migrate/20180917164000_create_action_mailbox_tables.d.ts +9 -0
- package/dist/types/deprecator.d.ts +4 -0
- package/dist/types/engine.d.ts +32 -0
- package/dist/types/gem-version.d.ts +10 -0
- package/dist/types/generators/action-mailbox/install/install-generator.d.ts +10 -0
- package/dist/types/incineration-job.d.ts +7 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/mail-ext/address-equality.d.ts +8 -0
- package/dist/types/mail-ext/address-wrapping.d.ts +8 -0
- package/dist/types/mail-ext/addresses.d.ts +22 -0
- package/dist/types/mail-ext/from-source.d.ts +8 -0
- package/dist/types/mail-ext/recipients.d.ts +8 -0
- package/dist/types/mail-ext.d.ts +6 -0
- package/dist/types/relayer.d.ts +37 -0
- package/dist/types/router/route.d.ts +16 -0
- package/dist/types/router.d.ts +32 -0
- package/dist/types/routing-job.d.ts +6 -0
- package/dist/types/routing.d.ts +19 -0
- package/dist/types/tasks/ingress.rake.d.ts +2 -0
- package/dist/types/tasks/install.rake.d.ts +2 -0
- package/dist/types/test-case.d.ts +7 -0
- package/dist/types/test-helper.d.ts +28 -0
- package/dist/types/trails/generators/mailbox/mailbox-generator.d.ts +11 -0
- package/dist/types/trails/generators/test-unit/mailbox/mailbox-generator.d.ts +9 -0
- package/dist/types/version.d.ts +3 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +63 -3
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dean Marano and Trails contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default async function render(context, locals, __block) {
|
|
2
|
+
void context;
|
|
3
|
+
void locals;
|
|
4
|
+
const localAssigns = locals;
|
|
5
|
+
void localAssigns;
|
|
6
|
+
const __view = context;
|
|
7
|
+
context = Object.create(__view, { yield: { value: (...name) => (name.length > 0 ? __block(...name) : __block !== undefined ? __block() : Reflect.get(__view, "yield")) } });
|
|
8
|
+
const _ob = context.outputBuffer;
|
|
9
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
10
|
+
_ob.safeAppend("<!-- BEGIN /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/layouts/trails/conductor.html.tse -->");
|
|
11
|
+
_ob.safeAppend("<html>\n<head>\n <title>Trails Conductor: ");
|
|
12
|
+
_ob.append(await (context.yield("title")));
|
|
13
|
+
_ob.safeAppend("</title>\n</head>\n<body>\n");
|
|
14
|
+
_ob.append(await (context.yield()));
|
|
15
|
+
_ob.safeAppend("\n</body>\n</html>\n");
|
|
16
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
17
|
+
_ob.safeAppend("<!-- END /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/layouts/trails/conductor.html.tse -->");
|
|
18
|
+
return _ob;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=conductor.html.tse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor.html.tse.js","sourceRoot":"","sources":["../../../../app/views/layouts/trails/conductor.html.tse"],"sourcesContent":["<html>\n<head>\n <title>Trails Conductor: <%= yield(\"title\") %></title>\n</head>\n<body>\n<%= yield() %>\n</body>\n</html>\n"],"mappings":";;;;;;;;;;IAAE,GAAG,CAAC,UAAU,CAAC,6CAA6C,CAAC,CAAC;IAE3B,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,OAAA,CAAA,KAAA,CAAA,OAAO,CAAC,CAAC,CAAC,CAAC;IAA9C,GAAG,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;IAG5C,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,OAAO,CAAC,KAAD,EAAE,CAAC,CAAC,CAAC;IAAd,GAAG,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { hashAref as __hashAref, keys as __keys } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { TopLevel } from "@blazetrails/actionview";
|
|
3
|
+
export default async function render(context, locals, __block) {
|
|
4
|
+
void context;
|
|
5
|
+
void locals;
|
|
6
|
+
const localAssigns = locals;
|
|
7
|
+
void localAssigns;
|
|
8
|
+
const __view = context;
|
|
9
|
+
context = Object.create(__view, { yield: { value: (...name) => (name.length > 0 ? __block(...name) : __block !== undefined ? __block() : Reflect.get(__view, "yield")) } });
|
|
10
|
+
const _ob = context.outputBuffer;
|
|
11
|
+
const __own = Object.create(null);
|
|
12
|
+
const __lookup = (name, guarded = false) => { for (const scope of [...[locals, this, TopLevel], __own, globalThis])
|
|
13
|
+
if (scope === localAssigns ? __keys(localAssigns).includes(name) : name in scope) {
|
|
14
|
+
const value = scope === localAssigns ? __hashAref(localAssigns, name) : Reflect.get(scope, name);
|
|
15
|
+
return scope === this && typeof value === "function" ? value.bind(this) : value;
|
|
16
|
+
} if (guarded)
|
|
17
|
+
return undefined; const error = new ReferenceError(name + " is not defined"); Error.captureStackTrace?.(error, __lookup); throw error; };
|
|
18
|
+
const __assign = (name, value) => { for (const scope of [locals, this, TopLevel])
|
|
19
|
+
if (name in scope) {
|
|
20
|
+
Reflect.set(scope, name, value);
|
|
21
|
+
return value;
|
|
22
|
+
} __own[name] = value; return value; };
|
|
23
|
+
void __assign;
|
|
24
|
+
const __sink = new Proxy({}, { set: (_target, name, value) => (__assign(name, value), true) });
|
|
25
|
+
void __sink;
|
|
26
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
27
|
+
_ob.safeAppend("<!-- BEGIN /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/index.html.tse -->");
|
|
28
|
+
__lookup("provide")("title", "Deliver new inbound email");
|
|
29
|
+
_ob.safeAppend("\n<h1>All inbound emails</h1>\n\n");
|
|
30
|
+
_ob.append(await (__lookup("linkTo")("New inbound email by form", __lookup("mainApp").newTrailsConductorInboundEmailPath())));
|
|
31
|
+
_ob.safeAppend(" |\n");
|
|
32
|
+
_ob.append(await (__lookup("linkTo")("New inbound email by source", __lookup("mainApp").newTrailsConductorInboundEmailSourcePath())));
|
|
33
|
+
_ob.safeAppend("\n\n<table>\n <tr><th>Message ID</th><th>Status</th></tr>\n");
|
|
34
|
+
for (const inboundEmail of this.inboundEmails) {
|
|
35
|
+
_ob.safeAppend(" <tr>\n <td>");
|
|
36
|
+
_ob.append(await (__lookup("linkTo")(inboundEmail.messageId, __lookup("mainApp").trailsConductorInboundEmailPath(inboundEmail))));
|
|
37
|
+
_ob.safeAppend("</td>\n <td>");
|
|
38
|
+
_ob.append(await (inboundEmail.status));
|
|
39
|
+
_ob.safeAppend("</td>\n </tr>\n");
|
|
40
|
+
}
|
|
41
|
+
_ob.safeAppend("</table>\n");
|
|
42
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
43
|
+
_ob.safeAppend("<!-- END /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/index.html.tse -->");
|
|
44
|
+
return _ob;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=index.html.tse.js.map
|
package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/index.html.tse.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.html.tse.js","sourceRoot":"","sources":["../../../../../../app/views/trails/conductor/action-mailbox/inbound-emails/index.html.tse"],"sourcesContent":["<% provide(\"title\", \"Deliver new inbound email\") %>\n\n<h1>All inbound emails</h1>\n\n<%= linkTo(\"New inbound email by form\", mainApp.newTrailsConductorInboundEmailPath()) %> |\n<%= linkTo(\"New inbound email by source\", mainApp.newTrailsConductorInboundEmailSourcePath()) %>\n\n<table>\n <tr><th>Message ID</th><th>Status</th></tr>\n <% for (const inboundEmail of this.inboundEmails) { %>\n <tr>\n <td><%= linkTo(inboundEmail.messageId, mainApp.trailsConductorInboundEmailPath(inboundEmail)) %></td>\n <td><%= inboundEmail.status %></td>\n </tr>\n <% } %>\n</table>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAAG,mBAAO,CAAC,OAAO,EAAE,2BAA2B,CAAC,CAAC;IAC/C,GAAG,CAAC,UAAU,CAAC,mCAAmC,CAAC,CAAC;IAGlD,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,kBAAM,CAAC,2BAA2B,EAAE,mBAAO,CAAC,kCAAkC,EAAE,CAAC,CAAC,CAAC,CAAC;IAAtF,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACrB,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,kBAAM,CAAC,6BAA6B,EAAE,mBAAO,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAC,CAAC;IAA9F,GAAG,CAAC,UAAU,CAAC,8DAA8D,CAAC,CAAC;IAI5E,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;QACnD,GAAG,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC;QAC3B,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,kBAAM,CAAC,YAAY,CAAC,SAAS,EAAE,mBAAO,CAAC,+BAA+B,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAApG,GAAG,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;QACxB,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;QAAlC,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAElC,CAAC;IACJ,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { hashAref as __hashAref, keys as __keys } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { TopLevel } from "@blazetrails/actionview";
|
|
3
|
+
export default async function render(context, locals, __block) {
|
|
4
|
+
void context;
|
|
5
|
+
void locals;
|
|
6
|
+
const localAssigns = locals;
|
|
7
|
+
void localAssigns;
|
|
8
|
+
const __view = context;
|
|
9
|
+
context = Object.create(__view, { yield: { value: (...name) => (name.length > 0 ? __block(...name) : __block !== undefined ? __block() : Reflect.get(__view, "yield")) } });
|
|
10
|
+
const _ob = context.outputBuffer;
|
|
11
|
+
const __own = Object.create(null);
|
|
12
|
+
const __lookup = (name, guarded = false) => { for (const scope of [...[locals, this, TopLevel], __own, globalThis])
|
|
13
|
+
if (scope === localAssigns ? __keys(localAssigns).includes(name) : name in scope) {
|
|
14
|
+
const value = scope === localAssigns ? __hashAref(localAssigns, name) : Reflect.get(scope, name);
|
|
15
|
+
return scope === this && typeof value === "function" ? value.bind(this) : value;
|
|
16
|
+
} if (guarded)
|
|
17
|
+
return undefined; const error = new ReferenceError(name + " is not defined"); Error.captureStackTrace?.(error, __lookup); throw error; };
|
|
18
|
+
const __assign = (name, value) => { for (const scope of [locals, this, TopLevel])
|
|
19
|
+
if (name in scope) {
|
|
20
|
+
Reflect.set(scope, name, value);
|
|
21
|
+
return value;
|
|
22
|
+
} __own[name] = value; return value; };
|
|
23
|
+
void __assign;
|
|
24
|
+
const __sink = new Proxy({}, { set: (_target, name, value) => (__assign(name, value), true) });
|
|
25
|
+
void __sink;
|
|
26
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
27
|
+
_ob.safeAppend("<!-- BEGIN /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/new.html.tse -->");
|
|
28
|
+
__lookup("provide")("title", "Deliver new inbound email");
|
|
29
|
+
_ob.safeAppend("\n<h1>Deliver new inbound email</h1>\n\n");
|
|
30
|
+
_ob.append(await (__lookup("formWith")({ url: __lookup("mainApp").trailsConductorInboundEmailsPath(), scope: "mail", local: true }, async (form) => {
|
|
31
|
+
context.outputBuffer.safeAppend("\n <div>\n ");
|
|
32
|
+
context.outputBuffer.append(await (form.label("from", "From")));
|
|
33
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
34
|
+
context.outputBuffer.append(await (form.textField("from", { value: __lookup("params")().get("from") })));
|
|
35
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
36
|
+
context.outputBuffer.append(await (form.label("to", "To")));
|
|
37
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
38
|
+
context.outputBuffer.append(await (form.textField("to", { value: __lookup("params")().get("to") })));
|
|
39
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
40
|
+
context.outputBuffer.append(await (form.label("cc", "CC")));
|
|
41
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
42
|
+
context.outputBuffer.append(await (form.textField("cc", { value: __lookup("params")().get("cc") })));
|
|
43
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
44
|
+
context.outputBuffer.append(await (form.label("bcc", "BCC")));
|
|
45
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
46
|
+
context.outputBuffer.append(await (form.textField("bcc", { value: __lookup("params")().get("bcc") })));
|
|
47
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
48
|
+
context.outputBuffer.append(await (form.label("x_original_to", "X-Original-To")));
|
|
49
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
50
|
+
context.outputBuffer.append(await (form.textField("x_original_to", { value: __lookup("params")().get("x_original_to") })));
|
|
51
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
52
|
+
context.outputBuffer.append(await (form.label("in_reply_to", "In-Reply-To")));
|
|
53
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
54
|
+
context.outputBuffer.append(await (form.textField("in_reply_to", { value: __lookup("params")().get("in_reply_to") })));
|
|
55
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
56
|
+
context.outputBuffer.append(await (form.label("subject", "Subject")));
|
|
57
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
58
|
+
context.outputBuffer.append(await (form.textField("subject", { value: __lookup("params")().get("subject") })));
|
|
59
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
60
|
+
context.outputBuffer.append(await (form.label("body", "Body")));
|
|
61
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
62
|
+
context.outputBuffer.append(await (form.textarea("body", { size: "40x20", value: __lookup("params")().get("body") })));
|
|
63
|
+
context.outputBuffer.safeAppend("\n </div>\n\n <div>\n ");
|
|
64
|
+
context.outputBuffer.append(await (form.label("attachments", "Attachments")));
|
|
65
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
66
|
+
context.outputBuffer.append(await (form.fileField("attachments", { multiple: true })));
|
|
67
|
+
context.outputBuffer.safeAppend("\n </div>\n\n ");
|
|
68
|
+
context.outputBuffer.append(await (form.submit("Deliver inbound email")));
|
|
69
|
+
context.outputBuffer.safeAppend("\n");
|
|
70
|
+
})));
|
|
71
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
72
|
+
_ob.safeAppend("<!-- END /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/new.html.tse -->");
|
|
73
|
+
return _ob;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=new.html.tse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new.html.tse.js","sourceRoot":"","sources":["../../../../../../app/views/trails/conductor/action-mailbox/inbound-emails/new.html.tse"],"sourcesContent":["<% provide(\"title\", \"Deliver new inbound email\") %>\n\n<h1>Deliver new inbound email</h1>\n\n<%= formWith({ url: mainApp.trailsConductorInboundEmailsPath(), scope: \"mail\", local: true }, (form) => { %>\n <div>\n <%= form.label(\"from\", \"From\") %><br>\n <%= form.textField(\"from\", { value: params().get(\"from\") }) %>\n </div>\n\n <div>\n <%= form.label(\"to\", \"To\") %><br>\n <%= form.textField(\"to\", { value: params().get(\"to\") }) %>\n </div>\n\n <div>\n <%= form.label(\"cc\", \"CC\") %><br>\n <%= form.textField(\"cc\", { value: params().get(\"cc\") }) %>\n </div>\n\n <div>\n <%= form.label(\"bcc\", \"BCC\") %><br>\n <%= form.textField(\"bcc\", { value: params().get(\"bcc\") }) %>\n </div>\n\n <div>\n <%= form.label(\"x_original_to\", \"X-Original-To\") %><br>\n <%= form.textField(\"x_original_to\", { value: params().get(\"x_original_to\") }) %>\n </div>\n\n <div>\n <%= form.label(\"in_reply_to\", \"In-Reply-To\") %><br>\n <%= form.textField(\"in_reply_to\", { value: params().get(\"in_reply_to\") }) %>\n </div>\n\n <div>\n <%= form.label(\"subject\", \"Subject\") %><br>\n <%= form.textField(\"subject\", { value: params().get(\"subject\") }) %>\n </div>\n\n <div>\n <%= form.label(\"body\", \"Body\") %><br>\n <%= form.textarea(\"body\", { size: \"40x20\", value: params().get(\"body\") }) %>\n </div>\n\n <div>\n <%= form.label(\"attachments\", \"Attachments\") %><br>\n <%= form.f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,MAAA,CAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAA9E,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;QAIzD,OAAA,CAAA,YAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAAjD,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QACxC,OAAA,CAAA,YAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAA1D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAGhD,OAAA,CAAA,YAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;QAA3C,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { hashAref as __hashAref, keys as __keys } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { TopLevel } from "@blazetrails/actionview";
|
|
3
|
+
export default async function render(context, locals, __block) {
|
|
4
|
+
void context;
|
|
5
|
+
void locals;
|
|
6
|
+
const localAssigns = locals;
|
|
7
|
+
void localAssigns;
|
|
8
|
+
const __view = context;
|
|
9
|
+
context = Object.create(__view, { yield: { value: (...name) => (name.length > 0 ? __block(...name) : __block !== undefined ? __block() : Reflect.get(__view, "yield")) } });
|
|
10
|
+
const _ob = context.outputBuffer;
|
|
11
|
+
const __own = Object.create(null);
|
|
12
|
+
const __lookup = (name, guarded = false) => { for (const scope of [...[locals, this, TopLevel], __own, globalThis])
|
|
13
|
+
if (scope === localAssigns ? __keys(localAssigns).includes(name) : name in scope) {
|
|
14
|
+
const value = scope === localAssigns ? __hashAref(localAssigns, name) : Reflect.get(scope, name);
|
|
15
|
+
return scope === this && typeof value === "function" ? value.bind(this) : value;
|
|
16
|
+
} if (guarded)
|
|
17
|
+
return undefined; const error = new ReferenceError(name + " is not defined"); Error.captureStackTrace?.(error, __lookup); throw error; };
|
|
18
|
+
const __assign = (name, value) => { for (const scope of [locals, this, TopLevel])
|
|
19
|
+
if (name in scope) {
|
|
20
|
+
Reflect.set(scope, name, value);
|
|
21
|
+
return value;
|
|
22
|
+
} __own[name] = value; return value; };
|
|
23
|
+
void __assign;
|
|
24
|
+
const __sink = new Proxy({}, { set: (_target, name, value) => (__assign(name, value), true) });
|
|
25
|
+
void __sink;
|
|
26
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
27
|
+
_ob.safeAppend("<!-- BEGIN /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/show.html.tse -->");
|
|
28
|
+
__lookup("provide")("title", this.inboundEmail.messageId);
|
|
29
|
+
_ob.safeAppend("\n<h1>");
|
|
30
|
+
_ob.append(await (this.inboundEmail.messageId));
|
|
31
|
+
_ob.safeAppend(": ");
|
|
32
|
+
_ob.append(await (this.inboundEmail.status));
|
|
33
|
+
_ob.safeAppend("</h1>\n\n<ul>\n <li>");
|
|
34
|
+
_ob.append(await (__lookup("buttonTo")("Route again", __lookup("mainApp").trailsConductorInboundEmailReroutePath(this.inboundEmail), { method: "post" })));
|
|
35
|
+
_ob.safeAppend("</li>\n <li>");
|
|
36
|
+
_ob.append(await (__lookup("buttonTo")("Incinerate", __lookup("mainApp").trailsConductorInboundEmailIncineratePath(this.inboundEmail), { method: "post" })));
|
|
37
|
+
_ob.safeAppend("</li>\n</ul>\n\n<details>\n <summary>Full email source</summary>\n <pre>");
|
|
38
|
+
_ob.append(await (await this.inboundEmail.source()));
|
|
39
|
+
_ob.safeAppend("</pre>\n</details>\n\n");
|
|
40
|
+
_ob.append(await (__lookup("linkTo")("Back to all inbound emails", __lookup("mainApp").trailsConductorInboundEmailsPath())));
|
|
41
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
42
|
+
_ob.safeAppend("<!-- END /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/show.html.tse -->");
|
|
43
|
+
return _ob;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=show.html.tse.js.map
|
package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/show.html.tse.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.html.tse.js","sourceRoot":"","sources":["../../../../../../app/views/trails/conductor/action-mailbox/inbound-emails/show.html.tse"],"sourcesContent":["<% provide(\"title\", this.inboundEmail.messageId) %>\n\n<h1><%= this.inboundEmail.messageId %>: <%= this.inboundEmail.status %></h1>\n\n<ul>\n <li><%= buttonTo(\"Route again\", mainApp.trailsConductorInboundEmailReroutePath(this.inboundEmail), { method: \"post\" }) %></li>\n <li><%= buttonTo(\"Incinerate\", mainApp.trailsConductorInboundEmailIncineratePath(this.inboundEmail), { method: \"post\" }) %></li>\n</ul>\n\n<details>\n <summary>Full email source</summary>\n <pre><%= await this.inboundEmail.source() %></pre>\n</details>\n\n<%= linkTo(\"Back to all inbound emails\", mainApp.trailsConductorInboundEmailsPath()) %>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAAG,mBAAO,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAC/C,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnB,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IAApC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAAqB,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAArE,GAAG,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAGhC,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,oBAAQ,CAAC,aAAa,EAAE,mBAAO,CAAC,sCAAsC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAAzH,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IACxB,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,oBAAQ,CAAC,YAAY,EAAE,mBAAO,CAAC,yCAAyC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAA3H,GAAG,CAAC,UAAU,CAAC,4EAA4E,CAAC,CAAC;IAKpF,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAA5C,GAAG,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;IAGvC,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,kBAAM,CAAC,4BAA4B,EAAE,mBAAO,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/.trails/views/trails/conductor/action-mailbox/inbound-emails/sources/new.html.tse.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { hashAref as __hashAref, keys as __keys } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { TopLevel } from "@blazetrails/actionview";
|
|
3
|
+
export default async function render(context, locals, __block) {
|
|
4
|
+
void context;
|
|
5
|
+
void locals;
|
|
6
|
+
const localAssigns = locals;
|
|
7
|
+
void localAssigns;
|
|
8
|
+
const __view = context;
|
|
9
|
+
context = Object.create(__view, { yield: { value: (...name) => (name.length > 0 ? __block(...name) : __block !== undefined ? __block() : Reflect.get(__view, "yield")) } });
|
|
10
|
+
const _ob = context.outputBuffer;
|
|
11
|
+
const __own = Object.create(null);
|
|
12
|
+
const __lookup = (name, guarded = false) => { for (const scope of [...[locals, this, TopLevel], __own, globalThis])
|
|
13
|
+
if (scope === localAssigns ? __keys(localAssigns).includes(name) : name in scope) {
|
|
14
|
+
const value = scope === localAssigns ? __hashAref(localAssigns, name) : Reflect.get(scope, name);
|
|
15
|
+
return scope === this && typeof value === "function" ? value.bind(this) : value;
|
|
16
|
+
} if (guarded)
|
|
17
|
+
return undefined; const error = new ReferenceError(name + " is not defined"); Error.captureStackTrace?.(error, __lookup); throw error; };
|
|
18
|
+
const __assign = (name, value) => { for (const scope of [locals, this, TopLevel])
|
|
19
|
+
if (name in scope) {
|
|
20
|
+
Reflect.set(scope, name, value);
|
|
21
|
+
return value;
|
|
22
|
+
} __own[name] = value; return value; };
|
|
23
|
+
void __assign;
|
|
24
|
+
const __sink = new Proxy({}, { set: (_target, name, value) => (__assign(name, value), true) });
|
|
25
|
+
void __sink;
|
|
26
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
27
|
+
_ob.safeAppend("<!-- BEGIN /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/sources/new.html.tse -->");
|
|
28
|
+
__lookup("provide")("title", "Deliver new inbound email by source");
|
|
29
|
+
_ob.safeAppend("\n<h1>Deliver new inbound email by source</h1>\n\n");
|
|
30
|
+
_ob.append(await (__lookup("formWith")({ url: __lookup("mainApp").trailsConductorInboundEmailSourcesPath(), local: true }, async (form) => {
|
|
31
|
+
context.outputBuffer.safeAppend("\n <div>\n ");
|
|
32
|
+
context.outputBuffer.append(await (form.label("source", "Source")));
|
|
33
|
+
context.outputBuffer.safeAppend("<br>\n ");
|
|
34
|
+
context.outputBuffer.append(await (form.textarea("source", { size: "80x60" })));
|
|
35
|
+
context.outputBuffer.safeAppend("\n </div>\n\n ");
|
|
36
|
+
context.outputBuffer.append(await (form.submit("Deliver inbound email")));
|
|
37
|
+
context.outputBuffer.safeAppend("\n");
|
|
38
|
+
})));
|
|
39
|
+
if (__view.annotateRenderedViewWithFilenames)
|
|
40
|
+
_ob.safeAppend("<!-- END /home/runner/work/trails/trails/packages/actionmailbox/dist/app/views/trails/conductor/action-mailbox/inbound-emails/sources/new.html.tse -->");
|
|
41
|
+
return _ob;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=new.html.tse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new.html.tse.js","sourceRoot":"","sources":["../../../../../../../app/views/trails/conductor/action-mailbox/inbound-emails/sources/new.html.tse"],"sourcesContent":["<% provide(\"title\", \"Deliver new inbound email by source\") %>\n\n<h1>Deliver new inbound email by source</h1>\n\n<%= formWith({ url: mainApp.trailsConductorInboundEmailSourcesPath(), local: true }, (form) => { %>\n <div>\n <%= form.label(\"source\", \"Source\") %><br>\n <%= form.textarea(\"source\", { size: \"80x60\" }) %>\n </div>\n\n <%= form.submit(\"Deliver inbound email\") %>\n<% }) %>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAAG,mBAAO,CAAC,OAAO,EAAE,qCAAqC,CAAC,CAAC;IACzD,GAAG,CAAC,UAAU,CAAC,oDAAoD,CAAC,CAAC;IAGnE,GAAA,CAAA,MAAA,CAAA,MAAA,CAAA,oBAAQ,CAAC,EAAE,GAAG,EAAE,mBAAO,CAAC,sCAAsC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAAlG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;QAE7C,OAAA,CAAA,YAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QAAvC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QACxC,OAAA,CAAA,YAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QAAnD,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAGhD,OAAA,CAAA,YAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;QAA3C,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Autoload, days, extend, mattrAccessor, } from "@blazetrails/activesupport";
|
|
2
|
+
import { File, LOAD_PATH, TopLevel, constSet } from "@blazetrails/ruby-compat";
|
|
3
|
+
import { Trails } from "@blazetrails/trailties";
|
|
4
|
+
const loadPath = {};
|
|
5
|
+
const LIB = File.expandPath(decodeURIComponent(new URL(".", import.meta.url).pathname));
|
|
6
|
+
if (!LOAD_PATH.includes(LIB))
|
|
7
|
+
LOAD_PATH.push(LIB);
|
|
8
|
+
export const ActionMailbox = { name: "ActionMailbox", loadPath };
|
|
9
|
+
extend(ActionMailbox, Autoload);
|
|
10
|
+
constSet(TopLevel, "ActionMailbox", ActionMailbox);
|
|
11
|
+
const Ingresses = constSet(ActionMailbox, "Ingresses", {});
|
|
12
|
+
for (const ingress of ["Mailgun", "Mandrill", "Postmark", "Relay", "Sendgrid"]) {
|
|
13
|
+
constSet(Ingresses, ingress, {});
|
|
14
|
+
}
|
|
15
|
+
const Conductor = constSet(Trails, "Conductor", {});
|
|
16
|
+
constSet(constSet(Conductor, "ActionMailbox", {}), "InboundEmails", {});
|
|
17
|
+
ActionMailbox.autoload("Base");
|
|
18
|
+
ActionMailbox.autoload("Router");
|
|
19
|
+
ActionMailbox.autoload("TestCase");
|
|
20
|
+
mattrAccessor.call(ActionMailbox, "ingress");
|
|
21
|
+
mattrAccessor.call(ActionMailbox, "logger");
|
|
22
|
+
mattrAccessor.call(ActionMailbox, "incinerate", { default: true });
|
|
23
|
+
mattrAccessor.call(ActionMailbox, "incinerateAfter", { default: days(30) });
|
|
24
|
+
mattrAccessor.call(ActionMailbox, "queues", { default: {} });
|
|
25
|
+
mattrAccessor.call(ActionMailbox, "storageService");
|
|
26
|
+
//# sourceMappingURL=action-mailbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-mailbox.js","sourceRoot":"","sources":["../lib/action-mailbox.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,aAAa,GAKd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAgBhD,MAAM,QAAQ,GAA2C,EAAE,CAAC;AAE5D,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxF,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;IAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAoB7D,CAAC;AACF,MAAM,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAChC,QAAQ,CAAC,QAAQ,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;AAEnD,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;AAC3D,KAAK,MAAM,OAAO,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC;IAC/E,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;AACpD,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC;AAExE,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC/B,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAEnC,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAC7C,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAC5C,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACnE,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5E,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAC7D,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ActionController } from "@blazetrails/actionpack";
|
|
2
|
+
import { TopLevel, isPresent, remove, underscore } from "@blazetrails/activesupport";
|
|
3
|
+
import { ArgumentError, constSet, env, rbModName } from "@blazetrails/ruby-compat";
|
|
4
|
+
import { Trails } from "@blazetrails/trailties";
|
|
5
|
+
import { ActionMailbox } from "../../../action-mailbox.js";
|
|
6
|
+
export class BaseController extends ActionController.Base {
|
|
7
|
+
static {
|
|
8
|
+
this.skipForgeryProtection();
|
|
9
|
+
this.beforeAction(":ensureConfigured");
|
|
10
|
+
}
|
|
11
|
+
/** @internal */
|
|
12
|
+
async ensureConfigured() {
|
|
13
|
+
if (!(ActionMailbox.ingress === this.ingressName())) {
|
|
14
|
+
await this.head(":not_found");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** @internal */
|
|
18
|
+
ingressName() {
|
|
19
|
+
return underscore(remove(rbModName(this.constructor), /^ActionMailbox::Ingresses::/, /::InboundEmailsController$/));
|
|
20
|
+
}
|
|
21
|
+
/** @internal */
|
|
22
|
+
async authenticateByPassword() {
|
|
23
|
+
const password = await this.password();
|
|
24
|
+
if (isPresent(password)) {
|
|
25
|
+
return this.httpBasicAuthenticateOrRequestWith({
|
|
26
|
+
name: "actionmailbox",
|
|
27
|
+
password: password,
|
|
28
|
+
realm: "Action Mailbox",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new ArgumentError("Missing required ingress credentials");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
async password() {
|
|
37
|
+
const credential = (await TopLevel.Trails.application.credentials()).dig("action_mailbox", "ingress_password");
|
|
38
|
+
return credential != null && credential !== false
|
|
39
|
+
? credential
|
|
40
|
+
: env.RAILS_INBOUND_EMAIL_PASSWORD;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
constSet(ActionMailbox, "BaseController", BaseController);
|
|
44
|
+
Trails.Conductor.BaseController = class BaseController extends ActionController.Base {
|
|
45
|
+
static {
|
|
46
|
+
this.layout("trails/conductor");
|
|
47
|
+
this.beforeAction(":ensureDevelopmentEnv");
|
|
48
|
+
}
|
|
49
|
+
/** @internal */
|
|
50
|
+
async ensureDevelopmentEnv() {
|
|
51
|
+
if (!Trails.env.isDevelopment())
|
|
52
|
+
await this.head(":forbidden");
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
constSet(Trails.Conductor, "BaseController", Trails.Conductor.BaseController);
|
|
56
|
+
//# sourceMappingURL=base-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-controller.js","sourceRoot":"","sources":["../../../../lib/app/controllers/action-mailbox/base-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAuB3D,MAAM,OAAO,cAAe,SAAQ,gBAAgB,CAAC,IAAI;IACvD;QACE,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAE7B,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC;IAED,gBAAgB;IACR,KAAK,CAAC,gBAAgB;QAC5B,IAAI,CAAC,CAAC,aAAa,CAAC,OAAO,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;YACpD,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED,gBAAgB;IACR,WAAW;QACjB,OAAO,UAAU,CACf,MAAM,CACJ,SAAS,CAAC,IAAI,CAAC,WAAW,CAAE,EAC5B,6BAA6B,EAC7B,4BAA4B,CAC7B,CACF,CAAC;IACJ,CAAC;IAED,gBAAgB;IACR,KAAK,CAAC,sBAAsB;QA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
1
|
+
import { constSet } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { SecurityUtils, TopLevel, isPresent, minutes, squish } from "@blazetrails/activesupport";
|
|
3
|
+
import { Time } from "@blazetrails/date";
|
|
4
|
+
import { ArgumentError, Encoding, OpenSSL, env, isBetween, kernelInteger, rbStrPlus, } from "@blazetrails/ruby-compat";
|
|
5
|
+
import { ActionMailbox } from "../../../../../action-mailbox.js";
|
|
6
|
+
import { BaseController } from "../../base-controller.js";
|
|
7
|
+
export class InboundEmailsController extends BaseController {
|
|
8
|
+
static {
|
|
9
|
+
this.beforeAction(":authenticate");
|
|
10
|
+
this.paramEncoding("create", "body-mime", Encoding.ASCII_8BIT);
|
|
11
|
+
}
|
|
12
|
+
async create() {
|
|
13
|
+
return await ActionMailbox.InboundEmail.createAndExtractMessageIdBang(this.mail());
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
mail() {
|
|
17
|
+
let rawEmail = this.params.require("body-mime");
|
|
18
|
+
if (this.params.isKey("recipient"))
|
|
19
|
+
rawEmail = rbStrPlus(new TextEncoder().encode(`X-Original-To: ${this.params.require("recipient")}\n`), rawEmail);
|
|
20
|
+
return rawEmail;
|
|
21
|
+
}
|
|
22
|
+
/** @internal */
|
|
23
|
+
async authenticate() {
|
|
24
|
+
if (!(await this.isAuthenticated()))
|
|
25
|
+
await this.head(":unauthorized");
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
async isAuthenticated() {
|
|
29
|
+
const key = await this.key();
|
|
30
|
+
if (isPresent(key)) {
|
|
31
|
+
return new InboundEmailsController.Authenticator({
|
|
32
|
+
key: key,
|
|
33
|
+
timestamp: this.params.require("timestamp"),
|
|
34
|
+
token: this.params.require("token"),
|
|
35
|
+
signature: this.params.require("signature"),
|
|
36
|
+
}).isAuthenticated();
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
throw new ArgumentError(squish(`
|
|
40
|
+
Missing required Mailgun Signing key. Set action_mailbox.mailgun_signing_key in your application's
|
|
41
|
+
encrypted credentials or provide the MAILGUN_INGRESS_SIGNING_KEY environment variable.
|
|
42
|
+
`));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
async key() {
|
|
47
|
+
const credential = (await TopLevel.Trails.application.credentials()).dig("action_mailbox", "mailgun_signing_key");
|
|
48
|
+
return credential != null && credential !== false
|
|
49
|
+
? credential
|
|
50
|
+
: env.MAILGUN_INGRESS_SIGNING_KEY;
|
|
51
|
+
}
|
|
52
|
+
static Authenticator = class Authenticator {
|
|
53
|
+
key;
|
|
54
|
+
timestamp;
|
|
55
|
+
token;
|
|
56
|
+
signature;
|
|
57
|
+
constructor({ key, timestamp, token, signature, }) {
|
|
58
|
+
[this.key, this.timestamp, this.token, this.signature] = [
|
|
59
|
+
key,
|
|
60
|
+
kernelInteger(timestamp),
|
|
61
|
+
token,
|
|
62
|
+
signature,
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
isAuthenticated() {
|
|
66
|
+
return this.isSigned() && this.isRecent();
|
|
67
|
+
}
|
|
68
|
+
/** @internal */
|
|
69
|
+
isSigned() {
|
|
70
|
+
return SecurityUtils.secureCompare(this.signature, this.expectedSignature());
|
|
71
|
+
}
|
|
72
|
+
/** @internal */
|
|
73
|
+
isRecent() {
|
|
74
|
+
return isBetween.call(Time.at(this.timestamp), minutes(2).ago(), minutes(2).fromNow());
|
|
75
|
+
}
|
|
76
|
+
/** @internal */
|
|
77
|
+
expectedSignature() {
|
|
78
|
+
return OpenSSL.HMAC.hexdigest(OpenSSL.Digest.SHA256.new(), this.key, `${this.timestamp}${this.token}`);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
constSet(ActionMailbox.Ingresses.Mailgun, "InboundEmailsController", InboundEmailsController);
|
|
83
|
+
//# sourceMappingURL=inbound-emails-controller.js.map
|
package/dist/app/controllers/action-mailbox/ingresses/mailgun/inbound-emails-controller.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbound-emails-controller.js","sourceRoot":"","sources":["../../../../../../lib/app/controllers/action-mailbox/ingresses/mailgun/inbound-emails-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,aAAa,EACb,QAAQ,EACR,OAAO,EACP,GAAG,EACH,SAAS,EACT,aAAa,EACb,SAAS,GAEV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,OAAO,uBAAwB,SAAQ,cAAc;IACzD;QACE,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;QACnC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,MAAM,aAAa,CAAC,YAAY,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,gBAAgB;IACR,IAAI;QACV,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAe,CAAC;QAC9D,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC;YAChC,QAAQ,GAAG,SAAS,CAClB,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,kBAAkB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAW,IAAI,CAAC,EAC1F,QAAQ,CACK,CAAC;QAClB,OAAO,QAAQ,CAA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,GAMV;YACC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG;gBACvD,GAAG;gBACH,aAAa,CAAC,SAAS,CAAC;gBACxB,KAAK;gBACL,SAAS;aACV,CAAC;QACJ,CAAC;QAED,eAAe;YACb,OAAO,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5C,CAAC;QAED,gBAAgB;QAChB,QAAQ;YACN,OAAO,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAC/E,CAAC;QAED,gBAAgB;QAChB,QAAQ;YACN,OAAO,SAAS,CAAC,IAAI,CACnB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAA0B,EAChD,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAChB,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CACrB,CAAC;QACJ,CAAC;QAED,gBAAgB;QAChB,iBAAiB;YACf,OAAO,OAAO,CAAC,IAAI,CAAC,SAAS,CAC3B,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,EAC3B,IAAI,CAAC,GAAG,EACR,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,CACjC,CAAC;QACJ,CAAC;KACF,CAAC;CACH;AAED,QAAQ,CACL,aAAmE,CAAC,SAAS,CAAC,OAAO,EACtF,yBAAyB,EACzB,uBAAuB,CACxB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { constSet } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { ActionDispatch } from "@blazetrails/actionpack";
|
|
3
|
+
import { SecurityUtils, TopLevel, isPresent, squish, } from "@blazetrails/activesupport";
|
|
4
|
+
import { ArgumentError, Base64, JSON, OpenSSL, env, flatten, sort } from "@blazetrails/ruby-compat";
|
|
5
|
+
import { ActionMailbox } from "../../../../../action-mailbox.js";
|
|
6
|
+
import { BaseController } from "../../base-controller.js";
|
|
7
|
+
export class InboundEmailsController extends BaseController {
|
|
8
|
+
static {
|
|
9
|
+
this.beforeAction(":authenticate", { except: "healthCheck" });
|
|
10
|
+
}
|
|
11
|
+
async create() {
|
|
12
|
+
try {
|
|
13
|
+
for (const rawEmail of this.rawEmails()) {
|
|
14
|
+
await ActionMailbox.InboundEmail.createAndExtractMessageIdBang(rawEmail);
|
|
15
|
+
}
|
|
16
|
+
await this.head(":ok");
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
if (!(error instanceof SyntaxError))
|
|
20
|
+
throw error;
|
|
21
|
+
this.logger?.error(error.message);
|
|
22
|
+
await this.head(ActionDispatch.Constants.UNPROCESSABLE_CONTENT);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async healthCheck() {
|
|
26
|
+
await this.head(":ok");
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
rawEmails() {
|
|
30
|
+
return this.events()
|
|
31
|
+
.filter((event) => event["event"] === "inbound")
|
|
32
|
+
.map((event) => event["msg"]?.["raw_msg"]);
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
events() {
|
|
36
|
+
return JSON.parse(this.params.require("mandrill_events"));
|
|
37
|
+
}
|
|
38
|
+
/** @internal */
|
|
39
|
+
async authenticate() {
|
|
40
|
+
if (!(await this.isAuthenticated()))
|
|
41
|
+
await this.head(":unauthorized");
|
|
42
|
+
}
|
|
43
|
+
/** @internal */
|
|
44
|
+
async isAuthenticated() {
|
|
45
|
+
const key = await this.key();
|
|
46
|
+
if (isPresent(key)) {
|
|
47
|
+
return new InboundEmailsController.Authenticator(this.request, key).isAuthenticated();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
throw new ArgumentError(squish(`
|
|
51
|
+
Missing required Mandrill API key. Set action_mailbox.mandrill_api_key in your application's
|
|
52
|
+
encrypted credentials or provide the MANDRILL_INGRESS_API_KEY environment variable.
|
|
53
|
+
`));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** @internal */
|
|
57
|
+
async key() {
|
|
58
|
+
const credential = (await TopLevel.Trails.application.credentials()).dig("action_mailbox", "mandrill_api_key");
|
|
59
|
+
return credential != null && credential !== false ? credential : env.MANDRILL_INGRESS_API_KEY;
|
|
60
|
+
}
|
|
61
|
+
static Authenticator = class Authenticator {
|
|
62
|
+
request;
|
|
63
|
+
key;
|
|
64
|
+
constructor(request, key) {
|
|
65
|
+
[this.request, this.key] = [request, key];
|
|
66
|
+
}
|
|
67
|
+
isAuthenticated() {
|
|
68
|
+
return SecurityUtils.secureCompare(this.givenSignature(), this.expectedSignature());
|
|
69
|
+
}
|
|
70
|
+
/** @internal */
|
|
71
|
+
givenSignature() {
|
|
72
|
+
return this.request.headers.get("X-Mandrill-Signature");
|
|
73
|
+
}
|
|
74
|
+
/** @internal */
|
|
75
|
+
expectedSignature() {
|
|
76
|
+
return Base64.strictEncode64(OpenSSL.HMAC.digest(OpenSSL.Digest.SHA1.new(), this.key, this.message()));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
* @missingRailsArgs join — PERMANENT
|
|
81
|
+
*/
|
|
82
|
+
message() {
|
|
83
|
+
return this.request.url + flatten(sort(Object.entries(this.request.POST()))).join("");
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
constSet(ActionMailbox.Ingresses.Mandrill, "InboundEmailsController", InboundEmailsController);
|
|
88
|
+
//# sourceMappingURL=inbound-emails-controller.js.map
|
package/dist/app/controllers/action-mailbox/ingresses/mandrill/inbound-emails-controller.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbound-emails-controller.js","sourceRoot":"","sources":["../../../../../../lib/app/controllers/action-mailbox/ingresses/mandrill/inbound-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,aAAa,GAAG,MAAM,aAAa;QAC/B,OAAO,CAAU;QACjB,GAAG,CAAS;QAErB,YAAY,OAAgB,EAAE,GAAW;YACvC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC5C,CAAC;QAED,eAAe;YACb,OAAO,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACtF,CAAC;QAED,gBAAgB;QAChB,cAAc;YACZ,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAW,CAAC;QACpE,CAAC;QAED,gBAAgB;QAChB,iBAAiB;YACf,OAAO,MAAM,CAAC,cAAc,CAC1B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CACzE,CAAC;QACJ,CAAC;QAED;;;WAGG;QACH,OAAO;YACL,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;KACF,CAAC;CACH;AAED,QAAQ,CACL,aAAmE,CAAC,SAAS,CAAC,QAAQ,EACvF,yBAAyB,EACzB,uBAAuB,CACxB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { constSet } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { ActionController, ActionDispatch } from "@blazetrails/actionpack";
|
|
3
|
+
import { Encoding, rbStrPlus } from "@blazetrails/ruby-compat";
|
|
4
|
+
import { ActionMailbox } from "../../../../../action-mailbox.js";
|
|
5
|
+
import { BaseController } from "../../base-controller.js";
|
|
6
|
+
export class InboundEmailsController extends BaseController {
|
|
7
|
+
static {
|
|
8
|
+
this.beforeAction(":authenticateByPassword");
|
|
9
|
+
this.paramEncoding("create", "RawEmail", Encoding.ASCII_8BIT);
|
|
10
|
+
}
|
|
11
|
+
async create() {
|
|
12
|
+
try {
|
|
13
|
+
return await ActionMailbox.InboundEmail.createAndExtractMessageIdBang(this.mail());
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (!(error instanceof ActionController.ParameterMissing))
|
|
17
|
+
throw error;
|
|
18
|
+
this.logger?.error(`${error.message}
|
|
19
|
+
|
|
20
|
+
When configuring your Postmark inbound webhook, be sure to check the box
|
|
21
|
+
labeled "Include raw email content in JSON payload".
|
|
22
|
+
`);
|
|
23
|
+
return this.head(ActionDispatch.Constants.UNPROCESSABLE_CONTENT);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/** @internal */
|
|
27
|
+
mail() {
|
|
28
|
+
let rawEmail = this.params.require("RawEmail");
|
|
29
|
+
if (this.params.isKey("OriginalRecipient"))
|
|
30
|
+
rawEmail = rbStrPlus(new TextEncoder().encode(`X-Original-To: ${this.params.require("OriginalRecipient")}\n`), rawEmail);
|
|
31
|
+
return rawEmail;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
constSet(ActionMailbox.Ingresses.Postmark, "InboundEmailsController", InboundEmailsController);
|
|
35
|
+
//# sourceMappingURL=inbound-emails-controller.js.map
|
package/dist/app/controllers/action-mailbox/ingresses/postmark/inbound-emails-controller.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbound-emails-controller.js","sourceRoot":"","sources":["../../../../../../lib/app/controllers/action-mailbox/ingresses/postmark/inbound-emails-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MA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