|
48 | 48 | ) |
49 | 49 |
|
50 | 50 | # Constants |
51 | | -BIN_VERSION = "0.2.0" |
| 51 | +BIN_VERSION = "0.3.0" |
52 | 52 |
|
53 | 53 | T = TypeVar("T", bound=WebViewNotification) |
54 | 54 |
|
@@ -85,26 +85,29 @@ async def get_webview_bin(options: WebViewOptions) -> str: |
85 | 85 | flags = "-transparent" |
86 | 86 |
|
87 | 87 | cache_dir = get_cache_dir() |
88 | | - file_name = f"deno-webview-{BIN_VERSION}{flags}" |
| 88 | + file_name = f"webview-{BIN_VERSION}{flags}" |
89 | 89 | if platform.system() == "Windows": |
90 | 90 | file_name += ".exe" |
91 | 91 | file_path = cache_dir / file_name |
92 | 92 |
|
93 | 93 | if file_path.exists(): |
94 | 94 | return str(file_path) |
95 | 95 |
|
96 | | - url = f"https://github.com/zephraph/webview/releases/download/webview-v{BIN_VERSION}/deno-webview" |
| 96 | + url = f"https://github.com/zephraph/webview/releases/download/webview-v{BIN_VERSION}/webview" |
97 | 97 | if platform.system() == "Darwin": |
98 | 98 | url += "-mac" |
99 | 99 | if platform.machine() == "arm64": |
100 | 100 | url += "-arm64" |
101 | 101 | elif platform.system() == "Linux": |
102 | 102 | url += "-linux" |
103 | 103 | elif platform.system() == "Windows": |
104 | | - url += "-windows.exe" |
| 104 | + url += "-windows" |
105 | 105 | else: |
106 | 106 | raise ValueError("Unsupported OS") |
107 | 107 |
|
| 108 | + if platform.system() == "Windows": |
| 109 | + url += ".exe" |
| 110 | + |
108 | 111 | url += flags |
109 | 112 |
|
110 | 113 | async with httpx.AsyncClient() as client: |
@@ -216,7 +219,7 @@ async def send(self, request: WebViewRequest) -> WebViewResponse: |
216 | 219 | def set_result(event: Union[AckResponse, ResultResponse, ErrResponse]) -> None: |
217 | 220 | future.set_result(event) |
218 | 221 |
|
219 | | - self.internal_event.once(request.id, set_result) # type: ignore |
| 222 | + self.internal_event.once(str(request.id), set_result) # type: ignore |
220 | 223 |
|
221 | 224 | assert self.process.stdin is not None |
222 | 225 | encoded = msgspec.json.encode(request) |
|
0 commit comments