Commit graph

5702 commits

Author SHA1 Message Date
Anwarul Islam
130facb440
fix: include request body to AWS V4 signer in effective request functions (#5084) 2025-05-21 21:02:07 +05:30
Shreyas
d213bec3ef
feat(kernel): multi-instance support for store (#5083) 2025-05-21 19:08:55 +05:30
Shreyas
1da961cef7
fix(desktop): extend file-write permissions (#5070) 2025-05-21 18:27:20 +05:30
Shreyas
d14a3c7f1c
fix(desktop): verbatim path handling in disk resolution (#5049) 2025-05-21 18:16:48 +05:30
Shreyas
2ecc60ad1a
feat(desktop): complete lifecycle logs (#5044) 2025-05-21 15:26:16 +05:30
Anwarul Islam
3980847983
feat(common): enhance HAWK authentication with payload hash calculation (#5067)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-05-20 17:01:04 +05:30
Anwarul Islam
2232f0291c
feat(common): add support for registering and merging additional locale messages (#5072)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-05-16 16:58:38 +05:30
Mir Arif Hasan
7ee33abdef
HSB-514 refactor: remove unused CollType GQL enum (#5074)
chore: removed unused CollType GQL enum
2025-05-16 16:55:56 +06:00
progprnv
3bf44638e1
chore: improve healthcheck configuration for AIO container (#4595)
Co-authored-by: mirarifhasan <arif.ishan05@gmail.com>
2025-05-14 17:15:41 +05:30
Binayak Bhattacharjee
9b0e1af92d
chore(backend): configure CORS for development and production environments (#4430)
Co-authored-by: mirarifhasan <arif.ishan05@gmail.com>
2025-05-14 12:29:24 +05:30
Mir Arif Hasan
46e5792965
chore: hoppscotch-backend code formatting, minor lint fixes, and refactoring (#5061)
* chore: prettier formatting applied

* chore: added some lint fixed

* fix: few lint errors

* chore: prisma and pubsub are now global module

* chore: add encapsulation consistency in service files

* chore: made a cast function private

* chore: cast function made private

* refactor: module imports

* refactor: posthog spelling
2025-05-09 15:37:20 +06:00
jamesgeorge007
c28e4103a8 chore: merge hoppscotch/main into hoppscotch/next 2025-05-08 16:44:12 +05:30
jamesgeorge007
b5e19c9d46 chore: bump version to 2025.4.2 2025-05-08 15:38:54 +05:30
Mir Arif Hasan
92627604bf
hotfix: pin xmldom to v0.8.10 addressing breaking change (#5059) 2025-05-08 15:37:49 +05:30
Shreyas
e9096eaca1
fix(common): url and param encoding (#5041) 2025-05-08 15:29:08 +05:30
Chhavi Goyal
b6e2e93457
feat: import authorization header with curl (#4963) 2025-05-08 15:08:50 +05:30
Akhil
f26d32c4e4
refactor: rename enum TeamMemberRole to TeamAccessRole (#5053)
Co-authored-by: mirarifhasan <arif.ishan05@gmail.com>
Co-authored-by: Anwarul Islam <anwaarulislaam@gmail.com>
2025-05-07 17:56:10 +05:30
jamesgeorge007
609aaa4070 chore: merge main into next 2025-05-07 17:32:45 +05:30
jamesgeorge007
9e8ecd97d0 chore: bump version to 2025.4.1 2025-05-07 16:21:39 +05:30
shuaixr
dafe56cfe9
fix: default Content-Type to x-www-form-urlencoded when importing curl POST with body (#5040)
fix: handle missing Content-Type when importing curl POST

When importing a curl POST request with a body and no explicit
Content-Type, default to `application/x-www-form-urlencoded`
to match curl's behavior.

Reference: https://everything.curl.dev/http/post/content-type.html
2025-05-07 14:25:45 +05:30
Anwarul Islam
cb4ad87f08
feat(common): platform ui definition for team edit and invite (#5037)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-05-02 20:52:13 +05:30
Chhavi Goyal
f929b8122b
feat: update xmldom version to xmldom/xmldom0.9.8 (#5036)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
2025-05-02 16:41:49 +05:30
jamesgeorge007
77daa1f589 chore: update inspector warning regarding supported interceptors
Proxy interceptor doesn't support Digest & HAWK Auth.
2025-04-30 12:51:45 +05:30
jamesgeorge007
63135a0633 chore: bump CLI version 2025-04-29 15:12:57 +05:30
jamesgeorge007
bed898b523 chore: define supported interceptors for HAWK authentication
Update lockfile.
2025-04-29 15:07:32 +05:30
Anwarul Islam
ccf3c6f834
feat: add support for HAWK authentication (#4694)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-04-29 14:51:16 +05:30
Mir Ishfaq Hussain
cccd711507
refactor(backend): formatting updates in TeamEnvironmentsService (#4388)
Co-authored-by: mirarifhasan <arif.ishan05@gmail.com>
2025-04-29 14:37:03 +05:30
Raphael Hehl
cb52a582ac
feat(backend): add getTracker method for IP extraction (#3535)
Co-authored-by: Raphael Hehl <Raphael.Hehl@deutschebahn.com>
2025-04-29 14:29:01 +05:30
Dmitry
12f35d880d
feat: add file extensions to response exports (#4367)
Co-authored-by: Dmitry Mukovkin <d.mukovkin@cft.ru>
2025-04-29 13:51:34 +05:30
Shreyas
8c6ec87f90
fix(relay): better matching for content-type detection (#5025) 2025-04-29 13:10:08 +05:30
Andrew Bastin
decbb56c9f chore: bump vulnerable dependencies 2025-04-28 15:11:15 +05:30
jamesgeorge007
3219cb3b5d chore: bump version to 2025.4.0 2025-04-25 20:47:28 +05:30
jamesgeorge007
2b591b9536 test: resolve flaky CLI tests
Move to the in-house echo service for reliability.
2025-04-25 20:45:32 +05:30
Shreyas
d09f7fe22c
fix: stale lockfile on rebase (#5022) 2025-04-25 18:34:41 +05:30
Leonic
c2d3e1db90
chore: add VITE_PROXYSCOTCH_ACCESS_TOKEN to .env.example (#5015) 2025-04-25 18:01:17 +05:30
Shreyas
fbeb0e56be
feat(desktop): file-based logs with rotation (#5009)
This PR adds a file-based logging system with size-based rotation to the desktop application. It essentially redirects existing diagnostic to size-based rotating files for troubleshooting environment-specific issues.

Closes HFE-801

The desktop application currently lacks a persistent logging mechanism in production environments. Logs are only available through the development mode console.

This PR will help diagnose issues reported in #4859, #4950, #5003, discussions #4984 and #4986.

Mainly aiming to understand errors in specific environments that can't be reproduced in our testing setups.

This implementation uses the tracing ecosystem (`tracing`, `tracing_subscriber`, `tracing_appender`) along with `file_rotate` to create log files in the platform's log directory. The logs are automatically rotated when they reach `10MB`, with a maximum of `5` files retained.

Thinking 10 * 5 MB is reasonable disk usage while maintaining sufficient history.

The system currently writes to both the console (with ANSI colors where supported) and to files (without ANSI formatting for readability). Log levels are currently controlled via the `RUST_LOG` environment variable, defaulting to "debug" when not specified.

| OS      | Log File Path                                        |
|---------|------------------------------------------------------|
| Windows | `C:\Users\<username>\AppData\Local\io.hoppscotch.desktop\logs\io.hoppscotch.desktop.log` |
| macOS   | `~/Library/Logs/io.hoppscotch.desktop/io.hoppscotch.desktop.log` |
| Linux   | `~/.local/share/io.hoppscotch.desktop/logs/io.hoppscotch.desktop.log` |
2025-04-25 17:09:51 +05:30
Shreyas
13b46d52f2
fix(desktop): disk space detection (#5019)
This fix replace `sys-info v0.9.1` with
the more actively maintained `sysinfo 0.34.2`
which does return size of the disk in bytes.

Closes #5017, HFE-831

Rebased on #5010, consider merging that first.

Issues:

Appload fails to load with a "Storage full" error despite
having sufficient disk space.

This was caused by a unit mismatch in the `sys-info` crate
which returns disk space in kilobytes instead of bytes.

- sys_info::disk_info() returns values in KB, see:
  60ecf1470a/c/linux.c (L119)
- The `StorageFull` error was triggered when comparing
  raw bytes against a KB value, causing false positive

Changes:
- Rewrite the `ensure_space` function to find the correct disk of the config dir
- Add a new `StorageError::DiskNotFound` for cases where the disk cannot
  be resolved
2025-04-25 16:57:37 +05:30
Shreyas
93787f8389
fix(desktop): add win version checks for DWM attr api (#5010)
fix: add win version checks for DWM attr api

This adds version checking before using Windows 11-specific DWM APIs.

Closes HFE-821

The desktop app crashes on startup on older Windows versions (pre-Windows 11)
due to unsupported DWM API calls for dark mode and caption styling.

According to docs at https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute,
both `DWMWA_USE_IMMERSIVE_DARK_MODE` and `DWMWA_CAPTION_COLOR` attributes
are only supported starting with Windows 11 Build 22000.

> DWMWA_USE_IMMERSIVE_DARK_MODE: [...] This value is supported starting
> with Windows 11 Build 22000"

and

> DWMWA_CAPTION_COLOR: [...] This value is supported starting
> with Windows 11 Build 22000.

See https://github.com/hoppscotch/hoppscotch/discussions/4984 for more details,
for reports of app crashing immediately on startup with these errors:

```
Failed to set dark mode: Error { code: HRESULT(0x80070057), message: "The parameter is incorrect." }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[0417/150158.530:ERROR:window_impl.cc(122)] Failed to unregister class Chrome_WidgetWin_0. Error = 1412
```

The tests were all over the place, both attributes (sometimes!) seems to be present
on Windows 10 1809 and even earlier, only if it was installed with network access,
so perhaps this is due to Windows updates? Other times, they weren't, especially on VMs.

The issue is reproducible on Windows Server 2019 Datacenter (v10.0.17763),
which is equivalent to Windows 10 version 1809.

This version is too old to support DWMWA_USE_IMMERSIVE_DARK_MODE,
which is only **officially supported** starting with Windows 11 Build 22000
according to Microsoft's documentation.

So at the moment, relying on official docs seems to be the right call,
and themes are definitely something app shouldn't crash for regardless.
2025-04-25 16:48:43 +05:30
Shreyas
1867f23436
feat(infra): desktop aio build workflow pipeline (#5005)
* feat(infra): desktop aio build workflow

This PR adds an actions workflow pipeline for building and
packaging the self-hosted Hoppscotch Desktop app across different platforms.

Platform supported right now are
- Windows x86_64 (`msi`)
- MacOS x64 and ARM64 (`dmg`)
- Linux x86_64 (`.deb`, `AppImage`)

The workflow can be triggered either automatically when a new release is created
or manually through workflow dispatch.

Manual trigger has a few customizations like
- build version,
  - to support building a different version of the app from prior releases
- repository to checkout,
  - to support building from a different source
- branch or tag to build from,
  - to support building a different release
- release notes,
  - these are mainly for the updater manifest
- custom environment file content, and
  - to customize instance target
- an option to disable code signing
  - this is self explanatory
  - this doesn't disable updater signing

Closes HFE-800

For Linux builds, the workflow generates packages using Ubuntu 24.04,
yet it still contains some specific libraries

```
libwebkit2gtk-4.1-0=2.44.0-2 \
libwebkit2gtk-4.1-dev=2.44.0-2 \
libjavascriptcoregtk-4.1-0=2.44.0-2 \
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
gir1.2-webkit2-4.1=2.44.0-2;
```

For more information, see https://github.com/hoppscotch/hoppscotch/issues/4880
```
Could not create default EGL display: EGL_BAD_PARAMETER. Aborting...
```
Also see:
tauri-apps/tauri#8588
https://bugs.webkit.org/show_bug.cgi?id=180739
https://bugs.webkit.org/show_bug.cgi?id=165246
tauri-apps/tauri#8535

Also `code-signing-cli` is often installed directly from source bin,
since installing it from `crates.io` sometimes breaks the CI:
```
error[E0599]: no method named `fetch_mode_no_cors` found for struct `reqwest::RequestBuilder` in the current scope
   --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\reqwest-middleware-0.4.1\src\client.rs:532:31
    |
532 |             inner: self.inner.fetch_mode_no_cors(),
    |                               ^^^^^^^^^^^^^^^^^^ method not found in `RequestBuilder`
```

The build dependency management is a bit complex but it should handles
all necessary system dependencies and builds for the web app first
before bundling it into the desktop app using `webapp-bundler`.

On Windows, the workflow uses Microsoft Azure code signing integration (when
enabled).

For macOS, the workflow builds separate packages for both Intel (x64) and Apple
Silicon (ARM64). It similar to Windows workflow, implements Apple's code signing
and notarization (when credentials are provided).

The final step generates an update manifest that includes info about
all built packages, their signatures, and download URLs.
This manifest is used by the app's auto-updater.

* fix(infra): temporarily disable release workflow

* fix(infra): use repo secret for env var contents
2025-04-25 16:31:10 +05:30
Joel Jacob Stephen
485ac8c3c6
refactor(sh-admin): dashboard settings page redesign (#5014) 2025-04-24 20:24:32 +05:30
moaqz
a208125c7d
chore(i18n): update es translation (#4999) 2025-04-24 16:59:47 +05:30
Nivedin
f1b1a8894b
feat: add colour highlight for codesnippet (#5006)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-04-24 16:54:18 +05:30
jamesgeorge007
236db8396b chore: bump version to 2025.3.2 2025-04-15 13:16:56 +05:30
Akhil
4460751389
fix: account for templates directory in ARM images (#4992) 2025-04-15 13:13:53 +05:30
Nayan
45d99a48a2
fix(common): refine profile field validations (#4995) 2025-04-15 13:09:37 +05:30
atrimpe-ford
72cff75277
chore: truncate long secret environment variables (#4958)
Co-authored-by: nivedin <nivedinp@gmail.com>
2025-04-11 17:25:12 +05:30
Shreyas
80b63545f1
fix(common): extention interceptor response meta (#4980) 2025-04-10 13:28:20 +05:30
Anwarul Islam
3c150ec90a
feat(common): enhanced cookie parsing from curl arguments (#4977) 2025-04-10 12:56:05 +05:30
Anwarul Islam
111fdccfc8
feat: allow multiple params with same key to process get request queryparams (#4975)
Co-authored-by: curiouscorrelation <curiouscorrelation@gmail.com>
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-04-10 12:54:26 +05:30
jamesgeorge007
9a5b5323ab chore: bump version to 2025.3.1 2025-04-09 19:47:01 +05:30