mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 09:38:29 +02:00
Move Postman to first plugin
This commit is contained in:
@@ -752,16 +752,16 @@ async fn cmd_import_data(
|
|||||||
) -> Result<WorkspaceExportResources, String> {
|
) -> Result<WorkspaceExportResources, String> {
|
||||||
let mut result: Option<ImportResult> = None;
|
let mut result: Option<ImportResult> = None;
|
||||||
let plugins = vec![
|
let plugins = vec![
|
||||||
"importer-yaak",
|
|
||||||
"importer-insomnia",
|
|
||||||
"importer-postman",
|
"importer-postman",
|
||||||
|
"importer-insomnia",
|
||||||
|
"importer-yaak",
|
||||||
"importer-curl",
|
"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));
|
.unwrap_or_else(|_| panic!("Unable to read file {}", file_path));
|
||||||
let file_contents = file.as_str();
|
let file_contents = file.as_str();
|
||||||
for plugin_name in plugins {
|
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
|
.await
|
||||||
.map_err(|e| e.to_string())?;
|
.map_err(|e| e.to_string())?;
|
||||||
if let Some(r) = v {
|
if let Some(r) = v {
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ export function FormUrlencodedEditor({ body, forceUpdateKey, onChange }: Props)
|
|||||||
<PairEditor
|
<PairEditor
|
||||||
valueAutocompleteVariables
|
valueAutocompleteVariables
|
||||||
nameAutocompleteVariables
|
nameAutocompleteVariables
|
||||||
|
namePlaceholder="entry_name"
|
||||||
|
valuePlaceholder="Value"
|
||||||
pairs={pairs}
|
pairs={pairs}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
forceUpdateKey={forceUpdateKey}
|
forceUpdateKey={forceUpdateKey}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ export function UrlParametersEditor({ urlParameters, forceUpdateKey, onChange }:
|
|||||||
<PairEditor
|
<PairEditor
|
||||||
valueAutocompleteVariables
|
valueAutocompleteVariables
|
||||||
nameAutocompleteVariables
|
nameAutocompleteVariables
|
||||||
|
namePlaceholder="param_name"
|
||||||
|
valuePlaceholder="Value"
|
||||||
pairs={urlParameters}
|
pairs={urlParameters}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
forceUpdateKey={forceUpdateKey}
|
forceUpdateKey={forceUpdateKey}
|
||||||
|
|||||||
Reference in New Issue
Block a user