@brightsideoy/kama 0.1.0-alpha.143 → 0.1.0-alpha.145
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/.wrangler/state/v3/cache/default/blobs/4de32ec3e619aa3f9acad3fb1a2528209381347d1cbb86e939e08724f5b35bc4000001a0b2b5b216 +0 -0
- package/.wrangler/state/v3/cache/default/blobs/5f895e5810a26a6319bbadde9d751e5b10faae6e141db1c454c5f53b3e725591000001a0b2b624a4 +0 -0
- package/.wrangler/state/v3/cache/default/blobs/74744186327d8aaf1c6078e50bc561135fd90690c96bd4b733035d0cb3fedb94000001a0b2b5be6b +0 -0
- package/.wrangler/state/v3/cache/default/blobs/79c1c81c1ddcd49f49eb27b9197ae0160c3a7981f308aee2ae972653de1b3668000001a0b2b60e76 +0 -0
- package/.wrangler/state/v3/cache/default/blobs/7cd29a3bd95a88e7e896a4ae253758cd9e4bde78fc371077f3fef974cd11c64d000001a0b098ff88 +0 -0
- package/.wrangler/state/v3/cache/default/blobs/7ecc4caad58c7ee119c02adb84132eaa691b9a171f932ab1c17e0f95c3fed2a8000001a0b2b5bf5e +0 -0
- package/.wrangler/state/v3/cache/default/blobs/81928c274111d2c3cbd3d7174136a2fdce83e267da8f8d0caf60d650396197f5000001a0b098de9d +0 -0
- package/.wrangler/state/v3/cache/default/blobs/8c3aa6f6625d7c0d682cb498e6715355aec1905909b04ead5e85adbca3989b19000001a0b098e4ac +0 -0
- package/.wrangler/state/v3/cache/default/blobs/97205d84c3e4399f6f51295e8381b21f2a8810cdaecc0ab13f2cadf712fae5f4000001a0b339609d +0 -0
- package/.wrangler/state/v3/cache/default/blobs/b48d02100b8f1a9520a209628a0778a0f9e0f4ce0643f8d59b3888bbd0f85fc2000001a0b2b63647 +0 -0
- package/.wrangler/state/v3/cache/default/blobs/cf30c018e70dad1c6859277e4361da657b79adf34e60cb05885eb32951fbbafc000001a0b09b168f +0 -0
- package/.wrangler/state/v3/cache/default/blobs/d0d796d0fe4efd55f61e0c3b8d30170a89703669a52854687186a66304adbf8a000001a0b2b6244d +0 -0
- package/.wrangler/state/v3/cache/miniflare-CacheObject/9f458c07675338a7426a7b81ac4fb1baf92d034efbcaaf4336379640ed744ded.sqlite +0 -0
- package/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite +0 -0
- package/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite-shm +0 -0
- package/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite-wal +0 -0
- package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/7cfce387cae19c0dfbb9cc4f2a9c353f60ca0a80fabd0b2e2837d152b58feaaa.sqlite +0 -0
- package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/metadata.sqlite +0 -0
- package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/metadata.sqlite-shm +0 -0
- package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/metadata.sqlite-wal +0 -0
- package/.wrangler/state/v3/kv/miniflare-KVNamespaceObject/metadata.sqlite +0 -0
- package/.wrangler/state/v3/kv/miniflare-KVNamespaceObject/metadata.sqlite-shm +0 -0
- package/.wrangler/state/v3/kv/miniflare-KVNamespaceObject/metadata.sqlite-wal +0 -0
- package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite +0 -0
- package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-shm +0 -0
- package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-wal +0 -0
- package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/metadata.sqlite +0 -0
- package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/metadata.sqlite-shm +0 -0
- package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/metadata.sqlite-wal +0 -0
- package/.wrangler/state/v3/r2/kama-media/blobs/1c7705701fba41f9a2683025d40393711daffc55d32172088a62d8999017e9c6000001a0b339607a +0 -0
- package/.wrangler/state/v3/r2/kama-media/blobs/1ee266c53f586a4a57a1d21be291e34bb2e2236c15e43ae30497f6054290f01d000001a0b2b6248c +0 -0
- package/.wrangler/state/v3/r2/kama-media/blobs/6db1f8204b6d125f0911b3e42022258cc7e1c37a95c2ce7f5c7f14da31d408ec000001a0b2b60e1f +0 -0
- package/.wrangler/state/v3/r2/kama-media/blobs/97b86f251c5d30df5e1eab8662cab83f5f7c4583ad14fd2d5ea99f16fdcfd6ef000001a0b2b62482 +0 -0
- package/.wrangler/state/v3/r2/miniflare-R2BucketObject/9ffe30cff37d40b366f64100a8f041c0a1e5aee78708ba90b9ef4ca6a6b2d883.sqlite +0 -0
- package/.wrangler/state/v3/r2/miniflare-R2BucketObject/metadata.sqlite +0 -0
- package/.wrangler/state/v3/r2/miniflare-R2BucketObject/metadata.sqlite-shm +0 -0
- package/.wrangler/state/v3/r2/miniflare-R2BucketObject/metadata.sqlite-wal +0 -0
- package/README.md +16 -37
- package/bin/cli.js +187 -139
- package/definitions/_page.yaml +52 -0
- package/dist/assets/index-BSBvGvQz.css +1 -0
- package/dist/assets/index-RzfH6iq3.js +162 -0
- package/dist/dist-CZEgSuN0.js +8674 -0
- package/dist/index.html +2 -2
- package/dist/index.js +6857 -11240
- package/dist/schema-compiler.js +38 -0
- package/npm-test.sh +75 -0
- package/package.json +14 -10
- package/schema.sql +3 -2
- package/templates/astro-starter/src/components/blocks/ImageBlock.astro +20 -56
- package/templates/astro-starter/src/components/global/Header.astro +19 -12
- package/templates/astro-starter/src/components/ui/KamaImage.astro +49 -73
- package/templates/astro-starter/src/pages/[...slug].astro +16 -43
- package/templates/astro-starter/src/pages/media/[...path].ts +8 -1
- package/wrangler.json +22 -0
- package/dist/assets/index-BcbVkck_.js +0 -162
- package/dist/assets/index-Bv7fPRX7.css +0 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/README.md
CHANGED
|
@@ -81,67 +81,46 @@ KAMA doesn't just serve content; it actively manages its lifecycle across the gl
|
|
|
81
81
|
|
|
82
82
|
At the heart of KAMA is the Schema Engine. Instead of complex database migrations, you define your content models, layouts, and reusable blocks in simple YAML files. KAMA dynamically bundles these definitions at build-time to auto-generate your entire Admin UI, database indexes, and API endpoints.
|
|
83
83
|
|
|
84
|
-
**[Read the full Schema Documentation here](
|
|
84
|
+
**[Read the full Schema Documentation here](documentation/SCHEMAS.md)**
|
|
85
85
|
|
|
86
86
|
<br>
|
|
87
87
|
|
|
88
88
|
## Getting Started
|
|
89
89
|
|
|
90
|
-
KAMA comes with
|
|
90
|
+
KAMA comes with a scaffolding CLI to instantly spin up a full monorepo (Backend + Astro Frontend).
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Run the KAMA CLI to start the workspace wizard:
|
|
92
|
+
## 1. Initialize a Workspace
|
|
95
93
|
|
|
96
94
|
```bash
|
|
97
|
-
npx kama
|
|
95
|
+
npx @brightsideoy/kama@alpha
|
|
98
96
|
```
|
|
99
97
|
|
|
100
|
-
|
|
98
|
+
Select **"Kickstart new KAMA Monorepo"**. The CLI will automatically:
|
|
101
99
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
100
|
+
- Authenticate with Cloudflare (if deploying to the Edge).
|
|
101
|
+
- Create a new D1 database (or local SQLite equivalent).
|
|
102
|
+
- Bind your R2 media buckets.
|
|
103
|
+
- Setup the Worker backend and Astro frontend.
|
|
106
104
|
|
|
107
|
-
|
|
105
|
+
## 2. Local Development
|
|
108
106
|
|
|
109
|
-
Start the
|
|
107
|
+
Start the backend and frontend simultaneously on your local machine:
|
|
110
108
|
|
|
111
109
|
```bash
|
|
112
110
|
npm run dev:cms
|
|
113
111
|
```
|
|
114
112
|
|
|
115
|
-
This
|
|
116
|
-
|
|
117
|
-
### 3. Management Commands\*\*
|
|
118
|
-
|
|
119
|
-
You can run CLI commands anytime inside your workspace.
|
|
120
|
-
|
|
121
|
-
#### Add a New Astro Frontend Site
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
npx kama add site
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
#### Promote a Local Workspace to Cloudflare Edge
|
|
128
|
-
|
|
129
|
-
Convert a local offline workspace to Cloudflare Edge (auto-links domains & D1 databases):
|
|
113
|
+
This bundles your local YAML schemas, syncs the local SQLite/D1 database, and starts the Wrangler dev server on your localhost.
|
|
130
114
|
|
|
131
|
-
|
|
132
|
-
npx kama promote
|
|
133
|
-
```
|
|
115
|
+
## 3. Deploy
|
|
134
116
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Deploy your CMS engine, content definitions, and database migrations to Cloudflare Edge:
|
|
117
|
+
Push your API, schemas, and database migrations to Cloudflare's global network, or package it for your virtual server:
|
|
138
118
|
|
|
139
119
|
```bash
|
|
140
120
|
npm run deploy:cms
|
|
141
121
|
```
|
|
142
122
|
|
|
143
|
-
>
|
|
144
|
-
> <br>
|
|
123
|
+
<br>
|
|
145
124
|
|
|
146
125
|
## Directory Structure Overview
|
|
147
126
|
|
|
@@ -155,7 +134,7 @@ my-kama-workspace/
|
|
|
155
134
|
│ ├── nodes/ # e.g., page.yaml, product.yaml
|
|
156
135
|
│ ├── blocks/ # e.g., hero.yaml, image_card.yaml
|
|
157
136
|
│ └── node-layouts/ # e.g., two-column.yaml
|
|
158
|
-
├──
|
|
137
|
+
├── cms-worker/ # 👉 BACKEND PIPELINE
|
|
159
138
|
│ ├── index.js # Worker entrypoint (ES Module)
|
|
160
139
|
│ ├── wrangler.json # Bindings (D1, R2, Vars)
|
|
161
140
|
│ └── package.json
|