@veryfront/ext-content-mdx 0.1.1185 → 0.1.1188
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/esm/_dnt.polyfills.d.ts +6 -6
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/deno.d.ts +34 -0
- package/esm/deno.js +50 -9
- package/esm/src/config/defaults.d.ts +31 -24
- package/esm/src/config/defaults.d.ts.map +1 -1
- package/esm/src/config/defaults.js +25 -18
- package/esm/src/errors/diagnostic-policy.d.ts +35 -0
- package/esm/src/errors/diagnostic-policy.d.ts.map +1 -0
- package/esm/src/errors/diagnostic-policy.js +100 -0
- package/esm/src/errors/error-registry/boundary.d.ts +2 -0
- package/esm/src/errors/error-registry/boundary.d.ts.map +1 -1
- package/esm/src/errors/error-registry/boundary.js +8 -0
- package/esm/src/errors/error-registry/config.d.ts.map +1 -1
- package/esm/src/errors/error-registry/config.js +3 -3
- package/esm/src/errors/error-registry/deploy.js +1 -1
- package/esm/src/errors/error-registry/server.d.ts +2 -0
- package/esm/src/errors/error-registry/server.d.ts.map +1 -1
- package/esm/src/errors/error-registry/server.js +8 -0
- package/esm/src/errors/error-registry-helpers.d.ts +11 -2
- package/esm/src/errors/error-registry-helpers.d.ts.map +1 -1
- package/esm/src/errors/error-registry-helpers.js +70 -1
- package/esm/src/errors/error-registry.d.ts +87 -75
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/error-registry.js +2 -14
- package/esm/src/errors/types.d.ts +44 -5
- package/esm/src/errors/types.d.ts.map +1 -1
- package/esm/src/errors/types.js +148 -24
- package/esm/src/errors/veryfront-error.d.ts +25 -2
- package/esm/src/errors/veryfront-error.d.ts.map +1 -1
- package/esm/src/errors/veryfront-error.js +638 -28
- package/esm/src/observability/limits.d.ts +20 -0
- package/esm/src/observability/limits.d.ts.map +1 -0
- package/esm/src/observability/limits.js +19 -0
- package/esm/src/observability/telemetry-error.d.ts +22 -0
- package/esm/src/observability/telemetry-error.d.ts.map +1 -0
- package/esm/src/observability/telemetry-error.js +377 -0
- package/esm/src/observability/tracing/api-shim.d.ts +39 -0
- package/esm/src/observability/tracing/api-shim.d.ts.map +1 -1
- package/esm/src/observability/tracing/api-shim.js +196 -69
- package/esm/src/observability/tracing/context-callback.d.ts +14 -0
- package/esm/src/observability/tracing/context-callback.d.ts.map +1 -0
- package/esm/src/observability/tracing/context-callback.js +111 -0
- package/esm/src/observability/tracing/otlp-setup.d.ts.map +1 -1
- package/esm/src/observability/tracing/otlp-setup.js +190 -46
- package/esm/src/platform/adapters/base.d.ts +63 -1
- package/esm/src/platform/adapters/base.d.ts.map +1 -1
- package/esm/src/platform/adapters/base.js +4 -2
- package/esm/src/platform/adapters/bounded-file-read.d.ts +43 -0
- package/esm/src/platform/adapters/bounded-file-read.d.ts.map +1 -0
- package/esm/src/platform/adapters/bounded-file-read.js +185 -0
- package/esm/src/platform/adapters/file-snapshot-error.d.ts +8 -0
- package/esm/src/platform/adapters/file-snapshot-error.d.ts.map +1 -0
- package/esm/src/platform/adapters/file-snapshot-error.js +13 -0
- package/esm/src/platform/adapters/file-system-capabilities.d.ts +74 -0
- package/esm/src/platform/adapters/file-system-capabilities.d.ts.map +1 -0
- package/esm/src/platform/adapters/file-system-capabilities.js +508 -0
- package/esm/src/platform/adapters/native-file-system-provenance.d.ts +6 -0
- package/esm/src/platform/adapters/native-file-system-provenance.d.ts.map +1 -0
- package/esm/src/platform/adapters/native-file-system-provenance.js +15 -0
- package/esm/src/platform/adapters/runtime/deno/filesystem-adapter.d.ts +45 -0
- package/esm/src/platform/adapters/runtime/deno/filesystem-adapter.d.ts.map +1 -0
- package/esm/src/platform/adapters/runtime/deno/filesystem-adapter.js +291 -0
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts +71 -0
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts.map +1 -0
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.js +471 -0
- package/esm/src/platform/adapters/runtime/shared/shared-watcher.d.ts +16 -0
- package/esm/src/platform/adapters/runtime/shared/shared-watcher.d.ts.map +1 -0
- package/esm/src/platform/adapters/runtime/shared/shared-watcher.js +140 -0
- package/esm/src/platform/adapters/runtime/shared/temp-dir.d.ts +2 -0
- package/esm/src/platform/adapters/runtime/shared/temp-dir.d.ts.map +1 -0
- package/esm/src/platform/adapters/runtime/shared/temp-dir.js +10 -0
- package/esm/src/platform/adapters/runtime/shared/watcher-queue.d.ts +5 -0
- package/esm/src/platform/adapters/runtime/shared/watcher-queue.d.ts.map +1 -0
- package/esm/src/platform/adapters/runtime/shared/watcher-queue.js +75 -0
- package/esm/src/platform/compat/abort-signal.d.ts +20 -0
- package/esm/src/platform/compat/abort-signal.d.ts.map +1 -0
- package/esm/src/platform/compat/abort-signal.js +64 -0
- package/esm/src/platform/compat/constants.d.ts +2 -2
- package/esm/src/platform/compat/constants.d.ts.map +1 -1
- package/esm/src/platform/compat/constants.js +2 -2
- package/esm/src/platform/compat/error-introspection.d.ts +37 -0
- package/esm/src/platform/compat/error-introspection.d.ts.map +1 -0
- package/esm/src/platform/compat/error-introspection.js +258 -0
- package/esm/src/platform/compat/fs.d.ts +33 -8
- package/esm/src/platform/compat/fs.d.ts.map +1 -1
- package/esm/src/platform/compat/fs.js +144 -42
- package/esm/src/platform/compat/native-brand-checks.d.ts +14 -0
- package/esm/src/platform/compat/native-brand-checks.d.ts.map +1 -0
- package/esm/src/platform/compat/native-brand-checks.js +68 -0
- package/esm/src/platform/compat/not-found-error.d.ts +12 -0
- package/esm/src/platform/compat/not-found-error.d.ts.map +1 -0
- package/esm/src/platform/compat/not-found-error.js +174 -0
- package/esm/src/platform/compat/path/security.d.ts.map +1 -1
- package/esm/src/platform/compat/path/security.js +3 -5
- package/esm/src/platform/compat/process/command.d.ts +24 -1
- package/esm/src/platform/compat/process/command.d.ts.map +1 -1
- package/esm/src/platform/compat/process/command.js +393 -78
- package/esm/src/platform/compat/process/env.d.ts +11 -0
- package/esm/src/platform/compat/process/env.d.ts.map +1 -1
- package/esm/src/platform/compat/process/env.js +28 -38
- package/esm/src/platform/compat/process/global-error.d.ts +19 -0
- package/esm/src/platform/compat/process/global-error.d.ts.map +1 -0
- package/esm/src/platform/compat/process/global-error.js +57 -0
- package/esm/src/platform/compat/process/lifecycle.d.ts +10 -3
- package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -1
- package/esm/src/platform/compat/process/lifecycle.js +74 -23
- package/esm/src/platform/compat/process/project-env-contract.d.ts +19 -0
- package/esm/src/platform/compat/process/project-env-contract.d.ts.map +1 -0
- package/esm/src/platform/compat/process/project-env-contract.js +19 -0
- package/esm/src/platform/compat/process.d.ts +1 -1
- package/esm/src/platform/compat/runtime.d.ts +14 -5
- package/esm/src/platform/compat/runtime.d.ts.map +1 -1
- package/esm/src/platform/compat/runtime.js +34 -9
- package/esm/src/platform/compat/std/front-matter-yaml.d.ts +12 -0
- package/esm/src/platform/compat/std/front-matter-yaml.d.ts.map +1 -1
- package/esm/src/platform/compat/std/front-matter-yaml.js +35 -3
- package/esm/src/platform/compat/temp-directory-prefix.d.ts +8 -0
- package/esm/src/platform/compat/temp-directory-prefix.d.ts.map +1 -0
- package/esm/src/platform/compat/temp-directory-prefix.js +15 -0
- package/esm/src/utils/abort.d.ts +10 -0
- package/esm/src/utils/abort.d.ts.map +1 -0
- package/esm/src/utils/abort.js +35 -0
- package/esm/src/utils/constants/build.d.ts +12 -0
- package/esm/src/utils/constants/build.d.ts.map +1 -1
- package/esm/src/utils/constants/build.js +13 -0
- package/esm/src/utils/constants/cache.d.ts +21 -0
- package/esm/src/utils/constants/cache.d.ts.map +1 -1
- package/esm/src/utils/constants/cache.js +101 -39
- package/esm/src/utils/constants/css.d.ts +20 -0
- package/esm/src/utils/constants/css.d.ts.map +1 -0
- package/esm/src/utils/constants/css.js +19 -0
- package/esm/src/utils/constants/index.d.ts +1 -1
- package/esm/src/utils/constants/index.d.ts.map +1 -1
- package/esm/src/utils/constants/index.js +1 -1
- package/esm/src/utils/constants/limits.d.ts +4 -0
- package/esm/src/utils/constants/limits.d.ts.map +1 -1
- package/esm/src/utils/constants/limits.js +4 -0
- package/esm/src/utils/constants/project-identity.d.ts +5 -0
- package/esm/src/utils/constants/project-identity.d.ts.map +1 -0
- package/esm/src/utils/constants/project-identity.js +4 -0
- package/esm/src/utils/constants/retry.d.ts +18 -0
- package/esm/src/utils/constants/retry.d.ts.map +1 -1
- package/esm/src/utils/constants/retry.js +18 -0
- package/esm/src/utils/constants/security.d.ts +4 -0
- package/esm/src/utils/constants/security.d.ts.map +1 -1
- package/esm/src/utils/constants/security.js +4 -0
- package/esm/src/utils/css-artifact-identity.d.ts +23 -0
- package/esm/src/utils/css-artifact-identity.d.ts.map +1 -0
- package/esm/src/utils/css-artifact-identity.js +77 -0
- package/esm/src/utils/index.d.ts +4 -1
- package/esm/src/utils/index.d.ts.map +1 -1
- package/esm/src/utils/index.js +4 -1
- package/esm/src/utils/logger/core.d.ts +5 -0
- package/esm/src/utils/logger/core.d.ts.map +1 -1
- package/esm/src/utils/logger/core.js +67 -2
- package/esm/src/utils/logger/redact.d.ts +36 -13
- package/esm/src/utils/logger/redact.d.ts.map +1 -1
- package/esm/src/utils/logger/redact.js +573 -83
- package/esm/src/utils/parallel.d.ts.map +1 -1
- package/esm/src/utils/parallel.js +11 -1
- package/esm/src/utils/project-identity.d.ts +11 -0
- package/esm/src/utils/project-identity.d.ts.map +1 -0
- package/esm/src/utils/project-identity.js +69 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { sanitizeLogText } from "../utils/logger/core.js";
|
|
2
|
+
import { REDACTED, sanitizeUrlCredentials } from "../utils/logger/redact.js";
|
|
3
|
+
/** Maximum characters retained from one diagnostic field. */
|
|
4
|
+
export const ERROR_DIAGNOSTIC_MAX_LENGTH_CHARS = 2_048;
|
|
5
|
+
/** Maximum characters retained from a stack snapshot. */
|
|
6
|
+
export const ERROR_STACK_MAX_LENGTH_CHARS = 8_192;
|
|
7
|
+
/** Maximum characters retained from serialized structured error context. */
|
|
8
|
+
export const ERROR_CONTEXT_MAX_LENGTH_CHARS = 4_096;
|
|
9
|
+
/** Maximum characters emitted by one rendered error payload or terminal block. */
|
|
10
|
+
export const ERROR_OUTPUT_MAX_LENGTH_CHARS = 64 * 1_024;
|
|
11
|
+
/** Maximum source characters accepted for the error-docs path segment. */
|
|
12
|
+
export const ERROR_DOCS_SLUG_MAX_LENGTH_CHARS = 256;
|
|
13
|
+
export const ERROR_DOCS_BASE_URL = "https://veryfront.com/docs/errors/";
|
|
14
|
+
const TRUNCATION_MARKER = "...[truncated]";
|
|
15
|
+
const UNKNOWN_ERROR_SLUG = "unknown-error";
|
|
16
|
+
function truncateDiagnosticText(value, maxLength) {
|
|
17
|
+
if (value.length <= maxLength)
|
|
18
|
+
return value;
|
|
19
|
+
const prefixLength = Math.max(0, maxLength - TRUNCATION_MARKER.length);
|
|
20
|
+
const prefix = takeSafePrefix(value, prefixLength);
|
|
21
|
+
return `${prefix}${TRUNCATION_MARKER}`;
|
|
22
|
+
}
|
|
23
|
+
function takeSafePrefix(value, length) {
|
|
24
|
+
let prefix = value.slice(0, length);
|
|
25
|
+
const finalCodeUnit = prefix.charCodeAt(prefix.length - 1);
|
|
26
|
+
if (finalCodeUnit >= 0xd800 && finalCodeUnit <= 0xdbff) {
|
|
27
|
+
prefix = prefix.slice(0, -1);
|
|
28
|
+
}
|
|
29
|
+
return prefix;
|
|
30
|
+
}
|
|
31
|
+
function replaceLoneSurrogates(value) {
|
|
32
|
+
let result = "";
|
|
33
|
+
for (let index = 0; index < value.length; index++) {
|
|
34
|
+
const codeUnit = value.charCodeAt(index);
|
|
35
|
+
if (codeUnit >= 0xd800 && codeUnit <= 0xdbff) {
|
|
36
|
+
const nextCodeUnit = value.charCodeAt(index + 1);
|
|
37
|
+
if (nextCodeUnit >= 0xdc00 && nextCodeUnit <= 0xdfff) {
|
|
38
|
+
result += value.slice(index, index + 2);
|
|
39
|
+
index++;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
result += "\ufffd";
|
|
43
|
+
}
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
result += codeUnit >= 0xdc00 && codeUnit <= 0xdfff ? "\ufffd" : value.charAt(index);
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Redact a complete diagnostic before truncating it.
|
|
52
|
+
*
|
|
53
|
+
* The order is security-sensitive: truncating first could split a credential
|
|
54
|
+
* assignment before the redactor sees its complete value and expose a prefix.
|
|
55
|
+
*/
|
|
56
|
+
export function sanitizeBoundedDiagnosticText(value) {
|
|
57
|
+
if (typeof value !== "string")
|
|
58
|
+
return REDACTED;
|
|
59
|
+
return truncateDiagnosticText(sanitizeUrlCredentials(value), ERROR_DIAGNOSTIC_MAX_LENGTH_CHARS);
|
|
60
|
+
}
|
|
61
|
+
/** Redact and bound a stack while retaining its line structure. */
|
|
62
|
+
export function sanitizeBoundedStackText(value) {
|
|
63
|
+
if (typeof value !== "string")
|
|
64
|
+
return REDACTED;
|
|
65
|
+
return truncateDiagnosticText(sanitizeUrlCredentials(value), ERROR_STACK_MAX_LENGTH_CHARS);
|
|
66
|
+
}
|
|
67
|
+
/** Redact, neutralize terminal controls, and bound one terminal field. */
|
|
68
|
+
export function sanitizeBoundedTerminalText(value) {
|
|
69
|
+
const redacted = typeof value === "string" ? sanitizeUrlCredentials(value) : REDACTED;
|
|
70
|
+
if (redacted.length <= ERROR_DIAGNOSTIC_MAX_LENGTH_CHARS) {
|
|
71
|
+
return sanitizeLogText(redacted);
|
|
72
|
+
}
|
|
73
|
+
const prefixLength = ERROR_DIAGNOSTIC_MAX_LENGTH_CHARS -
|
|
74
|
+
TRUNCATION_MARKER.length;
|
|
75
|
+
return `${sanitizeLogText(takeSafePrefix(redacted, prefixLength))}${TRUNCATION_MARKER}`;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Bound a complete rendered terminal block.
|
|
79
|
+
*
|
|
80
|
+
* Normal-sized output retains framework styling. Oversized output is flattened
|
|
81
|
+
* through the terminal sanitizer before truncation so a cut cannot leave an
|
|
82
|
+
* incomplete ANSI sequence active in the caller's terminal.
|
|
83
|
+
*/
|
|
84
|
+
export function limitRenderedErrorOutput(value) {
|
|
85
|
+
if (value.length <= ERROR_OUTPUT_MAX_LENGTH_CHARS)
|
|
86
|
+
return value;
|
|
87
|
+
return truncateDiagnosticText(sanitizeLogText(value), ERROR_OUTPUT_MAX_LENGTH_CHARS);
|
|
88
|
+
}
|
|
89
|
+
/** Redact and bound an error identity consistently across every boundary. */
|
|
90
|
+
export function sanitizeBoundedErrorSlug(slug) {
|
|
91
|
+
const sanitized = typeof slug === "string" ? sanitizeUrlCredentials(slug) : UNKNOWN_ERROR_SLUG;
|
|
92
|
+
const bounded = truncateDiagnosticText(sanitized || UNKNOWN_ERROR_SLUG, ERROR_DOCS_SLUG_MAX_LENGTH_CHARS);
|
|
93
|
+
const normalized = replaceLoneSurrogates(bounded);
|
|
94
|
+
return normalized === "." || normalized === ".." ? UNKNOWN_ERROR_SLUG : normalized;
|
|
95
|
+
}
|
|
96
|
+
/** Build a single, encoded, credential-scrubbed error documentation path. */
|
|
97
|
+
export function buildErrorDocsUrl(slug) {
|
|
98
|
+
const segment = encodeURIComponent(sanitizeBoundedErrorSlug(slug));
|
|
99
|
+
return `${ERROR_DOCS_BASE_URL}${segment}`;
|
|
100
|
+
}
|
|
@@ -4,6 +4,7 @@ export declare const CLIENT_ONLY_IN_SERVER: import("../types.js").RegisteredErro
|
|
|
4
4
|
export declare const INVALID_USE_CLIENT: import("../types.js").RegisteredError;
|
|
5
5
|
export declare const INVALID_USE_SERVER: import("../types.js").RegisteredError;
|
|
6
6
|
export declare const RSC_PAYLOAD_ERROR: import("../types.js").RegisteredError;
|
|
7
|
+
export declare const SSR_OUTPUT_LIMIT_EXCEEDED: import("../types.js").RegisteredError;
|
|
7
8
|
/** Registry fragment for BOUNDARY errors (slug → definition). */
|
|
8
9
|
export declare const BOUNDARY_REGISTRY: {
|
|
9
10
|
readonly "client-boundary-violation": import("../types.js").RegisteredError;
|
|
@@ -12,5 +13,6 @@ export declare const BOUNDARY_REGISTRY: {
|
|
|
12
13
|
readonly "invalid-use-client": import("../types.js").RegisteredError;
|
|
13
14
|
readonly "invalid-use-server": import("../types.js").RegisteredError;
|
|
14
15
|
readonly "rsc-payload-error": import("../types.js").RegisteredError;
|
|
16
|
+
readonly "ssr-output-limit-exceeded": import("../types.js").RegisteredError;
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=boundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/boundary.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/boundary.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAMhC,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,iBAAiB;;;;;;;;CAQpB,CAAC"}
|
|
@@ -41,6 +41,13 @@ export const RSC_PAYLOAD_ERROR = defineError({
|
|
|
41
41
|
title: "RSC payload serialization error",
|
|
42
42
|
suggestion: "Ensure props are serializable (no functions, symbols, etc.)",
|
|
43
43
|
});
|
|
44
|
+
export const SSR_OUTPUT_LIMIT_EXCEEDED = defineError({
|
|
45
|
+
slug: "ssr-output-limit-exceeded",
|
|
46
|
+
category: "BOUNDARY",
|
|
47
|
+
status: 500,
|
|
48
|
+
title: "SSR output limit exceeded",
|
|
49
|
+
suggestion: "Reduce the rendered HTML size or split the response into smaller pages",
|
|
50
|
+
});
|
|
44
51
|
/** Registry fragment for BOUNDARY errors (slug → definition). */
|
|
45
52
|
export const BOUNDARY_REGISTRY = {
|
|
46
53
|
"client-boundary-violation": CLIENT_BOUNDARY_VIOLATION,
|
|
@@ -49,4 +56,5 @@ export const BOUNDARY_REGISTRY = {
|
|
|
49
56
|
"invalid-use-client": INVALID_USE_CLIENT,
|
|
50
57
|
"invalid-use-server": INVALID_USE_SERVER,
|
|
51
58
|
"rsc-payload-error": RSC_PAYLOAD_ERROR,
|
|
59
|
+
"ssr-output-limit-exceeded": SSR_OUTPUT_LIMIT_EXCEEDED,
|
|
52
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uCAO3B,CAAC;AAEH,eAAO,MAAM,cAAc,uCAMzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,uCAMlC,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,uCAMnC,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,uCAMjC,CAAC;AAEH,iGAAiG;AACjG,eAAO,MAAM,uBAAuB,uCAOlC,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,uCAOjC,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;CAYlB,CAAC"}
|
|
@@ -4,21 +4,21 @@ export const CONFIG_NOT_FOUND = defineError({
|
|
|
4
4
|
category: "CONFIG",
|
|
5
5
|
status: 404,
|
|
6
6
|
title: "Configuration file not found",
|
|
7
|
-
suggestion: "
|
|
7
|
+
suggestion: "Create veryfront.config.js, veryfront.config.ts, or veryfront.config.mjs in the project root",
|
|
8
8
|
});
|
|
9
9
|
export const CONFIG_INVALID = defineError({
|
|
10
10
|
slug: "config-invalid",
|
|
11
11
|
category: "CONFIG",
|
|
12
12
|
status: 400,
|
|
13
13
|
title: "Invalid configuration format",
|
|
14
|
-
suggestion: "Check
|
|
14
|
+
suggestion: "Check the reported configuration path and validation details",
|
|
15
15
|
});
|
|
16
16
|
export const CONFIG_PARSE_ERROR = defineError({
|
|
17
17
|
slug: "config-parse-error",
|
|
18
18
|
category: "CONFIG",
|
|
19
19
|
status: 400,
|
|
20
20
|
title: "Failed to parse configuration",
|
|
21
|
-
suggestion: "Ensure your configuration file
|
|
21
|
+
suggestion: "Ensure your configuration file contains valid JavaScript or TypeScript",
|
|
22
22
|
});
|
|
23
23
|
/** Schema-level config validation (e.g. Zod schema mismatch at runtime) */
|
|
24
24
|
export const CONFIG_VALIDATION_ERROR = defineError({
|
|
@@ -25,7 +25,7 @@ export const PRODUCTION_BUILD_REQUIRED = defineError({
|
|
|
25
25
|
category: "DEPLOY",
|
|
26
26
|
status: 400,
|
|
27
27
|
title: "Production build required",
|
|
28
|
-
suggestion: "Run '
|
|
28
|
+
suggestion: "Run 'veryfront build' before deploying",
|
|
29
29
|
});
|
|
30
30
|
export const ENVIRONMENT_NOT_FOUND = defineError({
|
|
31
31
|
slug: "environment-not-found",
|
|
@@ -4,6 +4,7 @@ export declare const CACHE_ERROR: import("../types.js").RegisteredError;
|
|
|
4
4
|
export declare const FILE_WATCH_ERROR: import("../types.js").RegisteredError;
|
|
5
5
|
export declare const REQUEST_ERROR: import("../types.js").RegisteredError;
|
|
6
6
|
export declare const SERVICE_OVERLOADED: import("../types.js").RegisteredError;
|
|
7
|
+
export declare const PROJECT_EXECUTION_UNAVAILABLE: import("../types.js").RegisteredError;
|
|
7
8
|
export declare const SEMAPHORE_TIMEOUT: import("../types.js").RegisteredError;
|
|
8
9
|
export declare const CIRCUIT_BREAKER_OPEN: import("../types.js").RegisteredError;
|
|
9
10
|
export declare const CACHE_PATH_MISMATCH: import("../types.js").RegisteredError;
|
|
@@ -26,6 +27,7 @@ export declare const SERVER_REGISTRY: {
|
|
|
26
27
|
readonly "file-watch-error": import("../types.js").RegisteredError;
|
|
27
28
|
readonly "request-error": import("../types.js").RegisteredError;
|
|
28
29
|
readonly "service-overloaded": import("../types.js").RegisteredError;
|
|
30
|
+
readonly "project-execution-unavailable": import("../types.js").RegisteredError;
|
|
29
31
|
readonly "semaphore-timeout": import("../types.js").RegisteredError;
|
|
30
32
|
readonly "circuit-breaker-open": import("../types.js").RegisteredError;
|
|
31
33
|
readonly "cache-path-mismatch": import("../types.js").RegisteredError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/server.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAM/B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/server.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,6BAA6B,uCAMxC,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAM/B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CAiBlB,CAAC"}
|
|
@@ -41,6 +41,13 @@ export const SERVICE_OVERLOADED = defineError({
|
|
|
41
41
|
title: "Service overloaded",
|
|
42
42
|
suggestion: "Reduce load or scale up resources",
|
|
43
43
|
});
|
|
44
|
+
export const PROJECT_EXECUTION_UNAVAILABLE = defineError({
|
|
45
|
+
slug: "project-execution-unavailable",
|
|
46
|
+
category: "SERVER",
|
|
47
|
+
status: 503,
|
|
48
|
+
title: "Project execution unavailable",
|
|
49
|
+
suggestion: "Route the project to a dedicated isolated runtime",
|
|
50
|
+
});
|
|
44
51
|
export const SEMAPHORE_TIMEOUT = defineError({
|
|
45
52
|
slug: "semaphore-timeout",
|
|
46
53
|
category: "SERVER",
|
|
@@ -117,6 +124,7 @@ export const SERVER_REGISTRY = {
|
|
|
117
124
|
"file-watch-error": FILE_WATCH_ERROR,
|
|
118
125
|
"request-error": REQUEST_ERROR,
|
|
119
126
|
"service-overloaded": SERVICE_OVERLOADED,
|
|
127
|
+
"project-execution-unavailable": PROJECT_EXECUTION_UNAVAILABLE,
|
|
120
128
|
"semaphore-timeout": SEMAPHORE_TIMEOUT,
|
|
121
129
|
"circuit-breaker-open": CIRCUIT_BREAKER_OPEN,
|
|
122
130
|
"cache-path-mismatch": CACHE_PATH_MISMATCH,
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { ErrorCategory, RegisteredError } from "./types.js";
|
|
2
|
-
export type ErrorRegistryMap = Record<string, RegisteredError
|
|
3
|
-
|
|
2
|
+
export type ErrorRegistryMap = Readonly<Record<string, RegisteredError>>;
|
|
3
|
+
type UnionToIntersection<Union> = (Union extends unknown ? (value: Union) => void : never) extends (value: infer Intersection) => void ? Intersection : never;
|
|
4
|
+
type ComposedSlugMap<Fragments extends readonly object[]> = UnionToIntersection<Fragments[number]>;
|
|
5
|
+
/**
|
|
6
|
+
* Compose slug-keyed fragments without object-spread's silent last-write-wins behavior.
|
|
7
|
+
*/
|
|
8
|
+
export declare function composeSluggedMaps<const Fragments extends readonly object[]>(collectionName: string, ...fragments: Fragments): Readonly<ComposedSlugMap<Fragments>>;
|
|
9
|
+
export declare function composeErrorRegistry<const Fragments extends readonly ErrorRegistryMap[]>(...fragments: Fragments): Readonly<ComposedSlugMap<Fragments>>;
|
|
10
|
+
export declare function getRegistryEntry<Registry extends ErrorRegistryMap, Slug extends Extract<keyof Registry, string>>(registry: Registry, slug: Slug): Registry[Slug];
|
|
11
|
+
export declare function getRegistryEntry(registry: ErrorRegistryMap, slug: string): RegisteredError | undefined;
|
|
4
12
|
export declare function getRegistryEntriesByCategory(registry: ErrorRegistryMap, category: ErrorCategory): RegisteredError[];
|
|
5
13
|
export declare function getRegistrySlugs<Registry extends ErrorRegistryMap>(registry: Registry): Array<keyof Registry>;
|
|
14
|
+
export {};
|
|
6
15
|
//# sourceMappingURL=error-registry-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-registry-helpers.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"error-registry-helpers.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;AAgBzE,KAAK,mBAAmB,CAAC,KAAK,IAAI,CAChC,KAAK,SAAS,OAAO,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,KAAK,CACvD,SAAS,CAAC,KAAK,EAAE,MAAM,YAAY,KAAK,IAAI,GAAG,YAAY,GAAG,KAAK,CAAC;AAErE,KAAK,eAAe,CAAC,SAAS,SAAS,SAAS,MAAM,EAAE,IAAI,mBAAmB,CAC7E,SAAS,CAAC,MAAM,CAAC,CAClB,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,SAAS,SAAS,SAAS,MAAM,EAAE,EAC1E,cAAc,EAAE,MAAM,EACtB,GAAG,SAAS,EAAE,SAAS,GACtB,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CA6BtC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,SAAS,SAAS,SAAS,gBAAgB,EAAE,EACtF,GAAG,SAAS,EAAE,SAAS,GACtB,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAyCtC;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,SAAS,gBAAgB,EACjC,IAAI,SAAS,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,CAAC,EAC5C,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;AAClD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,MAAM,GACX,eAAe,GAAG,SAAS,CAAC;AAQ/B,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,aAAa,GACtB,eAAe,EAAE,CAEnB;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,SAAS,gBAAgB,EAChE,QAAQ,EAAE,QAAQ,GACjB,KAAK,CAAC,MAAM,QAAQ,CAAC,CAEvB"}
|
|
@@ -1,5 +1,74 @@
|
|
|
1
|
+
const ERROR_CATEGORIES = new Set([
|
|
2
|
+
"CONFIG",
|
|
3
|
+
"BUILD",
|
|
4
|
+
"RUNTIME",
|
|
5
|
+
"ROUTE",
|
|
6
|
+
"MODULE",
|
|
7
|
+
"SERVER",
|
|
8
|
+
"BOUNDARY",
|
|
9
|
+
"DEV",
|
|
10
|
+
"DEPLOY",
|
|
11
|
+
"AGENT",
|
|
12
|
+
"GENERAL",
|
|
13
|
+
]);
|
|
14
|
+
/**
|
|
15
|
+
* Compose slug-keyed fragments without object-spread's silent last-write-wins behavior.
|
|
16
|
+
*/
|
|
17
|
+
export function composeSluggedMaps(collectionName, ...fragments) {
|
|
18
|
+
const composed = Object.create(null);
|
|
19
|
+
const capitalizedCollectionName = collectionName.charAt(0).toUpperCase() +
|
|
20
|
+
collectionName.slice(1);
|
|
21
|
+
for (const fragment of fragments) {
|
|
22
|
+
for (const [key, entry] of Object.entries(fragment)) {
|
|
23
|
+
if (typeof entry !== "object" || entry === null || !Object.hasOwn(entry, "slug")) {
|
|
24
|
+
throw new Error(`${capitalizedCollectionName} entry "${key}" must define a slug`);
|
|
25
|
+
}
|
|
26
|
+
const slug = entry.slug;
|
|
27
|
+
if (typeof slug !== "string") {
|
|
28
|
+
throw new Error(`${capitalizedCollectionName} entry "${key}" must define a string slug`);
|
|
29
|
+
}
|
|
30
|
+
if (slug !== key) {
|
|
31
|
+
throw new Error(`${capitalizedCollectionName} key "${key}" does not match entry slug "${slug}"`);
|
|
32
|
+
}
|
|
33
|
+
if (Object.hasOwn(composed, key)) {
|
|
34
|
+
throw new Error(`Duplicate ${collectionName} slug "${key}"`);
|
|
35
|
+
}
|
|
36
|
+
composed[key] = entry;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return Object.freeze(composed);
|
|
40
|
+
}
|
|
41
|
+
export function composeErrorRegistry(...fragments) {
|
|
42
|
+
for (const fragment of fragments) {
|
|
43
|
+
for (const definition of Object.values(fragment)) {
|
|
44
|
+
if (typeof definition.slug !== "string" ||
|
|
45
|
+
definition.slug.length < 3 ||
|
|
46
|
+
definition.slug.length > 40 ||
|
|
47
|
+
!/^[a-z][a-z0-9-]*[a-z0-9]$/.test(definition.slug)) {
|
|
48
|
+
throw new TypeError(`Registered error slug must be 3-40 characters of lowercase kebab-case, got "${definition.slug}"`);
|
|
49
|
+
}
|
|
50
|
+
if (typeof definition.category !== "string" ||
|
|
51
|
+
!ERROR_CATEGORIES.has(definition.category)) {
|
|
52
|
+
throw new TypeError(`Registered error has unknown category "${definition.category}"`);
|
|
53
|
+
}
|
|
54
|
+
if (!Number.isInteger(definition.status) || definition.status < 400 ||
|
|
55
|
+
definition.status >= 600) {
|
|
56
|
+
throw new RangeError(`Registered error status must be an integer from 400 through 599, got ${definition.status}`);
|
|
57
|
+
}
|
|
58
|
+
if (typeof definition.title !== "string" || definition.title.trim().length === 0) {
|
|
59
|
+
throw new TypeError("Registered error title must be a non-empty string");
|
|
60
|
+
}
|
|
61
|
+
if (definition.suggestion !== undefined &&
|
|
62
|
+
(typeof definition.suggestion !== "string" ||
|
|
63
|
+
definition.suggestion.trim().length === 0)) {
|
|
64
|
+
throw new TypeError("Registered error suggestion must be non-empty when provided");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return composeSluggedMaps("error registry", ...fragments);
|
|
69
|
+
}
|
|
1
70
|
export function getRegistryEntry(registry, slug) {
|
|
2
|
-
return registry[slug];
|
|
71
|
+
return Object.hasOwn(registry, slug) ? registry[slug] : undefined;
|
|
3
72
|
}
|
|
4
73
|
export function getRegistryEntriesByCategory(registry, category) {
|
|
5
74
|
return Object.values(registry).filter((error) => error.category === category);
|
|
@@ -3,18 +3,18 @@ export * from "./error-registry/config.js";
|
|
|
3
3
|
export * from "./error-registry/build.js";
|
|
4
4
|
export * from "./error-registry/runtime.js";
|
|
5
5
|
export * from "./error-registry/route.js";
|
|
6
|
-
export * from "
|
|
6
|
+
export * from "veryfront/errors/module";
|
|
7
7
|
export * from "./error-registry/server.js";
|
|
8
8
|
export * from "./error-registry/boundary.js";
|
|
9
9
|
export * from "./error-registry/dev.js";
|
|
10
10
|
export * from "./error-registry/deploy.js";
|
|
11
11
|
export * from "./error-registry/agent.js";
|
|
12
|
-
export * from "
|
|
12
|
+
export * from "veryfront/errors/general";
|
|
13
13
|
/**
|
|
14
14
|
* Central registry mapping every error slug to its definition. Assembled from
|
|
15
15
|
* the per-category registry fragments.
|
|
16
16
|
*/
|
|
17
|
-
export declare const ERROR_REGISTRY: {
|
|
17
|
+
export declare const ERROR_REGISTRY: Readonly<{
|
|
18
18
|
readonly "unknown-error": import("./types.js").RegisteredError;
|
|
19
19
|
readonly "authentication-required": import("./types.js").RegisteredError;
|
|
20
20
|
readonly "permission-denied": import("./types.js").RegisteredError;
|
|
@@ -27,42 +27,60 @@ export declare const ERROR_REGISTRY: {
|
|
|
27
27
|
readonly "security-violation": import("./types.js").RegisteredError;
|
|
28
28
|
readonly "input-validation-failed": import("./types.js").RegisteredError;
|
|
29
29
|
readonly "project-source-empty": import("./types.js").RegisteredError;
|
|
30
|
-
|
|
31
|
-
readonly "
|
|
32
|
-
readonly "
|
|
33
|
-
readonly "
|
|
34
|
-
readonly "
|
|
35
|
-
readonly "
|
|
36
|
-
readonly "
|
|
37
|
-
readonly "
|
|
38
|
-
readonly "
|
|
39
|
-
readonly "
|
|
40
|
-
readonly "
|
|
41
|
-
readonly "
|
|
42
|
-
|
|
43
|
-
readonly "
|
|
44
|
-
readonly "
|
|
45
|
-
readonly "
|
|
46
|
-
readonly "
|
|
47
|
-
readonly "
|
|
48
|
-
readonly "
|
|
49
|
-
readonly "
|
|
50
|
-
readonly "
|
|
51
|
-
|
|
52
|
-
readonly "
|
|
53
|
-
readonly "
|
|
54
|
-
readonly "
|
|
55
|
-
readonly "
|
|
56
|
-
readonly "
|
|
57
|
-
readonly "
|
|
58
|
-
readonly "
|
|
59
|
-
readonly "
|
|
30
|
+
} & {
|
|
31
|
+
readonly "config-not-found": import("./types.js").RegisteredError;
|
|
32
|
+
readonly "config-invalid": import("./types.js").RegisteredError;
|
|
33
|
+
readonly "config-parse-error": import("./types.js").RegisteredError;
|
|
34
|
+
readonly "config-validation-error": import("./types.js").RegisteredError;
|
|
35
|
+
readonly "config-type-error": import("./types.js").RegisteredError;
|
|
36
|
+
readonly "import-map-invalid": import("./types.js").RegisteredError;
|
|
37
|
+
readonly "cors-config-invalid": import("./types.js").RegisteredError;
|
|
38
|
+
readonly "config-validation-failed": import("./types.js").RegisteredError;
|
|
39
|
+
readonly "webhook-config-invalid": import("./types.js").RegisteredError;
|
|
40
|
+
readonly "schedule-config-invalid": import("./types.js").RegisteredError;
|
|
41
|
+
readonly "trigger-config-invalid": import("./types.js").RegisteredError;
|
|
42
|
+
} & {
|
|
43
|
+
readonly "build-failed": import("./types.js").RegisteredError;
|
|
44
|
+
readonly "bundle-error": import("./types.js").RegisteredError;
|
|
45
|
+
readonly "typescript-error": import("./types.js").RegisteredError;
|
|
46
|
+
readonly "mdx-compile-error": import("./types.js").RegisteredError;
|
|
47
|
+
readonly "asset-optimization-error": import("./types.js").RegisteredError;
|
|
48
|
+
readonly "ssg-generation-error": import("./types.js").RegisteredError;
|
|
49
|
+
readonly "sourcemap-error": import("./types.js").RegisteredError;
|
|
50
|
+
readonly "compilation-error": import("./types.js").RegisteredError;
|
|
51
|
+
} & {
|
|
52
|
+
readonly "hydration-mismatch": import("./types.js").RegisteredError;
|
|
53
|
+
readonly "render-error": import("./types.js").RegisteredError;
|
|
54
|
+
readonly "component-error": import("./types.js").RegisteredError;
|
|
55
|
+
readonly "layout-not-found": import("./types.js").RegisteredError;
|
|
56
|
+
readonly "page-not-found": import("./types.js").RegisteredError;
|
|
57
|
+
readonly "api-error": import("./types.js").RegisteredError;
|
|
58
|
+
readonly "middleware-error": import("./types.js").RegisteredError;
|
|
59
|
+
readonly "trigger-target-not-found": import("./types.js").RegisteredError;
|
|
60
|
+
readonly "trigger-execution-failed": import("./types.js").RegisteredError;
|
|
61
|
+
readonly "trigger-not-supported": import("./types.js").RegisteredError;
|
|
62
|
+
} & {
|
|
63
|
+
readonly "route-conflict": import("./types.js").RegisteredError;
|
|
64
|
+
readonly "invalid-route-file": import("./types.js").RegisteredError;
|
|
65
|
+
readonly "route-handler-invalid": import("./types.js").RegisteredError;
|
|
66
|
+
readonly "dynamic-route-error": import("./types.js").RegisteredError;
|
|
67
|
+
readonly "route-params-error": import("./types.js").RegisteredError;
|
|
68
|
+
readonly "api-route-error": import("./types.js").RegisteredError;
|
|
69
|
+
} & {
|
|
70
|
+
readonly "module-not-found": import("./types.js").RegisteredError;
|
|
71
|
+
readonly "import-resolution-error": import("./types.js").RegisteredError;
|
|
72
|
+
readonly "circular-dependency": import("./types.js").RegisteredError;
|
|
73
|
+
readonly "invalid-import": import("./types.js").RegisteredError;
|
|
74
|
+
readonly "dependency-missing": import("./types.js").RegisteredError;
|
|
75
|
+
readonly "version-mismatch": import("./types.js").RegisteredError;
|
|
76
|
+
} & {
|
|
60
77
|
readonly "port-in-use": import("./types.js").RegisteredError;
|
|
61
78
|
readonly "server-start-error": import("./types.js").RegisteredError;
|
|
62
79
|
readonly "cache-error": import("./types.js").RegisteredError;
|
|
63
80
|
readonly "file-watch-error": import("./types.js").RegisteredError;
|
|
64
81
|
readonly "request-error": import("./types.js").RegisteredError;
|
|
65
82
|
readonly "service-overloaded": import("./types.js").RegisteredError;
|
|
83
|
+
readonly "project-execution-unavailable": import("./types.js").RegisteredError;
|
|
66
84
|
readonly "semaphore-timeout": import("./types.js").RegisteredError;
|
|
67
85
|
readonly "circuit-breaker-open": import("./types.js").RegisteredError;
|
|
68
86
|
readonly "cache-path-mismatch": import("./types.js").RegisteredError;
|
|
@@ -72,48 +90,42 @@ export declare const ERROR_REGISTRY: {
|
|
|
72
90
|
readonly "cache-invariant-violation": import("./types.js").RegisteredError;
|
|
73
91
|
readonly "release-not-found": import("./types.js").RegisteredError;
|
|
74
92
|
readonly "fallback-exhausted": import("./types.js").RegisteredError;
|
|
75
|
-
|
|
76
|
-
readonly "
|
|
77
|
-
readonly "
|
|
78
|
-
readonly "
|
|
79
|
-
readonly "
|
|
80
|
-
readonly "
|
|
81
|
-
readonly "
|
|
82
|
-
readonly "
|
|
83
|
-
|
|
84
|
-
readonly "
|
|
85
|
-
readonly "
|
|
86
|
-
readonly "
|
|
87
|
-
readonly "
|
|
88
|
-
readonly "
|
|
89
|
-
|
|
90
|
-
readonly "
|
|
91
|
-
readonly "
|
|
92
|
-
readonly "
|
|
93
|
-
readonly "
|
|
94
|
-
readonly "
|
|
95
|
-
readonly "
|
|
96
|
-
readonly "
|
|
97
|
-
readonly "
|
|
98
|
-
readonly "
|
|
99
|
-
readonly "
|
|
100
|
-
readonly "
|
|
101
|
-
readonly "
|
|
102
|
-
|
|
103
|
-
readonly "
|
|
104
|
-
readonly "
|
|
105
|
-
readonly "
|
|
106
|
-
readonly "
|
|
107
|
-
readonly "
|
|
108
|
-
readonly "
|
|
109
|
-
readonly "
|
|
110
|
-
|
|
111
|
-
readonly "cors-config-invalid": import("./types.js").RegisteredError;
|
|
112
|
-
readonly "config-validation-failed": import("./types.js").RegisteredError;
|
|
113
|
-
readonly "webhook-config-invalid": import("./types.js").RegisteredError;
|
|
114
|
-
readonly "schedule-config-invalid": import("./types.js").RegisteredError;
|
|
115
|
-
readonly "trigger-config-invalid": import("./types.js").RegisteredError;
|
|
116
|
-
};
|
|
93
|
+
} & {
|
|
94
|
+
readonly "client-boundary-violation": import("./types.js").RegisteredError;
|
|
95
|
+
readonly "server-only-in-client": import("./types.js").RegisteredError;
|
|
96
|
+
readonly "client-only-in-server": import("./types.js").RegisteredError;
|
|
97
|
+
readonly "invalid-use-client": import("./types.js").RegisteredError;
|
|
98
|
+
readonly "invalid-use-server": import("./types.js").RegisteredError;
|
|
99
|
+
readonly "rsc-payload-error": import("./types.js").RegisteredError;
|
|
100
|
+
readonly "ssr-output-limit-exceeded": import("./types.js").RegisteredError;
|
|
101
|
+
} & {
|
|
102
|
+
readonly "hmr-error": import("./types.js").RegisteredError;
|
|
103
|
+
readonly "dev-server-error": import("./types.js").RegisteredError;
|
|
104
|
+
readonly "fast-refresh-error": import("./types.js").RegisteredError;
|
|
105
|
+
readonly "error-overlay-error": import("./types.js").RegisteredError;
|
|
106
|
+
readonly "source-map-error": import("./types.js").RegisteredError;
|
|
107
|
+
} & {
|
|
108
|
+
readonly "deployment-error": import("./types.js").RegisteredError;
|
|
109
|
+
readonly "platform-error": import("./types.js").RegisteredError;
|
|
110
|
+
readonly "env-var-missing": import("./types.js").RegisteredError;
|
|
111
|
+
readonly "production-build-required": import("./types.js").RegisteredError;
|
|
112
|
+
readonly "environment-not-found": import("./types.js").RegisteredError;
|
|
113
|
+
readonly "release-missing-version": import("./types.js").RegisteredError;
|
|
114
|
+
readonly "release-build-timeout": import("./types.js").RegisteredError;
|
|
115
|
+
readonly "deployment-verification-timeout": import("./types.js").RegisteredError;
|
|
116
|
+
readonly "push-receipt-missing": import("./types.js").RegisteredError;
|
|
117
|
+
readonly "source-digest-mismatch": import("./types.js").RegisteredError;
|
|
118
|
+
readonly "preview-hostname-too-long": import("./types.js").RegisteredError;
|
|
119
|
+
readonly "branch-not-found": import("./types.js").RegisteredError;
|
|
120
|
+
} & {
|
|
121
|
+
readonly "agent-error": import("./types.js").RegisteredError;
|
|
122
|
+
readonly "agent-not-found": import("./types.js").RegisteredError;
|
|
123
|
+
readonly "agent-timeout": import("./types.js").RegisteredError;
|
|
124
|
+
readonly "agent-intent-error": import("./types.js").RegisteredError;
|
|
125
|
+
readonly "orchestration-error": import("./types.js").RegisteredError;
|
|
126
|
+
readonly "cost-limit-exceeded": import("./types.js").RegisteredError;
|
|
127
|
+
readonly "tool-id-conflict": import("./types.js").RegisteredError;
|
|
128
|
+
}>;
|
|
117
129
|
export type ErrorSlug = keyof typeof ERROR_REGISTRY;
|
|
118
130
|
/**
|
|
119
131
|
* Get an error definition by slug
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-registry.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-registry.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAgBhD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,cAAc,CAAC;AAEpD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,wCAE7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,0CAE1D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,SAAS,EAAE,CAEzC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRegistryEntriesByCategory, getRegistryEntry, getRegistrySlugs, } from "./error-registry-helpers.js";
|
|
1
|
+
import { composeErrorRegistry, getRegistryEntriesByCategory, getRegistryEntry, getRegistrySlugs, } from "./error-registry-helpers.js";
|
|
2
2
|
// Error definitions live in per-category modules under ./error-registry/.
|
|
3
3
|
// This barrel re-exports them and assembles the slug → definition registry.
|
|
4
4
|
import { CONFIG_REGISTRY } from "./error-registry/config.js";
|
|
@@ -27,19 +27,7 @@ export * from "./error-registry/general.js";
|
|
|
27
27
|
* Central registry mapping every error slug to its definition. Assembled from
|
|
28
28
|
* the per-category registry fragments.
|
|
29
29
|
*/
|
|
30
|
-
export const ERROR_REGISTRY =
|
|
31
|
-
...CONFIG_REGISTRY,
|
|
32
|
-
...BUILD_REGISTRY,
|
|
33
|
-
...RUNTIME_REGISTRY,
|
|
34
|
-
...ROUTE_REGISTRY,
|
|
35
|
-
...MODULE_REGISTRY,
|
|
36
|
-
...SERVER_REGISTRY,
|
|
37
|
-
...BOUNDARY_REGISTRY,
|
|
38
|
-
...DEV_REGISTRY,
|
|
39
|
-
...DEPLOY_REGISTRY,
|
|
40
|
-
...AGENT_REGISTRY,
|
|
41
|
-
...GENERAL_REGISTRY,
|
|
42
|
-
};
|
|
30
|
+
export const ERROR_REGISTRY = composeErrorRegistry(CONFIG_REGISTRY, BUILD_REGISTRY, RUNTIME_REGISTRY, ROUTE_REGISTRY, MODULE_REGISTRY, SERVER_REGISTRY, BOUNDARY_REGISTRY, DEV_REGISTRY, DEPLOY_REGISTRY, AGENT_REGISTRY, GENERAL_REGISTRY);
|
|
43
31
|
/**
|
|
44
32
|
* Get an error definition by slug
|
|
45
33
|
*/
|