@hubspot/cms-dev-server 0.18.24 → 0.18.25

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.
@@ -1549,6 +1549,29 @@ function unstable_useVideos(resolvableIds) {
1549
1549
  }
1550
1550
  return [];
1551
1551
  }
1552
+ function unstable_usePodcastShows(resolvableIds) {
1553
+ var _a;
1554
+ const renderContext = useRenderContext();
1555
+ const uniqueId = `${resolvableIds.type}:${resolvableIds.value}`;
1556
+ if (!((_a = renderContext.resolvedDataDependencies) == null ? void 0 : _a.podcastShows)) {
1557
+ return [];
1558
+ }
1559
+ const podcastShowDependencies = renderContext.resolvedDataDependencies.podcastShows;
1560
+ const podcastDependency = podcastShowDependencies.dependencies[uniqueId];
1561
+ if (!podcastDependency)
1562
+ return null;
1563
+ if (podcastDependency.status === "success") {
1564
+ const shows = podcastDependency.ids.map(
1565
+ (showId) => podcastShowDependencies.data[showId]
1566
+ );
1567
+ return shows;
1568
+ }
1569
+ if (podcastDependency.status === "error") {
1570
+ logWarn(podcastDependency.error);
1571
+ return [];
1572
+ }
1573
+ return [];
1574
+ }
1552
1575
  function id(value) {
1553
1576
  return { type: "id", value };
1554
1577
  }
@@ -2271,6 +2294,7 @@ const cmsComponents = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
2271
2294
  setSecrets,
2272
2295
  setSecretsFromEnv,
2273
2296
  sortIslandRootsByPriority,
2297
+ unstable_usePodcastShows,
2274
2298
  unstable_useVideos,
2275
2299
  useAfterIslandHydration,
2276
2300
  useAvailableTranslations,
package/dist/index.js CHANGED
@@ -1465,7 +1465,7 @@ function trackUsage(action) {
1465
1465
  eventName: EVENT_NAME,
1466
1466
  action,
1467
1467
  nodeVersion: getNodeVersionData(),
1468
- version: "0.18.24",
1468
+ version: "0.18.25",
1469
1469
  os: getPlatform()
1470
1470
  };
1471
1471
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
package/dist/run.js CHANGED
@@ -2097,7 +2097,7 @@ function trackUsage(action) {
2097
2097
  eventName: EVENT_NAME,
2098
2098
  action,
2099
2099
  nodeVersion: getNodeVersionData(),
2100
- version: "0.18.24",
2100
+ version: "0.18.25",
2101
2101
  os: getPlatform()
2102
2102
  };
2103
2103
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.18.24",
3
+ "version": "0.18.25",
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.24",
32
+ "@hubspot/cms-components": "^0.18.25",
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",
@@ -131,5 +131,5 @@
131
131
  "publishConfig": {
132
132
  "access": "public"
133
133
  },
134
- "gitHead": "29aa57588f20ed6bde2b24615e18dea79178d7ad"
134
+ "gitHead": "0b4f4b4e5de2e5aac7591fccaff57fe35efc399e"
135
135
  }
@@ -0,0 +1,4 @@
1
+ import { ViteDevServer } from 'vite';
2
+ export declare const lookForModuleInFolder: (modulePath: string, viteServer: ViteDevServer) => Promise<[any, string]>;
3
+ declare function renderModuleJson(viteServer: ViteDevServer, requestedModulePath: string): Promise<any>;
4
+ export default renderModuleJson;
@@ -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,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): 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;