@lunora/errors 1.0.0-alpha.6 → 1.0.0-alpha.7

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/index.d.mts CHANGED
@@ -12,7 +12,7 @@
12
12
  * keep their message-matched hints.
13
13
  */
14
14
  /** Markdown hint: a single string or an array of lines. Shape matches `@visulima/error`'s `hint`. */
15
- type ErrorHint = string | readonly string[];
15
+ type ErrorHint = string | ReadonlyArray<string>;
16
16
  /** A catalog entry: the fixed metadata for one error `code`. */
17
17
  interface ErrorCatalogEntry {
18
18
  /** Optional URL to deeper docs for this error. */
@@ -178,6 +178,26 @@ declare const ERROR_CATALOG: {
178
178
  readonly status: 500;
179
179
  readonly title: "Auth headers missing";
180
180
  };
181
+ /**
182
+ * Signup rejected by `@lunora/auth`'s email-domain gate — a disposable/throwaway
183
+ * provider (or a caller deny-list hit). Client-safe: the message names only the
184
+ * offending domain class, never a secret, so it is echoed rather than redacted.
185
+ */
186
+ readonly EMAIL_DOMAIN_BLOCKED: {
187
+ readonly hint: readonly ["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).", "", "Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` to `emailGate(...)` (`@lunora/auth/email-guard`)."];
188
+ readonly status: 400;
189
+ readonly title: "Email domain not allowed";
190
+ };
191
+ /**
192
+ * Opt-in MX verification (`@lunora/auth/email-guard`, `mx: true`) found no mail
193
+ * exchanger for the address's domain, so mail to it would never deliver.
194
+ * Client-safe: names only the domain, no secret.
195
+ */
196
+ readonly EMAIL_UNDELIVERABLE: {
197
+ readonly hint: readonly ["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.", "", "Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS — leave it off on the edge path if DNS is unavailable."];
198
+ readonly status: 400;
199
+ readonly title: "Email domain cannot receive mail";
200
+ };
181
201
  /**
182
202
  * Upstream Cloudflare API failures surfaced from an action. The message
183
203
  * carries the upstream response body (Cloudflare's own error text — trusted
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@
12
12
  * keep their message-matched hints.
13
13
  */
14
14
  /** Markdown hint: a single string or an array of lines. Shape matches `@visulima/error`'s `hint`. */
15
- type ErrorHint = string | readonly string[];
15
+ type ErrorHint = string | ReadonlyArray<string>;
16
16
  /** A catalog entry: the fixed metadata for one error `code`. */
17
17
  interface ErrorCatalogEntry {
18
18
  /** Optional URL to deeper docs for this error. */
@@ -178,6 +178,26 @@ declare const ERROR_CATALOG: {
178
178
  readonly status: 500;
179
179
  readonly title: "Auth headers missing";
180
180
  };
181
+ /**
182
+ * Signup rejected by `@lunora/auth`'s email-domain gate — a disposable/throwaway
183
+ * provider (or a caller deny-list hit). Client-safe: the message names only the
184
+ * offending domain class, never a secret, so it is echoed rather than redacted.
185
+ */
186
+ readonly EMAIL_DOMAIN_BLOCKED: {
187
+ readonly hint: readonly ["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).", "", "Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` to `emailGate(...)` (`@lunora/auth/email-guard`)."];
188
+ readonly status: 400;
189
+ readonly title: "Email domain not allowed";
190
+ };
191
+ /**
192
+ * Opt-in MX verification (`@lunora/auth/email-guard`, `mx: true`) found no mail
193
+ * exchanger for the address's domain, so mail to it would never deliver.
194
+ * Client-safe: names only the domain, no secret.
195
+ */
196
+ readonly EMAIL_UNDELIVERABLE: {
197
+ readonly hint: readonly ["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.", "", "Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS — leave it off on the edge path if DNS is unavailable."];
198
+ readonly status: 400;
199
+ readonly title: "Email domain cannot receive mail";
200
+ };
181
201
  /**
182
202
  * Upstream Cloudflare API failures surfaced from an action. The message
183
203
  * carries the upstream response body (Cloudflare's own error text — trusted
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { LunoraError } from './packem_shared/LunoraError-DQkqKSaw.mjs';
2
- export { ERROR_CATALOG, MESSAGE_SOLUTIONS, findSolutionByMessage, flattenHint, isInternalCode, resolveHint } from './packem_shared/ERROR_CATALOG-DaTEqgq6.mjs';
1
+ export { LunoraError } from './packem_shared/LunoraError-B_Fjp5jb.mjs';
2
+ export { ERROR_CATALOG, MESSAGE_SOLUTIONS, findSolutionByMessage, flattenHint, isInternalCode, resolveHint } from './packem_shared/ERROR_CATALOG-0x-vRYNm.mjs';
3
3
  export { isLunoraError } from './packem_shared/isLunoraError-CSQtYMrF.mjs';
4
- export { invariant, unreachable } from './packem_shared/invariant-DFMi4YKZ.mjs';
5
- export { toErrorBody } from './packem_shared/toErrorBody-BbkgBfL5.mjs';
4
+ export { invariant, unreachable } from './packem_shared/invariant-BngUFrZs.mjs';
5
+ export { toErrorBody } from './packem_shared/toErrorBody-CKa-c46O.mjs';
@@ -63,6 +63,34 @@ const ERROR_CATALOG = {
63
63
  ENV_INVALID: { internal: true, status: 500, title: "Invalid environment" },
64
64
  /** Runtime-reachable (auth/middleware.ts): message carries auth-wiring guidance — redact on the wire. */
65
65
  AUTH_HEADERS_MISSING: { internal: true, status: 500, title: "Auth headers missing" },
66
+ /**
67
+ * Signup rejected by `@lunora/auth`'s email-domain gate — a disposable/throwaway
68
+ * provider (or a caller deny-list hit). Client-safe: the message names only the
69
+ * offending domain class, never a secret, so it is echoed rather than redacted.
70
+ */
71
+ EMAIL_DOMAIN_BLOCKED: {
72
+ hint: [
73
+ "This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).",
74
+ "",
75
+ "Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` to `emailGate(...)` (`@lunora/auth/email-guard`)."
76
+ ],
77
+ status: 400,
78
+ title: "Email domain not allowed"
79
+ },
80
+ /**
81
+ * Opt-in MX verification (`@lunora/auth/email-guard`, `mx: true`) found no mail
82
+ * exchanger for the address's domain, so mail to it would never deliver.
83
+ * Client-safe: names only the domain, no secret.
84
+ */
85
+ EMAIL_UNDELIVERABLE: {
86
+ hint: [
87
+ "The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.",
88
+ "",
89
+ "Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS — leave it off on the edge path if DNS is unavailable."
90
+ ],
91
+ status: 400,
92
+ title: "Email domain cannot receive mail"
93
+ },
66
94
  /**
67
95
  * Upstream Cloudflare API failures surfaced from an action. The message
68
96
  * carries the upstream response body (Cloudflare's own error text — trusted
@@ -1,4 +1,4 @@
1
- import { getCatalogEntry } from './ERROR_CATALOG-DaTEqgq6.mjs';
1
+ import { getCatalogEntry } from './ERROR_CATALOG-0x-vRYNm.mjs';
2
2
 
3
3
  class LunoraError extends Error {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { LunoraError } from './LunoraError-DQkqKSaw.mjs';
1
+ import { LunoraError } from './LunoraError-B_Fjp5jb.mjs';
2
2
 
3
3
  const invariant = (condition, message) => {
4
4
  if (!condition) {
@@ -1,4 +1,4 @@
1
- import { isInternalCode, resolveHint } from './ERROR_CATALOG-DaTEqgq6.mjs';
1
+ import { isInternalCode, resolveHint } from './ERROR_CATALOG-0x-vRYNm.mjs';
2
2
  import { isLunoraError } from './isLunoraError-CSQtYMrF.mjs';
3
3
 
4
4
  const toErrorBody = (error, options = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/errors",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.7",
4
4
  "description": "Unified error layer for Lunora: one LunoraError base + a central catalog of codes, statuses, and actionable hints, rendered across CLI, overlay, Studio, and the client",
5
5
  "keywords": [
6
6
  "cloudflare",