Home / File/ drivers.ts — astro Source File

drivers.ts — astro Source File

Architecture documentation for drivers.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.

File typescript CoreAstro RenderingEngine 2 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  1f761f48_56ad_eee1_0b95_ba8ba7437011["drivers.ts"]
  e6591dc4_f998_7dbc_3c66_06ac5ec7fba0["../../core/session/types.js"]
  1f761f48_56ad_eee1_0b95_ba8ba7437011 --> e6591dc4_f998_7dbc_3c66_06ac5ec7fba0
  a56f5589_e3c3_ced2_bdd4_5ad39a3cb093["unstorage"]
  1f761f48_56ad_eee1_0b95_ba8ba7437011 --> a56f5589_e3c3_ced2_bdd4_5ad39a3cb093
  style 1f761f48_56ad_eee1_0b95_ba8ba7437011 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { builtinDrivers, type BuiltinDriverOptions } from 'unstorage';
import type { SessionDriverConfig } from './types.js';

type WithoutDash<T> = T extends `${string}-${string}` ? never : T;

const unstorageDrivers = Object.fromEntries(
	Object.entries(builtinDrivers)
		.filter(([name]) => !name.includes('-'))
		.map(([name, entrypoint]) => [
			name,
			name === 'fs'
				? (config: any): SessionDriverConfig => ({
						entrypoint: builtinDrivers.fsLite,
						config: {
							base: '.astro/session',
							...config,
						},
					})
				: (config: any): SessionDriverConfig => ({
						entrypoint,
						config,
					}),
		]),
) as unknown as {
	[K in WithoutDash<keyof BuiltinDriverOptions> & keyof BuiltinDriverOptions]: (
		config?: BuiltinDriverOptions[K],
	) => SessionDriverConfig;
};

export const sessionDrivers = unstorageDrivers;

Domain

Subdomains

Types

Dependencies

  • ../../core/session/types.js
  • unstorage

Frequently Asked Questions

What does drivers.ts do?
drivers.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 drivers.ts?
drivers.ts defines 2 function(s): SessionDriverConfig, unstorageDrivers.
What does drivers.ts depend on?
drivers.ts imports 2 module(s): ../../core/session/types.js, unstorage.
Where is drivers.ts in the architecture?
drivers.ts is located at packages/astro/src/core/session/drivers.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/core/session).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free