Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #89 from pwa-builder/url-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jgw96 authored Jun 1, 2022
2 parents 2b751e8 + 40f7e16 commit 012b88a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "PWA Studio",
"description": "PWA Studio makes VSCode the best development environment for building PWAs!",
"publisher": "PWABuilder",
"version": "1.0.4",
"version": "1.0.5",
"icon": "store_assets/icon_512.png",
"repository": {
"type": "git",
Expand Down
4 changes: 0 additions & 4 deletions src/services/package/package-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,6 @@ async function packageWithPwaBuilder(): Promise<any> {
});

if (packageData) {
const url = getURL();

trackEvent("package", { packageType: "Windows", url: url, stage: "complete" });

return packageData.blob();
}
}
Expand Down
22 changes: 10 additions & 12 deletions src/services/web-publish.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as vscode from "vscode";
import { storageManager } from "../extension";
import { validateUrl } from "./package/package-android-app";

let url: string | undefined = undefined;

Expand All @@ -11,17 +10,16 @@ export function getURL(): string | undefined {

export async function setURL(url: string | undefined): Promise<void> {
if (url && url.length > 0) {
const isValidURL = validateUrl(url);
if (isValidURL) {
storageManager?.setValue<any>("urlData", {
url: url,
});
}
else {
vscode.window.showErrorMessage(
"Invalid URL. Please enter a valid URL."
);
}
storageManager?.setValue<any>("urlData", {
url: url,
});

// to-do: Find a better way to validate URLs

// show information message about url being added
vscode.window.showInformationMessage(
"Your URL has been added"
);

await vscode.commands.executeCommand("pwa-studio.refreshPackageView");
}
Expand Down

0 comments on commit 012b88a

Please sign in to comment.