includio-cms 0.14.6 → 0.15.0
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/CHANGELOG.md +25 -0
- package/DOCS.md +45 -1
- package/ROADMAP.md +23 -2
- package/dist/admin/auth-client.d.ts +42 -42
- package/dist/admin/client/entry/entry.svelte +1 -0
- package/dist/admin/client/index.d.ts +6 -0
- package/dist/admin/client/index.js +6 -0
- package/dist/admin/client/shop/shipping-method-edit-page.svelte +113 -0
- package/dist/admin/client/shop/shipping-method-edit-page.svelte.d.ts +3 -0
- package/dist/admin/client/shop/shipping-method-form.svelte +244 -0
- package/dist/admin/client/shop/shipping-method-form.svelte.d.ts +37 -0
- package/dist/admin/client/shop/shipping-method-new-page.svelte +47 -0
- package/dist/admin/client/shop/shipping-method-new-page.svelte.d.ts +3 -0
- package/dist/admin/client/shop/shipping-methods-list-page.svelte +172 -0
- package/dist/admin/client/shop/shipping-methods-list-page.svelte.d.ts +3 -0
- package/dist/admin/client/shop/shop-order-detail-page.svelte +332 -0
- package/dist/admin/client/shop/shop-order-detail-page.svelte.d.ts +3 -0
- package/dist/admin/client/shop/shop-orders-list-page.svelte +150 -0
- package/dist/admin/client/shop/shop-orders-list-page.svelte.d.ts +3 -0
- package/dist/admin/client/shop/shop-products-list-page.svelte +157 -0
- package/dist/admin/client/shop/shop-products-list-page.svelte.d.ts +3 -0
- package/dist/admin/components/fields/field-renderer.svelte +4 -2
- package/dist/admin/components/fields/shop-field.svelte +298 -0
- package/dist/admin/components/fields/shop-field.svelte.d.ts +7 -0
- package/dist/admin/components/layout/app-sidebar.svelte +2 -0
- package/dist/admin/components/layout/lang.d.ts +6 -0
- package/dist/admin/components/layout/lang.js +12 -0
- package/dist/admin/components/layout/nav-shop.svelte +55 -0
- package/dist/admin/components/layout/nav-shop.svelte.d.ts +3 -0
- package/dist/admin/remote/index.d.ts +1 -0
- package/dist/admin/remote/index.js +1 -0
- package/dist/admin/remote/shop.remote.d.ts +244 -0
- package/dist/admin/remote/shop.remote.js +153 -0
- package/dist/cli/scaffold/admin.js +84 -0
- package/dist/core/cms.d.ts +2 -0
- package/dist/core/cms.js +2 -0
- package/dist/core/fields/fieldSchemaToTs.js +5 -0
- package/dist/core/server/entries/operations/get.js +3 -3
- package/dist/core/server/fields/populateEntry.d.ts +1 -1
- package/dist/core/server/fields/populateEntry.js +3 -1
- package/dist/core/server/generator/fields.js +14 -0
- package/dist/core/server/generator/generator.js +13 -0
- package/dist/db-postgres/schema/index.d.ts +1 -0
- package/dist/db-postgres/schema/index.js +1 -0
- package/dist/db-postgres/schema/shop/index.d.ts +8 -0
- package/dist/db-postgres/schema/shop/index.js +8 -0
- package/dist/db-postgres/schema/shop/order.d.ts +396 -0
- package/dist/db-postgres/schema/shop/order.js +28 -0
- package/dist/db-postgres/schema/shop/orderItem.d.ts +179 -0
- package/dist/db-postgres/schema/shop/orderItem.js +20 -0
- package/dist/db-postgres/schema/shop/orderStatusHistory.d.ts +112 -0
- package/dist/db-postgres/schema/shop/orderStatusHistory.js +12 -0
- package/dist/db-postgres/schema/shop/payment.d.ts +180 -0
- package/dist/db-postgres/schema/shop/payment.js +16 -0
- package/dist/db-postgres/schema/shop/product.d.ts +143 -0
- package/dist/db-postgres/schema/shop/product.js +15 -0
- package/dist/db-postgres/schema/shop/productVariant.d.ts +164 -0
- package/dist/db-postgres/schema/shop/productVariant.js +15 -0
- package/dist/db-postgres/schema/shop/shippingMethod.d.ts +190 -0
- package/dist/db-postgres/schema/shop/shippingMethod.js +13 -0
- package/dist/db-postgres/schema/shop/stockReservation.d.ts +109 -0
- package/dist/db-postgres/schema/shop/stockReservation.js +13 -0
- package/dist/db-postgres/schema-core.d.ts +9 -0
- package/dist/db-postgres/schema-core.js +9 -0
- package/dist/db-postgres/schema-shop.d.ts +1 -0
- package/dist/db-postgres/schema-shop.js +1 -0
- package/dist/email-nodemailer/index.d.ts +2 -9
- package/dist/shop/adapters/manual/index.d.ts +10 -0
- package/dist/shop/adapters/manual/index.js +16 -0
- package/dist/shop/cart/cookie.d.ts +8 -0
- package/dist/shop/cart/cookie.js +84 -0
- package/dist/shop/cart/types.d.ts +42 -0
- package/dist/shop/cart/types.js +1 -0
- package/dist/shop/client/index.d.ts +59 -0
- package/dist/shop/client/index.js +40 -0
- package/dist/shop/http/cart-handler.d.ts +7 -0
- package/dist/shop/http/cart-handler.js +88 -0
- package/dist/shop/http/checkout-handler.d.ts +4 -0
- package/dist/shop/http/checkout-handler.js +100 -0
- package/dist/shop/http/index.d.ts +3 -0
- package/dist/shop/http/index.js +3 -0
- package/dist/shop/http/shipping-handler.d.ts +4 -0
- package/dist/shop/http/shipping-handler.js +31 -0
- package/dist/shop/index.d.ts +4 -0
- package/dist/shop/index.js +17 -0
- package/dist/shop/pricing.d.ts +15 -0
- package/dist/shop/pricing.js +31 -0
- package/dist/shop/rate-limit.d.ts +9 -0
- package/dist/shop/rate-limit.js +28 -0
- package/dist/shop/server/cart-hydrate.d.ts +4 -0
- package/dist/shop/server/cart-hydrate.js +172 -0
- package/dist/shop/server/db.d.ts +4 -0
- package/dist/shop/server/db.js +16 -0
- package/dist/shop/server/email.d.ts +2 -0
- package/dist/shop/server/email.js +138 -0
- package/dist/shop/server/order-number.d.ts +5 -0
- package/dist/shop/server/order-number.js +15 -0
- package/dist/shop/server/orders.d.ts +45 -0
- package/dist/shop/server/orders.js +293 -0
- package/dist/shop/server/populate.d.ts +15 -0
- package/dist/shop/server/populate.js +39 -0
- package/dist/shop/server/shipping.d.ts +37 -0
- package/dist/shop/server/shipping.js +111 -0
- package/dist/shop/server/shop-data.d.ts +51 -0
- package/dist/shop/server/shop-data.js +186 -0
- package/dist/shop/services/cart.service.d.ts +38 -0
- package/dist/shop/services/cart.service.js +1 -0
- package/dist/shop/services/email.service.d.ts +6 -0
- package/dist/shop/services/email.service.js +1 -0
- package/dist/shop/services/index.d.ts +6 -0
- package/dist/shop/services/index.js +1 -0
- package/dist/shop/services/orders.service.d.ts +34 -0
- package/dist/shop/services/orders.service.js +1 -0
- package/dist/shop/services/payment.service.d.ts +7 -0
- package/dist/shop/services/payment.service.js +1 -0
- package/dist/shop/services/products.service.d.ts +31 -0
- package/dist/shop/services/products.service.js +1 -0
- package/dist/shop/services/shipping.service.d.ts +23 -0
- package/dist/shop/services/shipping.service.js +1 -0
- package/dist/shop/types.d.ts +72 -0
- package/dist/shop/types.js +1 -0
- package/dist/types/cms.d.ts +3 -0
- package/dist/types/fields.d.ts +18 -2
- package/dist/updates/0.15.0/index.d.ts +2 -0
- package/dist/updates/0.15.0/index.js +25 -0
- package/dist/updates/index.js +2 -1
- package/package.json +27 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to includio-cms are documented here.
|
|
4
4
|
Generated from `src/lib/updates/` — do not edit manually.
|
|
5
5
|
|
|
6
|
+
## 0.15.0 — 2026-04-14
|
|
7
|
+
|
|
8
|
+
Shop module MVP — headless e-commerce: products, cart, orders, payments, emails
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- New optional `shop` module — activate via `defineShop()` in `cms.config.ts`
|
|
12
|
+
- Product = CMS entry + built-in `shop` field (like `seo`) — add `{ type: "shop", slug: "shop" }` to any collection to make its entries purchasable. Shop data lives in `shop_products` (keyed by entry_id FK cascade), never in entry JSON
|
|
13
|
+
- Runtime `schema.ts` generator — auto-emits `src/lib/cms/runtime/schema.ts` combining core + auth + shop tables; point your `drizzle.config.ts` schema field at it, then `pnpm drizzle-kit push`
|
|
14
|
+
- Entry edit panel shows Shop section with net/gross toggle + live VAT preview; optional variants (auto default variant when disabled) and per-variant stock
|
|
15
|
+
- Shop admin: list of all shoppable entries across collections, list+drag-n-drop reorder for shipping methods, full orders list + detail with status history, change status, resend status email
|
|
16
|
+
- Headless cart (signed cookie) with server-hydrated totals — `POST/PATCH/DELETE /api/shop/cart` + typed `createShopClient()` SDK
|
|
17
|
+
- Checkout endpoint `POST /api/shop/checkout` — creates order from cart with consent validation, stock reservation (30-min TTL, released on cancel/reject, consumed on paid), and status emails
|
|
18
|
+
- Payment adapter interface + `manualAdapter()` for bank transfer / COD (order stays in `awaitingPayment` until admin marks paid)
|
|
19
|
+
- Shipping methods — admin CRUD with free-above threshold, carrier-agnostic (InPost/Stripe etc. slotted as adapters in later 0.15.x patches)
|
|
20
|
+
- Feature flags `variants`, `stock`, `accounts` — off by default; enable per project
|
|
21
|
+
- Rate-limit middleware on checkout + webhook endpoints
|
|
22
|
+
- Status-change emails rendered inline (PL/EN), sent via existing `EmailAdapter` — no new dependency
|
|
23
|
+
- Order numbers: random Crockford base32 (`XXXXX-XXXXX`) — unguessable
|
|
24
|
+
- CLI scaffold includes all shop routes (admin pages + public API stubs) — run `scaffoldAdmin()` to provision them in your consumer app
|
|
25
|
+
- `nodemailerAdapter` — `transportOptions` now typed as full `SMTPTransport.Options`, unlocking OAuth2 (Gmail etc.), pooled connections and all native Nodemailer options
|
|
26
|
+
|
|
27
|
+
### Notes
|
|
28
|
+
|
|
29
|
+
Headless e-commerce MVP. Stripe (0.15.1), PayU (0.15.2) and InPost geowidget (0.15.3) ship as optional adapters in follow-up patches. Consumer UI (cart drawer, checkout forms, success screens) is built in the app — shop only exposes the API and admin.
|
|
30
|
+
|
|
6
31
|
## 0.14.6 — 2026-04-13
|
|
7
32
|
|
|
8
33
|
Admin page titles — meaningful <title> in every admin route
|
package/DOCS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Includio CMS Documentation (v0.
|
|
1
|
+
# Includio CMS Documentation (v0.15.0)
|
|
2
2
|
|
|
3
3
|
> This file is auto-generated from the docs site. For the latest version, update the package.
|
|
4
4
|
|
|
@@ -3240,6 +3240,10 @@ interface SendMailOptions {
|
|
|
3240
3240
|
|
|
3241
3241
|
## Built-in: Nodemailer
|
|
3242
3242
|
|
|
3243
|
+
`transportOptions` accepts the full Nodemailer `SMTPTransport.Options` type, so anything Nodemailer supports works — classic SMTP, OAuth2, pooled connections, TLS options, etc.
|
|
3244
|
+
|
|
3245
|
+
### SMTP with user/password
|
|
3246
|
+
|
|
3243
3247
|
```typescript
|
|
3244
3248
|
import { nodemailerAdapter } from 'includio-cms/email-nodemailer';
|
|
3245
3249
|
|
|
@@ -3257,6 +3261,46 @@ email: nodemailerAdapter({
|
|
|
3257
3261
|
})
|
|
3258
3262
|
```
|
|
3259
3263
|
|
|
3264
|
+
### OAuth2 (generic)
|
|
3265
|
+
|
|
3266
|
+
```typescript
|
|
3267
|
+
email: nodemailerAdapter({
|
|
3268
|
+
defaultFromAddress: 'noreply@example.com',
|
|
3269
|
+
defaultFromName: 'My Site',
|
|
3270
|
+
transportOptions: {
|
|
3271
|
+
host: 'smtp.example.com',
|
|
3272
|
+
port: 465,
|
|
3273
|
+
secure: true,
|
|
3274
|
+
auth: {
|
|
3275
|
+
type: 'OAuth2',
|
|
3276
|
+
user: 'noreply@example.com',
|
|
3277
|
+
clientId: process.env.OAUTH_CLIENT_ID,
|
|
3278
|
+
clientSecret: process.env.OAUTH_CLIENT_SECRET,
|
|
3279
|
+
refreshToken: process.env.OAUTH_REFRESH_TOKEN
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
})
|
|
3283
|
+
```
|
|
3284
|
+
|
|
3285
|
+
### OAuth2 (Gmail)
|
|
3286
|
+
|
|
3287
|
+
```typescript
|
|
3288
|
+
email: nodemailerAdapter({
|
|
3289
|
+
defaultFromAddress: 'noreply@gmail.com',
|
|
3290
|
+
defaultFromName: 'My Site',
|
|
3291
|
+
transportOptions: {
|
|
3292
|
+
service: 'gmail',
|
|
3293
|
+
auth: {
|
|
3294
|
+
type: 'OAuth2',
|
|
3295
|
+
user: 'noreply@gmail.com',
|
|
3296
|
+
clientId: process.env.GOOGLE_CLIENT_ID,
|
|
3297
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
|
|
3298
|
+
refreshToken: process.env.GOOGLE_REFRESH_TOKEN
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
})
|
|
3302
|
+
```
|
|
3303
|
+
|
|
3260
3304
|
> **Transactional Email:** For production, use a transactional email service (SendGrid, Postmark, Resend, etc). Implement the `EmailAdapter` interface with their SDK.
|
|
3261
3305
|
|
|
3262
3306
|
## Custom Adapter Example
|
package/ROADMAP.md
CHANGED
|
@@ -287,14 +287,35 @@
|
|
|
287
287
|
- [x] `[feature]` `[P2]` Manual poster regeneration in media library file details <!-- files: src/lib/core/server/media/operations/regenerateVideoPoster.ts, src/lib/admin/components/media/file/file-details.svelte -->
|
|
288
288
|
- [x] `[feature]` `[P2]` Config flag `sidebarHelp` to hide admin sidebar Help link (default true) <!-- files: src/lib/types/cms.ts, src/lib/core/cms.ts, src/routes/admin/(afterLogin)/+layout.server.ts, src/lib/admin/components/layout/nav-footer.svelte -->
|
|
289
289
|
|
|
290
|
-
## 0.15.0 —
|
|
290
|
+
## 0.15.0 — Shop MVP (headless e-commerce)
|
|
291
|
+
|
|
292
|
+
- [x] `[feature]` `[P0]` Scaffold: `defineShop`, types, CMSConfig slot, package export `./shop` <!-- files: src/lib/shop/index.ts, src/lib/shop/types.ts -->
|
|
293
|
+
- [x] `[feature]` `[P0]` Drizzle tables: products (entry-backed), variants, orders, order items, status history, payments, shipping methods, stock reservations <!-- files: src/lib/db-postgres/schema/shop/ -->
|
|
294
|
+
- [x] `[feature]` `[P0]` Runtime `schema.ts` generator for drizzle-kit (core + auth + optional shop) <!-- files: src/lib/core/server/generator/generator.ts, src/lib/db-postgres/schema-core.ts, src/lib/db-postgres/schema-shop.ts -->
|
|
295
|
+
- [x] `[feature]` `[P0]` Rate-limit middleware (checkout/webhook) <!-- files: src/lib/shop/rate-limit.ts -->
|
|
296
|
+
- [x] `[feature]` `[P0]` Built-in `shop` field type — makes entries purchasable, auto-hydrated via populateEntryData <!-- files: src/lib/admin/components/fields/shop-field.svelte, src/lib/shop/server/populate.ts -->
|
|
297
|
+
- [x] `[feature]` `[P0]` Net/gross price toggle + live VAT preview in shop field and shipping form
|
|
298
|
+
- [x] `[feature]` `[P0]` Auto default variant on upsert — cart/order always reference variantId
|
|
299
|
+
- [x] `[feature]` `[P0]` Shop admin: products list (JOIN entries × shop_products), shipping methods CRUD with drag-n-drop reorder + free-above threshold
|
|
300
|
+
- [x] `[feature]` `[P0]` Cart (signed cookie) service + `/api/shop/cart` REST + headless SDK `createShopClient()` <!-- files: src/lib/shop/cart/, src/lib/shop/client/ -->
|
|
301
|
+
- [x] `[feature]` `[P0]` Orders + checkout + `manualAdapter` + status emails (inline HTML, PL/EN) <!-- files: src/lib/shop/server/orders.ts, src/lib/shop/http/checkout-handler.ts -->
|
|
302
|
+
- [x] `[feature]` `[P0]` Stock reservation with 30-min TTL — released on cancel/reject, consumed on paid
|
|
303
|
+
- [x] `[feature]` `[P0]` Admin orders view — list (status + email filter), detail (items, history, customer/address/consents, change status, resend email)
|
|
304
|
+
- [x] `[feature]` `[P0]` Random Crockford base32 order numbers (`XXXXX-XXXXX`), unguessable
|
|
305
|
+
- [x] `[feature]` `[P0]` CLI scaffold provisions all shop routes (admin + public API) in consumer app
|
|
306
|
+
- [ ] `[feature]` `[P1]` Stripe payment adapter + webhook — deferred to 0.15.1
|
|
307
|
+
- [ ] `[feature]` `[P1]` PayU payment adapter + webhook — deferred to 0.15.2
|
|
308
|
+
- [ ] `[feature]` `[P2]` InPost carrier adapter (headless geowidget config) — deferred to 0.15.3
|
|
309
|
+
- [x] `[feature]` `[P2]` `nodemailerAdapter` — typowanie `transportOptions` jako `SMTPTransport.Options` (OAuth2, pool, itd.)
|
|
310
|
+
|
|
311
|
+
## 0.16.0 — SEO module
|
|
291
312
|
|
|
292
313
|
- [ ] `[feature]` `[P1]` SERP preview + character limits for title/description <!-- files: src/lib/admin/components/fields/seo-field.svelte -->
|
|
293
314
|
- [ ] `[feature]` `[P1]` Global SEO settings
|
|
294
315
|
- [ ] `[feature]` `[P1]` Dedicated frontend SEO components <!-- files: src/lib/sveltekit/components/seo.svelte -->
|
|
295
316
|
- [ ] `[feature]` `[P2]` Sitemap generation
|
|
296
317
|
|
|
297
|
-
## 0.
|
|
318
|
+
## 0.17.0 — WCAG/ATAG compliance
|
|
298
319
|
|
|
299
320
|
- [ ] `[chore]` `[P0]` Full WCAG/ATAG audit
|
|
300
321
|
- [ ] `[feature]` `[P0]` Accessibility rework based on audit findings
|