@prmichaelsen/acp-visualizer 0.1.0
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/README.md +68 -0
- package/agent/commands/acp.clarification-address.md +417 -0
- package/agent/commands/acp.clarification-capture.md +386 -0
- package/agent/commands/acp.clarification-create.md +437 -0
- package/agent/commands/acp.clarifications-research.md +326 -0
- package/agent/commands/acp.command-create.md +432 -0
- package/agent/commands/acp.design-create.md +286 -0
- package/agent/commands/acp.design-reference.md +355 -0
- package/agent/commands/acp.handoff.md +270 -0
- package/agent/commands/acp.index.md +423 -0
- package/agent/commands/acp.init.md +546 -0
- package/agent/commands/acp.package-create.md +895 -0
- package/agent/commands/acp.package-info.md +212 -0
- package/agent/commands/acp.package-install.md +539 -0
- package/agent/commands/acp.package-list.md +280 -0
- package/agent/commands/acp.package-publish.md +541 -0
- package/agent/commands/acp.package-remove.md +293 -0
- package/agent/commands/acp.package-search.md +307 -0
- package/agent/commands/acp.package-update.md +361 -0
- package/agent/commands/acp.package-validate.md +540 -0
- package/agent/commands/acp.pattern-create.md +386 -0
- package/agent/commands/acp.plan.md +587 -0
- package/agent/commands/acp.proceed.md +882 -0
- package/agent/commands/acp.project-create.md +675 -0
- package/agent/commands/acp.project-info.md +312 -0
- package/agent/commands/acp.project-list.md +226 -0
- package/agent/commands/acp.project-remove.md +379 -0
- package/agent/commands/acp.project-set.md +227 -0
- package/agent/commands/acp.project-update.md +307 -0
- package/agent/commands/acp.projects-restore.md +228 -0
- package/agent/commands/acp.projects-sync.md +347 -0
- package/agent/commands/acp.report.md +407 -0
- package/agent/commands/acp.resume.md +239 -0
- package/agent/commands/acp.sessions.md +301 -0
- package/agent/commands/acp.status.md +293 -0
- package/agent/commands/acp.sync.md +364 -0
- package/agent/commands/acp.task-create.md +500 -0
- package/agent/commands/acp.update.md +302 -0
- package/agent/commands/acp.validate.md +466 -0
- package/agent/commands/acp.version-check-for-updates.md +276 -0
- package/agent/commands/acp.version-check.md +191 -0
- package/agent/commands/acp.version-update.md +289 -0
- package/agent/commands/command.template.md +339 -0
- package/agent/commands/git.commit.md +526 -0
- package/agent/commands/git.init.md +514 -0
- package/agent/commands/tanstack-cloudflare.deploy.md +272 -0
- package/agent/commands/tanstack-cloudflare.tail.md +275 -0
- package/agent/design/.gitkeep +0 -0
- package/agent/design/design.template.md +154 -0
- package/agent/design/local.dashboard-layout-routing.md +288 -0
- package/agent/design/local.data-model-yaml-parsing.md +310 -0
- package/agent/design/local.search-filtering.md +331 -0
- package/agent/design/local.server-api-auto-refresh.md +235 -0
- package/agent/design/local.table-tree-views.md +299 -0
- package/agent/design/local.visualizer-requirements.md +349 -0
- package/agent/design/requirements.template.md +387 -0
- package/agent/index/.gitkeep +0 -0
- package/agent/index/acp.core.yaml +137 -0
- package/agent/index/local.main.template.yaml +37 -0
- package/agent/manifest.template.yaml +13 -0
- package/agent/manifest.yaml +302 -0
- package/agent/milestones/.gitkeep +0 -0
- package/agent/milestones/milestone-1-project-scaffold-data-pipeline.md +67 -0
- package/agent/milestones/milestone-1-{title}.template.md +206 -0
- package/agent/milestones/milestone-2-dashboard-views-interaction.md +79 -0
- package/agent/package.template.yaml +86 -0
- package/agent/patterns/.gitkeep +0 -0
- package/agent/patterns/bootstrap.template.md +1237 -0
- package/agent/patterns/pattern.template.md +382 -0
- package/agent/patterns/tanstack-cloudflare.acl-permissions.md +332 -0
- package/agent/patterns/tanstack-cloudflare.action-bar-item.md +416 -0
- package/agent/patterns/tanstack-cloudflare.api-route-handlers.md +401 -0
- package/agent/patterns/tanstack-cloudflare.auth-session-management.md +387 -0
- package/agent/patterns/tanstack-cloudflare.card-and-list.md +271 -0
- package/agent/patterns/tanstack-cloudflare.chat-engine.md +353 -0
- package/agent/patterns/tanstack-cloudflare.confirmation-tokens.md +346 -0
- package/agent/patterns/tanstack-cloudflare.durable-objects-websocket.md +516 -0
- package/agent/patterns/tanstack-cloudflare.email-service.md +431 -0
- package/agent/patterns/tanstack-cloudflare.expander.md +98 -0
- package/agent/patterns/tanstack-cloudflare.fcm-push.md +115 -0
- package/agent/patterns/tanstack-cloudflare.firebase-anonymous-sessions.md +441 -0
- package/agent/patterns/tanstack-cloudflare.firebase-auth.md +348 -0
- package/agent/patterns/tanstack-cloudflare.firebase-firestore.md +550 -0
- package/agent/patterns/tanstack-cloudflare.firebase-storage.md +369 -0
- package/agent/patterns/tanstack-cloudflare.form-controls.md +145 -0
- package/agent/patterns/tanstack-cloudflare.global-search-context.md +93 -0
- package/agent/patterns/tanstack-cloudflare.image-carousel.md +126 -0
- package/agent/patterns/tanstack-cloudflare.library-services.md +553 -0
- package/agent/patterns/tanstack-cloudflare.lightbox.md +169 -0
- package/agent/patterns/tanstack-cloudflare.markdown-content.md +115 -0
- package/agent/patterns/tanstack-cloudflare.mention-suggestions.md +98 -0
- package/agent/patterns/tanstack-cloudflare.modal.md +156 -0
- package/agent/patterns/tanstack-cloudflare.nextjs-to-tanstack-routing.md +461 -0
- package/agent/patterns/tanstack-cloudflare.notifications-engine.md +151 -0
- package/agent/patterns/tanstack-cloudflare.oauth-token-refresh.md +90 -0
- package/agent/patterns/tanstack-cloudflare.og-metadata.md +296 -0
- package/agent/patterns/tanstack-cloudflare.pagination.md +442 -0
- package/agent/patterns/tanstack-cloudflare.pill-input.md +220 -0
- package/agent/patterns/tanstack-cloudflare.provider-adapter.md +401 -0
- package/agent/patterns/tanstack-cloudflare.rate-limiting.md +323 -0
- package/agent/patterns/tanstack-cloudflare.scheduled-tasks.md +338 -0
- package/agent/patterns/tanstack-cloudflare.searchable-settings.md +375 -0
- package/agent/patterns/tanstack-cloudflare.slide-over.md +129 -0
- package/agent/patterns/tanstack-cloudflare.ssr-preload.md +571 -0
- package/agent/patterns/tanstack-cloudflare.third-party-api-integration.md +508 -0
- package/agent/patterns/tanstack-cloudflare.toast-system.md +142 -0
- package/agent/patterns/tanstack-cloudflare.unified-header.md +280 -0
- package/agent/patterns/tanstack-cloudflare.user-scoped-collections.md +628 -0
- package/agent/patterns/tanstack-cloudflare.websocket-manager.md +237 -0
- package/agent/patterns/tanstack-cloudflare.wrangler-configuration.md +358 -0
- package/agent/patterns/tanstack-cloudflare.zod-schema-validation.md +336 -0
- package/agent/progress.template.yaml +161 -0
- package/agent/progress.yaml +145 -0
- package/agent/schemas/package.schema.yaml +276 -0
- package/agent/scripts/acp.common.sh +1781 -0
- package/agent/scripts/acp.install.sh +333 -0
- package/agent/scripts/acp.package-create.sh +924 -0
- package/agent/scripts/acp.package-info.sh +288 -0
- package/agent/scripts/acp.package-install.sh +893 -0
- package/agent/scripts/acp.package-list.sh +311 -0
- package/agent/scripts/acp.package-publish.sh +420 -0
- package/agent/scripts/acp.package-remove.sh +348 -0
- package/agent/scripts/acp.package-search.sh +156 -0
- package/agent/scripts/acp.package-update.sh +517 -0
- package/agent/scripts/acp.package-validate.sh +1018 -0
- package/agent/scripts/acp.uninstall.sh +85 -0
- package/agent/scripts/acp.version-check-for-updates.sh +98 -0
- package/agent/scripts/acp.version-check.sh +47 -0
- package/agent/scripts/acp.version-update.sh +176 -0
- package/agent/scripts/acp.yaml-parser.sh +985 -0
- package/agent/scripts/acp.yaml-validate.sh +205 -0
- package/agent/tasks/.gitkeep +0 -0
- package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-1-initialize-tanstack-start-project.md +210 -0
- package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-2-implement-data-model-yaml-parser.md +294 -0
- package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-3-build-server-api-data-loading.md +193 -0
- package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-4-add-auto-refresh-sse.md +262 -0
- package/agent/tasks/milestone-2-dashboard-views-interaction/task-10-polish-integration-testing.md +156 -0
- package/agent/tasks/milestone-2-dashboard-views-interaction/task-5-build-dashboard-layout-routing.md +178 -0
- package/agent/tasks/milestone-2-dashboard-views-interaction/task-6-build-overview-page.md +141 -0
- package/agent/tasks/milestone-2-dashboard-views-interaction/task-7-implement-milestone-table-view.md +153 -0
- package/agent/tasks/milestone-2-dashboard-views-interaction/task-8-implement-milestone-tree-view.md +174 -0
- package/agent/tasks/milestone-2-dashboard-views-interaction/task-9-implement-search-filtering.md +233 -0
- package/agent/tasks/task-1-{title}.template.md +244 -0
- package/bin/visualize.mjs +84 -0
- package/package.json +48 -0
- package/src/components/ExtraFieldsBadge.tsx +15 -0
- package/src/components/FilterBar.tsx +33 -0
- package/src/components/Header.tsx +23 -0
- package/src/components/MilestoneTable.tsx +167 -0
- package/src/components/MilestoneTree.tsx +84 -0
- package/src/components/ProgressBar.tsx +20 -0
- package/src/components/SearchInput.tsx +22 -0
- package/src/components/Sidebar.tsx +54 -0
- package/src/components/StatusBadge.tsx +23 -0
- package/src/components/StatusDot.tsx +12 -0
- package/src/components/TaskList.tsx +36 -0
- package/src/components/ViewToggle.tsx +31 -0
- package/src/lib/config.ts +8 -0
- package/src/lib/file-watcher.ts +43 -0
- package/src/lib/search.ts +48 -0
- package/src/lib/types.ts +73 -0
- package/src/lib/useAutoRefresh.ts +31 -0
- package/src/lib/useCollapse.ts +31 -0
- package/src/lib/useFilteredData.ts +55 -0
- package/src/lib/yaml-loader-real.spec.ts +47 -0
- package/src/lib/yaml-loader.spec.ts +201 -0
- package/src/lib/yaml-loader.ts +265 -0
- package/src/routeTree.gen.ts +140 -0
- package/src/router.tsx +10 -0
- package/src/routes/__root.tsx +75 -0
- package/src/routes/api/watch.ts +29 -0
- package/src/routes/index.tsx +115 -0
- package/src/routes/milestones.tsx +50 -0
- package/src/routes/search.tsx +84 -0
- package/src/routes/tasks.tsx +63 -0
- package/src/services/progress-database.service.ts +46 -0
- package/src/styles.css +25 -0
- package/tsconfig.json +24 -0
- package/vite.config.ts +16 -0
- package/vitest.config.ts +27 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Agent Context Protocol (ACP) Package List Script
|
|
4
|
+
# Lists installed ACP packages with their versions and details
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Source common utilities
|
|
9
|
+
SCRIPT_DIR="$(dirname "$0")"
|
|
10
|
+
. "${SCRIPT_DIR}/acp.common.sh"
|
|
11
|
+
|
|
12
|
+
# Initialize colors
|
|
13
|
+
init_colors
|
|
14
|
+
|
|
15
|
+
# Parse arguments
|
|
16
|
+
VERBOSE=false
|
|
17
|
+
OUTDATED=false
|
|
18
|
+
MODIFIED=false
|
|
19
|
+
GLOBAL_MODE=false
|
|
20
|
+
|
|
21
|
+
while [[ $# -gt 0 ]]; do
|
|
22
|
+
case $1 in
|
|
23
|
+
--global|-g)
|
|
24
|
+
GLOBAL_MODE=true
|
|
25
|
+
shift
|
|
26
|
+
;;
|
|
27
|
+
-v|--verbose)
|
|
28
|
+
VERBOSE=true
|
|
29
|
+
shift
|
|
30
|
+
;;
|
|
31
|
+
--outdated)
|
|
32
|
+
OUTDATED=true
|
|
33
|
+
shift
|
|
34
|
+
;;
|
|
35
|
+
--modified)
|
|
36
|
+
MODIFIED=true
|
|
37
|
+
shift
|
|
38
|
+
;;
|
|
39
|
+
*)
|
|
40
|
+
shift
|
|
41
|
+
;;
|
|
42
|
+
esac
|
|
43
|
+
done
|
|
44
|
+
|
|
45
|
+
# Determine manifest file based on mode
|
|
46
|
+
if [ "$GLOBAL_MODE" = true ]; then
|
|
47
|
+
# Initialize global ACP infrastructure if needed
|
|
48
|
+
init_global_acp || {
|
|
49
|
+
echo "${RED}Error: Failed to initialize global infrastructure${NC}" >&2
|
|
50
|
+
exit 1
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
MANIFEST_FILE="$HOME/.acp/agent/manifest.yaml"
|
|
54
|
+
echo "${BLUE}📦 Global Packages (installed to ~/.acp/agent/):${NC}"
|
|
55
|
+
else
|
|
56
|
+
MANIFEST_FILE="./agent/manifest.yaml"
|
|
57
|
+
echo "${BLUE}📦 Installed ACP Packages${NC}"
|
|
58
|
+
fi
|
|
59
|
+
echo ""
|
|
60
|
+
|
|
61
|
+
# Check if manifest exists
|
|
62
|
+
if [ ! -f "$MANIFEST_FILE" ]; then
|
|
63
|
+
if [ "$GLOBAL_MODE" = true ]; then
|
|
64
|
+
echo "${YELLOW}No global packages installed${NC}"
|
|
65
|
+
echo ""
|
|
66
|
+
echo "To install a package globally:"
|
|
67
|
+
echo " ./agent/scripts/acp.package-install.sh --global <repository-url>"
|
|
68
|
+
else
|
|
69
|
+
echo "${YELLOW}No packages installed${NC}"
|
|
70
|
+
echo ""
|
|
71
|
+
echo "To install a package:"
|
|
72
|
+
echo " ./agent/scripts/acp.package-install.sh <repository-url>"
|
|
73
|
+
fi
|
|
74
|
+
exit 0
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
# Source YAML parser
|
|
78
|
+
source_yaml_parser
|
|
79
|
+
|
|
80
|
+
# Get list of installed packages
|
|
81
|
+
INSTALLED_PACKAGES=$(awk '/^ [a-z]/ && !/^ / && /:$/ {gsub(/:/, ""); print $1}' "$MANIFEST_FILE")
|
|
82
|
+
|
|
83
|
+
if [ -z "$INSTALLED_PACKAGES" ]; then
|
|
84
|
+
if [ "$GLOBAL_MODE" = true ]; then
|
|
85
|
+
echo "${YELLOW}No global packages installed${NC}"
|
|
86
|
+
else
|
|
87
|
+
echo "${YELLOW}No packages installed${NC}"
|
|
88
|
+
fi
|
|
89
|
+
exit 0
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
PACKAGE_COUNT=0
|
|
93
|
+
DISPLAYED_COUNT=0
|
|
94
|
+
|
|
95
|
+
for package in $INSTALLED_PACKAGES; do
|
|
96
|
+
PACKAGE_COUNT=$((PACKAGE_COUNT + 1))
|
|
97
|
+
|
|
98
|
+
# Get package info from manifest
|
|
99
|
+
version=$(awk -v pkg="$package" '
|
|
100
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
101
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
102
|
+
in_pkg && /^ package_version:/ { print $2; exit }
|
|
103
|
+
' "$MANIFEST_FILE")
|
|
104
|
+
|
|
105
|
+
source_url=$(awk -v pkg="$package" '
|
|
106
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
107
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
108
|
+
in_pkg && /^ source:/ { print $2; exit }
|
|
109
|
+
' "$MANIFEST_FILE")
|
|
110
|
+
|
|
111
|
+
installed_at=$(awk -v pkg="$package" '
|
|
112
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
113
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
114
|
+
in_pkg && /^ installed_at:/ { print $2; exit }
|
|
115
|
+
' "$MANIFEST_FILE")
|
|
116
|
+
|
|
117
|
+
updated_at=$(awk -v pkg="$package" '
|
|
118
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
119
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
120
|
+
in_pkg && /^ updated_at:/ { print $2; exit }
|
|
121
|
+
' "$MANIFEST_FILE")
|
|
122
|
+
|
|
123
|
+
# Count files
|
|
124
|
+
patterns_count=$(awk -v pkg="$package" '
|
|
125
|
+
BEGIN { in_pkg=0; in_patterns=0; count=0 }
|
|
126
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
127
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
128
|
+
in_pkg && /^ patterns:/ { in_patterns=1; next }
|
|
129
|
+
in_patterns && /^ [a-z]/ { in_patterns=0 }
|
|
130
|
+
in_patterns && /^ - name:/ { count++ }
|
|
131
|
+
END { print count }
|
|
132
|
+
' "$MANIFEST_FILE")
|
|
133
|
+
|
|
134
|
+
commands_count=$(awk -v pkg="$package" '
|
|
135
|
+
BEGIN { in_pkg=0; in_commands=0; count=0 }
|
|
136
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
137
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
138
|
+
in_pkg && /^ commands:/ { in_commands=1; next }
|
|
139
|
+
in_commands && /^ [a-z]/ { in_commands=0 }
|
|
140
|
+
in_commands && /^ - name:/ { count++ }
|
|
141
|
+
END { print count }
|
|
142
|
+
' "$MANIFEST_FILE")
|
|
143
|
+
|
|
144
|
+
designs_count=$(awk -v pkg="$package" '
|
|
145
|
+
BEGIN { in_pkg=0; in_designs=0; count=0 }
|
|
146
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
147
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
148
|
+
in_pkg && /^ designs:/ { in_designs=1; next }
|
|
149
|
+
in_designs && /^ [a-z]/ { in_designs=0 }
|
|
150
|
+
in_designs && /^ - name:/ { count++ }
|
|
151
|
+
END { print count }
|
|
152
|
+
' "$MANIFEST_FILE")
|
|
153
|
+
|
|
154
|
+
files_count=$(awk -v pkg="$package" '
|
|
155
|
+
BEGIN { in_pkg=0; in_files=0; count=0 }
|
|
156
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
157
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
158
|
+
in_pkg && /^ files:$/ { in_files=1; next }
|
|
159
|
+
in_files && /^ [a-z]/ { in_files=0 }
|
|
160
|
+
in_files && /^ - name:/ { count++ }
|
|
161
|
+
END { print count }
|
|
162
|
+
' "$MANIFEST_FILE")
|
|
163
|
+
|
|
164
|
+
total_files=$((patterns_count + commands_count + designs_count + files_count))
|
|
165
|
+
|
|
166
|
+
# Check if package has updates (for --outdated filter)
|
|
167
|
+
has_updates=false
|
|
168
|
+
if [ "$OUTDATED" = true ]; then
|
|
169
|
+
# Create temp dir for checking
|
|
170
|
+
temp_dir=$(mktemp -d)
|
|
171
|
+
trap "rm -rf $temp_dir" RETURN
|
|
172
|
+
|
|
173
|
+
if git clone --depth 1 "$source_url" "$temp_dir" &>/dev/null 2>&1; then
|
|
174
|
+
if [ -f "$temp_dir/package.yaml" ]; then
|
|
175
|
+
remote_version=$(awk '/^version:/ {print $2; exit}' "$temp_dir/package.yaml")
|
|
176
|
+
comparison=$(compare_versions "$version" "$remote_version")
|
|
177
|
+
if [ "$comparison" = "newer" ]; then
|
|
178
|
+
has_updates=true
|
|
179
|
+
fi
|
|
180
|
+
fi
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
rm -rf "$temp_dir"
|
|
184
|
+
|
|
185
|
+
# Skip if no updates and filtering for outdated
|
|
186
|
+
if [ "$has_updates" = false ]; then
|
|
187
|
+
continue
|
|
188
|
+
fi
|
|
189
|
+
fi
|
|
190
|
+
|
|
191
|
+
# Check if package has modified files (for --modified filter)
|
|
192
|
+
has_modified=false
|
|
193
|
+
if [ "$MODIFIED" = true ]; then
|
|
194
|
+
for file_type in patterns commands design; do
|
|
195
|
+
files=$(awk -v pkg="$package" -v type="$file_type" '
|
|
196
|
+
BEGIN { in_pkg=0; in_type=0 }
|
|
197
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
198
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
199
|
+
in_pkg && $0 ~ "^ " type ":" { in_type=1; next }
|
|
200
|
+
in_type && /^ [a-z]/ { in_type=0 }
|
|
201
|
+
in_type && /^ - name:/ { print $3 }
|
|
202
|
+
' "$MANIFEST_FILE")
|
|
203
|
+
|
|
204
|
+
for file_name in $files; do
|
|
205
|
+
if is_file_modified "$package" "$file_type" "$file_name"; then
|
|
206
|
+
has_modified=true
|
|
207
|
+
break 2
|
|
208
|
+
fi
|
|
209
|
+
done
|
|
210
|
+
done
|
|
211
|
+
|
|
212
|
+
# Also check template files for modifications
|
|
213
|
+
if [ "$has_modified" = false ]; then
|
|
214
|
+
_file_entries=$(awk -v pkg="$package" '
|
|
215
|
+
BEGIN { in_pkg=0; in_files=0; in_entry=0; name="" }
|
|
216
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
217
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
218
|
+
in_pkg && /^ files:$/ { in_files=1; next }
|
|
219
|
+
in_files && /^ [a-z]/ { in_files=0 }
|
|
220
|
+
in_files && /^ - name:/ { name=$3 }
|
|
221
|
+
in_files && /^ target:/ { $1=""; gsub(/^ +/, ""); print name "|" $0 }
|
|
222
|
+
' "$MANIFEST_FILE")
|
|
223
|
+
|
|
224
|
+
while IFS='|' read -r _fname _ftarget; do
|
|
225
|
+
[ -z "$_fname" ] && continue
|
|
226
|
+
if [ -n "$_ftarget" ] && is_template_file_modified "$package" "$_fname" "$_ftarget"; then
|
|
227
|
+
has_modified=true
|
|
228
|
+
break
|
|
229
|
+
fi
|
|
230
|
+
done <<< "$_file_entries"
|
|
231
|
+
fi
|
|
232
|
+
|
|
233
|
+
# Skip if no modifications and filtering for modified
|
|
234
|
+
if [ "$has_modified" = false ]; then
|
|
235
|
+
continue
|
|
236
|
+
fi
|
|
237
|
+
fi
|
|
238
|
+
DISPLAYED_COUNT=$((DISPLAYED_COUNT + 1))
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
# Display package info
|
|
242
|
+
echo "${GREEN}$package${NC} ($version) - $total_files file(s)"
|
|
243
|
+
|
|
244
|
+
if [ "$VERBOSE" = true ]; then
|
|
245
|
+
echo " ${BLUE}Source:${NC} $source_url"
|
|
246
|
+
echo " ${BLUE}Installed:${NC} $installed_at"
|
|
247
|
+
if [ "$installed_at" != "$updated_at" ]; then
|
|
248
|
+
echo " ${BLUE}Updated:${NC} $updated_at"
|
|
249
|
+
fi
|
|
250
|
+
echo " ${BLUE}Files:${NC}"
|
|
251
|
+
[ "$patterns_count" -gt 0 ] && echo " - $patterns_count pattern(s)"
|
|
252
|
+
[ "$commands_count" -gt 0 ] && echo " - $commands_count command(s)"
|
|
253
|
+
[ "$designs_count" -gt 0 ] && echo " - $designs_count design(s)"
|
|
254
|
+
[ "$files_count" -gt 0 ] && echo " - $files_count file(s)"
|
|
255
|
+
|
|
256
|
+
# Show modified files if any
|
|
257
|
+
if [ "$has_modified" = true ]; then
|
|
258
|
+
echo " ${YELLOW}Modified files:${NC}"
|
|
259
|
+
for file_type in patterns commands design; do
|
|
260
|
+
files=$(awk -v pkg="$package" -v type="$file_type" '
|
|
261
|
+
BEGIN { in_pkg=0; in_type=0 }
|
|
262
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
263
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
264
|
+
in_pkg && $0 ~ "^ " type ":" { in_type=1; next }
|
|
265
|
+
in_type && /^ [a-z]/ { in_type=0 }
|
|
266
|
+
in_type && /^ - name:/ { print $3 }
|
|
267
|
+
' "$MANIFEST_FILE")
|
|
268
|
+
|
|
269
|
+
for file_name in $files; do
|
|
270
|
+
if is_file_modified "$package" "$file_type" "$file_name"; then
|
|
271
|
+
echo " - $file_type/$file_name"
|
|
272
|
+
fi
|
|
273
|
+
done
|
|
274
|
+
done
|
|
275
|
+
# Check template files too
|
|
276
|
+
_file_entries=$(awk -v pkg="$package" '
|
|
277
|
+
BEGIN { in_pkg=0; in_files=0; name="" }
|
|
278
|
+
$0 ~ "^ " pkg ":" { in_pkg=1; next }
|
|
279
|
+
in_pkg && /^ [a-z]/ { in_pkg=0 }
|
|
280
|
+
in_pkg && /^ files:$/ { in_files=1; next }
|
|
281
|
+
in_files && /^ [a-z]/ { in_files=0 }
|
|
282
|
+
in_files && /^ - name:/ { name=$3 }
|
|
283
|
+
in_files && /^ target:/ { $1=""; gsub(/^ +/, ""); print name "|" $0 }
|
|
284
|
+
' "$MANIFEST_FILE")
|
|
285
|
+
while IFS='|' read -r _fname _ftarget; do
|
|
286
|
+
[ -z "$_fname" ] && continue
|
|
287
|
+
if [ -n "$_ftarget" ] && is_template_file_modified "$package" "$_fname" "$_ftarget"; then
|
|
288
|
+
echo " - files/$_fname → $_ftarget"
|
|
289
|
+
fi
|
|
290
|
+
done <<< "$_file_entries"
|
|
291
|
+
fi
|
|
292
|
+
|
|
293
|
+
# Show update status if checking outdated
|
|
294
|
+
if [ "$has_updates" = true ]; then
|
|
295
|
+
echo " ${GREEN}Update available${NC}"
|
|
296
|
+
fi
|
|
297
|
+
|
|
298
|
+
echo ""
|
|
299
|
+
fi
|
|
300
|
+
done
|
|
301
|
+
|
|
302
|
+
echo ""
|
|
303
|
+
echo "Total: $DISPLAYED_COUNT of $PACKAGE_COUNT package(s)"
|
|
304
|
+
|
|
305
|
+
if [ "$OUTDATED" = true ] && [ $DISPLAYED_COUNT -eq 0 ]; then
|
|
306
|
+
echo "${GREEN}✓${NC} All packages are up to date"
|
|
307
|
+
fi
|
|
308
|
+
|
|
309
|
+
if [ "$MODIFIED" = true ] && [ $DISPLAYED_COUNT -eq 0 ]; then
|
|
310
|
+
echo "${GREEN}✓${NC} No packages have local modifications"
|
|
311
|
+
fi
|