@schandlergarcia/sf-web-components 1.9.84 → 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 CHANGED
@@ -5,6 +5,13 @@ 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
+
8
15
  ## [1.9.84] - 2026-04-07
9
16
 
10
17
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.9.84",
3
+ "version": "1.9.85",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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
- PACKAGE_DATA="node_modules/@schandlergarcia/sf-web-components/data/engine-sample-data.js"
657
- PACKAGE_LIVE_DATA="node_modules/@schandlergarcia/sf-web-components/data/engine-live-data.js"
658
- PACKAGE_LIVE_HOOK="node_modules/@schandlergarcia/sf-web-components/data/useEngineLiveData.ts"
659
- PACKAGE_SCHEMA="node_modules/@schandlergarcia/sf-web-components/data/schema.graphql"
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}..."
@@ -823,6 +867,9 @@ echo "║ Restored: ║"
823
867
  echo "║ • Engine brand theme (global.css) ║"
824
868
  echo "║ • Engine sample data + live data ║"
825
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) ║"
826
873
  echo "║ • GraphQL schema + PRD + logo ║"
827
874
  echo "║ • Component library + theme providers ║"
828
875
  echo "║ ║"