groundmail 0.32.0 → 0.32.1

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/dist/authjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-PMQDWLBY.js";
4
+ } from "./chunk-KOSFM5QK.js";
5
5
 
6
6
  // src/authjs.ts
7
7
  function escapeHtml(value) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-PMQDWLBY.js";
4
+ } from "./chunk-KOSFM5QK.js";
5
5
 
6
6
  // src/better-auth.ts
7
7
  function linkHtml(label, url) {
@@ -61,10 +61,18 @@ function mergeSpfInclude(existing, includeHost) {
61
61
  if (!/^v=spf1\b/i.test(trimmed)) {
62
62
  return `v=spf1 ${include} ~all`;
63
63
  }
64
- if (/\s[~?+\-]all\s*$/i.test(trimmed)) {
65
- return trimmed.replace(/\s([~?+\-]all)\s*$/i, ` ${include} $1`);
66
- }
67
- return `${trimmed} ${include} ~all`;
64
+ const terms = trimmed.split(/\s+/);
65
+ const redirect = terms.find((t) => /^redirect=/i.test(t));
66
+ const kept = terms.filter((t) => !/^redirect=/i.test(t));
67
+ const allIndex = kept.findIndex((t) => /^[~?+-]?all$/i.test(t));
68
+ if (redirect && allIndex === -1) {
69
+ kept.push(`include:${redirect.slice("redirect=".length)}`);
70
+ }
71
+ if (allIndex !== -1) {
72
+ kept.splice(allIndex, 0, include);
73
+ return kept.join(" ");
74
+ }
75
+ return `${kept.join(" ")} ${include} ~all`;
68
76
  }
69
77
  function isSpfRecord(value) {
70
78
  return value.trim().toLowerCase().startsWith("v=spf1");
package/dist/clerk.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-PMQDWLBY.js";
4
+ } from "./chunk-KOSFM5QK.js";
5
5
 
6
6
  // src/clerk.ts
7
7
  function resolveApiKey(options) {
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  normalizeAccessToken,
13
13
  signWebhookPayload,
14
14
  verifyWebhookSignature
15
- } from "./chunk-PMQDWLBY.js";
15
+ } from "./chunk-KOSFM5QK.js";
16
16
 
17
17
  // src/simulator.ts
18
18
  var SIMULATOR_DOMAIN = "simulator.groundmail.dev";
package/dist/payload.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-PMQDWLBY.js";
4
+ } from "./chunk-KOSFM5QK.js";
5
5
 
6
6
  // src/payload.ts
7
7
  function resolveApiKey(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundmail",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "Groundmail transactional email API client",
5
5
  "license": "MIT",
6
6
  "type": "module",