@sharadox/email-web-library 0.5.0-development.17 → 0.5.0-standard-shape.13

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/README.md CHANGED
@@ -16,7 +16,7 @@ pnpm add @sharadox/email-web-library
16
16
  ## Use
17
17
 
18
18
  Import each part from its own path, like every Sharadox library (`@sharadox/email-web-library/email-sender`,
19
- `…/email-layout`, `…/email-server-configuration`, `…/email-message`, `…/email-address`, `…/email-error`, `…/inline-image`, which turns a base64 image such as a logo into one to send). The root
19
+ `…/email-layout`, `…/email-server-configuration`, `…/email-message`, `…/email-address`, `…/email-error`). The root
20
20
  import (`@sharadox/email-web-library`) still works in 0.5 and goes away in 0.6.
21
21
 
22
22
  Set the server in the environment:
package/llms.txt CHANGED
@@ -5,7 +5,6 @@
5
5
  - /email-server-configuration: readEmailServerConfiguration(environment = process.env) → { host, port (587), username, password, security ("starttls" | "tls" on 465 | "none"), timeout? } from EMAIL_SERVER_HOST, _PORT, _USERNAME, _PASSWORD, _SECURITY; throws EmailError("configuration") naming what's missing
6
6
  - /email-sender: createEmailSender(configuration) → { send(message) → { messageId, accepted, rejected }, verify() }; one short connection per send (serverless); refused recipients reported, all refused or any server failure → EmailError("delivery") without the password or message content
7
7
  - /email-message: checkEmailMessage(message) (valid addresses, one-line subject, at most RECIPIENT_LIMIT recipients, SUBJECT_LIMIT characters); EmailMessage { from, to, cc?, bcc?, replyTo?, subject, text, html?, inlineImages? [{ id, filename, contentType, content }] }
8
- - /inline-image: inlineImage(id, { filename, contentType, content (base64) }) → InlineImage with the bytes decoded (a library's logo kept as base64 text)
9
8
  - /email-address: checkEmailAddress(value, field) → the address, or EmailError("invalid-message"); EmailAddress = string | { name, address }
10
9
  - /email-error: EmailError(code: "configuration" | "invalid-message" | "delivery", message, options?)
11
10
  - /email-layout: emailLayout(content, design, logo) → HTML that works in email clients, light and dark; EmailDesign (name, logo?, wordmark, align, colors, fonts, heading, label, rule, radius, button, signature…), EmailContent (language, preview, eyebrow, heading, paragraphs, rows, quote, button, footer)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharadox/email-web-library",
3
- "version": "0.5.0-development.17",
3
+ "version": "0.5.0-standard-shape.13",
4
4
  "description": "Send email from web applications through any SMTP server, with message checks and clear errors.",
5
5
  "license": "SEE LICENSE IN LICENCA.md",
6
6
  "author": "Sharadox <contact@sharadox.com>",
@@ -1,14 +0,0 @@
1
- import type { InlineImage } from "@sharadox/email-web-library/email-message/type";
2
- /**
3
- * An image to send inside an email from one kept as base64 text (as a library ships its logo): its bytes decoded,
4
- * with the id its html refers to (`cid:<id>`).
5
- *
6
- * @example
7
- * inlineImage("logo", { filename: "logo.png", contentType: "image/png", content: "iVBORw0KGgo…" });
8
- */
9
- export declare function inlineImage(id: string, image: {
10
- filename: string;
11
- contentType: string;
12
- content: string;
13
- }): InlineImage;
14
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/inline-image/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAElF;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAChE,WAAW,CAOb"}
@@ -1,16 +0,0 @@
1
- /**
2
- * An image to send inside an email from one kept as base64 text (as a library ships its logo): its bytes decoded,
3
- * with the id its html refers to (`cid:<id>`).
4
- *
5
- * @example
6
- * inlineImage("logo", { filename: "logo.png", contentType: "image/png", content: "iVBORw0KGgo…" });
7
- */
8
- export function inlineImage(id, image) {
9
- return {
10
- id,
11
- filename: image.filename,
12
- contentType: image.contentType,
13
- content: Buffer.from(image.content, "base64"),
14
- };
15
- }
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/inline-image/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,EAAU,EACV,KAAiE;IAEjE,OAAO;QACL,EAAE;QACF,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC;KAC9C,CAAC;AACJ,CAAC"}