@webtypen/webframez-react 0.0.18 → 0.0.20
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/http.cjs +17 -5
- package/dist/http.js +17 -5
- package/dist/index.cjs +17 -5
- package/dist/index.js +17 -5
- package/dist/webframez-core.cjs +17 -5
- package/dist/webframez-core.js +17 -5
- package/package.json +1 -1
package/dist/http.cjs
CHANGED
|
@@ -725,7 +725,7 @@ function createReadableStreamFromString(value) {
|
|
|
725
725
|
}
|
|
726
726
|
|
|
727
727
|
async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
728
|
-
const
|
|
728
|
+
const payload = await createFromReadableStream(createReadableStreamFromString(flightData), {
|
|
729
729
|
serverConsumerManifest: {
|
|
730
730
|
moduleMap: moduleMap || {},
|
|
731
731
|
serverModuleMap: null,
|
|
@@ -733,6 +733,11 @@ async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
|
733
733
|
}
|
|
734
734
|
});
|
|
735
735
|
|
|
736
|
+
const model =
|
|
737
|
+
payload && typeof payload === "object" && "model" in payload
|
|
738
|
+
? payload.model
|
|
739
|
+
: payload;
|
|
740
|
+
|
|
736
741
|
return renderHtml(model);
|
|
737
742
|
}
|
|
738
743
|
|
|
@@ -936,6 +941,11 @@ function normalizeClientManifest(manifest, options) {
|
|
|
936
941
|
import_node_path3.default.resolve(options.cwd, "node_modules"),
|
|
937
942
|
import_node_path3.default.resolve(options.distRootDir, "..", "..", "node_modules")
|
|
938
943
|
]);
|
|
944
|
+
const addAlias = (aliasKey, value) => {
|
|
945
|
+
if (!(aliasKey in normalized)) {
|
|
946
|
+
normalized[aliasKey] = value;
|
|
947
|
+
}
|
|
948
|
+
};
|
|
939
949
|
for (const [key, value] of Object.entries(manifest)) {
|
|
940
950
|
if (!key.startsWith("file://")) {
|
|
941
951
|
continue;
|
|
@@ -952,12 +962,14 @@ function normalizeClientManifest(manifest, options) {
|
|
|
952
962
|
continue;
|
|
953
963
|
}
|
|
954
964
|
const relativeModulePath = absolutePath.slice(markerIndex + marker.length);
|
|
965
|
+
const relativeModulePathPosix = relativeModulePath.split(import_node_path3.default.sep).join("/");
|
|
966
|
+
addAlias(`./node_modules/${relativeModulePathPosix}`, value);
|
|
967
|
+
addAlias(`node_modules/${relativeModulePathPosix}`, value);
|
|
968
|
+
addAlias(absolutePath, value);
|
|
955
969
|
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
956
970
|
const aliasPath = import_node_path3.default.join(nodeModulesDir, relativeModulePath);
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
normalized[aliasKey] = value;
|
|
960
|
-
}
|
|
971
|
+
addAlias(aliasPath, value);
|
|
972
|
+
addAlias((0, import_node_url.pathToFileURL)(aliasPath).href, value);
|
|
961
973
|
}
|
|
962
974
|
}
|
|
963
975
|
return normalized;
|
package/dist/http.js
CHANGED
|
@@ -700,7 +700,7 @@ function createReadableStreamFromString(value) {
|
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
703
|
-
const
|
|
703
|
+
const payload = await createFromReadableStream(createReadableStreamFromString(flightData), {
|
|
704
704
|
serverConsumerManifest: {
|
|
705
705
|
moduleMap: moduleMap || {},
|
|
706
706
|
serverModuleMap: null,
|
|
@@ -708,6 +708,11 @@ async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
710
|
|
|
711
|
+
const model =
|
|
712
|
+
payload && typeof payload === "object" && "model" in payload
|
|
713
|
+
? payload.model
|
|
714
|
+
: payload;
|
|
715
|
+
|
|
711
716
|
return renderHtml(model);
|
|
712
717
|
}
|
|
713
718
|
|
|
@@ -911,6 +916,11 @@ function normalizeClientManifest(manifest, options) {
|
|
|
911
916
|
path3.resolve(options.cwd, "node_modules"),
|
|
912
917
|
path3.resolve(options.distRootDir, "..", "..", "node_modules")
|
|
913
918
|
]);
|
|
919
|
+
const addAlias = (aliasKey, value) => {
|
|
920
|
+
if (!(aliasKey in normalized)) {
|
|
921
|
+
normalized[aliasKey] = value;
|
|
922
|
+
}
|
|
923
|
+
};
|
|
914
924
|
for (const [key, value] of Object.entries(manifest)) {
|
|
915
925
|
if (!key.startsWith("file://")) {
|
|
916
926
|
continue;
|
|
@@ -927,12 +937,14 @@ function normalizeClientManifest(manifest, options) {
|
|
|
927
937
|
continue;
|
|
928
938
|
}
|
|
929
939
|
const relativeModulePath = absolutePath.slice(markerIndex + marker.length);
|
|
940
|
+
const relativeModulePathPosix = relativeModulePath.split(path3.sep).join("/");
|
|
941
|
+
addAlias(`./node_modules/${relativeModulePathPosix}`, value);
|
|
942
|
+
addAlias(`node_modules/${relativeModulePathPosix}`, value);
|
|
943
|
+
addAlias(absolutePath, value);
|
|
930
944
|
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
931
945
|
const aliasPath = path3.join(nodeModulesDir, relativeModulePath);
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
normalized[aliasKey] = value;
|
|
935
|
-
}
|
|
946
|
+
addAlias(aliasPath, value);
|
|
947
|
+
addAlias(pathToFileURL(aliasPath).href, value);
|
|
936
948
|
}
|
|
937
949
|
}
|
|
938
950
|
return normalized;
|
package/dist/index.cjs
CHANGED
|
@@ -762,7 +762,7 @@ function createReadableStreamFromString(value) {
|
|
|
762
762
|
}
|
|
763
763
|
|
|
764
764
|
async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
765
|
-
const
|
|
765
|
+
const payload = await createFromReadableStream(createReadableStreamFromString(flightData), {
|
|
766
766
|
serverConsumerManifest: {
|
|
767
767
|
moduleMap: moduleMap || {},
|
|
768
768
|
serverModuleMap: null,
|
|
@@ -770,6 +770,11 @@ async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
|
770
770
|
}
|
|
771
771
|
});
|
|
772
772
|
|
|
773
|
+
const model =
|
|
774
|
+
payload && typeof payload === "object" && "model" in payload
|
|
775
|
+
? payload.model
|
|
776
|
+
: payload;
|
|
777
|
+
|
|
773
778
|
return renderHtml(model);
|
|
774
779
|
}
|
|
775
780
|
|
|
@@ -973,6 +978,11 @@ function normalizeClientManifest(manifest, options) {
|
|
|
973
978
|
import_node_path3.default.resolve(options.cwd, "node_modules"),
|
|
974
979
|
import_node_path3.default.resolve(options.distRootDir, "..", "..", "node_modules")
|
|
975
980
|
]);
|
|
981
|
+
const addAlias = (aliasKey, value) => {
|
|
982
|
+
if (!(aliasKey in normalized)) {
|
|
983
|
+
normalized[aliasKey] = value;
|
|
984
|
+
}
|
|
985
|
+
};
|
|
976
986
|
for (const [key, value] of Object.entries(manifest)) {
|
|
977
987
|
if (!key.startsWith("file://")) {
|
|
978
988
|
continue;
|
|
@@ -989,12 +999,14 @@ function normalizeClientManifest(manifest, options) {
|
|
|
989
999
|
continue;
|
|
990
1000
|
}
|
|
991
1001
|
const relativeModulePath = absolutePath.slice(markerIndex + marker.length);
|
|
1002
|
+
const relativeModulePathPosix = relativeModulePath.split(import_node_path3.default.sep).join("/");
|
|
1003
|
+
addAlias(`./node_modules/${relativeModulePathPosix}`, value);
|
|
1004
|
+
addAlias(`node_modules/${relativeModulePathPosix}`, value);
|
|
1005
|
+
addAlias(absolutePath, value);
|
|
992
1006
|
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
993
1007
|
const aliasPath = import_node_path3.default.join(nodeModulesDir, relativeModulePath);
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
normalized[aliasKey] = value;
|
|
997
|
-
}
|
|
1008
|
+
addAlias(aliasPath, value);
|
|
1009
|
+
addAlias((0, import_node_url.pathToFileURL)(aliasPath).href, value);
|
|
998
1010
|
}
|
|
999
1011
|
}
|
|
1000
1012
|
return normalized;
|
package/dist/index.js
CHANGED
|
@@ -726,7 +726,7 @@ function createReadableStreamFromString(value) {
|
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
729
|
-
const
|
|
729
|
+
const payload = await createFromReadableStream(createReadableStreamFromString(flightData), {
|
|
730
730
|
serverConsumerManifest: {
|
|
731
731
|
moduleMap: moduleMap || {},
|
|
732
732
|
serverModuleMap: null,
|
|
@@ -734,6 +734,11 @@ async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
|
734
734
|
}
|
|
735
735
|
});
|
|
736
736
|
|
|
737
|
+
const model =
|
|
738
|
+
payload && typeof payload === "object" && "model" in payload
|
|
739
|
+
? payload.model
|
|
740
|
+
: payload;
|
|
741
|
+
|
|
737
742
|
return renderHtml(model);
|
|
738
743
|
}
|
|
739
744
|
|
|
@@ -937,6 +942,11 @@ function normalizeClientManifest(manifest, options) {
|
|
|
937
942
|
path3.resolve(options.cwd, "node_modules"),
|
|
938
943
|
path3.resolve(options.distRootDir, "..", "..", "node_modules")
|
|
939
944
|
]);
|
|
945
|
+
const addAlias = (aliasKey, value) => {
|
|
946
|
+
if (!(aliasKey in normalized)) {
|
|
947
|
+
normalized[aliasKey] = value;
|
|
948
|
+
}
|
|
949
|
+
};
|
|
940
950
|
for (const [key, value] of Object.entries(manifest)) {
|
|
941
951
|
if (!key.startsWith("file://")) {
|
|
942
952
|
continue;
|
|
@@ -953,12 +963,14 @@ function normalizeClientManifest(manifest, options) {
|
|
|
953
963
|
continue;
|
|
954
964
|
}
|
|
955
965
|
const relativeModulePath = absolutePath.slice(markerIndex + marker.length);
|
|
966
|
+
const relativeModulePathPosix = relativeModulePath.split(path3.sep).join("/");
|
|
967
|
+
addAlias(`./node_modules/${relativeModulePathPosix}`, value);
|
|
968
|
+
addAlias(`node_modules/${relativeModulePathPosix}`, value);
|
|
969
|
+
addAlias(absolutePath, value);
|
|
956
970
|
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
957
971
|
const aliasPath = path3.join(nodeModulesDir, relativeModulePath);
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
normalized[aliasKey] = value;
|
|
961
|
-
}
|
|
972
|
+
addAlias(aliasPath, value);
|
|
973
|
+
addAlias(pathToFileURL(aliasPath).href, value);
|
|
962
974
|
}
|
|
963
975
|
}
|
|
964
976
|
return normalized;
|
package/dist/webframez-core.cjs
CHANGED
|
@@ -728,7 +728,7 @@ function createReadableStreamFromString(value) {
|
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
731
|
-
const
|
|
731
|
+
const payload = await createFromReadableStream(createReadableStreamFromString(flightData), {
|
|
732
732
|
serverConsumerManifest: {
|
|
733
733
|
moduleMap: moduleMap || {},
|
|
734
734
|
serverModuleMap: null,
|
|
@@ -736,6 +736,11 @@ async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
|
736
736
|
}
|
|
737
737
|
});
|
|
738
738
|
|
|
739
|
+
const model =
|
|
740
|
+
payload && typeof payload === "object" && "model" in payload
|
|
741
|
+
? payload.model
|
|
742
|
+
: payload;
|
|
743
|
+
|
|
739
744
|
return renderHtml(model);
|
|
740
745
|
}
|
|
741
746
|
|
|
@@ -939,6 +944,11 @@ function normalizeClientManifest(manifest, options) {
|
|
|
939
944
|
import_node_path3.default.resolve(options.cwd, "node_modules"),
|
|
940
945
|
import_node_path3.default.resolve(options.distRootDir, "..", "..", "node_modules")
|
|
941
946
|
]);
|
|
947
|
+
const addAlias = (aliasKey, value) => {
|
|
948
|
+
if (!(aliasKey in normalized)) {
|
|
949
|
+
normalized[aliasKey] = value;
|
|
950
|
+
}
|
|
951
|
+
};
|
|
942
952
|
for (const [key, value] of Object.entries(manifest)) {
|
|
943
953
|
if (!key.startsWith("file://")) {
|
|
944
954
|
continue;
|
|
@@ -955,12 +965,14 @@ function normalizeClientManifest(manifest, options) {
|
|
|
955
965
|
continue;
|
|
956
966
|
}
|
|
957
967
|
const relativeModulePath = absolutePath.slice(markerIndex + marker.length);
|
|
968
|
+
const relativeModulePathPosix = relativeModulePath.split(import_node_path3.default.sep).join("/");
|
|
969
|
+
addAlias(`./node_modules/${relativeModulePathPosix}`, value);
|
|
970
|
+
addAlias(`node_modules/${relativeModulePathPosix}`, value);
|
|
971
|
+
addAlias(absolutePath, value);
|
|
958
972
|
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
959
973
|
const aliasPath = import_node_path3.default.join(nodeModulesDir, relativeModulePath);
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
normalized[aliasKey] = value;
|
|
963
|
-
}
|
|
974
|
+
addAlias(aliasPath, value);
|
|
975
|
+
addAlias((0, import_node_url.pathToFileURL)(aliasPath).href, value);
|
|
964
976
|
}
|
|
965
977
|
}
|
|
966
978
|
return normalized;
|
package/dist/webframez-core.js
CHANGED
|
@@ -700,7 +700,7 @@ function createReadableStreamFromString(value) {
|
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
703
|
-
const
|
|
703
|
+
const payload = await createFromReadableStream(createReadableStreamFromString(flightData), {
|
|
704
704
|
serverConsumerManifest: {
|
|
705
705
|
moduleMap: moduleMap || {},
|
|
706
706
|
serverModuleMap: null,
|
|
@@ -708,6 +708,11 @@ async function renderHtmlFromFlightData(flightData, moduleMap) {
|
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
710
|
|
|
711
|
+
const model =
|
|
712
|
+
payload && typeof payload === "object" && "model" in payload
|
|
713
|
+
? payload.model
|
|
714
|
+
: payload;
|
|
715
|
+
|
|
711
716
|
return renderHtml(model);
|
|
712
717
|
}
|
|
713
718
|
|
|
@@ -911,6 +916,11 @@ function normalizeClientManifest(manifest, options) {
|
|
|
911
916
|
path3.resolve(options.cwd, "node_modules"),
|
|
912
917
|
path3.resolve(options.distRootDir, "..", "..", "node_modules")
|
|
913
918
|
]);
|
|
919
|
+
const addAlias = (aliasKey, value) => {
|
|
920
|
+
if (!(aliasKey in normalized)) {
|
|
921
|
+
normalized[aliasKey] = value;
|
|
922
|
+
}
|
|
923
|
+
};
|
|
914
924
|
for (const [key, value] of Object.entries(manifest)) {
|
|
915
925
|
if (!key.startsWith("file://")) {
|
|
916
926
|
continue;
|
|
@@ -927,12 +937,14 @@ function normalizeClientManifest(manifest, options) {
|
|
|
927
937
|
continue;
|
|
928
938
|
}
|
|
929
939
|
const relativeModulePath = absolutePath.slice(markerIndex + marker.length);
|
|
940
|
+
const relativeModulePathPosix = relativeModulePath.split(path3.sep).join("/");
|
|
941
|
+
addAlias(`./node_modules/${relativeModulePathPosix}`, value);
|
|
942
|
+
addAlias(`node_modules/${relativeModulePathPosix}`, value);
|
|
943
|
+
addAlias(absolutePath, value);
|
|
930
944
|
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
931
945
|
const aliasPath = path3.join(nodeModulesDir, relativeModulePath);
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
normalized[aliasKey] = value;
|
|
935
|
-
}
|
|
946
|
+
addAlias(aliasPath, value);
|
|
947
|
+
addAlias(pathToFileURL(aliasPath).href, value);
|
|
936
948
|
}
|
|
937
949
|
}
|
|
938
950
|
return normalized;
|