@thecms/cli 0.20.1-dev.122 → 0.20.1-dev.124
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.
|
@@ -175,7 +175,7 @@ function realContext(env = process.env) {
|
|
|
175
175
|
import { parseArgs } from "util";
|
|
176
176
|
|
|
177
177
|
// src/context.ts
|
|
178
|
-
var CLI_VERSION = "0.20.1-dev.
|
|
178
|
+
var CLI_VERSION = "0.20.1-dev.124";
|
|
179
179
|
function call(ctx, path, init = {}) {
|
|
180
180
|
const { token, client = "cli", ...rest } = init;
|
|
181
181
|
const headers = new Headers(rest.headers);
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -195,18 +195,18 @@ A page's block reads the workspace as its set, shape and settings say; the model
|
|
|
195
195
|
| The sub-pages of a section | a tree of one schema (`page` and its `pages`) | `descendantsOf` on the section |
|
|
196
196
|
|
|
197
197
|
```json
|
|
198
|
-
{ "set": "service", "shape": "
|
|
198
|
+
{ "set": "service", "shape": "cards", "title": "See also", "limit": 3, "filters": [
|
|
199
199
|
{ "field": "service_category", "op": "eq", "value": "{context.service_category}" },
|
|
200
200
|
{ "field": "_id", "op": "neq", "value": "{context._id}" } ] }
|
|
201
201
|
```
|
|
202
202
|
```json
|
|
203
|
-
{ "set": "post", "shape": "
|
|
203
|
+
{ "set": "post", "shape": "cards", "filters": [{ "field": "tags", "op": "eq", "value": "{context._id}" }] }
|
|
204
204
|
```
|
|
205
205
|
```json
|
|
206
206
|
{ "set": "menu_item", "shape": "list", "sort": { "field": "position", "direction": "asc" } }
|
|
207
207
|
```
|
|
208
208
|
```json
|
|
209
|
-
{ "set": "page", "shape": "
|
|
209
|
+
{ "set": "page", "shape": "list", "filters": [{ "field": "section", "op": "descendantsOf", "value": "{context._id}" }] }
|
|
210
210
|
```
|
|
211
211
|
|
|
212
212
|
- `{context.<field>}` is the open record's value (a link → its id; a link to many → `in`); `{context._id}` is the open record itself: with `neq` it never lists itself. They hold only on a template page (a page of a record).
|
package/dist/method/method.md
CHANGED
|
@@ -221,6 +221,7 @@ Each module: **needs** (what must be there first) · **produces** (what is there
|
|
|
221
221
|
- **the words that introduce a list sit in the list**;
|
|
222
222
|
- order decided by the editor (`position`); languages: the main one without a prefix, the others `/xx/`; names in `snake_case`, schemas in the singular; a relation is named after the schema it points at — singular for one, plural for many, a second one to the same schema `<name>_<role>`;
|
|
223
223
|
- **the structure is in English**: schema and field names, their labels (`name`, `pluralName`, `label`), enum values, sets and shapes — a label left out is made from the name (`service_category` → "Service category", "Service categories"); the client's language lives in the contents and in the messages, the site translates; a label already in another language is a check of the plan and is listed by `realign` (a label changes at once, no record is touched);
|
|
224
|
+
- **a shape is named after its form** — how it looks on the page, with the words design systems use for components — never after what it is for (`related`, `featured`, `detail`, `deck`, `by_category`, `hero`, `cta`) nor where it sits (`header`, `footer`, `sidebar`). Navigation: `navbar` (a horizontal bar of entries, with dropdowns), `drawer` (a panel sliding in from the side), `columns` (columns of links under their titles), `bar` (one row of links or icons), `tabs`. One record: `banner` (a full-width band, text over an image or a video), `split` (text beside an image), `article` (a long text in a readable column), `stat` (one big number and its label). Several records: `cards` (equal boxes in a row), `grid` (a dense grid of small items), `bento` (boxes of different sizes), `list` (one row per record), `carousel`, `accordion`, `table`, `timeline` (steps joined by a line), `stats` (a row of big numbers), `logos`, `player`. Two forms on one set: a second word of form, never of use (`cards` and `cards_compact`, `banner` and `banner_video`). Where a block sits is the layout's: the containers are the page's regions and take those names, like HTML's landmarks (`header`, `footer`, `aside`); the navigation bar inside the header is a `navbar` (`menu · navbar`), the links at the bottom `menu · columns`, "See also" `service · cards`;
|
|
224
225
|
- **everything the site shows comes from the workspace**: contents, menu, footer, the organisation's data (globals), the interface's texts (messages), SEO, redirects; the site's name is the application's *Site name*.
|
|
225
226
|
- **How to check**: `thecms verify`; running the script again changes nothing.
|
|
226
227
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thecms/cli",
|
|
3
|
-
"version": "0.20.1-dev.
|
|
3
|
+
"version": "0.20.1-dev.124",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "theCMS. command line: the standard's starter, checks, brand, the method's docs, sign-in with a personal token",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
38
38
|
"@resvg/resvg-wasm": "2.6.2",
|
|
39
|
-
"@thecms/sdk": "0.20.1-dev.
|
|
39
|
+
"@thecms/sdk": "0.20.1-dev.124",
|
|
40
40
|
"libpg-query": "18.2.0",
|
|
41
41
|
"zod": "4.6.5"
|
|
42
42
|
},
|