@hubspot/cms-dev-server 1.2.32 → 1.2.34

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.
@@ -1,7 +1,7 @@
1
1
  // src/storybook/moduleStory.tsx
2
2
  import { useEffect } from "react";
3
3
 
4
- // ../cms-js-internal/dist/types-BsFs0N9P.js
4
+ // ../cms-js-internal/dist/types-BEz622C8.js
5
5
  function namespaceModulePropsShape(props) {
6
6
  const {
7
7
  dataQueryResult,
@@ -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-BsFs0N9P.js
11
+ // ../cms-js-internal/dist/types-BEz622C8.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 = idWithNoParam.replace(`${viteRoot}/`, "");
135
+ const modulePath = path.relative(viteRoot, idWithNoParam);
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 init_types_BsFs0N9P = __esm({
382
- "../cms-js-internal/dist/types-BsFs0N9P.js"() {
381
+ var init_types_BEz622C8 = __esm({
382
+ "../cms-js-internal/dist/types-BEz622C8.js"() {
383
383
  COMPONENT_EXTENSIONS = [".jsx", ".tsx", ".js", ".ts"];
384
384
  ENTRY_POINTS_PATH = "components/partials/";
385
385
  MODULE_FOLDER_PATH = "components/modules/";
@@ -498,15 +498,15 @@ ${groupEnd}</script>
498
498
  GATES = [
499
499
  "CMS:JSRenderer:GetServerSideProps",
500
500
  "CMS:JSRenderer:ModuleHubl",
501
- "CMS:JSRenderer:RemoveCjsPlugin",
502
501
  "CMS:JSRenderer:RemoveMockClientEntryPlugin",
503
502
  "CMS:JSRenderer:AnalyzeCmsModules",
504
- "CMS:JSRenderer:StripNullBytes"
503
+ "CMS:JSRenderer:StripNullBytes",
504
+ "PortalsAccessIdentity:DesignManager:UrlSigning"
505
505
  ];
506
506
  ENABLED_FEATURES_GATE_MAP = {
507
507
  "cms:jsr:getServerSideProps": "CMS:JSRenderer:GetServerSideProps",
508
- "cms:jsr:RemoveCjsPlugin": "CMS:JSRenderer:RemoveCjsPlugin",
509
- "cms:jsr:analyzeCmsModules": "CMS:JSRenderer:AnalyzeCmsModules"
508
+ "cms:jsr:analyzeCmsModules": "CMS:JSRenderer:AnalyzeCmsModules",
509
+ "PortalsAccessIdentity:DesignManager:UrlSigning": "PortalsAccessIdentity:DesignManager:UrlSigning"
510
510
  };
511
511
  findAllComponentsIn = (webRoot2, componentsFolder) => {
512
512
  const fullComponentsFolderPath = join(webRoot2, componentsFolder);
@@ -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
- init_types_BsFs0N9P();
1175
- init_types_BsFs0N9P();
1174
+ init_types_BEz622C8();
1175
+ init_types_BEz622C8();
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,13 +1,13 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "1.2.32",
3
+ "version": "1.2.34",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=20.x"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc -noEmit && yarn run copy-html && yarn build-types && node scripts/build.mjs; npm run publint",
10
+ "build": "tsc -noEmit && yarn run copy-html && yarn build-types && node scripts/build.mjs && npm run publint",
11
11
  "build:watch": "nodemon --exec 'yarn build'",
12
12
  "copy-html": "copyfiles -u 1 'src/html/**' 'dist'",
13
13
  "build-types": "tsc --project tsconfig.types.json",
@@ -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",
32
+ "@hubspot/cms-components": "^1.2.34",
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",
@@ -72,7 +72,7 @@
72
72
  "tailwind-merge": "^2.5.4",
73
73
  "tailwindcss-animate": "^1.0.7",
74
74
  "typescript": "~4.7.0",
75
- "vite": "5.4.8",
75
+ "vite": "5.4.21",
76
76
  "vite-plugin-inspect": "^0.8.0",
77
77
  "vite-plugin-mkcert": "1.16.0"
78
78
  },
@@ -133,5 +133,5 @@
133
133
  "publishConfig": {
134
134
  "access": "public"
135
135
  },
136
- "gitHead": "d23ec08558dea4c0c50e478328f6a18b8d1766b4"
136
+ "gitHead": "435a7a7ab2f4789612846c64edaf8240671db1c7"
137
137
  }
@@ -0,0 +1,3 @@
1
+ export declare const HSMETA_FILENAMES: string[];
2
+ export declare function hsmetaCandidatePaths(srcPath: string): string[];
3
+ export declare function findHsmetaUid(projectDir: string, srcDir: string): string | null;
@@ -1,4 +1,7 @@
1
- export declare function renderRemoteModulePreview(modulePath: string, authedPortalId: any, authedEnv: any, cookieValue: any): Promise<{
1
+ import { Gate } from '@hubspot/cms-js-internal';
2
+ export declare function signGetUrl(authedPortalId: number, unsignedUrl: string): Promise<string>;
3
+ export declare function signedGet(authedPortalId: number, unsignedUrl: string, headers: Record<string, string>, gates: Gate[]): Promise<string>;
4
+ export declare function renderRemoteModulePreview(modulePath: string, authedPortalId: any, authedEnv: any, cookieValue: any, gates: Gate[]): Promise<{
2
5
  html: string;
3
6
  cssNeeded: string;
4
7
  }>;