@marvalt/digivalt-core 0.2.36 → 0.2.37
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 +8 -0
- package/bin/env-example-fragments.cjs +17 -10
- package/bin/postinstall-hint.cjs +3 -0
- package/docs/ENVIRONMENT.md +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.37] - 2026-09-29
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- `digivalt-init` env templates drop unused `VITE_USE_DSTYLER` and Supabase keys, and include PHPList plus tracker variables. `.env.example` and `.env.local.example` match `bin/env-example-fragments.cjs`.
|
|
12
|
+
- Installing the package prints a reminder to run `npx digivalt-init` in the app root.
|
|
13
|
+
|
|
14
|
+
**Publish/deploy:** publish **`@marvalt/digivalt-core@0.2.37`**. Apps rerun `npx digivalt-init` to refresh the managed env block. No WordPress plugin publish.
|
|
15
|
+
|
|
8
16
|
## [0.2.36] - 2026-09-28
|
|
9
17
|
|
|
10
18
|
### Added
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
const ENV_EXAMPLE_MANAGED_BODY = `# WordPress / static generation (public URLs)
|
|
7
7
|
VITE_WORDPRESS_API_URL=https://cms.example.com/wp-json
|
|
8
|
-
# direct | cloudflare_proxy
|
|
8
|
+
# direct | cloudflare_proxy
|
|
9
9
|
VITE_AUTH_MODE=direct
|
|
10
10
|
VITE_CLOUDFLARE_WORKER_URL=
|
|
11
11
|
VITE_LOCAL_DEVELOPMENT=false
|
|
@@ -20,7 +20,6 @@ VITE_FRONTEND_NAME=My App
|
|
|
20
20
|
# Comma-separated WordPress CPT slugs plus optional pseudo-types (e.g. google_reviews for vibune-google-reviews static fetch).
|
|
21
21
|
VITE_ENABLED_POST_TYPES=posts,pages
|
|
22
22
|
VITE_DEFAULT_MAX_ITEMS=200
|
|
23
|
-
VITE_USE_DSTYLER=true
|
|
24
23
|
# Optional theme name (default digivalt_core; see loadTheme in config/themes)
|
|
25
24
|
# VITE_THEME=
|
|
26
25
|
|
|
@@ -30,16 +29,25 @@ VITE_USE_DSTYLER=true
|
|
|
30
29
|
# Integration URLs only (secrets belong in .env.local)
|
|
31
30
|
VITE_MAUTIC_URL=
|
|
32
31
|
VITE_MAUTIC_PROXY_URL=
|
|
32
|
+
VITE_PHPLIST_URL=
|
|
33
|
+
VITE_PHPLIST_LIST_ID=
|
|
34
|
+
VITE_PHPLIST_SUBSCRIBE_PAGE_IDS=
|
|
35
|
+
VITE_PHPLIST_PROXY_URL=
|
|
36
|
+
VITE_PHPLIST_NEWSLETTER_ROUTE_BASE=/newsletters
|
|
33
37
|
VITE_SUITECRM_URL=
|
|
34
38
|
VITE_SUITECRM_PROXY_URL=
|
|
35
39
|
# Optional; OAuth token endpoint if not the default for your SuiteCRM
|
|
36
40
|
# VITE_SUITECRM_TOKEN_URL=
|
|
37
|
-
VITE_SUPABASE_URL=
|
|
38
|
-
VITE_SUPABASE_ANON_KEY=
|
|
39
41
|
|
|
40
42
|
VITE_CHATWOOT_BASE_URL=
|
|
41
43
|
VITE_CHATWOOT_WEBSITE_TOKEN=
|
|
42
44
|
|
|
45
|
+
# Analytics (@digivalt/tracker). Paste the full snippet; leave empty to disable.
|
|
46
|
+
# VITE_TRACKING_IN_DEV=true injects tracking during local dev.
|
|
47
|
+
VITE_GA_TRACKING_CODE=
|
|
48
|
+
VITE_MATOMO_TRACKING_CODE=
|
|
49
|
+
VITE_TRACKING_IN_DEV=
|
|
50
|
+
|
|
43
51
|
# Cloudflare account (wrangler / deploy-secrets; not a Vite embed unless duplicated as VITE_)
|
|
44
52
|
CLOUDFLARE_ACCOUNT_ID=
|
|
45
53
|
|
|
@@ -57,10 +65,8 @@ VITE_SEO_GOOGLE_SITE_VERIFICATION=
|
|
|
57
65
|
VITE_SEO_BING_SITE_VERIFICATION=
|
|
58
66
|
# Opt-in frontend path prefixes for non-page post types: rest_base:/route-prefix
|
|
59
67
|
# VITE_SEO_ROUTE_PREFIXES=eventbrite_event:/events,member:/members/profile
|
|
60
|
-
# Optional: WP page slug that must map to
|
|
68
|
+
# Optional: WP page slug that must map to / when Reading Settings front_page does not match the app homepage
|
|
61
69
|
# VITE_SEO_FRONT_PAGE_SLUG=
|
|
62
|
-
# PHPList public archive base (must match the app router)
|
|
63
|
-
# VITE_PHPLIST_NEWSLETTER_ROUTE_BASE=/newsletters
|
|
64
70
|
|
|
65
71
|
# Performance toggles (optional; omit to use defaults in getPerformanceConfig)
|
|
66
72
|
# VITE_PERF_LAZY_LOADING=true
|
|
@@ -94,12 +100,13 @@ VITE_SUITECRM_CLIENT_SECRET=
|
|
|
94
100
|
VITE_SUITECRM_USERNAME=
|
|
95
101
|
VITE_SUITECRM_PASSWORD=
|
|
96
102
|
|
|
97
|
-
# Supabase service role (only if needed; never expose in client bundles inappropriately)
|
|
98
|
-
# VITE_SUPABASE_SERVICE_ROLE_KEY=
|
|
99
|
-
|
|
100
103
|
# PHPList REST API (build generator + Pages Function proxy — prefer without VITE_ prefix)
|
|
101
104
|
PHPLIST_API_USER=
|
|
102
105
|
PHPLIST_API_PASSWORD=
|
|
106
|
+
# Example: https://lists.example.tld/admin/?page=call&pi=restapi
|
|
107
|
+
PHPLIST_API_ENDPOINT=
|
|
108
|
+
PHPLIST_API_SECRET=
|
|
109
|
+
PHPLIST_PUBLIC_BASE_URL=
|
|
103
110
|
# Optional Node aliases (same values; uploaded by deploy-secrets if set)
|
|
104
111
|
# PHPLIST_URL=
|
|
105
112
|
# PHPLIST_LIST_ID=
|
package/docs/ENVIRONMENT.md
CHANGED
|
@@ -50,7 +50,7 @@ Align **`name`** in `wrangler.toml` with your **Cloudflare Pages** project. Loca
|
|
|
50
50
|
| Area | Notes |
|
|
51
51
|
|------|--------|
|
|
52
52
|
| **Path mounts (digivalt-uworker)** | Consumer apps only: set Vite `base` (e.g. `/landing-page/`) and React Router `basename` to match the Worker `BASE_PATH`. Form/API helpers in this package use `withBasePath()` so `/api/*` follows `import.meta.env.BASE_URL`. See [PATH-MOUNT.md](./PATH-MOUNT.md). `digivalt-landing` stays root-hosted. |
|
|
53
|
-
| **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`, `
|
|
53
|
+
| **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_FRONTEND_ID` / `VITE_FRONTEND_NAME` — used by hooks, generators, and `getIntegrationConfig` / `getAppEnvironmentConfig`. **`VITE_FRONTEND_ID`** also selects DigiValt menu locations `{id}-header` / `{id}-footer` (fallback `default-*`). **`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. |
|
|
54
54
|
| **Theme** | `VITE_THEME` — optional; see `loadTheme` in `config/themes`. |
|
|
55
55
|
| **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`). |
|
|
56
56
|
| **SEO** | `VITE_SEO_*` site identity; `VITE_SEO_ROUTE_PREFIXES` for CPT paths — see [SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md). Per-URL fields: WordPress **digivalt-seo**. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marvalt/digivalt-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
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",
|
|
@@ -90,7 +90,8 @@
|
|
|
90
90
|
"smoke:google-reviews-gate": "node ./scripts/test-google-reviews-gate.cjs",
|
|
91
91
|
"smoke:wp-payload-guard": "node ./scripts/test-wp-payload-guard.cjs",
|
|
92
92
|
"smoke": "npm run smoke:imports && npm run smoke:init && npm run smoke:sitemap && npm run smoke:google-reviews-gate && npm run smoke:wp-payload-guard",
|
|
93
|
-
"prepublishOnly": "npm run clean && npm run build && npm run smoke && node ../scripts/verify-pack.cjs"
|
|
93
|
+
"prepublishOnly": "npm run clean && npm run build && npm run smoke && node ../scripts/verify-pack.cjs",
|
|
94
|
+
"postinstall": "node ./bin/postinstall-hint.cjs"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
97
|
"@rollup/plugin-commonjs": "^25.0.7",
|