@hubspot/cms-dev-server 0.8.0 → 0.8.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.
- package/dist/createViteDevServer-5624911d.js +69 -0
- package/dist/index-de34229d.js +525 -0
- package/dist/index-e4860c0f.js +150 -0
- package/dist/index.js +5 -2
- package/dist/index2.js +178 -0
- package/dist/internalSsr.js +12 -11
- package/dist/main.js +52 -0
- package/dist/preview.js +18 -0
- package/dist/run.js +45 -18
- package/dist/storybook-main/main.js +12 -11
- package/package.json +3 -3
- package/types/island-runtime.d.ts +2 -0
- package/dist/fsevents-72LCIACT.node +0 -0
- package/types/generateBpmAliases.d.ts +0 -2
- package/types/noNodeBuiltinsPlugin.d.ts +0 -3
|
@@ -50,7 +50,7 @@ __export(dist_exports, {
|
|
|
50
50
|
ungatedAtBuildTimeFor: () => ungatedAtBuildTimeFor,
|
|
51
51
|
virtualClientRenderIslandModuleId: () => virtualClientRenderIslandModuleId
|
|
52
52
|
});
|
|
53
|
-
import path
|
|
53
|
+
import path from "path";
|
|
54
54
|
import * as jsxRuntime from "react/jsx-runtime";
|
|
55
55
|
import stream from "stream";
|
|
56
56
|
import { renderToPipeableStream, renderToStaticMarkup } from "react-dom/server";
|
|
@@ -125,7 +125,7 @@ function getPerServerRequestUrls(perServerRequestData, viteDevServer) {
|
|
|
125
125
|
});
|
|
126
126
|
return perServerRequestDataWithUrls;
|
|
127
127
|
}
|
|
128
|
-
function resolveIslandPlugin() {
|
|
128
|
+
function resolveIslandPlugin(islandsSet) {
|
|
129
129
|
return {
|
|
130
130
|
enforce: "pre",
|
|
131
131
|
name: "resolve-islands",
|
|
@@ -144,6 +144,9 @@ function resolveIslandPlugin() {
|
|
|
144
144
|
);
|
|
145
145
|
const modulePath = idWithNoParam.replace(`${viteRoot}/`, "");
|
|
146
146
|
const moduleId = (viteCommand === "serve" ? idWithNoParam : modulePath).concat("?client-entry");
|
|
147
|
+
if (islandsSet) {
|
|
148
|
+
islandsSet.add(moduleId);
|
|
149
|
+
}
|
|
147
150
|
return `
|
|
148
151
|
const moduleId = '${moduleId}';
|
|
149
152
|
|
|
@@ -252,8 +255,7 @@ function ungatedAtBuildTimeFor(buildDir, gate) {
|
|
|
252
255
|
function findAllModulesInRoot(webRoot2) {
|
|
253
256
|
const allModuleComponents = findAllComponentsIn(
|
|
254
257
|
webRoot2,
|
|
255
|
-
"./components/modules"
|
|
256
|
-
true
|
|
258
|
+
"./components/modules"
|
|
257
259
|
);
|
|
258
260
|
const moduleNames = Object.keys(allModuleComponents).map(
|
|
259
261
|
(moduleSubpath) => moduleSubpath.replace("components/modules/", "").replace("/index", "")
|
|
@@ -264,13 +266,12 @@ function findAllModulesInRoot(webRoot2) {
|
|
|
264
266
|
function findAllPartialsInRoot(webRoot2) {
|
|
265
267
|
const allPartialComponents = findAllComponentsIn(
|
|
266
268
|
webRoot2,
|
|
267
|
-
"./components/partials"
|
|
268
|
-
false
|
|
269
|
+
"./components/partials"
|
|
269
270
|
);
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
(partialSubpath) => basename(partialSubpath)
|
|
271
|
+
const partialNames = Object.keys(allPartialComponents).map(
|
|
272
|
+
(partialSubpath) => partialSubpath.replace("components/partials/", "").replace("/index", "")
|
|
273
273
|
);
|
|
274
|
+
const partialSubpaths = Object.keys(allPartialComponents);
|
|
274
275
|
return { partialNames, partialSubpaths };
|
|
275
276
|
}
|
|
276
277
|
function getServerGlobalsToInject(environmentConfig, hsServerPageUrl, hsBasePath) {
|
|
@@ -574,7 +575,7 @@ ${groupEnd}</script>
|
|
|
574
575
|
"cms:jsr:separateIslandRenderOption": "CMS:JSRenderer:SeparateIslandRenderOption"
|
|
575
576
|
};
|
|
576
577
|
BUILD_INFO_PATH = "/build-info.json";
|
|
577
|
-
findAllComponentsIn = (webRoot2, componentsFolder
|
|
578
|
+
findAllComponentsIn = (webRoot2, componentsFolder) => {
|
|
578
579
|
const fullComponentsFolderPath = join(webRoot2, componentsFolder);
|
|
579
580
|
const componentsByName = {};
|
|
580
581
|
if (!existsSync(fullComponentsFolderPath)) {
|
|
@@ -587,7 +588,7 @@ ${groupEnd}</script>
|
|
|
587
588
|
if (!isDirectory && hasComponentExtension(fileOrFolderName) && !isStorybookStory(fileOrFolderName)) {
|
|
588
589
|
const subdirPathNoExtension = removeComponentExtension(subdirPath);
|
|
589
590
|
componentsByName[subdirPathNoExtension] = subdirPath;
|
|
590
|
-
} else if (isDirectory
|
|
591
|
+
} else if (isDirectory) {
|
|
591
592
|
for (const potentialExtension of COMPONENT_EXTENSIONS) {
|
|
592
593
|
const potentialIndexModule = join(
|
|
593
594
|
subdirPath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cms-dev-server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@hubspot/cli-lib": "^3.0.12",
|
|
28
|
-
"@hubspot/cms-components": "^0.8.
|
|
28
|
+
"@hubspot/cms-components": "^0.8.2",
|
|
29
29
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
30
30
|
"@storybook/addon-actions": "7.0.7",
|
|
31
31
|
"@storybook/addon-essentials": "7.0.7",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"publishConfig": {
|
|
101
101
|
"access": "public"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "dd431a9d693d7f25207746363a0395b616fc74d1"
|
|
104
104
|
}
|
|
Binary file
|