Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
00fd11b
feat: compress JSON with gzip before base64 encoding in share URLs
claude Mar 13, 2026
8da1020
feat: open JSON viewer in browser via redirect HTML file
claude Mar 13, 2026
426ed6f
feat: add cross-platform support and temp file cleanup for present-js…
claude Mar 13, 2026
a5ad094
chore: remove manual temp file cleanup section
claude Mar 13, 2026
cbd8f19
fix: auto-delete temp HTML files on Windows after browser opens
claude Mar 13, 2026
50d24f3
fix: exclude test files from typecheck to fix CI
claude Mar 13, 2026
b9bc48d
feat: add cross-platform temp file cleanup scripts with CI tests
claude Mar 13, 2026
211c870
refactor: move cleanup scripts into skill's scripts/ per Agent Skills…
claude Mar 13, 2026
927653c
refactor: move test scripts from skill scripts/ to tests/
claude Mar 13, 2026
354f4b3
feat: encapsulate open+cleanup into open-json scripts, simplify SKILL.md
claude Mar 13, 2026
e603754
refactor: merge open + cleanup into single present.sh/ps1 script
claude Mar 13, 2026
b71c189
fix: use Write-Output in present.ps1 so URL is capturable in pipeline
claude Mar 13, 2026
e49185c
docs: add optimization journey notes covering the full iteration path
claude Mar 13, 2026
ccb0e81
docs: rewrite optimization notes to focus on present-json skill journey
claude Mar 13, 2026
0ef99e3
refactor: remove lz-string and raw base64, unify on gzip compression
claude Mar 13, 2026
ffeae09
test: remove broken jsonAnalyzer test
claude Mar 13, 2026
201507d
ci: run Playwright tests on pull requests only
claude Mar 13, 2026
65e13b5
docs: add pre-PR local test instruction to CLAUDE.md
claude Mar 13, 2026
14ce359
fix: standardize test URLs and playwright config
claude Mar 13, 2026
965aba0
ci: migrate deployment to Cloudflare Pages and fix Playwright tests
hrhrng Mar 13, 2026
1e38ad3
ci: add Cloudflare Pages deploy job to CI workflow
hrhrng Mar 14, 2026
8480dd5
docs: add documentation site for features and present-json skill
hrhrng Mar 14, 2026
bd986ec
docs: restyle docs page to match main site design language
hrhrng Mar 14, 2026
7e8ef20
feat: add Docs link in status bar
hrhrng Mar 14, 2026
e2ea92a
docs: add documentation link to README
hrhrng Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 60 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: CI & Preview
name: CI

on:
push:
branches-ignore: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: write
contents: read
deployments: write

jobs:
build:
Expand Down Expand Up @@ -36,7 +36,56 @@ jobs:
env:
NODE_OPTIONS: "--max_old_space_size=4096"

preview:
test-scripts:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run present tests (Linux/macOS)
if: runner.os != 'Windows'
run: bash tests/test-present.sh

- name: Run present tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: ./tests/test-present.ps1

playwright:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Run Playwright tests
run: npx playwright test

- name: Upload test report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 14

deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push'
Expand All @@ -53,17 +102,14 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build for preview
run: |
BRANCH_NAME=${GITHUB_REF_NAME}
npm run build -- --base=/super-json/preview/${BRANCH_NAME}/
- name: Build
run: npm run build
env:
NODE_OPTIONS: "--max_old_space_size=4096"

- name: Deploy preview to gh-pages
uses: peaceiris/actions-gh-pages@v4
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
destination_dir: preview/${{ github.ref_name }}
keep_files: true
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=super-json --branch=${{ github.ref_name }}
38 changes: 0 additions & 38 deletions .github/workflows/cleanup-preview.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/deploy.yml

This file was deleted.

5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## deploy guidline
use playwright to test ui by snapshot.
## Deploy Guideline
- Use Playwright to test UI by snapshot.
- Before creating a PR, run `npm test` locally to ensure all Playwright tests pass.

## Project Overview

Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

**The Ultimate Multi-Layer Escaped JSON Editor - Parse, Edit, and Rebuild Complex Nested JSON with Ease! 🎯**

[**Try It Now**](https://hrhrng.github.io/super-json)
[**Try It Now**](https://superjson.org) | [**Documentation**](https://superjson.org/docs/)

[Report Bug](https://github.com/hrhrng/super-json/issues) | [Request Feature](https://github.com/hrhrng/super-json/issues)

Expand Down Expand Up @@ -75,9 +75,8 @@ Ever struggled with deeply nested, escaped JSON strings? Like this nightmare:

Share JSON instantly via URL — no server required:

- **Share Button** - One-click share with LZ-String compression (`?s=` parameter)
- **Share Button** - One-click share with gzip compression (`?c=` parameter)
- **Custom Tab Names** - Hover "Share" to name your tab before sharing (`?t=` parameter)
- **Base64url Mode** - Shell-friendly encoding without dependencies (`?r=` parameter)
- **Hero Direct Link** - Add `?h=1` to auto-open JSON Hero viewer on import

### 🤖 Claude Code Skill: `present-json`
Expand All @@ -93,20 +92,19 @@ npx skills add hrhrng/super-json
**How it works — agent generates a shareable link from any JSON:**

```bash
# Agent generates a shareable link from any JSON
encoded=$(echo -n '{"status":"ok","data":[1,2,3]}' | base64 | tr '+/' '-_' | tr -d '=\n')
echo "https://hrhrng.github.io/super-json?r=${encoded}&t=API+Response"
# Agent generates a compressed shareable link from any JSON
encoded=$(echo -n '{"status":"ok","data":[1,2,3]}' | gzip -9 | base64 | tr '+/' '-_' | tr -d '=\n')
echo "https://hrhrng.github.io/super-json?c=${encoded}&t=API+Response"

# With Hero mode for interactive visualization
echo "https://hrhrng.github.io/super-json?r=${encoded}&t=API+Response&h=1"
echo "https://hrhrng.github.io/super-json?c=${encoded}&t=API+Response&h=1"
```

**URL Parameters:**

| Param | Description | Example |
|-------|-------------|---------|
| `s` | LZ-String compressed JSON (shorter URLs) | `?s=NoIgbg9...` |
| `r` | Base64url encoded JSON (shell-friendly) | `?r=eyJrZXki...` |
| `c` | Gzip + Base64url compressed JSON | `?c=H4sIA...` |
| `t` | Custom tab name | `&t=My+Results` |
| `h` | Auto-switch to Hero mode | `&h=1` |

Expand Down
Loading
Loading