2024.5.0-beta.2 (#38)

This commit is contained in:
Gregory Schier
2024-06-03 14:03:25 -07:00
committed by GitHub
parent 2383e8468f
commit 5b12fad173
29 changed files with 242 additions and 184 deletions

View File

@@ -131,6 +131,7 @@ function j(e) {
form: b(t.formdata).map(
(n) => n.src != null ? {
enabled: !n.disabled,
contentType: n.contentType ?? null,
name: n.key ?? "",
file: n.src ?? ""
} : {

View File

@@ -89,14 +89,24 @@ pub async fn send_http_request(
let uri = match http::Uri::from_str(url_string.as_str()) {
Ok(u) => u,
Err(e) => {
return response_err(response, e.to_string(), window).await;
return response_err(
response,
format!("Failed to parse URL \"{}\": {}", url_string, e.to_string()),
window,
)
.await;
}
};
// Yes, we're parsing both URI and URL because they could return different errors
let url = match Url::from_str(uri.to_string().as_str()) {
Ok(u) => u,
Err(e) => {
return response_err(response, e.to_string(), window).await;
return response_err(
response,
format!("Failed to parse URL \"{}\": {}", url_string, e.to_string()),
window,
)
.await;
}
};

View File

@@ -752,16 +752,16 @@ async fn cmd_import_data(
) -> Result<WorkspaceExportResources, String> {
let mut result: Option<ImportResult> = None;
let plugins = vec![
"importer-yaak",
"importer-insomnia",
"importer-postman",
"importer-insomnia",
"importer-yaak",
"importer-curl",
];
let file = fs::read_to_string(file_path)
let file = read_to_string(file_path)
.unwrap_or_else(|_| panic!("Unable to read file {}", file_path));
let file_contents = file.as_str();
for plugin_name in plugins {
let v = plugin::run_plugin_import(&w.app_handle(), plugin_name, file_contents)
let v = run_plugin_import(&w.app_handle(), plugin_name, file_contents)
.await
.map_err(|e| e.to_string())?;
if let Some(r) = v {

View File

@@ -6,7 +6,7 @@
"frontendDist": "../dist"
},
"productName": "Yaak",
"version": "2024.5.0-beta.1",
"version": "2024.5.0",
"identifier": "app.yaak.desktop",
"app": {
"withGlobalTauri": false,