@jay-framework/stack-server-build 0.24.7 → 0.25.1
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/index.js +2 -16
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import fs$1 from "node:fs/promises";
|
|
|
5
5
|
import * as path from "node:path";
|
|
6
6
|
import path__default from "node:path";
|
|
7
7
|
import { parseJayFile, JAY_IMPORT_RESOLVER, discoverHeadlessInstances, assignCoordinatesToJayHtml, generateServerElementFile, parseAction } from "@jay-framework/compiler-jay-html";
|
|
8
|
-
import { makePassthroughInstanceComponent, serializeHeadTags, mergeHeadTags, actionRegistry, scanPlugins, resolveServices, sortPluginsByDependencies, getServiceRegistry } from "@jay-framework/stack-server-runtime";
|
|
8
|
+
import { makePassthroughInstanceComponent, serializeHeadTags, mergeHeadTags, serializeScripts, actionRegistry, scanPlugins, resolveServices, sortPluginsByDependencies, getServiceRegistry } from "@jay-framework/stack-server-runtime";
|
|
9
9
|
export * from "@jay-framework/stack-server-runtime";
|
|
10
10
|
import { createRequire } from "module";
|
|
11
11
|
import jsBeautify from "js-beautify";
|
|
@@ -714,8 +714,7 @@ async function generateSSRPageHtml(vite, jayHtmlContent, jayHtmlFilename, jayHtm
|
|
|
714
714
|
const tagSources = [];
|
|
715
715
|
if (headTags && headTags.length > 0) tagSources.push(headTags);
|
|
716
716
|
const headMetaTags = headMetaToHeadTags(cached.headMeta, viewState);
|
|
717
|
-
|
|
718
|
-
const mergedTags = mergeHeadTags(tagSources);
|
|
717
|
+
const mergedTags = mergeHeadTags(tagSources, headMetaTags);
|
|
719
718
|
const hasCustomTitle = mergedTags.some((t) => t.tag.toLowerCase() === "title");
|
|
720
719
|
const titleTag = hasCustomTitle ? "" : " <title>Vite + TS</title>\n";
|
|
721
720
|
const headTagsHtml = mergedTags.length > 0 ? serializeHeadTags(mergedTags) : "";
|
|
@@ -810,19 +809,6 @@ ${headExtras ? headExtras + "\n" : ""} <style>
|
|
|
810
809
|
</body>
|
|
811
810
|
</html>`;
|
|
812
811
|
}
|
|
813
|
-
function serializeScripts(scripts, position) {
|
|
814
|
-
if (!scripts) return "";
|
|
815
|
-
const filtered = scripts.filter((s2) => s2.position === position);
|
|
816
|
-
if (filtered.length === 0) return "";
|
|
817
|
-
return filtered.map((s2) => {
|
|
818
|
-
const attrs = Object.entries(s2.attributes).map(([k, v]) => v === "" ? k : `${k}="${v}"`).join(" ");
|
|
819
|
-
const attrStr = attrs ? " " + attrs : "";
|
|
820
|
-
if (s2.src) {
|
|
821
|
-
return ` <script src="${s2.src}"${attrStr}><\/script>`;
|
|
822
|
-
}
|
|
823
|
-
return ` <script${attrStr}>${s2.inline}<\/script>`;
|
|
824
|
-
}).join("\n");
|
|
825
|
-
}
|
|
826
812
|
function rebaseRelativeImports(code, fromDir, toDir) {
|
|
827
813
|
return code.replace(/from "(\.\.\/[^"]+)"/g, (_match, relPath) => {
|
|
828
814
|
const absolutePath = path__default.resolve(fromDir, relPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/stack-server-build",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"test:watch": "vitest"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jay-framework/compiler-jay-html": "^0.
|
|
28
|
-
"@jay-framework/compiler-shared": "^0.
|
|
29
|
-
"@jay-framework/component": "^0.
|
|
30
|
-
"@jay-framework/fullstack-component": "^0.
|
|
31
|
-
"@jay-framework/logger": "^0.
|
|
32
|
-
"@jay-framework/runtime": "^0.
|
|
33
|
-
"@jay-framework/ssr-runtime": "^0.
|
|
34
|
-
"@jay-framework/stack-route-scanner": "^0.
|
|
35
|
-
"@jay-framework/stack-server-runtime": "^0.
|
|
36
|
-
"@jay-framework/view-state-merge": "^0.
|
|
27
|
+
"@jay-framework/compiler-jay-html": "^0.25.1",
|
|
28
|
+
"@jay-framework/compiler-shared": "^0.25.1",
|
|
29
|
+
"@jay-framework/component": "^0.25.1",
|
|
30
|
+
"@jay-framework/fullstack-component": "^0.25.1",
|
|
31
|
+
"@jay-framework/logger": "^0.25.1",
|
|
32
|
+
"@jay-framework/runtime": "^0.25.1",
|
|
33
|
+
"@jay-framework/ssr-runtime": "^0.25.1",
|
|
34
|
+
"@jay-framework/stack-route-scanner": "^0.25.1",
|
|
35
|
+
"@jay-framework/stack-server-runtime": "^0.25.1",
|
|
36
|
+
"@jay-framework/view-state-merge": "^0.25.1",
|
|
37
37
|
"node-html-parser": "^6.1.12",
|
|
38
38
|
"yaml": "^2.3.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@jay-framework/dev-environment": "^0.
|
|
42
|
-
"@jay-framework/rollup-plugin": "^0.
|
|
41
|
+
"@jay-framework/dev-environment": "^0.25.1",
|
|
42
|
+
"@jay-framework/rollup-plugin": "^0.25.1",
|
|
43
43
|
"@types/node": "^22.15.21",
|
|
44
44
|
"rimraf": "^5.0.5",
|
|
45
45
|
"tsup": "^8.0.1",
|