@vesk/vesk-cli 0.2.51 → 0.2.52

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/cli.js +6 -2
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -3605,9 +3605,13 @@ function flattenLayoutChain(tree, pathParts, result = []) {
3605
3605
  for (let i = 0; i < tree.length; i++) {
3606
3606
  const node = tree[i];
3607
3607
  if (node.isGroup) {
3608
+ const contributes = !!(node.layout || node.page);
3609
+ const marker = result.length;
3610
+ if (contributes) result.push(node);
3608
3611
  const before = result.length;
3609
3612
  flattenLayoutChain(node.children || [], pathParts, result);
3610
- if (result.length > before) continue;
3613
+ if (result.length > before) break;
3614
+ if (contributes) result.length = marker;
3611
3615
  if (node.page && (pathParts.length === 0 || pathParts.every((p) => p === ""))) {
3612
3616
  result.push(node);
3613
3617
  break;
@@ -3668,7 +3672,7 @@ function matchRoute(tree, pathname) {
3668
3672
  }
3669
3673
  partIdx += segCount;
3670
3674
  }
3671
- return { matchChain, params };
3675
+ return { matchChain, params, pathname };
3672
3676
  }
3673
3677
  function buildTreeFromMap(routes, _options) {
3674
3678
  const root3 = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vesk/vesk-cli",
3
- "version": "0.2.51",
3
+ "version": "0.2.52",
4
4
  "type": "module",
5
5
  "description": "Vesk — compiler-first framework for the post-VDOM web. vesk dev, vesk build.",
6
6
  "bin": {
@@ -8,10 +8,10 @@
8
8
  },
9
9
  "main": "./dist/cli.js",
10
10
  "dependencies": {
11
- "@vesk/adapter": "^0.2.51",
12
- "@vesk/compiler": "^0.2.51",
13
- "@vesk/plugin-tailwind": "^0.2.51",
14
- "@vesk/runtime": "^0.2.51",
11
+ "@vesk/adapter": "^0.2.52",
12
+ "@vesk/compiler": "^0.2.52",
13
+ "@vesk/plugin-tailwind": "^0.2.52",
14
+ "@vesk/runtime": "^0.2.52",
15
15
  "esrap": "^2.3.0",
16
16
  "typescript": "^5.8.0",
17
17
  "ws": "^8.18.0",