@hubspot/cms-dev-server 1.2.27 → 1.2.30
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/generateJsonFromJsx.js +2 -2
- package/dist/index.js +6 -13
- package/dist/internalSsr.js +2 -2
- package/dist/run.js +6 -13
- package/dist/storybook/index.js +1 -1
- package/dist/storybook-main/main.js +6 -6
- package/package.json +3 -3
|
@@ -10,7 +10,7 @@ import { createServer as createViteServer } from "vite";
|
|
|
10
10
|
import { createRequire } from "module";
|
|
11
11
|
import { default as react } from "@vitejs/plugin-react";
|
|
12
12
|
|
|
13
|
-
// ../cms-js-internal/dist/types-
|
|
13
|
+
// ../cms-js-internal/dist/types-BsFs0N9P.js
|
|
14
14
|
import path from "path";
|
|
15
15
|
var viteRoot;
|
|
16
16
|
var viteCommand;
|
|
@@ -31,7 +31,7 @@ function resolveIslandPlugin(islandsSet) {
|
|
|
31
31
|
idWithNoParam,
|
|
32
32
|
componentExtension
|
|
33
33
|
);
|
|
34
|
-
const modulePath =
|
|
34
|
+
const modulePath = idWithNoParam.replace(`${viteRoot}/`, "");
|
|
35
35
|
const moduleId = (viteCommand === "serve" ? idWithNoParam : modulePath).concat("?client-entry");
|
|
36
36
|
if (islandsSet) {
|
|
37
37
|
islandsSet.add(moduleId);
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createServer as createViteServer } from "vite";
|
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
import { default as react } from "@vitejs/plugin-react";
|
|
5
5
|
|
|
6
|
-
// ../cms-js-internal/dist/types-
|
|
6
|
+
// ../cms-js-internal/dist/types-BsFs0N9P.js
|
|
7
7
|
import path from "path";
|
|
8
8
|
import { createHash } from "crypto";
|
|
9
9
|
import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
|
|
@@ -118,7 +118,7 @@ function resolveIslandPlugin(islandsSet) {
|
|
|
118
118
|
idWithNoParam,
|
|
119
119
|
componentExtension
|
|
120
120
|
);
|
|
121
|
-
const modulePath =
|
|
121
|
+
const modulePath = idWithNoParam.replace(`${viteRoot}/`, "");
|
|
122
122
|
const moduleId = (viteCommand === "serve" ? idWithNoParam : modulePath).concat("?client-entry");
|
|
123
123
|
if (islandsSet) {
|
|
124
124
|
islandsSet.add(moduleId);
|
|
@@ -1631,7 +1631,7 @@ function trackUsage(action) {
|
|
|
1631
1631
|
eventName: EVENT_NAME,
|
|
1632
1632
|
action,
|
|
1633
1633
|
nodeVersion: getNodeVersionData(),
|
|
1634
|
-
version: "1.2.
|
|
1634
|
+
version: "1.2.17",
|
|
1635
1635
|
os: getPlatform()
|
|
1636
1636
|
};
|
|
1637
1637
|
const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
|
|
@@ -4083,25 +4083,18 @@ var modulePreviewRouteHandler_default = modulePreviewRouteHandler;
|
|
|
4083
4083
|
import { http as hsCliHttp9 } from "@hubspot/local-dev-lib/http";
|
|
4084
4084
|
var hublModuleRouteHandler = async (request, response) => {
|
|
4085
4085
|
sendTrackingRequest("view-hubl-module-route");
|
|
4086
|
-
const { authedPortalId, localPreviewToken
|
|
4086
|
+
const { authedPortalId, localPreviewToken } = request.app.locals;
|
|
4087
4087
|
const { modulePath } = request.params;
|
|
4088
4088
|
if (!modulePath) {
|
|
4089
4089
|
response.status(200).set({ "Content-Type": "text/html" }).end(buildModuleIndex());
|
|
4090
4090
|
return;
|
|
4091
4091
|
}
|
|
4092
|
-
const
|
|
4093
|
-
const calculatedPath = `@preview/${localPreviewToken}/${projectPrefix}${modulePath}.module`;
|
|
4092
|
+
const calculatedPath = `@preview/${localPreviewToken}/@projects/${modulePath}.module`;
|
|
4094
4093
|
let customWidgetInfo;
|
|
4095
4094
|
try {
|
|
4096
4095
|
customWidgetInfo = await fetchModuleByPath(authedPortalId, calculatedPath);
|
|
4097
4096
|
} catch (err) {
|
|
4098
|
-
console.
|
|
4099
|
-
response.status(500).set({ "Content-Type": "text/html" }).end(buildErrorIndex(err));
|
|
4100
|
-
return;
|
|
4101
|
-
}
|
|
4102
|
-
if (!customWidgetInfo || !("moduleId" in customWidgetInfo)) {
|
|
4103
|
-
response.status(500).set({ "Content-Type": "text/html" }).end(buildErrorIndex(null));
|
|
4104
|
-
return;
|
|
4097
|
+
console.log(`Failed to fetch module data for ${calculatedPath}`);
|
|
4105
4098
|
}
|
|
4106
4099
|
const params = {
|
|
4107
4100
|
module_id: customWidgetInfo.moduleId,
|
package/dist/internalSsr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../cms-js-internal/dist/types-
|
|
1
|
+
// ../cms-js-internal/dist/types-BsFs0N9P.js
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { createHash } from "crypto";
|
|
4
4
|
import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
|
|
@@ -175,7 +175,7 @@ function resolveIslandPlugin(islandsSet) {
|
|
|
175
175
|
idWithNoParam,
|
|
176
176
|
componentExtension
|
|
177
177
|
);
|
|
178
|
-
const modulePath =
|
|
178
|
+
const modulePath = idWithNoParam.replace(`${viteRoot}/`, "");
|
|
179
179
|
const moduleId = (viteCommand === "serve" ? idWithNoParam : modulePath).concat("?client-entry");
|
|
180
180
|
if (islandsSet) {
|
|
181
181
|
islandsSet.add(moduleId);
|
package/dist/run.js
CHANGED
|
@@ -854,7 +854,7 @@ function packagePath(metaUrl, projectPath) {
|
|
|
854
854
|
);
|
|
855
855
|
}
|
|
856
856
|
|
|
857
|
-
// ../cms-js-internal/dist/types-
|
|
857
|
+
// ../cms-js-internal/dist/types-BsFs0N9P.js
|
|
858
858
|
import path3 from "path";
|
|
859
859
|
import { createHash } from "crypto";
|
|
860
860
|
import fs2, { readFileSync, existsSync as existsSync2, readdirSync, lstatSync } from "fs";
|
|
@@ -969,7 +969,7 @@ function resolveIslandPlugin(islandsSet) {
|
|
|
969
969
|
idWithNoParam,
|
|
970
970
|
componentExtension
|
|
971
971
|
);
|
|
972
|
-
const modulePath =
|
|
972
|
+
const modulePath = idWithNoParam.replace(`${viteRoot}/`, "");
|
|
973
973
|
const moduleId = (viteCommand === "serve" ? idWithNoParam : modulePath).concat("?client-entry");
|
|
974
974
|
if (islandsSet) {
|
|
975
975
|
islandsSet.add(moduleId);
|
|
@@ -2197,7 +2197,7 @@ function trackUsage(action) {
|
|
|
2197
2197
|
eventName: EVENT_NAME,
|
|
2198
2198
|
action,
|
|
2199
2199
|
nodeVersion: getNodeVersionData(),
|
|
2200
|
-
version: "1.2.
|
|
2200
|
+
version: "1.2.17",
|
|
2201
2201
|
os: getPlatform()
|
|
2202
2202
|
};
|
|
2203
2203
|
const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
|
|
@@ -4649,25 +4649,18 @@ var modulePreviewRouteHandler_default = modulePreviewRouteHandler;
|
|
|
4649
4649
|
import { http as hsCliHttp9 } from "@hubspot/local-dev-lib/http";
|
|
4650
4650
|
var hublModuleRouteHandler = async (request, response) => {
|
|
4651
4651
|
sendTrackingRequest("view-hubl-module-route");
|
|
4652
|
-
const { authedPortalId, localPreviewToken
|
|
4652
|
+
const { authedPortalId, localPreviewToken } = request.app.locals;
|
|
4653
4653
|
const { modulePath } = request.params;
|
|
4654
4654
|
if (!modulePath) {
|
|
4655
4655
|
response.status(200).set({ "Content-Type": "text/html" }).end(buildModuleIndex());
|
|
4656
4656
|
return;
|
|
4657
4657
|
}
|
|
4658
|
-
const
|
|
4659
|
-
const calculatedPath = `@preview/${localPreviewToken}/${projectPrefix}${modulePath}.module`;
|
|
4658
|
+
const calculatedPath = `@preview/${localPreviewToken}/@projects/${modulePath}.module`;
|
|
4660
4659
|
let customWidgetInfo;
|
|
4661
4660
|
try {
|
|
4662
4661
|
customWidgetInfo = await fetchModuleByPath(authedPortalId, calculatedPath);
|
|
4663
4662
|
} catch (err) {
|
|
4664
|
-
console.
|
|
4665
|
-
response.status(500).set({ "Content-Type": "text/html" }).end(buildErrorIndex(err));
|
|
4666
|
-
return;
|
|
4667
|
-
}
|
|
4668
|
-
if (!customWidgetInfo || !("moduleId" in customWidgetInfo)) {
|
|
4669
|
-
response.status(500).set({ "Content-Type": "text/html" }).end(buildErrorIndex(null));
|
|
4670
|
-
return;
|
|
4663
|
+
console.log(`Failed to fetch module data for ${calculatedPath}`);
|
|
4671
4664
|
}
|
|
4672
4665
|
const params = {
|
|
4673
4666
|
module_id: customWidgetInfo.moduleId,
|
package/dist/storybook/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
// ../cms-js-internal/dist/types-
|
|
11
|
+
// ../cms-js-internal/dist/types-BsFs0N9P.js
|
|
12
12
|
import path from "path";
|
|
13
13
|
import { createHash } from "crypto";
|
|
14
14
|
import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
|
|
@@ -132,7 +132,7 @@ function resolveIslandPlugin(islandsSet) {
|
|
|
132
132
|
idWithNoParam,
|
|
133
133
|
componentExtension
|
|
134
134
|
);
|
|
135
|
-
const modulePath =
|
|
135
|
+
const modulePath = idWithNoParam.replace(`${viteRoot}/`, "");
|
|
136
136
|
const moduleId = (viteCommand === "serve" ? idWithNoParam : modulePath).concat("?client-entry");
|
|
137
137
|
if (islandsSet) {
|
|
138
138
|
islandsSet.add(moduleId);
|
|
@@ -378,8 +378,8 @@ function isStylesheetAsset(staticAsset) {
|
|
|
378
378
|
return staticAsset.type === "stylesheet";
|
|
379
379
|
}
|
|
380
380
|
var COMPONENT_EXTENSIONS, ENTRY_POINTS_PATH, MODULE_FOLDER_PATH, TEMPLATE_FOLDER_PATH, VIRTUAL_ISLAND_RUNTIME, VIRTUAL_CONFIG_SETUP, CSS_LANGS_RE, collectCssModules, collectCssInDev, badInlineJsChars, inlineJsEscapeChars, viteRoot, viteCommand, clientRenderIsland, virtualClientRenderIslandModuleId, scriptTagToLogServerMessages, getComponentExtension, hasComponentExtension, isStorybookStory, removeComponentExtension, COMBINED_REACT_BASE_PATH, ISLAND_RUNTIME_CONFIG_BASE_PATH, removeIndexFromPath, removeIndexOrTrailingJsFromPath, HEALTHCHECKS_ENABLED_DEFAULT, HEALTHCHECKS_STRICT_DEFAULT, BUILD_INFO_PATH, GATES, ENABLED_FEATURES_GATE_MAP, findAllComponentsIn;
|
|
381
|
-
var
|
|
382
|
-
"../cms-js-internal/dist/types-
|
|
381
|
+
var init_types_BsFs0N9P = __esm({
|
|
382
|
+
"../cms-js-internal/dist/types-BsFs0N9P.js"() {
|
|
383
383
|
COMPONENT_EXTENSIONS = [".jsx", ".tsx", ".js", ".ts"];
|
|
384
384
|
ENTRY_POINTS_PATH = "components/partials/";
|
|
385
385
|
MODULE_FOLDER_PATH = "components/modules/";
|
|
@@ -1171,8 +1171,8 @@ function GlobalPartialSlot(props) {
|
|
|
1171
1171
|
var setProperty, getProperty, hasProperty, serializeIslandDataForInlineScript, writeSharedStateToJsGlobal, createIslandsGlobalJsForClientInDev, traverse, CMS_MODULE_COMPONENT_NAME, DND_AREA_COMPONENT_NAME, PLUGIN_NAME, promiseForNewWritableStream, renderStreamToPromise, createServerRenderContextV22, createServerRenderContext2, renderServerSidePropsWithAsyncLocalStoreContext, bootStrapRenderContext;
|
|
1172
1172
|
var init_dist = __esm({
|
|
1173
1173
|
"../cms-js-internal/dist/index.js"() {
|
|
1174
|
-
|
|
1175
|
-
|
|
1174
|
+
init_types_BsFs0N9P();
|
|
1175
|
+
init_types_BsFs0N9P();
|
|
1176
1176
|
({ setProperty, getProperty, hasProperty } = dotProp);
|
|
1177
1177
|
serializeIslandDataForInlineScript = (tweakedIslandsArray, perServerRequestData, baseIndent = 0, prettyPrint) => {
|
|
1178
1178
|
const islandsArrayToSerialize = tweakedIslandsArray.map(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cms-dev-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.30",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@babel/parser": "^7.25.3",
|
|
30
30
|
"@babel/traverse": "^7.25.3",
|
|
31
31
|
"@babel/types": "^7.25.2",
|
|
32
|
-
"@hubspot/cms-components": "^1.2.
|
|
32
|
+
"@hubspot/cms-components": "^1.2.30",
|
|
33
33
|
"@hubspot/local-dev-lib": "4.0.2",
|
|
34
34
|
"@inquirer/select": "^2.0.0",
|
|
35
35
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"publishConfig": {
|
|
134
134
|
"access": "public"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "d6ed74241acf639deebb950f0c652daf8caeb83c"
|
|
137
137
|
}
|