@hubspot/cms-dev-server 0.14.6 → 0.14.8
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/run.js +9 -8
- package/package.json +3 -3
package/dist/run.js
CHANGED
|
@@ -1029,7 +1029,7 @@ function trackUsage(action) {
|
|
|
1029
1029
|
eventName: EVENT_NAME,
|
|
1030
1030
|
action,
|
|
1031
1031
|
nodeVersion: getNodeVersionData(),
|
|
1032
|
-
version: "0.14.
|
|
1032
|
+
version: "0.14.8",
|
|
1033
1033
|
os: getPlatform()
|
|
1034
1034
|
};
|
|
1035
1035
|
const uri = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
|
|
@@ -2397,7 +2397,7 @@ async function proxyPathPageRouteHandler(request2, response, next) {
|
|
|
2397
2397
|
}
|
|
2398
2398
|
|
|
2399
2399
|
// src/routes/proxyPathPageResourceRedirect.ts
|
|
2400
|
-
import
|
|
2400
|
+
import fetch from "node-fetch";
|
|
2401
2401
|
var HCMS_PATH2 = "/_hcms/";
|
|
2402
2402
|
var HS_FS_PATH2 = "/hs-fs/";
|
|
2403
2403
|
var HUB_FS_PATH2 = "/hubfs/";
|
|
@@ -2427,13 +2427,14 @@ function proxyPathPageResourceRedirect(req, res, next) {
|
|
|
2427
2427
|
return;
|
|
2428
2428
|
}
|
|
2429
2429
|
const urlToProxy = `https://${proxyPageUrl.host}${req.url}`;
|
|
2430
|
-
|
|
2430
|
+
fetch(urlToProxy).then((response) => response.body.pipe(res)).catch((err) => console.log(err));
|
|
2431
2431
|
}
|
|
2432
2432
|
|
|
2433
2433
|
// src/routes/modulePreviewRouteHandler.ts
|
|
2434
2434
|
import { buildStaticEnvConfig as buildStaticEnvConfig4 } from "@hubspot/cms-components";
|
|
2435
2435
|
import path6 from "path";
|
|
2436
2436
|
import { normalizePath as normalizePath5 } from "vite";
|
|
2437
|
+
import fetch2 from "node-fetch";
|
|
2437
2438
|
async function modulePreviewRouteHandler(request2, response) {
|
|
2438
2439
|
sendTrackingRequest("view-module-preview-route");
|
|
2439
2440
|
const {
|
|
@@ -2509,7 +2510,7 @@ async function modulePreviewRouteHandler(request2, response) {
|
|
|
2509
2510
|
hsLocalProxy: `${true}`,
|
|
2510
2511
|
localProxySchemaVersion: "1"
|
|
2511
2512
|
});
|
|
2512
|
-
const templatePreviewResponse = await
|
|
2513
|
+
const templatePreviewResponse = await fetch2(
|
|
2513
2514
|
`${baseUrl}/cos-rendering/v1/public/_hcms/preview/template/multiform?${queryParams}`,
|
|
2514
2515
|
{
|
|
2515
2516
|
method: "POST",
|
|
@@ -2523,11 +2524,11 @@ async function modulePreviewRouteHandler(request2, response) {
|
|
|
2523
2524
|
);
|
|
2524
2525
|
templatePreview = await templatePreviewResponse.text();
|
|
2525
2526
|
} catch (e) {
|
|
2526
|
-
return response.status(500).end(
|
|
2527
|
-
`Error previewing module (${moduleName}). Ensure this module has been included in a successful project build.
|
|
2527
|
+
return response.status(500).end(`Error fetching module preview for (${moduleName}).
|
|
2528
2528
|
|
|
2529
|
-
|
|
2530
|
-
|
|
2529
|
+
${e}.
|
|
2530
|
+
|
|
2531
|
+
`);
|
|
2531
2532
|
}
|
|
2532
2533
|
try {
|
|
2533
2534
|
const localRenderPlaceholders = findLocalRenderPlaceholders(templatePreview);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cms-dev-server",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.8",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@hubspot/cli-lib": "^3.0.12",
|
|
29
|
-
"@hubspot/cms-components": "^0.14.
|
|
29
|
+
"@hubspot/cms-components": "^0.14.8",
|
|
30
30
|
"@inquirer/select": "^2.0.0",
|
|
31
31
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
32
32
|
"@storybook/addon-actions": "7.0.7",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"publishConfig": {
|
|
108
108
|
"access": "public"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "b3dc5e83ab0be8360c32fe0b220768fc32eef990"
|
|
111
111
|
}
|