From 1db784fdccd8a7b139876348fbf9be78bb37f3d3 Mon Sep 17 00:00:00 2001 From: Julien Caillon Date: Thu, 5 Dec 2024 00:52:27 +0100 Subject: [PATCH] :rocket: releasing version 0.27.285 --- commands.d/self-install.sh | 2 +- docs/content/docs/300.libraries/kurl.md | 67 --------------- docs/content/docs/300.libraries/prompt.md | 99 ----------------------- 3 files changed, 1 insertion(+), 167 deletions(-) delete mode 100644 docs/content/docs/300.libraries/kurl.md delete mode 100644 docs/content/docs/300.libraries/prompt.md diff --git a/commands.d/self-install.sh b/commands.d/self-install.sh index de73c24..71e1eb4 100644 --- a/commands.d/self-install.sh +++ b/commands.d/self-install.sh @@ -670,7 +670,7 @@ function selfUpdate_addToPath() { # set the version to download by default # this is automatically updated by the self release command -VALET_RELEASED_VERSION="0.26.6" +VALET_RELEASED_VERSION="0.27.285" # import the core script (should always be skipped if the command is run from valet) if [[ -z "${GLOBAL_CORE_INCLUDED:-}" ]]; then diff --git a/docs/content/docs/300.libraries/kurl.md b/docs/content/docs/300.libraries/kurl.md deleted file mode 100644 index ed80153..0000000 --- a/docs/content/docs/300.libraries/kurl.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: 📂 curl -cascade: - type: docs -url: /docs/libraries/curl ---- - -## curl::toFile - -This function is a wrapper around curl. -It allows you to check the http status code and return 1 if it is not acceptable. -It io::invokes curl with the following options (do not repeat them): -sSL -w "%{response_code}" -o ${2}. - -- $1: **fail** _as bool_: - true/false to indicate if the function should fail in case the execution fails -- $2: **acceptable codes** _as string_: - list of http status codes that are acceptable, comma separated - (defaults to 200,201,202,204,301,304,308 if left empty) -- $3: **path** _as string_: - the file in which to save the output of curl -- $@: **curl arguments** _as any_: - options for curl - -Returns: - -- $?: - - 0 if the http status code is acceptable - - 1 otherwise -- `RETURNED_VALUE`: the content of stderr -- `RETURNED_VALUE2`: the http status code - -```bash -curl::toFile "true" "200,201" "/filePath" "https://example.com" || core::fail "The curl command failed." -``` - - -## curl::toVar - -This function is a wrapper around curl. -It allows you to check the http status code and return 1 if it is not acceptable. -It io::invokes curl with the following options (do not repeat them): -sSL -w "%{response_code}" -o "tempfile". - -- $1: **fail** _as bool_: - true/false to indicate if the function should fail in case the execution fails -- $2: **acceptable codes** _as string_: - list of http status codes that are acceptable, comma separated - (defaults to 200,201,202,204,301,304,308 if left empty) -- $@: **curl arguments** _as any_: - options for curl - -Returns: - -- $?: - - 0 if the http status code is acceptable - - 1 otherwise -- `RETURNED_VALUE`: the content of the request -- `RETURNED_VALUE2`: the content of stderr -- `RETURNED_VALUE3`: the http status code - -```bash -curl::toVar false 200,201 https://example.com || core::fail "The curl command failed." -``` - - - - -> Documentation generated for the version 0.26.6 (2024-11-24). diff --git a/docs/content/docs/300.libraries/prompt.md b/docs/content/docs/300.libraries/prompt.md deleted file mode 100644 index 1fc2e05..0000000 --- a/docs/content/docs/300.libraries/prompt.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: 📂 prompt -cascade: - type: docs -url: /docs/libraries/prompt ---- - -## prompt::autocompletion - -Displays an autocompletion input starting at a given location. Allows -the user to type a text in the given row between a starting column and -ending column (included). Longer text are shifted to fit between -the two columns. - -This component is a replacement for the `read -e` command, which allows -to limit the input to a single line and to provide autocompletion. - -The autocompletion box can be hidden, or displayed below/above the input text -depending on the space available on the screen. - -The user can type character to filter down a list of suggestions, -navigate up and down between suggestions, insert a suggestion using -TAB or ENTER, press ESC to close the autocompletion box, and ALT+ENTER to -submit the input (or just ENTER when the box is closed). - -The autocompletion box will position itself depending on the screen size -and the starting position of the text. - -The multiple options allows to use this function to ask for any user input -as long as it is on a single line. - -You can define several callback functions that are called on different events: - -- `autocompletionOnTextUpdate`: Called when the text is updated (after each key press). - -- $1: **start line** _as int_: - The line/row at which the autocompleted text starts (this is used to - compute how to display the box). -- $2: **start column** _as int_: - The column at which the autocompleted text starts (this is used to - compute how to display the box). -- $3: **stop column** _as int_: - The column at which to stop showing the autocompleted text. - Longer texts get shifted to display the end of the user input. -- $4: **array name** _as string_: - The items to display (name of a global array which contains the items). - If left empty, the autocompletion box will not be displayed. Useful to turn this into a simple prompt. -- $5: initial text _as string_: - (optional) The initial string, which corresponds to the text already entered - by the user at the moment the autocompletion box shows up. - Allows to pre-filter the autocompletion. - (defaults to empty) -- $6: max lines _as int_: - optional) The maximum number of lines/rows to use for the autocompletion box. - (defaults to a maximized auto-computed value depending on the items and screen size) -- $7: force box below _as bool_: - (optional) If true, the box is forced to be displayed below the input text. - Otherwise it will depend on the space required and space available below/above. - (defaults to false) -- $8: show prompt _as bool_: - (optional) If true, the prompt is displayed. If false, the prompt is hidden. - Useful to turn this into a simple multiple choice list. - (defaults to true) -- $9: force show count _as bool_: - (optional) If true, the count of items is always displayed. - If false, the count is only displayed when we can'y display all the items at once. - (defaults to false) -- $10: show left cursors _as bool_: - (optional) If true, the left cursors are displayed (> for prompt and the > for selected item). - Useful to display the most simple auto-completion when false. - (defaults to true) -- $11: filters from n chars _as int_: - (optional) The minimum number of characters to type before starting to filter the items. - By default, the list is shown full and the user can start typing to filter. - Put a value superior to 0 to make it behave like a standard autocompletion. - When non-zero, the user can CTRL+SPACE to show the full list. - (defaults to 0) -- $12: accept any value _as bool_: - (optional) If true, the left cursors are displayed (> for prompt and the > for selected item). - Useful to display the most simple auto-completion when false. - (defaults to true) - -Returns: - -- $?: - - 0: The user pressed ENTER to validate the text. - - 1: The user pressed ESC to close the text box. -- `RETURNED_VALUE`: The entered value (or empty). -- `RETURNED_VALUE2`: The string displayed on the screen between the 2 columns at the - moment when the autocompletion was closed. - -```bash -prompt::autocompletion "Select an item" item_array_name "onItemSelected" "Details" -``` - - - - -> Documentation generated for the version 0.27.285 (2024-12-05).