caspian-utils 0.1.22 → 0.1.24
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.
- package/dist/docs/auth.md +2 -2
- package/dist/docs/testing.md +8 -4
- package/package.json +1 -1
package/dist/docs/auth.md
CHANGED
|
@@ -747,7 +747,7 @@ Minimal sign-in button:
|
|
|
747
747
|
<a href="/api/auth/signin/github">Continue with GitHub</a>
|
|
748
748
|
```
|
|
749
749
|
|
|
750
|
-
Do not reinvent this flow. When a task asks for Google or GitHub login, do not add `authlib`, a hand-written `
|
|
750
|
+
Do not reinvent this flow. When a task asks for Google or GitHub login, do not add `authlib`, a hand-written `httpx2` token-exchange, a parallel session writer, or custom `/callback` route handlers. The shipped providers plus `auth.auth_providers(...)` already perform the redirect, the code exchange, payload normalization, `auth.sign_in(...)`, and the post-login redirect to `default_signin_redirect`. Reuse them and keep credentials in `.env`.
|
|
751
751
|
|
|
752
752
|
Available provider classes:
|
|
753
753
|
|
|
@@ -758,7 +758,7 @@ The current `auth.auth_providers(*providers)` implementation:
|
|
|
758
758
|
|
|
759
759
|
- redirects to the provider when the request path contains `signin/google` or `signin/github`
|
|
760
760
|
- handles callbacks when the path contains `callback/google` or `callback/github` and a `code` query parameter is present
|
|
761
|
-
- exchanges the code with the provider using `
|
|
761
|
+
- exchanges the code with the provider using `httpx2`
|
|
762
762
|
- builds a normalized user payload
|
|
763
763
|
- signs the user in with the provider's `max_age`
|
|
764
764
|
- redirects to `default_signin_redirect` on success
|
package/dist/docs/testing.md
CHANGED
|
@@ -67,7 +67,9 @@ testpaths = ["tests"]
|
|
|
67
67
|
addopts = "-q"
|
|
68
68
|
|
|
69
69
|
[tool.ruff]
|
|
70
|
-
|
|
70
|
+
# `settings/*.py` (not just `settings/check.py`) so every orchestrator script —
|
|
71
|
+
# `check.py`, `fix.py`, `_component_imports.py` — is linted, not just the entrypoint.
|
|
72
|
+
include = ["main.py", "src/**/*.py", "tests/**/*.py", "settings/*.py"]
|
|
71
73
|
extend-exclude = [".venv", "node_modules"]
|
|
72
74
|
|
|
73
75
|
[tool.ruff.lint]
|
|
@@ -82,9 +84,11 @@ include = ["main.py", "src"]
|
|
|
82
84
|
exclude = [".venv", "node_modules", "**/__pycache__"]
|
|
83
85
|
# `basic` is Pylance's default mode. It catches reportArgumentType-style bugs
|
|
84
86
|
# (e.g. passing a dict[str, str | None] to a TypedDict whose field is `str`)
|
|
85
|
-
# without flooding the gate with strict-mode noise.
|
|
86
|
-
#
|
|
87
|
-
#
|
|
87
|
+
# without flooding the gate with strict-mode noise. Note this `include`/`exclude`
|
|
88
|
+
# pair analyzes everything under `src`, including the generated Prisma Python ORM
|
|
89
|
+
# in `src/lib/prisma/**`; `basic` mode (plus the optional suppressions below)
|
|
90
|
+
# keeps its Optional-everywhere models from dominating the gate. If that ORM still
|
|
91
|
+
# produces too much noise, add `"src/lib/prisma"` to `exclude` explicitly.
|
|
88
92
|
pythonPlatform = "Windows" # or Linux/Darwin to match the deploy target
|
|
89
93
|
typeCheckingMode = "basic"
|
|
90
94
|
# Mirror suppressions from older pyrefly-based setups if you migrated; otherwise
|