@marvalt/digivalt-core 0.1.6 → 0.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marvalt/digivalt-core",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
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",
@@ -0,0 +1,33 @@
1
+ import { generators } from '@marvalt/digivalt-core';
2
+ import dotenv from 'dotenv';
3
+
4
+ // Load environment variables manually for Node script context
5
+ dotenv.config();
6
+ dotenv.config({ path: '.env.local' });
7
+
8
+ async function runGenerators() {
9
+ console.log('🚀 Starting DigiVAlt static data generation for Landing Project...');
10
+
11
+ if (process.env.VITE_IS_LOVABLE === 'true') {
12
+ console.log('⚡ Lovable Environment Detected (VITE_IS_LOVABLE). Skipping static data generation to use GitHub synced files.');
13
+ return;
14
+ }
15
+
16
+ try {
17
+ console.log('Fetching Gravity Forms Context...');
18
+ const gfSuccess = await generators.generateGravityFormsData();
19
+
20
+ console.log('Fetching Mautic Context...');
21
+ const mauticSuccess = await generators.generateMauticData();
22
+
23
+ if (!gfSuccess || !mauticSuccess) {
24
+ console.warn('⚠️ Some data generation tasks returned false, but continuing build gracefully.');
25
+ } else {
26
+ console.log('✅ Customized static generation complete!');
27
+ }
28
+ } catch (error) {
29
+ console.error('❌ Data fetching encountered an error, but continuing build gracefully:', error);
30
+ }
31
+ }
32
+
33
+ runGenerators();