@hubspot/cms-dev-server 1.2.47 → 1.2.49
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/README.md +13 -1
- package/dist/generateJsonFromJsx.js +2 -1
- package/dist/index.js +3 -2
- package/dist/run.js +3 -2
- package/dist/validateFieldsCli.js +1324 -0
- package/package.json +5 -4
- package/types/lib/renderModule.d.ts +14 -0
- package/types/lib/watchFieldsUpdates.d.ts +1 -0
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.49",
|
|
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.49",
|
|
33
33
|
"@hubspot/local-dev-lib": "5.8.2",
|
|
34
34
|
"@inquirer/select": "^2.0.0",
|
|
35
35
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
@@ -109,7 +109,8 @@
|
|
|
109
109
|
"types": "types/index.d.ts",
|
|
110
110
|
"bin": {
|
|
111
111
|
"hs-cms-dev-server": "./dist/run.js",
|
|
112
|
-
"jsx-module-fields-to-fields-json": "./dist/generateJsonFromJsx.js"
|
|
112
|
+
"jsx-module-fields-to-fields-json": "./dist/generateJsonFromJsx.js",
|
|
113
|
+
"validate-fields": "./dist/validateFieldsCli.js"
|
|
113
114
|
},
|
|
114
115
|
"files": [
|
|
115
116
|
"dist/**/*",
|
|
@@ -134,5 +135,5 @@
|
|
|
134
135
|
"publishConfig": {
|
|
135
136
|
"access": "public"
|
|
136
137
|
},
|
|
137
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "b7023ef3d880c4933ab3f1fc73a65442f7ab9059"
|
|
138
139
|
}
|
|
@@ -5,6 +5,20 @@ import { ModuleProps } from '@hubspot/cms-components';
|
|
|
5
5
|
import { RenderResult } from '../lib/renderComponentWithCSS.js';
|
|
6
6
|
export declare const VALIDATE_FIELDS_ENDPOINT = "/designmanager/v1/modules/validate-fields";
|
|
7
7
|
export declare const VALIDATE_META_ENDPOINT = "/designmanager/v1/modules/validate-meta";
|
|
8
|
+
export declare type FieldValidationResponseBody = {
|
|
9
|
+
errorType: string;
|
|
10
|
+
message: string;
|
|
11
|
+
severity: string;
|
|
12
|
+
succeeded: boolean;
|
|
13
|
+
status: string;
|
|
14
|
+
errorTokens: {
|
|
15
|
+
field: Array<string>;
|
|
16
|
+
path: Array<string>;
|
|
17
|
+
type: Array<string>;
|
|
18
|
+
uiattribute: Array<string>;
|
|
19
|
+
value: Array<string>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
8
22
|
export declare const getApplyValidationToRenderContext: (portalId: any, fieldsJSON: any, metaJSON: any, requestedModulePath: any) => (renderResult: RenderResult) => Promise<RenderResult>;
|
|
9
23
|
export declare const lookForModuleInFolder: (modulePath: string, viteServer: ViteDevServer) => Promise<[any, string]>;
|
|
10
24
|
declare function renderModule(viteServer: ViteDevServer, requestedModulePath: string, moduleProps: ModuleProps, pageUrl: string, basePath: string, environmentConfig: EnvironmentConfig, renderOptions?: RenderToPipeableStreamOptions): Promise<RenderResult>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Field } from '@hubspot/cms-components/fields';
|
|
2
2
|
import { ViteDevServer } from 'vite';
|
|
3
3
|
export declare const formatAsTypeName: (str: string) => string;
|
|
4
|
+
export declare const fileContainsAutoGenComment: (filePath: string) => Promise<boolean>;
|
|
4
5
|
/**
|
|
5
6
|
* If the filePath file is in the modules folder, find and return the closest index file.
|
|
6
7
|
* If the filePath that was updated in modules root, return that path instead.
|