@hubspot/cms-dev-server 1.1.0-prerelease.5 → 1.1.0-prerelease.6

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/LICENSE ADDED
@@ -0,0 +1,12 @@
1
+ Copyright 2022 HubSpot, Inc.
2
+ Licensed under the Apache License, Version 2.0 (the "License");
3
+ you may not use this file except in compliance with the License.
4
+ You may obtain a copy of the License at
5
+
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+
8
+ Unless required by applicable law or agreed to in writing, software
9
+ distributed under the License is distributed on an "AS IS" BASIS,
10
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ See the License for the specific language governing permissions and
12
+ limitations under the License.
@@ -1,7 +1,7 @@
1
1
  /* hs-eslint ignored failing-rules */
2
2
  /* eslint-disable @typescript-eslint/no-shadow */
3
3
  import { promises as fsPromises } from 'fs';
4
- import { sortIslandRootsByPriority, createIslandsGlobalJsForClientInDev, getServerGlobalsToInject, } from '@hubspot/cms-js-internal';
4
+ import { createIslandsGlobalJsForClientInDev, getServerGlobalsToInject, } from '@hubspot/cms-js-internal';
5
5
  const { readFile } = fsPromises;
6
6
  const ISLAND_RUNTIME_AND_SETUP_SCRIPT_BLOCK = `<script type="module">
7
7
  import { setupIslandHydration } from '@hubspot/cms-components/island-runtime';
@@ -25,9 +25,8 @@ export const createHtmlShellDependingOnRenderContext = async (baseTemplatePath,
25
25
  let htmlTemplate;
26
26
  if (renderContext.islands.length) {
27
27
  htmlTemplate = await createIslandHtmlTemplate(baseTemplatePath, title);
28
- const sortedIslandRoots = sortIslandRootsByPriority(renderContext.islands);
29
28
  htmlTemplate = htmlTemplate.replace('<!--islandsglobal-->', `<script>
30
- ${createIslandsGlobalJsForClientInDev(sortedIslandRoots, viteServer, 4)}
29
+ ${createIslandsGlobalJsForClientInDev(renderContext.islands, viteServer, 4)}
31
30
  </script>
32
31
  ${getServerGlobalsToInject(renderContext.pageUrl)}
33
32
  `);
@@ -98,7 +98,7 @@ export default async function proxySpecificPage(response, portalId, contentId, w
98
98
  const { previewKey } = previewInfo;
99
99
  const pageHtml = await makeProxyPreviewRequest(accountId, urlToProxy, previewKey, contentId);
100
100
  // Loading through vite so all of nested `@hubspot/cms-*` imports work
101
- const { sortIslandRootsByPriority } = await viteServer.ssrLoadModule('@hubspot/cms-js-internal');
101
+ const { sortIslandRootsByPriority } = await viteServer.ssrLoadModule('@hubspot/cms-components');
102
102
  const localRenderPlaceholders = findLocalRenderPlaceholders(pageHtml);
103
103
  const numPlaceholders = localRenderPlaceholders.length;
104
104
  let numJsRenderFailures = 0;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "1.1.0-prerelease.5",
3
+ "version": "1.1.0-prerelease.6",
4
+ "license": "Apache-2.0",
4
5
  "type": "module",
5
6
  "main": "./dist/createViteDevServer.js",
6
7
  "scripts": {
@@ -17,8 +18,8 @@
17
18
  },
18
19
  "dependencies": {
19
20
  "@hubspot/cli-lib": "^3.0.12",
20
- "@hubspot/cms-components": "^1.1.0-prerelease.5",
21
- "@hubspot/cms-js-internal": "^1.1.0-prerelease.5",
21
+ "@hubspot/cms-components": "^1.1.0-prerelease.6",
22
+ "@hubspot/cms-js-internal": "^1.1.0-prerelease.6",
22
23
  "@vitejs/plugin-react": "^2.0.0",
23
24
  "ansi-to-html": "0.7.x",
24
25
  "express": "^4.17.3",
@@ -60,5 +61,5 @@
60
61
  "publishConfig": {
61
62
  "access": "public"
62
63
  },
63
- "gitHead": "80d94604729d07b9880d3c97edb404e582cf19de"
64
+ "gitHead": "5c7ad978bb67ee8308c91cdffd226c00bc47d20c"
64
65
  }