@marvalt/digivalt-core 0.2.15 → 0.2.17
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 +19 -0
- package/README.md +2 -2
- package/bin/env-example-fragments.cjs +2 -1
- package/dist/generators/enabled-post-types.d.ts +5 -0
- package/dist/generators/index.d.ts +1 -0
- package/dist/generators.cjs +33 -9
- package/dist/generators.cjs.map +1 -1
- package/dist/generators.d.ts +7 -1
- package/dist/generators.esm.js +30 -10
- package/dist/generators.esm.js.map +1 -1
- package/dist/index.cjs +38 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.esm.js +35 -11
- package/dist/index.esm.js.map +1 -1
- package/docs/ENVIRONMENT.md +13 -1
- package/docs/README.md +25 -0
- package/package.json +4 -3
package/docs/ENVIRONMENT.md
CHANGED
|
@@ -18,6 +18,18 @@ The command **creates or updates** `.env.example` and `.env.local.example`. The
|
|
|
18
18
|
|
|
19
19
|
**`VITE_IS_LOVABLE` (generators only):** Used in hosted Lovable/CI “fixture” flows to skip live API fetches. **Do not set this in local full-data development.** See [SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md) and your app’s `DIGIVALT_SETUP.md`. It is **not** part of the managed example block; it is listed in `deploy-secrets` excluded keys (below).
|
|
20
20
|
|
|
21
|
+
## React 19 install (consumer apps)
|
|
22
|
+
|
|
23
|
+
`@marvalt/digivalt-core` peers **`react-helmet-async`** for SEO (`@marvalt/digivalt-core/seo`). That package currently declares peer support for React 16–18 only. If your app uses **React 19**, npm may fail with `ERESOLVE`:
|
|
24
|
+
|
|
25
|
+
**Fix:** add a project **`.npmrc`** file:
|
|
26
|
+
|
|
27
|
+
```ini
|
|
28
|
+
legacy-peer-deps=true
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or install once with `npm install --legacy-peer-deps`. Runtime behavior with React 19 is fine; this is an npm peer-range mismatch until upstream updates.
|
|
32
|
+
|
|
21
33
|
## Handover to DevOps (Cloudflare and secrets)
|
|
22
34
|
|
|
23
35
|
### `node scripts/deploy-secrets.js`
|
|
@@ -37,7 +49,7 @@ Align **`name`** in `wrangler.toml` with your **Cloudflare Pages** project. Loca
|
|
|
37
49
|
|
|
38
50
|
| Area | Notes |
|
|
39
51
|
|------|--------|
|
|
40
|
-
| **WordPress / static gen** | `VITE_WORDPRESS_API_URL`, `VITE_AUTH_MODE`, `VITE_CLOUDFLARE_WORKER_URL`, `VITE_LOCAL_DEVELOPMENT`, `VITE_ENABLED_POST_TYPES`, `VITE_DEFAULT_MAX_ITEMS`, `VITE_USE_DSTYLER`, `VITE_FRONTEND_ID` / `VITE_FRONTEND_NAME` — used by hooks, generators, and `getIntegrationConfig` / `getAppEnvironmentConfig`. |
|
|
52
|
+
| **WordPress / static gen** | `VITE_WORDPRESS_API_URL`, `VITE_AUTH_MODE`, `VITE_CLOUDFLARE_WORKER_URL`, `VITE_LOCAL_DEVELOPMENT`, `VITE_ENABLED_POST_TYPES`, `VITE_DEFAULT_MAX_ITEMS`, `VITE_USE_DSTYLER`, `VITE_FRONTEND_ID` / `VITE_FRONTEND_NAME` — used by hooks, generators, and `getIntegrationConfig` / `getAppEnvironmentConfig`. **`google_reviews`** in `VITE_ENABLED_POST_TYPES` is a pseudo-type (not a WordPress CPT): it opt-in enables build-time fetch of `public/google-reviews-data.json` via the `vibune-google-reviews` plugin. |
|
|
41
53
|
| **Theme** | `VITE_THEME` — optional; see `loadTheme` in `config/themes`. |
|
|
42
54
|
| **Integrations (URLs often public; secrets in `.env.local`)** | Mautic, SuiteCRM, Supabase, Chatwoot, Gravity Forms — see `getIntegrationConfig` in `src/config/integrations.ts`. `VITE_SUITECRM_TOKEN_URL` is optional for non-default OAuth token endpoints (`environment.ts`). |
|
|
43
55
|
| **SEO** | `VITE_SEO_*` — see [SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md) and `getSEOConfig`. |
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @marvalt/digivalt-core documentation
|
|
2
|
+
|
|
3
|
+
Read these in order for DigiValt app setup, deploy, and SEO.
|
|
4
|
+
|
|
5
|
+
| Doc | Audience | Purpose |
|
|
6
|
+
|-----|----------|---------|
|
|
7
|
+
| [ENVIRONMENT.md](./ENVIRONMENT.md) | Devs + DevOps | Env vars, `.env` model, Cloudflare secrets, React 19 install |
|
|
8
|
+
| [AI-LOCAL-WORDPRESS-BOOTSTRAP.md](./AI-LOCAL-WORDPRESS-BOOTSTRAP.md) | Humans | Local WordPress handover runbook |
|
|
9
|
+
| [LOVABLE-MASTER-PROMPT.md](./LOVABLE-MASTER-PROMPT.md) | AI tools | Tool-agnostic scaffold prompt |
|
|
10
|
+
| [SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md) | Devs | `DigiValtSeoHead`, sitemap, `VITE_SEO_*`, performance |
|
|
11
|
+
|
|
12
|
+
Package root [README.md](../README.md) covers `digivalt-init`, generators, and entry points.
|
|
13
|
+
|
|
14
|
+
## Adapter packages (installed as dependencies)
|
|
15
|
+
|
|
16
|
+
Each ships its own `docs/README.md` under `node_modules/@marvalt/<package>/docs/`:
|
|
17
|
+
|
|
18
|
+
- `@marvalt/wadapter` — WordPress + Gravity Forms
|
|
19
|
+
- `@marvalt/madapter` — Mautic
|
|
20
|
+
- `@marvalt/wparser` — Gutenberg block rendering
|
|
21
|
+
- `@marvalt/dstyler` — Theme / section styling
|
|
22
|
+
- `@marvalt/shcoder` — CPT shortcode components
|
|
23
|
+
- `@marvalt/tadapter` — Testimonial submission
|
|
24
|
+
- `@marvalt/sadapter` — SuiteCRM
|
|
25
|
+
- `@marvalt/cadapter` — Calendly embeds
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marvalt/digivalt-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "Core glue logic and shared context for DigiVAlt frontend applications",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -66,8 +66,9 @@
|
|
|
66
66
|
"smoke:imports": "node ./scripts/smoke-imports.mjs",
|
|
67
67
|
"smoke:init": "node ./scripts/smoke-init.cjs",
|
|
68
68
|
"smoke:sitemap": "node ./scripts/test-sitemap-paths.cjs",
|
|
69
|
-
"smoke": "
|
|
70
|
-
"
|
|
69
|
+
"smoke:google-reviews-gate": "node ./scripts/test-google-reviews-gate.cjs",
|
|
70
|
+
"smoke": "npm run smoke:imports && npm run smoke:init && npm run smoke:sitemap && npm run smoke:google-reviews-gate",
|
|
71
|
+
"prepublishOnly": "npm run clean && npm run build && npm run smoke && node ../scripts/verify-pack.cjs"
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
74
|
"react": "^18.3.1",
|