chore: 2.3.0 — move to Gitea (CI, R2 releases, links, docs) and dependency refresh #2
No files matched your search
@@ -0,0 +1,37 @@
|
||||
name: Announce Release to Discord
|
||||
|
||||
# Posts a published release to Discord through the ops repo's
|
||||
# announce-release.yml (which reads the release from the Gitea API).
|
||||
#
|
||||
# Publishing the draft that release.yml opens fires NO `release: published`
|
||||
# workflow: the draft belongs to the job token, and Gitea credits the publish
|
||||
# to its Actions user, whose events start nothing. So after publishing, run
|
||||
# this workflow by hand (Actions → Announce Release to Discord → Run workflow)
|
||||
# with the tag. The `release` trigger stays for a release a person creates.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Existing release tag to announce
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/announce-release.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
tag_override: ${{ inputs.tag || '' }}
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
# Only the webhooks it needs, not `inherit`, which would hand every
|
||||
# repository secret (the Android signing keys included) to it.
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
DISCORD_REPO_WEBHOOK: ${{ secrets.DISCORD_REPO_WEBHOOK }}
|
||||
DISCORD_PING_ROLE_ID: ${{ secrets.DISCORD_PING_ROLE_ID }}
|
||||
@@ -0,0 +1,195 @@
|
||||
name: CI
|
||||
|
||||
# Gitea Actions (ops runbook: poli0981/.github docs/GITEA-MIGRATION.md).
|
||||
# `web` and `rust` run every gate on pull requests and on `main`. On a push to
|
||||
# `main`, `deploy` then publishes the web app to Cloudflare Workers with
|
||||
# wrangler (migration decision D3: Workers Builds pulled from GitHub and is
|
||||
# disconnected), and `smoke` checks production serves that commit.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||
# Only superseded PR runs are cancelled; every commit on main gets a full run.
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
WRANGLER_SEND_METRICS: 'false'
|
||||
|
||||
jobs:
|
||||
# `web` is the check to require on `main` (Gitea branch protection): keep
|
||||
# the job id stable.
|
||||
web:
|
||||
name: Web · lint, typecheck, test, build
|
||||
runs-on: ubuntu-24.04 # Gitea: Docker, docker.gitea.com/runner-images
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
# Actions are pinned by commit SHA (a tag can be moved; a SHA cannot).
|
||||
# Renovate keeps the SHA and the version comment current.
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
# No dependency needs its install scripts (esbuild, workerd and the Tauri
|
||||
# CLI resolve their platform binaries at runtime), so none get to run.
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Format check
|
||||
run: npm run format:check
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Knip
|
||||
run: npm run knip
|
||||
|
||||
- name: Typecheck (TypeScript 7)
|
||||
run: |
|
||||
npx tsc --version | grep -q '^Version 7\.' || { echo "::error::tsc is not TypeScript 7"; exit 1; }
|
||||
npm run typecheck
|
||||
|
||||
- name: Test
|
||||
run: npm test
|
||||
|
||||
# Advisory only: a fresh advisory in a transitive dependency must not
|
||||
# turn every unrelated PR red before Renovate opens its fix. The
|
||||
# osv-scanner job (security.yml) and Renovate's OSV PRs are the gate.
|
||||
- name: Audit dependencies
|
||||
run: npm audit --audit-level=high
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
# Validates wrangler.jsonc and bundles the Worker exactly as `deploy`
|
||||
# will, without deploying anything.
|
||||
- name: Worker deploy dry run
|
||||
run: npm run cf:check
|
||||
|
||||
rust:
|
||||
name: Tauri · fmt, clippy
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# The libraries Tauri links against on Linux. The job container runs as
|
||||
# root; sudo only where there is one.
|
||||
- name: Install Linux build dependencies
|
||||
run: |
|
||||
SUDO=""; if command -v sudo >/dev/null 2>&1 && [ "$(id -u)" != 0 ]; then SUDO=sudo; fi
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y --no-install-recommends \
|
||||
build-essential pkg-config libssl-dev libwebkit2gtk-4.1-dev libgtk-3-dev \
|
||||
libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
# tauri::generate_context!() embeds the icons (generated, gitignored)
|
||||
# and the built frontend (../dist) at compile time.
|
||||
- name: Generate icons and build the web app
|
||||
run: |
|
||||
npm run tauri:icon
|
||||
npm run build
|
||||
|
||||
# rust-toolchain is pinned to a MASTER commit and given its toolchain:
|
||||
# its `stable` branch is regenerated on top of master, so a commit of
|
||||
# that branch can disappear.
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
workspaces: './src-tauri -> target'
|
||||
|
||||
- name: rustfmt
|
||||
working-directory: src-tauri
|
||||
run: cargo fmt --check
|
||||
|
||||
- name: Clippy
|
||||
working-directory: src-tauri
|
||||
run: cargo clippy --all-targets --locked -- -D warnings
|
||||
|
||||
# Production deploy of https://jsonprism.poli0981.dev after a green `web` on
|
||||
# `main`. CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID are user-level
|
||||
# Actions secrets shared by the web repos; the Worker's own secret
|
||||
# (TURNSTILE_SECRET) lives in Cloudflare and survives every deploy. No
|
||||
# dependency cache: what ships is built from a clean install.
|
||||
deploy:
|
||||
name: Deploy · Cloudflare Workers
|
||||
needs: web
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
concurrency:
|
||||
group: deploy-production
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
# wrangler.jsonc's build.command runs `npm run build` first; the build
|
||||
# stamps GITHUB_SHA into <meta name="jsonprism-commit"> for `smoke`.
|
||||
- name: Deploy to Cloudflare Workers
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
run: npx wrangler deploy --message "main ${GITHUB_SHA:0:8}"
|
||||
|
||||
# Waits until production serves the deployed commit, then checks headers,
|
||||
# routing, redirects and the API (production-smoke.yml, which can also be
|
||||
# run on its own from the Actions page).
|
||||
smoke:
|
||||
name: Production smoke
|
||||
needs: deploy
|
||||
permissions: {}
|
||||
uses: ./.gitea/workflows/production-smoke.yml
|
||||
with:
|
||||
sha: ${{ github.sha }}
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Notify CI Failures
|
||||
|
||||
# A failed run of the workflows below on `main` posts to Discord through the
|
||||
# ops repo's notify-ci-failure.yml (the script is loaded at `ops_ref`, the
|
||||
# same commit as `uses:`). Neither this file nor the shared one checks out the
|
||||
# triggering run's code: they read run metadata only, and pass every
|
||||
# untrusted field to the notifier through `env:`.
|
||||
|
||||
on:
|
||||
workflow_run: # zizmor: ignore[dangerous-triggers]
|
||||
workflows: ['CI', 'Production smoke', 'Security', 'Qodana']
|
||||
types: [completed]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.gitea/workflows/notify-ci-failure.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
secrets:
|
||||
DISCORD_CI_WEBHOOK: ${{ secrets.DISCORD_CI_WEBHOOK }}
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Notify Release Pipeline
|
||||
|
||||
# Every tag run of the release pipeline (release.yml) and the Discord
|
||||
# announcement reported to Discord through the ops repo's
|
||||
# notify-release-pipeline.yml. Match the exact `name:` of both producers:
|
||||
# renaming either silently breaks this filter.
|
||||
|
||||
on:
|
||||
workflow_run: # zizmor: ignore[dangerous-triggers]
|
||||
workflows:
|
||||
- 'Release Tauri bundles'
|
||||
- 'Announce Release to Discord'
|
||||
types: [completed]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.gitea/workflows/notify-release-pipeline.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
# Only the webhook the shared workflow declares, not `inherit`.
|
||||
secrets:
|
||||
DISCORD_RELEASE_PIPELINE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PIPELINE_WEBHOOK }}
|
||||
@@ -1,25 +1,26 @@
|
||||
name: Production smoke
|
||||
|
||||
# Cloudflare Workers Builds deploys every push to main to
|
||||
# https://jsonprism.poli0981.dev. This waits until the site serves the pushed
|
||||
# commit (index.html carries <meta name="jsonprism-commit">), then checks the
|
||||
# security headers, routing, redirects and the API. Failures reach Discord via
|
||||
# Checks https://jsonprism.poli0981.dev: the security headers, routing,
|
||||
# redirects and the API. Called by ci.yml after each deploy from `main`, with
|
||||
# the deployed commit: it first waits until the site serves that commit
|
||||
# (index.html carries <meta name="jsonprism-commit">). Run it by hand from the
|
||||
# Actions page to check production as it is. Failures reach Discord via
|
||||
# notify-ci-failure.yml.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_call:
|
||||
inputs:
|
||||
sha:
|
||||
description: Commit the site must serve before the checks run (empty = check as it is)
|
||||
type: string
|
||||
default: ''
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: production-smoke
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
SITE: https://jsonprism.poli0981.dev
|
||||
UA: jsonprism-smoke (+https://github.com/poli0981/jsonPrism)
|
||||
UA: jsonprism-smoke (+https://git.poli0981.dev/poli0981/jsonPrism)
|
||||
|
||||
jobs:
|
||||
smoke:
|
||||
@@ -32,9 +33,9 @@ jobs:
|
||||
# until then some requests still hit the previous version. Wait until the
|
||||
# commit has been served several times in a row.
|
||||
- name: Wait for this commit to go live
|
||||
if: github.event_name == 'push'
|
||||
if: ${{ inputs.sha != '' }}
|
||||
env:
|
||||
SHA: ${{ github.sha }}
|
||||
SHA: ${{ inputs.sha }}
|
||||
run: |
|
||||
want="${SHA:0:7}"
|
||||
streak=0
|
||||
@@ -53,7 +54,7 @@ jobs:
|
||||
echo "Attempt $attempt: live=${live:-unknown}, waiting for $want"
|
||||
sleep 10
|
||||
done
|
||||
echo "::error::Production did not serve $want within 15 minutes. Check Workers Builds in the Cloudflare dashboard."
|
||||
echo "::error::Production did not serve $want within 15 minutes. Check the deploy job and the Worker in the Cloudflare dashboard."
|
||||
exit 1
|
||||
|
||||
- name: Check headers, routes and API
|
||||
@@ -0,0 +1,102 @@
|
||||
name: Qodana
|
||||
|
||||
# JetBrains Qodana static analysis through the ops repo's reusable-qodana.yml
|
||||
# (the Qodana CLI; JetBrains/qodana-action needs GitHub's API), one linter per
|
||||
# Qodana Cloud project (Ultimate licence):
|
||||
#
|
||||
# typescript - qodana-js (native mode) the repository project jsonprism-js-ts, secret QODANA_TOKEN_TS_JS, qodana.yaml
|
||||
# rust - qodana-rust (Docker, Early Access) src-tauri/ project jsonprism-rust, secret QODANA_TOKEN_RUST, src-tauri/qodana.yaml
|
||||
#
|
||||
# Results: Qodana Cloud and the qodana-report-* artifacts (SARIF and logs; no
|
||||
# code-scanning UI on Gitea). Not a required check. A run without a token
|
||||
# (Renovate's) skips that analysis instead of failing; the reusable also skips
|
||||
# runs started by renovate-bot.
|
||||
#
|
||||
# qodana-rust ships only as a Docker image: it runs on the maintainer's PC
|
||||
# (`windows-latest`, host mode) in Docker Desktop, as root so that the
|
||||
# bootstrap in src-tauri/qodana.yaml can install the libraries Tauri links
|
||||
# against.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: qodana-${{ github.ref }}
|
||||
# Only superseded PR runs are cancelled; every commit on main gets a full run.
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
tokens:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions: {}
|
||||
outputs:
|
||||
typescript: ${{ steps.check.outputs.typescript }}
|
||||
rust: ${{ steps.check.outputs.rust }}
|
||||
steps:
|
||||
- name: Check for the Qodana tokens
|
||||
id: check
|
||||
env:
|
||||
TOKEN_TS_JS: ${{ secrets.QODANA_TOKEN_TS_JS }}
|
||||
TOKEN_RUST: ${{ secrets.QODANA_TOKEN_RUST }}
|
||||
run: |
|
||||
for pair in "typescript:$TOKEN_TS_JS" "rust:$TOKEN_RUST"; do
|
||||
name="${pair%%:*}"
|
||||
if [ -n "${pair#*:}" ]; then
|
||||
echo "$name=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "::notice::No Qodana token for $name in this run: that analysis is skipped."
|
||||
fi
|
||||
done
|
||||
|
||||
typescript:
|
||||
needs: tokens
|
||||
if: ${{ needs.tokens.outputs.typescript == 'true' }}
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/reusable-qodana.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
runs-on: ubuntu-latest
|
||||
linter: qodana-js
|
||||
package-manager: npm
|
||||
node-version-file: .nvmrc
|
||||
# worker-configuration.d.ts is generated and gitignored; without it the
|
||||
# Worker's Env types don't resolve (wrangler builds dist/ first).
|
||||
prepare-command: npm run cf:types
|
||||
artifact-name: qodana-report-typescript
|
||||
secrets:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS }}
|
||||
|
||||
rust:
|
||||
needs: tokens
|
||||
if: ${{ needs.tokens.outputs.rust == 'true' }}
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/reusable-qodana.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
runs-on: windows-latest
|
||||
within-docker: true
|
||||
linter: qodana-rust
|
||||
project-dir: src-tauri
|
||||
repository-root: .
|
||||
# The crates go to Qodana's cached directory.
|
||||
extra-args: -u root -e CARGO_HOME=/data/cache/cargo
|
||||
# tauri::generate_context!() refuses to expand without the icons
|
||||
# (generated by the Tauri CLI, gitignored) and the frontend directory
|
||||
# (frontendDist, ../dist): an empty page stands in for the web build,
|
||||
# which the analysis does not need.
|
||||
package-manager: npm
|
||||
node-version-file: .nvmrc
|
||||
prepare-command: >-
|
||||
npm run tauri:icon;
|
||||
New-Item -ItemType Directory -Force dist | Out-Null;
|
||||
Set-Content -Path dist/index.html -Value '<!doctype html><title>stand-in</title>'
|
||||
artifact-name: qodana-report-rust
|
||||
secrets:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_RUST }}
|
||||
@@ -0,0 +1,477 @@
|
||||
# A `vX.Y.Z` tag builds the desktop and Android apps and publishes them to
|
||||
# Cloudflare R2 (ops runbook §3.3, migration guide jsonprism.md):
|
||||
#
|
||||
# https://releases.poli0981.dev/jsonprism/<version>/<file>
|
||||
# https://releases.poli0981.dev/jsonprism/jsonprism-latest.apk (uploaded last)
|
||||
#
|
||||
# then opens a DRAFT Gitea release with the notes and the links (the forge's
|
||||
# disk is not for binaries, runbook §1). Publish the draft in the Gitea UI,
|
||||
# then run announce-release.yml with the tag for Discord: publishing a draft
|
||||
# the job token created fires no workflow (Gitea credits the event to its
|
||||
# Actions user). The apps have no updater: people download a new version by
|
||||
# hand.
|
||||
#
|
||||
# - verify: tests, and the tag must name the version in package.json and
|
||||
# src-tauri/Cargo.toml (tauri.conf.json reads package.json).
|
||||
# - Windows builds on the maintainer's PC (host mode, `windows-latest`): MSI
|
||||
# and NSIS. Linux in the runner's Docker image `ubuntu-22.04` (its glibc is
|
||||
# the floor of the .deb/.rpm/.AppImage). Android (universal APK, the four
|
||||
# ABIs) in Docker with the SDK and a pinned NDK installed in the job
|
||||
# (migration decision D10). No macOS: there is no macOS runner (D9); 2.2.1
|
||||
# was the last macOS build.
|
||||
# - The APK is signed by Gradle (src-tauri/gen/android/app/build.gradle.kts
|
||||
# reads keystore.properties). The keystore secrets exist only in that job,
|
||||
# which runs only for a tag or a manual dispatch (runbook §2 rule 10).
|
||||
# - No dependency caches in release builds: a poisoned cache could end up
|
||||
# inside a shipped installer. Releases are rare; take the extra minutes.
|
||||
# - Manual run without a tag ("Run workflow" on a branch): everything builds
|
||||
# and the files are kept as the `r2-release` artifact for 7 days, but
|
||||
# nothing is uploaded or released (publish-r2.yml refuses a branch ref). An
|
||||
# uploaded file is never replaced (rclone --immutable): to ship a fix, bump
|
||||
# the version.
|
||||
#
|
||||
# The name feeds notify-release-pipeline.yml (and the ops notifier reads
|
||||
# "Tauri" in it): rename both together.
|
||||
name: Release Tauri bundles
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: release-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
# Pin the NDK so CI matches local; Tauri otherwise picks the highest
|
||||
# installed one. compileSdk/targetSdk 36 (src-tauri/gen/android).
|
||||
NDK_VERSION: '27.2.12479018'
|
||||
|
||||
jobs:
|
||||
# Nothing gets built for a tag whose code fails the tests or whose version
|
||||
# fields disagree with the tag itself.
|
||||
verify:
|
||||
name: Verify tag and tests
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check the tag matches the app version
|
||||
env:
|
||||
TAG: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '' }}
|
||||
run: |
|
||||
version=$(node -p "require('./package.json').version")
|
||||
cargo_version=$(sed -n 's/^version = "\(.*\)"$/\1/p' src-tauri/Cargo.toml | head -n 1)
|
||||
[ "$cargo_version" = "$version" ] || { echo "::error::Cargo.toml version $cargo_version does not match package.json $version"; exit 1; }
|
||||
if [ -n "$TAG" ]; then
|
||||
[[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]] || { echo "::error::'$TAG' is not a version tag"; exit 1; }
|
||||
[ "$TAG" = "v$version" ] || { echo "::error::Tag $TAG does not match package.json version $version"; exit 1; }
|
||||
fi
|
||||
echo "version $version, tag ${TAG:-none (dry run)}"
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Test
|
||||
run: npm test
|
||||
|
||||
windows:
|
||||
name: Build · Windows
|
||||
needs: verify
|
||||
runs-on: windows-latest # host mode on the maintainer's PC
|
||||
timeout-minutes: 90
|
||||
permissions:
|
||||
contents: read
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
package-manager-cache: false
|
||||
|
||||
# rust-toolchain is pinned to a MASTER commit and given its toolchain:
|
||||
# its `stable` branch is regenerated on top of master, so a commit of
|
||||
# that branch can disappear.
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm ci --ignore-scripts --no-audit --no-fund
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
|
||||
# tauri.conf.json: bundle.targets "all" (MSI + NSIS here). The icons are
|
||||
# generated (gitignored); beforeBuildCommand builds the web app.
|
||||
- name: Build the installers
|
||||
run: |
|
||||
npm run tauri:icon
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
npm run tauri -- build
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
|
||||
# One fixed name per kind, so the links never need encoding.
|
||||
- name: Stage the installers
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$version = node -p "require('./package.json').version"
|
||||
$out = Join-Path 'staged' $version
|
||||
New-Item -ItemType Directory -Force $out | Out-Null
|
||||
$bundle = 'src-tauri/target/release/bundle'
|
||||
$kinds = @(
|
||||
@{ Dir = 'msi'; Filter = "*_${version}_*.msi"; Name = "JSONPrism_${version}_x64_en-US.msi" },
|
||||
@{ Dir = 'nsis'; Filter = "*_${version}_*-setup.exe"; Name = "JSONPrism_${version}_x64-setup.exe" }
|
||||
)
|
||||
foreach ($k in $kinds) {
|
||||
$found = @(Get-ChildItem (Join-Path $bundle $k.Dir) -File -Filter $k.Filter)
|
||||
if ($found.Count -ne 1) { Write-Host "::error::expected one $($k.Dir) bundle of $version, found: $($found.Name -join ', ')"; exit 1 }
|
||||
Copy-Item $found[0].FullName (Join-Path $out $k.Name)
|
||||
}
|
||||
Get-ChildItem $out | ForEach-Object { "{0,12} {1}" -f $_.Length, $_.Name }
|
||||
|
||||
- name: Upload the installers
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: desktop-windows
|
||||
path: staged/
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
linux:
|
||||
name: Build · Linux
|
||||
needs: verify
|
||||
# The oldest supported Ubuntu keeps the AppImage/deb glibc floor low.
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 90
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
# linuxdeploy is itself an AppImage, and a container has no FUSE.
|
||||
APPIMAGE_EXTRACT_AND_RUN: '1'
|
||||
# linuxdeploy's strip pass fails intermittently on newer ELF sections.
|
||||
NO_STRIP: 'true'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# The job container runs as root; sudo only where there is one.
|
||||
- name: Install Linux build dependencies
|
||||
run: |
|
||||
SUDO=""; if command -v sudo >/dev/null 2>&1 && [ "$(id -u)" != 0 ]; then SUDO=sudo; fi
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y --no-install-recommends \
|
||||
libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf \
|
||||
libssl-dev build-essential curl wget file xdg-utils rpm
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Build the packages
|
||||
run: |
|
||||
npm run tauri:icon
|
||||
npm run tauri -- build
|
||||
|
||||
# One fixed name per kind, so the links never need encoding.
|
||||
- name: Stage the packages
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version=$(node -p "require('./package.json').version")
|
||||
out="staged/$version"
|
||||
mkdir -p "$out"
|
||||
bundle=src-tauri/target/release/bundle
|
||||
stage() { # <glob> <name>
|
||||
local found=()
|
||||
for f in $1; do [ -f "$f" ] && found+=("$f"); done
|
||||
[ "${#found[@]}" -eq 1 ] || { echo "::error::expected one bundle for $1, found ${#found[@]}"; ls -la "$bundle"/*; exit 1; }
|
||||
cp "${found[0]}" "$out/$2"
|
||||
}
|
||||
stage "$bundle/appimage/*.AppImage" "JSONPrism_${version}_amd64.AppImage"
|
||||
stage "$bundle/deb/*.deb" "JSONPrism_${version}_amd64.deb"
|
||||
stage "$bundle/rpm/*.rpm" "JSONPrism_${version}_x86_64.rpm"
|
||||
ls -la "$out"
|
||||
|
||||
- name: Upload the packages
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: desktop-linux
|
||||
path: staged/
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
# Android drives the Tauri CLI and signs with the release keystore (see
|
||||
# docs/TAURI-NOTES.md): ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD,
|
||||
# ANDROID_KEY_PASSWORD (optional), ANDROID_KEY_ALIAS (optional, "upload").
|
||||
android:
|
||||
name: Build · Android (APK)
|
||||
needs: verify
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 120
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '17'
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Setup Rust with Android targets
|
||||
uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master
|
||||
with:
|
||||
toolchain: stable
|
||||
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
|
||||
|
||||
# The runner image has no Android SDK (migration decision D10): the
|
||||
# command-line tools come from setup-android (only platform-tools), the
|
||||
# rest from sdkmanager.
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4.0.4
|
||||
with:
|
||||
packages: platform-tools
|
||||
log-accepted-android-sdk-licenses: false
|
||||
|
||||
- name: Install NDK, build-tools and platform
|
||||
run: |
|
||||
sdkmanager "ndk;${NDK_VERSION}" "build-tools;36.1.0" "platforms;android-36" > /dev/null
|
||||
echo "NDK_HOME=$ANDROID_HOME/ndk/${NDK_VERSION}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Generate icons
|
||||
run: npm run tauri:icon
|
||||
|
||||
# The Gradle release signing config reads keystore.properties, written
|
||||
# here and removed with the keystore after the build.
|
||||
- name: Write the keystore
|
||||
env:
|
||||
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "$ANDROID_KEYSTORE_BASE64" ]; then
|
||||
echo "::error::ANDROID_KEYSTORE_BASE64 is not set; cannot sign the release APK."
|
||||
exit 1
|
||||
fi
|
||||
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/upload-keystore.jks"
|
||||
{
|
||||
echo "storePassword=$ANDROID_KEYSTORE_PASSWORD"
|
||||
echo "keyPassword=${ANDROID_KEY_PASSWORD:-$ANDROID_KEYSTORE_PASSWORD}"
|
||||
echo "keyAlias=${ANDROID_KEY_ALIAS:-upload}"
|
||||
echo "storeFile=$RUNNER_TEMP/upload-keystore.jks"
|
||||
} > src-tauri/gen/android/keystore.properties
|
||||
|
||||
# buildSrc's BuildTask runs `npm run -- tauri android android-studio-script`,
|
||||
# so the npm Tauri CLI is enough here.
|
||||
- name: Build the signed APK (universal)
|
||||
run: npm run tauri -- android build --apk
|
||||
|
||||
# The Gradle config falls back to an unsigned build without a keystore:
|
||||
# apksigner makes sure that never ships.
|
||||
- name: Stage the APK
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -f "$RUNNER_TEMP/upload-keystore.jks" src-tauri/gen/android/keystore.properties
|
||||
BT=$(find "$ANDROID_HOME/build-tools" -mindepth 1 -maxdepth 1 -type d | sort -V | tail -1)
|
||||
version=$(node -p "require('./package.json').version")
|
||||
dir=src-tauri/gen/android/app/build/outputs/apk/universal/release
|
||||
mapfile -t apks < <(find "$dir" -maxdepth 1 -name '*.apk')
|
||||
[ "${#apks[@]}" -eq 1 ] || { echo "::error::expected one APK in $dir, found ${#apks[@]}"; find src-tauri/gen/android/app/build/outputs -name '*.apk'; exit 1; }
|
||||
"$BT/apksigner" verify --print-certs "${apks[0]}" | grep -i 'SHA-256' || true
|
||||
"$BT/apksigner" verify "${apks[0]}"
|
||||
mkdir -p "staged/$version"
|
||||
cp "${apks[0]}" "staged/$version/JSONPrism_${version}_android-universal.apk"
|
||||
ls -la "staged/$version"
|
||||
|
||||
- name: Remove the keystore
|
||||
if: ${{ always() }}
|
||||
run: rm -f "$RUNNER_TEMP/upload-keystore.jks" src-tauri/gen/android/keystore.properties
|
||||
|
||||
- name: Upload the APK
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: android
|
||||
path: staged/
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
assemble:
|
||||
name: Assemble (checksums, notes)
|
||||
needs: [windows, linux, android]
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Download the Windows installers
|
||||
uses: christopherhx/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # v4
|
||||
with:
|
||||
name: desktop-windows
|
||||
path: r2-release/versioned
|
||||
|
||||
- name: Download the Linux packages
|
||||
uses: christopherhx/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # v4
|
||||
with:
|
||||
name: desktop-linux
|
||||
path: r2-release/versioned
|
||||
|
||||
- name: Download the APK
|
||||
uses: christopherhx/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # v4
|
||||
with:
|
||||
name: android
|
||||
path: r2-release/versioned
|
||||
|
||||
# On a tag, the tag must name the version the apps were built with.
|
||||
- name: Checksums, alias and notes
|
||||
env:
|
||||
TAG: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '' }}
|
||||
SERVER: ${{ github.server_url }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version=$(node -p "require('./package.json').version")
|
||||
if [ -n "$TAG" ] && [ "$TAG" != "v$version" ]; then
|
||||
echo "::error::tag $TAG does not match the app version $version (package.json)"; exit 1
|
||||
fi
|
||||
dir="r2-release/versioned/$version"
|
||||
[ "$(find "$dir" -type f | wc -l)" -eq 6 ] || { echo "::error::expected 6 files in $dir"; ls -la "$dir"; exit 1; }
|
||||
(cd "$dir" && sha256sum -- * | sort -k2 > SHA256SUMS.txt)
|
||||
cat "$dir/SHA256SUMS.txt"
|
||||
cp "$dir/JSONPrism_${version}_android-universal.apk" r2-release/jsonprism-latest.apk
|
||||
|
||||
base="https://releases.poli0981.dev/jsonprism/$version"
|
||||
ref="${TAG:-main}"
|
||||
{
|
||||
echo "JSONPrism $version for Windows, Linux and Android: the same app as https://jsonprism.poli0981.dev, which runs in any browser."
|
||||
echo
|
||||
echo "What changed: [CHANGELOG]($SERVER/$REPO/src/$([ -n "$TAG" ] && echo tag || echo branch)/$ref/CHANGELOG.md)."
|
||||
echo
|
||||
echo "**Download**: Windows 10/11 x64 (\`-setup.exe\` or \`.msi\`), Linux x86_64 (\`.AppImage\`, \`.deb\`, \`.rpm\`), Android 12+ (universal \`.apk\`, sideload: allow \"install unknown apps\" for your browser or file manager). No macOS build since 2.2.1: there is no macOS build machine since the move from GitHub."
|
||||
echo
|
||||
while read -r _ name; do
|
||||
echo "- [$name]($base/$name)"
|
||||
done < "$dir/SHA256SUMS.txt"
|
||||
echo "- [SHA256SUMS.txt]($base/SHA256SUMS.txt)"
|
||||
echo
|
||||
echo "The newest APK is always at https://releases.poli0981.dev/jsonprism/jsonprism-latest.apk."
|
||||
echo
|
||||
echo "Verify a download with \`sha256sum -c SHA256SUMS.txt --ignore-missing\`. SHA-256:"
|
||||
echo
|
||||
echo '```'
|
||||
cat "$dir/SHA256SUMS.txt"
|
||||
echo '```'
|
||||
} > notes.md
|
||||
cat notes.md
|
||||
|
||||
- name: Upload the release files
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: r2-release
|
||||
path: r2-release/
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload the notes
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: release-notes
|
||||
path: notes.md
|
||||
retention-days: 7
|
||||
|
||||
publish:
|
||||
name: Publish to R2
|
||||
needs: assemble
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/publish-r2.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
app: jsonprism
|
||||
artifact: r2-release
|
||||
versioned-dir: versioned
|
||||
feed-files: |
|
||||
jsonprism-latest.apk
|
||||
runs-on: ubuntu-latest
|
||||
secrets:
|
||||
R2_RELEASES_ACCESS_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
|
||||
R2_RELEASES_SECRET_ACCESS_KEY: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
|
||||
|
||||
release:
|
||||
name: Gitea release (draft, notes + links)
|
||||
needs: publish
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: write # VERIFY which of contents / releases Gitea enforces
|
||||
releases: write # (runbook §3.2 item 5)
|
||||
steps:
|
||||
- name: Download the notes
|
||||
uses: christopherhx/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # v4
|
||||
with:
|
||||
name: release-notes
|
||||
path: .
|
||||
|
||||
- name: Create the draft release
|
||||
uses: https://gitea.com/actions/gitea-release-action@5a83c90484ef4355121df5eb60558c8ce66e81ac # v1.3.7
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: JSONPrism ${{ github.ref_name }}
|
||||
body_path: notes.md
|
||||
draft: true
|
||||
prerelease: ${{ contains(github.ref_name, '-') }}
|
||||
@@ -0,0 +1,91 @@
|
||||
name: Security
|
||||
|
||||
# Gitea has no CodeQL, no dependency review and no code-scanning UI (ops
|
||||
# runbook §1, migration decision D7). This workflow covers:
|
||||
#
|
||||
# workflow-lint actionlint + shellcheck and zizmor on .gitea/workflows/*.yml
|
||||
# scan the ops repo's security.yml: gitleaks (full history,
|
||||
# exceptions in .gitleaksignore), Opengrep (SAST), osv-scanner
|
||||
# (package-lock.json, Cargo.lock; exceptions in
|
||||
# src-tauri/osv-scanner.toml) and cargo-deny
|
||||
# (src-tauri/deny.toml)
|
||||
#
|
||||
# Weekly as well, so a new advisory against an unchanged lockfile turns it red:
|
||||
# Friday 13:19 UTC = 20:19 Vietnam (slot in the ops repo's cron registry; the
|
||||
# runner is the maintainer's PC and only runs 13:00–16:00 UTC).
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '19 13 * * 5'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: security-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
# Both linters without Docker: actionlint and shellcheck as release binaries
|
||||
# at pinned versions, SHA-256 verified (the ops repo's ops-lint.yml pins);
|
||||
# zizmor from the hash-locked .github/requirements-ci.txt. Renovate does not
|
||||
# update the binaries: bump version and checksum together, by hand.
|
||||
workflow-lint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
ACTIONLINT_VERSION: 1.7.12
|
||||
ACTIONLINT_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 # actionlint_1.7.12_linux_amd64.tar.gz (release checksums file)
|
||||
SHELLCHECK_VERSION: v0.11.0
|
||||
SHELLCHECK_SHA256: 8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198 # shellcheck-v0.11.0.linux.x86_64.tar.xz
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install zizmor
|
||||
run: |
|
||||
python -m pip install --quiet --require-hashes --only-binary :all: -r .github/requirements-ci.txt
|
||||
# The files by name: zizmor only looks for .github/workflows by itself.
|
||||
# Offline: its online audits ask GitHub's API about the actions, with a
|
||||
# token this runner does not have. Any finding at medium or above fails.
|
||||
- name: zizmor (workflow security audit)
|
||||
run: zizmor --offline --min-severity medium --config .github/zizmor.yml .gitea/workflows/*.yml
|
||||
- name: Install actionlint ${{ env.ACTIONLINT_VERSION }} + shellcheck ${{ env.SHELLCHECK_VERSION }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tmp="${RUNNER_TEMP:-/tmp}"
|
||||
bin="$tmp/lint-bin"
|
||||
mkdir -p "$bin"
|
||||
curl -fsSL --retry 3 -o "$tmp/actionlint.tar.gz" \
|
||||
"https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
|
||||
echo "${ACTIONLINT_SHA256} $tmp/actionlint.tar.gz" | sha256sum -c -
|
||||
tar -xzf "$tmp/actionlint.tar.gz" -C "$bin" actionlint
|
||||
curl -fsSL --retry 3 -o "$tmp/shellcheck.tar.xz" \
|
||||
"https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
|
||||
echo "${SHELLCHECK_SHA256} $tmp/shellcheck.tar.xz" | sha256sum -c -
|
||||
tar -xJf "$tmp/shellcheck.tar.xz" -C "$bin" --strip-components=1 "shellcheck-${SHELLCHECK_VERSION}/shellcheck"
|
||||
echo "$bin" >> "$GITHUB_PATH"
|
||||
# .github/actionlint.yaml ignores only the Gitea features actionlint does
|
||||
# not know; everything else stays an error.
|
||||
- name: actionlint (workflow syntax and expressions)
|
||||
run: |
|
||||
actionlint -version
|
||||
actionlint -color -config-file .github/actionlint.yaml \
|
||||
-shellcheck "$(command -v shellcheck)" .gitea/workflows/*.yml
|
||||
|
||||
scan:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/security.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
node: true
|
||||
rust: true
|
||||
cargo-manifest-path: src-tauri/Cargo.toml
|
||||
@@ -1,6 +0,0 @@
|
||||
github: poli0981
|
||||
ko_fi: skullmute
|
||||
buy_me_a_coffee: skullmute
|
||||
patreon: skullmute
|
||||
custom:
|
||||
- paypal.me/DungDang212
|
||||
@@ -10,7 +10,7 @@ assignees: []
|
||||
Thanks for reporting a barrier. You don't need to know the cause: describe
|
||||
what you tried and what happened. See ACCESSIBILITY.md for what JSONPrism
|
||||
supports today and its known limitations:
|
||||
https://github.com/poli0981/jsonPrism/blob/main/ACCESSIBILITY.md
|
||||
https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/ACCESSIBILITY.md
|
||||
|
||||
Prefer not to post publicly? Email code@poli0981.dev with "Accessibility"
|
||||
in the subject. Security problems go through SECURITY.md instead.
|
||||
@@ -36,7 +36,7 @@ announced, focus got stuck, text was unreadable at 200 % zoom).
|
||||
|
||||
- Assistive technology and version: [e.g. NVDA 2026.3, VoiceOver, TalkBack, Narrator, Dragon, screen magnifier, none]
|
||||
- How you use the app: [keyboard only / screen reader / voice control / switch access / zoom or magnification / Windows contrast theme / other]
|
||||
- Platform: [Web / Windows / macOS / Linux / Android]
|
||||
- Platform: [Web / Windows / Linux / Android / macOS (2.2.1 or older)]
|
||||
- JSONPrism version: [e.g. 2.2.1 — see About → Build info]
|
||||
- Browser (web) or OS version (apps): [e.g. Firefox on Windows 11, Safari on macOS 15, Android 15]
|
||||
|
||||
|
||||
@@ -8,11 +8,10 @@ assignees: []
|
||||
|
||||
<!--
|
||||
Security vulnerabilities do NOT belong in a public issue. Report them
|
||||
privately through https://github.com/poli0981/jsonPrism/security/advisories/new
|
||||
or by email to security@poli0981.dev.
|
||||
privately by email to security@poli0981.dev (see SECURITY.md).
|
||||
|
||||
Something hard or impossible to use with a keyboard, screen reader, zoom or
|
||||
other assistive technology? Use the "Accessibility issue" template instead.
|
||||
other assistive technology? Use the "Accessibility" template instead.
|
||||
-->
|
||||
|
||||
## Describe the bug
|
||||
@@ -44,7 +43,7 @@ What actually happened. Include the error message and target format.
|
||||
|
||||
## Environment
|
||||
|
||||
- Platform: [Web / Windows / macOS / Linux / Android]
|
||||
- Platform: [Web / Windows / Linux / Android / macOS (2.2.1 or older)]
|
||||
- JSONPrism version: [e.g. 2.2.1 — see About → Build info]
|
||||
- Browser (web) or OS version (apps): [e.g. Firefox on Windows 11, Safari on macOS 15, Ubuntu 24.04, Android 15]
|
||||
- Where: [the website https://jsonprism.poli0981.dev / an installed release / a local dev build]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature ideas (maintenance mode)
|
||||
url: https://github.com/poli0981/jsonPrism/discussions/categories/ideas
|
||||
about: JSONPrism is in maintenance mode and takes no new features. Share ideas in Discussions, with no commitment. To add or remove a format, use the Converter request template.
|
||||
- name: Questions & general discussion
|
||||
url: https://github.com/poli0981/jsonPrism/discussions
|
||||
about: Ask about usage or share your workflows.
|
||||
- name: Issues and merge requests (GitLab mirror)
|
||||
url: https://gitlab.com/poli0981/jsonPrism/-/issues
|
||||
about: The Gitea repository takes no sign-ups. Bug reports, accessibility barriers, converter requests and translation fixes go to the GitLab mirror, which has the same templates. JSONPrism is in maintenance mode and takes no new features.
|
||||
- name: Security vulnerability
|
||||
url: https://github.com/poli0981/jsonPrism/security/advisories/new
|
||||
about: Report security issues privately via a GitHub Security Advisory, or email security@poli0981.dev. Never in a public issue.
|
||||
url: https://jsonprism.poli0981.dev/.well-known/security.txt
|
||||
about: Privately, by e-mail to security@poli0981.dev — never in a public issue. See SECURITY.md.
|
||||
- name: Questions, feature ideas and community chat
|
||||
url: https://discord.gg/2aNR3aVt
|
||||
about: The Discord server. Ideas are read, with no commitment while JSONPrism is in maintenance mode.
|
||||
- name: Live demo
|
||||
url: https://jsonprism.poli0981.dev
|
||||
about: Try the latest deployed build in your browser before filing a bug.
|
||||
@@ -9,8 +9,8 @@ assignees: []
|
||||
<!--
|
||||
JSONPrism is in maintenance mode (CONTRIBUTING.md → Maintenance mode): it
|
||||
takes no new features, but a format can still be added or removed when
|
||||
there is a real need. Other ideas go to Discussions → Ideas:
|
||||
https://github.com/poli0981/jsonPrism/discussions/categories/ideas
|
||||
there is a real need. Other ideas are welcome on the Discord server
|
||||
(https://discord.gg/2aNR3aVt), with no commitment.
|
||||
-->
|
||||
|
||||
## Add or remove?
|
||||
|
||||
@@ -2,16 +2,15 @@
|
||||
Thanks for contributing to JSONPrism!
|
||||
|
||||
JSONPrism is in maintenance mode (CONTRIBUTING.md → "Maintenance mode"):
|
||||
new features are out of scope, and `feat:` pull requests from outside
|
||||
contributors are closed automatically.
|
||||
new features are out of scope, and `feat:` merge requests from outside
|
||||
contributors are closed.
|
||||
|
||||
Please fill in the sections below. PRs missing required context (no summary,
|
||||
Please fill in the sections below. Changes missing required context (no summary,
|
||||
no test plan, off-topic preamble) may be closed without review.
|
||||
See CONTRIBUTING.md → "Auto-ignored contributions" for what gets dismissed.
|
||||
|
||||
Fixing an undisclosed security vulnerability? Report it privately first
|
||||
(SECURITY.md: private advisory or security@poli0981.dev) instead of
|
||||
describing it in a public PR.
|
||||
(SECURITY.md: security@poli0981.dev) instead of describing it in public.
|
||||
-->
|
||||
|
||||
## Summary
|
||||
@@ -25,7 +24,7 @@ Closes #
|
||||
|
||||
## Scope
|
||||
|
||||
<!-- Required. Tick what this PR is. Anything else is out of scope while JSONPrism is in maintenance mode. -->
|
||||
<!-- Required. Tick what this change is. Anything else is out of scope while JSONPrism is in maintenance mode. -->
|
||||
|
||||
- [ ] Bug fix, broken UI/UX or accessibility fix
|
||||
- [ ] Translation or wording fix
|
||||
@@ -38,7 +37,7 @@ Closes #
|
||||
|
||||
<!--
|
||||
Required. These are the checks CI runs; tick what you ran locally.
|
||||
CI must pass before the PR can be merged.
|
||||
CI (on Gitea) must pass before the change can be merged.
|
||||
-->
|
||||
|
||||
- [ ] `npm run format:check`
|
||||
@@ -49,8 +48,8 @@ CI must pass before the PR can be merged.
|
||||
- [ ] `npm run build`
|
||||
- [ ] `npm run cf:check`
|
||||
- [ ] Rust changed: `cargo fmt --check` and `cargo clippy --all-targets --locked -- -D warnings` in `src-tauri/`
|
||||
- [ ] Manual smoke (describe what you clicked / loaded, and on which platform: Web / Windows / macOS / Linux / Android)
|
||||
- [ ] UI changed: keyboard-only pass of what changed (visible focus, nothing stuck), accessible names in all four locales, `motion-safe:` animations, no colour-only meaning — see [ACCESSIBILITY.md](https://github.com/poli0981/jsonPrism/blob/main/ACCESSIBILITY.md#contributor-expectations). Screen reader used, if any:
|
||||
- [ ] Manual smoke (describe what you clicked / loaded, and on which platform: Web / Windows / Linux / Android)
|
||||
- [ ] UI changed: keyboard-only pass of what changed (visible focus, nothing stuck), accessible names in all four locales, `motion-safe:` animations, no colour-only meaning — see [ACCESSIBILITY.md](https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/ACCESSIBILITY.md#contributor-expectations). Screen reader used, if any:
|
||||
|
||||
## Screenshots / recordings (UI changes only)
|
||||
|
||||
@@ -60,7 +59,7 @@ CI must pass before the PR can be merged.
|
||||
|
||||
<!--
|
||||
JSONPrism's maintainer uses AI co-authoring openly. If an AI tool helped
|
||||
with this PR (code, tests, docs or translations), say which tool and how
|
||||
with this change (code, tests, docs or translations), say which tool and how
|
||||
you used it, so reviewers can calibrate. Either way, you are responsible
|
||||
for every line you submit.
|
||||
-->
|
||||
@@ -70,7 +69,7 @@ for every line you submit.
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] My changes follow the conventions in [CLAUDE.md](https://github.com/poli0981/jsonPrism/blob/main/CLAUDE.md) and [CONTRIBUTING.md](https://github.com/poli0981/jsonPrism/blob/main/CONTRIBUTING.md).
|
||||
- [ ] My changes follow the conventions in [CLAUDE.md](https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/CLAUDE.md) and [CONTRIBUTING.md](https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/CONTRIBUTING.md).
|
||||
- [ ] I added or updated tests where relevant.
|
||||
- [ ] New or changed UI strings are in all four locales (`en`, `vi`, `ja`, `zh-CN`) and the i18n parity test passes.
|
||||
- [ ] App code uses no ES2025 runtime APIs (Iterator helpers, `Set` methods, `Promise.try`, …).
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# actionlint settings (security.yml, job `workflow-lint`, and a local
|
||||
# `actionlint` run from the repo root), as in the ops repo poli0981/.github.
|
||||
# Only Gitea features that actionlint does not know are ignored here;
|
||||
# everything else stays an error.
|
||||
paths:
|
||||
.gitea/workflows/*.yml:
|
||||
ignore:
|
||||
# Gitea's own token scope for releases (ops runbook §3.2 item 5)
|
||||
- 'unknown permission scope "releases"'
|
||||
# Gitea resolves full-URL actions; bare owner/repo goes to github.com (ops runbook §1)
|
||||
- 'specifying action "https://gitea\.com/[^"]+" in invalid format'
|
||||
@@ -1,86 +0,0 @@
|
||||
version: 2
|
||||
|
||||
# Weekly updates, grouped by package family so a family's majors land together:
|
||||
# a lone `eslint` major once left `npm ci` broken on main for four months.
|
||||
# A cooldown skips releases younger than a few days (security updates are exempt).
|
||||
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: '08:00'
|
||||
timezone: Asia/Ho_Chi_Minh
|
||||
open-pull-requests-limit: 10
|
||||
versioning-strategy: increase
|
||||
cooldown:
|
||||
default-days: 3
|
||||
semver-major-days: 7
|
||||
labels: [dependencies, npm]
|
||||
ignore:
|
||||
# `typescript` is an alias for the TypeScript 6 API that typescript-eslint
|
||||
# needs; the compiler itself is TypeScript 7 (`@typescript/native`).
|
||||
- dependency-name: typescript
|
||||
versions: ['>=6.1.0']
|
||||
# @types/node follows the Node major in .nvmrc.
|
||||
- dependency-name: '@types/node'
|
||||
update-types: ['version-update:semver-major']
|
||||
groups:
|
||||
eslint:
|
||||
patterns: [eslint, '@eslint/*', typescript-eslint, 'eslint-plugin-*', globals]
|
||||
test:
|
||||
patterns: [vitest, '@vitest/*', jsdom, '@testing-library/*']
|
||||
react:
|
||||
patterns: [react, react-dom, '@types/react', '@types/react-dom', '@vitejs/plugin-react']
|
||||
build:
|
||||
patterns: [vite, tailwindcss, '@tailwindcss/*', tw-animate-css, prettier, 'prettier-plugin-*', knip]
|
||||
i18n:
|
||||
patterns: [i18next, react-i18next]
|
||||
tauri:
|
||||
patterns: ['@tauri-apps/*']
|
||||
codemirror:
|
||||
patterns: ['@codemirror/*', '@uiw/*', '@lezer/*']
|
||||
radix:
|
||||
patterns: ['@radix-ui/*']
|
||||
cloudflare:
|
||||
patterns: [wrangler, '@cloudflare/*', '@marsidev/react-turnstile']
|
||||
# fast-xml-parser re-exports fast-xml-builder; keep the two in step.
|
||||
xml:
|
||||
patterns: [fast-xml-parser, fast-xml-builder]
|
||||
npm-minor-patch:
|
||||
update-types: [minor, patch]
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: '08:00'
|
||||
timezone: Asia/Ho_Chi_Minh
|
||||
open-pull-requests-limit: 5
|
||||
cooldown:
|
||||
default-days: 3
|
||||
labels: [dependencies, github-actions]
|
||||
groups:
|
||||
actions:
|
||||
patterns: ['*']
|
||||
|
||||
# The Tauri shell. Keep the crate versions in step with the @tauri-apps npm packages.
|
||||
- package-ecosystem: cargo
|
||||
directory: /src-tauri
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: '08:00'
|
||||
timezone: Asia/Ho_Chi_Minh
|
||||
open-pull-requests-limit: 5
|
||||
cooldown:
|
||||
default-days: 3
|
||||
semver-major-days: 7
|
||||
labels: [dependencies, rust, tauri]
|
||||
groups:
|
||||
tauri:
|
||||
patterns: ['tauri', 'tauri-*']
|
||||
cargo-minor-patch:
|
||||
update-types: [minor, patch]
|
||||
@@ -1,37 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>JSONPrism has moved</title>
|
||||
<meta name="robots" content="noindex" />
|
||||
<link rel="canonical" href="https://jsonprism.poli0981.dev/" />
|
||||
<!-- Without JavaScript, fall back to the new home page. -->
|
||||
<meta http-equiv="refresh" content="3; url=https://jsonprism.poli0981.dev/" />
|
||||
<script>
|
||||
(function () {
|
||||
// Drop the old project-site prefix; keep the rest of the path, the query and the hash.
|
||||
var path = location.pathname.replace(/^\/jsonprism(?=\/|$)/i, '') || '/';
|
||||
location.replace('https://jsonprism.poli0981.dev' + path + location.search + location.hash);
|
||||
})();
|
||||
</script>
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: dark light;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-family: system-ui, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
JSONPrism has moved to
|
||||
<a href="https://jsonprism.poli0981.dev/">jsonprism.poli0981.dev</a>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,37 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>JSONPrism has moved</title>
|
||||
<meta name="robots" content="noindex" />
|
||||
<link rel="canonical" href="https://jsonprism.poli0981.dev/" />
|
||||
<!-- Without JavaScript, fall back to the new home page. -->
|
||||
<meta http-equiv="refresh" content="3; url=https://jsonprism.poli0981.dev/" />
|
||||
<script>
|
||||
(function () {
|
||||
// Drop the old project-site prefix; keep the rest of the path, the query and the hash.
|
||||
var path = location.pathname.replace(/^\/jsonprism(?=\/|$)/i, '') || '/';
|
||||
location.replace('https://jsonprism.poli0981.dev' + path + location.search + location.hash);
|
||||
})();
|
||||
</script>
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: dark light;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-family: system-ui, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
JSONPrism has moved to
|
||||
<a href="https://jsonprism.poli0981.dev/">jsonprism.poli0981.dev</a>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
# Python tools the workflows run (security.yml: zizmor).
|
||||
# Lock: requirements-ci.txt, regenerated by Renovate (pip-compile manager) or by
|
||||
# the command in its header.
|
||||
zizmor==1.32.0
|
||||
@@ -0,0 +1,18 @@
|
||||
# zizmor for security.yml (job `workflow-lint`), hash-locked. zizmor is a
|
||||
# self-contained wheel with no Python dependencies. Regenerate (and let
|
||||
# Renovate's pip-compile manager keep it current) with:
|
||||
# uv pip compile .github/requirements-ci.in --generate-hashes --python-platform x86_64-manylinux_2_28 --python-version 3.12 -o .github/requirements-ci.txt
|
||||
zizmor==1.32.0 \
|
||||
--hash=sha256:0a999c98015becd9f69919ce01febadfb1c2be9b8ec2ce9ef7eb13ff23ba8eba \
|
||||
--hash=sha256:0cdd38fca6eb34ceb567548548d706332e3535ea66894b9168c048e03207b68c \
|
||||
--hash=sha256:3f404b26791ed06a5ea9eaa0bfd5b973fc5228bac7db8b3c5ec7f0c7ad2ed16d \
|
||||
--hash=sha256:84a6acb975accc13408786a2bd274b572537ca19c933ebbc13e78f3988562071 \
|
||||
--hash=sha256:913fd3943bc1358aa6e23b33fe01cc98bf67af23985258b8fbf24eaa2f8728ea \
|
||||
--hash=sha256:9cd1dd7734042f40ca0faa2a31fb4e9033dede620d996af2f903744b8f04fca9 \
|
||||
--hash=sha256:aa4b4e216321dd5cf202cd79fc83296468f0eed79d850cd65ac8187a6bbc5496 \
|
||||
--hash=sha256:bddcdb0e37d1aa53c9f831c55627a5829d0d552cb0afb4b80fbe16a3a3140366 \
|
||||
--hash=sha256:d34dcfa702875202b4163d90ebb9cc5222f3d1a7d4b72bf796d87b5a15b24194 \
|
||||
--hash=sha256:dd818f99d833b86cd432d5412d620d936b5df074b33404fff8b67acff55d3259 \
|
||||
--hash=sha256:eaedf57859f026a0a7da2a6b574517b1fe01e256c6875b3319a06ee1cee026a7 \
|
||||
--hash=sha256:f0b664d394576e08605fe8094e8e992056d74b808f30c0c9ca9ed227001dcf67
|
||||
# via -r .github/requirements-ci.in
|
||||
@@ -1,132 +0,0 @@
|
||||
name: Announce Release in Discussions
|
||||
|
||||
# Create a Discussion post in the "Announcements" category when a GitHub
|
||||
# Release is published, or by hand. (Per-deploy posts were dropped: web deploys
|
||||
# now happen on every merge through Cloudflare Workers Builds.)
|
||||
#
|
||||
# Prerequisites (one-time manual setup):
|
||||
# 1. Enable Discussions in the repo Settings → Features.
|
||||
# 2. Create a category named "Announcements" (any kind; this workflow
|
||||
# auto-discovers its node ID at runtime).
|
||||
#
|
||||
# Permissions:
|
||||
# • `contents: read` — read commit / release metadata.
|
||||
# • `discussions: write` — required to create the post.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
message:
|
||||
description: 'Announcement body (Markdown)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: announce-discussion-${{ github.event_name }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
name: Create Discussion post
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: read
|
||||
discussions: write
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Resolve repository + category IDs
|
||||
id: ids
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
QUERY='query($owner: String!, $name: String!) {
|
||||
repository(owner: $owner, name: $name) {
|
||||
id
|
||||
discussionCategories(first: 25) {
|
||||
nodes { id name }
|
||||
}
|
||||
}
|
||||
}'
|
||||
response=$(gh api graphql \
|
||||
-f query="$QUERY" \
|
||||
-F owner="${{ github.repository_owner }}" \
|
||||
-F name="${{ github.event.repository.name }}")
|
||||
repo_id=$(echo "$response" | jq -r '.data.repository.id')
|
||||
cat_id=$(echo "$response" | jq -r '.data.repository.discussionCategories.nodes[] | select(.name == "Announcements") | .id')
|
||||
if [ -z "$cat_id" ] || [ "$cat_id" = "null" ]; then
|
||||
echo "::error::Discussion category 'Announcements' not found. Enable Discussions and create the category in Settings → Features."
|
||||
exit 1
|
||||
fi
|
||||
echo "repo_id=$repo_id" >> "$GITHUB_OUTPUT"
|
||||
echo "cat_id=$cat_id" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Compose title + body
|
||||
id: msg
|
||||
env:
|
||||
EVENT: ${{ github.event_name }}
|
||||
# `|| ''` guards each value so the env var is always set to an
|
||||
# empty string (not unset) when the source field is missing for
|
||||
# the active event type. Without this, `set -u` blows up below.
|
||||
RELEASE_TAG: ${{ github.event.release.tag_name || '' }}
|
||||
RELEASE_URL: ${{ github.event.release.html_url || '' }}
|
||||
RELEASE_BODY: ${{ github.event.release.body || '' }}
|
||||
DISPATCH_MSG: ${{ inputs.message || '' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# NL is a literal newline used to assemble multi-line bodies
|
||||
# without breaking the YAML literal-block-scalar indentation.
|
||||
# Concatenating "$VAR""$NL""$NL""$OTHER" gives both interpolation
|
||||
# AND embedded blank lines.
|
||||
NL=$'\n'
|
||||
case "$EVENT" in
|
||||
release)
|
||||
title="Release ${RELEASE_TAG}"
|
||||
body="## ${RELEASE_TAG}${NL}${NL}${RELEASE_BODY}${NL}${NL}[View release →](${RELEASE_URL})"
|
||||
;;
|
||||
workflow_dispatch)
|
||||
title="Announcement"
|
||||
body="${DISPATCH_MSG}"
|
||||
;;
|
||||
*)
|
||||
echo "::error::Unsupported event: ${EVENT}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
{
|
||||
echo "title<<EOF"
|
||||
echo "$title"
|
||||
echo "EOF"
|
||||
echo "body<<EOF"
|
||||
echo "$body"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create Discussion
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Pass dynamic values through env vars (not literal `${{ ... }}`
|
||||
# substitution) so a title/body containing quotes, backticks, or
|
||||
# other shell-special characters doesn't break the command line.
|
||||
REPO_ID: ${{ steps.ids.outputs.repo_id }}
|
||||
CAT_ID: ${{ steps.ids.outputs.cat_id }}
|
||||
TITLE: ${{ steps.msg.outputs.title }}
|
||||
BODY: ${{ steps.msg.outputs.body }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
MUTATION='mutation($repo: ID!, $cat: ID!, $title: String!, $body: String!) {
|
||||
createDiscussion(input: {repositoryId: $repo, categoryId: $cat, title: $title, body: $body}) {
|
||||
discussion { url }
|
||||
}
|
||||
}'
|
||||
gh api graphql \
|
||||
-f query="$MUTATION" \
|
||||
-F repo="$REPO_ID" \
|
||||
-F cat="$CAT_ID" \
|
||||
-F title="$TITLE" \
|
||||
-F body="$BODY" \
|
||||
--jq '.data.createDiscussion.discussion.url'
|
||||
@@ -1,26 +0,0 @@
|
||||
name: Announce Release to Discord
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Existing release tag to re-announce
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main 2026-07-06
|
||||
with:
|
||||
tag_override: ${{ inputs.tag || '' }}
|
||||
# Only the webhooks it needs, not every repository secret.
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
DISCORD_REPO_WEBHOOK: ${{ secrets.DISCORD_REPO_WEBHOOK }}
|
||||
DISCORD_PING_ROLE_ID: ${{ secrets.DISCORD_PING_ROLE_ID }}
|
||||
@@ -1,169 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||
# Only superseded PR runs are cancelled; every commit on main gets a full run.
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
WRANGLER_SEND_METRICS: 'false'
|
||||
|
||||
jobs:
|
||||
web:
|
||||
name: Web · lint, typecheck, test, build
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
# No dependency needs its install scripts (esbuild, workerd and the Tauri
|
||||
# CLI resolve their platform binaries at runtime), so none get to run.
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Format check
|
||||
run: npm run format:check
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Knip
|
||||
run: npm run knip
|
||||
|
||||
- name: Typecheck (TypeScript 7)
|
||||
run: |
|
||||
npx tsc --version | grep -q '^Version 7\.' || { echo "::error::tsc is not TypeScript 7"; exit 1; }
|
||||
npm run typecheck
|
||||
|
||||
- name: Test with coverage
|
||||
run: npm run test:coverage
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Worker deploy dry run
|
||||
run: npm run cf:check
|
||||
|
||||
- name: Upload dist
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload coverage
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: coverage
|
||||
path: coverage/lcov.info
|
||||
retention-days: 7
|
||||
|
||||
sonar:
|
||||
name: SonarQube Cloud
|
||||
needs: web
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
# Empty for Dependabot and fork PRs, which get no secrets: skip, don't fail.
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
steps:
|
||||
- name: Skip without a token
|
||||
if: env.SONAR_TOKEN == ''
|
||||
run: echo "::notice::SONAR_TOKEN is not available to this run; skipping analysis."
|
||||
|
||||
- name: Checkout
|
||||
if: env.SONAR_TOKEN != ''
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
# Full history so new-code detection and blame work.
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Download coverage
|
||||
if: env.SONAR_TOKEN != ''
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: coverage
|
||||
path: coverage
|
||||
|
||||
- name: Scan
|
||||
if: env.SONAR_TOKEN != ''
|
||||
uses: SonarSource/sonarqube-scan-action@59202af334b4ba7b5db01b701b8e79f8b3bef0f4 # v8.5.0
|
||||
|
||||
rust:
|
||||
name: Tauri · fmt, clippy
|
||||
needs: web
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Linux build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev libgtk-3-dev
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
# generate_context!() embeds the icons and the built frontend at compile time.
|
||||
- name: Generate icons
|
||||
run: npm run tauri:icon
|
||||
|
||||
- name: Download dist
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
workspaces: './src-tauri -> target'
|
||||
|
||||
- name: rustfmt
|
||||
working-directory: src-tauri
|
||||
run: cargo fmt --check
|
||||
|
||||
- name: Clippy
|
||||
working-directory: src-tauri
|
||||
run: cargo clippy --all-targets --locked -- -D warnings
|
||||
@@ -1,103 +0,0 @@
|
||||
name: Maintenance triage
|
||||
|
||||
# JSONPrism is in maintenance mode (CONTRIBUTING.md → Maintenance mode). This
|
||||
# workflow closes, with a bilingual comment and the `out-of-scope` label:
|
||||
# • any issue or pull request the maintainer labels `out-of-scope`;
|
||||
# • when opened by an outside contributor: issues titled [FEATURE] or
|
||||
# labelled `enhancement`, and pull requests titled `feat:` (any scope
|
||||
# except `converter`/`converters`). The owner, members, collaborators and
|
||||
# bots are skipped.
|
||||
# pull_request_target runs in the base repository so it can comment on and
|
||||
# close pull requests from forks. It never checks out or runs pull request
|
||||
# code, and the script reads titles from the event payload itself instead of
|
||||
# having untrusted text interpolated into it.
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, labeled]
|
||||
pull_request_target:
|
||||
types: [opened, labeled]
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: maintenance-triage-${{ github.event.issue.number || github.event.pull_request.number }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
name: Close out-of-scope requests
|
||||
if: >-
|
||||
(github.event.action == 'labeled' && github.event.label.name == 'out-of-scope') ||
|
||||
(github.event.action == 'opened' &&
|
||||
!contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'),
|
||||
github.event.issue.author_association || github.event.pull_request.author_association))
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Close if out of scope
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
const OUT_OF_SCOPE = 'out-of-scope';
|
||||
const TRUSTED = ['OWNER', 'MEMBER', 'COLLABORATOR'];
|
||||
const { payload } = context;
|
||||
const isPR = Boolean(payload.pull_request);
|
||||
const item = payload.pull_request ?? payload.issue;
|
||||
if (!item || item.state !== 'open') return;
|
||||
|
||||
const labels = (item.labels ?? []).map((label) => label.name);
|
||||
let reason = null;
|
||||
if (payload.action === 'labeled') {
|
||||
if (payload.label?.name === OUT_OF_SCOPE) reason = 'labelled out-of-scope';
|
||||
} else if (payload.action === 'opened') {
|
||||
const trusted = TRUSTED.includes(item.author_association);
|
||||
const bot = item.user?.type === 'Bot';
|
||||
const title = String(item.title ?? '').trim();
|
||||
if (!trusted && !bot) {
|
||||
if (isPR) {
|
||||
// Conventional Commits: feat:, feat(scope):, feat!: — converters stay open.
|
||||
const feat = /^feat(?:\(([^)]*)\))?!?:/i.exec(title);
|
||||
if (feat && !/^converters?$/i.test((feat[1] ?? '').trim())) reason = 'feat: pull request';
|
||||
} else if (/^\[feature\]/i.test(title) || labels.includes('enhancement')) {
|
||||
reason = 'feature request';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!reason) {
|
||||
core.info(`#${item.number}: within scope, nothing to do.`);
|
||||
return;
|
||||
}
|
||||
|
||||
const ideas = 'https://github.com/poli0981/jsonPrism/discussions/categories/ideas';
|
||||
const policy = 'https://github.com/poli0981/jsonPrism/blob/main/CONTRIBUTING.md#maintenance-mode';
|
||||
const en = isPR ? 'pull request' : 'issue';
|
||||
const vi = isPR ? 'Pull request' : 'Issue';
|
||||
const body = [
|
||||
'<!-- maintenance-triage -->',
|
||||
'Thanks for taking the time to write this. JSONPrism is in **maintenance mode**: it still takes dependency and security updates, major runtime upgrades, fixes for bugs, UI/UX, accessibility and translations, converter additions or removals that people really need, and Cloudflare or website fixes, but no new features.',
|
||||
'',
|
||||
`This ${en} falls outside that scope, so it has been closed. If it is actually a bug, an accessibility or translation fix, or a converter request, reply here and the maintainer will take another look. Ideas are welcome in [Discussions → Ideas](${ideas}). The full policy is in [CONTRIBUTING.md → Maintenance mode](${policy}).`,
|
||||
'',
|
||||
'---',
|
||||
'',
|
||||
'Cảm ơn bạn đã dành thời gian. JSONPrism đang ở **giai đoạn bảo trì**: vẫn nhận cập nhật thư viện và bảo mật, nâng cấp runtime lớn, sửa lỗi, UI/UX, trợ năng (accessibility) và bản dịch, thêm hoặc bỏ converter khi thật sự có người cần, và sửa lỗi Cloudflare hay website, nhưng không thêm tính năng mới.',
|
||||
'',
|
||||
`${vi} này nằm ngoài phạm vi đó nên đã được đóng. Nếu thực ra đây là lỗi, sửa trợ năng hay bản dịch, hoặc yêu cầu converter, hãy trả lời tại đây để maintainer xem lại. Ý tưởng có thể gửi ở [Discussions → Ideas](${ideas}). Chính sách đầy đủ: [CONTRIBUTING.md → Maintenance mode](${policy}).`,
|
||||
].join('\n');
|
||||
|
||||
const { owner, repo } = context.repo;
|
||||
const number = item.number;
|
||||
await github.rest.issues.createComment({ owner, repo, issue_number: number, body });
|
||||
if (!labels.includes(OUT_OF_SCOPE)) {
|
||||
await github.rest.issues.addLabels({ owner, repo, issue_number: number, labels: [OUT_OF_SCOPE] });
|
||||
}
|
||||
if (isPR) {
|
||||
await github.rest.pulls.update({ owner, repo, pull_number: number, state: 'closed' });
|
||||
} else {
|
||||
await github.rest.issues.update({ owner, repo, issue_number: number, state: 'closed', state_reason: 'not_planned' });
|
||||
}
|
||||
core.notice(`Closed ${en} #${number} as out of scope (${reason}).`);
|
||||
@@ -1,17 +0,0 @@
|
||||
name: Notify CI Failures
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["CI", "Production smoke"]
|
||||
types: [completed]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.github/workflows/notify-ci-failure.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main 2026-07-06
|
||||
secrets:
|
||||
DISCORD_CI_WEBHOOK: ${{ secrets.DISCORD_CI_WEBHOOK }}
|
||||
@@ -1,17 +0,0 @@
|
||||
name: Notify Release Pipeline
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Release Tauri bundles"]
|
||||
types: [completed]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.github/workflows/notify-release-pipeline.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main 2026-07-06
|
||||
secrets:
|
||||
DISCORD_RELEASE_PIPELINE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PIPELINE_WEBHOOK }}
|
||||
@@ -1,45 +0,0 @@
|
||||
name: Pages redirect
|
||||
|
||||
# GitHub Pages used to host the web app at poli0981.github.io/jsonPrism/. It now
|
||||
# serves only a redirect to https://jsonprism.poli0981.dev that keeps the path,
|
||||
# so old links from YouTube, Discord and READMEs still land on the right page.
|
||||
# Run it by hand after changing .github/pages-redirect/.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy redirect
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
|
||||
|
||||
- name: Upload the redirect pages
|
||||
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
||||
with:
|
||||
path: .github/pages-redirect
|
||||
|
||||
- name: Deploy
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
|
||||
@@ -1,149 +0,0 @@
|
||||
name: Qodana
|
||||
|
||||
# JetBrains Qodana static analysis, reported to Qodana Cloud (Ultimate licence):
|
||||
# • js — Qodana for JS in native mode: the web app, the Worker, workflows and
|
||||
# docs. Project "jsonprism-js-ts", secret QODANA_TOKEN_TS_JS,
|
||||
# configuration in qodana.yaml.
|
||||
# • rust — Qodana for Rust (Early Access, Docker only): the Tauri shell in
|
||||
# src-tauri/. Project "jsonprism-rust", secret QODANA_TOKEN_RUST,
|
||||
# configuration in src-tauri/qodana.yaml.
|
||||
# Dependabot and fork pull requests get no secrets, so both jobs skip there.
|
||||
# Results: Qodana Cloud, check annotations, a pull-request comment and the
|
||||
# qodana-js / qodana-rust artifacts (SARIF and logs).
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: qodana-${{ github.ref }}
|
||||
# Only superseded PR runs are cancelled; every commit on main gets a full run.
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
WRANGLER_SEND_METRICS: 'false'
|
||||
|
||||
jobs:
|
||||
js:
|
||||
name: Qodana · JS/TS
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write # annotations
|
||||
pull-requests: write # summary comment
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS }}
|
||||
steps:
|
||||
- name: Skip without a token
|
||||
if: env.QODANA_TOKEN == ''
|
||||
run: echo "::notice::QODANA_TOKEN_TS_JS is not available to this run; skipping analysis."
|
||||
|
||||
- name: Checkout
|
||||
if: env.QODANA_TOKEN != ''
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
# The pull request's head, not the merge commit.
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node
|
||||
if: env.QODANA_TOKEN != ''
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
if: env.QODANA_TOKEN != ''
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
# worker-configuration.d.ts is generated and gitignored; without it the
|
||||
# Worker's Env types don't resolve. (wrangler builds dist/ first.)
|
||||
- name: Generate Worker types
|
||||
if: env.QODANA_TOKEN != ''
|
||||
run: npm run cf:types
|
||||
|
||||
- name: Qodana scan
|
||||
if: env.QODANA_TOKEN != ''
|
||||
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
||||
with:
|
||||
args: --linter qodana-js --within-docker false
|
||||
pr-mode: false
|
||||
upload-result: true
|
||||
artifact-name: qodana-js
|
||||
primary-cache-key: qodana-2026.2-js-${{ github.ref }}-${{ github.sha }}
|
||||
# A prefix, so pull requests can restore the cache saved on main.
|
||||
additional-cache-key: qodana-2026.2-js-
|
||||
cache-default-branch-only: true
|
||||
|
||||
rust:
|
||||
name: Qodana · Rust (EAP)
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write # annotations
|
||||
pull-requests: write # summary comment
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_RUST }}
|
||||
steps:
|
||||
- name: Skip without a token
|
||||
if: env.QODANA_TOKEN == ''
|
||||
run: echo "::notice::QODANA_TOKEN_RUST is not available to this run; skipping analysis."
|
||||
|
||||
- name: Checkout
|
||||
if: env.QODANA_TOKEN != ''
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node
|
||||
if: env.QODANA_TOKEN != ''
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
if: env.QODANA_TOKEN != ''
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
# tauri::generate_context!() embeds the icons and ../dist at compile time.
|
||||
- name: Generate icons
|
||||
if: env.QODANA_TOKEN != ''
|
||||
run: npm run tauri:icon
|
||||
|
||||
- name: Build the web app
|
||||
if: env.QODANA_TOKEN != ''
|
||||
run: npm run build
|
||||
|
||||
# Docker mode mounts --repository-root, so ../dist stays visible from
|
||||
# the src-tauri project directory. The container runs as root so the
|
||||
# bootstrap in src-tauri/qodana.yaml can apt-get the C toolchain and
|
||||
# the GTK/WebKit headers that build scripts need.
|
||||
- name: Qodana scan
|
||||
if: env.QODANA_TOKEN != ''
|
||||
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
||||
env:
|
||||
# Keep Cargo's registry in the mounted Qodana cache, which the
|
||||
# action saves between runs on main.
|
||||
CARGO_HOME: /data/cache/cargo
|
||||
with:
|
||||
args: --linter qodana-rust --repository-root . --project-dir src-tauri --user root
|
||||
env-vars-to-linter: CARGO_HOME
|
||||
pr-mode: false
|
||||
upload-result: true
|
||||
artifact-name: qodana-rust
|
||||
primary-cache-key: qodana-2026.2-rust-${{ github.ref }}-${{ github.sha }}
|
||||
# A prefix, so pull requests can restore the cache saved on main.
|
||||
additional-cache-key: qodana-2026.2-rust-
|
||||
cache-default-branch-only: true
|
||||
@@ -1,341 +0,0 @@
|
||||
name: Release Tauri bundles
|
||||
|
||||
# Builds the desktop bundles and the Android APK for a version tag into ONE
|
||||
# draft release, then adds SHA256SUMS.txt and build-provenance attestations.
|
||||
# The maintainer publishes the draft, which triggers the announcements.
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Existing version tag to (re)build, e.g. v2.0.0
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: release-${{ inputs.tag || github.ref_name }}
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
TAG: ${{ inputs.tag || github.ref_name }}
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
name: Verify tag and tests
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
steps:
|
||||
- name: Validate tag format
|
||||
run: |
|
||||
[[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$ ]] || { echo "::error::'$TAG' is not a version tag"; exit 1; }
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: refs/tags/${{ env.TAG }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check the tag matches the app version
|
||||
id: version
|
||||
run: |
|
||||
version=$(node -p "require('./package.json').version")
|
||||
cargo_version=$(sed -n 's/^version = "\(.*\)"$/\1/p' src-tauri/Cargo.toml | head -n 1)
|
||||
[ "$TAG" = "v$version" ] || { echo "::error::Tag $TAG does not match package.json version $version"; exit 1; }
|
||||
[ "$cargo_version" = "$version" ] || { echo "::error::Cargo.toml version $cargo_version does not match $version"; exit 1; }
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Test
|
||||
run: npm test
|
||||
|
||||
# One draft for the whole matrix: parallel "find or create" calls used to
|
||||
# race and split the assets across duplicate drafts.
|
||||
create-release:
|
||||
name: Create draft release
|
||||
needs: verify
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: write
|
||||
outputs:
|
||||
release_id: ${{ steps.release.outputs.result }}
|
||||
steps:
|
||||
- name: Create or reuse the draft
|
||||
id: release
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
const tag = process.env.TAG;
|
||||
const { owner, repo } = context.repo;
|
||||
const releases = await github.paginate(github.rest.repos.listReleases, { owner, repo, per_page: 100 });
|
||||
const existing = releases.find((r) => r.tag_name === tag);
|
||||
if (existing) {
|
||||
if (!existing.draft) throw new Error(`Release ${tag} is already published; delete it or tag a new version.`);
|
||||
core.info(`Reusing draft ${existing.id}`);
|
||||
return existing.id;
|
||||
}
|
||||
const { data } = await github.rest.repos.createRelease({
|
||||
owner,
|
||||
repo,
|
||||
tag_name: tag,
|
||||
name: `JSONPrism ${tag}`,
|
||||
draft: true,
|
||||
prerelease: tag.includes('-'),
|
||||
body: [
|
||||
'Native builds for Windows, macOS (universal) and Linux, plus an Android APK (sideload, Android 12+). The web app runs at https://jsonprism.poli0981.dev.',
|
||||
'',
|
||||
'Verify a download with `sha256sum -c SHA256SUMS.txt --ignore-missing`, or check its build provenance with `gh attestation verify <file> --repo poli0981/jsonPrism`.',
|
||||
'',
|
||||
'Android: download the `.apk`, then allow "install unknown apps" for your browser or file manager.',
|
||||
'',
|
||||
`See the [CHANGELOG](https://github.com/${owner}/${repo}/blob/${tag}/CHANGELOG.md) for details.`,
|
||||
].join('\n'),
|
||||
});
|
||||
return data.id;
|
||||
|
||||
desktop:
|
||||
name: Build · ${{ matrix.platform.name }}
|
||||
needs: create-release
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- name: Windows
|
||||
runner: windows-latest
|
||||
args: ''
|
||||
- name: macOS (universal)
|
||||
# macos-14 images were retired on 2026-11-02.
|
||||
runner: macos-15
|
||||
args: '--target universal-apple-darwin'
|
||||
# The oldest supported Ubuntu keeps the AppImage/deb glibc floor low.
|
||||
- name: Linux
|
||||
runner: ubuntu-22.04
|
||||
args: ''
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: refs/tags/${{ env.TAG }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Linux build dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev libgtk-3-dev
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
|
||||
with:
|
||||
toolchain: stable
|
||||
# The universal macOS bundle needs both Apple targets.
|
||||
targets: ${{ runner.os == 'macOS' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
workspaces: './src-tauri -> target'
|
||||
key: ${{ matrix.platform.runner }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Generate icons
|
||||
run: npm run tauri:icon
|
||||
|
||||
- name: Build and upload to the draft
|
||||
uses: tauri-apps/tauri-action@1deb371b0cd8bd54025b384f1cd735e725c4060f # action-v1.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
releaseId: ${{ needs.create-release.outputs.release_id }}
|
||||
args: ${{ matrix.platform.args }}
|
||||
|
||||
# tauri-action builds desktop targets only; Android drives the Tauri CLI
|
||||
# directly and signs with the release keystore (see docs/TAURI-NOTES.md):
|
||||
# ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD,
|
||||
# ANDROID_KEY_PASSWORD (optional), ANDROID_KEY_ALIAS (optional, "upload").
|
||||
android:
|
||||
name: Build · Android (APK)
|
||||
needs: [verify, create-release]
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: refs/tags/${{ env.TAG }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '17'
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4.0.4
|
||||
|
||||
- name: Install SDK platform and NDK
|
||||
run: |
|
||||
sdkmanager "platforms;android-36" "ndk;27.2.12479018"
|
||||
echo "NDK_HOME=$ANDROID_HOME/ndk/27.2.12479018" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Rust with Android targets
|
||||
uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
|
||||
with:
|
||||
toolchain: stable
|
||||
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
workspaces: './src-tauri -> target'
|
||||
key: android
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts --no-audit --no-fund
|
||||
|
||||
- name: Generate icons
|
||||
run: npm run tauri:icon
|
||||
|
||||
- name: Decode release keystore
|
||||
env:
|
||||
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
run: |
|
||||
if [ -z "$ANDROID_KEYSTORE_BASE64" ]; then
|
||||
echo "::error::ANDROID_KEYSTORE_BASE64 is not set; cannot sign the release APK."
|
||||
exit 1
|
||||
fi
|
||||
KEYSTORE_PATH="$RUNNER_TEMP/upload-keystore.jks"
|
||||
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$KEYSTORE_PATH"
|
||||
{
|
||||
echo "storePassword=$ANDROID_KEYSTORE_PASSWORD"
|
||||
echo "keyPassword=${ANDROID_KEY_PASSWORD:-$ANDROID_KEYSTORE_PASSWORD}"
|
||||
echo "keyAlias=${ANDROID_KEY_ALIAS:-upload}"
|
||||
echo "storeFile=$KEYSTORE_PATH"
|
||||
} > src-tauri/gen/android/keystore.properties
|
||||
|
||||
- name: Build signed universal APK
|
||||
run: npm run tauri -- android build --apk
|
||||
|
||||
- name: Upload the APK to the draft
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
env:
|
||||
RELEASE_ID: ${{ needs.create-release.outputs.release_id }}
|
||||
VERSION: ${{ needs.verify.outputs.version }}
|
||||
with:
|
||||
script: |
|
||||
const fs = require('node:fs');
|
||||
const { owner, repo } = context.repo;
|
||||
const releaseId = Number(process.env.RELEASE_ID);
|
||||
const dir = 'src-tauri/gen/android/app/build/outputs/apk/universal/release';
|
||||
const apks = fs.readdirSync(dir).filter((f) => f.endsWith('.apk'));
|
||||
if (apks.length !== 1) throw new Error(`Expected one APK in ${dir}, found: ${apks.join(', ') || 'none'}`);
|
||||
// Same naming scheme as the desktop bundles.
|
||||
const name = `JSONPrism_${process.env.VERSION}_android-universal.apk`;
|
||||
const assets = await github.paginate(github.rest.repos.listReleaseAssets, { owner, repo, release_id: releaseId });
|
||||
for (const old of assets.filter((a) => a.name === name)) {
|
||||
await github.rest.repos.deleteReleaseAsset({ owner, repo, asset_id: old.id });
|
||||
}
|
||||
await github.rest.repos.uploadReleaseAsset({
|
||||
owner,
|
||||
repo,
|
||||
release_id: releaseId,
|
||||
name,
|
||||
data: fs.readFileSync(`${dir}/${apks[0]}`),
|
||||
});
|
||||
core.info(`Uploaded ${name}`);
|
||||
|
||||
checksums:
|
||||
name: Checksums and provenance
|
||||
needs: [create-release, desktop, android]
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
attestations: write
|
||||
steps:
|
||||
- name: Download the draft's assets
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASE_ID: ${{ needs.create-release.outputs.release_id }}
|
||||
run: |
|
||||
mkdir assets
|
||||
gh api --paginate "repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID/assets" \
|
||||
--jq '.[] | select(.name != "SHA256SUMS.txt") | [.id, .name] | @tsv' |
|
||||
while IFS=$'\t' read -r id name; do
|
||||
gh api -H 'Accept: application/octet-stream' "repos/$GITHUB_REPOSITORY/releases/assets/$id" > "assets/$name"
|
||||
done
|
||||
ls -l assets
|
||||
|
||||
- name: Write SHA256SUMS.txt
|
||||
working-directory: assets
|
||||
run: |
|
||||
sha256sum -- * > ../SHA256SUMS.txt
|
||||
cat ../SHA256SUMS.txt
|
||||
|
||||
- name: Attest build provenance
|
||||
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
||||
with:
|
||||
subject-path: assets/*
|
||||
|
||||
- name: Upload SHA256SUMS.txt to the draft
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
env:
|
||||
RELEASE_ID: ${{ needs.create-release.outputs.release_id }}
|
||||
with:
|
||||
script: |
|
||||
const fs = require('node:fs');
|
||||
const { owner, repo } = context.repo;
|
||||
const releaseId = Number(process.env.RELEASE_ID);
|
||||
const name = 'SHA256SUMS.txt';
|
||||
const assets = await github.paginate(github.rest.repos.listReleaseAssets, { owner, repo, release_id: releaseId });
|
||||
for (const old of assets.filter((a) => a.name === name)) {
|
||||
await github.rest.repos.deleteReleaseAsset({ owner, repo, asset_id: old.id });
|
||||
}
|
||||
await github.rest.repos.uploadReleaseAsset({
|
||||
owner,
|
||||
repo,
|
||||
release_id: releaseId,
|
||||
name,
|
||||
data: fs.readFileSync(name),
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
# zizmor (workflow security linter) configuration, run by
|
||||
# .gitea/workflows/security.yml (job `workflow-lint`, offline).
|
||||
rules:
|
||||
unpinned-uses:
|
||||
config:
|
||||
policies:
|
||||
# Every action and every call into the ops repo (poli0981/.github) is
|
||||
# pinned to a full commit SHA. Renovate bumps the actions; the ops pins
|
||||
# are bumped by hand when the ops repo is tagged (its runbook §3.2).
|
||||
"*": hash-pin
|
||||
dangerous-triggers:
|
||||
ignore:
|
||||
# Both run on `workflow_run` so a failure (or a release build) anywhere
|
||||
# can be reported to Discord. Neither checks out the triggering run's
|
||||
# code nor downloads its artifacts: the shared workflows only read run
|
||||
# metadata, and pass every untrusted field (branch, commit message,
|
||||
# actor) to the notifier script through `env:`, never by interpolation.
|
||||
- notify-ci-failure.yml
|
||||
- notify-release-pipeline.yml
|
||||
@@ -0,0 +1,56 @@
|
||||
<!--
|
||||
This is the GitLab mirror of git.poli0981.dev/poli0981/jsonPrism (sign-up there is
|
||||
closed). Issues opened here reach the maintainer.
|
||||
Start the title with "[A11Y] ". The maintainer adds the labels (accessibility, needs-triage).
|
||||
-->
|
||||
|
||||
<!--
|
||||
Thanks for reporting a barrier. You don't need to know the cause: describe
|
||||
what you tried and what happened. See ACCESSIBILITY.md for what JSONPrism
|
||||
supports today and its known limitations:
|
||||
https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/ACCESSIBILITY.md
|
||||
|
||||
Prefer not to post publicly? Email code@poli0981.dev with "Accessibility"
|
||||
in the subject. Security problems go through SECURITY.md instead.
|
||||
-->
|
||||
|
||||
## What were you trying to do?
|
||||
|
||||
For example: convert JSON to CSV, open a file, download the output, run a
|
||||
batch, change an option, get past the consent screen.
|
||||
|
||||
## What happened?
|
||||
|
||||
What you expected, and what you got instead (for example: nothing was
|
||||
announced, focus got stuck, text was unreadable at 200 % zoom).
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Go to '...'
|
||||
2. Press / say '...'
|
||||
3. See '...'
|
||||
|
||||
## Your setup
|
||||
|
||||
- Assistive technology and version: [e.g. NVDA 2026.3, VoiceOver, TalkBack, Narrator, Dragon, screen magnifier, none]
|
||||
- How you use the app: [keyboard only / screen reader / voice control / switch access / zoom or magnification / Windows contrast theme / other]
|
||||
- Platform: [Web / Windows / Linux / Android / macOS (2.2.1 or older)]
|
||||
- JSONPrism version: [e.g. 2.2.1 — see About → Build info]
|
||||
- Browser (web) or OS version (apps): [e.g. Firefox on Windows 11, Safari on macOS 15, Android 15]
|
||||
|
||||
## How much does it block you?
|
||||
|
||||
- [ ] **Critical** — I can't complete the task at all
|
||||
- [ ] **High** — I can, but only with a lot of effort or a workaround
|
||||
- [ ] **Medium** — confusing or inconsistent, but I can finish the task
|
||||
- [ ] **Low** — a minor annoyance
|
||||
|
||||
## Workaround
|
||||
|
||||
Did you find a way around it? It helps others while a fix is on the way.
|
||||
|
||||
## Diagnostics, recordings or screenshots
|
||||
|
||||
Optional. **About → Build info → Copy diagnostics** gives the version,
|
||||
platform and recent log lines (check it for anything private first). A
|
||||
short screen or screen-reader recording also helps.
|
||||
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
This is the GitLab mirror of git.poli0981.dev/poli0981/jsonPrism (sign-up there is
|
||||
closed). Issues opened here reach the maintainer.
|
||||
Start the title with "[BUG] ". The maintainer adds the labels (bug, needs-triage).
|
||||
-->
|
||||
|
||||
<!--
|
||||
Security vulnerabilities do NOT belong in a public issue. Report them
|
||||
privately by email to security@poli0981.dev (see SECURITY.md).
|
||||
|
||||
Something hard or impossible to use with a keyboard, screen reader, zoom or
|
||||
other assistive technology? Use the "Accessibility" template instead.
|
||||
-->
|
||||
|
||||
## Describe the bug
|
||||
|
||||
A clear description of what the bug is.
|
||||
|
||||
## To reproduce
|
||||
|
||||
1. Go to '...'
|
||||
2. Paste this input: '...'
|
||||
3. Pick format '...' and direction (JSON → format, or format → JSON where available)
|
||||
4. See error
|
||||
|
||||
## Sample JSON
|
||||
|
||||
Please provide a **minimal** JSON sample (or source-format input, for format → JSON) that triggers the bug, with anything private removed:
|
||||
|
||||
```json
|
||||
{ "your": "sample here" }
|
||||
```
|
||||
|
||||
## Expected behavior
|
||||
|
||||
What you expected to happen.
|
||||
|
||||
## Actual behavior
|
||||
|
||||
What actually happened. Include the error message and target format.
|
||||
|
||||
## Environment
|
||||
|
||||
- Platform: [Web / Windows / Linux / Android / macOS (2.2.1 or older)]
|
||||
- JSONPrism version: [e.g. 2.2.1 — see About → Build info]
|
||||
- Browser (web) or OS version (apps): [e.g. Firefox on Windows 11, Safari on macOS 15, Ubuntu 24.04, Android 15]
|
||||
- Where: [the website https://jsonprism.poli0981.dev / an installed release / a local dev build]
|
||||
- Assistive technology, if any: [e.g. NVDA 2026.3, VoiceOver, keyboard only, 200 % zoom]
|
||||
|
||||
## Diagnostics
|
||||
|
||||
Optional but helpful: open **About → Build info → Copy diagnostics** in the
|
||||
app and paste the result below. It contains the version, commit, platform
|
||||
and recent log lines; check it for anything private before posting.
|
||||
|
||||
```text
|
||||
Paste diagnostics here
|
||||
```
|
||||
|
||||
## Screenshots
|
||||
|
||||
If applicable, attach screenshots.
|
||||
|
||||
## Additional context
|
||||
|
||||
Anything else relevant.
|
||||
@@ -0,0 +1,51 @@
|
||||
<!--
|
||||
This is the GitLab mirror of git.poli0981.dev/poli0981/jsonPrism (sign-up there is
|
||||
closed). Issues opened here reach the maintainer.
|
||||
Start the title with "[CONVERTER] ". The maintainer adds the labels (converter, needs-triage).
|
||||
-->
|
||||
|
||||
<!--
|
||||
JSONPrism is in maintenance mode (CONTRIBUTING.md → Maintenance mode): it
|
||||
takes no new features, but a format can still be added or removed when
|
||||
there is a real need. Other ideas are welcome on the Discord server
|
||||
(https://discord.gg/2aNR3aVt), with no commitment.
|
||||
-->
|
||||
|
||||
## Add or remove?
|
||||
|
||||
- [ ] Add a format
|
||||
- [ ] Remove a format
|
||||
|
||||
## Format
|
||||
|
||||
Name, file extension(s), and a link to its specification.
|
||||
|
||||
## Who needs it, and for what?
|
||||
|
||||
The real workflow this serves, or, for a removal, why the format should go.
|
||||
Requests without a concrete use case are closed.
|
||||
|
||||
## Direction
|
||||
|
||||
- [ ] JSON → format
|
||||
- [ ] Format → JSON
|
||||
- [ ] Input only (like JSONC → JSON)
|
||||
|
||||
## Sample
|
||||
|
||||
A small input and the output you expect:
|
||||
|
||||
```json
|
||||
{ "example": "input" }
|
||||
```
|
||||
|
||||
```
|
||||
expected output here
|
||||
```
|
||||
|
||||
## Scope check
|
||||
|
||||
- [ ] It fits the "one JSON → many formats" mission
|
||||
- [ ] It can run entirely on the user's device (no server)
|
||||
- [ ] No format JSONPrism already has covers it
|
||||
- [ ] I checked the latest build at https://jsonprism.poli0981.dev
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
This is the GitLab mirror of git.poli0981.dev/poli0981/jsonPrism (sign-up there is
|
||||
closed). Issues opened here reach the maintainer.
|
||||
Start the title with "[I18N] ". The maintainer adds the labels (i18n, needs-triage).
|
||||
-->
|
||||
|
||||
<!--
|
||||
JSONPrism ships English, Tiếng Việt, 日本語 and 简体中文. The Japanese and
|
||||
Simplified Chinese strings, and parts of the Vietnamese ones, are
|
||||
AI-generated, so corrections from native speakers are very welcome.
|
||||
-->
|
||||
|
||||
## Language
|
||||
|
||||
- [ ] Tiếng Việt (`vi`)
|
||||
- [ ] 日本語 (`ja`)
|
||||
- [ ] 简体中文 (`zh-CN`)
|
||||
- [ ] English (`en`)
|
||||
|
||||
## Where
|
||||
|
||||
The page or screen, and what you were doing: for example the consent
|
||||
screen, the CSV options, an error message.
|
||||
|
||||
## Current text
|
||||
|
||||
Copy the text exactly as shown, or attach a screenshot.
|
||||
|
||||
## Suggested text
|
||||
|
||||
## Why
|
||||
|
||||
- [ ] It doesn't fit the culture, region or usual tone
|
||||
- [ ] A spelling or grammar mistake that could mislead
|
||||
- [ ] The meaning is wrong (mistranslation)
|
||||
- [ ] Other
|
||||
|
||||
Details:
|
||||
@@ -0,0 +1,85 @@
|
||||
<!--
|
||||
This is the GitLab mirror of git.poli0981.dev/poli0981/jsonPrism. GitLab CI does not
|
||||
run here: the maintainer runs CI on Gitea and applies accepted changes there; the
|
||||
mirror then marks this merge request merged (or it is closed with a link to the
|
||||
commit when it was squashed or rebased). Patches by e-mail to code@poli0981.dev
|
||||
work too.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Thanks for contributing to JSONPrism!
|
||||
|
||||
JSONPrism is in maintenance mode (CONTRIBUTING.md → "Maintenance mode"):
|
||||
new features are out of scope, and `feat:` merge requests from outside
|
||||
contributors are closed.
|
||||
|
||||
Please fill in the sections below. Changes missing required context (no summary,
|
||||
no test plan, off-topic preamble) may be closed without review.
|
||||
See CONTRIBUTING.md → "Auto-ignored contributions" for what gets dismissed.
|
||||
|
||||
Fixing an undisclosed security vulnerability? Report it privately first
|
||||
(SECURITY.md: security@poli0981.dev) instead of describing it in public.
|
||||
-->
|
||||
|
||||
## Summary
|
||||
|
||||
<!-- Required. 1–3 bullets describing WHAT changed and WHY. Link related issues. -->
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Closes #
|
||||
|
||||
## Scope
|
||||
|
||||
<!-- Required. Tick what this change is. Anything else is out of scope while JSONPrism is in maintenance mode. -->
|
||||
|
||||
- [ ] Bug fix, broken UI/UX or accessibility fix
|
||||
- [ ] Translation or wording fix
|
||||
- [ ] Add or remove a converter, agreed in issue #
|
||||
- [ ] Dependency update, security fix, or major language/runtime/framework upgrade
|
||||
- [ ] Cloudflare / Worker change, or a fix for a website incident
|
||||
- [ ] Docs or tests only
|
||||
|
||||
## Test plan
|
||||
|
||||
<!--
|
||||
Required. These are the checks CI runs; tick what you ran locally.
|
||||
CI (on Gitea) must pass before the change can be merged.
|
||||
-->
|
||||
|
||||
- [ ] `npm run format:check`
|
||||
- [ ] `npm run lint`
|
||||
- [ ] `npm run knip`
|
||||
- [ ] `npm run typecheck`
|
||||
- [ ] `npm test`
|
||||
- [ ] `npm run build`
|
||||
- [ ] `npm run cf:check`
|
||||
- [ ] Rust changed: `cargo fmt --check` and `cargo clippy --all-targets --locked -- -D warnings` in `src-tauri/`
|
||||
- [ ] Manual smoke (describe what you clicked / loaded, and on which platform: Web / Windows / Linux / Android)
|
||||
- [ ] UI changed: keyboard-only pass of what changed (visible focus, nothing stuck), accessible names in all four locales, `motion-safe:` animations, no colour-only meaning — see [ACCESSIBILITY.md](https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/ACCESSIBILITY.md#contributor-expectations). Screen reader used, if any:
|
||||
|
||||
## Screenshots / recordings (UI changes only)
|
||||
|
||||
<!-- Drop images or short clips here. Required for any visual change. -->
|
||||
|
||||
## AI-assistance disclosure
|
||||
|
||||
<!--
|
||||
JSONPrism's maintainer uses AI co-authoring openly. If an AI tool helped
|
||||
with this change (code, tests, docs or translations), say which tool and how
|
||||
you used it, so reviewers can calibrate. Either way, you are responsible
|
||||
for every line you submit.
|
||||
-->
|
||||
|
||||
- [ ] No AI assistance.
|
||||
- [ ] AI-assisted. Tool(s) and how they were used:
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] My changes follow the conventions in [CLAUDE.md](https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/CLAUDE.md) and [CONTRIBUTING.md](https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/CONTRIBUTING.md).
|
||||
- [ ] I added or updated tests where relevant.
|
||||
- [ ] New or changed UI strings are in all four locales (`en`, `vi`, `ja`, `zh-CN`) and the i18n parity test passes.
|
||||
- [ ] App code uses no ES2025 runtime APIs (Iterator helpers, `Set` methods, `Promise.try`, …).
|
||||
- [ ] I updated the docs and `CHANGELOG.md` (under `[Unreleased]`) for user-visible changes.
|
||||
- [ ] I did not include unrelated drive-by changes.
|
||||
@@ -0,0 +1,10 @@
|
||||
# gitleaks exceptions (security.yml → the ops repo's security.yml, `secrets`
|
||||
# job, full history). One fingerprint per line: <commit>:<path>:<rule>:<line>.
|
||||
# Describe each finding in words, never quote it (a quote is a new finding).
|
||||
# Editing a flagged line later makes a new finding, with its own entry.
|
||||
|
||||
# The Cloudflare Web Analytics beacon token: public by design, the site embeds
|
||||
# it in every page that loads the beacon (src/lib/analytics.ts, also named in
|
||||
# docs/DEPLOYMENT.md). It identifies the site to the analytics, it grants
|
||||
# nothing.
|
||||
532b5cfd820927fa5abf8c2da14bc034e0e9c711:src/lib/analytics.ts:generic-api-key:15
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
# Accessibility
|
||||
|
||||
**Last reviewed**: 2026-11-09 · **Applies to**: JSONPrism 2.2.x (website, desktop and Android apps)
|
||||
**Last reviewed**: 2026-11-09 · **Applies to**: JSONPrism 2.2.x and 2.3.x (website, desktop and Android apps)
|
||||
|
||||
JSONPrism should work for everyone who needs to convert JSON, whatever
|
||||
input device, screen reader, display setting or language they use. This
|
||||
@@ -141,7 +141,7 @@ Tiếng Việt, 日本語 and 简体中文.
|
||||
| 2026-11 | 2.1.1 | Windows 11: website in Edge, Brave and Firefox; Windows app (WebView2) | Narrator; keyboard only, no mouse (maintainer) | No blocking issues |
|
||||
| 2026-11-09 | 2.2.0 | Chromium (development build) | Keyboard walk-through of the 2.2.0 changes: skip link, focus after navigation and consent, focus indicators | Pass |
|
||||
| 2026-11-09 | 2.2.0 | iPhone 14 Pro (real device), iOS 26: production website in Brave and Chrome | Manual touch check (maintainer) | Works as expected |
|
||||
| Every pull request | — | jsdom in CI | [axe-core](https://github.com/dequelabs/axe-core) on every page, the consent screen and each sheet; role and name assertions with Testing Library | Must pass |
|
||||
| Every change | — | jsdom in CI | [axe-core](https://github.com/dequelabs/axe-core) on every page, the consent screen and each sheet; role and name assertions with Testing Library | Must pass |
|
||||
| 2026-10-22 | 2.0.0 | Chromium device emulation, 360 × 740 to 1280 × 800, light and dark | Visual layout check | See [tested viewports](docs/tested-viewports.md) |
|
||||
|
||||
The automated scan runs without a real layout engine, so it can't
|
||||
@@ -178,7 +178,7 @@ measure colour contrast; contrast is checked by hand.
|
||||
| --- | --- | --- |
|
||||
| Website | Current Chrome, Edge, Brave, Firefox and Safari (engine floor: Chromium 111, WebKit of macOS 12) | Narrator with Edge, Brave and Firefox |
|
||||
| Windows app | Microsoft Edge WebView2 | Narrator |
|
||||
| macOS app (12+) | WKWebView | — |
|
||||
| macOS app (12+, builds up to 2.2.1) | WKWebView | — |
|
||||
| Linux app (Ubuntu 22.04+) | WebKitGTK | — |
|
||||
| Android app (12+) | Android System WebView, Chromium 111+ | — |
|
||||
|
||||
@@ -256,9 +256,8 @@ Contributors check these for every change to the interface (see also
|
||||
|
||||
## Reporting accessibility issues
|
||||
|
||||
Open an issue with the **[Accessibility
|
||||
issue](https://github.com/poli0981/jsonPrism/issues/new?template=accessibility.md)**
|
||||
template. Include:
|
||||
Open an issue on the GitLab mirror with the
|
||||
**[Accessibility](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Accessibility)** template. Include:
|
||||
|
||||
- what you were trying to do and what happened instead;
|
||||
- your assistive technology and its version;
|
||||
@@ -266,7 +265,7 @@ template. Include:
|
||||
|
||||
You don't need to know the cause.
|
||||
|
||||
If you can't or would rather not use GitHub, email
|
||||
If you can't or would rather not use GitLab, email
|
||||
**code@poli0981.dev** with "Accessibility" in the subject. Security
|
||||
problems go through [SECURITY.md](SECURITY.md) instead.
|
||||
|
||||
@@ -301,7 +300,7 @@ This is best effort from a one-person project:
|
||||
|
||||
## Ownership and maintenance
|
||||
|
||||
Kokone ([@poli0981](https://github.com/poli0981)), the sole maintainer
|
||||
Kokone ([poli0981](https://git.poli0981.dev/poli0981)), the sole maintainer
|
||||
(see [MAINTAINERS.md](MAINTAINERS.md)), owns accessibility. That covers:
|
||||
|
||||
- triaging reports;
|
||||
@@ -312,7 +311,8 @@ Kokone ([@poli0981](https://github.com/poli0981)), the sole maintainer
|
||||
|
||||
## Feedback
|
||||
|
||||
Suggestions for this statement are welcome as an issue or a pull request.
|
||||
Suggestions for this statement are welcome as an issue or a merge request
|
||||
on the GitLab mirror.
|
||||
|
||||
A [Vietnamese translation](docs/i18n/vi/ACCESSIBILITY.md) is available. If
|
||||
the two differ, this English version prevails.
|
||||
|
||||
@@ -8,6 +8,41 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
||||
|
||||
No unreleased changes. JSONPrism is in maintenance mode: [CONTRIBUTING.md → Maintenance mode](CONTRIBUTING.md#maintenance-mode) lists what still changes.
|
||||
|
||||
## [2.3.0] — 2026-11-27
|
||||
|
||||
JSONPrism moved off GitHub, whose account is gone, to its own forge. Conversions work exactly as before, the website collects nothing new, and you are not asked to accept the terms again. `bundle.android.versionCode` 20300.
|
||||
|
||||
### Where things are now
|
||||
|
||||
- **Source:** [git.poli0981.dev/poli0981/jsonPrism](https://git.poli0981.dev/poli0981/jsonPrism) (Gitea, canonical). Sign-up there is closed.
|
||||
- **Issues and merge requests:** the public mirror at [gitlab.com/poli0981/jsonPrism](https://gitlab.com/poli0981/jsonPrism), with Bug, Accessibility, Converter request and Translation templates. Patches by e-mail to code@poli0981.dev work too.
|
||||
- **Security reports:** by e-mail to security@poli0981.dev only (GitHub's private advisories are gone). `security.txt` lists only that address now.
|
||||
- **Downloads:** `https://releases.poli0981.dev/jsonprism/<version>/`, linked file by file from the [Gitea release notes](https://git.poli0981.dev/poli0981/jsonPrism/releases), with `SHA256SUMS.txt`. The newest APK is always at `releases.poli0981.dev/jsonprism/jsonprism-latest.apk`.
|
||||
- **Old links:** github.com/poli0981/jsonPrism, its releases and the `poli0981.github.io/jsonPrism` redirect no longer work. Installed apps keep working; they have no updater, so download 2.3.0 by hand.
|
||||
|
||||
### Changed
|
||||
|
||||
- **No macOS build any more.** There is no macOS build machine since the move; 2.2.1 was the last `.dmg`. The web app runs on a Mac in any browser, and `npm run tauri:build` still builds the app on a Mac.
|
||||
- **No build-provenance attestations.** They needed GitHub Actions; verify downloads against `SHA256SUMS.txt`.
|
||||
- **In the app:** the header's repository button is now "Source code" (a branch icon instead of GitHub's logo); About → "Report a bug" opens the GitLab mirror, "Releases & downloads" the Gitea releases page; legal documents open on Gitea at the build's commit; the footer links the maintainer's Gitea profile. The Discussions and GitHub Sponsors links are gone, with GitHub. Locale text names the new hosts (en, vi, ja, zh-CN).
|
||||
- **Docs:** README (+vi), CONTRIBUTING, SECURITY, MAINTAINERS, DISCLAIMER, ACCESSIBILITY (+vi), DEPLOYMENT, TAURI-NOTES and dev_env (+vi) describe the new hosts. TERMS (+vi) section 2 names GitLab's policies for the mirror instead of GitHub's, and PRIVACY (+vi) adds a row for downloads and the repository. Neither is a material change, so `CONSENT_VERSION` stays.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- **npm:** Tauri 2.12.5 (`@tauri-apps/api`) and 2.12.6 (CLI), i18next 27.2.6, react-i18next 18.0.3, react-router 8.5.2, lucide-react 1.78, react-dropzone 20.2.1, tailwind-merge 3.7.1; dev: vitest 5.1.1, wrangler 4.167, knip 6.48, axe-core 4.14.1, `@testing-library/user-event` 14.6.13, and `@testing-library/jest-dom` 8 (a new major, tests only).
|
||||
- **typescript-eslint 8.74.0** moves to minimatch 11, which closes GHSA-g3hv-75wg-m249 (moderate, dev-only), open since 2.1.1. `npm audit` reports no vulnerabilities.
|
||||
- **Rust:** tauri 2.12.7; `url` 2.5.9 (RUSTSEC-2026-0592) and `cookie` 0.18.3 (RUSTSEC-2026-0594); `cargo deny check` passes.
|
||||
- Every update is at least three days old (Renovate's release age); 202 packages have verified registry attestations. `THIRD-PARTY.md` matches both lockfiles.
|
||||
|
||||
### Project
|
||||
|
||||
- **CI on Gitea Actions** (`.gitea/workflows/`). The web app deploys from the CI `deploy` job (`wrangler deploy`) on every push to `main`, followed by the production smoke; Cloudflare Workers Builds, which pulled from GitHub, is no longer used.
|
||||
- **Release workflow** builds Windows (MSI, NSIS) on the maintainer's machine, Linux (AppImage, deb, rpm) and the signed universal APK (signature checked with `apksigner`), uploads them to Cloudflare R2 and opens a draft Gitea release with the links.
|
||||
- **Security workflow:** actionlint, shellcheck and zizmor on the workflows; gitleaks, Opengrep, osv-scanner and cargo-deny through the shared ops workflow, weekly as well. New `src-tauri/deny.toml` and `src-tauri/osv-scanner.toml` (six Tauri-stack advisories nobody fixes yet, each with a reason and an expiry date).
|
||||
- **Qodana** runs through the shared ops workflow (the Qodana CLI); the Rust analysis in Docker Desktop on the runner.
|
||||
- **Renovate replaces Dependabot** (`renovate.json`, extending the shared preset): majors wait on the Dependency Dashboard, Tauri's npm packages and crates move in one PR, the TypeScript aliases and runtimes are bumped by hand. Kotlin's CVE-2026-53914 fix (moderate, build cache only) waits for Tauri's Android template, as documented there.
|
||||
- **Removed with GitHub:** SonarQube Cloud, CodeQL, the maintenance triage auto-close workflow (out-of-scope items are closed by hand on the mirror), the Discussions announcement and the GitHub Pages redirect.
|
||||
|
||||
## [2.2.1] — 2026-11-16
|
||||
|
||||
A maintenance release, and the start of **maintenance mode**. JSONPrism is feature-complete. From now on it gets dependency and security updates, major runtime upgrades, bug, UI/UX, accessibility and translation fixes, converter additions or removals that people really need, and Cloudflare or website fixes, but no new features. Conversions work exactly as before, nothing new is collected, and you are not asked to accept the terms again. `bundle.android.versionCode` 20201.
|
||||
|
||||
@@ -6,14 +6,14 @@ Guidance for Claude (and other AI assistants) working on this repository.
|
||||
|
||||
**JSONPrism** converts one JSON input into 12 formats (JSONL, CSV, TSV, YAML, XML, TOML, .NET RESX, Markdown table, SQL INSERT, BSON, CBOR, MessagePack) and parses six of them (JSONL, CSV, TSV, YAML, TOML, RESX) back, plus the input-only JSONC → JSON. Conversion always runs on the user's device. It ships as:
|
||||
|
||||
- a web app at <https://jsonprism.poli0981.dev>, served by the Cloudflare Worker `jsonprism` (static assets behind a tiny Worker that rate limits requests and answers `/api/*`), deployed by Cloudflare Workers Builds on every push to `main`;
|
||||
- native apps built with Tauri 2: Windows, macOS, Linux and Android (sideload APK).
|
||||
- a web app at <https://jsonprism.poli0981.dev>, served by the Cloudflare Worker `jsonprism` (static assets behind a tiny Worker that rate limits requests and answers `/api/*`), deployed by the `deploy` job of the Gitea CI workflow (`wrangler deploy`) on every push to `main`;
|
||||
- native apps built with Tauri 2: Windows, Linux and Android (sideload APK), published to `https://releases.poli0981.dev/jsonprism/`. macOS builds stopped after 2.2.1 (no macOS runner); the code still builds there.
|
||||
|
||||
GitHub Pages (`poli0981.github.io/jsonPrism`) now only redirects to the new domain.
|
||||
The repository moved from GitHub (account gone, with its Pages redirect, Releases and Discussions) to Gitea in November 2026 — see **Forge & CI** below.
|
||||
|
||||
The maintainer is **Kokone** ([@poli0981](https://github.com/poli0981)). Audience: the developer community on the open-source Discord server plus YouTube viewers who watch indie/visual-novel gameplay and occasionally want a quick devtool.
|
||||
The maintainer is **Kokone** ([poli0981](https://git.poli0981.dev/poli0981)). Audience: the developer community on the open-source Discord server plus YouTube viewers who watch indie/visual-novel gameplay and occasionally want a quick devtool.
|
||||
|
||||
**Current release**: 2.2.1. See [`docs/ROADMAP.md`](docs/ROADMAP.md) for what is next.
|
||||
**Current release**: 2.3.0. See [`docs/ROADMAP.md`](docs/ROADMAP.md) for what is next.
|
||||
|
||||
**Status: maintenance mode** (since 2.2.1). Don't propose new features. Every change must fall under the policy in [`CONTRIBUTING.md` → Maintenance mode](CONTRIBUTING.md#maintenance-mode):
|
||||
|
||||
@@ -26,7 +26,7 @@ The maintainer is **Kokone** ([@poli0981](https://github.com/poli0981)). Audienc
|
||||
- Cloudflare/Worker changes;
|
||||
- website incidents.
|
||||
|
||||
`.github/workflows/maintenance-triage.yml` closes out-of-scope issues and pull requests (label `out-of-scope`).
|
||||
Out-of-scope issues and merge requests (on the GitLab mirror) are closed by hand with the label `out-of-scope`; the GitHub-era triage workflow is gone (Gitea takes no outside issues).
|
||||
|
||||
## Stack — exact versions matter
|
||||
|
||||
@@ -85,7 +85,7 @@ The same React UI runs in the browser and in Tauri (desktop + Android).
|
||||
|
||||
**Icons**: edit `src-tauri/icons/icon.svg` (1024×1024) and run `npm run tauri:icon`. Generated PNG/ICO/ICNS files are gitignored; CI regenerates them. Revert unintended changes it makes under `src-tauri/gen/android/`.
|
||||
|
||||
**Bundling**: `npm run tauri:build` builds for the current OS. Releases come from pushing a `vX.Y.Z` tag: `.github/workflows/release.yml` builds Windows, macOS universal, Linux and Android into one draft release with `SHA256SUMS.txt` and provenance attestations.
|
||||
**Bundling**: `npm run tauri:build` builds for the current OS. Releases come from pushing a signed `vX.Y.Z` tag to Gitea: `.gitea/workflows/release.yml` builds Windows (host runner on the maintainer's PC), Linux (`ubuntu-22.04`) and Android, uploads them with `SHA256SUMS.txt` to R2 (`releases.poli0981.dev/jsonprism/<version>/` + `jsonprism-latest.apk`) through the ops `publish-r2.yml`, and opens a draft Gitea release with links only. After publishing the draft, run `announce-release.yml` by hand with the tag (a draft made by the job token fires no workflow). No macOS job, no attestations.
|
||||
|
||||
**Velopack note**: PhantomMAC uses Velopack for `.exe` deltas; JSONPrism uses Tauri's native bundler (`.msi` + NSIS `.exe`). Don't mix the two.
|
||||
|
||||
@@ -170,7 +170,16 @@ npm run build # verify production output
|
||||
npm run preview:cf # the real Cloudflare setup on http://localhost:8787
|
||||
```
|
||||
|
||||
CI (`.github/workflows/ci.yml`) also runs `format:check`, `knip`, coverage, `cf:check`, SonarQube Cloud and `cargo fmt`/`clippy`. `.github/workflows/qodana.yml` runs Qodana for JS (native mode, `qodana.yaml`) and Qodana for Rust (Early Access, Docker, `src-tauri/qodana.yaml`) with the `QODANA_TOKEN_TS_JS` and `QODANA_TOKEN_RUST` secrets; both jobs skip without their token. The maintainer typically uses **WebStorm** (JetBrains license), so Prettier and ESLint run on save.
|
||||
CI (`.gitea/workflows/ci.yml`) also runs `format:check`, `knip`, `npm audit` (advisory), `cf:check` and `cargo fmt`/`clippy`, then deploys `main` and runs the production smoke. `.gitea/workflows/security.yml` lints the workflows (actionlint, zizmor) and calls the ops scans (gitleaks, Opengrep, osv-scanner, cargo-deny). `.gitea/workflows/qodana.yml` runs Qodana for JS (native, `qodana.yaml`) and Qodana for Rust (Early Access, Docker Desktop on the host runner, `src-tauri/qodana.yaml`) through the ops `reusable-qodana.yml`, with the `QODANA_TOKEN_TS_JS` and `QODANA_TOKEN_RUST` secrets; both skip without their token. SonarQube Cloud, CodeQL and Dependabot are gone with GitHub. The maintainer typically uses **WebStorm** (JetBrains license), so Prettier and ESLint run on save.
|
||||
|
||||
## Forge & CI
|
||||
|
||||
- Canonical repo: <https://git.poli0981.dev/poli0981/jsonPrism> (Gitea, self-hosted; sign-up closed). `origin` is Gitea; the local `github` remote is the dead GitHub repo — never push to it. Public mirror for issues and merge requests: <https://gitlab.com/poli0981/jsonPrism> (push mirror from Gitea; never push there, GitLab CI is off). Links in code and docs: source → Gitea (`/src/branch/main/…`, `/src/commit/<sha>/…`), issues → GitLab, downloads → `releases.poli0981.dev/jsonprism/…`.
|
||||
- Workflows live in `.gitea/workflows/` (Gitea Actions). Bare `uses: owner/action@sha` resolves to github.com; Gitea-hosted actions need a full URL. Every action is pinned to a full SHA with a version comment; calls into the ops repo `poli0981/.github` pin the commit of an ops tag (and pass `ops_ref` to the notifiers) and are bumped by hand. Upstream `actions/upload-artifact`/`download-artifact` don't work on Gitea: use `christopherhx/gitea-*-artifact`.
|
||||
- The only runner is the maintainer's Windows PC: `windows-latest` = host mode (pwsh), `ubuntu-latest`/`ubuntu-24.04`/`ubuntu-22.04` = Docker (job containers run as root, no `sudo`). Jobs wait while the PC is off. Cron only 13:00–16:00 UTC on a slot from the ops cron registry (`security.yml`: Friday 13:19). No macOS runner, no OIDC, no code-scanning UI, no Dependabot.
|
||||
- Events caused by the job token start no workflow (a CI-made draft release published by hand doesn't announce; a CI-opened PR runs no checks).
|
||||
- Dependencies: self-hosted Renovate, `renovate.json` extends `local>poli0981/renovate-config` (3-day release age, OSV security PRs, majors via the Dependency Dashboard). Keep the repo rules there (TS aliases, Tauri JS+Rust group, generated Gradle project off).
|
||||
- The procedure and every shared decision are in the ops repo: `docs/GITEA-MIGRATION.md` and `docs/migration/jsonprism.md` in `poli0981/.github` (`E:\.github` on the maintainer's PC).
|
||||
|
||||
## Communication preferences
|
||||
|
||||
|
||||
+5
-4
@@ -10,14 +10,15 @@ In short:
|
||||
- Assume good intent, but don't tolerate bad behavior.
|
||||
- Keep discussion focused on the project.
|
||||
|
||||
The maintainer, Kokone ([@poli0981](https://github.com/poli0981)), is
|
||||
The maintainer, Kokone ([poli0981](https://git.poli0981.dev/poli0981)), is
|
||||
responsible for enforcement. Report misconduct by email to
|
||||
**[code@poli0981.dev](mailto:code@poli0981.dev)**, with links to the
|
||||
issues, comments or messages concerned if you can.
|
||||
|
||||
Content on GitHub that breaks GitHub's own rules, including anything
|
||||
posted by the maintainer, can also be reported to GitHub directly:
|
||||
see [Reporting abuse or spam](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam).
|
||||
Content on the GitLab mirror (issues, merge requests) that breaks
|
||||
GitLab's own rules, including anything posted by the maintainer, can also
|
||||
be reported to GitLab directly: see
|
||||
[Report abuse](https://docs.gitlab.com/user/report_abuse/).
|
||||
|
||||
Reports are handled confidentially. Following the Covenant's enforcement
|
||||
guidelines, possible outcomes are a private correction, a warning, a
|
||||
|
||||
+72
-52
@@ -8,13 +8,13 @@ Since 2.2.1 (November 2026) JSONPrism is in **maintenance mode**. It is
|
||||
feature-complete and stays maintained, but it doesn't grow new features.
|
||||
These changes are still accepted:
|
||||
|
||||
1. **Dependency updates** on a regular schedule (weekly, grouped by
|
||||
Dependabot).
|
||||
1. **Dependency updates** on a regular schedule (Renovate, self-hosted,
|
||||
grouped; majors wait for the Dependency Dashboard).
|
||||
2. **Security fixes**, as soon as possible: a dependency with a high or
|
||||
critical CVE, or a serious security issue in a runtime such as Node.js.
|
||||
3. **Major upgrades** of a language, runtime or framework, for example
|
||||
Node 24 → 26 or TypeScript 6 → 7.
|
||||
4. **Issues and pull requests** that:
|
||||
4. **Issues and merge requests** that:
|
||||
- add or remove a converter when people really need it (open a
|
||||
[converter request](#converter-requests) first);
|
||||
- fix a bug, a broken UI/UX or an accessibility barrier.
|
||||
@@ -26,20 +26,37 @@ These changes are still accepted:
|
||||
Anything else is out of scope, new features in particular, unless the
|
||||
maintainer judges one genuinely necessary.
|
||||
|
||||
- The [maintenance triage workflow](.github/workflows/maintenance-triage.yml)
|
||||
closes feature issues and `feat:` pull requests from outside contributors
|
||||
automatically. It also closes anything the maintainer labels
|
||||
`out-of-scope`.
|
||||
- Feature ideas are welcome in
|
||||
[Discussions → Ideas](https://github.com/poli0981/jsonPrism/discussions/categories/ideas),
|
||||
with no commitment.
|
||||
- If your issue or pull request was closed by mistake, reply to it and the
|
||||
- The maintainer closes feature requests and `feat:` merge requests from
|
||||
outside contributors, and anything else out of scope, with the
|
||||
`out-of-scope` label.
|
||||
- Feature ideas are welcome on the
|
||||
[Discord server](https://discord.gg/2aNR3aVt), with no commitment.
|
||||
- If your issue or merge request was closed by mistake, reply to it and the
|
||||
maintainer will take another look.
|
||||
|
||||
Releases ship only when one of these changes needs one, for example a
|
||||
security fix for the desktop and Android apps. The website keeps deploying
|
||||
from `main`.
|
||||
|
||||
## Where to contribute
|
||||
|
||||
The canonical repository is on Gitea,
|
||||
[git.poli0981.dev/poli0981/jsonPrism](https://git.poli0981.dev/poli0981/jsonPrism).
|
||||
Sign-up there is closed, so outsiders can read and clone it but not open
|
||||
issues or pull requests. Instead:
|
||||
|
||||
- **Issues and merge requests** go to the public mirror,
|
||||
[gitlab.com/poli0981/jsonPrism](https://gitlab.com/poli0981/jsonPrism).
|
||||
The mirror is a copy that Gitea pushes to; GitLab CI does not run there.
|
||||
- **Patches by e-mail** work too: `git format-patch` (or `git send-email`)
|
||||
to [code@poli0981.dev](mailto:code@poli0981.dev).
|
||||
- **Security reports** go by e-mail only, never as a public issue: see
|
||||
[SECURITY.md](SECURITY.md).
|
||||
|
||||
The maintainer runs CI on Gitea and applies accepted changes there; the
|
||||
mirror then updates GitLab, and the merge request shows as merged (or is
|
||||
closed with a link to the commit when it was squashed or rebased).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
| Tool | Version | Notes |
|
||||
@@ -54,7 +71,7 @@ and "Android app" in [README.md](README.md).
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
git clone https://github.com/poli0981/jsonPrism.git
|
||||
git clone https://git.poli0981.dev/poli0981/jsonPrism.git
|
||||
cd jsonPrism
|
||||
npm ci
|
||||
npm run dev
|
||||
@@ -73,16 +90,16 @@ npm run tauri:dev # desktop window around the dev server
|
||||
npm run tauri:android:dev # Android emulator or device
|
||||
```
|
||||
|
||||
## Before opening a PR
|
||||
## Before opening a merge request
|
||||
|
||||
1. **Run the same checks as CI**. If any fails, your PR can't be merged:
|
||||
1. **Run the same checks as CI**. If any fails, your change can't be merged:
|
||||
|
||||
```bash
|
||||
npm run format:check # Prettier (fix with: npm run format)
|
||||
npm run lint # ESLint (many issues fix with: npm run lint:fix)
|
||||
npm run knip # unused files, exports and dependencies
|
||||
npm run typecheck # TypeScript 7: app, tests, config files, Worker
|
||||
npm test # Vitest (CI runs npm run test:coverage)
|
||||
npm test # Vitest
|
||||
npm run build # production web build into dist/
|
||||
npm run cf:check # Worker deploy dry run; needs dist/ from the build
|
||||
```
|
||||
@@ -92,9 +109,11 @@ npm run tauri:android:dev # Android emulator or device
|
||||
Run `npm run tauri:icon` and `npm run build` first: the Rust build
|
||||
embeds the generated icons and `dist/`.
|
||||
|
||||
The **Qodana** workflow (Qodana for JS and Qodana for Rust) needs
|
||||
Qodana Cloud tokens, so it skips on pull requests from forks. The
|
||||
maintainer reviews its findings before merging.
|
||||
On Gitea, the **Security** workflow also lints the workflows
|
||||
(actionlint, zizmor) and runs gitleaks, Opengrep, osv-scanner and
|
||||
cargo-deny, and the **Qodana** workflow (Qodana for JS and Qodana for
|
||||
Rust) reports to Qodana Cloud. The maintainer reviews their findings
|
||||
before merging.
|
||||
|
||||
2. **Match the project style.** Read [`CLAUDE.md`](CLAUDE.md) for the
|
||||
non-negotiable code conventions (converter shape, error handling, i18n
|
||||
@@ -109,9 +128,9 @@ npm run tauri:android:dev # Android emulator or device
|
||||
|
||||
[`ACCESSIBILITY.md`](ACCESSIBILITY.md#contributor-expectations) has the full list.
|
||||
|
||||
4. **Keep PRs focused.** One feature or one fix per PR. Refactors as separate PRs.
|
||||
4. **Keep merge requests focused.** One fix per merge request. Refactors as separate ones.
|
||||
|
||||
5. **Fill in the [PR template](.github/PULL_REQUEST_TEMPLATE.md)**: what
|
||||
5. **Fill in the [merge request template](.gitlab/merge_request_templates/Default.md)**: what
|
||||
changed, why, how you tested it, screenshots if UI, and whether AI
|
||||
tools helped.
|
||||
|
||||
@@ -128,8 +147,8 @@ compiler. Two TypeScript packages are installed side by side on purpose:
|
||||
| `typescript` | `@typescript/typescript6` | The TypeScript 6 API (binary `tsc6`) that typescript-eslint and editors load |
|
||||
|
||||
Why: TypeScript 7.0 ships no JavaScript API yet, and typescript-eslint 8
|
||||
only supports `typescript` below 6.1. Leave the alias as it is (Dependabot
|
||||
ignores it from 6.1 on). It goes away once TypeScript 7.1 ships an API
|
||||
only supports `typescript` below 6.1. Leave the alias as it is (Renovate
|
||||
keeps it below 6.1). It goes away once TypeScript 7.1 ships an API
|
||||
that typescript-eslint supports.
|
||||
|
||||
- **`npm run typecheck` is the source of truth.** CI also checks that
|
||||
@@ -160,7 +179,7 @@ Cloudflare's runtime and is not bound by this rule.
|
||||
- `npm test` runs Vitest once, in two projects: `app` (jsdom) for
|
||||
`src/**/*.test.{ts,tsx}` and `worker` (Node) for `worker/**/*.test.ts`.
|
||||
- `npm run test:watch` re-runs on change. `npm run test:coverage` adds V8
|
||||
coverage in `coverage/` (CI feeds `lcov.info` to SonarQube Cloud).
|
||||
coverage in `coverage/`.
|
||||
- Tests live in `__tests__/` folders next to the code they cover. Add a
|
||||
regression test with a bug fix where you can.
|
||||
|
||||
@@ -202,17 +221,18 @@ dry run, so `preview:cf` always serves a fresh build.
|
||||
- The Turnstile human check is off in `npm run dev` unless you set
|
||||
`VITE_TURNSTILE_DEV=1`. On localhost the app uses Cloudflare's test
|
||||
sitekey.
|
||||
- Nobody deploys by hand: Cloudflare Workers Builds deploys every push to
|
||||
`main`. `npm run cf:check` is the deploy dry run CI uses. Hosting, secrets,
|
||||
- Nobody deploys by hand: the `deploy` job of the Gitea CI workflow runs
|
||||
`wrangler deploy` for every push to `main`, then checks production.
|
||||
`npm run cf:check` is the deploy dry run CI uses. Hosting, secrets,
|
||||
rollback and releases are described in [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md).
|
||||
|
||||
## Ways to contribute
|
||||
|
||||
### Bug reports
|
||||
|
||||
Use the [Bug Report](https://github.com/poli0981/jsonPrism/issues/new?template=bug_report.md) template. Include:
|
||||
Open an issue on the GitLab mirror with the [Bug](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Bug) template. Include:
|
||||
|
||||
- Platform (Web / Windows / macOS / Linux / Android) and browser or OS version
|
||||
- Platform (Web / Windows / Linux / Android, or macOS up to 2.2.1) and browser or OS version
|
||||
- JSONPrism version (*About → Build info*), or the output of *Copy diagnostics* on the same page
|
||||
- Steps to reproduce
|
||||
- Sample JSON that triggers the bug (minimal, please, and nothing private)
|
||||
@@ -222,7 +242,7 @@ Security vulnerabilities never go in a public issue. See [SECURITY.md](SECURITY.
|
||||
|
||||
### Accessibility issues
|
||||
|
||||
Something hard or impossible to use with a keyboard, screen reader, zoom or other assistive technology? Use the [Accessibility issue](https://github.com/poli0981/jsonPrism/issues/new?template=accessibility.md) template. You don't need to know the cause. [ACCESSIBILITY.md](ACCESSIBILITY.md) covers:
|
||||
Something hard or impossible to use with a keyboard, screen reader, zoom or other assistive technology? Use the [Accessibility](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Accessibility) template on the GitLab mirror. You don't need to know the cause. [ACCESSIBILITY.md](ACCESSIBILITY.md) covers:
|
||||
|
||||
- what is supported and tested;
|
||||
- the known limitations;
|
||||
@@ -233,8 +253,8 @@ Fixes for those limitations are welcome.
|
||||
### Converter requests
|
||||
|
||||
A format can still be added or removed when people really need it. Open a
|
||||
[Converter request](https://github.com/poli0981/jsonPrism/issues/new?template=converter_request.md)
|
||||
first and describe the workflow it serves. A pull request that adds a
|
||||
[Converter request](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Converter%20request)
|
||||
first and describe the workflow it serves. A merge request that adds a
|
||||
converter without an agreed request may be closed. A new converter must:
|
||||
|
||||
- Fit the "one JSON → many formats" core mission
|
||||
@@ -244,9 +264,9 @@ converter without an agreed request may be closed. A new converter must:
|
||||
### Feature ideas
|
||||
|
||||
New features are out of scope while JSONPrism is in
|
||||
[maintenance mode](#maintenance-mode). Share ideas in
|
||||
[Discussions → Ideas](https://github.com/poli0981/jsonPrism/discussions/categories/ideas):
|
||||
they are read, but nothing is scheduled.
|
||||
[maintenance mode](#maintenance-mode). Share ideas on the
|
||||
[Discord server](https://discord.gg/2aNR3aVt): they are read, but nothing
|
||||
is scheduled.
|
||||
|
||||
### Translations
|
||||
|
||||
@@ -257,27 +277,26 @@ professionally reviewed; see [DISCLAIMER.md](DISCLAIMER.md).
|
||||
Native-speaker corrections are very welcome. Wording that reads wrong for
|
||||
a culture or region, or a spelling mistake that could mislead, counts as a
|
||||
bug: report it with the
|
||||
[Translation or wording issue](https://github.com/poli0981/jsonPrism/issues/new?template=translation.md)
|
||||
template, or fix it in a pull request.
|
||||
[Translation](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Translation)
|
||||
template, or fix it in a merge request.
|
||||
|
||||
Every user-facing string goes through i18next, so a new or changed string
|
||||
means editing **all four** files in `src/i18n/locales/`. The parity test
|
||||
(`src/i18n/__tests__/locales.test.ts`, part of `npm test` and CI) fails
|
||||
when a locale is missing a key or has an extra one, changes a
|
||||
`{{variable}}`, or leaves a value empty. If you aren't confident in a
|
||||
translation, say so in the PR.
|
||||
translation, say so in the merge request.
|
||||
|
||||
A new language counts as a new feature, so while JSONPrism is in
|
||||
[maintenance mode](#maintenance-mode), ask in
|
||||
[Discussions → Ideas](https://github.com/poli0981/jsonPrism/discussions/categories/ideas)
|
||||
before you start. The steps stay here for reference. To add a new language:
|
||||
[maintenance mode](#maintenance-mode), ask first (an issue on the GitLab
|
||||
mirror, or [code@poli0981.dev](mailto:code@poli0981.dev)) before you start. The steps stay here for reference. To add a new language:
|
||||
|
||||
1. Copy `src/i18n/locales/en.json` to `src/i18n/locales/<locale>.json` and translate every value (keep `{{variables}}` unchanged)
|
||||
2. Import it in `src/i18n/index.ts` and add it to `resources` and `SUPPORTED_LANGUAGES`
|
||||
3. Add it to `LANGUAGES` in `src/components/common/LanguageSwitcher.tsx`
|
||||
4. Add it to the `describe.each` list in `src/i18n/__tests__/locales.test.ts`
|
||||
5. If Cloudflare Turnstile supports the language, map it in `turnstileLanguage()` in `src/lib/turnstile.ts`
|
||||
6. Open a PR
|
||||
6. Open a merge request
|
||||
|
||||
### Adding a new converter
|
||||
|
||||
@@ -308,7 +327,7 @@ ci: pin actions to full commit SHAs
|
||||
```
|
||||
|
||||
Prefixes: `feat`, `fix`, `perf`, `refactor`, `docs`, `test`, `build`
|
||||
(dependencies, bundling, toolchain), `ci` (GitHub Actions workflows),
|
||||
(dependencies, bundling, toolchain), `ci` (Gitea Actions workflows),
|
||||
`chore`, `style`.
|
||||
|
||||
## Auto-ignored contributions
|
||||
@@ -317,24 +336,25 @@ To keep the maintainer's review queue manageable, the following are
|
||||
closed without review:
|
||||
|
||||
- **New features outside the [maintenance scope](#maintenance-mode).**
|
||||
Feature issues and `feat:` pull requests from outside contributors are
|
||||
closed automatically. Other out-of-scope items are closed with the
|
||||
`out-of-scope` label.
|
||||
- **PRs with suspicious code.** If a diff looks like obfuscated/minified
|
||||
Feature requests and `feat:` merge requests from outside contributors,
|
||||
and other out-of-scope items, are closed with the `out-of-scope` label.
|
||||
- **Merge requests with suspicious code.** If a diff looks like obfuscated/minified
|
||||
code, hidden network calls, or subtly tampered third-party files, it
|
||||
will be flagged. If CodeQL or Dependabot also flag it, the contributor
|
||||
will be flagged. If the security scans (Opengrep, gitleaks, osv-scanner)
|
||||
also flag it, the contributor
|
||||
will be **banned** without exception. The maintainer may also verify
|
||||
suspect sections by hand.
|
||||
- **PRs / issues posting unknown / random links** (especially shortened
|
||||
- **Merge requests / issues posting unknown / random links** (especially shortened
|
||||
URLs to "demos", "fixes", etc. with no clear source).
|
||||
- **Behavior / language violating GitHub's policy** — harassment, hate
|
||||
speech, doxxing, NSFW content, etc.
|
||||
- **Behavior / language violating GitLab's policies** (where issues and
|
||||
merge requests are posted) — harassment, hate speech, doxxing, NSFW
|
||||
content, etc.
|
||||
- **Off-topic preamble**, e.g. "Chào buổi sáng, hôm nay là 1 ngày trời
|
||||
đẹp…" ("Good morning, what a lovely day…") or any greeting/filler that
|
||||
doesn't immediately address the issue. Get to the point: what's wrong,
|
||||
what's the expected behavior, what reproduces it.
|
||||
- **PRs without a meaningful description** or test plan. The Summary and
|
||||
Test plan sections of the PR template are required.
|
||||
- **Merge requests without a meaningful description** or test plan. The
|
||||
Summary and Test plan sections of the template are required.
|
||||
|
||||
These rules exist because this is a one-person + AI-assisted project
|
||||
(see [DISCLAIMER.md](DISCLAIMER.md)); time spent triaging low-effort
|
||||
@@ -348,7 +368,7 @@ fine; personal attacks and harassment are not.
|
||||
|
||||
Report conduct concerns to the maintainer at **code@poli0981.dev**.
|
||||
Security vulnerabilities are not conduct reports: follow
|
||||
[SECURITY.md](SECURITY.md) (private advisory or security@poli0981.dev).
|
||||
[SECURITY.md](SECURITY.md) (security@poli0981.dev).
|
||||
|
||||
## License
|
||||
|
||||
|
||||
+11
-9
@@ -1,13 +1,14 @@
|
||||
# Disclaimer
|
||||
|
||||
**Last updated**: 2026-11-09
|
||||
**Last updated**: 2026-11-27
|
||||
|
||||
## Project status
|
||||
|
||||
JSONPrism is a **one-person open-source project** maintained by poli0981
|
||||
(Kokone, [@poli0981](https://github.com/poli0981)), written with
|
||||
(Kokone, [poli0981](https://git.poli0981.dev/poli0981)), written with
|
||||
substantial AI assistance. It is published under the Apache 2.0 License
|
||||
and the source is available on GitHub.
|
||||
and the source is available on [git.poli0981.dev](https://git.poli0981.dev/poli0981/jsonPrism), mirrored on
|
||||
[GitLab](https://gitlab.com/poli0981/jsonPrism).
|
||||
|
||||
It is **not** a commercial product. There is no SLA, no support contract
|
||||
and no warranty. See the `LICENSE` file for the exact legal text — the
|
||||
@@ -32,8 +33,8 @@ This project openly uses AI tools during development:
|
||||
refactoring, writing tests and documentation, generating translations
|
||||
and reviewing changes.
|
||||
- All AI-generated code is reviewed by the maintainer before it is merged.
|
||||
Errors that slip through are bugs — please report them via
|
||||
[GitHub Issues](https://github.com/poli0981/jsonPrism/issues).
|
||||
Errors that slip through are bugs — please report them via the
|
||||
[issues on the GitLab mirror](https://gitlab.com/poli0981/jsonPrism/-/issues).
|
||||
|
||||
### Translations
|
||||
|
||||
@@ -41,8 +42,9 @@ Non-English locales (Vietnamese, Japanese, Simplified Chinese) are
|
||||
produced primarily by AI translation. They are **not professionally
|
||||
reviewed**, so wording, technical terms or idioms may be inaccurate.
|
||||
|
||||
If you are a native speaker and spot a translation issue, a pull request
|
||||
or a Discussion post is very welcome.
|
||||
If you are a native speaker and spot a translation issue, an issue with
|
||||
the [Translation](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Translation) template or a merge request on the
|
||||
GitLab mirror is very welcome.
|
||||
|
||||
## Third-party services
|
||||
|
||||
@@ -66,7 +68,7 @@ do not depend on these services.
|
||||
|
||||
## Reporting concerns
|
||||
|
||||
- Bugs: [GitHub Issues](https://github.com/poli0981/jsonPrism/issues)
|
||||
- Bugs: [issues on the GitLab mirror](https://gitlab.com/poli0981/jsonPrism/-/issues)
|
||||
- Security: [SECURITY.md](SECURITY.md)
|
||||
- Translation accuracy: [GitHub Discussions](https://github.com/poli0981/jsonPrism/discussions)
|
||||
- Translation accuracy: the [Translation](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Translation) issue template
|
||||
- Legal: legal@poli0981.dev
|
||||
@@ -186,7 +186,7 @@
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2026 poli0981 (https://github.com/poli0981)
|
||||
Copyright 2026 poli0981 (https://git.poli0981.dev/poli0981)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
+22
-23
@@ -1,12 +1,12 @@
|
||||
# Maintainers
|
||||
|
||||
| Name | GitHub | Contact | Scope |
|
||||
| Name | Forge | Contact | Scope |
|
||||
|---|---|---|---|
|
||||
| Kokone | [@poli0981](https://github.com/poli0981) | [code@poli0981.dev](mailto:code@poli0981.dev) | Solo maintainer — code review, releases, translations review, community |
|
||||
| Kokone | [poli0981](https://git.poli0981.dev/poli0981) | [code@poli0981.dev](mailto:code@poli0981.dev) | Solo maintainer — code review, releases, translations review, community |
|
||||
|
||||
JSONPrism is co-authored with AI tooling — see [DISCLAIMER.md](DISCLAIMER.md)
|
||||
for details. The maintainer is the single point of human review for every
|
||||
merged PR.
|
||||
merged change.
|
||||
|
||||
Since 2.2.1 the project is in **maintenance mode**: no new features, only
|
||||
the changes listed in
|
||||
@@ -14,44 +14,43 @@ the changes listed in
|
||||
|
||||
## Responsibilities
|
||||
|
||||
- **Code review** — reviews and merges every PR, including AI-assisted
|
||||
changes and the weekly grouped Dependabot updates, and doesn't merge on
|
||||
red CI.
|
||||
- **Releases** — tags `v*` releases; `release.yml` builds the Windows,
|
||||
macOS, Linux and Android packages into a draft GitHub Release with
|
||||
`SHA256SUMS.txt` and build-provenance attestations, which the maintainer
|
||||
reviews and publishes. The website deploys itself from `main` through
|
||||
Cloudflare Workers Builds.
|
||||
- **Code review** — reviews and merges every change, including
|
||||
AI-assisted changes, merge requests from the GitLab mirror and the grouped
|
||||
Renovate updates, and doesn't merge on red CI.
|
||||
- **Releases** — tags `v*` releases (signed); `release.yml` on Gitea
|
||||
Actions builds the Windows, Linux and Android packages, uploads them with
|
||||
`SHA256SUMS.txt` to `releases.poli0981.dev/jsonprism/`, and opens a draft
|
||||
Gitea release, which the maintainer reviews and publishes. The website
|
||||
deploys from `main` through the CI `deploy` job (`wrangler deploy`).
|
||||
- **Translations review** — the AI-generated Japanese and Simplified
|
||||
Chinese strings and the partly AI-generated Vietnamese ones.
|
||||
- **Accessibility** — triages reports labelled `accessibility`, runs the
|
||||
manual checks before a release and keeps
|
||||
[ACCESSIBILITY.md](ACCESSIBILITY.md) current.
|
||||
- **Community** — issues, Discussions and the Discord server, and
|
||||
- **Community** — issues and merge requests on the GitLab mirror, the
|
||||
Discord server, and
|
||||
enforcement of the [Code of Conduct](CODE_OF_CONDUCT.md). Vulnerability
|
||||
reports are triaged as described in [SECURITY.md](SECURITY.md).
|
||||
- **Triage** — keeps issues and pull requests within the maintenance
|
||||
scope, closing the rest with the `out-of-scope` label (the triage
|
||||
workflow posts the explanation).
|
||||
- **Triage** — keeps issues and merge requests within the maintenance
|
||||
scope, closing the rest by hand with the `out-of-scope` label.
|
||||
|
||||
## Contact
|
||||
|
||||
- Bug reports, translation fixes and converter requests: [GitHub Issues](https://github.com/poli0981/jsonPrism/issues)
|
||||
- Feature ideas (no commitment while in maintenance mode): [Discussions → Ideas](https://github.com/poli0981/jsonPrism/discussions/categories/ideas)
|
||||
- Accessibility barriers: the [Accessibility issue](https://github.com/poli0981/jsonPrism/issues/new?template=accessibility.md) template, or [code@poli0981.dev](mailto:code@poli0981.dev) — see [ACCESSIBILITY.md](ACCESSIBILITY.md)
|
||||
- Discussion / Q&A: [GitHub Discussions](https://github.com/poli0981/jsonPrism/discussions)
|
||||
- Community chat: [Discord](https://discord.gg/2aNR3aVt)
|
||||
- Source: [git.poli0981.dev/poli0981/jsonPrism](https://git.poli0981.dev/poli0981/jsonPrism) (canonical, read-only for outsiders)
|
||||
- Bug reports, translation fixes and converter requests: [issues on the GitLab mirror](https://gitlab.com/poli0981/jsonPrism/-/issues)
|
||||
- Accessibility barriers: the [Accessibility](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Accessibility) template, or [code@poli0981.dev](mailto:code@poli0981.dev) — see [ACCESSIBILITY.md](ACCESSIBILITY.md)
|
||||
- Feature ideas (no commitment while in maintenance mode), questions and community chat: [Discord](https://discord.gg/2aNR3aVt)
|
||||
- Project, maintainer & Code of Conduct: [code@poli0981.dev](mailto:code@poli0981.dev)
|
||||
- Security: [Private Security Advisory](https://github.com/poli0981/jsonPrism/security/advisories/new) or [security@poli0981.dev](mailto:security@poli0981.dev) — never a public issue
|
||||
- Security: [security@poli0981.dev](mailto:security@poli0981.dev) — never a public issue
|
||||
|
||||
## Becoming a maintainer
|
||||
|
||||
JSONPrism is small-by-design. Additional maintainers may be added when a
|
||||
contributor has demonstrated:
|
||||
|
||||
- Multiple high-quality merged PRs.
|
||||
- Multiple high-quality merged changes.
|
||||
- Familiarity with the conventions in [CLAUDE.md](CLAUDE.md) and
|
||||
[CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
- Willingness to review others' PRs and respond to issues.
|
||||
- Willingness to review others' merge requests and respond to issues.
|
||||
|
||||
Until then, the project runs as a single-maintainer indie project.
|
||||
+4
-1
@@ -1,6 +1,8 @@
|
||||
# Privacy Policy
|
||||
|
||||
**Version**: 2.0 · **Effective**: 2026-10-22 · Replaces the policy of 2026-05-13.
|
||||
Edited 2026-11-27: the downloads and the source moved off GitHub (the
|
||||
"Downloads and the repository" row; not a material change).
|
||||
|
||||
## Short version
|
||||
|
||||
@@ -29,6 +31,7 @@ Privacy questions and requests: **privacy@poli0981.dev**.
|
||||
| Website | Cloudflare Workers (static files plus a small API for the human check) | Standard HTTP request data needed to deliver the site; the Turnstile check; anonymous page-view metrics if analytics is on. Never the data you convert. |
|
||||
| Windows, macOS, Linux app | Tauri 2, runs locally | Nothing from app code. Links you click open in your browser. |
|
||||
| Android app | Tauri 2 in the system WebView | Nothing from app code. Links you tap open in your browser. |
|
||||
| Downloads and the repository | Cloudflare R2 (`releases.poli0981.dev`) serves the app files; the maintainer's Gitea server (`git.poli0981.dev`) the source and release notes; GitLab.com the public mirror for issues | Standard HTTP request data needed to deliver a file or a page. Nothing is logged by JSONPrism itself; an account you use on GitLab follows GitLab's privacy statement. |
|
||||
|
||||
### Hosting (website)
|
||||
|
||||
@@ -176,4 +179,4 @@ accept it again before you continue.
|
||||
|
||||
- Privacy: privacy@poli0981.dev
|
||||
- Security vulnerabilities: see [SECURITY.md](SECURITY.md)
|
||||
- Everything else: [GitHub Issues](https://github.com/poli0981/jsonPrism/issues)
|
||||
- Everything else: [issues on the GitLab mirror](https://gitlab.com/poli0981/jsonPrism/-/issues)
|
||||
@@ -7,12 +7,12 @@
|
||||
One JSON input. Multi-target formats. Fully on your device.
|
||||
|
||||
[](#project-status)
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/ci.yml)
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/qodana.yml)
|
||||
[](https://sonarcloud.io/summary/new_code?id=poli0981_jsonPrism)
|
||||
[](https://git.poli0981.dev/poli0981/jsonPrism/actions?workflow=ci.yml)
|
||||
[](https://git.poli0981.dev/poli0981/jsonPrism/actions?workflow=security.yml)
|
||||
[](https://git.poli0981.dev/poli0981/jsonPrism/actions?workflow=qodana.yml)
|
||||
[](LICENSE)
|
||||
|
||||
[Web app](https://jsonprism.poli0981.dev) · [Downloads](https://github.com/poli0981/jsonPrism/releases/latest) · [Tiếng Việt](README.vi.md) · [Roadmap](docs/ROADMAP.md)
|
||||
[Web app](https://jsonprism.poli0981.dev) · [Downloads](https://git.poli0981.dev/poli0981/jsonPrism/releases) · [Tiếng Việt](README.vi.md) · [Roadmap](docs/ROADMAP.md)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,7 +30,11 @@ JSONPrism is a refracting tool for developers. It takes a single JSON input and
|
||||
- translation fixes: wording that doesn't fit a culture or region, and spelling mistakes that could mislead;
|
||||
- changes the Cloudflare or Worker platform forces, and website incidents such as DDoS or bot spam.
|
||||
|
||||
New features are not planned, except the rare one that is genuinely necessary. Feature issues and pull requests outside this list are closed automatically. The full policy is in [CONTRIBUTING.md](CONTRIBUTING.md#maintenance-mode).
|
||||
New features are not planned, except the rare one that is genuinely necessary. Feature requests and merge requests outside this list are closed. The full policy is in [CONTRIBUTING.md](CONTRIBUTING.md#maintenance-mode).
|
||||
|
||||
## Where things live
|
||||
|
||||
Source: [git.poli0981.dev/poli0981/jsonPrism](https://git.poli0981.dev/poli0981/jsonPrism) (canonical). Mirror for issues and merge requests: [gitlab.com/poli0981/jsonPrism](https://gitlab.com/poli0981/jsonPrism). Patches and questions: [code@poli0981.dev](mailto:code@poli0981.dev). Security: [security@poli0981.dev](mailto:security@poli0981.dev) (see [`SECURITY.md`](SECURITY.md)). Downloads: `releases.poli0981.dev/jsonprism/`, linked file by file from the [release notes](https://git.poli0981.dev/poli0981/jsonPrism/releases). The GitHub repository is gone with its account (November 2026); old GitHub links don't work any more.
|
||||
|
||||
## Target formats
|
||||
|
||||
@@ -63,7 +67,7 @@ Twelve target formats. Six of them — JSONL, CSV, TSV, YAML, TOML and RESX —
|
||||
- **Light, dark or system theme** — Prism Spectrum palette with violet / cyan / amber / rose accents on a technical, blueprint-grid look. The Appearance menu can also hide scrollbars.
|
||||
- **Responsive — designed for viewports ≥ 360 × 640.** Smaller screens still work but may feel cramped; on mobile, Input and Output use a Tabs UI to give each panel full height. See [`docs/tested-viewports.md`](docs/tested-viewports.md) for the full device test matrix.
|
||||
- **4 UI languages** — English, Tiếng Việt, 日本語 and 简体中文. The Japanese and Chinese translations are AI-generated; fixes from native speakers are welcome.
|
||||
- **Desktop and Android apps** — Tauri 2 builds for Windows, macOS, Linux and Android with native file dialogs and drag-and-drop. They work fully offline.
|
||||
- **Desktop and Android apps** — Tauri 2 builds for Windows, Linux and Android with native file dialogs and drag-and-drop (macOS builds stopped after 2.2.1). They work fully offline.
|
||||
|
||||
## Privacy
|
||||
|
||||
@@ -99,14 +103,14 @@ Known limitations and how to report a barrier: [`ACCESSIBILITY.md`](ACCESSIBILIT
|
||||
- **Vitest** + Testing Library for tests
|
||||
- **Node.js 26** for the toolchain
|
||||
- **Cloudflare Workers** hosts the web app (static assets behind a small Worker that rate limits requests and serves `/api/*`)
|
||||
- **Tauri 2.12** for the desktop (Windows, macOS, Linux) and Android apps
|
||||
- **Tauri 2.12** for the desktop (Windows, Linux) and Android apps
|
||||
|
||||
## Quick start
|
||||
|
||||
**Requirements**: Node.js **26** (pinned in `.nvmrc`).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/poli0981/jsonPrism.git
|
||||
git clone https://git.poli0981.dev/poli0981/jsonPrism.git
|
||||
cd jsonPrism
|
||||
nvm use # picks Node 26 from .nvmrc
|
||||
npm install
|
||||
@@ -133,9 +137,9 @@ npm run preview:cf # build + wrangler dev on http://localhost:8787
|
||||
| `npm run knip` | Find unused files, exports and dependencies |
|
||||
| `npm run format` | Format with Prettier |
|
||||
| `npm run format:check` | Check formatting (CI uses this) |
|
||||
| `npm test` | Run the Vitest suite once |
|
||||
| `npm test` | Run the Vitest suite once (CI uses this) |
|
||||
| `npm run test:watch` | Run Vitest in watch mode |
|
||||
| `npm run test:coverage` | Run the tests with a coverage report (CI uses this) |
|
||||
| `npm run test:coverage` | Run the tests with a coverage report |
|
||||
| `npm run cf:types` | Regenerate the Worker's binding types |
|
||||
| `npm run cf:check` | Dry-run the Cloudflare deploy (`wrangler deploy --dry-run`; CI runs it too) |
|
||||
| `npm run preview:cf` | Serve a fresh build and the Worker with `wrangler dev` on http://localhost:8787 |
|
||||
@@ -160,21 +164,23 @@ JSONPrism also ships as a native desktop app via Tauri 2. The app uses the same
|
||||
|
||||
### Download (users)
|
||||
|
||||
Get the bundle for your OS from the [latest release](https://github.com/poli0981/jsonPrism/releases/latest):
|
||||
Get the bundle for your OS from the [latest release](https://git.poli0981.dev/poli0981/jsonPrism/releases): its notes link every file, hosted at `https://releases.poli0981.dev/jsonprism/<version>/`.
|
||||
|
||||
| OS | Files | Requirement |
|
||||
| --- | --- | --- |
|
||||
| **Windows** | `.msi` or NSIS `-setup.exe` | WebView2 runtime (preinstalled on Windows 11) |
|
||||
| **macOS** | universal `.dmg` (Apple Silicon + Intel) | macOS **12** or newer |
|
||||
| **Linux** | `.deb`, `.rpm` or `.AppImage` | Built on Ubuntu 22.04 — needs Ubuntu 22.04 or a similarly recent distro |
|
||||
|
||||
The desktop bundles aren't code-signed yet, so Windows SmartScreen or macOS Gatekeeper may warn the first time you open them. Releases from v2.0.0 on also carry `SHA256SUMS.txt` and GitHub build-provenance attestations, so you can check a download before running it:
|
||||
**No macOS build since 2.2.1.** Since the move from GitHub there is no macOS build machine. A Mac keeps the version it has (the 2.2.1 `.dmg` was the last one), and the [web app](https://jsonprism.poli0981.dev) runs in any browser, offline included once loaded.
|
||||
|
||||
The desktop bundles aren't code-signed yet, so Windows SmartScreen may warn the first time you open them. Every release carries `SHA256SUMS.txt` next to the files, so you can check a download before running it:
|
||||
|
||||
```bash
|
||||
sha256sum -c SHA256SUMS.txt --ignore-missing
|
||||
gh attestation verify <file> --repo poli0981/jsonPrism
|
||||
```
|
||||
|
||||
The apps have no auto-updater: download a new version by hand. Releases up to 2.2.1 were on GitHub, which is gone; an installed copy keeps working.
|
||||
|
||||
### Build (developers)
|
||||
|
||||
**Additional requirements**:
|
||||
@@ -209,7 +215,7 @@ Output:
|
||||
- macOS → `src-tauri/target/release/bundle/dmg/*.dmg` + `macos/*.app`
|
||||
- Linux → `src-tauri/target/release/bundle/appimage/*.AppImage` + `deb/*.deb` + `rpm/*.rpm`
|
||||
|
||||
**Automated releases**: pushing a `v*` tag runs `.github/workflows/release.yml`. It checks that the tag matches the version in `package.json` and `src-tauri/Cargo.toml`, runs the tests, builds the Windows, macOS (universal) and Linux bundles plus the Android APK into **one** draft GitHub release, then adds `SHA256SUMS.txt` and build-provenance attestations. The maintainer publishes the draft.
|
||||
**Automated releases**: pushing a `v*` tag runs `.gitea/workflows/release.yml` on Gitea Actions. It checks that the tag matches the version in `package.json` and `src-tauri/Cargo.toml`, runs the tests, builds the Windows bundles (on the maintainer's PC), the Linux bundles and the Android APK, uploads them with `SHA256SUMS.txt` to `releases.poli0981.dev/jsonprism/<version>/`, then opens a draft Gitea release that links them. The maintainer publishes the draft. Official builds cover Windows, Linux and Android; macOS bundles can still be built locally on a Mac.
|
||||
|
||||
## Android app (Tauri 2)
|
||||
|
||||
@@ -228,8 +234,8 @@ JSONPrism also ships as an Android app you sideload from a `.apk`. Same React UI
|
||||
|
||||
### Install (users)
|
||||
|
||||
1. Download `JSONPrism_<version>_android-universal.apk` from the [latest release](https://github.com/poli0981/jsonPrism/releases/latest).
|
||||
2. Optionally check it against `SHA256SUMS.txt` or with `gh attestation verify` (see [Download (users)](#download-users)).
|
||||
1. Download `JSONPrism_<version>_android-universal.apk` from the [latest release](https://git.poli0981.dev/poli0981/jsonPrism/releases), or the newest one from the stable link [`releases.poli0981.dev/jsonprism/jsonprism-latest.apk`](https://releases.poli0981.dev/jsonprism/jsonprism-latest.apk).
|
||||
2. Optionally check it against `SHA256SUMS.txt` (see [Download (users)](#download-users)).
|
||||
3. Open it; Android will ask you to allow "install unknown apps" for your browser/file manager — enable it, then install.
|
||||
4. Needs Android 12+. The app runs fully offline.
|
||||
|
||||
@@ -258,7 +264,7 @@ npm run tauri:android:build
|
||||
|
||||
Output: `src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk`. Release signing is read from `src-tauri/gen/android/keystore.properties` (gitignored); without it the APK builds unsigned. See [`docs/TAURI-NOTES.md`](docs/TAURI-NOTES.md) for keystore setup and the CI signing secrets.
|
||||
|
||||
**Automated releases**: the same `v*` tag also runs the `android` job in `release.yml`, which signs the APK with the keystore from repository secrets and attaches it to the draft release as `JSONPrism_<version>_android-universal.apk`.
|
||||
**Automated releases**: the same `v*` tag also runs the `android` job in `release.yml`, which signs the APK with the keystore from repository secrets, checks the signature, and publishes it with the desktop bundles as `JSONPrism_<version>_android-universal.apk` (plus the `jsonprism-latest.apk` alias).
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -331,22 +337,22 @@ See [`docs/ROADMAP.md`](docs/ROADMAP.md) for the full phase plan.
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests welcome — please read [`CONTRIBUTING.md`](CONTRIBUTING.md) first. PRs that match the **auto-ignored** patterns described there (suspicious code, off-topic preamble, no description, etc.) get closed without review.
|
||||
Contributions welcome within the maintenance policy — please read [`CONTRIBUTING.md`](CONTRIBUTING.md) first. The canonical repository on Gitea is read-only for outsiders: open a merge request on the [GitLab mirror](https://gitlab.com/poli0981/jsonPrism), or mail a patch (`git format-patch`) to [code@poli0981.dev](mailto:code@poli0981.dev). Merge requests that match the **auto-ignored** patterns described there (suspicious code, off-topic preamble, no description, etc.) get closed without review.
|
||||
|
||||
For bug reports and feature requests, use [GitHub Issues](https://github.com/poli0981/jsonPrism/issues). For security vulnerabilities, use the [private Security Advisory flow](https://github.com/poli0981/jsonPrism/security/advisories/new).
|
||||
For bug reports, use the [issues on the GitLab mirror](https://gitlab.com/poli0981/jsonPrism/-/issues). For security vulnerabilities, e-mail [security@poli0981.dev](mailto:security@poli0981.dev) — never a public issue.
|
||||
|
||||
## Contact
|
||||
|
||||
| Address | For |
|
||||
| --- | --- |
|
||||
| [security@poli0981.dev](mailto:security@poli0981.dev) | Vulnerability reports (the [private Security Advisory flow](https://github.com/poli0981/jsonPrism/security/advisories/new) is preferred) |
|
||||
| [security@poli0981.dev](mailto:security@poli0981.dev) | Vulnerability reports (see [`SECURITY.md`](SECURITY.md)) |
|
||||
| [privacy@poli0981.dev](mailto:privacy@poli0981.dev) | Privacy requests |
|
||||
| [legal@poli0981.dev](mailto:legal@poli0981.dev) | Terms, licensing and other legal questions |
|
||||
| [copyright@poli0981.dev](mailto:copyright@poli0981.dev) | Copyright and takedown notices |
|
||||
| [code@poli0981.dev](mailto:code@poli0981.dev) | The project and its maintainer; Code of Conduct reports |
|
||||
| [sponsor@poli0981.dev](mailto:sponsor@poli0981.dev) | Sponsorship |
|
||||
|
||||
Bug reports and feature requests belong in [GitHub Issues](https://github.com/poli0981/jsonPrism/issues), not email.
|
||||
Bug reports belong in the [issues on the GitLab mirror](https://gitlab.com/poli0981/jsonPrism/-/issues), not email.
|
||||
|
||||
## Project docs
|
||||
|
||||
@@ -390,11 +396,13 @@ from native speakers are welcomed.
|
||||
## Sponsorship
|
||||
|
||||
If JSONPrism is useful to you, consider sponsoring the maintainer,
|
||||
poli0981 (Kokone), via any of the channels in
|
||||
[`.github/FUNDING.yml`](.github/FUNDING.yml): GitHub Sponsors, Ko-fi,
|
||||
Buy Me a Coffee, Patreon, or PayPal. For sponsorship enquiries, email
|
||||
poli0981 (Kokone), via [Ko-fi](https://ko-fi.com/skullmute),
|
||||
[Buy Me a Coffee](https://www.buymeacoffee.com/skullmute),
|
||||
[Patreon](https://patreon.com/skullmute) or
|
||||
[PayPal](https://paypal.me/DungDang212) (the same list as the app's About
|
||||
page). For sponsorship enquiries, email
|
||||
[sponsor@poli0981.dev](mailto:sponsor@poli0981.dev).
|
||||
|
||||
## License
|
||||
|
||||
[Apache License 2.0](LICENSE) — © 2026 [poli0981](https://github.com/poli0981) (Kokone).
|
||||
[Apache License 2.0](LICENSE) — © 2026 [poli0981](https://git.poli0981.dev/poli0981) (Kokone).
|
||||
+33
-25
@@ -7,12 +7,12 @@
|
||||
Một JSON đầu vào. Đa định dạng đích. Chạy hoàn toàn trên thiết bị của bạn.
|
||||
|
||||
[](#trạng-thái-dự-án)
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/ci.yml)
|
||||
[](https://github.com/poli0981/jsonPrism/actions/workflows/qodana.yml)
|
||||
[](https://sonarcloud.io/summary/new_code?id=poli0981_jsonPrism)
|
||||
[](https://git.poli0981.dev/poli0981/jsonPrism/actions?workflow=ci.yml)
|
||||
[](https://git.poli0981.dev/poli0981/jsonPrism/actions?workflow=security.yml)
|
||||
[](https://git.poli0981.dev/poli0981/jsonPrism/actions?workflow=qodana.yml)
|
||||
[](LICENSE)
|
||||
|
||||
[Ứng dụng web](https://jsonprism.poli0981.dev) · [Tải về](https://github.com/poli0981/jsonPrism/releases/latest) · [English](README.md) · [Lộ trình](docs/ROADMAP.md)
|
||||
[Ứng dụng web](https://jsonprism.poli0981.dev) · [Tải về](https://git.poli0981.dev/poli0981/jsonPrism/releases) · [English](README.md) · [Lộ trình](docs/ROADMAP.md)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,7 +30,11 @@ JSONPrism là công cụ "tán sắc" cho developer. Nhận một JSON đầu v
|
||||
- sửa bản dịch: câu chữ không hợp văn hoá hay giọng địa phương, lỗi chính tả dễ gây hiểu nhầm;
|
||||
- thay đổi do Cloudflare hoặc nền tảng Worker bắt buộc, và sự cố website như DDoS hay bot spam.
|
||||
|
||||
Không thêm tính năng mới, trừ trường hợp hiếm thật sự cần thiết. Issue và pull request đề xuất tính năng ngoài danh sách trên sẽ tự động bị đóng. Chính sách đầy đủ ở [CONTRIBUTING.md](CONTRIBUTING.md#maintenance-mode) (tiếng Anh).
|
||||
Không thêm tính năng mới, trừ trường hợp hiếm thật sự cần thiết. Đề xuất tính năng và merge request ngoài danh sách trên sẽ bị đóng. Chính sách đầy đủ ở [CONTRIBUTING.md](CONTRIBUTING.md#maintenance-mode) (tiếng Anh).
|
||||
|
||||
## Mọi thứ nằm ở đâu
|
||||
|
||||
Mã nguồn: [git.poli0981.dev/poli0981/jsonPrism](https://git.poli0981.dev/poli0981/jsonPrism) (bản gốc). Mirror để mở issue và merge request: [gitlab.com/poli0981/jsonPrism](https://gitlab.com/poli0981/jsonPrism). Patch và câu hỏi: [code@poli0981.dev](mailto:code@poli0981.dev). Bảo mật: [security@poli0981.dev](mailto:security@poli0981.dev) (xem [`SECURITY.md`](SECURITY.md)). Tải về: `releases.poli0981.dev/jsonprism/`, từng file được liệt kê trong [ghi chú phát hành](https://git.poli0981.dev/poli0981/jsonPrism/releases). Repo GitHub đã mất cùng tài khoản (tháng 11/2026); link GitHub cũ không còn dùng được.
|
||||
|
||||
## Định dạng hỗ trợ
|
||||
|
||||
@@ -63,7 +67,7 @@ Tổng cộng 12 định dạng đích. Sáu trong số đó — JSONL, CSV, TSV
|
||||
- **Theme sáng, tối hoặc theo hệ thống** — bảng màu Prism Spectrum với violet / cyan / amber / rose trên phong cách "kỹ thuật" với nền lưới kiểu bản vẽ (blueprint). Menu Giao diện còn có tuỳ chọn ẩn thanh cuộn.
|
||||
- **Responsive — tối ưu cho viewport ≥ 360 × 640.** Màn hình nhỏ hơn vẫn dùng được nhưng có thể chật; trên mobile, Input và Output dùng Tabs UI để mỗi panel có toàn bộ chiều cao. Xem [`docs/tested-viewports.md`](docs/tested-viewports.md) cho ma trận thiết bị đã kiểm thử.
|
||||
- **4 ngôn ngữ giao diện** — English, Tiếng Việt, 日本語 và 简体中文. Bản tiếng Nhật và tiếng Trung do AI dịch; rất hoan nghênh người bản ngữ góp ý chỉnh sửa.
|
||||
- **App desktop và Android** — bản Tauri 2 cho Windows, macOS, Linux và Android, có dialog chọn file native và drag-and-drop. Chạy hoàn toàn offline.
|
||||
- **App desktop và Android** — bản Tauri 2 cho Windows, Linux và Android, có dialog chọn file native và drag-and-drop (bản macOS dừng sau 2.2.1). Chạy hoàn toàn offline.
|
||||
|
||||
## Quyền riêng tư
|
||||
|
||||
@@ -99,14 +103,14 @@ Hạn chế đã biết và cách báo rào cản: [`ACCESSIBILITY.md`](ACCESSIB
|
||||
- **Vitest** + Testing Library cho test
|
||||
- **Node.js 26** cho toolchain
|
||||
- **Cloudflare Workers** host bản web (static assets phía sau một Worker nhỏ giới hạn tần suất request và phục vụ `/api/*`)
|
||||
- **Tauri 2.12** cho app desktop (Windows, macOS, Linux) và Android
|
||||
- **Tauri 2.12** cho app desktop (Windows, Linux) và Android
|
||||
|
||||
## Bắt đầu nhanh
|
||||
|
||||
**Yêu cầu**: Node.js **26** (ghim trong `.nvmrc`).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/poli0981/jsonPrism.git
|
||||
git clone https://git.poli0981.dev/poli0981/jsonPrism.git
|
||||
cd jsonPrism
|
||||
nvm use # chọn Node 26 theo .nvmrc
|
||||
npm install
|
||||
@@ -135,7 +139,7 @@ npm run preview:cf # build + wrangler dev tại http://localhost:8
|
||||
| `npm run format:check` | Kiểm tra format (CI dùng cái này) |
|
||||
| `npm test` | Chạy bộ test Vitest một lần |
|
||||
| `npm run test:watch` | Chạy Vitest ở chế độ watch |
|
||||
| `npm run test:coverage` | Chạy test kèm báo cáo coverage (CI dùng cái này) |
|
||||
| `npm run test:coverage` | Chạy test kèm báo cáo coverage |
|
||||
| `npm run cf:types` | Tạo lại type cho các binding của Worker |
|
||||
| `npm run cf:check` | Chạy thử deploy lên Cloudflare (`wrangler deploy --dry-run`; CI cũng chạy) |
|
||||
| `npm run preview:cf` | Build mới rồi chạy site + Worker bằng `wrangler dev` tại http://localhost:8787 |
|
||||
@@ -160,21 +164,23 @@ JSONPrism cũng có bản desktop native qua Tauri 2. App dùng cùng React UI,
|
||||
|
||||
### Tải về (người dùng)
|
||||
|
||||
Tải bundle cho hệ điều hành của bạn từ [bản release mới nhất](https://github.com/poli0981/jsonPrism/releases/latest):
|
||||
Tải bundle cho hệ điều hành của bạn từ [bản release mới nhất](https://git.poli0981.dev/poli0981/jsonPrism/releases): ghi chú phát hành có link tới từng file, lưu tại `https://releases.poli0981.dev/jsonprism/<version>/`.
|
||||
|
||||
| Hệ điều hành | File | Yêu cầu |
|
||||
| --- | --- | --- |
|
||||
| **Windows** | `.msi` hoặc NSIS `-setup.exe` | WebView2 runtime (cài sẵn trên Windows 11) |
|
||||
| **macOS** | `.dmg` universal (Apple Silicon + Intel) | macOS **12** trở lên |
|
||||
| **Linux** | `.deb`, `.rpm` hoặc `.AppImage` | Build trên Ubuntu 22.04 — cần Ubuntu 22.04 hoặc distro mới tương đương |
|
||||
|
||||
Bản desktop chưa được ký số (code signing), nên Windows SmartScreen hoặc macOS Gatekeeper có thể cảnh báo ở lần mở đầu tiên. Từ v2.0.0, mỗi bản release đều kèm `SHA256SUMS.txt` và build-provenance attestation của GitHub để bạn kiểm tra file trước khi chạy:
|
||||
**Không còn bản macOS từ sau 2.2.1.** Từ khi rời GitHub không còn máy build macOS. Máy Mac giữ nguyên bản đang có (`.dmg` của 2.2.1 là bản cuối), và [bản web](https://jsonprism.poli0981.dev) chạy được trên mọi trình duyệt, kể cả offline sau khi đã tải.
|
||||
|
||||
Bản desktop chưa được ký số (code signing), nên Windows SmartScreen có thể cảnh báo ở lần mở đầu tiên. Mỗi bản release đều kèm `SHA256SUMS.txt` cạnh các file để bạn kiểm tra trước khi chạy:
|
||||
|
||||
```bash
|
||||
sha256sum -c SHA256SUMS.txt --ignore-missing
|
||||
gh attestation verify <file> --repo poli0981/jsonPrism
|
||||
```
|
||||
|
||||
App không tự cập nhật: tải bản mới bằng tay. Các bản đến 2.2.1 nằm trên GitHub, nay đã mất; bản đã cài vẫn chạy bình thường.
|
||||
|
||||
### Build (lập trình viên)
|
||||
|
||||
**Yêu cầu thêm**:
|
||||
@@ -209,7 +215,7 @@ Output:
|
||||
- macOS → `src-tauri/target/release/bundle/dmg/*.dmg` + `macos/*.app`
|
||||
- Linux → `src-tauri/target/release/bundle/appimage/*.AppImage` + `deb/*.deb` + `rpm/*.rpm`
|
||||
|
||||
**Release tự động**: push tag `v*` sẽ chạy `.github/workflows/release.yml`: kiểm tra tag khớp với version trong `package.json` và `src-tauri/Cargo.toml`, chạy test, build bundle Windows, macOS (universal), Linux cùng APK Android vào **một** draft GitHub release, rồi thêm `SHA256SUMS.txt` và build-provenance attestation. Maintainer sẽ publish draft đó.
|
||||
**Release tự động**: push tag `v*` sẽ chạy `.gitea/workflows/release.yml` trên Gitea Actions: kiểm tra tag khớp với version trong `package.json` và `src-tauri/Cargo.toml`, chạy test, build bundle Windows (trên máy của maintainer), bundle Linux và APK Android, tải chúng cùng `SHA256SUMS.txt` lên `releases.poli0981.dev/jsonprism/<version>/`, rồi mở một draft release trên Gitea có link tới từng file. Maintainer sẽ publish draft đó. Bản build chính thức gồm Windows, Linux và Android; bundle macOS vẫn build được trên máy Mac.
|
||||
|
||||
## Bản Android (Tauri 2)
|
||||
|
||||
@@ -228,8 +234,8 @@ JSONPrism còn có bản Android để bạn sideload từ file `.apk`. Cùng Re
|
||||
|
||||
### Cài đặt (người dùng)
|
||||
|
||||
1. Tải `JSONPrism_<version>_android-universal.apk` từ [bản release mới nhất](https://github.com/poli0981/jsonPrism/releases/latest).
|
||||
2. Nếu muốn, đối chiếu file với `SHA256SUMS.txt` hoặc kiểm tra bằng `gh attestation verify` (xem [Tải về (người dùng)](#tải-về-người-dùng)).
|
||||
1. Tải `JSONPrism_<version>_android-universal.apk` từ [bản release mới nhất](https://git.poli0981.dev/poli0981/jsonPrism/releases), hoặc bản mới nhất qua link cố định [`releases.poli0981.dev/jsonprism/jsonprism-latest.apk`](https://releases.poli0981.dev/jsonprism/jsonprism-latest.apk).
|
||||
2. Nếu muốn, đối chiếu file với `SHA256SUMS.txt` (xem [Tải về (người dùng)](#tải-về-người-dùng)).
|
||||
3. Mở file; Android sẽ hỏi cho phép "cài app không rõ nguồn" cho trình duyệt/trình quản lý file — bật lên rồi cài.
|
||||
4. Cần Android 12+. App chạy hoàn toàn offline.
|
||||
|
||||
@@ -258,7 +264,7 @@ npm run tauri:android:build
|
||||
|
||||
Output: `src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk`. Thông tin ký lấy từ `src-tauri/gen/android/keystore.properties` (gitignored); thiếu file này thì APK build ra chưa ký. Xem [`docs/TAURI-NOTES.md`](docs/TAURI-NOTES.md) để biết cách tạo keystore và các secret ký trong CI.
|
||||
|
||||
**Release tự động**: cùng tag `v*` cũng chạy job `android` trong `release.yml`, ký APK bằng keystore từ repository secrets và đính vào draft release với tên `JSONPrism_<version>_android-universal.apk`.
|
||||
**Release tự động**: cùng tag `v*` cũng chạy job `android` trong `release.yml`, ký APK bằng keystore từ repository secrets, kiểm tra chữ ký, rồi phát hành cùng bundle desktop với tên `JSONPrism_<version>_android-universal.apk` (kèm alias `jsonprism-latest.apk`).
|
||||
|
||||
## Kiến trúc
|
||||
|
||||
@@ -331,22 +337,22 @@ Xem [`docs/ROADMAP.md`](docs/ROADMAP.md) để biết kế hoạch phase đầy
|
||||
|
||||
## Đóng góp
|
||||
|
||||
Rất hoan nghênh pull request — vui lòng đọc [`CONTRIBUTING.md`](CONTRIBUTING.md) trước. PR thuộc nhóm **auto-ignored** (code đáng ngờ, lan man không vào vấn đề, không mô tả…) sẽ bị đóng không review.
|
||||
Hoan nghênh đóng góp trong phạm vi chính sách bảo trì — vui lòng đọc [`CONTRIBUTING.md`](CONTRIBUTING.md) trước. Repo gốc trên Gitea chỉ đọc với người ngoài: hãy mở merge request trên [mirror GitLab](https://gitlab.com/poli0981/jsonPrism), hoặc gửi patch (`git format-patch`) tới [code@poli0981.dev](mailto:code@poli0981.dev). Merge request thuộc nhóm **auto-ignored** (code đáng ngờ, lan man không vào vấn đề, không mô tả…) sẽ bị đóng không review.
|
||||
|
||||
Báo bug hoặc đề xuất tính năng tại [GitHub Issues](https://github.com/poli0981/jsonPrism/issues). Vấn đề bảo mật vui lòng dùng [Security Advisory riêng tư](https://github.com/poli0981/jsonPrism/security/advisories/new).
|
||||
Báo bug qua [issue trên mirror GitLab](https://gitlab.com/poli0981/jsonPrism/-/issues). Vấn đề bảo mật vui lòng gửi email tới [security@poli0981.dev](mailto:security@poli0981.dev), không mở issue công khai.
|
||||
|
||||
## Liên hệ
|
||||
|
||||
| Địa chỉ | Dùng cho |
|
||||
| --- | --- |
|
||||
| [security@poli0981.dev](mailto:security@poli0981.dev) | Báo lỗ hổng bảo mật (ưu tiên dùng [Security Advisory riêng tư](https://github.com/poli0981/jsonPrism/security/advisories/new)) |
|
||||
| [security@poli0981.dev](mailto:security@poli0981.dev) | Báo lỗ hổng bảo mật (xem [`SECURITY.md`](SECURITY.md)) |
|
||||
| [privacy@poli0981.dev](mailto:privacy@poli0981.dev) | Yêu cầu liên quan đến quyền riêng tư |
|
||||
| [legal@poli0981.dev](mailto:legal@poli0981.dev) | Điều khoản, giấy phép và các vấn đề pháp lý khác |
|
||||
| [copyright@poli0981.dev](mailto:copyright@poli0981.dev) | Thông báo bản quyền và yêu cầu gỡ bỏ (takedown) |
|
||||
| [code@poli0981.dev](mailto:code@poli0981.dev) | Về project và maintainer; báo cáo vi phạm Quy tắc ứng xử |
|
||||
| [sponsor@poli0981.dev](mailto:sponsor@poli0981.dev) | Tài trợ |
|
||||
|
||||
Báo bug và đề xuất tính năng vui lòng gửi qua [GitHub Issues](https://github.com/poli0981/jsonPrism/issues), không gửi qua email.
|
||||
Báo bug vui lòng gửi qua [issue trên mirror GitLab](https://gitlab.com/poli0981/jsonPrism/-/issues), không gửi qua email.
|
||||
|
||||
## Tài liệu project
|
||||
|
||||
@@ -389,11 +395,13 @@ chất lượng ở mức best-effort — rất hoan nghênh đóng góp từ ng
|
||||
## Tài trợ
|
||||
|
||||
Nếu JSONPrism hữu ích cho bạn, hãy cân nhắc tài trợ maintainer
|
||||
poli0981 (Kokone) qua một trong các kênh trong
|
||||
[`.github/FUNDING.yml`](.github/FUNDING.yml): GitHub Sponsors, Ko-fi,
|
||||
Buy Me a Coffee, Patreon hoặc PayPal. Liên hệ về tài trợ qua email
|
||||
poli0981 (Kokone) qua [Ko-fi](https://ko-fi.com/skullmute),
|
||||
[Buy Me a Coffee](https://www.buymeacoffee.com/skullmute),
|
||||
[Patreon](https://patreon.com/skullmute) hoặc
|
||||
[PayPal](https://paypal.me/DungDang212) (cùng danh sách với trang About
|
||||
trong app). Liên hệ về tài trợ qua email
|
||||
[sponsor@poli0981.dev](mailto:sponsor@poli0981.dev).
|
||||
|
||||
## Giấy phép
|
||||
|
||||
[Apache License 2.0](LICENSE) — © 2026 [poli0981](https://github.com/poli0981) (Kokone).
|
||||
[Apache License 2.0](LICENSE) — © 2026 [poli0981](https://git.poli0981.dev/poli0981) (Kokone).
|
||||
+25
-21
@@ -18,20 +18,19 @@ with a high or critical CVE is fixed as soon as possible.
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
**Please do not open a public GitHub Issue for security reports.**
|
||||
|
||||
Use GitHub's private vulnerability reporting:
|
||||
|
||||
→ <https://github.com/poli0981/jsonPrism/security/advisories/new>
|
||||
|
||||
This reaches the maintainer through a private channel. Include a
|
||||
proof of concept, a suggested fix if you have one, and your preferred
|
||||
disclosure timeline.
|
||||
|
||||
If you cannot use GitHub, email **security@poli0981.dev**. The same
|
||||
contacts are published in
|
||||
Email **security@poli0981.dev**. Include a proof of concept, a suggested
|
||||
fix if you have one, and your preferred disclosure timeline. The same
|
||||
contact is published in
|
||||
[`/.well-known/security.txt`](https://jsonprism.poli0981.dev/.well-known/security.txt).
|
||||
|
||||
**Do not open a public issue for security reports**, on the GitLab mirror
|
||||
(where public issues go) or anywhere else. A report that arrives as a
|
||||
public issue is made confidential and continued by e-mail.
|
||||
|
||||
The repository moved from GitHub to
|
||||
[git.poli0981.dev](https://git.poli0981.dev/poli0981/jsonPrism) in
|
||||
November 2026; GitHub's private vulnerability reporting went with it.
|
||||
|
||||
## Response expectations
|
||||
|
||||
JSONPrism is a one-person open-source project (see
|
||||
@@ -62,12 +61,12 @@ In scope:
|
||||
headers), `public/_redirects`, `wrangler.jsonc`.
|
||||
- `src-tauri/` — the Rust shell, capabilities, file-system scope and CSP.
|
||||
- Build and release tooling whose output ships to users: the website
|
||||
build, Tauri release artifacts and `.github/workflows/`.
|
||||
build, Tauri release artifacts and `.gitea/workflows/`.
|
||||
|
||||
Out of scope:
|
||||
|
||||
- Cloudflare, GitHub Pages or GitHub Actions platform issues — report them
|
||||
to Cloudflare or GitHub.
|
||||
- Cloudflare (Workers, R2), Gitea or GitLab platform issues — report them
|
||||
to their vendors.
|
||||
- WebView2 / WebKitGTK / WKWebView / Android System WebView bugs — report
|
||||
them to their vendors. JSONPrism uses whatever is installed on the
|
||||
user's system.
|
||||
@@ -78,19 +77,24 @@ Out of scope:
|
||||
|
||||
## Verifying releases
|
||||
|
||||
Every GitHub release includes `SHA256SUMS.txt` and build-provenance
|
||||
attestations generated in GitHub Actions:
|
||||
Releases are built by Gitea Actions and published to
|
||||
`https://releases.poli0981.dev/jsonprism/<version>/`, with a
|
||||
`SHA256SUMS.txt` next to the files; the
|
||||
[Gitea release notes](https://git.poli0981.dev/poli0981/jsonPrism/releases)
|
||||
list the same checksums:
|
||||
|
||||
```bash
|
||||
sha256sum -c SHA256SUMS.txt --ignore-missing
|
||||
gh attestation verify JSONPrism_2.2.1_x64-setup.exe --repo poli0981/jsonPrism
|
||||
```
|
||||
|
||||
The desktop installers are not yet code-signed, so Windows SmartScreen
|
||||
and macOS Gatekeeper may warn on first launch.
|
||||
Releases up to 2.2.1 also carried GitHub build-provenance attestations;
|
||||
those went with the GitHub account, and the new pipeline has none (there
|
||||
is no OIDC identity on Gitea). The desktop installers are not yet
|
||||
code-signed, so Windows SmartScreen may warn on first launch. The Android
|
||||
APK is signed with the project's release key.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Reporters are credited in the published advisory unless they ask
|
||||
Reporters are credited in the release notes unless they ask
|
||||
otherwise. Contributors of accepted fixes are credited in the release
|
||||
notes.
|
||||
@@ -1,9 +1,11 @@
|
||||
# Terms of Service / EULA
|
||||
|
||||
**Version**: 2.0 · **Effective**: 2026-10-22 · Replaces the terms of 2026-05-13.
|
||||
Edited 2026-11-27: section 2 and section 9 name where the project is now
|
||||
hosted (not a material change).
|
||||
|
||||
JSONPrism is a one-person, AI-assisted open-source project published by
|
||||
poli0981 (Kokone, [@poli0981](https://github.com/poli0981)) under the
|
||||
poli0981 (Kokone, [poli0981](https://git.poli0981.dev/poli0981)) under the
|
||||
[Apache License 2.0](LICENSE). These terms cover the website, the desktop
|
||||
and Android applications, the source repository and associated assets
|
||||
(together, "JSONPrism").
|
||||
@@ -25,16 +27,23 @@ does so on its license page) and again whenever these terms or the
|
||||
You must be at least 13 years old, or the age of digital consent where
|
||||
you live, to use JSONPrism.
|
||||
|
||||
## 2. GitHub Terms of Service
|
||||
## 2. Where the project is hosted
|
||||
|
||||
The repository, issues, discussions, releases and pull requests are
|
||||
hosted on GitHub. Using them means complying with:
|
||||
The source repository and the release notes are hosted on the
|
||||
maintainer's own Gitea server, <https://git.poli0981.dev/poli0981/jsonPrism>,
|
||||
where sign-up is closed. Issues and merge requests from anyone go to the
|
||||
public mirror on GitLab.com, <https://gitlab.com/poli0981/jsonPrism>.
|
||||
Using the mirror means complying with:
|
||||
|
||||
- [GitHub Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service)
|
||||
- [GitHub Acceptable Use Policies](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies)
|
||||
- [GitHub Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement)
|
||||
- [GitLab Website Terms of Use](https://handbook.gitlab.com/handbook/legal/policies/website-terms-of-use/)
|
||||
- [GitLab Acceptable Use Policy](https://handbook.gitlab.com/handbook/legal/acceptable-use-policy/)
|
||||
- [GitLab Privacy Statement](https://about.gitlab.com/privacy/)
|
||||
|
||||
Behaviour that violates GitHub's rules also violates these terms.
|
||||
Behaviour that violates GitLab's rules also violates these terms. The
|
||||
desktop and Android downloads are served by Cloudflare R2 at
|
||||
`releases.poli0981.dev` (see the [Privacy Policy](PRIVACY.md)). Until
|
||||
November 2026 the project lived on GitHub; that account and its
|
||||
releases are gone.
|
||||
|
||||
## 3. License
|
||||
|
||||
@@ -113,9 +122,9 @@ written permission.
|
||||
The website hosts no user content. If you believe material in the
|
||||
repository or the apps infringes your copyright, write to
|
||||
**copyright@poli0981.dev** with the material concerned, the work you
|
||||
claim it infringes and your contact details. Content on GitHub
|
||||
(issues, discussions, pull requests) is also subject to
|
||||
[GitHub's DMCA process](https://docs.github.com/en/site-policy/content-removal-policies/dmca-takedown-policy).
|
||||
claim it infringes and your contact details. Content on the GitLab
|
||||
mirror (issues, merge requests) is also subject to
|
||||
[GitLab's DMCA policy](https://handbook.gitlab.com/handbook/legal/dmca/).
|
||||
|
||||
## 10. Changes
|
||||
|
||||
|
||||
+19
-19
@@ -3,7 +3,7 @@
|
||||
JSONPrism is built on top of open-source libraries. This page lists each
|
||||
direct dependency declared in [`package.json`](package.json) and
|
||||
[`src-tauri/Cargo.toml`](src-tauri/Cargo.toml), the exact version used by
|
||||
**JSONPrism 2.2.1**, the upstream license, and a link to the project. It
|
||||
**JSONPrism 2.3.0**, the upstream license, and a link to the project. It
|
||||
also lists the third-party services the website uses.
|
||||
|
||||
Versions are the ones locked in [`package-lock.json`](package-lock.json)
|
||||
@@ -24,19 +24,19 @@ copyright and license notices. This file is a starting point.
|
||||
|---|---|---|---|
|
||||
| `react` | 19.3.1 | MIT | [react.dev](https://react.dev/) |
|
||||
| `react-dom` | 19.3.1 | MIT | [react.dev](https://react.dev/) |
|
||||
| `react-router` | 8.5.1 | MIT | [reactrouter.com](https://reactrouter.com/) |
|
||||
| `react-router` | 8.5.2 | MIT | [reactrouter.com](https://reactrouter.com/) |
|
||||
| `tailwindcss` (devDep) | 4.3.5 | MIT | [tailwindcss.com](https://tailwindcss.com/) |
|
||||
| `tw-animate-css` (devDep) | 1.4.0 | MIT | [github.com/Wombosvideo/tw-animate-css](https://github.com/Wombosvideo/tw-animate-css) |
|
||||
| `tailwind-merge` | 3.7.0 | MIT | [github.com/dcastil/tailwind-merge](https://github.com/dcastil/tailwind-merge) |
|
||||
| `tailwind-merge` | 3.7.1 | MIT | [github.com/dcastil/tailwind-merge](https://github.com/dcastil/tailwind-merge) |
|
||||
| `class-variance-authority` | 0.7.1 | Apache-2.0 | [cva.style](https://cva.style/) |
|
||||
| `clsx` | 2.1.1 | MIT | [github.com/lukeed/clsx](https://github.com/lukeed/clsx) |
|
||||
| `@radix-ui/react-dialog` | 1.3.1 | MIT | [radix-ui.com](https://www.radix-ui.com/) |
|
||||
| `@radix-ui/react-slot` | 1.5.0 | MIT | [radix-ui.com](https://www.radix-ui.com/) |
|
||||
| `@radix-ui/react-switch` | 1.4.1 | MIT | [radix-ui.com](https://www.radix-ui.com/) |
|
||||
| `@radix-ui/react-tabs` | 1.2.1 | MIT | [radix-ui.com](https://www.radix-ui.com/) |
|
||||
| `lucide-react` | 1.73.0 | ISC | [lucide.dev](https://lucide.dev/) |
|
||||
| `lucide-react` | 1.78.0 | ISC | [lucide.dev](https://lucide.dev/) |
|
||||
| `sonner` | 2.0.8 | MIT | [sonner.emilkowal.ski](https://sonner.emilkowal.ski/) |
|
||||
| `react-dropzone` | 20.2.0 | MIT | [react-dropzone.js.org](https://react-dropzone.js.org/) |
|
||||
| `react-dropzone` | 20.2.1 | MIT | [react-dropzone.js.org](https://react-dropzone.js.org/) |
|
||||
|
||||
The component patterns under `src/components/ui/` are generated from
|
||||
**[shadcn/ui](https://ui.shadcn.com/)** (MIT) — copied into the repo, not
|
||||
@@ -79,16 +79,16 @@ build-time packages whose generated CSS ships in the bundle.
|
||||
| Package | Version | License | Link |
|
||||
|---|---|---|---|
|
||||
| `zustand` | 5.1.0 | MIT | [github.com/pmndrs/zustand](https://github.com/pmndrs/zustand) |
|
||||
| `i18next` | 27.1.3 | MIT | [i18next.com](https://www.i18next.com/) |
|
||||
| `react-i18next` | 18.0.2 | MIT | [react.i18next.com](https://react.i18next.com/) |
|
||||
| `i18next-browser-languagedetector` | 8.3.0 | MIT | [github.com/i18next/i18next-browser-languageDetector](https://github.com/i18next/i18next-browser-languageDetector) |
|
||||
| `i18next` | 27.2.6 | MIT | [i18next.com](https://www.i18next.com/) |
|
||||
| `react-i18next` | 18.0.3 | MIT | [react.i18next.com](https://react.i18next.com/) |
|
||||
| `i18next-browser-languagedetector` | 8.3.1 | MIT | [github.com/i18next/i18next-browser-languageDetector](https://github.com/i18next/i18next-browser-languageDetector) |
|
||||
|
||||
## Cloudflare (web build)
|
||||
|
||||
| Package | Version | License | Link |
|
||||
|---|---|---|---|
|
||||
| `@marsidev/react-turnstile` | 1.6.3 | MIT | [github.com/marsidev/react-turnstile](https://github.com/marsidev/react-turnstile) |
|
||||
| `wrangler` (devDep) | 4.162.0 | MIT OR Apache-2.0 | [github.com/cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk) |
|
||||
| `wrangler` (devDep) | 4.167.0 | MIT OR Apache-2.0 | [github.com/cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk) |
|
||||
|
||||
`@marsidev/react-turnstile` renders the Turnstile widget on the website
|
||||
only. `wrangler` runs, type-checks and deploys the Worker in `worker/`.
|
||||
@@ -99,17 +99,17 @@ The services themselves are covered under
|
||||
|
||||
| Package | Version | License | Link |
|
||||
|---|---|---|---|
|
||||
| `@tauri-apps/api` | 2.12.4 | Apache-2.0 OR MIT | [tauri.app](https://tauri.app/) |
|
||||
| `@tauri-apps/api` | 2.12.5 | Apache-2.0 OR MIT | [tauri.app](https://tauri.app/) |
|
||||
| `@tauri-apps/plugin-dialog` | 2.8.4 | MIT OR Apache-2.0 | [tauri.app](https://tauri.app/) |
|
||||
| `@tauri-apps/plugin-fs` | 2.7.1 | MIT OR Apache-2.0 | [tauri.app](https://tauri.app/) |
|
||||
| `@tauri-apps/plugin-opener` | 2.7.3 | MIT OR Apache-2.0 | [tauri.app](https://tauri.app/) |
|
||||
| `@tauri-apps/cli` (devDep) | 2.12.4 | Apache-2.0 OR MIT | [tauri.app](https://tauri.app/) |
|
||||
| `@tauri-apps/cli` (devDep) | 2.12.6 | Apache-2.0 OR MIT | [tauri.app](https://tauri.app/) |
|
||||
|
||||
### Rust crates (`src-tauri/Cargo.lock`)
|
||||
|
||||
| Crate | Version | License | Link |
|
||||
|---|---|---|---|
|
||||
| `tauri` | 2.12.5 | Apache-2.0 OR MIT | [crates.io/crates/tauri](https://crates.io/crates/tauri) |
|
||||
| `tauri` | 2.12.7 | Apache-2.0 OR MIT | [crates.io/crates/tauri](https://crates.io/crates/tauri) |
|
||||
| `tauri-build` (build dependency) | 2.7.4 | Apache-2.0 OR MIT | [crates.io/crates/tauri-build](https://crates.io/crates/tauri-build) |
|
||||
| `tauri-plugin-dialog` | 2.8.4 | Apache-2.0 OR MIT | [crates.io/crates/tauri-plugin-dialog](https://crates.io/crates/tauri-plugin-dialog) |
|
||||
| `tauri-plugin-fs` | 2.7.1 | Apache-2.0 OR MIT | [crates.io/crates/tauri-plugin-fs](https://crates.io/crates/tauri-plugin-fs) |
|
||||
@@ -132,21 +132,21 @@ shipped in the app.
|
||||
| `typescript` (alias of `@typescript/typescript6`, wraps TypeScript 6.0.3) | 6.0.2 | Apache-2.0 | [typescriptlang.org](https://www.typescriptlang.org/) |
|
||||
| `eslint` | 10.15.0 | MIT | [eslint.org](https://eslint.org/) |
|
||||
| `@eslint/js` | 10.0.1 | MIT | [eslint.org](https://eslint.org/) |
|
||||
| `typescript-eslint` | 8.72.2 | MIT | [typescript-eslint.io](https://typescript-eslint.io/) |
|
||||
| `typescript-eslint` | 8.74.0 | MIT | [typescript-eslint.io](https://typescript-eslint.io/) |
|
||||
| `eslint-plugin-react-hooks` | 7.1.1 | MIT | [github.com/facebook/react](https://github.com/facebook/react) |
|
||||
| `eslint-plugin-react-refresh` | 0.5.8 | MIT | [github.com/ArnaudBarre/eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) |
|
||||
| `globals` | 17.14.0 | MIT | [github.com/sindresorhus/globals](https://github.com/sindresorhus/globals) |
|
||||
| `prettier` | 3.10.1 | MIT | [prettier.io](https://prettier.io/) |
|
||||
| `prettier-plugin-tailwindcss` | 0.8.1 | MIT | [github.com/tailwindlabs/prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) |
|
||||
| `knip` | 6.45.1 | ISC | [knip.dev](https://knip.dev/) |
|
||||
| `vitest` | 5.1.0 | MIT | [vitest.dev](https://vitest.dev/) |
|
||||
| `@vitest/coverage-v8` | 5.1.0 | MIT | [vitest.dev](https://vitest.dev/) |
|
||||
| `knip` | 6.48.0 | ISC | [knip.dev](https://knip.dev/) |
|
||||
| `vitest` | 5.1.1 | MIT | [vitest.dev](https://vitest.dev/) |
|
||||
| `@vitest/coverage-v8` | 5.1.1 | MIT | [vitest.dev](https://vitest.dev/) |
|
||||
| `jsdom` | 31.0.1 | MIT | [github.com/jsdom/jsdom](https://github.com/jsdom/jsdom) |
|
||||
| `@testing-library/react` | 16.3.3 | MIT | [testing-library.com](https://testing-library.com/) |
|
||||
| `@testing-library/dom` | 10.4.2 | MIT | [testing-library.com](https://testing-library.com/) |
|
||||
| `@testing-library/jest-dom` | 7.0.1 | MIT | [testing-library.com](https://testing-library.com/) |
|
||||
| `@testing-library/user-event` | 14.6.12 | MIT | [testing-library.com](https://testing-library.com/) |
|
||||
| `axe-core` | 4.14.0 | MPL-2.0 | [github.com/dequelabs/axe-core](https://github.com/dequelabs/axe-core) |
|
||||
| `@testing-library/jest-dom` | 8.0.0 | MIT | [testing-library.com](https://testing-library.com/) |
|
||||
| `@testing-library/user-event` | 14.6.13 | MIT | [testing-library.com](https://testing-library.com/) |
|
||||
| `axe-core` | 4.14.1 | MPL-2.0 | [github.com/dequelabs/axe-core](https://github.com/dequelabs/axe-core) |
|
||||
| `@types/node` | 26.6.6 | MIT | [github.com/DefinitelyTyped/DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) |
|
||||
| `@types/papaparse` | 5.5.2 | MIT | [github.com/DefinitelyTyped/DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) |
|
||||
| `@types/react` | 19.3.0 | MIT | [github.com/DefinitelyTyped/DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) |
|
||||
|
||||
+139
-120
@@ -8,12 +8,12 @@ in [dev_env.md](dev_env.md), Tauri details in [TAURI-NOTES.md](TAURI-NOTES.md).
|
||||
|
||||
| Task | How |
|
||||
| --- | --- |
|
||||
| Deploy the web app | Merge or push to `main`. Cloudflare Workers Builds deploys it. |
|
||||
| Check a deploy | GitHub Actions → **Production smoke** (runs on every push to `main`). |
|
||||
| Deploy the web app | Merge or push to `main`. The CI workflow's `deploy` job runs `wrangler deploy`. |
|
||||
| Check a deploy | The CI run's `smoke` job (Gitea → Actions → **CI**), or run **Production smoke** by hand. |
|
||||
| Roll back the web app | Dashboard → `jsonprism` Worker → **Deployments**, or `npx wrangler rollback`. |
|
||||
| Preview locally | `npm run preview:cf` → http://localhost:8787 |
|
||||
| Rotate the Turnstile secret | Rotate it on the widget, then update `TURNSTILE_SECRET` on the Worker. |
|
||||
| Ship desktop + Android builds | Bump the versions, push a `vX.Y.Z` tag, publish the draft release. |
|
||||
| Ship desktop + Android builds | Bump the versions, push a signed `vX.Y.Z` tag, publish the draft Gitea release, run **Announce Release to Discord**. |
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -55,57 +55,61 @@ browser ──► jsonprism.poli0981.dev (Cloudflare Worker "jsonprism")
|
||||
- `compatibility_date` is pinned in `wrangler.jsonc`; move it deliberately and
|
||||
test with `npm run preview:cf`.
|
||||
|
||||
## Workers Builds (automatic deploys)
|
||||
## Forge and CI
|
||||
|
||||
Configured in the Cloudflare dashboard (the `jsonprism` Worker →
|
||||
**Settings → Build**), not in the repo:
|
||||
- The repository lives on Gitea, <https://git.poli0981.dev/poli0981/jsonPrism>
|
||||
(canonical), with a push mirror at <https://gitlab.com/poli0981/jsonPrism>
|
||||
for outside issues and merge requests. GitHub (the account, its Actions,
|
||||
Pages and Releases) is gone since November 2026.
|
||||
- CI is **Gitea Actions** (`.gitea/workflows/`). The runner is the
|
||||
maintainer's Windows PC: `windows-latest` jobs run there in host mode,
|
||||
`ubuntu-*` jobs in Docker (`docker.gitea.com/runner-images`). Jobs wait
|
||||
while the PC is off; scheduled workflows run only 13:00–16:00 UTC. The
|
||||
shared rules (runner labels, the ops repo's reusable workflows, cron
|
||||
slots) are in the ops runbook, `docs/GITEA-MIGRATION.md` in
|
||||
`poli0981/.github`.
|
||||
- Dependency updates come from the self-hosted Renovate (`renovate.json`
|
||||
extends `local>poli0981/renovate-config`), daily; majors wait on the
|
||||
Dependency Dashboard issue.
|
||||
|
||||
| Setting | Value |
|
||||
| --- | --- |
|
||||
| Repository | `poli0981/jsonPrism` |
|
||||
| Production branch | `main` |
|
||||
| Build command | `npm run build` (may also be empty) |
|
||||
| Deploy command | `npx wrangler deploy` |
|
||||
| Non-production branch deploy command | `npx wrangler preview` |
|
||||
| Root directory | repository root |
|
||||
| Node.js | 26, from `.nvmrc` or the `NODE_VERSION` build variable |
|
||||
## Deploys (Gitea CI)
|
||||
|
||||
- `wrangler.jsonc` → `build.command` runs `npm run build` before every
|
||||
`wrangler deploy`, `preview` and `dev`, so a deploy works even with no build
|
||||
command in the dashboard (setting one only builds twice).
|
||||
- Workers Builds installs dependencies with `npm clean-install` using its own
|
||||
npm (10.9.2 at the time of writing). The lockfile must stay installable with
|
||||
that npm: a peer-dependency conflict fails the build at the install step
|
||||
(this kept `main` undeployable before 2.0.0).
|
||||
`ci.yml` runs on every push and pull request to `main`. On a push to `main`,
|
||||
after the `web` job passes:
|
||||
|
||||
### Previews (pull requests and other branches)
|
||||
1. **`deploy`** installs from a clean `npm ci` and runs
|
||||
`npx wrangler deploy --message "main <sha>"`; `wrangler.jsonc` →
|
||||
`build.command` runs `npm run build` first. It authenticates with the
|
||||
user-level Actions secrets `CLOUDFLARE_API_TOKEN` (Workers edit) and
|
||||
`CLOUDFLARE_ACCOUNT_ID`, shared by the web repos.
|
||||
2. **`smoke`** calls `production-smoke.yml` with the commit — see
|
||||
[Production smoke](#production-smoke).
|
||||
|
||||
Non-production branches run `npx wrangler preview`, which publishes a
|
||||
[Worker Preview](https://developers.cloudflare.com/workers/previews/) named
|
||||
after the branch (`<branch>-jsonprism.<subdomain>.workers.dev` when workers.dev
|
||||
is enabled) and reports it on the pull request.
|
||||
- The build stamps the short commit (`GITHUB_SHA`, which Gitea Actions sets)
|
||||
into `<meta name="jsonprism-commit">` and the About page; the smoke check
|
||||
uses it to recognise the new deploy.
|
||||
- A failed deploy leaves the previous version live, and the CI run is red
|
||||
(Discord via `notify-ci-failure.yml`).
|
||||
- Changes to `wrangler.jsonc` (route, vars, bindings) apply on the next
|
||||
deploy. `npm run cf:check` (`wrangler deploy --dry-run`) in the `web` job
|
||||
catches config and bundling errors before merge.
|
||||
- **Workers Builds is no longer used**: it pulled from GitHub. Its GitHub
|
||||
connection on the `jsonprism` Worker should stay disconnected in the
|
||||
dashboard (the Worker → **Settings → Build**), so nothing else deploys.
|
||||
It installed with its own npm 10.9.2, which is why the lockfile had to stay
|
||||
installable with that npm; the CI job now uses the npm of `.nvmrc`'s Node.
|
||||
|
||||
- Previews inherit no production vars or bindings. `wrangler.jsonc` → `previews`
|
||||
declares them again: separate rate-limit counters (`namespace_id` 4202, 4204,
|
||||
4206) and an empty `ALLOWED_HOSTNAMES`. Any binding added at the top level needs a
|
||||
preview-safe twin there, or `wrangler preview` fails with "missing a
|
||||
`previews` block".
|
||||
- Previews get no `TURNSTILE_SECRET` (set one with
|
||||
`npx wrangler preview base-config secret put` only if you need the check on
|
||||
previews), and the production sitekey doesn't run on preview hostnames, so
|
||||
the human check reports "unavailable" and testers continue past it. Web
|
||||
Analytics never loads there.
|
||||
### Previews
|
||||
|
||||
- Every push to `main` builds and deploys. No GitHub Action deploys the web
|
||||
app, and GitHub holds no Cloudflare credentials.
|
||||
- The build stamps the short commit (`WORKERS_CI_COMMIT_SHA`) into
|
||||
`<meta name="jsonprism-commit">` and the header's version chip; the smoke
|
||||
workflow uses it to recognise the new deploy.
|
||||
- A failed build leaves the previous version live. Build logs exist only in the
|
||||
dashboard (the Worker's build history).
|
||||
- Changes to `wrangler.jsonc` (route, vars, bindings) apply on the next deploy.
|
||||
CI's `npm run cf:check` (`wrangler deploy --dry-run`) catches config and
|
||||
bundling errors before merge.
|
||||
Workers Builds published a
|
||||
[Worker Preview](https://developers.cloudflare.com/workers/previews/) for each
|
||||
pull request; Gitea CI does not. `npx wrangler preview` still works by hand.
|
||||
Previews inherit no production vars or bindings, so `wrangler.jsonc` →
|
||||
`previews` declares them again: separate rate-limit counters (`namespace_id`
|
||||
4202, 4204, 4206) and an empty `ALLOWED_HOSTNAMES`. Any binding added at the
|
||||
top level needs a preview-safe twin there, or `wrangler preview` fails with
|
||||
"missing a `previews` block". Previews get no `TURNSTILE_SECRET`, so the human
|
||||
check reports "unavailable" there.
|
||||
|
||||
## Custom domain
|
||||
|
||||
@@ -116,7 +120,7 @@ is enabled) and reports it on the pull request.
|
||||
- Changing the hostname touches more than the route. Search the repo for
|
||||
`jsonprism.poli0981.dev` (`wrangler.jsonc` route and `ALLOWED_HOSTNAMES`,
|
||||
`src/lib/analytics.ts`, `src/lib/links.ts`, `index.html`, `public/`,
|
||||
`.github/pages-redirect/`, the workflows, the legal docs), then update the
|
||||
the workflows, the legal docs), then update the
|
||||
Turnstile widget's hostnames and the Web Analytics site in the dashboard.
|
||||
|
||||
## Secrets and variables
|
||||
@@ -216,7 +220,8 @@ Vite copies `public/` into `dist/`; Workers Static Assets applies `_headers` and
|
||||
the console in `npm run preview:cf` afterwards. The desktop CSP is separate
|
||||
(`tauri.conf.json`) and stays free of third-party hosts.
|
||||
- `public/_redirects`: `/jsonPrism` and `/jsonPrism/*` → 301 to the same path
|
||||
without the old GitHub Pages prefix.
|
||||
without the old GitHub Pages prefix (links that were rewritten to the new
|
||||
host keep working; `poli0981.github.io` itself went with the account).
|
||||
- Also in `public/`: `robots.txt`, `sitemap.xml` (update `lastmod` when pages
|
||||
change), `.well-known/security.txt` (**expires 2027-10-01 — renew it before
|
||||
then**), `og-image.png`, and `theme-init.js` (applies the theme before first
|
||||
@@ -301,20 +306,21 @@ npm run preview:cf # wrangler dev (builds first) → http://localh
|
||||
|
||||
## Production smoke
|
||||
|
||||
`.github/workflows/production-smoke.yml` runs on every push to `main` and on
|
||||
demand:
|
||||
`.gitea/workflows/production-smoke.yml` runs after every deploy (called by
|
||||
`ci.yml`'s `smoke` job with the commit) and by hand:
|
||||
|
||||
1. Waits up to 15 minutes for https://jsonprism.poli0981.dev/ to serve
|
||||
`<meta name="jsonprism-commit">` with the pushed commit (skipped on manual
|
||||
runs).
|
||||
`<meta name="jsonprism-commit">` with that commit, three times in a row
|
||||
(skipped on manual runs).
|
||||
2. Checks the CSP, HSTS, `nosniff` and `X-Frame-Options` headers; `/about` → 200
|
||||
(SPA fallback); `/jsonPrism/about` → 301 to `/about`; `/api/health`; the
|
||||
`security.txt` contact; and that `/api/turnstile/verify` answers 403 to a
|
||||
foreign `Origin`.
|
||||
|
||||
Failures reach Discord through `notify-ci-failure.yml`. When the wait step times
|
||||
out, check the build in the Cloudflare dashboard first. Run the workflow by hand
|
||||
after a rollback or a dashboard change.
|
||||
Failures reach Discord through `notify-ci-failure.yml` (as a CI failure, or
|
||||
"Production smoke" for a manual run). When the wait step times out, check the
|
||||
`deploy` job and the Worker's deployments in the Cloudflare dashboard. Run the
|
||||
workflow by hand after a rollback or a dashboard change.
|
||||
|
||||
## Rollback
|
||||
|
||||
@@ -325,58 +331,54 @@ after a rollback or a dashboard change.
|
||||
to the previous version). Needs `npx wrangler login` with access to the
|
||||
account.
|
||||
- A rollback doesn't touch `main`: revert the bad commit too, or the next push
|
||||
deploys it again. Then run **Production smoke** by hand.
|
||||
deploys it again. Then run **Production smoke** by hand (Gitea → Actions).
|
||||
|
||||
## GitHub Pages redirect
|
||||
## Security scans
|
||||
|
||||
- https://poli0981.github.io/jsonPrism/ serves only
|
||||
`.github/pages-redirect/index.html` and `404.html` (identical): a script that
|
||||
drops the `/jsonPrism` prefix and keeps the rest of the path, the query and
|
||||
the hash; a 3-second meta refresh to the home page when JavaScript is off;
|
||||
`noindex`.
|
||||
- Deploy it by hand — Actions → **Pages redirect** → Run workflow — and only
|
||||
after changing `.github/pages-redirect/`. Repository Settings → Pages →
|
||||
Source must stay **GitHub Actions**.
|
||||
- Keep it online: old links in YouTube descriptions, Discord and READMEs point
|
||||
there.
|
||||
`security.yml` ("Security") runs on every push and pull request to `main`,
|
||||
weekly on Friday 13:19 UTC, and by hand:
|
||||
|
||||
## SonarQube Cloud
|
||||
- **workflow-lint**: actionlint + shellcheck (pinned binaries, SHA-256
|
||||
checked; `.github/actionlint.yaml`) and zizmor offline
|
||||
(`.github/zizmor.yml`, hash-locked in `.github/requirements-ci.txt`) on
|
||||
`.gitea/workflows/*.yml`.
|
||||
- **scan**: the ops repo's `security.yml` — gitleaks over the full history
|
||||
(exceptions in `.gitleaksignore`: the public Web Analytics beacon token), Opengrep (SARIF as an artifact),
|
||||
osv-scanner over `package-lock.json` and `src-tauri/Cargo.lock` (dated
|
||||
exceptions in `src-tauri/osv-scanner.toml`) and cargo-deny
|
||||
(`src-tauri/deny.toml`: advisories, licences, crates.io only).
|
||||
|
||||
- Organization `poli0981`, project key `poli0981_jsonPrism`, settings in
|
||||
`sonar-project.properties`.
|
||||
- CI-based analysis: job `sonar` in `ci.yml` runs after `web` with the
|
||||
`SONAR_TOKEN` repository secret and the coverage artifact
|
||||
(`coverage/lcov.info`).
|
||||
- **Automatic Analysis must stay OFF** (SonarQube Cloud → project →
|
||||
Administration → Analysis Method); with it on, the CI scan fails.
|
||||
- Without `SONAR_TOKEN` (Dependabot and fork PRs) the job skips instead of
|
||||
failing. The quality gate is reported, not enforced
|
||||
(`sonar.qualitygate.wait=false`).
|
||||
- CodeQL runs through GitHub's default setup (no workflow file).
|
||||
SonarQube Cloud, CodeQL and Dependabot were GitHub-era tools and are gone;
|
||||
`npm audit` still runs in CI as an advisory step.
|
||||
|
||||
## Qodana
|
||||
|
||||
- Workflow `qodana.yml` ("Qodana") runs on every push to `main`, every pull
|
||||
request to `main`, and by hand. Results go to Qodana Cloud (Ultimate
|
||||
licence). They also come back as check annotations, a pull-request
|
||||
comment and the `qodana-js` / `qodana-rust` artifacts (SARIF and logs).
|
||||
- **Job `js`**: Qodana for JS in native mode (`--within-docker false`).
|
||||
- Runs on Node 26 with the runner's `node_modules`; `npm run cf:types`
|
||||
runs first so the Worker's types resolve.
|
||||
request to `main`, and by hand, through the ops repo's
|
||||
`reusable-qodana.yml` (the Qodana CLI). Results go to Qodana Cloud (Ultimate
|
||||
licence) and the `qodana-report-typescript` / `qodana-report-rust`
|
||||
artifacts (SARIF and logs); there is no code-scanning UI on Gitea.
|
||||
- **Job `typescript`**: Qodana for JS in native mode on `ubuntu-latest`.
|
||||
- Installs with npm (scripts off); `npm run cf:types` runs first so the
|
||||
Worker's types resolve.
|
||||
- Config `qodana.yaml`, Cloud project `jsonprism-js-ts`, secret
|
||||
`QODANA_TOKEN_TS_JS`.
|
||||
- **Job `rust`**: Qodana for Rust, Early Access, Docker only
|
||||
(`jetbrains/qodana-rust:2026.2-eap`).
|
||||
- **Job `rust`**: Qodana for Rust, Early Access, Docker only — it runs on the
|
||||
maintainer's PC (`windows-latest`) in Docker Desktop, as root.
|
||||
- `src-tauri/` is the project directory and the repository root is
|
||||
mounted. The job builds `dist/` and the icons first, because
|
||||
`tauri::generate_context!()` embeds them.
|
||||
- Config `src-tauri/qodana.yaml`, Cloud project `jsonprism-rust`, secret
|
||||
`QODANA_TOKEN_RUST`.
|
||||
- Both jobs skip without their token (Dependabot and fork pull requests).
|
||||
Findings are reported, not enforced: there is no quality gate.
|
||||
mounted. The job generates the icons and a stand-in `dist/index.html`
|
||||
first, because `tauri::generate_context!()` needs them.
|
||||
- Config `src-tauri/qodana.yaml` (the dhi.io apt pin for the bootstrap, a
|
||||
25-minute project timeout, the linter's own type/borrow checks off —
|
||||
rustc and clippy are the checkers of record), Cloud project
|
||||
`jsonprism-rust`, secret `QODANA_TOKEN_RUST`.
|
||||
- A job without its token skips (a `tokens` job checks first); runs started by
|
||||
Renovate skip too. Findings are reported, not enforced.
|
||||
- The Qodana Cloud projects' VCS URL should point at
|
||||
`https://git.poli0981.dev/poli0981/jsonPrism.git`.
|
||||
- If the licence lapses, the jobs fail at the licence check, but only in
|
||||
this workflow; CI and the Discord notifier are unaffected. Renew the
|
||||
licence, or delete the two secrets so the jobs skip.
|
||||
this workflow. Renew the licence, or delete the two secrets so the jobs
|
||||
skip.
|
||||
|
||||
## Releases (desktop + Android)
|
||||
|
||||
@@ -392,37 +394,54 @@ Android builds.
|
||||
- `bundle.android.versionCode` in `src-tauri/tauri.conf.json`:
|
||||
`MAJOR*10000 + MINOR*100 + PATCH` (2.0.0 → 20000).
|
||||
- `CHANGELOG.md`.
|
||||
2. **Tag** the merged commit (signed, like earlier tags) and push the tag:
|
||||
2. **Tag** the merged commit (signed, like earlier tags) and push the tag to
|
||||
Gitea:
|
||||
|
||||
```bash
|
||||
git tag -s vX.Y.Z -m "JSONPrism vX.Y.Z"
|
||||
git push origin vX.Y.Z
|
||||
```
|
||||
|
||||
3. **`release.yml`** checks tag = `package.json` = `Cargo.toml`, runs the
|
||||
tests, creates one draft release, builds Windows (`.msi`, NSIS `.exe`),
|
||||
macOS universal (`.dmg`, `.app.tar.gz`), Linux (`.deb`, `.rpm`, `.AppImage`)
|
||||
and the signed Android APK (`JSONPrism_<version>_android-universal.apk`),
|
||||
then adds `SHA256SUMS.txt` and build-provenance attestations. Details in
|
||||
[TAURI-NOTES.md](TAURI-NOTES.md#release-workflow).
|
||||
4. **Review the draft** (every asset present, notes taken from the changelog),
|
||||
then **Publish**. Publishing triggers `announce-release.yml` (Discord) and
|
||||
`announce-discussion.yml` (Discussions → Announcements).
|
||||
5. **Rebuild a tag**: Actions → **Release Tauri bundles** → Run workflow with
|
||||
the tag. It reuses the draft and refuses once the release is published.
|
||||
3. **`release.yml`** ("Release Tauri bundles") checks tag = `package.json` =
|
||||
`Cargo.toml`, runs the tests, builds Windows (`.msi`, NSIS `.exe`) on the
|
||||
maintainer's PC, Linux (`.deb`, `.rpm`, `.AppImage`) and the signed Android
|
||||
APK, uploads them with `SHA256SUMS.txt` to
|
||||
`https://releases.poli0981.dev/jsonprism/<version>/` (and the
|
||||
`jsonprism-latest.apk` alias), then opens a **draft** Gitea release whose
|
||||
notes link every file. No macOS builds since 2.2.1 (no macOS runner).
|
||||
Details in [TAURI-NOTES.md](TAURI-NOTES.md#release-workflow).
|
||||
4. **Review the draft**: every link answers (`curl -I`), add the highlights
|
||||
from the changelog, then **Publish** in the Gitea UI.
|
||||
5. **Announce**: Actions → **Announce Release to Discord** → Run workflow with
|
||||
the tag. Publishing a draft the job token created starts no workflow on
|
||||
Gitea, so this step is manual. (GitHub Discussions announcements ended
|
||||
with GitHub.)
|
||||
6. **A failed job**: "Re-run failed jobs" on the run (Gitea's artifact service
|
||||
sometimes times out). Files already on R2 are never overwritten
|
||||
(`rclone --immutable`): to ship different files, bump the version.
|
||||
A dry run without a tag: Actions → **Release Tauri bundles** → Run
|
||||
workflow on a branch; it builds everything and uploads nothing.
|
||||
|
||||
The bundles are not code-signed yet, so Windows SmartScreen and macOS
|
||||
Gatekeeper warn on first launch.
|
||||
The bundles are not code-signed yet, so Windows SmartScreen warns on first
|
||||
launch.
|
||||
|
||||
### Repository secrets
|
||||
### Actions secrets (Gitea)
|
||||
|
||||
| Secret | Used by |
|
||||
| --- | --- |
|
||||
| `SONAR_TOKEN` | `ci.yml` (job `sonar`) |
|
||||
| `ANDROID_KEYSTORE_BASE64`, `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_PASSWORD`, `ANDROID_KEY_ALIAS` | `release.yml` (job `android`) — see [TAURI-NOTES.md](TAURI-NOTES.md#ci-signing-secrets) |
|
||||
| `DISCORD_RELEASES_WEBHOOK`, `DISCORD_REPO_WEBHOOK`, `DISCORD_PING_ROLE_ID` | `announce-release.yml` |
|
||||
| `DISCORD_CI_WEBHOOK` | `notify-ci-failure.yml` (CI and Production smoke failures) |
|
||||
| `DISCORD_RELEASE_PIPELINE_WEBHOOK` | `notify-release-pipeline.yml` |
|
||||
| Secret | Level | Used by |
|
||||
| --- | --- | --- |
|
||||
| `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID` | user (shared) | `ci.yml` (job `deploy`) |
|
||||
| `R2_RELEASES_ACCESS_KEY_ID`, `R2_RELEASES_SECRET_ACCESS_KEY` + variable `R2_ACCOUNT_ID` | user (shared) | `release.yml` (job `publish`, the ops `publish-r2.yml`) |
|
||||
| `ANDROID_KEYSTORE_BASE64`, `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_PASSWORD`, `ANDROID_KEY_ALIAS` | repository | `release.yml` (job `android`) — see [TAURI-NOTES.md](TAURI-NOTES.md#ci-signing-secrets) |
|
||||
| `QODANA_TOKEN_TS_JS`, `QODANA_TOKEN_RUST` | repository | `qodana.yml` |
|
||||
| `DISCORD_RELEASES_WEBHOOK`, `DISCORD_REPO_WEBHOOK`, `DISCORD_PING_ROLE_ID` | repository / user | `announce-release.yml` |
|
||||
| `DISCORD_CI_WEBHOOK` | repository / user | `notify-ci-failure.yml` (CI, Production smoke, Security and Qodana failures on `main`) |
|
||||
| `DISCORD_RELEASE_PIPELINE_WEBHOOK` | repository / user | `notify-release-pipeline.yml` |
|
||||
|
||||
The Discord workflows call reusable workflows from `poli0981/.github`, pinned
|
||||
to a commit, and receive only these secrets (no `secrets: inherit`).
|
||||
Release credentials are only used by jobs a tag push or a manual dispatch
|
||||
starts, never by pull requests or schedules.
|
||||
|
||||
The Discord, Qodana, security and R2 workflows call reusable workflows from
|
||||
`poli0981/.github` on Gitea, pinned to the commit of an ops tag (`ops_ref`
|
||||
for the notifiers' script), and receive only the secrets they name (no
|
||||
`secrets: inherit`). Renovate does not bump those pins: update them by hand
|
||||
when the ops repo is tagged.
|
||||
+11
-1
@@ -6,7 +6,7 @@ Update it as work lands — keep the project status honest.
|
||||
|
||||
**Status: maintenance mode since v2.2.1 (2026-11-16).** No new features; see [Phase 11](#phase-11--maintenance-mode-) for what is still done.
|
||||
|
||||
**Current release: v2.2.1 (2026-11-16).** The web app runs at https://jsonprism.poli0981.dev (Cloudflare Workers); desktop and Android builds are on [GitHub Releases](https://github.com/poli0981/jsonPrism/releases).
|
||||
**Current release: v2.3.0 (2026-11-27).** The web app runs at https://jsonprism.poli0981.dev (Cloudflare Workers); desktop and Android builds are on `releases.poli0981.dev/jsonprism/`, linked from the [Gitea releases](https://git.poli0981.dev/poli0981/jsonPrism/releases).
|
||||
|
||||
---
|
||||
|
||||
@@ -430,9 +430,19 @@ What 2.2.1 set up for it:
|
||||
- [x] **Auto-close:** `maintenance-triage.yml` closes, with a bilingual comment:
|
||||
- feature issues and `feat:` pull requests from outside contributors;
|
||||
- anything the maintainer labels `out-of-scope`.
|
||||
|
||||
*Removed in 2.3.0: Gitea takes no outside issues, and the maintainer closes out-of-scope items on the GitLab mirror by hand.*
|
||||
- [x] **Qodana:** Qodana for JS (native mode) and Qodana for Rust (Early Access) on every push and pull request, reported to Qodana Cloud.
|
||||
- [x] **Dependencies:** every dependency at its latest release, including i18next 27, react-i18next 18 and jsdom 31.
|
||||
|
||||
What 2.3.0 changed: the move from GitHub to Gitea (November 2026, after the GitHub account was lost):
|
||||
|
||||
- [x] **Forge:** the source on [git.poli0981.dev](https://git.poli0981.dev/poli0981/jsonPrism), issues and merge requests on the [GitLab mirror](https://gitlab.com/poli0981/jsonPrism); every link in the app and the docs moved.
|
||||
- [x] **CI and deploys:** Gitea Actions. The web app deploys from the CI `deploy` job (`wrangler deploy`), then the production smoke runs; Workers Builds is no longer used.
|
||||
- [x] **Releases:** Windows, Linux and Android files with `SHA256SUMS.txt` on `releases.poli0981.dev/jsonprism/`, a draft Gitea release with the links. No macOS builds (no macOS runner) and no build-provenance attestations any more.
|
||||
- [x] **Checks:** a Security workflow (actionlint, zizmor, gitleaks, Opengrep, osv-scanner, cargo-deny), Qodana through the ops reusable workflow, Renovate instead of Dependabot. SonarQube Cloud, CodeQL and the auto-close workflow are gone.
|
||||
- [x] **Dependencies:** refreshed within the current majors plus jest-dom 8; the minimatch, `url` and `cookie` advisories are closed.
|
||||
|
||||
Earlier work still open, now handled as maintenance:
|
||||
|
||||
- the Android real-device checks (Phase 7);
|
||||
|
||||
+40
-30
@@ -4,11 +4,12 @@ Operational notes for the desktop and Android builds. Aimed at maintainers, not
|
||||
|
||||
## Versions
|
||||
|
||||
Tauri 2.12: `tauri` 2.12.5, `tauri-plugin-dialog` 2.8, `tauri-plugin-fs` 2.7,
|
||||
Tauri 2.12: `tauri` 2.12.7, `tauri-plugin-dialog` 2.8, `tauri-plugin-fs` 2.7,
|
||||
`tauri-plugin-opener` 2.7 and, on desktop only, `tauri-plugin-single-instance`
|
||||
2.5 (`src-tauri/Cargo.toml` / `Cargo.lock`), with `@tauri-apps/cli` 2.12 and the
|
||||
matching `@tauri-apps/*` npm packages. Dependabot groups each side (npm `tauri`,
|
||||
cargo `tauri`) so the plugin versions move together.
|
||||
matching `@tauri-apps/*` npm packages. Renovate keeps both sides in one pull
|
||||
request ("Tauri (JS + Rust)" in `renovate.json`), so the CLI never sees a
|
||||
major.minor mismatch.
|
||||
|
||||
There is **no os plugin and no shell plugin**. The os plugin was removed in
|
||||
2.0.0; the About page's "Copy diagnostics" gets OS and architecture from the
|
||||
@@ -136,46 +137,55 @@ Turnstile check inside the gate exists only on the web.
|
||||
|
||||
- Windows: MSI (via WiX) + NSIS `.exe`. Tested on Windows 10 22H2 and
|
||||
Windows 11.
|
||||
- macOS: universal (Apple Silicon + Intel) DMG + `.app` (published as
|
||||
`.app.tar.gz`), min version 12.0 (Monterey).
|
||||
- macOS: universal (Apple Silicon + Intel) DMG + `.app`, min version 12.0
|
||||
(Monterey). **Official builds stopped after 2.2.1**: Gitea Actions has no
|
||||
macOS runner (ops migration decision D9). `npm run tauri:build` on a Mac
|
||||
still produces them.
|
||||
- Linux: AppImage, `.deb` and `.rpm`, built on Ubuntu 22.04 to keep the glibc
|
||||
floor low.
|
||||
- Android: one universal APK — see [Android](#android-sideload-apk).
|
||||
|
||||
Bundles are not code-signed yet (`certificateThumbprint` and
|
||||
`signingIdentity` are `null`), so expect Windows SmartScreen and macOS
|
||||
Gatekeeper warnings on first launch. Signing is on the roadmap.
|
||||
`signingIdentity` are `null`), so expect Windows SmartScreen warnings on
|
||||
first launch. Signing is on the roadmap.
|
||||
|
||||
## Release workflow
|
||||
|
||||
`.github/workflows/release.yml` runs on a `v*` tag push, or by hand
|
||||
(`workflow_dispatch`) with an existing tag to rebuild it:
|
||||
`.gitea/workflows/release.yml` (Gitea Actions) runs on a `v*` tag push. Run
|
||||
by hand on a branch ("Run workflow"), it builds everything and keeps the
|
||||
files as the `r2-release` artifact for 7 days, but uploads and releases
|
||||
nothing: a dry run.
|
||||
|
||||
1. **verify** — the tag must look like `vX.Y.Z` and match the `package.json`
|
||||
and `Cargo.toml` versions; then `npm test`.
|
||||
2. **create-release** — creates **one** draft release, or reuses the existing
|
||||
draft; it refuses when the release is already published. (Parallel
|
||||
"find or create" calls used to race and split assets across drafts.)
|
||||
3. **desktop** — matrix: Windows (`windows-latest`), macOS universal
|
||||
(`macos-15`, Arm64, `--target universal-apple-darwin`), Linux (`ubuntu-22.04`).
|
||||
GitHub retired the `macos-14` images on 2026-11-02; the v2.2.0 macOS job
|
||||
was refused with "configuration … is not supported" and rebuilt on
|
||||
`macos-15`. `minimumSystemVersion` 12.0 keeps the macOS 12 floor whatever
|
||||
the runner's version.
|
||||
Each builds with `tauri-apps/tauri-action` v1 and uploads into the draft.
|
||||
4. **android** — Java 17 (Temurin), SDK platform 36 + NDK `27.2.12479018`,
|
||||
Rust Android targets; signs with the release keystore from secrets and
|
||||
uploads `JSONPrism_<version>_android-universal.apk` (1.7.x used
|
||||
`JSONPrism-v<version>-android-universal.apk`).
|
||||
5. **checksums** — downloads every asset, uploads `SHA256SUMS.txt` and creates
|
||||
GitHub build-provenance attestations for each file.
|
||||
1. **verify** — `package.json` and `Cargo.toml` versions agree; on a tag, the
|
||||
tag looks like `vX.Y.Z` and matches them; then `npm test`.
|
||||
2. **windows** — on the maintainer's PC (`windows-latest` is the runner's host
|
||||
mode): `npm run tauri -- build` → MSI + NSIS.
|
||||
3. **linux** — in the runner's `ubuntu-22.04` Docker image (the WebKitGTK
|
||||
packages are installed in the job; `APPIMAGE_EXTRACT_AND_RUN=1` because a
|
||||
container has no FUSE): AppImage, `.deb`, `.rpm`.
|
||||
4. **android** — Java 17 (Temurin), the SDK installed in the job
|
||||
(`setup-android` + `sdkmanager`: platform 36, build-tools 36.1.0, NDK
|
||||
`27.2.12479018`), Rust Android targets; signs with the release keystore
|
||||
from secrets, checks the signature with `apksigner`, and stages
|
||||
`JSONPrism_<version>_android-universal.apk`.
|
||||
5. **assemble** — collects the six files under fixed names, writes
|
||||
`SHA256SUMS.txt`, copies the APK to the `jsonprism-latest.apk` alias and
|
||||
writes the release notes with a link to every file.
|
||||
6. **publish** — the ops repo's `publish-r2.yml` uploads the files to
|
||||
`releases.poli0981.dev/jsonprism/<version>/` (never overwritten), then the
|
||||
alias last.
|
||||
7. **release** — opens a **draft** Gitea release with those notes (no binaries
|
||||
on the forge).
|
||||
|
||||
The maintainer reviews and publishes the draft; publishing triggers the
|
||||
Discord and GitHub Discussions announcements. Anyone can check a download:
|
||||
The maintainer checks the links and publishes the draft, then runs
|
||||
`announce-release.yml` by hand with the tag: publishing a draft that the job
|
||||
token created starts no workflow on Gitea. Releases up to 2.2.1 were built by
|
||||
GitHub Actions (`tauri-action`, a macOS universal job, build-provenance
|
||||
attestations) and published on GitHub, which is gone. Anyone can check a
|
||||
download:
|
||||
|
||||
```bash
|
||||
sha256sum -c SHA256SUMS.txt --ignore-missing
|
||||
gh attestation verify <file> --repo poli0981/jsonPrism
|
||||
```
|
||||
|
||||
Every action is pinned to a full commit SHA, checkouts use
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ Two TypeScript packages are installed side by side:
|
||||
The IDE's TS 6 service can disagree with TS 7 on edge cases; trust
|
||||
`npm run typecheck`.
|
||||
- Don't "fix" the alias. It goes once TypeScript 7.1 ships an API that
|
||||
typescript-eslint supports; until then Dependabot ignores `typescript` ≥ 6.1.
|
||||
typescript-eslint supports; until then Renovate keeps `typescript` below 6.1.
|
||||
- TS 7 rules: no `baseUrl` (use `paths`), `types` defaults to `[]` (every
|
||||
tsconfig lists its own), enums and parameter properties are not erasable
|
||||
(`erasableSyntaxOnly`).
|
||||
@@ -106,7 +106,7 @@ selection, signing and the CI secrets are in
|
||||
sorting.
|
||||
- `npm test` — Vitest 5 with two projects: `app` (jsdom) and `worker` (node).
|
||||
- `npm run test:coverage` — the same run with V8 coverage; reports land in
|
||||
`coverage/` (text, HTML and `lcov.info`, which CI passes to SonarQube Cloud).
|
||||
`coverage/` (text, HTML and `lcov.info`).
|
||||
|
||||
## Other tooling on the maintainer's machine
|
||||
|
||||
@@ -127,7 +127,7 @@ the broader dev environment knows what's around:
|
||||
|
||||
```bash
|
||||
# One-time
|
||||
git clone https://github.com/poli0981/jsonPrism.git
|
||||
git clone https://git.poli0981.dev/poli0981/jsonPrism.git
|
||||
cd jsonPrism
|
||||
npm ci
|
||||
cp .dev.vars.example .dev.vars
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
# Trợ năng (Accessibility)
|
||||
|
||||
**Rà soát lần cuối**: 2026-11-09 · **Áp dụng cho**: JSONPrism 2.2.x (website, ứng dụng desktop và Android)
|
||||
**Rà soát lần cuối**: 2026-11-09 · **Áp dụng cho**: JSONPrism 2.2.x và 2.3.x (website, ứng dụng desktop và Android)
|
||||
|
||||
JSONPrism muốn ai cần chuyển đổi JSON cũng dùng được, bất kể họ dùng
|
||||
thiết bị nhập nào, trình đọc màn hình nào, thiết lập hiển thị hay ngôn
|
||||
@@ -141,7 +141,7 @@ tiếng Việt, tiếng Nhật và tiếng Trung giản thể.
|
||||
| 2026-11 | 2.1.1 | Windows 11: website trên Edge, Brave và Firefox; ứng dụng Windows (WebView2) | Narrator; chỉ bàn phím, không dùng chuột (maintainer) | Không có lỗi chặn |
|
||||
| 2026-11-09 | 2.2.0 | Chromium (bản development) | Đi bằng bàn phím qua các thay đổi của 2.2.0: skip link, focus sau khi chuyển trang và sau màn hình đồng ý, chỉ báo focus | Đạt |
|
||||
| 2026-11-09 | 2.2.0 | iPhone 14 Pro (máy thật), iOS 26: website production trên Brave và Chrome | Kiểm tra thủ công bằng cảm ứng (maintainer) | Hoạt động đúng |
|
||||
| Mỗi pull request | — | jsdom trong CI | [axe-core](https://github.com/dequelabs/axe-core) trên mọi trang, màn hình đồng ý và từng sheet; kiểm tra vai trò và tên bằng Testing Library | Bắt buộc đạt |
|
||||
| Mỗi thay đổi | — | jsdom trong CI | [axe-core](https://github.com/dequelabs/axe-core) trên mọi trang, màn hình đồng ý và từng sheet; kiểm tra vai trò và tên bằng Testing Library | Bắt buộc đạt |
|
||||
| 2026-10-22 | 2.0.0 | Giả lập thiết bị trên Chromium, từ 360 × 740 tới 1280 × 800, sáng và tối | Kiểm tra bố cục bằng mắt | Xem [các viewport đã kiểm thử](../../tested-viewports.md) |
|
||||
|
||||
Bài quét tự động chạy không có engine layout thật nên không đo được độ
|
||||
@@ -178,7 +178,7 @@ tương phản màu; độ tương phản được kiểm tra thủ công.
|
||||
| --- | --- | --- |
|
||||
| Website | Chrome, Edge, Brave, Firefox và Safari bản hiện hành (engine tối thiểu: Chromium 111, WebKit của macOS 12) | Narrator với Edge, Brave và Firefox |
|
||||
| Ứng dụng Windows | Microsoft Edge WebView2 | Narrator |
|
||||
| Ứng dụng macOS (12+) | WKWebView | — |
|
||||
| Ứng dụng macOS (12+, các bản đến 2.2.1) | WKWebView | — |
|
||||
| Ứng dụng Linux (Ubuntu 22.04+) | WebKitGTK | — |
|
||||
| Ứng dụng Android (12+) | Android System WebView, Chromium 111+ | — |
|
||||
|
||||
@@ -248,15 +248,14 @@ Người đóng góp kiểm tra các điểm sau với mọi thay đổi giao di
|
||||
- `npm test` phải đạt, kể cả bài quét axe-core trong
|
||||
`src/app/__tests__/a11y.test.tsx`. Mở rộng bài quét khi thêm trang hay
|
||||
hộp thoại mới.
|
||||
- Tự đi bằng bàn phím qua phần mình thay đổi và ghi lại trong pull request.
|
||||
- Tự đi bằng bàn phím qua phần mình thay đổi và ghi lại trong merge request.
|
||||
- Kiểm tra nhanh bằng trình đọc màn hình thì càng tốt.
|
||||
- **Tài liệu này.** Cập nhật khi hành vi hoặc một hạn chế đã biết thay đổi.
|
||||
|
||||
## Báo lỗi trợ năng
|
||||
|
||||
Mở issue bằng template **[Accessibility
|
||||
issue](https://github.com/poli0981/jsonPrism/issues/new?template=accessibility.md)**,
|
||||
kèm theo:
|
||||
Mở issue trên bản mirror GitLab bằng template
|
||||
**[Accessibility](https://gitlab.com/poli0981/jsonPrism/-/issues/new?issuable_template=Accessibility)**, kèm theo:
|
||||
|
||||
- bạn định làm gì và chuyện gì đã xảy ra;
|
||||
- công nghệ hỗ trợ bạn dùng và phiên bản;
|
||||
@@ -264,7 +263,7 @@ kèm theo:
|
||||
|
||||
Bạn không cần biết nguyên nhân.
|
||||
|
||||
Nếu không thể hoặc không muốn dùng GitHub, hãy email
|
||||
Nếu không thể hoặc không muốn dùng GitLab, hãy email
|
||||
**code@poli0981.dev**, tiêu đề có chữ "Accessibility". Vấn đề bảo mật đi
|
||||
theo [SECURITY.md](../../../SECURITY.md).
|
||||
|
||||
@@ -299,7 +298,7 @@ theo [SECURITY.md](../../../SECURITY.md).
|
||||
|
||||
## Trách nhiệm và duy trì
|
||||
|
||||
Kokone ([@poli0981](https://github.com/poli0981)), maintainer duy nhất
|
||||
Kokone ([poli0981](https://git.poli0981.dev/poli0981)), maintainer duy nhất
|
||||
(xem [MAINTAINERS.md](../../../MAINTAINERS.md)), chịu trách nhiệm về trợ
|
||||
năng, gồm:
|
||||
|
||||
@@ -311,7 +310,8 @@ năng, gồm:
|
||||
|
||||
## Góp ý
|
||||
|
||||
Mọi góp ý cho tài liệu này đều được hoan nghênh qua issue hoặc pull request.
|
||||
Mọi góp ý cho tài liệu này đều được hoan nghênh qua issue hoặc merge request
|
||||
trên bản mirror GitLab.
|
||||
|
||||
Cấu trúc tài liệu theo khuyến nghị của Open Source Guides
|
||||
([Accessibility best practices for your
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
# Chính sách quyền riêng tư
|
||||
|
||||
**Phiên bản**: 2.0 · **Ngày hiệu lực**: 2026-10-22 · Thay thế chính sách ngày 2026-05-13.
|
||||
Sửa ngày 2026-11-27: bản tải về và mã nguồn đã rời GitHub (dòng "Bản tải
|
||||
về và kho mã nguồn"; không phải thay đổi đáng kể).
|
||||
|
||||
## Tóm tắt
|
||||
|
||||
@@ -39,6 +41,7 @@ tư: **privacy@poli0981.dev**.
|
||||
| Trang web | Cloudflare Workers (tệp tĩnh cùng một API nhỏ cho bước xác minh con người) | Dữ liệu yêu cầu HTTP tiêu chuẩn cần thiết để cung cấp trang web; bước xác minh Turnstile; số liệu lượt xem trang ẩn danh nếu tính năng thống kê đang bật. Không bao giờ bao gồm dữ liệu bạn chuyển đổi. |
|
||||
| Ứng dụng Windows, macOS, Linux | Tauri 2, chạy cục bộ | Không có gì được gửi đi từ mã của ứng dụng. Các liên kết bạn nhấp vào sẽ mở trong trình duyệt của bạn. |
|
||||
| Ứng dụng Android | Tauri 2 trong WebView của hệ thống | Không có gì được gửi đi từ mã của ứng dụng. Các liên kết bạn chạm vào sẽ mở trong trình duyệt của bạn. |
|
||||
| Bản tải về và kho mã nguồn | Cloudflare R2 (`releases.poli0981.dev`) phục vụ các tệp ứng dụng; máy chủ Gitea của maintainer (`git.poli0981.dev`) phục vụ mã nguồn và ghi chú phát hành; GitLab.com là bản mirror công khai để mở issue | Dữ liệu yêu cầu HTTP tiêu chuẩn cần thiết để cung cấp tệp hoặc trang. Bản thân JSONPrism không ghi log gì; tài khoản bạn dùng trên GitLab tuân theo tuyên bố quyền riêng tư của GitLab. |
|
||||
|
||||
### Dịch vụ lưu trữ (trang web)
|
||||
|
||||
@@ -201,4 +204,4 @@ và ứng dụng sẽ yêu cầu bạn chấp nhận lại trước khi bạn ti
|
||||
|
||||
- Quyền riêng tư: privacy@poli0981.dev
|
||||
- Lỗ hổng bảo mật: xem [SECURITY.md](../../../SECURITY.md)
|
||||
- Mọi vấn đề khác: [GitHub Issues](https://github.com/poli0981/jsonPrism/issues)
|
||||
- Mọi vấn đề khác: [issue trên mirror GitLab](https://gitlab.com/poli0981/jsonPrism/-/issues)
|
||||
+20
-10
@@ -6,9 +6,11 @@
|
||||
# Điều khoản dịch vụ / EULA
|
||||
|
||||
**Phiên bản**: 2.0 · **Ngày hiệu lực**: 2026-10-22 · Thay thế các điều khoản ngày 2026-05-13.
|
||||
Sửa ngày 2026-11-27: mục 2 và mục 9 ghi nơi dự án hiện được lưu trữ
|
||||
(không phải thay đổi đáng kể).
|
||||
|
||||
JSONPrism là một dự án mã nguồn mở do một người thực hiện với sự hỗ trợ
|
||||
của AI, được poli0981 (Kokone, [@poli0981](https://github.com/poli0981))
|
||||
của AI, được poli0981 (Kokone, [poli0981](https://git.poli0981.dev/poli0981))
|
||||
phát hành theo [Apache License 2.0](../../../LICENSE). Các điều khoản này
|
||||
áp dụng cho trang web, các ứng dụng desktop và Android, kho mã nguồn và
|
||||
các tài nguyên liên quan (gọi chung là "JSONPrism").
|
||||
@@ -31,16 +33,24 @@ này trong lần khởi chạy đầu tiên (trình cài đặt Windows thực h
|
||||
Bạn phải từ đủ 13 tuổi trở lên, hoặc đã đạt độ tuổi đồng ý kỹ thuật số
|
||||
(age of digital consent) tại nơi bạn sinh sống, để sử dụng JSONPrism.
|
||||
|
||||
## 2. Điều khoản dịch vụ của GitHub
|
||||
## 2. Nơi lưu trữ dự án
|
||||
|
||||
Kho mã nguồn, issue, discussion, bản phát hành (release) và pull request
|
||||
được lưu trữ trên GitHub. Việc sử dụng chúng đồng nghĩa với việc tuân thủ:
|
||||
Kho mã nguồn và ghi chú phát hành (release notes) được lưu trữ trên máy
|
||||
chủ Gitea riêng của maintainer, <https://git.poli0981.dev/poli0981/jsonPrism>,
|
||||
nơi không mở đăng ký tài khoản. Issue và merge request của mọi người được
|
||||
gửi lên bản mirror công khai trên GitLab.com,
|
||||
<https://gitlab.com/poli0981/jsonPrism>. Việc sử dụng bản mirror đồng nghĩa
|
||||
với việc tuân thủ:
|
||||
|
||||
- [Điều khoản dịch vụ của GitHub](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service) (GitHub Terms of Service)
|
||||
- [Chính sách sử dụng được chấp nhận của GitHub](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies) (GitHub Acceptable Use Policies)
|
||||
- [Tuyên bố quyền riêng tư của GitHub](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement) (GitHub Privacy Statement)
|
||||
- [Điều khoản sử dụng website của GitLab](https://handbook.gitlab.com/handbook/legal/policies/website-terms-of-use/) (GitLab Website Terms of Use)
|
||||
- [Chính sách sử dụng được chấp nhận của GitLab](https://handbook.gitlab.com/handbook/legal/acceptable-use-policy/) (GitLab Acceptable Use Policy)
|
||||
- [Tuyên bố quyền riêng tư của GitLab](https://about.gitlab.com/privacy/) (GitLab Privacy Statement)
|
||||
|
||||
Hành vi vi phạm các quy định của GitHub cũng là vi phạm các điều khoản này.
|
||||
Hành vi vi phạm các quy định của GitLab cũng là vi phạm các điều khoản này.
|
||||
Các bản tải về cho desktop và Android được phục vụ bởi Cloudflare R2 tại
|
||||
`releases.poli0981.dev` (xem [Chính sách quyền riêng tư](PRIVACY.md)). Trước
|
||||
tháng 11/2026 dự án nằm trên GitHub; tài khoản đó cùng các bản phát hành
|
||||
trên đó không còn nữa.
|
||||
|
||||
## 3. Giấy phép
|
||||
|
||||
@@ -133,9 +143,9 @@ Trang web không lưu trữ nội dung của người dùng. Nếu bạn cho r
|
||||
trong kho mã nguồn hoặc trong các ứng dụng xâm phạm bản quyền (quyền tác
|
||||
giả) của bạn, hãy gửi email tới **copyright@poli0981.dev**, nêu rõ nội dung
|
||||
liên quan, tác phẩm mà bạn cho rằng bị xâm phạm và thông tin liên hệ của
|
||||
bạn. Nội dung trên GitHub (issue, discussion, pull request) cũng chịu sự
|
||||
bạn. Nội dung trên bản mirror GitLab (issue, merge request) cũng chịu sự
|
||||
điều chỉnh của
|
||||
[quy trình DMCA của GitHub](https://docs.github.com/en/site-policy/content-removal-policies/dmca-takedown-policy).
|
||||
[chính sách DMCA của GitLab](https://handbook.gitlab.com/handbook/legal/dmca/).
|
||||
|
||||
## 10. Thay đổi
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ Hai package TypeScript được cài song song:
|
||||
Language service TS 6 trong IDE có thể lệch với TS 7 ở vài trường hợp hiếm;
|
||||
khi đó hãy tin `npm run typecheck`.
|
||||
- Đừng "sửa" alias này. Nó sẽ được gỡ khi TypeScript 7.1 có API mà
|
||||
typescript-eslint hỗ trợ; tới lúc đó Dependabot bỏ qua `typescript` ≥ 6.1.
|
||||
typescript-eslint hỗ trợ; tới lúc đó Renovate giữ `typescript` dưới 6.1.
|
||||
- Quy tắc của TS 7: không còn `baseUrl` (dùng `paths`), `types` mặc định là
|
||||
`[]` (mỗi tsconfig tự khai báo), enum và parameter property không "erasable"
|
||||
(`erasableSyntaxOnly`).
|
||||
@@ -108,8 +108,7 @@ Cách chọn NDK, ký APK và các secret của CI nằm trong
|
||||
Tailwind.
|
||||
- `npm test` — Vitest 5 với hai project: `app` (jsdom) và `worker` (node).
|
||||
- `npm run test:coverage` — chạy như `npm test` nhưng đo coverage bằng V8; báo
|
||||
cáo nằm trong `coverage/` (text, HTML và `lcov.info` — file CI gửi lên
|
||||
SonarQube Cloud).
|
||||
cáo nằm trong `coverage/` (text, HTML và `lcov.info`).
|
||||
|
||||
## Tool khác có trên máy maintainer
|
||||
|
||||
@@ -130,7 +129,7 @@ trường tương đương:
|
||||
|
||||
```bash
|
||||
# Một lần
|
||||
git clone https://github.com/poli0981/jsonPrism.git
|
||||
git clone https://git.poli0981.dev/poli0981/jsonPrism.git
|
||||
cd jsonPrism
|
||||
npm ci
|
||||
cp .dev.vars.example .dev.vars
|
||||
|
||||
Generated
+955
-286
File diff suppressed because it is too large.
Load diff
+21
-21
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"name": "jsonprism",
|
||||
"private": true,
|
||||
"version": "2.2.1",
|
||||
"version": "2.3.0",
|
||||
"type": "module",
|
||||
"description": "Disperse JSON into 12 formats (six convert back, plus JSONC → JSON) — JSONL, CSV, TSV, YAML, XML, TOML, RESX, Markdown, SQL, BSON, CBOR, MessagePack. Conversion runs locally in your browser or desktop app.",
|
||||
"author": "poli0981 <code@poli0981.dev> (https://github.com/poli0981)",
|
||||
"author": "poli0981 <code@poli0981.dev> (https://git.poli0981.dev/poli0981)",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://jsonprism.poli0981.dev",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/poli0981/jsonPrism.git"
|
||||
"url": "https://git.poli0981.dev/poli0981/jsonPrism.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/poli0981/jsonPrism/issues"
|
||||
"url": "https://gitlab.com/poli0981/jsonPrism/-/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=26.0.0"
|
||||
@@ -62,7 +62,7 @@
|
||||
"@radix-ui/react-slot": "^1.5.0",
|
||||
"@radix-ui/react-switch": "^1.4.1",
|
||||
"@radix-ui/react-tabs": "^1.2.1",
|
||||
"@tauri-apps/api": "^2.12.4",
|
||||
"@tauri-apps/api": "^2.12.5",
|
||||
"@tauri-apps/plugin-dialog": "^2.8.4",
|
||||
"@tauri-apps/plugin-fs": "^2.7.1",
|
||||
"@tauri-apps/plugin-opener": "^2.7.3",
|
||||
@@ -74,51 +74,51 @@
|
||||
"fast-xml-builder": "^1.3.2",
|
||||
"fast-xml-parser": "^5.12.1",
|
||||
"fflate": "^0.8.3",
|
||||
"i18next": "^27.1.3",
|
||||
"i18next-browser-languagedetector": "^8.3.0",
|
||||
"i18next": "^27.2.6",
|
||||
"i18next-browser-languagedetector": "^8.3.1",
|
||||
"js-yaml": "^5.5.0",
|
||||
"lucide-react": "^1.73.0",
|
||||
"lucide-react": "^1.78.0",
|
||||
"papaparse": "^5.7.1",
|
||||
"react": "^19.3.1",
|
||||
"react-dom": "^19.3.1",
|
||||
"react-dropzone": "^20.2.0",
|
||||
"react-i18next": "^18.0.2",
|
||||
"react-router": "^8.5.1",
|
||||
"react-dropzone": "^20.2.1",
|
||||
"react-i18next": "^18.0.3",
|
||||
"react-router": "^8.5.2",
|
||||
"smol-toml": "^1.9.1",
|
||||
"sonner": "^2.0.8",
|
||||
"tailwind-merge": "^3.7.0",
|
||||
"tailwind-merge": "^3.7.1",
|
||||
"zustand": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@tailwindcss/vite": "^4.3.5",
|
||||
"@tauri-apps/cli": "^2.12.4",
|
||||
"@tauri-apps/cli": "^2.12.6",
|
||||
"@testing-library/dom": "^10.4.2",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"@testing-library/jest-dom": "^8.0.0",
|
||||
"@testing-library/react": "^16.3.3",
|
||||
"@testing-library/user-event": "^14.6.12",
|
||||
"@testing-library/user-event": "^14.6.13",
|
||||
"@types/node": "^26.6.6",
|
||||
"@types/papaparse": "^5.5.2",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@typescript/native": "npm:typescript@^7.0.2",
|
||||
"@vitejs/plugin-react": "^6.3.0",
|
||||
"@vitest/coverage-v8": "^5.1.0",
|
||||
"axe-core": "^4.14.0",
|
||||
"@vitest/coverage-v8": "^5.1.1",
|
||||
"axe-core": "^4.14.1",
|
||||
"eslint": "^10.15.0",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.8",
|
||||
"globals": "^17.14.0",
|
||||
"jsdom": "^31.0.1",
|
||||
"knip": "^6.45.1",
|
||||
"knip": "^6.48.0",
|
||||
"prettier": "^3.10.1",
|
||||
"prettier-plugin-tailwindcss": "^0.8.1",
|
||||
"tailwindcss": "^4.3.5",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
||||
"typescript-eslint": "^8.72.2",
|
||||
"typescript-eslint": "^8.74.0",
|
||||
"vite": "^8.3.8",
|
||||
"vitest": "^5.1.0",
|
||||
"wrangler": "^4.162.0"
|
||||
"vitest": "^5.1.1",
|
||||
"wrangler": "^4.167.0"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
# Security contact for JSONPrism (RFC 9116). Policy: SECURITY.md.
|
||||
Contact: https://github.com/poli0981/jsonPrism/security/advisories/new
|
||||
# Report by e-mail only, never as a public issue on the GitLab mirror.
|
||||
Contact: mailto:security@poli0981.dev
|
||||
Expires: 2027-10-01T00:00:00.000Z
|
||||
Preferred-Languages: en, vi
|
||||
Canonical: https://jsonprism.poli0981.dev/.well-known/security.txt
|
||||
Policy: https://github.com/poli0981/jsonPrism/blob/main/SECURITY.md
|
||||
Policy: https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/SECURITY.md
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
# Qodana for JS/TS: Qodana Cloud project "jsonprism-js-ts".
|
||||
# Runs in native mode from .github/workflows/qodana.yml (job "js").
|
||||
# Run by .gitea/workflows/qodana.yml (job `typescript`: the ops repo's
|
||||
# reusable-qodana.yml, native mode).
|
||||
# The Tauri shell has its own configuration in src-tauri/qodana.yaml.
|
||||
version: '1.0'
|
||||
linter: qodana-js
|
||||
@@ -24,4 +25,4 @@ exclude:
|
||||
# The webhook there is a ${{ secrets.… }} reference, not a hard-coded secret.
|
||||
- name: HardcodedPasswords
|
||||
paths:
|
||||
- .github/workflows/notify-release-pipeline.yml
|
||||
- .gitea/workflows/notify-release-pipeline.yml
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["local>poli0981/renovate-config"],
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Maintenance mode: a major lands only when it is ticked on the Dependency Dashboard, with its migration in the same change. Minor and patch updates come in the preset's grouped pull request.",
|
||||
"matchUpdateTypes": ["major"],
|
||||
"dependencyDashboardApproval": true
|
||||
},
|
||||
{
|
||||
"description": "A family's majors land together: a lone eslint major once left `npm ci` broken on main for four months (eslint-plugin-react-hooks did not accept it yet).",
|
||||
"matchManagers": ["npm"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"matchPackageNames": ["eslint", "@eslint/**", "typescript-eslint", "eslint-plugin-*", "globals"],
|
||||
"groupName": "ESLint (major)",
|
||||
"groupSlug": "eslint-major"
|
||||
},
|
||||
{
|
||||
"description": "Majors of the other families that move together: i18next with react-i18next, CodeMirror with its React wrapper, Radix, Cloudflare tooling, and fast-xml-parser with fast-xml-builder (which it re-exports).",
|
||||
"matchManagers": ["npm"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"matchPackageNames": ["i18next", "react-i18next", "i18next-*"],
|
||||
"groupName": "i18next (major)",
|
||||
"groupSlug": "i18n-major"
|
||||
},
|
||||
{
|
||||
"matchManagers": ["npm"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"matchPackageNames": ["@codemirror/**", "@uiw/**", "@lezer/**"],
|
||||
"groupName": "CodeMirror (major)",
|
||||
"groupSlug": "codemirror-major"
|
||||
},
|
||||
{
|
||||
"matchManagers": ["npm"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"matchPackageNames": ["@radix-ui/**"],
|
||||
"groupName": "Radix (major)",
|
||||
"groupSlug": "radix-major"
|
||||
},
|
||||
{
|
||||
"matchManagers": ["npm"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"matchPackageNames": ["wrangler", "@cloudflare/**", "@marsidev/react-turnstile"],
|
||||
"groupName": "Cloudflare (major)",
|
||||
"groupSlug": "cloudflare-major"
|
||||
},
|
||||
{
|
||||
"matchManagers": ["npm"],
|
||||
"matchPackageNames": ["fast-xml-parser", "fast-xml-builder"],
|
||||
"groupName": "fast-xml",
|
||||
"groupSlug": "fast-xml"
|
||||
},
|
||||
{
|
||||
"description": "Tauri, its JS packages and its Rust crates in ONE pull request: the tauri CLI refuses to build when the @tauri-apps/* npm packages and the tauri crates differ in major.minor. Outside the preset's all-non-major group, so it never waits behind an unrelated bump.",
|
||||
"matchManagers": ["npm", "cargo"],
|
||||
"matchPackageNames": ["@tauri-apps/**", "tauri", "tauri-build", "tauri-plugin-*"],
|
||||
"groupName": "Tauri (JS + Rust)",
|
||||
"groupSlug": "tauri"
|
||||
},
|
||||
{
|
||||
"description": "@vitest/coverage-v8 needs vitest's exact version.",
|
||||
"matchManagers": ["npm"],
|
||||
"matchPackageNames": ["vitest", "@vitest/**"],
|
||||
"groupName": "Vitest",
|
||||
"groupSlug": "vitest"
|
||||
},
|
||||
{
|
||||
"description": "`typescript` is an alias for the TypeScript 6 API package (@typescript/typescript6) that typescript-eslint loads, and typescript-eslint 8 only accepts typescript < 6.1. The compiler itself is `@typescript/native` (TypeScript 7). CLAUDE.md: don't 'fix' the alias.",
|
||||
"matchManagers": ["npm"],
|
||||
"matchDepNames": ["typescript"],
|
||||
"allowedVersions": "<6.1.0"
|
||||
},
|
||||
{
|
||||
"description": "The TypeScript aliases' majors are taken by hand, never by a bot; @types/node follows the Node major in .nvmrc, not the newest Node.",
|
||||
"matchManagers": ["npm"],
|
||||
"matchDepNames": ["typescript", "@typescript/native", "@types/node"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"description": "Runtimes are bumped by hand, every copy at once: Node is .nvmrc (+ engines and @types/node); the Android job's JDK (setup-java in release.yml) moves with Tauri's Gradle template, and only a release build would show a break.",
|
||||
"matchDepNames": ["node", "java-jdk"],
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"description": "`runs-on` names the labels of the Gitea runner on the maintainer's PC (ubuntu-latest, ubuntu-24.04, ubuntu-22.04, windows-latest), not GitHub's images: a newer Ubuntu label does not exist there. release.yml keeps ubuntu-22.04 on purpose (the glibc floor of the Linux packages).",
|
||||
"matchDatasources": ["github-runners"],
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"description": "glib 0.18 comes with Tauri's gtk-rs 0.18 Linux stack; its fix (0.20) is a major the tree cannot take until Tauri moves (src-tauri/deny.toml, src-tauri/osv-scanner.toml).",
|
||||
"matchManagers": ["cargo"],
|
||||
"matchPackageNames": ["glib"],
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"description": "src-tauri/gen/android is Tauri's generated Gradle project: the Android Gradle Plugin, Kotlin and the wrapper move with Tauri's template, not on their own (Kotlin 2.2+ refuses the template's `kotlinOptions {}` block, and only a release build would show it). This also holds back OSV's kotlin-gradle-plugin 2.4.20 fix for CVE-2026-53914 (GHSA-r937-wjx7-w2jp, moderate): unsafe deserialization of the Kotlin build cache, which the release job never shares or restores (a fresh container, no caches). Revisit with Tauri's next Android template.",
|
||||
"matchManagers": ["gradle", "gradle-wrapper"],
|
||||
"enabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# SonarQube Cloud, CI-based analysis (.github/workflows/ci.yml, job "sonar").
|
||||
# Automatic Analysis must stay off in the project settings, or the CI scan fails.
|
||||
sonar.organization=poli0981
|
||||
sonar.projectKey=poli0981_jsonPrism
|
||||
sonar.projectName=JSONPrism
|
||||
sonar.sourceEncoding=UTF-8
|
||||
|
||||
# The Android project under src-tauri/gen is Tauri scaffolding; only the files
|
||||
# we maintain (manifest, Kotlin entry point) are analysed, not its Gradle setup.
|
||||
sonar.sources=src,worker,src-tauri/src,src-tauri/gen/android/app/src/main,.github/workflows,vite.config.ts,vitest.config.ts
|
||||
sonar.tests=src,worker
|
||||
sonar.test.inclusions=**/__tests__/**,**/*.test.ts,**/*.test.tsx,src/test/**
|
||||
sonar.exclusions=**/__tests__/**,**/*.test.ts,**/*.test.tsx,src/test/**,src/components/ui/**,**/*.d.ts,src-tauri/gen/android/app/src/main/res/**
|
||||
|
||||
# Coverage comes from Vitest (npm run test:coverage). Rust, Android and
|
||||
# workflow files have no JS coverage to report.
|
||||
sonar.javascript.lcov.reportPaths=coverage/lcov.info
|
||||
sonar.coverage.exclusions=src/main.tsx,src/i18n/locales/**,src-tauri/**,.github/**,vite.config.ts,vitest.config.ts
|
||||
sonar.cpd.exclusions=src/i18n/locales/**
|
||||
|
||||
# Report the Quality Gate without blocking CI until coverage settles.
|
||||
sonar.qualitygate.wait=false
|
||||
Generated
+126
-62
@@ -43,9 +43,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.104"
|
||||
version = "1.0.105"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
||||
checksum = "2cb931c189b85683d69a5cfad41d4d418671e1ac413dd209f3f2fc31e3cfd902"
|
||||
|
||||
[[package]]
|
||||
name = "async-broadcast"
|
||||
@@ -279,6 +279,15 @@ dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
|
||||
dependencies = [
|
||||
"hybrid-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block2"
|
||||
version = "0.6.2"
|
||||
@@ -351,9 +360,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.12.1"
|
||||
version = "1.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
||||
checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@@ -428,9 +437,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.11.2"
|
||||
version = "1.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45"
|
||||
checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"shlex",
|
||||
@@ -501,10 +510,16 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cookie"
|
||||
version = "0.18.2"
|
||||
name = "const-oid"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87"
|
||||
checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a"
|
||||
|
||||
[[package]]
|
||||
name = "cookie"
|
||||
version = "0.18.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d55f2d6c30eeec7d5c6f98bd4395d4abb1895629eab97ee6522d340623615f8a"
|
||||
dependencies = [
|
||||
"time",
|
||||
"version_check",
|
||||
@@ -559,6 +574,15 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.5.5"
|
||||
@@ -593,6 +617,15 @@ dependencies = [
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
|
||||
dependencies = [
|
||||
"hybrid-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cssparser"
|
||||
version = "0.37.0"
|
||||
@@ -719,8 +752,19 @@ version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
"block-buffer 0.10.4",
|
||||
"crypto-common 0.1.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
|
||||
dependencies = [
|
||||
"block-buffer 0.12.1",
|
||||
"const-oid",
|
||||
"crypto-common 0.2.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1033,9 +1077,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.2.2"
|
||||
version = "1.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
|
||||
checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
]
|
||||
@@ -1412,9 +1456,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.17.1"
|
||||
version = "0.17.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
||||
checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
@@ -1501,10 +1545,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "1.12.0"
|
||||
name = "hybrid-array"
|
||||
version = "0.4.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c"
|
||||
checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
|
||||
dependencies = [
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "229c6ff5584df4c6becbfe00567128bac768c8cd32ebc8a8366bd81ed072e8f3"
|
||||
dependencies = [
|
||||
"atomic-waker",
|
||||
"bytes",
|
||||
@@ -1705,7 +1758,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.17.1",
|
||||
"hashbrown 0.17.2",
|
||||
"serde",
|
||||
"serde_core",
|
||||
]
|
||||
@@ -1894,7 +1947,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jsonprism"
|
||||
version = "2.2.1"
|
||||
version = "2.3.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -2583,9 +2636,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.17"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
||||
checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752"
|
||||
|
||||
[[package]]
|
||||
name = "piper"
|
||||
@@ -2606,9 +2659,9 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
|
||||
|
||||
[[package]]
|
||||
name = "plist"
|
||||
version = "1.10.3"
|
||||
version = "1.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "327a4cb2ad49dc48adfdc9da89e22c64d488b508c67a044d71ba729e4521a285"
|
||||
checksum = "d86a77b7d9cdebd9643c180c158748db7d894b24a3935ed4b5843e698ae086eb"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"indexmap 2.14.2",
|
||||
@@ -2819,9 +2872,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.13.1"
|
||||
version = "1.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
|
||||
checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
@@ -2831,9 +2884,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.18"
|
||||
version = "0.4.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
|
||||
checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
@@ -2842,9 +2895,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.11"
|
||||
version = "0.8.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
||||
checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6"
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
@@ -3227,8 +3280,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest",
|
||||
"cpufeatures 0.2.17",
|
||||
"digest 0.10.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures 0.3.1",
|
||||
"digest 0.11.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3267,9 +3331,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.16.5"
|
||||
version = "1.16.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46"
|
||||
checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59"
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
@@ -3473,9 +3537,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tao"
|
||||
version = "0.37.2"
|
||||
version = "0.37.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5777b06fe6435126ae8d816eba269e050e1e10d302cf5461e9c49eccabc3548"
|
||||
checksum = "02ca9c0ce2a2fd70dc4ef4449ca5e8d30e6fa0db111cd8008594602a06a68371"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"block2",
|
||||
@@ -3530,9 +3594,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.12.5"
|
||||
version = "2.12.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fb0244332cfb9cee7e2a568bf5da29a36ed8fdbd717f6f47a66b6b7b358c072"
|
||||
checksum = "30fbfbb9dc9a2697b0e96d909ddc295fb18d2d82a58ed542ab8d9eba2edbe6da"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -3581,9 +3645,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "2.7.4"
|
||||
version = "2.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adddb0e648752aaac5da9c3c3c6a68e1e87cab55e3b757b18a9441ef8c3ac614"
|
||||
checksum = "73d80784e874fa117b9b00a6680cf2f9b8a51bbd14406bea980cf8f328b00646"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
@@ -3604,9 +3668,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "2.7.4"
|
||||
version = "2.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb37631cf71dab5e8ab55e1bdd701e18a52653d90b78e71d0e5598b1e0a61316"
|
||||
checksum = "c5dc6caab4da5646f57648f39b794bae118f0dd4a4305eeb8c892966171f4852"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"brotli",
|
||||
@@ -3619,7 +3683,7 @@ dependencies = [
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"sha2 0.11.1",
|
||||
"syn 2.0.119",
|
||||
"tauri-utils",
|
||||
"thiserror 2.0.21",
|
||||
@@ -3631,9 +3695,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "2.7.4"
|
||||
version = "2.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0cc38db58854c10fb5f91a887ed8bf82d3239bb92b5d8db86eda09e96d9963d1"
|
||||
checksum = "2831c5da8603a96b1efc0b650c2cb6decc69b6cda257d815fe70c7f5be53818e"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
@@ -3645,9 +3709,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin"
|
||||
version = "2.7.2"
|
||||
version = "2.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67fb21a77e8f94e8beb3325e583102488659365af0a3948b7ea244c5b779c291"
|
||||
checksum = "6c18076d9b04211cb4899387aab97497e8edd0d02cd21710623afcdde27145d1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"glob",
|
||||
@@ -3741,9 +3805,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.12.2"
|
||||
version = "2.12.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c55766d99cea69055904d1735b93c2049302b2e09effd462120deb5581d78e9"
|
||||
checksum = "60c2b14bd5265b63993cdc34ad526fb836e0fd0cf64a4634a895db0784844d5e"
|
||||
dependencies = [
|
||||
"cookie",
|
||||
"dpi",
|
||||
@@ -3766,9 +3830,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "2.12.3"
|
||||
version = "2.12.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1aa9d8b7a120f879f44fdc1053f7b7dbf416bf0bbc6a72b714dec46b782b52f"
|
||||
checksum = "b8c14a025255cc9816d401635035075b09b6cc9973b7b8fd7b8fcb8753f30f92"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
@@ -3791,9 +3855,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "2.10.2"
|
||||
version = "2.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "362ab21cd4cc713f2a02b1a9b5688198b1541cfb6907c4281e9190e0f0ef4aa3"
|
||||
checksum = "28d1d33d4453c5df0bf1672dbc7ada69d8ed74f56a4316d964a4aa73d4ecd3ad"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"brotli",
|
||||
@@ -4210,9 +4274,9 @@ checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "2.5.8"
|
||||
version = "2.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
|
||||
checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"idna",
|
||||
@@ -4250,9 +4314,9 @@ checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.29.2"
|
||||
version = "1.29.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bed99139f7dac9b5cfe5f17be4d66dc7079a34dee1d74bcc77217119240e267c"
|
||||
checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64"
|
||||
dependencies = [
|
||||
"getrandom 0.4.3",
|
||||
"js-sys",
|
||||
@@ -4294,9 +4358,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.5.0"
|
||||
version = "2.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
||||
checksum = "b42e295b7452c4604982280d8586001fcad9b8b201cac67bca9771e7a7475403"
|
||||
dependencies = [
|
||||
"same-file",
|
||||
"winapi-util",
|
||||
@@ -4826,7 +4890,7 @@ dependencies = [
|
||||
"objc2-web-kit",
|
||||
"percent-encoding",
|
||||
"raw-window-handle",
|
||||
"sha2",
|
||||
"sha2 0.10.9",
|
||||
"soup3",
|
||||
"tao-macros",
|
||||
"thiserror 2.0.21",
|
||||
@@ -4947,9 +5011,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zcheapstr"
|
||||
version = "1.2.0"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "939f186d9ecebe044315a5cb6d6f78568bbc21152adc954d5a0c2f58bdbc9920"
|
||||
checksum = "2da34e7164b75d803c3197b86e6cf61b874106fbd472c5082575a8bc5fbd0907"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[package]
|
||||
name = "jsonprism"
|
||||
version = "2.2.1"
|
||||
version = "2.3.0"
|
||||
description = "Disperse JSON into many formats."
|
||||
authors = ["poli0981 <code@poli0981.dev>"]
|
||||
license = "Apache-2.0"
|
||||
repository = "https://github.com/poli0981/jsonPrism"
|
||||
repository = "https://git.poli0981.dev/poli0981/jsonPrism"
|
||||
homepage = "https://jsonprism.poli0981.dev"
|
||||
edition = "2021"
|
||||
rust-version = "1.90"
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# cargo-deny configuration for the Tauri shell. Run by
|
||||
# .gitea/workflows/security.yml through the ops repo's security.yml (job
|
||||
# `rust`: `cargo deny --all-features check`), on every push and pull request
|
||||
# and weekly for new RustSec advisories.
|
||||
|
||||
[graph]
|
||||
all-features = false
|
||||
|
||||
[advisories]
|
||||
# Unmaintained crates only fail the check when this crate depends on them
|
||||
# directly. The transitive ones today (e.g. proc-macro-error, RUSTSEC-2024-0370,
|
||||
# via tauri's gtk-rs 0.18 Linux stack) have no safe upgrade until tauri moves
|
||||
# on, and would otherwise keep this job permanently red. Vulnerabilities
|
||||
# always fail, whatever the depth.
|
||||
unmaintained = "workspace"
|
||||
# Transitive unsound / unmaintained advisories with no fix yet (glib 0.18, the
|
||||
# zbus crates, chrono, all under Tauri's Linux stack) stay out of this check
|
||||
# by the scope above; osv-scanner, which reports them, lists each with its
|
||||
# reason and an expiry date in src-tauri/osv-scanner.toml.
|
||||
|
||||
[licenses]
|
||||
confidence-threshold = 0.9
|
||||
# Permissive licenses, plus MPL-2.0 (file-level copyleft; used unmodified).
|
||||
allow = [
|
||||
"MIT",
|
||||
"Apache-2.0",
|
||||
"Apache-2.0 WITH LLVM-exception",
|
||||
"BSD-3-Clause",
|
||||
"Zlib",
|
||||
"Unicode-3.0",
|
||||
"MPL-2.0",
|
||||
]
|
||||
|
||||
[sources]
|
||||
unknown-registry = "deny"
|
||||
unknown-git = "deny"
|
||||
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
|
||||
@@ -6,12 +6,12 @@
|
||||
By installing and using JSONPrism, you agree to the terms below.\par
|
||||
\par
|
||||
JSONPrism is free, open-source software licensed under the Apache License 2.0:\par
|
||||
https://github.com/poli0981/jsonPrism/blob/v2.2.1/LICENSE\par
|
||||
https://git.poli0981.dev/poli0981/jsonPrism/src/tag/v2.3.0/LICENSE\par
|
||||
\par
|
||||
Your use is also governed by the following documents (version 2.0, effective 2026-10-22):\par
|
||||
\bullet\tab Terms of Service (EULA): https://github.com/poli0981/jsonPrism/blob/v2.2.1/TERMS.md\par
|
||||
\bullet\tab Privacy Policy: https://github.com/poli0981/jsonPrism/blob/v2.2.1/PRIVACY.md\par
|
||||
\bullet\tab Disclaimer: https://github.com/poli0981/jsonPrism/blob/v2.2.1/DISCLAIMER.md\par
|
||||
\bullet\tab Terms of Service (EULA): https://git.poli0981.dev/poli0981/jsonPrism/src/tag/v2.3.0/TERMS.md\par
|
||||
\bullet\tab Privacy Policy: https://git.poli0981.dev/poli0981/jsonPrism/src/tag/v2.3.0/PRIVACY.md\par
|
||||
\bullet\tab Disclaimer: https://git.poli0981.dev/poli0981/jsonPrism/src/tag/v2.3.0/DISCLAIMER.md\par
|
||||
\par
|
||||
JSONPrism is provided \ldblquote as is\rdblquote , without warranty of any kind. The desktop app converts everything on your device and makes no network requests of its own.\par
|
||||
\par
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# OSV-Scanner exceptions for Cargo.lock (security.yml → the ops repo's
|
||||
# security.yml, `deps` job): the scanner reads this file because it sits next
|
||||
# to the lockfile.
|
||||
#
|
||||
# Only advisories that NO release of our dependency chain fixes yet: a fixed
|
||||
# one is taken (Cargo.lock), not listed here. Every entry expires, so the
|
||||
# weekly scan turns red again and someone looks. cargo-deny doesn't need them
|
||||
# (deny.toml scopes unmaintained advisories to direct dependencies). Reviewed
|
||||
# 2026-11-27 with Tauri 2.12 (the same Linux stack as youtube-generator and the
|
||||
# two catalog apps).
|
||||
|
||||
[[IgnoredVulns]]
|
||||
id = "GHSA-wrw7-89jp-8q8g"
|
||||
effectiveUntil = 2027-03-01
|
||||
reason = "glib 0.18 VariantStrIter unsoundness. Linux only, via gtk 0.18 under tao/wry/webkit2gtk; the shell never iterates GVariant strings. Fixed in glib 0.20, which Tauri 2's Linux stack does not use yet."
|
||||
|
||||
[[IgnoredVulns]]
|
||||
id = "RUSTSEC-2024-0370"
|
||||
effectiveUntil = 2027-03-01
|
||||
reason = "proc-macro-error is unmaintained. Build-time only (a proc-macro of the gtk 0.18 macros); nothing of it ships."
|
||||
|
||||
[[IgnoredVulns]]
|
||||
id = "RUSTSEC-2026-0370"
|
||||
effectiveUntil = 2027-03-01
|
||||
reason = "zvariant (zbus, Linux D-Bus via Tauri's plugins) is unmaintained: no release of the dependants moves off it yet."
|
||||
|
||||
[[IgnoredVulns]]
|
||||
id = "RUSTSEC-2026-0371"
|
||||
effectiveUntil = 2027-03-01
|
||||
reason = "zbus_names: as zvariant."
|
||||
|
||||
[[IgnoredVulns]]
|
||||
id = "RUSTSEC-2026-0372"
|
||||
effectiveUntil = 2027-03-01
|
||||
reason = "zvariant_derive: as zvariant; a derive macro, build-time."
|
||||
|
||||
[[IgnoredVulns]]
|
||||
id = "RUSTSEC-2026-0543"
|
||||
effectiveUntil = 2027-03-01
|
||||
reason = "chrono is unmaintained (informational, no fixed release). Pulled in by Tauri's dependencies; no unsound API reported."
|
||||
+32
-10
@@ -1,22 +1,35 @@
|
||||
# Qodana for Rust (Early Access): Qodana Cloud project "jsonprism-rust".
|
||||
# Runs in Docker from .github/workflows/qodana.yml (job "rust"), with this
|
||||
# Run by .gitea/workflows/qodana.yml (job `rust`: the ops repo's
|
||||
# reusable-qodana.yml, Docker Desktop on the maintainer's PC), with this
|
||||
# folder as the project directory and the repository root mounted, so
|
||||
# tauri::generate_context!() can read ../dist.
|
||||
version: '1.0'
|
||||
linter: qodana-rust
|
||||
|
||||
# The image ships Rust but no C toolchain or GTK/WebKit headers, so build
|
||||
# scripts and proc macros can't compile ("linker `cc` not found") and the
|
||||
# analysis is incomplete. Install what the CI `rust` job installs. This needs
|
||||
# the container to run as root (--user root in the workflow).
|
||||
bootstrap: >-
|
||||
apt-get update -qq &&
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends
|
||||
build-essential pkg-config libssl-dev libgtk-3-dev libwebkit2gtk-4.1-dev
|
||||
|
||||
profile:
|
||||
name: qodana.recommended
|
||||
|
||||
# The linter evaluates build scripts and expands macros with `cargo check`,
|
||||
# and its image has neither a C toolchain nor the GTK/WebKit headers Tauri
|
||||
# links against ("linker `cc` not found"), so install what the CI `rust` job
|
||||
# installs. Needs root in the container: the workflow passes `-u root`.
|
||||
#
|
||||
# The image is a Docker Hardened Image: its libraries are installed as
|
||||
# `<v>+dhi0`, which sorts above the `<v>+deb13u0+dhi0` its own repository
|
||||
# (dhi.io) ships, so every -dev package reads as a downgrade and apt stops
|
||||
# ("held broken packages"). Pinning dhi.io and allowing downgrades lets the
|
||||
# install through (found on free-steam-games-list, ops migration notes).
|
||||
bootstrap: |
|
||||
printf 'Package: *\nPin: origin dhi.io\nPin-Priority: 1001\n' > /etc/apt/preferences.d/dhi
|
||||
apt-get update -qq
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --allow-downgrades --no-install-recommends build-essential pkg-config libssl-dev libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
|
||||
|
||||
# Opening the project (crates, build scripts, macro expansion) takes longer
|
||||
# than the linter's default 10 minutes in Docker Desktop on the runner PC on a
|
||||
# cold cache ("failed to configure the project: timeout reached").
|
||||
properties:
|
||||
qd.rust.configuration.timeout.minutes: '25'
|
||||
|
||||
exclude:
|
||||
- name: All
|
||||
paths:
|
||||
@@ -31,3 +44,12 @@ exclude:
|
||||
- name: CargoUnusedDependency
|
||||
paths:
|
||||
- Cargo.toml
|
||||
# The linter's own type and borrow checker, which re-implement rustc's.
|
||||
# rustc is the checker of record: ci.yml builds the crate and runs clippy
|
||||
# with -D warnings. The 2026.3 Early Access linter reports errors rustc does
|
||||
# not have (youtube-generator's first run on Gitea found 9, all false), plus
|
||||
# the unresolved paths of what tauri::generate_context!() and the
|
||||
# #[tauri::command] macros expand to.
|
||||
- name: RsTypeCheck
|
||||
- name: RsBorrowChecker
|
||||
- name: RsUnresolvedPath
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
"android": {
|
||||
"minSdkVersion": 31,
|
||||
"versionCode": 20201
|
||||
"versionCode": 20300
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
|
||||
@@ -52,11 +52,3 @@ export function YoutubeIcon({ className }: IconProps) {
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function GithubIcon({ className }: IconProps) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden>
|
||||
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ describe('ConsentGate', () => {
|
||||
// Test builds have no commit hash, so links fall back to `main`.
|
||||
expect(link).toHaveAttribute(
|
||||
'href',
|
||||
`https://github.com/poli0981/jsonPrism/blob/main/${file}`,
|
||||
`https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/${file}`,
|
||||
);
|
||||
expect(link).toHaveAttribute('target', '_blank');
|
||||
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
|
||||
|
||||
@@ -3,7 +3,6 @@ import { render } from '@testing-library/react';
|
||||
import {
|
||||
BlueskyIcon,
|
||||
DiscordIcon,
|
||||
GithubIcon,
|
||||
MastodonIcon,
|
||||
TelegramIcon,
|
||||
XIcon,
|
||||
@@ -13,7 +12,6 @@ import {
|
||||
const ICONS = {
|
||||
BlueskyIcon,
|
||||
DiscordIcon,
|
||||
GithubIcon,
|
||||
MastodonIcon,
|
||||
TelegramIcon,
|
||||
XIcon,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { BlueskyIcon, DiscordIcon, XIcon } from '@/components/common/SocialIcons';
|
||||
import { AUTHOR_URL } from '@/lib/links';
|
||||
|
||||
export function Footer() {
|
||||
const { t } = useTranslation();
|
||||
@@ -29,7 +30,7 @@ export function Footer() {
|
||||
<div className="flex items-center gap-1.5">
|
||||
<span>{t('footer.built_by')}</span>
|
||||
<a
|
||||
href="https://github.com/poli0981"
|
||||
href={AUTHOR_URL}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="hover:text-foreground underline-offset-4 hover:underline"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { Link, NavLink } from 'react-router';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { GithubIcon } from '@/components/common/SocialIcons';
|
||||
import { GitBranch } from 'lucide-react';
|
||||
import { LanguageSwitcher } from '@/components/common/LanguageSwitcher';
|
||||
import { REPO_URL } from '@/lib/links';
|
||||
import { cn } from '@/lib/utils';
|
||||
@@ -38,9 +38,9 @@ export function Header() {
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="text-muted-foreground hover:bg-muted hover:text-foreground hidden h-9 w-9 items-center justify-center rounded-md transition sm:inline-flex"
|
||||
aria-label={t('nav.github')}
|
||||
aria-label={t('nav.source')}
|
||||
>
|
||||
<GithubIcon className="h-4 w-4" />
|
||||
<GitBranch className="h-4 w-4" aria-hidden />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('Footer', () => {
|
||||
expect(screen.getByText('Built by')).toBeInTheDocument();
|
||||
expect(screen.getByRole('link', { name: 'poli0981 (Kokone)' })).toHaveAttribute(
|
||||
'href',
|
||||
'https://github.com/poli0981',
|
||||
'https://git.poli0981.dev/poli0981',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -52,12 +52,12 @@ describe('Header', () => {
|
||||
expect(convert).not.toHaveAttribute('aria-current');
|
||||
});
|
||||
|
||||
it('opens the GitHub repository in a new tab', () => {
|
||||
it('opens the source repository in a new tab', () => {
|
||||
renderHeader();
|
||||
const github = screen.getByRole('link', { name: 'GitHub' });
|
||||
expect(github).toHaveAttribute('href', REPO_URL);
|
||||
expect(github).toHaveAttribute('target', '_blank');
|
||||
expect(github).toHaveAttribute('rel', 'noreferrer');
|
||||
const source = screen.getByRole('link', { name: 'Source code' });
|
||||
expect(source).toHaveAttribute('href', REPO_URL);
|
||||
expect(source).toHaveAttribute('target', '_blank');
|
||||
expect(source).toHaveAttribute('rel', 'noreferrer');
|
||||
});
|
||||
|
||||
it('hosts the language switcher and appearance menu', () => {
|
||||
|
||||
@@ -67,11 +67,11 @@ describe('useExternalLinkInterceptor', () => {
|
||||
enterTauri();
|
||||
renderHook(() => useExternalLinkInterceptor());
|
||||
|
||||
click(link('https://github.com/poli0981/jsonPrism'));
|
||||
click(link('https://git.poli0981.dev/poli0981/jsonPrism'));
|
||||
|
||||
expect(lastDefaultPrevented).toBe(true);
|
||||
await vi.waitFor(() =>
|
||||
expect(opener.openUrl).toHaveBeenCalledWith('https://github.com/poli0981/jsonPrism'),
|
||||
expect(opener.openUrl).toHaveBeenCalledWith('https://git.poli0981.dev/poli0981/jsonPrism'),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"nav": {
|
||||
"home": "Convert",
|
||||
"about": "About",
|
||||
"github": "GitHub",
|
||||
"source": "Source code",
|
||||
"label": "Main",
|
||||
"home_brand": "JSONPrism home",
|
||||
"skip_to_content": "Skip to content"
|
||||
@@ -310,12 +310,11 @@
|
||||
"title": "About JSONPrism",
|
||||
"lead": "A refracting tool for developers.",
|
||||
"p1": "JSONPrism takes a single JSON input and disperses it into many target formats — like white light through a prism — and parses six of them back, plus JSONC (JSON with comments) into plain JSON. Conversion runs entirely on your device, so the data you paste or drop never leaves it.",
|
||||
"p2": "Built with React 19, TypeScript 7, Vite 8, Tailwind CSS v4 and shadcn/ui. The web version is served by Cloudflare Workers; the desktop and Android apps are built with Tauri 2. Source on GitHub.",
|
||||
"p2": "Built with React 19, TypeScript 7, Vite 8, Tailwind CSS v4 and shadcn/ui. The web version is served by Cloudflare Workers; the desktop and Android apps are built with Tauri 2. The source lives on git.poli0981.dev, mirrored on GitLab.",
|
||||
"version": "Version {{version}}",
|
||||
"donate": {
|
||||
"title": "Support the project",
|
||||
"lead": "JSONPrism is free and open-source. If it saved you time, consider sponsoring the maintainer.",
|
||||
"github": "GitHub Sponsors",
|
||||
"ko_fi": "Ko-fi",
|
||||
"buy_me_a_coffee": "Buy Me a Coffee",
|
||||
"patreon": "Patreon",
|
||||
@@ -359,7 +358,6 @@
|
||||
"title": "Links",
|
||||
"repo": "Source code",
|
||||
"issues": "Report a bug",
|
||||
"discussions": "Discussions",
|
||||
"demo": "Web app",
|
||||
"license": "License (Apache 2.0)",
|
||||
"releases": "Releases & downloads",
|
||||
@@ -379,7 +377,7 @@
|
||||
},
|
||||
"contact": {
|
||||
"title": "Contact",
|
||||
"lead": "For bugs and feature ideas, GitHub Issues is fastest. For private matters, write to:",
|
||||
"lead": "For bugs, an issue on the GitLab mirror is fastest. For private matters, write to:",
|
||||
"code": "Project & conduct",
|
||||
"security": "Security reports",
|
||||
"privacy": "Privacy requests",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"nav": {
|
||||
"home": "変換",
|
||||
"about": "概要",
|
||||
"github": "GitHub",
|
||||
"source": "ソースコード",
|
||||
"label": "メイン",
|
||||
"home_brand": "JSONPrism ホーム",
|
||||
"skip_to_content": "本文へスキップ"
|
||||
@@ -277,12 +277,11 @@
|
||||
"title": "JSONPrism について",
|
||||
"lead": "開発者のための分光ツール。",
|
||||
"p1": "JSONPrism はひとつの JSON 入力を、プリズムを通る白色光のように多くの形式へ分光し、そのうち 6 形式は JSON に戻すこともできます。JSONC(コメント付き JSON)も通常の JSON に変換できます。変換はすべて端末上で行われるため、貼り付けたりドロップしたデータが外部に出ることはありません。",
|
||||
"p2": "React 19、TypeScript 7、Vite 8、Tailwind CSS v4、shadcn/ui で構築。Web 版は Cloudflare Workers で配信され、デスクトップ版と Android 版は Tauri 2 で構築されています。ソースは GitHub にあります。",
|
||||
"p2": "React 19、TypeScript 7、Vite 8、Tailwind CSS v4、shadcn/ui で構築。Web 版は Cloudflare Workers で配信され、デスクトップ版と Android 版は Tauri 2 で構築されています。ソースは git.poli0981.dev にあり、GitLab にミラーがあります。",
|
||||
"version": "バージョン {{version}}",
|
||||
"donate": {
|
||||
"title": "プロジェクトを支援",
|
||||
"lead": "JSONPrism は無料のオープンソースです。役に立った場合はメンテナーをスポンサーすることをご検討ください。",
|
||||
"github": "GitHub Sponsors",
|
||||
"ko_fi": "Ko-fi",
|
||||
"buy_me_a_coffee": "Buy Me a Coffee",
|
||||
"patreon": "Patreon",
|
||||
@@ -326,7 +325,6 @@
|
||||
"title": "リンク",
|
||||
"repo": "ソースコード",
|
||||
"issues": "バグ報告",
|
||||
"discussions": "ディスカッション",
|
||||
"demo": "Web アプリ",
|
||||
"license": "ライセンス (Apache 2.0)",
|
||||
"releases": "リリースとダウンロード",
|
||||
@@ -346,7 +344,7 @@
|
||||
},
|
||||
"contact": {
|
||||
"title": "連絡先",
|
||||
"lead": "バグや機能の提案は GitHub Issues が最も早く対応できます。非公開の用件は次の宛先へ:",
|
||||
"lead": "バグ報告は GitLab ミラーの Issue が最も早く対応できます。非公開の用件は次の宛先へ:",
|
||||
"code": "プロジェクト・行動規範",
|
||||
"security": "セキュリティ報告",
|
||||
"privacy": "プライバシーに関する依頼",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"nav": {
|
||||
"home": "Chuyển đổi",
|
||||
"about": "Giới thiệu",
|
||||
"github": "GitHub",
|
||||
"source": "Mã nguồn",
|
||||
"label": "Chính",
|
||||
"home_brand": "Trang chủ JSONPrism",
|
||||
"skip_to_content": "Bỏ qua, tới nội dung chính"
|
||||
@@ -310,12 +310,11 @@
|
||||
"title": "Về JSONPrism",
|
||||
"lead": "Một công cụ tán sắc cho developer.",
|
||||
"p1": "JSONPrism nhận một đầu vào JSON và tán nó ra nhiều định dạng đích — như ánh sáng trắng đi qua lăng kính — và đọc ngược được sáu trong số đó, cùng với JSONC (JSON có comment) thành JSON thuần. Mọi chuyển đổi chạy hoàn toàn trên thiết bị của bạn, nên dữ liệu bạn dán hoặc thả vào không bao giờ rời khỏi máy.",
|
||||
"p2": "Xây dựng với React 19, TypeScript 7, Vite 8, Tailwind CSS v4 và shadcn/ui. Bản web chạy trên Cloudflare Workers; ứng dụng desktop và Android được xây dựng bằng Tauri 2. Mã nguồn trên GitHub.",
|
||||
"p2": "Xây dựng với React 19, TypeScript 7, Vite 8, Tailwind CSS v4 và shadcn/ui. Bản web chạy trên Cloudflare Workers; ứng dụng desktop và Android được xây dựng bằng Tauri 2. Mã nguồn nằm trên git.poli0981.dev, có bản mirror trên GitLab.",
|
||||
"version": "Phiên bản {{version}}",
|
||||
"donate": {
|
||||
"title": "Ủng hộ project",
|
||||
"lead": "JSONPrism miễn phí và open-source. Nếu nó giúp ích cho bạn, hãy cân nhắc tài trợ maintainer.",
|
||||
"github": "GitHub Sponsors",
|
||||
"ko_fi": "Ko-fi",
|
||||
"buy_me_a_coffee": "Buy Me a Coffee",
|
||||
"patreon": "Patreon",
|
||||
@@ -359,7 +358,6 @@
|
||||
"title": "Liên kết",
|
||||
"repo": "Mã nguồn",
|
||||
"issues": "Báo bug",
|
||||
"discussions": "Thảo luận",
|
||||
"demo": "Ứng dụng web",
|
||||
"license": "Giấy phép (Apache 2.0)",
|
||||
"releases": "Bản phát hành & tải về",
|
||||
@@ -379,7 +377,7 @@
|
||||
},
|
||||
"contact": {
|
||||
"title": "Liên hệ",
|
||||
"lead": "Với lỗi và ý tưởng tính năng, GitHub Issues là nhanh nhất. Với việc riêng tư, hãy gửi email tới:",
|
||||
"lead": "Với lỗi, mở issue trên bản mirror GitLab là nhanh nhất. Với việc riêng tư, hãy gửi email tới:",
|
||||
"code": "Dự án & quy tắc ứng xử",
|
||||
"security": "Báo cáo bảo mật",
|
||||
"privacy": "Yêu cầu về quyền riêng tư",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"nav": {
|
||||
"home": "转换",
|
||||
"about": "关于",
|
||||
"github": "GitHub",
|
||||
"source": "源代码",
|
||||
"label": "主要",
|
||||
"home_brand": "JSONPrism 首页",
|
||||
"skip_to_content": "跳到主要内容"
|
||||
@@ -277,12 +277,11 @@
|
||||
"title": "关于 JSONPrism",
|
||||
"lead": "为开发者打造的分光工具。",
|
||||
"p1": "JSONPrism 将一个 JSON 输入分解为多种目标格式——就像白光穿过棱镜——其中六种格式还能转换回 JSON,JSONC(带注释的 JSON)也能转为标准 JSON。所有转换都在你的设备上完成,你粘贴或拖入的数据绝不会离开设备。",
|
||||
"p2": "基于 React 19、TypeScript 7、Vite 8、Tailwind CSS v4 和 shadcn/ui 构建。网页版由 Cloudflare Workers 提供服务;桌面版和 Android 版使用 Tauri 2 构建。源代码托管在 GitHub。",
|
||||
"p2": "基于 React 19、TypeScript 7、Vite 8、Tailwind CSS v4 和 shadcn/ui 构建。网页版由 Cloudflare Workers 提供服务;桌面版和 Android 版使用 Tauri 2 构建。源代码托管在 git.poli0981.dev,并镜像到 GitLab。",
|
||||
"version": "版本 {{version}}",
|
||||
"donate": {
|
||||
"title": "支持本项目",
|
||||
"lead": "JSONPrism 免费且开源。如果它为你节省了时间,欢迎赞助维护者。",
|
||||
"github": "GitHub Sponsors",
|
||||
"ko_fi": "Ko-fi",
|
||||
"buy_me_a_coffee": "Buy Me a Coffee",
|
||||
"patreon": "Patreon",
|
||||
@@ -326,7 +325,6 @@
|
||||
"title": "链接",
|
||||
"repo": "源代码",
|
||||
"issues": "反馈 bug",
|
||||
"discussions": "讨论区",
|
||||
"demo": "网页版",
|
||||
"license": "许可证 (Apache 2.0)",
|
||||
"releases": "版本与下载",
|
||||
@@ -346,7 +344,7 @@
|
||||
},
|
||||
"contact": {
|
||||
"title": "联系方式",
|
||||
"lead": "报告问题或提出功能建议,GitHub Issues 最快。私人事务请发送邮件至:",
|
||||
"lead": "报告问题,在 GitLab 镜像上提交 Issue 最快。私人事务请发送邮件至:",
|
||||
"code": "项目与行为准则",
|
||||
"security": "安全报告",
|
||||
"privacy": "隐私请求",
|
||||
|
||||
@@ -84,10 +84,10 @@ describe('Turnstile client helpers', () => {
|
||||
describe('legalDocUrl', () => {
|
||||
it('pins documents to the build commit, falling back to main', () => {
|
||||
expect(legalDocUrl('PRIVACY.md', 'abc1234')).toBe(
|
||||
'https://github.com/poli0981/jsonPrism/blob/abc1234/PRIVACY.md',
|
||||
'https://git.poli0981.dev/poli0981/jsonPrism/src/commit/abc1234/PRIVACY.md',
|
||||
);
|
||||
expect(legalDocUrl('TERMS.md', 'dev')).toBe(
|
||||
'https://github.com/poli0981/jsonPrism/blob/main/TERMS.md',
|
||||
'https://git.poli0981.dev/poli0981/jsonPrism/src/branch/main/TERMS.md',
|
||||
);
|
||||
});
|
||||
});
|
||||
+11
-2
@@ -1,7 +1,14 @@
|
||||
/** Canonical external locations used across the UI. */
|
||||
|
||||
export const REPO_URL = 'https://github.com/poli0981/jsonPrism';
|
||||
/** The canonical repository (Gitea). Outsiders cannot sign up there. */
|
||||
export const REPO_URL = 'https://git.poli0981.dev/poli0981/jsonPrism';
|
||||
/** Issues and merge requests from anyone go to the public GitLab mirror. */
|
||||
export const ISSUES_URL = 'https://gitlab.com/poli0981/jsonPrism/-/issues';
|
||||
/** Desktop and Android builds: each version's files live on R2 (no directory listing). */
|
||||
export const RELEASES_URL = `${REPO_URL}/releases`;
|
||||
export const SITE_URL = 'https://jsonprism.poli0981.dev';
|
||||
/** The maintainer's profile on the forge. */
|
||||
export const AUTHOR_URL = 'https://git.poli0981.dev/poli0981';
|
||||
|
||||
/**
|
||||
* Link to a repository document *as of this build's commit*, so the terms a
|
||||
@@ -10,7 +17,9 @@ export const SITE_URL = 'https://jsonprism.poli0981.dev';
|
||||
*/
|
||||
export function legalDocUrl(file: string, commit: string = __APP_COMMIT__): string {
|
||||
const ref = /^[0-9a-f]{7,40}$/i.test(commit) ? commit : 'main';
|
||||
return `${REPO_URL}/blob/${ref}/${file}`;
|
||||
return ref === 'main'
|
||||
? `${REPO_URL}/src/branch/main/${file}`
|
||||
: `${REPO_URL}/src/commit/${ref}/${file}`;
|
||||
}
|
||||
|
||||
export const CONTACTS = {
|
||||
|
||||
+5
-7
@@ -11,7 +11,7 @@ import {
|
||||
YoutubeIcon,
|
||||
} from '@/components/common/SocialIcons';
|
||||
import { toast } from '@/components/ui/sonner';
|
||||
import { CONTACTS, REPO_URL, SITE_URL, legalDocUrl } from '@/lib/links';
|
||||
import { CONTACTS, ISSUES_URL, RELEASES_URL, REPO_URL, SITE_URL, legalDocUrl } from '@/lib/links';
|
||||
import { recentLogs } from '@/lib/logger';
|
||||
import { tauriHostInfo } from '@/lib/tauri';
|
||||
|
||||
@@ -47,13 +47,12 @@ const COMMUNITY: CommunityPlatform[] = [
|
||||
];
|
||||
|
||||
interface DonatePlatform {
|
||||
key: 'github' | 'ko_fi' | 'buy_me_a_coffee' | 'patreon' | 'paypal';
|
||||
key: 'ko_fi' | 'buy_me_a_coffee' | 'patreon' | 'paypal';
|
||||
url: string;
|
||||
}
|
||||
|
||||
// Driven by .github/FUNDING.yml — keep in sync with that file.
|
||||
// Keep in sync with the "Support" section of README.md / README.vi.md.
|
||||
const DONATE: DonatePlatform[] = [
|
||||
{ key: 'github', url: 'https://github.com/sponsors/poli0981' },
|
||||
{ key: 'ko_fi', url: 'https://ko-fi.com/skullmute' },
|
||||
{ key: 'buy_me_a_coffee', url: 'https://www.buymeacoffee.com/skullmute' },
|
||||
{ key: 'patreon', url: 'https://patreon.com/skullmute' },
|
||||
@@ -325,10 +324,9 @@ export function About() {
|
||||
<Section title={t('about.links.title')}>
|
||||
<ul className="grid grid-cols-1 gap-1 text-sm sm:grid-cols-2">
|
||||
<LinkRow href={REPO_URL} label={t('about.links.repo')} />
|
||||
<LinkRow href={`${REPO_URL}/issues`} label={t('about.links.issues')} />
|
||||
<LinkRow href={`${REPO_URL}/discussions`} label={t('about.links.discussions')} />
|
||||
<LinkRow href={ISSUES_URL} label={t('about.links.issues')} />
|
||||
<LinkRow href={SITE_URL} label={t('about.links.demo')} />
|
||||
<LinkRow href={`${REPO_URL}/releases`} label={t('about.links.releases')} />
|
||||
<LinkRow href={RELEASES_URL} label={t('about.links.releases')} />
|
||||
<LinkRow href={legalDocUrl('LICENSE')} label={t('about.links.license')} />
|
||||
<LinkRow
|
||||
href={legalDocUrl('ACCESSIBILITY.md')}
|
||||
|
||||
@@ -3,13 +3,13 @@ import { act, fireEvent, render, screen, within } from '@testing-library/react';
|
||||
import { toast } from 'sonner';
|
||||
import '@/i18n';
|
||||
import { About } from '../About';
|
||||
import { CONTACTS, REPO_URL, SITE_URL } from '@/lib/links';
|
||||
import { CONTACTS, ISSUES_URL, RELEASES_URL, REPO_URL, SITE_URL } from '@/lib/links';
|
||||
import { clearLogs, createLogger } from '@/lib/logger';
|
||||
import { tauriHostInfo } from '@/lib/tauri';
|
||||
|
||||
vi.mock('@/lib/tauri', () => ({ tauriHostInfo: vi.fn(async () => null) }));
|
||||
|
||||
const BLOB = `${REPO_URL}/blob/main`;
|
||||
const BLOB = `${REPO_URL}/src/branch/main`;
|
||||
|
||||
/** jsdom has no Clipboard API. Don't mix with userEvent.setup(), which installs its own. */
|
||||
function stubClipboard(writeText: (text: string) => Promise<void>) {
|
||||
@@ -58,7 +58,6 @@ describe('About page', () => {
|
||||
it('lists every way to support the project', () => {
|
||||
render(<About />);
|
||||
const donate = {
|
||||
'GitHub Sponsors': 'https://github.com/sponsors/poli0981',
|
||||
'Ko-fi': 'https://ko-fi.com/skullmute',
|
||||
'Buy Me a Coffee': 'https://www.buymeacoffee.com/skullmute',
|
||||
Patreon: 'https://patreon.com/skullmute',
|
||||
@@ -139,10 +138,9 @@ describe('About page', () => {
|
||||
render(<About />);
|
||||
const links = {
|
||||
'Source code': REPO_URL,
|
||||
'Report a bug': `${REPO_URL}/issues`,
|
||||
Discussions: `${REPO_URL}/discussions`,
|
||||
'Report a bug': ISSUES_URL,
|
||||
'Web app': SITE_URL,
|
||||
'Releases & downloads': `${REPO_URL}/releases`,
|
||||
'Releases & downloads': RELEASES_URL,
|
||||
'License (Apache 2.0)': `${BLOB}/LICENSE`,
|
||||
};
|
||||
for (const [name, href] of Object.entries(links)) {
|
||||
|
||||
Reference in new issue
Block a user