@dforge-core/metadata 0.0.36 → 0.0.38
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 +22 -0
- package/README.md +1 -1
- package/dist/dsl/index.js +3 -3
- package/dist/dsl/index.js.map +1 -1
- package/dist/index.d.ts +19 -3
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +67 -66
- package/schemas/demo_vars.schema.json +28 -0
- package/schemas/deps.schema.json +14 -2
- package/schemas/settings.schema.json +31 -0
- package/schemas/translations.schema.json +13 -1
- package/src/dsl/builtins.ts +3 -3
- package/src/index.ts +2 -1
- package/src/settings.ts +25 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,28 @@ and this package adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.0.38] — 2026-10-12
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`demo_vars.schema.json`:** the schema for `demo-data/vars.json`, a flat map of variable name to a
|
|
15
|
+
scalar or a `{ "$f": "…" }` formula.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **DSL built-ins:** `addDays` / `addMinutes` / `addSeconds` docs now state what the platform accepts
|
|
20
|
+
(a date field, a `Date` or an ISO string; null stays null; anything else is an error), and that a
|
|
21
|
+
date field stays a date under `addDays`.
|
|
22
|
+
|
|
23
|
+
## [0.0.37] — 2026-10-12
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- **`settings.json` `$constraints`:** `SettingConstraintDef` (`{ type: "check", expression, message? }`),
|
|
28
|
+
the optional `$constraints` map on `SettingsFile` — check constraints across a module's settings,
|
|
29
|
+
written as SQL over setting codes — and `settingDefsOf(file)`, which returns a file's settings
|
|
30
|
+
without it. `settings.schema.json` and `translations.schema.json` describe both.
|
|
31
|
+
|
|
10
32
|
## [0.0.36] — 2026-10-08
|
|
11
33
|
|
|
12
34
|
### Added
|
package/README.md
CHANGED
|
@@ -161,7 +161,7 @@ import entitySchema from "@dforge-core/metadata/schemas/entity.schema.json" with
|
|
|
161
161
|
|
|
162
162
|
Available: `manifest`, `entity`, `data_views`, `folders`, `menus`, `roles`,
|
|
163
163
|
`settings`, `reports`, `jobs`, `triggers`, `webhooks`, `print_templates`,
|
|
164
|
-
`traits`, `seed_data`.
|
|
164
|
+
`traits`, `seed_data`, `demo_vars`.
|
|
165
165
|
|
|
166
166
|
## Source of truth & parity
|
|
167
167
|
|
package/dist/dsl/index.js
CHANGED
|
@@ -929,9 +929,9 @@ var BUILTINS = [
|
|
|
929
929
|
},
|
|
930
930
|
// Utilities
|
|
931
931
|
{ name: "now", signature: "now()", returns: "datetime", doc: "Current date/time. Lowercase \u2014 this is the execute-block date function." },
|
|
932
|
-
{ name: "addDays", signature: "addDays(date, n)", returns: "date", doc: "Add `n` days
|
|
933
|
-
{ name: "addMinutes", signature: "addMinutes(date, n)", returns: "datetime", doc: "Add `n` minutes." },
|
|
934
|
-
{ name: "addSeconds", signature: "addSeconds(date, n)", returns: "datetime", doc: "Add `n` seconds." },
|
|
932
|
+
{ name: "addDays", signature: "addDays(date, n)", returns: "date | string", doc: "Add `n` days. Takes a date field, a `Date` or an ISO string; a date field stays a date and a `yyyy-MM-dd` string stays a string. Null stays null; any other value is an error." },
|
|
933
|
+
{ name: "addMinutes", signature: "addMinutes(date, n)", returns: "datetime", doc: "Add `n` minutes. Takes a date field, a `Date` or an ISO string; the result is a timestamp. Null stays null; any other value is an error." },
|
|
934
|
+
{ name: "addSeconds", signature: "addSeconds(date, n)", returns: "datetime", doc: "Add `n` seconds. Takes a date field, a `Date` or an ISO string; the result is a timestamp. Null stays null; any other value is an error." },
|
|
935
935
|
{ name: "currentUserId", signature: "currentUserId()", returns: "long", doc: "The acting user's tenant user ID." },
|
|
936
936
|
{ name: "flush", signature: "flush()", returns: "void", doc: "Flush pending writes so a following read sees them." },
|
|
937
937
|
{ name: "tryParseJson", signature: "tryParseJson(value)", returns: "any | null", doc: "Parse JSON, returning `null` on failure instead of throwing." },
|