@hubspot/cms-dev-server 1.0.43 → 1.0.44

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 ADDED
Binary file
@@ -586,7 +586,7 @@ Custom origin: ${process.env.VITE_ORIGIN}
586
586
  }
587
587
  const origin = process.env.VITE_ORIGIN ?? (sslEnabled ? `https://hslocal.net:${port}` : `http://hslocal.net:${port}`);
588
588
  const consumerDeps = getDepsForPackageIfExists(webRoot);
589
- const isProjectWithReact = consumerDeps.includes("@hubspot/cms-components");
589
+ const isProjectWithReact = consumerDeps.includes("@hubspot/cms-components") || process.env.TRANSLATE_ASSET;
590
590
  const componentsShimPlugin = isProjectWithReact ? null : cmsComponentsShimPlugin();
591
591
  const ssrAndOptimizeDep = isProjectWithReact ? {
592
592
  ssr: {
package/dist/index.js CHANGED
@@ -1139,7 +1139,7 @@ Custom origin: ${process.env.VITE_ORIGIN}
1139
1139
  }
1140
1140
  const origin = process.env.VITE_ORIGIN ?? (sslEnabled ? `https://hslocal.net:${port}` : `http://hslocal.net:${port}`);
1141
1141
  const consumerDeps = getDepsForPackageIfExists(webRoot);
1142
- const isProjectWithReact = consumerDeps.includes("@hubspot/cms-components");
1142
+ const isProjectWithReact = consumerDeps.includes("@hubspot/cms-components") || process.env.TRANSLATE_ASSET;
1143
1143
  const componentsShimPlugin = isProjectWithReact ? null : cmsComponentsShimPlugin();
1144
1144
  const ssrAndOptimizeDep = isProjectWithReact ? {
1145
1145
  ssr: {
@@ -1631,7 +1631,7 @@ function trackUsage(action) {
1631
1631
  eventName: EVENT_NAME,
1632
1632
  action,
1633
1633
  nodeVersion: getNodeVersionData(),
1634
- version: "1.0.43",
1634
+ version: "1.0.44",
1635
1635
  os: getPlatform()
1636
1636
  };
1637
1637
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -3713,14 +3713,14 @@ function HubLModulesList({ modules }) {
3713
3713
  // src/api/designmanager.ts
3714
3714
  import { http as hsCliHttp8 } from "@hubspot/local-dev-lib/http";
3715
3715
  var DESIGN_MANAGER_API_PATH = "designmanager/v1";
3716
- async function fetchHubLModules(accountId, previewToken) {
3716
+ async function fetchHubLModules(accountId, previewToken, limit = 250) {
3717
3717
  return (await hsCliHttp8.get(accountId, {
3718
- url: `${DESIGN_MANAGER_API_PATH}/modules/local-preview?previewToken=${previewToken}`
3718
+ url: `${DESIGN_MANAGER_API_PATH}/modules/local-preview?previewToken=${previewToken}&limit=${limit}`
3719
3719
  })).data;
3720
3720
  }
3721
- async function fetchPreviewTemplates(accountId, previewToken) {
3721
+ async function fetchPreviewTemplates(accountId, previewToken, limit = 250) {
3722
3722
  return (await hsCliHttp8.get(accountId, {
3723
- url: `${DESIGN_MANAGER_API_PATH}/templates/local-preview?previewToken=${previewToken}`
3723
+ url: `${DESIGN_MANAGER_API_PATH}/templates/local-preview?previewToken=${previewToken}&limit=${limit}`
3724
3724
  })).data;
3725
3725
  }
3726
3726
  async function fetchModuleByPath(accountId, path17) {
package/dist/run.js CHANGED
@@ -2154,7 +2154,7 @@ function trackUsage(action) {
2154
2154
  eventName: EVENT_NAME,
2155
2155
  action,
2156
2156
  nodeVersion: getNodeVersionData(),
2157
- version: "1.0.43",
2157
+ version: "1.0.44",
2158
2158
  os: getPlatform()
2159
2159
  };
2160
2160
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -4236,14 +4236,14 @@ function HubLModulesList({ modules }) {
4236
4236
  // src/api/designmanager.ts
4237
4237
  import { http as hsCliHttp8 } from "@hubspot/local-dev-lib/http";
4238
4238
  var DESIGN_MANAGER_API_PATH = "designmanager/v1";
4239
- async function fetchHubLModules(accountId, previewToken) {
4239
+ async function fetchHubLModules(accountId, previewToken, limit = 250) {
4240
4240
  return (await hsCliHttp8.get(accountId, {
4241
- url: `${DESIGN_MANAGER_API_PATH}/modules/local-preview?previewToken=${previewToken}`
4241
+ url: `${DESIGN_MANAGER_API_PATH}/modules/local-preview?previewToken=${previewToken}&limit=${limit}`
4242
4242
  })).data;
4243
4243
  }
4244
- async function fetchPreviewTemplates(accountId, previewToken) {
4244
+ async function fetchPreviewTemplates(accountId, previewToken, limit = 250) {
4245
4245
  return (await hsCliHttp8.get(accountId, {
4246
- url: `${DESIGN_MANAGER_API_PATH}/templates/local-preview?previewToken=${previewToken}`
4246
+ url: `${DESIGN_MANAGER_API_PATH}/templates/local-preview?previewToken=${previewToken}&limit=${limit}`
4247
4247
  })).data;
4248
4248
  }
4249
4249
  async function fetchModuleByPath(accountId, path18) {
@@ -4962,7 +4962,7 @@ Custom origin: ${process.env.VITE_ORIGIN}
4962
4962
  }
4963
4963
  const origin = process.env.VITE_ORIGIN ?? (sslEnabled ? `https://hslocal.net:${port}` : `http://hslocal.net:${port}`);
4964
4964
  const consumerDeps = getDepsForPackageIfExists(webRoot2);
4965
- const isProjectWithReact = consumerDeps.includes("@hubspot/cms-components");
4965
+ const isProjectWithReact = consumerDeps.includes("@hubspot/cms-components") || process.env.TRANSLATE_ASSET;
4966
4966
  const componentsShimPlugin = isProjectWithReact ? null : cmsComponentsShimPlugin();
4967
4967
  const ssrAndOptimizeDep = isProjectWithReact ? {
4968
4968
  ssr: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
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.43",
32
+ "@hubspot/cms-components": "^1.0.44",
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": "56ccea65538b9a7b266e417aba84bcd5a3a3a7c0"
136
+ "gitHead": "e309fd4880eb7f184eebcb61b8030594309e26c9"
137
137
  }
@@ -36,8 +36,8 @@ export interface ModulePageDependencyData {
36
36
  portalId: number;
37
37
  subType: string;
38
38
  }
39
- export declare function fetchHubLModules(accountId: any, previewToken: any): Promise<PaginatedApiResponse<HubLModule>>;
40
- export declare function fetchPreviewTemplates(accountId: any, previewToken: any): Promise<PaginatedApiResponse<HubLTemplate>>;
39
+ export declare function fetchHubLModules(accountId: any, previewToken: any, limit?: number): Promise<PaginatedApiResponse<HubLModule>>;
40
+ export declare function fetchPreviewTemplates(accountId: any, previewToken: any, limit?: number): Promise<PaginatedApiResponse<HubLTemplate>>;
41
41
  export declare function fetchModuleByPath(accountId: number, path: string): Promise<any>;
42
42
  export declare function fetchTemplateByPath(accountId: number, path: string): Promise<HubLTemplateData>;
43
43
  export declare function fetchModulePageDependencies(accountId: number, path: string): Promise<ModulePageDependencyData[]>;
@@ -0,0 +1,5 @@
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];
@@ -0,0 +1,2 @@
1
+ import { InlineConfig } from 'vite';
2
+ export declare function createAppViteConfig(webRoot: string, port: number): InlineConfig;
@@ -0,0 +1,22 @@
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
+ }>;
@@ -0,0 +1,14 @@
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
+ }
@@ -0,0 +1 @@
1
+ export declare const templateTypeMap: Record<number, string>;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1,5 @@
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;
@@ -0,0 +1,5 @@
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;
@@ -0,0 +1,5 @@
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 createAppServerRoutes(): import("express-serve-static-core").Router;
5
+ export default createAppServerRoutes;
@@ -0,0 +1,3 @@
1
+ import { Request, Response } from 'express';
2
+ declare const homeRouteHandler: (request: Request, response: Response, next: Function) => Promise<void>;
3
+ export default homeRouteHandler;
@@ -0,0 +1,9 @@
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;