GraphQL, WebSocket, import, runner and CLI (M5, M6) plus packaging

- GraphQL editor with schema introspection, cached schema,
  autocomplete and explorer
- WebSocket: auth and subprotocols in the handshake, text/JSON/hex/file
  messages, saved messages, live log with filter, search and export,
  reconnect with backoff
- Import from Postman (collections and environments), Bruno, Insomnia,
  OpenAPI/Swagger and cURL; imported scripts are kept as docs, never run;
  credentials move to the gitignored secrets file
- Code snippets for cURL, fetch, Python, HTTPie, Go, PowerShell;
  Postman export
- Runner for folders and collections with JSON and JUnit reports
- knock CLI: send, run, import, auth login/debug/logout
- Large JSON responses parsed off the main thread
- PKGBUILDs, desktop entry with knock:// handler, CI workflow, README
This commit is contained in:
2026-11-27 17:13:06 +01:00
parent a469697af7
commit fc253126a7
51 changed files with 8437 additions and 24 deletions
+53
View File
@@ -0,0 +1,53 @@
name: ci
on:
push:
branches: [main]
tags: ['v*']
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container: rust:1-bookworm
steps:
- uses: actions/checkout@v4
- run: apt-get update && apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev librsvg2-dev libdbus-1-dev pkg-config
- run: cargo test -p knock-core --locked
# The oldest supported Ubuntu builds the .deb, so glibc and WebKitGTK fit 22.04 and newer.
deb:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- uses: actions/checkout@v4
- run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y curl build-essential pkg-config file \
libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libdbus-1-dev libssl-dev
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
- run: |
. "$HOME/.cargo/env"
npm ci
cargo build --release -p knock-cli --locked
npx tauri build --bundles deb,rpm,appimage
- name: Smoke test on Ubuntu 22.04
run: |
apt-get install -y ./target/release/bundle/deb/*.deb xvfb python3
python3 -m http.server 18765 >/dev/null 2>&1 &
mkdir -p /tmp/c/environments
printf 'version: 1\nname: Smoke\n' > /tmp/c/knock.yaml
printf 'name: Root\nurl: http://127.0.0.1:18765/\nassert:\n - { on: status, equals: 200 }\n' > /tmp/c/root.yaml
knock run /tmp/c
timeout 10 xvfb-run -a knock-app || [ $? -eq 124 ]
- uses: actions/upload-artifact@v3
with:
name: bundles
path: |
target/release/bundle/deb/*.deb
target/release/bundle/rpm/*.rpm
target/release/bundle/appimage/*.AppImage