mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-19 14:17:53 +01:00
Compare commits
4 Commits
v2026.2.0-
...
v2026.2.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cab111965 | ||
|
|
7fef35ce0a | ||
|
|
654af09951 | ||
|
|
484dcfade0 |
43
.github/workflows/flathub.yml
vendored
Normal file
43
.github/workflows/flathub.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Update Flathub
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update-flathub:
|
||||
name: Update Flathub manifest
|
||||
runs-on: ubuntu-latest
|
||||
# Only run for stable releases (skip betas/pre-releases)
|
||||
if: ${{ !github.event.release.prerelease }}
|
||||
steps:
|
||||
- name: Checkout app repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run update-manifest.sh
|
||||
run: bash flatpak/update-manifest.sh "${{ github.event.release.tag_name }}"
|
||||
|
||||
- name: Checkout Flathub repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: flathub/app.yaak.Yaak
|
||||
token: ${{ secrets.FLATHUB_TOKEN }}
|
||||
path: flathub-repo
|
||||
|
||||
- name: Copy updated files to Flathub repo
|
||||
run: |
|
||||
cp flatpak/app.yaak.Yaak.yml flathub-repo/
|
||||
cp LICENSE flathub-repo/
|
||||
sed -i 's|path: \.\./LICENSE|path: LICENSE|' flathub-repo/app.yaak.Yaak.yml
|
||||
|
||||
- name: Commit and push to Flathub
|
||||
working-directory: flathub-repo
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add -A
|
||||
git diff --cached --quiet && echo "No changes to commit" && exit 0
|
||||
git commit -m "Update to ${{ github.event.release.tag_name }}"
|
||||
git push
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -44,3 +44,7 @@ crates-tauri/yaak-app/tauri.worktree.conf.json
|
||||
# Tauri auto-generated permission files
|
||||
**/permissions/autogenerated
|
||||
**/permissions/schemas
|
||||
|
||||
# Flatpak build artifacts
|
||||
flatpak-repo/
|
||||
.flatpak-builder/
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
{
|
||||
"build": {
|
||||
"features": [
|
||||
"updater",
|
||||
"license"
|
||||
]
|
||||
"features": ["updater", "license"]
|
||||
},
|
||||
"app": {
|
||||
"security": {
|
||||
@@ -11,12 +8,8 @@
|
||||
"default",
|
||||
{
|
||||
"identifier": "release",
|
||||
"windows": [
|
||||
"*"
|
||||
],
|
||||
"permissions": [
|
||||
"yaak-license:default"
|
||||
]
|
||||
"windows": ["*"],
|
||||
"permissions": ["yaak-license:default"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -39,14 +32,7 @@
|
||||
"createUpdaterArtifacts": true,
|
||||
"longDescription": "A cross-platform desktop app for interacting with REST, GraphQL, and gRPC",
|
||||
"shortDescription": "Play with APIs, intuitively",
|
||||
"targets": [
|
||||
"app",
|
||||
"appimage",
|
||||
"deb",
|
||||
"dmg",
|
||||
"nsis",
|
||||
"rpm"
|
||||
],
|
||||
"targets": ["app", "appimage", "deb", "dmg", "nsis", "rpm"],
|
||||
"macOS": {
|
||||
"minimumSystemVersion": "13.0",
|
||||
"exceptionDomain": "",
|
||||
@@ -58,10 +44,16 @@
|
||||
},
|
||||
"linux": {
|
||||
"deb": {
|
||||
"desktopTemplate": "./template.desktop"
|
||||
"desktopTemplate": "./template.desktop",
|
||||
"files": {
|
||||
"usr/share/metainfo/app.yaak.Yaak.metainfo.xml": "../../flatpak/app.yaak.Yaak.metainfo.xml"
|
||||
}
|
||||
},
|
||||
"rpm": {
|
||||
"desktopTemplate": "./template.desktop"
|
||||
"desktopTemplate": "./template.desktop",
|
||||
"files": {
|
||||
"usr/share/metainfo/app.yaak.Yaak.metainfo.xml": "../../flatpak/app.yaak.Yaak.metainfo.xml"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,22 +32,30 @@ export interface GitCallbacks {
|
||||
|
||||
const onSuccess = () => queryClient.invalidateQueries({ queryKey: ['git'] });
|
||||
|
||||
export function useGit(dir: string, callbacks: GitCallbacks) {
|
||||
export function useGit(dir: string, callbacks: GitCallbacks, refreshKey?: string) {
|
||||
const mutations = useMemo(() => gitMutations(dir, callbacks), [dir, callbacks]);
|
||||
const fetchAll = useQuery<void, string>({
|
||||
queryKey: ['git', 'fetch_all', dir, refreshKey],
|
||||
queryFn: () => invoke('cmd_git_fetch_all', { dir }),
|
||||
refetchInterval: 10 * 60_000,
|
||||
});
|
||||
return [
|
||||
{
|
||||
remotes: useQuery<GitRemote[], string>({
|
||||
queryKey: ['git', 'remotes', dir],
|
||||
queryKey: ['git', 'remotes', dir, refreshKey],
|
||||
queryFn: () => getRemotes(dir),
|
||||
placeholderData: (prev) => prev,
|
||||
}),
|
||||
log: useQuery<GitCommit[], string>({
|
||||
queryKey: ['git', 'log', dir],
|
||||
queryKey: ['git', 'log', dir, refreshKey],
|
||||
queryFn: () => invoke('cmd_git_log', { dir }),
|
||||
placeholderData: (prev) => prev,
|
||||
}),
|
||||
status: useQuery<GitStatusSummary, string>({
|
||||
refetchOnMount: true,
|
||||
queryKey: ['git', 'status', dir],
|
||||
queryKey: ['git', 'status', dir, refreshKey, fetchAll.dataUpdatedAt],
|
||||
queryFn: () => invoke('cmd_git_status', { dir }),
|
||||
placeholderData: (prev) => prev,
|
||||
}),
|
||||
},
|
||||
mutations,
|
||||
@@ -152,10 +160,7 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
|
||||
},
|
||||
onSuccess,
|
||||
}),
|
||||
fetchAll: createFastMutation<void, string, void>({
|
||||
mutationKey: ['git', 'fetch_all', dir],
|
||||
mutationFn: () => invoke('cmd_git_fetch_all', { dir }),
|
||||
}),
|
||||
|
||||
push: createFastMutation<PushResult, string, void>({
|
||||
mutationKey: ['git', 'push', dir],
|
||||
mutationFn: push,
|
||||
|
||||
57
flatpak/app.yaak.Yaak.metainfo.xml
Normal file
57
flatpak/app.yaak.Yaak.metainfo.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>app.yaak.Yaak</id>
|
||||
|
||||
<name>Yaak</name>
|
||||
<summary>An offline, Git friendly API Client</summary>
|
||||
|
||||
<developer id="app.yaak">
|
||||
<name>Yaak</name>
|
||||
</developer>
|
||||
|
||||
<metadata_license>MIT</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
|
||||
<url type="homepage">https://yaak.app</url>
|
||||
<url type="bugtracker">https://yaak.app/feedback</url>
|
||||
<url type="contact">https://yaak.app/feedback</url>
|
||||
<url type="vcs-browser">https://github.com/mountain-loop/yaak</url>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
A fast, privacy-first API client for REST, GraphQL, SSE, WebSocket,
|
||||
and gRPC — built with Tauri, Rust, and React.
|
||||
</p>
|
||||
<p>Features include:</p>
|
||||
<ul>
|
||||
<li>REST, GraphQL, SSE, WebSocket, and gRPC support</li>
|
||||
<li>Local-only data, secrets encryption, and zero telemetry</li>
|
||||
<li>Git-friendly plain-text project storage</li>
|
||||
<li>Environment variables and template functions</li>
|
||||
<li>Request chaining and dynamic values</li>
|
||||
<li>OAuth 2.0, Bearer, Basic, API Key, AWS, JWT, and NTLM authentication</li>
|
||||
<li>Import from cURL, Postman, Insomnia, and OpenAPI</li>
|
||||
<li>Extensible plugin system</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
<launchable type="desktop-id">app.yaak.Yaak.desktop</launchable>
|
||||
|
||||
<branding>
|
||||
<color type="primary" scheme_preference="light">#8b32ff</color>
|
||||
<color type="primary" scheme_preference="dark">#c293ff</color>
|
||||
</branding>
|
||||
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Crafting an API request</caption>
|
||||
<image>https://assets.yaak.app/uploads/screenshot-BLG1w_2310x1326.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release version="2026.1.2" date="2026-02-10" />
|
||||
</releases>
|
||||
</component>
|
||||
61
flatpak/app.yaak.Yaak.yml
Normal file
61
flatpak/app.yaak.Yaak.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
id: app.yaak.Yaak
|
||||
runtime: org.gnome.Platform
|
||||
runtime-version: "49"
|
||||
sdk: org.gnome.Sdk
|
||||
command: yaak-app
|
||||
rename-desktop-file: yaak.desktop
|
||||
rename-icon: yaak-app
|
||||
|
||||
finish-args:
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
- --share=ipc
|
||||
- --device=dri
|
||||
- --share=network
|
||||
- --socket=pulseaudio # Preview audio responses
|
||||
- --socket=ssh-auth # Git SSH remotes
|
||||
- --socket=gpg-agent # Git commit signing
|
||||
- --talk-name=org.freedesktop.secrets # Keyring for encryption
|
||||
- --filesystem=home # Git repos, ~/.gitconfig, ~/.ssh, etc
|
||||
|
||||
modules:
|
||||
- name: git
|
||||
cleanup:
|
||||
- /share
|
||||
make-args:
|
||||
- NO_PERL=1
|
||||
- NO_TCLTK=1
|
||||
make-install-args:
|
||||
- INSTALL_SYMLINKS=1
|
||||
- NO_PERL=1
|
||||
- NO_TCLTK=1
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://www.kernel.org/pub/software/scm/git/git-2.48.1.tar.gz
|
||||
sha256: 51b4d03b1e311ba673591210f94f24a4c5781453e1eb188822e3d9cdc04c2212
|
||||
|
||||
- name: yaak
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- ar -x yaak.deb
|
||||
- tar -xf data.tar.gz
|
||||
- mv usr/bin/* /app/bin
|
||||
- mv usr/lib/* /app/lib
|
||||
- mv usr/share/* /app/share
|
||||
- install -Dm644 LICENSE /app/share/licenses/app.yaak.Yaak/LICENSE
|
||||
|
||||
sources:
|
||||
- type: file
|
||||
dest-filename: yaak.deb
|
||||
url: https://github.com/mountain-loop/yaak/releases/download/v2026.1.2/yaak_2026.1.2_amd64.deb
|
||||
sha256: "c4236b5bcf391e579dc79b71c3b5c58f6f9bfc6c175fc70426d0ca85799beba5"
|
||||
only-arches:
|
||||
- x86_64
|
||||
- type: file
|
||||
dest-filename: yaak.deb
|
||||
url: https://github.com/mountain-loop/yaak/releases/download/v2026.1.2/yaak_2026.1.2_arm64.deb
|
||||
sha256: "9ba9b7c9df56ffb9b801e40cb38685f1650cf7e2f9e85dad0ae3329f8e01ff6d"
|
||||
only-arches:
|
||||
- aarch64
|
||||
- type: file
|
||||
path: ../LICENSE
|
||||
82
flatpak/update-manifest.sh
Executable file
82
flatpak/update-manifest.sh
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Update the Flatpak manifest with URLs and SHA256 hashes for a given release.
|
||||
#
|
||||
# Usage:
|
||||
# ./flatpak/update-manifest.sh v2026.2.0
|
||||
#
|
||||
# This script:
|
||||
# 1. Downloads the x86_64 and aarch64 .deb files from the GitHub release
|
||||
# 2. Computes their SHA256 checksums
|
||||
# 3. Updates the manifest YAML with the correct URLs and hashes
|
||||
# 4. Updates the metainfo.xml with a new <release> entry
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
MANIFEST="$SCRIPT_DIR/app.yaak.Yaak.yml"
|
||||
METAINFO="$SCRIPT_DIR/app.yaak.Yaak.metainfo.xml"
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: $0 <version-tag>"
|
||||
echo "Example: $0 v2026.2.0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION_TAG="$1"
|
||||
VERSION="${VERSION_TAG#v}"
|
||||
|
||||
# Only allow stable releases (skip beta, alpha, rc, etc.)
|
||||
if [[ "$VERSION" == *-* ]]; then
|
||||
echo "Skipping pre-release version '$VERSION_TAG' (only stable releases are published to Flathub)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
REPO="mountain-loop/yaak"
|
||||
BASE_URL="https://github.com/$REPO/releases/download/$VERSION_TAG"
|
||||
|
||||
DEB_AMD64="yaak_${VERSION}_amd64.deb"
|
||||
DEB_ARM64="yaak_${VERSION}_arm64.deb"
|
||||
|
||||
TMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf "$TMPDIR"' EXIT
|
||||
|
||||
echo "Downloading $DEB_AMD64..."
|
||||
curl -fSL "$BASE_URL/$DEB_AMD64" -o "$TMPDIR/$DEB_AMD64"
|
||||
SHA_AMD64=$(sha256sum "$TMPDIR/$DEB_AMD64" | cut -d' ' -f1)
|
||||
echo " SHA256: $SHA_AMD64"
|
||||
|
||||
echo "Downloading $DEB_ARM64..."
|
||||
curl -fSL "$BASE_URL/$DEB_ARM64" -o "$TMPDIR/$DEB_ARM64"
|
||||
SHA_ARM64=$(sha256sum "$TMPDIR/$DEB_ARM64" | cut -d' ' -f1)
|
||||
echo " SHA256: $SHA_ARM64"
|
||||
|
||||
echo ""
|
||||
echo "Updating manifest: $MANIFEST"
|
||||
|
||||
# Update URLs by matching the arch-specific deb filename
|
||||
sed -i "s|url: .*amd64\.deb|url: $BASE_URL/$DEB_AMD64|" "$MANIFEST"
|
||||
sed -i "s|url: .*arm64\.deb|url: $BASE_URL/$DEB_ARM64|" "$MANIFEST"
|
||||
|
||||
# Update SHA256 hashes by finding the current ones and replacing
|
||||
OLD_SHA_AMD64=$(grep -A2 "amd64\.deb" "$MANIFEST" | grep sha256 | sed 's/.*"\(.*\)"/\1/')
|
||||
OLD_SHA_ARM64=$(grep -A2 "arm64\.deb" "$MANIFEST" | grep sha256 | sed 's/.*"\(.*\)"/\1/')
|
||||
|
||||
sed -i "s|$OLD_SHA_AMD64|$SHA_AMD64|" "$MANIFEST"
|
||||
sed -i "s|$OLD_SHA_ARM64|$SHA_ARM64|" "$MANIFEST"
|
||||
|
||||
echo " Manifest updated."
|
||||
|
||||
echo "Updating metainfo: $METAINFO"
|
||||
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
# Insert new release entry after <releases>
|
||||
sed -i "s| <releases>| <releases>\n <release version=\"$VERSION\" date=\"$TODAY\" />|" "$METAINFO"
|
||||
|
||||
echo " Metainfo updated."
|
||||
|
||||
echo ""
|
||||
echo "Done! Review the changes:"
|
||||
echo " $MANIFEST"
|
||||
echo " $METAINFO"
|
||||
@@ -7,6 +7,7 @@ import { forwardRef } from 'react';
|
||||
import { openWorkspaceSettings } from '../../commands/openWorkspaceSettings';
|
||||
import { activeWorkspaceAtom, activeWorkspaceMetaAtom } from '../../hooks/useActiveWorkspace';
|
||||
import { useKeyValue } from '../../hooks/useKeyValue';
|
||||
import { useRandomKey } from '../../hooks/useRandomKey';
|
||||
import { sync } from '../../init/sync';
|
||||
import { showConfirm, showConfirmDelete } from '../../lib/confirm';
|
||||
import { showDialog } from '../../lib/dialog';
|
||||
@@ -36,6 +37,7 @@ export function GitDropdown() {
|
||||
|
||||
function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
const workspace = useAtomValue(activeWorkspaceAtom);
|
||||
const [refreshKey, regenerateKey] = useRandomKey();
|
||||
const [
|
||||
{ status, log },
|
||||
{
|
||||
@@ -43,7 +45,6 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
deleteBranch,
|
||||
deleteRemoteBranch,
|
||||
renameBranch,
|
||||
fetchAll,
|
||||
mergeBranch,
|
||||
push,
|
||||
pull,
|
||||
@@ -51,7 +52,7 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
resetChanges,
|
||||
init,
|
||||
},
|
||||
] = useGit(syncDir, gitCallbacks(syncDir));
|
||||
] = useGit(syncDir, gitCallbacks(syncDir), refreshKey);
|
||||
|
||||
const localBranches = status.data?.localBranches ?? [];
|
||||
const remoteBranches = status.data?.remoteBranches ?? [];
|
||||
@@ -172,7 +173,7 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: 'Push',
|
||||
disabled: !hasRemotes || ahead === 0,
|
||||
hidden: !hasRemotes,
|
||||
leftSlot: <Icon icon="arrow_up_from_line" />,
|
||||
waitForOnSelect: true,
|
||||
async onSelect() {
|
||||
@@ -191,7 +192,7 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
},
|
||||
{
|
||||
label: 'Pull',
|
||||
disabled: !hasRemotes || behind === 0,
|
||||
hidden: !hasRemotes,
|
||||
leftSlot: <Icon icon="arrow_down_to_line" />,
|
||||
waitForOnSelect: true,
|
||||
async onSelect() {
|
||||
@@ -210,7 +211,7 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
},
|
||||
{
|
||||
label: 'Commit...',
|
||||
disabled: !hasChanges,
|
||||
|
||||
leftSlot: <Icon icon="git_commit_vertical" />,
|
||||
onSelect() {
|
||||
showDialog({
|
||||
@@ -502,15 +503,25 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) {
|
||||
];
|
||||
|
||||
return (
|
||||
<Dropdown fullWidth items={items} onOpen={fetchAll.mutate}>
|
||||
<Dropdown fullWidth items={items} onOpen={regenerateKey}>
|
||||
<GitMenuButton>
|
||||
<InlineCode className="flex items-center gap-1">
|
||||
<Icon icon="git_branch" size="xs" className="opacity-50" />
|
||||
{currentBranch}
|
||||
</InlineCode>
|
||||
<div className="flex items-center gap-1.5">
|
||||
{ahead > 0 && <span className="text-xs flex items-center gap-0.5"><span className="text-primary">↗</span>{ahead}</span>}
|
||||
{behind > 0 && <span className="text-xs flex items-center gap-0.5"><span className="text-info">↙</span>{behind}</span>}
|
||||
{ahead > 0 && (
|
||||
<span className="text-xs flex items-center gap-0.5">
|
||||
<span className="text-primary">↗</span>
|
||||
{ahead}
|
||||
</span>
|
||||
)}
|
||||
{behind > 0 && (
|
||||
<span className="text-xs flex items-center gap-0.5">
|
||||
<span className="text-info">↙</span>
|
||||
{behind}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</GitMenuButton>
|
||||
</Dropdown>
|
||||
|
||||
Reference in New Issue
Block a user