@marvalt/digivalt-core 0.2.22 → 0.2.24

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 CHANGED
@@ -5,6 +5,11 @@ 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.24] - 2026-07-08
9
+
10
+ ### Changed
11
+ - **`generateAllData`**: Mautic, SuiteCRM, PHPList, and Google Reviews are **warn-only** — build no longer exits when optional integration generators fail. Only WordPress and Gravity Forms failures block the build.
12
+
8
13
  ## [0.2.22] - 2026-06-18
9
14
 
10
15
  ### Added
@@ -91,6 +91,13 @@ VITE_SUITECRM_PASSWORD=
91
91
  # Supabase service role (only if needed; never expose in client bundles inappropriately)
92
92
  # VITE_SUPABASE_SERVICE_ROLE_KEY=
93
93
 
94
+ # PHPList REST API (build generator + Pages Function proxy — prefer without VITE_ prefix)
95
+ PHPLIST_API_USER=
96
+ PHPLIST_API_PASSWORD=
97
+ # Optional Node aliases (same values; uploaded by deploy-secrets if set)
98
+ # PHPLIST_URL=
99
+ # PHPLIST_LIST_ID=
100
+
94
101
  # cf-wp-webhook-refresh + Cloudflare Pages Functions
95
102
  VITE_FRONTEND_SECRET=
96
103
  VITE_WP_REFRESH_SECRET=
package/bin/init.cjs CHANGED
@@ -29,6 +29,7 @@ const TEMPLATE_MANAGED_FILES = new Set([
29
29
  'functions/api/mautic-submit.ts',
30
30
  'functions/api/webhook.js',
31
31
  'scripts/deploy-secrets.js',
32
+ 'scripts/deploy-pages.js',
32
33
  'scripts/generate.ts',
33
34
  'wrangler.toml',
34
35
  ]);
@@ -465,6 +466,7 @@ function printSummary() {
465
466
  console.log('4. Confirm `wrangler.toml` matches your Cloudflare Pages project name.');
466
467
  console.log('5. Run `npm run build` to verify static generation now runs before `vite build`.');
467
468
  console.log('6. Run `node scripts/deploy-secrets.js` when you are ready to sync allowed env vars to Cloudflare Pages.');
469
+ console.log('7. Run `node scripts/deploy-pages.js` (or `npm run deploy:pages`) to build and deploy via Wrangler.');
468
470
  }
469
471
 
470
472
  try {
@@ -2430,8 +2430,8 @@ async function generateMauticData(options) {
2430
2430
  return true;
2431
2431
  }
2432
2432
  catch (e) {
2433
- console.error('❌ Mautic generation failed:', e.message);
2434
- return false;
2433
+ console.warn(`⚠️ Mautic generation failed (build continues): ${e.message}`);
2434
+ return true;
2435
2435
  }
2436
2436
  }
2437
2437
 
@@ -2703,6 +2703,17 @@ async function generatePhplistData(options) {
2703
2703
  const newsletterRouteBase = process.env.VITE_PHPLIST_NEWSLETTER_ROUTE_BASE || '/newsletters';
2704
2704
  const cfAccessClientId = process.env.CF_ACCESS_CLIENT_ID || process.env.VITE_CF_ACCESS_CLIENT_ID;
2705
2705
  const cfAccessClientSecret = process.env.CF_ACCESS_CLIENT_SECRET || process.env.VITE_CF_ACCESS_CLIENT_SECRET;
2706
+ const restApiEndpoint = process.env.PHPLIST_API_ENDPOINT || process.env.VITE_PHPLIST_API_ENDPOINT;
2707
+ const publicBaseUrl = process.env.PHPLIST_PUBLIC_BASE_URL || process.env.VITE_PHPLIST_PUBLIC_BASE_URL;
2708
+ const apiSecret = process.env.PHPLIST_API_SECRET || process.env.VITE_PHPLIST_API_SECRET;
2709
+ const subscribeStrategy = process.env.PHPLIST_SUBSCRIBE_STRATEGY || process.env.VITE_PHPLIST_SUBSCRIBE_STRATEGY;
2710
+ const subscribePageId = process.env.PHPLIST_SUBSCRIBE_PAGE_ID || process.env.VITE_PHPLIST_SUBSCRIBE_PAGE_ID;
2711
+ const apiModeRaw = process.env.PHPLIST_API_MODE || process.env.VITE_PHPLIST_API_MODE;
2712
+ const apiMode = apiModeRaw === 'rest_v2' || apiModeRaw === 'v2'
2713
+ ? 'rest_v2'
2714
+ : apiModeRaw === 'restapi' || apiModeRaw === 'plugin' || restApiEndpoint
2715
+ ? 'restapi'
2716
+ : undefined;
2706
2717
  if (!phplistUrl) {
2707
2718
  console.log('⚠️ PHPList URL not configured. Skipping PHPList data generation.');
2708
2719
  return true;
@@ -2730,6 +2741,12 @@ async function generatePhplistData(options) {
2730
2741
  newsletterRouteBase,
2731
2742
  cfAccessClientId,
2732
2743
  cfAccessClientSecret,
2744
+ apiMode,
2745
+ restApiEndpoint,
2746
+ publicBaseUrl,
2747
+ apiSecret,
2748
+ subscribeStrategy: subscribeStrategy === 'direct' ? 'direct' : subscribeStrategy === 'confirm-email' ? 'confirm-email' : undefined,
2749
+ subscribePageId,
2733
2750
  });
2734
2751
  if (result.success) {
2735
2752
  console.log(`📁 PHPList data written to: ${path.join(process.cwd(), outputPath)}`);
@@ -2775,8 +2792,8 @@ async function generateSuiteCRMData(options) {
2775
2792
  return true;
2776
2793
  }
2777
2794
  catch (e) {
2778
- console.error('❌ SuiteCRM generation failed:', e.message);
2779
- return false;
2795
+ console.warn(`⚠️ SuiteCRM generation failed (build continues): ${e.message}`);
2796
+ return true;
2780
2797
  }
2781
2798
  }
2782
2799
 
@@ -3091,12 +3108,13 @@ async function generateAllData() {
3091
3108
  }
3092
3109
  const wpSuccess = await generateWordPressData();
3093
3110
  const gfSuccess = await generateGravityFormsData();
3094
- const mauticSuccess = await generateMauticData();
3111
+ // Optional integrations — warn-only (same as PHPList); do not block deploy
3112
+ await generateMauticData();
3095
3113
  await generatePhplistData();
3096
- const suitecrmSuccess = await generateSuiteCRMData();
3097
- const googleReviewsSuccess = await generateGoogleReviewsData();
3098
- if (!wpSuccess || !gfSuccess || !mauticSuccess || !suitecrmSuccess || !googleReviewsSuccess) {
3099
- console.error('❌ Some generation tasks failed. See above for details.');
3114
+ await generateSuiteCRMData();
3115
+ await generateGoogleReviewsData();
3116
+ if (!wpSuccess || !gfSuccess) {
3117
+ console.error('❌ Required generation failed (WordPress or Gravity Forms). See above for details.');
3100
3118
  process.exit(1);
3101
3119
  }
3102
3120
  await generateSitemapPathsSafe();