@hubspot/cms-dev-server 1.2.80 → 1.2.82
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/generateJsonFromJsx.js +1 -1
- package/dist/index.js +2060 -1869
- package/dist/internalSsr.js +3 -5
- package/dist/island-runtime.js +22 -6
- package/dist/run.js +987 -796
- package/dist/storybook/index.js +1 -1
- package/dist/storybook-main/main.js +7 -9
- package/dist/validateFieldsCli.js +1 -1
- package/package.json +2 -2
- package/types/lib/renderModulePreview.d.ts +2 -3
- package/types/routes/moduleValidateFields.d.ts +3 -0
- package/types/validateFields.d.ts +16 -0
package/dist/storybook/index.js
CHANGED
|
@@ -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-C8bPIEz4.js
|
|
12
12
|
import path from "path";
|
|
13
13
|
import { createHash } from "crypto";
|
|
14
14
|
import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
|
|
@@ -392,8 +392,8 @@ function isStylesheetAsset(staticAsset) {
|
|
|
392
392
|
return staticAsset.type === "stylesheet";
|
|
393
393
|
}
|
|
394
394
|
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;
|
|
395
|
-
var
|
|
396
|
-
"../cms-js-internal/dist/types-
|
|
395
|
+
var init_types_C8bPIEz4 = __esm({
|
|
396
|
+
"../cms-js-internal/dist/types-C8bPIEz4.js"() {
|
|
397
397
|
COMPONENT_EXTENSIONS = [".jsx", ".tsx", ".js", ".ts"];
|
|
398
398
|
ENTRY_POINTS_PATH = "components/partials/";
|
|
399
399
|
MODULE_FOLDER_PATH = "components/modules/";
|
|
@@ -512,12 +512,10 @@ ${groupEnd}</script>
|
|
|
512
512
|
GATES = [
|
|
513
513
|
"CMS:JSRenderer:RemoveMockClientEntryPlugin",
|
|
514
514
|
"CMS:JSRenderer:AnalyzeCmsModules",
|
|
515
|
-
"CMS:JSRenderer:StripNullBytes"
|
|
516
|
-
"PortalsAccessIdentity:DesignManager:UrlSigning"
|
|
515
|
+
"CMS:JSRenderer:StripNullBytes"
|
|
517
516
|
];
|
|
518
517
|
ENABLED_FEATURES_GATE_MAP = {
|
|
519
|
-
"cms:jsr:analyzeCmsModules": "CMS:JSRenderer:AnalyzeCmsModules"
|
|
520
|
-
"PortalsAccessIdentity:DesignManager:UrlSigning": "PortalsAccessIdentity:DesignManager:UrlSigning"
|
|
518
|
+
"cms:jsr:analyzeCmsModules": "CMS:JSRenderer:AnalyzeCmsModules"
|
|
521
519
|
};
|
|
522
520
|
findAllComponentsIn = (webRoot2, componentsFolder) => {
|
|
523
521
|
const fullComponentsFolderPath = join(webRoot2, componentsFolder);
|
|
@@ -1184,8 +1182,8 @@ function GlobalPartialSlot(props) {
|
|
|
1184
1182
|
var setProperty, getProperty, hasProperty, serializeIslandDataForInlineScript, writeSharedStateToJsGlobal, createIslandsGlobalJsForClientInDev, traverse, CMS_MODULE_COMPONENT_NAME, DND_AREA_COMPONENT_NAME, PLUGIN_NAME, promiseForNewWritableStream, renderStreamToPromise, createServerRenderContextV22, createServerRenderContext2, renderServerSidePropsWithAsyncLocalStoreContext, bootStrapRenderContext;
|
|
1185
1183
|
var init_dist = __esm({
|
|
1186
1184
|
"../cms-js-internal/dist/index.js"() {
|
|
1187
|
-
|
|
1188
|
-
|
|
1185
|
+
init_types_C8bPIEz4();
|
|
1186
|
+
init_types_C8bPIEz4();
|
|
1189
1187
|
({ setProperty, getProperty, hasProperty } = dotProp);
|
|
1190
1188
|
serializeIslandDataForInlineScript = (tweakedIslandsArray, perServerRequestData, baseIndent = 0, prettyPrint) => {
|
|
1191
1189
|
const islandsArrayToSerialize = tweakedIslandsArray.map(
|
|
@@ -7,7 +7,7 @@ import { createServer as createViteServer, normalizePath as normalizePath2 } fro
|
|
|
7
7
|
import { createRequire } from "module";
|
|
8
8
|
import { default as react } from "@vitejs/plugin-react";
|
|
9
9
|
|
|
10
|
-
// ../cms-js-internal/dist/types-
|
|
10
|
+
// ../cms-js-internal/dist/types-C8bPIEz4.js
|
|
11
11
|
import path from "path";
|
|
12
12
|
import fs, { readFileSync, existsSync, readdirSync, lstatSync } from "fs";
|
|
13
13
|
import { join } from "path/posix";
|
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.82",
|
|
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.82",
|
|
33
33
|
"@hubspot/local-dev-lib": "5.10.1",
|
|
34
34
|
"@inquirer/select": "^2.0.0",
|
|
35
35
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Gate } from '@hubspot/cms-js-internal';
|
|
2
1
|
export declare const DEFAULT_SECTION_VARIANT = "section1";
|
|
3
2
|
export declare function signGetUrl(authedPortalId: number, unsignedUrl: string): Promise<string>;
|
|
4
|
-
export declare function signedGet(authedPortalId: number, unsignedUrl: string, headers: Record<string, string
|
|
5
|
-
export declare function renderRemoteModulePreview(modulePath: string, authedPortalId: any, authedEnv: any, cookieValue: any
|
|
3
|
+
export declare function signedGet(authedPortalId: number, unsignedUrl: string, headers: Record<string, string>): Promise<string>;
|
|
4
|
+
export declare function renderRemoteModulePreview(modulePath: string, authedPortalId: any, authedEnv: any, cookieValue: any): Promise<{
|
|
6
5
|
html: string;
|
|
7
6
|
cssNeeded: string;
|
|
8
7
|
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ViteDevServer } from 'vite';
|
|
2
|
+
declare type ModuleFieldError = {
|
|
3
|
+
severity: string;
|
|
4
|
+
errorType: string;
|
|
5
|
+
message: string;
|
|
6
|
+
fieldPath?: string;
|
|
7
|
+
};
|
|
8
|
+
declare type ValidateFieldsOutput = {
|
|
9
|
+
fieldsJsonPath: string;
|
|
10
|
+
fieldsTypePath: string;
|
|
11
|
+
fieldErrors: ModuleFieldError[];
|
|
12
|
+
metaErrors: ModuleFieldError[];
|
|
13
|
+
};
|
|
14
|
+
export declare function validateSingleModule(modulePath: string, absoluteRoot: string, viteServer: ViteDevServer): Promise<ValidateFieldsOutput>;
|
|
15
|
+
export declare function validateModuleFields(projectRoot: string, moduleName?: string): Promise<ValidateFieldsOutput[]>;
|
|
16
|
+
export {};
|