@hubspot/cms-dev-server 0.14.0 → 0.14.2

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 (2) hide show
  1. package/dist/run.js +10 -3
  2. package/package.json +11 -6
package/dist/run.js CHANGED
@@ -669,7 +669,7 @@ var getEntryPointBasePath = (componentPath) => {
669
669
  };
670
670
 
671
671
  // src/lib/renderComponentWithCSS.ts
672
- async function renderComponentWithCSS(viteServer, componentPath, Component, props, pageUrl, entryPointBasePath, environmentConfig, renderOptions) {
672
+ async function renderComponentWithCSS(viteServer, componentPath, Component, props, pageUrl, entryPointBasePath, contextOptions, environmentConfig, renderOptions) {
673
673
  const internalSsrPath = packagePath(import.meta.url, "internalSsr");
674
674
  const { renderComponentOnServer, collectCssInDev } = await viteServer.ssrLoadModule(internalSsrPath);
675
675
  const [, componentPathWithExtension] = getComponentPaths(
@@ -685,6 +685,7 @@ async function renderComponentWithCSS(viteServer, componentPath, Component, prop
685
685
  pageUrl,
686
686
  environmentConfig,
687
687
  entryPointBasePath,
688
+ contextOptions,
688
689
  renderOptions
689
690
  );
690
691
  const cssNeeded = collectCssInDev(componentPathWithExtension, viteServer);
@@ -788,6 +789,8 @@ async function renderPartial(viteServer, partialPath, props, pageUrl, basePath,
788
789
  props,
789
790
  pageUrl,
790
791
  basePath,
792
+ void 0,
793
+ // contextOptions
791
794
  environmentConfig,
792
795
  renderOptions
793
796
  );
@@ -963,7 +966,7 @@ function trackUsage(action) {
963
966
  eventName: EVENT_NAME,
964
967
  action,
965
968
  nodeVersion: getNodeVersionData(),
966
- version: "0.14.0",
969
+ version: "0.14.2",
967
970
  os: getPlatform()
968
971
  };
969
972
  const uri = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
@@ -1241,6 +1244,7 @@ async function renderModule(viteServer, requestedModulePath, moduleProps, pageUr
1241
1244
  const {
1242
1245
  fieldValues: fieldOverrides = {},
1243
1246
  hublParameters,
1247
+ supplementalFieldValues,
1244
1248
  experimentalHublData,
1245
1249
  hublData,
1246
1250
  moduleName
@@ -1314,6 +1318,7 @@ async function renderModule(viteServer, requestedModulePath, moduleProps, pageUr
1314
1318
  fieldValues,
1315
1319
  hublParameters,
1316
1320
  dataQueryResult,
1321
+ supplementalFieldValues,
1317
1322
  experimentalHublData,
1318
1323
  hublData,
1319
1324
  moduleName
@@ -1321,7 +1326,8 @@ async function renderModule(viteServer, requestedModulePath, moduleProps, pageUr
1321
1326
  if (ungatedForServerSideProps && componentModule.getServerSideProps) {
1322
1327
  try {
1323
1328
  serverSideProps = await componentModule.getServerSideProps(
1324
- namespacedModuleProps
1329
+ namespacedModuleProps,
1330
+ new URL(pageUrl)
1325
1331
  );
1326
1332
  if (serverSideProps.constructor !== {}.constructor) {
1327
1333
  throw new Error("getServerSideProps must return an object");
@@ -1338,6 +1344,7 @@ async function renderModule(viteServer, requestedModulePath, moduleProps, pageUr
1338
1344
  { ...namespacedModuleProps, serverSideProps },
1339
1345
  pageUrl,
1340
1346
  basePath,
1347
+ { supplementalFieldValues },
1341
1348
  environmentConfig,
1342
1349
  renderOptions
1343
1350
  ).then(applyFieldsValidationToRenderContext);
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=16.x"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc -noEmit && yarn run copy-html && yarn build-types && node scripts/build.mjs",
10
+ "build": "tsc -noEmit && yarn run copy-html && yarn build-types && node scripts/build.mjs; npm run publint",
11
11
  "build:watch": "nodemon --exec 'yarn build'",
12
12
  "copy-html": "copyfiles -u 1 'src/html/**' 'dist'",
13
13
  "build-types": "tsc --project tsconfig.types.json",
@@ -21,11 +21,12 @@
21
21
  "start": "ts-node-esm --transpileOnly runWhenDeveloping.ts",
22
22
  "start-inspect": "node --loader ts-node/esm --inspect runWhenDeveloping.ts",
23
23
  "test": "PORT=30042 NODE_ENV=test vitest run",
24
- "test:watch": "PORT=30042 NODE_ENV=test vitest watch"
24
+ "test:watch": "PORT=30042 NODE_ENV=test vitest watch",
25
+ "publint": "publint --level warning --prod"
25
26
  },
26
27
  "dependencies": {
27
28
  "@hubspot/cli-lib": "^3.0.12",
28
- "@hubspot/cms-components": "^0.14.0",
29
+ "@hubspot/cms-components": "^0.14.2",
29
30
  "@originjs/vite-plugin-commonjs": "^1.0.3",
30
31
  "@storybook/addon-actions": "7.0.7",
31
32
  "@storybook/addon-essentials": "7.0.7",
@@ -62,12 +63,16 @@
62
63
  "copyfiles": "^2.4.1",
63
64
  "esbuild": "^0.16.17",
64
65
  "nodemon": "^2.0.15",
66
+ "publint": "^0.2.7",
65
67
  "ts-node": "^10.7.0",
66
68
  "vitest": "0.30.1"
67
69
  },
68
70
  "main": "./dist/index.js",
69
71
  "exports": {
70
- ".": "./dist/index.js",
72
+ ".": {
73
+ "types": "./types/index.d.ts",
74
+ "default": "./dist/index.js"
75
+ },
71
76
  "./storybook": {
72
77
  "types": "./types/storybook/index.d.ts",
73
78
  "default": "./dist/storybook/index.js"
@@ -101,5 +106,5 @@
101
106
  "publishConfig": {
102
107
  "access": "public"
103
108
  },
104
- "gitHead": "b2ea8a21fc6ed990dd17737d9920abc497bfc65e"
109
+ "gitHead": "3cdf0bda841f30c17da5f55f6a52288572ba4967"
105
110
  }