create-caspian-app 0.0.5 → 0.0.7
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/LICENSE.md +21 -0
- package/README.md +8 -7
- package/dist/main.py +2 -1
- package/dist/src/app/layout.html +1 -1
- package/package.json +1 -1
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jefferson Abraham
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -29,7 +29,8 @@ Example prompts you’ll see in the wizard:
|
|
|
29
29
|
- Project name
|
|
30
30
|
- Tailwind CSS
|
|
31
31
|
- Prisma ORM
|
|
32
|
-
-
|
|
32
|
+
- Backend only (no frontend assets)
|
|
33
|
+
- TypeScript support
|
|
33
34
|
|
|
34
35
|
### 3) Run dev server
|
|
35
36
|
|
|
@@ -240,9 +241,9 @@ Decorate `async def` functions with `@rpc`, then call them from the client using
|
|
|
240
241
|
**Backend (`src/app/todos/index.py`)**
|
|
241
242
|
|
|
242
243
|
```py
|
|
243
|
-
from
|
|
244
|
-
from
|
|
245
|
-
from lib.prisma.db import prisma
|
|
244
|
+
from casp.rpc import rpc
|
|
245
|
+
from casp.validate import Validate
|
|
246
|
+
from src.lib.prisma.db import prisma
|
|
246
247
|
|
|
247
248
|
@rpc()
|
|
248
249
|
async def create_todo(title):
|
|
@@ -312,7 +313,7 @@ model Post {
|
|
|
312
313
|
### Client usage
|
|
313
314
|
|
|
314
315
|
```py
|
|
315
|
-
from lib.prisma.db import prisma
|
|
316
|
+
from src.lib.prisma.db import prisma
|
|
316
317
|
|
|
317
318
|
users = prisma.user.find_many()
|
|
318
319
|
```
|
|
@@ -325,9 +326,9 @@ The docs also describe connection pooling and common CRUD patterns (create, find
|
|
|
325
326
|
|
|
326
327
|
Caspian includes session-based authentication with HttpOnly cookies and RBAC-friendly conventions.
|
|
327
328
|
|
|
328
|
-
**Configure auth in `
|
|
329
|
+
**Configure auth in `main.py`**
|
|
329
330
|
|
|
330
|
-
- global protection toggle (`
|
|
331
|
+
- global protection toggle (`is_all_routes_private`)
|
|
331
332
|
- public routes whitelist
|
|
332
333
|
- auth routes (signin/signup)
|
|
333
334
|
- default redirects
|
package/dist/main.py
CHANGED
|
@@ -395,7 +395,8 @@ def register_single_route(url_pattern: str, file_path: str):
|
|
|
395
395
|
route_dir,
|
|
396
396
|
title,
|
|
397
397
|
description,
|
|
398
|
-
context_data=full_context
|
|
398
|
+
context_data=full_context,
|
|
399
|
+
component_compiler=transform_components
|
|
399
400
|
)
|
|
400
401
|
|
|
401
402
|
html_output = transform_scripts(html_output)
|
package/dist/src/app/layout.html
CHANGED