diff --git a/src/dev/deps.ts b/src/dev/deps.ts index 94000590..f356bae2 100644 --- a/src/dev/deps.ts +++ b/src/dev/deps.ts @@ -26,6 +26,7 @@ export { } from "https://deno.land/std@0.205.0/semver/mod.ts"; export { emptyDir, existsSync } from "https://deno.land/std@0.205.0/fs/mod.ts"; export * as JSONC from "https://deno.land/std@0.205.0/jsonc/mod.ts"; +export { assertEquals } from "https://deno.land/std@0.205.0/assert/mod.ts"; // ts-morph export { Node, Project } from "https://deno.land/x/ts_morph@20.0.0/mod.ts"; diff --git a/src/dev/manifest.ts b/src/dev/manifest.ts new file mode 100644 index 00000000..97d8a86b --- /dev/null +++ b/src/dev/manifest.ts @@ -0,0 +1,172 @@ +import { extname, join, normalize } from "./deps.ts"; + +/** + * Import specifiers must have forward slashes + */ +function toImportSpecifier(file: string) { + let specifier = normalize(file).replace(/\\/g, "/"); + if (!specifier.startsWith(".")) { + specifier = "./" + specifier; + } + return specifier; +} + +// Create a valid JS identifier out of the project relative specifier. +// Note that we only need to deal with strings that _must_ have been +// valid file names in Windows, macOS and Linux and every identifier we +// create here will be prefixed with at least one "$". This greatly +// simplifies the invalid characters we have to account for. +export function specifierToIdentifier(specifier: string, used: Set) { + specifier = specifier.replace(/^(?:\.\/routes|\.\/islands)\//, ""); + const ext = extname(specifier); + if (ext) specifier = specifier.slice(0, -ext.length); + + let ident = ""; + if (/^[\d]/.test(specifier)) { + ident += "_"; + } + ident += specifier.replace(/[\/.\(\)\[\]\s@-]/g, "_").replace(/_+/g, "_"); + + if (used.has(ident)) { + let check = ident; + let i = 1; + while (used.has(check)) { + check = `${ident}_${i++}`; + } + ident = check; + } + + used.add(ident); + return ident; +} + +export interface Manifest { + routes: string[]; + islands: string[]; +} + +export async function generate(directory: string, manifest: Manifest) { + const { routes, islands } = manifest; + + // Keep track of which identifier we've already used + const used = new Set(); + + const normalizedRoutes = new Map(); + for (let i = 0; i < routes.length; i++) { + const file = routes[i]; + const specifier = toImportSpecifier(file); + const identifier = specifierToIdentifier(specifier, used); + normalizedRoutes.set(specifier, identifier); + } + + type islandManifest = { + specifier: string; + identifier: string; + importLine: string; + }; + const normalizedIslands: islandManifest[] = []; + for (let i = 0; i < islands.length; i++) { + const file = islands[i]; + const specifier = toImportSpecifier(file); + const identifier = specifierToIdentifier(specifier, used); + const importLine = await islandImportLine(specifier, identifier, directory); + normalizedIslands.push({ specifier, identifier, importLine }); + } + + const output = `// DO NOT EDIT. This file is generated by Fresh. +// This file SHOULD be checked into source version control. +// This file is automatically updated during development when running \`dev.ts\`. + +${ + Array.from(normalizedRoutes.entries()).map(([specifier, identifier]) => + `import * as $${identifier} from "${specifier}";` + ).join( + "\n", + ) + } +${ + normalizedIslands.map(({ specifier, identifier }) => + `import * as $$${identifier} from "${specifier}";` + ) + .join("\n") + } +import { Manifest } from "$fresh/server.ts"; + +const manifest = { + routes: { + ${ + Array.from(normalizedRoutes.entries()).map(([specifier, identifier]) => + `${JSON.stringify(`${specifier}`)}: $${identifier},` + ) + .join("\n ") + } + }, + islands: { + ${ + normalizedIslands.map(({ specifier, importLine }) => + `${JSON.stringify(`${specifier}`)}: ${importLine},` + ) + .join("\n ") + } + }, + baseUrl: import.meta.url, +} satisfies Manifest; + +export default manifest; +`; + + const proc = new Deno.Command(Deno.execPath(), { + args: ["fmt", "-"], + stdin: "piped", + stdout: "piped", + stderr: "null", + }).spawn(); + + const raw = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(output)); + controller.close(); + }, + }); + await raw.pipeTo(proc.stdin); + const { stdout } = await proc.output(); + + const manifestStr = new TextDecoder().decode(stdout); + const manifestPath = join(directory, "./fresh.gen.ts"); + + await Deno.writeTextFile(manifestPath, manifestStr); + console.log( + `%cThe manifest has been generated for ${routes.length} routes and ${islands.length} islands.`, + "color: blue; font-weight: bold", + ); +} + +async function islandImportLine( + specifier: string, + identifier: string, + directory: string, +): Promise { + const moduleURL = new URL(`file://${directory}/${specifier}`); + const module = await import(moduleURL.href); + const entries = Object.entries(module); + + const allExportsAreComponents = entries.every( + ([, exportedEntity]) => typeof exportedEntity === "function", + ); + + // if all exports are components, we can use the simple, existing form + if (allExportsAreComponents) { + return `$$${identifier}`; + } + + // if not all exports are components, list the component exports explicitly + const componentExports = entries + .filter(([, exportedEntity]) => typeof exportedEntity === "function") + .map(([exportName]) => exportName); + + const exportsString = componentExports + .map((exp) => `${exp}: $$${identifier}.${exp}`) + .join(", "); + + return `{ ${exportsString} }`; +} diff --git a/src/dev/manifest_test.ts b/src/dev/manifest_test.ts new file mode 100644 index 00000000..b2a2db13 --- /dev/null +++ b/src/dev/manifest_test.ts @@ -0,0 +1,21 @@ +import { assertEquals } from "./deps.ts"; +import { specifierToIdentifier } from "./manifest.ts"; + +const run = specifierToIdentifier; + +Deno.test("specifierToIdentifier", () => { + const used = new Set(); + assertEquals(run("foo/bar.ts", used), "foo_bar"); + assertEquals(run("foo/bar.json.ts", used), "foo_bar_json"); + assertEquals(run("foo/[id]/bar", used), "foo_id_bar"); + assertEquals(run("foo/[...all]/bar", used), "foo_all_bar"); + assertEquals(run("foo/[[optional]]/bar", used), "foo_optional_bar"); + assertEquals(run("foo/as-df/bar", used), "foo_as_df_bar"); + assertEquals(run("foo/as@df", used), "foo_as_df"); +}); + +Deno.test("specifierToIdentifier deals with duplicates", () => { + const used = new Set(); + assertEquals(run("foo/bar", used), "foo_bar"); + assertEquals(run("foo/bar", used), "foo_bar_1"); +}); diff --git a/src/dev/mod.ts b/src/dev/mod.ts index 0f0c50e0..830a1e9b 100644 --- a/src/dev/mod.ts +++ b/src/dev/mod.ts @@ -1,12 +1,6 @@ -import { - gte, - join, - normalize, - relative, - semverParse, - walk, - WalkEntry, -} from "./deps.ts"; +import { gte, join, relative, semverParse, walk, WalkEntry } from "./deps.ts"; +export { generate, type Manifest } from "./manifest.ts"; +import type { Manifest } from "./manifest.ts"; import { error } from "./error.ts"; const MIN_DENO_VERSION = "1.31.0"; const TEST_FILE_PATTERN = /[._]test\.(?:[tj]sx?|[mc][tj]s)$/; @@ -54,11 +48,6 @@ async function collectDir( } } -export interface Manifest { - routes: string[]; - islands: string[]; -} - const GROUP_REG = /[/\\\\]\((_[^/\\\\]+)\)[/\\\\]/; export async function collect( directory: string, @@ -103,115 +92,3 @@ export async function collect( return { routes, islands }; } - -/** - * Import specifiers must have forward slashes - */ -function toImportSpecifier(file: string) { - let specifier = normalize(file).replace(/\\/g, "/"); - if (!specifier.startsWith(".")) { - specifier = "./" + specifier; - } - return specifier; -} - -async function islandImportLine( - file: string, - i: number, - directory: string, -): Promise { - const specifier = toImportSpecifier(file); - const moduleURL = new URL(`file://${directory}/${specifier}`); - const module = await import(moduleURL.href); - const entries = Object.entries(module); - - const allExportsAreComponents = entries.every( - ([, exportedEntity]) => typeof exportedEntity === "function", - ); - - // if all exports are components, we can use the simple, existing form - if (allExportsAreComponents) { - return `${JSON.stringify(specifier)}: $$${i},`; - } - - // if not all exports are components, list the component exports explicitly - const componentExports = entries - .filter(([, exportedEntity]) => typeof exportedEntity === "function") - .map(([exportName]) => exportName); - - const exportsString = componentExports - .map((exp) => `${exp}: $$${i}.${exp}`) - .join(", "); - - return `"${specifier}": { ${exportsString} },`; -} - -export async function generate(directory: string, manifest: Manifest) { - const { routes, islands } = manifest; - - const islandImports = await Promise.all( - islands.map((file, i) => islandImportLine(file, i, directory)), - ); - - const output = `// DO NOT EDIT. This file is generated by Fresh. -// This file SHOULD be checked into source version control. -// This file is automatically updated during development when running \`dev.ts\`. - -${ - routes.map((file, i) => - `import * as $${i} from "${toImportSpecifier(file)}";` - ).join( - "\n", - ) - } -${ - islands.map((file, i) => - `import * as $$${i} from "${toImportSpecifier(file)}";` - ) - .join("\n") - } -import { Manifest } from "$fresh/server.ts"; - -const manifest = { - routes: { - ${ - routes.map((file, i) => - `${JSON.stringify(`${toImportSpecifier(file)}`)}: $${i},` - ) - .join("\n ") - } - }, - islands: { - ${islandImports.join("\n ")} - }, - baseUrl: import.meta.url, -} satisfies Manifest; - -export default manifest; -`; - - const proc = new Deno.Command(Deno.execPath(), { - args: ["fmt", "-"], - stdin: "piped", - stdout: "piped", - stderr: "null", - }).spawn(); - - const raw = new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode(output)); - controller.close(); - }, - }); - await raw.pipeTo(proc.stdin); - const { stdout } = await proc.output(); - - const manifestStr = new TextDecoder().decode(stdout); - const manifestPath = join(directory, "./fresh.gen.ts"); - - await Deno.writeTextFile(manifestPath, manifestStr); - console.log( - `%cThe manifest has been generated for ${routes.length} routes and ${islands.length} islands.`, - "color: blue; font-weight: bold", - ); -} diff --git a/tests/fixture/fresh.gen.ts b/tests/fixture/fresh.gen.ts index 4436398e..47cb2338 100644 --- a/tests/fixture/fresh.gen.ts +++ b/tests/fixture/fresh.gen.ts @@ -2,198 +2,219 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/404-from-middleware-throw/_middleware.ts"; -import * as $1 from "./routes/404-from-middleware-throw/index.tsx"; -import * as $2 from "./routes/404-from-middleware/_middleware.ts"; -import * as $3 from "./routes/404-from-middleware/index.tsx"; -import * as $4 from "./routes/404_from_throw.tsx"; -import * as $5 from "./routes/[name].tsx"; -import * as $6 from "./routes/_404.tsx"; -import * as $7 from "./routes/_500.tsx"; -import * as $8 from "./routes/_app.tsx"; -import * as $9 from "./routes/_middleware.ts"; -import * as $10 from "./routes/admin/[site].tsx"; -import * as $11 from "./routes/api/get_only.ts"; -import * as $12 from "./routes/api/head_override.ts"; -import * as $13 from "./routes/assetsCaching/index.tsx"; -import * as $14 from "./routes/books/[id].tsx"; -import * as $15 from "./routes/connInfo.ts"; -import * as $16 from "./routes/error_boundary.tsx"; -import * as $17 from "./routes/event_handler_string.tsx"; -import * as $18 from "./routes/event_handler_string_island.tsx"; -import * as $19 from "./routes/evil.tsx"; -import * as $20 from "./routes/failure.ts"; -import * as $21 from "./routes/head_deduplicate.tsx"; -import * as $22 from "./routes/hooks-server/island.tsx"; -import * as $23 from "./routes/hooks-server/useReducer.tsx"; -import * as $24 from "./routes/hooks-server/useState.tsx"; -import * as $25 from "./routes/i18n/[[lang]]/lang.tsx"; -import * as $26 from "./routes/index.tsx"; -import * as $27 from "./routes/intercept.tsx"; -import * as $28 from "./routes/intercept_args.tsx"; -import * as $29 from "./routes/islands/index.tsx"; -import * as $30 from "./routes/islands/multiple_island_exports.tsx"; -import * as $31 from "./routes/islands/returning_null.tsx"; -import * as $32 from "./routes/islands/root_fragment.tsx"; -import * as $33 from "./routes/islands/root_fragment_conditional_first.tsx"; -import * as $34 from "./routes/layeredMdw/_middleware.ts"; -import * as $35 from "./routes/layeredMdw/layer2-no-mw/without_mw.ts"; -import * as $36 from "./routes/layeredMdw/layer2-with-params/[tenantId]/[id].ts"; -import * as $37 from "./routes/layeredMdw/layer2-with-params/[tenantId]/_middleware.ts"; -import * as $38 from "./routes/layeredMdw/layer2-with-params/_middleware.ts"; -import * as $39 from "./routes/layeredMdw/layer2/_middleware.ts"; -import * as $40 from "./routes/layeredMdw/layer2/abc.ts"; -import * as $41 from "./routes/layeredMdw/layer2/index.ts"; -import * as $42 from "./routes/layeredMdw/layer2/layer3/[id].ts"; -import * as $43 from "./routes/layeredMdw/layer2/layer3/_middleware.ts"; -import * as $44 from "./routes/layeredMdw/nesting/[tenant]/[environment]/[id].tsx"; -import * as $45 from "./routes/layeredMdw/nesting/[tenant]/[environment]/_middleware.ts"; -import * as $46 from "./routes/layeredMdw/nesting/[tenant]/_middleware.ts"; -import * as $47 from "./routes/layeredMdw/nesting/_middleware.ts"; -import * as $48 from "./routes/middleware-error-handler/_middleware.ts"; -import * as $49 from "./routes/middleware-error-handler/index.tsx"; -import * as $50 from "./routes/middleware_root.ts"; -import * as $51 from "./routes/movies/[foo].json.ts"; -import * as $52 from "./routes/movies/[foo]@[bar].ts"; -import * as $53 from "./routes/nonce_inline.tsx"; -import * as $54 from "./routes/not_found.ts"; -import * as $55 from "./routes/params.tsx"; -import * as $56 from "./routes/preact/boolean_attrs.tsx"; -import * as $57 from "./routes/props/[id].tsx"; -import * as $58 from "./routes/route-groups-islands/index.tsx"; -import * as $59 from "./routes/route-groups/(bar)/(baz)/_layout.tsx"; -import * as $60 from "./routes/route-groups/(bar)/(baz)/baz.tsx"; -import * as $61 from "./routes/route-groups/(bar)/_layout.tsx"; -import * as $62 from "./routes/route-groups/(bar)/bar.tsx"; -import * as $63 from "./routes/route-groups/(bar)/boof/index.tsx"; -import * as $64 from "./routes/route-groups/(foo)/_layout.tsx"; -import * as $65 from "./routes/route-groups/(foo)/index.tsx"; -import * as $66 from "./routes/signal_shared.tsx"; -import * as $67 from "./routes/state-in-props/_middleware.ts"; -import * as $68 from "./routes/state-in-props/index.tsx"; -import * as $69 from "./routes/state-middleware/_middleware.ts"; -import * as $70 from "./routes/state-middleware/foo/_middleware.ts"; -import * as $71 from "./routes/state-middleware/foo/index.tsx"; -import * as $72 from "./routes/static.tsx"; -import * as $73 from "./routes/status_overwrite.tsx"; -import * as $74 from "./routes/umlaut-äöüß.tsx"; -import * as $75 from "./routes/wildcard.tsx"; -import * as $$0 from "./islands/Counter.tsx"; -import * as $$1 from "./islands/FormIsland.tsx"; -import * as $$2 from "./islands/Greeter.tsx"; -import * as $$3 from "./islands/HookIsland.tsx"; -import * as $$4 from "./islands/MultipleCounters.tsx"; -import * as $$5 from "./islands/ReturningNull.tsx"; -import * as $$6 from "./islands/RootFragment.tsx"; -import * as $$7 from "./islands/RootFragmentWithConditionalFirst.tsx"; -import * as $$8 from "./islands/StringEventIsland.tsx"; -import * as $$9 from "./islands/Test.tsx"; -import * as $$10 from "./islands/folder/Counter.tsx"; -import * as $$11 from "./islands/folder/subfolder/Counter.tsx"; -import * as $$12 from "./islands/kebab-case-counter-test.tsx"; -import * as $$13 from "./routes/route-groups-islands/(_islands)/Counter.tsx"; -import * as $$14 from "./routes/route-groups-islands/(_islands)/invalid.tsx"; +import * as $_404_from_middleware_throw_middleware from "./routes/404-from-middleware-throw/_middleware.ts"; +import * as $_404_from_middleware_throw_index from "./routes/404-from-middleware-throw/index.tsx"; +import * as $_404_from_middleware_middleware from "./routes/404-from-middleware/_middleware.ts"; +import * as $_404_from_middleware_index from "./routes/404-from-middleware/index.tsx"; +import * as $_404_from_throw from "./routes/404_from_throw.tsx"; +import * as $_name_ from "./routes/[name].tsx"; +import * as $_404 from "./routes/_404.tsx"; +import * as $_500 from "./routes/_500.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $_middleware from "./routes/_middleware.ts"; +import * as $admin_site_ from "./routes/admin/[site].tsx"; +import * as $api_get_only from "./routes/api/get_only.ts"; +import * as $api_head_override from "./routes/api/head_override.ts"; +import * as $assetsCaching_index from "./routes/assetsCaching/index.tsx"; +import * as $books_id_ from "./routes/books/[id].tsx"; +import * as $connInfo from "./routes/connInfo.ts"; +import * as $error_boundary from "./routes/error_boundary.tsx"; +import * as $event_handler_string from "./routes/event_handler_string.tsx"; +import * as $event_handler_string_island from "./routes/event_handler_string_island.tsx"; +import * as $evil from "./routes/evil.tsx"; +import * as $failure from "./routes/failure.ts"; +import * as $head_deduplicate from "./routes/head_deduplicate.tsx"; +import * as $hooks_server_island from "./routes/hooks-server/island.tsx"; +import * as $hooks_server_useReducer from "./routes/hooks-server/useReducer.tsx"; +import * as $hooks_server_useState from "./routes/hooks-server/useState.tsx"; +import * as $i18n_lang_lang from "./routes/i18n/[[lang]]/lang.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $intercept from "./routes/intercept.tsx"; +import * as $intercept_args from "./routes/intercept_args.tsx"; +import * as $islands_index from "./routes/islands/index.tsx"; +import * as $islands_multiple_island_exports from "./routes/islands/multiple_island_exports.tsx"; +import * as $islands_returning_null from "./routes/islands/returning_null.tsx"; +import * as $islands_root_fragment from "./routes/islands/root_fragment.tsx"; +import * as $islands_root_fragment_conditional_first from "./routes/islands/root_fragment_conditional_first.tsx"; +import * as $layeredMdw_middleware from "./routes/layeredMdw/_middleware.ts"; +import * as $layeredMdw_layer2_no_mw_without_mw from "./routes/layeredMdw/layer2-no-mw/without_mw.ts"; +import * as $layeredMdw_layer2_with_params_tenantId_id_ from "./routes/layeredMdw/layer2-with-params/[tenantId]/[id].ts"; +import * as $layeredMdw_layer2_with_params_tenantId_middleware from "./routes/layeredMdw/layer2-with-params/[tenantId]/_middleware.ts"; +import * as $layeredMdw_layer2_with_params_middleware from "./routes/layeredMdw/layer2-with-params/_middleware.ts"; +import * as $layeredMdw_layer2_middleware from "./routes/layeredMdw/layer2/_middleware.ts"; +import * as $layeredMdw_layer2_abc from "./routes/layeredMdw/layer2/abc.ts"; +import * as $layeredMdw_layer2_index from "./routes/layeredMdw/layer2/index.ts"; +import * as $layeredMdw_layer2_layer3_id_ from "./routes/layeredMdw/layer2/layer3/[id].ts"; +import * as $layeredMdw_layer2_layer3_middleware from "./routes/layeredMdw/layer2/layer3/_middleware.ts"; +import * as $layeredMdw_nesting_tenant_environment_id_ from "./routes/layeredMdw/nesting/[tenant]/[environment]/[id].tsx"; +import * as $layeredMdw_nesting_tenant_environment_middleware from "./routes/layeredMdw/nesting/[tenant]/[environment]/_middleware.ts"; +import * as $layeredMdw_nesting_tenant_middleware from "./routes/layeredMdw/nesting/[tenant]/_middleware.ts"; +import * as $layeredMdw_nesting_middleware from "./routes/layeredMdw/nesting/_middleware.ts"; +import * as $middleware_error_handler_middleware from "./routes/middleware-error-handler/_middleware.ts"; +import * as $middleware_error_handler_index from "./routes/middleware-error-handler/index.tsx"; +import * as $middleware_root from "./routes/middleware_root.ts"; +import * as $movies_foo_json from "./routes/movies/[foo].json.ts"; +import * as $movies_foo_bar_ from "./routes/movies/[foo]@[bar].ts"; +import * as $nonce_inline from "./routes/nonce_inline.tsx"; +import * as $not_found from "./routes/not_found.ts"; +import * as $params from "./routes/params.tsx"; +import * as $preact_boolean_attrs from "./routes/preact/boolean_attrs.tsx"; +import * as $props_id_ from "./routes/props/[id].tsx"; +import * as $route_groups_islands_index from "./routes/route-groups-islands/index.tsx"; +import * as $route_groups_bar_baz_layout from "./routes/route-groups/(bar)/(baz)/_layout.tsx"; +import * as $route_groups_bar_baz_baz from "./routes/route-groups/(bar)/(baz)/baz.tsx"; +import * as $route_groups_bar_layout from "./routes/route-groups/(bar)/_layout.tsx"; +import * as $route_groups_bar_bar from "./routes/route-groups/(bar)/bar.tsx"; +import * as $route_groups_bar_boof_index from "./routes/route-groups/(bar)/boof/index.tsx"; +import * as $route_groups_foo_layout from "./routes/route-groups/(foo)/_layout.tsx"; +import * as $route_groups_foo_index from "./routes/route-groups/(foo)/index.tsx"; +import * as $signal_shared from "./routes/signal_shared.tsx"; +import * as $state_in_props_middleware from "./routes/state-in-props/_middleware.ts"; +import * as $state_in_props_index from "./routes/state-in-props/index.tsx"; +import * as $state_middleware_middleware from "./routes/state-middleware/_middleware.ts"; +import * as $state_middleware_foo_middleware from "./routes/state-middleware/foo/_middleware.ts"; +import * as $state_middleware_foo_index from "./routes/state-middleware/foo/index.tsx"; +import * as $static from "./routes/static.tsx"; +import * as $status_overwrite from "./routes/status_overwrite.tsx"; +import * as $umlaut_äöüß from "./routes/umlaut-äöüß.tsx"; +import * as $wildcard from "./routes/wildcard.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; +import * as $$FormIsland from "./islands/FormIsland.tsx"; +import * as $$Greeter from "./islands/Greeter.tsx"; +import * as $$HookIsland from "./islands/HookIsland.tsx"; +import * as $$MultipleCounters from "./islands/MultipleCounters.tsx"; +import * as $$ReturningNull from "./islands/ReturningNull.tsx"; +import * as $$RootFragment from "./islands/RootFragment.tsx"; +import * as $$RootFragmentWithConditionalFirst from "./islands/RootFragmentWithConditionalFirst.tsx"; +import * as $$StringEventIsland from "./islands/StringEventIsland.tsx"; +import * as $$Test from "./islands/Test.tsx"; +import * as $$folder_Counter from "./islands/folder/Counter.tsx"; +import * as $$folder_subfolder_Counter from "./islands/folder/subfolder/Counter.tsx"; +import * as $$kebab_case_counter_test from "./islands/kebab-case-counter-test.tsx"; +import * as $$route_groups_islands_islands_Counter from "./routes/route-groups-islands/(_islands)/Counter.tsx"; +import * as $$route_groups_islands_islands_invalid from "./routes/route-groups-islands/(_islands)/invalid.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/404-from-middleware-throw/_middleware.ts": $0, - "./routes/404-from-middleware-throw/index.tsx": $1, - "./routes/404-from-middleware/_middleware.ts": $2, - "./routes/404-from-middleware/index.tsx": $3, - "./routes/404_from_throw.tsx": $4, - "./routes/[name].tsx": $5, - "./routes/_404.tsx": $6, - "./routes/_500.tsx": $7, - "./routes/_app.tsx": $8, - "./routes/_middleware.ts": $9, - "./routes/admin/[site].tsx": $10, - "./routes/api/get_only.ts": $11, - "./routes/api/head_override.ts": $12, - "./routes/assetsCaching/index.tsx": $13, - "./routes/books/[id].tsx": $14, - "./routes/connInfo.ts": $15, - "./routes/error_boundary.tsx": $16, - "./routes/event_handler_string.tsx": $17, - "./routes/event_handler_string_island.tsx": $18, - "./routes/evil.tsx": $19, - "./routes/failure.ts": $20, - "./routes/head_deduplicate.tsx": $21, - "./routes/hooks-server/island.tsx": $22, - "./routes/hooks-server/useReducer.tsx": $23, - "./routes/hooks-server/useState.tsx": $24, - "./routes/i18n/[[lang]]/lang.tsx": $25, - "./routes/index.tsx": $26, - "./routes/intercept.tsx": $27, - "./routes/intercept_args.tsx": $28, - "./routes/islands/index.tsx": $29, - "./routes/islands/multiple_island_exports.tsx": $30, - "./routes/islands/returning_null.tsx": $31, - "./routes/islands/root_fragment.tsx": $32, - "./routes/islands/root_fragment_conditional_first.tsx": $33, - "./routes/layeredMdw/_middleware.ts": $34, - "./routes/layeredMdw/layer2-no-mw/without_mw.ts": $35, - "./routes/layeredMdw/layer2-with-params/[tenantId]/[id].ts": $36, - "./routes/layeredMdw/layer2-with-params/[tenantId]/_middleware.ts": $37, - "./routes/layeredMdw/layer2-with-params/_middleware.ts": $38, - "./routes/layeredMdw/layer2/_middleware.ts": $39, - "./routes/layeredMdw/layer2/abc.ts": $40, - "./routes/layeredMdw/layer2/index.ts": $41, - "./routes/layeredMdw/layer2/layer3/[id].ts": $42, - "./routes/layeredMdw/layer2/layer3/_middleware.ts": $43, - "./routes/layeredMdw/nesting/[tenant]/[environment]/[id].tsx": $44, - "./routes/layeredMdw/nesting/[tenant]/[environment]/_middleware.ts": $45, - "./routes/layeredMdw/nesting/[tenant]/_middleware.ts": $46, - "./routes/layeredMdw/nesting/_middleware.ts": $47, - "./routes/middleware-error-handler/_middleware.ts": $48, - "./routes/middleware-error-handler/index.tsx": $49, - "./routes/middleware_root.ts": $50, - "./routes/movies/[foo].json.ts": $51, - "./routes/movies/[foo]@[bar].ts": $52, - "./routes/nonce_inline.tsx": $53, - "./routes/not_found.ts": $54, - "./routes/params.tsx": $55, - "./routes/preact/boolean_attrs.tsx": $56, - "./routes/props/[id].tsx": $57, - "./routes/route-groups-islands/index.tsx": $58, - "./routes/route-groups/(bar)/(baz)/_layout.tsx": $59, - "./routes/route-groups/(bar)/(baz)/baz.tsx": $60, - "./routes/route-groups/(bar)/_layout.tsx": $61, - "./routes/route-groups/(bar)/bar.tsx": $62, - "./routes/route-groups/(bar)/boof/index.tsx": $63, - "./routes/route-groups/(foo)/_layout.tsx": $64, - "./routes/route-groups/(foo)/index.tsx": $65, - "./routes/signal_shared.tsx": $66, - "./routes/state-in-props/_middleware.ts": $67, - "./routes/state-in-props/index.tsx": $68, - "./routes/state-middleware/_middleware.ts": $69, - "./routes/state-middleware/foo/_middleware.ts": $70, - "./routes/state-middleware/foo/index.tsx": $71, - "./routes/static.tsx": $72, - "./routes/status_overwrite.tsx": $73, - "./routes/umlaut-äöüß.tsx": $74, - "./routes/wildcard.tsx": $75, + "./routes/404-from-middleware-throw/_middleware.ts": + $_404_from_middleware_throw_middleware, + "./routes/404-from-middleware-throw/index.tsx": + $_404_from_middleware_throw_index, + "./routes/404-from-middleware/_middleware.ts": + $_404_from_middleware_middleware, + "./routes/404-from-middleware/index.tsx": $_404_from_middleware_index, + "./routes/404_from_throw.tsx": $_404_from_throw, + "./routes/[name].tsx": $_name_, + "./routes/_404.tsx": $_404, + "./routes/_500.tsx": $_500, + "./routes/_app.tsx": $_app, + "./routes/_middleware.ts": $_middleware, + "./routes/admin/[site].tsx": $admin_site_, + "./routes/api/get_only.ts": $api_get_only, + "./routes/api/head_override.ts": $api_head_override, + "./routes/assetsCaching/index.tsx": $assetsCaching_index, + "./routes/books/[id].tsx": $books_id_, + "./routes/connInfo.ts": $connInfo, + "./routes/error_boundary.tsx": $error_boundary, + "./routes/event_handler_string.tsx": $event_handler_string, + "./routes/event_handler_string_island.tsx": $event_handler_string_island, + "./routes/evil.tsx": $evil, + "./routes/failure.ts": $failure, + "./routes/head_deduplicate.tsx": $head_deduplicate, + "./routes/hooks-server/island.tsx": $hooks_server_island, + "./routes/hooks-server/useReducer.tsx": $hooks_server_useReducer, + "./routes/hooks-server/useState.tsx": $hooks_server_useState, + "./routes/i18n/[[lang]]/lang.tsx": $i18n_lang_lang, + "./routes/index.tsx": $index, + "./routes/intercept.tsx": $intercept, + "./routes/intercept_args.tsx": $intercept_args, + "./routes/islands/index.tsx": $islands_index, + "./routes/islands/multiple_island_exports.tsx": + $islands_multiple_island_exports, + "./routes/islands/returning_null.tsx": $islands_returning_null, + "./routes/islands/root_fragment.tsx": $islands_root_fragment, + "./routes/islands/root_fragment_conditional_first.tsx": + $islands_root_fragment_conditional_first, + "./routes/layeredMdw/_middleware.ts": $layeredMdw_middleware, + "./routes/layeredMdw/layer2-no-mw/without_mw.ts": + $layeredMdw_layer2_no_mw_without_mw, + "./routes/layeredMdw/layer2-with-params/[tenantId]/[id].ts": + $layeredMdw_layer2_with_params_tenantId_id_, + "./routes/layeredMdw/layer2-with-params/[tenantId]/_middleware.ts": + $layeredMdw_layer2_with_params_tenantId_middleware, + "./routes/layeredMdw/layer2-with-params/_middleware.ts": + $layeredMdw_layer2_with_params_middleware, + "./routes/layeredMdw/layer2/_middleware.ts": $layeredMdw_layer2_middleware, + "./routes/layeredMdw/layer2/abc.ts": $layeredMdw_layer2_abc, + "./routes/layeredMdw/layer2/index.ts": $layeredMdw_layer2_index, + "./routes/layeredMdw/layer2/layer3/[id].ts": $layeredMdw_layer2_layer3_id_, + "./routes/layeredMdw/layer2/layer3/_middleware.ts": + $layeredMdw_layer2_layer3_middleware, + "./routes/layeredMdw/nesting/[tenant]/[environment]/[id].tsx": + $layeredMdw_nesting_tenant_environment_id_, + "./routes/layeredMdw/nesting/[tenant]/[environment]/_middleware.ts": + $layeredMdw_nesting_tenant_environment_middleware, + "./routes/layeredMdw/nesting/[tenant]/_middleware.ts": + $layeredMdw_nesting_tenant_middleware, + "./routes/layeredMdw/nesting/_middleware.ts": + $layeredMdw_nesting_middleware, + "./routes/middleware-error-handler/_middleware.ts": + $middleware_error_handler_middleware, + "./routes/middleware-error-handler/index.tsx": + $middleware_error_handler_index, + "./routes/middleware_root.ts": $middleware_root, + "./routes/movies/[foo].json.ts": $movies_foo_json, + "./routes/movies/[foo]@[bar].ts": $movies_foo_bar_, + "./routes/nonce_inline.tsx": $nonce_inline, + "./routes/not_found.ts": $not_found, + "./routes/params.tsx": $params, + "./routes/preact/boolean_attrs.tsx": $preact_boolean_attrs, + "./routes/props/[id].tsx": $props_id_, + "./routes/route-groups-islands/index.tsx": $route_groups_islands_index, + "./routes/route-groups/(bar)/(baz)/_layout.tsx": + $route_groups_bar_baz_layout, + "./routes/route-groups/(bar)/(baz)/baz.tsx": $route_groups_bar_baz_baz, + "./routes/route-groups/(bar)/_layout.tsx": $route_groups_bar_layout, + "./routes/route-groups/(bar)/bar.tsx": $route_groups_bar_bar, + "./routes/route-groups/(bar)/boof/index.tsx": $route_groups_bar_boof_index, + "./routes/route-groups/(foo)/_layout.tsx": $route_groups_foo_layout, + "./routes/route-groups/(foo)/index.tsx": $route_groups_foo_index, + "./routes/signal_shared.tsx": $signal_shared, + "./routes/state-in-props/_middleware.ts": $state_in_props_middleware, + "./routes/state-in-props/index.tsx": $state_in_props_index, + "./routes/state-middleware/_middleware.ts": $state_middleware_middleware, + "./routes/state-middleware/foo/_middleware.ts": + $state_middleware_foo_middleware, + "./routes/state-middleware/foo/index.tsx": $state_middleware_foo_index, + "./routes/static.tsx": $static, + "./routes/status_overwrite.tsx": $status_overwrite, + "./routes/umlaut-äöüß.tsx": $umlaut_äöüß, + "./routes/wildcard.tsx": $wildcard, }, islands: { - "./islands/Counter.tsx": $$0, - "./islands/FormIsland.tsx": $$1, - "./islands/Greeter.tsx": $$2, - "./islands/HookIsland.tsx": $$3, + "./islands/Counter.tsx": $$Counter, + "./islands/FormIsland.tsx": $$FormIsland, + "./islands/Greeter.tsx": $$Greeter, + "./islands/HookIsland.tsx": $$HookIsland, "./islands/MultipleCounters.tsx": { - CounterOne: $$4.CounterOne, - CounterTwo: $$4.CounterTwo, - default: $$4.default, + CounterOne: $$MultipleCounters.CounterOne, + CounterTwo: $$MultipleCounters.CounterTwo, + default: $$MultipleCounters.default, }, - "./islands/ReturningNull.tsx": $$5, - "./islands/RootFragment.tsx": $$6, - "./islands/RootFragmentWithConditionalFirst.tsx": $$7, - "./islands/StringEventIsland.tsx": $$8, - "./islands/Test.tsx": $$9, - "./islands/folder/Counter.tsx": $$10, - "./islands/folder/subfolder/Counter.tsx": $$11, - "./islands/kebab-case-counter-test.tsx": $$12, - "./routes/route-groups-islands/(_islands)/Counter.tsx": $$13, - "./routes/route-groups-islands/(_islands)/invalid.tsx": $$14, + "./islands/ReturningNull.tsx": $$ReturningNull, + "./islands/RootFragment.tsx": $$RootFragment, + "./islands/RootFragmentWithConditionalFirst.tsx": + $$RootFragmentWithConditionalFirst, + "./islands/StringEventIsland.tsx": $$StringEventIsland, + "./islands/Test.tsx": $$Test, + "./islands/folder/Counter.tsx": $$folder_Counter, + "./islands/folder/subfolder/Counter.tsx": $$folder_subfolder_Counter, + "./islands/kebab-case-counter-test.tsx": $$kebab_case_counter_test, + "./routes/route-groups-islands/(_islands)/Counter.tsx": + $$route_groups_islands_islands_Counter, + "./routes/route-groups-islands/(_islands)/invalid.tsx": + $$route_groups_islands_islands_invalid, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/tests/fixture_async_app/fresh.gen.ts b/tests/fixture_async_app/fresh.gen.ts index e956af3c..ecc15aba 100644 --- a/tests/fixture_async_app/fresh.gen.ts +++ b/tests/fixture_async_app/fresh.gen.ts @@ -2,18 +2,20 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_app.tsx"; -import * as $1 from "./routes/_layout.tsx"; -import * as $2 from "./routes/index.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $_layout from "./routes/_layout.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_app.tsx": $0, - "./routes/_layout.tsx": $1, - "./routes/index.tsx": $2, + "./routes/_app.tsx": $_app, + "./routes/_layout.tsx": $_layout, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_build/fresh.gen.ts b/tests/fixture_build/fresh.gen.ts index a35e3677..7f26b684 100644 --- a/tests/fixture_build/fresh.gen.ts +++ b/tests/fixture_build/fresh.gen.ts @@ -2,16 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Counter.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Counter.tsx": $$0, + "./islands/Counter.tsx": $$Counter, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/tests/fixture_build_out_dir/fresh.gen.ts b/tests/fixture_build_out_dir/fresh.gen.ts index a35e3677..7f26b684 100644 --- a/tests/fixture_build_out_dir/fresh.gen.ts +++ b/tests/fixture_build_out_dir/fresh.gen.ts @@ -2,16 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Counter.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Counter.tsx": $$0, + "./islands/Counter.tsx": $$Counter, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/tests/fixture_build_out_dir_sub/src/fresh.gen.ts b/tests/fixture_build_out_dir_sub/src/fresh.gen.ts index a35e3677..7f26b684 100644 --- a/tests/fixture_build_out_dir_sub/src/fresh.gen.ts +++ b/tests/fixture_build_out_dir_sub/src/fresh.gen.ts @@ -2,16 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Counter.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Counter.tsx": $$0, + "./islands/Counter.tsx": $$Counter, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/tests/fixture_build_out_dir_sub2/src/fresh.gen.ts b/tests/fixture_build_out_dir_sub2/src/fresh.gen.ts index a35e3677..7f26b684 100644 --- a/tests/fixture_build_out_dir_sub2/src/fresh.gen.ts +++ b/tests/fixture_build_out_dir_sub2/src/fresh.gen.ts @@ -2,16 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Counter.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Counter.tsx": $$0, + "./islands/Counter.tsx": $$Counter, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/tests/fixture_build_static/fresh.gen.ts b/tests/fixture_build_static/fresh.gen.ts index b321c0e0..6999d64a 100644 --- a/tests/fixture_build_static/fresh.gen.ts +++ b/tests/fixture_build_static/fresh.gen.ts @@ -2,14 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_build_sub_dir/src/fresh.gen.ts b/tests/fixture_build_sub_dir/src/fresh.gen.ts index a35e3677..7f26b684 100644 --- a/tests/fixture_build_sub_dir/src/fresh.gen.ts +++ b/tests/fixture_build_sub_dir/src/fresh.gen.ts @@ -2,16 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Counter.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Counter.tsx": $$0, + "./islands/Counter.tsx": $$Counter, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/tests/fixture_build_target/fresh.gen.ts b/tests/fixture_build_target/fresh.gen.ts index a35e3677..7f26b684 100644 --- a/tests/fixture_build_target/fresh.gen.ts +++ b/tests/fixture_build_target/fresh.gen.ts @@ -2,16 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Counter.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Counter.tsx": $$0, + "./islands/Counter.tsx": $$Counter, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/tests/fixture_config/fresh.gen.ts b/tests/fixture_config/fresh.gen.ts index 800cc24a..6999d64a 100644 --- a/tests/fixture_config/fresh.gen.ts +++ b/tests/fixture_config/fresh.gen.ts @@ -2,13 +2,13 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; +import * as $index from "./routes/index.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, diff --git a/tests/fixture_custom_500/fresh.gen.ts b/tests/fixture_custom_500/fresh.gen.ts index f4af4a31..d5d91dc7 100644 --- a/tests/fixture_custom_500/fresh.gen.ts +++ b/tests/fixture_custom_500/fresh.gen.ts @@ -2,16 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_500.tsx"; -import * as $1 from "./routes/index.tsx"; +import * as $_500 from "./routes/_500.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_500.tsx": $0, - "./routes/index.tsx": $1, + "./routes/_500.tsx": $_500, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_define_helpers/fresh.gen.ts b/tests/fixture_define_helpers/fresh.gen.ts index e956af3c..ecc15aba 100644 --- a/tests/fixture_define_helpers/fresh.gen.ts +++ b/tests/fixture_define_helpers/fresh.gen.ts @@ -2,18 +2,20 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_app.tsx"; -import * as $1 from "./routes/_layout.tsx"; -import * as $2 from "./routes/index.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $_layout from "./routes/_layout.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_app.tsx": $0, - "./routes/_layout.tsx": $1, - "./routes/index.tsx": $2, + "./routes/_app.tsx": $_app, + "./routes/_layout.tsx": $_layout, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_dev_codeframe/fresh.gen.ts b/tests/fixture_dev_codeframe/fresh.gen.ts index f4af4a31..d5d91dc7 100644 --- a/tests/fixture_dev_codeframe/fresh.gen.ts +++ b/tests/fixture_dev_codeframe/fresh.gen.ts @@ -2,16 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_500.tsx"; -import * as $1 from "./routes/index.tsx"; +import * as $_500 from "./routes/_500.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_500.tsx": $0, - "./routes/index.tsx": $1, + "./routes/_500.tsx": $_500, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_dev_config/fresh.gen.ts b/tests/fixture_dev_config/fresh.gen.ts index 386fd9bd..898f7917 100644 --- a/tests/fixture_dev_config/fresh.gen.ts +++ b/tests/fixture_dev_config/fresh.gen.ts @@ -2,16 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/codeframe.tsx"; -import * as $1 from "./routes/index.tsx"; +import * as $codeframe from "./routes/codeframe.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/codeframe.tsx": $0, - "./routes/index.tsx": $1, + "./routes/codeframe.tsx": $codeframe, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_dev_legacy/fresh.gen.ts b/tests/fixture_dev_legacy/fresh.gen.ts index 386fd9bd..898f7917 100644 --- a/tests/fixture_dev_legacy/fresh.gen.ts +++ b/tests/fixture_dev_legacy/fresh.gen.ts @@ -2,16 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/codeframe.tsx"; -import * as $1 from "./routes/index.tsx"; +import * as $codeframe from "./routes/codeframe.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/codeframe.tsx": $0, - "./routes/index.tsx": $1, + "./routes/codeframe.tsx": $codeframe, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_error/fresh.gen.ts b/tests/fixture_error/fresh.gen.ts index cbf3ced9..57bdb8fc 100644 --- a/tests/fixture_error/fresh.gen.ts +++ b/tests/fixture_error/fresh.gen.ts @@ -2,16 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/[...all].ts"; -import * as $1 from "./routes/index.tsx"; +import * as $_all_ from "./routes/[...all].ts"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/[...all].ts": $0, - "./routes/index.tsx": $1, + "./routes/[...all].ts": $_all_, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_explicit_app/fresh.gen.ts b/tests/fixture_explicit_app/fresh.gen.ts index 3032075c..4669c3d9 100644 --- a/tests/fixture_explicit_app/fresh.gen.ts +++ b/tests/fixture_explicit_app/fresh.gen.ts @@ -2,20 +2,22 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_app.tsx"; -import * as $1 from "./routes/head.tsx"; -import * as $2 from "./routes/index.tsx"; -import * as $3 from "./routes/title.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $head from "./routes/head.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $title from "./routes/title.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_app.tsx": $0, - "./routes/head.tsx": $1, - "./routes/index.tsx": $2, - "./routes/title.tsx": $3, + "./routes/_app.tsx": $_app, + "./routes/head.tsx": $head, + "./routes/index.tsx": $index, + "./routes/title.tsx": $title, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_group_index/fresh.gen.ts b/tests/fixture_group_index/fresh.gen.ts index 15e6d748..7fbf7f8e 100644 --- a/tests/fixture_group_index/fresh.gen.ts +++ b/tests/fixture_group_index/fresh.gen.ts @@ -2,14 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/(group)/index.tsx"; +import * as $_group_index from "./routes/(group)/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/(group)/index.tsx": $0, + "./routes/(group)/index.tsx": $_group_index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_hmr/fresh.gen.ts b/tests/fixture_hmr/fresh.gen.ts index 23d6ef79..8740e7f8 100644 --- a/tests/fixture_hmr/fresh.gen.ts +++ b/tests/fixture_hmr/fresh.gen.ts @@ -2,21 +2,22 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $1 from "./routes/island.tsx"; -import * as $2 from "./routes/no_island.tsx"; -import * as $$0 from "./islands/Counter.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $island from "./routes/island.tsx"; +import * as $no_island from "./routes/no_island.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, - "./routes/island.tsx": $1, - "./routes/no_island.tsx": $2, + "./routes/index.tsx": $index, + "./routes/island.tsx": $island, + "./routes/no_island.tsx": $no_island, }, islands: { - "./islands/Counter.tsx": $$0, + "./islands/Counter.tsx": $$Counter, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_invalid_handlers/fresh.gen.ts b/tests/fixture_invalid_handlers/fresh.gen.ts index b321c0e0..2ff7a309 100644 --- a/tests/fixture_invalid_handlers/fresh.gen.ts +++ b/tests/fixture_invalid_handlers/fresh.gen.ts @@ -2,11 +2,11 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; +import * as $index from "./routes/index.tsx"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, diff --git a/tests/fixture_island_nesting/fresh.gen.ts b/tests/fixture_island_nesting/fresh.gen.ts index aace6688..332f1866 100644 --- a/tests/fixture_island_nesting/fresh.gen.ts +++ b/tests/fixture_island_nesting/fresh.gen.ts @@ -2,73 +2,75 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/dropdown.tsx"; -import * as $1 from "./routes/index.tsx"; -import * as $2 from "./routes/island_conditional.tsx"; -import * as $3 from "./routes/island_conditional_lazy.tsx"; -import * as $4 from "./routes/island_conditional_lazy_island.tsx"; -import * as $5 from "./routes/island_fn_child.tsx"; -import * as $6 from "./routes/island_in_island.tsx"; -import * as $7 from "./routes/island_in_island_definition.tsx"; -import * as $8 from "./routes/island_invalid_children.tsx"; -import * as $9 from "./routes/island_invalid_children_fn.tsx"; -import * as $10 from "./routes/island_jsx_child.tsx"; -import * as $11 from "./routes/island_jsx_children.tsx"; -import * as $12 from "./routes/island_jsx_island_jsx.tsx"; -import * as $13 from "./routes/island_jsx_text.tsx"; -import * as $14 from "./routes/island_nested_props.tsx"; -import * as $15 from "./routes/island_order.tsx"; -import * as $16 from "./routes/island_siblings.tsx"; -import * as $17 from "./routes/island_valid_children.tsx"; -import * as $$0 from "./islands/BooleanButton.tsx"; -import * as $$1 from "./islands/Counter.tsx"; -import * as $$2 from "./islands/Dropdown.tsx"; -import * as $$3 from "./islands/FragmentIsland.tsx"; -import * as $$4 from "./islands/Island.tsx"; -import * as $$5 from "./islands/IslandCenter.tsx"; -import * as $$6 from "./islands/IslandConditional.tsx"; -import * as $$7 from "./islands/IslandFn.tsx"; -import * as $$8 from "./islands/IslandInsideIsland.tsx"; -import * as $$9 from "./islands/IslandWithProps.tsx"; -import * as $$10 from "./islands/PassThrough.tsx"; -import * as $$11 from "./islands/ReadyMarker.tsx"; +import * as $dropdown from "./routes/dropdown.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $island_conditional from "./routes/island_conditional.tsx"; +import * as $island_conditional_lazy from "./routes/island_conditional_lazy.tsx"; +import * as $island_conditional_lazy_island from "./routes/island_conditional_lazy_island.tsx"; +import * as $island_fn_child from "./routes/island_fn_child.tsx"; +import * as $island_in_island from "./routes/island_in_island.tsx"; +import * as $island_in_island_definition from "./routes/island_in_island_definition.tsx"; +import * as $island_invalid_children from "./routes/island_invalid_children.tsx"; +import * as $island_invalid_children_fn from "./routes/island_invalid_children_fn.tsx"; +import * as $island_jsx_child from "./routes/island_jsx_child.tsx"; +import * as $island_jsx_children from "./routes/island_jsx_children.tsx"; +import * as $island_jsx_island_jsx from "./routes/island_jsx_island_jsx.tsx"; +import * as $island_jsx_text from "./routes/island_jsx_text.tsx"; +import * as $island_nested_props from "./routes/island_nested_props.tsx"; +import * as $island_order from "./routes/island_order.tsx"; +import * as $island_siblings from "./routes/island_siblings.tsx"; +import * as $island_valid_children from "./routes/island_valid_children.tsx"; +import * as $$BooleanButton from "./islands/BooleanButton.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; +import * as $$Dropdown from "./islands/Dropdown.tsx"; +import * as $$FragmentIsland from "./islands/FragmentIsland.tsx"; +import * as $$Island from "./islands/Island.tsx"; +import * as $$IslandCenter from "./islands/IslandCenter.tsx"; +import * as $$IslandConditional from "./islands/IslandConditional.tsx"; +import * as $$IslandFn from "./islands/IslandFn.tsx"; +import * as $$IslandInsideIsland from "./islands/IslandInsideIsland.tsx"; +import * as $$IslandWithProps from "./islands/IslandWithProps.tsx"; +import * as $$PassThrough from "./islands/PassThrough.tsx"; +import * as $$ReadyMarker from "./islands/ReadyMarker.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/dropdown.tsx": $0, - "./routes/index.tsx": $1, - "./routes/island_conditional.tsx": $2, - "./routes/island_conditional_lazy.tsx": $3, - "./routes/island_conditional_lazy_island.tsx": $4, - "./routes/island_fn_child.tsx": $5, - "./routes/island_in_island.tsx": $6, - "./routes/island_in_island_definition.tsx": $7, - "./routes/island_invalid_children.tsx": $8, - "./routes/island_invalid_children_fn.tsx": $9, - "./routes/island_jsx_child.tsx": $10, - "./routes/island_jsx_children.tsx": $11, - "./routes/island_jsx_island_jsx.tsx": $12, - "./routes/island_jsx_text.tsx": $13, - "./routes/island_nested_props.tsx": $14, - "./routes/island_order.tsx": $15, - "./routes/island_siblings.tsx": $16, - "./routes/island_valid_children.tsx": $17, + "./routes/dropdown.tsx": $dropdown, + "./routes/index.tsx": $index, + "./routes/island_conditional.tsx": $island_conditional, + "./routes/island_conditional_lazy.tsx": $island_conditional_lazy, + "./routes/island_conditional_lazy_island.tsx": + $island_conditional_lazy_island, + "./routes/island_fn_child.tsx": $island_fn_child, + "./routes/island_in_island.tsx": $island_in_island, + "./routes/island_in_island_definition.tsx": $island_in_island_definition, + "./routes/island_invalid_children.tsx": $island_invalid_children, + "./routes/island_invalid_children_fn.tsx": $island_invalid_children_fn, + "./routes/island_jsx_child.tsx": $island_jsx_child, + "./routes/island_jsx_children.tsx": $island_jsx_children, + "./routes/island_jsx_island_jsx.tsx": $island_jsx_island_jsx, + "./routes/island_jsx_text.tsx": $island_jsx_text, + "./routes/island_nested_props.tsx": $island_nested_props, + "./routes/island_order.tsx": $island_order, + "./routes/island_siblings.tsx": $island_siblings, + "./routes/island_valid_children.tsx": $island_valid_children, }, islands: { - "./islands/BooleanButton.tsx": $$0, - "./islands/Counter.tsx": $$1, - "./islands/Dropdown.tsx": $$2, - "./islands/FragmentIsland.tsx": $$3, - "./islands/Island.tsx": $$4, - "./islands/IslandCenter.tsx": $$5, - "./islands/IslandConditional.tsx": $$6, - "./islands/IslandFn.tsx": $$7, - "./islands/IslandInsideIsland.tsx": $$8, - "./islands/IslandWithProps.tsx": $$9, - "./islands/PassThrough.tsx": $$10, - "./islands/ReadyMarker.tsx": $$11, + "./islands/BooleanButton.tsx": $$BooleanButton, + "./islands/Counter.tsx": $$Counter, + "./islands/Dropdown.tsx": $$Dropdown, + "./islands/FragmentIsland.tsx": $$FragmentIsland, + "./islands/Island.tsx": $$Island, + "./islands/IslandCenter.tsx": $$IslandCenter, + "./islands/IslandConditional.tsx": $$IslandConditional, + "./islands/IslandFn.tsx": $$IslandFn, + "./islands/IslandInsideIsland.tsx": $$IslandInsideIsland, + "./islands/IslandWithProps.tsx": $$IslandWithProps, + "./islands/PassThrough.tsx": $$PassThrough, + "./islands/ReadyMarker.tsx": $$ReadyMarker, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_jsx_pragma/fresh.gen.ts b/tests/fixture_jsx_pragma/fresh.gen.ts index b3d1d791..01c9ea7c 100644 --- a/tests/fixture_jsx_pragma/fresh.gen.ts +++ b/tests/fixture_jsx_pragma/fresh.gen.ts @@ -2,17 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Island.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Island from "./islands/Island.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Island.tsx": $$0, + "./islands/Island.tsx": $$Island, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_layouts/fresh.gen.ts b/tests/fixture_layouts/fresh.gen.ts index ec4fd98f..cc6144f4 100644 --- a/tests/fixture_layouts/fresh.gen.ts +++ b/tests/fixture_layouts/fresh.gen.ts @@ -2,79 +2,82 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_app.tsx"; -import * as $1 from "./routes/_layout.tsx"; -import * as $2 from "./routes/_middleware.ts"; -import * as $3 from "./routes/async/_layout.tsx"; -import * as $4 from "./routes/async/index.tsx"; -import * as $5 from "./routes/async/redirect/_layout.tsx"; -import * as $6 from "./routes/async/redirect/index.tsx"; -import * as $7 from "./routes/async/sub/_layout.tsx"; -import * as $8 from "./routes/async/sub/index.tsx"; -import * as $9 from "./routes/dynamic/[tenant]/index.tsx"; -import * as $10 from "./routes/files/js/_layout.js"; -import * as $11 from "./routes/files/js/index.js"; -import * as $12 from "./routes/files/jsx/_layout.jsx"; -import * as $13 from "./routes/files/jsx/index.jsx"; -import * as $14 from "./routes/files/ts/_layout.ts"; -import * as $15 from "./routes/files/ts/index.ts"; -import * as $16 from "./routes/files/tsx/_layout.tsx"; -import * as $17 from "./routes/files/tsx/index.tsx"; -import * as $18 from "./routes/foo/_layout.tsx"; -import * as $19 from "./routes/foo/bar.tsx"; -import * as $20 from "./routes/foo/index.tsx"; -import * as $21 from "./routes/index.tsx"; -import * as $22 from "./routes/other.tsx"; -import * as $23 from "./routes/override/_layout.tsx"; -import * as $24 from "./routes/override/index.tsx"; -import * as $25 from "./routes/override/layout_no_app/_layout.tsx"; -import * as $26 from "./routes/override/layout_no_app/index.tsx"; -import * as $27 from "./routes/override/no_app.tsx"; -import * as $28 from "./routes/override/no_layout.tsx"; -import * as $29 from "./routes/override/no_layout_no_app.tsx"; -import * as $30 from "./routes/skip/sub/_layout.tsx"; -import * as $31 from "./routes/skip/sub/index.tsx"; -import * as $$0 from "./routes/dynamic/[tenant]/(_islands)/Counter.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $_layout from "./routes/_layout.tsx"; +import * as $_middleware from "./routes/_middleware.ts"; +import * as $async_layout from "./routes/async/_layout.tsx"; +import * as $async_index from "./routes/async/index.tsx"; +import * as $async_redirect_layout from "./routes/async/redirect/_layout.tsx"; +import * as $async_redirect_index from "./routes/async/redirect/index.tsx"; +import * as $async_sub_layout from "./routes/async/sub/_layout.tsx"; +import * as $async_sub_index from "./routes/async/sub/index.tsx"; +import * as $dynamic_tenant_index from "./routes/dynamic/[tenant]/index.tsx"; +import * as $files_js_layout from "./routes/files/js/_layout.js"; +import * as $files_js_index from "./routes/files/js/index.js"; +import * as $files_jsx_layout from "./routes/files/jsx/_layout.jsx"; +import * as $files_jsx_index from "./routes/files/jsx/index.jsx"; +import * as $files_ts_layout from "./routes/files/ts/_layout.ts"; +import * as $files_ts_index from "./routes/files/ts/index.ts"; +import * as $files_tsx_layout from "./routes/files/tsx/_layout.tsx"; +import * as $files_tsx_index from "./routes/files/tsx/index.tsx"; +import * as $foo_layout from "./routes/foo/_layout.tsx"; +import * as $foo_bar from "./routes/foo/bar.tsx"; +import * as $foo_index from "./routes/foo/index.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $other from "./routes/other.tsx"; +import * as $override_layout from "./routes/override/_layout.tsx"; +import * as $override_index from "./routes/override/index.tsx"; +import * as $override_layout_no_app_layout from "./routes/override/layout_no_app/_layout.tsx"; +import * as $override_layout_no_app_index from "./routes/override/layout_no_app/index.tsx"; +import * as $override_no_app from "./routes/override/no_app.tsx"; +import * as $override_no_layout from "./routes/override/no_layout.tsx"; +import * as $override_no_layout_no_app from "./routes/override/no_layout_no_app.tsx"; +import * as $skip_sub_layout from "./routes/skip/sub/_layout.tsx"; +import * as $skip_sub_index from "./routes/skip/sub/index.tsx"; +import * as $$dynamic_tenant_islands_Counter from "./routes/dynamic/[tenant]/(_islands)/Counter.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_app.tsx": $0, - "./routes/_layout.tsx": $1, - "./routes/_middleware.ts": $2, - "./routes/async/_layout.tsx": $3, - "./routes/async/index.tsx": $4, - "./routes/async/redirect/_layout.tsx": $5, - "./routes/async/redirect/index.tsx": $6, - "./routes/async/sub/_layout.tsx": $7, - "./routes/async/sub/index.tsx": $8, - "./routes/dynamic/[tenant]/index.tsx": $9, - "./routes/files/js/_layout.js": $10, - "./routes/files/js/index.js": $11, - "./routes/files/jsx/_layout.jsx": $12, - "./routes/files/jsx/index.jsx": $13, - "./routes/files/ts/_layout.ts": $14, - "./routes/files/ts/index.ts": $15, - "./routes/files/tsx/_layout.tsx": $16, - "./routes/files/tsx/index.tsx": $17, - "./routes/foo/_layout.tsx": $18, - "./routes/foo/bar.tsx": $19, - "./routes/foo/index.tsx": $20, - "./routes/index.tsx": $21, - "./routes/other.tsx": $22, - "./routes/override/_layout.tsx": $23, - "./routes/override/index.tsx": $24, - "./routes/override/layout_no_app/_layout.tsx": $25, - "./routes/override/layout_no_app/index.tsx": $26, - "./routes/override/no_app.tsx": $27, - "./routes/override/no_layout.tsx": $28, - "./routes/override/no_layout_no_app.tsx": $29, - "./routes/skip/sub/_layout.tsx": $30, - "./routes/skip/sub/index.tsx": $31, + "./routes/_app.tsx": $_app, + "./routes/_layout.tsx": $_layout, + "./routes/_middleware.ts": $_middleware, + "./routes/async/_layout.tsx": $async_layout, + "./routes/async/index.tsx": $async_index, + "./routes/async/redirect/_layout.tsx": $async_redirect_layout, + "./routes/async/redirect/index.tsx": $async_redirect_index, + "./routes/async/sub/_layout.tsx": $async_sub_layout, + "./routes/async/sub/index.tsx": $async_sub_index, + "./routes/dynamic/[tenant]/index.tsx": $dynamic_tenant_index, + "./routes/files/js/_layout.js": $files_js_layout, + "./routes/files/js/index.js": $files_js_index, + "./routes/files/jsx/_layout.jsx": $files_jsx_layout, + "./routes/files/jsx/index.jsx": $files_jsx_index, + "./routes/files/ts/_layout.ts": $files_ts_layout, + "./routes/files/ts/index.ts": $files_ts_index, + "./routes/files/tsx/_layout.tsx": $files_tsx_layout, + "./routes/files/tsx/index.tsx": $files_tsx_index, + "./routes/foo/_layout.tsx": $foo_layout, + "./routes/foo/bar.tsx": $foo_bar, + "./routes/foo/index.tsx": $foo_index, + "./routes/index.tsx": $index, + "./routes/other.tsx": $other, + "./routes/override/_layout.tsx": $override_layout, + "./routes/override/index.tsx": $override_index, + "./routes/override/layout_no_app/_layout.tsx": + $override_layout_no_app_layout, + "./routes/override/layout_no_app/index.tsx": $override_layout_no_app_index, + "./routes/override/no_app.tsx": $override_no_app, + "./routes/override/no_layout.tsx": $override_no_layout, + "./routes/override/no_layout_no_app.tsx": $override_no_layout_no_app, + "./routes/skip/sub/_layout.tsx": $skip_sub_layout, + "./routes/skip/sub/index.tsx": $skip_sub_index, }, islands: { - "./routes/dynamic/[tenant]/(_islands)/Counter.tsx": $$0, + "./routes/dynamic/[tenant]/(_islands)/Counter.tsx": + $$dynamic_tenant_islands_Counter, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_layouts_2/fresh.gen.ts b/tests/fixture_layouts_2/fresh.gen.ts index e956af3c..ecc15aba 100644 --- a/tests/fixture_layouts_2/fresh.gen.ts +++ b/tests/fixture_layouts_2/fresh.gen.ts @@ -2,18 +2,20 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_app.tsx"; -import * as $1 from "./routes/_layout.tsx"; -import * as $2 from "./routes/index.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $_layout from "./routes/_layout.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_app.tsx": $0, - "./routes/_layout.tsx": $1, - "./routes/index.tsx": $2, + "./routes/_app.tsx": $_app, + "./routes/_layout.tsx": $_layout, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_npm/fresh.gen.ts b/tests/fixture_npm/fresh.gen.ts index 4b8b98e7..9965d958 100644 --- a/tests/fixture_npm/fresh.gen.ts +++ b/tests/fixture_npm/fresh.gen.ts @@ -2,17 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Test.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Test from "./islands/Test.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Test.tsx": $$0, + "./islands/Test.tsx": $$Test, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_partials/fresh.gen.ts b/tests/fixture_partials/fresh.gen.ts index efd54452..82abfd95 100644 --- a/tests/fixture_partials/fresh.gen.ts +++ b/tests/fixture_partials/fresh.gen.ts @@ -2,259 +2,271 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_app.tsx"; -import * as $1 from "./routes/active_nav/foo/bar.tsx"; -import * as $2 from "./routes/active_nav/foo/index.tsx"; -import * as $3 from "./routes/active_nav/index.tsx"; -import * as $4 from "./routes/active_nav/island.tsx"; -import * as $5 from "./routes/active_nav_partial/_layout.tsx"; -import * as $6 from "./routes/active_nav_partial/foo/bar.tsx"; -import * as $7 from "./routes/active_nav_partial/foo/index.tsx"; -import * as $8 from "./routes/active_nav_partial/index.tsx"; -import * as $9 from "./routes/active_nav_partial/island.tsx"; -import * as $10 from "./routes/button/index.tsx"; -import * as $11 from "./routes/button/update.tsx"; -import * as $12 from "./routes/client_nav/_layout.tsx"; -import * as $13 from "./routes/client_nav/index.tsx"; -import * as $14 from "./routes/client_nav/injected.tsx"; -import * as $15 from "./routes/client_nav/page-a.tsx"; -import * as $16 from "./routes/client_nav/page-b.tsx"; -import * as $17 from "./routes/client_nav/page-c.tsx"; -import * as $18 from "./routes/client_nav_both/_layout.tsx"; -import * as $19 from "./routes/client_nav_both/index.tsx"; -import * as $20 from "./routes/client_nav_both/page-a.tsx"; -import * as $21 from "./routes/client_nav_both/page-b.tsx"; -import * as $22 from "./routes/client_nav_both/page-c.tsx"; -import * as $23 from "./routes/client_nav_opt_out/_layout.tsx"; -import * as $24 from "./routes/client_nav_opt_out/index.tsx"; -import * as $25 from "./routes/client_nav_opt_out/injected.tsx"; -import * as $26 from "./routes/client_nav_opt_out/page-a.tsx"; -import * as $27 from "./routes/client_nav_opt_out/page-b.tsx"; -import * as $28 from "./routes/client_nav_opt_out/page-c.tsx"; -import * as $29 from "./routes/deep_partial/index.tsx"; -import * as $30 from "./routes/deep_partial/injected.tsx"; -import * as $31 from "./routes/deep_partial/update.tsx"; -import * as $32 from "./routes/duplicate_name/index.tsx"; -import * as $33 from "./routes/form/index.tsx"; -import * as $34 from "./routes/form/injected.tsx"; -import * as $35 from "./routes/form/update.tsx"; -import * as $36 from "./routes/form_get/index.tsx"; -import * as $37 from "./routes/form_post/index.tsx"; -import * as $38 from "./routes/form_submitter/index.tsx"; -import * as $39 from "./routes/form_submitter_partial/index.tsx"; -import * as $40 from "./routes/form_submitter_partial_no_client_nav/index.tsx"; -import * as $41 from "./routes/fragment_nav.tsx"; -import * as $42 from "./routes/fragment_nav_scroll.tsx"; -import * as $43 from "./routes/head_merge/duplicate.tsx"; -import * as $44 from "./routes/head_merge/index.tsx"; -import * as $45 from "./routes/head_merge/injected.tsx"; -import * as $46 from "./routes/head_merge/update.tsx"; -import * as $47 from "./routes/index.tsx"; -import * as $48 from "./routes/isPartial/_middleware.ts"; -import * as $49 from "./routes/isPartial/async.tsx"; -import * as $50 from "./routes/isPartial/handler.tsx"; -import * as $51 from "./routes/isPartial/index.tsx"; -import * as $52 from "./routes/isPartial/injected.tsx"; -import * as $53 from "./routes/island_instance/index.tsx"; -import * as $54 from "./routes/island_instance/injected.tsx"; -import * as $55 from "./routes/island_instance/partial.tsx"; -import * as $56 from "./routes/island_instance/partial_remove.tsx"; -import * as $57 from "./routes/island_instance/partial_replace.tsx"; -import * as $58 from "./routes/island_instance_multiple/index.tsx"; -import * as $59 from "./routes/island_instance_multiple/injected.tsx"; -import * as $60 from "./routes/island_instance_multiple/partial.tsx"; -import * as $61 from "./routes/island_instance_multiple/partial_both.tsx"; -import * as $62 from "./routes/island_instance_nested/index.tsx"; -import * as $63 from "./routes/island_instance_nested/injected.tsx"; -import * as $64 from "./routes/island_instance_nested/partial.tsx"; -import * as $65 from "./routes/island_instance_nested/replace.tsx"; -import * as $66 from "./routes/island_props/index.tsx"; -import * as $67 from "./routes/island_props/injected.tsx"; -import * as $68 from "./routes/island_props/partial.tsx"; -import * as $69 from "./routes/island_props_signals/index.tsx"; -import * as $70 from "./routes/island_props_signals/injected.tsx"; -import * as $71 from "./routes/island_props_signals/partial.tsx"; -import * as $72 from "./routes/keys/index.tsx"; -import * as $73 from "./routes/keys/injected.tsx"; -import * as $74 from "./routes/keys/swap.tsx"; -import * as $75 from "./routes/keys_components/index.tsx"; -import * as $76 from "./routes/keys_components/injected.tsx"; -import * as $77 from "./routes/keys_components/swap.tsx"; -import * as $78 from "./routes/keys_confusion/index.tsx"; -import * as $79 from "./routes/keys_dom/index.tsx"; -import * as $80 from "./routes/keys_dom/injected.tsx"; -import * as $81 from "./routes/keys_dom/swap.tsx"; -import * as $82 from "./routes/keys_outside/index.tsx"; -import * as $83 from "./routes/loading/index.tsx"; -import * as $84 from "./routes/loading/injected.tsx"; -import * as $85 from "./routes/loading/update.tsx"; -import * as $86 from "./routes/missing_partial/index.tsx"; -import * as $87 from "./routes/missing_partial/injected.tsx"; -import * as $88 from "./routes/missing_partial/update.tsx"; -import * as $89 from "./routes/mode/append.tsx"; -import * as $90 from "./routes/mode/index.tsx"; -import * as $91 from "./routes/mode/injected.tsx"; -import * as $92 from "./routes/mode/prepend.tsx"; -import * as $93 from "./routes/mode/replace.tsx"; -import * as $94 from "./routes/nested/index.tsx"; -import * as $95 from "./routes/nested/inner.tsx"; -import * as $96 from "./routes/nested/outer.tsx"; -import * as $97 from "./routes/no_islands/index.tsx"; -import * as $98 from "./routes/no_islands/injected.tsx"; -import * as $99 from "./routes/no_islands/update.tsx"; -import * as $100 from "./routes/no_partial_response/index.tsx"; -import * as $101 from "./routes/no_partial_response/injected.tsx"; -import * as $102 from "./routes/no_partial_response/update.tsx"; -import * as $103 from "./routes/partial_slot_inside_island.tsx"; -import * as $104 from "./routes/relative_link/index.tsx"; -import * as $105 from "./routes/scroll_restoration/index.tsx"; -import * as $106 from "./routes/scroll_restoration/injected.tsx"; -import * as $107 from "./routes/scroll_restoration/update.tsx"; -import * as $$0 from "./islands/Counter.tsx"; -import * as $$1 from "./islands/CounterA.tsx"; -import * as $$2 from "./islands/CounterB.tsx"; -import * as $$3 from "./islands/Fader.tsx"; -import * as $$4 from "./islands/InvalidSlot.tsx"; -import * as $$5 from "./islands/KeyExplorer.tsx"; -import * as $$6 from "./islands/LazyLink.tsx"; -import * as $$7 from "./islands/Logger.tsx"; -import * as $$8 from "./islands/Other.tsx"; -import * as $$9 from "./islands/PartialTrigger.tsx"; -import * as $$10 from "./islands/PassThrough.tsx"; -import * as $$11 from "./islands/PropIsland.tsx"; -import * as $$12 from "./islands/SignalProp.tsx"; -import * as $$13 from "./islands/Spinner.tsx"; -import * as $$14 from "./islands/Stateful.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $active_nav_foo_bar from "./routes/active_nav/foo/bar.tsx"; +import * as $active_nav_foo_index from "./routes/active_nav/foo/index.tsx"; +import * as $active_nav_index from "./routes/active_nav/index.tsx"; +import * as $active_nav_island from "./routes/active_nav/island.tsx"; +import * as $active_nav_partial_layout from "./routes/active_nav_partial/_layout.tsx"; +import * as $active_nav_partial_foo_bar from "./routes/active_nav_partial/foo/bar.tsx"; +import * as $active_nav_partial_foo_index from "./routes/active_nav_partial/foo/index.tsx"; +import * as $active_nav_partial_index from "./routes/active_nav_partial/index.tsx"; +import * as $active_nav_partial_island from "./routes/active_nav_partial/island.tsx"; +import * as $button_index from "./routes/button/index.tsx"; +import * as $button_update from "./routes/button/update.tsx"; +import * as $client_nav_layout from "./routes/client_nav/_layout.tsx"; +import * as $client_nav_index from "./routes/client_nav/index.tsx"; +import * as $client_nav_injected from "./routes/client_nav/injected.tsx"; +import * as $client_nav_page_a from "./routes/client_nav/page-a.tsx"; +import * as $client_nav_page_b from "./routes/client_nav/page-b.tsx"; +import * as $client_nav_page_c from "./routes/client_nav/page-c.tsx"; +import * as $client_nav_both_layout from "./routes/client_nav_both/_layout.tsx"; +import * as $client_nav_both_index from "./routes/client_nav_both/index.tsx"; +import * as $client_nav_both_page_a from "./routes/client_nav_both/page-a.tsx"; +import * as $client_nav_both_page_b from "./routes/client_nav_both/page-b.tsx"; +import * as $client_nav_both_page_c from "./routes/client_nav_both/page-c.tsx"; +import * as $client_nav_opt_out_layout from "./routes/client_nav_opt_out/_layout.tsx"; +import * as $client_nav_opt_out_index from "./routes/client_nav_opt_out/index.tsx"; +import * as $client_nav_opt_out_injected from "./routes/client_nav_opt_out/injected.tsx"; +import * as $client_nav_opt_out_page_a from "./routes/client_nav_opt_out/page-a.tsx"; +import * as $client_nav_opt_out_page_b from "./routes/client_nav_opt_out/page-b.tsx"; +import * as $client_nav_opt_out_page_c from "./routes/client_nav_opt_out/page-c.tsx"; +import * as $deep_partial_index from "./routes/deep_partial/index.tsx"; +import * as $deep_partial_injected from "./routes/deep_partial/injected.tsx"; +import * as $deep_partial_update from "./routes/deep_partial/update.tsx"; +import * as $duplicate_name_index from "./routes/duplicate_name/index.tsx"; +import * as $form_index from "./routes/form/index.tsx"; +import * as $form_injected from "./routes/form/injected.tsx"; +import * as $form_update from "./routes/form/update.tsx"; +import * as $form_get_index from "./routes/form_get/index.tsx"; +import * as $form_post_index from "./routes/form_post/index.tsx"; +import * as $form_submitter_index from "./routes/form_submitter/index.tsx"; +import * as $form_submitter_partial_index from "./routes/form_submitter_partial/index.tsx"; +import * as $form_submitter_partial_no_client_nav_index from "./routes/form_submitter_partial_no_client_nav/index.tsx"; +import * as $fragment_nav from "./routes/fragment_nav.tsx"; +import * as $fragment_nav_scroll from "./routes/fragment_nav_scroll.tsx"; +import * as $head_merge_duplicate from "./routes/head_merge/duplicate.tsx"; +import * as $head_merge_index from "./routes/head_merge/index.tsx"; +import * as $head_merge_injected from "./routes/head_merge/injected.tsx"; +import * as $head_merge_update from "./routes/head_merge/update.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $isPartial_middleware from "./routes/isPartial/_middleware.ts"; +import * as $isPartial_async from "./routes/isPartial/async.tsx"; +import * as $isPartial_handler from "./routes/isPartial/handler.tsx"; +import * as $isPartial_index from "./routes/isPartial/index.tsx"; +import * as $isPartial_injected from "./routes/isPartial/injected.tsx"; +import * as $island_instance_index from "./routes/island_instance/index.tsx"; +import * as $island_instance_injected from "./routes/island_instance/injected.tsx"; +import * as $island_instance_partial from "./routes/island_instance/partial.tsx"; +import * as $island_instance_partial_remove from "./routes/island_instance/partial_remove.tsx"; +import * as $island_instance_partial_replace from "./routes/island_instance/partial_replace.tsx"; +import * as $island_instance_multiple_index from "./routes/island_instance_multiple/index.tsx"; +import * as $island_instance_multiple_injected from "./routes/island_instance_multiple/injected.tsx"; +import * as $island_instance_multiple_partial from "./routes/island_instance_multiple/partial.tsx"; +import * as $island_instance_multiple_partial_both from "./routes/island_instance_multiple/partial_both.tsx"; +import * as $island_instance_nested_index from "./routes/island_instance_nested/index.tsx"; +import * as $island_instance_nested_injected from "./routes/island_instance_nested/injected.tsx"; +import * as $island_instance_nested_partial from "./routes/island_instance_nested/partial.tsx"; +import * as $island_instance_nested_replace from "./routes/island_instance_nested/replace.tsx"; +import * as $island_props_index from "./routes/island_props/index.tsx"; +import * as $island_props_injected from "./routes/island_props/injected.tsx"; +import * as $island_props_partial from "./routes/island_props/partial.tsx"; +import * as $island_props_signals_index from "./routes/island_props_signals/index.tsx"; +import * as $island_props_signals_injected from "./routes/island_props_signals/injected.tsx"; +import * as $island_props_signals_partial from "./routes/island_props_signals/partial.tsx"; +import * as $keys_index from "./routes/keys/index.tsx"; +import * as $keys_injected from "./routes/keys/injected.tsx"; +import * as $keys_swap from "./routes/keys/swap.tsx"; +import * as $keys_components_index from "./routes/keys_components/index.tsx"; +import * as $keys_components_injected from "./routes/keys_components/injected.tsx"; +import * as $keys_components_swap from "./routes/keys_components/swap.tsx"; +import * as $keys_confusion_index from "./routes/keys_confusion/index.tsx"; +import * as $keys_dom_index from "./routes/keys_dom/index.tsx"; +import * as $keys_dom_injected from "./routes/keys_dom/injected.tsx"; +import * as $keys_dom_swap from "./routes/keys_dom/swap.tsx"; +import * as $keys_outside_index from "./routes/keys_outside/index.tsx"; +import * as $loading_index from "./routes/loading/index.tsx"; +import * as $loading_injected from "./routes/loading/injected.tsx"; +import * as $loading_update from "./routes/loading/update.tsx"; +import * as $missing_partial_index from "./routes/missing_partial/index.tsx"; +import * as $missing_partial_injected from "./routes/missing_partial/injected.tsx"; +import * as $missing_partial_update from "./routes/missing_partial/update.tsx"; +import * as $mode_append from "./routes/mode/append.tsx"; +import * as $mode_index from "./routes/mode/index.tsx"; +import * as $mode_injected from "./routes/mode/injected.tsx"; +import * as $mode_prepend from "./routes/mode/prepend.tsx"; +import * as $mode_replace from "./routes/mode/replace.tsx"; +import * as $nested_index from "./routes/nested/index.tsx"; +import * as $nested_inner from "./routes/nested/inner.tsx"; +import * as $nested_outer from "./routes/nested/outer.tsx"; +import * as $no_islands_index from "./routes/no_islands/index.tsx"; +import * as $no_islands_injected from "./routes/no_islands/injected.tsx"; +import * as $no_islands_update from "./routes/no_islands/update.tsx"; +import * as $no_partial_response_index from "./routes/no_partial_response/index.tsx"; +import * as $no_partial_response_injected from "./routes/no_partial_response/injected.tsx"; +import * as $no_partial_response_update from "./routes/no_partial_response/update.tsx"; +import * as $partial_slot_inside_island from "./routes/partial_slot_inside_island.tsx"; +import * as $relative_link_index from "./routes/relative_link/index.tsx"; +import * as $scroll_restoration_index from "./routes/scroll_restoration/index.tsx"; +import * as $scroll_restoration_injected from "./routes/scroll_restoration/injected.tsx"; +import * as $scroll_restoration_update from "./routes/scroll_restoration/update.tsx"; +import * as $$Counter from "./islands/Counter.tsx"; +import * as $$CounterA from "./islands/CounterA.tsx"; +import * as $$CounterB from "./islands/CounterB.tsx"; +import * as $$Fader from "./islands/Fader.tsx"; +import * as $$InvalidSlot from "./islands/InvalidSlot.tsx"; +import * as $$KeyExplorer from "./islands/KeyExplorer.tsx"; +import * as $$LazyLink from "./islands/LazyLink.tsx"; +import * as $$Logger from "./islands/Logger.tsx"; +import * as $$Other from "./islands/Other.tsx"; +import * as $$PartialTrigger from "./islands/PartialTrigger.tsx"; +import * as $$PassThrough from "./islands/PassThrough.tsx"; +import * as $$PropIsland from "./islands/PropIsland.tsx"; +import * as $$SignalProp from "./islands/SignalProp.tsx"; +import * as $$Spinner from "./islands/Spinner.tsx"; +import * as $$Stateful from "./islands/Stateful.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_app.tsx": $0, - "./routes/active_nav/foo/bar.tsx": $1, - "./routes/active_nav/foo/index.tsx": $2, - "./routes/active_nav/index.tsx": $3, - "./routes/active_nav/island.tsx": $4, - "./routes/active_nav_partial/_layout.tsx": $5, - "./routes/active_nav_partial/foo/bar.tsx": $6, - "./routes/active_nav_partial/foo/index.tsx": $7, - "./routes/active_nav_partial/index.tsx": $8, - "./routes/active_nav_partial/island.tsx": $9, - "./routes/button/index.tsx": $10, - "./routes/button/update.tsx": $11, - "./routes/client_nav/_layout.tsx": $12, - "./routes/client_nav/index.tsx": $13, - "./routes/client_nav/injected.tsx": $14, - "./routes/client_nav/page-a.tsx": $15, - "./routes/client_nav/page-b.tsx": $16, - "./routes/client_nav/page-c.tsx": $17, - "./routes/client_nav_both/_layout.tsx": $18, - "./routes/client_nav_both/index.tsx": $19, - "./routes/client_nav_both/page-a.tsx": $20, - "./routes/client_nav_both/page-b.tsx": $21, - "./routes/client_nav_both/page-c.tsx": $22, - "./routes/client_nav_opt_out/_layout.tsx": $23, - "./routes/client_nav_opt_out/index.tsx": $24, - "./routes/client_nav_opt_out/injected.tsx": $25, - "./routes/client_nav_opt_out/page-a.tsx": $26, - "./routes/client_nav_opt_out/page-b.tsx": $27, - "./routes/client_nav_opt_out/page-c.tsx": $28, - "./routes/deep_partial/index.tsx": $29, - "./routes/deep_partial/injected.tsx": $30, - "./routes/deep_partial/update.tsx": $31, - "./routes/duplicate_name/index.tsx": $32, - "./routes/form/index.tsx": $33, - "./routes/form/injected.tsx": $34, - "./routes/form/update.tsx": $35, - "./routes/form_get/index.tsx": $36, - "./routes/form_post/index.tsx": $37, - "./routes/form_submitter/index.tsx": $38, - "./routes/form_submitter_partial/index.tsx": $39, - "./routes/form_submitter_partial_no_client_nav/index.tsx": $40, - "./routes/fragment_nav.tsx": $41, - "./routes/fragment_nav_scroll.tsx": $42, - "./routes/head_merge/duplicate.tsx": $43, - "./routes/head_merge/index.tsx": $44, - "./routes/head_merge/injected.tsx": $45, - "./routes/head_merge/update.tsx": $46, - "./routes/index.tsx": $47, - "./routes/isPartial/_middleware.ts": $48, - "./routes/isPartial/async.tsx": $49, - "./routes/isPartial/handler.tsx": $50, - "./routes/isPartial/index.tsx": $51, - "./routes/isPartial/injected.tsx": $52, - "./routes/island_instance/index.tsx": $53, - "./routes/island_instance/injected.tsx": $54, - "./routes/island_instance/partial.tsx": $55, - "./routes/island_instance/partial_remove.tsx": $56, - "./routes/island_instance/partial_replace.tsx": $57, - "./routes/island_instance_multiple/index.tsx": $58, - "./routes/island_instance_multiple/injected.tsx": $59, - "./routes/island_instance_multiple/partial.tsx": $60, - "./routes/island_instance_multiple/partial_both.tsx": $61, - "./routes/island_instance_nested/index.tsx": $62, - "./routes/island_instance_nested/injected.tsx": $63, - "./routes/island_instance_nested/partial.tsx": $64, - "./routes/island_instance_nested/replace.tsx": $65, - "./routes/island_props/index.tsx": $66, - "./routes/island_props/injected.tsx": $67, - "./routes/island_props/partial.tsx": $68, - "./routes/island_props_signals/index.tsx": $69, - "./routes/island_props_signals/injected.tsx": $70, - "./routes/island_props_signals/partial.tsx": $71, - "./routes/keys/index.tsx": $72, - "./routes/keys/injected.tsx": $73, - "./routes/keys/swap.tsx": $74, - "./routes/keys_components/index.tsx": $75, - "./routes/keys_components/injected.tsx": $76, - "./routes/keys_components/swap.tsx": $77, - "./routes/keys_confusion/index.tsx": $78, - "./routes/keys_dom/index.tsx": $79, - "./routes/keys_dom/injected.tsx": $80, - "./routes/keys_dom/swap.tsx": $81, - "./routes/keys_outside/index.tsx": $82, - "./routes/loading/index.tsx": $83, - "./routes/loading/injected.tsx": $84, - "./routes/loading/update.tsx": $85, - "./routes/missing_partial/index.tsx": $86, - "./routes/missing_partial/injected.tsx": $87, - "./routes/missing_partial/update.tsx": $88, - "./routes/mode/append.tsx": $89, - "./routes/mode/index.tsx": $90, - "./routes/mode/injected.tsx": $91, - "./routes/mode/prepend.tsx": $92, - "./routes/mode/replace.tsx": $93, - "./routes/nested/index.tsx": $94, - "./routes/nested/inner.tsx": $95, - "./routes/nested/outer.tsx": $96, - "./routes/no_islands/index.tsx": $97, - "./routes/no_islands/injected.tsx": $98, - "./routes/no_islands/update.tsx": $99, - "./routes/no_partial_response/index.tsx": $100, - "./routes/no_partial_response/injected.tsx": $101, - "./routes/no_partial_response/update.tsx": $102, - "./routes/partial_slot_inside_island.tsx": $103, - "./routes/relative_link/index.tsx": $104, - "./routes/scroll_restoration/index.tsx": $105, - "./routes/scroll_restoration/injected.tsx": $106, - "./routes/scroll_restoration/update.tsx": $107, + "./routes/_app.tsx": $_app, + "./routes/active_nav/foo/bar.tsx": $active_nav_foo_bar, + "./routes/active_nav/foo/index.tsx": $active_nav_foo_index, + "./routes/active_nav/index.tsx": $active_nav_index, + "./routes/active_nav/island.tsx": $active_nav_island, + "./routes/active_nav_partial/_layout.tsx": $active_nav_partial_layout, + "./routes/active_nav_partial/foo/bar.tsx": $active_nav_partial_foo_bar, + "./routes/active_nav_partial/foo/index.tsx": $active_nav_partial_foo_index, + "./routes/active_nav_partial/index.tsx": $active_nav_partial_index, + "./routes/active_nav_partial/island.tsx": $active_nav_partial_island, + "./routes/button/index.tsx": $button_index, + "./routes/button/update.tsx": $button_update, + "./routes/client_nav/_layout.tsx": $client_nav_layout, + "./routes/client_nav/index.tsx": $client_nav_index, + "./routes/client_nav/injected.tsx": $client_nav_injected, + "./routes/client_nav/page-a.tsx": $client_nav_page_a, + "./routes/client_nav/page-b.tsx": $client_nav_page_b, + "./routes/client_nav/page-c.tsx": $client_nav_page_c, + "./routes/client_nav_both/_layout.tsx": $client_nav_both_layout, + "./routes/client_nav_both/index.tsx": $client_nav_both_index, + "./routes/client_nav_both/page-a.tsx": $client_nav_both_page_a, + "./routes/client_nav_both/page-b.tsx": $client_nav_both_page_b, + "./routes/client_nav_both/page-c.tsx": $client_nav_both_page_c, + "./routes/client_nav_opt_out/_layout.tsx": $client_nav_opt_out_layout, + "./routes/client_nav_opt_out/index.tsx": $client_nav_opt_out_index, + "./routes/client_nav_opt_out/injected.tsx": $client_nav_opt_out_injected, + "./routes/client_nav_opt_out/page-a.tsx": $client_nav_opt_out_page_a, + "./routes/client_nav_opt_out/page-b.tsx": $client_nav_opt_out_page_b, + "./routes/client_nav_opt_out/page-c.tsx": $client_nav_opt_out_page_c, + "./routes/deep_partial/index.tsx": $deep_partial_index, + "./routes/deep_partial/injected.tsx": $deep_partial_injected, + "./routes/deep_partial/update.tsx": $deep_partial_update, + "./routes/duplicate_name/index.tsx": $duplicate_name_index, + "./routes/form/index.tsx": $form_index, + "./routes/form/injected.tsx": $form_injected, + "./routes/form/update.tsx": $form_update, + "./routes/form_get/index.tsx": $form_get_index, + "./routes/form_post/index.tsx": $form_post_index, + "./routes/form_submitter/index.tsx": $form_submitter_index, + "./routes/form_submitter_partial/index.tsx": $form_submitter_partial_index, + "./routes/form_submitter_partial_no_client_nav/index.tsx": + $form_submitter_partial_no_client_nav_index, + "./routes/fragment_nav.tsx": $fragment_nav, + "./routes/fragment_nav_scroll.tsx": $fragment_nav_scroll, + "./routes/head_merge/duplicate.tsx": $head_merge_duplicate, + "./routes/head_merge/index.tsx": $head_merge_index, + "./routes/head_merge/injected.tsx": $head_merge_injected, + "./routes/head_merge/update.tsx": $head_merge_update, + "./routes/index.tsx": $index, + "./routes/isPartial/_middleware.ts": $isPartial_middleware, + "./routes/isPartial/async.tsx": $isPartial_async, + "./routes/isPartial/handler.tsx": $isPartial_handler, + "./routes/isPartial/index.tsx": $isPartial_index, + "./routes/isPartial/injected.tsx": $isPartial_injected, + "./routes/island_instance/index.tsx": $island_instance_index, + "./routes/island_instance/injected.tsx": $island_instance_injected, + "./routes/island_instance/partial.tsx": $island_instance_partial, + "./routes/island_instance/partial_remove.tsx": + $island_instance_partial_remove, + "./routes/island_instance/partial_replace.tsx": + $island_instance_partial_replace, + "./routes/island_instance_multiple/index.tsx": + $island_instance_multiple_index, + "./routes/island_instance_multiple/injected.tsx": + $island_instance_multiple_injected, + "./routes/island_instance_multiple/partial.tsx": + $island_instance_multiple_partial, + "./routes/island_instance_multiple/partial_both.tsx": + $island_instance_multiple_partial_both, + "./routes/island_instance_nested/index.tsx": $island_instance_nested_index, + "./routes/island_instance_nested/injected.tsx": + $island_instance_nested_injected, + "./routes/island_instance_nested/partial.tsx": + $island_instance_nested_partial, + "./routes/island_instance_nested/replace.tsx": + $island_instance_nested_replace, + "./routes/island_props/index.tsx": $island_props_index, + "./routes/island_props/injected.tsx": $island_props_injected, + "./routes/island_props/partial.tsx": $island_props_partial, + "./routes/island_props_signals/index.tsx": $island_props_signals_index, + "./routes/island_props_signals/injected.tsx": + $island_props_signals_injected, + "./routes/island_props_signals/partial.tsx": $island_props_signals_partial, + "./routes/keys/index.tsx": $keys_index, + "./routes/keys/injected.tsx": $keys_injected, + "./routes/keys/swap.tsx": $keys_swap, + "./routes/keys_components/index.tsx": $keys_components_index, + "./routes/keys_components/injected.tsx": $keys_components_injected, + "./routes/keys_components/swap.tsx": $keys_components_swap, + "./routes/keys_confusion/index.tsx": $keys_confusion_index, + "./routes/keys_dom/index.tsx": $keys_dom_index, + "./routes/keys_dom/injected.tsx": $keys_dom_injected, + "./routes/keys_dom/swap.tsx": $keys_dom_swap, + "./routes/keys_outside/index.tsx": $keys_outside_index, + "./routes/loading/index.tsx": $loading_index, + "./routes/loading/injected.tsx": $loading_injected, + "./routes/loading/update.tsx": $loading_update, + "./routes/missing_partial/index.tsx": $missing_partial_index, + "./routes/missing_partial/injected.tsx": $missing_partial_injected, + "./routes/missing_partial/update.tsx": $missing_partial_update, + "./routes/mode/append.tsx": $mode_append, + "./routes/mode/index.tsx": $mode_index, + "./routes/mode/injected.tsx": $mode_injected, + "./routes/mode/prepend.tsx": $mode_prepend, + "./routes/mode/replace.tsx": $mode_replace, + "./routes/nested/index.tsx": $nested_index, + "./routes/nested/inner.tsx": $nested_inner, + "./routes/nested/outer.tsx": $nested_outer, + "./routes/no_islands/index.tsx": $no_islands_index, + "./routes/no_islands/injected.tsx": $no_islands_injected, + "./routes/no_islands/update.tsx": $no_islands_update, + "./routes/no_partial_response/index.tsx": $no_partial_response_index, + "./routes/no_partial_response/injected.tsx": $no_partial_response_injected, + "./routes/no_partial_response/update.tsx": $no_partial_response_update, + "./routes/partial_slot_inside_island.tsx": $partial_slot_inside_island, + "./routes/relative_link/index.tsx": $relative_link_index, + "./routes/scroll_restoration/index.tsx": $scroll_restoration_index, + "./routes/scroll_restoration/injected.tsx": $scroll_restoration_injected, + "./routes/scroll_restoration/update.tsx": $scroll_restoration_update, }, islands: { - "./islands/Counter.tsx": $$0, - "./islands/CounterA.tsx": $$1, - "./islands/CounterB.tsx": $$2, - "./islands/Fader.tsx": $$3, - "./islands/InvalidSlot.tsx": $$4, - "./islands/KeyExplorer.tsx": $$5, - "./islands/LazyLink.tsx": $$6, - "./islands/Logger.tsx": $$7, - "./islands/Other.tsx": $$8, - "./islands/PartialTrigger.tsx": $$9, - "./islands/PassThrough.tsx": $$10, - "./islands/PropIsland.tsx": $$11, - "./islands/SignalProp.tsx": $$12, - "./islands/Spinner.tsx": $$13, - "./islands/Stateful.tsx": $$14, + "./islands/Counter.tsx": $$Counter, + "./islands/CounterA.tsx": $$CounterA, + "./islands/CounterB.tsx": $$CounterB, + "./islands/Fader.tsx": $$Fader, + "./islands/InvalidSlot.tsx": $$InvalidSlot, + "./islands/KeyExplorer.tsx": $$KeyExplorer, + "./islands/LazyLink.tsx": $$LazyLink, + "./islands/Logger.tsx": $$Logger, + "./islands/Other.tsx": $$Other, + "./islands/PartialTrigger.tsx": $$PartialTrigger, + "./islands/PassThrough.tsx": $$PassThrough, + "./islands/PropIsland.tsx": $$PropIsland, + "./islands/SignalProp.tsx": $$SignalProp, + "./islands/Spinner.tsx": $$Spinner, + "./islands/Stateful.tsx": $$Stateful, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_plugin/fresh.gen.ts b/tests/fixture_plugin/fresh.gen.ts index aa6f8833..57fc65c4 100644 --- a/tests/fixture_plugin/fresh.gen.ts +++ b/tests/fixture_plugin/fresh.gen.ts @@ -2,23 +2,24 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/lots-of-middleware/index.tsx"; -import * as $1 from "./routes/static.tsx"; -import * as $2 from "./routes/test.tsx"; -import * as $3 from "./routes/with-island.tsx"; -import * as $$0 from "./islands/Island.tsx"; +import * as $lots_of_middleware_index from "./routes/lots-of-middleware/index.tsx"; +import * as $static from "./routes/static.tsx"; +import * as $test from "./routes/test.tsx"; +import * as $with_island from "./routes/with-island.tsx"; +import * as $$Island from "./islands/Island.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/lots-of-middleware/index.tsx": $0, - "./routes/static.tsx": $1, - "./routes/test.tsx": $2, - "./routes/with-island.tsx": $3, + "./routes/lots-of-middleware/index.tsx": $lots_of_middleware_index, + "./routes/static.tsx": $static, + "./routes/test.tsx": $test, + "./routes/with-island.tsx": $with_island, }, islands: { - "./islands/Island.tsx": $$0, + "./islands/Island.tsx": $$Island, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_plugin_error/fresh.gen.ts b/tests/fixture_plugin_error/fresh.gen.ts index b3d1d791..01c9ea7c 100644 --- a/tests/fixture_plugin_error/fresh.gen.ts +++ b/tests/fixture_plugin_error/fresh.gen.ts @@ -2,17 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; -import * as $$0 from "./islands/Island.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $$Island from "./islands/Island.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: { - "./islands/Island.tsx": $$0, + "./islands/Island.tsx": $$Island, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_plugin_lifecycle/fresh.gen.ts b/tests/fixture_plugin_lifecycle/fresh.gen.ts index 800cc24a..6999d64a 100644 --- a/tests/fixture_plugin_lifecycle/fresh.gen.ts +++ b/tests/fixture_plugin_lifecycle/fresh.gen.ts @@ -2,13 +2,13 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; +import * as $index from "./routes/index.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, diff --git a/tests/fixture_render/fresh.gen.ts b/tests/fixture_render/fresh.gen.ts index 09efdc24..2c4826d5 100644 --- a/tests/fixture_render/fresh.gen.ts +++ b/tests/fixture_render/fresh.gen.ts @@ -2,22 +2,24 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/head_style.tsx"; -import * as $1 from "./routes/header_arr.tsx"; -import * as $2 from "./routes/header_instance.tsx"; -import * as $3 from "./routes/header_obj.tsx"; -import * as $4 from "./routes/index.tsx"; +import * as $head_style from "./routes/head_style.tsx"; +import * as $header_arr from "./routes/header_arr.tsx"; +import * as $header_instance from "./routes/header_instance.tsx"; +import * as $header_obj from "./routes/header_obj.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/head_style.tsx": $0, - "./routes/header_arr.tsx": $1, - "./routes/header_instance.tsx": $2, - "./routes/header_obj.tsx": $3, - "./routes/index.tsx": $4, + "./routes/head_style.tsx": $head_style, + "./routes/header_arr.tsx": $header_arr, + "./routes/header_instance.tsx": $header_instance, + "./routes/header_obj.tsx": $header_obj, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_render_error/fresh.gen.ts b/tests/fixture_render_error/fresh.gen.ts index b321c0e0..6999d64a 100644 --- a/tests/fixture_render_error/fresh.gen.ts +++ b/tests/fixture_render_error/fresh.gen.ts @@ -2,14 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_router/fresh.gen.ts b/tests/fixture_router/fresh.gen.ts index 8dcbe75e..12b458b9 100644 --- a/tests/fixture_router/fresh.gen.ts +++ b/tests/fixture_router/fresh.gen.ts @@ -2,16 +2,18 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/about.tsx"; -import * as $1 from "./routes/index.tsx"; +import * as $about from "./routes/about.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/about.tsx": $0, - "./routes/index.tsx": $1, + "./routes/about.tsx": $about, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_router_ignore_files/fresh.gen.ts b/tests/fixture_router_ignore_files/fresh.gen.ts index b321c0e0..6999d64a 100644 --- a/tests/fixture_router_ignore_files/fresh.gen.ts +++ b/tests/fixture_router_ignore_files/fresh.gen.ts @@ -2,14 +2,16 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/index.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/index.tsx": $0, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_server_components/fresh.gen.ts b/tests/fixture_server_components/fresh.gen.ts index d1b0f471..d59ad262 100644 --- a/tests/fixture_server_components/fresh.gen.ts +++ b/tests/fixture_server_components/fresh.gen.ts @@ -2,29 +2,30 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/basic.tsx"; -import * as $1 from "./routes/context/[id].tsx"; -import * as $2 from "./routes/fail.tsx"; -import * as $3 from "./routes/index.tsx"; -import * as $4 from "./routes/island.tsx"; -import * as $5 from "./routes/response.tsx"; -import * as $6 from "./routes/twind.tsx"; -import * as $$0 from "./islands/FooIsland.tsx"; +import * as $basic from "./routes/basic.tsx"; +import * as $context_id_ from "./routes/context/[id].tsx"; +import * as $fail from "./routes/fail.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $island from "./routes/island.tsx"; +import * as $response from "./routes/response.tsx"; +import * as $twind from "./routes/twind.tsx"; +import * as $$FooIsland from "./islands/FooIsland.tsx"; +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/basic.tsx": $0, - "./routes/context/[id].tsx": $1, - "./routes/fail.tsx": $2, - "./routes/index.tsx": $3, - "./routes/island.tsx": $4, - "./routes/response.tsx": $5, - "./routes/twind.tsx": $6, + "./routes/basic.tsx": $basic, + "./routes/context/[id].tsx": $context_id_, + "./routes/fail.tsx": $fail, + "./routes/index.tsx": $index, + "./routes/island.tsx": $island, + "./routes/response.tsx": $response, + "./routes/twind.tsx": $twind, }, islands: { - "./islands/FooIsland.tsx": $$0, + "./islands/FooIsland.tsx": $$FooIsland, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_twind_app/fresh.gen.ts b/tests/fixture_twind_app/fresh.gen.ts index 690567f8..44b43efa 100644 --- a/tests/fixture_twind_app/fresh.gen.ts +++ b/tests/fixture_twind_app/fresh.gen.ts @@ -2,18 +2,20 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/_app.tsx"; -import * as $1 from "./routes/app_class.tsx"; -import * as $2 from "./routes/index.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $app_class from "./routes/app_class.tsx"; +import * as $index from "./routes/index.tsx"; + +import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/_app.tsx": $0, - "./routes/app_class.tsx": $1, - "./routes/index.tsx": $2, + "./routes/_app.tsx": $_app, + "./routes/app_class.tsx": $app_class, + "./routes/index.tsx": $index, }, islands: {}, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/tests/fixture_twind_hydrate/fresh.gen.ts b/tests/fixture_twind_hydrate/fresh.gen.ts index 9d16f912..1d3c2858 100644 --- a/tests/fixture_twind_hydrate/fresh.gen.ts +++ b/tests/fixture_twind_hydrate/fresh.gen.ts @@ -2,32 +2,32 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/check-duplication.tsx"; -import * as $1 from "./routes/insert-cssrules.tsx"; -import * as $2 from "./routes/island_twind/_layout.tsx"; -import * as $3 from "./routes/island_twind/blue.tsx"; -import * as $4 from "./routes/island_twind/index.tsx"; -import * as $5 from "./routes/static.tsx"; -import * as $6 from "./routes/unused.tsx"; -import * as $7 from "./routes/unused_tw.tsx"; -import * as $$0 from "./islands/CheckDuplication.tsx"; -import * as $$1 from "./islands/InsertCssrules.tsx"; +import * as $check_duplication from "./routes/check-duplication.tsx"; +import * as $insert_cssrules from "./routes/insert-cssrules.tsx"; +import * as $island_twind_layout from "./routes/island_twind/_layout.tsx"; +import * as $island_twind_blue from "./routes/island_twind/blue.tsx"; +import * as $island_twind_index from "./routes/island_twind/index.tsx"; +import * as $static from "./routes/static.tsx"; +import * as $unused from "./routes/unused.tsx"; +import * as $unused_tw from "./routes/unused_tw.tsx"; +import * as $$CheckDuplication from "./islands/CheckDuplication.tsx"; +import * as $$InsertCssrules from "./islands/InsertCssrules.tsx"; import { Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/check-duplication.tsx": $0, - "./routes/insert-cssrules.tsx": $1, - "./routes/island_twind/_layout.tsx": $2, - "./routes/island_twind/blue.tsx": $3, - "./routes/island_twind/index.tsx": $4, - "./routes/static.tsx": $5, - "./routes/unused.tsx": $6, - "./routes/unused_tw.tsx": $7, + "./routes/check-duplication.tsx": $check_duplication, + "./routes/insert-cssrules.tsx": $insert_cssrules, + "./routes/island_twind/_layout.tsx": $island_twind_layout, + "./routes/island_twind/blue.tsx": $island_twind_blue, + "./routes/island_twind/index.tsx": $island_twind_index, + "./routes/static.tsx": $static, + "./routes/unused.tsx": $unused, + "./routes/unused_tw.tsx": $unused_tw, }, islands: { - "./islands/CheckDuplication.tsx": $$0, - "./islands/InsertCssrules.tsx": $$1, + "./islands/CheckDuplication.tsx": $$CheckDuplication, + "./islands/InsertCssrules.tsx": $$InsertCssrules, }, baseUrl: import.meta.url, } satisfies Manifest;