Fixing path extraction
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4aaee3e419
commit
2d6c62a791
@ -29,7 +29,6 @@ export default async function render(
|
||||
name: string,
|
||||
data: any
|
||||
): Promise<Deno.Reader> {
|
||||
console.log(config);
|
||||
const component: {
|
||||
default: () => JSX.IntrinsicElements | Promise<JSX.IntrinsicElements>;
|
||||
} = await import(`./views/${name}.tsx`);
|
||||
|
@ -74,7 +74,7 @@ export function extractPackagePath(path: string): [string, string | undefined] {
|
||||
if (parts.length > 2) throw new Error("Invalid package name!");
|
||||
|
||||
packageName += parts[0];
|
||||
let packageVersion: string | undefined = path[1];
|
||||
let packageVersion: string | undefined = parts[1];
|
||||
|
||||
if (!isValidPackageName(packageName))
|
||||
throw new Error("Invalid package name!");
|
||||
@ -96,6 +96,7 @@ export async function getFile(
|
||||
version: string | null | undefined,
|
||||
file: string
|
||||
): Promise<{ etag: string; data: Uint8Array } | null | undefined> {
|
||||
console.log("Searching for file: %s/%s@%s", pkgName, file, version);
|
||||
const meta = await db.package.findOne({ name: pkgName });
|
||||
|
||||
if (!meta || meta.versions.length < 1) return null;
|
||||
|
Loading…
Reference in New Issue
Block a user