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 +1 -1
- package/dist/cli.js +3 -2
- package/package.json +1 -1
- package/src-tauri/src/app/invoke.rs +10 -8
- package/src-tauri/tauri.linux.conf.json +1 -3
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/
|
|
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.
|
|
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,8 +1,8 @@
|
|
|
1
|
-
use crate::util::{check_file_or_append, get_download_message,
|
|
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
|
|
23
|
-
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
let response = client
|
|
23
|
+
.send(
|
|
24
|
+
HttpRequestBuilder::new("GET", ¶ms.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": "",
|