-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(version): update to version 'v0.9.0'.
- Loading branch information
Showing
179 changed files
with
4,179 additions
and
2,068 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM eclipse-temurin:11-jre | ||
FROM eclipse-temurin:17-jre | ||
|
||
ARG KESTRA_PLUGINS="" | ||
ARG APT_PACKAGES="" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
cli/src/main/java/io/kestra/cli/services/NoOpStartupHook.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.kestra.cli.services; | ||
|
||
import io.kestra.cli.AbstractCommand; | ||
import jakarta.inject.Singleton; | ||
|
||
@Singleton | ||
public class NoOpStartupHook implements StartupHookInterface { | ||
public void start(AbstractCommand abstractCommand) { | ||
|
||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
cli/src/main/java/io/kestra/cli/services/StartupHookInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.kestra.cli.services; | ||
|
||
import io.kestra.cli.AbstractCommand; | ||
|
||
public interface StartupHookInterface { | ||
void start(AbstractCommand abstractCommand); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-300 KB
cli/src/test/resources/plugins/plugin-template-test-0.6.0-SNAPSHOT.jar
Binary file not shown.
Binary file added
BIN
+318 KB
cli/src/test/resources/plugins/plugin-template-test-0.9.0-SNAPSHOT.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
core/src/main/java/io/kestra/core/docs/ClassDocumentation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package io.kestra.core.docs; | ||
|
||
import lombok.*; | ||
|
||
import java.util.*; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
@EqualsAndHashCode | ||
@ToString | ||
@NoArgsConstructor | ||
public class ClassDocumentation { | ||
protected Boolean deprecated; | ||
protected String cls; | ||
protected String shortName; | ||
protected String docDescription; | ||
protected String docBody; | ||
protected List<ExampleDoc> docExamples; | ||
protected Map<String, Object> defs = new TreeMap<>(); | ||
protected Map<String, Object> inputs = new TreeMap<>(); | ||
protected Map<String, Object> propertiesSchema; | ||
|
||
protected static Map<String, Object> flatten(Map<String, Object> map, List<String> required) { | ||
map.remove("type"); | ||
return flatten(map, required, null); | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
protected static Map<String, Object> flatten(Map<String, Object> map, List<String> required, String parentName) { | ||
Map<String, Object> result = new TreeMap<>((key1, key2) -> { | ||
boolean key1Required = required.contains(key1); | ||
boolean key2Required = required.contains(key2); | ||
if (key1Required == key2Required) { | ||
return key1.compareTo(key2); | ||
} | ||
|
||
return key1Required ? -1 : 1; | ||
}); | ||
|
||
for (Map.Entry<String, Object> current : map.entrySet()) { | ||
Map<String, Object> finalValue = (Map<String, Object>) current.getValue(); | ||
if (required.contains(current.getKey())) { | ||
finalValue.put("$required", true); | ||
} | ||
|
||
result.put(flattenKey(current.getKey(), parentName), finalValue); | ||
if (current.getValue() instanceof Map) { | ||
Map<String, Object> value = (Map<String, Object>) current.getValue(); | ||
|
||
if (value.containsKey("properties")) { | ||
result.putAll(flatten(properties(value), required(value), current.getKey())); | ||
} | ||
} | ||
} | ||
|
||
return result; | ||
} | ||
|
||
protected static String flattenKey(String current, String parent) { | ||
return (parent != null ? parent + "." : "") + current; | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
protected static Map<String, Object> properties(Map<String, Object> props) { | ||
Map<String, Object> properties = (Map<String, Object>) props.get("properties"); | ||
|
||
return properties != null ? properties : new HashMap<>(); | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
protected static List<String> required(Map<String, Object> props) { | ||
if (!props.containsKey("required")) { | ||
return Collections.emptyList(); | ||
} | ||
|
||
return (List<String>) props.get("required"); | ||
} | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
public static class ExampleDoc { | ||
String title; | ||
String task; | ||
} | ||
} |
Oops, something went wrong.