2024.5.0 (#39)

This commit is contained in:
Gregory Schier
2024-06-03 14:08:24 -07:00
committed by GitHub
parent 60e469a1c9
commit 4f9a7e9c88
197 changed files with 12283 additions and 3505 deletions

View File

@@ -7,12 +7,14 @@ export function fallbackRequestName(r: HttpRequest | GrpcRequest | null): string
return r.name;
}
const withoutVariables = r.url.replace(/\$\{\[[^\]]+]}/g, '');
const withoutVariables = r.url.replace(/\$\{\[\s*([^\]]+)\s*]}/g, '$1');
if (withoutVariables.trim() === '') {
return r.model === 'http_request' ? 'New HTTP Request' : 'new gRPC Request';
}
const fixedUrl = r.url.match(/^https?:\/\//) ? r.url : 'http://' + r.url;
const fixedUrl = withoutVariables.match(/^https?:\/\//)
? withoutVariables
: 'http://' + withoutVariables;
if (r.model === 'grpc_request' && r.service != null && r.method != null) {
const shortService = r.service.split('.').pop();