@hubspot/cms-dev-server 1.2.26 → 1.2.28
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/app/assets/{index-CEoO7aJ5.js → index-tvg7JxpD.js} +28 -28
- package/dist/app/index.html +1 -1
- package/dist/generateJsonFromJsx.js +2 -2
- package/dist/index.js +97 -44
- package/dist/internalSsr.js +6 -4
- package/dist/run.js +97 -44
- package/dist/storybook/index.js +1 -1
- package/dist/storybook-main/main.js +10 -8
- package/package.json +3 -3
- package/types/lib/renderModulePreview.d.ts +4 -1
- package/dist/.DS_Store +0 -0
- package/types/constants/errors.d.ts +0 -5
- package/types/createAppViteConfig.d.ts +0 -2
- package/types/lib/cli.d.ts +0 -22
- package/types/lib/constants.d.ts +0 -1
- package/types/routes/api.d.ts +0 -2
- package/types/routes/appServerApiRouteHandler.d.ts +0 -5
- package/types/routes/appServerRoutes.d.ts +0 -5
- package/types/routes/createAppServerRoutes.d.ts +0 -5
- package/types/routes/homeRouteHandler.d.ts +0 -3
- package/types/storybook-main/preview.d.ts +0 -9
|
@@ -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-
|
|
11
|
+
// ../cms-js-internal/dist/types-BaJjNBFd.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 =
|
|
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
|
|
382
|
-
"../cms-js-internal/dist/types-
|
|
381
|
+
var init_types_BaJjNBFd = __esm({
|
|
382
|
+
"../cms-js-internal/dist/types-BaJjNBFd.js"() {
|
|
383
383
|
COMPONENT_EXTENSIONS = [".jsx", ".tsx", ".js", ".ts"];
|
|
384
384
|
ENTRY_POINTS_PATH = "components/partials/";
|
|
385
385
|
MODULE_FOLDER_PATH = "components/modules/";
|
|
@@ -501,12 +501,14 @@ ${groupEnd}</script>
|
|
|
501
501
|
"CMS:JSRenderer:RemoveCjsPlugin",
|
|
502
502
|
"CMS:JSRenderer:RemoveMockClientEntryPlugin",
|
|
503
503
|
"CMS:JSRenderer:AnalyzeCmsModules",
|
|
504
|
-
"CMS:JSRenderer:
|
|
504
|
+
"CMS:JSRenderer:StripNullBytes",
|
|
505
|
+
"PortalsAccessIdentity:DesignManager:UrlSigning"
|
|
505
506
|
];
|
|
506
507
|
ENABLED_FEATURES_GATE_MAP = {
|
|
507
508
|
"cms:jsr:getServerSideProps": "CMS:JSRenderer:GetServerSideProps",
|
|
508
509
|
"cms:jsr:RemoveCjsPlugin": "CMS:JSRenderer:RemoveCjsPlugin",
|
|
509
|
-
"cms:jsr:analyzeCmsModules": "CMS:JSRenderer:AnalyzeCmsModules"
|
|
510
|
+
"cms:jsr:analyzeCmsModules": "CMS:JSRenderer:AnalyzeCmsModules",
|
|
511
|
+
"PortalsAccessIdentity:DesignManager:UrlSigning": "PortalsAccessIdentity:DesignManager:UrlSigning"
|
|
510
512
|
};
|
|
511
513
|
findAllComponentsIn = (webRoot2, componentsFolder) => {
|
|
512
514
|
const fullComponentsFolderPath = join(webRoot2, componentsFolder);
|
|
@@ -1171,8 +1173,8 @@ function GlobalPartialSlot(props) {
|
|
|
1171
1173
|
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
1174
|
var init_dist = __esm({
|
|
1173
1175
|
"../cms-js-internal/dist/index.js"() {
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
+
init_types_BaJjNBFd();
|
|
1177
|
+
init_types_BaJjNBFd();
|
|
1176
1178
|
({ setProperty, getProperty, hasProperty } = dotProp);
|
|
1177
1179
|
serializeIslandDataForInlineScript = (tweakedIslandsArray, perServerRequestData, baseIndent = 0, prettyPrint) => {
|
|
1178
1180
|
const islandsArrayToSerialize = tweakedIslandsArray.map(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cms-dev-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.28",
|
|
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.2.
|
|
32
|
+
"@hubspot/cms-components": "^1.2.28",
|
|
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",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"publishConfig": {
|
|
134
134
|
"access": "public"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "56958bf86fbcf8a1213a8e64f0617292873f71c0"
|
|
137
137
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
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
|
}>;
|
package/dist/.DS_Store
DELETED
|
Binary file
|
package/types/lib/cli.d.ts
DELETED
|
@@ -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
|
-
}>;
|
package/types/lib/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const templateTypeMap: Record<number, string>;
|
package/types/routes/api.d.ts
DELETED
|
@@ -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,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 createAppServerRoutes(): import("express-serve-static-core").Router;
|
|
5
|
-
export default createAppServerRoutes;
|