mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 22:01:42 +03:00
Minor fixes and tweak for Cloud APIs. (#8557)
- Fix secret to at least be working again - Tweak to allow a MIMIC flow to work with value types (revisit in 2024).
This commit is contained in:
parent
9d27edafce
commit
9e27b6487b
@ -2734,6 +2734,11 @@ Text.from (that : Table) (format:Delimited_Format = Delimited_Format.Delimited '
|
|||||||
Conversion method to a Table from a Vector.
|
Conversion method to a Table from a Vector.
|
||||||
Table.from (that:Vector) (fields : (Vector | Nothing) = Nothing) = that.to_table fields
|
Table.from (that:Vector) (fields : (Vector | Nothing) = Nothing) = that.to_table fields
|
||||||
|
|
||||||
|
## PRIVATE
|
||||||
|
Conversion method to a Table from a JS_Object.
|
||||||
|
Table.from (that:JS_Object) (fields : (Vector | Nothing) = Nothing) =
|
||||||
|
Table.from_objects that fields
|
||||||
|
|
||||||
## PRIVATE
|
## PRIVATE
|
||||||
Convert an `XML_Element` into a `Table`
|
Convert an `XML_Element` into a `Table`
|
||||||
|
|
||||||
|
@ -277,6 +277,8 @@ type Value_Type
|
|||||||
_ -> False
|
_ -> False
|
||||||
Value_Type.Char self_size self_variable_length -> case target_type of
|
Value_Type.Char self_size self_variable_length -> case target_type of
|
||||||
Value_Type.Char target_size target_variable_length ->
|
Value_Type.Char target_size target_variable_length ->
|
||||||
|
## If the source is variable_length, lets try and load it and warn about truncation.
|
||||||
|
if self_variable_length then True else
|
||||||
fits_variability = if target_variable_length then True else self_variable_length == target_variable_length
|
fits_variability = if target_variable_length then True else self_variable_length == target_variable_length
|
||||||
fits_variability && (target_size >= self_size)
|
fits_variability && (target_size >= self_size)
|
||||||
_ -> False
|
_ -> False
|
||||||
|
@ -27,7 +27,7 @@ class EnsoSecretReader {
|
|||||||
return secrets.get(secretId);
|
return secrets.get(secretId);
|
||||||
}
|
}
|
||||||
|
|
||||||
var apiUri = AuthenticationProvider.getAPIRootURI() + "/secrets/" + secretId;
|
var apiUri = AuthenticationProvider.getAPIRootURI() + "/s3cr3tz/" + secretId;
|
||||||
var client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build();
|
var client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build();
|
||||||
var request =
|
var request =
|
||||||
HttpRequest.newBuilder()
|
HttpRequest.newBuilder()
|
||||||
@ -55,6 +55,8 @@ class EnsoSecretReader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String readValueFromString(String json) {
|
private static String readValueFromString(String json) {
|
||||||
return json.substring(1, json.length() - 1).translateEscapes();
|
var base64 = json.substring(1, json.length() - 1).translateEscapes();
|
||||||
|
return new String(
|
||||||
|
java.util.Base64.getDecoder().decode(base64), java.nio.charset.StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user