@coffer-org/sdk 3.4.0 → 3.5.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/dist/derive.js CHANGED
@@ -12,6 +12,8 @@ function topLevelFields(fields) {
12
12
  export function derivedEntries(fields) {
13
13
  const out = [];
14
14
  for (const [key, meta] of topLevelFields(fields)) {
15
+ if (meta.virtual)
16
+ continue;
15
17
  const fn = meta.compute ?? meta.derive?.fn;
16
18
  if (fn)
17
19
  out.push([key, typeof fn === 'function' ? fn : () => fn]);
package/dist/shelf.js CHANGED
@@ -263,7 +263,7 @@ export function buildShape(fields, partial) {
263
263
  if (isField(it)) {
264
264
  if (it.type.virtual)
265
265
  continue;
266
- if (it.type.derive) {
266
+ if (it.type.derive || it.type.compute) {
267
267
  shape[it.key] = z.never({ error: () => vmsg('derived') }).optional();
268
268
  continue;
269
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffer-org/sdk",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24"