@blazetrails/actionmailer 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/action-mailer.d.ts +3 -0
- package/dist/action-mailer.js +17 -0
- package/dist/action-mailer.js.map +1 -0
- package/dist/base.d.ts +186 -0
- package/dist/base.js +480 -0
- package/dist/base.js.map +1 -0
- package/dist/callbacks.d.ts +21 -0
- package/dist/callbacks.js +21 -0
- package/dist/callbacks.js.map +1 -0
- package/dist/collector.d.ts +23 -0
- package/dist/collector.js +44 -0
- package/dist/collector.js.map +1 -0
- package/dist/constants.generated.d.ts +2 -0
- package/dist/constants.generated.js +44 -0
- package/dist/constants.generated.js.map +1 -0
- package/dist/constants.test-case.generated.d.ts +2 -0
- package/dist/constants.test-case.generated.js +10 -0
- package/dist/constants.test-case.generated.js.map +1 -0
- package/dist/constants.test-helper.generated.d.ts +2 -0
- package/dist/constants.test-helper.generated.js +4 -0
- package/dist/constants.test-helper.generated.js.map +1 -0
- package/dist/delivery-methods.d.ts +37 -0
- package/dist/delivery-methods.js +79 -0
- package/dist/delivery-methods.js.map +1 -0
- package/dist/deprecator.d.ts +4 -0
- package/dist/deprecator.js +7 -0
- package/dist/deprecator.js.map +1 -0
- package/dist/form-builder.d.ts +17 -0
- package/dist/form-builder.js +18 -0
- package/dist/form-builder.js.map +1 -0
- package/dist/gem-version.d.ts +10 -0
- package/dist/gem-version.js +16 -0
- package/dist/gem-version.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/inline-preview-interceptor.d.ts +21 -0
- package/dist/inline-preview-interceptor.js +49 -0
- package/dist/inline-preview-interceptor.js.map +1 -0
- package/dist/log-subscriber.d.ts +7 -0
- package/dist/log-subscriber.js +36 -0
- package/dist/log-subscriber.js.map +1 -0
- package/dist/mail-delivery-job.d.ts +14 -0
- package/dist/mail-delivery-job.js +46 -0
- package/dist/mail-delivery-job.js.map +1 -0
- package/dist/mail-helper.d.ts +21 -0
- package/dist/mail-helper.js +48 -0
- package/dist/mail-helper.js.map +1 -0
- package/dist/message-delivery.d.ts +38 -0
- package/dist/message-delivery.js +76 -0
- package/dist/message-delivery.js.map +1 -0
- package/dist/namespaces.d.ts +44 -0
- package/dist/namespaces.js +37 -0
- package/dist/namespaces.js.map +1 -0
- package/dist/parameterized.d.ts +42 -0
- package/dist/parameterized.js +93 -0
- package/dist/parameterized.js.map +1 -0
- package/dist/preview.d.ts +48 -0
- package/dist/preview.js +111 -0
- package/dist/preview.js.map +1 -0
- package/dist/queued-delivery.d.ts +2 -0
- package/dist/queued-delivery.js +33 -0
- package/dist/queued-delivery.js.map +1 -0
- package/dist/rescuable.d.ts +15 -0
- package/dist/rescuable.js +32 -0
- package/dist/rescuable.js.map +1 -0
- package/dist/test-case.d.ts +98 -0
- package/dist/test-case.js +124 -0
- package/dist/test-case.js.map +1 -0
- package/dist/test-helper.d.ts +31 -0
- package/dist/test-helper.js +68 -0
- package/dist/test-helper.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +59 -3
- package/README.md +0 -3
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineConstants } from "@blazetrails/ruby-compat/classpath";
|
|
2
|
+
import * as m0 from "./base.js";
|
|
3
|
+
import * as m1 from "./callbacks.js";
|
|
4
|
+
import * as m2 from "./collector.js";
|
|
5
|
+
import * as m3 from "./delivery-methods.js";
|
|
6
|
+
import * as m4 from "./form-builder.js";
|
|
7
|
+
import * as m5 from "./gem-version.js";
|
|
8
|
+
import * as m6 from "./inline-preview-interceptor.js";
|
|
9
|
+
import * as m7 from "./log-subscriber.js";
|
|
10
|
+
import * as m8 from "./mail-delivery-job.js";
|
|
11
|
+
import * as m9 from "./mail-helper.js";
|
|
12
|
+
import * as m10 from "./message-delivery.js";
|
|
13
|
+
import * as m11 from "./parameterized.js";
|
|
14
|
+
import * as m12 from "./preview.js";
|
|
15
|
+
import * as m13 from "./queued-delivery.js";
|
|
16
|
+
import * as m14 from "./rescuable.js";
|
|
17
|
+
defineConstants([
|
|
18
|
+
[() => m0, "Base", "ActionMailer::Base"],
|
|
19
|
+
[() => m0, "Base.LateAttachmentsProxy", "ActionMailer::Base::LateAttachmentsProxy"],
|
|
20
|
+
[() => m0, "NullMail", "ActionMailer::Base::NullMail"],
|
|
21
|
+
[() => m1, "Callbacks", "ActionMailer::Callbacks"],
|
|
22
|
+
[() => m1, "ClassMethods", "ActionMailer::Callbacks::ClassMethods"],
|
|
23
|
+
[() => m2, "Collector", "ActionMailer::Collector"],
|
|
24
|
+
[() => m3, "DeliveryMethods", "ActionMailer::DeliveryMethods"],
|
|
25
|
+
[() => m3, "ClassMethods", "ActionMailer::DeliveryMethods::ClassMethods"],
|
|
26
|
+
[() => m4, "FormBuilder", "ActionMailer::FormBuilder"],
|
|
27
|
+
[() => m4, "ClassMethods", "ActionMailer::FormBuilder::ClassMethods"],
|
|
28
|
+
[() => m6, "InlinePreviewInterceptor", "ActionMailer::InlinePreviewInterceptor"],
|
|
29
|
+
[() => m7, "LogSubscriber", "ActionMailer::LogSubscriber"],
|
|
30
|
+
[() => m8, "MailDeliveryJob", "ActionMailer::MailDeliveryJob"],
|
|
31
|
+
[() => m9, "MailHelper", "ActionMailer::MailHelper"],
|
|
32
|
+
[() => m10, "MessageDelivery", "ActionMailer::MessageDelivery"],
|
|
33
|
+
[() => m11, "Parameterized", "ActionMailer::Parameterized"],
|
|
34
|
+
[() => m11, "ClassMethods", "ActionMailer::Parameterized::ClassMethods"],
|
|
35
|
+
[() => m11, "Mailer", "ActionMailer::Parameterized::Mailer"],
|
|
36
|
+
[() => m11, "MessageDelivery", "ActionMailer::Parameterized::MessageDelivery"],
|
|
37
|
+
[() => m12, "Preview", "ActionMailer::Preview"],
|
|
38
|
+
[() => m12, "Previews", "ActionMailer::Previews"],
|
|
39
|
+
[() => m12, "ClassMethods", "ActionMailer::Previews::ClassMethods"],
|
|
40
|
+
[() => m13, "QueuedDelivery", "ActionMailer::QueuedDelivery"],
|
|
41
|
+
[() => m14, "Rescuable", "ActionMailer::Rescuable"],
|
|
42
|
+
[() => m5, "VERSION", "ActionMailer::VERSION"],
|
|
43
|
+
]);
|
|
44
|
+
//# sourceMappingURL=constants.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.generated.js","sourceRoot":"","sources":["../lib/constants.generated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,GAAG,MAAM,sBAAsB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AAEtC,eAAe,CAAC;IACd,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,oBAAoB,CAAC;IACxC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,2BAA2B,EAAE,0CAA0C,CAAC;I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S,EAAE,uBAAuB,CAAC;IAC/C,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,wBAAwB,CAAC;IACjD,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,cAAc,EAAE,sCAAsC,CAAC;IACnE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,gBAAgB,EAAE,8BAA8B,CAAC;IAC7D,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,yBAAyB,CAAC;IACnD,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,uBAAuB,CAAC;CAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineConstants } from "@blazetrails/ruby-compat/classpath";
|
|
2
|
+
import * as m0 from "./test-case.js";
|
|
3
|
+
defineConstants([
|
|
4
|
+
[() => m0, "NonInferrableMailerError", "ActionMailer::NonInferrableMailerError"],
|
|
5
|
+
[() => m0, "TestCase", "ActionMailer::TestCase"],
|
|
6
|
+
[() => m0, "Behavior", "ActionMailer::TestCase::Behavior"],
|
|
7
|
+
[() => m0, "ClassMethods", "ActionMailer::TestCase::Behavior::ClassMethods"],
|
|
8
|
+
[() => m0, "ClearTestDeliveries", "ActionMailer::TestCase::ClearTestDeliveries"],
|
|
9
|
+
]);
|
|
10
|
+
//# sourceMappingURL=constants.test-case.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.test-case.generated.js","sourceRoot":"","sources":["../lib/constants.test-case.generated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,eAAe,CAAC;IACd,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,0BAA0B,EAAE,wCAAwC,CAAC;IAChF,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,wBAAwB,CAAC;IAChD,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,kCAAkC,CAAC;IAC1D,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,gDAAgD,CAAC;IAC5E,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,qBAAqB,EAAE,6CAA6C,CAAC;CACjF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.test-helper.generated.js","sourceRoot":"","sources":["../lib/constants.test-helper.generated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEvC,eAAe,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type Included } from "@blazetrails/activesupport";
|
|
2
|
+
import { type Message } from "@blazetrails/mail";
|
|
3
|
+
type Settings = Record<string, unknown>;
|
|
4
|
+
export interface DeliveryMethodsClass {
|
|
5
|
+
deliveryMethods: Readonly<Record<string, unknown>>;
|
|
6
|
+
deliveryMethod: string | object | null;
|
|
7
|
+
performDeliveries: boolean;
|
|
8
|
+
raiseDeliveryErrors: boolean;
|
|
9
|
+
[settings: `${string}Settings`]: Settings | null | undefined;
|
|
10
|
+
addDeliveryMethod(symbol: string, klass: unknown, defaultOptions?: Settings): void;
|
|
11
|
+
}
|
|
12
|
+
export declare function addDeliveryMethod(this: DeliveryMethodsClass, symbol: string, klass: unknown, defaultOptions?: Settings): void;
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare function wrapDeliveryBehavior(this: DeliveryMethodsClass, mail: Message, method?: unknown, options?: unknown): void;
|
|
15
|
+
export declare const ClassMethods: {
|
|
16
|
+
deliveries: Message[];
|
|
17
|
+
addDeliveryMethod: typeof addDeliveryMethod;
|
|
18
|
+
wrapDeliveryBehavior: typeof wrapDeliveryBehavior;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare function wrapDeliveryBehaviorBang(this: {
|
|
22
|
+
_message: unknown;
|
|
23
|
+
constructor: {
|
|
24
|
+
wrapDeliveryBehavior(mail: Message, ...args: unknown[]): void;
|
|
25
|
+
};
|
|
26
|
+
}, ...args: unknown[]): void;
|
|
27
|
+
export declare const DeliveryMethods: {
|
|
28
|
+
ClassMethods: {
|
|
29
|
+
deliveries: Message[];
|
|
30
|
+
addDeliveryMethod: typeof addDeliveryMethod;
|
|
31
|
+
wrapDeliveryBehavior: typeof wrapDeliveryBehavior;
|
|
32
|
+
};
|
|
33
|
+
wrapDeliveryBehaviorBang: typeof wrapDeliveryBehaviorBang;
|
|
34
|
+
};
|
|
35
|
+
export type DeliveryMethodsIncluded = Included<typeof DeliveryMethods>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=delivery-methods.d.ts.map
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Concern, cattrAccessor, classAttribute, extend, } from "@blazetrails/activesupport";
|
|
2
|
+
import { FileDelivery, Sendmail, SMTP, TestMailer } from "@blazetrails/mail";
|
|
3
|
+
import { Dir, RuntimeError, TopLevel, rbInspect } from "@blazetrails/ruby-compat";
|
|
4
|
+
import { ActionMailer } from "./namespaces.js";
|
|
5
|
+
export function addDeliveryMethod(symbol, klass, defaultOptions = {}) {
|
|
6
|
+
if (!(`${symbol}Settings` in this))
|
|
7
|
+
classAttribute.call(this, `${symbol}Settings`);
|
|
8
|
+
this[`${symbol}Settings`] = defaultOptions;
|
|
9
|
+
this.deliveryMethods = Object.freeze({ ...this.deliveryMethods, [symbol]: klass });
|
|
10
|
+
}
|
|
11
|
+
/** @internal */
|
|
12
|
+
export function wrapDeliveryBehavior(mail, method = null, options = null) {
|
|
13
|
+
if (method == null || method === false)
|
|
14
|
+
method = this.deliveryMethod;
|
|
15
|
+
mail.deliveryHandler = this;
|
|
16
|
+
if (method == null) {
|
|
17
|
+
throw new RuntimeError("Delivery method cannot be nil");
|
|
18
|
+
}
|
|
19
|
+
else if (typeof method === "string") {
|
|
20
|
+
const klass = this.deliveryMethods[method];
|
|
21
|
+
if (klass != null) {
|
|
22
|
+
mail.deliveryMethod(klass, {
|
|
23
|
+
...(this[`${method}Settings`] ?? {}),
|
|
24
|
+
...(options ?? {}),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
throw new RuntimeError(`Invalid delivery method ${rbInspect(`:${method}`)}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
mail.deliveryMethod(method);
|
|
33
|
+
}
|
|
34
|
+
mail.performDeliveries = this.performDeliveries;
|
|
35
|
+
mail.raiseDeliveryErrors = this.raiseDeliveryErrors;
|
|
36
|
+
}
|
|
37
|
+
export const ClassMethods = {
|
|
38
|
+
get deliveries() {
|
|
39
|
+
return TestMailer.deliveries;
|
|
40
|
+
},
|
|
41
|
+
set deliveries(value) {
|
|
42
|
+
TestMailer.deliveries = value;
|
|
43
|
+
},
|
|
44
|
+
addDeliveryMethod,
|
|
45
|
+
wrapDeliveryBehavior,
|
|
46
|
+
};
|
|
47
|
+
/** @internal */
|
|
48
|
+
export function wrapDeliveryBehaviorBang(...args) {
|
|
49
|
+
this.constructor.wrapDeliveryBehavior(this._message, ...args);
|
|
50
|
+
}
|
|
51
|
+
export const DeliveryMethods = { ClassMethods, wrapDeliveryBehaviorBang };
|
|
52
|
+
extend(DeliveryMethods, Concern);
|
|
53
|
+
Concern.included.call(DeliveryMethods, null, function () {
|
|
54
|
+
cattrAccessor.call(this, "raiseDeliveryErrors", { default: true });
|
|
55
|
+
cattrAccessor.call(this, "performDeliveries", { default: true });
|
|
56
|
+
classAttribute.call(this, "deliveryMethods", { default: Object.freeze({}) });
|
|
57
|
+
classAttribute.call(this, "deliveryMethod", { default: "smtp" });
|
|
58
|
+
this.addDeliveryMethod("smtp", SMTP, {
|
|
59
|
+
address: "localhost",
|
|
60
|
+
port: 25,
|
|
61
|
+
domain: "localhost.localdomain",
|
|
62
|
+
userName: null,
|
|
63
|
+
password: null,
|
|
64
|
+
authentication: null,
|
|
65
|
+
enableStarttlsAuto: true,
|
|
66
|
+
});
|
|
67
|
+
this.addDeliveryMethod("file", FileDelivery, {
|
|
68
|
+
location: TopLevel.Trails?.root != null
|
|
69
|
+
? `${TopLevel.Trails.root()}/tmp/mails`
|
|
70
|
+
: `${Dir.tmpdir()}/mails`,
|
|
71
|
+
});
|
|
72
|
+
this.addDeliveryMethod("sendmail", Sendmail, {
|
|
73
|
+
location: "/usr/sbin/sendmail",
|
|
74
|
+
arguments: ["-i"],
|
|
75
|
+
});
|
|
76
|
+
this.addDeliveryMethod("test", TestMailer);
|
|
77
|
+
});
|
|
78
|
+
ActionMailer.DeliveryMethods = DeliveryMethods;
|
|
79
|
+
//# sourceMappingURL=delivery-methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-methods.js","sourceRoot":"","sources":["../lib/delivery-methods.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,aAAa,EACb,cAAc,EACd,MAAM,GAEP,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAa/C,MAAM,UAAU,iBAAiB,CAE/B,MAAc,EACd,KAAc,EACd,cAAc,GAAa,EAAE;IAE7B,IAAI,CAAC,CAAC,GAAG,MAAM,UAAU,IAAI,IAAI,CAAC;QAAE,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,MAAM,UAAU,CAAC,CAAC;IACnF,IAAI,CAAC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zB,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE;QAC3C,QAAQ,EACN,QAAQ,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI;YAC3B,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY;YACvC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,QAAQ;KAC9B,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,QAAQ,EAAE;QAC3C,QAAQ,EAAE,oBAAoB;QAC9B,SAAS,EAAE,CAAC,IAAI,CAAC;KAClB,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC;AAIH,YAAY,CAAC,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecator.js","sourceRoot":"","sources":["../lib/deprecator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,IAAI,WAAoC,CAAC;AAEzC,gBAAgB;AAChB,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,WAAW,KAAK,IAAI,WAAW,EAAE,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface FormBuilderClassHost {
|
|
2
|
+
_defaultFormBuilder: unknown;
|
|
3
|
+
}
|
|
4
|
+
export declare function defaultFormBuilder(this: FormBuilderClassHost, builder: unknown): void;
|
|
5
|
+
export declare const ClassMethods: {
|
|
6
|
+
defaultFormBuilder: typeof defaultFormBuilder;
|
|
7
|
+
};
|
|
8
|
+
export declare const FormBuilder: {
|
|
9
|
+
ClassMethods: {
|
|
10
|
+
defaultFormBuilder: typeof defaultFormBuilder;
|
|
11
|
+
};
|
|
12
|
+
defaultFormBuilder(this: {
|
|
13
|
+
constructor: unknown;
|
|
14
|
+
}): unknown;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=form-builder.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Concern, classAttribute, extend } from "@blazetrails/activesupport";
|
|
2
|
+
import { ActionMailer } from "./namespaces.js";
|
|
3
|
+
export function defaultFormBuilder(builder) {
|
|
4
|
+
this._defaultFormBuilder = builder;
|
|
5
|
+
}
|
|
6
|
+
export const ClassMethods = { defaultFormBuilder };
|
|
7
|
+
export const FormBuilder = {
|
|
8
|
+
ClassMethods,
|
|
9
|
+
defaultFormBuilder() {
|
|
10
|
+
return this.constructor._defaultFormBuilder;
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
extend(FormBuilder, Concern);
|
|
14
|
+
Concern.included.call(FormBuilder, null, function () {
|
|
15
|
+
classAttribute.call(this, "_defaultFormBuilder", { instanceAccessor: false });
|
|
16
|
+
});
|
|
17
|
+
ActionMailer.FormBuilder = FormBuilder;
|
|
18
|
+
//# sourceMappingURL=form-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-builder.js","sourceRoot":"","sources":["../lib/form-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAM/C,MAAM,UAAU,kBAAkB,CAA6B,OAAgB;IAC7E,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,kBAAkB,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,YAAY;IAEZ,kBAAkB;QAChB,OAAQ,IAAI,CAAC,WAAoC,CAAC,mBAAmB,CAAC;IACxE,CAAC;CACF,CAAC;AACF,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAC7B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE;IACvC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAqB,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Gem } from "@blazetrails/ruby-compat";
|
|
2
|
+
export declare function gemVersion(): InstanceType<typeof Gem.Version>;
|
|
3
|
+
export declare const VERSION: {
|
|
4
|
+
MAJOR: number;
|
|
5
|
+
MINOR: number;
|
|
6
|
+
TINY: number;
|
|
7
|
+
PRE: string;
|
|
8
|
+
STRING: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=gem-version.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Gem } from "@blazetrails/ruby-compat";
|
|
2
|
+
export function gemVersion() {
|
|
3
|
+
return new Gem.Version(VERSION.STRING);
|
|
4
|
+
}
|
|
5
|
+
const MAJOR = 8;
|
|
6
|
+
const MINOR = 0;
|
|
7
|
+
const TINY = 5;
|
|
8
|
+
const PRE = "2";
|
|
9
|
+
export const VERSION = {
|
|
10
|
+
MAJOR,
|
|
11
|
+
MINOR,
|
|
12
|
+
TINY,
|
|
13
|
+
PRE,
|
|
14
|
+
STRING: [MAJOR, MINOR, TINY, PRE].filter((p) => p != null).join("."),
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=gem-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gem-version.js","sourceRoot":"","sources":["../lib/gem-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,UAAU,UAAU;IACxB,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,MAAM,IAAI,GAAG,CAAC,CAAC;AACf,MAAM,GAAG,GAAkB,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,KAAK;IACL,KAAK;IACL,IAAI;IACJ,GAAG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;CACrE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { VERSION, gemVersion } from "./gem-version.js";
|
|
2
|
+
export { version } from "./version.js";
|
|
3
|
+
export { deprecator } from "./deprecator.js";
|
|
4
|
+
export { ActionMailer } from "./namespaces.js";
|
|
5
|
+
export { eagerLoadBang } from "./action-mailer.js";
|
|
6
|
+
export { Base } from "./base.js";
|
|
7
|
+
export { Callbacks } from "./callbacks.js";
|
|
8
|
+
export { Collector } from "./collector.js";
|
|
9
|
+
export { DeliveryMethods } from "./delivery-methods.js";
|
|
10
|
+
export { FormBuilder } from "./form-builder.js";
|
|
11
|
+
export { InlinePreviewInterceptor } from "./inline-preview-interceptor.js";
|
|
12
|
+
export { LogSubscriber } from "./log-subscriber.js";
|
|
13
|
+
export { MailDeliveryJob } from "./mail-delivery-job.js";
|
|
14
|
+
export { MailHelper } from "./mail-helper.js";
|
|
15
|
+
export { MessageDelivery } from "./message-delivery.js";
|
|
16
|
+
export { Parameterized } from "./parameterized.js";
|
|
17
|
+
export { Preview } from "./preview.js";
|
|
18
|
+
export { QueuedDelivery } from "./queued-delivery.js";
|
|
19
|
+
export { Rescuable } from "./rescuable.js";
|
|
20
|
+
import "./constants.generated.js";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { VERSION, gemVersion } from "./gem-version.js";
|
|
2
|
+
export { version } from "./version.js";
|
|
3
|
+
export { deprecator } from "./deprecator.js";
|
|
4
|
+
export { ActionMailer } from "./namespaces.js";
|
|
5
|
+
export { eagerLoadBang } from "./action-mailer.js";
|
|
6
|
+
export { Base } from "./base.js";
|
|
7
|
+
export { Callbacks } from "./callbacks.js";
|
|
8
|
+
export { Collector } from "./collector.js";
|
|
9
|
+
export { DeliveryMethods } from "./delivery-methods.js";
|
|
10
|
+
export { FormBuilder } from "./form-builder.js";
|
|
11
|
+
export { InlinePreviewInterceptor } from "./inline-preview-interceptor.js";
|
|
12
|
+
export { LogSubscriber } from "./log-subscriber.js";
|
|
13
|
+
export { MailDeliveryJob } from "./mail-delivery-job.js";
|
|
14
|
+
export { MailHelper } from "./mail-helper.js";
|
|
15
|
+
export { MessageDelivery } from "./message-delivery.js";
|
|
16
|
+
export { Parameterized } from "./parameterized.js";
|
|
17
|
+
export { Preview } from "./preview.js";
|
|
18
|
+
export { QueuedDelivery } from "./queued-delivery.js";
|
|
19
|
+
export { Rescuable } from "./rescuable.js";
|
|
20
|
+
import "./constants.generated.js";
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Message } from "@blazetrails/mail";
|
|
2
|
+
export declare class InlinePreviewInterceptor {
|
|
3
|
+
static readonly PATTERN: RegExp;
|
|
4
|
+
/** @internal */
|
|
5
|
+
static previewingEmail(message: Message): Message;
|
|
6
|
+
private _message;
|
|
7
|
+
private _htmlPart;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(message: Message);
|
|
10
|
+
/** @internal */
|
|
11
|
+
transformBang(): Message;
|
|
12
|
+
/** @internal */
|
|
13
|
+
private get message();
|
|
14
|
+
/** @internal */
|
|
15
|
+
private htmlPart;
|
|
16
|
+
/** @internal */
|
|
17
|
+
private dataUrl;
|
|
18
|
+
/** @internal */
|
|
19
|
+
private findPart;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=inline-preview-interceptor.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isBlank } from "@blazetrails/activesupport";
|
|
2
|
+
import { Base64 } from "@blazetrails/ruby-compat";
|
|
3
|
+
import { ActionMailer } from "./namespaces.js";
|
|
4
|
+
export class InlinePreviewInterceptor {
|
|
5
|
+
static PATTERN = /src=(?:"cid:[^"]+"|'cid:[^']+')/gi;
|
|
6
|
+
/** @internal */
|
|
7
|
+
static previewingEmail(message) {
|
|
8
|
+
return new this(message).transformBang();
|
|
9
|
+
}
|
|
10
|
+
_message;
|
|
11
|
+
_htmlPart;
|
|
12
|
+
/** @internal */
|
|
13
|
+
constructor(message) {
|
|
14
|
+
this._message = message;
|
|
15
|
+
}
|
|
16
|
+
/** @internal */
|
|
17
|
+
transformBang() {
|
|
18
|
+
if (isBlank(this.htmlPart()))
|
|
19
|
+
return this.message;
|
|
20
|
+
this.htmlPart().setBody(this.htmlPart().decoded().replace(InlinePreviewInterceptor.PATTERN, (match) => {
|
|
21
|
+
const part = this.findPart(match.slice(9, -1));
|
|
22
|
+
if (part != null) {
|
|
23
|
+
return `src="${this.dataUrl(part)}"`;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return match;
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
return this.message;
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
get message() {
|
|
33
|
+
return this._message;
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
htmlPart() {
|
|
37
|
+
return (this._htmlPart ??= this.message.htmlPart());
|
|
38
|
+
}
|
|
39
|
+
/** @internal */
|
|
40
|
+
dataUrl(part) {
|
|
41
|
+
return `data:${part.mimeType()};base64,${Base64.strictEncode64(part.body().rawSource)}`;
|
|
42
|
+
}
|
|
43
|
+
/** @internal */
|
|
44
|
+
findPart(cid) {
|
|
45
|
+
return this.message.allParts().find((p) => p.isAttachment() && p.cid() === cid);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
ActionMailer.InlinePreviewInterceptor = InlinePreviewInterceptor;
|
|
49
|
+
//# sourceMappingURL=inline-preview-interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-preview-interceptor.js","sourceRoot":"","sources":["../lib/inline-preview-interceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,wBAAwB;IACnC,MAAM,CAAU,OAAO,GAAG,mCAAmC,CAAC;IAE9D,gBAAgB;IAChB,MAAM,CAAC,eAAe,CAAC,OAAgB;QACrC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC;IAC3C,CAAC;IAEO,QAAQ,CAAU;IAClB,SAAS,CAA6B;IAE9C,gBAAgB;IAChB,YAAY,OAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,gBAAgB;IAChB,aAAa;QACX,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC;QAElD,IAAI,CAAC,QAAQ,EAAG,CAAC,OAAO,CACrB,IAAI,CAAC,QAAQ,EAAG,CAAC,OAAO,EAAa,CAAC,OAAO,CAAC,wBAAwB,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACzF,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;gBACjB,OAAO,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,gBAAgB;IAChB,IAAY,OAAO;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,gBAAgB;IACR,QAAQ;QACd,OAAO,CAAC,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAoB,CAAC,CAAC;IACxE,CAAC;IAED,gBAAgB;IACR,OAAO,CAAC,IAAU;QACxB,OAAO,QAAQ,IAAI,CAAC,QAAQ,EAAE,WAAW,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;IAC1F,CAAC;IAED,gBAAgB;IACR,QAAQ,CAAC,GAAW;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;IAClF,CAAC;CACF;AAED,YAAY,CAAC,wBAAwB,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LogSubscriber as BaseLogSubscriber, NotificationEvent as Event, type Logger } from "@blazetrails/activesupport";
|
|
2
|
+
export declare class LogSubscriber extends BaseLogSubscriber {
|
|
3
|
+
deliver(event: Event): void;
|
|
4
|
+
process(event: Event): void;
|
|
5
|
+
get logger(): Logger | null;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=log-subscriber.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LogSubscriber as BaseLogSubscriber, } from "@blazetrails/activesupport";
|
|
2
|
+
import { rbInspect, rbModName, rbObjAsString, rbObjClass, round } from "@blazetrails/ruby-compat";
|
|
3
|
+
import { ActionMailer } from "./namespaces.js";
|
|
4
|
+
export class LogSubscriber extends BaseLogSubscriber {
|
|
5
|
+
deliver(event) {
|
|
6
|
+
this.info(null, () => {
|
|
7
|
+
let exception;
|
|
8
|
+
if ((exception = event.payload.exception_object) != null) {
|
|
9
|
+
return `Failed delivery of mail ${rbObjAsString(event.payload.messageId)} error_class=${rbModName(rbObjClass(exception))} error_message=${rbInspect(exception.message)}`;
|
|
10
|
+
}
|
|
11
|
+
else if (event.payload.performDeliveries != null &&
|
|
12
|
+
event.payload.performDeliveries !== false) {
|
|
13
|
+
return `Delivered mail ${rbObjAsString(event.payload.messageId)} (${round(event.duration, 1)}ms)`;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return `Skipped delivery of mail ${rbObjAsString(event.payload.messageId)} as \`perform_deliveries\` is false`;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
this.debug(null, () => event.payload.mail);
|
|
20
|
+
}
|
|
21
|
+
process(event) {
|
|
22
|
+
this.debug(null, () => {
|
|
23
|
+
const mailer = event.payload.mailer;
|
|
24
|
+
const action = event.payload.action;
|
|
25
|
+
return `${rbObjAsString(mailer)}#${rbObjAsString(action)}: processed outbound mail in ${round(event.duration, 1)}ms`;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
get logger() {
|
|
29
|
+
return ActionMailer.Base.logger;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
LogSubscriber.subscribeLogLevel("deliver", "debug");
|
|
33
|
+
LogSubscriber.subscribeLogLevel("process", "debug");
|
|
34
|
+
ActionMailer.LogSubscriber = LogSubscriber;
|
|
35
|
+
LogSubscriber.attachTo("action_mailer");
|
|
36
|
+
//# sourceMappingURL=log-subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-subscriber.js","sourceRoot":"","sources":["../lib/log-subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,iBAAiB,GAGnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,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,OAAO,CAAC,MAAM,CAAC;YACpC,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,gCAAgC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC;QACvH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAa,MAAM;QACjB,OAAO,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;IAClC,CAAC;CACF;AACD,aAAa,CAAC,iBAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACpD,aAAa,CAAC,iBAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAEpD,YAAY,CAAC,aAAa,GAAG,aAAa,CAAC;AAE3C,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Base as ActiveJobBase } from "@blazetrails/activejob";
|
|
2
|
+
/** @internal */
|
|
3
|
+
export declare class MailDeliveryJob extends ActiveJobBase {
|
|
4
|
+
perform(mailer: string, mailMethod: string, deliveryMethod: string, { args, kwargs, params, }: {
|
|
5
|
+
args: unknown[];
|
|
6
|
+
kwargs?: Record<string, unknown> | null;
|
|
7
|
+
params?: unknown;
|
|
8
|
+
}): Promise<unknown>;
|
|
9
|
+
/** @internal */
|
|
10
|
+
private get mailerClass();
|
|
11
|
+
/** @internal */
|
|
12
|
+
handleExceptionWithMailerClass(exception: unknown): Promise<unknown>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=mail-delivery-job.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Base as ActiveJobBase } from "@blazetrails/activejob";
|
|
2
|
+
import { constantize } from "@blazetrails/activesupport";
|
|
3
|
+
import { StandardError, rbFArray, rbFSend, rtest } from "@blazetrails/ruby-compat";
|
|
4
|
+
import { ActionMailer } from "./namespaces.js";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export class MailDeliveryJob extends ActiveJobBase {
|
|
7
|
+
async perform(mailer, mailMethod, deliveryMethod, { args, kwargs = null, params = null, }) {
|
|
8
|
+
const mailerClass = params != null && params !== false
|
|
9
|
+
? constantize(mailer).with(params)
|
|
10
|
+
: constantize(mailer);
|
|
11
|
+
let message;
|
|
12
|
+
if (kwargs != null) {
|
|
13
|
+
message = rbFSend(mailerClass, mailMethod, ...args, kwargs);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
message = rbFSend(mailerClass, mailMethod, ...args);
|
|
17
|
+
}
|
|
18
|
+
return await rbFSend(message, deliveryMethod);
|
|
19
|
+
}
|
|
20
|
+
/** @internal */
|
|
21
|
+
get mailerClass() {
|
|
22
|
+
const serialized = rbFArray(this._serializedArguments)[0];
|
|
23
|
+
const mailer = rtest(serialized) ? serialized : rbFArray(this.arguments)[0];
|
|
24
|
+
if (rtest(mailer)) {
|
|
25
|
+
return constantize(mailer);
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
async handleExceptionWithMailerClass(exception) {
|
|
31
|
+
const klass = this.mailerClass;
|
|
32
|
+
if (klass != null) {
|
|
33
|
+
return await klass.handleException(exception);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
throw exception;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
MailDeliveryJob.queueAs(null, function () {
|
|
41
|
+
const mailerClass = constantize(this.arguments[0]);
|
|
42
|
+
return mailerClass.deliverLaterQueueName;
|
|
43
|
+
});
|
|
44
|
+
MailDeliveryJob.rescueFrom(StandardError, { with: "handleExceptionWithMailerClass" });
|
|
45
|
+
ActionMailer.MailDeliveryJob = MailDeliveryJob;
|
|
46
|
+
//# sourceMappingURL=mail-delivery-job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail-delivery-job.js","sourceRoot":"","sources":["../lib/mail-delivery-job.ts"],"names":[],"mappings":"AAA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CAAC;QAC5E,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YAClB,OAAO,WAAW,CAAC,MAAgB,CAAgB,CAAC;QACtD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;IAChB,KAAK,CAAC,8BAA8B,CAAC,SAAkB;QACrD,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;QAC/B,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,MAAM,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,MAAM,SAAS,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AAED,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;IAC5B,MAAM,WAAW,GAAG,WAAW,CAC5B,IAA4C,CAAC,SAAS,CAAC,CAAC,CAAW,CACtD,CAAC;IACjB,OAAO,WAAW,CAAC,qBAAqB,CAAC;AAC3C,CAAC,CAAC,CAAC;AAEH,eAAe,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAAC,CAAC;AAEtF,YAAY,CAAC,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface MailHelperHost {
|
|
2
|
+
_controller: {
|
|
3
|
+
attachments(): unknown;
|
|
4
|
+
} | null;
|
|
5
|
+
_message: unknown;
|
|
6
|
+
mailer(): {
|
|
7
|
+
attachments(): unknown;
|
|
8
|
+
} | null;
|
|
9
|
+
formatParagraph(text: string, len?: number, indent?: number): string;
|
|
10
|
+
}
|
|
11
|
+
export declare const MailHelper: {
|
|
12
|
+
blockFormat(this: MailHelperHost, text: string): string;
|
|
13
|
+
mailer(this: MailHelperHost): {
|
|
14
|
+
attachments(): unknown;
|
|
15
|
+
} | null;
|
|
16
|
+
message(this: MailHelperHost): unknown;
|
|
17
|
+
attachments(this: MailHelperHost): unknown;
|
|
18
|
+
formatParagraph(this: MailHelperHost, text: string, len?: number, indent?: number): string;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=mail-helper.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { isPresent } from "@blazetrails/activesupport";
|
|
2
|
+
import { chomp, stringSplit, strip } from "@blazetrails/ruby-compat";
|
|
3
|
+
import { ActionMailer } from "./namespaces.js";
|
|
4
|
+
export const MailHelper = {
|
|
5
|
+
blockFormat(text) {
|
|
6
|
+
const formatted = stringSplit(text, /\n\r?\n/)
|
|
7
|
+
.map((paragraph) => this.formatParagraph(paragraph))
|
|
8
|
+
.join("\n\n");
|
|
9
|
+
let output = "";
|
|
10
|
+
const splits = stringSplit(formatted, /(\*+|#+)/);
|
|
11
|
+
let line;
|
|
12
|
+
while ((line = splits.shift()) !== undefined) {
|
|
13
|
+
if ((line.startsWith("*") || line.startsWith("#")) && splits[0]?.startsWith(" ")) {
|
|
14
|
+
while (output.endsWith(" "))
|
|
15
|
+
output = chomp(output, " ");
|
|
16
|
+
output += ` ${line} ${strip(splits.shift())}\n`;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
output += line;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return output;
|
|
23
|
+
},
|
|
24
|
+
mailer() {
|
|
25
|
+
return this._controller;
|
|
26
|
+
},
|
|
27
|
+
message() {
|
|
28
|
+
return this._message;
|
|
29
|
+
},
|
|
30
|
+
attachments() {
|
|
31
|
+
return this.mailer().attachments();
|
|
32
|
+
},
|
|
33
|
+
formatParagraph(text, len = 72, indent = 2) {
|
|
34
|
+
const sentences = [[]];
|
|
35
|
+
for (const word of stringSplit(text)) {
|
|
36
|
+
if (isPresent(sentences[0]) && [...sentences.at(-1), word].join(" ").length > len) {
|
|
37
|
+
sentences.push([word]);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
sentences.at(-1).push(word);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const indentation = " ".repeat(indent);
|
|
44
|
+
return sentences.map((sentence) => `${indentation}${sentence.join(" ")}`).join("\n");
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
ActionMailer.MailHelper = MailHelper;
|
|
48
|
+
//# sourceMappingURL=mail-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail-helper.js","sourceRoot":"","sources":["../lib/mail-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAS/C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,WAAW,CAAuB,IAAY;QAC5C,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC;aAC3C,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;aACnD,IAAI,CAAC,MAAM,CAAC,CAAC;QAEhB,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAClD,IAAI,IAAwB,CAAC;QAC7B,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,SAAS,EAAE,CAAC;YAC7C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACjF,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;oBAAE,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBACzD,MAAM,IAAI,K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