@constela/start 1.4.0 → 1.4.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.
@@ -1934,9 +1934,11 @@ var JsonPageLoader = class {
1934
1934
  if (this.cache.has(pagePath)) {
1935
1935
  return this.cache.get(pagePath);
1936
1936
  }
1937
- const pageInfo = await loadJsonPage(this.projectRoot, pagePath, {
1938
- routesDir: this.routesDir
1939
- });
1937
+ const options = {};
1938
+ if (this.routesDir !== void 0) {
1939
+ options.routesDir = this.routesDir;
1940
+ }
1941
+ const pageInfo = await loadJsonPage(this.projectRoot, pagePath, options);
1940
1942
  this.cache.set(pagePath, pageInfo);
1941
1943
  return pageInfo;
1942
1944
  }
@@ -2861,7 +2863,13 @@ async function renderPageToHtml(program, params, runtimePath, cssPath, externalI
2861
2863
  query: {},
2862
2864
  path: "/"
2863
2865
  };
2866
+ const metaTags = generateMetaTags(normalizedProgram.route, {
2867
+ params,
2868
+ query: {},
2869
+ path: "/"
2870
+ });
2864
2871
  const cssLinkTag = cssPath ? `<link rel="stylesheet" href="${cssPath}">` : void 0;
2872
+ const head = [metaTags, cssLinkTag].filter(Boolean).join("\n") || void 0;
2865
2873
  const widgetConfigs = widgets?.map((w) => ({ id: w.id, program: w.program }));
2866
2874
  const hydrationScript = generateHydrationScript(normalizedProgram, widgetConfigs, routeContext);
2867
2875
  const wrapOptions = {};
@@ -2879,7 +2887,7 @@ async function renderPageToHtml(program, params, runtimePath, cssPath, externalI
2879
2887
  return wrapHtml(
2880
2888
  content,
2881
2889
  hydrationScript,
2882
- cssLinkTag,
2890
+ head,
2883
2891
  Object.keys(wrapOptions).length > 0 ? wrapOptions : void 0
2884
2892
  );
2885
2893
  }
package/dist/cli/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  hyperlink,
5
5
  loadConfig,
6
6
  resolveConfig
7
- } from "../chunk-6FV75N45.js";
7
+ } from "../chunk-72BPUYTI.js";
8
8
  import "../chunk-XAC4ETQU.js";
9
9
 
10
10
  // src/cli/index.ts
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { CompiledProgram, CompiledNode } from '@constela/compiler';
2
2
  import { LayoutProgram, Program, StaticPathsDefinition, DataSource } from '@constela/core';
3
+ export { MetaContext, evaluateMetaExpression, generateMetaTags } from './runtime/entry-server.js';
3
4
 
4
5
  /**
5
6
  * Scanned route from file system
package/dist/index.js CHANGED
@@ -24,8 +24,9 @@ import {
24
24
  transformCsv,
25
25
  transformMdx,
26
26
  transformYaml
27
- } from "./chunk-6FV75N45.js";
27
+ } from "./chunk-72BPUYTI.js";
28
28
  import {
29
+ evaluateMetaExpression,
29
30
  generateHydrationScript,
30
31
  generateMetaTags,
31
32
  renderPage,
@@ -350,7 +351,9 @@ export {
350
351
  createAdapter,
351
352
  createDevServer,
352
353
  createMiddlewareChain,
354
+ evaluateMetaExpression,
353
355
  filePathToPattern,
356
+ generateMetaTags,
354
357
  generateStaticPages,
355
358
  generateStaticPaths,
356
359
  getMimeType,
@@ -1,4 +1,4 @@
1
- import { CompiledProgram, CompiledExpression, CompiledRouteDefinition } from '@constela/compiler';
1
+ import { CompiledRouteDefinition, CompiledExpression, CompiledProgram } from '@constela/compiler';
2
2
 
3
3
  /**
4
4
  * Server-side entry point for Constela applications
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/start",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Meta-framework for Constela applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -44,10 +44,10 @@
44
44
  "@tailwindcss/postcss": "^4.0.0",
45
45
  "tailwindcss": "^4.0.0",
46
46
  "@constela/compiler": "0.10.0",
47
- "@constela/router": "11.0.0",
48
47
  "@constela/core": "0.10.0",
49
- "@constela/runtime": "0.13.0",
50
- "@constela/server": "6.0.0"
48
+ "@constela/router": "11.0.0",
49
+ "@constela/server": "6.0.0",
50
+ "@constela/runtime": "0.13.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/mdast": "^4.0.4",