@constela/server 14.0.1 → 14.0.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/dist/index.js +16 -0
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -537,6 +537,14 @@ function evaluate(expr, ctx) {
537
537
  const arrayExpr = expr;
538
538
  return arrayExpr.elements.map((elem) => evaluate(elem, ctx));
539
539
  }
540
+ case "obj": {
541
+ const objExpr = expr;
542
+ const result = {};
543
+ for (const [key, value] of Object.entries(objExpr.props)) {
544
+ result[key] = evaluate(value, ctx);
545
+ }
546
+ return result;
547
+ }
540
548
  default: {
541
549
  const _exhaustiveCheck = expr;
542
550
  throw new Error(`Unknown expression type: ${JSON.stringify(_exhaustiveCheck)}`);
@@ -1293,6 +1301,14 @@ function evaluate2(expr, ctx) {
1293
1301
  const arrayExpr = expr;
1294
1302
  return arrayExpr.elements.map((elem) => evaluate2(elem, ctx));
1295
1303
  }
1304
+ case "obj": {
1305
+ const objExpr = expr;
1306
+ const result = {};
1307
+ for (const [key, value] of Object.entries(objExpr.props)) {
1308
+ result[key] = evaluate2(value, ctx);
1309
+ }
1310
+ return result;
1311
+ }
1296
1312
  default: {
1297
1313
  return void 0;
1298
1314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/server",
3
- "version": "14.0.1",
3
+ "version": "14.0.2",
4
4
  "description": "Server-side rendering for Constela UI framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,8 +15,8 @@
15
15
  "dist"
16
16
  ],
17
17
  "peerDependencies": {
18
- "@constela/compiler": "^0.15.7",
19
- "@constela/core": "^0.18.1"
18
+ "@constela/compiler": "^0.15.8",
19
+ "@constela/core": "^0.18.2"
20
20
  },
21
21
  "dependencies": {
22
22
  "isomorphic-dompurify": "^2.35.0",
@@ -29,8 +29,8 @@
29
29
  "tsup": "^8.0.0",
30
30
  "typescript": "^5.3.0",
31
31
  "vitest": "^2.0.0",
32
- "@constela/core": "0.18.1",
33
- "@constela/compiler": "0.15.7"
32
+ "@constela/compiler": "0.15.8",
33
+ "@constela/core": "0.18.2"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=20.0.0"