From 9fcbe9503d8fafa06e0b0fedc15ce466eed3adc0 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Sun, 31 Mar 2024 19:53:43 +0200 Subject: [PATCH 01/41] fix(page-data): add key to allPages --- packages/astro/src/core/build/page-data.ts | 10 ++++++---- packages/astro/src/core/build/types.ts | 1 + .../create-astro/test/fixtures/not-empty/package.json | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/astro/src/core/build/page-data.ts b/packages/astro/src/core/build/page-data.ts index ce9e60622ec4..15efea73b5a1 100644 --- a/packages/astro/src/core/build/page-data.ts +++ b/packages/astro/src/core/build/page-data.ts @@ -35,6 +35,8 @@ export async function collectPagesData( // and is then cached across all future SSR builds. In the past, we've had trouble // with parallelized builds without guaranteeing that this is called first. for (const route of manifest.routes) { + // Generate a unique key to identify each page in the build process. + const key = `${route.route}_${route.component}`; // static route: if (route.pathname) { const routeCollectionLogTimeout = setInterval(() => { @@ -47,8 +49,8 @@ export async function collectPagesData( clearInterval(routeCollectionLogTimeout); }, 10000); builtPaths.add(route.pathname); - - allPages[route.component] = { + allPages[key] = { + key: key, component: route.component, route, moduleSpecifier: '', @@ -72,8 +74,8 @@ export async function collectPagesData( continue; } // dynamic route: - - allPages[route.component] = { + allPages[key] = { + key: key, component: route.component, route, moduleSpecifier: '', diff --git a/packages/astro/src/core/build/types.ts b/packages/astro/src/core/build/types.ts index 9608ba04c524..b83e6e33af67 100644 --- a/packages/astro/src/core/build/types.ts +++ b/packages/astro/src/core/build/types.ts @@ -21,6 +21,7 @@ export type StylesheetAsset = | { type: 'external'; src: string }; export interface PageBuildData { + key: string; component: ComponentPath; route: RouteData; moduleSpecifier: string; diff --git a/packages/create-astro/test/fixtures/not-empty/package.json b/packages/create-astro/test/fixtures/not-empty/package.json index 516149e6d005..d3f61d640c00 100644 --- a/packages/create-astro/test/fixtures/not-empty/package.json +++ b/packages/create-astro/test/fixtures/not-empty/package.json @@ -6,4 +6,4 @@ "build": "astro build", "preview": "astro preview" } -} +} \ No newline at end of file From 284ee9efe48299aa3ad107cd636688099d509417 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 1 Apr 2024 16:04:27 +0200 Subject: [PATCH 02/41] add fryuni's test --- .../astro.config.mjs | 34 +++++ .../reuse-injected-entrypoint/package.json | 8 ++ .../reuse-injected-entrypoint/src/[id].astro | 20 +++ .../src/pages/index.astro | 12 ++ .../src/to-inject.astro | 12 ++ .../test/reuse-injected-entrypoint.test.js | 135 ++++++++++++++++++ pnpm-lock.yaml | 6 + 7 files changed, 227 insertions(+) create mode 100644 packages/astro/test/fixtures/reuse-injected-entrypoint/astro.config.mjs create mode 100644 packages/astro/test/fixtures/reuse-injected-entrypoint/package.json create mode 100644 packages/astro/test/fixtures/reuse-injected-entrypoint/src/[id].astro create mode 100644 packages/astro/test/fixtures/reuse-injected-entrypoint/src/pages/index.astro create mode 100644 packages/astro/test/fixtures/reuse-injected-entrypoint/src/to-inject.astro create mode 100644 packages/astro/test/reuse-injected-entrypoint.test.js diff --git a/packages/astro/test/fixtures/reuse-injected-entrypoint/astro.config.mjs b/packages/astro/test/fixtures/reuse-injected-entrypoint/astro.config.mjs new file mode 100644 index 000000000000..266e31c07f93 --- /dev/null +++ b/packages/astro/test/fixtures/reuse-injected-entrypoint/astro.config.mjs @@ -0,0 +1,34 @@ +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({ + integrations: [ + { + name: 'astropi', + hooks: { + 'astro:config:setup': async ({ injectRoute }) => { + injectRoute({ + pattern: `/injected-a`, + entrypoint: './src/to-inject.astro', + prerender: true, + }); + injectRoute({ + pattern: `/injected-b`, + entrypoint: './src/to-inject.astro', + prerender: true, + }); + injectRoute({ + pattern: `/dynamic-a/[id]`, + entrypoint: './src/[id].astro', + prerender: true, + }); + injectRoute({ + pattern: `/dynamic-b/[id]`, + entrypoint: './src/[id].astro', + prerender: true, + }); + }, + }, + }, + ], +}); \ No newline at end of file diff --git a/packages/astro/test/fixtures/reuse-injected-entrypoint/package.json b/packages/astro/test/fixtures/reuse-injected-entrypoint/package.json new file mode 100644 index 000000000000..c0ca107ccc41 --- /dev/null +++ b/packages/astro/test/fixtures/reuse-injected-entrypoint/package.json @@ -0,0 +1,8 @@ +{ + "name": "@test/reuse-injected-entrypoint", + "version": "0.0.0", + "private": true, + "dependencies": { + "astro": "workspace:*" + } +} \ No newline at end of file diff --git a/packages/astro/test/fixtures/reuse-injected-entrypoint/src/[id].astro b/packages/astro/test/fixtures/reuse-injected-entrypoint/src/[id].astro new file mode 100644 index 000000000000..151fcfc5e555 --- /dev/null +++ b/packages/astro/test/fixtures/reuse-injected-entrypoint/src/[id].astro @@ -0,0 +1,20 @@ +--- +export async function getStaticPaths() { + return [ + { params: { id: 'id-1' } }, + { params: { id: 'id-2' } } + ]; +} +const { id } = Astro.params; +--- + + + + + Routing + + +

[id].astro

+

{id}

+ + \ No newline at end of file diff --git a/packages/astro/test/fixtures/reuse-injected-entrypoint/src/pages/index.astro b/packages/astro/test/fixtures/reuse-injected-entrypoint/src/pages/index.astro new file mode 100644 index 000000000000..4c057d51407a --- /dev/null +++ b/packages/astro/test/fixtures/reuse-injected-entrypoint/src/pages/index.astro @@ -0,0 +1,12 @@ +--- +--- + + + + + Routing + + +

index.astro

+ + \ No newline at end of file diff --git a/packages/astro/test/fixtures/reuse-injected-entrypoint/src/to-inject.astro b/packages/astro/test/fixtures/reuse-injected-entrypoint/src/to-inject.astro new file mode 100644 index 000000000000..13d5bac25d98 --- /dev/null +++ b/packages/astro/test/fixtures/reuse-injected-entrypoint/src/to-inject.astro @@ -0,0 +1,12 @@ +--- +--- + + + + + Routing + + +

to-inject.astro

+ + \ No newline at end of file diff --git a/packages/astro/test/reuse-injected-entrypoint.test.js b/packages/astro/test/reuse-injected-entrypoint.test.js new file mode 100644 index 000000000000..18723f16cec8 --- /dev/null +++ b/packages/astro/test/reuse-injected-entrypoint.test.js @@ -0,0 +1,135 @@ +import assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { load as cheerioLoad } from 'cheerio'; +import { loadFixture } from './test-utils.js'; + +const routes = [ + { + description: 'matches / to index.astro', + url: '/', + h1: 'index.astro', + }, + { + description: 'matches /injected-a to to-inject.astro', + url: '/injected-a', + h1: 'to-inject.astro', + }, + { + description: 'matches /injected-b to to-inject.astro', + url: '/injected-b', + h1: 'to-inject.astro', + }, + { + description: 'matches /dynamic-a/id-1 to [id].astro', + url: '/dynamic-a/id-1', + h1: '[id].astro', + p: 'id-1', + }, + { + description: 'matches /dynamic-a/id-2 to [id].astro', + url: '/dynamic-a/id-2', + h1: '[id].astro', + p: 'id-2', + }, + { + description: 'matches /dynamic-b/id-1 to [id].astro', + url: '/dynamic-b/id-1', + h1: '[id].astro', + p: 'id-1', + }, + { + description: 'matches /dynamic-b/id-2 to [id].astro', + url: '/dynamic-b/id-2', + h1: '[id].astro', + p: 'id-2', + }, +]; + +function appendForwardSlash(path) { + return path.endsWith('/') ? path : path + '/'; +} + +describe('Reuse injected entrypoint', () => { + describe('build', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + root: './fixtures/reuse-injected-entrypoint/', + }); + await fixture.build(); + }); + + routes.forEach(({ description, url, fourOhFour, h1, p, htmlMatch }) => { + const isEndpoint = htmlMatch && !h1 && !p; + + it(description, async () => { + const htmlFile = isEndpoint ? url : `${appendForwardSlash(url)}index.html`; + + if (fourOhFour) { + assert.equal(fixture.pathExists(htmlFile), false); + return; + } + + const html = await fixture.readFile(htmlFile); + const $ = cheerioLoad(html); + + if (h1) { + assert.equal($('h1').text(), h1); + } + + if (p) { + assert.equal($('p').text(), p); + } + + if (htmlMatch) { + assert.equal(html, htmlMatch); + } + }); + }); + }); + + describe('dev', () => { + let fixture; + let devServer; + + before(async () => { + fixture = await loadFixture({ + root: './fixtures/reuse-injected-entrypoint/', + }); + + devServer = await fixture.startDevServer(); + }); + + after(async () => { + await devServer.stop(); + }); + + routes.forEach(({ description, url, fourOhFour, h1, p, htmlMatch }) => { + const isEndpoint = htmlMatch && !h1 && !p; + + // checks URLs as written above + it(description, async () => { + const html = await fixture.fetch(url).then((res) => res.text()); + const $ = cheerioLoad(html); + + if (fourOhFour) { + assert.equal($('title').text(), '404: Not Found'); + return; + } + + if (h1) { + assert.equal($('h1').text(), h1); + } + + if (p) { + assert.equal($('p').text(), p); + } + + if (htmlMatch) { + assert.equal(html, htmlMatch); + } + }); + }); + }); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f39e5d503e51..ba4b97848756 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3282,6 +3282,12 @@ importers: specifier: workspace:* version: link:../../.. + packages/astro/test/fixtures/reuse-injected-entrypoint: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + packages/astro/test/fixtures/root-srcdir-css: dependencies: astro: From d42376c82895ecf686d42dcc1752310a886db533 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 1 Apr 2024 16:10:51 +0200 Subject: [PATCH 03/41] replaced object.entries(allpages) --- packages/astro/src/core/build/internal.ts | 4 ++-- packages/astro/src/core/build/static-build.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index c2c53df11f33..f3a4d23dbad1 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -248,8 +248,8 @@ export function* eachPageData(internals: BuildInternals) { } export function* eachPageFromAllPages(allPages: AllPagesData): Generator<[string, PageBuildData]> { - for (const [path, pageData] of Object.entries(allPages)) { - yield [path, pageData]; + for (const pageData of Object.values(allPages)) { + yield [pageData.component, pageData]; } } diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 5eebc5429e7b..55c1d738304f 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -51,12 +51,12 @@ export async function viteBuild(opts: StaticBuildOptions) { // Build internals needed by the CSS plugin const internals = createBuildInternals(); - for (const [component, pageData] of Object.entries(allPages)) { - const astroModuleURL = new URL('./' + component, settings.config.root); - const astroModuleId = prependForwardSlash(component); + for (const pageData of Object.values(allPages)) { + const astroModuleURL = new URL('./' + pageData.component, settings.config.root); + const astroModuleId = prependForwardSlash(pageData.component); // Track the page data in internals - trackPageData(internals, component, pageData, astroModuleId, astroModuleURL); + trackPageData(internals, pageData.component, pageData, astroModuleId, astroModuleURL); if (!routeIsRedirect(pageData.route)) { pageInput.add(astroModuleId); From 05f1edece41db7573ecbf29b131f8c2f4facf6e0 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 1 Apr 2024 18:30:35 +0200 Subject: [PATCH 04/41] tmp: change pagesByComponents by pagesByKeys --- packages/astro/src/core/build/generate.ts | 1 + packages/astro/src/core/build/index.ts | 2 ++ packages/astro/src/core/build/internal.ts | 16 +++++++++------- packages/astro/src/core/build/pipeline.ts | 12 ++++++++---- .../src/core/build/plugins/plugin-manifest.ts | 3 ++- .../astro/src/core/build/plugins/plugin-pages.ts | 3 ++- .../astro/src/core/build/plugins/plugin-ssr.ts | 3 ++- packages/astro/src/core/build/static-build.ts | 9 +++++---- 8 files changed, 31 insertions(+), 18 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 7dc00073fc5b..501213beafac 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -132,6 +132,7 @@ export function chunkIsPage( } export async function generatePages(options: StaticBuildOptions, internals: BuildInternals) { + console.log('Coucou from generatePages', internals.pageToBundleMap); const generatePagesTimer = performance.now(); const ssr = isServerLikeOutput(options.settings.config); let manifest: SSRManifest; diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts index d77e69fd2726..e48a435e0ee0 100644 --- a/packages/astro/src/core/build/index.ts +++ b/packages/astro/src/core/build/index.ts @@ -184,6 +184,7 @@ class AstroBuilder { green(`✓ Completed in ${getTimeStat(this.timer.init, performance.now())}.`) ); + console.log('Coucou from index.ts build', Object.keys(allPages)); const opts: StaticBuildOptions = { allPages, settings: this.settings, @@ -197,6 +198,7 @@ class AstroBuilder { }; const { internals, ssrOutputChunkNames } = await viteBuild(opts); + console.log('Coucou from index.ts build', internals.pageToBundleMap); await staticBuild(opts, internals, ssrOutputChunkNames); // Write any additionally generated assets to disk. diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index f3a4d23dbad1..f35a30be8c17 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -45,7 +45,7 @@ export interface BuildInternals { /** * A map for page-specific information. */ - pagesByComponent: Map; + pagesByKeys: Map; /** * A map for page-specific output. @@ -125,7 +125,7 @@ export function createBuildInternals(): BuildInternals { inlinedScripts: new Map(), entrySpecifierToBundleMap: new Map(), pageToBundleMap: new Map(), - pagesByComponent: new Map(), + pagesByKeys: new Map(), pageOptionsByPage: new Map(), pagesByViteID: new Map(), pagesByClientOnly: new Map(), @@ -151,7 +151,8 @@ export function trackPageData( componentURL: URL ): void { pageData.moduleSpecifier = componentModuleId; - internals.pagesByComponent.set(component, pageData); + // SHIT IS HERE + internals.pagesByKeys.set(pageData.key, pageData); internals.pagesByViteID.set(viteID(componentURL), pageData); } @@ -223,8 +224,9 @@ export function getPageDataByComponent( internals: BuildInternals, component: string ): PageBuildData | undefined { - if (internals.pagesByComponent.has(component)) { - return internals.pagesByComponent.get(component); + // TODO: Refactor that + if (internals.pagesByKeys.has(component)) { + return internals.pagesByKeys.get(component); } return undefined; } @@ -244,7 +246,7 @@ export function hasPageDataByViteID(internals: BuildInternals, viteid: ViteID): } export function* eachPageData(internals: BuildInternals) { - yield* internals.pagesByComponent.values(); + yield* internals.pagesByKeys.values(); } export function* eachPageFromAllPages(allPages: AllPagesData): Generator<[string, PageBuildData]> { @@ -265,7 +267,7 @@ export function* eachPageDataFromEntryPoint( entrypoint.includes(RESOLVED_SPLIT_MODULE_ID) ) { const [, pageName] = entrypoint.split(':'); - const pageData = internals.pagesByComponent.get( + const pageData = internals.pagesByKeys.get( `${pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')}` ); if (!pageData) { diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index a89aa10f071c..c8b5c5a40c04 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -178,6 +178,7 @@ export class BuildPipeline extends Pipeline { const pages = new Map(); for (const [entrypoint, filePath] of this.internals.entrySpecifierToBundleMap) { + console.log('entrypoint', filePath); // virtual pages can be emitted with different prefixes: // - the classic way are pages emitted with prefix ASTRO_PAGE_RESOLVED_MODULE_ID -> plugin-pages // - pages emitted using `build.split`, in this case pages are emitted with prefix RESOLVED_SPLIT_MODULE_ID @@ -186,7 +187,7 @@ export class BuildPipeline extends Pipeline { entrypoint.includes(RESOLVED_SPLIT_MODULE_ID) ) { const [, pageName] = entrypoint.split(':'); - const pageData = this.internals.pagesByComponent.get( + const pageData = this.internals.pagesByKeys.get( `${pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')}` ); if (!pageData) { @@ -199,9 +200,9 @@ export class BuildPipeline extends Pipeline { } } - for (const [path, pageData] of this.internals.pagesByComponent.entries()) { + for (const pageData of this.internals.pagesByKeys.values()) { if (routeIsRedirect(pageData.route)) { - pages.set(pageData, path); + pages.set(pageData, pageData.component); } else if ( routeIsFallback(pageData.route) && (i18nHasFallback(this.config) || @@ -213,7 +214,10 @@ export class BuildPipeline extends Pipeline { // The values of the map are the actual `.mjs` files that are generated during the build // Here, we take the component path and transform it in the virtual module name - const moduleSpecifier = getVirtualModulePageNameFromPath(ASTRO_PAGE_MODULE_ID, path); + const moduleSpecifier = getVirtualModulePageNameFromPath( + ASTRO_PAGE_MODULE_ID, + pageData.component + ); // We retrieve the original JS module const filePath = this.internals.entrySpecifierToBundleMap.get(moduleSpecifier); if (filePath) { diff --git a/packages/astro/src/core/build/plugins/plugin-manifest.ts b/packages/astro/src/core/build/plugins/plugin-manifest.ts index 24437d4e5765..b867bff4bbe5 100644 --- a/packages/astro/src/core/build/plugins/plugin-manifest.ts +++ b/packages/astro/src/core/build/plugins/plugin-manifest.ts @@ -189,7 +189,8 @@ function buildManifest( } for (const route of opts.manifest.routes) { - const pageData = internals.pagesByComponent.get(route.component); + // TODO: Change that + const pageData = internals.pagesByKeys.get(route.component); if (route.prerender || !pageData) continue; const scripts: SerializedRouteInfo['scripts'] = []; if (pageData.hoistedScript) { diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index dd488a97d91a..b89e5d35ccd3 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -42,7 +42,8 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V const imports: string[] = []; const exports: string[] = []; const pageName = getPathFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, id); - const pageData = internals.pagesByComponent.get(pageName); + // TODO: Change that + const pageData = internals.pagesByKeys.get(pageName); if (pageData) { const resolvedPage = await this.resolve(pageData.moduleSpecifier); if (resolvedPage) { diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 5f32ea63b209..a42735893b1a 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -55,7 +55,8 @@ function vitePluginSSR( // we need to use the non-resolved ID in order to resolve correctly the virtual module imports.push(`const ${variable} = () => import("${virtualModuleName}");`); - const pageData2 = internals.pagesByComponent.get(path); + // TODO: Change that + const pageData2 = internals.pagesByKeys.get(path); if (pageData2) { pageMap.push(`[${JSON.stringify(pageData2.component)}, ${variable}]`); } diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 55c1d738304f..3e7a7e1bc81b 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -37,7 +37,7 @@ import { encodeName, getTimeStat, viteBuildReturnToRollupOutputs } from './util. export async function viteBuild(opts: StaticBuildOptions) { const { allPages, settings } = opts; - + console.log('Coucou from viteBuild', Object.keys(allPages)); // Make sure we have an adapter before building if (isModeServerWithNoAdapter(opts.settings)) { throw new AstroError(AstroErrorData.NoAdapterInstalled); @@ -46,6 +46,7 @@ export async function viteBuild(opts: StaticBuildOptions) { settings.timer.start('SSR build'); // The pages to be built for rendering purposes. + // (comment above may be outdated ?) const pageInput = new Set(); // Build internals needed by the CSS plugin @@ -73,7 +74,6 @@ export async function viteBuild(opts: StaticBuildOptions) { // Register plugins const container = createPluginContainer(opts, internals); registerAllPlugins(container); - // Build your project (SSR application code, assets, client JS, etc.) const ssrTime = performance.now(); opts.logger.info('build', `Building ${settings.config.output} entrypoints...`); @@ -126,6 +126,7 @@ export async function viteBuild(opts: StaticBuildOptions) { } } + console.log('Good bye from viteBuild', internals.pageToBundleMap); return { internals, ssrOutputChunkNames }; } @@ -271,7 +272,7 @@ async function ssrBuild( const updatedViteBuildConfig = await runHookBuildSetup({ config: settings.config, - pages: internals.pagesByComponent, + pages: internals.pagesByKeys, vite: viteBuildConfig, target: 'server', logger: opts.logger, @@ -332,7 +333,7 @@ async function clientBuild( await runHookBuildSetup({ config: settings.config, - pages: internals.pagesByComponent, + pages: internals.pagesByKeys, vite: viteBuildConfig, target: 'client', logger: opts.logger, From db7bca55c092a0e31566b10cd8e788c2e12d5d00 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 1 Apr 2024 19:07:47 +0200 Subject: [PATCH 05/41] fix pagesByKeys.get() in plugin-ssr & plugin-manifest --- .../astro/src/core/build/plugins/plugin-manifest.ts | 6 ++++-- .../astro/src/core/build/plugins/plugin-pages.ts | 12 +++++++++++- packages/astro/src/core/build/plugins/plugin-ssr.ts | 3 +-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/astro/src/core/build/plugins/plugin-manifest.ts b/packages/astro/src/core/build/plugins/plugin-manifest.ts index b867bff4bbe5..7a4874b32eda 100644 --- a/packages/astro/src/core/build/plugins/plugin-manifest.ts +++ b/packages/astro/src/core/build/plugins/plugin-manifest.ts @@ -189,8 +189,10 @@ function buildManifest( } for (const route of opts.manifest.routes) { - // TODO: Change that - const pageData = internals.pagesByKeys.get(route.component); + let pageData; + for (const page of internals.pagesByKeys.values()) { + if (page.route.route == route.route) pageData = page; + } if (route.prerender || !pageData) continue; const scripts: SerializedRouteInfo['scripts'] = []; if (pageData.hoistedScript) { diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index b89e5d35ccd3..376c8bf6641b 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -43,7 +43,8 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V const exports: string[] = []; const pageName = getPathFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, id); // TODO: Change that - const pageData = internals.pagesByKeys.get(pageName); + // const pageData = internals.pagesByKeys.get(pageName); + const pageData = tmp(internals.pagesByKeys, pageName); if (pageData) { const resolvedPage = await this.resolve(pageData.moduleSpecifier); if (resolvedPage) { @@ -73,3 +74,12 @@ export function pluginPages(opts: StaticBuildOptions, internals: BuildInternals) }, }; } + +/** + * TMP: This is a temporary function to get the page data from the pagesByKeys map. + */ +function tmp(pagesByKeys: Map, pageName: string) { + for (const pages of pagesByKeys.values()) { + if (pages.component == pageName) return pages; + } +} diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index a42735893b1a..2b57b65faa1d 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -55,8 +55,7 @@ function vitePluginSSR( // we need to use the non-resolved ID in order to resolve correctly the virtual module imports.push(`const ${variable} = () => import("${virtualModuleName}");`); - // TODO: Change that - const pageData2 = internals.pagesByKeys.get(path); + const pageData2 = internals.pagesByKeys.get(pageData.key); if (pageData2) { pageMap.push(`[${JSON.stringify(pageData2.component)}, ${variable}]`); } From 92f30994a3921cfffd6cf1e7e10ea44395597f06 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 1 Apr 2024 22:24:23 +0200 Subject: [PATCH 06/41] remove logs --- packages/astro/src/core/build/generate.ts | 1 - packages/astro/src/core/build/index.ts | 2 -- packages/astro/src/core/build/internal.ts | 1 - packages/astro/src/core/build/pipeline.ts | 1 - packages/astro/src/core/build/static-build.ts | 2 -- 5 files changed, 7 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 501213beafac..7dc00073fc5b 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -132,7 +132,6 @@ export function chunkIsPage( } export async function generatePages(options: StaticBuildOptions, internals: BuildInternals) { - console.log('Coucou from generatePages', internals.pageToBundleMap); const generatePagesTimer = performance.now(); const ssr = isServerLikeOutput(options.settings.config); let manifest: SSRManifest; diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts index e48a435e0ee0..d77e69fd2726 100644 --- a/packages/astro/src/core/build/index.ts +++ b/packages/astro/src/core/build/index.ts @@ -184,7 +184,6 @@ class AstroBuilder { green(`✓ Completed in ${getTimeStat(this.timer.init, performance.now())}.`) ); - console.log('Coucou from index.ts build', Object.keys(allPages)); const opts: StaticBuildOptions = { allPages, settings: this.settings, @@ -198,7 +197,6 @@ class AstroBuilder { }; const { internals, ssrOutputChunkNames } = await viteBuild(opts); - console.log('Coucou from index.ts build', internals.pageToBundleMap); await staticBuild(opts, internals, ssrOutputChunkNames); // Write any additionally generated assets to disk. diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index f35a30be8c17..bc337a6dcda4 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -151,7 +151,6 @@ export function trackPageData( componentURL: URL ): void { pageData.moduleSpecifier = componentModuleId; - // SHIT IS HERE internals.pagesByKeys.set(pageData.key, pageData); internals.pagesByViteID.set(viteID(componentURL), pageData); } diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index c8b5c5a40c04..8ba4cd81dc7c 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -178,7 +178,6 @@ export class BuildPipeline extends Pipeline { const pages = new Map(); for (const [entrypoint, filePath] of this.internals.entrySpecifierToBundleMap) { - console.log('entrypoint', filePath); // virtual pages can be emitted with different prefixes: // - the classic way are pages emitted with prefix ASTRO_PAGE_RESOLVED_MODULE_ID -> plugin-pages // - pages emitted using `build.split`, in this case pages are emitted with prefix RESOLVED_SPLIT_MODULE_ID diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 3e7a7e1bc81b..fa42c231dda8 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -37,7 +37,6 @@ import { encodeName, getTimeStat, viteBuildReturnToRollupOutputs } from './util. export async function viteBuild(opts: StaticBuildOptions) { const { allPages, settings } = opts; - console.log('Coucou from viteBuild', Object.keys(allPages)); // Make sure we have an adapter before building if (isModeServerWithNoAdapter(opts.settings)) { throw new AstroError(AstroErrorData.NoAdapterInstalled); @@ -126,7 +125,6 @@ export async function viteBuild(opts: StaticBuildOptions) { } } - console.log('Good bye from viteBuild', internals.pageToBundleMap); return { internals, ssrOutputChunkNames }; } From 3021f42d70a9bc9784ddd7463f28d09ab8a5a47f Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 1 Apr 2024 22:45:01 +0200 Subject: [PATCH 07/41] remove useless generators --- packages/astro/src/core/build/internal.ts | 32 +------------------ packages/astro/src/core/build/pipeline.ts | 1 + .../src/core/build/plugins/plugin-css.ts | 5 ++- packages/astro/src/core/build/static-build.ts | 8 ++--- 4 files changed, 6 insertions(+), 40 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index bc337a6dcda4..9cd0b68966ae 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -244,44 +244,14 @@ export function hasPageDataByViteID(internals: BuildInternals, viteid: ViteID): return internals.pagesByViteID.has(viteid); } -export function* eachPageData(internals: BuildInternals) { - yield* internals.pagesByKeys.values(); -} - export function* eachPageFromAllPages(allPages: AllPagesData): Generator<[string, PageBuildData]> { for (const pageData of Object.values(allPages)) { yield [pageData.component, pageData]; } } -export function* eachPageDataFromEntryPoint( - internals: BuildInternals -): Generator<[PageBuildData, string]> { - for (const [entrypoint, filePath] of internals.entrySpecifierToBundleMap) { - // virtual pages can be emitted with different prefixes: - // - the classic way are pages emitted with prefix ASTRO_PAGE_RESOLVED_MODULE_ID -> plugin-pages - // - pages emitted using `build.split`, in this case pages are emitted with prefix RESOLVED_SPLIT_MODULE_ID - if ( - entrypoint.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) || - entrypoint.includes(RESOLVED_SPLIT_MODULE_ID) - ) { - const [, pageName] = entrypoint.split(':'); - const pageData = internals.pagesByKeys.get( - `${pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')}` - ); - if (!pageData) { - throw new Error( - "Build failed. Astro couldn't find the emitted page from " + pageName + ' pattern' - ); - } - - yield [pageData, filePath]; - } - } -} - export function hasPrerenderedPages(internals: BuildInternals) { - for (const pageData of eachPageData(internals)) { + for (const pageData of internals.pagesByKeys.values()) { if (pageData.route.prerender) { return true; } diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 8ba4cd81dc7c..4047165fdd44 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -185,6 +185,7 @@ export class BuildPipeline extends Pipeline { entrypoint.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) || entrypoint.includes(RESOLVED_SPLIT_MODULE_ID) ) { + console.log('entrypoint', this.internals.entrySpecifierToBundleMap); const [, pageName] = entrypoint.split(':'); const pageData = this.internals.pagesByKeys.get( `${pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')}` diff --git a/packages/astro/src/core/build/plugins/plugin-css.ts b/packages/astro/src/core/build/plugins/plugin-css.ts index 31cb2c9b538a..02c1c0b78500 100644 --- a/packages/astro/src/core/build/plugins/plugin-css.ts +++ b/packages/astro/src/core/build/plugins/plugin-css.ts @@ -15,7 +15,6 @@ import { moduleIsTopLevelPage, } from '../graph.js'; import { - eachPageData, getPageDataByViteID, getPageDatasByClientOnlyID, getPageDatasByHoistedScriptId, @@ -214,7 +213,7 @@ function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] { (chunk) => chunk.type === 'asset' && chunk.name === 'style.css' ); if (cssChunk === undefined) return; - for (const pageData of eachPageData(internals)) { + for (const pageData of internals.pagesByKeys.values()) { const cssToInfoMap = (pagesToCss[pageData.moduleSpecifier] ??= {}); cssToInfoMap[cssChunk.fileName] = { depth: -1, order: -1 }; } @@ -251,7 +250,7 @@ function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] { ? { type: 'inline', content: stylesheet.source } : { type: 'external', src: stylesheet.fileName }; - const pages = Array.from(eachPageData(internals)); + const pages = Array.from(internals.pagesByKeys.values()); let sheetAddedToPage = false; pages.forEach((pageData) => { diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index fa42c231dda8..fd22b40cbc08 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -9,11 +9,7 @@ import * as vite from 'vite'; import type { RouteData } from '../../@types/astro.js'; import { PROPAGATED_ASSET_FLAG } from '../../content/consts.js'; import { hasAnyContentFlag } from '../../content/utils.js'; -import { - type BuildInternals, - createBuildInternals, - eachPageData, -} from '../../core/build/internal.js'; +import { type BuildInternals, createBuildInternals } from '../../core/build/internal.js'; import { emptyDir, removeEmptyDirs } from '../../core/fs/index.js'; import { appendForwardSlash, prependForwardSlash, removeFileExtension } from '../../core/path.js'; import { isModeServerWithNoAdapter } from '../../core/util.js'; @@ -372,7 +368,7 @@ async function cleanStaticOutput( ssrOutputChunkNames: string[] ) { const allStaticFiles = new Set(); - for (const pageData of eachPageData(internals)) { + for (const pageData of internals.pagesByKeys.values()) { if (pageData.route.prerender && !pageData.hasSharedModules) { const { moduleSpecifier } = pageData; const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); From 6853313e3d645e097e830c6b473464389f9cf234 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 1 Apr 2024 23:14:30 +0200 Subject: [PATCH 08/41] another useless generator --- packages/astro/src/core/build/internal.ts | 6 ------ packages/astro/src/core/build/pipeline.ts | 3 +-- .../astro/src/core/build/plugins/plugin-pages.ts | 6 +++--- .../astro/src/core/build/plugins/plugin-ssr.ts | 16 +++++++++------- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index 9cd0b68966ae..dd5881b7918f 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -244,12 +244,6 @@ export function hasPageDataByViteID(internals: BuildInternals, viteid: ViteID): return internals.pagesByViteID.has(viteid); } -export function* eachPageFromAllPages(allPages: AllPagesData): Generator<[string, PageBuildData]> { - for (const pageData of Object.values(allPages)) { - yield [pageData.component, pageData]; - } -} - export function hasPrerenderedPages(internals: BuildInternals) { for (const pageData of internals.pagesByKeys.values()) { if (pageData.route.prerender) { diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 4047165fdd44..567b97681416 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -180,12 +180,11 @@ export class BuildPipeline extends Pipeline { for (const [entrypoint, filePath] of this.internals.entrySpecifierToBundleMap) { // virtual pages can be emitted with different prefixes: // - the classic way are pages emitted with prefix ASTRO_PAGE_RESOLVED_MODULE_ID -> plugin-pages - // - pages emitted using `build.split`, in this case pages are emitted with prefix RESOLVED_SPLIT_MODULE_ID + // - pages emitted using `functionPerRoute`, in this case pages are emitted with prefix RESOLVED_SPLIT_MODULE_ID if ( entrypoint.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) || entrypoint.includes(RESOLVED_SPLIT_MODULE_ID) ) { - console.log('entrypoint', this.internals.entrySpecifierToBundleMap); const [, pageName] = entrypoint.split(':'); const pageData = this.internals.pagesByKeys.get( `${pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')}` diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index 376c8bf6641b..d8c9a5e2b4e2 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -1,7 +1,7 @@ import type { Plugin as VitePlugin } from 'vite'; import { routeIsRedirect } from '../../redirects/index.js'; import { addRollupInput } from '../add-rollup-input.js'; -import { type BuildInternals, eachPageFromAllPages } from '../internal.js'; +import { type BuildInternals } from '../internal.js'; import type { AstroBuildPlugin } from '../plugin.js'; import type { StaticBuildOptions } from '../types.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; @@ -22,11 +22,11 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V if (opts.settings.config.output === 'static') { const inputs = new Set(); - for (const [path, pageData] of eachPageFromAllPages(opts.allPages)) { + for (const pageData of Object.values(opts.allPages)) { if (routeIsRedirect(pageData.route)) { continue; } - inputs.add(getVirtualModulePageNameFromPath(ASTRO_PAGE_MODULE_ID, path)); + inputs.add(getVirtualModulePageNameFromPath(ASTRO_PAGE_MODULE_ID, pageData.component)); } return addRollupInput(options, Array.from(inputs)); diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 2b57b65faa1d..72e4d804c01e 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -7,7 +7,6 @@ import { isServerLikeOutput } from '../../../prerender/utils.js'; import { routeIsRedirect } from '../../redirects/index.js'; import { addRollupInput } from '../add-rollup-input.js'; import type { BuildInternals } from '../internal.js'; -import { eachPageFromAllPages } from '../internal.js'; import type { AstroBuildPlugin } from '../plugin.js'; import type { StaticBuildOptions } from '../types.js'; import { SSR_MANIFEST_VIRTUAL_MODULE_ID } from './plugin-manifest.js'; @@ -44,11 +43,14 @@ function vitePluginSSR( let i = 0; const pageMap: string[] = []; - for (const [path, pageData] of eachPageFromAllPages(allPages)) { + for (const pageData of Object.values(allPages)) { if (routeIsRedirect(pageData.route)) { continue; } - const virtualModuleName = getVirtualModulePageNameFromPath(ASTRO_PAGE_MODULE_ID, path); + const virtualModuleName = getVirtualModulePageNameFromPath( + ASTRO_PAGE_MODULE_ID, + pageData.component + ); let module = await this.resolve(virtualModuleName); if (module) { const variable = `_page${i}`; @@ -147,11 +149,11 @@ function vitePluginSSRSplit( if (functionPerRouteEnabled) { const inputs = new Set(); - for (const [path, pageData] of eachPageFromAllPages(options.allPages)) { + for (const pageData of Object.values(options.allPages)) { if (routeIsRedirect(pageData.route)) { continue; } - inputs.add(getVirtualModulePageNameFromPath(SPLIT_MODULE_ID, path)); + inputs.add(getVirtualModulePageNameFromPath(SPLIT_MODULE_ID, pageData.component)); } return addRollupInput(opts, Array.from(inputs)); @@ -293,8 +295,8 @@ function storeEntryPoint( fileName: string ) { const componentPath = getPathFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, moduleKey); - for (const [page, pageData] of eachPageFromAllPages(options.allPages)) { - if (componentPath == page) { + for (const pageData of Object.values(options.allPages)) { + if (componentPath == pageData.component) { const publicPath = fileURLToPath(options.settings.config.build.server); internals.entryPoints.set(pageData.route, pathToFileURL(join(publicPath, fileName))); } From 8ef0d88a71b6a36fdff898c55412f7a58a74269c Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Tue, 9 Apr 2024 14:53:08 +0200 Subject: [PATCH 09/41] use null byte in key --- packages/astro/src/core/build/page-data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/build/page-data.ts b/packages/astro/src/core/build/page-data.ts index 15efea73b5a1..cd844cf0b713 100644 --- a/packages/astro/src/core/build/page-data.ts +++ b/packages/astro/src/core/build/page-data.ts @@ -36,7 +36,7 @@ export async function collectPagesData( // with parallelized builds without guaranteeing that this is called first. for (const route of manifest.routes) { // Generate a unique key to identify each page in the build process. - const key = `${route.route}_${route.component}`; + const key = `${route.route}\x00${route.component}`; // static route: if (route.pathname) { const routeCollectionLogTimeout = setInterval(() => { From 98e9e90d7af43a556f6584db38dd7729ae287c5a Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Tue, 9 Apr 2024 15:51:19 +0200 Subject: [PATCH 10/41] tmp function in pipeline.ts --- packages/astro/src/core/build/pipeline.ts | 17 +++++++++++++++-- .../src/core/build/plugins/plugin-pages.ts | 1 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 567b97681416..201aeb057fb0 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -186,9 +186,13 @@ export class BuildPipeline extends Pipeline { entrypoint.includes(RESOLVED_SPLIT_MODULE_ID) ) { const [, pageName] = entrypoint.split(':'); - const pageData = this.internals.pagesByKeys.get( - `${pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')}` + console.log('pageName', pageName); + // TODO: Change that + const pageData = tmp( + this.internals.pagesByKeys, + pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.') ); + if (!pageData) { throw new Error( "Build failed. Astro couldn't find the emitted page from " + pageName + ' pattern' @@ -229,3 +233,12 @@ export class BuildPipeline extends Pipeline { return pages; } } + +/** + * TMP: This is a temporary function to get the page data from the pagesByKeys map. + */ +function tmp(pagesByKeys: Map, pageName: string) { + for (const pages of pagesByKeys.values()) { + if (pages.component == pageName) return pages; + } +} diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index d8c9a5e2b4e2..a80c9eddf9f3 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -43,7 +43,6 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V const exports: string[] = []; const pageName = getPathFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, id); // TODO: Change that - // const pageData = internals.pagesByKeys.get(pageName); const pageData = tmp(internals.pagesByKeys, pageName); if (pageData) { const resolvedPage = await this.resolve(pageData.moduleSpecifier); From 9306c7113fbc1b8f958f299603908b70604b5a95 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Tue, 9 Apr 2024 18:15:45 +0200 Subject: [PATCH 11/41] refactor getVirtualModulePageName --- packages/astro/src/core/build/generate.ts | 26 +++++++++++++------ packages/astro/src/core/build/internal.ts | 12 --------- packages/astro/src/core/build/pipeline.ts | 7 ++--- .../src/core/build/plugins/plugin-pages.ts | 17 +++++++----- .../src/core/build/plugins/plugin-ssr.ts | 13 ++++++---- packages/astro/src/core/build/plugins/util.ts | 19 +++++++------- packages/astro/test/test-utils.js | 4 +-- 7 files changed, 52 insertions(+), 46 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index d82ecdbd8daa..de1bbbc65656 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -47,12 +47,7 @@ import { createRequest } from '../request.js'; import { matchRoute } from '../routing/match.js'; import { getOutputFilename } from '../util.js'; import { getOutDirWithinCwd, getOutFile, getOutFolder } from './common.js'; -import { - cssOrder, - getEntryFilePathFromComponentPath, - getPageDataByComponent, - mergeInlineCss, -} from './internal.js'; +import { cssOrder, getPageDataByComponent, mergeInlineCss } from './internal.js'; import { BuildPipeline } from './pipeline.js'; import type { PageBuildData, @@ -61,6 +56,8 @@ import type { StylesheetAsset, } from './types.js'; import { getTimeStat, shouldAppendForwardSlash } from './util.js'; +import { getVirtualModulePageName } from './plugins/util.js'; +import { ASTRO_PAGE_MODULE_ID } from './plugins/plugin-pages.js'; function createEntryURL(filePath: string, outFolder: URL) { return new URL('./' + filePath + `?time=${Date.now()}`, outFolder); @@ -75,7 +72,7 @@ async function getEntryForRedirectRoute( throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - const filePath = getEntryFilePathFromComponentPath(internals, route.redirectRoute.component); + const filePath = getEntryFilePath(internals, route.redirectRoute); if (filePath) { const url = createEntryURL(filePath, outFolder); const ssrEntryPage: SinglePageBuiltModule = await import(url.toString()); @@ -95,7 +92,7 @@ async function getEntryForFallbackRoute( throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - const filePath = getEntryFilePathFromComponentPath(internals, route.redirectRoute.component); + const filePath = getEntryFilePath(internals, route.redirectRoute); if (filePath) { const url = createEntryURL(filePath, outFolder); const ssrEntryPage: SinglePageBuiltModule = await import(url.toString()); @@ -617,3 +614,16 @@ function createBuildManifest( middleware, }; } + +/** + * + * @param internals + * @param path + * @param route + * @returns + */ +function getEntryFilePath(internals: BuildInternals, pageData: RouteData) { + const id = + '\x00' + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component, pageData.route); + return internals.entrySpecifierToBundleMap.get(id); +} diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index dd5881b7918f..1635024e0bab 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -3,12 +3,6 @@ import type { RouteData, SSRResult } from '../../@types/astro.js'; import type { PageOptions } from '../../vite-plugin-astro/types.js'; import { prependForwardSlash, removeFileExtension } from '../path.js'; import { viteID } from '../util.js'; -import { - ASTRO_PAGE_RESOLVED_MODULE_ID, - getVirtualModulePageIdFromPath, -} from './plugins/plugin-pages.js'; -import { RESOLVED_SPLIT_MODULE_ID } from './plugins/plugin-ssr.js'; -import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js'; import type { AllPagesData, PageBuildData, StylesheetAsset, ViteID } from './types.js'; export interface BuildInternals { @@ -323,9 +317,3 @@ export function* getPageDatasByHoistedScriptId( } } } - -// From a component path such as pages/index.astro find the entrypoint module -export function getEntryFilePathFromComponentPath(internals: BuildInternals, path: string) { - const id = getVirtualModulePageIdFromPath(path); - return internals.entrySpecifierToBundleMap.get(id); -} diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 201aeb057fb0..141cbecadc1b 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -17,7 +17,7 @@ import { } from './internal.js'; import { ASTRO_PAGE_MODULE_ID, ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js'; import { RESOLVED_SPLIT_MODULE_ID } from './plugins/plugin-ssr.js'; -import { getVirtualModulePageNameFromPath } from './plugins/util.js'; +import { getVirtualModulePageName } from './plugins/util.js'; import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js'; import type { PageBuildData, StaticBuildOptions } from './types.js'; import { i18nHasFallback } from './util.js'; @@ -217,9 +217,10 @@ export class BuildPipeline extends Pipeline { // The values of the map are the actual `.mjs` files that are generated during the build // Here, we take the component path and transform it in the virtual module name - const moduleSpecifier = getVirtualModulePageNameFromPath( + const moduleSpecifier = getVirtualModulePageName( ASTRO_PAGE_MODULE_ID, - pageData.component + pageData.component, + pageData.route.route ); // We retrieve the original JS module const filePath = this.internals.entrySpecifierToBundleMap.get(moduleSpecifier); diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index a80c9eddf9f3..351c6006d3d8 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -5,16 +5,11 @@ import { type BuildInternals } from '../internal.js'; import type { AstroBuildPlugin } from '../plugin.js'; import type { StaticBuildOptions } from '../types.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; -import { getPathFromVirtualModulePageName, getVirtualModulePageNameFromPath } from './util.js'; +import { getPathFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; export const ASTRO_PAGE_MODULE_ID = '@astro-page:'; export const ASTRO_PAGE_RESOLVED_MODULE_ID = '\0' + ASTRO_PAGE_MODULE_ID; -export function getVirtualModulePageIdFromPath(path: string) { - const name = getVirtualModulePageNameFromPath(ASTRO_PAGE_MODULE_ID, path); - return '\x00' + name; -} - function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): VitePlugin { return { name: '@astro/plugin-build-pages', @@ -26,9 +21,17 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V if (routeIsRedirect(pageData.route)) { continue; } - inputs.add(getVirtualModulePageNameFromPath(ASTRO_PAGE_MODULE_ID, pageData.component)); + console.log('pageData', pageData.route.route); + console.log( + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component, pageData.route.route) + ); + inputs.add( + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component, pageData.route.route) + ); } + console.log('inputs', inputs); + return addRollupInput(options, Array.from(inputs)); } }, diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 72e4d804c01e..dcf3fd3c2610 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -13,7 +13,7 @@ import { SSR_MANIFEST_VIRTUAL_MODULE_ID } from './plugin-manifest.js'; import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js'; import { ASTRO_PAGE_MODULE_ID } from './plugin-pages.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; -import { getPathFromVirtualModulePageName, getVirtualModulePageNameFromPath } from './util.js'; +import { getPathFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry'; export const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID; @@ -47,9 +47,10 @@ function vitePluginSSR( if (routeIsRedirect(pageData.route)) { continue; } - const virtualModuleName = getVirtualModulePageNameFromPath( + const virtualModuleName = getVirtualModulePageName( ASTRO_PAGE_MODULE_ID, - pageData.component + pageData.component, + pageData.route.route ); let module = await this.resolve(virtualModuleName); if (module) { @@ -153,7 +154,9 @@ function vitePluginSSRSplit( if (routeIsRedirect(pageData.route)) { continue; } - inputs.add(getVirtualModulePageNameFromPath(SPLIT_MODULE_ID, pageData.component)); + inputs.add( + getVirtualModulePageName(SPLIT_MODULE_ID, pageData.component, pageData.route.route) + ); } return addRollupInput(opts, Array.from(inputs)); @@ -171,7 +174,7 @@ function vitePluginSSRSplit( const exports: string[] = []; const path = getPathFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); - const virtualModuleName = getVirtualModulePageNameFromPath(ASTRO_PAGE_MODULE_ID, path); + const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, path); let module = await this.resolve(virtualModuleName); if (module) { // we need to use the non-resolved ID in order to resolve correctly the virtual module diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index 0c9636b307a1..a050c6a4929a 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -46,16 +46,16 @@ export const ASTRO_PAGE_EXTENSION_POST_PATTERN = '@_@'; /** * Prevents Rollup from triggering other plugins in the process by masking the extension (hence the virtual file). * - * 1. We add a fixed prefix, which is used as virtual module naming convention - * 2. If the path has an extension (at the end of the path), we replace the dot that belongs to the extension with an arbitrary string. - * - * @param virtualModulePrefix - * @param path + * @param virtualModulePrefix The prefix used to create the virtual module + * @param path Page component path + * @param route Route of the page */ -export function getVirtualModulePageNameFromPath(virtualModulePrefix: string, path: string) { +export function getVirtualModulePageName(virtualModulePrefix: string, path: string, route: string) { const extension = extname(path); return ( virtualModulePrefix + + (route.startsWith('/') ? route.slice(1) : route) + + ASTRO_PAGE_EXTENSION_POST_PATTERN + (extension.startsWith('.') ? path.slice(0, -extension.length) + extension.replace('.', ASTRO_PAGE_EXTENSION_POST_PATTERN) : path) @@ -63,9 +63,10 @@ export function getVirtualModulePageNameFromPath(virtualModulePrefix: string, pa } /** - * - * @param virtualModulePrefix - * @param id + * Reverts the virtual module naming convention to the original path. + * See `getVirtualModulePageName`(above) for more information. + * @param virtualModulePrefix The prefix used to create the virtual module + * @param id Virtual module name */ export function getPathFromVirtualModulePageName(virtualModulePrefix: string, id: string) { const pageName = id.slice(virtualModulePrefix.length); diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index d72680c2fd8d..7d5b89c35100 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -8,7 +8,7 @@ import stripAnsi from 'strip-ansi'; import { check } from '../dist/cli/check/index.js'; import build from '../dist/core/build/index.js'; import { RESOLVED_SPLIT_MODULE_ID } from '../dist/core/build/plugins/plugin-ssr.js'; -import { getVirtualModulePageNameFromPath } from '../dist/core/build/plugins/util.js'; +import { getVirtualModulePageName } from '../dist/core/build/plugins/util.js'; import { makeSplitEntryPointFileName } from '../dist/core/build/static-build.js'; import { mergeConfig, resolveConfig } from '../dist/core/config/index.js'; import { dev, preview } from '../dist/core/index.js'; @@ -221,7 +221,7 @@ export async function loadFixture(inlineConfig) { return app; }, loadEntryPoint: async (pagePath, routes, streaming) => { - const virtualModule = getVirtualModulePageNameFromPath(RESOLVED_SPLIT_MODULE_ID, pagePath); + const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath); const filePath = makeSplitEntryPointFileName(virtualModule, routes); const url = new URL(`./server/${filePath}?id=${fixtureId}`, config.outDir); const { createApp, manifest } = await import(url); From 03d4c5993b8ae9f5dc3548a268978e9218b647d5 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Tue, 9 Apr 2024 19:49:07 +0200 Subject: [PATCH 12/41] refactor getPageKeyFromVirtualModulePageName --- .../astro/src/core/build/plugins/plugin-pages.ts | 10 ++++------ packages/astro/src/core/build/plugins/plugin-ssr.ts | 3 ++- packages/astro/src/core/build/plugins/util.ts | 13 +++++++++++-- packages/astro/test/test-utils.js | 1 + 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index 351c6006d3d8..a663757248cc 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -5,7 +5,7 @@ import { type BuildInternals } from '../internal.js'; import type { AstroBuildPlugin } from '../plugin.js'; import type { StaticBuildOptions } from '../types.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; -import { getPathFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; +import { getPageKeyFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; export const ASTRO_PAGE_MODULE_ID = '@astro-page:'; export const ASTRO_PAGE_RESOLVED_MODULE_ID = '\0' + ASTRO_PAGE_MODULE_ID; @@ -30,8 +30,6 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V ); } - console.log('inputs', inputs); - return addRollupInput(options, Array.from(inputs)); } }, @@ -44,9 +42,9 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V if (id.startsWith(ASTRO_PAGE_RESOLVED_MODULE_ID)) { const imports: string[] = []; const exports: string[] = []; - const pageName = getPathFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, id); - // TODO: Change that - const pageData = tmp(internals.pagesByKeys, pageName); + const pageData = internals.pagesByKeys.get( + getPageKeyFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, id) + ); if (pageData) { const resolvedPage = await this.resolve(pageData.moduleSpecifier); if (resolvedPage) { diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index dcf3fd3c2610..6db1715b126b 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -172,7 +172,7 @@ function vitePluginSSRSplit( const imports: string[] = []; const contents: string[] = []; const exports: string[] = []; - + // TODO: Change that const path = getPathFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, path); let module = await this.resolve(virtualModuleName); @@ -206,6 +206,7 @@ function vitePluginSSRSplit( for (const moduleKey of Object.keys(chunk.modules)) { if (moduleKey.startsWith(RESOLVED_SPLIT_MODULE_ID)) { internals.ssrSplitEntryChunks.set(moduleKey, chunk); + // TODO: Change that storeEntryPoint(moduleKey, options, internals, chunk.fileName); } } diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index a050c6a4929a..b5af89f81be1 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -63,11 +63,20 @@ export function getVirtualModulePageName(virtualModulePrefix: string, path: stri } /** - * Reverts the virtual module naming convention to the original path. - * See `getVirtualModulePageName`(above) for more information. + * From the VirtualModulePageName, get the original pageData key. * @param virtualModulePrefix The prefix used to create the virtual module * @param id Virtual module name */ +export function getPageKeyFromVirtualModulePageName(virtualModulePrefix: string, id: string) { + const [route, path] = id + .slice(virtualModulePrefix.length) + .split(ASTRO_PAGE_EXTENSION_POST_PATTERN); + + const componentPath = path.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); + return `${route}\x00${componentPath}`; +} + +// TODO: Should this be removed? Or refactored in generate.ts ? export function getPathFromVirtualModulePageName(virtualModulePrefix: string, id: string) { const pageName = id.slice(virtualModulePrefix.length); return pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index 7d5b89c35100..9d17d7f94bd3 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -221,6 +221,7 @@ export async function loadFixture(inlineConfig) { return app; }, loadEntryPoint: async (pagePath, routes, streaming) => { + // TODO: Change that const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath); const filePath = makeSplitEntryPointFileName(virtualModule, routes); const url = new URL(`./server/${filePath}?id=${fixtureId}`, config.outDir); From 21885cc2eff969ef3ee2a9081cb7106d15e0c570 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Tue, 9 Apr 2024 20:10:59 +0200 Subject: [PATCH 13/41] clean & comments --- packages/astro/src/core/build/generate.ts | 6 +----- packages/astro/src/core/build/pipeline.ts | 2 +- packages/astro/src/core/build/plugins/plugin-pages.ts | 9 --------- packages/astro/src/core/build/plugins/plugin-ssr.ts | 2 +- packages/astro/test/test-utils.js | 2 +- 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index de1bbbc65656..ed4415786b4f 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -616,11 +616,7 @@ function createBuildManifest( } /** - * - * @param internals - * @param path - * @param route - * @returns + * TODO: Change that – document & maybe refactor */ function getEntryFilePath(internals: BuildInternals, pageData: RouteData) { const id = diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 141cbecadc1b..a2248405a477 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -187,7 +187,7 @@ export class BuildPipeline extends Pipeline { ) { const [, pageName] = entrypoint.split(':'); console.log('pageName', pageName); - // TODO: Change that + // TODO: Change that – tmp function use only component name and not the route const pageData = tmp( this.internals.pagesByKeys, pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.') diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index a663757248cc..1e897cd6fe41 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -74,12 +74,3 @@ export function pluginPages(opts: StaticBuildOptions, internals: BuildInternals) }, }; } - -/** - * TMP: This is a temporary function to get the page data from the pagesByKeys map. - */ -function tmp(pagesByKeys: Map, pageName: string) { - for (const pages of pagesByKeys.values()) { - if (pages.component == pageName) return pages; - } -} diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 6db1715b126b..55b2beec9872 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -172,7 +172,7 @@ function vitePluginSSRSplit( const imports: string[] = []; const contents: string[] = []; const exports: string[] = []; - // TODO: Change that + // TODO: Change that – broken usage of getVirtualModulePageName const path = getPathFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, path); let module = await this.resolve(virtualModuleName); diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index 9d17d7f94bd3..b948287ebe61 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -221,7 +221,7 @@ export async function loadFixture(inlineConfig) { return app; }, loadEntryPoint: async (pagePath, routes, streaming) => { - // TODO: Change that + // TODO: Change that – broken usage of getVirtualModulePageName const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath); const filePath = makeSplitEntryPointFileName(virtualModule, routes); const url = new URL(`./server/${filePath}?id=${fixtureId}`, config.outDir); From 57137fd5a887de973eb3e03eccda97fbbebfa3e8 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 22 Apr 2024 17:59:17 +0200 Subject: [PATCH 14/41] better key and fix build --- packages/astro/src/core/build/page-data.ts | 2 +- packages/astro/src/core/build/pipeline.ts | 29 +++++-------------- .../src/core/build/plugins/plugin-pages.ts | 4 --- .../src/core/build/plugins/plugin-ssr.ts | 3 +- packages/astro/src/core/build/plugins/util.ts | 8 ++--- 5 files changed, 13 insertions(+), 33 deletions(-) diff --git a/packages/astro/src/core/build/page-data.ts b/packages/astro/src/core/build/page-data.ts index cd844cf0b713..827eadee8ff5 100644 --- a/packages/astro/src/core/build/page-data.ts +++ b/packages/astro/src/core/build/page-data.ts @@ -36,7 +36,7 @@ export async function collectPagesData( // with parallelized builds without guaranteeing that this is called first. for (const route of manifest.routes) { // Generate a unique key to identify each page in the build process. - const key = `${route.route}\x00${route.component}`; + const key = `${route.route}&${route.component}`; // static route: if (route.pathname) { const routeCollectionLogTimeout = setInterval(() => { diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 010ff611ce7e..e9b9fa6ebfd6 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -17,8 +17,7 @@ import { } from './internal.js'; import { ASTRO_PAGE_MODULE_ID, ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js'; import { RESOLVED_SPLIT_MODULE_ID } from './plugins/plugin-ssr.js'; -import { getVirtualModulePageName } from './plugins/util.js'; -import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js'; +import { getPageKeyFromVirtualModulePageName, getVirtualModulePageName } from './plugins/util.js'; import type { PageBuildData, StaticBuildOptions } from './types.js'; import { i18nHasFallback } from './util.js'; @@ -178,25 +177,20 @@ export class BuildPipeline extends Pipeline { retrieveRoutesToGenerate(): Map { const pages = new Map(); - for (const [entrypoint, filePath] of this.internals.entrySpecifierToBundleMap) { + for (const [virtualModulePageName, filePath] of this.internals.entrySpecifierToBundleMap) { // virtual pages can be emitted with different prefixes: // - the classic way are pages emitted with prefix ASTRO_PAGE_RESOLVED_MODULE_ID -> plugin-pages // - pages emitted using `functionPerRoute`, in this case pages are emitted with prefix RESOLVED_SPLIT_MODULE_ID if ( - entrypoint.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) || - entrypoint.includes(RESOLVED_SPLIT_MODULE_ID) + virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) || + virtualModulePageName.includes(RESOLVED_SPLIT_MODULE_ID) ) { - const [, pageName] = entrypoint.split(':'); - console.log('pageName', pageName); - // TODO: Change that – tmp function use only component name and not the route - const pageData = tmp( - this.internals.pagesByKeys, - pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.') - ); + const pageKey = getPageKeyFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, virtualModulePageName) + const pageData = this.internals.pagesByKeys.get(pageKey); if (!pageData) { throw new Error( - "Build failed. Astro couldn't find the emitted page from " + pageName + ' pattern' + "Build failed. Astro couldn't find the emitted page from " + pageKey + ' pattern' ); } @@ -235,12 +229,3 @@ export class BuildPipeline extends Pipeline { return pages; } } - -/** - * TMP: This is a temporary function to get the page data from the pagesByKeys map. - */ -function tmp(pagesByKeys: Map, pageName: string) { - for (const pages of pagesByKeys.values()) { - if (pages.component == pageName) return pages; - } -} diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index 1e897cd6fe41..99b0269563e7 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -21,10 +21,6 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V if (routeIsRedirect(pageData.route)) { continue; } - console.log('pageData', pageData.route.route); - console.log( - getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component, pageData.route.route) - ); inputs.add( getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component, pageData.route.route) ); diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 55b2beec9872..877fc3335910 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -173,8 +173,9 @@ function vitePluginSSRSplit( const contents: string[] = []; const exports: string[] = []; // TODO: Change that – broken usage of getVirtualModulePageName + // I should refactor getPathFromVirtualModulePageName const path = getPathFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); - const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, path); + const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, path, ""); let module = await this.resolve(virtualModuleName); if (module) { // we need to use the non-resolved ID in order to resolve correctly the virtual module diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index b21a90b25393..8291c9f54f98 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -53,9 +53,7 @@ export const ASTRO_PAGE_EXTENSION_POST_PATTERN = '@_@'; export function getVirtualModulePageName(virtualModulePrefix: string, path: string, route: string) { const extension = extname(path); return ( - virtualModulePrefix + - (route.startsWith('/') ? route.slice(1) : route) + - ASTRO_PAGE_EXTENSION_POST_PATTERN + + virtualModulePrefix + route + '&' + (extension.startsWith('.') ? path.slice(0, -extension.length) + extension.replace('.', ASTRO_PAGE_EXTENSION_POST_PATTERN) : path) @@ -70,10 +68,10 @@ export function getVirtualModulePageName(virtualModulePrefix: string, path: stri export function getPageKeyFromVirtualModulePageName(virtualModulePrefix: string, id: string) { const [route, path] = id .slice(virtualModulePrefix.length) - .split(ASTRO_PAGE_EXTENSION_POST_PATTERN); + .split("&"); const componentPath = path.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); - return `${route}\x00${componentPath}`; + return `${route}&${componentPath}`; } // TODO: Should this be removed? Or refactored in generate.ts ? From 73ba1518c6aab17753831b5f6c4826236cc970f3 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 22 Apr 2024 20:02:42 +0200 Subject: [PATCH 15/41] utils: add makePageDataKey --- packages/astro/src/core/build/page-data.ts | 3 ++- .../src/core/build/plugins/plugin-manifest.ts | 6 ++---- packages/astro/src/core/build/plugins/util.ts | 20 +++++++++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/astro/src/core/build/page-data.ts b/packages/astro/src/core/build/page-data.ts index 827eadee8ff5..095fb45932fe 100644 --- a/packages/astro/src/core/build/page-data.ts +++ b/packages/astro/src/core/build/page-data.ts @@ -4,6 +4,7 @@ import type { AllPagesData } from './types.js'; import * as colors from 'kleur/colors'; import { debug } from '../logger/core.js'; +import { makePageDataKey } from './plugins/util.js'; export interface CollectPagesDataOptions { settings: AstroSettings; @@ -36,7 +37,7 @@ export async function collectPagesData( // with parallelized builds without guaranteeing that this is called first. for (const route of manifest.routes) { // Generate a unique key to identify each page in the build process. - const key = `${route.route}&${route.component}`; + const key = makePageDataKey(route.route, route.component); // static route: if (route.pathname) { const routeCollectionLogTimeout = setInterval(() => { diff --git a/packages/astro/src/core/build/plugins/plugin-manifest.ts b/packages/astro/src/core/build/plugins/plugin-manifest.ts index d96ec8e9ebfa..3e95a98213ce 100644 --- a/packages/astro/src/core/build/plugins/plugin-manifest.ts +++ b/packages/astro/src/core/build/plugins/plugin-manifest.ts @@ -19,6 +19,7 @@ import { getOutFile, getOutFolder } from '../common.js'; import { type BuildInternals, cssOrder, mergeInlineCss } from '../internal.js'; import type { AstroBuildPlugin } from '../plugin.js'; import type { StaticBuildOptions } from '../types.js'; +import { makePageDataKey } from './util.js'; const manifestReplace = '@@ASTRO_MANIFEST_REPLACE@@'; const replaceExp = new RegExp(`['"]${manifestReplace}['"]`, 'g'); @@ -189,10 +190,7 @@ function buildManifest( } for (const route of opts.manifest.routes) { - let pageData; - for (const page of internals.pagesByKeys.values()) { - if (page.route.route == route.route) pageData = page; - } + const pageData = internals.pagesByKeys.get(makePageDataKey(route.route, route.component)); if (route.prerender || !pageData) continue; const scripts: SerializedRouteInfo['scripts'] = []; if (pageData.hoistedScript) { diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index 8291c9f54f98..8f441e40d587 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -40,8 +40,20 @@ export function extendManualChunks(outputOptions: OutputOptions, hooks: ExtendMa }; } -// This is an arbitrary string that we are going to replace the dot of the extension +// This is an arbitrary string that we use to replace the dot of the extension. export const ASTRO_PAGE_EXTENSION_POST_PATTERN = '@_@'; +// This is an arbitrary string that we use to make a pageData key +// Has to be a invalid character for a route, to avoid conflicts. +export const ASTRO_PAGE_KEY_SEPARATOR = '&'; + +/** + * Generate a unique key to identify each page in the build process. + * @param route Usually pageData.route.route + * @param componentPath Usually pageData.component + */ +export function makePageDataKey(route: string, componentPath: string) { + return route + ASTRO_PAGE_KEY_SEPARATOR + componentPath; +} /** * Prevents Rollup from triggering other plugins in the process by masking the extension (hence the virtual file). @@ -53,7 +65,7 @@ export const ASTRO_PAGE_EXTENSION_POST_PATTERN = '@_@'; export function getVirtualModulePageName(virtualModulePrefix: string, path: string, route: string) { const extension = extname(path); return ( - virtualModulePrefix + route + '&' + + virtualModulePrefix + route + ASTRO_PAGE_KEY_SEPARATOR + (extension.startsWith('.') ? path.slice(0, -extension.length) + extension.replace('.', ASTRO_PAGE_EXTENSION_POST_PATTERN) : path) @@ -68,10 +80,10 @@ export function getVirtualModulePageName(virtualModulePrefix: string, path: stri export function getPageKeyFromVirtualModulePageName(virtualModulePrefix: string, id: string) { const [route, path] = id .slice(virtualModulePrefix.length) - .split("&"); + .split(ASTRO_PAGE_KEY_SEPARATOR); const componentPath = path.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); - return `${route}&${componentPath}`; + return makePageDataKey(route, componentPath); } // TODO: Should this be removed? Or refactored in generate.ts ? From 96a6518aba54d7f35e07ead97e33702b0823bf7f Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Wed, 24 Apr 2024 21:03:56 +0200 Subject: [PATCH 16/41] fix(pipeline): retrieveRoutesToGenerate for ssr --- packages/astro/src/core/build/pipeline.ts | 13 ++++++++++++- .../src/core/build/plugins/plugin-ssr.ts | 8 ++------ packages/astro/src/core/build/plugins/util.ts | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index e9b9fa6ebfd6..4a3341ea4e27 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -185,7 +185,18 @@ export class BuildPipeline extends Pipeline { virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) || virtualModulePageName.includes(RESOLVED_SPLIT_MODULE_ID) ) { - const pageKey = getPageKeyFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, virtualModulePageName) + let pageKey; + if (virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID)) { + pageKey = getPageKeyFromVirtualModulePageName( + ASTRO_PAGE_RESOLVED_MODULE_ID, + virtualModulePageName + ); + } else { + pageKey = getPageKeyFromVirtualModulePageName( + RESOLVED_SPLIT_MODULE_ID, + virtualModulePageName + ); + } const pageData = this.internals.pagesByKeys.get(pageKey); if (!pageData) { diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 877fc3335910..581e9175bf8c 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -13,7 +13,7 @@ import { SSR_MANIFEST_VIRTUAL_MODULE_ID } from './plugin-manifest.js'; import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js'; import { ASTRO_PAGE_MODULE_ID } from './plugin-pages.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; -import { getPathFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; +import { getPathFromVirtualModulePageName, getVirtualModulePageName, virtualModuleNameFromResolvedId } from './util.js'; export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry'; export const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID; @@ -172,13 +172,9 @@ function vitePluginSSRSplit( const imports: string[] = []; const contents: string[] = []; const exports: string[] = []; - // TODO: Change that – broken usage of getVirtualModulePageName - // I should refactor getPathFromVirtualModulePageName - const path = getPathFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); - const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, path, ""); + const virtualModuleName = virtualModuleNameFromResolvedId(ASTRO_PAGE_MODULE_ID, RESOLVED_SPLIT_MODULE_ID, id); let module = await this.resolve(virtualModuleName); if (module) { - // we need to use the non-resolved ID in order to resolve correctly the virtual module imports.push(`import * as pageModule from "${virtualModuleName}";`); } const middleware = await this.resolve(MIDDLEWARE_MODULE_ID); diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index 8f441e40d587..9dd34f0d70d9 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -72,6 +72,25 @@ export function getVirtualModulePageName(virtualModulePrefix: string, path: stri ); } +/** + * In SSR plugins, we need to use the non-resolved virtualModuleName in order to resolve correctly the virtual module. + * @param virtualModulePrefix The prefix used to create the virtual module + * @param resolvedModulePrefix The prefix of the resolved virtual module + * @param resolvedId The resolved virtual module id + * @returns + */ +export function virtualModuleNameFromResolvedId(virtualModulePrefix: string, resolvedModulePrefix: string, resolvedId: string) { + const extension = extname(resolvedId); + const clean_path = resolvedId.slice(resolvedModulePrefix.length); + return ( + virtualModulePrefix + + (extension.startsWith('.') + ? clean_path.slice(0, -extension.length) + extension.replace('.', ASTRO_PAGE_EXTENSION_POST_PATTERN) + : clean_path + ) + ); +} + /** * From the VirtualModulePageName, get the original pageData key. * @param virtualModulePrefix The prefix used to create the virtual module From 87930176fc361e5610840ed6b1990a5b603c0a68 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Wed, 24 Apr 2024 23:27:19 +0200 Subject: [PATCH 17/41] internals: getPageData function --- packages/astro/src/core/build/generate.ts | 3 ++- packages/astro/src/core/build/internal.ts | 24 +++++++++++++++++-- packages/astro/src/core/build/pipeline.ts | 4 ++-- .../src/core/build/plugins/plugin-ssr.ts | 1 - 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 6cacdcfd9c10..48a9d84bed1c 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -256,6 +256,7 @@ async function generatePage( // prepare information we need const { config, internals, logger } = pipeline; const pageModulePromise = ssrEntry.page; + // TODO: Why do we need to get PageData from PageData? const pageInfo = getPageDataByComponent(internals, pageData.route.component); // Calculate information of the page, like scripts, links and styles @@ -617,7 +618,7 @@ function createBuildManifest( } /** - * TODO: Change that – document & maybe refactor + * For a given pageData, returns the entry file path—aka a resolved virtual module in our internals' specifiers. */ function getEntryFilePath(internals: BuildInternals, pageData: RouteData) { const id = diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index 80f2ed7b1edb..a5b37695b2ff 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -3,7 +3,8 @@ import type { RouteData, SSRResult } from '../../@types/astro.js'; import type { PageOptions } from '../../vite-plugin-astro/types.js'; import { prependForwardSlash, removeFileExtension } from '../path.js'; import { viteID } from '../util.js'; -import type { AllPagesData, PageBuildData, StylesheetAsset, ViteID } from './types.js'; +import type { PageBuildData, StylesheetAsset, ViteID } from './types.js'; +import { makePageDataKey } from './plugins/util.js'; export interface BuildInternals { /** @@ -215,11 +216,30 @@ export function* getPageDatasByClientOnlyID( } } +/** + * From its route and component, get the page data from the build internals. + * @param internals Build Internals with all the pages + * @param route The route of the page, used to identify the page + * @param component The component of the page, used to identify the page + */ +export function getPageData( + internals: BuildInternals, + route: string, + component: string +): PageBuildData | undefined { + let pageData = internals.pagesByKeys.get(makePageDataKey(route, component)); + if (pageData) { return pageData;} + return undefined; +} + +/** + * TODO: remove this function, obsolete. + * last usage in astro/packages/astro/src/core/build/generate.ts + */ export function getPageDataByComponent( internals: BuildInternals, component: string ): PageBuildData | undefined { - // TODO: Refactor that if (internals.pagesByKeys.has(component)) { return internals.pagesByKeys.get(component); } diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 4a3341ea4e27..f0ce84fbc5d8 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -12,7 +12,7 @@ import { import { type BuildInternals, cssOrder, - getPageDataByComponent, + getPageData, mergeInlineCss, } from './internal.js'; import { ASTRO_PAGE_MODULE_ID, ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js'; @@ -131,7 +131,7 @@ export class BuildPipeline extends Pipeline { settings, } = this; const links = new Set(); - const pageBuildData = getPageDataByComponent(internals, routeData.component); + const pageBuildData = getPageData(internals, routeData.route, routeData.component); const scripts = createModuleScriptsSet( pageBuildData?.hoistedScript ? [pageBuildData.hoistedScript] : [], base, diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 581e9175bf8c..4846d287b7e4 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -203,7 +203,6 @@ function vitePluginSSRSplit( for (const moduleKey of Object.keys(chunk.modules)) { if (moduleKey.startsWith(RESOLVED_SPLIT_MODULE_ID)) { internals.ssrSplitEntryChunks.set(moduleKey, chunk); - // TODO: Change that storeEntryPoint(moduleKey, options, internals, chunk.fileName); } } From ae2b01737dc911c14a79a5038b8d9efc7954a74a Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Thu, 25 Apr 2024 12:15:09 +0200 Subject: [PATCH 18/41] tmp(ssr-split-manifest): fix test ? --- packages/astro/test/ssr-split-manifest.test.js | 9 ++++++--- packages/astro/test/test-utils.js | 5 ++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/astro/test/ssr-split-manifest.test.js b/packages/astro/test/ssr-split-manifest.test.js index 2f66b367616f..64494536b5d2 100644 --- a/packages/astro/test/ssr-split-manifest.test.js +++ b/packages/astro/test/ssr-split-manifest.test.js @@ -40,7 +40,8 @@ describe('astro:ssr-manifest, split', () => { it('should be able to render a specific entry point', async () => { const pagePath = 'src/pages/index.astro'; - const app = await fixture.loadEntryPoint(pagePath, currentRoutes); + const routePath = '/'; + const app = await fixture.loadEntryPoint(currentRoutes, pagePath, routePath); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); @@ -73,7 +74,8 @@ describe('astro:ssr-manifest, split', () => { it('should emit an entry point to request the pre-rendered page', async () => { const pagePath = 'src/pages/prerender.astro'; - const app = await fixture.loadEntryPoint(pagePath, currentRoutes); + const routePath = '/prerender'; + const app = await fixture.loadEntryPoint(currentRoutes, pagePath, routePath); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); @@ -107,7 +109,8 @@ describe('astro:ssr-manifest, split', () => { }); it('should correctly build, and not create a "uses" entry point', async () => { const pagePath = 'src/pages/index.astro'; - const app = await fixture.loadEntryPoint(pagePath, currentRoutes); + const routePath = '/'; + const app = await fixture.loadEntryPoint(currentRoutes, pagePath, routePath); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index b948287ebe61..3b0f08f95384 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -220,9 +220,8 @@ export async function loadFixture(inlineConfig) { app.manifest = manifest; return app; }, - loadEntryPoint: async (pagePath, routes, streaming) => { - // TODO: Change that – broken usage of getVirtualModulePageName - const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath); + loadEntryPoint: async (routes, pagePath, routePath, streaming) => { + const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath, routePath); const filePath = makeSplitEntryPointFileName(virtualModule, routes); const url = new URL(`./server/${filePath}?id=${fixtureId}`, config.outDir); const { createApp, manifest } = await import(url); From b3ccdfb12c43d53d813125f19786cac652b2eec4 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Thu, 25 Apr 2024 14:02:28 +0200 Subject: [PATCH 19/41] fix?: ssr clean static output --- packages/astro/src/core/build/generate.ts | 4 ++-- packages/astro/src/core/build/static-build.ts | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 48a9d84bed1c..143bc6316c57 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -47,7 +47,7 @@ import { createRequest } from '../request.js'; import { matchRoute } from '../routing/match.js'; import { getOutputFilename } from '../util.js'; import { getOutDirWithinCwd, getOutFile, getOutFolder } from './common.js'; -import { cssOrder, getPageDataByComponent, mergeInlineCss } from './internal.js'; +import { cssOrder, getPageData, mergeInlineCss } from './internal.js'; import { BuildPipeline } from './pipeline.js'; import type { PageBuildData, @@ -257,7 +257,7 @@ async function generatePage( const { config, internals, logger } = pipeline; const pageModulePromise = ssrEntry.page; // TODO: Why do we need to get PageData from PageData? - const pageInfo = getPageDataByComponent(internals, pageData.route.component); + const pageInfo = getPageData(internals, pageData.route.component, pageData.route.route); // Calculate information of the page, like scripts, links and styles const styles = pageData.styles diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index a3ec4925be2e..50baa44e7966 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -370,11 +370,17 @@ async function cleanStaticOutput( ) { const allStaticFiles = new Set(); for (const pageData of internals.pagesByKeys.values()) { - if (pageData.route.prerender && !pageData.hasSharedModules) { - const { moduleSpecifier } = pageData; - const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); - const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); + console.log("[cleanStaticOutput] pageData: ", pageData.key, "— is prerender ? ", pageData.route.prerender); + const { moduleSpecifier } = pageData; + const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); + const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); + if (pageData.route.prerender && !pageData.hasSharedModules && allStaticFiles.has(pageBundleId ?? entryBundleId)) { allStaticFiles.add(pageBundleId ?? entryBundleId); + } else { + // Check if the page pageBundleId or entryBundleId is already in the set, if so, remove it + if (allStaticFiles.has(pageBundleId ?? entryBundleId)) { + allStaticFiles.delete(pageBundleId ?? entryBundleId); + } } } const ssr = isServerLikeOutput(opts.settings.config); From 2423ac2b1a021e8c4071c090d7360a3bb6195993 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Thu, 25 Apr 2024 16:00:57 +0200 Subject: [PATCH 20/41] internals: getPageDatasWithPublicKey --- packages/astro/src/core/build/internal.ts | 39 +++++++++++++++++++ packages/astro/src/core/build/static-build.ts | 7 ++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index a5b37695b2ff..3786002550a6 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -246,6 +246,45 @@ export function getPageDataByComponent( return undefined; } +/** + * TODO: This function is used to avoid breaking changes in the Integrations API. + * Should be removed in the future (in Astro 5 ?). + * Parse internals.pagesByKeys to get the page data with the public key. + * If the page component is unique -> the public key is the component. + * If the page component is shared -> the public key is the internal key. + * @param pagesByKeys A map of all page data by their internal key + */ +export function getPageDatasWithPublicKey(pagesByKeys: Map): Map { + // Create a map to store the pages with the public key, mimicking internal.pagesByKeys + const pagesWithPublicKey = new Map(); + + const pagesByComponentsArray = Array.from(pagesByKeys.values()).map((pageData) => { + return { component: pageData.component, pageData: pageData }; + }); + + // Get pages with unique component, and set the public key to the component, to maintain the + // old behavior of the Integrations API. Then add them to the pagesWithPublicKey map. + const pagesWithUniqueComponent = pagesByComponentsArray.filter((page) => { + return pagesByComponentsArray.filter((p) => p.component === page.component).length === 1; + }); + + pagesWithUniqueComponent.forEach((page) => { + pagesWithPublicKey.set(page.component, page.pageData); + }); + + // Get pages with shared component, and set the public key to the internal key. It's not a breaking change + // since having a shared component was not supported before. Then add them to the pagesWithPublicKey map. + const pagesWithSharedComponent = pagesByComponentsArray.filter((page) => { + return pagesByComponentsArray.filter((p) => p.component === page.component).length > 1; + }); + + pagesWithSharedComponent.forEach((page) => { + pagesWithPublicKey.set(page.pageData.key, page.pageData); + }); + + return pagesWithPublicKey; +} + export function getPageDataByViteID( internals: BuildInternals, viteid: ViteID diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 50baa44e7966..a60f7e5a2ea0 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -9,7 +9,7 @@ import * as vite from 'vite'; import type { RouteData } from '../../@types/astro.js'; import { PROPAGATED_ASSET_FLAG } from '../../content/consts.js'; import { hasAnyContentFlag } from '../../content/utils.js'; -import { type BuildInternals, createBuildInternals } from '../../core/build/internal.js'; +import { type BuildInternals, createBuildInternals, getPageDatasWithPublicKey } from '../../core/build/internal.js'; import { emptyDir, removeEmptyDirs } from '../../core/fs/index.js'; import { appendForwardSlash, prependForwardSlash, removeFileExtension } from '../../core/path.js'; import { isModeServerWithNoAdapter } from '../../core/util.js'; @@ -267,7 +267,7 @@ async function ssrBuild( const updatedViteBuildConfig = await runHookBuildSetup({ config: settings.config, - pages: internals.pagesByKeys, + pages: getPageDatasWithPublicKey(internals.pagesByKeys), vite: viteBuildConfig, target: 'server', logger: opts.logger, @@ -328,7 +328,7 @@ async function clientBuild( await runHookBuildSetup({ config: settings.config, - pages: internals.pagesByKeys, + pages: getPageDatasWithPublicKey(internals.pagesByKeys), vite: viteBuildConfig, target: 'client', logger: opts.logger, @@ -370,7 +370,6 @@ async function cleanStaticOutput( ) { const allStaticFiles = new Set(); for (const pageData of internals.pagesByKeys.values()) { - console.log("[cleanStaticOutput] pageData: ", pageData.key, "— is prerender ? ", pageData.route.prerender); const { moduleSpecifier } = pageData; const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); From 29da012350ee40cd3a26699fcdddb291d651511e Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Thu, 25 Apr 2024 18:20:07 +0200 Subject: [PATCH 21/41] internals: getPageDatasByHoistedScriptId & getPagesDatasByComponent --- packages/astro/src/core/build/internal.ts | 40 ++++++++++--------- .../src/core/build/plugins/plugin-css.ts | 3 +- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index 3786002550a6..952ea2c34335 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -233,17 +233,19 @@ export function getPageData( } /** - * TODO: remove this function, obsolete. - * last usage in astro/packages/astro/src/core/build/generate.ts + * Get all pages datas from the build internals, using a specific component. + * @param internals Build Internals with all the pages + * @param component path to the component, used to identify related pages */ -export function getPageDataByComponent( +export function getPagesDatasByComponent( internals: BuildInternals, component: string -): PageBuildData | undefined { - if (internals.pagesByKeys.has(component)) { - return internals.pagesByKeys.get(component); - } - return undefined; +): PageBuildData[] { + const pageDatas: PageBuildData[] = []; + Array.from(internals.pagesByKeys.values()).forEach((pageData) => { + if (component === pageData.component) pageDatas.push(pageData); + }) + return pageDatas; } /** @@ -360,21 +362,23 @@ export function mergeInlineCss( return acc; } -export function isHoistedScript(internals: BuildInternals, id: string): boolean { - return internals.hoistedScriptIdToPagesMap.has(id); -} - -export function* getPageDatasByHoistedScriptId( +/** + * Get all pages data from the build internals, using a specific hoisted script id. + * @param internals Build Internals with all the pages + * @param id Hoisted script id, used to identify the pages using it + */ +export function getPageDatasByHoistedScriptId( internals: BuildInternals, id: string -): Generator { +): PageBuildData[]{ const set = internals.hoistedScriptIdToPagesMap.get(id); + const pageDatas: PageBuildData[] = []; if (set) { for (const pageId of set) { - const pageData = getPageDataByComponent(internals, pageId.slice(1)); - if (pageData) { - yield pageData; - } + getPagesDatasByComponent(internals, pageId.slice(1)).forEach((pageData) => { + pageDatas.push(pageData); + }); } } + return pageDatas; } diff --git a/packages/astro/src/core/build/plugins/plugin-css.ts b/packages/astro/src/core/build/plugins/plugin-css.ts index e435578a221e..3e35a9bb0987 100644 --- a/packages/astro/src/core/build/plugins/plugin-css.ts +++ b/packages/astro/src/core/build/plugins/plugin-css.ts @@ -18,7 +18,6 @@ import { getPageDataByViteID, getPageDatasByClientOnlyID, getPageDatasByHoistedScriptId, - isHoistedScript, } from '../internal.js'; import { extendManualChunks, shouldInlineAsset } from './util.js'; @@ -161,7 +160,7 @@ function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] { if (pageData) { appendCSSToPage(pageData, meta, pagesToCss, depth, order); } - } else if (options.target === 'client' && isHoistedScript(internals, pageInfo.id)) { + } else if (options.target === 'client' && internals.hoistedScriptIdToPagesMap.has(pageInfo.id)) { for (const pageData of getPageDatasByHoistedScriptId(internals, pageInfo.id)) { appendCSSToPage(pageData, meta, pagesToCss, -1, order); } From 9b02b89920bb700ff844161930106620f14e672a Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Fri, 26 Apr 2024 18:10:20 +0200 Subject: [PATCH 22/41] remove broken & useless virtualModuleNameFromResolvedId --- .../src/core/build/plugins/plugin-ssr.ts | 8 ++-- packages/astro/src/core/build/plugins/util.ts | 39 +++++++------------ 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 4846d287b7e4..f7bc2e407660 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -13,7 +13,7 @@ import { SSR_MANIFEST_VIRTUAL_MODULE_ID } from './plugin-manifest.js'; import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js'; import { ASTRO_PAGE_MODULE_ID } from './plugin-pages.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; -import { getPathFromVirtualModulePageName, getVirtualModulePageName, virtualModuleNameFromResolvedId } from './util.js'; +import { getRouteAndComponentFromVirtualModulePageName, getVirtualModulePageName, getPageKeyFromVirtualModulePageName } from './util.js'; export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry'; export const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID; @@ -172,7 +172,9 @@ function vitePluginSSRSplit( const imports: string[] = []; const contents: string[] = []; const exports: string[] = []; - const virtualModuleName = virtualModuleNameFromResolvedId(ASTRO_PAGE_MODULE_ID, RESOLVED_SPLIT_MODULE_ID, id); + const pageKey = getPageKeyFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); + const pageData = internals.pagesByKeys.get(pageKey); + const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData!.component, pageData!.route.route); let module = await this.resolve(virtualModuleName); if (module) { imports.push(`import * as pageModule from "${virtualModuleName}";`); @@ -294,7 +296,7 @@ function storeEntryPoint( internals: BuildInternals, fileName: string ) { - const componentPath = getPathFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, moduleKey); + const [_route, componentPath] = getRouteAndComponentFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, moduleKey); for (const pageData of Object.values(options.allPages)) { if (componentPath == pageData.component) { const publicPath = fileURLToPath(options.settings.config.build.server); diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index 9dd34f0d70d9..7d6cb025da6b 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -57,7 +57,7 @@ export function makePageDataKey(route: string, componentPath: string) { /** * Prevents Rollup from triggering other plugins in the process by masking the extension (hence the virtual file). - * + * Inverse function of getRouteAndComponentFromVirtualModulePageName() below. * @param virtualModulePrefix The prefix used to create the virtual module * @param path Page component path * @param route Route of the page @@ -73,42 +73,29 @@ export function getVirtualModulePageName(virtualModulePrefix: string, path: stri } /** - * In SSR plugins, we need to use the non-resolved virtualModuleName in order to resolve correctly the virtual module. + * From the VirtualModulePageName, get the original pageData key. + * Useful to retrieve the pageData from internals.pagesByKeys.get() * @param virtualModulePrefix The prefix used to create the virtual module - * @param resolvedModulePrefix The prefix of the resolved virtual module - * @param resolvedId The resolved virtual module id - * @returns + * @param id Virtual module name */ -export function virtualModuleNameFromResolvedId(virtualModulePrefix: string, resolvedModulePrefix: string, resolvedId: string) { - const extension = extname(resolvedId); - const clean_path = resolvedId.slice(resolvedModulePrefix.length); - return ( - virtualModulePrefix + - (extension.startsWith('.') - ? clean_path.slice(0, -extension.length) + extension.replace('.', ASTRO_PAGE_EXTENSION_POST_PATTERN) - : clean_path - ) - ); +export function getPageKeyFromVirtualModulePageName(virtualModulePrefix: string, id: string) { + const [route, path] = getRouteAndComponentFromVirtualModulePageName(virtualModulePrefix, id); + return makePageDataKey(route, path); } /** - * From the VirtualModulePageName, get the original pageData key. - * @param virtualModulePrefix The prefix used to create the virtual module + * From the VirtualModulePageName, get the route and the component path. + * Inverse function of getVirtualModulePageName() above. + * @param virtualModulePrefix The prefix at the beginning of the virtual module * @param id Virtual module name + * @returns [route, componentPath] as [string, string] */ -export function getPageKeyFromVirtualModulePageName(virtualModulePrefix: string, id: string) { +export function getRouteAndComponentFromVirtualModulePageName(virtualModulePrefix: string, id: string) { const [route, path] = id .slice(virtualModulePrefix.length) .split(ASTRO_PAGE_KEY_SEPARATOR); - const componentPath = path.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); - return makePageDataKey(route, componentPath); -} - -// TODO: Should this be removed? Or refactored in generate.ts ? -export function getPathFromVirtualModulePageName(virtualModulePrefix: string, id: string) { - const pageName = id.slice(virtualModulePrefix.length); - return pageName.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); + return [route, path.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')]; } export function shouldInlineAsset( From cd013675040f35d06b19a4ae19038537e15a6cb5 Mon Sep 17 00:00:00 2001 From: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:19:49 +0200 Subject: [PATCH 23/41] chore: changeset --- .changeset/great-turtles-greet.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/great-turtles-greet.md diff --git a/.changeset/great-turtles-greet.md b/.changeset/great-turtles-greet.md new file mode 100644 index 000000000000..c688e0660f64 --- /dev/null +++ b/.changeset/great-turtles-greet.md @@ -0,0 +1,5 @@ +--- +"astro": minor +--- + +Rework how component keys are done From 5c3a75fac8ab9a3be8e4560f0aeb7e4c3a114d7f Mon Sep 17 00:00:00 2001 From: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Date: Mon, 29 Apr 2024 13:42:47 +0200 Subject: [PATCH 24/41] fix: sanitize slashes in filepaths --- packages/astro/src/core/build/static-build.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index a60f7e5a2ea0..ea3b7a758430 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -9,7 +9,11 @@ import * as vite from 'vite'; import type { RouteData } from '../../@types/astro.js'; import { PROPAGATED_ASSET_FLAG } from '../../content/consts.js'; import { hasAnyContentFlag } from '../../content/utils.js'; -import { type BuildInternals, createBuildInternals, getPageDatasWithPublicKey } from '../../core/build/internal.js'; +import { + type BuildInternals, + createBuildInternals, + getPageDatasWithPublicKey, +} from '../../core/build/internal.js'; import { emptyDir, removeEmptyDirs } from '../../core/fs/index.js'; import { appendForwardSlash, prependForwardSlash, removeFileExtension } from '../../core/path.js'; import { isModeServerWithNoAdapter } from '../../core/util.js'; @@ -373,7 +377,11 @@ async function cleanStaticOutput( const { moduleSpecifier } = pageData; const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); - if (pageData.route.prerender && !pageData.hasSharedModules && allStaticFiles.has(pageBundleId ?? entryBundleId)) { + if ( + pageData.route.prerender && + !pageData.hasSharedModules && + allStaticFiles.has(pageBundleId ?? entryBundleId) + ) { allStaticFiles.add(pageBundleId ?? entryBundleId); } else { // Check if the page pageBundleId or entryBundleId is already in the set, if so, remove it @@ -536,6 +544,7 @@ export function makeAstroPageEntryPointFileName( return `pages${name .replace(/\/$/, '/index') .replaceAll(/[[\]]/g, '_') + .replaceAll('/', '-') .replaceAll('...', '---')}.astro.mjs`; } From 896caf9e6ce1638181ca47a3db9e42127ce1f0c8 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 14:22:04 +0200 Subject: [PATCH 25/41] Revert "fix: sanitize slashes in filepaths" This reverts commit 5c3a75fac8ab9a3be8e4560f0aeb7e4c3a114d7f. --- packages/astro/src/core/build/static-build.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index ea3b7a758430..a60f7e5a2ea0 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -9,11 +9,7 @@ import * as vite from 'vite'; import type { RouteData } from '../../@types/astro.js'; import { PROPAGATED_ASSET_FLAG } from '../../content/consts.js'; import { hasAnyContentFlag } from '../../content/utils.js'; -import { - type BuildInternals, - createBuildInternals, - getPageDatasWithPublicKey, -} from '../../core/build/internal.js'; +import { type BuildInternals, createBuildInternals, getPageDatasWithPublicKey } from '../../core/build/internal.js'; import { emptyDir, removeEmptyDirs } from '../../core/fs/index.js'; import { appendForwardSlash, prependForwardSlash, removeFileExtension } from '../../core/path.js'; import { isModeServerWithNoAdapter } from '../../core/util.js'; @@ -377,11 +373,7 @@ async function cleanStaticOutput( const { moduleSpecifier } = pageData; const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); - if ( - pageData.route.prerender && - !pageData.hasSharedModules && - allStaticFiles.has(pageBundleId ?? entryBundleId) - ) { + if (pageData.route.prerender && !pageData.hasSharedModules && allStaticFiles.has(pageBundleId ?? entryBundleId)) { allStaticFiles.add(pageBundleId ?? entryBundleId); } else { // Check if the page pageBundleId or entryBundleId is already in the set, if so, remove it @@ -544,7 +536,6 @@ export function makeAstroPageEntryPointFileName( return `pages${name .replace(/\/$/, '/index') .replaceAll(/[[\]]/g, '_') - .replaceAll('/', '-') .replaceAll('...', '---')}.astro.mjs`; } From 7490882f5e107cb5b094c1739a4623f5d7c59639 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 14:29:22 +0200 Subject: [PATCH 26/41] fix?: remove route from virtual module name --- packages/astro/src/core/build/generate.ts | 2 +- packages/astro/src/core/build/pipeline.ts | 30 +++++++------- .../src/core/build/plugins/plugin-pages.ts | 10 ++--- .../src/core/build/plugins/plugin-ssr.ts | 16 ++++---- packages/astro/src/core/build/plugins/util.ts | 39 +++++++++++-------- .../astro/test/ssr-split-manifest.test.js | 9 ++--- packages/astro/test/test-utils.js | 4 +- 7 files changed, 52 insertions(+), 58 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 143bc6316c57..64657452b178 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -622,6 +622,6 @@ function createBuildManifest( */ function getEntryFilePath(internals: BuildInternals, pageData: RouteData) { const id = - '\x00' + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component, pageData.route); + '\x00' + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component); return internals.entrySpecifierToBundleMap.get(id); } diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index f0ce84fbc5d8..f94d969bcef7 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -17,7 +17,7 @@ import { } from './internal.js'; import { ASTRO_PAGE_MODULE_ID, ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js'; import { RESOLVED_SPLIT_MODULE_ID } from './plugins/plugin-ssr.js'; -import { getPageKeyFromVirtualModulePageName, getVirtualModulePageName } from './plugins/util.js'; +import { getPagesFromVirtualModulePageName, getVirtualModulePageName } from './plugins/util.js'; import type { PageBuildData, StaticBuildOptions } from './types.js'; import { i18nHasFallback } from './util.js'; @@ -185,27 +185,24 @@ export class BuildPipeline extends Pipeline { virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) || virtualModulePageName.includes(RESOLVED_SPLIT_MODULE_ID) ) { - let pageKey; + let pageDatas: PageBuildData[] = []; if (virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID)) { - pageKey = getPageKeyFromVirtualModulePageName( + pageDatas.concat(getPagesFromVirtualModulePageName( + this.internals, ASTRO_PAGE_RESOLVED_MODULE_ID, virtualModulePageName - ); - } else { - pageKey = getPageKeyFromVirtualModulePageName( + )); + } + if (virtualModulePageName.includes(RESOLVED_SPLIT_MODULE_ID)) { + pageDatas.concat(getPagesFromVirtualModulePageName( + this.internals, RESOLVED_SPLIT_MODULE_ID, virtualModulePageName - ); + )); } - const pageData = this.internals.pagesByKeys.get(pageKey); - - if (!pageData) { - throw new Error( - "Build failed. Astro couldn't find the emitted page from " + pageKey + ' pattern' - ); + for (const pageData of pageDatas) { + pages.set(pageData, filePath); } - - pages.set(pageData, filePath); } } @@ -225,8 +222,7 @@ export class BuildPipeline extends Pipeline { // Here, we take the component path and transform it in the virtual module name const moduleSpecifier = getVirtualModulePageName( ASTRO_PAGE_MODULE_ID, - pageData.component, - pageData.route.route + pageData.component ); // We retrieve the original JS module const filePath = this.internals.entrySpecifierToBundleMap.get(moduleSpecifier); diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts index 99b0269563e7..71195a2e2996 100644 --- a/packages/astro/src/core/build/plugins/plugin-pages.ts +++ b/packages/astro/src/core/build/plugins/plugin-pages.ts @@ -5,7 +5,7 @@ import { type BuildInternals } from '../internal.js'; import type { AstroBuildPlugin } from '../plugin.js'; import type { StaticBuildOptions } from '../types.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; -import { getPageKeyFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; +import { getPagesFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; export const ASTRO_PAGE_MODULE_ID = '@astro-page:'; export const ASTRO_PAGE_RESOLVED_MODULE_ID = '\0' + ASTRO_PAGE_MODULE_ID; @@ -22,7 +22,7 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V continue; } inputs.add( - getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component, pageData.route.route) + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component) ); } @@ -38,10 +38,8 @@ function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): V if (id.startsWith(ASTRO_PAGE_RESOLVED_MODULE_ID)) { const imports: string[] = []; const exports: string[] = []; - const pageData = internals.pagesByKeys.get( - getPageKeyFromVirtualModulePageName(ASTRO_PAGE_RESOLVED_MODULE_ID, id) - ); - if (pageData) { + const pageDatas = getPagesFromVirtualModulePageName(internals, ASTRO_PAGE_RESOLVED_MODULE_ID, id); + for (const pageData of pageDatas) { const resolvedPage = await this.resolve(pageData.moduleSpecifier); if (resolvedPage) { imports.push(`const page = () => import(${JSON.stringify(pageData.moduleSpecifier)});`); diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index f7bc2e407660..a9cd52570752 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -13,7 +13,7 @@ import { SSR_MANIFEST_VIRTUAL_MODULE_ID } from './plugin-manifest.js'; import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js'; import { ASTRO_PAGE_MODULE_ID } from './plugin-pages.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; -import { getRouteAndComponentFromVirtualModulePageName, getVirtualModulePageName, getPageKeyFromVirtualModulePageName } from './util.js'; +import { getComponentFromVirtualModulePageName, getVirtualModulePageName } from './util.js'; export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry'; export const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID; @@ -49,8 +49,7 @@ function vitePluginSSR( } const virtualModuleName = getVirtualModulePageName( ASTRO_PAGE_MODULE_ID, - pageData.component, - pageData.route.route + pageData.component ); let module = await this.resolve(virtualModuleName); if (module) { @@ -155,7 +154,7 @@ function vitePluginSSRSplit( continue; } inputs.add( - getVirtualModulePageName(SPLIT_MODULE_ID, pageData.component, pageData.route.route) + getVirtualModulePageName(SPLIT_MODULE_ID, pageData.component) ); } @@ -172,9 +171,8 @@ function vitePluginSSRSplit( const imports: string[] = []; const contents: string[] = []; const exports: string[] = []; - const pageKey = getPageKeyFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); - const pageData = internals.pagesByKeys.get(pageKey); - const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData!.component, pageData!.route.route); + const componentPath = getComponentFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, id); + const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, componentPath); let module = await this.resolve(virtualModuleName); if (module) { imports.push(`import * as pageModule from "${virtualModuleName}";`); @@ -288,7 +286,7 @@ if (_start in serverEntrypointModule) { * we can't use `writeBundle` hook to get the final file name of the entry point written on disk. * We use this hook instead. * - * We retrieve the {@link RouteData} that belongs the current moduleKey + * We retrieve all the {@link RouteData} that have the same component as the one we are processing. */ function storeEntryPoint( moduleKey: string, @@ -296,7 +294,7 @@ function storeEntryPoint( internals: BuildInternals, fileName: string ) { - const [_route, componentPath] = getRouteAndComponentFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, moduleKey); + const componentPath = getComponentFromVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, moduleKey); for (const pageData of Object.values(options.allPages)) { if (componentPath == pageData.component) { const publicPath = fileURLToPath(options.settings.config.build.server); diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index 7d6cb025da6b..1a96e29858d0 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -1,5 +1,7 @@ import { extname } from 'node:path'; import type { BuildOptions, Rollup, Plugin as VitePlugin } from 'vite'; +import type { BuildInternals } from '../internal.js'; +import type { PageBuildData } from '../types.js'; // eslint-disable-next-line @typescript-eslint/ban-types type OutputOptionsHook = Extract; @@ -57,15 +59,14 @@ export function makePageDataKey(route: string, componentPath: string) { /** * Prevents Rollup from triggering other plugins in the process by masking the extension (hence the virtual file). - * Inverse function of getRouteAndComponentFromVirtualModulePageName() below. + * Inverse function of getComponentFromVirtualModulePageName() below. * @param virtualModulePrefix The prefix used to create the virtual module * @param path Page component path - * @param route Route of the page */ -export function getVirtualModulePageName(virtualModulePrefix: string, path: string, route: string) { +export function getVirtualModulePageName(virtualModulePrefix: string, path: string) { const extension = extname(path); return ( - virtualModulePrefix + route + ASTRO_PAGE_KEY_SEPARATOR + + virtualModulePrefix + (extension.startsWith('.') ? path.slice(0, -extension.length) + extension.replace('.', ASTRO_PAGE_EXTENSION_POST_PATTERN) : path) @@ -73,29 +74,33 @@ export function getVirtualModulePageName(virtualModulePrefix: string, path: stri } /** - * From the VirtualModulePageName, get the original pageData key. - * Useful to retrieve the pageData from internals.pagesByKeys.get() + * From the VirtualModulePageName, and the internals, get all pageDatas that use this + * component as their entry point. * @param virtualModulePrefix The prefix used to create the virtual module * @param id Virtual module name */ -export function getPageKeyFromVirtualModulePageName(virtualModulePrefix: string, id: string) { - const [route, path] = getRouteAndComponentFromVirtualModulePageName(virtualModulePrefix, id); - return makePageDataKey(route, path); +export function getPagesFromVirtualModulePageName(internals: BuildInternals, virtualModulePrefix: string, id: string) { + const path = getComponentFromVirtualModulePageName(virtualModulePrefix, id); + + const pages: PageBuildData[] = []; + internals.pagesByKeys.forEach(pageData => { + if (pageData.component === path) { + pages.push(pageData); + } + }); + + return pages; } /** - * From the VirtualModulePageName, get the route and the component path. + * From the VirtualModulePageName, get the component path. + * Remember that the component can be use by multiple routes. * Inverse function of getVirtualModulePageName() above. * @param virtualModulePrefix The prefix at the beginning of the virtual module * @param id Virtual module name - * @returns [route, componentPath] as [string, string] */ -export function getRouteAndComponentFromVirtualModulePageName(virtualModulePrefix: string, id: string) { - const [route, path] = id - .slice(virtualModulePrefix.length) - .split(ASTRO_PAGE_KEY_SEPARATOR); - - return [route, path.replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.')]; +export function getComponentFromVirtualModulePageName(virtualModulePrefix: string, id: string) { + return id.slice(virtualModulePrefix.length).replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); } export function shouldInlineAsset( diff --git a/packages/astro/test/ssr-split-manifest.test.js b/packages/astro/test/ssr-split-manifest.test.js index 64494536b5d2..2b06979328e4 100644 --- a/packages/astro/test/ssr-split-manifest.test.js +++ b/packages/astro/test/ssr-split-manifest.test.js @@ -40,8 +40,7 @@ describe('astro:ssr-manifest, split', () => { it('should be able to render a specific entry point', async () => { const pagePath = 'src/pages/index.astro'; - const routePath = '/'; - const app = await fixture.loadEntryPoint(currentRoutes, pagePath, routePath); + const app = await fixture.loadEntryPoint(currentRoutes, pagePath); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); @@ -74,8 +73,7 @@ describe('astro:ssr-manifest, split', () => { it('should emit an entry point to request the pre-rendered page', async () => { const pagePath = 'src/pages/prerender.astro'; - const routePath = '/prerender'; - const app = await fixture.loadEntryPoint(currentRoutes, pagePath, routePath); + const app = await fixture.loadEntryPoint(currentRoutes, pagePath); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); @@ -109,8 +107,7 @@ describe('astro:ssr-manifest, split', () => { }); it('should correctly build, and not create a "uses" entry point', async () => { const pagePath = 'src/pages/index.astro'; - const routePath = '/'; - const app = await fixture.loadEntryPoint(currentRoutes, pagePath, routePath); + const app = await fixture.loadEntryPoint(currentRoutes, pagePath); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index 3b0f08f95384..ba9c2d4d880c 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -220,8 +220,8 @@ export async function loadFixture(inlineConfig) { app.manifest = manifest; return app; }, - loadEntryPoint: async (routes, pagePath, routePath, streaming) => { - const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath, routePath); + loadEntryPoint: async (routes, pagePath, streaming) => { + const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath); const filePath = makeSplitEntryPointFileName(virtualModule, routes); const url = new URL(`./server/${filePath}?id=${fixtureId}`, config.outDir); const { createApp, manifest } = await import(url); From c84d72c3eb66450a0570c8fbedb875b286142fd9 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 14:55:54 +0200 Subject: [PATCH 27/41] fix: concat & array.from --- packages/astro/src/core/build/internal.ts | 2 +- packages/astro/src/core/build/pipeline.ts | 5 ++--- packages/astro/src/core/build/plugins/plugin-css.ts | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index 952ea2c34335..23ac90f392ab 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -242,7 +242,7 @@ export function getPagesDatasByComponent( component: string ): PageBuildData[] { const pageDatas: PageBuildData[] = []; - Array.from(internals.pagesByKeys.values()).forEach((pageData) => { + internals.pagesByKeys.forEach((pageData) => { if (component === pageData.component) pageDatas.push(pageData); }) return pageDatas; diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index f94d969bcef7..e6313811a642 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -171,7 +171,6 @@ export class BuildPipeline extends Pipeline { /** * It collects the routes to generate during the build. - * * It returns a map of page information and their relative entry point as a string. */ retrieveRoutesToGenerate(): Map { @@ -187,14 +186,14 @@ export class BuildPipeline extends Pipeline { ) { let pageDatas: PageBuildData[] = []; if (virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID)) { - pageDatas.concat(getPagesFromVirtualModulePageName( + pageDatas.push(...getPagesFromVirtualModulePageName( this.internals, ASTRO_PAGE_RESOLVED_MODULE_ID, virtualModulePageName )); } if (virtualModulePageName.includes(RESOLVED_SPLIT_MODULE_ID)) { - pageDatas.concat(getPagesFromVirtualModulePageName( + pageDatas.push(...getPagesFromVirtualModulePageName( this.internals, RESOLVED_SPLIT_MODULE_ID, virtualModulePageName diff --git a/packages/astro/src/core/build/plugins/plugin-css.ts b/packages/astro/src/core/build/plugins/plugin-css.ts index 3e35a9bb0987..db043a6b74b6 100644 --- a/packages/astro/src/core/build/plugins/plugin-css.ts +++ b/packages/astro/src/core/build/plugins/plugin-css.ts @@ -249,10 +249,9 @@ function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] { ? { type: 'inline', content: stylesheet.source } : { type: 'external', src: stylesheet.fileName }; - const pages = Array.from(internals.pagesByKeys.values()); let sheetAddedToPage = false; - pages.forEach((pageData) => { + internals.pagesByKeys.forEach((pageData) => { const orderingInfo = pagesToCss[pageData.moduleSpecifier]?.[stylesheet.fileName]; if (orderingInfo !== undefined) { pageData.styles.push({ ...orderingInfo, sheet }); From 2168f47c4d01620d1de69f9c00ceeb439bc472bc Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 15:19:09 +0200 Subject: [PATCH 28/41] update changeset --- .changeset/great-turtles-greet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/great-turtles-greet.md b/.changeset/great-turtles-greet.md index c688e0660f64..30600a44ad8d 100644 --- a/.changeset/great-turtles-greet.md +++ b/.changeset/great-turtles-greet.md @@ -2,4 +2,4 @@ "astro": minor --- -Rework how component keys are done +Multiples pages can now have the same component as entrypoint. This is purely internal, this aligns the build process with the behaviour in development server, no public API changes. \ No newline at end of file From 984f6bf3af649663310502668944585553e0fa4d Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 15:35:56 +0200 Subject: [PATCH 29/41] clean unnecessary change --- packages/astro/test/ssr-split-manifest.test.js | 6 +++--- packages/astro/test/test-utils.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/astro/test/ssr-split-manifest.test.js b/packages/astro/test/ssr-split-manifest.test.js index 2b06979328e4..2f66b367616f 100644 --- a/packages/astro/test/ssr-split-manifest.test.js +++ b/packages/astro/test/ssr-split-manifest.test.js @@ -40,7 +40,7 @@ describe('astro:ssr-manifest, split', () => { it('should be able to render a specific entry point', async () => { const pagePath = 'src/pages/index.astro'; - const app = await fixture.loadEntryPoint(currentRoutes, pagePath); + const app = await fixture.loadEntryPoint(pagePath, currentRoutes); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); @@ -73,7 +73,7 @@ describe('astro:ssr-manifest, split', () => { it('should emit an entry point to request the pre-rendered page', async () => { const pagePath = 'src/pages/prerender.astro'; - const app = await fixture.loadEntryPoint(currentRoutes, pagePath); + const app = await fixture.loadEntryPoint(pagePath, currentRoutes); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); @@ -107,7 +107,7 @@ describe('astro:ssr-manifest, split', () => { }); it('should correctly build, and not create a "uses" entry point', async () => { const pagePath = 'src/pages/index.astro'; - const app = await fixture.loadEntryPoint(currentRoutes, pagePath); + const app = await fixture.loadEntryPoint(pagePath, currentRoutes); const request = new Request('http://example.com/'); const response = await app.render(request); const html = await response.text(); diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index ba9c2d4d880c..7d5b89c35100 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -220,7 +220,7 @@ export async function loadFixture(inlineConfig) { app.manifest = manifest; return app; }, - loadEntryPoint: async (routes, pagePath, streaming) => { + loadEntryPoint: async (pagePath, routes, streaming) => { const virtualModule = getVirtualModulePageName(RESOLVED_SPLIT_MODULE_ID, pagePath); const filePath = makeSplitEntryPointFileName(virtualModule, routes); const url = new URL(`./server/${filePath}?id=${fixtureId}`, config.outDir); From ced6e0f92406325d9907b8214c9d6873c55745dc Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 17:15:22 +0200 Subject: [PATCH 30/41] remove unnecessary pageInfo --- packages/astro/src/core/build/generate.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 64657452b178..4340d403cb71 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -256,9 +256,7 @@ async function generatePage( // prepare information we need const { config, internals, logger } = pipeline; const pageModulePromise = ssrEntry.page; - // TODO: Why do we need to get PageData from PageData? - const pageInfo = getPageData(internals, pageData.route.component, pageData.route.route); - + // Calculate information of the page, like scripts, links and styles const styles = pageData.styles .sort(cssOrder) @@ -266,7 +264,7 @@ async function generatePage( .reduce(mergeInlineCss, []); // may be used in the future for handling rel=modulepreload, rel=icon, rel=manifest etc. const linkIds: [] = []; - const scripts = pageInfo?.hoistedScript ?? null; + const scripts = pageData.hoistedScript ?? null; if (!pageModulePromise) { throw new Error( `Unable to find the module for ${pageData.component}. This is unexpected and likely a bug in Astro, please report.` From dfdfa7bc30bbd890ee37dec55031a92f66258875 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 17:23:33 +0200 Subject: [PATCH 31/41] add return types to utils functions --- packages/astro/src/core/build/plugins/util.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index 1a96e29858d0..c1552599d90e 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -53,7 +53,7 @@ export const ASTRO_PAGE_KEY_SEPARATOR = '&'; * @param route Usually pageData.route.route * @param componentPath Usually pageData.component */ -export function makePageDataKey(route: string, componentPath: string) { +export function makePageDataKey(route: string, componentPath: string): string { return route + ASTRO_PAGE_KEY_SEPARATOR + componentPath; } @@ -63,7 +63,7 @@ export function makePageDataKey(route: string, componentPath: string) { * @param virtualModulePrefix The prefix used to create the virtual module * @param path Page component path */ -export function getVirtualModulePageName(virtualModulePrefix: string, path: string) { +export function getVirtualModulePageName(virtualModulePrefix: string, path: string): string { const extension = extname(path); return ( virtualModulePrefix + @@ -79,7 +79,8 @@ export function getVirtualModulePageName(virtualModulePrefix: string, path: stri * @param virtualModulePrefix The prefix used to create the virtual module * @param id Virtual module name */ -export function getPagesFromVirtualModulePageName(internals: BuildInternals, virtualModulePrefix: string, id: string) { +export function getPagesFromVirtualModulePageName(internals: BuildInternals, virtualModulePrefix: string, id: string): PageBuildData[] +{ const path = getComponentFromVirtualModulePageName(virtualModulePrefix, id); const pages: PageBuildData[] = []; @@ -99,7 +100,7 @@ export function getPagesFromVirtualModulePageName(internals: BuildInternals, vir * @param virtualModulePrefix The prefix at the beginning of the virtual module * @param id Virtual module name */ -export function getComponentFromVirtualModulePageName(virtualModulePrefix: string, id: string) { +export function getComponentFromVirtualModulePageName(virtualModulePrefix: string, id: string): string { return id.slice(virtualModulePrefix.length).replace(ASTRO_PAGE_EXTENSION_POST_PATTERN, '.'); } From cbf727edb3d60cee459781465694a72fa85fed1c Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Tue, 30 Apr 2024 15:53:06 +0200 Subject: [PATCH 32/41] revert a comment deletion --- packages/astro/src/core/build/plugins/plugin-ssr.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index a9cd52570752..ea8450a4d0e6 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -175,6 +175,7 @@ function vitePluginSSRSplit( const virtualModuleName = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, componentPath); let module = await this.resolve(virtualModuleName); if (module) { + // we need to use the non-resolved ID in order to resolve correctly the virtual module imports.push(`import * as pageModule from "${virtualModuleName}";`); } const middleware = await this.resolve(MIDDLEWARE_MODULE_ID); From 37ca1ae8ecf22dc794d48a7304f3ebbf2c90f330 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Tue, 30 Apr 2024 15:58:51 +0200 Subject: [PATCH 33/41] fix cleanStaticOutput --- packages/astro/src/core/build/static-build.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index a60f7e5a2ea0..0564b1b6d68b 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -362,6 +362,7 @@ async function runPostBuildHooks( /** * For each statically prerendered page, replace their SSR file with a noop. * This allows us to run the SSR build only once, but still remove dependencies for statically rendered routes. + * If a component is shared between a statically rendered route and a SSR route, it will still be included in the SSR build. */ async function cleanStaticOutput( opts: StaticBuildOptions, @@ -369,14 +370,16 @@ async function cleanStaticOutput( ssrOutputChunkNames: string[] ) { const allStaticFiles = new Set(); + const allSSRFiles = new Set(); for (const pageData of internals.pagesByKeys.values()) { const { moduleSpecifier } = pageData; const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); - if (pageData.route.prerender && !pageData.hasSharedModules && allStaticFiles.has(pageBundleId ?? entryBundleId)) { + if (pageData.route.prerender && !pageData.hasSharedModules && !allSSRFiles.has(pageBundleId ?? entryBundleId)) { allStaticFiles.add(pageBundleId ?? entryBundleId); } else { - // Check if the page pageBundleId or entryBundleId is already in the set, if so, remove it + allSSRFiles.add(pageBundleId ?? entryBundleId); + // Check if the component was not previously added to the static build by a statically rendered route if (allStaticFiles.has(pageBundleId ?? entryBundleId)) { allStaticFiles.delete(pageBundleId ?? entryBundleId); } From 846dd6f7ec4fcfd0255e7616afd6c666c39f12d0 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Thu, 2 May 2024 15:03:02 +0200 Subject: [PATCH 34/41] changes from ematipico review --- packages/astro/src/core/build/internal.ts | 3 +++ packages/astro/src/core/build/static-build.ts | 19 +++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index 23ac90f392ab..593f3fcf19e0 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -253,7 +253,10 @@ export function getPagesDatasByComponent( * Should be removed in the future (in Astro 5 ?). * Parse internals.pagesByKeys to get the page data with the public key. * If the page component is unique -> the public key is the component. + * This match the old behavior of the Integrations API, where pages were identified by the component. * If the page component is shared -> the public key is the internal key. + * This should be the new behavior, since we identify pages by their internal key now. + * Until then, this is not a breaking change, because a shared entrypoint was not supported before. * @param pagesByKeys A map of all page data by their internal key */ export function getPageDatasWithPublicKey(pagesByKeys: Map): Map { diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 0564b1b6d68b..fa4d4a929691 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -369,19 +369,18 @@ async function cleanStaticOutput( internals: BuildInternals, ssrOutputChunkNames: string[] ) { - const allStaticFiles = new Set(); - const allSSRFiles = new Set(); + const prerenderedFiles = new Set(); + const onDemandsFiles = new Set(); for (const pageData of internals.pagesByKeys.values()) { const { moduleSpecifier } = pageData; - const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); - const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); - if (pageData.route.prerender && !pageData.hasSharedModules && !allSSRFiles.has(pageBundleId ?? entryBundleId)) { - allStaticFiles.add(pageBundleId ?? entryBundleId); + const bundleId = internals.pageToBundleMap.get(moduleSpecifier) ?? internals.entrySpecifierToBundleMap.get(moduleSpecifier); + if (pageData.route.prerender && !pageData.hasSharedModules && !onDemandsFiles.has(bundleId)) { + prerenderedFiles.add(bundleId); } else { - allSSRFiles.add(pageBundleId ?? entryBundleId); + onDemandsFiles.add(bundleId); // Check if the component was not previously added to the static build by a statically rendered route - if (allStaticFiles.has(pageBundleId ?? entryBundleId)) { - allStaticFiles.delete(pageBundleId ?? entryBundleId); + if (prerenderedFiles.has(bundleId)) { + prerenderedFiles.delete(bundleId); } } } @@ -400,7 +399,7 @@ async function cleanStaticOutput( // These chunks should only contain prerendering logic, so they are safe to modify. await Promise.all( files.map(async (filename) => { - if (!allStaticFiles.has(filename)) { + if (!prerenderedFiles.has(filename)) { return; } const url = new URL(filename, out); From 2c350d5f70e8305fb4b4d10e82cfbe890bcb800a Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Fri, 3 May 2024 18:38:50 +0200 Subject: [PATCH 35/41] moving a todo outside jsdoc (cc @ematipico ) --- packages/astro/src/core/build/internal.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index 593f3fcf19e0..e2f4a2d03230 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -248,15 +248,14 @@ export function getPagesDatasByComponent( return pageDatas; } +// TODO: Should be removed in the future. (Astro 5?) /** - * TODO: This function is used to avoid breaking changes in the Integrations API. - * Should be removed in the future (in Astro 5 ?). - * Parse internals.pagesByKeys to get the page data with the public key. - * If the page component is unique -> the public key is the component. - * This match the old behavior of the Integrations API, where pages were identified by the component. - * If the page component is shared -> the public key is the internal key. - * This should be the new behavior, since we identify pages by their internal key now. - * Until then, this is not a breaking change, because a shared entrypoint was not supported before. + * Map internals.pagesByKeys to a new map with the public key instead of the internal key. + * This function is only used to avoid breaking changes in the Integrations API, after we changed the way + * we identify pages, from the entrypoint component to an internal key. + * If the page component is unique -> the public key is the component path. (old behavior) + * If the page component is shared -> the public key is the internal key. (new behavior) + * The new behavior on shared entrypoint it's not a breaking change, because it was not supported before. * @param pagesByKeys A map of all page data by their internal key */ export function getPageDatasWithPublicKey(pagesByKeys: Map): Map { @@ -267,8 +266,7 @@ export function getPageDatasWithPublicKey(pagesByKeys: Map { return pagesByComponentsArray.filter((p) => p.component === page.component).length === 1; }); @@ -277,8 +275,7 @@ export function getPageDatasWithPublicKey(pagesByKeys: Map { return pagesByComponentsArray.filter((p) => p.component === page.component).length > 1; }); From b424796bef168db80708af1c1715be867cbfaa0a Mon Sep 17 00:00:00 2001 From: Goulven CLEC'H Date: Sun, 5 May 2024 18:54:49 +0200 Subject: [PATCH 36/41] Update .changeset/great-turtles-greet.md Co-authored-by: Sarah Rainsberger --- .changeset/great-turtles-greet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/great-turtles-greet.md b/.changeset/great-turtles-greet.md index 30600a44ad8d..5842dac3d590 100644 --- a/.changeset/great-turtles-greet.md +++ b/.changeset/great-turtles-greet.md @@ -2,4 +2,4 @@ "astro": minor --- -Multiples pages can now have the same component as entrypoint. This is purely internal, this aligns the build process with the behaviour in development server, no public API changes. \ No newline at end of file +Multiple pages can now use the same component as an `entrypoint`. This change is purely internal, and aligns the build process with the behaviour in the development server. \ No newline at end of file From 98d2364f9509a274737bab379f9aca082dcab785 Mon Sep 17 00:00:00 2001 From: Goulven CLEC'H Date: Sun, 5 May 2024 20:38:40 +0200 Subject: [PATCH 37/41] Update .changeset/great-turtles-greet.md Co-authored-by: Sarah Rainsberger --- .changeset/great-turtles-greet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/great-turtles-greet.md b/.changeset/great-turtles-greet.md index 5842dac3d590..7043e0e239d4 100644 --- a/.changeset/great-turtles-greet.md +++ b/.changeset/great-turtles-greet.md @@ -2,4 +2,4 @@ "astro": minor --- -Multiple pages can now use the same component as an `entrypoint`. This change is purely internal, and aligns the build process with the behaviour in the development server. \ No newline at end of file +Adds the ability for multiple pages to use the same component as an `entrypoint` when building an Astro integration. This change is purely internal, and aligns the build process with the behaviour in the development server. \ No newline at end of file From 7477dc28e3ff8c57d810c2641ba26c7a0e9b0771 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 8 May 2024 10:34:38 +0100 Subject: [PATCH 38/41] chore: fix merge conflicts --- packages/astro/src/core/build/pipeline.ts | 51 +- .../src/core/build/plugins/plugin-css.ts | 2 +- pnpm-lock.yaml | 1577 +++++++++++------ 3 files changed, 1046 insertions(+), 584 deletions(-) diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index adfcfa5ce415..036e62ec91ab 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -20,19 +20,9 @@ import { } from '../render/ssr-element.js'; import { isServerLikeOutput } from '../util.js'; import { getOutDirWithinCwd } from './common.js'; -import { - type BuildInternals, - cssOrder, - getEntryFilePathFromComponentPath, - getPageDataByComponent, - mergeInlineCss, -} from './internal.js'; +import { type BuildInternals, cssOrder, getPageData, mergeInlineCss } from './internal.js'; import { ASTRO_PAGE_MODULE_ID, ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js'; import { RESOLVED_SPLIT_MODULE_ID } from './plugins/plugin-ssr.js'; -import { - ASTRO_PAGE_EXTENSION_POST_PATTERN, - getVirtualModulePageNameFromPath, -} from './plugins/util.js'; import type { PageBuildData, SinglePageBuiltModule, StaticBuildOptions } from './types.js'; import { getPagesFromVirtualModulePageName, getVirtualModulePageName } from './plugins/util.js'; import { i18nHasFallback } from './util.js'; @@ -219,18 +209,22 @@ export class BuildPipeline extends Pipeline { ) { let pageDatas: PageBuildData[] = []; if (virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID)) { - pageDatas.push(...getPagesFromVirtualModulePageName( - this.internals, - ASTRO_PAGE_RESOLVED_MODULE_ID, - virtualModulePageName - )); + pageDatas.push( + ...getPagesFromVirtualModulePageName( + this.internals, + ASTRO_PAGE_RESOLVED_MODULE_ID, + virtualModulePageName + ) + ); } if (virtualModulePageName.includes(RESOLVED_SPLIT_MODULE_ID)) { - pageDatas.push(...getPagesFromVirtualModulePageName( - this.internals, - RESOLVED_SPLIT_MODULE_ID, - virtualModulePageName - )); + pageDatas.push( + ...getPagesFromVirtualModulePageName( + this.internals, + RESOLVED_SPLIT_MODULE_ID, + virtualModulePageName + ) + ); } for (const pageData of pageDatas) { pages.set(pageData, filePath); @@ -252,10 +246,7 @@ export class BuildPipeline extends Pipeline { // The values of the map are the actual `.mjs` files that are generated during the build // Here, we take the component path and transform it in the virtual module name - const moduleSpecifier = getVirtualModulePageName( - ASTRO_PAGE_MODULE_ID, - pageData.component - ); + const moduleSpecifier = getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component); // We retrieve the original JS module const filePath = this.internals.entrySpecifierToBundleMap.get(moduleSpecifier); if (filePath) { @@ -340,7 +331,10 @@ export class BuildPipeline extends Pipeline { throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - const filePath = getEntryFilePathFromComponentPath(internals, route.redirectRoute.component); + const filePath = getVirtualModulePageName( + ASTRO_PAGE_MODULE_ID, + route.redirectRoute.component + ); if (filePath) { const url = createEntryURL(filePath, outFolder); const ssrEntryPage: SinglePageBuiltModule = await import(url.toString()); @@ -360,7 +354,10 @@ export class BuildPipeline extends Pipeline { throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - const filePath = getEntryFilePathFromComponentPath(internals, route.redirectRoute.component); + const filePath = getVirtualModulePageName( + ASTRO_PAGE_MODULE_ID, + route.redirectRoute.component + ); if (filePath) { const url = createEntryURL(filePath, outFolder); const ssrEntryPage: SinglePageBuiltModule = await import(url.toString()); diff --git a/packages/astro/src/core/build/plugins/plugin-css.ts b/packages/astro/src/core/build/plugins/plugin-css.ts index 2d08b96ed756..c9961560219c 100644 --- a/packages/astro/src/core/build/plugins/plugin-css.ts +++ b/packages/astro/src/core/build/plugins/plugin-css.ts @@ -242,7 +242,7 @@ function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] { pageData.styles.push({ ...orderingInfo, sheet }); sheetAddedToPage = true; } - } + }) // Apply `moduleIdToPropagatedCss` information to `internals.propagatedStylesMap`. // NOTE: It's pretty much a copy over to `internals.propagatedStylesMap` as it should be diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48bbd96d6c84..d3bb10a16be2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,14 +40,14 @@ importers: specifier: ^0.20.2 version: 0.20.2 eslint: - specifier: ^9.1.0 - version: 9.1.0 + specifier: ^9.1.1 + version: 9.1.1 eslint-plugin-no-only-tests: specifier: ^3.1.0 version: 3.1.0 eslint-plugin-regexp: specifier: ^2.5.0 - version: 2.5.0(eslint@9.1.0) + version: 2.5.0(eslint@9.1.1) globby: specifier: ^14.0.1 version: 14.0.1 @@ -67,14 +67,14 @@ importers: specifier: ^0.2.9 version: 0.2.9 turbo: - specifier: ^1.13.2 - version: 1.13.2 + specifier: ^1.13.3 + version: 1.13.3 typescript: specifier: ~5.4.5 version: 5.4.5 typescript-eslint: - specifier: ^7.7.0 - version: 7.7.0(eslint@9.1.0)(typescript@5.4.5) + specifier: ^7.8.0 + version: 7.8.0(eslint@9.1.1)(typescript@5.4.5) benchmark: dependencies: @@ -128,7 +128,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/blog: @@ -143,13 +143,13 @@ importers: specifier: ^3.1.4 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/framework-alpine: @@ -164,7 +164,7 @@ importers: specifier: ^3.13.3 version: 3.13.8 astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/framework-lit: @@ -176,7 +176,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro lit: specifier: ^3.1.2 @@ -188,7 +188,7 @@ importers: specifier: ^3.2.0 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^3.3.1 + specifier: ^3.3.2 version: link:../../packages/integrations/react '@astrojs/solid-js': specifier: ^4.1.0 @@ -206,7 +206,7 @@ importers: specifier: ^18.2.15 version: 18.2.25 astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -236,7 +236,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.20.2) astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -245,7 +245,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^3.3.1 + specifier: ^3.3.2 version: link:../../packages/integrations/react '@types/react': specifier: ^18.2.37 @@ -254,7 +254,7 @@ importers: specifier: ^18.2.15 version: 18.2.25 astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -269,7 +269,7 @@ importers: specifier: ^4.1.0 version: link:../../packages/integrations/solid astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -281,7 +281,7 @@ importers: specifier: ^5.4.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -293,7 +293,7 @@ importers: specifier: ^4.1.0 version: link:../../packages/integrations/vue astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro vue: specifier: ^3.3.8 @@ -305,13 +305,13 @@ importers: specifier: ^8.2.5 version: link:../../packages/integrations/node astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/middleware: @@ -320,7 +320,7 @@ importers: specifier: ^8.2.5 version: link:../../packages/integrations/node astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,19 +333,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/ssr: @@ -357,7 +357,7 @@ importers: specifier: ^5.4.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -366,7 +366,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -378,7 +378,7 @@ importers: examples/toolbar-app: devDependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/view-transitions: @@ -390,7 +390,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/with-markdoc: @@ -399,7 +399,7 @@ importers: specifier: ^0.11.0 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/with-markdown-plugins: @@ -408,7 +408,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/markdown/remark astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -429,7 +429,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro examples/with-mdx: @@ -441,7 +441,7 @@ importers: specifier: ^3.2.0 version: link:../../packages/integrations/preact astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -456,7 +456,7 @@ importers: specifier: ^0.5.0 version: 0.5.1(nanostores@0.9.5)(preact@10.20.2) astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -477,7 +477,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -495,7 +495,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.7.0 + specifier: ^4.7.1 version: link:../../packages/astro vitest: specifier: ^1.5.0 @@ -516,23 +516,23 @@ importers: specifier: workspace:* version: link:../telemetry '@babel/core': - specifier: ^7.24.4 - version: 7.24.4 + specifier: ^7.24.5 + version: 7.24.5 '@babel/generator': - specifier: ^7.24.4 - version: 7.24.4 + specifier: ^7.24.5 + version: 7.24.5 '@babel/parser': - specifier: ^7.24.4 - version: 7.24.4 + specifier: ^7.24.5 + version: 7.24.5 '@babel/plugin-transform-react-jsx': specifier: ^7.23.4 - version: 7.23.4(@babel/core@7.24.4) + version: 7.23.4(@babel/core@7.24.5) '@babel/traverse': - specifier: ^7.24.1 - version: 7.24.1 + specifier: ^7.24.5 + version: 7.24.5 '@babel/types': - specifier: ^7.24.0 - version: 7.24.0 + specifier: ^7.24.5 + version: 7.24.5 '@types/babel__core': specifier: ^7.20.5 version: 7.20.5 @@ -558,8 +558,8 @@ importers: specifier: ^4.0.0 version: 4.0.0 clsx: - specifier: ^2.1.0 - version: 2.1.0 + specifier: ^2.1.1 + version: 2.1.1 common-ancestor-path: specifier: ^1.0.1 version: 1.0.1 @@ -588,8 +588,8 @@ importers: specifier: ^3.1.3 version: 3.1.3 es-module-lexer: - specifier: ^1.5.0 - version: 1.5.0 + specifier: ^1.5.2 + version: 1.5.2 esbuild: specifier: ^0.20.2 version: 0.20.2 @@ -687,11 +687,11 @@ importers: specifier: ^21.1.1 version: 21.1.1 zod: - specifier: ^3.23.0 - version: 3.23.0 + specifier: ^3.23.5 + version: 3.23.5 zod-to-json-schema: - specifier: ^3.22.5 - version: 3.22.5(zod@3.23.0) + specifier: ^3.23.0 + version: 3.23.0(zod@3.23.5) optionalDependencies: sharp: specifier: ^0.33.3 @@ -775,9 +775,15 @@ importers: eol: specifier: ^0.9.1 version: 0.9.1 + mdast-util-mdx: + specifier: ^3.0.0 + version: 3.0.0 + mdast-util-mdx-jsx: + specifier: ^3.1.2 + version: 3.1.2 memfs: - specifier: ^4.8.2 - version: 4.8.2 + specifier: ^4.9.1 + version: 4.9.1 node-mocks-http: specifier: ^1.14.1 version: 1.14.1 @@ -797,8 +803,8 @@ importers: specifier: ^0.1.2 version: 0.1.2 rollup: - specifier: ^4.16.1 - version: 4.16.1 + specifier: ^4.17.1 + version: 4.17.1 sass: specifier: ^1.75.0 version: 1.75.0 @@ -874,8 +880,8 @@ importers: specifier: workspace:* version: link:../../.. vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) packages/astro/e2e/fixtures/client-only: dependencies: @@ -883,20 +889,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/preact': specifier: workspace:* @@ -941,11 +947,11 @@ importers: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) packages/astro/e2e/fixtures/dev-toolbar: dependencies: @@ -1004,23 +1010,23 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) sass: specifier: ^1.75.0 version: 1.75.0 solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) packages/astro/e2e/fixtures/hmr: devDependencies: @@ -1076,20 +1082,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/lit': specifier: workspace:* @@ -1135,20 +1141,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/preact': specifier: workspace:* @@ -1175,20 +1181,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/preact': specifier: workspace:* @@ -1215,20 +1221,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/preact': specifier: workspace:* @@ -1255,20 +1261,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/preact': specifier: workspace:* @@ -1295,20 +1301,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/preact': specifier: workspace:* @@ -1335,20 +1341,20 @@ importers: specifier: ^10.20.2 version: 10.20.2 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) devDependencies: '@astrojs/preact': specifier: workspace:* @@ -1378,11 +1384,11 @@ importers: packages/astro/e2e/fixtures/pass-js: dependencies: react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) devDependencies: '@astrojs/react': specifier: workspace:* @@ -1451,11 +1457,11 @@ importers: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) packages/astro/e2e/fixtures/solid-circular: dependencies: @@ -1467,8 +1473,8 @@ importers: version: link:../../.. devDependencies: solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 packages/astro/e2e/fixtures/solid-component: dependencies: @@ -1482,8 +1488,8 @@ importers: specifier: workspace:* version: link:../../.. solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 packages/astro/e2e/fixtures/solid-recurse: dependencies: @@ -1495,8 +1501,8 @@ importers: version: link:../../.. devDependencies: solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 packages/astro/e2e/fixtures/svelte-component: dependencies: @@ -1540,11 +1546,11 @@ importers: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) packages/astro/e2e/fixtures/view-transitions: dependencies: @@ -1564,17 +1570,17 @@ importers: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) svelte: specifier: ^4.2.15 version: 4.2.15 vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) packages/astro/e2e/fixtures/vue-component: dependencies: @@ -1588,8 +1594,8 @@ importers: specifier: workspace:* version: link:../../.. vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) packages/astro/performance: devDependencies: @@ -1612,20 +1618,20 @@ importers: specifier: workspace:* version: link:../utils '@types/react': - specifier: ^18.2.79 - version: 18.2.79 + specifier: ^18.3.1 + version: 18.3.1 '@types/react-dom': - specifier: ^18.2.25 - version: 18.2.25 + specifier: ^18.3.0 + version: 18.3.0 astro: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) packages/astro/performance/fixtures/mdoc: dependencies: @@ -1639,20 +1645,20 @@ importers: specifier: workspace:* version: link:../utils '@types/react': - specifier: ^18.2.79 - version: 18.2.79 + specifier: ^18.3.1 + version: 18.3.1 '@types/react-dom': - specifier: ^18.2.25 - version: 18.2.25 + specifier: ^18.3.0 + version: 18.3.0 astro: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) packages/astro/performance/fixtures/mdx: dependencies: @@ -1666,20 +1672,20 @@ importers: specifier: workspace:* version: link:../utils '@types/react': - specifier: ^18.2.79 - version: 18.2.79 + specifier: ^18.3.1 + version: 18.3.1 '@types/react-dom': - specifier: ^18.2.25 - version: 18.2.25 + specifier: ^18.3.0 + version: 18.3.0 astro: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) packages/astro/performance/fixtures/utils: devDependencies: @@ -1687,11 +1693,11 @@ importers: specifier: workspace:* version: link:../../.. react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) packages/astro/test/fixtures/0-css: dependencies: @@ -2606,6 +2612,18 @@ importers: specifier: workspace:* version: link:../../.. + packages/astro/test/fixtures/css-inline-stylesheets-2: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + + packages/astro/test/fixtures/css-inline-stylesheets-3: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + packages/astro/test/fixtures/css-no-code-split: dependencies: astro: @@ -3108,6 +3126,12 @@ importers: specifier: workspace:* version: link:../../.. + packages/astro/test/fixtures/middleware-virtual: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + packages/astro/test/fixtures/minification-html: dependencies: astro: @@ -3306,6 +3330,12 @@ importers: specifier: workspace:* version: link:../../.. + packages/astro/test/fixtures/reroute: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + packages/astro/test/fixtures/reuse-injected-entrypoint: dependencies: astro: @@ -3880,6 +3910,9 @@ importers: async-listen: specifier: ^3.0.1 version: 3.0.1 + ci-info: + specifier: ^4.0.0 + version: 4.0.0 deep-diff: specifier: ^1.0.2 version: 1.0.2 @@ -3911,8 +3944,8 @@ importers: specifier: ^21.1.1 version: 21.1.1 zod: - specifier: ^3.23.0 - version: 3.23.0 + specifier: ^3.23.5 + version: 3.23.5 devDependencies: '@types/chai': specifier: ^4.3.14 @@ -4209,8 +4242,8 @@ importers: specifier: ^4.1.5 version: 4.1.5 zod: - specifier: ^3.23.0 - version: 3.23.0 + specifier: ^3.23.5 + version: 3.23.5 devDependencies: '@types/html-escaper': specifier: ^3.0.2 @@ -4378,8 +4411,8 @@ importers: specifier: ^8.11.3 version: 8.11.3 es-module-lexer: - specifier: ^1.5.0 - version: 1.5.0 + specifier: ^1.5.2 + version: 1.5.2 estree-util-visit: specifier: ^2.0.0 version: 2.0.0 @@ -4402,8 +4435,8 @@ importers: specifier: ^4.0.0 version: 4.0.0 remark-smartypants: - specifier: ^3.0.0 - version: 3.0.0 + specifier: ^3.0.1 + version: 3.0.1 source-map: specifier: ^0.7.4 version: 0.7.4 @@ -4417,6 +4450,9 @@ importers: '@types/estree': specifier: ^1.0.5 version: 1.0.5 + '@types/hast': + specifier: ^3.0.3 + version: 3.0.4 '@types/mdast': specifier: ^4.0.3 version: 4.0.3 @@ -4438,6 +4474,9 @@ importers: mdast-util-mdx: specifier: ^3.0.0 version: 3.0.0 + mdast-util-mdx-jsx: + specifier: ^3.1.2 + version: 3.1.2 mdast-util-to-string: specifier: ^4.0.0 version: 4.0.0 @@ -4772,8 +4811,8 @@ importers: packages/integrations/partytown: dependencies: '@builder.io/partytown': - specifier: ^0.10.1 - version: 0.10.1 + specifier: ^0.10.2 + version: 0.10.2 mrmime: specifier: ^2.0.0 version: 2.0.0 @@ -4789,7 +4828,7 @@ importers: dependencies: '@babel/plugin-transform-react-jsx': specifier: ^7.23.4 - version: 7.23.4(@babel/core@7.24.4) + version: 7.23.4(@babel/core@7.24.5) '@babel/plugin-transform-react-jsx-development': specifier: ^7.22.5 version: 7.22.5 @@ -4829,11 +4868,11 @@ importers: version: 1.5.3 devDependencies: '@types/react': - specifier: ^18.2.79 - version: 18.2.79 + specifier: ^18.3.1 + version: 18.3.1 '@types/react-dom': - specifier: ^18.2.25 - version: 18.2.25 + specifier: ^18.3.0 + version: 18.3.0 astro: specifier: workspace:* version: link:../../astro @@ -4844,11 +4883,11 @@ importers: specifier: 1.0.0-rc.12 version: 1.0.0-rc.12 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) vite: specifier: ^5.2.10 version: 5.2.10(@types/node@18.19.31)(sass@1.75.0) @@ -4883,8 +4922,8 @@ importers: specifier: ^2.0.0 version: 2.0.0 zod: - specifier: ^3.23.0 - version: 3.23.0 + specifier: ^3.23.5 + version: 3.23.5 devDependencies: '@astrojs/node': specifier: workspace:* @@ -4939,7 +4978,7 @@ importers: dependencies: vite-plugin-solid: specifier: ^2.10.2 - version: 2.10.2(solid-js@1.8.16) + version: 2.10.2(solid-js@1.8.17) devDependencies: astro: specifier: workspace:* @@ -4948,8 +4987,8 @@ importers: specifier: workspace:* version: link:../../../scripts solid-js: - specifier: ^1.8.16 - version: 1.8.16 + specifier: ^1.8.17 + version: 1.8.17 packages/integrations/svelte: dependencies: @@ -4957,8 +4996,8 @@ importers: specifier: ^3.1.0 version: 3.1.0(svelte@4.2.15)(vite@5.2.10) svelte2tsx: - specifier: ^0.7.6 - version: 0.7.6(svelte@4.2.15)(typescript@5.4.5) + specifier: ^0.7.7 + version: 0.7.7(svelte@4.2.15)(typescript@5.4.5) devDependencies: astro: specifier: workspace:* @@ -5231,13 +5270,16 @@ importers: dependencies: '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.10)(vue@3.4.23) + version: 5.0.4(vite@5.2.10)(vue@3.4.26) '@vitejs/plugin-vue-jsx': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.10)(vue@3.4.23) + version: 3.1.0(vite@5.2.10)(vue@3.4.26) '@vue/compiler-sfc': - specifier: ^3.4.23 - version: 3.4.23 + specifier: ^3.4.26 + version: 3.4.26 + vite-plugin-vue-devtools: + specifier: ^7.1.3 + version: 7.1.3(vite@5.2.10)(vue@3.4.26) devDependencies: astro: specifier: workspace:* @@ -5255,8 +5297,8 @@ importers: specifier: ^5.2.10 version: 5.2.10(@types/node@18.19.31)(sass@1.75.0) vue: - specifier: ^3.4.23 - version: 3.4.23(typescript@5.4.5) + specifier: ^3.4.26 + version: 3.4.26(typescript@5.4.5) packages/integrations/vue/test/fixtures/app-entrypoint: dependencies: @@ -5330,6 +5372,40 @@ importers: specifier: workspace:* version: link:../../../../../astro + packages/integrations/web-vitals: + dependencies: + web-vitals: + specifier: ^3.5.2 + version: 3.5.2 + devDependencies: + '@astrojs/db': + specifier: workspace:* + version: link:../../db + astro: + specifier: workspace:* + version: link:../../astro + astro-scripts: + specifier: workspace:* + version: link:../../../scripts + linkedom: + specifier: ^0.16.11 + version: 0.16.11 + + packages/integrations/web-vitals/test/fixtures/basics: + dependencies: + '@astrojs/db': + specifier: workspace:* + version: link:../../../../../db + '@astrojs/node': + specifier: workspace:* + version: link:../../../../node + '@astrojs/web-vitals': + specifier: workspace:* + version: link:../../.. + astro: + specifier: workspace:* + version: link:../../../../../astro + packages/internal-helpers: devDependencies: astro-scripts: @@ -5351,8 +5427,8 @@ importers: specifier: ^4.0.2 version: 4.0.2 import-meta-resolve: - specifier: ^4.0.0 - version: 4.0.0 + specifier: ^4.1.0 + version: 4.1.0 mdast-util-definitions: specifier: ^6.0.0 version: 6.0.0 @@ -5372,8 +5448,8 @@ importers: specifier: ^11.1.0 version: 11.1.0 remark-smartypants: - specifier: ^3.0.0 - version: 3.0.0 + specifier: ^3.0.1 + version: 3.0.1 shiki: specifier: ^1.3.0 version: 1.3.0 @@ -5553,6 +5629,10 @@ packages: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + /@antfu/utils@0.7.8: + resolution: {integrity: sha512-rWQkqXRESdjXtc+7NRfK9lASQjpXJu1ayp7qi1d23zZorY+wBHVLHHoVcMsEnkqEBWTFqbztO7/QdJFzyEcLTg==} + dev: false + /@asamuzakjp/dom-selector@2.0.2: resolution: {integrity: sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==} dependencies: @@ -5688,20 +5768,20 @@ packages: engines: {node: '>=6.9.0'} dev: false - /@babel/core@7.24.4: - resolution: {integrity: sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==} + /@babel/core@7.24.5: + resolution: {integrity: sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.4 + '@babel/generator': 7.24.5 '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) - '@babel/helpers': 7.24.4 - '@babel/parser': 7.24.4 + '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) + '@babel/helpers': 7.24.5 + '@babel/parser': 7.24.5 '@babel/template': 7.24.0 - '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 + '@babel/traverse': 7.24.5 + '@babel/types': 7.24.5 convert-source-map: 2.0.0 debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 @@ -5711,11 +5791,11 @@ packages: - supports-color dev: false - /@babel/generator@7.24.4: - resolution: {integrity: sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==} + /@babel/generator@7.24.5: + resolution: {integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 @@ -5725,7 +5805,7 @@ packages: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-compilation-targets@7.23.6: @@ -5739,7 +5819,7 @@ packages: semver: 6.3.1 dev: false - /@babel/helper-create-class-features-plugin@7.24.4(@babel/core@7.24.4): + /@babel/helper-create-class-features-plugin@7.24.4(@babel/core@7.24.5): resolution: {integrity: sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ==} engines: {node: '>=6.9.0'} peerDependencies: @@ -5748,13 +5828,13 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-member-expression-to-functions': 7.23.0 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.4) + '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.5) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 @@ -5770,46 +5850,46 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.24.0 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-member-expression-to-functions@7.23.0: resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-module-imports@7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-module-imports@7.24.3: resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false - /@babel/helper-module-transforms@7.23.3(@babel/core@7.24.4): - resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} + /@babel/helper-module-transforms@7.24.5(@babel/core@7.24.5): + resolution: {integrity: sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -5817,19 +5897,19 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-module-imports': 7.24.3 - '@babel/helper-simple-access': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-simple-access': 7.24.5 + '@babel/helper-split-export-declaration': 7.24.5 + '@babel/helper-validator-identifier': 7.24.5 dev: false /@babel/helper-optimise-call-expression@7.22.5: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-plugin-utils@7.24.0: @@ -5837,7 +5917,7 @@ packages: engines: {node: '>=6.9.0'} dev: false - /@babel/helper-replace-supers@7.24.1(@babel/core@7.24.4): + /@babel/helper-replace-supers@7.24.1(@babel/core@7.24.5): resolution: {integrity: sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==} engines: {node: '>=6.9.0'} peerDependencies: @@ -5846,31 +5926,38 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-member-expression-to-functions': 7.23.0 '@babel/helper-optimise-call-expression': 7.22.5 dev: false - /@babel/helper-simple-access@7.22.5: - resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} + /@babel/helper-simple-access@7.24.5: + resolution: {integrity: sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 dev: false /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 + dev: false + + /@babel/helper-split-export-declaration@7.24.5: + resolution: {integrity: sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.24.5 dev: false /@babel/helper-string-parser@7.24.1: @@ -5881,18 +5968,22 @@ packages: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier@7.24.5: + resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} + engines: {node: '>=6.9.0'} + /@babel/helper-validator-option@7.23.5: resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} dev: false - /@babel/helpers@7.24.4: - resolution: {integrity: sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==} + /@babel/helpers@7.24.5: + resolution: {integrity: sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.24.0 - '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 + '@babel/traverse': 7.24.5 + '@babel/types': 7.24.5 transitivePeerDependencies: - supports-color dev: false @@ -5906,14 +5997,67 @@ packages: js-tokens: 4.0.0 picocolors: 1.0.0 - /@babel/parser@7.24.4: - resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} + /@babel/parser@7.24.5: + resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 + + /@babel/plugin-proposal-decorators@7.24.1(@babel/core@7.24.5): + resolution: {integrity: sha512-zPEvzFijn+hRvJuX2Vu3KbEBN39LN3f7tW3MQO2LsIs57B26KU+kUc82BdAktS1VCM6libzh45eKGI65lg0cpA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.24.5 + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.5) + '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-syntax-decorators': 7.24.1(@babel/core@7.24.5) + dev: false + + /@babel/plugin-syntax-decorators@7.24.1(@babel/core@7.24.5): + resolution: {integrity: sha512-05RJdO/cCrtVWuAaSn1tS3bH8jbsJa/Y1uD186u6J4C/1mnHFxseeuWpsqr9anvo7TUulev7tm7GDwRV+VuhDw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.24.5 + '@babel/helper-plugin-utils': 7.24.0 + dev: false - /@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.4): + /@babel/plugin-syntax-import-attributes@7.24.1(@babel/core@7.24.5): + resolution: {integrity: sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.24.5 + '@babel/helper-plugin-utils': 7.24.0 + dev: false + + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.5): + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.24.5 + '@babel/helper-plugin-utils': 7.24.0 + dev: false + + /@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.5): resolution: {integrity: sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==} engines: {node: '>=6.9.0'} peerDependencies: @@ -5922,11 +6066,11 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.0 dev: false - /@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.4): + /@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.5): resolution: {integrity: sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==} engines: {node: '>=6.9.0'} peerDependencies: @@ -5935,7 +6079,7 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.0 dev: false @@ -5948,10 +6092,10 @@ packages: '@babel/core': optional: true dependencies: - '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.4) + '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.5) dev: false - /@babel/plugin-transform-react-jsx-self@7.24.1(@babel/core@7.24.4): + /@babel/plugin-transform-react-jsx-self@7.24.1(@babel/core@7.24.5): resolution: {integrity: sha512-kDJgnPujTmAZ/9q2CN4m2/lRsUUPDvsG3+tSHWUJIzMGTt5U/b/fwWd3RO3n+5mjLrsBrVa5eKFRVSQbi3dF1w==} engines: {node: '>=6.9.0'} peerDependencies: @@ -5960,11 +6104,11 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.0 dev: false - /@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.4): + /@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.5): resolution: {integrity: sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==} engines: {node: '>=6.9.0'} peerDependencies: @@ -5973,11 +6117,11 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.0 dev: false - /@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.4): + /@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5): resolution: {integrity: sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==} engines: {node: '>=6.9.0'} peerDependencies: @@ -5986,15 +6130,15 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-module-imports': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.4) - '@babel/types': 7.24.0 + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) + '@babel/types': 7.24.5 dev: false - /@babel/plugin-transform-typescript@7.24.4(@babel/core@7.24.4): + /@babel/plugin-transform-typescript@7.24.4(@babel/core@7.24.5): resolution: {integrity: sha512-79t3CQ8+oBGk/80SQ8MN3Bs3obf83zJ0YZjDmDaEZN8MqhMI760apl5z6a20kFeMXBwJX99VpKT8CKxEBp5H1g==} engines: {node: '>=6.9.0'} peerDependencies: @@ -6003,11 +6147,11 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.4) + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.5) '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.5) dev: false /@babel/runtime@7.24.4: @@ -6022,34 +6166,34 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 dev: false - /@babel/traverse@7.24.1: - resolution: {integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==} + /@babel/traverse@7.24.5: + resolution: {integrity: sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.4 + '@babel/generator': 7.24.5 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/helper-split-export-declaration': 7.24.5 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color dev: false - /@babel/types@7.24.0: - resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} + /@babel/types@7.24.5: + resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 to-fast-properties: 2.0.0 /@biomejs/biome@1.7.1: @@ -6140,8 +6284,8 @@ packages: dev: true optional: true - /@builder.io/partytown@0.10.1: - resolution: {integrity: sha512-HTyW2do++3JUFKTLBjTGwhUu4MTwBDq0dBlWaQm7tLaQk237tnHNkBZmquDXkZ6CkSv8aHiIH40Wm2/nxkjQsQ==} + /@builder.io/partytown@0.10.2: + resolution: {integrity: sha512-A9U+4PREWcS+CCYzKGIPovtGB/PBgnH/8oQyCE6Nr9drDJk6cMPpLQIEajpGPmG9tYF7N3FkRvhXm/AS9+0iKg==} engines: {node: '>=18.0.0'} hasBin: true dev: false @@ -7002,13 +7146,13 @@ packages: requiresBuild: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@9.1.0): + /@eslint-community/eslint-utils@4.4.0(eslint@9.1.1): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 9.1.0 + eslint: 9.1.1 eslint-visitor-keys: 3.4.3 dev: true @@ -7314,6 +7458,46 @@ packages: resolution: {integrity: sha512-n5JEf16Wr4mdkRMZ8wMP/wN9/sHmTjRPbouXjJH371mZ2LEGDl72t8tEsMRNFerQN/QJtivOxqK1frdGa4QK5Q==} engines: {node: '>=10'} + /@jsonjoy.com/base64@1.1.2(tslib@2.6.2): + resolution: {integrity: sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + peerDependenciesMeta: + tslib: + optional: true + dependencies: + tslib: 2.6.2 + dev: true + + /@jsonjoy.com/json-pack@1.0.4(tslib@2.6.2): + resolution: {integrity: sha512-aOcSN4MeAtFROysrbqG137b7gaDDSmVrl5mpo6sT/w+kcXpWnzhMjmY/Fh/sDx26NBxyIE7MB1seqLeCAzy9Sg==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + peerDependenciesMeta: + tslib: + optional: true + dependencies: + '@jsonjoy.com/base64': 1.1.2(tslib@2.6.2) + '@jsonjoy.com/util': 1.1.3(tslib@2.6.2) + hyperdyperid: 1.2.0 + thingies: 1.21.0(tslib@2.6.2) + tslib: 2.6.2 + dev: true + + /@jsonjoy.com/util@1.1.3(tslib@2.6.2): + resolution: {integrity: sha512-g//kkF4kOwUjemValCtOc/xiYzmwMRmWq3Bn+YnzOzuZLHq2PpMOxxIayN3cKbo7Ko2Np65t6D9H81IvXbXhqg==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + peerDependenciesMeta: + tslib: + optional: true + dependencies: + tslib: 2.6.2 + dev: true + /@libsql/client@0.6.0: resolution: {integrity: sha512-qhQzTG/y2IEVbL3+9PULDvlQFWJ/RnjFXECr/Nc3nRngGiiMysDaOV5VUzYk7DulUX98EA4wi+z3FspKrUplUA==} dependencies: @@ -7697,6 +7881,10 @@ packages: playwright: 1.43.1 dev: true + /@polka/url@1.0.0-next.25: + resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} + dev: false + /@preact/preset-vite@2.8.2(preact@10.20.2): resolution: {integrity: sha512-m3tl+M8IO8jgiHnk+7LSTFl8axdPXloewi7iGVLdmCwf34XOzEUur0bZVewW4DUbUipFjTS2CXu27+5f/oexBA==} peerDependencies: @@ -7708,7 +7896,7 @@ packages: vite: optional: true dependencies: - '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.4) + '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.5) '@babel/plugin-transform-react-jsx-development': 7.22.5 '@prefresh/vite': 2.4.5(preact@10.20.2) '@rollup/pluginutils': 4.2.1 @@ -7772,7 +7960,7 @@ packages: vite: optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@prefresh/babel-plugin': 0.5.1 '@prefresh/core': 1.5.2(preact@10.20.2) '@prefresh/utils': 1.2.0 @@ -7790,113 +7978,127 @@ packages: picomatch: 2.3.1 dev: false - /@rollup/rollup-android-arm-eabi@4.16.1: - resolution: {integrity: sha512-92/y0TqNLRYOTXpm6Z7mnpvKAG9P7qmK7yJeRJSdzElNCUnsgbpAsGqerUboYRIQKzgfq4pWu9xVkgpWLfmNsw==} + /@rollup/pluginutils@5.1.0: + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: false + + /@rollup/rollup-android-arm-eabi@4.17.1: + resolution: {integrity: sha512-P6Wg856Ou/DLpR+O0ZLneNmrv7QpqBg+hK4wE05ijbC/t349BRfMfx+UFj5Ha3fCFopIa6iSZlpdaB4agkWp2Q==} cpu: [arm] os: [android] requiresBuild: true optional: true - /@rollup/rollup-android-arm64@4.16.1: - resolution: {integrity: sha512-ttWB6ZCfRLuDIUiE0yiu5gcqOsYjA5F7kEV1ggHMj20FwLZ8A1FMeahZJFl/pnOmcnD2QL0z4AcDuo27utGU8A==} + /@rollup/rollup-android-arm64@4.17.1: + resolution: {integrity: sha512-piwZDjuW2WiHr05djVdUkrG5JbjnGbtx8BXQchYCMfib/nhjzWoiScelZ+s5IJI7lecrwSxHCzW026MWBL+oJQ==} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@rollup/rollup-darwin-arm64@4.16.1: - resolution: {integrity: sha512-QLDvPLetbqjHojTGFw9+nuSP3YY/iz2k1cep6crYlr97sS+ZJ0W43b8Z0zC00+lnFZj6JSNxiA4DjboNQMuh1A==} + /@rollup/rollup-darwin-arm64@4.17.1: + resolution: {integrity: sha512-LsZXXIsN5Q460cKDT4Y+bzoPDhBmO5DTr7wP80d+2EnYlxSgkwdPfE3hbE+Fk8dtya+8092N9srjBTJ0di8RIA==} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-darwin-x64@4.16.1: - resolution: {integrity: sha512-TAUK/D8khRrRIa1KwRzo8JNKk3tcqaeXWdtsiLgA8zmACWwlWLjPCJ4DULGHQrMkeBjp1Cd3Yuwx04lZgFx5Vg==} + /@rollup/rollup-darwin-x64@4.17.1: + resolution: {integrity: sha512-S7TYNQpWXB9APkxu/SLmYHezWwCoZRA9QLgrDeml+SR2A1LLPD2DBUdUlvmCF7FUpRMKvbeeWky+iizQj65Etw==} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.16.1: - resolution: {integrity: sha512-KO+WGZjrh6zyFTD1alIFkfdtxf8B4BC+hqd3kBZHscPLvE5FR/6QKsyuCT0JlERxxYBSUKNUQ/UHyX5uwO1x2A==} + /@rollup/rollup-linux-arm-gnueabihf@4.17.1: + resolution: {integrity: sha512-Lq2JR5a5jsA5um2ZoLiXXEaOagnVyCpCW7xvlcqHC7y46tLwTEgUSTM3a2TfmmTMmdqv+jknUioWXlmxYxE9Yw==} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.16.1: - resolution: {integrity: sha512-NqxbllzIB1WoAo4ThUXVtd21iiM5IHMTTXmXySKBLVcZvkU0HIZmatlP7hLzb5yQubcmdIeWmncd2NdsjocEiw==} + /@rollup/rollup-linux-arm-musleabihf@4.17.1: + resolution: {integrity: sha512-9BfzwyPNV0IizQoR+5HTNBGkh1KXE8BqU0DBkqMngmyFW7BfuIZyMjQ0s6igJEiPSBvT3ZcnIFohZ19OqjhDPg==} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.16.1: - resolution: {integrity: sha512-snma5NvV8y7IECQ5rq0sr0f3UUu+92NVmG/913JXJMcXo84h9ak9TA5UI9Cl2XRM9j3m37QwDBtEYnJzRkSmxA==} + /@rollup/rollup-linux-arm64-gnu@4.17.1: + resolution: {integrity: sha512-e2uWaoxo/rtzA52OifrTSXTvJhAXb0XeRkz4CdHBK2KtxrFmuU/uNd544Ogkpu938BzEfvmWs8NZ8Axhw33FDw==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-musl@4.16.1: - resolution: {integrity: sha512-KOvqGprlD84ueivhCi2flvcUwDRD20mAsE3vxQNVEI2Di9tnPGAfEu6UcrSPZbM+jG2w1oSr43hrPo0RNg6GGg==} + /@rollup/rollup-linux-arm64-musl@4.17.1: + resolution: {integrity: sha512-ekggix/Bc/d/60H1Mi4YeYb/7dbal1kEDZ6sIFVAE8pUSx7PiWeEh+NWbL7bGu0X68BBIkgF3ibRJe1oFTksQQ==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.16.1: - resolution: {integrity: sha512-/gsNwtiGLqYwN4vP+EIdUC6Q6LTlpupWqokqIndvZcjn9ig/5P01WyaYCU2wvfL/2Z82jp5kX8c1mDBOvCP3zg==} + /@rollup/rollup-linux-powerpc64le-gnu@4.17.1: + resolution: {integrity: sha512-UGV0dUo/xCv4pkr/C8KY7XLFwBNnvladt8q+VmdKrw/3RUd3rD0TptwjisvE2TTnnlENtuY4/PZuoOYRiGp8Gw==} cpu: [ppc64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.16.1: - resolution: {integrity: sha512-uU8zuGkQfGqfD9w6VRJZI4IuG4JIfNxxJgEmLMAmPVHREKGsxFVfgHy5c6CexQF2vOfgjB33OsET3Vdn2lln9A==} + /@rollup/rollup-linux-riscv64-gnu@4.17.1: + resolution: {integrity: sha512-gEYmYYHaehdvX46mwXrU49vD6Euf1Bxhq9pPb82cbUU9UT2NV+RSckQ5tKWOnNXZixKsy8/cPGtiUWqzPuAcXQ==} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.16.1: - resolution: {integrity: sha512-lsjLtDgtcGFEuBP6yrXwkRN5/wKlvUZtfbKZZu0yaoNpiBL4epgnO21osAALIspVRnl4qZgyLFd8xjCYYWgwfw==} + /@rollup/rollup-linux-s390x-gnu@4.17.1: + resolution: {integrity: sha512-xeae5pMAxHFp6yX5vajInG2toST5lsCTrckSRUFwNgzYqnUjNBcQyqk1bXUxX5yhjWFl2Mnz3F8vQjl+2FRIcw==} cpu: [s390x] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-gnu@4.16.1: - resolution: {integrity: sha512-N2ZizKhUryqqrMfdCnjhJhZRgv61C6gK+hwVtCIKC8ts8J+go+vqENnGexwg21nHIOvLN5mBM8a7DI2vlyIOPg==} + /@rollup/rollup-linux-x64-gnu@4.17.1: + resolution: {integrity: sha512-AsdnINQoDWfKpBzCPqQWxSPdAWzSgnYbrJYtn6W0H2E9It5bZss99PiLA8CgmDRfvKygt20UpZ3xkhFlIfX9zQ==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-musl@4.16.1: - resolution: {integrity: sha512-5ICeMxqg66FrOA2AbnBQ2TJVxfvZsKLxmof0ibvPLaYtbsJqnTUtJOofgWb46Gjd4uZcA4rdsp4JCxegzQPqCg==} + /@rollup/rollup-linux-x64-musl@4.17.1: + resolution: {integrity: sha512-KoB4fyKXTR+wYENkIG3fFF+5G6N4GFvzYx8Jax8BR4vmddtuqSb5oQmYu2Uu067vT/Fod7gxeQYKupm8gAcMSQ==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.16.1: - resolution: {integrity: sha512-1vIP6Ce02L+qWD7uZYRiFiuAJo3m9kARatWmFSnss0gZnVj2Id7OPUU9gm49JPGasgcR3xMqiH3fqBJ8t00yVg==} + /@rollup/rollup-win32-arm64-msvc@4.17.1: + resolution: {integrity: sha512-J0d3NVNf7wBL9t4blCNat+d0PYqAx8wOoY+/9Q5cujnafbX7BmtYk3XvzkqLmFECaWvXGLuHmKj/wrILUinmQg==} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.16.1: - resolution: {integrity: sha512-Y3M92DcVsT6LoP+wrKpoUWPaazaP1fzbNkp0a0ZSj5Y//+pQVfVe/tQdsYQQy7dwXR30ZfALUIc9PCh9Izir6w==} + /@rollup/rollup-win32-ia32-msvc@4.17.1: + resolution: {integrity: sha512-xjgkWUwlq7IbgJSIxvl516FJ2iuC/7ttjsAxSPpC9kkI5iQQFHKyEN5BjbhvJ/IXIZ3yIBcW5QDlWAyrA+TFag==} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-x64-msvc@4.16.1: - resolution: {integrity: sha512-x0fvpHMuF7fK5r8oZxSi8VYXkrVmRgubXpO/wcf15Lk3xZ4Jvvh5oG+u7Su1776A7XzVKZhD2eRc4t7H50gL3w==} + /@rollup/rollup-win32-x64-msvc@4.17.1: + resolution: {integrity: sha512-0QbCkfk6cnnVKWqqlC0cUrrUMDMfu5ffvYMTUHf+qMN2uAb3MKP31LPcwiMXBNsvoFGs/kYdFOsuLmvppCopXA==} cpu: [x64] os: [win32] requiresBuild: true @@ -7995,8 +8197,8 @@ packages: /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.5 @@ -8005,19 +8207,19 @@ packages: /@types/babel__generator@7.6.8: resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 /@types/babel__template@7.4.4: resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 dev: false /@types/babel__traverse@7.20.5: resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 /@types/body-parser@1.19.5: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -8269,15 +8471,22 @@ packages: resolution: {integrity: sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==} dependencies: '@types/react': 18.2.78 + dev: false + + /@types/react-dom@18.3.0: + resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} + dependencies: + '@types/react': 18.3.1 /@types/react@18.2.78: resolution: {integrity: sha512-qOwdPnnitQY4xKlKayt42q5W5UQrSHjgoXNVEtxeqdITJ99k4VXJOP3vt8Rkm9HmgJpH50UNU+rlqfkfWOqp0A==} dependencies: '@types/prop-types': 15.7.12 csstype: 3.1.3 + dev: false - /@types/react@18.2.79: - resolution: {integrity: sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==} + /@types/react@18.3.1: + resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} dependencies: '@types/prop-types': 15.7.12 csstype: 3.1.3 @@ -8374,8 +8583,8 @@ packages: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} dev: true - /@typescript-eslint/eslint-plugin@7.7.0(@typescript-eslint/parser@7.7.0)(eslint@9.1.0)(typescript@5.4.5): - resolution: {integrity: sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==} + /@typescript-eslint/eslint-plugin@7.8.0(@typescript-eslint/parser@7.8.0)(eslint@9.1.1)(typescript@5.4.5): + resolution: {integrity: sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -8386,13 +8595,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.7.0(eslint@9.1.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.7.0 - '@typescript-eslint/type-utils': 7.7.0(eslint@9.1.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.0(eslint@9.1.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/parser': 7.8.0(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/type-utils': 7.8.0(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 9.1.0 + eslint: 9.1.1 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -8403,8 +8612,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.7.0(eslint@9.1.0)(typescript@5.4.5): - resolution: {integrity: sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==} + /@typescript-eslint/parser@7.8.0(eslint@9.1.1)(typescript@5.4.5): + resolution: {integrity: sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -8413,27 +8622,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.7.0 - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 9.1.0 + eslint: 9.1.1 typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@7.7.0: - resolution: {integrity: sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==} + /@typescript-eslint/scope-manager@7.8.0: + resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/visitor-keys': 7.8.0 dev: true - /@typescript-eslint/type-utils@7.7.0(eslint@9.1.0)(typescript@5.4.5): - resolution: {integrity: sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==} + /@typescript-eslint/type-utils@7.8.0(eslint@9.1.1)(typescript@5.4.5): + resolution: {integrity: sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -8442,23 +8651,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.0(eslint@9.1.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.1.1)(typescript@5.4.5) debug: 4.3.4(supports-color@8.1.1) - eslint: 9.1.0 + eslint: 9.1.1 ts-api-utils: 1.3.0(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@7.7.0: - resolution: {integrity: sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==} + /@typescript-eslint/types@7.8.0: + resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@7.7.0(typescript@5.4.5): - resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==} + /@typescript-eslint/typescript-estree@7.8.0(typescript@5.4.5): + resolution: {integrity: sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -8466,8 +8675,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 @@ -8479,30 +8688,30 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@7.7.0(eslint@9.1.0)(typescript@5.4.5): - resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==} + /@typescript-eslint/utils@7.8.0(eslint@9.1.1)(typescript@5.4.5): + resolution: {integrity: sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.7.0 - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) - eslint: 9.1.0 + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + eslint: 9.1.1 semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@7.7.0: - resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==} + /@typescript-eslint/visitor-keys@7.8.0: + resolution: {integrity: sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/types': 7.8.0 eslint-visitor-keys: 3.4.3 dev: true @@ -8584,9 +8793,9 @@ packages: vite: optional: true dependencies: - '@babel/core': 7.24.4 - '@babel/plugin-transform-react-jsx-self': 7.24.1(@babel/core@7.24.4) - '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.4) + '@babel/core': 7.24.5 + '@babel/plugin-transform-react-jsx-self': 7.24.1(@babel/core@7.24.5) + '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.5) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 vite: 5.2.10(@types/node@18.19.31)(sass@1.75.0) @@ -8594,7 +8803,7 @@ packages: - supports-color dev: false - /@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.10)(vue@3.4.23): + /@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.10)(vue@3.4.26): resolution: {integrity: sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -8604,16 +8813,16 @@ packages: vite: optional: true dependencies: - '@babel/core': 7.24.4 - '@babel/plugin-transform-typescript': 7.24.4(@babel/core@7.24.4) - '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.4) + '@babel/core': 7.24.5 + '@babel/plugin-transform-typescript': 7.24.4(@babel/core@7.24.5) + '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.5) vite: 5.2.10(@types/node@18.19.31)(sass@1.75.0) - vue: 3.4.23(typescript@5.4.5) + vue: 3.4.26(typescript@5.4.5) transitivePeerDependencies: - supports-color dev: false - /@vitejs/plugin-vue@5.0.4(vite@5.2.10)(vue@3.4.23): + /@vitejs/plugin-vue@5.0.4(vite@5.2.10)(vue@3.4.26): resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: @@ -8624,7 +8833,7 @@ packages: optional: true dependencies: vite: 5.2.10(@types/node@18.19.31)(sass@1.75.0) - vue: 3.4.23(typescript@5.4.5) + vue: 3.4.26(typescript@5.4.5) dev: false /@vitest/expect@1.5.0: @@ -8742,7 +8951,7 @@ packages: resolution: {integrity: sha512-nOttamHUR3YzdEqdM/XXDyCSdxMA9VizUKoroLX6yTyRtggzQMHXcmwh8a7ZErcJttIBIc9s68a1B8GZ+Dmvsw==} dev: false - /@vue/babel-plugin-jsx@1.2.2(@babel/core@7.24.4): + /@vue/babel-plugin-jsx@1.2.2(@babel/core@7.24.5): resolution: {integrity: sha512-nYTkZUVTu4nhP199UoORePsql0l+wj7v/oyQjtThUVhJl1U+6qHuoVhIvR3bf7eVKjbCK+Cs2AWd7mi9Mpz9rA==} peerDependencies: '@babel/core': ^7.0.0-0 @@ -8750,15 +8959,15 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) '@babel/template': 7.24.0 - '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 + '@babel/traverse': 7.24.5 + '@babel/types': 7.24.5 '@vue/babel-helper-vue-transform-on': 1.2.2 - '@vue/babel-plugin-resolve-type': 1.2.2(@babel/core@7.24.4) + '@vue/babel-plugin-resolve-type': 1.2.2(@babel/core@7.24.5) camelcase: 6.3.0 html-tags: 3.3.1 svg-tags: 1.0.0 @@ -8766,7 +8975,7 @@ packages: - supports-color dev: false - /@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.24.4): + /@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.24.5): resolution: {integrity: sha512-EntyroPwNg5IPVdUJupqs0CFzuf6lUrVvCspmv2J1FITLeGnUCuoGNNk78dgCusxEiYj6RMkTJflGSxk5aIC4A==} peerDependencies: '@babel/core': ^7.0.0-0 @@ -8775,37 +8984,47 @@ packages: optional: true dependencies: '@babel/code-frame': 7.24.2 - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.24.0 - '@babel/parser': 7.24.4 - '@vue/compiler-sfc': 3.4.23 + '@babel/parser': 7.24.5 + '@vue/compiler-sfc': 3.4.26 dev: false /@vue/compiler-core@3.4.21: resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} dependencies: - '@babel/parser': 7.24.4 + '@babel/parser': 7.24.5 '@vue/shared': 3.4.21 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 dev: false - /@vue/compiler-core@3.4.23: - resolution: {integrity: sha512-HAFmuVEwNqNdmk+w4VCQ2pkLk1Vw4XYiiyxEp3z/xvl14aLTUBw2OfVH3vBcx+FtGsynQLkkhK410Nah1N2yyQ==} + /@vue/compiler-core@3.4.24: + resolution: {integrity: sha512-vbW/tgbwJYj62N/Ww99x0zhFTkZDTcGh3uwJEuadZ/nF9/xuFMC4693P9r+3sxGXISABpDKvffY5ApH9pmdd1A==} dependencies: - '@babel/parser': 7.24.4 - '@vue/shared': 3.4.23 + '@babel/parser': 7.24.5 + '@vue/shared': 3.4.24 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 + dev: false - /@vue/compiler-core@3.4.24: - resolution: {integrity: sha512-vbW/tgbwJYj62N/Ww99x0zhFTkZDTcGh3uwJEuadZ/nF9/xuFMC4693P9r+3sxGXISABpDKvffY5ApH9pmdd1A==} + /@vue/compiler-core@3.4.26: + resolution: {integrity: sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==} dependencies: - '@babel/parser': 7.24.4 - '@vue/shared': 3.4.24 + '@babel/parser': 7.24.5 + '@vue/shared': 3.4.26 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 + + /@vue/compiler-core@3.4.27: + resolution: {integrity: sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==} + dependencies: + '@babel/parser': 7.24.5 + '@vue/shared': 3.4.27 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 @@ -8818,12 +9037,6 @@ packages: '@vue/shared': 3.4.21 dev: false - /@vue/compiler-dom@3.4.23: - resolution: {integrity: sha512-t0b9WSTnCRrzsBGrDd1LNR5HGzYTr7LX3z6nNBG+KGvZLqrT0mY6NsMzOqlVMBKKXKVuusbbB5aOOFgTY+senw==} - dependencies: - '@vue/compiler-core': 3.4.23 - '@vue/shared': 3.4.23 - /@vue/compiler-dom@3.4.24: resolution: {integrity: sha512-4XgABML/4cNndVsQndG6BbGN7+EoisDwi3oXNovqL/4jdNhwvP8/rfRMTb6FxkxIxUUtg6AI1/qZvwfSjxJiWA==} dependencies: @@ -8831,10 +9044,23 @@ packages: '@vue/shared': 3.4.24 dev: false + /@vue/compiler-dom@3.4.26: + resolution: {integrity: sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==} + dependencies: + '@vue/compiler-core': 3.4.26 + '@vue/shared': 3.4.26 + + /@vue/compiler-dom@3.4.27: + resolution: {integrity: sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==} + dependencies: + '@vue/compiler-core': 3.4.27 + '@vue/shared': 3.4.27 + dev: false + /@vue/compiler-sfc@3.4.21: resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==} dependencies: - '@babel/parser': 7.24.4 + '@babel/parser': 7.24.5 '@vue/compiler-core': 3.4.21 '@vue/compiler-dom': 3.4.21 '@vue/compiler-ssr': 3.4.21 @@ -8845,27 +9071,27 @@ packages: source-map-js: 1.2.0 dev: false - /@vue/compiler-sfc@3.4.23: - resolution: {integrity: sha512-fSDTKTfzaRX1kNAUiaj8JB4AokikzStWgHooMhaxyjZerw624L+IAP/fvI4ZwMpwIh8f08PVzEnu4rg8/Npssw==} + /@vue/compiler-sfc@3.4.26: + resolution: {integrity: sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==} dependencies: - '@babel/parser': 7.24.4 - '@vue/compiler-core': 3.4.23 - '@vue/compiler-dom': 3.4.23 - '@vue/compiler-ssr': 3.4.23 - '@vue/shared': 3.4.23 + '@babel/parser': 7.24.5 + '@vue/compiler-core': 3.4.26 + '@vue/compiler-dom': 3.4.26 + '@vue/compiler-ssr': 3.4.26 + '@vue/shared': 3.4.26 estree-walker: 2.0.2 magic-string: 0.30.10 postcss: 8.4.38 source-map-js: 1.2.0 - /@vue/compiler-sfc@3.4.24: - resolution: {integrity: sha512-nRAlJUK02FTWfA2nuvNBAqsDZuERGFgxZ8sGH62XgFSvMxO2URblzulExsmj4gFZ8e+VAyDooU9oAoXfEDNxTA==} + /@vue/compiler-sfc@3.4.27: + resolution: {integrity: sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==} dependencies: - '@babel/parser': 7.24.4 - '@vue/compiler-core': 3.4.24 - '@vue/compiler-dom': 3.4.24 - '@vue/compiler-ssr': 3.4.24 - '@vue/shared': 3.4.24 + '@babel/parser': 7.24.5 + '@vue/compiler-core': 3.4.27 + '@vue/compiler-dom': 3.4.27 + '@vue/compiler-ssr': 3.4.27 + '@vue/shared': 3.4.27 estree-walker: 2.0.2 magic-string: 0.30.10 postcss: 8.4.38 @@ -8879,17 +9105,50 @@ packages: '@vue/shared': 3.4.21 dev: false - /@vue/compiler-ssr@3.4.23: - resolution: {integrity: sha512-hb6Uj2cYs+tfqz71Wj6h3E5t6OKvb4MVcM2Nl5i/z1nv1gjEhw+zYaNOV+Xwn+SSN/VZM0DgANw5TuJfxfezPg==} + /@vue/compiler-ssr@3.4.26: + resolution: {integrity: sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==} dependencies: - '@vue/compiler-dom': 3.4.23 - '@vue/shared': 3.4.23 + '@vue/compiler-dom': 3.4.26 + '@vue/shared': 3.4.26 - /@vue/compiler-ssr@3.4.24: - resolution: {integrity: sha512-ZsAtr4fhaUFnVcDqwW3bYCSDwq+9Gk69q2r/7dAHDrOMw41kylaMgOP4zRnn6GIEJkQznKgrMOGPMFnLB52RbQ==} + /@vue/compiler-ssr@3.4.27: + resolution: {integrity: sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==} dependencies: - '@vue/compiler-dom': 3.4.24 - '@vue/shared': 3.4.24 + '@vue/compiler-dom': 3.4.27 + '@vue/shared': 3.4.27 + dev: false + + /@vue/devtools-core@7.1.3(vite@5.2.10)(vue@3.4.26): + resolution: {integrity: sha512-pVbWi8pf2Z/fZPioYOIgu+cv9pQG55k4D8bL31ec+Wfe+pQR0ImFDu0OhHfch1Ra8uvLLrAZTF4IKeGAkmzD4A==} + dependencies: + '@vue/devtools-kit': 7.1.3(vue@3.4.26) + '@vue/devtools-shared': 7.1.3 + mitt: 3.0.1 + nanoid: 3.3.7 + pathe: 1.1.2 + vite-hot-client: 0.2.3(vite@5.2.10) + transitivePeerDependencies: + - vite + - vue + dev: false + + /@vue/devtools-kit@7.1.3(vue@3.4.26): + resolution: {integrity: sha512-NFskFSJMVCBXTkByuk2llzI3KD3Blcm7WqiRorWjD6nClHPgkH5BobDH08rfulqq5ocRt5xV+3qOT1Q9FXJrwQ==} + peerDependencies: + vue: ^3.0.0 + dependencies: + '@vue/devtools-shared': 7.1.3 + hookable: 5.5.3 + mitt: 3.0.1 + perfect-debounce: 1.0.0 + speakingurl: 14.0.1 + vue: 3.4.26(typescript@5.4.5) + dev: false + + /@vue/devtools-shared@7.1.3: + resolution: {integrity: sha512-KJ3AfgjTn3tJz/XKF+BlVShNPecim3G21oHRue+YQOsooW+0s+qXvm09U09aO7yBza5SivL1QgxSrzAbiKWjhQ==} + dependencies: + rfdc: 1.3.1 dev: false /@vue/reactivity@3.1.5: @@ -8904,10 +9163,10 @@ packages: '@vue/shared': 3.4.21 dev: false - /@vue/reactivity@3.4.23: - resolution: {integrity: sha512-GlXR9PL+23fQ3IqnbSQ8OQKLodjqCyoCrmdLKZk3BP7jN6prWheAfU7a3mrltewTkoBm+N7qMEb372VHIkQRMQ==} + /@vue/reactivity@3.4.26: + resolution: {integrity: sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==} dependencies: - '@vue/shared': 3.4.23 + '@vue/shared': 3.4.26 /@vue/runtime-core@3.4.21: resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==} @@ -8916,11 +9175,11 @@ packages: '@vue/shared': 3.4.21 dev: false - /@vue/runtime-core@3.4.23: - resolution: {integrity: sha512-FeQ9MZEXoFzFkFiw9MQQ/FWs3srvrP+SjDKSeRIiQHIhtkzoj0X4rWQlRNHbGuSwLra6pMyjAttwixNMjc/xLw==} + /@vue/runtime-core@3.4.26: + resolution: {integrity: sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==} dependencies: - '@vue/reactivity': 3.4.23 - '@vue/shared': 3.4.23 + '@vue/reactivity': 3.4.26 + '@vue/shared': 3.4.26 /@vue/runtime-dom@3.4.21: resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==} @@ -8930,11 +9189,11 @@ packages: csstype: 3.1.3 dev: false - /@vue/runtime-dom@3.4.23: - resolution: {integrity: sha512-RXJFwwykZWBkMiTPSLEWU3kgVLNAfActBfWFlZd0y79FTUxexogd0PLG4HH2LfOktjRxV47Nulygh0JFXe5f9A==} + /@vue/runtime-dom@3.4.26: + resolution: {integrity: sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==} dependencies: - '@vue/runtime-core': 3.4.23 - '@vue/shared': 3.4.23 + '@vue/runtime-core': 3.4.26 + '@vue/shared': 3.4.26 csstype: 3.1.3 /@vue/server-renderer@3.4.21(vue@3.4.21): @@ -8947,14 +9206,14 @@ packages: vue: 3.4.21(typescript@5.4.5) dev: false - /@vue/server-renderer@3.4.23(vue@3.4.23): - resolution: {integrity: sha512-LDwGHtnIzvKFNS8dPJ1SSU5Gvm36p2ck8wCZc52fc3k/IfjKcwCyrWEf0Yag/2wTFUBXrqizfhK9c/mC367dXQ==} + /@vue/server-renderer@3.4.26(vue@3.4.26): + resolution: {integrity: sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==} peerDependencies: - vue: 3.4.23 + vue: 3.4.26 dependencies: - '@vue/compiler-ssr': 3.4.23 - '@vue/shared': 3.4.23 - vue: 3.4.23(typescript@5.4.5) + '@vue/compiler-ssr': 3.4.26 + '@vue/shared': 3.4.26 + vue: 3.4.26(typescript@5.4.5) /@vue/shared@3.1.5: resolution: {integrity: sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==} @@ -8964,13 +9223,17 @@ packages: resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==} dev: false - /@vue/shared@3.4.23: - resolution: {integrity: sha512-wBQ0gvf+SMwsCQOyusNw/GoXPV47WGd1xB5A1Pgzy0sQ3Bi5r5xm3n+92y3gCnB3MWqnRDdvfkRGxhKtbBRNgg==} - /@vue/shared@3.4.24: resolution: {integrity: sha512-BW4tajrJBM9AGAknnyEw5tO2xTmnqgup0VTnDAMcxYmqOX0RG0b9aSUGAbEKolD91tdwpA6oCwbltoJoNzpItw==} dev: false + /@vue/shared@3.4.26: + resolution: {integrity: sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==} + + /@vue/shared@3.4.27: + resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==} + dev: false + /@webcomponents/template-shadowroot@0.2.1: resolution: {integrity: sha512-fXL/vIUakyZL62hyvUh+EMwbVoTc0hksublmRz6ai6et8znHkJa6gtqMUZo1oc7dIz46exHSIImml9QTdknMHg==} dev: false @@ -9306,7 +9569,7 @@ packages: dependencies: dequal: 2.0.3 - /babel-plugin-jsx-dom-expressions@0.37.19(@babel/core@7.24.4): + /babel-plugin-jsx-dom-expressions@0.37.19(@babel/core@7.24.5): resolution: {integrity: sha512-nef2eLpWBgFggwrYwN6O3dNKn3RnlX6n4DIamNEAeHwp03kVQUaKUiLaEPnHPJHwxie1KwPelyIY9QikU03vUA==} peerDependencies: '@babel/core': ^7.20.12 @@ -9314,10 +9577,10 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@babel/helper-module-imports': 7.18.6 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.4) - '@babel/types': 7.24.0 + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) + '@babel/types': 7.24.5 html-entities: 2.3.3 validate-html-nesting: 1.2.2 dev: false @@ -9331,7 +9594,7 @@ packages: optional: true dev: false - /babel-preset-solid@1.8.16(@babel/core@7.24.4): + /babel-preset-solid@1.8.16(@babel/core@7.24.5): resolution: {integrity: sha512-b4HFg/xaKM+H3Tu5iUlZ/43TJOZnhi85xrm3JrXDQ0s4cmtmU37bXXYzb2m55G4QKiFjxLAjvb7sUorPrAMs5w==} peerDependencies: '@babel/core': ^7.0.0 @@ -9339,8 +9602,8 @@ packages: '@babel/core': optional: true dependencies: - '@babel/core': 7.24.4 - babel-plugin-jsx-dom-expressions: 0.37.19(@babel/core@7.24.4) + '@babel/core': 7.24.5 + babel-plugin-jsx-dom-expressions: 0.37.19(@babel/core@7.24.5) dev: false /bail@2.0.2: @@ -9769,8 +10032,8 @@ packages: engines: {node: '>=0.8'} dev: true - /clsx@2.1.0: - resolution: {integrity: sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==} + /clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} dev: false @@ -10504,6 +10767,10 @@ packages: is-arrayish: 0.2.1 dev: true + /error-stack-parser-es@0.1.1: + resolution: {integrity: sha512-g/9rfnvnagiNf+DRMHEVGuGuIBlCIMDFoTA616HaP2l9PlCjGjVhD98PNbVSJvmK4TttqT5mV5tInMhoFgi+aA==} + dev: false + /es-abstract@1.23.3: resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} engines: {node: '>= 0.4'} @@ -10568,8 +10835,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /es-module-lexer@1.5.0: - resolution: {integrity: sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==} + /es-module-lexer@1.5.2: + resolution: {integrity: sha512-l60ETUTmLqbVbVHv1J4/qj+M8nq7AwMzEcg3kmJDt9dCNrTk+yHcYFf/Kw75pMDwd9mPcIGCG5LcS20SxYRzFA==} dev: false /es-object-atoms@1.0.0: @@ -10670,16 +10937,16 @@ packages: engines: {node: '>=5.0.0'} dev: true - /eslint-plugin-regexp@2.5.0(eslint@9.1.0): + /eslint-plugin-regexp@2.5.0(eslint@9.1.1): resolution: {integrity: sha512-I7vKcP0o75WS5SHiVNXN+Eshq49sbrweMQIuqSL3AId9AwDe9Dhbfug65vw64LxmOd4v+yf5l5Xt41y9puiq0g==} engines: {node: ^18 || >=20} peerDependencies: eslint: '>=8.44.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) '@eslint-community/regexpp': 4.10.0 comment-parser: 1.4.1 - eslint: 9.1.0 + eslint: 9.1.1 jsdoc-type-pratt-parser: 4.0.0 refa: 0.12.1 regexp-ast-analysis: 0.7.1 @@ -10704,12 +10971,12 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true - /eslint@9.1.0: - resolution: {integrity: sha512-1TCBecGFQtItia2o39P7Z4BK1X7ByNPxAiWJvwiyTGcOwYnTiiASgMpNA6a+beu8cFPhEDWvPf6mIlYUJv6sgA==} + /eslint@9.1.1: + resolution: {integrity: sha512-b4cRQ0BeZcSEzPpY2PjFY70VbO32K7BStTGtBsnIGdTSEEQzBi8hPBcGQmTG2zUvFr9uLe0TK42bw8YszuHEqg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 3.0.2 '@eslint/js': 9.1.1 @@ -11621,6 +11888,10 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true + /hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + dev: false + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -11734,6 +12005,11 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} + /hyperdyperid@1.2.0: + resolution: {integrity: sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==} + engines: {node: '>=10.18'} + dev: true + /hyperid@3.2.0: resolution: {integrity: sha512-PdTtDo+Rmza9nEhTunaDSUKwbC69TIzLEpZUwiB6f+0oqmY0UPfhyHCPt6K1NQ4WFv5yJBTG5vELztVWP+nEVQ==} dependencies: @@ -11775,8 +12051,8 @@ packages: resolve-from: 4.0.0 dev: true - /import-meta-resolve@4.0.0: - resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} + /import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} dev: false /imurmurhash@0.1.4: @@ -12767,10 +13043,13 @@ packages: engines: {node: '>= 0.6'} dev: true - /memfs@4.8.2: - resolution: {integrity: sha512-j4WKth315edViMBGkHW6NTF0QBjsTrcRDmYNcGsPq+ozMEyCCCIlX2d2mJ5wuh6iHvJ3FevUrr48v58YRqVdYg==} + /memfs@4.9.1: + resolution: {integrity: sha512-36cVYFMaa9HNEYyvkyKCwker8DBmOdjWLrfekE/cHEKJ806fCfKNVhOJNvoyV/CrGSZDtfQPbhn0Zid0gbH0Hw==} engines: {node: '>= 4.0.0'} dependencies: + '@jsonjoy.com/json-pack': 1.0.4(tslib@2.6.2) + '@jsonjoy.com/util': 1.1.3(tslib@2.6.2) + sonic-forest: 1.0.3(tslib@2.6.2) tslib: 2.6.2 dev: true @@ -13253,6 +13532,10 @@ packages: rimraf: 5.0.5 dev: false + /mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + dev: false + /mixme@0.5.10: resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} engines: {node: '>= 8.0.0'} @@ -13847,6 +14130,10 @@ packages: engines: {node: '>= 14.16'} dev: true + /perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + dev: false + /periscopic@3.1.0: resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} dependencies: @@ -14479,6 +14766,19 @@ packages: loose-envify: 1.4.0 react: 18.2.0 scheduler: 0.23.0 + dev: false + + /react-dom@18.3.1(react@18.3.1): + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + peerDependencies: + react: ^18.3.1 + peerDependenciesMeta: + react: + optional: true + dependencies: + loose-envify: 1.4.0 + react: 18.3.1 + scheduler: 0.23.2 /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} @@ -14494,6 +14794,13 @@ packages: engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 + dev: false + + /react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 /read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -14766,8 +15073,8 @@ packages: - supports-color dev: true - /remark-smartypants@3.0.0: - resolution: {integrity: sha512-6/xo47aZxWJd1L6VsDWX5EJRtRC2X0+vBRVh6MPD1doayFC6VRrxez6Z8GcEDqznvf9Ly+EtpasNYQptyhy8nQ==} + /remark-smartypants@3.0.1: + resolution: {integrity: sha512-qyshfCl2eLO0i0558e79ZJsfojC5wjnYLByjt0FmjJQN6aYwcRxpoj784LZJSoWCdnA2ubh5rLNGb8Uur/wDng==} engines: {node: '>=16.0.0'} dependencies: retext: 9.0.0 @@ -14877,6 +15184,10 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + /rfdc@1.3.1: + resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} + dev: false + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -14891,29 +15202,29 @@ packages: glob: 10.3.12 dev: false - /rollup@4.16.1: - resolution: {integrity: sha512-5CaD3MPDlPKfhqzRvWXK96G6ELJfPZNb3LHiZxTHgDdC6jvwfGz2E8nY+9g1ONk4ttHsK1WaFP19Js4PSr1E3g==} + /rollup@4.17.1: + resolution: {integrity: sha512-0gG94inrUtg25sB2V/pApwiv1lUb0bQ25FPNuzO89Baa+B+c0ccaaBKM5zkZV/12pUUdH+lWCSm9wmHqyocuVQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.16.1 - '@rollup/rollup-android-arm64': 4.16.1 - '@rollup/rollup-darwin-arm64': 4.16.1 - '@rollup/rollup-darwin-x64': 4.16.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.16.1 - '@rollup/rollup-linux-arm-musleabihf': 4.16.1 - '@rollup/rollup-linux-arm64-gnu': 4.16.1 - '@rollup/rollup-linux-arm64-musl': 4.16.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.16.1 - '@rollup/rollup-linux-riscv64-gnu': 4.16.1 - '@rollup/rollup-linux-s390x-gnu': 4.16.1 - '@rollup/rollup-linux-x64-gnu': 4.16.1 - '@rollup/rollup-linux-x64-musl': 4.16.1 - '@rollup/rollup-win32-arm64-msvc': 4.16.1 - '@rollup/rollup-win32-ia32-msvc': 4.16.1 - '@rollup/rollup-win32-x64-msvc': 4.16.1 + '@rollup/rollup-android-arm-eabi': 4.17.1 + '@rollup/rollup-android-arm64': 4.17.1 + '@rollup/rollup-darwin-arm64': 4.17.1 + '@rollup/rollup-darwin-x64': 4.17.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.17.1 + '@rollup/rollup-linux-arm-musleabihf': 4.17.1 + '@rollup/rollup-linux-arm64-gnu': 4.17.1 + '@rollup/rollup-linux-arm64-musl': 4.17.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.17.1 + '@rollup/rollup-linux-riscv64-gnu': 4.17.1 + '@rollup/rollup-linux-s390x-gnu': 4.17.1 + '@rollup/rollup-linux-x64-gnu': 4.17.1 + '@rollup/rollup-linux-x64-musl': 4.17.1 + '@rollup/rollup-win32-arm64-msvc': 4.17.1 + '@rollup/rollup-win32-ia32-msvc': 4.17.1 + '@rollup/rollup-win32-x64-msvc': 4.17.1 fsevents: 2.3.3 /rrweb-cssom@0.6.0: @@ -14987,6 +15298,12 @@ packages: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: loose-envify: 1.4.0 + dev: false + + /scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + dependencies: + loose-envify: 1.4.0 /scslre@0.3.0: resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} @@ -15239,6 +15556,15 @@ packages: is-arrayish: 0.3.2 dev: false + /sirv@2.0.4: + resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} + engines: {node: '>= 10'} + dependencies: + '@polka/url': 1.0.0-next.25 + mrmime: 2.0.0 + totalist: 3.0.1 + dev: false + /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: false @@ -15295,18 +15621,39 @@ packages: csstype: 3.1.3 seroval: 1.0.5 seroval-plugins: 1.0.5(seroval@1.0.5) + dev: false + + /solid-js@1.8.17: + resolution: {integrity: sha512-E0FkUgv9sG/gEBWkHr/2XkBluHb1fkrHywUgA6o6XolPDCJ4g1HaLmQufcBBhiF36ee40q+HpG/vCZu7fLpI3Q==} + dependencies: + csstype: 3.1.3 + seroval: 1.0.5 + seroval-plugins: 1.0.5(seroval@1.0.5) - /solid-refresh@0.6.3(solid-js@1.8.16): + /solid-refresh@0.6.3(solid-js@1.8.17): resolution: {integrity: sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA==} peerDependencies: solid-js: ^1.3 dependencies: - '@babel/generator': 7.24.4 + '@babel/generator': 7.24.5 '@babel/helper-module-imports': 7.24.3 - '@babel/types': 7.24.0 - solid-js: 1.8.16 + '@babel/types': 7.24.5 + solid-js: 1.8.17 dev: false + /sonic-forest@1.0.3(tslib@2.6.2): + resolution: {integrity: sha512-dtwajos6IWMEWXdEbW1IkEkyL2gztCAgDplRIX+OT5aRKnEd5e7r7YCxRgXZdhRP1FBdOBf8axeTPhzDv8T4wQ==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + peerDependenciesMeta: + tslib: + optional: true + dependencies: + tree-dump: 1.0.1(tslib@2.6.2) + tslib: 2.6.2 + dev: true + /source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} @@ -15352,6 +15699,11 @@ packages: resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} dev: true + /speakingurl@14.0.1: + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} + dev: false + /speech-rule-engine@4.0.7: resolution: {integrity: sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g==} hasBin: true @@ -15602,8 +15954,8 @@ packages: svelte: 4.2.15 dev: false - /svelte2tsx@0.7.6(svelte@4.2.15)(typescript@5.4.5): - resolution: {integrity: sha512-awHvYsakyiGjRqqSOhb2F+qJ6lUT9klQe0UQofAcdHNaKKeDHA8kEZ8zYKGG3BiDPurKYMGvH5/lZ+jeIoG7yQ==} + /svelte2tsx@0.7.7(svelte@4.2.15)(typescript@5.4.5): + resolution: {integrity: sha512-HAIxtk5TUHXvCRKApKfxoh1BGT85S/17lS3DvbfxRKFd+Ghr5YScqBvd+sU+p7vJFw48LNkzdFk+ooNVk3e4kA==} peerDependencies: svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 typescript: ^4.9.4 || ^5.0.0 @@ -15762,6 +16114,18 @@ packages: dependencies: any-promise: 1.3.0 + /thingies@1.21.0(tslib@2.6.2): + resolution: {integrity: sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==} + engines: {node: '>=10.18'} + peerDependencies: + tslib: ^2 + peerDependenciesMeta: + tslib: + optional: true + dependencies: + tslib: 2.6.2 + dev: true + /timestring@6.0.0: resolution: {integrity: sha512-wMctrWD2HZZLuIlchlkE2dfXJh7J2KDI9Dwl+2abPYg0mswQHfOAyQW3jJg1pY5VfttSINZuKcXoB3FGypVklA==} engines: {node: '>=8'} @@ -15809,6 +16173,11 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + /totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + dev: false + /tough-cookie@4.1.3: resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} engines: {node: '>=6'} @@ -15829,6 +16198,18 @@ packages: punycode: 2.3.1 dev: true + /tree-dump@1.0.1(tslib@2.6.2): + resolution: {integrity: sha512-WCkcRBVPSlHHq1dc/px9iOfqklvzCbdRwvlNfxGZsrHqf6aZttfPrd7DJTt6oR10dwUfpFFQeVTkPbBIZxX/YA==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + peerDependenciesMeta: + tslib: + optional: true + dependencies: + tslib: 2.6.2 + dev: true + /trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -15913,64 +16294,64 @@ packages: yargs: 17.7.2 dev: true - /turbo-darwin-64@1.13.2: - resolution: {integrity: sha512-CCSuD8CfmtncpohCuIgq7eAzUas0IwSbHfI8/Q3vKObTdXyN8vAo01gwqXjDGpzG9bTEVedD0GmLbD23dR0MLA==} + /turbo-darwin-64@1.13.3: + resolution: {integrity: sha512-glup8Qx1qEFB5jerAnXbS8WrL92OKyMmg5Hnd4PleLljAeYmx+cmmnsmLT7tpaVZIN58EAAwu8wHC6kIIqhbWA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.13.2: - resolution: {integrity: sha512-0HySm06/D2N91rJJ89FbiI/AodmY8B3WDSFTVEpu2+8spUw7hOJ8okWOT0e5iGlyayUP9gr31eOeL3VFZkpfCw==} + /turbo-darwin-arm64@1.13.3: + resolution: {integrity: sha512-/np2xD+f/+9qY8BVtuOQXRq5f9LehCFxamiQnwdqWm5iZmdjygC5T3uVSYuagVFsZKMvX3ycySwh8dylGTl6lg==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.13.2: - resolution: {integrity: sha512-7HnibgbqZrjn4lcfIouzlPu8ZHSBtURG4c7Bedu7WJUDeZo+RE1crlrQm8wuwO54S0siYqUqo7GNHxu4IXbioQ==} + /turbo-linux-64@1.13.3: + resolution: {integrity: sha512-G+HGrau54iAnbXLfl+N/PynqpDwi/uDzb6iM9hXEDG+yJnSJxaHMShhOkXYJPk9offm9prH33Khx2scXrYVW1g==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.13.2: - resolution: {integrity: sha512-sUq4dbpk6SNKg/Hkwn256Vj2AEYSQdG96repio894h5/LEfauIK2QYiC/xxAeW3WBMc6BngmvNyURIg7ltrePg==} + /turbo-linux-arm64@1.13.3: + resolution: {integrity: sha512-qWwEl5VR02NqRyl68/3pwp3c/olZuSp+vwlwrunuoNTm6JXGLG5pTeme4zoHNnk0qn4cCX7DFrOboArlYxv0wQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.13.2: - resolution: {integrity: sha512-DqzhcrciWq3dpzllJR2VVIyOhSlXYCo4mNEWl98DJ3FZ08PEzcI3ceudlH6F0t/nIcfSItK1bDP39cs7YoZHEA==} + /turbo-windows-64@1.13.3: + resolution: {integrity: sha512-Nudr4bRChfJzBPzEmpVV85VwUYRCGKecwkBFpbp2a4NtrJ3+UP1VZES653ckqCu2FRyRuS0n03v9euMbAvzH+Q==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.13.2: - resolution: {integrity: sha512-WnPMrwfCXxK69CdDfS1/j2DlzcKxSmycgDAqV0XCYpK/812KB0KlvsVAt5PjEbZGXkY88pCJ1BLZHAjF5FcbqA==} + /turbo-windows-arm64@1.13.3: + resolution: {integrity: sha512-ouJCgsVLd3icjRLmRvHQDDZnmGzT64GBupM1Y+TjtYn2LVaEBoV6hicFy8x5DUpnqdLy+YpCzRMkWlwhmkX7sQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.13.2: - resolution: {integrity: sha512-rX/d9f4MgRT3yK6cERPAkfavIxbpBZowDQpgvkYwGMGDQ0Nvw1nc0NVjruE76GrzXQqoxR1UpnmEP54vBARFHQ==} + /turbo@1.13.3: + resolution: {integrity: sha512-n17HJv4F4CpsYTvKzUJhLbyewbXjq1oLCi90i5tW1TiWDz16ML1eDG7wi5dHaKxzh5efIM56SITnuVbMq5dk4g==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.13.2 - turbo-darwin-arm64: 1.13.2 - turbo-linux-64: 1.13.2 - turbo-linux-arm64: 1.13.2 - turbo-windows-64: 1.13.2 - turbo-windows-arm64: 1.13.2 + turbo-darwin-64: 1.13.3 + turbo-darwin-arm64: 1.13.3 + turbo-linux-64: 1.13.3 + turbo-linux-arm64: 1.13.3 + turbo-windows-64: 1.13.3 + turbo-windows-arm64: 1.13.3 dev: true /type-check@0.4.0: @@ -16075,8 +16456,8 @@ packages: dependencies: semver: 7.6.0 - /typescript-eslint@7.7.0(eslint@9.1.0)(typescript@5.4.5): - resolution: {integrity: sha512-wZZ+7mTQJCn4mGAvzdERtL4vwKGM/mF9cMSMeKUllz3Hgbd1Mdd5L60Q+nJmCio9RB4OyMMr0EX4Ry2Q7jiAyw==} + /typescript-eslint@7.8.0(eslint@9.1.1)(typescript@5.4.5): + resolution: {integrity: sha512-sheFG+/D8N/L7gC3WT0Q8sB97Nm573Yfr+vZFzl/4nBdYcmviBPtwGSX9TJ7wpVg28ocerKVOt+k2eGmHzcgVA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -16085,10 +16466,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 7.7.0(@typescript-eslint/parser@7.7.0)(eslint@9.1.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.7.0(eslint@9.1.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.0(eslint@9.1.0)(typescript@5.4.5) - eslint: 9.1.0 + '@typescript-eslint/eslint-plugin': 7.8.0(@typescript-eslint/parser@7.8.0)(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/parser': 7.8.0(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.1.1)(typescript@5.4.5) + eslint: 9.1.1 typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -16354,6 +16735,17 @@ packages: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 + /vite-hot-client@0.2.3(vite@5.2.10): + resolution: {integrity: sha512-rOGAV7rUlUHX89fP2p2v0A2WWvV3QMX2UYq0fRqsWSvFvev4atHWqjwGoKaZT1VTKyLGk533ecu3eyd0o59CAg==} + peerDependencies: + vite: ^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + vite: 5.2.10(@types/node@18.19.31)(sass@1.75.0) + dev: false + /vite-node@1.5.0(@types/node@18.19.31): resolution: {integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -16375,7 +16767,34 @@ packages: - terser dev: false - /vite-plugin-solid@2.10.2(solid-js@1.8.16): + /vite-plugin-inspect@0.8.4(vite@5.2.10): + resolution: {integrity: sha512-G0N3rjfw+AiiwnGw50KlObIHYWfulVwaCBUBLh2xTW9G1eM9ocE5olXkEYUbwyTmX+azM8duubi+9w5awdCz+g==} + engines: {node: '>=14'} + peerDependencies: + '@nuxt/kit': '*' + vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + vite: + optional: true + dependencies: + '@antfu/utils': 0.7.8 + '@rollup/pluginutils': 5.1.0 + debug: 4.3.4(supports-color@8.1.1) + error-stack-parser-es: 0.1.1 + fs-extra: 11.2.0 + open: 10.1.0 + perfect-debounce: 1.0.0 + picocolors: 1.0.0 + sirv: 2.0.4 + vite: 5.2.10(@types/node@18.19.31)(sass@1.75.0) + transitivePeerDependencies: + - rollup + - supports-color + dev: false + + /vite-plugin-solid@2.10.2(solid-js@1.8.17): resolution: {integrity: sha512-AOEtwMe2baBSXMXdo+BUwECC8IFHcKS6WQV/1NEd+Q7vHPap5fmIhLcAzr+DUJ04/KHx/1UBU0l1/GWP+rMAPQ==} peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* @@ -16387,17 +16806,63 @@ packages: vite: optional: true dependencies: - '@babel/core': 7.24.4 + '@babel/core': 7.24.5 '@types/babel__core': 7.20.5 - babel-preset-solid: 1.8.16(@babel/core@7.24.4) + babel-preset-solid: 1.8.16(@babel/core@7.24.5) merge-anything: 5.1.7 - solid-js: 1.8.16 - solid-refresh: 0.6.3(solid-js@1.8.16) + solid-js: 1.8.17 + solid-refresh: 0.6.3(solid-js@1.8.17) vitefu: 0.2.5(vite@5.2.10) transitivePeerDependencies: - supports-color dev: false + /vite-plugin-vue-devtools@7.1.3(vite@5.2.10)(vue@3.4.26): + resolution: {integrity: sha512-qv8Z4yok9RYo6TEs89WnIAlmTHby/+XTim8tlSnMs3lAPcQqqcl/wGRY8gAeYrGCANngOqO+VuabW3Jb1HZtyw==} + engines: {node: '>=v14.21.3'} + peerDependencies: + vite: ^3.1.0 || ^4.0.0-0 || ^5.0.0-0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@vue/devtools-core': 7.1.3(vite@5.2.10)(vue@3.4.26) + '@vue/devtools-kit': 7.1.3(vue@3.4.26) + '@vue/devtools-shared': 7.1.3 + execa: 8.0.1 + sirv: 2.0.4 + vite: 5.2.10(@types/node@18.19.31)(sass@1.75.0) + vite-plugin-inspect: 0.8.4(vite@5.2.10) + vite-plugin-vue-inspector: 5.0.1(vite@5.2.10) + transitivePeerDependencies: + - '@nuxt/kit' + - rollup + - supports-color + - vue + dev: false + + /vite-plugin-vue-inspector@5.0.1(vite@5.2.10): + resolution: {integrity: sha512-R93P8iFa6BPODhc/aOtO04A8FFMMyFIfm8ZVSmN+8vU1TgwsHya734APGpX4fVHSPX2aVwYyiezXBUYQ0Opsqw==} + peerDependencies: + vite: ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@babel/core': 7.24.5 + '@babel/plugin-proposal-decorators': 7.24.1(@babel/core@7.24.5) + '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/core@7.24.5) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.5) + '@babel/plugin-transform-typescript': 7.24.4(@babel/core@7.24.5) + '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.5) + '@vue/compiler-dom': 3.4.24 + kolorist: 1.8.0 + magic-string: 0.30.10 + vite: 5.2.10(@types/node@18.19.31)(sass@1.75.0) + transitivePeerDependencies: + - supports-color + dev: false + /vite-svg-loader@4.0.0: resolution: {integrity: sha512-0MMf1yzzSYlV4MGePsLVAOqXsbF5IVxbn4EEzqRnWxTQl8BJg/cfwIzfQNmNQxZp5XXwd4kyRKF1LytuHZTnqA==} peerDependencies: @@ -16406,7 +16871,7 @@ packages: vue: optional: true dependencies: - '@vue/compiler-sfc': 3.4.24 + '@vue/compiler-sfc': 3.4.27 svgo: 3.2.0 dev: false @@ -16452,7 +16917,7 @@ packages: '@types/node': 18.19.31 esbuild: 0.20.2 postcss: 8.4.38 - rollup: 4.16.1 + rollup: 4.17.1 sass: 1.75.0 optionalDependencies: fsevents: 2.3.3 @@ -16673,19 +17138,19 @@ packages: typescript: 5.4.5 dev: false - /vue@3.4.23(typescript@5.4.5): - resolution: {integrity: sha512-X1y6yyGJ28LMUBJ0k/qIeKHstGd+BlWQEOT40x3auJFTmpIhpbKLgN7EFsqalnJXq1Km5ybDEsp6BhuWKciUDg==} + /vue@3.4.26(typescript@5.4.5): + resolution: {integrity: sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.4.23 - '@vue/compiler-sfc': 3.4.23 - '@vue/runtime-dom': 3.4.23 - '@vue/server-renderer': 3.4.23(vue@3.4.23) - '@vue/shared': 3.4.23 + '@vue/compiler-dom': 3.4.26 + '@vue/compiler-sfc': 3.4.26 + '@vue/runtime-dom': 3.4.26 + '@vue/server-renderer': 3.4.26(vue@3.4.26) + '@vue/shared': 3.4.26 typescript: 5.4.5 /w3c-xmlserializer@5.0.0: @@ -17009,20 +17474,20 @@ packages: engines: {node: '>=12.20'} dev: false - /zod-to-json-schema@3.22.5(zod@3.23.0): - resolution: {integrity: sha512-+akaPo6a0zpVCCseDed504KBJUQpEW5QZw7RMneNmKw+fGaML1Z9tUNLnHHAC8x6dzVRO1eB2oEMyZRnuBZg7Q==} + /zod-to-json-schema@3.23.0(zod@3.23.5): + resolution: {integrity: sha512-az0uJ243PxsRIa2x1WmNE/pnuA05gUq/JB8Lwe1EDCCL/Fz9MgjYQ0fPlyc2Tcv6aF2ZA7WM5TWaRZVEFaAIag==} peerDependencies: - zod: ^3.22.4 + zod: ^3.23.3 dependencies: - zod: 3.23.0 + zod: 3.23.5 dev: false /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} dev: false - /zod@3.23.0: - resolution: {integrity: sha512-OFLT+LTocvabn6q76BTwVB0hExEBS0IduTr3cqZyMqEDbOnYmcU+y0tUAYbND4uwclpBGi4I4UUBGzylWpjLGA==} + /zod@3.23.5: + resolution: {integrity: sha512-fkwiq0VIQTksNNA131rDOsVJcns0pfVUjHzLrNBiF/O/Xxb5lQyEXkhZWcJ7npWsYlvs+h0jFWXXy4X46Em1JA==} dev: false /zwitch@2.0.4: @@ -17052,5 +17517,5 @@ packages: resolution: {directory: packages/astro/test/fixtures/solid-component/deps/solid-jsx-component, type: directory} name: '@test/solid-jsx-component' dependencies: - solid-js: 1.8.16 + solid-js: 1.8.17 dev: false From 9d6930915f4f71fced865b69f61f6a62377fd7b1 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 8 May 2024 10:58:53 +0100 Subject: [PATCH 39/41] fix: incorrect function --- packages/astro/src/core/build/generate.ts | 13 ++----------- packages/astro/src/core/build/pipeline.ts | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 45fb4fed0cfe..796137392f71 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -202,7 +202,7 @@ async function generatePage( // prepare information we need const { config, internals, logger } = pipeline; const pageModulePromise = ssrEntry.page; - + // Calculate information of the page, like scripts, links and styles const styles = pageData.styles .sort(cssOrder) @@ -284,7 +284,7 @@ async function getPathsForRoute( const label = staticPaths.length === 1 ? 'page' : 'pages'; logger.debug( 'build', - `├── ${bold(green('✔'))} ${route.component} → ${magenta(`[${staticPaths.length} ${label}]`)}` + `├── ${bold(green('√'))} ${route.component} → ${magenta(`[${staticPaths.length} ${label}]`)}` ); paths = staticPaths @@ -561,12 +561,3 @@ function createBuildManifest( checkOrigin: settings.config.experimental.security?.csrfProtection?.origin ?? false, }; } - -/** - * For a given pageData, returns the entry file path—aka a resolved virtual module in our internals' specifiers. - */ -function getEntryFilePath(internals: BuildInternals, pageData: RouteData) { - const id = - '\x00' + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component); - return internals.entrySpecifierToBundleMap.get(id); -} diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 036e62ec91ab..5018cfeaad34 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -331,10 +331,8 @@ export class BuildPipeline extends Pipeline { throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - const filePath = getVirtualModulePageName( - ASTRO_PAGE_MODULE_ID, - route.redirectRoute.component - ); + console.log('[PIPELINE]', ASTRO_PAGE_MODULE_ID, route.redirectRoute); + const filePath = getEntryFilePath(this.internals, route.redirectRoute); if (filePath) { const url = createEntryURL(filePath, outFolder); const ssrEntryPage: SinglePageBuiltModule = await import(url.toString()); @@ -354,10 +352,8 @@ export class BuildPipeline extends Pipeline { throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - const filePath = getVirtualModulePageName( - ASTRO_PAGE_MODULE_ID, - route.redirectRoute.component - ); + console.log('[PIPELINE]', ASTRO_PAGE_MODULE_ID, route.redirectRoute); + const filePath = getEntryFilePath(this.internals, route.redirectRoute); if (filePath) { const url = createEntryURL(filePath, outFolder); const ssrEntryPage: SinglePageBuiltModule = await import(url.toString()); @@ -372,3 +368,11 @@ export class BuildPipeline extends Pipeline { function createEntryURL(filePath: string, outFolder: URL) { return new URL('./' + filePath + `?time=${Date.now()}`, outFolder); } + +/** + * For a given pageData, returns the entry file path—aka a resolved virtual module in our internals' specifiers. + */ +function getEntryFilePath(internals: BuildInternals, pageData: RouteData) { + const id = '\x00' + getVirtualModulePageName(ASTRO_PAGE_MODULE_ID, pageData.component); + return internals.entrySpecifierToBundleMap.get(id); +} From b8f3abc4356063fa35b6989d7ded0e19c23cf894 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 8 May 2024 11:13:20 +0100 Subject: [PATCH 40/41] remove logs --- packages/astro/src/core/build/pipeline.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 5018cfeaad34..cfedc1f2d916 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -331,7 +331,6 @@ export class BuildPipeline extends Pipeline { throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - console.log('[PIPELINE]', ASTRO_PAGE_MODULE_ID, route.redirectRoute); const filePath = getEntryFilePath(this.internals, route.redirectRoute); if (filePath) { const url = createEntryURL(filePath, outFolder); @@ -352,7 +351,6 @@ export class BuildPipeline extends Pipeline { throw new Error(`Expected a redirect route.`); } if (route.redirectRoute) { - console.log('[PIPELINE]', ASTRO_PAGE_MODULE_ID, route.redirectRoute); const filePath = getEntryFilePath(this.internals, route.redirectRoute); if (filePath) { const url = createEntryURL(filePath, outFolder); From 27395f41679c46de158048cf5451254eac4137b7 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 8 May 2024 11:16:22 +0100 Subject: [PATCH 41/41] revert: codepoint change --- packages/astro/src/core/build/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 796137392f71..dbd1e915df96 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -284,7 +284,7 @@ async function getPathsForRoute( const label = staticPaths.length === 1 ? 'page' : 'pages'; logger.debug( 'build', - `├── ${bold(green('√'))} ${route.component} → ${magenta(`[${staticPaths.length} ${label}]`)}` + `├── ${bold(green('✔'))} ${route.component} → ${magenta(`[${staticPaths.length} ${label}]`)}` ); paths = staticPaths