tortoise-orm-studio 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tortoise_orm_studio-1.0.0/.github/workflows/ci.yml +77 -0
- tortoise_orm_studio-1.0.0/.github/workflows/docs.yml +36 -0
- tortoise_orm_studio-1.0.0/.github/workflows/release.yml +27 -0
- tortoise_orm_studio-1.0.0/.gitignore +15 -0
- tortoise_orm_studio-1.0.0/AGENTS.md +78 -0
- tortoise_orm_studio-1.0.0/CHANGELOG.md +218 -0
- tortoise_orm_studio-1.0.0/CLAUDE.md +14 -0
- tortoise_orm_studio-1.0.0/LICENSE +13 -0
- tortoise_orm_studio-1.0.0/PKG-INFO +177 -0
- tortoise_orm_studio-1.0.0/README.md +122 -0
- tortoise_orm_studio-1.0.0/STATUS.md +448 -0
- tortoise_orm_studio-1.0.0/assets/favicon.svg +7 -0
- tortoise_orm_studio-1.0.0/docs/.nojekyll +0 -0
- tortoise_orm_studio-1.0.0/docs/404.html +12 -0
- tortoise_orm_studio-1.0.0/docs/MERMAID_SPIKE.md +53 -0
- tortoise_orm_studio-1.0.0/docs/VENDOR.md +59 -0
- tortoise_orm_studio-1.0.0/docs/app.js +400 -0
- tortoise_orm_studio-1.0.0/docs/assets/demo.gif +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/audit-dark.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/audit-light.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/drawer-dark.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/drawer-light.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/er-dark.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/er-light.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/list-dark.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/list-dark@2x.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/list-light.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/list-light@2x.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/mobile-light.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/palette-dark.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/palette-light.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/playground-dark.png +0 -0
- tortoise_orm_studio-1.0.0/docs/assets/screenshots/playground-light.png +0 -0
- tortoise_orm_studio-1.0.0/docs/favicon.svg +7 -0
- tortoise_orm_studio-1.0.0/docs/getting-started/concepts.md +38 -0
- tortoise_orm_studio-1.0.0/docs/getting-started/installation.md +68 -0
- tortoise_orm_studio-1.0.0/docs/getting-started/introduction.md +28 -0
- tortoise_orm_studio-1.0.0/docs/getting-started/quickstart.md +56 -0
- tortoise_orm_studio-1.0.0/docs/guides/accessibility.md +29 -0
- tortoise_orm_studio-1.0.0/docs/guides/ai-agents.md +42 -0
- tortoise_orm_studio-1.0.0/docs/guides/ai-filter.md +27 -0
- tortoise_orm_studio-1.0.0/docs/guides/audit-log.md +35 -0
- tortoise_orm_studio-1.0.0/docs/guides/authentication.md +38 -0
- tortoise_orm_studio-1.0.0/docs/guides/editing-data.md +36 -0
- tortoise_orm_studio-1.0.0/docs/guides/filtering-and-search.md +41 -0
- tortoise_orm_studio-1.0.0/docs/guides/frameworks.md +76 -0
- tortoise_orm_studio-1.0.0/docs/guides/localization.md +29 -0
- tortoise_orm_studio-1.0.0/docs/guides/migrations.md +13 -0
- tortoise_orm_studio-1.0.0/docs/guides/model-options.md +29 -0
- tortoise_orm_studio-1.0.0/docs/guides/other-frameworks.md +93 -0
- tortoise_orm_studio-1.0.0/docs/guides/permissions-and-scope.md +36 -0
- tortoise_orm_studio-1.0.0/docs/guides/plugins.md +58 -0
- tortoise_orm_studio-1.0.0/docs/guides/production.md +70 -0
- tortoise_orm_studio-1.0.0/docs/guides/using-the-ui.md +61 -0
- tortoise_orm_studio-1.0.0/docs/hero.js +115 -0
- tortoise_orm_studio-1.0.0/docs/index.html +143 -0
- tortoise_orm_studio-1.0.0/docs/index.md +50 -0
- tortoise_orm_studio-1.0.0/docs/llms-full.txt +1559 -0
- tortoise_orm_studio-1.0.0/docs/llms.txt +44 -0
- tortoise_orm_studio-1.0.0/docs/nav.json +193 -0
- tortoise_orm_studio-1.0.0/docs/project/architecture.md +48 -0
- tortoise_orm_studio-1.0.0/docs/project/contributing.md +57 -0
- tortoise_orm_studio-1.0.0/docs/project/faq.md +38 -0
- tortoise_orm_studio-1.0.0/docs/project/troubleshooting.md +42 -0
- tortoise_orm_studio-1.0.0/docs/reference/cli.md +24 -0
- tortoise_orm_studio-1.0.0/docs/reference/configuration.md +70 -0
- tortoise_orm_studio-1.0.0/docs/reference/custom-adapters.md +50 -0
- tortoise_orm_studio-1.0.0/docs/reference/errors.md +40 -0
- tortoise_orm_studio-1.0.0/docs/reference/http-api.md +68 -0
- tortoise_orm_studio-1.0.0/docs/reference/python-api.md +67 -0
- tortoise_orm_studio-1.0.0/docs/reference/security.md +39 -0
- tortoise_orm_studio-1.0.0/docs/reference/stability.md +29 -0
- tortoise_orm_studio-1.0.0/docs/robots.txt +2 -0
- tortoise_orm_studio-1.0.0/docs/site.css +132 -0
- tortoise_orm_studio-1.0.0/docs/theme-init.js +9 -0
- tortoise_orm_studio-1.0.0/examples/aiohttp_app.py +23 -0
- tortoise_orm_studio-1.0.0/examples/custom_adapter.py +27 -0
- tortoise_orm_studio-1.0.0/examples/dev_server.py +72 -0
- tortoise_orm_studio-1.0.0/examples/django_app.py +91 -0
- tortoise_orm_studio-1.0.0/examples/fastapi_app.py +10 -0
- tortoise_orm_studio-1.0.0/jsconfig.json +23 -0
- tortoise_orm_studio-1.0.0/pyproject.toml +103 -0
- tortoise_orm_studio-1.0.0/scripts/build_llms.py +126 -0
- tortoise_orm_studio-1.0.0/scripts/publish.py +213 -0
- tortoise_orm_studio-1.0.0/scripts/vendor_alpine.sh +11 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/__init__.py +11 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/__init__.py +1 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/aiohttp_adapter.py +31 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/asgi.py +89 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/base.py +25 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/django_adapter.py +84 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/quart_adapter.py +32 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/registry.py +39 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/adapters/sanic_adapter.py +39 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/auth.py +34 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/cli.py +41 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/__init__.py +1 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/aerich.py +86 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/ai.py +87 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/audit.py +69 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/config.py +58 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/filters.py +94 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/handler.py +249 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/http.py +55 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/i18n.py +18 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/introspect.py +197 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/manifest.py +128 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/pagination.py +59 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/permissions.py +46 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/plugins.py +214 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/ratelimit.py +32 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/scoping.py +23 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/serializers.py +61 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/core/service.py +594 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/plugins.py +8 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/ALPINE_LICENSE.txt +11 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/_types.d.ts +706 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/a11y.js +115 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/ai.js +66 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/alpine.min.js +23 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/app.css +514 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/app.js +1443 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/audit.js +171 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/copy-as.js +118 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/er-layout.js +227 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/er.js +296 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/filters.js +114 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/i18n.en.js +190 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/i18n.js +140 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/i18n.zh-CN.js +189 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/index.html +515 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/inline-edit.js +107 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/json-view.js +161 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/migrations.js +139 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/palette.js +141 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/pending.js +240 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/pickers.js +230 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/playground.js +105 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/query-history.js +84 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/shortcuts.js +145 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/state-hash.js +112 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/tabs.js +368 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/theme-init.js +33 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/theme.js +106 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/toasts.js +76 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/views.js +70 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/static/widgets.js +345 -0
- tortoise_orm_studio-1.0.0/src/tortoise_orm_studio/studio.py +51 -0
- tortoise_orm_studio-1.0.0/tests/__init__.py +1 -0
- tortoise_orm_studio-1.0.0/tests/_cli_settings.py +4 -0
- tortoise_orm_studio-1.0.0/tests/adapters/__init__.py +1 -0
- tortoise_orm_studio-1.0.0/tests/adapters/test_aiohttp.py +64 -0
- tortoise_orm_studio-1.0.0/tests/adapters/test_asgi.py +128 -0
- tortoise_orm_studio-1.0.0/tests/adapters/test_base.py +55 -0
- tortoise_orm_studio-1.0.0/tests/adapters/test_django.py +102 -0
- tortoise_orm_studio-1.0.0/tests/adapters/test_registry.py +46 -0
- tortoise_orm_studio-1.0.0/tests/adapters/test_smoke_all.py +195 -0
- tortoise_orm_studio-1.0.0/tests/conftest.py +80 -0
- tortoise_orm_studio-1.0.0/tests/db/conftest.py +43 -0
- tortoise_orm_studio-1.0.0/tests/db/test_dialects.py +70 -0
- tortoise_orm_studio-1.0.0/tests/e2e/test_ui.py +318 -0
- tortoise_orm_studio-1.0.0/tests/e2e_app.py +41 -0
- tortoise_orm_studio-1.0.0/tests/js/.gitignore +2 -0
- tortoise_orm_studio-1.0.0/tests/js/README.md +28 -0
- tortoise_orm_studio-1.0.0/tests/js/helpers/load.js +69 -0
- tortoise_orm_studio-1.0.0/tests/js/package-lock.json +841 -0
- tortoise_orm_studio-1.0.0/tests/js/package.json +19 -0
- tortoise_orm_studio-1.0.0/tests/js/test_a11y.js +111 -0
- tortoise_orm_studio-1.0.0/tests/js/test_ai.js +62 -0
- tortoise_orm_studio-1.0.0/tests/js/test_app.js +1297 -0
- tortoise_orm_studio-1.0.0/tests/js/test_audit.js +126 -0
- tortoise_orm_studio-1.0.0/tests/js/test_copy-as.js +71 -0
- tortoise_orm_studio-1.0.0/tests/js/test_er-layout.js +181 -0
- tortoise_orm_studio-1.0.0/tests/js/test_er.js +260 -0
- tortoise_orm_studio-1.0.0/tests/js/test_filters.js +204 -0
- tortoise_orm_studio-1.0.0/tests/js/test_i18n.en.js +24 -0
- tortoise_orm_studio-1.0.0/tests/js/test_i18n.js +125 -0
- tortoise_orm_studio-1.0.0/tests/js/test_i18n.zh-CN.js +24 -0
- tortoise_orm_studio-1.0.0/tests/js/test_inline-edit.js +96 -0
- tortoise_orm_studio-1.0.0/tests/js/test_json-view.js +109 -0
- tortoise_orm_studio-1.0.0/tests/js/test_migrations.js +123 -0
- tortoise_orm_studio-1.0.0/tests/js/test_palette.js +126 -0
- tortoise_orm_studio-1.0.0/tests/js/test_pending.js +229 -0
- tortoise_orm_studio-1.0.0/tests/js/test_pickers.js +219 -0
- tortoise_orm_studio-1.0.0/tests/js/test_playground.js +66 -0
- tortoise_orm_studio-1.0.0/tests/js/test_query-history.js +95 -0
- tortoise_orm_studio-1.0.0/tests/js/test_shortcuts.js +116 -0
- tortoise_orm_studio-1.0.0/tests/js/test_state-hash.js +107 -0
- tortoise_orm_studio-1.0.0/tests/js/test_tabs.js +277 -0
- tortoise_orm_studio-1.0.0/tests/js/test_theme-init.js +98 -0
- tortoise_orm_studio-1.0.0/tests/js/test_theme.js +159 -0
- tortoise_orm_studio-1.0.0/tests/js/test_toasts.js +85 -0
- tortoise_orm_studio-1.0.0/tests/js/test_views.js +124 -0
- tortoise_orm_studio-1.0.0/tests/js/test_widgets.js +368 -0
- tortoise_orm_studio-1.0.0/tests/models.py +99 -0
- tortoise_orm_studio-1.0.0/tests/test_a11y.py +44 -0
- tortoise_orm_studio-1.0.0/tests/test_aerich.py +115 -0
- tortoise_orm_studio-1.0.0/tests/test_ai.py +181 -0
- tortoise_orm_studio-1.0.0/tests/test_api_freeze.py +142 -0
- tortoise_orm_studio-1.0.0/tests/test_audit.py +191 -0
- tortoise_orm_studio-1.0.0/tests/test_auth.py +59 -0
- tortoise_orm_studio-1.0.0/tests/test_batch.py +319 -0
- tortoise_orm_studio-1.0.0/tests/test_cli.py +60 -0
- tortoise_orm_studio-1.0.0/tests/test_config.py +57 -0
- tortoise_orm_studio-1.0.0/tests/test_docs.py +130 -0
- tortoise_orm_studio-1.0.0/tests/test_encoding.py +76 -0
- tortoise_orm_studio-1.0.0/tests/test_filters.py +207 -0
- tortoise_orm_studio-1.0.0/tests/test_filters_ui.py +62 -0
- tortoise_orm_studio-1.0.0/tests/test_handler.py +409 -0
- tortoise_orm_studio-1.0.0/tests/test_http.py +107 -0
- tortoise_orm_studio-1.0.0/tests/test_i18n.py +57 -0
- tortoise_orm_studio-1.0.0/tests/test_integration.py +137 -0
- tortoise_orm_studio-1.0.0/tests/test_introspect.py +285 -0
- tortoise_orm_studio-1.0.0/tests/test_js_contract.py +115 -0
- tortoise_orm_studio-1.0.0/tests/test_js_source_contract.py +80 -0
- tortoise_orm_studio-1.0.0/tests/test_large_table.py +75 -0
- tortoise_orm_studio-1.0.0/tests/test_manifest.py +98 -0
- tortoise_orm_studio-1.0.0/tests/test_plugins.py +225 -0
- tortoise_orm_studio-1.0.0/tests/test_policy.py +219 -0
- tortoise_orm_studio-1.0.0/tests/test_responsive.py +29 -0
- tortoise_orm_studio-1.0.0/tests/test_security_hardening.py +95 -0
- tortoise_orm_studio-1.0.0/tests/test_serializers.py +94 -0
- tortoise_orm_studio-1.0.0/tests/test_service.py +622 -0
- tortoise_orm_studio-1.0.0/tests/test_static_csp.py +141 -0
- tortoise_orm_studio-1.0.0/tests/test_studio.py +77 -0
- tortoise_orm_studio-1.0.0/tests/test_theme_tokens.py +197 -0
- tortoise_orm_studio-1.0.0/tests/test_tofield.py +110 -0
- tortoise_orm_studio-1.0.0/tests/test_version.py +74 -0
- tortoise_orm_studio-1.0.0/tests/test_widgets.py +90 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
services:
|
|
7
|
+
postgres:
|
|
8
|
+
image: postgres:16-alpine
|
|
9
|
+
env: { POSTGRES_PASSWORD: pw, POSTGRES_DB: studio }
|
|
10
|
+
ports: ["5432:5432"]
|
|
11
|
+
options: >-
|
|
12
|
+
--health-cmd "pg_isready -U postgres" --health-interval 5s
|
|
13
|
+
--health-timeout 5s --health-retries 10
|
|
14
|
+
mysql:
|
|
15
|
+
image: mysql:8
|
|
16
|
+
env: { MYSQL_ROOT_PASSWORD: pw, MYSQL_DATABASE: studio }
|
|
17
|
+
ports: ["3306:3306"]
|
|
18
|
+
options: >-
|
|
19
|
+
--health-cmd "mysqladmin ping -h localhost" --health-interval 5s
|
|
20
|
+
--health-timeout 5s --health-retries 15
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with: { python-version: "${{ matrix.python }}" }
|
|
28
|
+
- uses: actions/setup-node@v4
|
|
29
|
+
with:
|
|
30
|
+
node-version: "20"
|
|
31
|
+
cache: npm
|
|
32
|
+
cache-dependency-path: tests/js/package-lock.json
|
|
33
|
+
- name: Install Python dependencies (all adapters)
|
|
34
|
+
run: pip install -e ".[dev,fastapi,starlette,litestar,aiohttp,sanic,quart,django,cli]"
|
|
35
|
+
- name: Install sanic test client and Playwright
|
|
36
|
+
run: |
|
|
37
|
+
pip install sanic-testing playwright
|
|
38
|
+
python -m playwright install --with-deps chromium firefox
|
|
39
|
+
- name: Install JS test dependencies
|
|
40
|
+
run: npm install --no-audit --no-fund
|
|
41
|
+
working-directory: tests/js
|
|
42
|
+
- name: install DB drivers
|
|
43
|
+
run: pip install asyncpg aiomysql
|
|
44
|
+
- name: ruff
|
|
45
|
+
run: ruff check src tests
|
|
46
|
+
- name: mypy
|
|
47
|
+
run: mypy
|
|
48
|
+
- name: pytest (SQLite)
|
|
49
|
+
run: pytest -q
|
|
50
|
+
- name: pytest (Postgres)
|
|
51
|
+
env: { STUDIO_TEST_DB: postgres, STUDIO_PG_PORT: "5432" }
|
|
52
|
+
run: pytest -q tests/db
|
|
53
|
+
- name: pytest (MySQL)
|
|
54
|
+
env: { STUDIO_TEST_DB: mysql, STUDIO_MYSQL_PORT: "3306" }
|
|
55
|
+
run: pytest -q tests/db
|
|
56
|
+
- name: tsc (JSDoc types)
|
|
57
|
+
run: npm run typecheck
|
|
58
|
+
working-directory: tests/js
|
|
59
|
+
- name: node tests with coverage
|
|
60
|
+
run: npm run test:coverage
|
|
61
|
+
working-directory: tests/js
|
|
62
|
+
- name: wheel build + manifest check
|
|
63
|
+
run: |
|
|
64
|
+
python -m build
|
|
65
|
+
python - <<'PY'
|
|
66
|
+
import zipfile, glob, pathlib, sys
|
|
67
|
+
from tortoise_orm_studio.core.manifest import ASSETS
|
|
68
|
+
wheel = glob.glob("dist/*.whl")[0]
|
|
69
|
+
with zipfile.ZipFile(wheel) as z:
|
|
70
|
+
names = set(z.namelist())
|
|
71
|
+
missing = [f"tortoise_orm_studio/static/{a.file}" for a in ASSETS
|
|
72
|
+
if f"tortoise_orm_studio/static/{a.file}" not in names]
|
|
73
|
+
if missing:
|
|
74
|
+
print("wheel is missing manifest assets:", missing, file=sys.stderr)
|
|
75
|
+
sys.exit(1)
|
|
76
|
+
print("wheel contains all", len(ASSETS), "manifest assets")
|
|
77
|
+
PY
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
pages: write
|
|
9
|
+
id-token: write
|
|
10
|
+
concurrency:
|
|
11
|
+
group: pages
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
jobs:
|
|
14
|
+
check:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with: { python-version: "3.11" }
|
|
20
|
+
- run: pip install -e ".[dev,fastapi]"
|
|
21
|
+
- name: Docs consistency
|
|
22
|
+
run: pytest -q tests/test_docs.py
|
|
23
|
+
deploy:
|
|
24
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
25
|
+
needs: check
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
environment:
|
|
28
|
+
name: github-pages
|
|
29
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/configure-pages@v5
|
|
33
|
+
- uses: actions/upload-pages-artifact@v3
|
|
34
|
+
with: { path: docs }
|
|
35
|
+
- id: deployment
|
|
36
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags: ["v*"]
|
|
5
|
+
jobs:
|
|
6
|
+
publish:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
environment: pypi
|
|
9
|
+
permissions:
|
|
10
|
+
id-token: write
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with: { python-version: "3.12" }
|
|
15
|
+
- name: Verify tag matches package version
|
|
16
|
+
run: |
|
|
17
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
18
|
+
version=$(python -c "import re; print(re.search(r'__version__ = \"([^\"]+)\"', open('src/tortoise_orm_studio/__init__.py').read()).group(1))")
|
|
19
|
+
if [ "$tag" != "$version" ]; then
|
|
20
|
+
echo "::error::Tag v$tag does not match __version__ $version in src/tortoise_orm_studio/__init__.py"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
echo "Version OK: $version"
|
|
24
|
+
- run: pip install build twine
|
|
25
|
+
- run: python -m build
|
|
26
|
+
- run: python -m twine check dist/*
|
|
27
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.egg-info/
|
|
3
|
+
dist/
|
|
4
|
+
.venv/
|
|
5
|
+
|
|
6
|
+
# dev server database
|
|
7
|
+
.smoke.sqlite3
|
|
8
|
+
|
|
9
|
+
# node dev dependencies for tests/js (the lockfile IS committed so CI is reproducible)
|
|
10
|
+
tests/js/node_modules/
|
|
11
|
+
|
|
12
|
+
# XERJ search index / caches (never commit)
|
|
13
|
+
.xerj/
|
|
14
|
+
.xerjignore.local
|
|
15
|
+
*.xerj-cache
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# AGENTS.md — tortoise-orm-studio
|
|
2
|
+
|
|
3
|
+
This is the canonical agent guide for this repository. `CLAUDE.md` points here.
|
|
4
|
+
|
|
5
|
+
## What the project is
|
|
6
|
+
|
|
7
|
+
A browser-based data viewer/editor for Tortoise ORM (think Prisma Studio). Unofficial; not affiliated with Tortoise ORM or Prisma. Version 1.0.0, MIT. Python 3.9+, Tortoise ORM 0.21–1.x.
|
|
8
|
+
|
|
9
|
+
## Repo layout
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
src/tortoise_orm_studio/ package
|
|
13
|
+
studio.py Studio facade (public API is frozen)
|
|
14
|
+
auth.py basic_auth, bearer_token
|
|
15
|
+
adapters/ framework glue (base, registry, asgi, aiohttp, sanic, quart, django)
|
|
16
|
+
core/ handler, service, filters, introspect, permissions, scoping,
|
|
17
|
+
plugins, pagination, audit, ai, aerich, i18n, manifest, http, config
|
|
18
|
+
static/ the CSP-safe single-page UI
|
|
19
|
+
examples/ dev_server.py and per-framework examples
|
|
20
|
+
tests/ pytest suite, tests/models.py, tests/e2e/, tests/js/
|
|
21
|
+
docs/ static docs site (plain .md + shell), separate from the app
|
|
22
|
+
docs/site/ -> retired (old generated HTML, replaced by the static shell)
|
|
23
|
+
scripts/ build_llms.py, publish.py, vendor_alpine.sh
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Run the dev server
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
python examples/dev_server.py --fresh
|
|
30
|
+
# http://127.0.0.1:8000/studio/ login: admin / change-me
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`--fresh` recreates the SQLite file; `--read-only` starts read-only; `--port` changes the port. The sample models are in `tests/models.py`.
|
|
34
|
+
|
|
35
|
+
## Tests and CI gates
|
|
36
|
+
|
|
37
|
+
From `.github/workflows/ci.yml`:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
ruff check src tests
|
|
41
|
+
mypy
|
|
42
|
+
pytest -q # SQLite + e2e
|
|
43
|
+
STUDIO_TEST_DB=postgres pytest -q tests/db
|
|
44
|
+
STUDIO_TEST_DB=mysql pytest -q tests/db
|
|
45
|
+
cd tests/js && npm run typecheck && npm run test:coverage
|
|
46
|
+
python -m build # wheel must contain every manifest asset
|
|
47
|
+
python scripts/build_llms.py --check # docs llms files current
|
|
48
|
+
pytest -q tests/test_docs.py # docs site consistency
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
CI matrix: Python 3.9–3.13, Node 20, Chromium + Firefox, Postgres 16 + MySQL 8.
|
|
52
|
+
|
|
53
|
+
## Frozen public API
|
|
54
|
+
|
|
55
|
+
The public surface is frozen in 1.0.0. `tests/test_api_freeze.py` pins exports, `Studio(...)` keywords, request/response/error shapes, plugin dataclasses, the route table, error codes and `/api/schema`. **Any breaking change requires a major version bump.** Additive response keys are fine within 1.x. `/api/v1/` is the stable prefix; `/api/` is a deprecated alias.
|
|
56
|
+
|
|
57
|
+
## CSP rules (apply code)
|
|
58
|
+
|
|
59
|
+
- No inline scripts or styles in the app. The CSP is `script-src 'self'` / `style-src 'self'`; the CSP build of Alpine disables `x-html`.
|
|
60
|
+
- Every static asset must be listed in `core/manifest.py`; the app serves only exact URLs. No path arithmetic on user input.
|
|
61
|
+
- Locale dictionaries are plain JS registered before Alpine starts; no `fetch` at runtime.
|
|
62
|
+
- Keep the WCAG A/AA work intact (labels, focus trapping, contrast, reduced motion). The axe e2e test must stay green.
|
|
63
|
+
|
|
64
|
+
## Do not weaken safe defaults
|
|
65
|
+
|
|
66
|
+
- `read_only=True` by default; writes require `read_only=False`.
|
|
67
|
+
- Localhost-only without `auth`; CSRF header required on writes.
|
|
68
|
+
- Filter whitelist, CSV-injection guard, export/batch caps stay on.
|
|
69
|
+
- Unique `cursor_secret` in production; never expose without auth.
|
|
70
|
+
- Plugins are trusted host code; a plugin write route bypasses `read_only`.
|
|
71
|
+
|
|
72
|
+
## Docs site notes
|
|
73
|
+
|
|
74
|
+
The docs site under `docs/` is separate from the app: plain Markdown + a static shell, hosted on GitHub Pages. It is never bundled into the wheel or served by the app. Add a page by adding a `.md` with `title`/`description` frontmatter and one `nav.json` entry, then run `python scripts/build_llms.py` and `pytest tests/test_docs.py`. CDN versions must be pinned with real SRI hashes and listed in `docs/VENDOR.md`.
|
|
75
|
+
|
|
76
|
+
## Style
|
|
77
|
+
|
|
78
|
+
Plain, precise, no marketing fluff. Verify claims against source before documenting them. One logical change per commit.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
- First stable release. The public API is frozen and pinned by
|
|
5
|
+
`tests/test_api_freeze.py`: package exports, `Studio(...)` keyword arguments,
|
|
6
|
+
`StudioRequest`/`StudioResponse`/`StudioError` shapes, plugin dataclasses,
|
|
7
|
+
the HTTP route table, the error-code vocabulary and the top-level
|
|
8
|
+
`/api/schema` shape. Any change to these is a breaking change requiring a
|
|
9
|
+
major version bump; `/api/v1/` is the stable prefix and `/api/` stays as a
|
|
10
|
+
deprecated alias. Additive response keys are allowed within 1.x.
|
|
11
|
+
- Final security review. Hardened plugin route paths: `|`, `^`, `$`, `\` and
|
|
12
|
+
whitespace are rejected at construction, regex groups must be balanced, and
|
|
13
|
+
the compiled pattern is wrapped under the plugin prefix and anchored with
|
|
14
|
+
`\Z`. Previously a crafted path such as `/x|/y` could match the top-level
|
|
15
|
+
path `/y`, escaping the plugin namespace. Verified auth, CSRF, CSP, model
|
|
16
|
+
allow/deny, permissions, row scope, cursor HMAC, export caps, CSV-injection
|
|
17
|
+
guard, static manifest and dependency pins; new `tests/test_security_hardening.py`.
|
|
18
|
+
- Documentation: added the v1.0.0 stability policy and the hardened plugin-path
|
|
19
|
+
contract to the static docs site.
|
|
20
|
+
- Full green gate: pytest, node tests, tsc, ruff, mypy and wheel build with all
|
|
21
|
+
manifest assets present.
|
|
22
|
+
|
|
23
|
+
## 0.9.0
|
|
24
|
+
- Plugin API: `Studio(plugins=[...])` accepts `StudioPlugin` objects that
|
|
25
|
+
contribute namespaced routes under `/api/plugins/<name>/...` (also under
|
|
26
|
+
`/api/v1`), JSON-safe metadata in `/api/schema → plugins.<name>` and
|
|
27
|
+
declarative `PluginAction` buttons in a new Plugins panel. Routes dispatch
|
|
28
|
+
inside the normal handler, after the shared auth / localhost / CSRF /
|
|
29
|
+
rate-limit guard; names and paths are validated at registration and cannot
|
|
30
|
+
collide with built-ins. Plugin handlers are trusted host code and are not
|
|
31
|
+
policed by `read_only`. New `tests/test_plugins.py` plus node contract tests.
|
|
32
|
+
- Internationalization: English and Simplified Chinese ship as CSP-safe JS
|
|
33
|
+
dictionaries. `Studio(locale=...)` sets the initial language, `/api/schema`
|
|
34
|
+
publishes `locale`/`locales`, and a header switcher persists the choice
|
|
35
|
+
under `studio.locale.v1`. All UI strings are translated; `t()` falls back to
|
|
36
|
+
English then to the key, and placeholders are interpolated safely. New
|
|
37
|
+
`tests/test_i18n.py` and node tests pin the runtime and both dictionaries.
|
|
38
|
+
- Accessibility: a live axe-core WCAG 2.0/2.1 A+AA pass now runs over every
|
|
39
|
+
panel and dialog in the browser suite with zero violations. Added a skip
|
|
40
|
+
link, translated accessible names, keyboard-operable tabs and sortable
|
|
41
|
+
headers, focus trapping, full accessible names on ER boxes, and AA contrast
|
|
42
|
+
for muted/accent tokens. `tests/test_a11y.py` adds browser-free regressions.
|
|
43
|
+
- Responsive layout: tablet and phone breakpoints stack the sidebar, wrap
|
|
44
|
+
toolbars, keep forms and dialogs in one column, make the detail drawer
|
|
45
|
+
full-width and scroll wide grids horizontally. New viewport tests assert no
|
|
46
|
+
horizontal page overflow on a 390px screen.
|
|
47
|
+
- Documentation site: eight static pages generated from Markdown by
|
|
48
|
+
`scripts/build_docs.py`; `tests/test_docs.py` fails when committed HTML is
|
|
49
|
+
stale. Covers installation, configuration, the HTTP API, plugins, i18n,
|
|
50
|
+
accessibility and security.
|
|
51
|
+
- Wired installed wheel metadata to the new version. The full green gate is
|
|
52
|
+
green: pytest, node tests, tsc, ruff, mypy and wheel build with every
|
|
53
|
+
manifest asset present.
|
|
54
|
+
|
|
55
|
+
## 0.5.0
|
|
56
|
+
- `POST /api/v1/batch` (with the `/api/batch` alias): an ordered list of
|
|
57
|
+
`create|update|delete|m2m_add|m2m_remove` operations runs inside ONE
|
|
58
|
+
`tortoise.transactions.in_transaction`. All-or-nothing rollback; the error
|
|
59
|
+
payload names the failing operation index and code. `max_batch` caps the list
|
|
60
|
+
(default 500), a batch may not mix connections, and an `update` may carry
|
|
61
|
+
`expected` last-seen field values for optimistic concurrency (409 `conflict`).
|
|
62
|
+
- Every operation reuses the single-row write methods, so read-only, CSRF,
|
|
63
|
+
permissions, row scope, typed coercion and Tortoise signals still apply.
|
|
64
|
+
Audit events are buffered and emitted only after a successful commit, one
|
|
65
|
+
per operation, sharing a `batch_id` — nothing is audited for a rollback.
|
|
66
|
+
- `StudioConfig.max_batch` and `max_batch` in `/api/schema` limits; the JS
|
|
67
|
+
`Limits` type is kept in sync. New `tests/test_batch.py` covers all of the
|
|
68
|
+
above (24 tests).
|
|
69
|
+
- Atomicity depends on the database and driver supporting transactions; the
|
|
70
|
+
SQLite, Postgres and MySQL setups in CI all do.
|
|
71
|
+
- UI program G2 (part 1): `static/pending.js` is a pure staged-changes store
|
|
72
|
+
(stage, merge by row/relation, field-level diff, discard, undo, dirty flag,
|
|
73
|
+
batch request body with no UI-only keys). Wired into the detail view with
|
|
74
|
+
Stage/Save all/Discard/Undo controls and a Pending changes panel; staging
|
|
75
|
+
marks the tab dirty so the existing close guard fires. 22 new node tests
|
|
76
|
+
plus 7 app-level tests; the store ships under the same CSP and manifest.
|
|
77
|
+
- Non-pk `to_field` FKs: introspection now resolves the target field (not the
|
|
78
|
+
pk) for coercion, validation, display and the related route, including when
|
|
79
|
+
combined with a custom `source_field`. 11 new tests in `tests/test_tofield.py`.
|
|
80
|
+
- Large tables: `max_export_rows` is exposed in `/api/schema` limits, and 7 new
|
|
81
|
+
tests pin the export cap (JSON/CSV, filters, scope, zero cap) plus list count
|
|
82
|
+
correctness. README documents the `COUNT` cost on large tables.
|
|
83
|
+
- Optional AI filter hook (program G3): `Studio(ai_filter=fn)` with
|
|
84
|
+
`POST /api/v1/ai/filter`. The prompt is built from the permission-filtered
|
|
85
|
+
schema with no row data; model output is parsed as strict JSON and run
|
|
86
|
+
through the manual-filter whitelist (`bad_ai_output` on anything else).
|
|
87
|
+
Timeout (504), hook errors (502), rate limiting and `features.ai_filter`
|
|
88
|
+
in `/api/schema` are covered. UI is fully hidden when the hook is unset;
|
|
89
|
+
results appear as reviewable chips and are never auto-applied. 29 new node
|
|
90
|
+
tests plus 23 Python tests.
|
|
91
|
+
- UI program D (part 2) + accessibility groundwork (E): row detail is now a
|
|
92
|
+
side drawer (list stays visible) with an unsaved-changes indicator, a
|
|
93
|
+
field-level diff and a confirm-on-leave guard; double-click cells to edit
|
|
94
|
+
inline reusing typed widgets, with single-level undo staged through the
|
|
95
|
+
pending/batch path. `a11y.js` adds focus discovery, Tab trap and focus
|
|
96
|
+
save/return used by the drawer; `inline-edit.js` is a pure edit state
|
|
97
|
+
machine. Added reduced-motion handling. Also fixed a latent CSP bug where
|
|
98
|
+
`String()`/`JSON.stringify()` appeared directly in Alpine expressions (no
|
|
99
|
+
prior test had seeded a real row). 30 new node tests, app tests and a
|
|
100
|
+
real-browser drawer flow across both themes.
|
|
101
|
+
- UI program D (part 3): a per-row "Copy as" menu offers JSON, a Tortoise
|
|
102
|
+
`create()` snippet and a CSV line (`copy-as.js`, pure formatters, 8 node
|
|
103
|
+
tests); a JSON tree in the drawer (`json-view.js`) is collapsible, copies
|
|
104
|
+
path/value, validates edits and colours syntax with CSS classes only (9
|
|
105
|
+
jsdom tests). Both are CSP-safe (textContent + addEventListener) and shipped
|
|
106
|
+
through the manifest. Real-browser flow covers the menu and tree across both
|
|
107
|
+
themes. Fixed a clipped-dropdown bug (`td{overflow:hidden}`) found by e2e.
|
|
108
|
+
- Playground polish + accessibility groundwork (programs D/E): the playground
|
|
109
|
+
records query timing, keeps a localStorage query history (shape only, no row
|
|
110
|
+
data, storage failures degrade gracefully) with load/clear controls, and can
|
|
111
|
+
open the current query in the list view. `query-history.js` has 9 node tests.
|
|
112
|
+
The detail drawer, modal pickers and command palette now share `a11y.js` for
|
|
113
|
+
focus discovery, Tab trapping and focus save/return; dialogs/menus/tabs carry
|
|
114
|
+
proper roles and labels, and reduced-motion is honoured. Fixed two real e2e
|
|
115
|
+
bugs: the palette focused its input before `x-show` revealed it, and pickers
|
|
116
|
+
had no focus trap. Real-browser flow covers keyboard access across both
|
|
117
|
+
themes. 21 new node tests and 6 app tests.
|
|
118
|
+
|
|
119
|
+
## 0.4.1
|
|
120
|
+
- Database matrix: `tests/db/test_dialects.py` runs the same 7 behavioral tests against
|
|
121
|
+
SQLite, Postgres 16 and MySQL 8 (all passing locally); CI uses service containers and
|
|
122
|
+
a `STUDIO_TEST_DB` selector. Dialect-sensitive paths covered: case-insensitive search,
|
|
123
|
+
`.sql()` preview, pk/uuid serialization, decimal, JSON, boolean and enum/excluded fields.
|
|
124
|
+
- Async drivers `asyncpg` and `aiomysql` added to CI.
|
|
125
|
+
|
|
126
|
+
## 0.4.0
|
|
127
|
+
- All routes are now under `/api/v1`; `/api` remains a deprecated alias. The UI calls
|
|
128
|
+
`/api/v1` and parity tests prove both prefixes behave identically including CSRF.
|
|
129
|
+
- `core/pagination.py`: opaque, HMAC-signed keyset cursors via `after`/`before` on the
|
|
130
|
+
list route. Cursors contain only a pk and visible ordering values; tampering returns
|
|
131
|
+
400 `bad_cursor`. Offset paging still works.
|
|
132
|
+
- `core/permissions.py`: per-model/per-field read/write rules via `Studio(permissions=...)`.
|
|
133
|
+
Hidden fields vanish from schema, rows, filters, sort, export and cursors; writes to
|
|
134
|
+
hidden fields are rejected. Enforced in the service layer, not just the UI.
|
|
135
|
+
- `core/scoping.py`: row-level scope hook via `Studio(scope=...)` applied on list, get,
|
|
136
|
+
related, export, preview, bulk-delete, m2m, create, update and delete, with bypass tests.
|
|
137
|
+
- `core/ratelimit.py`: pluggable in-memory rate limiter via `Studio(rate_limiter=...)`;
|
|
138
|
+
over-limit requests return 429. Structured access logs include route/status/timing but
|
|
139
|
+
never bodies, query values, headers or row data. Audit events record scope usage.
|
|
140
|
+
- Tests for all of the above (19 policy tests, 15 alias tests) plus `/api`/`/api/v1` parity.
|
|
141
|
+
|
|
142
|
+
## 0.3.3
|
|
143
|
+
- `GET /api/migrations/pending`: dedicated Aerich pending-migrations route; the
|
|
144
|
+
migrations panel shows a pending badge sourced from it.
|
|
145
|
+
- Navigation UX: command palette (Ctrl/Cmd+K) with fuzzy search, keyboard
|
|
146
|
+
shortcuts (`/`, `j`/`k`, Enter, Esc, `g m`, `?` with a typing guard), sidebar
|
|
147
|
+
grouped by app with filter and pins, breadcrumbs, shareable URL-hash state,
|
|
148
|
+
status bar, collapsible sidebar and a shortcut cheat sheet.
|
|
149
|
+
- Multiple tabs (`tabs.js`): open/duplicate/close/reorder/pin, a 12-tab cap,
|
|
150
|
+
split view, sessionStorage persistence that never stores row data, dirty
|
|
151
|
+
hook for v0.5.0 and state isolation between tabs.
|
|
152
|
+
- Grid: sticky header, density toggle, distinct NULL rendering, empty state.
|
|
153
|
+
- Playwright e2e suite (Chromium + Firefox, light + dark) asserting zero console
|
|
154
|
+
errors across list, filter, palette, panels and theme.
|
|
155
|
+
- New modules added to the static manifest, CSP checks and wheel.
|
|
156
|
+
|
|
157
|
+
## 0.3.2
|
|
158
|
+
- In-app CSP-safe ER diagram: vanilla JS SVG renderer (`er.js` + `er-layout.js`) with
|
|
159
|
+
model boxes, PK-marked field rows, crow's-foot fk/o2o/m2m edges, deterministic
|
|
160
|
+
non-overlapping layout, pan/zoom, click-to-open and SVG/PNG export. All colours
|
|
161
|
+
come from `app.css` theme tokens; no `<style>` injection, no `style=` attributes,
|
|
162
|
+
no `innerHTML` with data.
|
|
163
|
+
- Mermaid text export retained (`/api/er`, Copy/Download `.mmd`). Mermaid-spike result
|
|
164
|
+
recorded in `docs/MERMAID_SPIKE.md`: Mermaid 10.9.1 injects `<style>` and `style=`
|
|
165
|
+
and cannot work under the default CSP, so it is not vendored.
|
|
166
|
+
- Tests: pure layout tests (determinism, non-overlap, cardinality, M2M dedup), jsdom
|
|
167
|
+
renderer tests (CSP safety, click/keyboard open, zoom bounds, exports), CSP source
|
|
168
|
+
checks covering the new files.
|
|
169
|
+
|
|
170
|
+
## 0.3.1
|
|
171
|
+
- Housekeeping: `__version__`/CHANGELOG synced to the actual release; all tracked text files are
|
|
172
|
+
clean UTF-8 without BOMs or U+FFFD; the stale v0.3.0 limitations list is refreshed.
|
|
173
|
+
- Dependency: `tortoise-orm>=0.21,<2.0`. The old `<1.0` cap excluded 1.1.9, which the suite
|
|
174
|
+
passes on; CI must cover both the 0.25 and 1.1 lines.
|
|
175
|
+
- Static files are now served from one declarative manifest (`core/manifest.py`) with exact-path
|
|
176
|
+
lookups only — no directories, no path arithmetic on user input, no handler edits for new files.
|
|
177
|
+
- Adapter smoke tests for FastAPI, Starlette, Litestar, aiohttp, Sanic, Quart and Django.
|
|
178
|
+
- Theme system: design tokens in `app.css` for surfaces, text, accent, semantics, focus, radius,
|
|
179
|
+
spacing, fonts and shadow; Light/Dark/System toggle persisted through a tested module;
|
|
180
|
+
`theme-init.js` paints the saved theme before first paint without an inline script; WCAG AA
|
|
181
|
+
contrast is verified by test for every theme. All colours come from tokens.
|
|
182
|
+
- Tooling: `ruff`/`mypy` configured and green; `tsc` with `noImplicitAny` and `// @ts-check` on
|
|
183
|
+
every static JS file; node tests, `tsc`, `ruff` and `mypy` run in CI; JSDoc/API contract tests
|
|
184
|
+
catch drift between `_types.d.ts` and the Python schema; encoding and version-consistency tests.
|
|
185
|
+
- Fixed: empty query parameters (`?page=`, `?limit=`, `?filter=`) fell back to Python `None` and
|
|
186
|
+
raised a 500 on list/audit routes; they now use the documented defaults.
|
|
187
|
+
- Fixed: saving a detail form with invalid JSON showed an error *and* still sent a PATCH with
|
|
188
|
+
stale values; parsing now aborts the write before any request is made.
|
|
189
|
+
- Fixed: a shadowed duplicate `test_migrations_response_shape` definition silently discarded the
|
|
190
|
+
first test; removed.
|
|
191
|
+
|
|
192
|
+
## 0.3.0
|
|
193
|
+
- Query playground with filter/sort/search preview and `.sql()` display.
|
|
194
|
+
- In-app ER diagram panel with field rows and relationship lines; Mermaid text export retained.
|
|
195
|
+
- Migrations panel backed by Aerich pending/applied data.
|
|
196
|
+
- Toast notifications and typed widget set.
|
|
197
|
+
|
|
198
|
+
## 0.2.2
|
|
199
|
+
- FK/O2O pickers and M2M picker in the detail form.
|
|
200
|
+
- Virtual FK/O2O fields in list and detail views.
|
|
201
|
+
|
|
202
|
+
## 0.2.1
|
|
203
|
+
- Filter-builder UI and column chooser.
|
|
204
|
+
- Node/jsdom UI test harness.
|
|
205
|
+
|
|
206
|
+
## 0.2.0
|
|
207
|
+
- Typed form widgets, Django adapter, form/JSON mode toggle.
|
|
208
|
+
|
|
209
|
+
## 0.1.1
|
|
210
|
+
- Full pytest suite: 284 tests covering introspection, filters, service, handler, adapters, CLI, integration
|
|
211
|
+
- Fix: backward-FK traversal on models with custom `source_field` now uses Tortoise's reverse manager
|
|
212
|
+
- Version tracked from `__init__.py` (single source of truth)
|
|
213
|
+
- Release workflow verifies tag matches package version
|
|
214
|
+
- Added `[project.urls]`, classifiers, keywords, `tortoise-orm<1.0` upper bound
|
|
215
|
+
|
|
216
|
+
## 0.1.0
|
|
217
|
+
- Initial release: introspection, JSON API, read-only default, auth hooks, CSRF, ASGI core,
|
|
218
|
+
FastAPI/Starlette/Litestar/aiohttp/Sanic/Quart adapters, CLI, Alpine UI, export, audit hook.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
See [AGENTS.md](AGENTS.md) for the canonical project guide — repo layout, dev
|
|
4
|
+
server, CI gates, the frozen public API, CSP rules and safe defaults.
|
|
5
|
+
|
|
6
|
+
Claude-specific notes:
|
|
7
|
+
|
|
8
|
+
- Prefer reading `AGENTS.md` and the source over guessing; this repo pins a
|
|
9
|
+
frozen 1.0.0 API and a failing `tests/test_api_freeze.py` means a breaking
|
|
10
|
+
change, not a docs tweak.
|
|
11
|
+
- The docs site `docs/` is static and separate from the app. Never add docs
|
|
12
|
+
files to the Python wheel or to `core/manifest.py`.
|
|
13
|
+
- When changing docs, regenerate with `python scripts/build_llms.py` and run
|
|
14
|
+
`pytest -q tests/test_docs.py`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tortoise-orm-studio contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
6
|
+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
7
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
8
|
+
to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
11
|
+
the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
|