Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/hoppscotch-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hoppscotch-backend",
"version": "2025.8.0",
"version": "2025.8.1",
"description": "",
"author": "",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ export class TeamRequestService {
await this.prisma.lockTableExclusive(tx, 'TeamRequest');

await tx.teamRequest.updateMany({
where: { orderIndex: { gte: dbTeamReq.orderIndex } },
where: {
collectionID: dbTeamReq.collectionID,
orderIndex: { gte: dbTeamReq.orderIndex },
},
data: { orderIndex: { decrement: 1 } },
});

Expand Down
8 changes: 4 additions & 4 deletions packages/hoppscotch-backend/src/team/team.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ describe('renameTeam', () => {
).resolves.toEqualLeft(TEAM_INVALID_ID);
});

test('rejects for new team name length < 6 with TEAM_NAME_INVALID', () => {
const newTeamName = 'smol';
test('rejects for new team name empty with TEAM_NAME_INVALID', () => {
const newTeamName = '';

// Prisma doesn't care about the team name length, so it will resolve
mockPrisma.team.update.mockResolvedValue({
Expand Down Expand Up @@ -668,8 +668,8 @@ describe('createTeam', () => {
).resolves.toEqualRight(expect.objectContaining(team));
});

test('rejects for team name length < 6 with TEAM_NAME_INVALID', () => {
const newName = 'smol';
test('rejects for team name empty with TEAM_NAME_INVALID', () => {
const newName = '';

// Prisma doesn't care
mockPrisma.team.create.mockResolvedValue({
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-backend/src/team/team.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class TeamService implements UserDataHandler, OnModuleInit {
}

validateTeamName(title: string): E.Left<string> | E.Right<boolean> {
if (!title || title.length < 6) return E.left(TEAM_NAME_INVALID);
if (!title || title.trim() === '') return E.left(TEAM_NAME_INVALID);
return E.right(true);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-common/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@
"member_role_updated": "User roles updated",
"members": "Members",
"more_members": "+{count} more",
"name_length_insufficient": "Workspace name should be at least 6 characters long",
"name_length_insufficient": "Workspace name should not be empty",
"name_updated": "Workspace name updated",
"new": "New Workspace",
"new_created": "New workspace created",
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-common/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/common",
"private": true,
"version": "2025.8.0",
"version": "2025.8.1",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",
"test": "vitest --run",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>
<HoppSmartSelectWrapper>
<HoppButtonSecondary
:label="selectedInterface"
:label="selectedLanguage"
outline
class="flex-1 pr-8"
/>
Expand All @@ -40,9 +40,9 @@
@keyup.escape="hide()"
>
<HoppSmartItem
v-for="lang in filteredResponseInterfaces"
v-for="(lang, key) in filteredResponseInterfaces"
:key="lang"
:label="lang"
:label="key"
:info-icon="
lang === selectedInterface ? IconCheck : undefined
"
Expand All @@ -55,7 +55,7 @@
"
/>
<HoppSmartPlaceholder
v-if="filteredResponseInterfaces.length === 0"
v-if="Object.keys(filteredResponseInterfaces).length === 0"
:text="`${t('state.nothing_found')} ‟${searchQuery}”`"
>
<template #icon>
Expand Down Expand Up @@ -134,7 +134,11 @@ import {

import { useService } from "dioc/vue"
import { useNestedSetting } from "~/composables/settings"
import interfaceLanguages from "~/helpers/utils/interfaceLanguages"
import {
interfaceLanguages,
InterfaceLanguage,
Language,
} from "~/helpers/utils/interfaceLanguages"
import { toggleNestedSetting } from "~/newstore/settings"
import { RESTTabService } from "~/services/tab/rest"
import IconCheck from "~icons/lucide/check"
Expand Down Expand Up @@ -173,7 +177,7 @@ function getCurrentPageCategory(): "graphql" | "rest" | "other" {
}
}

const selectedInterface = ref<(typeof interfaceLanguages)[number]>("TypeScript")
const selectedInterface = ref<InterfaceLanguage>("typescript")
const response = computed(() => {
let response = ""
const pageCategory = getCurrentPageCategory()
Expand Down Expand Up @@ -246,9 +250,23 @@ useCodemirror(

const searchQuery = ref("")

const filteredResponseInterfaces = computed(() => {
return interfaceLanguages.filter((lang) =>
lang.toLowerCase().includes(searchQuery.value.toLowerCase())
const filteredResponseInterfaces = computed<
Record<Language, InterfaceLanguage>
>(() => {
const searchQueryValue = searchQuery.value.trim()

return Object.fromEntries(
Object.entries(interfaceLanguages).filter(([key]) =>
key.toLowerCase().includes(searchQueryValue)
)
) as Record<Language, InterfaceLanguage>
})

const selectedLanguage = computed<Language>(() => {
return (
(Object.keys(interfaceLanguages) as Language[]).find(
(key) => interfaceLanguages[key] === selectedInterface.value
) || "TypeScript"
)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface TeamNameBrand {

export const TeamNameCodec = t.brand(
t.string,
(x): x is t.Branded<string, TeamNameBrand> => x.trim().length >= 6,
(x): x is t.Branded<string, TeamNameBrand> => x.trim() !== "",
"TeamName"
)

Expand Down
51 changes: 26 additions & 25 deletions packages/hoppscotch-common/src/helpers/utils/interfaceLanguages.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
const interfaceLanguages = [
"cJSON",
"C++",
"C#",
"Crystal",
"Dart",
"Elm",
"Flow",
"Go",
"Haskell",
"Java",
"JavaScript",
"Kotlin",
"Objective-C",
"PHP",
"Pike",
"Python",
"Ruby",
"Rust",
"Scala3",
"Smithy",
"Swift",
"TypeScript",
]
export const interfaceLanguages = {
cJSON: "cjson",
"C++": "cpp",
"C#": "csharp",
Crystal: "crystal",
Dart: "dart",
Elm: "elm",
Flow: "flow",
Go: "go",
Haskell: "haskell",
Java: "java",
JavaScript: "javascript",
Kotlin: "kotlin",
"Objective-C": "objective-c",
PHP: "php",
Pike: "pike",
Python: "python",
Ruby: "ruby",
Rust: "rust",
Scala3: "scala3",
Smithy: "smithy4a",
Swift: "swift",
TypeScript: "typescript",
} as const

export default interfaceLanguages
export type Language = keyof typeof interfaceLanguages
export type InterfaceLanguage = (typeof interfaceLanguages)[Language]
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import {
InputData,
jsonInputForTargetLanguage,
} from "quicktype-core"
import { InterfaceLanguage } from "./interfaceLanguages"

async function jsonToLanguage(targetLanguage: string, jsonString: string) {
async function jsonToLanguage(
targetLanguage: InterfaceLanguage,
jsonString: string
) {
const jsonInput = jsonInputForTargetLanguage(targetLanguage)

await jsonInput.addSource({
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hoppscotch-desktop",
"private": true,
"version": "25.8.0",
"version": "25.8.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/hoppscotch-desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hoppscotch-desktop"
version = "25.8.0"
version = "25.8.1"
description = "Desktop App for hoppscotch.io"
authors = ["CuriousCorrelation"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Hoppscotch",
"version": "25.8.0",
"version": "25.8.1",
"identifier": "io.hoppscotch.desktop",
"build": {
"beforeDevCommand": "pnpm dev",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Hoppscotch",
"version": "25.8.0",
"version": "25.8.1",
"identifier": "io.hoppscotch.desktop",
"build": {
"beforeDevCommand": "pnpm dev",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Hoppscotch",
"version": "25.8.0",
"version": "25.8.1",
"identifier": "io.hoppscotch.desktop",
"build": {
"beforeDevCommand": "pnpm dev",
Expand Down
4 changes: 2 additions & 2 deletions packages/hoppscotch-desktop/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const loadVendored = async () => {
const vendoredInstance: VendoredInstance = {
type: "vendored",
displayName: "Hoppscotch",
version: "25.8.0",
version: "25.8.1",
}

const connectionState: ConnectionState = {
Expand Down Expand Up @@ -345,7 +345,7 @@ const loadVendored = async () => {
console.log("Closing main window")

// NOTE: No need to await the promise here.
close({ windowLabel: 'main' })
close({ windowLabel: "main" })
} catch (err) {
const errorMessage = err instanceof Error ? err.message : String(err)
console.error("Error loading vendored app:", errorMessage)
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-selfhost-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/selfhost-web",
"private": true,
"version": "2025.8.0",
"version": "2025.8.1",
"type": "module",
"scripts": {
"dev:vite": "vite",
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-selfhost-web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function initApp() {
displayConfig: {
displayName: "Hoppscotch",
description: "On-Prem",
version: "25.8.0",
version: "25.8.1",
connectingMessage: "Connecting to On-prem",
connectedMessage: "Connected to On-prem",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.0".to_string(),
version: "2025.8.1".to_string(),
created_at: Utc::now(),
signature,
manifest: Manifest { files },
Expand Down
4 changes: 2 additions & 2 deletions packages/hoppscotch-selfhost-web/webapp-server/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Default for ServerConfig {
Self {
port: default_port(),
max_bundle_size: default_max_bundle_size(),
bundle_version: Some("2025.8.0".to_string()),
bundle_version: Some("2025.8.1".to_string()),
csp_directives: None,
signing_key: None,
verifying_key: None,
Expand All @@ -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.8.0".to_string()),
bundle_version: Some("2025.8.1".to_string()),
frontend_path,
is_dev: cfg!(debug_assertions),
..Default::default()
Expand Down
2 changes: 1 addition & 1 deletion packages/hoppscotch-sh-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hoppscotch-sh-admin",
"private": true,
"version": "2025.8.0",
"version": "2025.8.1",
"type": "module",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",
Expand Down
Loading