Home / File/ index.js — astro Source File

index.js — astro Source File

Architecture documentation for index.js, a javascript file in the astro codebase. 0 imports, 1 dependents.

File javascript IntegrationAdapters SsrAdapters 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  a1be80d1_ad15_0c46_251c_6b2350548320["index.js"]
  4558c373_16ad_728b_c121_0f97031cad5d["server-entry.test.js"]
  4558c373_16ad_728b_c121_0f97031cad5d --> a1be80d1_ad15_0c46_251c_6b2350548320
  style a1be80d1_ad15_0c46_251c_6b2350548320 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @ts-check

/**
 * @param {{ shape: 'string' | 'object' | 'array' }} param0
 * @returns {import('astro').AstroIntegration}
 */
export default function fakeAdapter({ shape}) {
    return {
        name: '@test/server-entry-fake-adapter',
        hooks: {
            'astro:config:setup': (params) => {
                params.updateConfig({
                    vite: {
                        build: {
                            rollupOptions: {
                                input: {
                                    string: '@test/server-entry-fake-adapter/server.js',
                                    object: { foo: '@test/server-entry-fake-adapter/server.js' },
                                    array: ['@test/server-entry-fake-adapter/server.js']
                                }[shape]
                            }
                        }
                    }
                })
            },
            'astro:config:done': (params) => {
                params.setAdapter({
                    name:'@test/server-entry-fake-adapter',
                    entryType: 'self',
                    supportedAstroFeatures: {
                        serverOutput: 'stable'
                    }
                })
            }
        }
    }
}

Subdomains

Functions

Frequently Asked Questions

What does index.js do?
index.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in index.js?
index.js defines 1 function(s): fakeAdapter.
What files import index.js?
index.js is imported by 1 file(s): server-entry.test.js.
Where is index.js in the architecture?
index.js is located at packages/astro/test/fixtures/server-entry/fake-adapter/index.js (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/server-entry/fake-adapter).

Analyze Your Own Codebase

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

Try Supermodel Free