Working toward an openly accessable registry
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:
@ -64,6 +64,7 @@ export const basicauth = (realm: string) => (next: ABC.HandlerFunc) => (
|
||||
export function extractPackagePath(path: string): [string, string | undefined] {
|
||||
let packageName = "";
|
||||
path = path.toLowerCase();
|
||||
|
||||
if (path.startsWith("@")) {
|
||||
packageName = "@";
|
||||
path = path.slice(1);
|
||||
@ -81,7 +82,6 @@ export function extractPackagePath(path: string): [string, string | undefined] {
|
||||
if (packageVersion !== "") {
|
||||
if (!isValidVersion(packageVersion))
|
||||
throw new Error("Invalid package version!");
|
||||
else packageVersion = undefined;
|
||||
}
|
||||
|
||||
return [packageName, packageVersion];
|
||||
|
Reference in New Issue
Block a user