serialized.ts — astro Source File
Architecture documentation for serialized.ts, a typescript file in the astro codebase. 17 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR bb258207_6489_88c4_0ed3_a25dbb4adf47["serialized.ts"] 9f5b84fa_f8a8_ed7f_2a86_7ecc740bf1d4["../actions/consts.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 9f5b84fa_f8a8_ed7f_2a86_7ecc740bf1d4 e9dfb380_680c_13fb_c9d4_a88e777254bd["../core/app/common.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> e9dfb380_680c_13fb_c9d4_a88e777254bd 97dbad4f_4a90_206c_6e29_6a54c12480f2["../core/app/index.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 97dbad4f_4a90_206c_6e29_6a54c12480f2 a4f2698c_5256_262a_ba7c_f72b51878d10["../core/app/types.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> a4f2698c_5256_262a_ba7c_f72b51878d10 1859d0f1_9162_fad3_04eb_191057d25921["../core/build/plugins/plugin-manifest.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 1859d0f1_9162_fad3_04eb_191057d25921 6fe92471_5113_a0cf_c232_c87e5712a05f["../core/csp/common.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 6fe92471_5113_a0cf_c232_c87e5712a05f dd2fe7bd_2244_3ff4_38ec_5e07763d1492["../core/encryption.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> dd2fe7bd_2244_3ff4_38ec_5e07763d1492 b1a2aff7_d17c_e291_488b_91296d26d3db["../core/middleware/vite-plugin.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> b1a2aff7_d17c_e291_488b_91296d26d3db 196e535c_e0bd_14a2_fdac_07ddc8954833["../core/server-islands/vite-plugin-server-islands.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 196e535c_e0bd_14a2_fdac_07ddc8954833 9cb35f33_1853_968b_f820_d4ebb5c74ea3["../core/session/vite-plugin.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 9cb35f33_1853_968b_f820_d4ebb5c74ea3 e9b74c5a_8d34_34a7_e196_5e41b87214aa["../types/astro.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> e9b74c5a_8d34_34a7_e196_5e41b87214aa 212611a4_542f_fa5f_7e4d_01f670414f3e["../vite-plugin-pages/index.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 212611a4_542f_fa5f_7e4d_01f670414f3e eb862ec5_4013_2a55_9c85_4f758f2be3e2["../vite-plugin-renderers/index.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> eb862ec5_4013_2a55_9c85_4f758f2be3e2 11c1344d_96e5_6b32_54a8_86b15d8e1cbe["../vite-plugin-routes/index.js"] bb258207_6489_88c4_0ed3_a25dbb4adf47 --> 11c1344d_96e5_6b32_54a8_86b15d8e1cbe style bb258207_6489_88c4_0ed3_a25dbb4adf47 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Plugin, ViteDevServer } from 'vite';
import { ACTIONS_ENTRYPOINT_VIRTUAL_MODULE_ID } from '../actions/consts.js';
import { toFallbackType } from '../core/app/common.js';
import { toRoutingStrategy } from '../core/app/index.js';
import type { SerializedSSRManifest, SSRManifestCSP, SSRManifestI18n } from '../core/app/types.js';
import { MANIFEST_REPLACE } from '../core/build/plugins/plugin-manifest.js';
import {
getAlgorithm,
getDirectives,
getScriptHashes,
getScriptResources,
getStrictDynamic,
getStyleHashes,
getStyleResources,
shouldTrackCspHashes,
} from '../core/csp/common.js';
import { createKey, encodeKey, getEnvironmentKey, hasEnvironmentKey } from '../core/encryption.js';
import { MIDDLEWARE_MODULE_ID } from '../core/middleware/vite-plugin.js';
import { SERVER_ISLAND_MANIFEST } from '../core/server-islands/vite-plugin-server-islands.js';
import { VIRTUAL_SESSION_DRIVER_ID } from '../core/session/vite-plugin.js';
import type { AstroSettings } from '../types/astro.js';
import { VIRTUAL_PAGES_MODULE_ID } from '../vite-plugin-pages/index.js';
import { ASTRO_RENDERERS_MODULE_ID } from '../vite-plugin-renderers/index.js';
import { ASTRO_ROUTES_MODULE_ID } from '../vite-plugin-routes/index.js';
import { sessionConfigToManifest } from '../core/session/utils.js';
import { ASTRO_VITE_ENVIRONMENT_NAMES } from '../core/constants.js';
// This is used by Cloudflare optimizeDeps config
export const SERIALIZED_MANIFEST_ID = 'virtual:astro:manifest';
export const SERIALIZED_MANIFEST_RESOLVED_ID = '\0' + SERIALIZED_MANIFEST_ID;
export function serializedManifestPlugin({
settings,
command,
sync,
}: {
settings: AstroSettings;
command: 'dev' | 'build';
sync: boolean;
}): Plugin {
function reloadManifest(path: string | null, server: ViteDevServer) {
if (path != null && path.startsWith(settings.config.srcDir.pathname)) {
const environment = server.environments[ASTRO_VITE_ENVIRONMENT_NAMES.ssr];
const virtualMod = environment.moduleGraph.getModuleById(SERIALIZED_MANIFEST_RESOLVED_ID);
if (!virtualMod) return;
environment.moduleGraph.invalidateModule(virtualMod);
}
}
return {
name: SERIALIZED_MANIFEST_ID,
enforce: 'pre',
configureServer(server) {
server.watcher.on('add', (path) => reloadManifest(path, server));
server.watcher.on('unlink', (path) => reloadManifest(path, server));
server.watcher.on('change', (path) => reloadManifest(path, server));
},
resolveId: {
// ... (125 more lines)
Domain
Subdomains
Dependencies
- ../actions/consts.js
- ../core/app/common.js
- ../core/app/index.js
- ../core/app/types.js
- ../core/build/plugins/plugin-manifest.js
- ../core/constants.js
- ../core/csp/common.js
- ../core/encryption.js
- ../core/middleware/vite-plugin.js
- ../core/server-islands/vite-plugin-server-islands.js
- ../core/session/utils.js
- ../core/session/vite-plugin.js
- ../types/astro.js
- ../vite-plugin-pages/index.js
- ../vite-plugin-renderers/index.js
- ../vite-plugin-routes/index.js
- vite
Source
Frequently Asked Questions
What does serialized.ts do?
serialized.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 serialized.ts?
serialized.ts defines 2 function(s): createSerializedManifest, serializedManifestPlugin.
What does serialized.ts depend on?
serialized.ts imports 17 module(s): ../actions/consts.js, ../core/app/common.js, ../core/app/index.js, ../core/app/types.js, ../core/build/plugins/plugin-manifest.js, ../core/constants.js, ../core/csp/common.js, ../core/encryption.js, and 9 more.
Where is serialized.ts in the architecture?
serialized.ts is located at packages/astro/src/manifest/serialized.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/manifest).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free