Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.
This commit is contained in:
4
node_modules/astro/dist/cli/db/index.d.ts
generated
vendored
Normal file
4
node_modules/astro/dist/cli/db/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { Arguments } from 'yargs-parser';
|
||||
export declare function db({ flags }: {
|
||||
flags: Arguments;
|
||||
}): Promise<void>;
|
27
node_modules/astro/dist/cli/db/index.js
generated
vendored
Normal file
27
node_modules/astro/dist/cli/db/index.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { resolveConfig } from "../../core/config/config.js";
|
||||
import { apply as applyPolyfill } from "../../core/polyfill.js";
|
||||
import { createLoggerFromFlags, flagsToAstroInlineConfig } from "../flags.js";
|
||||
import { getPackage } from "../install-package.js";
|
||||
async function db({ flags }) {
|
||||
applyPolyfill();
|
||||
const logger = createLoggerFromFlags(flags);
|
||||
const getPackageOpts = {
|
||||
skipAsk: !!flags.yes || !!flags.y,
|
||||
cwd: flags.root
|
||||
};
|
||||
const dbPackage = await getPackage("@astrojs/db", logger, getPackageOpts, []);
|
||||
if (!dbPackage) {
|
||||
logger.error(
|
||||
"check",
|
||||
"The `@astrojs/db` package is required for this command to work. Please manually install it in your project and try again."
|
||||
);
|
||||
return;
|
||||
}
|
||||
const { cli } = dbPackage;
|
||||
const inlineConfig = flagsToAstroInlineConfig(flags);
|
||||
const { astroConfig } = await resolveConfig(inlineConfig, "build");
|
||||
await cli({ flags, config: astroConfig });
|
||||
}
|
||||
export {
|
||||
db
|
||||
};
|
Reference in New Issue
Block a user