@hubspot/cms-dev-server 0.13.4 → 0.13.6

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.
Files changed (41) hide show
  1. package/dist/run.js +1 -1
  2. package/dist/storybook/index.js +1 -1
  3. package/package.json +4 -4
  4. package/dist/fsevents-72LCIACT.node +0 -0
  5. package/types/components/ModulesList.d.ts +0 -5
  6. package/types/components/PartialsList.d.ts +0 -4
  7. package/types/generateBpmAliases.d.ts +0 -2
  8. package/types/lib/debug.d.ts +0 -1
  9. package/types/lib/fetchModuleGraphQLData.d.ts +0 -24
  10. package/types/lib/fullOriginalUrlFromRequest.d.ts +0 -5
  11. package/types/lib/moduleGraph.d.ts +0 -1
  12. package/types/lib/packagePath.d.ts +0 -1
  13. package/types/lib/pathHelpers.d.ts +0 -3
  14. package/types/lib/proxyHelpers.d.ts +0 -8
  15. package/types/lib/renderComponentWithCSS.d.ts +0 -14
  16. package/types/lib/renderHelpers.d.ts +0 -1
  17. package/types/lib/renderModule.d.ts +0 -8
  18. package/types/lib/renderPartial.d.ts +0 -5
  19. package/types/lib/templates.d.ts +0 -4
  20. package/types/noNodeBuiltinsPlugin.d.ts +0 -3
  21. package/types/plugins/componentRoutesPlugin.d.ts +0 -2
  22. package/types/plugins/jsRenderingPlugin.d.ts +0 -2
  23. package/types/plugins/localProxyPlugin.d.ts +0 -2
  24. package/types/plugins/storybookPlugin.d.ts +0 -2
  25. package/types/proxyPage/constants.d.ts +0 -1
  26. package/types/proxyPage/fetchContentMetadata.d.ts +0 -7
  27. package/types/proxyPage/fetchPreviewInfo.d.ts +0 -6
  28. package/types/proxyPage/proxyPage.d.ts +0 -6
  29. package/types/proxyPage/renderLocalError.d.ts +0 -2
  30. package/types/proxyPage/utils.d.ts +0 -4
  31. package/types/resolveSharedDeps.d.ts +0 -2
  32. package/types/routes/createDevServerRoutes.d.ts +0 -3
  33. package/types/routes/homeRouteHandler.d.ts +0 -3
  34. package/types/routes/linksToAllModulesRouteHandler.d.ts +0 -2
  35. package/types/routes/linksToAllPartialsRouteHandler.d.ts +0 -2
  36. package/types/routes/module.d.ts +0 -3
  37. package/types/routes/partial.d.ts +0 -2
  38. package/types/routes/proxyPageResourceRedirect.d.ts +0 -2
  39. package/types/routes/proxyPageRouteHandler.d.ts +0 -2
  40. package/types/routes/proxyPathPageResourceRedirect.d.ts +0 -2
  41. package/types/routes/proxyPathPageRouteHandler.d.ts +0 -2
package/dist/run.js CHANGED
@@ -913,7 +913,7 @@ function trackUsage(action) {
913
913
  eventName: EVENT_NAME,
914
914
  action,
915
915
  nodeVersion: getNodeVersionData(),
916
- version: "0.13.4",
916
+ version: "0.13.6",
917
917
  os: getPlatform()
918
918
  };
919
919
  const uri = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -165,7 +165,7 @@ function moduleStory(ModuleComponent, fields, storyArgs) {
165
165
  return {
166
166
  render: (_args) => {
167
167
  const fieldValues = getNestedFieldObjectForArgs(_args);
168
- const props = namespaceModulePropsShape({ fieldValues });
168
+ const props = namespaceModulePropsShape(fieldValues);
169
169
  return /* @__PURE__ */ jsx(ModuleComponent, { ...props });
170
170
  },
171
171
  argTypes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@hubspot/cli-lib": "^3.0.12",
28
- "@hubspot/cms-components": "^0.13.4",
28
+ "@hubspot/cms-components": "^0.13.6",
29
29
  "@originjs/vite-plugin-commonjs": "^1.0.3",
30
30
  "@storybook/addon-actions": "7.0.7",
31
31
  "@storybook/addon-essentials": "7.0.7",
@@ -49,7 +49,7 @@
49
49
  "request": "^2.88.2",
50
50
  "styled-jsx": "5.1.2",
51
51
  "typescript": "~4.7.0",
52
- "vite": "4.3.4",
52
+ "vite": "4.5.0",
53
53
  "vite-plugin-inspect": "^0.4.3",
54
54
  "vite-plugin-mkcert": "1.16.0"
55
55
  },
@@ -101,5 +101,5 @@
101
101
  "publishConfig": {
102
102
  "access": "public"
103
103
  },
104
- "gitHead": "c71b01b2c1a58fa3446621a3aa866ff5284dea19"
104
+ "gitHead": "53a9873619c758aefca75e2a9462c1334e63627f"
105
105
  }
Binary file
@@ -1,5 +0,0 @@
1
- declare function ModulesList({ webRoot, moduleNames }: {
2
- webRoot: any;
3
- moduleNames: any;
4
- }): JSX.Element;
5
- export default ModulesList;
@@ -1,4 +0,0 @@
1
- export default function PartialsList({ webRoot, partialNames }: {
2
- webRoot: any;
3
- partialNames: any;
4
- }): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { Alias } from 'vite';
2
- export default function generateBpmAliases(webRoot: string): Alias[];
@@ -1 +0,0 @@
1
- export declare const debug: any;
@@ -1,24 +0,0 @@
1
- declare type DataQueryPoints = {
2
- count: number;
3
- weight: number;
4
- used_points: number;
5
- };
6
- declare type DataQueryResult = {
7
- extensions: {
8
- query_complexity: {
9
- max_points: number;
10
- used_points: number;
11
- points_for_internal_api_requests: DataQueryPoints;
12
- points_for_objects_retrieved: DataQueryPoints;
13
- points_for_properties_with_value: DataQueryPoints;
14
- points_for_properties_without_value: DataQueryPoints;
15
- };
16
- };
17
- data?: {
18
- CRM?: any;
19
- HUBDB?: any;
20
- };
21
- };
22
- export declare function clearGraphQLDataCache(): void;
23
- export default function fetchModuleGraphQLData(accountId: number, query: string, requestedModulePath: string, pageUrl: string): Promise<DataQueryResult>;
24
- export {};
@@ -1,5 +0,0 @@
1
- export default function fullOriginalUrlFromRequest(request: {
2
- protocol: string;
3
- host: string;
4
- originalUrl: string;
5
- }): string;
@@ -1 +0,0 @@
1
- export declare const findFullPathInModuleGraph: (modulePathNoExtension: string, moduleGraph: any) => string | void;
@@ -1 +0,0 @@
1
- export default function packagePath(metaUrl: string, projectPath: string): string;
@@ -1,3 +0,0 @@
1
- import { ViteDevServer } from 'vite';
2
- export declare const getComponentPaths: (viteServer: ViteDevServer, componentPath: string) => [componentPathNoExtension: string, componentPathWithExtension: string];
3
- export declare const getEntryPointBasePath: (componentPath: string) => string;
@@ -1,8 +0,0 @@
1
- export interface LocalRenderBlockInfo {
2
- startOffset: number;
3
- endOffset: number;
4
- path: string;
5
- json: any;
6
- }
7
- export declare const findLocalRenderPlaceholders: (body: string) => Array<LocalRenderBlockInfo>;
8
- export declare const getProjectNameFromHSConfig: (hsProjectConfigPath: any) => any;
@@ -1,14 +0,0 @@
1
- import { ViteDevServer } from 'vite';
2
- import { ComponentType } from 'react';
3
- import { RenderToPipeableStreamOptions } from 'react-dom/server';
4
- import { ServerRenderContextValue } from '@hubspot/cms-components';
5
- import { EnvironmentConfig } from '@hubspot/cms-components/config';
6
- import { InlineAsset } from '@hubspot/cms-js-internal';
7
- export declare type RenderResult = {
8
- html: string;
9
- inlineAssets?: InlineAsset[];
10
- cssNeeded: string;
11
- renderContext: ServerRenderContextValue;
12
- };
13
- declare function renderComponentWithCSS(viteServer: ViteDevServer, componentPath: string, Component: ComponentType, props: any, pageUrl: string, entryPointBasePath: string, environmentConfig: EnvironmentConfig, renderOptions: RenderToPipeableStreamOptions): Promise<RenderResult>;
14
- export default renderComponentWithCSS;
@@ -1 +0,0 @@
1
- export declare const logPartialInfo: (partialPath: any, props: any) => void;
@@ -1,8 +0,0 @@
1
- import { ViteDevServer } from 'vite';
2
- import { RenderToPipeableStreamOptions } from 'react-dom/server';
3
- import { EnvironmentConfig } from '@hubspot/cms-components/config';
4
- declare function renderModule(viteServer: ViteDevServer, requestedModulePath: string, moduleProps: {
5
- fieldValues: any;
6
- hublParameters?: any;
7
- }, pageUrl: string, basePath: string, environmentConfig: EnvironmentConfig, renderOptions?: RenderToPipeableStreamOptions): Promise<import("./renderComponentWithCSS.js").RenderResult>;
8
- export default renderModule;
@@ -1,5 +0,0 @@
1
- import { EnvironmentConfig } from '@hubspot/cms-components/config';
2
- import { ViteDevServer } from 'vite';
3
- import { RenderToPipeableStreamOptions } from 'react-dom/server';
4
- declare function renderPartial(viteServer: ViteDevServer, partialPath: string, props: any, pageUrl: string, basePath: string, environmentConfig: EnvironmentConfig, renderOptions?: RenderToPipeableStreamOptions): Promise<import("./renderComponentWithCSS.js").RenderResult>;
5
- export default renderPartial;
@@ -1,4 +0,0 @@
1
- import { ViteDevServer } from 'vite';
2
- import { ServerRenderContextValue } from '@hubspot/cms-components';
3
- export declare const createHtmlShellDependingOnRenderContext: (baseTemplatePath: string, url: string, title: string, renderContext: ServerRenderContextValue, viteServer: ViteDevServer, __jsRenderingGates: string[]) => Promise<string>;
4
- export declare const getIslandRuntimeAndGlobalToInject: (sortedIslandRoots: any, perServerRequestData: any, viteServer: ViteDevServer, __gates: string[]) => Promise<string>;
@@ -1,3 +0,0 @@
1
- import { Plugin } from 'vite';
2
- declare const noNodeBuiltinsPlugin: () => Plugin;
3
- export default noNodeBuiltinsPlugin;
@@ -1,2 +0,0 @@
1
- import { PluginOption } from 'vite';
2
- export default function componentRoutesPlugin(): PluginOption;
@@ -1,2 +0,0 @@
1
- import { PluginOption } from 'vite';
2
- export default function jsRenderingPlugin(webRoot: string, port: number, sslEnabled: boolean): PluginOption;
@@ -1,2 +0,0 @@
1
- import { PluginOption } from 'vite';
2
- export default function localProxyPlugin(sslEnabled?: boolean, domainsToProxy?: any[]): PluginOption;
@@ -1,2 +0,0 @@
1
- import { PluginOption } from 'vite';
2
- export default function storybookPlugin(): PluginOption;
@@ -1 +0,0 @@
1
- export declare const VALID_PROXY_DOMAIN_SUFFIXES: string[];
@@ -1,7 +0,0 @@
1
- import { Hublet } from '@hubspot/cms-components';
2
- export declare type PortalContentIdAndHublet = {
3
- portalId: number;
4
- contentId: string;
5
- hublet: Hublet;
6
- };
7
- export default function fetchContentMetadata(url: string, portalId: number): Promise<PortalContentIdAndHublet>;
@@ -1,6 +0,0 @@
1
- export interface PreviewInfoResponse {
2
- previewDomain: string;
3
- previewKey: string;
4
- }
5
- declare const _default: (accountId: string, portalId: number, contentId: string) => Promise<PreviewInfoResponse>;
6
- export default _default;
@@ -1,6 +0,0 @@
1
- import { Response } from 'express';
2
- import { ViteDevServer } from 'vite';
3
- import { Gate } from '@hubspot/cms-js-internal';
4
- import { Hublet } from '@hubspot/cms-components';
5
- export declare const makeProxyPreviewRequest: (accountId: string, urlToProxy: string, previewKey: string, contentId: string, projectName: string, __jsRenderingGates: Gate[]) => any;
6
- export default function proxySpecificPage(response: Response, portalId: number, hublet: Hublet, contentId: string, webRoot: string, viteServer: ViteDevServer, projectName: string, projectComponentPath: string, jsRenderingGates: Gate[], urlToProxy?: string, fullOriginalUrl?: string): Promise<void>;
@@ -1,2 +0,0 @@
1
- declare const _default: (path: string, error: Error) => string;
2
- export default _default;
@@ -1,4 +0,0 @@
1
- import { RenderResult } from '../lib/renderComponentWithCSS.js';
2
- export declare const getSubDomainFromValidLocalDomain: (hostname: any) => any;
3
- export declare const fakeRenderJsComponent: (indexForThisRender: any) => Promise<RenderResult>;
4
- export declare const consoleWarn: (message: any) => void;
@@ -1,2 +0,0 @@
1
- import { Plugin } from 'vite';
2
- export default function resolveSharedDeps(): Plugin | null;
@@ -1,3 +0,0 @@
1
- import { ViteDevServer } from 'vite';
2
- declare function createDevServerRoutes(viteServer: ViteDevServer, __storybookPort?: number): import("express-serve-static-core").Router;
3
- export default createDevServerRoutes;
@@ -1,3 +0,0 @@
1
- import { RequestHandler } from 'express';
2
- declare const homeRouteHandler: RequestHandler;
3
- export default homeRouteHandler;
@@ -1,2 +0,0 @@
1
- declare const linksToAllModuleRouteHandler: (request: any, response: any) => Promise<void>;
2
- export default linksToAllModuleRouteHandler;
@@ -1,2 +0,0 @@
1
- declare const linksToAllPartialRouteHandler: (request: any, response: any) => Promise<void>;
2
- export default linksToAllPartialRouteHandler;
@@ -1,3 +0,0 @@
1
- import { Request, Response } from 'express';
2
- declare const moduleRouteHandler: (request: Request, response: Response) => Promise<void>;
3
- export default moduleRouteHandler;
@@ -1,2 +0,0 @@
1
- declare const partialRouteHandler: (request: any, response: any) => Promise<void>;
2
- export default partialRouteHandler;
@@ -1,2 +0,0 @@
1
- import { Request, Response } from 'express';
2
- export default function proxyPageResourceRedirect(req: Request, res: Response, next: any): void;
@@ -1,2 +0,0 @@
1
- import { Request, Response } from 'express';
2
- export default function proxyPageRouteHandler(request: Request, response: Response, next: Function): Promise<Response<any, Record<string, any>>>;
@@ -1,2 +0,0 @@
1
- import { NextFunction, Request, Response } from 'express';
2
- export default function proxyPathPageResourceRedirect(req: Request, res: Response, next: NextFunction): void;
@@ -1,2 +0,0 @@
1
- import { Request, Response } from 'express';
2
- export default function proxyPathPageRouteHandler(request: Request, response: Response, next: Function): Promise<Response<any, Record<string, any>>>;