@hubspot/cms-dev-server 0.4.0 → 0.4.1

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.
@@ -3,12 +3,18 @@ import React, { useEffect } from "react";
3
3
  import { renderToStaticMarkup as renderToStaticMarkup2 } from "react-dom/server";
4
4
 
5
5
  // ../cms-js-internal/dist/index.js
6
+ import path from "path";
7
+ import stream from "stream";
6
8
  import { renderToPipeableStream } from "react-dom/server";
7
9
  import {
8
10
  ServerRenderContext,
9
11
  createServerRenderContext
10
12
  } from "@hubspot/cms-components";
11
13
  import { jsx } from "react/jsx-runtime";
14
+ import path2 from "path";
15
+ import { existsSync, readdirSync, lstatSync } from "fs";
16
+ import { join as joinPosix } from "path/posix";
17
+ import { basename } from "path";
12
18
  import { cloneElement } from "react";
13
19
  import { renderToStaticMarkup } from "react-dom/server";
14
20
  function renderFieldsToJson(fields) {
@@ -119,9 +125,7 @@ function moduleFieldsToJson(fields) {
119
125
  function moduleStory(ModuleComponent, fields) {
120
126
  const moduleJson = renderFieldsToJson(fields);
121
127
  const argTypes = getFieldsArgTypes(moduleJson);
122
- const story = (_args) => /* @__PURE__ */ jsx2(ModuleComponent, {
123
- ..._args
124
- });
128
+ const story = (_args) => /* @__PURE__ */ jsx2(ModuleComponent, { ..._args });
125
129
  const storyWithArgs = story.bind({});
126
130
  storyWithArgs.argTypes = argTypes;
127
131
  storyWithArgs.args = {};
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
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 --build && 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",
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",
@@ -24,8 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@hubspot/cli-lib": "^3.0.12",
27
- "@hubspot/cms-components": "^0.4.0",
28
- "@hubspot/cms-js-internal": "^0.4.0",
27
+ "@hubspot/cms-components": "^0.4.1",
29
28
  "@storybook/addon-actions": "^7.0.0-beta.19",
30
29
  "@storybook/addon-essentials": "^7.0.0-beta.19",
31
30
  "@storybook/addon-interactions": "^7.0.0-beta.19",
@@ -49,6 +48,7 @@
49
48
  "vite-plugin-mkcert": "^1.10.1"
50
49
  },
51
50
  "devDependencies": {
51
+ "@hubspot/cms-js-internal": "^0.4.0",
52
52
  "@testing-library/dom": "^8.20.0",
53
53
  "@types/express": "^4.17.13",
54
54
  "@types/react": "^18.0.0",
@@ -59,9 +59,9 @@
59
59
  "ts-node": "^10.7.0",
60
60
  "vitest": "0.25.8"
61
61
  },
62
- "main": "./dist/createDevServer.js",
62
+ "main": "./dist/index.js",
63
63
  "exports": {
64
- ".": "./dist/createDevServer.js",
64
+ ".": "./dist/index.js",
65
65
  "./storybook": {
66
66
  "types": "./types/storybook/index.d.ts",
67
67
  "default": "./dist/storybook/index.js"
@@ -77,20 +77,23 @@
77
77
  "types"
78
78
  ],
79
79
  "nodemonConfig": {
80
+ "delay": "2000ms",
80
81
  "ext": "js,json,ts,tsx,jsx,html",
81
82
  "ignore": [
82
83
  "testApp/*",
83
- "dist/*"
84
+ "./dist/*"
84
85
  ],
85
86
  "watch": [
86
87
  "src",
87
88
  "package.json",
88
89
  "yarn.lock",
89
- "tsconfig.json"
90
+ "tsconfig.json",
91
+ "../cms-components/dist",
92
+ "../cms-js-internal/dist"
90
93
  ]
91
94
  },
92
95
  "publishConfig": {
93
96
  "access": "public"
94
97
  },
95
- "gitHead": "9b7c19f05fd3befbddfa392c4d2029e883e701f2"
98
+ "gitHead": "d2e7b02c414f07b8bc24b4d97b81bf7e9ba48dc0"
96
99
  }
@@ -1,2 +1,2 @@
1
- declare function createViteDevServer(webRoot: string): Promise<import("vite").ViteDevServer>;
1
+ declare function createViteDevServer(webRoot: string, port: any, sslEnabled: boolean, domainsToProxy?: any[]): Promise<import("vite").ViteDevServer>;
2
2
  export default createViteDevServer;