veryfront 0.1.635 → 0.1.637
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/cli/commands/serve/command.d.ts.map +1 -1
- package/esm/cli/commands/serve/command.js +2 -1
- package/esm/deno.js +1 -1
- package/esm/src/cache/distributed-cache-init.d.ts +11 -2
- package/esm/src/cache/distributed-cache-init.d.ts.map +1 -1
- package/esm/src/cache/distributed-cache-init.js +2 -14
- package/esm/src/channels/control-plane.d.ts +5 -5
- package/esm/src/embedding/chunk.js +4 -2
- package/esm/src/errors/error-registry/agent.d.ts +16 -0
- package/esm/src/errors/error-registry/agent.d.ts.map +1 -0
- package/esm/src/errors/error-registry/agent.js +52 -0
- package/esm/src/errors/error-registry/boundary.d.ts +16 -0
- package/esm/src/errors/error-registry/boundary.d.ts.map +1 -0
- package/esm/src/errors/error-registry/boundary.js +52 -0
- package/esm/src/errors/error-registry/build.d.ts +20 -0
- package/esm/src/errors/error-registry/build.d.ts.map +1 -0
- package/esm/src/errors/error-registry/build.js +68 -0
- package/esm/src/errors/error-registry/config.d.ts +22 -0
- package/esm/src/errors/error-registry/config.d.ts.map +1 -0
- package/esm/src/errors/error-registry/config.js +70 -0
- package/esm/src/errors/error-registry/deploy.d.ts +12 -0
- package/esm/src/errors/error-registry/deploy.d.ts.map +1 -0
- package/esm/src/errors/error-registry/deploy.js +36 -0
- package/esm/src/errors/error-registry/dev.d.ts +14 -0
- package/esm/src/errors/error-registry/dev.d.ts.map +1 -0
- package/esm/src/errors/error-registry/dev.js +44 -0
- package/esm/src/errors/error-registry/general.d.ts +29 -0
- package/esm/src/errors/error-registry/general.d.ts.map +1 -0
- package/esm/src/errors/error-registry/general.js +92 -0
- package/esm/src/errors/error-registry/module.d.ts +16 -0
- package/esm/src/errors/error-registry/module.d.ts.map +1 -0
- package/esm/src/errors/error-registry/module.js +52 -0
- package/esm/src/errors/error-registry/route.d.ts +16 -0
- package/esm/src/errors/error-registry/route.d.ts.map +1 -0
- package/esm/src/errors/error-registry/route.js +52 -0
- package/esm/src/errors/error-registry/runtime.d.ts +18 -0
- package/esm/src/errors/error-registry/runtime.d.ts.map +1 -0
- package/esm/src/errors/error-registry/runtime.js +60 -0
- package/esm/src/errors/error-registry/server.d.ts +39 -0
- package/esm/src/errors/error-registry/server.d.ts.map +1 -0
- package/esm/src/errors/error-registry/server.js +129 -0
- package/esm/src/errors/error-registry.d.ts +79 -157
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/error-registry.js +37 -706
- package/esm/src/errors/logging.d.ts.map +1 -1
- package/esm/src/errors/logging.js +7 -3
- package/esm/src/integrations/schema.d.ts +4 -4
- package/esm/src/internal-agents/control-plane-auth.d.ts +1 -1
- package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.js +15 -1
- package/esm/src/oauth/index.d.ts +1 -0
- package/esm/src/oauth/index.d.ts.map +1 -1
- package/esm/src/oauth/token-store/index.d.ts +1 -0
- package/esm/src/oauth/token-store/index.d.ts.map +1 -1
- package/esm/src/oauth/token-store/memory.d.ts +26 -4
- package/esm/src/oauth/token-store/memory.d.ts.map +1 -1
- package/esm/src/oauth/token-store/memory.js +42 -5
- package/esm/src/observability/log-buffer.d.ts.map +1 -1
- package/esm/src/observability/log-buffer.js +7 -1
- package/esm/src/platform/adapters/redis/modules.d.ts.map +1 -1
- package/esm/src/platform/adapters/redis/modules.js +3 -10
- package/esm/src/security/sandbox/project-worker.d.ts.map +1 -1
- package/esm/src/security/sandbox/project-worker.js +0 -1
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +2 -1
- package/esm/src/server/distributed-cache-initializers.d.ts +13 -0
- package/esm/src/server/distributed-cache-initializers.d.ts.map +1 -0
- package/esm/src/server/distributed-cache-initializers.js +22 -0
- package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/agent-stream.handler.js +56 -16
- package/esm/src/server/index.d.ts +1 -0
- package/esm/src/server/index.d.ts.map +1 -1
- package/esm/src/server/index.js +1 -0
- package/esm/src/server/production-server.d.ts.map +1 -1
- package/esm/src/server/production-server.js +2 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
- package/esm/src/utils/logger/logger.d.ts.map +1 -1
- package/esm/src/utils/logger/logger.js +15 -5
- package/esm/src/utils/logger/redact.d.ts +64 -0
- package/esm/src/utils/logger/redact.d.ts.map +1 -0
- package/esm/src/utils/logger/redact.js +235 -0
- package/esm/src/utils/redis-client.d.ts.map +1 -1
- package/esm/src/utils/redis-client.js +0 -3
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/schemas/workflow.schema.d.ts +4 -4
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/command.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/command.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AA8FD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAcvE"}
|
|
@@ -33,9 +33,10 @@ async function runProductionServer(options) {
|
|
|
33
33
|
await clearAllLocalCaches();
|
|
34
34
|
const { initializeOTLPWithApis } = await import("../../../src/observability/tracing/otlp-setup.js");
|
|
35
35
|
const { initializeDistributedCaches } = await import("../../../src/cache/index.js");
|
|
36
|
+
const { defaultDistributedCacheInitializers } = await import("../../../src/server/index.js");
|
|
36
37
|
await Promise.allSettled([
|
|
37
38
|
initializeOTLPWithApis(),
|
|
38
|
-
initializeDistributedCaches(),
|
|
39
|
+
initializeDistributedCaches(defaultDistributedCacheInitializers),
|
|
39
40
|
]);
|
|
40
41
|
const projectDir = cwd();
|
|
41
42
|
const shutdownController = new AbortController();
|
package/esm/deno.js
CHANGED
|
@@ -6,7 +6,16 @@ interface DistributedCacheStatus {
|
|
|
6
6
|
projectCSSCache: boolean;
|
|
7
7
|
httpModuleCache: boolean;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Per-cache initialization functions, injected by the composition root.
|
|
11
|
+
*
|
|
12
|
+
* The concrete initializers live in higher layers (`transforms`, `modules`,
|
|
13
|
+
* `html`, `platform`). They are passed in rather than imported here so that
|
|
14
|
+
* `src/cache` stays a low-level layer that does not depend on the rendering /
|
|
15
|
+
* transform / platform layers it would otherwise have to reach up into. See
|
|
16
|
+
* `src/server/distributed-cache-initializers.ts` for the default wiring.
|
|
17
|
+
*/
|
|
18
|
+
export type DistributedCacheInitializers = {
|
|
10
19
|
transformCache: () => Promise<boolean>;
|
|
11
20
|
ssrModuleCache: () => Promise<boolean>;
|
|
12
21
|
fileCache: () => Promise<boolean>;
|
|
@@ -14,6 +23,6 @@ type DistributedCacheInitializers = {
|
|
|
14
23
|
httpModuleCache: () => Promise<boolean>;
|
|
15
24
|
};
|
|
16
25
|
export declare function __runDistributedCacheInitializationForTests(backend: DistributedCacheStatus["backend"], initializers: DistributedCacheInitializers): Promise<DistributedCacheStatus>;
|
|
17
|
-
export declare function initializeDistributedCaches(): Promise<DistributedCacheStatus>;
|
|
26
|
+
export declare function initializeDistributedCaches(initializers: DistributedCacheInitializers): Promise<DistributedCacheStatus>;
|
|
18
27
|
export {};
|
|
19
28
|
//# sourceMappingURL=distributed-cache-init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributed-cache-init.d.ts","sourceRoot":"","sources":["../../../src/src/cache/distributed-cache-init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"distributed-cache-init.d.ts","sourceRoot":"","sources":["../../../src/src/cache/distributed-cache-init.ts"],"names":[],"mappings":"AAQA,UAAU,sBAAsB;IAC9B,OAAO,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC7C,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC,CAAC;AAiFF,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,EAC1C,YAAY,EAAE,4BAA4B,GACzC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAED,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,4BAA4B,GACzC,OAAO,CAAC,sBAAsB,CAAC,CAmBjC"}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import { initializeFileCacheBackend } from "../platform/adapters/fs/cache/file-cache.js";
|
|
2
|
-
import { initializeSSRDistributedCache } from "../modules/react-loader/ssr-module-loader/index.js";
|
|
3
|
-
import { initializeTransformCache } from "../transforms/esm/transform-cache.js";
|
|
4
|
-
import { initializeHttpModuleDistributedCache } from "../transforms/esm/http-cache-wrapper.js";
|
|
5
1
|
import { SpanNames } from "../observability/tracing/span-names.js";
|
|
6
2
|
import { withSpan } from "../observability/tracing/otlp-setup.js";
|
|
7
|
-
import { initializeProjectCSSCache } from "../html/styles-builder/tailwind-compiler.js";
|
|
8
3
|
import { logger as baseLogger } from "../utils/logger/logger.js";
|
|
9
4
|
import { isRedisConfigured } from "../utils/redis-client.js";
|
|
10
5
|
import { isApiCacheAvailable, isDiskCacheConfigured } from "./backend.js";
|
|
11
6
|
const logger = baseLogger.component("distributed-cache");
|
|
12
|
-
const defaultInitializers = {
|
|
13
|
-
transformCache: initializeTransformCache,
|
|
14
|
-
ssrModuleCache: initializeSSRDistributedCache,
|
|
15
|
-
fileCache: initializeFileCacheBackend,
|
|
16
|
-
projectCSSCache: initializeProjectCSSCache,
|
|
17
|
-
httpModuleCache: initializeHttpModuleDistributedCache,
|
|
18
|
-
};
|
|
19
7
|
function determineBackend() {
|
|
20
8
|
if (isApiCacheAvailable())
|
|
21
9
|
return "api";
|
|
@@ -88,7 +76,7 @@ async function initializeDistributedCachesWithInitializers(backend, initializers
|
|
|
88
76
|
export function __runDistributedCacheInitializationForTests(backend, initializers) {
|
|
89
77
|
return initializeDistributedCachesWithInitializers(backend, initializers);
|
|
90
78
|
}
|
|
91
|
-
export function initializeDistributedCaches() {
|
|
79
|
+
export function initializeDistributedCaches(initializers) {
|
|
92
80
|
const backend = determineBackend();
|
|
93
81
|
if (backend === "memory") {
|
|
94
82
|
return Promise.resolve({
|
|
@@ -100,5 +88,5 @@ export function initializeDistributedCaches() {
|
|
|
100
88
|
httpModuleCache: false,
|
|
101
89
|
});
|
|
102
90
|
}
|
|
103
|
-
return withSpan(SpanNames.CACHE_DISTRIBUTED_INIT, () => initializeDistributedCachesWithInitializers(backend,
|
|
91
|
+
return withSpan(SpanNames.CACHE_DISTRIBUTED_INIT, () => initializeDistributedCachesWithInitializers(backend, initializers), { "cache.backend": backend });
|
|
104
92
|
}
|
|
@@ -11,20 +11,20 @@ export declare const CONTROL_PLANE_RUN_STREAM_PATH = "/api/control-plane/runs/:r
|
|
|
11
11
|
/** Allowed control-plane surfaces — source of truth for the schema and {@link ControlPlaneSurface}. */
|
|
12
12
|
export declare const CONTROL_PLANE_SURFACES: readonly ["studio", "channels", "a2a", "mcp"];
|
|
13
13
|
/** Zod schema for get control plane surface. */
|
|
14
|
-
export declare const getControlPlaneSurfaceSchema: () => Schema<"mcp" | "
|
|
14
|
+
export declare const getControlPlaneSurfaceSchema: () => Schema<"mcp" | "channels" | "studio" | "a2a">;
|
|
15
15
|
/** Zod schema for control plane surface. */
|
|
16
|
-
export declare const ControlPlaneSurfaceSchema: Schema<"mcp" | "
|
|
16
|
+
export declare const ControlPlaneSurfaceSchema: Schema<"mcp" | "channels" | "studio" | "a2a">;
|
|
17
17
|
/** Zod schema for get control plane agents list request. */
|
|
18
18
|
export declare const getControlPlaneAgentsListRequestSchema: () => Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
19
19
|
requestId: Schema<string>;
|
|
20
20
|
projectId: Schema<string>;
|
|
21
|
-
surface: Schema<"mcp" | "
|
|
21
|
+
surface: Schema<"mcp" | "channels" | "studio" | "a2a">;
|
|
22
22
|
}>>;
|
|
23
23
|
/** Zod schema for control plane agents list request. */
|
|
24
24
|
export declare const ControlPlaneAgentsListRequestSchema: Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
25
25
|
requestId: Schema<string>;
|
|
26
26
|
projectId: Schema<string>;
|
|
27
|
-
surface: Schema<"mcp" | "
|
|
27
|
+
surface: Schema<"mcp" | "channels" | "studio" | "a2a">;
|
|
28
28
|
}>>;
|
|
29
29
|
/** Zod schema for get runtime agent skill. */
|
|
30
30
|
export declare const getRuntimeAgentSkillSchema: () => Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
@@ -232,7 +232,7 @@ declare const getControlPlaneClaimsSchema: () => Schema<import("../extensions/sc
|
|
|
232
232
|
iss: Schema<string>;
|
|
233
233
|
aud: Schema<string>;
|
|
234
234
|
sub: Schema<string>;
|
|
235
|
-
surface: Schema<"mcp" | "
|
|
235
|
+
surface: Schema<"mcp" | "channels" | "studio" | "a2a">;
|
|
236
236
|
project_id: Schema<string>;
|
|
237
237
|
request_hash: Schema<string>;
|
|
238
238
|
iat: Schema<number>;
|
|
@@ -34,8 +34,10 @@ function splitRecursive(text, separators, maxChars, overlap) {
|
|
|
34
34
|
const candidate = current ? current + sep + part : part;
|
|
35
35
|
if (candidate.length > maxChars && current) {
|
|
36
36
|
chunks.push(current);
|
|
37
|
-
// Overlap: keep the
|
|
38
|
-
|
|
37
|
+
// Overlap: keep the last `overlap` chars of the current chunk. Guard
|
|
38
|
+
// `overlap === 0` explicitly — `slice(-0)` is `slice(0)`, which returns
|
|
39
|
+
// the WHOLE chunk and would cascade it into every subsequent chunk.
|
|
40
|
+
const tail = overlap > 0 ? current.slice(-overlap) : "";
|
|
39
41
|
current = tail ? tail + sep + part : part;
|
|
40
42
|
}
|
|
41
43
|
else {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const AGENT_ERROR: import("../types.js").RegisteredError;
|
|
2
|
+
export declare const AGENT_NOT_FOUND: import("../types.js").RegisteredError;
|
|
3
|
+
export declare const AGENT_TIMEOUT: import("../types.js").RegisteredError;
|
|
4
|
+
export declare const AGENT_INTENT_ERROR: import("../types.js").RegisteredError;
|
|
5
|
+
export declare const ORCHESTRATION_ERROR: import("../types.js").RegisteredError;
|
|
6
|
+
export declare const COST_LIMIT_EXCEEDED: import("../types.js").RegisteredError;
|
|
7
|
+
/** Registry fragment for AGENT errors (slug → definition). */
|
|
8
|
+
export declare const AGENT_REGISTRY: {
|
|
9
|
+
readonly "agent-error": import("../types.js").RegisteredError;
|
|
10
|
+
readonly "agent-not-found": import("../types.js").RegisteredError;
|
|
11
|
+
readonly "agent-timeout": import("../types.js").RegisteredError;
|
|
12
|
+
readonly "agent-intent-error": import("../types.js").RegisteredError;
|
|
13
|
+
readonly "orchestration-error": import("../types.js").RegisteredError;
|
|
14
|
+
readonly "cost-limit-exceeded": import("../types.js").RegisteredError;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/agent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;;;;;;CAOjB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineError } from "../types.js";
|
|
2
|
+
export const AGENT_ERROR = defineError({
|
|
3
|
+
slug: "agent-error",
|
|
4
|
+
category: "AGENT",
|
|
5
|
+
status: 500,
|
|
6
|
+
title: "Agent operation error",
|
|
7
|
+
suggestion: "Check agent configuration and logs",
|
|
8
|
+
});
|
|
9
|
+
export const AGENT_NOT_FOUND = defineError({
|
|
10
|
+
slug: "agent-not-found",
|
|
11
|
+
category: "AGENT",
|
|
12
|
+
status: 404,
|
|
13
|
+
title: "Agent not found",
|
|
14
|
+
suggestion: "Verify the agent ID exists",
|
|
15
|
+
});
|
|
16
|
+
export const AGENT_TIMEOUT = defineError({
|
|
17
|
+
slug: "agent-timeout",
|
|
18
|
+
category: "AGENT",
|
|
19
|
+
status: 408,
|
|
20
|
+
title: "Agent operation timed out",
|
|
21
|
+
suggestion: "Increase timeout or simplify the request",
|
|
22
|
+
});
|
|
23
|
+
export const AGENT_INTENT_ERROR = defineError({
|
|
24
|
+
slug: "agent-intent-error",
|
|
25
|
+
category: "AGENT",
|
|
26
|
+
status: 400,
|
|
27
|
+
title: "Agent intent parsing error",
|
|
28
|
+
suggestion: "Rephrase the request more clearly",
|
|
29
|
+
});
|
|
30
|
+
export const ORCHESTRATION_ERROR = defineError({
|
|
31
|
+
slug: "orchestration-error",
|
|
32
|
+
category: "AGENT",
|
|
33
|
+
status: 500,
|
|
34
|
+
title: "Multi-agent orchestration error",
|
|
35
|
+
suggestion: "Check agent coordination logic",
|
|
36
|
+
});
|
|
37
|
+
export const COST_LIMIT_EXCEEDED = defineError({
|
|
38
|
+
slug: "cost-limit-exceeded",
|
|
39
|
+
category: "AGENT",
|
|
40
|
+
status: 429,
|
|
41
|
+
title: "Cost limit exceeded",
|
|
42
|
+
suggestion: "Wait for the budget period to reset or increase the limit",
|
|
43
|
+
});
|
|
44
|
+
/** Registry fragment for AGENT errors (slug → definition). */
|
|
45
|
+
export const AGENT_REGISTRY = {
|
|
46
|
+
"agent-error": AGENT_ERROR,
|
|
47
|
+
"agent-not-found": AGENT_NOT_FOUND,
|
|
48
|
+
"agent-timeout": AGENT_TIMEOUT,
|
|
49
|
+
"agent-intent-error": AGENT_INTENT_ERROR,
|
|
50
|
+
"orchestration-error": ORCHESTRATION_ERROR,
|
|
51
|
+
"cost-limit-exceeded": COST_LIMIT_EXCEEDED,
|
|
52
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const CLIENT_BOUNDARY_VIOLATION: import("../types.js").RegisteredError;
|
|
2
|
+
export declare const SERVER_ONLY_IN_CLIENT: import("../types.js").RegisteredError;
|
|
3
|
+
export declare const CLIENT_ONLY_IN_SERVER: import("../types.js").RegisteredError;
|
|
4
|
+
export declare const INVALID_USE_CLIENT: import("../types.js").RegisteredError;
|
|
5
|
+
export declare const INVALID_USE_SERVER: import("../types.js").RegisteredError;
|
|
6
|
+
export declare const RSC_PAYLOAD_ERROR: import("../types.js").RegisteredError;
|
|
7
|
+
/** Registry fragment for BOUNDARY errors (slug → definition). */
|
|
8
|
+
export declare const BOUNDARY_REGISTRY: {
|
|
9
|
+
readonly "client-boundary-violation": import("../types.js").RegisteredError;
|
|
10
|
+
readonly "server-only-in-client": import("../types.js").RegisteredError;
|
|
11
|
+
readonly "client-only-in-server": import("../types.js").RegisteredError;
|
|
12
|
+
readonly "invalid-use-client": import("../types.js").RegisteredError;
|
|
13
|
+
readonly "invalid-use-server": import("../types.js").RegisteredError;
|
|
14
|
+
readonly "rsc-payload-error": import("../types.js").RegisteredError;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=boundary.d.ts.map
|
|
@@ -0,0 +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;;;;;;;CAOpB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineError } from "../types.js";
|
|
2
|
+
export const CLIENT_BOUNDARY_VIOLATION = defineError({
|
|
3
|
+
slug: "client-boundary-violation",
|
|
4
|
+
category: "BOUNDARY",
|
|
5
|
+
status: 400,
|
|
6
|
+
title: "Client boundary rule violation",
|
|
7
|
+
suggestion: "Add 'use client' directive or move code to a client component",
|
|
8
|
+
});
|
|
9
|
+
export const SERVER_ONLY_IN_CLIENT = defineError({
|
|
10
|
+
slug: "server-only-in-client",
|
|
11
|
+
category: "BOUNDARY",
|
|
12
|
+
status: 400,
|
|
13
|
+
title: "Server-only code in client component",
|
|
14
|
+
suggestion: "Move server-only code to a server component",
|
|
15
|
+
});
|
|
16
|
+
export const CLIENT_ONLY_IN_SERVER = defineError({
|
|
17
|
+
slug: "client-only-in-server",
|
|
18
|
+
category: "BOUNDARY",
|
|
19
|
+
status: 400,
|
|
20
|
+
title: "Client-only code in server component",
|
|
21
|
+
suggestion: "Move client-only code to a client component",
|
|
22
|
+
});
|
|
23
|
+
export const INVALID_USE_CLIENT = defineError({
|
|
24
|
+
slug: "invalid-use-client",
|
|
25
|
+
category: "BOUNDARY",
|
|
26
|
+
status: 400,
|
|
27
|
+
title: "Invalid 'use client' directive",
|
|
28
|
+
suggestion: "Place 'use client' at the top of the file",
|
|
29
|
+
});
|
|
30
|
+
export const INVALID_USE_SERVER = defineError({
|
|
31
|
+
slug: "invalid-use-server",
|
|
32
|
+
category: "BOUNDARY",
|
|
33
|
+
status: 400,
|
|
34
|
+
title: "Invalid 'use server' directive",
|
|
35
|
+
suggestion: "Place 'use server' at the top of the file or function",
|
|
36
|
+
});
|
|
37
|
+
export const RSC_PAYLOAD_ERROR = defineError({
|
|
38
|
+
slug: "rsc-payload-error",
|
|
39
|
+
category: "BOUNDARY",
|
|
40
|
+
status: 500,
|
|
41
|
+
title: "RSC payload serialization error",
|
|
42
|
+
suggestion: "Ensure props are serializable (no functions, symbols, etc.)",
|
|
43
|
+
});
|
|
44
|
+
/** Registry fragment for BOUNDARY errors (slug → definition). */
|
|
45
|
+
export const BOUNDARY_REGISTRY = {
|
|
46
|
+
"client-boundary-violation": CLIENT_BOUNDARY_VIOLATION,
|
|
47
|
+
"server-only-in-client": SERVER_ONLY_IN_CLIENT,
|
|
48
|
+
"client-only-in-server": CLIENT_ONLY_IN_SERVER,
|
|
49
|
+
"invalid-use-client": INVALID_USE_CLIENT,
|
|
50
|
+
"invalid-use-server": INVALID_USE_SERVER,
|
|
51
|
+
"rsc-payload-error": RSC_PAYLOAD_ERROR,
|
|
52
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const BUILD_FAILED: import("../types.js").RegisteredError;
|
|
2
|
+
export declare const BUNDLE_ERROR: import("../types.js").RegisteredError;
|
|
3
|
+
export declare const TYPESCRIPT_ERROR: import("../types.js").RegisteredError;
|
|
4
|
+
export declare const MDX_COMPILE_ERROR: import("../types.js").RegisteredError;
|
|
5
|
+
export declare const ASSET_OPTIMIZATION_ERROR: import("../types.js").RegisteredError;
|
|
6
|
+
export declare const SSG_GENERATION_ERROR: import("../types.js").RegisteredError;
|
|
7
|
+
export declare const SOURCEMAP_ERROR: import("../types.js").RegisteredError;
|
|
8
|
+
export declare const COMPILATION_ERROR: import("../types.js").RegisteredError;
|
|
9
|
+
/** Registry fragment for BUILD errors (slug → definition). */
|
|
10
|
+
export declare const BUILD_REGISTRY: {
|
|
11
|
+
readonly "build-failed": import("../types.js").RegisteredError;
|
|
12
|
+
readonly "bundle-error": import("../types.js").RegisteredError;
|
|
13
|
+
readonly "typescript-error": import("../types.js").RegisteredError;
|
|
14
|
+
readonly "mdx-compile-error": import("../types.js").RegisteredError;
|
|
15
|
+
readonly "asset-optimization-error": import("../types.js").RegisteredError;
|
|
16
|
+
readonly "ssg-generation-error": import("../types.js").RegisteredError;
|
|
17
|
+
readonly "sourcemap-error": import("../types.js").RegisteredError;
|
|
18
|
+
readonly "compilation-error": import("../types.js").RegisteredError;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,uCAMvB,CAAC;AAEH,eAAO,MAAM,YAAY,uCAMvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,eAAO,MAAM,wBAAwB,uCAMnC,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAM/B,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,iBAAiB,uCAM5B,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineError } from "../types.js";
|
|
2
|
+
export const BUILD_FAILED = defineError({
|
|
3
|
+
slug: "build-failed",
|
|
4
|
+
category: "BUILD",
|
|
5
|
+
status: 500,
|
|
6
|
+
title: "Build process failed",
|
|
7
|
+
suggestion: "Check the build output for specific errors",
|
|
8
|
+
});
|
|
9
|
+
export const BUNDLE_ERROR = defineError({
|
|
10
|
+
slug: "bundle-error",
|
|
11
|
+
category: "BUILD",
|
|
12
|
+
status: 500,
|
|
13
|
+
title: "Bundle generation failed",
|
|
14
|
+
suggestion: "Review bundler output for details",
|
|
15
|
+
});
|
|
16
|
+
export const TYPESCRIPT_ERROR = defineError({
|
|
17
|
+
slug: "typescript-error",
|
|
18
|
+
category: "BUILD",
|
|
19
|
+
status: 500,
|
|
20
|
+
title: "TypeScript compilation error",
|
|
21
|
+
suggestion: "Fix TypeScript errors shown in the output",
|
|
22
|
+
});
|
|
23
|
+
export const MDX_COMPILE_ERROR = defineError({
|
|
24
|
+
slug: "mdx-compile-error",
|
|
25
|
+
category: "BUILD",
|
|
26
|
+
status: 500,
|
|
27
|
+
title: "MDX compilation failed",
|
|
28
|
+
suggestion: "Check your MDX file syntax",
|
|
29
|
+
});
|
|
30
|
+
export const ASSET_OPTIMIZATION_ERROR = defineError({
|
|
31
|
+
slug: "asset-optimization-error",
|
|
32
|
+
category: "BUILD",
|
|
33
|
+
status: 500,
|
|
34
|
+
title: "Asset optimization failed",
|
|
35
|
+
suggestion: "Check asset file formats and paths",
|
|
36
|
+
});
|
|
37
|
+
export const SSG_GENERATION_ERROR = defineError({
|
|
38
|
+
slug: "ssg-generation-error",
|
|
39
|
+
category: "BUILD",
|
|
40
|
+
status: 500,
|
|
41
|
+
title: "Static site generation failed",
|
|
42
|
+
suggestion: "Review SSG configuration and data fetching",
|
|
43
|
+
});
|
|
44
|
+
export const SOURCEMAP_ERROR = defineError({
|
|
45
|
+
slug: "sourcemap-error",
|
|
46
|
+
category: "BUILD",
|
|
47
|
+
status: 500,
|
|
48
|
+
title: "Source map generation failed",
|
|
49
|
+
suggestion: "Check source map configuration",
|
|
50
|
+
});
|
|
51
|
+
export const COMPILATION_ERROR = defineError({
|
|
52
|
+
slug: "compilation-error",
|
|
53
|
+
category: "BUILD",
|
|
54
|
+
status: 500,
|
|
55
|
+
title: "Compilation failed",
|
|
56
|
+
suggestion: "Review compiler output for specific errors",
|
|
57
|
+
});
|
|
58
|
+
/** Registry fragment for BUILD errors (slug → definition). */
|
|
59
|
+
export const BUILD_REGISTRY = {
|
|
60
|
+
"build-failed": BUILD_FAILED,
|
|
61
|
+
"bundle-error": BUNDLE_ERROR,
|
|
62
|
+
"typescript-error": TYPESCRIPT_ERROR,
|
|
63
|
+
"mdx-compile-error": MDX_COMPILE_ERROR,
|
|
64
|
+
"asset-optimization-error": ASSET_OPTIMIZATION_ERROR,
|
|
65
|
+
"ssg-generation-error": SSG_GENERATION_ERROR,
|
|
66
|
+
"sourcemap-error": SOURCEMAP_ERROR,
|
|
67
|
+
"compilation-error": COMPILATION_ERROR,
|
|
68
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const CONFIG_NOT_FOUND: import("../types.js").RegisteredError;
|
|
2
|
+
export declare const CONFIG_INVALID: import("../types.js").RegisteredError;
|
|
3
|
+
export declare const CONFIG_PARSE_ERROR: import("../types.js").RegisteredError;
|
|
4
|
+
/** Schema-level config validation (e.g. Zod schema mismatch at runtime) */
|
|
5
|
+
export declare const CONFIG_VALIDATION_ERROR: import("../types.js").RegisteredError;
|
|
6
|
+
export declare const CONFIG_TYPE_ERROR: import("../types.js").RegisteredError;
|
|
7
|
+
export declare const IMPORT_MAP_INVALID: import("../types.js").RegisteredError;
|
|
8
|
+
export declare const CORS_CONFIG_INVALID: import("../types.js").RegisteredError;
|
|
9
|
+
/** Config file validation failures (replaces ConfigValidationError) */
|
|
10
|
+
export declare const CONFIG_VALIDATION_FAILED: import("../types.js").RegisteredError;
|
|
11
|
+
/** Registry fragment for CONFIG errors (slug → definition). */
|
|
12
|
+
export declare const CONFIG_REGISTRY: {
|
|
13
|
+
readonly "config-not-found": import("../types.js").RegisteredError;
|
|
14
|
+
readonly "config-invalid": import("../types.js").RegisteredError;
|
|
15
|
+
readonly "config-parse-error": import("../types.js").RegisteredError;
|
|
16
|
+
readonly "config-validation-error": import("../types.js").RegisteredError;
|
|
17
|
+
readonly "config-type-error": import("../types.js").RegisteredError;
|
|
18
|
+
readonly "import-map-invalid": import("../types.js").RegisteredError;
|
|
19
|
+
readonly "cors-config-invalid": import("../types.js").RegisteredError;
|
|
20
|
+
readonly "config-validation-failed": import("../types.js").RegisteredError;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uCAM3B,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,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineError } from "../types.js";
|
|
2
|
+
export const CONFIG_NOT_FOUND = defineError({
|
|
3
|
+
slug: "config-not-found",
|
|
4
|
+
category: "CONFIG",
|
|
5
|
+
status: 404,
|
|
6
|
+
title: "Configuration file not found",
|
|
7
|
+
suggestion: "Run 'vf init' to create a configuration file",
|
|
8
|
+
});
|
|
9
|
+
export const CONFIG_INVALID = defineError({
|
|
10
|
+
slug: "config-invalid",
|
|
11
|
+
category: "CONFIG",
|
|
12
|
+
status: 400,
|
|
13
|
+
title: "Invalid configuration format",
|
|
14
|
+
suggestion: "Check your veryfront.config.ts for syntax errors",
|
|
15
|
+
});
|
|
16
|
+
export const CONFIG_PARSE_ERROR = defineError({
|
|
17
|
+
slug: "config-parse-error",
|
|
18
|
+
category: "CONFIG",
|
|
19
|
+
status: 400,
|
|
20
|
+
title: "Failed to parse configuration",
|
|
21
|
+
suggestion: "Ensure your configuration file is valid TypeScript/JSON",
|
|
22
|
+
});
|
|
23
|
+
/** Schema-level config validation (e.g. Zod schema mismatch at runtime) */
|
|
24
|
+
export const CONFIG_VALIDATION_ERROR = defineError({
|
|
25
|
+
slug: "config-validation-error",
|
|
26
|
+
category: "CONFIG",
|
|
27
|
+
status: 422,
|
|
28
|
+
title: "Configuration validation failed",
|
|
29
|
+
suggestion: "Check the configuration against the schema requirements",
|
|
30
|
+
});
|
|
31
|
+
export const CONFIG_TYPE_ERROR = defineError({
|
|
32
|
+
slug: "config-type-error",
|
|
33
|
+
category: "CONFIG",
|
|
34
|
+
status: 400,
|
|
35
|
+
title: "Configuration type mismatch",
|
|
36
|
+
suggestion: "Ensure configuration values match expected types",
|
|
37
|
+
});
|
|
38
|
+
export const IMPORT_MAP_INVALID = defineError({
|
|
39
|
+
slug: "import-map-invalid",
|
|
40
|
+
category: "CONFIG",
|
|
41
|
+
status: 400,
|
|
42
|
+
title: "Invalid import map configuration",
|
|
43
|
+
suggestion: "Check your import map syntax and paths",
|
|
44
|
+
});
|
|
45
|
+
export const CORS_CONFIG_INVALID = defineError({
|
|
46
|
+
slug: "cors-config-invalid",
|
|
47
|
+
category: "CONFIG",
|
|
48
|
+
status: 400,
|
|
49
|
+
title: "Invalid CORS configuration",
|
|
50
|
+
suggestion: "Review CORS settings in your configuration",
|
|
51
|
+
});
|
|
52
|
+
/** Config file validation failures (replaces ConfigValidationError) */
|
|
53
|
+
export const CONFIG_VALIDATION_FAILED = defineError({
|
|
54
|
+
slug: "config-validation-failed",
|
|
55
|
+
category: "CONFIG",
|
|
56
|
+
status: 400,
|
|
57
|
+
title: "Configuration validation failed",
|
|
58
|
+
suggestion: "Check configuration values against requirements",
|
|
59
|
+
});
|
|
60
|
+
/** Registry fragment for CONFIG errors (slug → definition). */
|
|
61
|
+
export const CONFIG_REGISTRY = {
|
|
62
|
+
"config-not-found": CONFIG_NOT_FOUND,
|
|
63
|
+
"config-invalid": CONFIG_INVALID,
|
|
64
|
+
"config-parse-error": CONFIG_PARSE_ERROR,
|
|
65
|
+
"config-validation-error": CONFIG_VALIDATION_ERROR,
|
|
66
|
+
"config-type-error": CONFIG_TYPE_ERROR,
|
|
67
|
+
"import-map-invalid": IMPORT_MAP_INVALID,
|
|
68
|
+
"cors-config-invalid": CORS_CONFIG_INVALID,
|
|
69
|
+
"config-validation-failed": CONFIG_VALIDATION_FAILED,
|
|
70
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const DEPLOYMENT_ERROR: import("../types.js").RegisteredError;
|
|
2
|
+
export declare const PLATFORM_ERROR: import("../types.js").RegisteredError;
|
|
3
|
+
export declare const ENV_VAR_MISSING: import("../types.js").RegisteredError;
|
|
4
|
+
export declare const PRODUCTION_BUILD_REQUIRED: import("../types.js").RegisteredError;
|
|
5
|
+
/** Registry fragment for DEPLOY errors (slug → definition). */
|
|
6
|
+
export declare const DEPLOY_REGISTRY: {
|
|
7
|
+
readonly "deployment-error": import("../types.js").RegisteredError;
|
|
8
|
+
readonly "platform-error": import("../types.js").RegisteredError;
|
|
9
|
+
readonly "env-var-missing": import("../types.js").RegisteredError;
|
|
10
|
+
readonly "production-build-required": import("../types.js").RegisteredError;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/deploy.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,cAAc,uCAMzB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,yBAAyB,uCAMpC,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineError } from "../types.js";
|
|
2
|
+
export const DEPLOYMENT_ERROR = defineError({
|
|
3
|
+
slug: "deployment-error",
|
|
4
|
+
category: "DEPLOY",
|
|
5
|
+
status: 500,
|
|
6
|
+
title: "Deployment process failed",
|
|
7
|
+
suggestion: "Check deployment logs for details",
|
|
8
|
+
});
|
|
9
|
+
export const PLATFORM_ERROR = defineError({
|
|
10
|
+
slug: "platform-error",
|
|
11
|
+
category: "DEPLOY",
|
|
12
|
+
status: 500,
|
|
13
|
+
title: "Platform-specific error",
|
|
14
|
+
suggestion: "Check platform documentation and requirements",
|
|
15
|
+
});
|
|
16
|
+
export const ENV_VAR_MISSING = defineError({
|
|
17
|
+
slug: "env-var-missing",
|
|
18
|
+
category: "DEPLOY",
|
|
19
|
+
status: 500,
|
|
20
|
+
title: "Required environment variable missing",
|
|
21
|
+
suggestion: "Set the required environment variable",
|
|
22
|
+
});
|
|
23
|
+
export const PRODUCTION_BUILD_REQUIRED = defineError({
|
|
24
|
+
slug: "production-build-required",
|
|
25
|
+
category: "DEPLOY",
|
|
26
|
+
status: 400,
|
|
27
|
+
title: "Production build required",
|
|
28
|
+
suggestion: "Run 'vf build' before deploying",
|
|
29
|
+
});
|
|
30
|
+
/** Registry fragment for DEPLOY errors (slug → definition). */
|
|
31
|
+
export const DEPLOY_REGISTRY = {
|
|
32
|
+
"deployment-error": DEPLOYMENT_ERROR,
|
|
33
|
+
"platform-error": PLATFORM_ERROR,
|
|
34
|
+
"env-var-missing": ENV_VAR_MISSING,
|
|
35
|
+
"production-build-required": PRODUCTION_BUILD_REQUIRED,
|
|
36
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const HMR_ERROR: import("../types.js").RegisteredError;
|
|
2
|
+
export declare const DEV_SERVER_ERROR: import("../types.js").RegisteredError;
|
|
3
|
+
export declare const FAST_REFRESH_ERROR: import("../types.js").RegisteredError;
|
|
4
|
+
export declare const ERROR_OVERLAY_ERROR: import("../types.js").RegisteredError;
|
|
5
|
+
export declare const SOURCE_MAP_ERROR: import("../types.js").RegisteredError;
|
|
6
|
+
/** Registry fragment for DEV errors (slug → definition). */
|
|
7
|
+
export declare const DEV_REGISTRY: {
|
|
8
|
+
readonly "hmr-error": import("../types.js").RegisteredError;
|
|
9
|
+
readonly "dev-server-error": import("../types.js").RegisteredError;
|
|
10
|
+
readonly "fast-refresh-error": import("../types.js").RegisteredError;
|
|
11
|
+
readonly "error-overlay-error": import("../types.js").RegisteredError;
|
|
12
|
+
readonly "source-map-error": import("../types.js").RegisteredError;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=dev.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/dev.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,uCAMpB,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineError } from "../types.js";
|
|
2
|
+
export const HMR_ERROR = defineError({
|
|
3
|
+
slug: "hmr-error",
|
|
4
|
+
category: "DEV",
|
|
5
|
+
status: 500,
|
|
6
|
+
title: "Hot module replacement error",
|
|
7
|
+
suggestion: "Restart the development server",
|
|
8
|
+
});
|
|
9
|
+
export const DEV_SERVER_ERROR = defineError({
|
|
10
|
+
slug: "dev-server-error",
|
|
11
|
+
category: "DEV",
|
|
12
|
+
status: 500,
|
|
13
|
+
title: "Development server error",
|
|
14
|
+
suggestion: "Check the dev server logs and restart",
|
|
15
|
+
});
|
|
16
|
+
export const FAST_REFRESH_ERROR = defineError({
|
|
17
|
+
slug: "fast-refresh-error",
|
|
18
|
+
category: "DEV",
|
|
19
|
+
status: 500,
|
|
20
|
+
title: "Fast refresh failed",
|
|
21
|
+
suggestion: "Save the file again or restart the dev server",
|
|
22
|
+
});
|
|
23
|
+
export const ERROR_OVERLAY_ERROR = defineError({
|
|
24
|
+
slug: "error-overlay-error",
|
|
25
|
+
category: "DEV",
|
|
26
|
+
status: 500,
|
|
27
|
+
title: "Error overlay failed",
|
|
28
|
+
suggestion: "Check browser console for details",
|
|
29
|
+
});
|
|
30
|
+
export const SOURCE_MAP_ERROR = defineError({
|
|
31
|
+
slug: "source-map-error",
|
|
32
|
+
category: "DEV",
|
|
33
|
+
status: 500,
|
|
34
|
+
title: "Source map loading error",
|
|
35
|
+
suggestion: "Rebuild or clear cache",
|
|
36
|
+
});
|
|
37
|
+
/** Registry fragment for DEV errors (slug → definition). */
|
|
38
|
+
export const DEV_REGISTRY = {
|
|
39
|
+
"hmr-error": HMR_ERROR,
|
|
40
|
+
"dev-server-error": DEV_SERVER_ERROR,
|
|
41
|
+
"fast-refresh-error": FAST_REFRESH_ERROR,
|
|
42
|
+
"error-overlay-error": ERROR_OVERLAY_ERROR,
|
|
43
|
+
"source-map-error": SOURCE_MAP_ERROR,
|
|
44
|
+
};
|