Move Postman to first plugin

This commit is contained in:
Gregory Schier
2024-06-03 14:00:40 -07:00
parent dc47c4ceba
commit 75a09859bc
3 changed files with 8 additions and 4 deletions

View File

@@ -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 {

View File

@@ -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}

View File

@@ -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}