@schandlergarcia/sf-web-components 1.9.79 → 1.9.81
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 +12 -0
- package/package.json +1 -1
- package/scripts/reset-command-center.sh +72 -15
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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
|
+
## [1.9.81] - 2026-04-06
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Reset script metadata cleanup** — Now silently skips when `force-app` directory or metadata folders don't exist. Only prints output when it actually finds and removes files. No more noisy "ℹ No Apex classes to remove" messages.
|
|
12
|
+
|
|
13
|
+
## [1.9.80] - 2026-04-04
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Reset script cleans Salesforce metadata** — `reset-command-center.sh` now removes all Apex classes (`.cls` + `.cls-meta.xml`), custom field XML, and platform event directories from `force-app/main/default/`. Walks up from the webapp root to find the SFDX project structure automatically.
|
|
17
|
+
|
|
18
|
+
**Context:** Demo phases create Apex classes (Agent*, TCC_*), custom fields (Weather_Impact__c), and platform events (Travel_Disruption_Alert__e) that need to be cleaned up when resetting for a fresh demo run.
|
|
19
|
+
|
|
8
20
|
## [1.9.79] - 2026-04-04
|
|
9
21
|
|
|
10
22
|
### Fixed
|
package/package.json
CHANGED
|
@@ -755,7 +755,70 @@ else
|
|
|
755
755
|
echo " ⚠ Skipped logo (package logo not found)"
|
|
756
756
|
fi
|
|
757
757
|
|
|
758
|
-
|
|
758
|
+
# ── Clean Salesforce metadata created during the demo ────────────────────────
|
|
759
|
+
|
|
760
|
+
SFDX_DEFAULT=""
|
|
761
|
+
|
|
762
|
+
# Walk up from webapp root to find force-app/main/default
|
|
763
|
+
check="$ROOT"
|
|
764
|
+
for i in 1 2 3 4 5; do
|
|
765
|
+
if [ -d "$check/force-app/main/default" ]; then
|
|
766
|
+
SFDX_DEFAULT="$check/force-app/main/default"
|
|
767
|
+
break
|
|
768
|
+
fi
|
|
769
|
+
parent="$(dirname "$check")"
|
|
770
|
+
# Check if we're already inside force-app/main/default
|
|
771
|
+
if [[ "$check" == */force-app/main/default/* ]]; then
|
|
772
|
+
SFDX_DEFAULT="${check%%/force-app/main/default/*}/force-app/main/default"
|
|
773
|
+
break
|
|
774
|
+
fi
|
|
775
|
+
check="$parent"
|
|
776
|
+
done
|
|
777
|
+
|
|
778
|
+
if [ -n "$SFDX_DEFAULT" ]; then
|
|
779
|
+
metadata_cleaned=0
|
|
780
|
+
|
|
781
|
+
# Remove all Apex classes (.cls and .cls-meta.xml)
|
|
782
|
+
CLASSES_DIR="$SFDX_DEFAULT/classes"
|
|
783
|
+
if [ -d "$CLASSES_DIR" ]; then
|
|
784
|
+
cls_count=$(find "$CLASSES_DIR" -maxdepth 1 \( -name "*.cls" -o -name "*.cls-meta.xml" \) 2>/dev/null | wc -l | tr -d ' ')
|
|
785
|
+
if [ "$cls_count" -gt 0 ]; then
|
|
786
|
+
[ "$metadata_cleaned" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
787
|
+
rm -f "$CLASSES_DIR"/*.cls "$CLASSES_DIR"/*.cls-meta.xml
|
|
788
|
+
echo " ✓ Removed $cls_count Apex class files"
|
|
789
|
+
metadata_cleaned=1
|
|
790
|
+
fi
|
|
791
|
+
fi
|
|
792
|
+
|
|
793
|
+
# Remove custom fields created during the demo
|
|
794
|
+
OBJECTS_DIR="$SFDX_DEFAULT/objects"
|
|
795
|
+
if [ -d "$OBJECTS_DIR" ]; then
|
|
796
|
+
for fields_dir in "$OBJECTS_DIR"/*/fields; do
|
|
797
|
+
if [ -d "$fields_dir" ]; then
|
|
798
|
+
for f in "$fields_dir"/*.field-meta.xml; do
|
|
799
|
+
if [ -f "$f" ]; then
|
|
800
|
+
[ "$metadata_cleaned" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
801
|
+
rm "$f"
|
|
802
|
+
echo " ✓ Removed $(basename "$f")"
|
|
803
|
+
metadata_cleaned=1
|
|
804
|
+
fi
|
|
805
|
+
done
|
|
806
|
+
fi
|
|
807
|
+
done
|
|
808
|
+
|
|
809
|
+
# Remove platform event directories
|
|
810
|
+
for evt_dir in "$OBJECTS_DIR"/*__e; do
|
|
811
|
+
if [ -d "$evt_dir" ]; then
|
|
812
|
+
[ "$metadata_cleaned" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
813
|
+
rm -rf "$evt_dir"
|
|
814
|
+
echo " ✓ Removed platform event $(basename "$evt_dir")"
|
|
815
|
+
metadata_cleaned=1
|
|
816
|
+
fi
|
|
817
|
+
done
|
|
818
|
+
fi
|
|
819
|
+
|
|
820
|
+
[ "$metadata_cleaned" -gt 0 ] && echo ""
|
|
821
|
+
fi
|
|
759
822
|
|
|
760
823
|
# ── Done ─────────────────────────────────────────────────────────────────────
|
|
761
824
|
|
|
@@ -764,18 +827,15 @@ echo "║ ✓ Reset complete! ║"
|
|
|
764
827
|
echo "║ ║"
|
|
765
828
|
echo "║ Restored: ║"
|
|
766
829
|
echo "║ • Engine brand theme (global.css) ║"
|
|
767
|
-
echo "║
|
|
768
|
-
echo "║ - Inter font stack ║"
|
|
769
|
-
echo "║ - HeroUI Engine theme overrides ║"
|
|
770
|
-
echo "║ • Engine sample data (engine-sample-data.js)║"
|
|
771
|
-
echo "║ • Engine live data (engine-live-data.js) ║"
|
|
830
|
+
echo "║ • Engine sample data + live data ║"
|
|
772
831
|
echo "║ • Live data hook (useEngineLiveData.ts) ║"
|
|
773
|
-
echo "║ • GraphQL schema
|
|
774
|
-
echo "║ •
|
|
775
|
-
echo "║
|
|
776
|
-
echo "║
|
|
777
|
-
echo "║ •
|
|
778
|
-
echo "║ •
|
|
832
|
+
echo "║ • GraphQL schema + PRD + logo ║"
|
|
833
|
+
echo "║ • Component library + theme providers ║"
|
|
834
|
+
echo "║ ║"
|
|
835
|
+
echo "║ Cleaned: ║"
|
|
836
|
+
echo "║ • Apex classes (force-app classes/) ║"
|
|
837
|
+
echo "║ • Custom fields (force-app objects/) ║"
|
|
838
|
+
echo "║ • Platform events (force-app *__e/) ║"
|
|
779
839
|
echo "║ ║"
|
|
780
840
|
echo "║ Layout: ║"
|
|
781
841
|
echo "║ / → Home (search page) ║"
|
|
@@ -783,9 +843,6 @@ echo "║ /search → Search (search page) ║"
|
|
|
783
843
|
echo "║ Nav bar on Home + Search pages only ║"
|
|
784
844
|
echo "║ ║"
|
|
785
845
|
echo "║ Start building: ║"
|
|
786
|
-
echo "║ • For dashboards: Edit BlankDashboard.tsx ║"
|
|
787
|
-
echo "║ then wire into routes or CommandCenter ║"
|
|
788
|
-
echo "║ • For search app: Ready to go! ║"
|
|
789
846
|
echo "║ npm run dev ║"
|
|
790
847
|
echo "╚════════════════════════════════════════════════╝"
|
|
791
848
|
echo ""
|