File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed
src/main/java/clusterless/cls/command/show Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,22 @@ tasks.register<Exec>("generateBoundariesIndex") {
250250 mustRunAfter(" generateResourceIndex" )
251251}
252252
253+ tasks.register<Exec >(" generateActivitiesIndex" ) {
254+ dependsOn(" installDist" )
255+
256+ workingDir = file(" build/install/clusterless/bin" )
257+ commandLine = listOf (
258+ " ./cls" ,
259+ " show" ,
260+ " activity" ,
261+ " --list" ,
262+ " --output-path" ,
263+ " ${buildDir} /generated-docs/modules/components/" ,
264+ " --append=true"
265+ )
266+ mustRunAfter(" generateBoundariesIndex" )
267+ }
268+
253269tasks.register<Exec >(" generateComponentPartial" ) {
254270 dependsOn(" installDist" )
255271
@@ -322,6 +338,7 @@ tasks.register<Copy>("generateDocs") {
322338 dependsOn(" generateArcIndex" )
323339 dependsOn(" generateBarriersIndex" )
324340 dependsOn(" generateBoundariesIndex" )
341+ dependsOn(" generateActivitiesIndex" )
325342 dependsOn(" generateComponentPartial" )
326343 dependsOn(" generateModelModels" )
327344 dependsOn(" generateModelModelsRequired" )
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2023 Chris K Wensel <chris@wensel.net>. All Rights Reserved.
3+ *
4+ * This Source Code Form is subject to the terms of the Mozilla Public
5+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+ */
8+
9+ package clusterless .cls .command .show ;
10+
11+ import clusterless .cls .model .deploy .Activity ;
12+ import org .jetbrains .annotations .NotNull ;
13+ import picocli .CommandLine ;
14+
15+ import java .util .Collection ;
16+
17+ @ CommandLine .Command (
18+ name = "activity" ,
19+ description = "Show available provider activities."
20+ )
21+ public class ShowActivities extends ShowComponents {
22+ @ Override
23+ protected @ NotNull String elementSubType () {
24+ return "Activities" ;
25+ }
26+
27+ @ Override
28+ protected Collection <String > getNames () {
29+ return super .getNamesHaving (e -> Activity .class .isAssignableFrom (e .getValue ()));
30+ }
31+ }
Original file line number Diff line number Diff line change 2727 ShowBoundaries .class ,
2828 ShowBarriers .class ,
2929 ShowArcs .class ,
30+ ShowActivities .class ,
3031 ShowModels .class ,
3132 CommandLine .HelpCommand .class
3233 }
You can’t perform that action at this time.
0 commit comments