Filesystem Sync (#142)

This commit is contained in:
Gregory Schier
2025-01-03 20:41:00 -08:00
committed by GitHub
parent 6ad27c4458
commit 31440eea76
159 changed files with 4296 additions and 1016 deletions

View File

@@ -1,17 +1,17 @@
import type {AnyModel, GrpcRequest, HttpRequest} from '@yaakapp-internal/models';
import type { AnyModel, GrpcRequest, HttpRequest } from '@yaakapp-internal/models';
export function fallbackRequestName(r: HttpRequest | GrpcRequest | AnyModel | null): string {
if (r == null) return '';
if (r.model !== 'grpc_request' && r.model !== 'http_request') {
return 'name' in r ? r.name : '';
}
// Return name if it has one
if ('name' in r && r.name) {
return r.name;
}
if (r.model !== 'http_request' && r.model !== 'grpc_request') {
return 'No Name';
}
// Replace variable syntax with variable name
const withoutVariables = r.url.replace(/\$\{\[\s*([^\]\s]+)\s*]}/g, '$1');
if (withoutVariables.trim() === '') {

View File

@@ -7,10 +7,8 @@ type TauriCmd =
| 'cmd_create_cookie_jar'
| 'cmd_create_environment'
| 'cmd_template_tokens_to_string'
| 'cmd_create_folder'
| 'cmd_create_grpc_request'
| 'cmd_create_http_request'
| 'cmd_create_workspace'
| 'cmd_curl_to_request'
| 'cmd_delete_all_grpc_connections'
| 'cmd_delete_all_http_responses'