@schandlergarcia/sf-web-components 1.9.83 → 1.9.85
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 +13 -0
- package/package.json +1 -1
- package/scripts/reset-command-center.sh +73 -26
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.85] - 2026-04-07
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Reset script now restores Agent API files** — `src/hooks/useEvaAgent.ts` and `src/config/agentApi.ts` are now restored from the package during reset, so Phase 3 finds them instead of the agent writing them from scratch with a different pattern.
|
|
12
|
+
- **Reset script now restores `dataStrategy.ts`** — `ENABLE_SAMPLE_DATA_CACHE` is reset back to `true` so the next demo run starts in sample mode (Phase 1) instead of live mode left over from Phase 2.
|
|
13
|
+
- **Reset complete banner** updated to list all restored files.
|
|
14
|
+
|
|
15
|
+
## [1.9.84] - 2026-04-07
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **Reset script no longer deletes custom fields** — `.field-meta.xml` files in `force-app/main/default/objects/` are now preserved across resets. Only Apex classes and platform events are cleaned.
|
|
19
|
+
- **Reset script preserves `TCC_TravelMetricsController`** — Apex class cleanup now skips permanent classes listed in `KEEP_CLASSES` array.
|
|
20
|
+
|
|
8
21
|
## [1.9.83] - 2026-04-07
|
|
9
22
|
|
|
10
23
|
### Added
|
package/package.json
CHANGED
|
@@ -653,22 +653,32 @@ echo "→ Restoring ${ENGINE_DATA}..."
|
|
|
653
653
|
|
|
654
654
|
# Detect package location
|
|
655
655
|
if [ -d "node_modules/@schandlergarcia/sf-web-components/data" ]; then
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
656
|
+
PKG="node_modules/@schandlergarcia/sf-web-components"
|
|
657
|
+
PACKAGE_DATA="$PKG/data/engine-sample-data.js"
|
|
658
|
+
PACKAGE_LIVE_DATA="$PKG/data/engine-live-data.js"
|
|
659
|
+
PACKAGE_LIVE_HOOK="$PKG/data/useEngineLiveData.ts"
|
|
660
|
+
PACKAGE_SCHEMA="$PKG/data/schema.graphql"
|
|
661
|
+
PACKAGE_EVA_HOOK="$PKG/data/useEvaAgent.ts"
|
|
662
|
+
PACKAGE_AGENT_CONFIG="$PKG/data/agentApiConfig.ts"
|
|
663
|
+
PACKAGE_DATA_STRATEGY="$PKG/src/templates/lib/dataStrategy.ts.template"
|
|
660
664
|
elif [ -f "$SCRIPT_DIR/../data/engine-sample-data.js" ]; then
|
|
661
665
|
# Running from package source
|
|
662
666
|
PACKAGE_DATA="$SCRIPT_DIR/../data/engine-sample-data.js"
|
|
663
667
|
PACKAGE_LIVE_DATA="$SCRIPT_DIR/../data/engine-live-data.js"
|
|
664
668
|
PACKAGE_LIVE_HOOK="$SCRIPT_DIR/../data/useEngineLiveData.ts"
|
|
665
669
|
PACKAGE_SCHEMA="$SCRIPT_DIR/../data/schema.graphql"
|
|
670
|
+
PACKAGE_EVA_HOOK="$SCRIPT_DIR/../data/useEvaAgent.ts"
|
|
671
|
+
PACKAGE_AGENT_CONFIG="$SCRIPT_DIR/../data/agentApiConfig.ts"
|
|
672
|
+
PACKAGE_DATA_STRATEGY="$SCRIPT_DIR/../src/templates/lib/dataStrategy.ts.template"
|
|
666
673
|
else
|
|
667
674
|
echo " ⚠ Could not find engine-sample-data.js in package"
|
|
668
675
|
PACKAGE_DATA=""
|
|
669
676
|
PACKAGE_LIVE_DATA=""
|
|
670
677
|
PACKAGE_LIVE_HOOK=""
|
|
671
678
|
PACKAGE_SCHEMA=""
|
|
679
|
+
PACKAGE_EVA_HOOK=""
|
|
680
|
+
PACKAGE_AGENT_CONFIG=""
|
|
681
|
+
PACKAGE_DATA_STRATEGY=""
|
|
672
682
|
fi
|
|
673
683
|
|
|
674
684
|
if [ -n "$PACKAGE_DATA" ] && [ -f "$PACKAGE_DATA" ]; then
|
|
@@ -712,6 +722,40 @@ else
|
|
|
712
722
|
echo " ⚠ Skipped live data hook (package hook not found)"
|
|
713
723
|
fi
|
|
714
724
|
|
|
725
|
+
# Restore useEvaAgent.ts (Agentforce Agent API hook)
|
|
726
|
+
EVA_HOOK="src/hooks/useEvaAgent.ts"
|
|
727
|
+
echo "→ Restoring ${EVA_HOOK}..."
|
|
728
|
+
|
|
729
|
+
if [ -n "$PACKAGE_EVA_HOOK" ] && [ -f "$PACKAGE_EVA_HOOK" ]; then
|
|
730
|
+
cp "$PACKAGE_EVA_HOOK" "$EVA_HOOK"
|
|
731
|
+
echo " ✓ Eva agent hook restored"
|
|
732
|
+
else
|
|
733
|
+
echo " ⚠ Skipped Eva agent hook (package hook not found)"
|
|
734
|
+
fi
|
|
735
|
+
|
|
736
|
+
# Restore agentApiConfig.ts → src/config/agentApi.ts
|
|
737
|
+
mkdir -p src/config
|
|
738
|
+
AGENT_CONFIG="src/config/agentApi.ts"
|
|
739
|
+
echo "→ Restoring ${AGENT_CONFIG}..."
|
|
740
|
+
|
|
741
|
+
if [ -n "$PACKAGE_AGENT_CONFIG" ] && [ -f "$PACKAGE_AGENT_CONFIG" ]; then
|
|
742
|
+
cp "$PACKAGE_AGENT_CONFIG" "$AGENT_CONFIG"
|
|
743
|
+
echo " ✓ Agent API config restored"
|
|
744
|
+
else
|
|
745
|
+
echo " ⚠ Skipped Agent API config (package config not found)"
|
|
746
|
+
fi
|
|
747
|
+
|
|
748
|
+
# Restore dataStrategy.ts (reset ENABLE_SAMPLE_DATA_CACHE back to true)
|
|
749
|
+
DATA_STRATEGY="src/lib/dataStrategy.ts"
|
|
750
|
+
echo "→ Restoring ${DATA_STRATEGY}..."
|
|
751
|
+
|
|
752
|
+
if [ -n "$PACKAGE_DATA_STRATEGY" ] && [ -f "$PACKAGE_DATA_STRATEGY" ]; then
|
|
753
|
+
cp "$PACKAGE_DATA_STRATEGY" "$DATA_STRATEGY"
|
|
754
|
+
echo " ✓ Data strategy restored (ENABLE_SAMPLE_DATA_CACHE = true)"
|
|
755
|
+
else
|
|
756
|
+
echo " ⚠ Skipped data strategy (package template not found)"
|
|
757
|
+
fi
|
|
758
|
+
|
|
715
759
|
# Restore engine-command-center-prd.md
|
|
716
760
|
PRD_FILE="engine-command-center-prd.md"
|
|
717
761
|
echo "→ Restoring ${PRD_FILE}..."
|
|
@@ -771,35 +815,36 @@ fi
|
|
|
771
815
|
if [ -n "$SFDX_DEFAULT" ]; then
|
|
772
816
|
metadata_cleaned=0
|
|
773
817
|
|
|
774
|
-
# Remove
|
|
818
|
+
# Remove Apex classes (.cls and .cls-meta.xml), preserving permanent classes
|
|
819
|
+
KEEP_CLASSES=("TCC_TravelMetricsController")
|
|
775
820
|
CLASSES_DIR="$SFDX_DEFAULT/classes"
|
|
776
821
|
if [ -d "$CLASSES_DIR" ]; then
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
[ "$
|
|
780
|
-
|
|
781
|
-
|
|
822
|
+
cls_removed=0
|
|
823
|
+
for f in "$CLASSES_DIR"/*.cls "$CLASSES_DIR"/*.cls-meta.xml; do
|
|
824
|
+
[ -f "$f" ] || continue
|
|
825
|
+
base="$(basename "$f")"
|
|
826
|
+
skip=false
|
|
827
|
+
for keep in "${KEEP_CLASSES[@]}"; do
|
|
828
|
+
if [[ "$base" == "$keep".cls || "$base" == "$keep".cls-meta.xml ]]; then
|
|
829
|
+
skip=true
|
|
830
|
+
break
|
|
831
|
+
fi
|
|
832
|
+
done
|
|
833
|
+
if [ "$skip" = false ]; then
|
|
834
|
+
[ "$metadata_cleaned" -eq 0 ] && [ "$cls_removed" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
835
|
+
rm "$f"
|
|
836
|
+
cls_removed=$((cls_removed + 1))
|
|
837
|
+
fi
|
|
838
|
+
done
|
|
839
|
+
if [ "$cls_removed" -gt 0 ]; then
|
|
840
|
+
echo " ✓ Removed $cls_removed Apex class files (kept ${KEEP_CLASSES[*]})"
|
|
782
841
|
metadata_cleaned=1
|
|
783
842
|
fi
|
|
784
843
|
fi
|
|
785
844
|
|
|
786
|
-
# Remove custom fields
|
|
845
|
+
# Remove platform event directories (but NOT custom fields — those persist across resets)
|
|
787
846
|
OBJECTS_DIR="$SFDX_DEFAULT/objects"
|
|
788
847
|
if [ -d "$OBJECTS_DIR" ]; then
|
|
789
|
-
for fields_dir in "$OBJECTS_DIR"/*/fields; do
|
|
790
|
-
if [ -d "$fields_dir" ]; then
|
|
791
|
-
for f in "$fields_dir"/*.field-meta.xml; do
|
|
792
|
-
if [ -f "$f" ]; then
|
|
793
|
-
[ "$metadata_cleaned" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
794
|
-
rm "$f"
|
|
795
|
-
echo " ✓ Removed $(basename "$f")"
|
|
796
|
-
metadata_cleaned=1
|
|
797
|
-
fi
|
|
798
|
-
done
|
|
799
|
-
fi
|
|
800
|
-
done
|
|
801
|
-
|
|
802
|
-
# Remove platform event directories
|
|
803
848
|
for evt_dir in "$OBJECTS_DIR"/*__e; do
|
|
804
849
|
if [ -d "$evt_dir" ]; then
|
|
805
850
|
[ "$metadata_cleaned" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
@@ -822,12 +867,14 @@ echo "║ Restored: ║"
|
|
|
822
867
|
echo "║ • Engine brand theme (global.css) ║"
|
|
823
868
|
echo "║ • Engine sample data + live data ║"
|
|
824
869
|
echo "║ • Live data hook (useEngineLiveData.ts) ║"
|
|
870
|
+
echo "║ • Eva agent hook (useEvaAgent.ts) ║"
|
|
871
|
+
echo "║ • Agent API config (src/config/agentApi.ts)║"
|
|
872
|
+
echo "║ • Data strategy (ENABLE_SAMPLE_DATA_CACHE) ║"
|
|
825
873
|
echo "║ • GraphQL schema + PRD + logo ║"
|
|
826
874
|
echo "║ • Component library + theme providers ║"
|
|
827
875
|
echo "║ ║"
|
|
828
876
|
echo "║ Cleaned: ║"
|
|
829
877
|
echo "║ • Apex classes (force-app classes/) ║"
|
|
830
|
-
echo "║ • Custom fields (force-app objects/) ║"
|
|
831
878
|
echo "║ • Platform events (force-app *__e/) ║"
|
|
832
879
|
echo "║ ║"
|
|
833
880
|
echo "║ Layout: ║"
|