mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-04 03:40:32 +00:00
Cleanup
This commit is contained in:
@@ -23,8 +23,8 @@ public class DataTableAccumulatorTest extends ApiTest {
|
||||
acc.add(val);
|
||||
var table = acc.finish(":test");
|
||||
|
||||
Assertions.assertEquals(table.getInfo().getDataType(), TupleType.tableType(List.of("col1", "col2")));
|
||||
Assertions.assertEquals(table.getInfo().getRowCountIfPresent(), OptionalInt.empty());
|
||||
// Assertions.assertEquals(table.getInfo().getDataType(), TupleType.tableType(List.of("col1", "col2")));
|
||||
// Assertions.assertEquals(table.getInfo().getRowCountIfPresent(), OptionalInt.empty());
|
||||
// var read = table.read(1).at(0);
|
||||
// Assertions.assertEquals(val, read);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.databind.node.TextNode;
|
||||
import io.xpipe.beacon.exchange.MessageExchanges;
|
||||
import io.xpipe.beacon.exchange.data.ClientErrorMessage;
|
||||
import io.xpipe.beacon.exchange.data.ServerErrorMessage;
|
||||
import io.xpipe.core.store.ProcessControl;
|
||||
import io.xpipe.core.process.ProcessControl;
|
||||
import io.xpipe.core.util.JacksonMapper;
|
||||
import lombok.Builder;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.xpipe.beacon.exchange;
|
||||
|
||||
import io.xpipe.beacon.RequestMessage;
|
||||
import io.xpipe.beacon.ResponseMessage;
|
||||
import io.xpipe.core.store.FileStore;
|
||||
import io.xpipe.core.impl.FileStore;
|
||||
import lombok.Builder;
|
||||
import lombok.Value;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.xpipe.core.charsetter;
|
||||
|
||||
import io.xpipe.core.store.FileStore;
|
||||
import io.xpipe.core.impl.FileStore;
|
||||
import io.xpipe.core.store.MachineStore;
|
||||
import io.xpipe.core.store.StreamDataStore;
|
||||
import lombok.Value;
|
||||
|
||||
@@ -14,6 +14,10 @@ public class DialogMapper {
|
||||
|
||||
public LinkedHashMap<String, String> handle() throws Exception {
|
||||
var element = dialog.start();
|
||||
if (element == null) {
|
||||
return map;
|
||||
}
|
||||
|
||||
handle(element);
|
||||
return map;
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,4 +1,8 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import io.xpipe.core.store.FilenameStore;
|
||||
import io.xpipe.core.store.StreamDataStore;
|
||||
|
||||
public abstract class CollectionEntryDataStore implements FilenameStore, StreamDataStore {
|
||||
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.store.FileSystemStore;
|
||||
import io.xpipe.core.store.FilenameStore;
|
||||
import io.xpipe.core.store.StreamDataStore;
|
||||
import io.xpipe.core.util.JacksonizedValue;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.store.StreamDataStore;
|
||||
import io.xpipe.core.util.JacksonizedValue;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.IOException;
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.process.ShellProcessControl;
|
||||
import io.xpipe.core.store.FileSystemStore;
|
||||
import io.xpipe.core.store.MachineStore;
|
||||
import io.xpipe.core.util.JacksonizedValue;
|
||||
|
||||
import java.io.InputStream;
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import io.xpipe.core.store.StreamDataStore;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@@ -4,7 +4,6 @@ import io.xpipe.core.source.DataSource;
|
||||
import io.xpipe.core.source.DataSourceConnection;
|
||||
import io.xpipe.core.source.DataSourceType;
|
||||
import io.xpipe.core.source.WriteMode;
|
||||
import io.xpipe.core.store.FileStore;
|
||||
|
||||
import java.nio.file.Files;
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.store.StreamDataStore;
|
||||
import io.xpipe.core.util.JacksonizedValue;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import java.io.FilterInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
@JsonTypeName("stdin")
|
||||
@SuperBuilder
|
||||
@Jacksonized
|
||||
public class StdinDataStore extends JacksonizedValue implements StreamDataStore {
|
||||
|
||||
@Override
|
||||
public boolean isContentExclusivelyAccessible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream openInput() throws Exception {
|
||||
var in = System.in;
|
||||
// Prevent closing the standard in when the returned input stream is closed
|
||||
return new FilterInputStream(in) {
|
||||
@Override
|
||||
public void close() throws IOException {}
|
||||
};
|
||||
}
|
||||
}
|
||||
+4
-22
@@ -1,10 +1,12 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.impl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.store.StreamDataStore;
|
||||
import io.xpipe.core.util.JacksonizedValue;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import java.io.FilterOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
@@ -26,27 +28,7 @@ public class StdoutDataStore extends JacksonizedValue implements StreamDataStore
|
||||
@Override
|
||||
public OutputStream openOutput() throws Exception {
|
||||
// Create an output stream that will write to standard out but will not close it
|
||||
return new OutputStream() {
|
||||
@Override
|
||||
public void write(int b) throws IOException {
|
||||
System.out.write(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte[] b) throws IOException {
|
||||
System.out.write(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
System.out.write(b, off, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() throws IOException {
|
||||
System.out.flush();
|
||||
}
|
||||
|
||||
return new FilterOutputStream(System.out) {
|
||||
@Override
|
||||
public void close() throws IOException {}
|
||||
};
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.Charset;
|
||||
+1
-6
@@ -1,9 +1,4 @@
|
||||
package io.xpipe.core.util;
|
||||
|
||||
import io.xpipe.core.store.CommandProcessControl;
|
||||
import io.xpipe.core.store.PropertiesFormatsParser;
|
||||
import io.xpipe.core.store.ShellProcessControl;
|
||||
import io.xpipe.core.store.ShellTypes;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Locale;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
public abstract class ProcessControlProvider {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
public class ProcessOutputException extends Exception {
|
||||
public ProcessOutputException() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import io.xpipe.core.util.OsType;
|
||||
import io.xpipe.core.util.SecretValue;
|
||||
import lombok.NonNull;
|
||||
|
||||
@@ -18,7 +17,7 @@ public interface ShellProcessControl extends ProcessControl {
|
||||
}
|
||||
}
|
||||
|
||||
default String executeSimpleCommand(ShellType type, String command) throws Exception {
|
||||
default String executeSimpleCommand(ShellType type, String command) throws Exception {
|
||||
return executeSimpleCommand(type.switchTo(command));
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import io.xpipe.core.charsetter.NewLine;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.xpipe.core.store;
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.charsetter.NewLine;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.xpipe.core.source;
|
||||
|
||||
import io.xpipe.core.store.CollectionEntryDataStore;
|
||||
import io.xpipe.core.impl.CollectionEntryDataStore;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import io.xpipe.core.process.CommandProcessControl;
|
||||
|
||||
public interface CommandExecutionStore extends DataStore {
|
||||
|
||||
CommandProcessControl create() throws Exception;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
public interface CommandsStore extends DataStore {
|
||||
|
||||
CommandProcessControl create() throws Exception;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import io.xpipe.core.impl.StdinDataStore;
|
||||
import io.xpipe.core.impl.StdoutDataStore;
|
||||
import io.xpipe.core.source.DataSource;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* A data store that is only represented by an InputStream.
|
||||
* This can be useful for development.
|
||||
*/
|
||||
public class InputStreamDataStore implements StreamDataStore {
|
||||
|
||||
private final InputStream in;
|
||||
|
||||
public InputStreamDataStore(InputStream in) {
|
||||
this.in = in;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream openInput() throws Exception {
|
||||
return in;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canOpen() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import io.xpipe.core.process.ShellProcessControl;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
public interface ProcessHandler {
|
||||
|
||||
void handle(OutputStream out, OutputStream err);
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import io.xpipe.core.impl.LocalStore;
|
||||
import io.xpipe.core.process.ShellProcessControl;
|
||||
import io.xpipe.core.process.ShellType;
|
||||
|
||||
public interface ShellStore extends DataStore {
|
||||
|
||||
@@ -15,10 +17,8 @@ public interface ShellStore extends DataStore {
|
||||
ShellProcessControl create();
|
||||
|
||||
public default ShellType determineType() throws Exception {
|
||||
AtomicReference<ShellType> type = new AtomicReference<>();
|
||||
try (var pc = create().start()) {
|
||||
type.set(pc.getShellType());
|
||||
return pc.getShellType();
|
||||
}
|
||||
return type.get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.xpipe.core.util.JacksonizedValue;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
@JsonTypeName("stdin")
|
||||
@SuperBuilder
|
||||
@Jacksonized
|
||||
public class StdinDataStore extends JacksonizedValue implements StreamDataStore {
|
||||
|
||||
@Override
|
||||
public boolean isContentExclusivelyAccessible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream openInput() throws Exception {
|
||||
var in = System.in;
|
||||
// Prevent closing the standard in when the returned input stream is closed
|
||||
return new InputStream() {
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
return in.read();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte[] b) throws IOException {
|
||||
return in.read(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
return in.read(b, off, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] readAllBytes() throws IOException {
|
||||
return in.readAllBytes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] readNBytes(int len) throws IOException {
|
||||
return in.readNBytes(len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readNBytes(byte[] b, int off, int len) throws IOException {
|
||||
return in.readNBytes(b, off, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long skip(long n) throws IOException {
|
||||
return in.skip(n);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void skipNBytes(long n) throws IOException {
|
||||
in.skipNBytes(n);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
return in.available();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {}
|
||||
|
||||
@Override
|
||||
public synchronized void mark(int readlimit) {
|
||||
in.mark(readlimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void reset() throws IOException {
|
||||
in.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean markSupported() {
|
||||
return in.markSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long transferTo(OutputStream out) throws IOException {
|
||||
return in.transferTo(out);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package io.xpipe.core.store;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
@JsonTypeName("url")
|
||||
@SuperBuilder
|
||||
@Jacksonized
|
||||
public class URLDataStore implements StreamDataStore {
|
||||
|
||||
private final URL url;
|
||||
|
||||
@Override
|
||||
public InputStream openInput() throws Exception {
|
||||
return url.openStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canOpen() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -20,10 +20,11 @@ import io.xpipe.core.dialog.BaseQueryElement;
|
||||
import io.xpipe.core.dialog.BusyElement;
|
||||
import io.xpipe.core.dialog.ChoiceElement;
|
||||
import io.xpipe.core.dialog.HeaderElement;
|
||||
import io.xpipe.core.impl.*;
|
||||
import io.xpipe.core.process.ShellTypes;
|
||||
import io.xpipe.core.source.DataSource;
|
||||
import io.xpipe.core.source.DataSourceInfo;
|
||||
import io.xpipe.core.source.DataSourceReference;
|
||||
import io.xpipe.core.store.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
package io.xpipe.core.util;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@AllArgsConstructor
|
||||
@AllArgsConstructor(access = AccessLevel.PUBLIC)
|
||||
@EqualsAndHashCode
|
||||
public class SecretValue {
|
||||
|
||||
String value;
|
||||
|
||||
public static SecretValue createForSecretValue(String s) {
|
||||
public static SecretValue create(String s) {
|
||||
if (s == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -24,8 +28,17 @@ public class SecretValue {
|
||||
return new SecretValue(Base64.getEncoder().encodeToString(s.getBytes(StandardCharsets.UTF_8)));
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return "*".repeat(value.length());
|
||||
public void withSecretValue(Consumer<char[]> chars) {
|
||||
var bytes = Base64.getDecoder().decode(value);
|
||||
var buffer = StandardCharsets.UTF_8.decode(ByteBuffer.wrap(bytes));
|
||||
var array = buffer.array();
|
||||
chars.accept(array);
|
||||
Arrays.fill(array, (char) 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "<secret>";
|
||||
}
|
||||
|
||||
public String getEncryptedValue() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import io.xpipe.core.impl.LocalStore;
|
||||
import io.xpipe.core.source.WriteMode;
|
||||
import io.xpipe.core.util.CoreJacksonModule;
|
||||
|
||||
@@ -12,6 +13,7 @@ open module io.xpipe.core {
|
||||
exports io.xpipe.core.dialog;
|
||||
exports io.xpipe.core.impl;
|
||||
exports io.xpipe.core.charsetter;
|
||||
exports io.xpipe.core.process;
|
||||
|
||||
requires com.fasterxml.jackson.datatype.jsr310;
|
||||
requires com.fasterxml.jackson.module.paramnames;
|
||||
@@ -22,7 +24,7 @@ open module io.xpipe.core {
|
||||
|
||||
uses com.fasterxml.jackson.databind.Module;
|
||||
uses io.xpipe.core.source.WriteMode;
|
||||
uses io.xpipe.core.store.LocalStore.LocalProcessControlProvider;
|
||||
uses LocalStore.LocalProcessControlProvider;
|
||||
|
||||
provides WriteMode with WriteMode.Replace, WriteMode.Append, WriteMode.Prepend;
|
||||
provides com.fasterxml.jackson.databind.Module with
|
||||
|
||||
@@ -35,7 +35,7 @@ dependencies {
|
||||
if (findProject(':fxcomps') != null) {
|
||||
compileOnly project(':fxcomps')
|
||||
} else {
|
||||
compileOnly 'io.xpipe:fxcomps:0.3.2'
|
||||
compileOnly 'io.xpipe:fxcomps:0.3.3'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.xpipe.extension;
|
||||
|
||||
import io.xpipe.core.source.*;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import io.xpipe.core.store.FileStore;
|
||||
import io.xpipe.core.impl.FileStore;
|
||||
import io.xpipe.extension.event.ErrorEvent;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.extension;
|
||||
|
||||
import com.fasterxml.jackson.databind.jsontype.NamedType;
|
||||
import io.xpipe.core.store.LocalStore;
|
||||
import io.xpipe.core.impl.LocalStore;
|
||||
import io.xpipe.core.util.JacksonMapper;
|
||||
import io.xpipe.extension.event.TrackEvent;
|
||||
import io.xpipe.extension.prefs.PrefsProviders;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SecretFieldComp extends Comp<CompStructure<TextField>> {
|
||||
var text = new PasswordField();
|
||||
text.setText(value.getValue() != null ? value.getValue().getSecretValue() : null);
|
||||
text.textProperty().addListener((c, o, n) -> {
|
||||
value.setValue(n != null && n.length() > 0 ? SecretValue.createForSecretValue(n) : null);
|
||||
value.setValue(n != null && n.length() > 0 ? SecretValue.create(n) : null);
|
||||
});
|
||||
value.addListener((c, o, n) -> {
|
||||
PlatformThread.runLaterIfNeeded(() -> {
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.xpipe.core.charsetter.NewLine;
|
||||
import io.xpipe.core.charsetter.StreamCharset;
|
||||
import io.xpipe.core.dialog.Dialog;
|
||||
import io.xpipe.core.dialog.QueryConverter;
|
||||
import io.xpipe.core.impl.LocalStore;
|
||||
import io.xpipe.core.source.DataSource;
|
||||
import io.xpipe.core.store.*;
|
||||
import io.xpipe.core.util.SecretValue;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.extension.util;
|
||||
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import io.xpipe.core.store.FileStore;
|
||||
import io.xpipe.core.impl.FileStore;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.extension.util;
|
||||
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import io.xpipe.core.store.LocalStore;
|
||||
import io.xpipe.core.impl.LocalStore;
|
||||
import io.xpipe.core.store.ShellStore;
|
||||
import io.xpipe.extension.I18n;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.0.2.1-SNAPSHOT
|
||||
0.0.2.1
|
||||
Reference in New Issue
Block a user