@hubspot/cms-dev-server 1.0.44 → 1.0.45

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/.DS_Store CHANGED
Binary file
@@ -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-Bqf9htWu.js
13
+ // ../cms-js-internal/dist/types-ohevhxjF.js
14
14
  import path from "path";
15
15
  var viteRoot;
16
16
  var viteCommand;
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-Bqf9htWu.js
6
+ // ../cms-js-internal/dist/types-ohevhxjF.js
7
7
  import path from "path";
8
8
  import { createHash } from "crypto";
9
9
  import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
@@ -1631,7 +1631,7 @@ function trackUsage(action) {
1631
1631
  eventName: EVENT_NAME,
1632
1632
  action,
1633
1633
  nodeVersion: getNodeVersionData(),
1634
- version: "1.0.44",
1634
+ version: "1.0.45",
1635
1635
  os: getPlatform()
1636
1636
  };
1637
1637
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -1,4 +1,4 @@
1
- // ../cms-js-internal/dist/types-Bqf9htWu.js
1
+ // ../cms-js-internal/dist/types-ohevhxjF.js
2
2
  import path from "path";
3
3
  import { createHash } from "crypto";
4
4
  import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
@@ -385,8 +385,7 @@ var GATES = [
385
385
  "CMS:JSRenderer:ModuleHubl",
386
386
  "CMS:JSRenderer:RemoveCjsPlugin",
387
387
  "CMS:JSRenderer:RemoveMockClientEntryPlugin",
388
- "CMS:JSRenderer:AnalyzeCmsModules",
389
- "CMS:JSRenderer:CompressResponse"
388
+ "CMS:JSRenderer:AnalyzeCmsModules"
390
389
  ];
391
390
  var ENABLED_FEATURES_GATE_MAP = {
392
391
  "cms:jsr:getServerSideProps": "CMS:JSRenderer:GetServerSideProps",
package/dist/run.js CHANGED
@@ -811,7 +811,7 @@ function packagePath(metaUrl, projectPath) {
811
811
  );
812
812
  }
813
813
 
814
- // ../cms-js-internal/dist/types-Bqf9htWu.js
814
+ // ../cms-js-internal/dist/types-ohevhxjF.js
815
815
  import path3 from "path";
816
816
  import { createHash } from "crypto";
817
817
  import fs2, { readFileSync, existsSync as existsSync2, readdirSync, lstatSync } from "fs";
@@ -2154,7 +2154,7 @@ function trackUsage(action) {
2154
2154
  eventName: EVENT_NAME,
2155
2155
  action,
2156
2156
  nodeVersion: getNodeVersionData(),
2157
- version: "1.0.44",
2157
+ version: "1.0.45",
2158
2158
  os: getPlatform()
2159
2159
  };
2160
2160
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -1,7 +1,7 @@
1
1
  // src/storybook/moduleStory.tsx
2
2
  import { useEffect } from "react";
3
3
 
4
- // ../cms-js-internal/dist/types-Bqf9htWu.js
4
+ // ../cms-js-internal/dist/types-ohevhxjF.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-Bqf9htWu.js
11
+ // ../cms-js-internal/dist/types-ohevhxjF.js
12
12
  import path from "path";
13
13
  import { createHash } from "crypto";
14
14
  import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
@@ -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_Bqf9htWu = __esm({
382
- "../cms-js-internal/dist/types-Bqf9htWu.js"() {
381
+ var init_types_ohevhxjF = __esm({
382
+ "../cms-js-internal/dist/types-ohevhxjF.js"() {
383
383
  COMPONENT_EXTENSIONS = [".jsx", ".tsx", ".js", ".ts"];
384
384
  ENTRY_POINTS_PATH = "components/partials/";
385
385
  MODULE_FOLDER_PATH = "components/modules/";
@@ -500,8 +500,7 @@ ${groupEnd}</script>
500
500
  "CMS:JSRenderer:ModuleHubl",
501
501
  "CMS:JSRenderer:RemoveCjsPlugin",
502
502
  "CMS:JSRenderer:RemoveMockClientEntryPlugin",
503
- "CMS:JSRenderer:AnalyzeCmsModules",
504
- "CMS:JSRenderer:CompressResponse"
503
+ "CMS:JSRenderer:AnalyzeCmsModules"
505
504
  ];
506
505
  ENABLED_FEATURES_GATE_MAP = {
507
506
  "cms:jsr:getServerSideProps": "CMS:JSRenderer:GetServerSideProps",
@@ -1171,8 +1170,8 @@ function GlobalPartialSlot(props) {
1171
1170
  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
1171
  var init_dist = __esm({
1173
1172
  "../cms-js-internal/dist/index.js"() {
1174
- init_types_Bqf9htWu();
1175
- init_types_Bqf9htWu();
1173
+ init_types_ohevhxjF();
1174
+ init_types_ohevhxjF();
1176
1175
  ({ setProperty, getProperty, hasProperty } = dotProp);
1177
1176
  serializeIslandDataForInlineScript = (tweakedIslandsArray, perServerRequestData, baseIndent = 0, prettyPrint) => {
1178
1177
  const islandsArrayToSerialize = tweakedIslandsArray.map(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
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.0.44",
32
+ "@hubspot/cms-components": "^1.0.45",
33
33
  "@hubspot/local-dev-lib": "3.7.1",
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": "e309fd4880eb7f184eebcb61b8030594309e26c9"
136
+ "gitHead": "93cd6bdd2ac0ba46472567f1a5b44f7db7b0f3c7"
137
137
  }
@@ -0,0 +1,2 @@
1
+ export declare function debugAuthContext(authedPortalId: number, cookieValue: string): Promise<void>;
2
+ export declare function compareUrls(originalUrl: string, signedUrl: string): void;
@@ -0,0 +1,2 @@
1
+ export declare function getLocalComponentsPath(): string;
2
+ export declare function shouldUseLocalComponents(): boolean;
@@ -0,0 +1,15 @@
1
+ import { ViteDevServer } from 'vite';
2
+ /**
3
+ * Processes HTML to find remote assets and replace with Vite-managed URLs
4
+ */
5
+ export declare function processRemoteAssets(html: string, viteServer: ViteDevServer): Promise<string>;
6
+ /**
7
+ * Vite plugin to handle remote assets
8
+ */
9
+ export declare function remoteAssetsPlugin(): {
10
+ name: string;
11
+ apply: "serve";
12
+ configResolved(config: any): void;
13
+ resolveId(id: string): string;
14
+ load(id: string): Promise<string>;
15
+ };
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from 'vite';
2
+ export declare function hubspotStaticAssetsPlugin(): Plugin;
@@ -0,0 +1,7 @@
1
+ import { ViteDevServer, Plugin } from 'vite';
2
+ /**
3
+ * Create a self-contained plugin with proper caching
4
+ */
5
+ export declare function remoteAssetsPlugin(): Plugin & {
6
+ processRemoteAssets: (html: string, viteServer: ViteDevServer) => Promise<string>;
7
+ };
@@ -0,0 +1,6 @@
1
+ import type { Plugin } from 'vite';
2
+ /**
3
+ * Plugin that provides URL signing capabilities
4
+ * Uses internal signing mechanisms when available, with fallback for public environments
5
+ */
6
+ export default function requestSigningPlugin(): Plugin;
@@ -1,5 +0,0 @@
1
- export declare const API_ERRORS: {
2
- readonly MISSING_PARAMS: "MISSING_PARAMS";
3
- readonly FETCH_FAILED: "FETCH_FAILED";
4
- };
5
- export declare type ApiError = (typeof API_ERRORS)[keyof typeof API_ERRORS];
@@ -1,2 +0,0 @@
1
- import { InlineConfig } from 'vite';
2
- export declare function createAppViteConfig(webRoot: string, port: number): InlineConfig;
@@ -1,22 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- export declare function getDevServerCommandLineOptions(argv: NodeJS.Process['argv']): {
3
- hubspotCliConfigPathOption: string;
4
- hubspotCliAccountNameOption: string;
5
- sslEnabledOption: boolean;
6
- storybook: boolean;
7
- fieldGenEnabledOption: boolean;
8
- webRoot: string;
9
- resetSession: boolean;
10
- };
11
- export declare function buildThemePreviewOptions(webRoot: string): Promise<{
12
- filePaths: string[];
13
- startProgressBar: (numFiles: any) => {
14
- onAttemptCallback: () => void;
15
- onSuccessCallback: () => void;
16
- onFirstErrorCallback: () => void;
17
- onRetryCallback: () => void;
18
- onFinalErrorCallback: () => any;
19
- onFinishCallback: (results: any) => void;
20
- };
21
- dest: any;
22
- }>;
@@ -1,14 +0,0 @@
1
- export declare function determineSrcAndDest(): Promise<{
2
- absoluteSrc: any;
3
- dest: any;
4
- }>;
5
- export declare function getUploadableFileList(src: any, convertFields: any): Promise<any[]>;
6
- export declare function fieldsJsPrompt(filePath: any, projectDir: any, skipFiles?: any[]): Promise<any[]>;
7
- export declare function logError(error: any, context?: {}): void;
8
- export declare class ApiErrorContext {
9
- accountId: any;
10
- request: any;
11
- payload: any;
12
- projectName: any;
13
- constructor(props?: any);
14
- }
@@ -1 +0,0 @@
1
- export declare const templateTypeMap: Record<number, string>;
@@ -1,2 +0,0 @@
1
- declare const router: import("express-serve-static-core").Router;
2
- export default router;
@@ -1,5 +0,0 @@
1
- import { Request, Response, NextFunction } from 'express';
2
- export declare function handleGetModulePages(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
3
- export declare function handleOpenFile(req: Request, res: Response, next: NextFunction): Response<any, Record<string, any>>;
4
- export declare function appServerApiRouteHandler(): import("express-serve-static-core").Router;
5
- export default appServerApiRouteHandler;
@@ -1,5 +0,0 @@
1
- import { Request, Response, NextFunction } from 'express';
2
- export declare function handleGetModulePages(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
3
- export declare function handleOpenFile(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
4
- export declare function appServerRoutes(): import("express-serve-static-core").Router;
5
- export default appServerRoutes;
@@ -1,9 +0,0 @@
1
- declare namespace _default {
2
- namespace parameters {
3
- namespace actions {
4
- const argTypesRegex: string;
5
- }
6
- }
7
- const decorators: ((Story: any) => JSX.Element)[];
8
- }
9
- export default _default;