Skip to content

Commit

Permalink
Relax regex expression for ext URL. (#2423)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenzlong committed Jul 7, 2020
1 parent a1a68cf commit e10851b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/extensions/extensionsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ export enum SpecParamType {
}

export const logPrefix = "extensions";
// Extension archive URLs follow this format: {GITHUB_ARCHIVE_URL}#{EXTENSION_ROOT},
// e.g. https://github.com/firebase/extensions/archive/next.zip#extensions-next/delete-user-data.
// EXTENSION_ROOT is optional for single-extension archives and required for multi-extension archives.
export const urlRegex = /^https:\/\/.*(\.zip|\.tar|\.tar\.gz|\.gz|\.tgz)(#.*)?$/;
// Extension archive URLs must be HTTPS.
export const urlRegex = /^https:/;
export const EXTENSIONS_BUCKET_NAME = envOverride(
"FIREBASE_EXTENSIONS_UPLOAD_BUCKET",
"firebase-ext-eap-uploads"
Expand Down Expand Up @@ -348,6 +346,7 @@ export async function createSourceFromLocation(
[packageUri, extensionRoot] = sourceUri.split("#");
}
const res = await createSource(projectId, packageUri, extensionRoot);
logger.debug("Created new Extension Source %s", res.name);
// if we uploaded an object, delete it
if (objectPath.length) {
try {
Expand Down

0 comments on commit e10851b

Please sign in to comment.