chore: merge hoppscotch/main into hoppscotch/next

This commit is contained in:
jamesgeorge007 2025-05-08 16:44:12 +05:30
commit c28e4103a8
16 changed files with 81 additions and 33 deletions

View file

@ -52,7 +52,7 @@
"execa@0.10.0": "2.0.0",
"@babel/runtime@<7.26.10": "7.26.10",
"apiconnect-wsdl": "2.0.36",
"@xmldom/xmldom": "0.9.8"
"@xmldom/xmldom": "0.8.10"
},
"packageExtensions": {
"@hoppscotch/httpsnippet": {

View file

@ -1,6 +1,6 @@
{
"name": "hoppscotch-backend",
"version": "2025.4.1",
"version": "2025.4.2",
"description": "",
"author": "",
"private": true,

View file

@ -1,7 +1,7 @@
{
"name": "@hoppscotch/common",
"private": true,
"version": "2025.4.1",
"version": "2025.4.2",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",
"test": "vitest --run",

View file

@ -312,7 +312,14 @@ const samples = [
body: null,
},
params: [],
headers: [],
headers: [
{
active: true,
key: "Authorization",
value: "Basic dXNlcjpwYXNz",
description: "",
},
],
preRequestScript: "",
testScript: "",
requestVariables: [],
@ -335,7 +342,14 @@ const samples = [
body: null,
},
params: [],
headers: [],
headers: [
{
active: true,
key: "Authorization",
value: "Basic 77898dXNlcjpwYXNz",
description: "",
},
],
preRequestScript: "",
testScript: "",
requestVariables: [],
@ -360,7 +374,15 @@ const samples = [
body: null,
},
params: [],
headers: [],
headers: [
{
active: true,
key: "Authorization",
value:
"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
description: "",
},
],
preRequestScript: "",
testScript: "",
requestVariables: [],
@ -980,6 +1002,12 @@ data2: {"type":"test2","typeId":"123"}`,
},
params: [],
headers: [
{
active: true,
key: "Authorization",
value: "Basic YXNkZmdoOjEyMzQ=",
description: "",
},
{
active: true,
key: "User-Agent",

View file

@ -70,9 +70,6 @@ export const recordToHoppHeaders = (
description: "",
})),
A.filter(
(header) =>
header.key !== "Authorization" &&
header.key !== "content-type" &&
header.key !== "Content-Type"
(header) => header.key !== "content-type" && header.key !== "Content-Type"
)
)

View file

@ -34,13 +34,29 @@ const processParams = (params: [string, string][]): [string, string][] => {
const isEncodingRequired =
encodeMode === "enable" || (encodeMode === "auto" && needsEncoding(value))
const encodedKey = isEncodingRequired ? encodeParam(key) : key
const encodedValue = isEncodingRequired ? encodeParam(value) : value
return [encodedKey, encodedValue]
return [key, encodedValue]
})
}
const buildQueryString = (params: [string, string][]): string =>
params.map(([k, v]) => `${encodeURIComponent(k)}=${v}`).join("&")
const combineWithExistingSearch = (urlObj: URL, queryString: string): URL => {
const existingSearch =
urlObj.search.length > 1 ? urlObj.search.substring(1) : ""
urlObj.search = pipe(
existingSearch,
O.fromPredicate((s) => s.length > 0),
O.map((s) => `${s}&${queryString}`),
O.getOrElse(() => queryString)
)
return urlObj
}
const updateUrl = (
url: string,
params: [string, string][]
@ -50,10 +66,17 @@ const updateUrl = (
() => new URL(url),
(e) => new Error(`Invalid URL: ${e}`)
),
E.map((u) => {
processParams(params).forEach(([k, v]) => u.searchParams.append(k, v))
return decodeURIComponent(u.toString())
})
E.map((urlObj) => {
const processedParams = processParams(params)
if (processedParams.length > 0) {
const queryString = buildQueryString(processedParams)
return combineWithExistingSearch(urlObj, queryString)
}
return urlObj
}),
E.map((u) => u.toString())
)
export const preProcessRelayRequest = (req: RelayRequest): RelayRequest =>

View file

@ -48,7 +48,7 @@ export class InstanceSwitcherService extends Service<ConnectionState> {
const instance: VendoredInstance = {
type: "vendored",
displayName: "Hoppscotch",
version: "25.4.1",
version: "25.4.2",
}
this.state$.next({
@ -121,7 +121,7 @@ export class InstanceSwitcherService extends Service<ConnectionState> {
const instance: VendoredInstance = {
type: "vendored",
displayName: "Hoppscotch",
version: "25.4.1",
version: "25.4.2",
}
this.state$.next({

View file

@ -1,7 +1,7 @@
{
"name": "hoppscotch-desktop",
"private": true,
"version": "25.4.1",
"version": "25.4.2",
"type": "module",
"scripts": {
"dev": "vite",

View file

@ -2033,7 +2033,7 @@ dependencies = [
[[package]]
name = "hoppscotch-desktop"
version = "25.4.1"
version = "25.4.2"
dependencies = [
"axum",
"file-rotate",

View file

@ -1,6 +1,6 @@
[package]
name = "hoppscotch-desktop"
version = "25.4.1"
version = "25.4.2"
description = "Desktop App for hoppscotch.io"
authors = ["CuriousCorrelation"]
edition = "2021"

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Hoppscotch",
"version": "25.4.1",
"version": "25.4.2",
"identifier": "io.hoppscotch.desktop",
"build": {
"beforeDevCommand": "pnpm dev",

View file

@ -1,7 +1,7 @@
{
"name": "@hoppscotch/selfhost-web",
"private": true,
"version": "2025.4.1",
"version": "2025.4.2",
"type": "module",
"scripts": {
"dev:vite": "vite",

View file

@ -47,7 +47,7 @@ pub struct Bundle {
impl Bundle {
pub fn new(bundle_version: Option<String>, content: Vec<u8>, signature: Signature, files: Vec<FileEntry>) -> Self {
let metadata = BundleMetadata {
version: "2025.4.1".to_string(),
version: "2025.4.2".to_string(),
created_at: Utc::now(),
signature,
manifest: Manifest { files },

View file

@ -54,7 +54,7 @@ impl Default for ServerConfig {
Self {
port: default_port(),
max_bundle_size: default_max_bundle_size(),
bundle_version: Some("2025.4.1".to_string()),
bundle_version: Some("2025.4.2".to_string()),
csp_directives: None,
signing_key: None,
verifying_key: None,
@ -75,7 +75,7 @@ impl ServerConfig {
Self {
signing_key: Some(key_pair.signing_key),
verifying_key: Some(key_pair.verifying_key),
bundle_version: Some("2025.4.1".to_string()),
bundle_version: Some("2025.4.2".to_string()),
frontend_path,
is_dev: cfg!(debug_assertions),
..Default::default()

View file

@ -1,7 +1,7 @@
{
"name": "hoppscotch-sh-admin",
"private": true,
"version": "2025.4.1",
"version": "2025.4.2",
"type": "module",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",

View file

@ -22,7 +22,7 @@ overrides:
execa@0.10.0: 2.0.0
'@babel/runtime@<7.26.10': 7.26.10
apiconnect-wsdl: 2.0.36
'@xmldom/xmldom': 0.9.8
'@xmldom/xmldom': 0.8.10
packageExtensionsChecksum: sha256-Qhsch/G1LLagBL1kRb8nf11C5HcyCWi8Px3h3uWxYUw=
@ -6205,9 +6205,9 @@ packages:
resolution: {integrity: sha512-4jXDeZ4IH4bylZ6wu14VEx0aDXXhrN4TC279v9rPmn08g4EYekcYf8wdcOOnS9STjDkb6x77/6xBUTqxGgjr8g==}
engines: {node: '>=18.0.0'}
'@xmldom/xmldom@0.9.8':
resolution: {integrity: sha512-p96FSY54r+WJ50FIOsCOjyj/wavs8921hG5+kVMmZgKcvIKxMXHTrjNJvRgWa/zuX3B6t2lijLNFaOyuxUH+2A==}
engines: {node: '>=14.6'}
'@xmldom/xmldom@0.8.10':
resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==}
engines: {node: '>=10.0.0'}
'@xtuc/ieee754@1.2.0':
resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==}
@ -19138,7 +19138,7 @@ snapshots:
fast-querystring: 1.1.2
tslib: 2.8.0
'@xmldom/xmldom@0.9.8': {}
'@xmldom/xmldom@0.8.10': {}
'@xtuc/ieee754@1.2.0': {}
@ -19299,7 +19299,7 @@ snapshots:
apiconnect-wsdl@2.0.36(openapi-types@12.1.3):
dependencies:
'@xmldom/xmldom': 0.9.8
'@xmldom/xmldom': 0.8.10
iconv-lite: 0.6.3
js-yaml: 4.1.0
jszip: 3.10.1