tina4-python 3.13.150__tar.gz → 3.13.152__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.
- {tina4_python-3.13.150 → tina4_python-3.13.152}/PKG-INFO +5 -7
- {tina4_python-3.13.150 → tina4_python-3.13.152}/README.md +1 -1
- {tina4_python-3.13.150 → tina4_python-3.13.152}/pyproject.toml +16 -19
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/CLAUDE.md +2 -1
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/__init__.py +1 -1
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/cache/__init__.py +9 -1
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/cli/__init__.py +154 -33
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/middleware.py +15 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/request.py +190 -11
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/server.py +40 -4
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/crud/page.py +1 -1
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/crud/page_render.py +5 -5
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/postgres.py +89 -3
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/dev_admin/metrics.py +5 -1
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/frond/engine.py +174 -11
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/__init__.py +15 -4
- tina4_python-3.13.152/tina4_python/realtime/s3_client.py +255 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/storage.py +18 -27
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/crud/form.twig +5 -5
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/crud/table.twig +2 -2
- tina4_python-3.13.152/tina4_python/templates/errors/302.twig +23 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/websocket/__init__.py +6 -3
- tina4_python-3.13.150/tina4_python/templates/errors/302.twig +0 -22
- {tina4_python-3.13.150 → tina4_python-3.13.152}/.gitignore +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/COMMERCIAL-LICENSE.md +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/LICENSE +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/NOTICE +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/.tina4-metrics.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/HtmlElement.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/Testing.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/_import_helper.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/ai/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/ai/client.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/api/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/auth/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/container/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/context/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/context/chunker.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/cache.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/constants.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/csp.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/events.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/port_takeover.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/rate_limiter.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/response.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/core/router.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/crud/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/adapter.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/async_api.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/connection.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/database_url.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/firebird.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/mongodb.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/mssql.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/mysql.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/odbc.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/pool.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/sql_translator.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/database/sqlite.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/debug/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/debug/error_overlay.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/dev_admin/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/dev_admin/plan.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/dev_admin/project_index.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/docs.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/docstore/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/dotenv/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/env.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/frond/FROND.md +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/frond/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/frond/compiler.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/frond/parser.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/auth/meta.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/auth/src/routes/api/gallery_auth.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/database/meta.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/database/src/routes/api/gallery_db.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/error-overlay/meta.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/error-overlay/src/routes/api/gallery_crash.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/orm/meta.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/orm/src/orm/Product.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/orm/src/routes/api/gallery_products.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/queue/meta.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/queue/src/routes/api/gallery_queue.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/rest-api/meta.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/rest-api/src/routes/api/gallery_hello.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/templates/meta.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/templates/src/routes/gallery_page.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/gallery/templates/src/templates/gallery_page.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graph/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graph/adapter.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graph/adapters/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graph/adapters/arango.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graph/adapters/bolt.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graph/adapters/ultipa.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graph/graph_url.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/graphql/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/i18n/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/mcp/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/mcp/protocol.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/mcp/tools.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/messenger/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/migration/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/migration/runner.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/mqtt/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/mqtt/message.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/orm/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/orm/async_api.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/orm/collection.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/orm/fields.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/orm/model.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/orm/point.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/THIRD-PARTY-NOTICES.md +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/__feedback/widget.js +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/bundled-component-provenance.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/css/tina4.css +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/css/tina4.min.css +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/favicon.ico +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/images/logo.svg +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/images/tina4-logo-icon.webp +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/js/frond.js +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/js/frond.min.js +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/js/tina4-dev-admin-split.html +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/js/tina4-dev-admin.min.js +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/js/tina4.min.js +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/js/tina4js.min.js +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/licenses/swagger-ui-3.10.0-original-notice.txt +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/licenses/swagger-ui-5.17.14-NOTICE.txt +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/licenses/swagger-ui-Apache-2.0.txt +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/licenses/tina4-css-MIT.txt +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/licenses/tina4-dev-admin-components.json +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/licenses/tina4-dev-admin-third-party.txt +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/licenses/tina4-js-MIT.txt +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/swagger/index.html +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/public/swagger/oauth2-redirect.html +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/push/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/push/_base.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/push/_cryptography.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/push/_libcrypto.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/query_builder/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/amqp_url.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/job.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/kafka_backend.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/lite_backend.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/mongo_backend.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/rabbitmq_backend.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue/topic_dead_letter.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue_backends/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue_backends/kafka_backend.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue_backends/mongo_backend.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/queue_backends/rabbitmq_backend.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/models/Attachment.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/models/Channel.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/models/ChannelMember.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/models/Message.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/models/Workspace.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/realtime/models/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/seeder/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/service/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/session/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/session_handlers/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/session_handlers/memcached_handler.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/session_handlers/mongodb_handler.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/session_handlers/redis_handler.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/session_handlers/valkey_handler.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/sso.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/ssrf.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/swagger/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/components/crud.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/crud/modals.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/crud/page.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/docker/distroless/Dockerfile +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/docker/poetry/Dockerfile +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/docker/python/Dockerfile +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/docker/uv/Dockerfile +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/errors/401.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/errors/403.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/errors/404.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/errors/500.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/errors/502.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/errors/503.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/errors/base.twig +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/frontend/README.md +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/templates/readme.md +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/test/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/test_client/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/af/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/af/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/en/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/en/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/es/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/es/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/fr/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/fr/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/ja/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/ja/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/zh/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/translations/zh/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/validator/__init__.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/websocket/backplane.py +0 -0
- {tina4_python-3.13.150 → tina4_python-3.13.152}/tina4_python/wsdl/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tina4-python
|
|
3
|
-
Version: 3.13.
|
|
3
|
+
Version: 3.13.152
|
|
4
4
|
Summary: Tina4 Python v3 — Zero-dependency, lightweight web framework
|
|
5
5
|
Author-email: Andre van Zuydam <andrevanzuydam@gmail.com>
|
|
6
6
|
License-Expression: MPL-2.0
|
|
@@ -12,7 +12,7 @@ Provides-Extra: all-db
|
|
|
12
12
|
Requires-Dist: firebird-driver>=1.10; extra == 'all-db'
|
|
13
13
|
Requires-Dist: mysql-connector-python>=9.0; extra == 'all-db'
|
|
14
14
|
Requires-Dist: psycopg2-binary>=2.9; extra == 'all-db'
|
|
15
|
-
Requires-Dist: pymongo>=4.
|
|
15
|
+
Requires-Dist: pymongo>=4.18.2; extra == 'all-db'
|
|
16
16
|
Requires-Dist: pymssql>=2.3; extra == 'all-db'
|
|
17
17
|
Requires-Dist: pyodbc>=5.0; extra == 'all-db'
|
|
18
18
|
Provides-Extra: arango
|
|
@@ -29,7 +29,7 @@ Requires-Dist: confluent-kafka>=2.0; extra == 'kafka'
|
|
|
29
29
|
Provides-Extra: memcache
|
|
30
30
|
Requires-Dist: pymemcache>=4.0; extra == 'memcache'
|
|
31
31
|
Provides-Extra: mongo
|
|
32
|
-
Requires-Dist: pymongo>=4.
|
|
32
|
+
Requires-Dist: pymongo>=4.18.2; extra == 'mongo'
|
|
33
33
|
Provides-Extra: mssql
|
|
34
34
|
Requires-Dist: pymssql>=2.3; extra == 'mssql'
|
|
35
35
|
Provides-Extra: mysql
|
|
@@ -47,9 +47,7 @@ Requires-Dist: pika>=1.3; extra == 'rabbitmq'
|
|
|
47
47
|
Provides-Extra: redis
|
|
48
48
|
Requires-Dist: redis>=5.0; extra == 'redis'
|
|
49
49
|
Provides-Extra: s3
|
|
50
|
-
Requires-Dist: boto3>=1.34; extra == 's3'
|
|
51
50
|
Provides-Extra: test
|
|
52
|
-
Requires-Dist: boto3>=1.34; extra == 'test'
|
|
53
51
|
Requires-Dist: confluent-kafka>=2.0; extra == 'test'
|
|
54
52
|
Requires-Dist: cryptography>=42.0; extra == 'test'
|
|
55
53
|
Requires-Dist: firebird-driver>=1.10; extra == 'test'
|
|
@@ -58,7 +56,7 @@ Requires-Dist: openapi-spec-validator>=0.7; extra == 'test'
|
|
|
58
56
|
Requires-Dist: pika>=1.3; extra == 'test'
|
|
59
57
|
Requires-Dist: psycopg2-binary>=2.9; extra == 'test'
|
|
60
58
|
Requires-Dist: pymemcache>=4.0; extra == 'test'
|
|
61
|
-
Requires-Dist: pymongo>=4.
|
|
59
|
+
Requires-Dist: pymongo>=4.18.2; extra == 'test'
|
|
62
60
|
Requires-Dist: pymssql>=2.3; extra == 'test'
|
|
63
61
|
Requires-Dist: pyodbc>=5.0; extra == 'test'
|
|
64
62
|
Requires-Dist: redis>=5.0; extra == 'test'
|
|
@@ -143,7 +141,7 @@ Open http://localhost:7146
|
|
|
143
141
|
|
|
144
142
|
---
|
|
145
143
|
|
|
146
|
-
## What's Built In (
|
|
144
|
+
## What's Built In (140 Features)
|
|
147
145
|
|
|
148
146
|
Every feature is built from scratch -- no pip install, no node_modules, no third-party runtime dependencies in core.
|
|
149
147
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "tina4-python"
|
|
3
|
-
version = "3.13.
|
|
3
|
+
version = "3.13.152"
|
|
4
4
|
description = "Tina4 Python v3 — Zero-dependency, lightweight web framework"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Andre van Zuydam", email = "andrevanzuydam@gmail.com"}
|
|
@@ -19,7 +19,7 @@ postgres = ["psycopg2-binary>=2.9"]
|
|
|
19
19
|
mysql = ["mysql-connector-python>=9.0"]
|
|
20
20
|
mssql = ["pymssql>=2.3"]
|
|
21
21
|
firebird = ["firebird-driver>=1.10"]
|
|
22
|
-
mongo = ["pymongo>=4.
|
|
22
|
+
mongo = ["pymongo>=4.18.2"]
|
|
23
23
|
odbc = ["pyodbc>=5.0"]
|
|
24
24
|
|
|
25
25
|
# Graph engine drivers — install what you need (loaded lazily on first use).
|
|
@@ -33,10 +33,13 @@ graph = ["tina4-ultipa>=0.1", "protobuf>=7.35.1", "neo4j>=5.0", "python-arango>=
|
|
|
33
33
|
redis = ["redis>=5.0"]
|
|
34
34
|
memcache = ["pymemcache>=4.0"]
|
|
35
35
|
|
|
36
|
-
# File-storage backends
|
|
37
|
-
#
|
|
38
|
-
# (TINA4_STORAGE_BACKEND=s3)
|
|
39
|
-
|
|
36
|
+
# File-storage backends.
|
|
37
|
+
# Both shipped backends are zero-dependency: `local` (filesystem, the default)
|
|
38
|
+
# and `s3`/S3Storage (TINA4_STORAGE_BACKEND=s3), which talks to S3/MinIO/Garage
|
|
39
|
+
# through Tina4's own stdlib SigV4 client (tina4_python.realtime.s3_client) — no
|
|
40
|
+
# boto3. The extra is kept (empty) so `pip install tina4-python[s3]` still works;
|
|
41
|
+
# it installs nothing because S3 needs no driver.
|
|
42
|
+
s3 = []
|
|
40
43
|
|
|
41
44
|
# Queue backends — install what you need
|
|
42
45
|
kafka = ["confluent-kafka>=2.0"]
|
|
@@ -56,7 +59,7 @@ all-db = [
|
|
|
56
59
|
"mysql-connector-python>=9.0",
|
|
57
60
|
"pymssql>=2.3",
|
|
58
61
|
"firebird-driver>=1.10",
|
|
59
|
-
"pymongo>=4.
|
|
62
|
+
"pymongo>=4.18.2",
|
|
60
63
|
"pyodbc>=5.0",
|
|
61
64
|
]
|
|
62
65
|
|
|
@@ -75,28 +78,22 @@ all-db = [
|
|
|
75
78
|
# own: `uv sync --extra X` PRUNES anything outside the named extras, so a test
|
|
76
79
|
# extra that omitted it would silently uninstall it on a host that had it.
|
|
77
80
|
#
|
|
78
|
-
# boto3 is here
|
|
79
|
-
#
|
|
80
|
-
#
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
# "2 passed" to "2 skipped" -- with the suite still GREEN under
|
|
84
|
-
# TINA4_REQUIRE_SERVICES=1, because the skip reason matched neither a service
|
|
85
|
-
# keyword nor an unavailable hint in the conftest gate. Live S3 coverage
|
|
86
|
-
# evaporated silently. Declaring it here is the fix; tests/conftest.py now also
|
|
87
|
-
# recognises a missing boto3 so the gate can never miss it again.
|
|
81
|
+
# boto3 is NO LONGER here: S3Storage talks to S3 through Tina4's own stdlib
|
|
82
|
+
# SigV4 client, so the live-S3 tests in tests/test_realtime_files.py need no
|
|
83
|
+
# driver at all — only a reachable S3 server (MinIO/Garage). Removing boto3 also
|
|
84
|
+
# drops botocore + urllib3 + s3transfer + jmespath from the test tree, clearing
|
|
85
|
+
# the urllib3 advisories they carried.
|
|
88
86
|
test = [
|
|
89
87
|
"psycopg2-binary>=2.9",
|
|
90
88
|
"mysql-connector-python>=9.0",
|
|
91
89
|
"pymssql>=2.3",
|
|
92
90
|
"firebird-driver>=1.10",
|
|
93
|
-
"pymongo>=4.
|
|
91
|
+
"pymongo>=4.18.2",
|
|
94
92
|
"pyodbc>=5.0",
|
|
95
93
|
"redis>=5.0",
|
|
96
94
|
"pymemcache>=4.0",
|
|
97
95
|
"confluent-kafka>=2.0",
|
|
98
96
|
"pika>=1.3",
|
|
99
|
-
"boto3>=1.34",
|
|
100
97
|
# TEST-ONLY: validates the generated OpenAPI document against the real
|
|
101
98
|
# OpenAPI 3.0/3.1 schema (tests/test_swagger_contract.py). NEVER a framework
|
|
102
99
|
# runtime dependency — the swagger generator itself stays zero-dependency.
|
|
@@ -477,7 +477,8 @@ async def protected_get(request, response):
|
|
|
477
477
|
|
|
478
478
|
```python
|
|
479
479
|
request.body # Parsed request body (dict for JSON, dict for form data)
|
|
480
|
-
request.params #
|
|
480
|
+
request.params # ROUTE params ONLY (the {id} segments) — never query/body
|
|
481
|
+
request.query # Query string parameters (dict) — read ?q=, ?page= here
|
|
481
482
|
request.headers # HTTP headers (dict, lowercase keys)
|
|
482
483
|
request.files # Uploaded files (dict, values are base64-encoded dicts)
|
|
483
484
|
request.url # Request URL path
|
|
@@ -1418,7 +1418,8 @@ class ResponseCache:
|
|
|
1418
1418
|
Authorization, and Tina4's own session mechanism IS a cookie. Because
|
|
1419
1419
|
the key is method + URL, storing such a response replays one signed-in
|
|
1420
1420
|
user's page to whoever asks for that URL next. A response that installs
|
|
1421
|
-
a session is per-user by construction for the same reason
|
|
1421
|
+
a session is per-user by construction for the same reason, whether it
|
|
1422
|
+
already carries the Set-Cookie or the session is about to add it.
|
|
1422
1423
|
|
|
1423
1424
|
Both cookie cases stay cacheable when the response opts in explicitly with
|
|
1424
1425
|
a shared-cache directive, which is how a genuinely public page served to
|
|
@@ -1435,6 +1436,13 @@ class ResponseCache:
|
|
|
1435
1436
|
return _shared_cache_allowed(response)
|
|
1436
1437
|
if _header_value(response, "Set-Cookie") is not None:
|
|
1437
1438
|
return _shared_cache_allowed(response)
|
|
1439
|
+
# The session cookie is added after this check, so a response that is
|
|
1440
|
+
# about to install one carries no Set-Cookie yet: a request that came
|
|
1441
|
+
# without a cookie and leaves its session holding data (a form token
|
|
1442
|
+
# bound to it marks it) is that case.
|
|
1443
|
+
session = getattr(request, "session", None)
|
|
1444
|
+
if session is not None and not session.is_fresh():
|
|
1445
|
+
return _shared_cache_allowed(response)
|
|
1438
1446
|
return True
|
|
1439
1447
|
|
|
1440
1448
|
@staticmethod
|
|
@@ -25,6 +25,7 @@ and reached by DELEGATION (see DELEGATED / _delegate_to_client below), so
|
|
|
25
25
|
`tina4python doctor` behaves exactly like `tina4 doctor` without cloning the
|
|
26
26
|
client's implementation into four languages.
|
|
27
27
|
"""
|
|
28
|
+
import difflib
|
|
28
29
|
import os
|
|
29
30
|
import re
|
|
30
31
|
import secrets
|
|
@@ -176,13 +177,18 @@ def _parse_flags(args: list[str]) -> tuple[dict, list[str]]:
|
|
|
176
177
|
"""Parse --key value and --flag from args. Returns (flags, positional)."""
|
|
177
178
|
# Boolean-only flags that never take a value argument
|
|
178
179
|
boolean_flags = {"no-browser", "no-reload", "no-kill", "production", "managed", "all", "clear",
|
|
179
|
-
"json", "public", "no-migration", "
|
|
180
|
+
"json", "public", "no-migration", "no-templates", "skip-model", "once", "dry-run",
|
|
181
|
+
"fix", "no-install"}
|
|
180
182
|
|
|
181
183
|
flags = {}
|
|
182
184
|
positional = []
|
|
183
185
|
i = 0
|
|
184
186
|
while i < len(args):
|
|
185
|
-
if args[i].startswith("--"):
|
|
187
|
+
if args[i].startswith("--") and "=" in args[i]:
|
|
188
|
+
key, _, value = args[i][2:].partition("=")
|
|
189
|
+
flags[key] = value
|
|
190
|
+
i += 1
|
|
191
|
+
elif args[i].startswith("--"):
|
|
186
192
|
key = args[i][2:]
|
|
187
193
|
if key in boolean_flags:
|
|
188
194
|
flags[key] = True
|
|
@@ -381,10 +387,13 @@ def _delegate_to_client(command: str, args: list) -> int:
|
|
|
381
387
|
|
|
382
388
|
# ── Main entry point ─────────────────────────────────────────────────
|
|
383
389
|
|
|
390
|
+
HELP_FLAGS = ("--help", "-h")
|
|
391
|
+
|
|
392
|
+
|
|
384
393
|
def main():
|
|
385
394
|
"""CLI entry point."""
|
|
386
395
|
args = sys.argv[1:]
|
|
387
|
-
if not args:
|
|
396
|
+
if not args or args[0].lower() in HELP_FLAGS:
|
|
388
397
|
_help()
|
|
389
398
|
return
|
|
390
399
|
|
|
@@ -396,6 +405,15 @@ def main():
|
|
|
396
405
|
# `commands --json` manifest, so dispatch, help, and discovery never drift.
|
|
397
406
|
spec = COMMANDS.get(command)
|
|
398
407
|
if spec:
|
|
408
|
+
# `--help` / `-h` anywhere after a command prints that command's usage
|
|
409
|
+
# and touches nothing. Handlers never looked for it, so it ran the
|
|
410
|
+
# command for real: `generate model --help` wrote a model named
|
|
411
|
+
# `--help`, `lint --help` installed ruff, `migrate --help` made app.db.
|
|
412
|
+
# Delegated commands are left alone - the client answers --help itself.
|
|
413
|
+
if command != "help" and any(a in HELP_FLAGS for a in cmd_args):
|
|
414
|
+
_command_help(command, cmd_args)
|
|
415
|
+
return
|
|
416
|
+
_check_options(command, cmd_args)
|
|
399
417
|
spec["handler"](cmd_args)
|
|
400
418
|
elif command in DELEGATED:
|
|
401
419
|
sys.exit(_delegate_to_client(command, cmd_args))
|
|
@@ -453,6 +471,93 @@ def _env_migrate(args):
|
|
|
453
471
|
print(f" original kept at {backup} (delete once you've verified)")
|
|
454
472
|
|
|
455
473
|
|
|
474
|
+
def _command_help(command: str, args: list) -> None:
|
|
475
|
+
"""Usage for one command (or one generator), from the same registries."""
|
|
476
|
+
if command == "generate":
|
|
477
|
+
kind = next((a.lower() for a in args if not a.startswith("-")), None)
|
|
478
|
+
gen = GENERATORS.get(kind) if kind else None
|
|
479
|
+
if gen:
|
|
480
|
+
print(f"Usage: tina4python generate {kind} {gen.get('usage', '')}".rstrip())
|
|
481
|
+
print(f"\n {gen['summary']}")
|
|
482
|
+
return
|
|
483
|
+
print("Usage: tina4python generate <what> <name> [options]\n\nGenerators:")
|
|
484
|
+
pad = max(len(name) for name in GENERATORS)
|
|
485
|
+
for name, gen in GENERATORS.items():
|
|
486
|
+
print(f" {name:<{pad}} {gen['summary']}")
|
|
487
|
+
return
|
|
488
|
+
spec = COMMANDS[command]
|
|
489
|
+
print(f"Usage: tina4python {command} {spec.get('usage', '')}".rstrip())
|
|
490
|
+
print(f"\n {spec['summary']}")
|
|
491
|
+
if spec.get("subcommands"):
|
|
492
|
+
print(f" Subcommands: {', '.join(spec['subcommands'])}")
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
def _accepted_options(command: str, args: list) -> dict | None:
|
|
496
|
+
"""The options `command` accepts ({name: takes_value}), or None when its
|
|
497
|
+
arguments are not ours to check (`test` hands them to pytest, an unknown
|
|
498
|
+
generator or queue subcommand is reported by its own handler)."""
|
|
499
|
+
if command == "generate":
|
|
500
|
+
kind = args[0].lower() if args else ""
|
|
501
|
+
gen = GENERATORS.get(kind)
|
|
502
|
+
if gen is None:
|
|
503
|
+
return None
|
|
504
|
+
accepted = dict(gen.get("flags", {}))
|
|
505
|
+
if kind in _RESOLUTION_TARGETS:
|
|
506
|
+
accepted.update(_RESOLUTION_FLAGS)
|
|
507
|
+
return accepted
|
|
508
|
+
if command == "queue":
|
|
509
|
+
return _QUEUE_FLAGS.get(args[0].lower() if args else "")
|
|
510
|
+
return COMMANDS[command].get("flags", {})
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
def _check_options(command: str, args: list) -> None:
|
|
514
|
+
"""Refuse an option the command doesn't have, or a value option given no
|
|
515
|
+
value. Both used to slip through: `--feilds` was silently dropped (the
|
|
516
|
+
model came out without its fields) and a bare `--fields` crashed."""
|
|
517
|
+
accepted = _accepted_options(command, args)
|
|
518
|
+
if accepted is None:
|
|
519
|
+
return
|
|
520
|
+
label = f"{command} {args[0].lower()}" if command in ("generate", "queue") else command
|
|
521
|
+
i = 0
|
|
522
|
+
while i < len(args):
|
|
523
|
+
problem, consumed = _option_problem(args, i, accepted, label)
|
|
524
|
+
if problem:
|
|
525
|
+
print(problem)
|
|
526
|
+
sys.exit(1)
|
|
527
|
+
i += 1 + consumed
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
def _option_problem(args: list, i: int, accepted: dict, label: str) -> tuple[str | None, int]:
|
|
531
|
+
"""What is wrong with args[i] (None if nothing), and how many following
|
|
532
|
+
arguments it consumes as its value."""
|
|
533
|
+
arg = args[i]
|
|
534
|
+
if not arg.startswith("-") or arg == "-":
|
|
535
|
+
return None, 0
|
|
536
|
+
name, has_value, _ = arg.lstrip("-").partition("=")
|
|
537
|
+
if not arg.startswith("--") or name not in accepted:
|
|
538
|
+
return _unknown_option_message(arg, name, accepted, label), 0
|
|
539
|
+
if not accepted[name] or has_value:
|
|
540
|
+
return None, 0
|
|
541
|
+
if i + 1 >= len(args) or args[i + 1].startswith("-"):
|
|
542
|
+
return f'Option --{name} for "{label}" needs a value: --{name} <value>', 0
|
|
543
|
+
return None, 1
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
def _unknown_option_message(arg: str, name: str, accepted: dict, label: str) -> str:
|
|
547
|
+
close = difflib.get_close_matches(name, list(accepted), n=1, cutoff=0.6)
|
|
548
|
+
hint = f" Did you mean --{close[0]}?" if close else ""
|
|
549
|
+
return (f'Unknown option {arg.partition("=")[0]} for "{label}".{hint}\n'
|
|
550
|
+
f'Run "tina4python {label} --help" for its options.')
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
def _reject_flag_like_name(name: str, what: str) -> None:
|
|
554
|
+
"""Refuse a name that is really a mistyped option (`--fields` with no
|
|
555
|
+
name before it, `-x`): it would otherwise become a file called `--fields`."""
|
|
556
|
+
if name.startswith("-"):
|
|
557
|
+
print(f"Invalid {what} name: {name!r} - names can't start with '-'.")
|
|
558
|
+
sys.exit(1)
|
|
559
|
+
|
|
560
|
+
|
|
456
561
|
def _help(args=None):
|
|
457
562
|
"""Print the human-readable command reference.
|
|
458
563
|
|
|
@@ -1130,7 +1235,7 @@ def _ai(args):
|
|
|
1130
1235
|
"""Install AI coding assistant context files."""
|
|
1131
1236
|
from tina4_python.ai import show_menu, install_selected, install_context
|
|
1132
1237
|
|
|
1133
|
-
if args and args[0].lower()
|
|
1238
|
+
if args and args[0].lower() in ("all", "--all"):
|
|
1134
1239
|
install_context(".")
|
|
1135
1240
|
else:
|
|
1136
1241
|
selection = show_menu(".")
|
|
@@ -1156,6 +1261,8 @@ def _ai(args):
|
|
|
1156
1261
|
# validator, seeder, websocket, listener, auth, test, form, view) keep their
|
|
1157
1262
|
# existing behaviour — this is the minimum surface the plan calls out.
|
|
1158
1263
|
_RESOLUTION_TARGETS = {"model", "route", "migration", "middleware", "queue"}
|
|
1264
|
+
# Options every resolution-aware generator accepts on top of its own.
|
|
1265
|
+
_RESOLUTION_FLAGS = {"json": False, "dry-run": False}
|
|
1159
1266
|
|
|
1160
1267
|
# Envelope schema version. Bump when the SHAPE changes; adding an optional
|
|
1161
1268
|
# key on the resolution object is not a break.
|
|
@@ -1659,6 +1766,8 @@ def _generate(args):
|
|
|
1659
1766
|
sys.exit(1)
|
|
1660
1767
|
|
|
1661
1768
|
name = args[1] if len(args) > 1 else ""
|
|
1769
|
+
if what not in no_name_generators:
|
|
1770
|
+
_reject_flag_like_name(name, what)
|
|
1662
1771
|
flags, _ = _parse_flags(args[2:] if len(args) > 2 else [])
|
|
1663
1772
|
|
|
1664
1773
|
# ADR-0062: the four wired generators expose a JSON envelope and a
|
|
@@ -1984,7 +2093,9 @@ def _gen_crud(name: str, flags: dict):
|
|
|
1984
2093
|
|
|
1985
2094
|
# 1. Model + migration (emit_test=False — crud emits its own broader gate
|
|
1986
2095
|
# test at step 4, so the sub-generators stay quiet to avoid double-emit).
|
|
1987
|
-
|
|
2096
|
+
# --skip-model: the model already exists (`generate model` suggests this).
|
|
2097
|
+
if "skip-model" not in flags:
|
|
2098
|
+
_gen_model(name, flags, emit_test=False)
|
|
1988
2099
|
|
|
1989
2100
|
# 2. Admin page route: registers AutoCrud (secure-by-default; --public opens
|
|
1990
2101
|
# writes) and renders the to_crud admin UI at /admin/<table>.
|
|
@@ -3908,6 +4019,14 @@ def _queue_clear(args):
|
|
|
3908
4019
|
|
|
3909
4020
|
# Sub-dispatch table for the `queue` command — the single source for its
|
|
3910
4021
|
# subcommands (drives _queue dispatch AND the manifest's queue.subcommands).
|
|
4022
|
+
# Options per queue subcommand (name -> takes a value), checked by main().
|
|
4023
|
+
_QUEUE_FLAGS = {
|
|
4024
|
+
"work": {"once": False, "poll": True, "services": True},
|
|
4025
|
+
"stats": {"json": False},
|
|
4026
|
+
"retry": {},
|
|
4027
|
+
"clear": {},
|
|
4028
|
+
}
|
|
4029
|
+
|
|
3911
4030
|
_QUEUE_SUBCOMMANDS = {
|
|
3912
4031
|
"work": _queue_work,
|
|
3913
4032
|
"stats": _queue_stats,
|
|
@@ -4024,52 +4143,54 @@ def _commands(args=None):
|
|
|
4024
4143
|
# (_help), AND the machine-readable manifest (commands --json). Add a command
|
|
4025
4144
|
# in ONE place and it appears everywhere — there is no second list to sync.
|
|
4026
4145
|
#
|
|
4027
|
-
# GENERATORS[name] = {"handler": fn(name, flags), "usage": str, "summary": str}
|
|
4146
|
+
# GENERATORS[name] = {"handler": fn(name, flags), "flags": {...}, "usage": str, "summary": str}
|
|
4028
4147
|
# COMMANDS[name] = {"handler": fn(args), "summary": str,
|
|
4148
|
+
# "flags"?: {name: bool}, # options main() accepts; True = takes a value.
|
|
4149
|
+
# # Absent = none. None = not checked (test -> pytest)
|
|
4029
4150
|
# "usage"?: str, # arg/flag hint for _help (human only)
|
|
4030
4151
|
# "args"?: [str], # positional args for the manifest ("x?" = optional)
|
|
4031
4152
|
# "subcommands"?: [str]} # sub-names for the manifest (generate)
|
|
4032
4153
|
|
|
4033
4154
|
GENERATORS = {
|
|
4034
|
-
"model": {"handler": _gen_model, "usage": '<Name> [--fields "name:string,price:float"] [--table-name <name>]', "summary": "ORM model + matching migration"},
|
|
4035
|
-
"route": {"handler": _gen_route, "usage": "<name> [--model Name] [--public]", "summary": "CRUD route file, secure by default (--public opens writes)"},
|
|
4036
|
-
"base": {"handler": _gen_base, "usage": "", "summary": "Frond base template + index page + pages/ folder"},
|
|
4037
|
-
"page": {"handler": _gen_page, "usage": "<name>", "summary": "Page that extends base.twig (auto-creates pages/ + base)"},
|
|
4038
|
-
"crud": {"handler": _gen_crud, "usage": '<Name> [--fields "..."] [--public] [--no-templates]', "summary": "Model + migration + AutoCrud-backed admin page (to_crud) + editable crud/ templates + gate test"},
|
|
4039
|
-
"migration": {"handler": _gen_migration, "usage": "<description>", "summary": "Timestamped migration file (UP/DOWN)"},
|
|
4040
|
-
"middleware": {"handler": _gen_middleware, "usage": "<Name>", "summary": "Middleware with before/after hooks"},
|
|
4041
|
-
"test": {"handler": _gen_test, "usage": "<name> [--model Name]", "summary": "pytest test file"},
|
|
4042
|
-
"form": {"handler": _gen_form, "usage": '<Name> [--fields "..."]', "summary": "Form template with inputs matching model fields"},
|
|
4043
|
-
"view": {"handler": _gen_view, "usage": '<Name> [--fields "..."]', "summary": "List + detail view templates"},
|
|
4044
|
-
"auth": {"handler": _gen_auth, "usage": "", "summary": "Login/register routes + User model + templates"},
|
|
4045
|
-
"service": {"handler": _gen_service, "usage": '<Name> [--every 5m | --cron "..."]', "summary": "Scheduled ServiceRunner task (src/services/)"},
|
|
4046
|
-
"queue": {"handler": _gen_queue, "usage": "<topic>", "summary": "Producer + consumer worker (src/services/)"},
|
|
4047
|
-
"validator": {"handler": _gen_validator, "usage": "<Name>", "summary": "Request-body Validator (src/validators/)"},
|
|
4048
|
-
"seeder": {"handler": _gen_seeder, "usage": "<Model>", "summary": "FakeData + seed_orm seeder (src/seeds/)"},
|
|
4049
|
-
"websocket": {"handler": _gen_websocket, "usage": "<path>", "summary": "@websocket handler (src/routes/)"},
|
|
4050
|
-
"listener": {"handler": _gen_listener, "usage": "<event>", "summary": "@on(event) listener (src/listeners/)"},
|
|
4155
|
+
"model": {"handler": _gen_model, "flags": {"fields": True, "table-name": True, "no-migration": False}, "usage": '<Name> [--fields "name:string,price:float"] [--table-name <name>]', "summary": "ORM model + matching migration"},
|
|
4156
|
+
"route": {"handler": _gen_route, "flags": {"model": True, "public": False}, "usage": "<name> [--model Name] [--public]", "summary": "CRUD route file, secure by default (--public opens writes)"},
|
|
4157
|
+
"base": {"handler": _gen_base, "flags": {}, "usage": "", "summary": "Frond base template + index page + pages/ folder"},
|
|
4158
|
+
"page": {"handler": _gen_page, "flags": {}, "usage": "<name>", "summary": "Page that extends base.twig (auto-creates pages/ + base)"},
|
|
4159
|
+
"crud": {"handler": _gen_crud, "flags": {"fields": True, "table-name": True, "public": False, "no-templates": False, "no-migration": False, "skip-model": False}, "usage": '<Name> [--fields "..."] [--public] [--no-templates] [--skip-model]', "summary": "Model + migration + AutoCrud-backed admin page (to_crud) + editable crud/ templates + gate test"},
|
|
4160
|
+
"migration": {"handler": _gen_migration, "flags": {"fields": True}, "usage": "<description>", "summary": "Timestamped migration file (UP/DOWN)"},
|
|
4161
|
+
"middleware": {"handler": _gen_middleware, "flags": {}, "usage": "<Name>", "summary": "Middleware with before/after hooks"},
|
|
4162
|
+
"test": {"handler": _gen_test, "flags": {"model": True, "public": False}, "usage": "<name> [--model Name]", "summary": "pytest test file"},
|
|
4163
|
+
"form": {"handler": _gen_form, "flags": {"fields": True, "table-name": True}, "usage": '<Name> [--fields "..."]', "summary": "Form template with inputs matching model fields"},
|
|
4164
|
+
"view": {"handler": _gen_view, "flags": {"fields": True, "table-name": True}, "usage": '<Name> [--fields "..."]', "summary": "List + detail view templates"},
|
|
4165
|
+
"auth": {"handler": _gen_auth, "flags": {"fields": True, "table-name": True, "no-migration": False}, "usage": "", "summary": "Login/register routes + User model + templates"},
|
|
4166
|
+
"service": {"handler": _gen_service, "flags": {"every": True, "cron": True}, "usage": '<Name> [--every 5m | --cron "..."]', "summary": "Scheduled ServiceRunner task (src/services/)"},
|
|
4167
|
+
"queue": {"handler": _gen_queue, "flags": {}, "usage": "<topic>", "summary": "Producer + consumer worker (src/services/)"},
|
|
4168
|
+
"validator": {"handler": _gen_validator, "flags": {}, "usage": "<Name>", "summary": "Request-body Validator (src/validators/)"},
|
|
4169
|
+
"seeder": {"handler": _gen_seeder, "flags": {"table-name": True}, "usage": "<Model>", "summary": "FakeData + seed_orm seeder (src/seeds/)"},
|
|
4170
|
+
"websocket": {"handler": _gen_websocket, "flags": {}, "usage": "<path>", "summary": "@websocket handler (src/routes/)"},
|
|
4171
|
+
"listener": {"handler": _gen_listener, "flags": {}, "usage": "<event>", "summary": "@on(event) listener (src/listeners/)"},
|
|
4051
4172
|
}
|
|
4052
4173
|
|
|
4053
4174
|
COMMANDS = {
|
|
4054
|
-
"init": {"handler": _init, "usage": "[dir]", "args": ["dir?"], "summary": "Scaffold a new project"},
|
|
4055
|
-
"serve": {"handler": _serve, "usage": "[--port P] [--no-browser] [--no-reload]", "summary": "Start dev server (default: 0.0.0.0:7146)"},
|
|
4056
|
-
"start": {"handler": _serve, "summary": "Alias for serve"},
|
|
4175
|
+
"init": {"handler": _init, "flags": {"ai": False, "production": False}, "usage": "[dir]", "args": ["dir?"], "summary": "Scaffold a new project"},
|
|
4176
|
+
"serve": {"handler": _serve, "flags": {"port": True, "host": True, "no-browser": False, "no-reload": False, "no-kill": False, "production": False, "managed": False}, "usage": "[--port P] [--no-browser] [--no-reload]", "summary": "Start dev server (default: 0.0.0.0:7146)"},
|
|
4177
|
+
"start": {"handler": _serve, "flags": {"port": True, "host": True, "no-browser": False, "no-reload": False, "no-kill": False, "production": False, "managed": False}, "summary": "Alias for serve"},
|
|
4057
4178
|
"migrate": {"handler": _migrate, "summary": "Run pending database migrations"},
|
|
4058
|
-
"migrate:create": {"handler": _migrate_create, "usage": "<desc>", "args": ["description"], "summary": "Create a new migration file"},
|
|
4179
|
+
"migrate:create": {"handler": _migrate_create, "flags": {"fields": True, "table-name": True, "json": False, "dry-run": False}, "usage": "<desc>", "args": ["description"], "summary": "Create a new migration file"},
|
|
4059
4180
|
"migrate:rollback": {"handler": _migrate_rollback, "summary": "Rollback last migration batch"},
|
|
4060
4181
|
"migrate:status": {"handler": _migrate_status, "summary": "Show migration status"},
|
|
4061
4182
|
"env-migrate": {"handler": _env_migrate, "usage": "[path]", "args": ["path?"], "summary": "Rewrite .env to TINA4_-prefixed names (v3.12 migration)"},
|
|
4062
4183
|
"seed": {"handler": _seed, "summary": "Run database seeders"},
|
|
4063
4184
|
"routes": {"handler": _routes, "summary": "List all registered routes"},
|
|
4064
|
-
"test": {"handler": _test, "summary": "Run test suite"},
|
|
4185
|
+
"test": {"handler": _test, "flags": None, "summary": "Run test suite"},
|
|
4065
4186
|
"queue": {"handler": _queue, "usage": "<work|stats|retry|clear> [topic]", "subcommands": list(_QUEUE_SUBCOMMANDS), "summary": "Run queue workers and manage jobs"},
|
|
4066
|
-
"build": {"handler": _build, "usage": "[--tag NAME] [--file PATH]", "summary": "Build the deployable Docker image"},
|
|
4067
|
-
"lint": {"handler": _lint, "usage": "[--fix] [--no-install]", "summary": "Lint src/ + app.py (installs ruff dev-only on demand; zero-dep syntax baseline with --no-install)"},
|
|
4068
|
-
"ai": {"handler": _ai, "usage": "[--all]", "summary": "Install AI coding assistant context"},
|
|
4187
|
+
"build": {"handler": _build, "flags": {"tag": True, "file": True}, "usage": "[--tag NAME] [--file PATH]", "summary": "Build the deployable Docker image"},
|
|
4188
|
+
"lint": {"handler": _lint, "flags": {"fix": False, "no-install": False}, "usage": "[--fix] [--no-install]", "summary": "Lint src/ + app.py (installs ruff dev-only on demand; zero-dep syntax baseline with --no-install)"},
|
|
4189
|
+
"ai": {"handler": _ai, "flags": {"all": False}, "usage": "[--all]", "summary": "Install AI coding assistant context"},
|
|
4069
4190
|
"generate": {"handler": _generate, "usage": "<what> <name> [options]", "subcommands": list(GENERATORS), "summary": "Generate scaffolding (see Generators below)"},
|
|
4070
4191
|
"console": {"handler": _console, "summary": "Start interactive REPL with framework loaded"},
|
|
4071
|
-
"commands": {"handler": _commands, "usage": "[--json]", "summary": "List available commands (add --json for machine form)"},
|
|
4072
|
-
"help": {"handler": _help, "summary": "Show this help"},
|
|
4192
|
+
"commands": {"handler": _commands, "flags": {"json": False}, "usage": "[--json]", "summary": "List available commands (add --json for machine form)"},
|
|
4193
|
+
"help": {"handler": _help, "flags": None, "summary": "Show this help"},
|
|
4073
4194
|
}
|
|
4074
4195
|
|
|
4075
4196
|
# Commands the `tina4` client OWNS and this CLI reaches by delegation — see the
|
|
@@ -589,6 +589,7 @@ class SecurityHeadersMiddleware:
|
|
|
589
589
|
TINA4_CSP — Content-Security-Policy (default: "default-src 'self'")
|
|
590
590
|
TINA4_REFERRER_POLICY — Referrer-Policy (default: strict-origin-when-cross-origin)
|
|
591
591
|
TINA4_PERMISSIONS_POLICY — Permissions-Policy (default: camera=(), microphone=(), geolocation=())
|
|
592
|
+
TINA4_COOP — Cross-Origin-Opener-Policy (default: same-origin-allow-popups)
|
|
592
593
|
"""
|
|
593
594
|
|
|
594
595
|
@staticmethod
|
|
@@ -647,6 +648,20 @@ class SecurityHeadersMiddleware:
|
|
|
647
648
|
"camera=(), microphone=(), geolocation=()",
|
|
648
649
|
),
|
|
649
650
|
)
|
|
651
|
+
# Cross-Origin-Opener-Policy severs the window-reference link to a
|
|
652
|
+
# cross-origin page, closing reverse-tab-nabbing and cross-window
|
|
653
|
+
# XS-Leaks that X-Frame-Options (framing only) does not. The default is
|
|
654
|
+
# same-origin-allow-popups, NOT same-origin: it isolates the page from
|
|
655
|
+
# whoever opened it while still letting the page talk to popups IT opens,
|
|
656
|
+
# so an OAuth / OIDC / payment popup that posts a token back to its opener
|
|
657
|
+
# keeps working out of the box. Set TINA4_COOP=same-origin for full
|
|
658
|
+
# isolation (the switch, with COEP, for crossOriginIsolated), or
|
|
659
|
+
# unsafe-none to opt out. Honoured only in a secure context — so it
|
|
660
|
+
# applies on https and on http://localhost, and is inert elsewhere.
|
|
661
|
+
response.header(
|
|
662
|
+
"Cross-Origin-Opener-Policy",
|
|
663
|
+
os.environ.get("TINA4_COOP", "same-origin-allow-popups"),
|
|
664
|
+
)
|
|
650
665
|
|
|
651
666
|
return request, response
|
|
652
667
|
|