client.ts — astro Source File
Architecture documentation for client.ts, a typescript file in the astro codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR eb04bc4a_f415_2ce3_c34b_e7ef77fb812f["client.ts"] 9f5b84fa_f8a8_ed7f_2a86_7ecc740bf1d4["../actions/consts.js"] eb04bc4a_f415_2ce3_c34b_e7ef77fb812f --> 9f5b84fa_f8a8_ed7f_2a86_7ecc740bf1d4 a1711a94_f06c_214e_28b9_0d6031277c04["../../actions/runtime/types.js"] eb04bc4a_f415_2ce3_c34b_e7ef77fb812f --> a1711a94_f06c_214e_28b9_0d6031277c04 7e4494c0_5563_4329_1bff_a84be66e1bc2["../core/path.js"] eb04bc4a_f415_2ce3_c34b_e7ef77fb812f --> 7e4494c0_5563_4329_1bff_a84be66e1bc2 28857b9f_4720_3f29_4abb_a7eec34dcca5["../types/public/context.js"] eb04bc4a_f415_2ce3_c34b_e7ef77fb812f --> 28857b9f_4720_3f29_4abb_a7eec34dcca5 ca52ff61_c81f_c2ca_81b6_5a678b65fd31["devalue"] eb04bc4a_f415_2ce3_c34b_e7ef77fb812f --> ca52ff61_c81f_c2ca_81b6_5a678b65fd31 a2586aae_ce09_613d_4444_659268b61a89["core"] eb04bc4a_f415_2ce3_c34b_e7ef77fb812f --> a2586aae_ce09_613d_4444_659268b61a89 style eb04bc4a_f415_2ce3_c34b_e7ef77fb812f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// It's safe to import this file on both server and client
import { parse as devalueParse } from 'devalue';
import type * as z from 'zod/v4/core';
import { ACTION_QUERY_PARAMS } from '../consts.js';
import type {
ActionClient,
ActionErrorCode,
ErrorInferenceObject,
SafeResult,
SerializedActionResult,
} from './types.js';
import { appendForwardSlash } from '../../core/path.js';
import type { APIContext } from '../../types/public/context.js';
export const codeToStatusMap = {
// Implemented from IANA HTTP Status Code Registry
// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
BAD_REQUEST: 400,
UNAUTHORIZED: 401,
PAYMENT_REQUIRED: 402,
FORBIDDEN: 403,
NOT_FOUND: 404,
METHOD_NOT_ALLOWED: 405,
NOT_ACCEPTABLE: 406,
PROXY_AUTHENTICATION_REQUIRED: 407,
REQUEST_TIMEOUT: 408,
CONFLICT: 409,
GONE: 410,
LENGTH_REQUIRED: 411,
PRECONDITION_FAILED: 412,
CONTENT_TOO_LARGE: 413,
URI_TOO_LONG: 414,
UNSUPPORTED_MEDIA_TYPE: 415,
RANGE_NOT_SATISFIABLE: 416,
EXPECTATION_FAILED: 417,
MISDIRECTED_REQUEST: 421,
UNPROCESSABLE_CONTENT: 422,
LOCKED: 423,
FAILED_DEPENDENCY: 424,
TOO_EARLY: 425,
UPGRADE_REQUIRED: 426,
PRECONDITION_REQUIRED: 428,
TOO_MANY_REQUESTS: 429,
REQUEST_HEADER_FIELDS_TOO_LARGE: 431,
UNAVAILABLE_FOR_LEGAL_REASONS: 451,
INTERNAL_SERVER_ERROR: 500,
NOT_IMPLEMENTED: 501,
BAD_GATEWAY: 502,
SERVICE_UNAVAILABLE: 503,
GATEWAY_TIMEOUT: 504,
HTTP_VERSION_NOT_SUPPORTED: 505,
VARIANT_ALSO_NEGOTIATES: 506,
INSUFFICIENT_STORAGE: 507,
LOOP_DETECTED: 508,
NETWORK_AUTHENTICATION_REQUIRED: 511,
} satisfies Record<string, number>;
const statusToCodeMap: Record<number, ActionErrorCode> = Object.entries(codeToStatusMap).reduce(
// reverse the key-value pairs
// ... (245 more lines)
Domain
Subdomains
Functions
Classes
Dependencies
- ../../actions/runtime/types.js
- ../actions/consts.js
- ../core/path.js
- ../types/public/context.js
- core
- devalue
Source
Frequently Asked Questions
What does client.ts do?
client.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in client.ts?
client.ts defines 9 function(s): actionResultErrorStack, createActionsProxy, createGetActionPath, deserializeActionResult, getActionPathFromString, getActionQueryString, isActionError, isInputError, statusToCodeMap.
What does client.ts depend on?
client.ts imports 6 module(s): ../../actions/runtime/types.js, ../actions/consts.js, ../core/path.js, ../types/public/context.js, core, devalue.
Where is client.ts in the architecture?
client.ts is located at packages/astro/src/actions/runtime/client.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/actions/runtime).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free