feat: copy to webgui repo script docs + wc build options (#1285)

Previously the historical script only use to copy built web components
into the webgui repo.

The new script provides additional commands to find files in the API
repo's plugin dir and attempts to find "new" files. Then a command to
act upon each of these new file to sync in either direction, skip it, or
ignore it.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced an interactive synchronization tool that streamlines file
transfers between projects.
- Added a new command to easily trigger the synchronization process,
leveraging enhanced file management and notification capabilities.

- **Chores**
- Updated version control settings to ignore temporary synchronization
files.
  - Removed an outdated file copying script for improved maintenance.
  - Added new dependencies to support enhanced functionality.
- Modified a script to exclude specific files from deletion during the
activation code setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Zack Spear
2025-03-31 11:36:33 -07:00
committed by GitHub
parent 9f7218da79
commit e54f189630
9 changed files with 659 additions and 76 deletions
@@ -1,10 +0,0 @@
<?php
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/plugins/dynamix.my.servers/include/activation-code-extractor.php";
$activationCodeExtractor = new ActivationCodeExtractor();
?>
<pre>
<? $activationCodeExtractor->debug(); ?>
</pre>
@@ -153,8 +153,6 @@ class ActivationCodeExtractor {
/**
* Output for debugging
*
* @see https://tower.local/plugins/dynamix.my.servers/data/activation-data.php
* @return void
*/
public function debug(): void {
@@ -13,7 +13,9 @@ class WebComponentsExtractor
private function findManifestFiles(string $manifestName): array
{
$basePath = '/usr/local/emhttp' . self::PREFIXED_PATH;
$command = "find {$basePath} -name {$manifestName}";
$escapedBasePath = escapeshellarg($basePath);
$escapedManifestName = escapeshellarg($manifestName);
$command = "find {$escapedBasePath} -name {$escapedManifestName}";
exec($command, $files);
return $files;
}
@@ -123,7 +123,6 @@ if [[ -f "$ACTIVATION_SETUP_FLAG" ]]; then
if [[ $DRY_RUN == false ]]; then
debug_echo "Deleting activation code related setup and php files"
FILES_TO_DELETE=(
"/usr/local/emhttp/plugins/dynamix.my.servers/data/activation-data.php"
"/usr/local/emhttp/plugins/dynamix.my.servers/include/activation-code-extractor.php"
"/usr/local/emhttp/plugins/dynamix.my.servers/include/partner-logo.php"
"/usr/local/emhttp/plugins/dynamix.my.servers/include/welcome-modal.php"