pake-cli 2.2.0 โ†’ 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -107,7 +107,7 @@
107
107
  </tr>
108
108
  <tr>
109
109
  <td><img src=https://cdn.fliggy.com/upic/i2eg6G.png width=600/></td>
110
- <td><img src=https://cdn.fliggy.com/upic/fS1lVi.jpg width=600/></td>
110
+ <td><img src=https://cdn.fliggy.com/upic/mUzOek.jpg width=600/></td>
111
111
  </tr>
112
112
  <tr>
113
113
  <td>Flomo
package/dist/cli.js CHANGED
@@ -20,7 +20,7 @@ import isUrl from 'is-url';
20
20
  import fs from 'fs';
21
21
 
22
22
  var name = "pake-cli";
23
- var version = "2.2.0";
23
+ var version = "2.2.4";
24
24
  var description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust. ๐Ÿคฑ๐Ÿป ๅพˆ็ฎ€ๅ•็š„็”จ Rust ๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆๅพˆๅฐ็š„ๆกŒ้ข Appใ€‚";
25
25
  var engines = {
26
26
  node: ">=16.0.0"
@@ -436,8 +436,9 @@ async function isChinaIP(ip, domain) {
436
436
  }
437
437
 
438
438
  async function installRust() {
439
+ const isActions = process.env.GITHUB_ACTIONS;
439
440
  const isInChina = await isChinaDomain('sh.rustup.rs');
440
- const rustInstallScriptForMac = isInChina
441
+ const rustInstallScriptForMac = isInChina && !isActions
441
442
  ? 'export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" && curl --proto "=https" --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh'
442
443
  : "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
443
444
  const rustInstallScriptForWindows = 'winget install --id Rustlang.Rustup';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "2.2.0",
3
+ "version": "2.2.4",
4
4
  "description": "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust. ๐Ÿคฑ๐Ÿป ๅพˆ็ฎ€ๅ•็š„็”จ Rust ๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆๅพˆๅฐ็š„ๆกŒ้ข Appใ€‚",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
@@ -1,8 +1,8 @@
1
- use crate::util::{check_file_or_append, get_download_message, MessageType, show_toast};
2
- use tauri::{api, command, AppHandle, Manager, Window};
3
- use tauri::api::http::{ClientBuilder, HttpRequestBuilder, ResponseType};
1
+ use crate::util::{check_file_or_append, get_download_message, show_toast, MessageType};
4
2
  use std::fs::File;
5
3
  use std::io::Write;
4
+ use tauri::api::http::{ClientBuilder, HttpRequestBuilder, ResponseType};
5
+ use tauri::{api, command, AppHandle, Manager, Window};
6
6
 
7
7
  #[derive(serde::Deserialize)]
8
8
  pub struct DownloadFileParams {
@@ -19,11 +19,13 @@ pub async fn download_file(app: AppHandle, params: DownloadFileParams) -> Result
19
19
  let file_path = check_file_or_append(output_path.to_str().unwrap());
20
20
  let client = ClientBuilder::new().build().unwrap();
21
21
 
22
- let response = client.send(
23
- HttpRequestBuilder::new("GET", &params.url)
24
- .unwrap()
25
- .response_type(ResponseType::Binary)
26
- ).await;
22
+ let response = client
23
+ .send(
24
+ HttpRequestBuilder::new("GET", &params.url)
25
+ .unwrap()
26
+ .response_type(ResponseType::Binary),
27
+ )
28
+ .await;
27
29
 
28
30
  match response {
29
31
  Ok(res) => {
@@ -8,9 +8,7 @@
8
8
  "copyright": "",
9
9
  "deb": {
10
10
  "depends": ["curl", "wget"],
11
- "files": {
12
- "/usr/share/applications/com-pake-weread.desktop": "assets/com-pake-weread.desktop"
13
- }
11
+ "files": {"/usr/share/applications/com-pake-weread.desktop": "assets/com-pake-weread.desktop"}
14
12
  },
15
13
  "externalBin": [],
16
14
  "longDescription": "",