@hubspot/cms-dev-server 0.18.18 → 0.18.19

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 CHANGED
@@ -361,14 +361,6 @@ var serializeIslandDataForInlineScript = (tweakedIslandsArray, perServerRequestD
361
361
  if (isUngatedForClientOnlySupplementalFieldSerialization && output.clientOnly) {
362
362
  output.supplementalFieldValues = supplementalFieldValues;
363
363
  }
364
- if (output.supplementalFieldValues) {
365
- output.supplementalFieldValues = Object.keys(
366
- output.supplementalFieldValues
367
- ).sort().reduce((acc, key) => {
368
- acc[key] = output.supplementalFieldValues[key];
369
- return acc;
370
- }, {});
371
- }
372
364
  return output;
373
365
  }
374
366
  );
@@ -1469,7 +1461,7 @@ function trackUsage(action) {
1469
1461
  eventName: EVENT_NAME,
1470
1462
  action,
1471
1463
  nodeVersion: getNodeVersionData(),
1472
- version: "0.18.18",
1464
+ version: "0.18.19",
1473
1465
  os: getPlatform()
1474
1466
  };
1475
1467
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -3923,9 +3915,7 @@ var buildModuleIndex = () => buildHTMLResponse(`
3923
3915
 
3924
3916
  // src/routes/hublTemplateRouteHandler.ts
3925
3917
  import { http as hsCliHttp10 } from "@hubspot/local-dev-lib/http";
3926
- import {
3927
- buildStaticEnvConfig as buildStaticEnvConfig5
3928
- } from "@hubspot/cms-components";
3918
+ import { buildStaticEnvConfig as buildStaticEnvConfig5 } from "@hubspot/cms-components";
3929
3919
  import { getEnv as getEnv2 } from "@hubspot/local-dev-lib/config";
3930
3920
  var templateRouteHandler = async (request2, response) => {
3931
3921
  sendTrackingRequest("view-template-route");
@@ -3955,7 +3945,9 @@ var templateRouteHandler = async (request2, response) => {
3955
3945
  try {
3956
3946
  templateInfo = await fetchTemplateByPath(authedPortalId, calculatedPath);
3957
3947
  } catch (err) {
3958
- console.error(`Failed to fetch template data for ${calculatedPath}: ${err}`);
3948
+ console.error(
3949
+ `Failed to fetch template data for ${calculatedPath}: ${err}`
3950
+ );
3959
3951
  }
3960
3952
  if (!templateInfo || !("previewKey" in templateInfo)) {
3961
3953
  response.status(500).set({ "Content-Type": "text/html" }).end(buildErrorIndex2());
@@ -3972,6 +3964,7 @@ var templateRouteHandler = async (request2, response) => {
3972
3964
  ...request2.query
3973
3965
  };
3974
3966
  const previewUrl = new URL(getPreviewUrl(request2, params));
3967
+ const fullOriginalUrl = `${request2.protocol}://${request2.get("host")}${request2.originalUrl}`;
3975
3968
  try {
3976
3969
  const result = (await hsCliHttp10.get(authedPortalId, {
3977
3970
  baseURL: previewUrl.origin,
@@ -3983,7 +3976,7 @@ var templateRouteHandler = async (request2, response) => {
3983
3976
  response,
3984
3977
  pageHtml,
3985
3978
  webRoot,
3986
- "fullOriginalUrl",
3979
+ fullOriginalUrl,
3987
3980
  environmentConfig,
3988
3981
  viteServer,
3989
3982
  projectName,
@@ -525,14 +525,6 @@ var serializeIslandDataForInlineScript = (tweakedIslandsArray, perServerRequestD
525
525
  if (isUngatedForClientOnlySupplementalFieldSerialization && output.clientOnly) {
526
526
  output.supplementalFieldValues = supplementalFieldValues;
527
527
  }
528
- if (output.supplementalFieldValues) {
529
- output.supplementalFieldValues = Object.keys(
530
- output.supplementalFieldValues
531
- ).sort().reduce((acc, key) => {
532
- acc[key] = output.supplementalFieldValues[key];
533
- return acc;
534
- }, {});
535
- }
536
528
  return output;
537
529
  }
538
530
  );
package/dist/run.js CHANGED
@@ -1154,14 +1154,6 @@ var serializeIslandDataForInlineScript = (tweakedIslandsArray, perServerRequestD
1154
1154
  if (isUngatedForClientOnlySupplementalFieldSerialization && output.clientOnly) {
1155
1155
  output.supplementalFieldValues = supplementalFieldValues;
1156
1156
  }
1157
- if (output.supplementalFieldValues) {
1158
- output.supplementalFieldValues = Object.keys(
1159
- output.supplementalFieldValues
1160
- ).sort().reduce((acc, key) => {
1161
- acc[key] = output.supplementalFieldValues[key];
1162
- return acc;
1163
- }, {});
1164
- }
1165
1157
  return output;
1166
1158
  }
1167
1159
  );
@@ -2089,7 +2081,7 @@ function trackUsage(action) {
2089
2081
  eventName: EVENT_NAME,
2090
2082
  action,
2091
2083
  nodeVersion: getNodeVersionData(),
2092
- version: "0.18.18",
2084
+ version: "0.18.19",
2093
2085
  os: getPlatform()
2094
2086
  };
2095
2087
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -4543,9 +4535,7 @@ var buildModuleIndex = () => buildHTMLResponse(`
4543
4535
 
4544
4536
  // src/routes/hublTemplateRouteHandler.ts
4545
4537
  import { http as hsCliHttp10 } from "@hubspot/local-dev-lib/http";
4546
- import {
4547
- buildStaticEnvConfig as buildStaticEnvConfig5
4548
- } from "@hubspot/cms-components";
4538
+ import { buildStaticEnvConfig as buildStaticEnvConfig5 } from "@hubspot/cms-components";
4549
4539
  import { getEnv as getEnv2 } from "@hubspot/local-dev-lib/config";
4550
4540
  var templateRouteHandler = async (request2, response) => {
4551
4541
  sendTrackingRequest("view-template-route");
@@ -4575,7 +4565,9 @@ var templateRouteHandler = async (request2, response) => {
4575
4565
  try {
4576
4566
  templateInfo = await fetchTemplateByPath(authedPortalId, calculatedPath);
4577
4567
  } catch (err) {
4578
- console.error(`Failed to fetch template data for ${calculatedPath}: ${err}`);
4568
+ console.error(
4569
+ `Failed to fetch template data for ${calculatedPath}: ${err}`
4570
+ );
4579
4571
  }
4580
4572
  if (!templateInfo || !("previewKey" in templateInfo)) {
4581
4573
  response.status(500).set({ "Content-Type": "text/html" }).end(buildErrorIndex2());
@@ -4592,6 +4584,7 @@ var templateRouteHandler = async (request2, response) => {
4592
4584
  ...request2.query
4593
4585
  };
4594
4586
  const previewUrl = new URL(getPreviewUrl(request2, params));
4587
+ const fullOriginalUrl = `${request2.protocol}://${request2.get("host")}${request2.originalUrl}`;
4595
4588
  try {
4596
4589
  const result = (await hsCliHttp10.get(authedPortalId, {
4597
4590
  baseURL: previewUrl.origin,
@@ -4603,7 +4596,7 @@ var templateRouteHandler = async (request2, response) => {
4603
4596
  response,
4604
4597
  pageHtml,
4605
4598
  webRoot2,
4606
- "fullOriginalUrl",
4599
+ fullOriginalUrl,
4607
4600
  environmentConfig,
4608
4601
  viteServer,
4609
4602
  projectName,
@@ -1119,14 +1119,6 @@ var init_dist = __esm({
1119
1119
  if (isUngatedForClientOnlySupplementalFieldSerialization && output.clientOnly) {
1120
1120
  output.supplementalFieldValues = supplementalFieldValues;
1121
1121
  }
1122
- if (output.supplementalFieldValues) {
1123
- output.supplementalFieldValues = Object.keys(
1124
- output.supplementalFieldValues
1125
- ).sort().reduce((acc, key) => {
1126
- acc[key] = output.supplementalFieldValues[key];
1127
- return acc;
1128
- }, {});
1129
- }
1130
1122
  return output;
1131
1123
  }
1132
1124
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.18.18",
3
+ "version": "0.18.19",
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": "^0.18.18",
32
+ "@hubspot/cms-components": "^0.18.19",
33
33
  "@hubspot/local-dev-lib": "2.0.1",
34
34
  "@inquirer/select": "^2.0.0",
35
35
  "@originjs/vite-plugin-commonjs": "^1.0.3",
@@ -130,5 +130,5 @@
130
130
  "publishConfig": {
131
131
  "access": "public"
132
132
  },
133
- "gitHead": "49628d53d7bcdfbd68471aac97d8c1b97e7603af"
133
+ "gitHead": "24c5d8c526c341f9142ce5fdc3dfa7389310b28b"
134
134
  }