@easy-web/cli 0.3.0 → 0.3.2

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.
Files changed (2) hide show
  1. package/README.md +41 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -65,7 +65,7 @@ not clone a site, copy a pilot, or read a customer repository.
65
65
  Content generation supports one locale matching `shell.defaultLocale`, or the
66
66
  opt-in DE/EN pair with a distinct label and route for each locale. It supports
67
67
  one or more content types, required `title`/`slug`/`body`, optional
68
- `summary`/`image`/`order`, and `list`/`detail` plus optional `navigation` bindings. At
68
+ `summary`/`image`/`order`/`schedule`, and `list`/`detail` plus optional `navigation` bindings. At
69
69
  most one type can be `primary`; that marker describes its graph role, not a
70
70
  homepage renderer. Routes use non-reserved lowercase path segments and must not
71
71
  overlap. Unsupported locale combinations, traits, homepage bindings, and
@@ -81,6 +81,46 @@ and, when selected, CMS adapters `^1.10.0`; those floors assume both features
81
81
  first ship together in 1.10.0. Other content-only compositions retain `^1.6.0`,
82
82
  and CMS compositions without either feature retain `^1.9.0`.
83
83
 
84
+ ### Add dates to a content type
85
+
86
+ Add `"schedule"` to a type's `traits` to require `startDate` and allow an optional
87
+ `endDate`. For example, `"traits": ["title", "slug", "body", "schedule"]`
88
+ works with any chosen type ID and routes. Dates are calendar dates in
89
+ `YYYY-MM-DD` form; quote dates to validate the original calendar value. Unquoted
90
+ YAML dates are also accepted, but the YAML parser may normalize an invalid date
91
+ before validation. An empty or null end date means no end; an invalid quoted
92
+ date, missing start or end before start fails the build. The generated example
93
+ uses synthetic dates.
94
+
95
+ Lists and details show locale-formatted dates with semantic `<time>` elements
96
+ in UTC; labels are German for German locales and English otherwise.
97
+ The existing CMS trait fields expose a required start and optional end with
98
+ date-only UTC widgets. Schedule dates do not filter or sort content: default slug
99
+ ordering and the opt-in `order` trait remain unchanged. The feature does not
100
+ provide event times, time zones, recurrence, upcoming-event filtering or automatic
101
+ schedule-based publishing. Publication gating is a separate option below.
102
+ Schedule alone uses the existing core `^1.6.0` and CMS `^1.9.0` runtime floors.
103
+
104
+ ### Opt in to publication gating
105
+
106
+ Set `"publish": "missing-date-means-draft"` on an individual content type in
107
+ `composition.contentTypes` to hide entries without a publication date. Alternatively,
108
+ `"missing-date-means-published"` shows undated entries. Both hide future dates and
109
+ show dates at or before evaluation time. Omit `publish` to keep the unfiltered
110
+ behavior. This option requires core `^1.11.0` and, with CMS, CMS adapters
111
+ `^1.11.0`.
112
+
113
+ The generated optional `publishDate` accepts dates, date strings, empty strings
114
+ and null; invalid dates and other types fail the build. CMS supplies a date-only UTC widget.
115
+ The draft policy also hides the undated generated example until a date is added.
116
+ Generated lists, detail routes and translation links filter independently for each
117
+ content type, using one instant captured when the static build is configured.
118
+ Development evaluates the current time on each read. On a static site, schedule a
119
+ rebuild after a date is reached; HTML does not update itself. Gating is not access
120
+ control. Any additional feeds, search indexes or custom routes must apply the same
121
+ rule and build instant themselves. Changing the generated build configuration or
122
+ switching to server rendering requires reviewing this behavior.
123
+
84
124
  To opt in to bilingual content, declare both complete locale entries and make
85
125
  the shell's default match the first locale:
86
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-web/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Create-only command-line interface for generating easy-web sites.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -16,9 +16,9 @@
16
16
  "dependencies": {
17
17
  "mri": "^1.2.0",
18
18
  "astro": "^7.3.5",
19
- "@easy-web/core": "1.10.0",
20
- "@easy-web/auth": "1.10.0",
21
- "@easy-web/cms-adapters": "1.10.0"
19
+ "@easy-web/core": "1.12.0",
20
+ "@easy-web/auth": "1.12.0",
21
+ "@easy-web/cms-adapters": "1.12.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^24.0.0",