refactor ConfigLoader to CfgDeploy

This commit is contained in:
Nathan
2026-02-23 09:47:26 -07:00
parent fcdb7661fe
commit 2672b7bb84
11 changed files with 398 additions and 29 deletions
@@ -0,0 +1,369 @@
<!-- Generated by SpecStory, Markdown v2.1.0 -->
<!-- cursor Session 8920de14-829b-48f5-af42-752f793c3429 (2026-02-23 16:41Z) -->
# Renaming configloader to CfgDeploy (2026-02-23 16:41Z)
_**User**_
refactor 'configloader' and all references thereto, to 'CfgDeploy'
---
_**Agent (model default, mode Agent)**_
<think><details><summary>Thought Process</summary>
The user wants to refactor 'configloader' (and all references to it) to 'CfgDeploy'. I need to:
1. Find all files that reference 'configloader' (case variations: ConfigLoader, configloader, CONFIGLOADER, etc.)
2. Rename the main file(s) if they're named configloader
3. Update all references to use CfgDeploy (or appropriate casing: CfgDeploy for the class/module name)
Let me search for configloader references across the codebase.
</details></think>
---
---
<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search">
<details>
<summary>Tool use: **ripgrep_raw_search**</summary>
Parameters:
```json
{
"pattern": "configloader|ConfigLoader|config_loader",
"path": "A:\\1 Amazon_Active_Projects\\3 ProjectStructure",
"caseInsensitive": true
}
```
Additional data:
```json
{
"isPruned": true,
"pattern": "configloader|ConfigLoader|config_loader",
"path": "A:\\1 Amazon_Active_Projects\\3 ProjectStructure",
"outputMode": "content",
"totalFiles": 23,
"totalMatches": 534,
"topFiles": [
{
"uri": ".specstory/history/2025-11-10_16-59Z-change-compression-method-to-7z.md",
"matchCount": 100
},
{
"uri": "UpgradeToGitProj.bat",
"matchCount": 1
},
{
"uri": ".specstory/history/2025-12-15_17-34Z-updatesequences-bat-script-folder-ignore.md",
"matchCount": 36
},
{
"uri": ".specstory/history/2025-12-17_23-00Z-compressor-access-violations.md",
"matchCount": 31
},
{
"uri": ".specstory/history/2025-12-19_17-59Z-texture-folder-commonality-script.md",
"matchCount": 24
},
{
"uri": "NewProject.bat",
"matchCount": 8
},
{
"uri": "UpdateSequences.bat",
"matchCount": 2
},
{
"uri": ".specstory/history/2026-02-02_23-38Z-newproject-config-deployment-to-renders.md",
"matchCount": 43
},
{
"uri": "CompressPNGs.bat",
"matchCount": 2
},
{
"uri": ".specstory/history/2026-01-02_23-22Z-newproject-config-workflow-integration.md",
"matchCount": 100
},
{
"uri": "ConfigLoader.bat",
"matchCount": 3
},
{
"uri": "UpdateProjectBatches.ps1",
"matchCount": 4
},
{
"uri": ".specstory/history/2025-11-26_20-08Z-configure-configloader-for-zipseq-and-unzipseq.md",
"matchCount": 11
},
{
"uri": ".specstory/history/2025-12-17_07-34Z-configloader-structdir-path-issue.md",
"matchCount": 8
},
{
"uri": ".specstory/history/2025-08-21_00-14Z-apply-changes-to-home-version.md",
"matchCount": 100
},
{
"uri": "CONFIG.md",
"matchCount": 1
},
{
"uri": ".specstory/history/2025-12-19_18-52Z-blend-file-path-prefix-logic.md",
"matchCount": 25
},
{
"uri": ".specstory/history/2025-11-11_01-50Z-update-configloader-to-overwrite-gitattributes-and-gitignore.md",
"matchCount": 25
},
{
"uri": "ZipSeqArchv.bat",
"matchCount": 2
},
{
"uri": "UpdateSequences.ps1",
"matchCount": 4
}
]
}
```
Status: **completed**
</details>
</tool-use>
---
<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "undefined" • **5** results in **1** directory</summary>
Directory: **A:\1 Amazon_Active_Projects\3 ProjectStructure** (5 files)
| File |
|------|
| `../.specstory/history/2025-11-26_20-08Z-configure-configloader-for-zipseq-and-unzipseq.md` |
| `../.specstory/history/2025-11-11_01-50Z-update-configloader-to-overwrite-gitattributes-and-gitignore.md` |
| `../ConfigLoader.bat` |
| `../ConfigLoader.ps1` |
| `../.specstory/history/2025-12-17_07-34Z-configloader-structdir-path-issue.md` |
</details>
</tool-use>
---
<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "undefined" • **5** results in **1** directory</summary>
Directory: **A:\1 Amazon_Active_Projects\3 ProjectStructure** (5 files)
| File |
|------|
| `../.specstory/history/2025-11-26_20-08Z-configure-configloader-for-zipseq-and-unzipseq.md` |
| `../ConfigLoader.ps1` |
| `../ConfigLoader.bat` |
| `../.specstory/history/2025-12-17_07-34Z-configloader-structdir-path-issue.md` |
| `../.specstory/history/2025-11-11_01-50Z-update-configloader-to-overwrite-gitattributes-and-gitignore.md` |
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
I found:
1. ConfigLoader.ps1 - the main script to rename to CfgDeploy.ps1
2. ConfigLoader.bat - likely a launcher, rename to CfgDeploy.bat
3. UpgradeToGitProj.bat - references ConfigLoader.ps1
4. UpdateProjectBatches.ps1 - likely references ConfigLoader (from the history mentions)
5. Batch files ZipSeqArchv.bat, UnzipSeqArchv.bat - reference CONFIG_LOADER and ConfigLoader.ps1
6. .specstory/history - these are historical docs, I'll skip editing those unless the user wants (they're in history)
Let me get the actual source files (not in .specstory) to see exact references:
- ConfigLoader.ps1 -> rename to CfgDeploy.ps1
- ConfigLoader.bat -> rename to CfgDeploy.bat
- UpdateProjectBatches.ps1 - find ConfigLoader refs
- UpgradeToGitProj.bat - line 59 ConfigLoader.ps1
- ZipSeqArchv.bat, UnzipSeqArchv.bat - CONFIG_LOADER, ConfigLoader.ps1
I'll focus on the live codebase, not .specstory history. Searching for exact references in the repo root and scripts.
</details></think>
---
Searching the repo (excluding history) for exact references:
---
<tool-use data-tool-type="unknown" data-tool-name="ripgrep_raw_search">
<details>
<summary>Tool use: **ripgrep_raw_search**</summary>
Parameters:
```json
{
"pattern": "ConfigLoader|configloader|CONFIG_LOADER|config_loader",
"path": "A:\\1 Amazon_Active_Projects\\3 ProjectStructure",
"glob": "*.{ps1,bat,json,md}",
"caseInsensitive": false
}
```
Additional data:
```json
{
"isPruned": true,
"pattern": "ConfigLoader|configloader|CONFIG_LOADER|config_loader",
"path": "A:\\1 Amazon_Active_Projects\\3 ProjectStructure",
"outputMode": "content",
"totalFiles": 23,
"totalMatches": 522,
"topFiles": [
{
"uri": "NewProject.bat",
"matchCount": 8
},
{
"uri": "UpdateSequences.bat",
"matchCount": 2
},
{
"uri": "UpdateProjectBatches.ps1",
"matchCount": 2
},
{
"uri": ".specstory/history/2025-12-17_07-34Z-configloader-structdir-path-issue.md",
"matchCount": 8
},
{
"uri": "ConfigLoader.bat",
"matchCount": 3
},
{
"uri": ".specstory/history/2025-11-26_20-08Z-configure-configloader-for-zipseq-and-unzipseq.md",
"matchCount": 11
},
{
"uri": ".specstory/history/2025-12-15_17-34Z-updatesequences-bat-script-folder-ignore.md",
"matchCount": 34
},
{
"uri": ".specstory/history/2025-08-21_00-14Z-apply-changes-to-home-version.md",
"matchCount": 100
},
{
"uri": ".specstory/history/2025-11-12_01-02Z-compression-failure-and-memory-allocation-issues.md",
"matchCount": 1
},
{
"uri": "ZipSeqArchv.bat",
"matchCount": 2
},
{
"uri": ".specstory/history/2025-11-11_01-50Z-update-configloader-to-overwrite-gitattributes-and-gitignore.md",
"matchCount": 25
},
{
"uri": "CONFIG.md",
"matchCount": 1
},
{
"uri": ".specstory/history/2025-11-10_16-59Z-change-compression-method-to-7z.md",
"matchCount": 100
},
{
"uri": ".specstory/history/2026-01-02_23-22Z-newproject-config-workflow-integration.md",
"matchCount": 100
},
{
"uri": ".specstory/history/2026-02-02_23-38Z-newproject-config-deployment-to-renders.md",
"matchCount": 43
},
{
"uri": ".specstory/history/2025-12-19_17-59Z-texture-folder-commonality-script.md",
"matchCount": 20
},
{
"uri": "CompressPNGs.bat",
"matchCount": 2
},
{
"uri": "UpgradeToGitProj.bat",
"matchCount": 1
},
{
"uri": ".specstory/history/2025-12-17_23-00Z-compressor-access-violations.md",
"matchCount": 29
},
{
"uri": ".specstory/history/2025-12-19_18-52Z-blend-file-path-prefix-logic.md",
"matchCount": 25
}
]
}
```
Status: **completed**
</details>
</tool-use>
---
<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: A:\1 Amazon_Active_Projects\3 ProjectStructure\ConfigLoader.ps1</summary>
</details>
</tool-use>
---
<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: A:\1 Amazon_Active_Projects\3 ProjectStructure\ConfigLoader.bat</summary>
</details>
</tool-use>
---
<tool-use data-tool-type="read" data-tool-name="read_file_v2">
<details><summary>Tool use: **read_file_v2** • Read file: A:\1 Amazon_Active_Projects\3 ProjectStructure\UpgradeToGitProj.bat</summary>
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
I have a clear picture. I need to:
1. **Rename files:**
- ConfigLoader.ps1 → CfgDeploy.ps1
- ConfigLoader.bat → CfgDeploy.bat
2. **Update references in live code (excluding .specstory):**
- **UpdateProj</details></think>
---
+4 -4
View File
@@ -2,14 +2,14 @@
setlocal EnableExtensions
set "script_dir=%~dp0"
set "ps1_path=%script_dir%ConfigLoader.ps1"
set "ps1_path=%script_dir%CfgDeploy.ps1"
if not exist "%ps1_path%" (
echo [ERROR] ConfigLoader.ps1 not found at %ps1_path%
echo [ERROR] CfgDeploy.ps1 not found at %ps1_path%
exit /b 1
)
echo Running ConfigLoader...
echo Running CfgDeploy...
powershell -NoProfile -ExecutionPolicy Bypass -File "%ps1_path%"
set "rc=%errorlevel%"
@@ -19,4 +19,4 @@ if %rc% neq 0 (
pause
)
exit /b %rc%
exit /b %rc%
View File
+2 -2
View File
@@ -10,13 +10,13 @@ set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)
+8 -8
View File
@@ -15,11 +15,11 @@ if not defined STRUCT_DIR (
:: Debug: Show discovered structDir
echo Found ProjectStructure directory: %STRUCT_DIR%
:: Locate ConfigLoader.ps1 in the ProjectStructure directory
set "CONFIG_LOADER=%STRUCT_DIR%\ConfigLoader.ps1"
:: Locate CfgDeploy.ps1 in the ProjectStructure directory
set "CFG_DEPLOY=%STRUCT_DIR%\CfgDeploy.ps1"
if not exist "%CONFIG_LOADER%" (
echo [ERROR] ConfigLoader.ps1 not found at: %CONFIG_LOADER%
if not exist "%CFG_DEPLOY%" (
echo [ERROR] CfgDeploy.ps1 not found at: %CFG_DEPLOY%
exit /b 1
)
@@ -61,7 +61,7 @@ mkdir "%projectRoot%\Pr\RnR\RIFE"
:: Add project root additions
if not exist "%projectRoot%\Renders" mkdir "%projectRoot%\Renders"
:: Place helper scripts into Renders (config lives in .config\, deployed by ConfigLoader below)
:: Place helper scripts into Renders (config lives in .config\, deployed by CfgDeploy below)
set "templateRoot=%STRUCT_DIR%"
for %%F in (UpdateSequences.bat ZipSeqArchv.bat UnzipSeqArchv.bat CompressPNGs.bat) do (
if exist "%templateRoot%\%%F" copy /Y "%templateRoot%\%%F" "%projectRoot%\Renders\%%F" >nul
@@ -79,13 +79,13 @@ git add . -v
git commit -m "init"
popd >nul
:: Deploy config workflow using ConfigLoader.ps1
:: Deploy config workflow using CfgDeploy.ps1
echo.
echo Deploying config workflow...
for %%P in ("%projectRoot%") do set "PROJECT_ROOT_ABS=%%~fP"
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%CONFIG_LOADER%' -ProjectPath '%PROJECT_ROOT_ABS%'"
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%CFG_DEPLOY%' -ProjectPath '%PROJECT_ROOT_ABS%'"
if errorlevel 1 (
echo [WARNING] Config workflow deployment failed. You may need to run ConfigLoader.ps1 manually.
echo [WARNING] Config workflow deployment failed. You may need to run CfgDeploy.ps1 manually.
) else (
echo Config workflow deployed successfully.
)
+2 -2
View File
@@ -10,13 +10,13 @@ set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)
+4 -4
View File
@@ -11,11 +11,11 @@ if (-not $PSScriptRoot) {
$PSScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
}
$configLoader = Join-Path -Path $PSScriptRoot -ChildPath 'ConfigLoader.ps1'
if (-not (Test-Path -LiteralPath $configLoader)) {
throw "Missing ConfigLoader.ps1 in $PSScriptRoot"
$cfgDeploy = Join-Path -Path $PSScriptRoot -ChildPath 'CfgDeploy.ps1'
if (-not (Test-Path -LiteralPath $cfgDeploy)) {
throw "Missing CfgDeploy.ps1 in $PSScriptRoot"
}
. $configLoader
. $cfgDeploy
$structDir = Get-StructDirectory
if (-not (Test-Path -LiteralPath $structDir -PathType Container)) {
+2 -2
View File
@@ -35,7 +35,7 @@ if not exist "%CONFIG_PATH%" (
if defined project_config (
echo Also checked: %project_config%
)
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)
@@ -43,7 +43,7 @@ set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)
+4 -4
View File
@@ -8,11 +8,11 @@ $ErrorActionPreference = 'Stop'
$ScriptDir = if ($PSScriptRoot) { $PSScriptRoot } else { Split-Path -Parent $MyInvocation.MyCommand.Path }
$configLoader = Join-Path -Path $ScriptDir -ChildPath 'ConfigLoader.ps1'
if (-not (Test-Path -LiteralPath $configLoader)) {
throw "Missing ConfigLoader.ps1 in $ScriptDir"
$cfgDeploy = Join-Path -Path $ScriptDir -ChildPath 'CfgDeploy.ps1'
if (-not (Test-Path -LiteralPath $cfgDeploy)) {
throw "Missing CfgDeploy.ps1 in $ScriptDir"
}
. $configLoader
. $cfgDeploy
$useIsoDailyFormat = Use-IsoDailyFormat
+1 -1
View File
@@ -56,7 +56,7 @@ for %%F in (UpdateSequences.bat ZipSeqArchv.bat UnzipSeqArchv.bat) do (
)
)
for %%F in (ConfigLoader.ps1 config.json) do (
for %%F in (CfgDeploy.ps1 config.json) do (
if exist "%scriptDir%%%F" (
if "%DRY%"=="1" (
echo [DRY] copy "%scriptDir%%%F" "%rendersDir%\%%F"
+2 -2
View File
@@ -10,13 +10,13 @@ set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.
echo Please run CfgDeploy.ps1 to deploy helper files.
exit /b 1
)