mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-19 13:51:23 +00:00
Update dependencies and fix a few issues
This commit is contained in:
parent
4a21dffdab
commit
347ce98bef
|
@ -26,7 +26,7 @@ test {
|
|||
dependencies {
|
||||
api project(':core')
|
||||
implementation project(':beacon')
|
||||
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.15.2"
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
|
|
@ -36,29 +36,34 @@ dependencies {
|
|||
implementation project(':beacon')
|
||||
|
||||
compileOnly 'org.hamcrest:hamcrest:2.2'
|
||||
compileOnly 'org.junit.jupiter:junit-jupiter-api:5.9.0'
|
||||
compileOnly 'org.junit.jupiter:junit-jupiter-params:5.9.0'
|
||||
compileOnly 'org.junit.jupiter:junit-jupiter-api:5.9.3'
|
||||
compileOnly 'org.junit.jupiter:junit-jupiter-params:5.9.3'
|
||||
|
||||
implementation 'net.java.dev.jna:jna-jpms:5.13.0'
|
||||
implementation 'net.java.dev.jna:jna-platform-jpms:5.13.0'
|
||||
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.15.2"
|
||||
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "2.15.2"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "2.15.2"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "2.15.2"
|
||||
implementation group: 'org.kordamp.ikonli', name: 'ikonli-material2-pack', version: "12.2.0"
|
||||
implementation group: 'org.kordamp.ikonli', name: 'ikonli-materialdesign2-pack', version: "12.2.0"
|
||||
implementation group: 'org.kordamp.ikonli', name: 'ikonli-javafx', version: "12.2.0"
|
||||
implementation group: 'org.kordamp.ikonli', name: 'ikonli-material-pack', version: "12.2.0"
|
||||
implementation group: 'org.kordamp.ikonli', name: 'ikonli-feather-pack', version: "12.2.0"
|
||||
implementation name: 'preferencesfx-core-11.15.0'
|
||||
implementation group: 'com.dlsc.formsfx', name: 'formsfx-core', version: '11.6.0'
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.0'
|
||||
implementation (name: 'preferencesfx-core-11.15.0')
|
||||
implementation (group: 'com.dlsc.formsfx', name: 'formsfx-core', version: '11.6.0') {
|
||||
exclude group: 'org.openjfx', module: 'javafx-controls'
|
||||
exclude group: 'org.openjfx', module: 'javafx-fxml'
|
||||
}
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
|
||||
implementation 'io.xpipe:modulefs:0.1.4'
|
||||
implementation 'com.jfoenix:jfoenix:9.0.10'
|
||||
implementation 'org.controlsfx:controlsfx:11.1.1'
|
||||
implementation 'org.controlsfx:controlsfx:11.1.2'
|
||||
implementation 'net.synedra:validatorfx:0.3.1'
|
||||
implementation name: 'atlantafx-base-1.2.1'
|
||||
implementation name: 'atlantafx-styles-1.2.1'
|
||||
implementation ('io.github.mkpaz:atlantafx-base:2.0.0') {
|
||||
exclude group: 'org.openjfx', module: 'javafx-base'
|
||||
exclude group: 'org.openjfx', module: 'javafx-controls'
|
||||
}
|
||||
implementation name: 'jSystemThemeDetector-3.8'
|
||||
implementation group: 'com.github.oshi', name: 'oshi-core-java11', version: '6.4.2'
|
||||
implementation 'org.jetbrains:annotations:24.0.1'
|
||||
|
|
|
@ -119,7 +119,7 @@ final class BrowserFileListComp extends SimpleComp {
|
|||
FXCollections.sort(param.getItems(), us);
|
||||
return true;
|
||||
});
|
||||
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY_FLEX_LAST_COLUMN);
|
||||
filenameCol.minWidthProperty().bind(table.widthProperty().multiply(0.5));
|
||||
|
||||
table.setFixedCellSize(34.0);
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.xpipe.app.browser;
|
|||
import atlantafx.base.theme.Styles;
|
||||
import io.xpipe.app.fxcomps.Comp;
|
||||
import io.xpipe.app.fxcomps.CompStructure;
|
||||
import io.xpipe.app.fxcomps.impl.FancyTooltipAugment;
|
||||
import io.xpipe.app.fxcomps.impl.TextFieldComp;
|
||||
import io.xpipe.app.fxcomps.util.SimpleChangeListener;
|
||||
import javafx.beans.property.Property;
|
||||
|
@ -20,6 +21,7 @@ public class BrowserFilterComp extends Comp<BrowserFilterComp.Structure> {
|
|||
var expanded = new SimpleBooleanProperty();
|
||||
var text = new TextFieldComp(filterString, false).createRegion();
|
||||
var button = new Button();
|
||||
new FancyTooltipAugment<>("app.search").augment(button);
|
||||
text.focusedProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (!newValue && filterString.getValue() == null) {
|
||||
if (button.isFocused()) {
|
||||
|
|
|
@ -7,10 +7,7 @@ import io.xpipe.app.fxcomps.SimpleComp;
|
|||
import io.xpipe.app.fxcomps.SimpleCompStructure;
|
||||
import io.xpipe.app.fxcomps.augment.ContextMenuAugment;
|
||||
import io.xpipe.app.fxcomps.augment.GrowAugment;
|
||||
import io.xpipe.app.fxcomps.impl.HorizontalComp;
|
||||
import io.xpipe.app.fxcomps.impl.PrettyImageComp;
|
||||
import io.xpipe.app.fxcomps.impl.StackComp;
|
||||
import io.xpipe.app.fxcomps.impl.TextFieldComp;
|
||||
import io.xpipe.app.fxcomps.impl.*;
|
||||
import io.xpipe.app.fxcomps.util.SimpleChangeListener;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
|
|
|
@ -134,7 +134,7 @@ public class OpenFileSystemSavedState {
|
|||
});
|
||||
}
|
||||
},
|
||||
200);
|
||||
20000);
|
||||
}
|
||||
|
||||
private void updateRecent(String dir) {
|
||||
|
|
|
@ -15,13 +15,7 @@ public class ExceptionConverter {
|
|||
}
|
||||
|
||||
return switch (ex) {
|
||||
case ProcessOutputException e -> {
|
||||
if (e.getOutput() == null || e.getOutput().isBlank()) {
|
||||
yield e.getMessage();
|
||||
} else {
|
||||
yield e.getOutput();
|
||||
}
|
||||
}
|
||||
case ProcessOutputException e -> e.getMessage();
|
||||
case StackOverflowError e -> AppI18n.get("app.stackOverflow");
|
||||
case OutOfMemoryError e -> AppI18n.get("app.outOfMemory");
|
||||
case FileNotFoundException e -> AppI18n.get("app.fileNotFound", msg);
|
||||
|
|
|
@ -158,7 +158,7 @@ public class JsonStorageHandler implements StorageHandler {
|
|||
|
||||
@Override
|
||||
public double loadDividerPosition() {
|
||||
return 0;
|
||||
return 0.27;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,6 +12,7 @@ lockCreationAlertHeader=Set your new lock password
|
|||
finish=Finish
|
||||
error=Error
|
||||
ok=Ok
|
||||
search=Search
|
||||
newFile=New file
|
||||
newDirectory=New directory
|
||||
password=Password
|
||||
|
|
|
@ -94,6 +94,10 @@
|
|||
-fx-border-insets: 0px;
|
||||
}
|
||||
|
||||
.browser .breadcrumbs {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.browser .breadcrumbs .button {
|
||||
-fx-padding: 3px 1px 3px 1px;
|
||||
-fx-background-color: transparent;
|
||||
|
@ -102,6 +106,7 @@
|
|||
.browser .breadcrumbs .button:hover {
|
||||
-fx-background-color: -color-neutral-muted;
|
||||
}
|
||||
|
||||
.browser .path-text:invisible {
|
||||
-fx-text-fill: transparent;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
}
|
||||
|
||||
.sidebar-comp .big-icon-button-comp .icon {
|
||||
-fx-font-size: 1.5em;
|
||||
-fx-font-size: 1.4em;
|
||||
}
|
||||
|
||||
.sidebar-comp .big-icon-button-comp {
|
||||
|
|
|
@ -14,10 +14,10 @@ compileJava {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "2.13.0"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "2.13.0"
|
||||
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.15.2"
|
||||
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "2.15.2"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "2.15.2"
|
||||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "2.15.2"
|
||||
}
|
||||
|
||||
version = rootProject.versionString
|
||||
|
|
|
@ -13,8 +13,8 @@ import java.util.function.Function;
|
|||
public interface CommandControl extends ProcessControl {
|
||||
|
||||
public static final int UNASSIGNED_EXIT_CODE = -1;
|
||||
public static final int TIMEOUT_EXIT_CODE = -2;
|
||||
public static final int KILLED_EXIT_CODE = -3;
|
||||
public static final int EXIT_TIMEOUT_EXIT_CODE = -2;
|
||||
public static final int START_FAILED_EXIT_CODE = -3;
|
||||
|
||||
static enum TerminalExitMode {
|
||||
KEEP_OPEN,
|
||||
|
|
|
@ -5,21 +5,21 @@ import lombok.Getter;
|
|||
@Getter
|
||||
public class ProcessOutputException extends Exception {
|
||||
|
||||
public static ProcessOutputException of(String customPrefix, ProcessOutputException ex) {
|
||||
public static ProcessOutputException withPrefix(String customPrefix, ProcessOutputException ex) {
|
||||
var messageSuffix = ex.getOutput() != null && !ex.getOutput().isBlank() ? ": " + ex.getOutput() : "";
|
||||
var message = customPrefix + messageSuffix;
|
||||
return new ProcessOutputException(message, ex.getExitCode(), ex.getOutput());
|
||||
}
|
||||
|
||||
public static ProcessOutputException of(int exitCode, String output, String accumulatedError) {
|
||||
var combinedError = (accumulatedError != null ? accumulatedError.trim() + "\n" : "")
|
||||
+ (output != null ? output.trim() : "");
|
||||
var hasMessage = !combinedError.trim().isEmpty();
|
||||
public static ProcessOutputException of(int exitCode, String stdout, String stderr) {
|
||||
var combinedError = (stdout != null && !stdout.isBlank() ? stdout.strip() + "\n\n" : "")
|
||||
+ (stderr != null && !stderr.isBlank() ? stderr.strip() : "");
|
||||
var hasMessage = !combinedError.isBlank();
|
||||
var errorSuffix = hasMessage ? ": " + combinedError : "";
|
||||
var message =
|
||||
switch (exitCode) {
|
||||
case CommandControl.KILLED_EXIT_CODE -> "Process timed out and had to be killed" + errorSuffix;
|
||||
case CommandControl.TIMEOUT_EXIT_CODE -> "Wait for process exit timed out"
|
||||
case CommandControl.START_FAILED_EXIT_CODE -> "Process did not start up properly and had to be killed" + errorSuffix;
|
||||
case CommandControl.EXIT_TIMEOUT_EXIT_CODE -> "Wait for process exit timed out"
|
||||
+ errorSuffix;
|
||||
default -> "Process returned exit code " + exitCode + errorSuffix;
|
||||
};
|
||||
|
@ -36,10 +36,10 @@ public class ProcessOutputException extends Exception {
|
|||
}
|
||||
|
||||
public boolean isTimeOut() {
|
||||
return exitCode == CommandControl.TIMEOUT_EXIT_CODE;
|
||||
return exitCode == CommandControl.EXIT_TIMEOUT_EXIT_CODE;
|
||||
}
|
||||
|
||||
public boolean isKill() {
|
||||
return exitCode == CommandControl.KILLED_EXIT_CODE;
|
||||
return exitCode == CommandControl.START_FAILED_EXIT_CODE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public interface ShellControl extends ProcessControl {
|
|||
try (CommandControl c = command(command).start()) {
|
||||
c.discardOrThrow();
|
||||
} catch (ProcessOutputException out) {
|
||||
throw ProcessOutputException.of(failMessage, out);
|
||||
throw ProcessOutputException.withPrefix(failMessage, out);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -135,6 +135,8 @@ public interface ShellDialect {
|
|||
return content.contains("\n");
|
||||
}
|
||||
|
||||
CommandControl createTextFileWriteCommand(ShellControl parent, String content, String file);
|
||||
|
||||
CommandControl createScriptTextFileWriteCommand(ShellControl parent, String content, String file);
|
||||
|
||||
String getFileDeleteCommand(String file);
|
||||
|
|
|
@ -13,10 +13,11 @@ public class XPipeSystemId {
|
|||
|
||||
public static void init() {
|
||||
try {
|
||||
var file = Path.of(System.getProperty("user.home")).resolve(".xpipe").resolve("system_id");
|
||||
if (!Files.exists(file)) {
|
||||
Files.writeString(file, UUID.randomUUID().toString());
|
||||
}
|
||||
var file =
|
||||
Path.of(System.getProperty("user.home")).resolve(".xpipe").resolve("system_id");
|
||||
if (!Files.exists(file)) {
|
||||
Files.writeString(file, UUID.randomUUID().toString());
|
||||
}
|
||||
localId = UUID.fromString(Files.readString(file).trim());
|
||||
} catch (Exception ex) {
|
||||
localId = UUID.randomUUID();
|
||||
|
@ -31,14 +32,27 @@ public class XPipeSystemId {
|
|||
var file = proc.getOsType().getSystemIdFile(proc);
|
||||
|
||||
if (!proc.getShellDialect().createFileExistsCommand(proc, file).executeAndCheck()) {
|
||||
proc.executeSimpleCommand(
|
||||
proc.getShellDialect().getMkdirsCommand(FileNames.getParent(file)),
|
||||
"Unable to access or create directory " + file);
|
||||
var id = UUID.randomUUID();
|
||||
proc.getShellDialect().createScriptTextFileWriteCommand(proc, id.toString(), file).execute();
|
||||
return id;
|
||||
return writeRandom(proc, file);
|
||||
}
|
||||
|
||||
return UUID.fromString(proc.executeSimpleStringCommand(proc.getShellDialect().getFileReadCommand(file)).trim());
|
||||
try {
|
||||
return UUID.fromString(
|
||||
proc.executeSimpleStringCommand(proc.getShellDialect().getFileReadCommand(file))
|
||||
.trim());
|
||||
} catch (IllegalArgumentException ex) {
|
||||
// Handle invalid UUID content case
|
||||
return writeRandom(proc, file);
|
||||
}
|
||||
}
|
||||
|
||||
private static UUID writeRandom(ShellControl proc, String file) throws Exception {
|
||||
proc.executeSimpleCommand(
|
||||
proc.getShellDialect().getMkdirsCommand(FileNames.getParent(file)),
|
||||
"Unable to access or create directory " + file);
|
||||
var id = UUID.randomUUID();
|
||||
proc.getShellDialect()
|
||||
.createTextFileWriteCommand(proc, id.toString(), file)
|
||||
.execute();
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
|
2
dist/licenses/atlantafx.properties
vendored
2
dist/licenses/atlantafx.properties
vendored
|
@ -1,4 +1,4 @@
|
|||
name=AtlantaFX
|
||||
version=1.2.0
|
||||
version=2.0.0
|
||||
license=MIT License
|
||||
link=https://github.com/mkpaz/atlantafx
|
2
dist/licenses/jackson.properties
vendored
2
dist/licenses/jackson.properties
vendored
|
@ -1,4 +1,4 @@
|
|||
name=Jackson Databind
|
||||
version=2.13.0
|
||||
version=2.15.2
|
||||
license=Apache License 2.0
|
||||
link=https://github.com/FasterXML/jackson-databind
|
|
@ -14,7 +14,7 @@ configurations {
|
|||
|
||||
dependencies {
|
||||
compileOnly project(':app')
|
||||
implementation(group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "2.13.0") {
|
||||
implementation(group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "2.15.2") {
|
||||
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
|
||||
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
|
||||
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -41,7 +41,7 @@ apply from: "$rootDir/gradle/gradle_scripts/lombok.gradle"
|
|||
apply from: "$rootDir/gradle/gradle_scripts/extension_test.gradle"
|
||||
|
||||
dependencies {
|
||||
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0"
|
||||
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.15.2"
|
||||
compileOnly project(':core')
|
||||
compileOnly project(':beacon')
|
||||
compileOnly project(':app')
|
||||
|
|
|
@ -7,9 +7,9 @@ dependencies {
|
|||
testImplementation project(':core')
|
||||
testImplementation project(':app')
|
||||
|
||||
testImplementation "org.openjfx:javafx-base:19:win"
|
||||
testImplementation "org.openjfx:javafx-controls:19:win"
|
||||
testImplementation "org.openjfx:javafx-graphics:19:win"
|
||||
testImplementation "org.openjfx:javafx-base:20.0.1:win"
|
||||
testImplementation "org.openjfx:javafx-controls:20.0.1:win"
|
||||
testImplementation "org.openjfx:javafx-graphics:20.0.1:win"
|
||||
}
|
||||
|
||||
def attachDebugger = System.getProperty('idea.debugger.dispatch.addr') != null
|
||||
|
|
|
@ -19,9 +19,9 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
dep "org.openjfx:javafx-base:19:${platform}"
|
||||
dep "org.openjfx:javafx-controls:19:${platform}"
|
||||
dep "org.openjfx:javafx-graphics:19:${platform}"
|
||||
dep "org.openjfx:javafx-media:19:${platform}"
|
||||
dep "org.openjfx:javafx-web:19:${platform}"
|
||||
dep "org.openjfx:javafx-base:20.0.1:${platform}"
|
||||
dep "org.openjfx:javafx-controls:20.0.1:${platform}"
|
||||
dep "org.openjfx:javafx-graphics:20.0.1:${platform}"
|
||||
dep "org.openjfx:javafx-media:20.0.1:${platform}"
|
||||
dep "org.openjfx:javafx-web:20.0.1:${platform}"
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|||
|
||||
dependencies {
|
||||
testImplementation 'org.hamcrest:hamcrest:2.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.3'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
|
||||
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue