@woodsportal/hubspot-kit 1.0.31 → 1.0.34
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/CHANGELOG.md +45 -0
- package/dist/cli.js +798 -281
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/examples/fixtures/adopted-module-hybrid/woodscli.json +1 -1
- package/examples/fixtures/adopted-module-monolith/woodscli.json +1 -1
- package/examples/greenfield/module-hybrid-cdn/public/fields.json +26 -20
- package/examples/greenfield/module-hybrid-cdn/public/meta.json +9 -0
- package/examples/greenfield/module-hybrid-cdn/public/module.html +3 -4
- package/examples/greenfield/module-hybrid-cdn/src/assets/css/main.prod.css +6 -0
- package/examples/greenfield/module-hybrid-cdn/src/cdn/app-entry.ts +5 -0
- package/examples/greenfield/module-hybrid-cdn/src/hubspot/bootstrap.ts +6 -0
- package/examples/greenfield/module-hybrid-cdn/src/portal/ensure-portal-cdn-stylesheet.ts +58 -0
- package/examples/greenfield/module-hybrid-cdn/woodscli.json +1 -1
- package/examples/greenfield/module-monolith/woodscli.json +1 -1
- package/package.json +2 -2
- package/scripts/build-cdn.mjs +6 -1
- package/scripts/bump-module-build-id.mjs +28 -0
- package/scripts/hubspot-module-postbuild.mjs +35 -1
- package/scripts/load-portal-cdn-config.mjs +21 -3
- package/scripts/portal-build-id.mjs +346 -0
- package/scripts/portal-build-id.test.mjs +132 -0
- package/scripts/publish-cdn-github.mjs +60 -15
- package/scripts/resolve-cdn-base-url.mjs +2 -1
- package/scripts/resolve-module-build-id-meta.mjs +7 -0
- package/scripts/resolve-portal-build-id.mjs +16 -56
- package/scripts/tailwind/prefix-plugin.js +46 -8
- package/scripts/tailwind/tailwind-content-plugin.js +0 -1
- package/scripts/vite/portal-build-shared.js +3 -1
- package/src/dev-module-config/__tests__/flatten-visible-fields.test.ts +107 -0
- package/src/dev-module-config/runtime/module-config-bridge.ts +10 -2
- package/src/dev-module-config/schema/types.ts +10 -0
- package/src/dev-module-config/schema/visibility.ts +42 -4
- package/src/dev-module-config/ui/ModuleConfigShell.tsx +10 -9
- package/src/dev-module-config/ui/hubspot/HsOccurrenceGroupEditor.tsx +3 -3
- package/templates/module-hybrid-cdn/public/fields.json +52 -41
- package/templates/module-hybrid-cdn/public/meta.json +9 -0
- package/templates/module-hybrid-cdn/public/module.html +18 -4
- package/templates/module-hybrid-cdn/src/assets/css/main.dev.css +8 -0
- package/templates/module-hybrid-cdn/src/assets/css/main.prod.css +12 -0
- package/templates/module-hybrid-cdn/src/assets/css/tailwind.css.config.css +7 -0
- package/templates/module-hybrid-cdn/src/cdn/app-entry.ts +14 -3
- package/templates/module-hybrid-cdn/src/features/starter/components/starter-home.tsx +9 -11
- package/templates/module-hybrid-cdn/src/features/starter/hooks/starter-preview-values.ts +23 -5
- package/templates/module-hybrid-cdn/src/features/starter/hooks/use-starter-preview.dev.ts +1 -0
- package/templates/module-hybrid-cdn/src/hubspot/bootstrap.ts +6 -0
- package/templates/module-hybrid-cdn/src/portal/ensure-portal-cdn-stylesheet.ts +115 -0
- package/templates/module-hybrid-cdn/src/portal/mount-portal.tsx +35 -5
- package/templates/module-hybrid-cdn/woodscli.json +1 -1
- package/templates/module-monolith/public/fields.json +23 -16
- package/templates/module-monolith/public/meta.json +9 -0
- package/templates/module-monolith/src/features/starter/components/starter-home.tsx +9 -11
- package/templates/module-monolith/src/features/starter/hooks/starter-preview-values.ts +23 -5
- package/templates/module-monolith/src/features/starter/hooks/use-starter-preview.dev.ts +1 -0
- package/templates/module-monolith/woodscli.json +1 -1
- package/vite/vite.config.dev.mjs +16 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Module build id (collaborative CDN deploys)
|
|
6
|
+
- **Rename** `.portal-build-id` → `.module-build-id` (channel baseline); `wp migrate --yes` upgrades legacy projects
|
|
7
|
+
- **Auto-bump** on `wp deploy` and `wp build --cdn-only` — `{baseline}.{devSlug}.{seq}` in gitignored `.wphs/state/module-build-id.json`
|
|
8
|
+
- **`--no-bump`** — rebuild/publish without advancing seq; `PORTAL_BUILD_ID` / `MODULE_BUILD_ID` / `GITHUB_REF_NAME` still override
|
|
9
|
+
- **`wp setup`** — prompts for CDN dev slug (`.wphs/config/developer.json`); optional `portal.cdn.local.json` mirror override
|
|
10
|
+
- **`wp publish`** — aborts on remote tag collision (use `--force-tag` only to intentionally overwrite)
|
|
11
|
+
|
|
12
|
+
### Hybrid CDN (module-config overlay)
|
|
13
|
+
- **Content tab** — stop flattening CONTENT-tab groups at shell level; keep `home`, `menu_options`, custom editors, and collapsibles
|
|
14
|
+
- **Styles tab** — expand tab-aligned `style` / `styles` wrapper once with `pathPrefix` for nested style field paths
|
|
15
|
+
- **Starter scaffold** — wrap Content fields in a `content` group; `readContentField` supports grouped + flat module values
|
|
16
|
+
- **`mount-portal.tsx`** — mode-aware `loadCss()` + `MountPortalOptions` (`skipRuntimeCss`, `skipAppRender`)
|
|
17
|
+
- **`cdn/app-entry.ts`** — `mountPortal({ skipRuntimeCss: true })`; editor-only CDN stylesheet fallback via `ensurePortalCdnStylesheetIfNeeded()`
|
|
18
|
+
- **`module.html`** — `{% scope_css %}` reset + `:root` `--starter-accent` for HubSpot pages
|
|
19
|
+
- **CSS entries** — shared `tailwind.css.config.css`; documented never-merge rules on `main.dev.css` / `main.prod.css`
|
|
20
|
+
- **`wp doctor`** — CSS pipeline checks (prefix, `.temp` @source, `skipRuntimeCss`, `module.css` dw utilities, CDN `require_css` warning)
|
|
21
|
+
|
|
22
|
+
## 1.0.34 — 2026-06-08
|
|
23
|
+
|
|
24
|
+
### Dev server
|
|
25
|
+
- **`wp dev` / `wp local`** — spawn Vite via `node …/vite/bin/vite.js` (or `vite.cmd` on Windows) instead of `.bin/vite` shell shim; fixes `ENOENT` on Windows
|
|
26
|
+
|
|
27
|
+
## 1.0.33 — 2026-06-08
|
|
28
|
+
|
|
29
|
+
### Dev server
|
|
30
|
+
- **`wp dev`** — resolve Vite and `@vitejs/plugin-react` from the consumer project (not the kit’s `node_modules`); avoid top-level `await` and parallel `vite` + `plugin-react` import (Node CJS/ESM interop)
|
|
31
|
+
- **Module config overlay** — expand STYLE-tab field groups (e.g. `styles.accent_color`) in the panel; starter preview reads nested style values after `fields.json` STYLE group change
|
|
32
|
+
- **Dev persistence** — sync `module` field values into `__WPHS_DATA__` on load/apply so starter preview survives page reload (`.wphs/config/module-config.local.json`)
|
|
33
|
+
|
|
34
|
+
### Hybrid CDN (CMS styles)
|
|
35
|
+
- **Prefix build** — disable React Compiler on stg/prod (`dw:`) builds so memoized `className` strings stay prefixed
|
|
36
|
+
- **Prefix plugin** — nested `className` ternaries and `return` string literals; starter hero uses JSX `className` branches (not runtime helper strings)
|
|
37
|
+
|
|
38
|
+
## 1.0.32 — 2026-06-08
|
|
39
|
+
|
|
40
|
+
### Hybrid CDN (HubSpot editor + deploy)
|
|
41
|
+
- **jsDelivr** — CDN base URLs use `@main` (versioned filenames); git tags remain for releases
|
|
42
|
+
- **`module.css`** — copy `app.*.css` into uploaded `module.css` (CMS editor does not load external CDN CSS)
|
|
43
|
+
- **`main.prod.css`** — `prefix(dw)` + `.temp` sources (matches client-frontend); fixes JS/CSS class mismatch on HubSpot pages
|
|
44
|
+
- **STYLE fields** — `fields.json` style group on STYLE tab; `meta.json` in hybrid/monolith templates
|
|
45
|
+
- **Bootstrap** — hubspot `bootstrap.ts` imports `main.prod.css`; CDN `app-entry` CSS fallback helper
|
|
46
|
+
- **`wp doctor`** — CDN mirror public + jsDelivr reachability; hybrid `module.html` no longer requires `require_css`
|
|
47
|
+
|
|
3
48
|
## 1.0.31 — 2026-06-08
|
|
4
49
|
|
|
5
50
|
### CLI
|