diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 236df4c..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -config/nvim/.netrwhist -config/nvim/reate-dirs -config/nvim/spell -.DS_Store diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..99302a3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "nvim"] + path = nvim + url = https://github.com/mikeunge/.nvim +[submodule "bin/wpe"] + path = bin/wpe + url = https://github.com/mikeunge/WallpaperEngine +[submodule "bin/sshman"] + path = bin/sshman + url = https://github.com/mikeunge/sshman +[submodule "bin/scripts"] + path = bin/scripts + url = https://github.com/mikeunge/Scripts diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e2e2872 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Mike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 3d404c5..57d92a2 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,22 @@ # dotfiles -*My `Mac OS` dotfiles* -### _about -I use `iTerm2` as my terminal emulator and `tmux` for everythig inside. TextEditor is `vim` (❤️). +Welcome to my **dotfiles** - this repository contains (_hopefully_) all my +customizations, scripts and tools I've installed as well as the configuration +that goes along with it. -### _screenshots -> **code** -![code 1 pane](assets/screenshots/code_single.png "one code editor") +## ./man -> **code split** -![code 2 panes](assets/screenshots/code_multi.png "2 panes to edit") +- [dotfiles](#dotfiles) + - [./man](#man) + - [./bin](#bin) + - [./config](#config) + - [./fonts](#fonts) + - [./rice](#rice) + +## ./bin + +## ./config + +## ./fonts + +## ./rice diff --git a/assets/screenshots/code_multi.png b/assets/screenshots/code_multi.png deleted file mode 100644 index 88fc68d..0000000 Binary files a/assets/screenshots/code_multi.png and /dev/null differ diff --git a/assets/screenshots/code_single.png b/assets/screenshots/code_single.png deleted file mode 100644 index fa2d9f7..0000000 Binary files a/assets/screenshots/code_single.png and /dev/null differ diff --git a/bin/scripts b/bin/scripts new file mode 160000 index 0000000..d695ff9 --- /dev/null +++ b/bin/scripts @@ -0,0 +1 @@ +Subproject commit d695ff984ed195e63c6282ae9ff9444451e34c02 diff --git a/bin/sshman b/bin/sshman new file mode 160000 index 0000000..9bc9fb9 --- /dev/null +++ b/bin/sshman @@ -0,0 +1 @@ +Subproject commit 9bc9fb972bf30498fefa6967c15cd121c54a37d4 diff --git a/bin/wpe b/bin/wpe new file mode 160000 index 0000000..7e6c084 --- /dev/null +++ b/bin/wpe @@ -0,0 +1 @@ +Subproject commit 7e6c0845b18054cfeb8dee41c021eb9610ad0d1d diff --git a/config/aliasrc b/config/aliasrc new file mode 100644 index 0000000..1b8f4c2 --- /dev/null +++ b/config/aliasrc @@ -0,0 +1,89 @@ +# cdd is a superset for cd - it remembers the last visited place +cdd () { + uid=`tmux display-message -p '#{pane_id}'` + echo `pwd` > /tmp/last.visit$uid + cd "$@" +} + +# ccd - reads the input from /tmp/last.visit and upadates it, after it cds back there +cc () { + uid=`tmux display-message -p '#{pane_id}'` + local LAST_VISITED=`cat /tmp/last.visit$uid` + echo `pwd` > /tmp/last.visit$uid + cd $LAST_VISITED +} + +# duh - get the disk usage for a given folder +duh () { + du -h -d 1 "$1" | sort -hr | grep -E '^[0-9.]+[MG]' +} + +# obsidianNew - spawn nvim in given path ($1) and launch obsidian plugin with the "new" command +obsidianNew() { + if [ -z "$1" ] || [ ! -d "$1" ]; then + echo "Usage: obsidianNew " + return 1 + fi + nvim +"cd $(realpath "$1")" +"enew" +"lua vim.schedule(function() require('lazy.core.loader').load({'obsidian.nvim'}, { force = true }) vim.cmd('ObsidianNew') end)" +} + +# obsidianNew - spawn nvim in given path ($1) and launch obsidian plugin with the "quick switch" command +obsidianOpen() { + #nvim "$1" +"lua vim.schedule(function() require('lazy.core.loader').load({'obsidian.nvim'}, { force = true }) vim.cmd('ObsidianQuickSwitch') end)" + if [ -z "$1" ] || [ ! -d "$1" ]; then + echo "Usage: obsidianOpen " + return 1 + fi + nvim +"cd $(realpath "$1")" +"enew" +"lua vim.schedule(function() require('lazy.core.loader').load({'obsidian.nvim'}, { force = true }) vim.cmd('ObsidianQuickSwitch') end)" +} + +# commands +alias ls="eza --icons --long" +alias ll="ls -lhg" +alias lt="ls --tree --level=2" +alias la="ls -lahg" +alias ld="ls -lDhg" +alias lsd="ls -snew" +alias rmf="rm -rf" +alias cp="cp -ir" +alias mkdir="mkdir -p" +alias cl="clear" +alias cll="cl && ll" +alias cla="cl && la" +alias reload=". ~/.zshrc" # reload (source) the profile +alias sync="rsync -u -H --progress --human-readable --stats" + +# remove all files that are __NOT__ commited / new files +alias gitrm="git ls-files -z -o --exclude-standard | xargs -0 rm -rf" + +# note taking with nvim & obsidian +alias notes="obsidianOpen ~/Documents/vaults/notes" +alias nnew="obsidianNew ~/Documents/vaults/notes" +alias pnotes="obsidianOpen ~/Documents/vaults/personal" +alias pnew="obsidianNew ~/Documents/vaults/personal" +alias wnotes="obsidianOpen ~/Documents/vaults/work" +alias wnew="obsidianNew ~/Documents/vaults/work" + +# commands but they depend on stuff +alias fetch="pfetch" +alias tf="terraform" +alias pp="pnpm" +alias lg="lazygit" + +# call wallpaper engine with work profile +alias wpw="wpe -c $HOME/.config/wallpaper_engine/work.json" + +# editors +alias vim="/opt/homebrew/bin/nvim" +alias nvim="/opt/homebrew/bin/nvim" + +# shortcuts +alias hok1="cdd $HOME/Development/hokify/hokify-1/" +alias hok2="cdd $HOME/Development/hokify/hokify-2/" +alias hok3="cdd $HOME/Development/hokify/hokify-3" +alias aliases="nvim $HOME/.config/aliasrc" +alias zshrc="nvim $HOME/.zshrc" +alias tmuxc="nvim $HOME/.config/tmux/tmux.conf" + +# misc +alias shrug="echo '\n¯\_(ツ)_/¯'" diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf new file mode 100644 index 0000000..828ff19 --- /dev/null +++ b/config/kitty/kitty.conf @@ -0,0 +1,36 @@ +# vim:fileencoding=utf-8:ft=conf +# +# import theme +# include themes/kitty-themes/themes/everforest_dark_medium.conf +#include themes/deepwhite.conf +include themes/field_lights.conf + +# font and ligatures +font_size 12 +font_family Geist Nerd Font +bold_font Geist Nerd Font Bold +italic_font Geist Nerd Font Italic +disable_ligatures never + +# cursor +cursor_shape block +cursor_blink_interval -1 + +# window (floating) sizes +remember_window_size yes +initial_window_width 100c +initial_window_height 34c +# set padding in terminal +window_padding_width 2 + +# map copy and paste behaviour +strip_trailing_spaces always +copy_on_select yes +map ctrl+shift+c copy_to_clipboard +map ctrl+shift+v paste_from_clipboard + +# disblae titlebar +hide_window_decorations no + +# disable stupid audio +enable_audio_bell false diff --git a/config/kitty/themes/catppuccin/.editorconfig b/config/kitty/themes/catppuccin/.editorconfig new file mode 100644 index 0000000..d86ac02 --- /dev/null +++ b/config/kitty/themes/catppuccin/.editorconfig @@ -0,0 +1,34 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# EditorConfig is awesome: https://EditorConfig.org + +root = true + +[*] +charset = utf-8 +indent_size = 2 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +# go +[*.go] +indent_style = tab +indent_size = 4 + +# python +[*.{ini,py,py.tpl,rst}] +indent_size = 4 + +# rust +[*.rs] +indent_size = 4 + +# documentation, utils +[*.{md,mdx,diff}] +trim_trailing_whitespace = false + +# windows shell scripts +[*.{cmd,bat,ps1}] +end_of_line = crlf diff --git a/config/kitty/themes/catppuccin/LICENSE b/config/kitty/themes/catppuccin/LICENSE new file mode 100644 index 0000000..006383b --- /dev/null +++ b/config/kitty/themes/catppuccin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Catppuccin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/kitty/themes/catppuccin/README.md b/config/kitty/themes/catppuccin/README.md new file mode 100644 index 0000000..be0a360 --- /dev/null +++ b/config/kitty/themes/catppuccin/README.md @@ -0,0 +1,96 @@ +

+ Logo
+ + Catppuccin for Kitty + +

+ +

+ + + +

+ +

+ +

+ +## Previews + +
+🌻 Latte + +
+
+🪴 Frappé + +
+
+🌺 Macchiato + +
+
+🌿 Mocha + +
+ +  + +## Usage + +> **Note**
+> If you're using Kitty `>0.26.0`, all Catppuccin flavors are already included in Kitty! There's no need to install the base theme. + +> **Note**
+> This config **only** includes the Catppuccin color, it does **not** configure fonts or other styling. + +1. Choose your flavor. +2. Copy the contents of _flavor_.conf into your kitty config file (usually stored at `~/.config/kitty/kitty.conf`) +3. Save and enjoy! + +Alternatively you can copy all flavor configs into your kitty theme directory (usually `~/.config/kitty/themes/`), and then use the themes kitten to select your desired flavor: + +``` +kitty +kitten themes --reload-in=all +``` + +`Catppuccin-Latte`, `Catppuccin-Frappe`, `Catppuccin-Macchiato`, `Catppuccin-Mocha` are their respective names. + +  + +## 🙋 FAQ + +- Q: **_"How can I style the Tab Bar like it is on the screenshots?"_**
+ A: The config settings for the Tab Bar are the following: + + ```ini + tab_bar_min_tabs 1 + tab_bar_edge bottom + tab_bar_style powerline + tab_powerline_style slanted + tab_title_template {title}{' :{}:'.format(num_windows) if num_windows > 1 else ''} + ``` + +- Q: **_"Which Fonts are used in the screenshots?"_**
+ A: The font used in the screenshot config is [Fira Code](https://github.com/tonsky/FiraCode). Furthermore, the following stylistic alternatives and ligatures are set: + + ```ini + +cv02 +cv05 +cv09 +cv14 +ss04 +cv16 +cv31 +cv25 +cv26 +cv32 +cv28 +ss10 +zero +onum + ``` + +- Q: **_"Which fetch is used in the screenshots?"_**
+ A: It's [pfetch with kitties](https://github.com/andreasgrafen/pfetch-with-kitties) — a slightly modified version of [pfetch](https://github.com/dylanaraps/pfetch) which adds the ASCII Kitty. + +  + +## 💝 Thanks to + +- [Pocco81](https://github.com/Pocco81) +- [Lokesh Krishna](https://github.com/lokesh-krishna) +- [Andreas Grafen](https://github.com/andreasgrafen) + +  + +

+

Copyright © 2021-present Catppuccin Org +

diff --git a/config/kitty/themes/catppuccin/diff-frappe.conf b/config/kitty/themes/catppuccin/diff-frappe.conf new file mode 100644 index 0000000..bac699c --- /dev/null +++ b/config/kitty/themes/catppuccin/diff-frappe.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Diff Frappé +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/diff-frappe.conf +## blurb: Soothing pastel theme for the high-spirited! + +# text +foreground #c6d0f5 +# base +background #303446 +# subtext0 +title_fg #a5adce + +# mantle +title_bg #292c3c +margin_bg #292c3c + +# subtext1 +margin_fg #a5adce +# mantle +filler_bg #292c3c + +# 30% red, 70% base +removed_bg #684b59 +# 50% red, 50% base +highlight_removed_bg #8c5b65 +# 40% red, 60% base +removed_margin_bg #79535f + +# 30% green, 70% base +added_bg #54635a +# 50% green, 50% base +highlight_added_bg #6b8368 +# 40% green, 60% base +added_margin_bg #79535f + +# mantle +hunk_margin_bg #292c3c +hunk_bg #292c3c + +# 40% yellow, 60% base +search_bg #796f64 +# text +search_fg #c6d0f5 +# 30% sky, 70% base +select_bg #506373 +# text +select_fg #c6d0f5 diff --git a/config/kitty/themes/catppuccin/diff-latte.conf b/config/kitty/themes/catppuccin/diff-latte.conf new file mode 100644 index 0000000..f1f00b3 --- /dev/null +++ b/config/kitty/themes/catppuccin/diff-latte.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Diff Latte +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/diff-latte.conf +## blurb: Soothing pastel theme for the high-spirited! + +# text +foreground #4c4f69 +# base +background #eff1f5 +# subtext0 +title_fg #6c6f85 + +# mantle +title_bg #e6e9ef +margin_bg #e6e9ef + +# subtext1 +margin_fg #5c5f77 +# mantle +filler_bg #e6e9ef + +# 30% red, 70% base +removed_bg #e6adbc +# 50% red, 50% base +highlight_removed_bg #e08097 +# 40% red, 60% base +removed_margin_bg #e397aa + +# 30% green, 70% base +added_bg #bad8b8 +# 50% green, 50% base +highlight_added_bg #97c890 +# 40% green, 60% base +added_margin_bg #e397aa + +# mantle +hunk_margin_bg #e6e9ef +hunk_bg #e6e9ef + +# 40% yellow, 60% base +search_bg #e8ca9f +# text +search_fg #4c4f69 +# 30% sky, 70% base +select_bg #a8daf0 +# text +select_fg #4c4f69 diff --git a/config/kitty/themes/catppuccin/diff-macchiato.conf b/config/kitty/themes/catppuccin/diff-macchiato.conf new file mode 100644 index 0000000..f590b8e --- /dev/null +++ b/config/kitty/themes/catppuccin/diff-macchiato.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Diff Macchiato +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/diff-macchiato.conf +## blurb: Soothing pastel theme for the high-spirited! + +# text +foreground #cad3f5 +# base +background #24273a +# subtext0 +title_fg #a5adcb + +# mantle +title_bg #1e2030 +margin_bg #1e2030 + +# subtext1 +margin_fg #a5adcb +# mantle +filler_bg #1e2030 + +# 30% red, 70% base +removed_bg #614455 +# 50% red, 50% base +highlight_removed_bg #895768 +# 40% red, 60% base +removed_margin_bg #754d5f + +# 30% green, 70% base +added_bg #4b5d55 +# 50% green, 50% base +highlight_added_bg #658068 +# 40% green, 60% base +added_margin_bg #754d5f + +# mantle +hunk_margin_bg #1e2030 +hunk_bg #1e2030 + +# 40% yellow, 60% base +search_bg #756c63 +# text +search_fg #cad3f5 +# 30% sky, 70% base +select_bg #455c6d +# text +select_fg #cad3f5 diff --git a/config/kitty/themes/catppuccin/diff-mocha.conf b/config/kitty/themes/catppuccin/diff-mocha.conf new file mode 100644 index 0000000..b627460 --- /dev/null +++ b/config/kitty/themes/catppuccin/diff-mocha.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Diff Mocha +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/diff-mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + +# text +foreground #cdd6f4 +# base +background #1e1e2e +# subtext0 +title_fg #a6adc8 + +# mantle +title_bg #181825 +margin_bg #181825 + +# subtext1 +margin_fg #a6adc8 +# mantle +filler_bg #181825 + +# 30% red, 70% base +removed_bg #5e3f53 +# 50% red, 50% base +highlight_removed_bg #89556b +# 40% red, 60% base +removed_margin_bg #734a5f + +# 30% green, 70% base +added_bg #475a51 +# 50% green, 50% base +highlight_added_bg #628168 +# 40% green, 60% base +added_margin_bg #734a5f + +# mantle +hunk_margin_bg #181825 +hunk_bg #181825 + +# 40% yellow, 60% base +search_bg #766c62 +# text +search_fg #cdd6f4 +# 30% sky, 70% base +select_bg #3e5767 +# text +select_fg #cdd6f4 diff --git a/config/kitty/themes/catppuccin/frappe.conf b/config/kitty/themes/catppuccin/frappe.conf new file mode 100644 index 0000000..a785bce --- /dev/null +++ b/config/kitty/themes/catppuccin/frappe.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Frappé +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/frappe.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #c6d0f5 +background #303446 +selection_foreground #303446 +selection_background #f2d5cf + +# Cursor colors +cursor #f2d5cf +cursor_text_color #303446 + +# URL underline color when hovering with mouse +url_color #f2d5cf + +# Kitty window border colors +active_border_color #babbf1 +inactive_border_color #737994 +bell_border_color #e5c890 + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #232634 +active_tab_background #ca9ee6 +inactive_tab_foreground #c6d0f5 +inactive_tab_background #292c3c +tab_bar_background #232634 + +# Colors for marks (marked text in the terminal) +mark1_foreground #303446 +mark1_background #babbf1 +mark2_foreground #303446 +mark2_background #ca9ee6 +mark3_foreground #303446 +mark3_background #85c1dc + +# The 16 terminal colors + +# black +color0 #51576d +color8 #626880 + +# red +color1 #e78284 +color9 #e78284 + +# green +color2 #a6d189 +color10 #a6d189 + +# yellow +color3 #e5c890 +color11 #e5c890 + +# blue +color4 #8caaee +color12 #8caaee + +# magenta +color5 #f4b8e4 +color13 #f4b8e4 + +# cyan +color6 #81c8be +color14 #81c8be + +# white +color7 #b5bfe2 +color15 #a5adce diff --git a/config/kitty/themes/catppuccin/latte.conf b/config/kitty/themes/catppuccin/latte.conf new file mode 100644 index 0000000..31c37bc --- /dev/null +++ b/config/kitty/themes/catppuccin/latte.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Latte +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/latte.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #4c4f69 +background #eff1f5 +selection_foreground #eff1f5 +selection_background #dc8a78 + +# Cursor colors +cursor #dc8a78 +cursor_text_color #eff1f5 + +# URL underline color when hovering with mouse +url_color #dc8a78 + +# Kitty window border colors +active_border_color #7287fd +inactive_border_color #9ca0b0 +bell_border_color #df8e1d + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #eff1f5 +active_tab_background #8839ef +inactive_tab_foreground #4c4f69 +inactive_tab_background #9ca0b0 +tab_bar_background #bcc0cc + +# Colors for marks (marked text in the terminal) +mark1_foreground #eff1f5 +mark1_background #7287fd +mark2_foreground #eff1f5 +mark2_background #8839ef +mark3_foreground #eff1f5 +mark3_background #209fb5 + +# The 16 terminal colors + +# black +color0 #5c5f77 +color8 #6c6f85 + +# red +color1 #d20f39 +color9 #d20f39 + +# green +color2 #40a02b +color10 #40a02b + +# yellow +color3 #df8e1d +color11 #df8e1d + +# blue +color4 #1e66f5 +color12 #1e66f5 + +# magenta +color5 #ea76cb +color13 #ea76cb + +# cyan +color6 #179299 +color14 #179299 + +# white +color7 #acb0be +color15 #bcc0cc diff --git a/config/kitty/themes/catppuccin/macchiato.conf b/config/kitty/themes/catppuccin/macchiato.conf new file mode 100644 index 0000000..21c31bb --- /dev/null +++ b/config/kitty/themes/catppuccin/macchiato.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Macchiato +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/macchiato.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #cad3f5 +background #24273a +selection_foreground #24273a +selection_background #f4dbd6 + +# Cursor colors +cursor #f4dbd6 +cursor_text_color #24273a + +# URL underline color when hovering with mouse +url_color #f4dbd6 + +# Kitty window border colors +active_border_color #b7bdf8 +inactive_border_color #6e738d +bell_border_color #eed49f + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #181926 +active_tab_background #c6a0f6 +inactive_tab_foreground #cad3f5 +inactive_tab_background #1e2030 +tab_bar_background #181926 + +# Colors for marks (marked text in the terminal) +mark1_foreground #24273a +mark1_background #b7bdf8 +mark2_foreground #24273a +mark2_background #c6a0f6 +mark3_foreground #24273a +mark3_background #7dc4e4 + +# The 16 terminal colors + +# black +color0 #494d64 +color8 #5b6078 + +# red +color1 #ed8796 +color9 #ed8796 + +# green +color2 #a6da95 +color10 #a6da95 + +# yellow +color3 #eed49f +color11 #eed49f + +# blue +color4 #8aadf4 +color12 #8aadf4 + +# magenta +color5 #f5bde6 +color13 #f5bde6 + +# cyan +color6 #8bd5ca +color14 #8bd5ca + +# white +color7 #b8c0e0 +color15 #a5adcb diff --git a/config/kitty/themes/catppuccin/mocha.conf b/config/kitty/themes/catppuccin/mocha.conf new file mode 100644 index 0000000..f37adf9 --- /dev/null +++ b/config/kitty/themes/catppuccin/mocha.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Mocha +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #cdd6f4 +background #1e1e2e +selection_foreground #1e1e2e +selection_background #f5e0dc + +# Cursor colors +cursor #f5e0dc +cursor_text_color #1e1e2e + +# URL underline color when hovering with mouse +url_color #f5e0dc + +# Kitty window border colors +active_border_color #b4befe +inactive_border_color #6c7086 +bell_border_color #f9e2af + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111b +active_tab_background #cba6f7 +inactive_tab_foreground #cdd6f4 +inactive_tab_background #181825 +tab_bar_background #11111b + +# Colors for marks (marked text in the terminal) +mark1_foreground #1e1e2e +mark1_background #b4befe +mark2_foreground #1e1e2e +mark2_background #cba6f7 +mark3_foreground #1e1e2e +mark3_background #74c7ec + +# The 16 terminal colors + +# black +color0 #45475a +color8 #585b70 + +# red +color1 #f38ba8 +color9 #f38ba8 + +# green +color2 #a6e3a1 +color10 #a6e3a1 + +# yellow +color3 #f9e2af +color11 #f9e2af + +# blue +color4 #89b4fa +color12 #89b4fa + +# magenta +color5 #f5c2e7 +color13 #f5c2e7 + +# cyan +color6 #94e2d5 +color14 #94e2d5 + +# white +color7 #bac2de +color15 #a6adc8 diff --git a/config/kitty/themes/deepwhite.conf b/config/kitty/themes/deepwhite.conf new file mode 100644 index 0000000..61e45fb --- /dev/null +++ b/config/kitty/themes/deepwhite.conf @@ -0,0 +1,98 @@ +# name: DeepWhite +## author: Verf +## license: MIT +## upstream: https://github.com/Verf/deepwhite.nvim/blob/main/extra/deepwhite_kitty.conf +## blurb: DeepWhite colorscheme + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #1A1918 +background #FAF2EB +selection_foreground #1A1918 +selection_background #CCCBC6 + + +#: Cursor colors + +cursor #1A1918 +cursor_text_color #FAF2EB + + +#: URL underline color when hovering with mouse + +url_color #00A600 + + +#: kitty window border colors and terminal bell colors + +active_border_color #1A1918 +inactive_border_color #595855 +bell_border_color #A60000 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +active_tab_background #1A1918 +active_tab_foreground #FAF2EB +inactive_tab_background #FAF2EB +inactive_tab_foreground #1A1918 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #1A1918 +color8 #1A1918 + +#: red +color1 #A60000 +color9 #A60000 + +#: green +color2 #00A600 +color10 #00A600 + +#: yellow +color3 #F2F200 +color11 #F2F200 + +#: blue +color4 #0000A6 +color12 #0000A6 + +#: magenta +color5 #6F00A6 +color13 #6F00A6 + +#: cyan +color6 #00A6A6 +color14 #00A6A6 + +#: white +color7 #FAF2EB +color15 #FAF2EB + diff --git a/config/kitty/themes/everforest/LICENSE b/config/kitty/themes/everforest/LICENSE new file mode 100644 index 0000000..04a4e12 --- /dev/null +++ b/config/kitty/themes/everforest/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Brian Greenwood + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/kitty/themes/everforest/README.md b/config/kitty/themes/everforest/README.md new file mode 100644 index 0000000..55d8a68 --- /dev/null +++ b/config/kitty/themes/everforest/README.md @@ -0,0 +1,29 @@ +# everforest-kitty + +[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) + +A port of [sainnhe's](https://github.com/sainnhe) [Everforest theme](https://github.com/sainnhe/everforest) for [kitty](https://sw.kovidgoyal.net/kitty/). + +![screenshot of theme applied to terminal](./screenshot.png) + +## Install + +Download `everforest.conf` and place it under `~/.config/kitty/` + +```conf +# ~/.config/kitty/kitty.conf + +include everforest.conf +``` + +## Related + +- [sainnhe/everforest](https://github.com/sainnhe/everforest) +- [sainnhe/everforest-vscode](https://github.com/sainnhe/everforest-vscode) +- [huytd/vscode-forest-all-nighter](https://github.com/huytd/vscode-forest-all-nighter) +- [jef/forest-night-iterm](https://github.com/jef/forest-night-iterm) +- [huytd/nvim-forest-all-nighter](https://github.com/huytd/nvim-forest-all-nighter) + +## License + +[MIT](./LICENSE) © Brian Greenwood diff --git a/config/kitty/themes/everforest/everforest.conf b/config/kitty/themes/everforest/everforest.conf new file mode 100644 index 0000000..3a61fcf --- /dev/null +++ b/config/kitty/themes/everforest/everforest.conf @@ -0,0 +1,48 @@ +# A port of forest night by sainnhe +# https://github.com/sainnhe/forest-night + +background #323d43 +foreground #d8caac + +cursor #d8caac + +selection_foreground #d8caac +selection_background #505a60 + +color0 #3c474d +color8 #868d80 + +# red +color1 #e68183 +# light red +color9 #e68183 + +# green +color2 #a7c080 +# light green +color10 #a7c080 + +# yellow +color3 #d9bb80 +# light yellow +color11 #d9bb80 + +# blue +color4 #83b6af +# light blue +color12 #83b6af + +# magenta +color5 #d39bb6 +# light magenta +color13 #d39bb6 + +# cyan +color6 #87c095 +# light cyan +color14 #87c095 + +# light gray +color7 #868d80 +# dark gray +color15 #868d80 diff --git a/config/kitty/themes/everforest/screenshot.png b/config/kitty/themes/everforest/screenshot.png new file mode 100644 index 0000000..5b5dc00 Binary files /dev/null and b/config/kitty/themes/everforest/screenshot.png differ diff --git a/config/kitty/themes/field_lights.conf b/config/kitty/themes/field_lights.conf new file mode 100644 index 0000000..2fb3003 --- /dev/null +++ b/config/kitty/themes/field_lights.conf @@ -0,0 +1,36 @@ +# Field Lights for Kitty +foreground #D9D7CE +background #1A1F28 +selection_foreground none +selection_background #343F4C +url_color #FFAE57 +cursor #FFCC66 +cursor_text_color background + +# Normal colors +color0 #343D4A +color1 #F07178 +color2 #BAE67E +color3 #FFCC66 +color4 #36A3D9 +color5 #D4BFFF +color6 #95E6CB +color7 #C7C7C7 + +# Bright colors +color8 #686868 +color9 #F07178 +color10 #CBE645 +color11 #FFDF80 +color12 #6871FF +color13 #FF77FF +color14 #A6FDE1 +color15 #FFFFFF + +# Tab bar colors +active_tab_foreground #FFCC66 +active_tab_background #212733 +inactive_tab_foreground #738699 +inactive_tab_background #1A1F28 +tab_bar_background #1A1F28 + diff --git a/config/kitty/themes/gruvbox/.gitignore b/config/kitty/themes/gruvbox/.gitignore new file mode 100644 index 0000000..3c62cef --- /dev/null +++ b/config/kitty/themes/gruvbox/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!README* +!LICENSE* +!*.conf diff --git a/config/kitty/themes/gruvbox/LICENSE b/config/kitty/themes/gruvbox/LICENSE new file mode 100644 index 0000000..0ad25db --- /dev/null +++ b/config/kitty/themes/gruvbox/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/config/kitty/themes/gruvbox/README.md b/config/kitty/themes/gruvbox/README.md new file mode 100644 index 0000000..2ccdf9e --- /dev/null +++ b/config/kitty/themes/gruvbox/README.md @@ -0,0 +1,10 @@ +This is gruvbox theme for the [kitty](https://sw.kovidgoyal.net/kitty/) terminal emulator. +It is based on [gruvbox](https://github.com/morhetz/gruvbox) theme for vim by morhetz . + +## Installation + +Put the line +``` +include +``` +at the end of your kitty config file (most likely `~/.config/kitty/kitty.conf`). If you don't have a config file, create file `~/.config/kitty/kitty.conf` with that single line. diff --git a/config/kitty/themes/gruvbox/gruvbox_dark.conf b/config/kitty/themes/gruvbox/gruvbox_dark.conf new file mode 100644 index 0000000..9d938d2 --- /dev/null +++ b/config/kitty/themes/gruvbox/gruvbox_dark.conf @@ -0,0 +1,55 @@ +# Based on https://github.com/morhetz/gruvbox by morhetz +# Adapted to kitty by wdomitrz + +cursor #928374 +cursor_text_color background + +url_color #83a598 + +visual_bell_color #8ec07c +bell_border_color #8ec07c + +active_border_color #d3869b +inactive_border_color #665c54 + +foreground #ebdbb2 +background #282828 +selection_foreground #928374 +selection_background #ebdbb2 + +active_tab_foreground #fbf1c7 +active_tab_background #665c54 +inactive_tab_foreground #a89984 +inactive_tab_background #3c3836 + +# black (bg3/bg4) +color0 #665c54 +color8 #7c6f64 + +# red +color1 #cc241d +color9 #fb4934 + +#: green +color2 #98971a +color10 #b8bb26 + +# yellow +color3 #d79921 +color11 #fabd2f + +# blue +color4 #458588 +color12 #83a598 + +# purple +color5 #b16286 +color13 #d3869b + +# aqua +color6 #689d6a +color14 #8ec07c + +# white (fg4/fg3) +color7 #a89984 +color15 #bdae93 diff --git a/config/kitty/themes/gruvbox/gruvbox_dark_hard.conf b/config/kitty/themes/gruvbox/gruvbox_dark_hard.conf new file mode 100644 index 0000000..21c0ddc --- /dev/null +++ b/config/kitty/themes/gruvbox/gruvbox_dark_hard.conf @@ -0,0 +1,3 @@ +include gruvbox_dark.conf + +background #1d2021 diff --git a/config/kitty/themes/gruvbox/gruvbox_dark_soft.conf b/config/kitty/themes/gruvbox/gruvbox_dark_soft.conf new file mode 100644 index 0000000..f439cf1 --- /dev/null +++ b/config/kitty/themes/gruvbox/gruvbox_dark_soft.conf @@ -0,0 +1,3 @@ +include gruvbox_dark.conf + +background #32302f diff --git a/config/kitty/themes/gruvbox/gruvbox_light.conf b/config/kitty/themes/gruvbox/gruvbox_light.conf new file mode 100644 index 0000000..e90ca74 --- /dev/null +++ b/config/kitty/themes/gruvbox/gruvbox_light.conf @@ -0,0 +1,55 @@ +# Based on https://github.com/morhetz/gruvbox by morhetz +# Adapted to kitty by wdomitrz + +cursor #928374 +cursor_text_color background + +url_color #458588 + +visual_bell_color #689d6a +bell_border_color #689d6a + +active_border_color #b16286 +inactive_border_color #1d2021 + +foreground #3c3836 +background #fbf1c7 +selection_foreground #928374 +selection_background #3c3836 + +active_tab_foreground #282828 +active_tab_background #928374 +inactive_tab_foreground #7c6f64 +inactive_tab_background #ebdbb2 + +# white (bg3/bg4) +color0 #bdae93 +color8 #a89984 + +# red +color1 #cc241d +color9 #9d0006 + +# green +color2 #98971a +color10 #79740e + +# yellow +color3 #d79921 +color11 #b57614 + +# blue +color4 #458588 +color12 #076678 + +# purple +color5 #b16286 +color13 #8f3f71 + +# aqua +color6 #689d6a +color14 #427b58 + +# black (fg4/fg3) +color7 #7c6f64 +color15 #665c54 diff --git a/config/kitty/themes/gruvbox/gruvbox_light_hard.conf b/config/kitty/themes/gruvbox/gruvbox_light_hard.conf new file mode 100644 index 0000000..f42e0c3 --- /dev/null +++ b/config/kitty/themes/gruvbox/gruvbox_light_hard.conf @@ -0,0 +1,3 @@ +include gruvbox_light.conf + +background #f9f5d7 diff --git a/config/kitty/themes/gruvbox/gruvbox_light_soft.conf b/config/kitty/themes/gruvbox/gruvbox_light_soft.conf new file mode 100644 index 0000000..7f8f525 --- /dev/null +++ b/config/kitty/themes/gruvbox/gruvbox_light_soft.conf @@ -0,0 +1,3 @@ +include gruvbox_light.conf + +background #f2e5bc diff --git a/config/kitty/themes/kitty-themes/.all-contributorsrc b/config/kitty/themes/kitty-themes/.all-contributorsrc new file mode 100644 index 0000000..c990c95 --- /dev/null +++ b/config/kitty/themes/kitty-themes/.all-contributorsrc @@ -0,0 +1,111 @@ +{ + "files": [ + "README.md" + ], + "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-green.svg?style=for-the-badge)](#contributors)", + "contributorTemplate": "\"><%= contributor.name %>
<%= contributions %>", + "imageSize": 100, + "commit": false, + "contributors": [ + { + "login": "scopatz", + "name": "Anthony Scopatz", + "avatar_url": "https://avatars2.githubusercontent.com/u/320553?v=4", + "profile": "http://www.scopatz.com", + "contributions": [ + "doc" + ] + }, + { + "login": "orangecoloured", + "name": "RCKT", + "avatar_url": "https://avatars3.githubusercontent.com/u/3314891?v=4", + "profile": "https://rckt.cc", + "contributions": [ + "theme" + ] + }, + { + "login": "varmanishant", + "name": "varmanishant", + "avatar_url": "https://avatars1.githubusercontent.com/u/4084912?v=4", + "profile": "https://github.com/varmanishant", + "contributions": [ + "theme" + ] + }, + { + "login": "rlerdorf", + "name": "Rasmus Lerdorf", + "avatar_url": "https://avatars3.githubusercontent.com/u/54641?v=4", + "profile": "https://github.com/rlerdorf", + "contributions": [ + "bug", + "ideas" + ] + }, + { + "login": "Luflosi", + "name": "Luflosi", + "avatar_url": "https://avatars1.githubusercontent.com/u/15217907?v=4", + "profile": "https://github.com/Luflosi", + "contributions": [ + "fix", + "question", + "doc" + ] + }, + { + "login": "connorholyday", + "name": "Connor Holyday", + "avatar_url": "https://avatars1.githubusercontent.com/u/4559119?v=4", + "profile": "https://holyday.me", + "contributions": [ + "fix" + ] + }, + { + "login": "BlueDrink9", + "name": "BlueDrink9", + "avatar_url": "https://avatars3.githubusercontent.com/u/26474254?v=4", + "profile": "https://github.com/BlueDrink9", + "contributions": [ + "bug" + ] + }, + { + "login": "brujoand", + "name": "Anders Brujordet", + "avatar_url": "https://avatars1.githubusercontent.com/u/124421?v=4", + "profile": "https://github.com/brujoand", + "contributions": [ + "theme" + ] + }, + { + "login": "rjshrjndrn", + "name": "Rajesh Rajendran", + "avatar_url": "https://avatars3.githubusercontent.com/u/2563385?v=4", + "profile": "http://www.hackouts.com", + "contributions": [ + "fix" + ] + } + ], + "types": { + "theme": { + "symbol": "😻", + "description": "New theme added to the collection" + }, + "fix": { + "symbol": "🛠️", + "description": "Fixed a theme" + } + }, + "contributorsPerLine": 7, + "projectName": "kitty-themes", + "projectOwner": "dexpota", + "repoType": "github", + "repoHost": "https://github.com", + "commitConvention": "none" +} diff --git a/config/kitty/themes/kitty-themes/.github/ISSUE_TEMPLATE/theme-request.md b/config/kitty/themes/kitty-themes/.github/ISSUE_TEMPLATE/theme-request.md new file mode 100644 index 0000000..30023b4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/.github/ISSUE_TEMPLATE/theme-request.md @@ -0,0 +1,9 @@ +--- +name: Request a new theme +about: Use the following template if you want a new theme to be included in the collection. +title: Add to the collection. +labels: theme request, enhancement + +--- + +Please, include **theme** in the collection. You can find it here: **url** diff --git a/config/kitty/themes/kitty-themes/.github/PULL_REQUEST_TEMPLATE/theme-request.md b/config/kitty/themes/kitty-themes/.github/PULL_REQUEST_TEMPLATE/theme-request.md new file mode 100644 index 0000000..c0387cc --- /dev/null +++ b/config/kitty/themes/kitty-themes/.github/PULL_REQUEST_TEMPLATE/theme-request.md @@ -0,0 +1,12 @@ +--- +name: Add a new theme +about: Use the following template if you want a new theme to be included in the collection. +title: Add to the collection. +labels: theme request +assignees: kovidgoyal + +--- + +Please, include **theme** in the collection. + +Below is a screenshot of the theme in kitty. diff --git a/config/kitty/themes/kitty-themes/.github/kitty-themes.jpg b/config/kitty/themes/kitty-themes/.github/kitty-themes.jpg new file mode 100644 index 0000000..b521b66 Binary files /dev/null and b/config/kitty/themes/kitty-themes/.github/kitty-themes.jpg differ diff --git a/config/kitty/themes/kitty-themes/LICENSE b/config/kitty/themes/kitty-themes/LICENSE new file mode 100644 index 0000000..e600086 --- /dev/null +++ b/config/kitty/themes/kitty-themes/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/config/kitty/themes/kitty-themes/README.rst b/config/kitty/themes/kitty-themes/README.rst new file mode 100644 index 0000000..1a63fc5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/README.rst @@ -0,0 +1,39 @@ +Themes for the kitty terminal +=============================== + +This is a collection of themes for the `kitty terminal emulator +`_. + +.. image:: screenshot.png + +The themes were initially imported from `dexpota/kitty-themes +`_. + +Using the themes +-------------------- + +The easiest way to use these themes is to run the `kitty +themes kitten `_:: + + kitty +kitten themes + +Contributing new themes +-------------------------- + +To contribute a new theme, use `template.conf `_ as +a base and modify it for your theme. Submit a `pull request +`_ +with your new theme. + + +Problems with themes +----------------------- + +If there are any issues with a theme please report them upstream to the theme +creator, as this repository is simply a centralised place to host all themes. + + +License +------------- +The overall license of this repository is the GPLv3, however, individual theme +files can have their own licenses, as specified in the theme file itself. diff --git a/config/kitty/themes/kitty-themes/gen-metadata.py b/config/kitty/themes/kitty-themes/gen-metadata.py new file mode 100755 index 0000000..2e54ba4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/gen-metadata.py @@ -0,0 +1,41 @@ +#! kitty +launch +# vim:fileencoding=utf-8 +# License: GPLv3 Copyright: 2021, Kovid Goyal + +import glob +import json +import subprocess +import sys +from operator import itemgetter + + +def parse_themes(paths): + cp = subprocess.run(['kitten', '__parse_theme_metadata__'], + input='\n'.join(paths).encode('utf-8'), capture_output=True) + if cp.returncode != 0: + print(cp.stderr.decode('utf-8'), file=sys.stderr) + raise SystemExit(cp.returncode) + return json.loads(cp.stdout) + + +def main(): + themes = [] + seen = {} + files = glob.glob('themes/*.conf') + parsed = parse_themes(files) + for theme, td in zip(files, parsed): + td['file'] = theme + if td['name'] in seen: + raise SystemExit( + f'The theme {td["name"]!r} is defined multiple times') + seen[td['name']] = theme + td = {k: v for k, v in td.items() if v} + themes.append(td) + + themes.sort(key=itemgetter('name')) + with open('themes.json', 'w') as f: + json.dump(themes, f, indent=4, sort_keys=True) + + +if __name__ == '__main__': + main() diff --git a/config/kitty/themes/kitty-themes/screenshot.png b/config/kitty/themes/kitty-themes/screenshot.png new file mode 100644 index 0000000..4ad4db6 Binary files /dev/null and b/config/kitty/themes/kitty-themes/screenshot.png differ diff --git a/config/kitty/themes/kitty-themes/template.conf b/config/kitty/themes/kitty-themes/template.conf new file mode 100644 index 0000000..4c736e7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/template.conf @@ -0,0 +1,106 @@ +# vim:ft=kitty +#: This is a template that can be used to create new kitty themes. +#: Theme files should start with a metadata block consisting of +#: lines beginning with ##. All metadata fields are optional. + +## name: The name of the theme (if not present, derived from filename) +## author: The name of the theme author +## license: The license information +## upstream: A URL pointing to the location of this file upstream for auto-updates +## blurb: A description of this theme. This must be the +## last item in the metadata and can continue over multiple lines. + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +# foreground #dddddd +# background #000000 +# selection_foreground #000000 +# selection_background #fffacd + + +#: Cursor colors + +# cursor #cccccc +# cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + +# url_color #0087bd + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +# active_tab_foreground #000 +# active_tab_background #eee +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +# color0 #000000 +# color8 #767676 + +#: red +# color1 #cc0403 +# color9 #f2201f + +#: green +# color2 #19cb00 +# color10 #23fd00 + +#: yellow +# color3 #cecb00 +# color11 #fffd00 + +#: blue +# color4 #0d73cc +# color12 #1a8fff + +#: magenta +# color5 #cb1ed1 +# color13 #fd28ff + +#: cyan +# color6 #0dcdcd +# color14 #14ffff + +#: white +# color7 #dddddd +# color15 #ffffff + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes.json b/config/kitty/themes/kitty-themes/themes.json new file mode 100644 index 0000000..4e5cfca --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes.json @@ -0,0 +1,2249 @@ +[ + { + "file": "themes/1984_dark.conf", + "is_dark": true, + "name": "1984 Dark", + "num_settings": 23 + }, + { + "file": "themes/1984_light.conf", + "name": "1984 Light", + "num_settings": 23 + }, + { + "file": "themes/1984_orwellian.conf", + "is_dark": true, + "name": "1984 Orwellian", + "num_settings": 23 + }, + { + "file": "themes/3024_Day.conf", + "name": "3024 Day", + "num_settings": 21 + }, + { + "file": "themes/3024_Night.conf", + "is_dark": true, + "name": "3024 Night", + "num_settings": 21 + }, + { + "blurb": "A description of this theme. This is the default theme for manjaro community eddition of i3.", + "file": "themes/Adapta_Nokto_Maia.conf", + "is_dark": true, + "name": "Adapta Nokto Maia", + "num_settings": 39 + }, + { + "file": "themes/AdventureTime.conf", + "is_dark": true, + "name": "Adventure Time", + "num_settings": 21 + }, + { + "author": "Emil L\u00f6fquist (https://github.com/ewal)", + "blurb": "Adwaita dark - based on https://github.com/Mofiqul/adwaita.nvim", + "file": "themes/adwaita_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Adwaita dark", + "num_settings": 35, + "upstream": "https://github.com/ewal/kitty-adwaita/blob/main/adwaita_dark.conf" + }, + { + "author": "Emil L\u00f6fquist (https://github.com/ewal)", + "blurb": "Adwaita darker - based on https://github.com/Mofiqul/adwaita.nvim", + "file": "themes/adwaita_darker.conf", + "is_dark": true, + "license": "MIT", + "name": "Adwaita darker", + "num_settings": 35, + "upstream": "https://github.com/ewal/kitty-adwaita/blob/main/adwaita_darker.conf" + }, + { + "author": "Emil L\u00f6fquist (https://github.com/ewal)", + "blurb": "Adwaita light - based on https://github.com/Mofiqul/adwaita.nvim", + "file": "themes/adwaita_light.conf", + "license": "MIT", + "name": "Adwaita light", + "num_settings": 35, + "upstream": "https://github.com/ewal/kitty-adwaita/blob/main/adwaita_light.conf" + }, + { + "file": "themes/Afterglow.conf", + "is_dark": true, + "name": "Afterglow", + "num_settings": 21 + }, + { + "author": "Nikita Prokopov", + "blurb": "A light color scheme adapted from Alabaster for the kitty terminal.", + "file": "themes/Alabaster.conf", + "license": "MIT", + "name": "Alabaster", + "num_settings": 30, + "upstream": "https://raw.githubusercontent.com/anmolmathias/kitty-alabaster/master/alabaster.conf" + }, + { + "author": "Nikita Prokopov", + "blurb": "A dark color scheme adapted from Alabaster for the kitty terminal.", + "file": "themes/Alabaster_Dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Alabaster Dark", + "num_settings": 30, + "upstream": "https://raw.githubusercontent.com/anmolmathias/kitty-alabaster/master/alabaster-dark.conf" + }, + { + "file": "themes/AlienBlood.conf", + "is_dark": true, + "name": "Alien Blood", + "num_settings": 21 + }, + { + "file": "themes/Alucard.conf", + "is_dark": true, + "name": "Alucard", + "num_settings": 21 + }, + { + "file": "themes/Apprentice.conf", + "is_dark": true, + "name": "Apprentice", + "num_settings": 22 + }, + { + "author": "Detective Pikachu", + "blurb": "A simple vibrant dark theme Kitty terminal.", + "file": "themes/Aquarium_Dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Aquarium Dark", + "num_settings": 22, + "upstream": "https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_dark.conf" + }, + { + "author": "ragdoll2iguess", + "blurb": "A simple vibrant dark theme Kitty terminal. Old BG -> #E6E6F1 #E1E3F2", + "file": "themes/Aquarium_Light.conf", + "license": "MIT", + "name": "Aquarium Light", + "num_settings": 21, + "upstream": "https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_light.conf" + }, + { + "file": "themes/Argonaut.conf", + "is_dark": true, + "name": "Argonaut", + "num_settings": 21 + }, + { + "file": "themes/Arthur.conf", + "is_dark": true, + "name": "Arthur", + "num_settings": 21 + }, + { + "file": "themes/AtelierSulphurpool.conf", + "is_dark": true, + "name": "Atelier Sulphurpool", + "num_settings": 21 + }, + { + "file": "themes/Atom.conf", + "is_dark": true, + "name": "Atom", + "num_settings": 21 + }, + { + "file": "themes/AtomOneLight.conf", + "name": "Atom One Light", + "num_settings": 21 + }, + { + "file": "themes/ayu.conf", + "is_dark": true, + "name": "Ayu", + "num_settings": 21 + }, + { + "file": "themes/ayu_light.conf", + "name": "Ayu Light", + "num_settings": 21 + }, + { + "file": "themes/ayu_mirage.conf", + "is_dark": true, + "name": "Ayu Mirage", + "num_settings": 21 + }, + { + "file": "themes/Batman.conf", + "is_dark": true, + "name": "Batman", + "num_settings": 21 + }, + { + "file": "themes/Belafonte_Day.conf", + "name": "Belafonte Day", + "num_settings": 21 + }, + { + "file": "themes/Belafonte_Night.conf", + "is_dark": true, + "name": "Belafonte Night", + "num_settings": 21 + }, + { + "file": "themes/BirdsOfParadise.conf", + "is_dark": true, + "name": "Birds Of Paradise", + "num_settings": 21 + }, + { + "file": "themes/BlackMetal.conf", + "is_dark": true, + "name": "Black Metal", + "num_settings": 25 + }, + { + "file": "themes/Blazer.conf", + "is_dark": true, + "name": "Blazer", + "num_settings": 21 + }, + { + "author": "Umut Topuzo\u011flu", + "blurb": "A fancy and sophisticated dark designer color theme", + "file": "themes/BlulocoDark.conf", + "is_dark": true, + "license": "LGPL-3.0", + "name": "Bluloco Dark", + "num_settings": 31, + "upstream": "https://github.com/uloco/bluloco.nvim/blob/main/terminal-themes/kitty/BlulocoDark.conf" + }, + { + "author": "Umut Topuzo\u011flu", + "blurb": "A fancy and sophisticated light designer color theme", + "file": "themes/BlulocoLight.conf", + "license": "LGPL-3.0", + "name": "Bluloco Light", + "num_settings": 31, + "upstream": "https://github.com/uloco/bluloco.nvim/blob/main/terminal-themes/kitty/BlulocoLight.conf" + }, + { + "file": "themes/Borland.conf", + "name": "Borland", + "num_settings": 21 + }, + { + "author": "D3vil0p3r", + "blurb": "Hack The Box inspired colorscheme.", + "file": "themes/Box.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Box", + "num_settings": 41 + }, + { + "author": "b3yc0d3 ", + "blurb": "Breath2 Theme for Kitty Terminal", + "file": "themes/breath2.conf", + "is_dark": true, + "license": "MIT", + "name": "Breath2", + "num_settings": 24, + "upstream": "https://raw.githubusercontent.com/b3yc0d3/my-kitty-themes/main/themes/breath2.conf" + }, + { + "file": "themes/Bright_Lights.conf", + "is_dark": true, + "name": "Bright Lights", + "num_settings": 21 + }, + { + "file": "themes/Broadcast.conf", + "is_dark": true, + "name": "Broadcast", + "num_settings": 21 + }, + { + "file": "themes/Brogrammer.conf", + "is_dark": true, + "name": "Brogrammer", + "num_settings": 21 + }, + { + "file": "themes/C64.conf", + "name": "C64", + "num_settings": 21 + }, + { + "file": "themes/CLRS.conf", + "name": "CLRS", + "num_settings": 21 + }, + { + "author": "Microsoft", + "blurb": "The default theme of Microsoft's terminals, including Windows Terminal and cmd.", + "file": "themes/Campbell.conf", + "is_dark": true, + "name": "Campbell", + "num_settings": 20 + }, + { + "author": "Pocco81 (https://github.com/Pocco81)", + "blurb": "Soothing pastel theme for the high-spirited!", + "file": "themes/Catppuccin-Frappe.conf", + "is_dark": true, + "license": "MIT", + "name": "Catppuccin-Frappe", + "num_settings": 39, + "upstream": "https://github.com/catppuccin/kitty/blob/main/frappe.conf" + }, + { + "author": "Pocco81 (https://github.com/Pocco81)", + "blurb": "Soothing pastel theme for the high-spirited!", + "file": "themes/Catppuccin-Latte.conf", + "license": "MIT", + "name": "Catppuccin-Latte", + "num_settings": 39, + "upstream": "https://github.com/catppuccin/kitty/blob/main/latte.conf" + }, + { + "author": "Pocco81 (https://github.com/Pocco81)", + "blurb": "Soothing pastel theme for the high-spirited!", + "file": "themes/Catppuccin-Macchiato.conf", + "is_dark": true, + "license": "MIT", + "name": "Catppuccin-Macchiato", + "num_settings": 39, + "upstream": "https://github.com/catppuccin/kitty/blob/main/macchiato.conf" + }, + { + "author": "Pocco81 (https://github.com/Pocco81)", + "blurb": "Soothing pastel theme for the high-spirited!", + "file": "themes/Catppuccin-Mocha.conf", + "is_dark": true, + "license": "MIT", + "name": "Catppuccin-Mocha", + "num_settings": 39, + "upstream": "https://github.com/catppuccin/kitty/blob/main/mocha.conf" + }, + { + "file": "themes/Chalk.conf", + "is_dark": true, + "name": "Chalk", + "num_settings": 21 + }, + { + "file": "themes/Chalkboard.conf", + "is_dark": true, + "name": "Chalkboard", + "num_settings": 21 + }, + { + "file": "themes/ChallengerDeep.conf", + "is_dark": true, + "name": "Challenger Deep", + "num_settings": 25 + }, + { + "author": "nullxception", + "file": "themes/cherry.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Cherry", + "num_settings": 28, + "upstream": "https://github.com/nullxception/cherry-kde/raw/main/kitty/cherry.conf" + }, + { + "author": "nullxception", + "file": "themes/cherry-midnight.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Cherry Midnight", + "num_settings": 28, + "upstream": "https://github.com/nullxception/cherry-kde/raw/main/kitty/cherry-midnight.conf" + }, + { + "file": "themes/Ciapre.conf", + "is_dark": true, + "name": "Ciapre", + "num_settings": 21 + }, + { + "file": "themes/Cobalt_Neon.conf", + "is_dark": true, + "name": "Cobalt Neon", + "num_settings": 21 + }, + { + "author": "Lalit Kumar(@laltimee)", + "blurb": "Don't stress your eyes now", + "file": "themes/Cobalt2.conf", + "is_dark": true, + "license": "MIT", + "name": "Cobalt2", + "num_settings": 39, + "upstream": "https://github.com/lalitmee/kitty-cobalt2/blob/master/cobalt2.conf" + }, + { + "author": "Aaron Hall", + "blurb": "ANSI term colors picked with OKHSL maximizing difference in color subject to constant perceptual luminosity so that all colors are readable on dark screens even against transparency yet gentle on the eyes in dark environments. for colors (starting with red at 30 degrees) luminosity is .4, .6 (bright) .5 for white(gray), .7 bright white (light gray) 0 for black and .3 for bright black For transparency I find these work ok: background_opacity 0.7 dynamic_background_opacity yes", + "file": "themes/Constant_Perceptual_Luminosity_dark.conf", + "is_dark": true, + "license": "MIT, I prefer credit (and money) to none, but I won't sue", + "name": "Constant Perceptual Luminosity (dark)", + "num_settings": 26, + "upstream": "none (yet)" + }, + { + "file": "themes/Corvine.conf", + "is_dark": true, + "name": "Corvine", + "num_settings": 18 + }, + { + "file": "themes/CrayonPonyFish.conf", + "is_dark": true, + "name": "Crayon Pony Fish", + "num_settings": 21 + }, + { + "blurb": "A cyberpunk theme based on the Cyberpunk VIM Colorscheme by thedenisnikulin.", + "file": "themes/cyberpunk.conf", + "is_dark": true, + "license": "MIT", + "name": "Cyberpunk", + "num_settings": 33, + "upstream": "https://raw.githubusercontent.com/jandre953/kitty-cyberpunk/master/cyberpunk.conf" + }, + { + "author": "Theo (theo-grivel)", + "file": "themes/Cyberpunk-Neon.conf", + "is_dark": true, + "license": "CC-BY-SA-4.0", + "name": "Cyberpunk Neon", + "num_settings": 21, + "upstream": "https://github.com/Roboron3042/Cyberpunk-Neon/blob/master/terminal/kitty/cyberpunk-neon.conf" + }, + { + "file": "themes/DarkOneNuanced.conf", + "is_dark": true, + "name": "Dark One Nuanced", + "num_settings": 26 + }, + { + "file": "themes/Dark_Pastel.conf", + "is_dark": true, + "name": "Dark Pastel", + "num_settings": 21 + }, + { + "author": "apathyrecharge", + "blurb": "Dark trans-pride colour inspired theme", + "file": "themes/dark_pride.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Dark Pride", + "num_settings": 21 + }, + { + "file": "themes/Darkside.conf", + "is_dark": true, + "name": "Darkside", + "num_settings": 21 + }, + { + "author": "Kovid Goyal", + "blurb": "This theme uses all default settings from kitty. Use it to easily restore defaults.", + "file": "themes/default.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Default" + }, + { + "file": "themes/Desert.conf", + "is_dark": true, + "name": "Desert", + "num_settings": 21 + }, + { + "file": "themes/DesertNight.conf", + "is_dark": true, + "name": "Desert Night", + "num_settings": 19 + }, + { + "file": "themes/DimmedMonokai.conf", + "is_dark": true, + "name": "Dimmed Monokai", + "num_settings": 21 + }, + { + "author": "Henrik Lissner ", + "blurb": "Inspired by Atom's One Dark color scheme.", + "file": "themes/Doom_One.conf", + "is_dark": true, + "license": "MIT", + "name": "Doom One", + "num_settings": 28 + }, + { + "author": "Henrik Lissner ", + "blurb": "Doom Emacs flagship theme based on atom One Light", + "file": "themes/Doom_One_Light.conf", + "license": "MIT", + "name": "Doom One Light", + "num_settings": 28 + }, + { + "author": "Henrik Lissner ", + "blurb": "A version of Doom One Emacs theme that uses more vibrant colors.", + "file": "themes/Doom_Vibrant.conf", + "is_dark": true, + "license": "MIT", + "name": "Doom Vibrant", + "num_settings": 28 + }, + { + "file": "themes/DotGov.conf", + "is_dark": true, + "name": "Dot Gov", + "num_settings": 21 + }, + { + "author": "Keegan Carruthers-Smith", + "file": "themes/Dracula.conf", + "is_dark": true, + "license": "MIT", + "name": "Dracula", + "num_settings": 29, + "upstream": "https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf" + }, + { + "file": "themes/Dumbledore.conf", + "is_dark": true, + "name": "Dumbledore", + "num_settings": 21 + }, + { + "file": "themes/Duotone_Dark.conf", + "is_dark": true, + "name": "Duotone Dark", + "num_settings": 21 + }, + { + "file": "themes/ENCOM.conf", + "is_dark": true, + "name": "ENCOM", + "num_settings": 21 + }, + { + "file": "themes/Earthsong.conf", + "is_dark": true, + "name": "Earthsong", + "num_settings": 21 + }, + { + "author": "jacobrreed", + "blurb": "A theme for the Ancient Ones!", + "file": "themes/Eldritch.conf", + "is_dark": true, + "license": "MIT", + "name": "Eldritch", + "num_settings": 31, + "upstream": "https://github.com/eldritch-theme/kitty" + }, + { + "file": "themes/Elemental.conf", + "is_dark": true, + "name": "Elemental", + "num_settings": 21 + }, + { + "file": "themes/Espresso.conf", + "is_dark": true, + "name": "Espresso", + "num_settings": 25 + }, + { + "file": "themes/Espresso_Libre.conf", + "is_dark": true, + "name": "Espresso Libre", + "num_settings": 21 + }, + { + "author": "Sainnhe Park", + "blurb": "A green based color scheme designed to be warm and soft", + "file": "themes/everforest_dark_hard.conf", + "is_dark": true, + "license": "MIT", + "name": "Everforest Dark Hard", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_hard.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A green based color scheme designed to be warm and soft", + "file": "themes/everforest_dark_medium.conf", + "is_dark": true, + "license": "MIT", + "name": "Everforest Dark Medium", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_medium.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A green based color scheme designed to be warm and soft", + "file": "themes/everforest_dark_soft.conf", + "is_dark": true, + "license": "MIT", + "name": "Everforest Dark Soft", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_soft.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A green based color scheme designed to be warm and soft", + "file": "themes/everforest_light_hard.conf", + "license": "MIT", + "name": "Everforest Light Hard", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_hard.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A green based color scheme designed to be warm and soft", + "file": "themes/everforest_light_medium.conf", + "license": "MIT", + "name": "Everforest Light Medium", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_medium.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A green based color scheme designed to be warm and soft", + "file": "themes/everforest_light_soft.conf", + "license": "MIT", + "name": "Everforest Light Soft", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_soft.conf" + }, + { + "file": "themes/Falcon.conf", + "is_dark": true, + "name": "Falcon", + "num_settings": 21 + }, + { + "file": "themes/Farin.conf", + "is_dark": true, + "name": "Farin", + "num_settings": 21 + }, + { + "file": "themes/Fideloper.conf", + "is_dark": true, + "name": "Fideloper", + "num_settings": 21 + }, + { + "file": "themes/FishTank.conf", + "is_dark": true, + "name": "Fish Tank", + "num_settings": 21 + }, + { + "file": "themes/Flat.conf", + "is_dark": true, + "name": "Flat", + "num_settings": 21 + }, + { + "file": "themes/Flatland.conf", + "is_dark": true, + "name": "Flatland", + "num_settings": 21 + }, + { + "author": "Kepano", + "blurb": "An inky color scheme for prose and code", + "file": "themes/flexoki_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Flexoki (Dark)", + "num_settings": 28, + "upstream": "https://raw.githubusercontent.com/kepano/flexoki/main/kitty/flexoki_dark.conf" + }, + { + "author": "Kepano", + "blurb": "An inky color scheme for prose and code", + "file": "themes/flexoki_light.conf", + "license": "MIT", + "name": "Flexoki (Light)", + "num_settings": 28, + "upstream": "https://raw.githubusercontent.com/kepano/flexoki/main/kitty/flexoki_light.conf" + }, + { + "file": "themes/Floraverse.conf", + "is_dark": true, + "name": "Floraverse", + "num_settings": 21 + }, + { + "file": "themes/ForestNight.conf", + "is_dark": true, + "name": "Forest Night", + "num_settings": 18 + }, + { + "file": "themes/FrontEndDelight.conf", + "is_dark": true, + "name": "Front End Delight", + "num_settings": 21 + }, + { + "file": "themes/FunForrest.conf", + "is_dark": true, + "name": "Fun Forrest", + "num_settings": 21 + }, + { + "file": "themes/Galaxy.conf", + "is_dark": true, + "name": "Galaxy", + "num_settings": 21 + }, + { + "author": "GitHub", + "file": "themes/GitHub_Dark.conf", + "is_dark": true, + "license": "MIT", + "name": "GitHub Dark", + "num_settings": 26 + }, + { + "author": "GitHub", + "file": "themes/GitHub_Dark_Colorblind.conf", + "is_dark": true, + "license": "MIT", + "name": "GitHub Dark Colorblind", + "num_settings": 26 + }, + { + "author": "GitHub", + "file": "themes/GitHub_Dark_Dimmed.conf", + "is_dark": true, + "license": "MIT", + "name": "GitHub Dark Dimmed", + "num_settings": 26 + }, + { + "author": "GitHub", + "file": "themes/GitHub_Dark_High_Contrast.conf", + "is_dark": true, + "license": "MIT", + "name": "GitHub Dark High Contrast", + "num_settings": 26 + }, + { + "author": "GitHub", + "file": "themes/GitHub_Light.conf", + "license": "MIT", + "name": "GitHub Light", + "num_settings": 26 + }, + { + "author": "GitHub", + "file": "themes/GitHub_Light_Colorblind.conf", + "license": "MIT", + "name": "GitHub Light Colorblind", + "num_settings": 26 + }, + { + "author": "GitHub", + "file": "themes/GitHub_Light_High_Contrast.conf", + "license": "MIT", + "name": "GitHub Light High Contrast", + "num_settings": 26 + }, + { + "file": "themes/Github.conf", + "name": "Github", + "num_settings": 21 + }, + { + "file": "themes/Glacier.conf", + "is_dark": true, + "name": "Glacier", + "num_settings": 21 + }, + { + "author": "Ittner (https://www.ittner.com.br)", + "blurb": "A theme based on the colors of the classic Gnome Terminal", + "file": "themes/Gnome-ish_gray-on-black.conf", + "is_dark": true, + "license": "GPLv3+", + "name": "Gnome-ish gray-on-black", + "num_settings": 41 + }, + { + "file": "themes/GoaBase.conf", + "is_dark": true, + "name": "Goa Base", + "num_settings": 21 + }, + { + "file": "themes/Grape.conf", + "is_dark": true, + "name": "Grape", + "num_settings": 21 + }, + { + "file": "themes/Grass.conf", + "name": "Grass", + "num_settings": 21 + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-dark.conf", + "is_dark": true, + "license": "MIT/X11", + "name": "Gruvbox Dark", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-dark-hard.conf", + "is_dark": true, + "license": "MIT/X11", + "name": "Gruvbox Dark Hard", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-hard.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-dark-soft.conf", + "is_dark": true, + "license": "MIT/X11", + "name": "Gruvbox Dark Soft", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-soft.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-light.conf", + "license": "MIT/X11", + "name": "Gruvbox Light", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-light-hard.conf", + "license": "MIT/X11", + "name": "Gruvbox Light Hard", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-hard.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-light-soft.conf", + "license": "MIT/X11", + "name": "Gruvbox Light Soft", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-soft.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A modified version of Gruvbox with softer contrasts", + "file": "themes/GruvboxMaterialDarkHard.conf", + "is_dark": true, + "license": "MIT", + "name": "Gruvbox Material Dark Hard", + "num_settings": 22, + "upstream": "https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-hard.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A modified version of Gruvbox with softer contrasts", + "file": "themes/GruvboxMaterialDarkMedium.conf", + "is_dark": true, + "license": "MIT", + "name": "Gruvbox Material Dark Medium", + "num_settings": 22, + "upstream": "https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-medium.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A modified version of Gruvbox with softer contrasts", + "file": "themes/GruvboxMaterialDarkSoft.conf", + "is_dark": true, + "license": "MIT", + "name": "Gruvbox Material Dark Soft", + "num_settings": 22, + "upstream": "https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-soft.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A modified version of Gruvbox with softer contrasts", + "file": "themes/GruvboxMaterialLightHard.conf", + "license": "MIT", + "name": "Gruvbox Material Light Hard", + "num_settings": 22, + "upstream": "https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-light-hard.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A modified version of Gruvbox with softer contrasts", + "file": "themes/GruvboxMaterialLightMedium.conf", + "license": "MIT", + "name": "Gruvbox Material Light Medium", + "num_settings": 22, + "upstream": "https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-light-medium.conf" + }, + { + "author": "Sainnhe Park", + "blurb": "A modified version of Gruvbox with softer contrasts", + "file": "themes/GruvboxMaterialLightSoft.conf", + "license": "MIT", + "name": "Gruvbox Material Light Soft", + "num_settings": 22, + "upstream": "https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-light-soft.conf" + }, + { + "author": "Jacob Chapman", + "file": "themes/h_pux.conf", + "license": "CC0 Public Domain", + "name": "H-PUX", + "num_settings": 21, + "upstream": "https://github.com/chapmanjacobd/computer/blob/main/.config/kitty/theme.conf" + }, + { + "author": "Mert18", + "file": "themes/HachikoRed.conf", + "is_dark": true, + "name": "Hachiko", + "num_settings": 33 + }, + { + "file": "themes/Hardcore.conf", + "is_dark": true, + "name": "Hardcore", + "num_settings": 21 + }, + { + "file": "themes/Harper.conf", + "is_dark": true, + "name": "Harper", + "num_settings": 21 + }, + { + "file": "themes/Highway.conf", + "is_dark": true, + "name": "Highway", + "num_settings": 21 + }, + { + "file": "themes/Hipster_Green.conf", + "is_dark": true, + "name": "Hipster Green", + "num_settings": 21 + }, + { + "file": "themes/Homebrew.conf", + "is_dark": true, + "name": "Homebrew", + "num_settings": 21 + }, + { + "file": "themes/Hurtado.conf", + "is_dark": true, + "name": "Hurtado", + "num_settings": 21 + }, + { + "file": "themes/Hybrid.conf", + "is_dark": true, + "name": "Hybrid", + "num_settings": 21 + }, + { + "file": "themes/IC_Green_PPL.conf", + "is_dark": true, + "name": "IC Green PPL", + "num_settings": 21 + }, + { + "file": "themes/IC_Orange_PPL.conf", + "is_dark": true, + "name": "IC Orange PPL", + "num_settings": 21 + }, + { + "file": "themes/IR_Black.conf", + "is_dark": true, + "name": "IR Black", + "num_settings": 21 + }, + { + "file": "themes/idleToes.conf", + "is_dark": true, + "name": "Idle Toes", + "num_settings": 21 + }, + { + "file": "themes/Jackie_Brown.conf", + "is_dark": true, + "name": "Jackie Brown", + "num_settings": 21 + }, + { + "file": "themes/Japanesque.conf", + "is_dark": true, + "name": "Japanesque", + "num_settings": 21 + }, + { + "file": "themes/Jellybeans.conf", + "is_dark": true, + "name": "Jellybeans", + "num_settings": 21 + }, + { + "file": "themes/JetBrains_Darcula.conf", + "is_dark": true, + "name": "Jet Brains Darcula", + "num_settings": 21 + }, + { + "author": "Tommaso Laurenzi", + "blurb": "NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.", + "file": "themes/kanagawa.conf", + "is_dark": true, + "license": "MIT", + "name": "Kanagawa", + "num_settings": 28, + "upstream": "https://github.com/rebelot/kanagawa.nvim/" + }, + { + "author": "Tommaso Laurenzi", + "blurb": "NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai. Dragon version.", + "file": "themes/kanagawa_dragon.conf", + "is_dark": true, + "license": "MIT", + "name": "Kanagawa_dragon", + "num_settings": 28, + "upstream": "https://github.com/rebelot/kanagawa.nvim/" + }, + { + "author": "Tommaso Laurenzi", + "blurb": "NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai. Light version.", + "file": "themes/kanagawa_light.conf", + "license": "MIT", + "name": "Kanagawa_light", + "num_settings": 29, + "upstream": "https://github.com/rebelot/kanagawa.nvim/" + }, + { + "author": "Ogden Webb", + "blurb": "Kaolin meets polar lights.", + "file": "themes/Kaolin_Aurora.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Aurora", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Light Kaolin theme with soft colors", + "file": "themes/Kaolin_Breeze.conf", + "license": "GNU GPLv3", + "name": "Kaolin Breeze", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Dark jade theme inspired by Sierra.vim.", + "file": "themes/Kaolin_Dark.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Dark", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Theme based on one of the Sebastian Andaur arts", + "file": "themes/Kaolin_Galaxy.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Galaxy", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Light variant of the original Kaolin Dark theme.", + "file": "themes/Kaolin_Light.conf", + "license": "GNU GPLv3", + "name": "Kaolin Light", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Dark blue Kaolin theme", + "file": "themes/Kaolin_Ocean.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Ocean", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Dark theme where terrestrial sphere imbues the spirit", + "file": "themes/Kaolin_Temple.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Temple", + "num_settings": 28 + }, + { + "file": "themes/Kibble.conf", + "is_dark": true, + "name": "Kibble", + "num_settings": 21 + }, + { + "author": "Kevin M (github.com/kevinm6)", + "file": "themes/kurayami.conf", + "is_dark": true, + "license": "MIT", + "name": "Kurayami", + "num_settings": 36, + "upstream": "https://github.com/kevinm6/kitty-themes/blob/master/themes/kurayami.conf" + }, + { + "file": "themes/Later_This_Evening.conf", + "is_dark": true, + "name": "Later This Evening", + "num_settings": 21 + }, + { + "file": "themes/Lavandula.conf", + "is_dark": true, + "name": "Lavandula", + "num_settings": 21 + }, + { + "author": "qewer33, brought to kitty by KodiakWeb", + "blurb": "a green accent, forest colored dark theme, adapted from leaf kde", + "file": "themes/leaf_dark.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Leaf Dark", + "num_settings": 23 + }, + { + "author": "qewer33, brought to kitty by KodiakWeb", + "blurb": "A green accent, forest colored light theme, adapted from leaf kde", + "file": "themes/leaf_light.conf", + "license": "GPLv3", + "name": "Leaf Light", + "num_settings": 22 + }, + { + "file": "themes/LiquidCarbon.conf", + "is_dark": true, + "name": "Liquid Carbon", + "num_settings": 21 + }, + { + "file": "themes/LiquidCarbonTransparent.conf", + "is_dark": true, + "name": "Liquid Carbon Transparent", + "num_settings": 21 + }, + { + "file": "themes/LiquidCarbonTransparentInverse.conf", + "is_dark": true, + "name": "Liquid Carbon Transparent Inverse", + "num_settings": 21 + }, + { + "file": "themes/Man_Page.conf", + "name": "Man Page", + "num_settings": 21 + }, + { + "file": "themes/Material.conf", + "name": "Material", + "num_settings": 21 + }, + { + "file": "themes/MaterialDark.conf", + "is_dark": true, + "name": "Material Dark", + "num_settings": 21 + }, + { + "file": "themes/Mathias.conf", + "is_dark": true, + "name": "Mathias", + "num_settings": 21 + }, + { + "author": "Gulajava Ministudio", + "blurb": "Mayukai Theme is dark and yellow bluish mirage theme with bright colors for easy readibility syntax. This theme is inspired from mixed color swatch in Ayu Theme, Material Theme, Monokai, Andromeda, and Gruvbox Darktooth Original Colors. ", + "file": "themes/mayukai.conf", + "is_dark": true, + "license": "MIT", + "name": "Mayukai", + "num_settings": 18, + "upstream": "https://github.com/elianiva/mayukai-terminal-themes/blob/master/kitty.conf" + }, + { + "file": "themes/Medallion.conf", + "is_dark": true, + "name": "Medallion", + "num_settings": 21 + }, + { + "author": "abrielleing", + "file": "themes/midsummer-night.conf", + "is_dark": true, + "name": "Midsummer Night", + "num_settings": 27 + }, + { + "author": "Anupam Srivastava", + "blurb": "A mixtures of different themes that work well with powerlevel10k", + "file": "themes/mishran.conf", + "is_dark": true, + "license": "GPL-3", + "name": "Mishran", + "num_settings": 20, + "upstream": "https://github.com/kovidgoyal/kitty-themes" + }, + { + "file": "themes/Misterioso.conf", + "is_dark": true, + "name": "Misterioso", + "num_settings": 21 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA)", + "file": "themes/Modus_Operandi.conf", + "license": "GNU GPLv3", + "name": "Modus Operandi", + "num_settings": 28 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA)", + "file": "themes/Modus_Operandi_Tinted.conf", + "license": "GNU GPLv3", + "name": "Modus Operandi Tinted", + "num_settings": 28 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA)", + "file": "themes/Modus_Vivendi.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Modus Vivendi", + "num_settings": 28 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA)", + "file": "themes/Modus_Vivendi_Tinted.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Modus Vivendi Tinted", + "num_settings": 28 + }, + { + "file": "themes/Molokai.conf", + "is_dark": true, + "name": "Molokai", + "num_settings": 21 + }, + { + "file": "themes/MonaLisa.conf", + "is_dark": true, + "name": "Mona Lisa", + "num_settings": 21 + }, + { + "blurb": "A port of the Monoindustrial theme from TextMate", + "file": "themes/Monoindustrial.conf", + "is_dark": true, + "license": "MIT", + "name": "Monoindustrial", + "num_settings": 29 + }, + { + "file": "themes/Monokai.conf", + "is_dark": true, + "name": "Monokai", + "num_settings": 28 + }, + { + "file": "themes/Monokai_Classic.conf", + "is_dark": true, + "name": "Monokai Classic", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro.conf", + "is_dark": true, + "name": "Monokai Pro", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Machine).conf", + "is_dark": true, + "name": "Monokai Pro (Filter Machine)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Octagon).conf", + "is_dark": true, + "name": "Monokai Pro (Filter Octagon)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Ristretto).conf", + "is_dark": true, + "name": "Monokai Pro (Filter Ristretto)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Spectrum).conf", + "is_dark": true, + "name": "Monokai Pro (Filter Spectrum)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Soda.conf", + "is_dark": true, + "name": "Monokai Soda", + "num_settings": 21 + }, + { + "file": "themes/N0tch2k.conf", + "is_dark": true, + "name": "N0tch2k", + "num_settings": 21 + }, + { + "file": "themes/Neopolitan.conf", + "is_dark": true, + "name": "Neopolitan", + "num_settings": 21 + }, + { + "author": "Everett Howard (neveretth)", + "blurb": "A very vibrant and very neon colorscheme.", + "file": "themes/Neowave.conf", + "is_dark": true, + "license": "MIT license - https://www.mit.edu/~amini/LICENSE.md", + "name": "Neowave", + "num_settings": 39 + }, + { + "file": "themes/Neutron.conf", + "is_dark": true, + "name": "Neutron", + "num_settings": 21 + }, + { + "file": "themes/NightLion_v1.conf", + "is_dark": true, + "name": "Night Lion V1", + "num_settings": 21 + }, + { + "file": "themes/NightLion_v2.conf", + "is_dark": true, + "name": "Night Lion V2", + "num_settings": 21 + }, + { + "author": "Luke Glazebrook ", + "file": "themes/night_owl.conf", + "is_dark": true, + "license": "MIT", + "name": "Night Owl", + "num_settings": 22, + "upstream": "https://github.com/Glazy/night-owl-kitty-theme/blob/main/night-owl.conf" + }, + { + "file": "themes/nightfly.conf", + "is_dark": true, + "license": "MIT", + "name": "Nightfly", + "num_settings": 21, + "upstream": "https://github.com/bluz71/vim-nightfly-guicolors/blob/master/terminal_themes/kitty-theme.conf" + }, + { + "author": "EdenEast", + "file": "themes/Nightfox.conf", + "is_dark": true, + "license": "MIT", + "name": "Nightfox", + "num_settings": 31, + "upstream": "https://github.com/EdenEast/nightfox.nvim/blob/main/extra/nightfox/nightfox_kitty.conf" + }, + { + "author": "Eric N. Vander Weele", + "blurb": "Nord theme utilizing the full Frost and Aurora palette.", + "file": "themes/Nord.conf", + "is_dark": true, + "name": "Nord", + "num_settings": 39, + "upstream": "https://www.nordtheme.com/" + }, + { + "file": "themes/Nova.conf", + "is_dark": true, + "name": "Nova", + "num_settings": 21 + }, + { + "file": "themes/Novel.conf", + "name": "Novel", + "num_settings": 21 + }, + { + "file": "themes/Obsidian.conf", + "is_dark": true, + "name": "Obsidian", + "num_settings": 21 + }, + { + "file": "themes/Ocean.conf", + "name": "Ocean", + "num_settings": 21 + }, + { + "file": "themes/OceanicMaterial.conf", + "is_dark": true, + "name": "Oceanic Material", + "num_settings": 21 + }, + { + "file": "themes/Ollie.conf", + "is_dark": true, + "name": "Ollie", + "num_settings": 21 + }, + { + "file": "themes/OneDark.conf", + "is_dark": true, + "name": "One Dark", + "num_settings": 22 + }, + { + "author": "Son A. Pham", + "blurb": "Clean, vibrant and pleasing color scheme", + "file": "themes/OneHalfDark.conf", + "is_dark": true, + "license": "MIT", + "name": "One Half Dark", + "num_settings": 21, + "upstream": "https://raw.githubusercontent.com/sonph/onehalf/master/kitty/onehalf-dark.conf" + }, + { + "author": "Son A. Pham", + "blurb": "Clean, vibrant and pleasing color scheme", + "file": "themes/OneHalfLight.conf", + "license": "MIT", + "name": "One Half Light", + "num_settings": 21, + "upstream": "https://raw.githubusercontent.com/sonph/onehalf/master/kitty/onehalf-light.conf" + }, + { + "author": "VictorPL (https://github.com/VictorPLopes)", + "blurb": "Kitty theme inspired by Binaryify's One Dark Pro theme for Visual Studio Code.", + "file": "themes/OneDark-Pro.conf", + "is_dark": true, + "license": "MIT", + "name": "OneDark-Pro", + "num_settings": 27, + "upstream": "https://github.com/VictorPLopes/OneDark-Pro-Kitty-Terminal/blob/main/kitty-themes/OneDark-Pro.conf" + }, + { + "author": "Nikyle Nguyen", + "blurb": "Dark color scheme inspired by Google's Material Design", + "file": "themes/PaperColor_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "PaperColor Dark", + "num_settings": 20 + }, + { + "author": "Nikyle Nguyen", + "blurb": "Light color scheme inspired by Google's Material Design", + "file": "themes/PaperColor_light.conf", + "license": "MIT", + "name": "PaperColor Light", + "num_settings": 20 + }, + { + "file": "themes/Parasio_Dark.conf", + "is_dark": true, + "name": "Parasio Dark", + "num_settings": 21 + }, + { + "file": "themes/PaulMillr.conf", + "is_dark": true, + "name": "Paul Millr", + "num_settings": 21 + }, + { + "file": "themes/PencilDark.conf", + "is_dark": true, + "name": "Pencil Dark", + "num_settings": 21 + }, + { + "file": "themes/PencilLight.conf", + "name": "Pencil Light", + "num_settings": 21 + }, + { + "file": "themes/Piatto_Light.conf", + "name": "Piatto Light", + "num_settings": 21 + }, + { + "file": "themes/Pnevma.conf", + "is_dark": true, + "name": "Pnevma", + "num_settings": 21 + }, + { + "file": "themes/Pro.conf", + "is_dark": true, + "name": "Pro", + "num_settings": 21 + }, + { + "file": "themes/Red_Alert.conf", + "name": "Red Alert", + "num_settings": 21 + }, + { + "file": "themes/Red_Sands.conf", + "name": "Red Sands", + "num_settings": 21 + }, + { + "file": "themes/Relaxed_Afterglow.conf", + "is_dark": true, + "name": "Relaxed Afterglow", + "num_settings": 21 + }, + { + "file": "themes/Renault_Style.conf", + "is_dark": true, + "name": "Renault Style", + "num_settings": 21 + }, + { + "file": "themes/Renault_Style_Light.conf", + "is_dark": true, + "name": "Renault Style Light", + "num_settings": 21 + }, + { + "file": "themes/Rippedcasts.conf", + "is_dark": true, + "name": "Rippedcasts", + "num_settings": 21 + }, + { + "author": "mvllow", + "blurb": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist", + "file": "themes/rose-pine.conf", + "is_dark": true, + "license": "MIT", + "name": "Ros\u00e9 Pine", + "num_settings": 27, + "upstream": "https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf" + }, + { + "author": "mvllow", + "blurb": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist", + "file": "themes/rose-pine-dawn.conf", + "license": "MIT", + "name": "Ros\u00e9 Pine Dawn", + "num_settings": 27, + "upstream": "https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-dawn.conf" + }, + { + "author": "mvllow", + "blurb": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist", + "file": "themes/rose-pine-moon.conf", + "is_dark": true, + "license": "MIT", + "name": "Ros\u00e9 Pine Moon", + "num_settings": 27, + "upstream": "https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf" + }, + { + "file": "themes/Royal.conf", + "is_dark": true, + "name": "Royal", + "num_settings": 21 + }, + { + "author": "PandaCatPlayz", + "blurb": "A custom kitty dark theme loosely using the Endesga 32 palette", + "file": "themes/Sakura_Night.conf", + "is_dark": true, + "license": "MIT", + "name": "Sakura Night", + "num_settings": 21, + "upstream": "https://pandacatplayz.github.io/kitty-themes/Sakura_Night.conf" + }, + { + "file": "themes/SeaShells.conf", + "is_dark": true, + "name": "Sea Shells", + "num_settings": 21 + }, + { + "file": "themes/Seafoam_Pastel.conf", + "is_dark": true, + "name": "Seafoam Pastel", + "num_settings": 21 + }, + { + "author": "Jan Warchol", + "blurb": "Selenized black color scheme for Kitty", + "file": "themes/selenized-black.conf", + "is_dark": true, + "license": "MIT", + "name": "Selenized Black", + "num_settings": 28, + "upstream": "https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-black.conf" + }, + { + "author": "Jan Warchol", + "blurb": "Selenized dark color scheme for Kitty", + "file": "themes/selenized-dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Selenized Dark", + "num_settings": 28, + "upstream": "https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-dark.conf" + }, + { + "author": "Jan Warchol", + "blurb": "Selenized light color scheme for Kitty", + "file": "themes/selenized-light.conf", + "license": "MIT", + "name": "Selenized Light", + "num_settings": 28, + "upstream": "https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-light.conf" + }, + { + "author": "Jan Warchol", + "blurb": "Selenized white color scheme for Kitty", + "file": "themes/selenized-white.conf", + "license": "MIT", + "name": "Selenized White", + "num_settings": 28, + "upstream": "https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-white.conf" + }, + { + "file": "themes/Seti.conf", + "is_dark": true, + "name": "Seti", + "num_settings": 21 + }, + { + "file": "themes/Shaman.conf", + "is_dark": true, + "name": "Shaman", + "num_settings": 21 + }, + { + "file": "themes/Sierra.conf", + "is_dark": true, + "name": "Sierra", + "num_settings": 21 + }, + { + "file": "themes/Slate.conf", + "is_dark": true, + "name": "Slate", + "num_settings": 21 + }, + { + "file": "themes/Smyck.conf", + "is_dark": true, + "name": "Smyck", + "num_settings": 21 + }, + { + "file": "themes/snazzy.conf", + "is_dark": true, + "name": "Snazzy", + "num_settings": 23 + }, + { + "file": "themes/SnowDark.conf", + "is_dark": true, + "name": "Snow Dark", + "num_settings": 22 + }, + { + "file": "themes/SnowLight.conf", + "name": "Snow Light", + "num_settings": 22 + }, + { + "file": "themes/SoftServer.conf", + "is_dark": true, + "name": "Soft Server", + "num_settings": 21 + }, + { + "file": "themes/Solarized_Darcula.conf", + "is_dark": true, + "name": "Solarized Darcula", + "num_settings": 21 + }, + { + "author": "Ethan Schoonover", + "blurb": "Precision colors for machines and people", + "file": "themes/Solarized_Dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Solarized Dark", + "num_settings": 21 + }, + { + "file": "themes/Solarized_Dark_-_Patched.conf", + "is_dark": true, + "name": "Solarized Dark - Patched", + "num_settings": 21 + }, + { + "file": "themes/Solarized_Dark_Higher_Contrast.conf", + "is_dark": true, + "name": "Solarized Dark Higher Contrast", + "num_settings": 21 + }, + { + "author": "Ethan Schoonover", + "blurb": "Precision colors for machines and people", + "file": "themes/Solarized_Light.conf", + "license": "MIT", + "name": "Solarized Light", + "num_settings": 28 + }, + { + "file": "themes/Solarized8_Dark.conf", + "is_dark": true, + "name": "Solarized8 Dark", + "num_settings": 21 + }, + { + "file": "themes/Source_Code_X.conf", + "is_dark": true, + "name": "Source Code X", + "num_settings": 21 + }, + { + "file": "themes/Sourcerer.conf", + "is_dark": true, + "name": "Sourcerer", + "num_settings": 21 + }, + { + "file": "themes/SpaceGray.conf", + "is_dark": true, + "name": "Space Gray", + "num_settings": 21 + }, + { + "file": "themes/SpaceGray_Eighties.conf", + "is_dark": true, + "name": "Space Gray Eighties", + "num_settings": 21 + }, + { + "file": "themes/SpaceGray_Eighties_Dull.conf", + "is_dark": true, + "name": "Space Gray Eighties Dull", + "num_settings": 21 + }, + { + "file": "themes/Spacedust.conf", + "is_dark": true, + "name": "Spacedust", + "num_settings": 21 + }, + { + "file": "themes/Spacemacs.conf", + "is_dark": true, + "name": "Spacemacs", + "num_settings": 20 + }, + { + "file": "themes/Spiderman.conf", + "is_dark": true, + "name": "Spiderman", + "num_settings": 21 + }, + { + "file": "themes/Spring.conf", + "name": "Spring", + "num_settings": 21 + }, + { + "file": "themes/Square.conf", + "is_dark": true, + "name": "Square", + "num_settings": 21 + }, + { + "file": "themes/Substrata.conf", + "is_dark": true, + "name": "Substrata", + "num_settings": 21 + }, + { + "file": "themes/Sundried.conf", + "is_dark": true, + "name": "Sundried", + "num_settings": 21 + }, + { + "file": "themes/Symfonic.conf", + "is_dark": true, + "name": "Symfonic", + "num_settings": 21 + }, + { + "file": "themes/Tango_Dark.conf", + "is_dark": true, + "name": "Tango Dark", + "num_settings": 21 + }, + { + "file": "themes/Tango_Light.conf", + "name": "Tango Light", + "num_settings": 21 + }, + { + "file": "themes/Teerb.conf", + "is_dark": true, + "name": "Teerb", + "num_settings": 21 + }, + { + "file": "themes/Thayer_Bright.conf", + "is_dark": true, + "name": "Thayer Bright", + "num_settings": 21 + }, + { + "file": "themes/The_Hulk.conf", + "is_dark": true, + "name": "The Hulk", + "num_settings": 21 + }, + { + "author": "Folke Lemaitre", + "file": "themes/tokyo_night_night.conf", + "is_dark": true, + "license": "MIT", + "name": "Tokyo Night", + "num_settings": 31, + "upstream": "https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf" + }, + { + "author": "Folke Lemaitre", + "file": "themes/tokyo_night_day.conf", + "license": "MIT", + "name": "Tokyo Night Day", + "num_settings": 31, + "upstream": "https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_day.conf" + }, + { + "author": "Folke Lemaitre", + "file": "themes/tokyo_night_moon.conf", + "is_dark": true, + "license": "MIT", + "name": "Tokyo Night Moon", + "num_settings": 31, + "upstream": "https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_moon.conf" + }, + { + "author": "Folke Lemaitre", + "file": "themes/tokyo_night_storm.conf", + "is_dark": true, + "license": "MIT", + "name": "Tokyo Night Storm", + "num_settings": 31, + "upstream": "https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_storm.conf" + }, + { + "file": "themes/Tomorrow.conf", + "name": "Tomorrow", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night.conf", + "is_dark": true, + "name": "Tomorrow Night", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night_Blue.conf", + "is_dark": true, + "name": "Tomorrow Night Blue", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night_Bright.conf", + "is_dark": true, + "name": "Tomorrow Night Bright", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night_Eighties.conf", + "is_dark": true, + "name": "Tomorrow Night Eighties", + "num_settings": 21 + }, + { + "file": "themes/ToyChest.conf", + "is_dark": true, + "name": "Toy Chest", + "num_settings": 21 + }, + { + "file": "themes/Treehouse.conf", + "is_dark": true, + "name": "Treehouse", + "num_settings": 21 + }, + { + "author": "Anoduck", + "file": "themes/outrun_electric.conf", + "is_dark": true, + "license": "MIT", + "name": "Tropical Neon", + "num_settings": 23 + }, + { + "file": "themes/Twilight.conf", + "is_dark": true, + "name": "Twilight", + "num_settings": 21 + }, + { + "file": "themes/Ubuntu.conf", + "is_dark": true, + "name": "Ubuntu", + "num_settings": 21 + }, + { + "file": "themes/Urple.conf", + "is_dark": true, + "name": "Urple", + "num_settings": 21 + }, + { + "author": "ported from Microsoft VSCode by huabeiyou", + "blurb": "the integrated terminal's default dark theme", + "file": "themes/VSCode_Dark.conf", + "is_dark": true, + "license": "MIT", + "name": "VSCode_Dark", + "num_settings": 28 + }, + { + "file": "themes/Vaughn.conf", + "is_dark": true, + "name": "Vaughn", + "num_settings": 21 + }, + { + "file": "themes/VibrantInk.conf", + "is_dark": true, + "name": "Vibrant Ink", + "num_settings": 21 + }, + { + "file": "themes/WarmNeon.conf", + "is_dark": true, + "name": "Warm Neon", + "num_settings": 21 + }, + { + "file": "themes/Wez.conf", + "is_dark": true, + "name": "Wez", + "num_settings": 21 + }, + { + "file": "themes/WildCherry.conf", + "is_dark": true, + "name": "Wild Cherry", + "num_settings": 21 + }, + { + "author": "erin", + "blurb": "A variant of Wryan for a certain special Lain", + "file": "themes/wizzy-bright.conf", + "is_dark": true, + "license": "MIT", + "name": "Wizzy Bright", + "num_settings": 26, + "upstream": "https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-bright.conf" + }, + { + "author": "erin", + "blurb": "A variant of Wryan for a certain special Lain", + "file": "themes/wizzy-muted.conf", + "is_dark": true, + "license": "MIT", + "name": "Wizzy Muted", + "num_settings": 26, + "upstream": "https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-muted.conf" + }, + { + "file": "themes/Wombat.conf", + "is_dark": true, + "name": "Wombat", + "num_settings": 21 + }, + { + "file": "themes/Wryan.conf", + "is_dark": true, + "name": "Wryan", + "num_settings": 21 + }, + { + "file": "themes/xcodedark.conf", + "is_dark": true, + "name": "Xcodedark", + "num_settings": 21 + }, + { + "author": "Ya-suke", + "blurb": "A dracula inspired colorscheme for kitty.", + "file": "themes/YsDark.conf", + "is_dark": true, + "license": "MIT", + "name": "YsDark", + "num_settings": 29 + }, + { + "file": "themes/Zenburn.conf", + "is_dark": true, + "name": "Zenburn", + "num_settings": 21 + }, + { + "author": "\u98df\u7121\u9b5a ", + "blurb": "Theme for Kitty inspired by https://citylights.xyz/", + "file": "themes/citylights.conf", + "is_dark": true, + "license": "MIT", + "name": "citylights", + "num_settings": 37, + "upstream": "https://raw.githubusercontent.com/liuyinz/dotfile/master/common/kitty/citylights.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Spaceduck.", + "file": "themes/duckbones.conf", + "is_dark": true, + "license": "MIT", + "name": "duckbones", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/duckbones.conf" + }, + { + "author": "Snuggle \u00b7 https://github.com/Snuggle", + "blurb": "A theme inspired by the popular fairyfloss colour theme", + "file": "themes/fairyfloss.conf", + "license": "MIT", + "name": "fairyfloss", + "num_settings": 22, + "upstream": "https://github.com/Snuggle/kitty-themes" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Kanagawa.", + "file": "themes/kanagawabones.conf", + "is_dark": true, + "license": "MIT", + "name": "kanagawabones", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/kanagawabones.conf" + }, + { + "author": "Ramon Saraiva", + "blurb": "A port of moonlight vscode extension for kitty terminal", + "file": "themes/moonlight.conf", + "is_dark": true, + "license": "MIT", + "name": "moonlight", + "num_settings": 29, + "upstream": "https://raw.githubusercontent.com/ramonsaraiva/kitty-moonlight/main/moonlight.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by neovim.io.", + "file": "themes/neobones_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "neobones_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by neovim.io.", + "file": "themes/neobones_light.conf", + "license": "MIT", + "name": "neobones_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_light.conf" + }, + { + "author": "Dimitar Dimitrov (https://github.com/n1ghtmare)", + "file": "themes/noirblaze.conf", + "is_dark": true, + "name": "noirblaze", + "num_settings": 36 + }, + { + "author": "Ehan Ahamed and contributors", + "blurb": "A purple-ish-dark theme for kitty & more", + "file": "themes/purpurite.conf", + "is_dark": true, + "license": "UPL-1.0", + "name": "purpurite", + "num_settings": 33, + "upstream": "https://raw.githubusercontent.com/purpurite/kitty/main/purpurite.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Seoul256.", + "file": "themes/seoulbones_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "seoulbones_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Seoul256.", + "file": "themes/seoulbones_light.conf", + "license": "MIT", + "name": "seoulbones_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_light.conf" + }, + { + "author": "Shadorain (kitty port by kelpwave)", + "blurb": "The ultimate purple and pink dark cherry blossom theme! license: The BSD 3-Clause License", + "file": "themes/shadotheme.conf", + "is_dark": true, + "name": "shadotheme", + "num_settings": 27 + }, + { + "author": "Guillermo Rodriguez", + "blurb": "An intergalactic space theme for Vim, Terminal & more!", + "file": "themes/spaceduck.conf", + "is_dark": true, + "license": "MIT", + "name": "spaceduck", + "num_settings": 21, + "upstream": "https://github.com/foofrog/kitty-themes/blob/master/themes/spaceduck.conf" + }, + { + "author": "Daniel Berg", + "blurb": "Srcery is a color scheme with clearly defined contrasting colors and a slightly earthy tone.", + "file": "themes/Srcery.conf", + "is_dark": true, + "license": "MIT", + "name": "srcery", + "num_settings": 22, + "upstream": "https://github.com/srcery-colors/srcery-terminal/blob/master/kitty/srcery_kitty.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by vim.org.", + "file": "themes/vimbones.conf", + "license": "MIT", + "name": "vimbones", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/vimbones.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A contrast-based colorscheme.", + "file": "themes/zenbones_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "zenbones_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A contrast-based colorscheme.", + "file": "themes/zenbones_light.conf", + "license": "MIT", + "name": "zenbones_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_light.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Zenburn.", + "file": "themes/zenburned.conf", + "is_dark": true, + "license": "MIT", + "name": "zenburned", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenburned.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant with zero hue and saturation.", + "file": "themes/zenwritten_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "zenwritten_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant with zero hue and saturation.", + "file": "themes/zenwritten_light.conf", + "license": "MIT", + "name": "zenwritten_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf" + } +] \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/1984_dark.conf b/config/kitty/themes/kitty-themes/themes/1984_dark.conf new file mode 100644 index 0000000..f0fca77 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/1984_dark.conf @@ -0,0 +1,29 @@ +# 1984 theme by Bertie Blackman, https://github.com/covertbert/iterm2-1984/ + +foreground #ffffff +background #0d0f31 +selection_foreground #000000 +selection_background #00d5eb +color0 #000000 +color1 #ff16b0 +color2 #b3f361 +color3 #ffea16 +color4 #46bdff +color5 #f806fa +color6 #59e1e3 +color7 #feffff +color8 #000000 +color9 #ff16b0 +color10 #b3f361 +color11 #ffea16 +color12 #46bdff +color13 #f806fa +color14 #6be4e6 +color15 #feffff + +# URL styles +url_color #f806fa +url_style single + +# Cursor styles +cursor #59e1e3 diff --git a/config/kitty/themes/kitty-themes/themes/1984_light.conf b/config/kitty/themes/kitty-themes/themes/1984_light.conf new file mode 100644 index 0000000..f85d075 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/1984_light.conf @@ -0,0 +1,29 @@ +# 1984 light theme by Bertie Blackman, https://github.com/covertbert/iterm2-1984/ + +foreground #19152c +background #e4e5f5 +selection_foreground #19152c +selection_background #ff16b0 +color0 #000000 +color1 #ff16b0 +color2 #00af4f +color3 #ff8d01 +color4 #0098fd +color5 #f806fa +color6 #00b2be +color7 #feffff +color8 #000000 +color9 #ff16b0 +color10 #00af4f +color11 #ff8d01 +color12 #0098fd +color13 #f806fa +color14 #00b2be +color15 #feffff + +# URL styles +url_color #ff16b0 +url_style single + +# Cursor styles +cursor #00b2be diff --git a/config/kitty/themes/kitty-themes/themes/1984_orwellian.conf b/config/kitty/themes/kitty-themes/themes/1984_orwellian.conf new file mode 100644 index 0000000..121fdc3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/1984_orwellian.conf @@ -0,0 +1,29 @@ +# 1984 orwellian theme by Bertie Blackman, https://github.com/covertbert/iterm2-1984/ + +foreground #f1f1f1 +background #2e2923 +selection_foreground #000000 +selection_background #3fc4ce +color0 #000000 +color1 #e74946 +color2 #4cb605 +color3 #fcd395 +color4 #356fe4 +color5 #fcbe95 +color6 #3fc4ce +color7 #f1f1f1 +color8 #000000 +color9 #e74946 +color10 #4cb605 +color11 #fcd395 +color12 #356fe4 +color13 #fcbe95 +color14 #3fc4ce +color15 #f1f1f1 + +# URL styles +url_color #e74946 +url_style single + +# Cursor styles +cursor #3fc4ce diff --git a/config/kitty/themes/kitty-themes/themes/3024_Day.conf b/config/kitty/themes/kitty-themes/themes/3024_Day.conf new file mode 100644 index 0000000..747996a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/3024_Day.conf @@ -0,0 +1,21 @@ +background #f7f7f7 +foreground #494542 +cursor #494542 +selection_background #a4a1a1 +color0 #090200 +color8 #5b5754 +color1 #da2c20 +color9 #e8bacf +color2 #00a152 +color10 #3a3332 +color3 #fcec02 +color11 #494542 +color4 #00a0e4 +color12 #7f7c7b +color5 #a06994 +color13 #d6d4d3 +color6 #b5e4f4 +color14 #ccab53 +color7 #a4a1a1 +color15 #f7f7f7 +selection_foreground #f7f7f7 diff --git a/config/kitty/themes/kitty-themes/themes/3024_Night.conf b/config/kitty/themes/kitty-themes/themes/3024_Night.conf new file mode 100644 index 0000000..2543819 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/3024_Night.conf @@ -0,0 +1,21 @@ +background #090200 +foreground #a4a1a1 +cursor #a4a1a1 +selection_background #494542 +color0 #090200 +color8 #5b5754 +color1 #da2c20 +color9 #e8bacf +color2 #00a152 +color10 #3a3332 +color3 #fcec02 +color11 #494542 +color4 #00a0e4 +color12 #7f7c7b +color5 #a06994 +color13 #d6d4d3 +color6 #b5e4f4 +color14 #ccab53 +color7 #a4a1a1 +color15 #f7f7f7 +selection_foreground #090200 diff --git a/config/kitty/themes/kitty-themes/themes/Adapta_Nokto_Maia.conf b/config/kitty/themes/kitty-themes/themes/Adapta_Nokto_Maia.conf new file mode 100644 index 0000000..5519631 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Adapta_Nokto_Maia.conf @@ -0,0 +1,85 @@ +## name: Adapta Nokto Maia +## blurb: A description of this theme. This is the default +## theme for manjaro community eddition of i3. + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #d8d8d8 +background #222D31 +selection_foreground #16A085 +selection_background #2B2C2B +url_color #0087bd + + +#: kitty window border colors and terminal bell colors + +active_border_color #00ff00 +inactive_border_color #cccccc +bell_border_color #ff5a00 +visual_bell_color none + + +#: OS Window titlebar colors + +wayland_titlebar_color system +macos_titlebar_color system + + +#: Tab bar colors + +active_tab_foreground #000 +active_tab_background #eee +inactive_tab_foreground #444 +inactive_tab_background #999 +tab_bar_background none +tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +mark1_foreground black +mark1_background #98d3cb +mark2_foreground black +mark2_background #f2dcd3 +mark3_foreground black +mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #222D31 +color8 #585858 + +#: red +color1 #ab4642 +color9 #ab4642 + +#: green +color2 #7E807E +color10 #8D8F8D + +#: yellow +color3 #f7ca88 +color11 #f7ca88 + +#: blue +color4 #7cafc2 +color12 #7cafc2 + +#: magenta +color5 #ba8baf +color13 #ba8baf + +#: cyan +color6 #1ABB9B +color14 #1ABB9B + +#: white +color7 #d8d8d8 +color15 #f8f8f8 diff --git a/config/kitty/themes/kitty-themes/themes/AdventureTime.conf b/config/kitty/themes/kitty-themes/themes/AdventureTime.conf new file mode 100644 index 0000000..e523a1a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/AdventureTime.conf @@ -0,0 +1,21 @@ +background #1e1c44 +foreground #f8dbc0 +cursor #eebf37 +selection_background #6f6a4e +color0 #050404 +color8 #4e7bbf +color1 #bc0013 +color9 #fc5e59 +color2 #49b117 +color10 #9dff6e +color3 #e6741d +color11 #efc11a +color4 #0f49c6 +color12 #1896c6 +color5 #665992 +color13 #9a5952 +color6 #6fa497 +color14 #c8f9f3 +color7 #f8dbc0 +color15 #f5f4fb +selection_foreground #1e1c44 diff --git a/config/kitty/themes/kitty-themes/themes/Afterglow.conf b/config/kitty/themes/kitty-themes/themes/Afterglow.conf new file mode 100644 index 0000000..3162be7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Afterglow.conf @@ -0,0 +1,21 @@ +background #202020 +foreground #d0d0d0 +cursor #d0d0d0 +selection_background #eecb8b +color0 #151515 +color8 #505050 +color1 #ac4142 +color9 #ac4142 +color2 #7e8d50 +color10 #7e8d50 +color3 #e5b566 +color11 #e5b566 +color4 #6c99ba +color12 #6c99ba +color5 #9e4e85 +color13 #9e4e85 +color6 #7dd5cf +color14 #7dd5cf +color7 #d0d0d0 +color15 #f5f5f5 +selection_foreground #232323 diff --git a/config/kitty/themes/kitty-themes/themes/Alabaster.conf b/config/kitty/themes/kitty-themes/themes/Alabaster.conf new file mode 100644 index 0000000..7989049 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Alabaster.conf @@ -0,0 +1,74 @@ +## name: Alabaster +## author: Nikita Prokopov +## license: MIT +## upstream: https://raw.githubusercontent.com/anmolmathias/kitty-alabaster/master/alabaster.conf +## blurb: A light color scheme adapted from Alabaster for the kitty terminal. + +#: The basic colors + +foreground #000000 +background #f7f7f7 + +selection_foreground #000000 +selection_background #bfdbfe + + +#: Cursor colors + +cursor #007acc +cursor_text_color #bfdbfe + + +#: URL underline color when hovering with mouse + +url_color #325cc0 + + +#: The basic 16 colors + +#: black +color0 #000000 +color8 #777777 + +#: red +color1 #aa3731 +color9 #f05050 + +#: green +color2 #448c37 +color10 #60cb00 + +#: yellow +color3 #cb9000 +color11 #ffbc5d + +#: blue +color4 #325cc0 +color12 #007acc + +#: magenta +color5 #7a3e9d +color13 #e64ce6 + +#: cyan +color6 #0083b2 +color14 #00aacb + +#: white +color7 #f7f7f7 +color15 #f7f7f7 + + +#: kitty window border colors and terminal bell colors + +active_border_color #777777 +inactive_border_color #cccccc +bell_border_color #e97e57 + + +#: Tab bar colors + +active_tab_foreground #000000 +active_tab_background #f7f7f7 +inactive_tab_foreground #444444 +inactive_tab_background #dedede \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/Alabaster_Dark.conf b/config/kitty/themes/kitty-themes/themes/Alabaster_Dark.conf new file mode 100644 index 0000000..786cf62 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Alabaster_Dark.conf @@ -0,0 +1,74 @@ +## name: Alabaster Dark +## author: Nikita Prokopov +## license: MIT +## upstream: https://raw.githubusercontent.com/anmolmathias/kitty-alabaster/master/alabaster-dark.conf +## blurb: A dark color scheme adapted from Alabaster for the kitty terminal. + +#: The basic colors + +foreground #cecece +background #0e1415 + +selection_foreground #cecece +selection_background #293334 + + +#: Cursor colors + +cursor #cd974b +cursor_text_color #000000 + + +#: URL underline color when hovering with mouse + +url_color #cd974b + + +#: The basic 16 colors + +#: black +color0 #000000 +color8 #777777 + +#: red +color1 #e25d56 +color9 #f36868 + +#: green +color2 #73ca50 +color10 #88db3f + +#: yellow +color3 #e9bf57 +color11 #f0bf7a + +#: blue +color4 #4a88e4 +color12 #6f8fdb + +#: magenta +color5 #915caf +color13 #e987e9 + +#: cyan +color6 #23acdd +color14 #4ac9e2 + +#: white +color7 #cecece +color15 #ffffff + + +#: kitty window border colors and terminal bell colors + +active_border_color #777777 +inactive_border_color #323738 +bell_border_color #e97e57 + + +#: Tab bar colors + +active_tab_foreground #cecece +active_tab_background #0e1415 +inactive_tab_foreground #b8b8b8 +inactive_tab_background #323738 \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/AlienBlood.conf b/config/kitty/themes/kitty-themes/themes/AlienBlood.conf new file mode 100644 index 0000000..453ea80 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/AlienBlood.conf @@ -0,0 +1,21 @@ +background #0f160f +foreground #637d75 +cursor #73f990 +selection_background #1d4025 +color0 #112615 +color8 #3c4711 +color1 #7f2b26 +color9 #df8008 +color2 #2f7e25 +color10 #18e000 +color3 #707f23 +color11 #bde000 +color4 #2f697f +color12 #00a9df +color5 #47577e +color13 #0058df +color6 #317f76 +color14 #00dfc3 +color7 #647d75 +color15 #73f990 +selection_foreground #0f160f diff --git a/config/kitty/themes/kitty-themes/themes/Alucard.conf b/config/kitty/themes/kitty-themes/themes/Alucard.conf new file mode 100644 index 0000000..43665fe --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Alucard.conf @@ -0,0 +1,21 @@ +background #222330 +foreground #cef3ff +cursor #ffffff +selection_background #44475a +color0 #000000 +color8 #545454 +color1 #ff5555 +color9 #ff5454 +color2 #fa0074 +color10 #50fa7b +color3 #7f0a1f +color11 #f0fa8b +color4 #3282ff +color12 #1200f8 +color5 #1b3cff +color13 #ff78c5 +color6 #0037fc +color14 #8ae9fc +color7 #bbbbbb +color15 #ffffff +selection_foreground #222330 diff --git a/config/kitty/themes/kitty-themes/themes/Apprentice.conf b/config/kitty/themes/kitty-themes/themes/Apprentice.conf new file mode 100644 index 0000000..c8c0583 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Apprentice.conf @@ -0,0 +1,26 @@ +# Apprentice by Romain Lafourcade, https://github.com/romainl +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +cursor #c7c7c7 +cursor_text_color #feffff +selection_foreground #3e3e3e +selection_background #c1ddff +foreground #c8c8c8 +background #323232 +color0 #252525 +color8 #555555 +color1 #be7472 +color9 #ff9900 +color2 #709772 +color10 #97bb98 +color3 #989772 +color11 #fefdbc +color4 #7199bc +color12 #9fbdde +color5 #727399 +color13 #989abc +color6 #719899 +color14 #6fbbbc +color7 #7f7f7f +color15 #feffff diff --git a/config/kitty/themes/kitty-themes/themes/Aquarium_Dark.conf b/config/kitty/themes/kitty-themes/themes/Aquarium_Dark.conf new file mode 100644 index 0000000..b9d3616 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Aquarium_Dark.conf @@ -0,0 +1,48 @@ +# vim:ft=kitty + +## name: Aquarium Dark +## license: MIT +## author: Detective Pikachu +## upstream: https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_dark.conf +## blurb: A simple vibrant dark theme Kitty terminal. + +foreground #C6D0E9 +background #20202A +selection_foreground #2E3440 +selection_background #A8B6D0 +url_color #cddbf9 + +# black +color0 #3b3b4d +color8 #1b1b23 + +# red +color1 #ebb9b9 +color9 #d95e59 + +# green +color2 #caf6bb +color10 #8fc587 + +# yellow +color3 #E6DFB8 +color11 #ffcf85 + +# blue +color4 #cddbf9 +color12 #4a83c3 + +# magenta +color5 #f6bbe7 +color13 #bf83b5 + +# cyan +color6 #b8dceb +color14 #4eb3cd + +# white +color7 #c8cedc +color15 #abb2c2 + +# Cursor +cursor #b8dceb diff --git a/config/kitty/themes/kitty-themes/themes/Aquarium_Light.conf b/config/kitty/themes/kitty-themes/themes/Aquarium_Light.conf new file mode 100644 index 0000000..66c5efd --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Aquarium_Light.conf @@ -0,0 +1,46 @@ +# vim:ft=kitty + +## name: Aquarium Light +## license: MIT +## author: ragdoll2iguess +## upstream: https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_light.conf +## blurb: A simple vibrant dark theme Kitty terminal. +## Old BG -> #E6E6F1 #E1E3F2 + +foreground #708190 +background #E6E6F1 +selection_foreground #9CA6B9 +selection_background #3D4059 +url_color #7170C2 + +# white +color0 #D5D4E0 +color8 #CCCBD9 + +# red +color1 #C34864 +color9 #B7435E + +# green +color2 #7D9685 +color10 #7E8F80 + +# yellow +color3 #DE956F +color11 #D88B72 + +# blue +color4 #6A8CBC +color12 #6E7EBF + +# magenta +color5 #8787BF +color13 #7170C2 + +# cyan +color6 #829FB0 +color14 #728A9A + +# black +color7 #313449 +color15 #414560 diff --git a/config/kitty/themes/kitty-themes/themes/Argonaut.conf b/config/kitty/themes/kitty-themes/themes/Argonaut.conf new file mode 100644 index 0000000..058186e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Argonaut.conf @@ -0,0 +1,21 @@ +background #0d0f18 +foreground #fffaf3 +cursor #ff0017 +selection_background #002a3a +color0 #222222 +color8 #444444 +color1 #ff000f +color9 #ff273f +color2 #8ce00a +color10 #abe05a +color3 #ffb900 +color11 #ffd141 +color4 #008df8 +color12 #0092ff +color5 #6c43a5 +color13 #9a5feb +color6 #00d7eb +color14 #67ffef +color7 #ffffff +color15 #ffffff +selection_foreground #0d0f18 diff --git a/config/kitty/themes/kitty-themes/themes/Arthur.conf b/config/kitty/themes/kitty-themes/themes/Arthur.conf new file mode 100644 index 0000000..d3fb520 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Arthur.conf @@ -0,0 +1,21 @@ +background #1c1c1c +foreground #ddeedd +cursor #e2bbef +selection_background #4d4d4d +color0 #3d352a +color8 #554444 +color1 #cd5c5c +color9 #cc5533 +color2 #86af80 +color10 #88aa22 +color3 #e8ae5b +color11 #ffa75d +color4 #6495ed +color12 #87ceeb +color5 #deb887 +color13 #996600 +color6 #b0c4de +color14 #b0c4de +color7 #bbaa99 +color15 #ddccbb +selection_foreground #1c1c1c diff --git a/config/kitty/themes/kitty-themes/themes/AtelierSulphurpool.conf b/config/kitty/themes/kitty-themes/themes/AtelierSulphurpool.conf new file mode 100644 index 0000000..05674b0 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/AtelierSulphurpool.conf @@ -0,0 +1,21 @@ +background #202745 +foreground #969cb3 +cursor #969cb3 +selection_background #5e6686 +color0 #202745 +color8 #6a7394 +color1 #c84821 +color9 #c76a28 +color2 #ab9639 +color10 #283256 +color3 #c08a2f +color11 #5e6686 +color4 #3d8ed0 +color12 #898ea3 +color5 #6678cc +color13 #dee1f0 +color6 #21a1c8 +color14 #9c6279 +color7 #969cb3 +color15 #f4f7ff +selection_foreground #202745 diff --git a/config/kitty/themes/kitty-themes/themes/Atom.conf b/config/kitty/themes/kitty-themes/themes/Atom.conf new file mode 100644 index 0000000..091c683 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Atom.conf @@ -0,0 +1,21 @@ +background #161718 +foreground #c4c8c5 +cursor #d0d0d0 +selection_background #444444 +color0 #000000 +color8 #000000 +color1 #fc5ef0 +color9 #fc5ef0 +color2 #86c38a +color10 #94f936 +color3 #ffd6b1 +color11 #f5ffa7 +color4 #85befd +color12 #95cbfe +color5 #b9b5fc +color13 #b9b5fc +color6 #85befd +color14 #85befd +color7 #dfdfdf +color15 #dfdfdf +selection_foreground #161718 diff --git a/config/kitty/themes/kitty-themes/themes/AtomOneLight.conf b/config/kitty/themes/kitty-themes/themes/AtomOneLight.conf new file mode 100644 index 0000000..a3ab41f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/AtomOneLight.conf @@ -0,0 +1,21 @@ +background #f8f8f8 +foreground #2a2b33 +cursor #bbbbbb +selection_background #e5e5e6 +color0 #000000 +color8 #000000 +color1 #de3d35 +color9 #de3d35 +color2 #3e953a +color10 #3e953a +color3 #d2b67b +color11 #d2b67b +color4 #2f5af3 +color12 #2f5af3 +color5 #950095 +color13 #a00095 +color6 #3e953a +color14 #3e953a +color7 #bbbbbb +color15 #ffffff +selection_foreground #2a2b33 diff --git a/config/kitty/themes/kitty-themes/themes/Batman.conf b/config/kitty/themes/kitty-themes/themes/Batman.conf new file mode 100644 index 0000000..aef20e8 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Batman.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #6e6e6e +cursor #fcee0b +selection_background #4d4f4c +color0 #1b1d1e +color8 #505354 +color1 #e6db43 +color9 #fff68d +color2 #c8be46 +color10 #fff27c +color3 #f3fd21 +color11 #feed6c +color4 #737074 +color12 #909495 +color5 #737271 +color13 #9a999d +color6 #615f5e +color14 #a2a2a5 +color7 #c5c5be +color15 #dadad5 +selection_foreground #1b1d1e diff --git a/config/kitty/themes/kitty-themes/themes/Belafonte_Day.conf b/config/kitty/themes/kitty-themes/themes/Belafonte_Day.conf new file mode 100644 index 0000000..56a8796 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Belafonte_Day.conf @@ -0,0 +1,21 @@ +background #d4ccb9 +foreground #45363b +cursor #45363b +selection_background #958b83 +color0 #20111a +color8 #5e5252 +color1 #bd100d +color9 #bd100d +color2 #858062 +color10 #858062 +color3 #e9a448 +color11 #e9a448 +color4 #416978 +color12 #416978 +color5 #96522b +color13 #96522b +color6 #98999c +color14 #98999c +color7 #958b83 +color15 #d4ccb9 +selection_foreground #d4ccb9 diff --git a/config/kitty/themes/kitty-themes/themes/Belafonte_Night.conf b/config/kitty/themes/kitty-themes/themes/Belafonte_Night.conf new file mode 100644 index 0000000..fc51e9c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Belafonte_Night.conf @@ -0,0 +1,21 @@ +background #20111a +foreground #958b83 +cursor #958b83 +selection_background #45363b +color0 #20111a +color8 #5e5252 +color1 #bd100d +color9 #bd100d +color2 #858062 +color10 #858062 +color3 #e9a448 +color11 #e9a448 +color4 #416978 +color12 #416978 +color5 #96522b +color13 #96522b +color6 #98999c +color14 #98999c +color7 #958b83 +color15 #d4ccb9 +selection_foreground #20111a diff --git a/config/kitty/themes/kitty-themes/themes/BirdsOfParadise.conf b/config/kitty/themes/kitty-themes/themes/BirdsOfParadise.conf new file mode 100644 index 0000000..df38e80 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/BirdsOfParadise.conf @@ -0,0 +1,21 @@ +background #2a1e1d +foreground #dfdab7 +cursor #573d25 +selection_background #563c27 +color0 #573d25 +color8 #9a6b49 +color1 #be2d26 +color9 #e84526 +color2 #6ba08a +color10 #94d7ba +color3 #e99c29 +color11 #d0d04f +color4 #5a86ac +color12 #b8d3ed +color5 #ab80a6 +color13 #d09dca +color6 #74a5ac +color14 #92ced6 +color7 #dfdab7 +color15 #fff9d4 +selection_foreground #2a1e1d diff --git a/config/kitty/themes/kitty-themes/themes/BlackMetal.conf b/config/kitty/themes/kitty-themes/themes/BlackMetal.conf new file mode 100644 index 0000000..4593f6e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/BlackMetal.conf @@ -0,0 +1,32 @@ +# BlackMetal by metalelf0, https://github.com/metalelf0 +# This schemes are available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). + +selection_foreground #000000 +selection_background #ffffff + +foreground #ffffff +background #000000 + +color0 #000000 +color1 #5f8787 +color2 #dd9999 +color3 #a06666 +color4 #888888 +color5 #999999 +color6 #aaaaaa +color7 #c1c1c1 +color8 #333333 +color9 #5f8787 +color10 #dd9999 +color11 #a06666 +color12 #888888 +color13 #999999 +color14 #aaaaaa +color15 #c1c1c1 + +active_tab_foreground #ffffff +active_tab_background #000000 +inactive_tab_foreground #666666 +inactive_tab_background #000000 + +active_border_color #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Blazer.conf b/config/kitty/themes/kitty-themes/themes/Blazer.conf new file mode 100644 index 0000000..f1dd601 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Blazer.conf @@ -0,0 +1,21 @@ +background #0d1925 +foreground #d9e5f1 +cursor #d9e5f1 +color0 #000000 +color8 #252525 +color1 #b87979 +color9 #dabdbd +color2 #79b879 +color10 #bddabd +color3 #b8b879 +color11 #dadabd +color4 #7979b8 +color12 #bdbdda +color5 #b879b8 +color13 #dabdda +color6 #79b8b8 +color14 #bddada +color7 #d9d9d9 +color15 #ffffff +selection_foreground #0d1925 +selection_background #d9e6f2 diff --git a/config/kitty/themes/kitty-themes/themes/BlulocoDark.conf b/config/kitty/themes/kitty-themes/themes/BlulocoDark.conf new file mode 100644 index 0000000..73b684d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/BlulocoDark.conf @@ -0,0 +1,98 @@ +# vim:ft=kitty + +## name: Bluloco Dark +## author: Umut Topuzoğlu +## license: LGPL-3.0 +## upstream: https://github.com/uloco/bluloco.nvim/blob/main/terminal-themes/kitty/BlulocoDark.conf + +## blurb: A fancy and sophisticated dark designer color theme + +#: The basic colors + +foreground #b9c0cb +background #282c34 +selection_foreground #282c34 +selection_background #b9c0cb + + +#: Cursor colors + +cursor #ffcc00 +cursor_text_color #282c34 + + +#: URL underline color when hovering with mouse + +url_color #3375FF + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +wayland_titlebar_color #23272F +macos_titlebar_color #23272F + + +#: Tab bar colors + +active_tab_foreground #b9c0cb +active_tab_background #44474D +inactive_tab_foreground #6B6F79 +inactive_tab_background #1A1F27 +tab_bar_background #23272F +tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #41444d +color8 #8f9aae + +#: red +color1 #fc2f52 +color9 #ff6480 + +#: green +color2 #25a45c +color10 #3fc56b + +#: yellow +color3 #ff936a +color11 #f9c859 + +#: blue +color4 #3476ff +color12 #10b1fe + +#: magenta +color5 #7a82da +color13 #ff78f8 + +#: cyan +color6 #4483aa +color14 #5fb9bc + +#: white +color7 #cdd4e0 +color15 #ffffff + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/BlulocoLight.conf b/config/kitty/themes/kitty-themes/themes/BlulocoLight.conf new file mode 100644 index 0000000..123608e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/BlulocoLight.conf @@ -0,0 +1,98 @@ +# vim:ft=kitty + +## name: Bluloco Light +## author: Umut Topuzoğlu +## license: LGPL-3.0 +## upstream: https://github.com/uloco/bluloco.nvim/blob/main/terminal-themes/kitty/BlulocoLight.conf + +## blurb: A fancy and sophisticated light designer color theme + +#: The basic colors + +foreground #373a41 +background #f9f9f9 +selection_background #DAF1FF +selection_foreground #373a41 + + +#: Cursor colors + +cursor #f32759 +cursor_text_color #373a41 + + +#: URL underline color when hovering with mouse + +url_color #275FE4 + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +wayland_titlebar_color #ECECEC +macos_titlebar_color #ECECEC + + +#: Tab bar colors + +active_tab_foreground #373a41 +active_tab_background #f9f9f9 +inactive_tab_foreground #929396 +inactive_tab_background #E6E5E5 +tab_bar_background #ECECEC +tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #373a41 +color8 #676a77 + +#: red +color1 #d52753 +color9 #ff6480 + +#: green +color2 #23974a +color10 #3cbc66 + +#: yellow +color3 #df631c +color11 #c5a332 + +#: blue +color4 #275fe4 +color12 #0099e1 + +#: magenta +color5 #823ff1 +color13 #ce33c0 + +#: cyan +color6 #27618d +color14 #6d93bb + +#: white +color7 #babbc2 +color15 #d3d3d3 + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/Borland.conf b/config/kitty/themes/kitty-themes/themes/Borland.conf new file mode 100644 index 0000000..c27cc83 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Borland.conf @@ -0,0 +1,21 @@ +background #0000a3 +foreground #ffff4d +cursor #ffa460 +selection_background #a3a3a3 +color0 #4e4e4e +color8 #7c7c7c +color1 #ff6b60 +color9 #ffb6b0 +color2 #a7ff60 +color10 #ceffab +color3 #ffffb6 +color11 #ffffcb +color4 #96cafd +color12 #b5dcfe +color5 #ff73fd +color13 #ff9cfe +color6 #c6c4fd +color14 #dfdffe +color7 #eeeeee +color15 #ffffff +selection_foreground #0000a3 diff --git a/config/kitty/themes/kitty-themes/themes/Box.conf b/config/kitty/themes/kitty-themes/themes/Box.conf new file mode 100644 index 0000000..8945d68 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Box.conf @@ -0,0 +1,101 @@ +# vim:ft=kitty +#: This is a template that can be used to create new kitty themes. +#: Theme files should start with a metadata block consisting of +#: lines beginning with ##. All metadata fields are optional. + +## name: Box +## author: D3vil0p3r +## license: GPLv3 +## blurb: Hack The Box inspired colorscheme. + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #9fef00 +background #141d2b +selection_foreground #141d2b +selection_background #a4b1cd + + +#: Cursor colors + +cursor #9fef00 +cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + +url_color #2ee7b6 + + +#: kitty window border colors and terminal bell colors + +active_border_color #00ff00 +inactive_border_color #cccccc +bell_border_color #ff5a00 +visual_bell_color none + + +#: OS Window titlebar colors + +wayland_titlebar_color system +macos_titlebar_color system + + +#: Tab bar colors + +active_tab_foreground #141d2b +active_tab_background #9fef00 +inactive_tab_foreground #141d2b +inactive_tab_background #a4b1cd +tab_bar_background none +tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +mark1_foreground black +mark1_background #98d3cb +mark2_foreground black +mark2_background #f2dcd3 +mark3_foreground black +mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #000000 +color8 #767676 + +#: red +color1 #cc0403 +color9 #f2201f + +#: green +color2 #19cb00 +color10 #23fd00 + +#: yellow +color3 #cecb00 +color11 #fffd00 + +#: blue +color4 #0d73cc +color12 #1a8fff + +#: magenta +color5 #cb1ed1 +color13 #fd28ff + +#: cyan +color6 #0dcdcd +color14 #14ffff + +#: white +color7 #dddddd +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Bright_Lights.conf b/config/kitty/themes/kitty-themes/themes/Bright_Lights.conf new file mode 100644 index 0000000..9b365f4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Bright_Lights.conf @@ -0,0 +1,21 @@ +background #191919 +foreground #b2c8d6 +cursor #f34a00 +selection_background #b2c8d6 +color0 #191919 +color8 #191919 +color1 #ff355b +color9 #ff355b +color2 #b6e875 +color10 #b6e875 +color3 #ffc150 +color11 #ffc150 +color4 #75d3ff +color12 #75d4ff +color5 #b975e6 +color13 #b975e6 +color6 #6cbeb5 +color14 #6cbeb5 +color7 #c1c8d6 +color15 #c1c8d6 +selection_foreground #191919 diff --git a/config/kitty/themes/kitty-themes/themes/Broadcast.conf b/config/kitty/themes/kitty-themes/themes/Broadcast.conf new file mode 100644 index 0000000..7844942 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Broadcast.conf @@ -0,0 +1,21 @@ +background #2b2b2b +foreground #e5e1db +cursor #ffffff +selection_background #5a637e +color0 #000000 +color8 #323232 +color1 #da4839 +color9 #ff7b6a +color2 #509f50 +color10 #83d082 +color3 #ffd249 +color11 #ffff7b +color4 #6d9cbd +color12 #9fcef0 +color5 #cfcfff +color13 #ffffff +color6 #6d9cbd +color14 #a0cef0 +color7 #ffffff +color15 #ffffff +selection_foreground #2b2b2b diff --git a/config/kitty/themes/kitty-themes/themes/Brogrammer.conf b/config/kitty/themes/kitty-themes/themes/Brogrammer.conf new file mode 100644 index 0000000..41cc37b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Brogrammer.conf @@ -0,0 +1,21 @@ +background #131313 +foreground #d6dae4 +cursor #b9b9b9 +selection_background #1f1f1f +color0 #1f1f1f +color8 #d6dae4 +color1 #f71118 +color9 #de342e +color2 #2cc55d +color10 #1dd260 +color3 #ecb90f +color11 #f2bd09 +color4 #2a84d2 +color12 #0f80d5 +color5 #4e59b7 +color13 #524fb9 +color6 #0f80d5 +color14 #0f7cda +color7 #d6dae4 +color15 #ffffff +selection_foreground #131313 diff --git a/config/kitty/themes/kitty-themes/themes/C64.conf b/config/kitty/themes/kitty-themes/themes/C64.conf new file mode 100644 index 0000000..70978d5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/C64.conf @@ -0,0 +1,21 @@ +background #40318d +foreground #7869c4 +cursor #7869c4 +selection_background #7869c4 +color0 #090300 +color8 #000000 +color1 #883932 +color9 #883932 +color2 #55a049 +color10 #55a049 +color3 #bfce72 +color11 #bfce72 +color4 #40318d +color12 #40318d +color5 #8b3f96 +color13 #8a3e95 +color6 #67b6bd +color14 #67b6bd +color7 #ffffff +color15 #f7f7f7 +selection_foreground #40318d diff --git a/config/kitty/themes/kitty-themes/themes/CLRS.conf b/config/kitty/themes/kitty-themes/themes/CLRS.conf new file mode 100644 index 0000000..ddcb324 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/CLRS.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #262626 +cursor #6fd2fc +selection_background #6fd2fc +color0 #000000 +color8 #545753 +color1 #f72729 +color9 #fb0416 +color2 #32895c +color10 #2cc631 +color3 #f96f1c +color11 #fcd627 +color4 #125ccf +color12 #156ffe +color5 #9f00bc +color13 #e800b0 +color6 #32c2c0 +color14 #39d5ce +color7 #b2b2b2 +color15 #ededec +selection_foreground #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Campbell.conf b/config/kitty/themes/kitty-themes/themes/Campbell.conf new file mode 100644 index 0000000..9f33178 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Campbell.conf @@ -0,0 +1,46 @@ +# vim:ft=kitty + +## name: Campbell +## author: Microsoft +## blurb: The default theme of Microsoft's terminals, including Windows Terminal and cmd. + +# The basic colors +foreground #cccccc +background #0c0c0c +selection_background #ffffff + +# Cursor colors +cursor #ffffff + +# The basic 16 colors +# black +color0 #0c0c0c +color8 #767676 + +# red +color1 #c50f1f +color9 #e74856 + +# green +color2 #13a10e +color10 #16c60c + +# yellow +color3 #f19c00 +color11 #f9f1a5 + +# blue +color4 #0037da +color12 #3b78ff + +# magenta +color5 #881798 +color13 #b4009e + +# cyan +color6 #3a96dd +color14 #61d6d6 + +# white +color7 #cccccc +color15 #f2f2f2 diff --git a/config/kitty/themes/kitty-themes/themes/Catppuccin-Frappe.conf b/config/kitty/themes/kitty-themes/themes/Catppuccin-Frappe.conf new file mode 100644 index 0000000..80c3a35 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Catppuccin-Frappe.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Frappe +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/frappe.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #C6D0F5 +background #303446 +selection_foreground #303446 +selection_background #F2D5CF + +# Cursor colors +cursor #F2D5CF +cursor_text_color #303446 + +# URL underline color when hovering with mouse +url_color #F2D5CF + +# Kitty window border colors +active_border_color #BABBF1 +inactive_border_color #737994 +bell_border_color #E5C890 + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #232634 +active_tab_background #CA9EE6 +inactive_tab_foreground #C6D0F5 +inactive_tab_background #292C3C +tab_bar_background #232634 + +# Colors for marks (marked text in the terminal) +mark1_foreground #303446 +mark1_background #BABBF1 +mark2_foreground #303446 +mark2_background #CA9EE6 +mark3_foreground #303446 +mark3_background #85C1DC + +# The 16 terminal colors + +# black +color0 #51576D +color8 #626880 + +# red +color1 #E78284 +color9 #E78284 + +# green +color2 #A6D189 +color10 #A6D189 + +# yellow +color3 #E5C890 +color11 #E5C890 + +# blue +color4 #8CAAEE +color12 #8CAAEE + +# magenta +color5 #F4B8E4 +color13 #F4B8E4 + +# cyan +color6 #81C8BE +color14 #81C8BE + +# white +color7 #B5BFE2 +color15 #A5ADCE diff --git a/config/kitty/themes/kitty-themes/themes/Catppuccin-Latte.conf b/config/kitty/themes/kitty-themes/themes/Catppuccin-Latte.conf new file mode 100644 index 0000000..e3fb955 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Catppuccin-Latte.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Latte +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/latte.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #4C4F69 +background #EFF1F5 +selection_foreground #EFF1F5 +selection_background #DC8A78 + +# Cursor colors +cursor #DC8A78 +cursor_text_color #EFF1F5 + +# URL underline color when hovering with mouse +url_color #DC8A78 + +# Kitty window border colors +active_border_color #7287FD +inactive_border_color #9CA0B0 +bell_border_color #DF8E1D + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #EFF1F5 +active_tab_background #8839EF +inactive_tab_foreground #4C4F69 +inactive_tab_background #9CA0B0 +tab_bar_background #BCC0CC + +# Colors for marks (marked text in the terminal) +mark1_foreground #EFF1F5 +mark1_background #7287fD +mark2_foreground #EFF1F5 +mark2_background #8839EF +mark3_foreground #EFF1F5 +mark3_background #209FB5 + +# The 16 terminal colors + +# black +color0 #5C5F77 +color8 #6C6F85 + +# red +color1 #D20F39 +color9 #D20F39 + +# green +color2 #40A02B +color10 #40A02B + +# yellow +color3 #DF8E1D +color11 #DF8E1D + +# blue +color4 #1E66F5 +color12 #1E66F5 + +# magenta +color5 #EA76CB +color13 #EA76CB + +# cyan +color6 #179299 +color14 #179299 + +# white +color7 #ACB0BE +color15 #BCC0CC diff --git a/config/kitty/themes/kitty-themes/themes/Catppuccin-Macchiato.conf b/config/kitty/themes/kitty-themes/themes/Catppuccin-Macchiato.conf new file mode 100644 index 0000000..a45b09f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Catppuccin-Macchiato.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Macchiato +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/macchiato.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CAD3F5 +background #24273A +selection_foreground #24273A +selection_background #F4DBD6 + +# Cursor colors +cursor #F4DBD6 +cursor_text_color #24273A + +# URL underline color when hovering with mouse +url_color #F4DBD6 + +# Kitty window border colors +active_border_color #B7BDF8 +inactive_border_color #6E738D +bell_border_color #EED49F + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #181926 +active_tab_background #C6A0F6 +inactive_tab_foreground #CAD3F5 +inactive_tab_background #1E2030 +tab_bar_background #181926 + +# Colors for marks (marked text in the terminal) +mark1_foreground #24273A +mark1_background #B7BDF8 +mark2_foreground #24273A +mark2_background #C6A0F6 +mark3_foreground #24273A +mark3_background #7DC4E4 + +# The 16 terminal colors + +# black +color0 #494D64 +color8 #5B6078 + +# red +color1 #ED8796 +color9 #ED8796 + +# green +color2 #A6DA95 +color10 #A6DA95 + +# yellow +color3 #EED49F +color11 #EED49F + +# blue +color4 #8AADF4 +color12 #8AADF4 + +# magenta +color5 #F5BDE6 +color13 #F5BDE6 + +# cyan +color6 #8BD5CA +color14 #8BD5CA + +# white +color7 #B8C0E0 +color15 #A5ADCB diff --git a/config/kitty/themes/kitty-themes/themes/Catppuccin-Mocha.conf b/config/kitty/themes/kitty-themes/themes/Catppuccin-Mocha.conf new file mode 100644 index 0000000..2533db7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Catppuccin-Mocha.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Mocha +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CDD6F4 +background #1E1E2E +selection_foreground #1E1E2E +selection_background #F5E0DC + +# Cursor colors +cursor #F5E0DC +cursor_text_color #1E1E2E + +# URL underline color when hovering with mouse +url_color #F5E0DC + +# Kitty window border colors +active_border_color #B4BEFE +inactive_border_color #6C7086 +bell_border_color #F9E2AF + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111B +active_tab_background #CBA6F7 +inactive_tab_foreground #CDD6F4 +inactive_tab_background #181825 +tab_bar_background #11111B + +# Colors for marks (marked text in the terminal) +mark1_foreground #1E1E2E +mark1_background #B4BEFE +mark2_foreground #1E1E2E +mark2_background #CBA6F7 +mark3_foreground #1E1E2E +mark3_background #74C7EC + +# The 16 terminal colors + +# black +color0 #45475A +color8 #585B70 + +# red +color1 #F38BA8 +color9 #F38BA8 + +# green +color2 #A6E3A1 +color10 #A6E3A1 + +# yellow +color3 #F9E2AF +color11 #F9E2AF + +# blue +color4 #89B4FA +color12 #89B4FA + +# magenta +color5 #F5C2E7 +color13 #F5C2E7 + +# cyan +color6 #94E2D5 +color14 #94E2D5 + +# white +color7 #BAC2DE +color15 #A6ADC8 diff --git a/config/kitty/themes/kitty-themes/themes/Chalk.conf b/config/kitty/themes/kitty-themes/themes/Chalk.conf new file mode 100644 index 0000000..7051698 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Chalk.conf @@ -0,0 +1,21 @@ +background #2b2c2e +foreground #d2d8d9 +cursor #708183 +selection_background #e3e8ed +color0 #7c8a8f +color8 #888888 +color1 #b23a51 +color9 #f24840 +color2 #789a69 +color10 #80c46f +color3 #b9ab4a +color11 #ffeb62 +color4 #2a7fac +color12 #4095ff +color5 #bc4f5a +color13 #fb5175 +color6 #44a799 +color14 #52ccbd +color7 #d2d8d9 +color15 #d2d8d9 +selection_foreground #2b2c2e diff --git a/config/kitty/themes/kitty-themes/themes/Chalkboard.conf b/config/kitty/themes/kitty-themes/themes/Chalkboard.conf new file mode 100644 index 0000000..f0b7350 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Chalkboard.conf @@ -0,0 +1,21 @@ +background #29262f +foreground #d9e6f2 +cursor #d9e6f2 +selection_background #073642 +color0 #000000 +color8 #323232 +color1 #c37372 +color9 #dbaaaa +color2 #72c373 +color10 #aadbaa +color3 #c2c372 +color11 #dadbaa +color4 #7372c3 +color12 #aaaadb +color5 #c372c2 +color13 #dbaada +color6 #72c2c3 +color14 #aadadb +color7 #d9d9d9 +color15 #ffffff +selection_foreground #29262f diff --git a/config/kitty/themes/kitty-themes/themes/ChallengerDeep.conf b/config/kitty/themes/kitty-themes/themes/ChallengerDeep.conf new file mode 100644 index 0000000..d468816 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/ChallengerDeep.conf @@ -0,0 +1,35 @@ +foreground #cbe3e7 +background #1e1c31 +selection_foreground #1e1c31 +selection_background #aaffe4 + +active_tab_background #565575 +inactive_tab_background #565575 +active_tab_foreground #95ffa4 +inactive_tab_foreground #cbe3e7 + +active_border_color #fbfcfc + +color0 #565575 +color8 #100e23 + +color1 #ff8080 +color9 #ff5458 + +color2 #95ffa4 +color10 #62d196 + +color3 #ffe9aa +color11 #ffb378 + +color4 #91ddff +color12 #65b2ff + +color5 #c991e1 +color13 #906cff + +color6 #aaffe4 +color14 #63f2f1 + +color7 #cbe3e7 +color15 #a6b3cc diff --git a/config/kitty/themes/kitty-themes/themes/Ciapre.conf b/config/kitty/themes/kitty-themes/themes/Ciapre.conf new file mode 100644 index 0000000..2b496fb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Ciapre.conf @@ -0,0 +1,21 @@ +background #181c27 +foreground #ada37a +cursor #91805a +selection_background #172539 +color0 #181818 +color8 #555555 +color1 #800009 +color9 #ab3834 +color2 #48513b +color10 #a6a65d +color3 #cc8a3e +color11 #dcde7b +color4 #566d8c +color12 #2f97c6 +color5 #724c7c +color13 #d33060 +color6 #5b4f4a +color14 #f3dab1 +color7 #ada37e +color15 #f3f3f3 +selection_foreground #181c27 diff --git a/config/kitty/themes/kitty-themes/themes/Cobalt2.conf b/config/kitty/themes/kitty-themes/themes/Cobalt2.conf new file mode 100644 index 0000000..236ce42 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Cobalt2.conf @@ -0,0 +1,76 @@ +## name: Cobalt2 +## author: Lalit Kumar(@laltimee) +## license: MIT +## upstream: https://github.com/lalitmee/kitty-cobalt2/blob/master/cobalt2.conf +## blurb: Don't stress your eyes now + +# The basic colors +foreground #FFFFFF +background #193549 +selection_foreground #FFFFFF +selection_background #185294 + +# Cursor colors +cursor #FFC600 +cursor_text_color #1C1C1C + +# URL underline color when hovering with mouse +url_color #00AAFF + +# Kitty window border colors +active_border_color #00AAFF +inactive_border_color #9E9E9E +bell_border_color #F2ED7F + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #FFC600 +inactive_tab_background #185294 +inactive_tab_foreground #FFFFFF +active_tab_background #0050A4 +tab_bar_background #193549 + +# Colors for marks (marked text in the terminal) +mark1_foreground #FFC600 +mark1_background #3AD900 +mark2_foreground #967EFB +mark2_background #00AAFF +mark3_foreground #FF628C +mark3_background #FF9A00 + +# The 16 terminal #88FF88#88FF88colors + +# black +color0 #1C1C1C +color8 #9E9E9E + +# red +color1 #FF0000 +color9 #700009 + +# green +color2 #3AD900 +color10 #88FF88 + +# yellow +color3 #FFC600 +color11 #FF9A00 + +# cyan +color6 #80FCFF +color14 #8fbfdc + +# magenta +color5 #FF628C +color13 #EE80E1 + +# blue +color4 #00AAFF +color12 #0050A4 + +# white +color7 #FFFFFF +color15 #BCBCBC diff --git a/config/kitty/themes/kitty-themes/themes/Cobalt_Neon.conf b/config/kitty/themes/kitty-themes/themes/Cobalt_Neon.conf new file mode 100644 index 0000000..02a66e5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Cobalt_Neon.conf @@ -0,0 +1,21 @@ +background #142838 +foreground #8ff586 +cursor #c4206f +selection_background #084fb0 +color0 #142630 +color8 #fff688 +color1 #ff2320 +color9 #d4312e +color2 #3aa5ff +color10 #8ff586 +color3 #e9e75c +color11 #e9f06d +color4 #8ff586 +color12 #3c7dd2 +color5 #781aa0 +color13 #8230a7 +color6 #8ff586 +color14 #6cbc67 +color7 #ba45b1 +color15 #8ff586 +selection_foreground #142838 diff --git a/config/kitty/themes/kitty-themes/themes/Constant_Perceptual_Luminosity_dark.conf b/config/kitty/themes/kitty-themes/themes/Constant_Perceptual_Luminosity_dark.conf new file mode 100644 index 0000000..cb2c6f0 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Constant_Perceptual_Luminosity_dark.conf @@ -0,0 +1,89 @@ +# vim:ft=kitty +## name: Constant Perceptual Luminosity (dark) +## author: Aaron Hall +## license: MIT, I prefer credit (and money) to none, but I won't sue +## upstream: none (yet) +## blurb: ANSI term colors picked with OKHSL maximizing difference +## in color subject to constant perceptual luminosity so that all +## colors are readable on dark screens even against transparency +## yet gentle on the eyes in dark environments. +## for colors (starting with red at 30 degrees) luminosity is .4, .6 (bright) +## .5 for white(gray), .7 bright white (light gray) +## 0 for black and .3 for bright black +## For transparency I find these work ok: +## background_opacity 0.7 +## dynamic_background_opacity yes +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #777777 +background #000000 +selection_foreground #745b00 +selection_background #464646 + +#: Cursor colors + +# cursor #cccccc +# cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + +# url_color #0087bd + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +# active_tab_foreground #000 +# active_tab_background #eee +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +mark1_foreground #000000 +mark1_background #3123ff +mark2_foreground #000000 +mark2_background #745b00 +mark3_foreground #000000 +mark3_background #9b0097 + +#: The basic 16 colors +color0 #000000 +color1 #b10b00 +color2 #007232 +color3 #745b00 +color4 #3123ff +color5 #9b0097 +color6 #006a78 +color7 #777777 +color8 #464646 +color9 #ff3d2b +color10 #00ae50 +color11 #b18c00 +color12 #6786ff +color13 #eb00e4 +color14 #00a3b7 +color15 #ababab + diff --git a/config/kitty/themes/kitty-themes/themes/Corvine.conf b/config/kitty/themes/kitty-themes/themes/Corvine.conf new file mode 100644 index 0000000..73c398e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Corvine.conf @@ -0,0 +1,23 @@ +# Corvine by arzg, https://github.com/arzg/vim-corvine +# This work is licensed under the ISC License. +# For a copy, see https://github.com/arzg/vim-corvine/raw/master/LICENSE + +foreground #c6c6c6 +background #262626 + +color0 #3a3a3a +color1 #d78787 +color2 #87af5f +color3 #d7d7af +color4 #87afd7 +color5 #afafd7 +color6 #87d7d7 +color7 #c6c6c6 +color8 #626262 +color9 #ffafaf +color10 #afd787 +color11 #d7d787 +color12 #87d7ff +color13 #d7afd7 +color14 #5fd7d7 +color15 #eeeeee diff --git a/config/kitty/themes/kitty-themes/themes/CrayonPonyFish.conf b/config/kitty/themes/kitty-themes/themes/CrayonPonyFish.conf new file mode 100644 index 0000000..068fab3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/CrayonPonyFish.conf @@ -0,0 +1,21 @@ +background #140607 +foreground #685259 +cursor #685259 +selection_background #2a1a1c +color0 #2a1a1c +color8 #3c2a2e +color1 #90002a +color9 #c5245c +color2 #579523 +color10 #8dff56 +color3 #aa301b +color11 #c7371d +color4 #8b87af +color12 #cfc9ff +color5 #682e50 +color13 #fb6cb9 +color6 #e8a766 +color14 #ffceae +color7 #685259 +color15 #af949d +selection_foreground #140607 diff --git a/config/kitty/themes/kitty-themes/themes/Cyberpunk-Neon.conf b/config/kitty/themes/kitty-themes/themes/Cyberpunk-Neon.conf new file mode 100644 index 0000000..36d35fb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Cyberpunk-Neon.conf @@ -0,0 +1,47 @@ +## name: Cyberpunk Neon +## author: Theo (theo-grivel) +## license: CC-BY-SA-4.0 +## upstream: https://github.com/Roboron3042/Cyberpunk-Neon/blob/master/terminal/kitty/cyberpunk-neon.conf + +background #000b1e +foreground #0abdc6 +selection_background none +selection_foreground none +cursor #0abdc6 + +# Black, Gray, Silver, White + +color0 #000b1e +color8 #1c61c2 +color7 #0abdc6 +color15 #0abdc6 + +# Red + +color1 #ff0000 +color9 #ff0000 + +# Green + +color2 #d300c4 +color10 #d300c4 + +# Yellow + +color3 #f57800 +color11 #ff5780 + +# Blue + +color4 #133e7c +color12 #00ff00 + +# Purple + +color5 #711c91 +color13 #711c91 + +# Teal + +color6 #0abdc6 +color14 #0abdc6 diff --git a/config/kitty/themes/kitty-themes/themes/DarkOneNuanced.conf b/config/kitty/themes/kitty-themes/themes/DarkOneNuanced.conf new file mode 100644 index 0000000..922b607 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/DarkOneNuanced.conf @@ -0,0 +1,63 @@ +# Dark One Nuanced by ariasuni, https://store.kde.org/p/1225908 +# Imported from KDE .colorscheme format by thematdev, https://thematdev.org +# For migrating your schemes from Konsole format see +# https://git.thematdev.org/thematdev/konsole-scheme-migration + + +# importing Background +background #282c34 +# importing BackgroundFaint +# importing BackgroundIntense +# importing Color0 +color0 #3f4451 +# importing Color0Faint +color16 #282c34 +# importing Color0Intense +color8 #4f5666 +# importing Color1 +color1 #e06c75 +# importing Color1Faint +color17 #c25d66 +# importing Color1Intense +color9 #ff7b86 +# importing Color2 +color2 #98c379 +# importing Color2Faint +color18 #82a566 +# importing Color2Intense +color10 #b1e18b +# importing Color3 +color3 #d19a66 +# importing Color3Faint +color19 #b38257 +# importing Color3Intense +color11 #efb074 +# importing Color4 +color4 #61afef +# importing Color4Faint +color20 #5499d1 +# importing Color4Intense +color12 #67cdff +# importing Color5 +color5 #c678dd +# importing Color5Faint +color21 #a966bd +# importing Color5Intense +color13 #e48bff +# importing Color6 +color6 #56b6c2 +# importing Color6Faint +color22 #44919a +# importing Color6Intense +color14 #63d4e0 +# importing Color7 +color7 #e6e6e6 +# importing Color7Faint +color23 #c8c8c8 +# importing Color7Intense +color15 #ffffff +# importing Foreground +foreground #abb2bf +# importing ForegroundFaint +# importing ForegroundIntense +# importing General diff --git a/config/kitty/themes/kitty-themes/themes/Dark_Pastel.conf b/config/kitty/themes/kitty-themes/themes/Dark_Pastel.conf new file mode 100644 index 0000000..15083f7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Dark_Pastel.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #bbbbbb +selection_background #b5d5ff +color0 #000000 +color8 #545454 +color1 #ff5555 +color9 #ff5555 +color2 #55ff55 +color10 #55ff55 +color3 #ffff55 +color11 #ffff55 +color4 #5555ff +color12 #5555ff +color5 #ff55ff +color13 #ff55ff +color6 #55ffff +color14 #55ffff +color7 #bbbbbb +color15 #ffffff +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Darkside.conf b/config/kitty/themes/kitty-themes/themes/Darkside.conf new file mode 100644 index 0000000..10238d1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Darkside.conf @@ -0,0 +1,21 @@ +background #212324 +foreground #b9b9b9 +cursor #bbbbbb +selection_background #2f3333 +color0 #000000 +color8 #000000 +color1 #e8331c +color9 #df5a4f +color2 #68c156 +color10 #76b768 +color3 #f1d32b +color11 #eed64a +color4 #1c98e8 +color12 #387bd2 +color5 #8e69c8 +color13 #957bbd +color6 #1c98e8 +color14 #3d96e2 +color7 #b9b9b9 +color15 #b9b9b9 +selection_foreground #212324 diff --git a/config/kitty/themes/kitty-themes/themes/Desert.conf b/config/kitty/themes/kitty-themes/themes/Desert.conf new file mode 100644 index 0000000..5491a97 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Desert.conf @@ -0,0 +1,21 @@ +background #333333 +foreground #ffffff +cursor #00ff00 +selection_background #b5d5ff +color0 #4d4d4d +color8 #545454 +color1 #ff2b2b +color9 #ff5555 +color2 #98fb98 +color10 #55ff55 +color3 #f0e68c +color11 #ffff55 +color4 #cd853f +color12 #87ceff +color5 #ffdead +color13 #ff55ff +color6 #ffa0a0 +color14 #ffd700 +color7 #f5deb3 +color15 #ffffff +selection_foreground #333333 diff --git a/config/kitty/themes/kitty-themes/themes/DesertNight.conf b/config/kitty/themes/kitty-themes/themes/DesertNight.conf new file mode 100644 index 0000000..f9ece8f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/DesertNight.conf @@ -0,0 +1,22 @@ +# DesertNight by sainnhe +# License: MIT && Anti-996 + +macos_titlebar_color #24221c +foreground #d4b07b +background #24221c +color0 #473f31 +color8 #473f31 +color1 #e56b55 +color9 #e56b55 +color2 #99b05f +color10 #99b05f +color3 #e18245 +color11 #e5a440 +color4 #949fb4 +color12 #949fb4 +color5 #d261a5 +color13 #d261a5 +color6 #bfab36 +color14 #bfab36 +color7 #87765d +color15 #87765d diff --git a/config/kitty/themes/kitty-themes/themes/DimmedMonokai.conf b/config/kitty/themes/kitty-themes/themes/DimmedMonokai.conf new file mode 100644 index 0000000..9dccd88 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/DimmedMonokai.conf @@ -0,0 +1,21 @@ +background #1e1e1e +foreground #b8bcb9 +cursor #eee +selection_background #efcc00 +color0 #3a3c43 +color8 #888987 +color1 #be3e48 +color9 #fb001e +color2 #869a3a +color10 #0e712e +color3 #c4a535 +color11 #c37033 +color4 #4e76a1 +color12 #176ce3 +color5 #855b8d +color13 #fb0067 +color6 #568ea3 +color14 #2d6f6c +color7 #b8bcb9 +color15 #fcffb8 +selection_foreground #1e1e1e diff --git a/config/kitty/themes/kitty-themes/themes/Doom_One.conf b/config/kitty/themes/kitty-themes/themes/Doom_One.conf new file mode 100644 index 0000000..8c845bb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Doom_One.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Doom One +## author: Henrik Lissner +## license: MIT +## blurb: Inspired by Atom's One Dark color scheme. + +# The basic colors +foreground #bbc2cf +background #282c34 +selection_foreground #bbc2cf +selection_background #3f444a + +# Cursor colors +cursor #bbc2cf +cursor_text_color #282c34 + +# kitty window border colors +active_border_color #46D9FF +inactive_border_color #3f444a + +# Tab bar colors +active_tab_foreground #282c34 +active_tab_background #DFDFDF +inactive_tab_foreground #3f444a +inactive_tab_background #5B6268 + +# The basic 16 colors +# black +color0 #2a2e38 +color8 #3f444a + +# red +color1 #ff6c6b +color9 #ff6655 + +# green +color2 #98be65 +color10 #99bb66 + +# yellow +color3 #ECBE7B +color11 #ECBE7B + +# blue +color4 #51afef +color12 #51afef + +# magenta +color5 #c678dd +color13 #c678dd + +# cyan +color6 #46D9FF +color14 #46D9FF + +# white +color7 #DFDFDF +color15 #bbc2cf diff --git a/config/kitty/themes/kitty-themes/themes/Doom_One_Light.conf b/config/kitty/themes/kitty-themes/themes/Doom_One_Light.conf new file mode 100644 index 0000000..3e0273b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Doom_One_Light.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Doom One Light +## author: Henrik Lissner +## license: MIT +## blurb: Doom Emacs flagship theme based on atom One Light + +# The basic colors +foreground #383a42 +background #fafafa +selection_foreground #383a42 +selection_background #dfdfdf + +# Cursor colors +cursor #383a42 +cursor_text_color #fafafa + +# kitty window border colors +active_border_color #0184bc +inactive_border_color #c6c7c7 + +# Tab bar colors +active_tab_foreground #fafafa +active_tab_background #383a42 +inactive_tab_foreground #f0f0f0 +inactive_tab_background #c6c7c7 + +# The basic 16 colors +# black +color0 #383a42 +color8 #c6c7c7 + +# red +color1 #e45649 +color9 #e45649 + +# green +color2 #50a14f +color10 #50a14f + +# yellow +color3 #986801 +color11 #986801 + +# blue +color4 #4078f2 +color12 #4078f2 + +# magenta +color5 #a626a4 +color13 #b751b6 + +# cyan +color6 #005478 +color14 #0184bc + +# white +color7 #f0f0f0 +color15 #383a42 diff --git a/config/kitty/themes/kitty-themes/themes/Doom_Vibrant.conf b/config/kitty/themes/kitty-themes/themes/Doom_Vibrant.conf new file mode 100644 index 0000000..5057b8a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Doom_Vibrant.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Doom Vibrant +## author: Henrik Lissner +## license: MIT +## blurb: A version of Doom One Emacs theme that uses more vibrant colors. + +# The basic colors +foreground #bbc2cf +background #242730 +selection_foreground #bbc2cf +selection_background #6A8FBF + +# Cursor colors +cursor #bbc2cf +cursor_text_color #242730 + +# kitty window border colors +active_border_color #46D9FF +inactive_border_color #484854 + +# Tab bar colors +active_tab_foreground #242730 +active_tab_background #DFDFDF +inactive_tab_foreground #484854 +inactive_tab_background #5D656B + +# The basic 16 colors +# black +color0 #2a2e38 +color8 #484854 + +# red +color1 #ff665c +color9 #ff665c + +# green +color2 #7bc275 +color10 #99bb66 + +# yellow +color3 #fcce7b +color11 #ecbe7b + +# blue +color4 #51afef +color12 #51afef + +# magenta +color5 #C57BDB +color13 #c678dd + +# cyan +color6 #5cEfFF +color14 #46D9FF + +# white +color7 #DFDFDF +color15 #bbc2cf diff --git a/config/kitty/themes/kitty-themes/themes/DotGov.conf b/config/kitty/themes/kitty-themes/themes/DotGov.conf new file mode 100644 index 0000000..345cef9 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/DotGov.conf @@ -0,0 +1,21 @@ +background #252b35 +foreground #eaeaea +cursor #d9002f +selection_background #194080 +color0 #181818 +color8 #181818 +color1 #bf081d +color9 #bf081d +color2 #3d9751 +color10 #3d9751 +color3 #f6bb33 +color11 #f6bb33 +color4 #16b1df +color12 #16b1df +color5 #772fb0 +color13 #772fb0 +color6 #8bd1ed +color14 #8bd1ed +color7 #ffffff +color15 #ffffff +selection_foreground #252b35 diff --git a/config/kitty/themes/kitty-themes/themes/Dracula.conf b/config/kitty/themes/kitty-themes/themes/Dracula.conf new file mode 100644 index 0000000..627ba40 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Dracula.conf @@ -0,0 +1,35 @@ +# vim:ft=kitty +## name: Dracula +## author: Keegan Carruthers-Smith +## license: MIT +## upstream: https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a +url_color #8be9fd +color0 #21222c +color8 #6272a4 +color1 #ff5555 +color9 #ff6e6e +color2 #50fa7b +color10 #69ff94 +color3 #f1fa8c +color11 #ffffa5 +color4 #bd93f9 +color12 #d6acff +color5 #ff79c6 +color13 #ff92df +color6 #8be9fd +color14 #a4ffff +color7 #f8f8f2 +color15 #ffffff +cursor #f8f8f2 +cursor_text_color background +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 +mark1_foreground #282a36 +mark1_background #ff5555 diff --git a/config/kitty/themes/kitty-themes/themes/Dumbledore.conf b/config/kitty/themes/kitty-themes/themes/Dumbledore.conf new file mode 100644 index 0000000..c1ef032 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Dumbledore.conf @@ -0,0 +1,21 @@ +background #422553 +foreground #c4c8c5 +cursor #c4c8c5 +selection_background #008aff +color0 #2b283d +color8 #413e53 +color1 #ae0000 +color9 #d3a624 +color2 #3e7c54 +color10 #aaaaaa +color3 #f0c75e +color11 #716254 +color4 #415baf +color12 #946a2c +color5 #9445ae +color13 #b294ba +color6 #008aff +color14 #25de50 +color7 #850000 +color15 #c9c9c9 +selection_foreground #422553 diff --git a/config/kitty/themes/kitty-themes/themes/Duotone_Dark.conf b/config/kitty/themes/kitty-themes/themes/Duotone_Dark.conf new file mode 100644 index 0000000..4867604 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Duotone_Dark.conf @@ -0,0 +1,21 @@ +background #1f1c27 +foreground #b6a0ff +cursor #ff9738 +selection_background #353146 +color0 #1f1c27 +color8 #353146 +color1 #d8393d +color9 #d8393d +color2 #2dcc72 +color10 #2dcc72 +color3 #d8b76e +color11 #d8b76e +color4 #ffc183 +color12 #ffc183 +color5 #dd8d40 +color13 #dd8d40 +color6 #2388ff +color14 #2388ff +color7 #b6a0ff +color15 #e9e4ff +selection_foreground #1f1c27 diff --git a/config/kitty/themes/kitty-themes/themes/ENCOM.conf b/config/kitty/themes/kitty-themes/themes/ENCOM.conf new file mode 100644 index 0000000..7afc7ae --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/ENCOM.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #00a595 +cursor #bbbbbb +selection_background #00a48c +color0 #000000 +color8 #545454 +color1 #9f0000 +color9 #ff0000 +color2 #008b00 +color10 #00ee00 +color3 #ffcf00 +color11 #ffff00 +color4 #0081ff +color12 #0000ff +color5 #bc00ca +color13 #ff00ff +color6 #008b8b +color14 #00cdcd +color7 #bbbbbb +color15 #ffffff +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Earthsong.conf b/config/kitty/themes/kitty-themes/themes/Earthsong.conf new file mode 100644 index 0000000..50f0da8 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Earthsong.conf @@ -0,0 +1,21 @@ +background #282420 +foreground #e5c6a8 +cursor #f6f6ec +selection_background #111417 +color0 #111417 +color8 #665e54 +color1 #c84134 +color9 #ff6459 +color2 #84c44b +color10 #97e035 +color3 #f4ae2e +color11 #dfd561 +color4 #1397b9 +color12 #5ed9ff +color5 #d0623c +color13 #ff9168 +color6 #4f9452 +color14 #83ef88 +color7 #e5c5a9 +color15 #f6f6ec +selection_foreground #282420 diff --git a/config/kitty/themes/kitty-themes/themes/Eldritch.conf b/config/kitty/themes/kitty-themes/themes/Eldritch.conf new file mode 100644 index 0000000..78eb380 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Eldritch.conf @@ -0,0 +1,63 @@ +# vim:ft=kitty +## name: Eldritch +## author: jacobrreed +## license: MIT +## upstream: https://github.com/eldritch-theme/kitty +## blurb: A theme for the Ancient Ones! +foreground #ebfafa +background #212337 +selection_foreground #ebfafa +selection_background #bf4f8e + +url_color #04d1f9 + +# black +color0 #21222c +color8 #7081d0 + +# red +color1 #f9515d +color9 #f16c75 + +# green +color2 #37f499 +color10 #69F8B3 + +# yellow +color3 #e9f941 +color11 #f1fc79 + +# blue +color4 #9071f4 +color12 #a48cf2 + +# magenta +color5 #f265b5 +color13 #FD92CE + +# cyan +color6 #04d1f9 +color14 #66e4fd + +# white +color7 #ebfafa +color15 #ffffff + +# Cursor colors +cursor #37f499 +cursor_text_color #f8f8f2 + +# Tab bar colors +active_tab_foreground #212337 +active_tab_background #37f499 +inactive_tab_foreground #04d1f9 +inactive_tab_background #323449 + +# Marks +mark1_foreground #212337 +mark1_background #f9515d + +# Splits/Windows +active_border_color #a48cf2 +inactive_border_color #212337 + diff --git a/config/kitty/themes/kitty-themes/themes/Elemental.conf b/config/kitty/themes/kitty-themes/themes/Elemental.conf new file mode 100644 index 0000000..e24a3d3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Elemental.conf @@ -0,0 +1,21 @@ +background #21211c +foreground #807973 +cursor #facb7f +selection_background #403729 +color0 #3c3b30 +color8 #545444 +color1 #97280f +color9 #df502a +color2 #479942 +color10 #60e06f +color3 #7f7110 +color11 #d69827 +color4 #497f7d +color12 #78d8d8 +color5 #7e4e2e +color13 #cd7c53 +color6 #387f58 +color14 #58d598 +color7 #807974 +color15 #fff1e8 +selection_foreground #21211c diff --git a/config/kitty/themes/kitty-themes/themes/Espresso.conf b/config/kitty/themes/kitty-themes/themes/Espresso.conf new file mode 100644 index 0000000..373c178 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Espresso.conf @@ -0,0 +1,27 @@ +# Theme ported from the Mac Terminal application. + +background #323232 +foreground #ffffff +cursor #d6d6d6 +selection_background #5b5b5b +selection_foreground #323232 +color0 #353535 +color8 #535353 +color1 #d25252 +color9 #f00c0c +color2 #a4c161 +color10 #c1df74 +color3 #ffc56d +color11 #e1e48a +color4 #6c99ba +color12 #8ab6d9 +color5 #d096d9 +color13 #efb5f7 +color6 #bdd6ff +color14 #dbf4ff +color7 #ededec +color15 #ffffff +active_tab_foreground #ffffff +active_tab_background #535353 +inactive_tab_foreground #ffffff +inactive_tab_background #353535 diff --git a/config/kitty/themes/kitty-themes/themes/Espresso_Libre.conf b/config/kitty/themes/kitty-themes/themes/Espresso_Libre.conf new file mode 100644 index 0000000..fa042b2 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Espresso_Libre.conf @@ -0,0 +1,21 @@ +background #2a211c +foreground #b8a898 +cursor #ffffff +selection_background #c3dcff +color0 #000000 +color8 #545753 +color1 #cc0000 +color9 #ef2828 +color2 #1a921c +color10 #9aff87 +color3 #efe43a +color11 #fffa5c +color4 #0066ff +color12 #43a8ed +color5 #c5656b +color13 #ff8089 +color6 #05989a +color14 #34e2e2 +color7 #d3d7cf +color15 #ededec +selection_foreground #2a211c diff --git a/config/kitty/themes/kitty-themes/themes/Falcon.conf b/config/kitty/themes/kitty-themes/themes/Falcon.conf new file mode 100644 index 0000000..42f60ab --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Falcon.conf @@ -0,0 +1,51 @@ +# Drop these into your kitty.conf + +# The cursor color +cursor #ffe8c0 + +# The foreground color +foreground #b4b4b9 + +# The background color +background #020221 + +# The foreground for selections +selection_foreground #36363a + +# The background for selections +selection_background #ddcfbf + +# The 16 terminal colors. There are 8 basic colors, each color has a dull and +# bright version. + +# black +color0 #000004 +color8 #020221 + +# red +color1 #ff3600 +color9 #ff8e78 + +# green +color2 #718e3f +color10 #b1bf75 + +# yellow +color3 #ffc552 +color11 #ffd392 + +# blue (purple and blue!) +color4 #635196 +color12 #99a4bc + +# magenta (orange) +color5 #ff761a +color13 #ffb07b + +# cyan +color6 #34bfa4 +color14 #8bccbf + +# white +color7 #b4b4b9 +color15 #f8f8ff diff --git a/config/kitty/themes/kitty-themes/themes/Farin.conf b/config/kitty/themes/kitty-themes/themes/Farin.conf new file mode 100644 index 0000000..b8ead10 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Farin.conf @@ -0,0 +1,26 @@ +# Farin Colorscheme for Kitty +# Based on https://github.com/mlopes/dotfiles/blob/xps2018/.Xdefaults#L113 +# # By https://github.com/mlopes + +selection_foreground #1e1e1e +selection_background #aaaaaa +url_color #657b83 + +background #1e1e1e +foreground #aaaaaa +color0 #444444 +color8 #666666 +color1 #ff1155 +color9 #ff4488 +color2 #11ff55 +color10 #44ff88 +color3 #ffbb33 +color11 #ffdd66 +color4 #1155ff +color12 #4488ff +color5 #ed53c9 +color13 #dd66ff +color6 #00ffbb +color14 #66ffdd +color7 #cccccc +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Fideloper.conf b/config/kitty/themes/kitty-themes/themes/Fideloper.conf new file mode 100644 index 0000000..7e099fc --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Fideloper.conf @@ -0,0 +1,21 @@ +background #282f32 +foreground #dad9df +cursor #d35f5a +selection_background #eeb7ab +color0 #282f32 +color8 #092027 +color1 #ca1d2c +color9 #d35f5a +color2 #edb7ab +color10 #d35f5a +color3 #b7aa9a +color11 #a86571 +color4 #2e78c1 +color12 #7c84c4 +color5 #c0226e +color13 #5b5db2 +color6 #309185 +color14 #81908f +color7 #e9e2cd +color15 #fcf4de +selection_foreground #282f32 diff --git a/config/kitty/themes/kitty-themes/themes/FishTank.conf b/config/kitty/themes/kitty-themes/themes/FishTank.conf new file mode 100644 index 0000000..dce32a4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/FishTank.conf @@ -0,0 +1,21 @@ +background #222436 +foreground #eceffd +cursor #fdcd5e +selection_background #fcf6e8 +color0 #03063c +color8 #6c5a30 +color1 #c60049 +color9 #d94a8a +color2 #abf157 +color10 #daffa8 +color3 #fdcd5e +color11 #fee6a8 +color4 #525fb8 +color12 #b1bdf9 +color5 #976f81 +color13 #fda4cc +color6 #968662 +color14 #a4bc86 +color7 #eceffc +color15 #f6ffec +selection_foreground #222436 diff --git a/config/kitty/themes/kitty-themes/themes/Flat.conf b/config/kitty/themes/kitty-themes/themes/Flat.conf new file mode 100644 index 0000000..036e563 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Flat.conf @@ -0,0 +1,21 @@ +background #002240 +foreground #2bc45d +cursor #e5bd0c +selection_background #782b9c +color0 #212c3e +color8 #202b3b +color1 #a72320 +color9 #d3302e +color2 #32a448 +color10 #2c9440 +color3 #e58d11 +color11 #e5bd0c +color4 #3066ab +color12 #3b7cd2 +color5 #7819a0 +color13 #822fa7 +color6 #2b9270 +color14 #35b286 +color7 #afb6b9 +color15 #e6ecec +selection_foreground #002240 diff --git a/config/kitty/themes/kitty-themes/themes/Flatland.conf b/config/kitty/themes/kitty-themes/themes/Flatland.conf new file mode 100644 index 0000000..637b72d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Flatland.conf @@ -0,0 +1,21 @@ +background #1c1e20 +foreground #b8daee +cursor #708183 +selection_background #2a2a24 +color0 #1c1d19 +color8 #1c1d19 +color1 #f18238 +color9 #d12a24 +color2 #9ed264 +color10 #a7d32c +color3 #f3ef6d +color11 #ff8948 +color4 #4f96be +color12 #61b8d0 +color5 #695abb +color13 #695abb +color6 #d53864 +color14 #d53864 +color7 #fefffe +color15 #fefffe +selection_foreground #1c1e20 diff --git a/config/kitty/themes/kitty-themes/themes/Floraverse.conf b/config/kitty/themes/kitty-themes/themes/Floraverse.conf new file mode 100644 index 0000000..6e6a06c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Floraverse.conf @@ -0,0 +1,21 @@ +background #0e0c15 +foreground #dbd0b9 +cursor #bbbbbb +selection_background #f3e0b8 +color0 #08002e +color8 #331d4c +color1 #64002c +color9 #cf2062 +color2 #5d731a +color10 #b3ce58 +color3 #cd751c +color11 #fac357 +color4 #1d6da1 +color12 #40a4cf +color5 #b7077e +color13 #f02aae +color6 #42a38c +color14 #62caa8 +color7 #f3e0b8 +color15 #fff5db +selection_foreground #0e0c15 diff --git a/config/kitty/themes/kitty-themes/themes/ForestNight.conf b/config/kitty/themes/kitty-themes/themes/ForestNight.conf new file mode 100644 index 0000000..4a882db --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/ForestNight.conf @@ -0,0 +1,18 @@ +foreground #ffebc3 +background #3c4c55 +color0 #7f8f9f +color8 #7f8f9f +color1 #fd8489 +color9 #fd8489 +color2 #a9dd9d +color10 #a9dd9d +color3 #f0aa8a +color11 #eed094 +color4 #bdd0e5 +color12 #bdd0e5 +color5 #daccf0 +color13 #daccf0 +color6 #a9dd9d +color14 #a9dd9d +color7 #ffebc3 +color15 #ffebc3 diff --git a/config/kitty/themes/kitty-themes/themes/FrontEndDelight.conf b/config/kitty/themes/kitty-themes/themes/FrontEndDelight.conf new file mode 100644 index 0000000..ccbf0d4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/FrontEndDelight.conf @@ -0,0 +1,21 @@ +background #1b1b1d +foreground #acacac +cursor #cccccc +selection_background #e96153 +color0 #242426 +color8 #5eac6c +color1 #f8501a +color9 #f64319 +color2 #565746 +color10 #74eb4c +color3 #f9761d +color11 #fcc224 +color4 #2c70b7 +color12 #3393c9 +color5 #f02d4e +color13 #e75e4e +color6 #3ba0a5 +color14 #4ebce5 +color7 #acacac +color15 #8b735a +selection_foreground #1b1b1d diff --git a/config/kitty/themes/kitty-themes/themes/FunForrest.conf b/config/kitty/themes/kitty-themes/themes/FunForrest.conf new file mode 100644 index 0000000..df8f4ee --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/FunForrest.conf @@ -0,0 +1,21 @@ +background #241200 +foreground #ddc165 +cursor #e5591c +selection_background #e5591c +color0 #000000 +color8 #7e6954 +color1 #d5252b +color9 #e4591b +color2 #909b00 +color10 #bfc659 +color3 #bd8a13 +color11 #ffca1b +color4 #4698a2 +color12 #7cc9ce +color5 #8c4231 +color13 #d16349 +color6 #d98112 +color14 #e6a96b +color7 #ddc165 +color15 #ffe9a3 +selection_foreground #241200 diff --git a/config/kitty/themes/kitty-themes/themes/Galaxy.conf b/config/kitty/themes/kitty-themes/themes/Galaxy.conf new file mode 100644 index 0000000..fab36a7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Galaxy.conf @@ -0,0 +1,21 @@ +background #1c2836 +foreground #ffffff +cursor #bbbbbb +selection_background #b4d5ff +color0 #000000 +color8 #545454 +color1 #f9555f +color9 #fa8b8e +color2 #20af89 +color10 #34bb99 +color3 #fdf029 +color11 #ffff55 +color4 #589cf5 +color12 #589cf5 +color5 #934d95 +color13 #e75598 +color6 #1e9ee6 +color14 #3978bb +color7 #bbbbbb +color15 #ffffff +selection_foreground #1c2836 diff --git a/config/kitty/themes/kitty-themes/themes/GitHub_Dark.conf b/config/kitty/themes/kitty-themes/themes/GitHub_Dark.conf new file mode 100644 index 0000000..27e21a0 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GitHub_Dark.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Dark +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #c9d1d9 +background #0d1117 +selection_foreground #0d1117 +selection_background #58a6ff + + +#: Cursor colors + +cursor #58a6ff + + +#: Tab bar colors + +tab_bar_background #010409 +active_tab_foreground #c9d1d9 +active_tab_background #0d1117 +inactive_tab_foreground #8b949e +inactive_tab_background #010409 + + +#: The basic 16 colors + +#: black +color0 #484f58 +color8 #6e7681 + +#: red +color1 #ff7b72 +color9 #ffa198 + +#: green +color2 #3fb950 +color10 #56d364 + +#: yellow +color3 #d29922 +color11 #e3b341 + +#: blue +color4 #58a6ff +color12 #79c0ff + +#: magenta +color5 #bc8cff +color13 #d2a8ff + +#: cyan +color6 #39c5cf +color14 #56d4dd + +#: white +color7 #b1bac4 +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/GitHub_Dark_Colorblind.conf b/config/kitty/themes/kitty-themes/themes/GitHub_Dark_Colorblind.conf new file mode 100644 index 0000000..e1d03bc --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GitHub_Dark_Colorblind.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Dark Colorblind +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #c9d1d9 +background #0d1117 +selection_foreground #0d1117 +selection_background #58a6ff + + +#: Cursor colors + +cursor #58a6ff + + +#: Tab bar colors + +tab_bar_background #010409 +active_tab_foreground #c9d1d9 +active_tab_background #0d1117 +inactive_tab_foreground #8b949e +inactive_tab_background #010409 + + +#: The basic 16 colors + +#: black +color0 #484f58 +color8 #6e7681 + +#: red +color1 #ec8e2c +color9 #fdac54 + +#: green +color2 #58a6ff +color10 #79c0ff + +#: yellow +color3 #d29922 +color11 #e3b341 + +#: blue +color4 #58a6ff +color12 #79c0ff + +#: magenta +color5 #bc8cff +color13 #d2a8ff + +#: cyan +color6 #39c5cf +color14 #56d4dd + +#: white +color7 #b1bac4 +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/GitHub_Dark_Dimmed.conf b/config/kitty/themes/kitty-themes/themes/GitHub_Dark_Dimmed.conf new file mode 100644 index 0000000..dbd1987 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GitHub_Dark_Dimmed.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Dark Dimmed +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #adbac7 +background #22272e +selection_foreground #22272e +selection_background #539bf5 + + +#: Cursor colors + +cursor #539bf5 + + +#: Tab bar colors + +tab_bar_background #1c2128 +active_tab_foreground #adbac7 +active_tab_background #22272e +inactive_tab_foreground #768390 +inactive_tab_background #1c2128 + + +#: The basic 16 colors + +#: black +color0 #545d68 +color8 #636e7b + +#: red +color1 #f47067 +color9 #ff938a + +#: green +color2 #57ab5a +color10 #6bc46d + +#: yellow +color3 #c69026 +color11 #daaa3f + +#: blue +color4 #539bf5 +color12 #6cb6ff + +#: magenta +color5 #b083f0 +color13 #dcbdfb + +#: cyan +color6 #39c5cf +color14 #56d4dd + +#: white +color7 #909dab +color15 #cdd9e5 diff --git a/config/kitty/themes/kitty-themes/themes/GitHub_Dark_High_Contrast.conf b/config/kitty/themes/kitty-themes/themes/GitHub_Dark_High_Contrast.conf new file mode 100644 index 0000000..7de5424 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GitHub_Dark_High_Contrast.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Dark High Contrast +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #f0f3f6 +background #0a0c10 +selection_foreground #0a0c10 +selection_background #71b7ff + + +#: Cursor colors + +cursor #71b7ff + + +#: Tab bar colors + +tab_bar_background #010409 +active_tab_foreground #f0f3f6 +active_tab_background #0a0c10 +inactive_tab_foreground #f0f3f6 +inactive_tab_background #010409 + + +#: The basic 16 colors + +#: black +color0 #7a828e +color8 #9ea7b3 + +#: red +color1 #ff9492 +color9 #ffb1af + +#: green +color2 #26cd4d +color10 #4ae168 + +#: yellow +color3 #f0b72f +color11 #f7c843 + +#: blue +color4 #71b7ff +color12 #91cbff + +#: magenta +color5 #cb9eff +color13 #dbb7ff + +#: cyan +color6 #39c5cf +color14 #56d4dd + +#: white +color7 #d9dee3 +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/GitHub_Light.conf b/config/kitty/themes/kitty-themes/themes/GitHub_Light.conf new file mode 100644 index 0000000..8fa2d1a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GitHub_Light.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Light +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #24292f +background #ffffff +selection_foreground #ffffff +selection_background #0969da + + +#: Cursor colors + +cursor #0969da + + +#: Tab bar colors + +tab_bar_background #f6f8fa +active_tab_foreground #24292f +active_tab_background #ffffff +inactive_tab_foreground #57606a +inactive_tab_background #f6f8fa + + +#: The basic 16 colors + +#: black +color0 #24292f +color8 #57606a + +#: red +color1 #cf222e +color9 #a40e26 + +#: green +color2 #116329 +color10 #1a7f37 + +#: yellow +color3 #4d2d00 +color11 #633c01 + +#: blue +color4 #0969da +color12 #218bff + +#: magenta +color5 #8250df +color13 #a475f9 + +#: cyan +color6 #1b7c83 +color14 #3192aa + +#: white +color7 #6e7781 +color15 #8c959f diff --git a/config/kitty/themes/kitty-themes/themes/GitHub_Light_Colorblind.conf b/config/kitty/themes/kitty-themes/themes/GitHub_Light_Colorblind.conf new file mode 100644 index 0000000..8ebc74e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GitHub_Light_Colorblind.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Light Colorblind +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #24292f +background #ffffff +selection_foreground #ffffff +selection_background #0969da + + +#: Cursor colors + +cursor #0969da + + +#: Tab bar colors + +tab_bar_background #f6f8fa +active_tab_foreground #24292f +active_tab_background #ffffff +inactive_tab_foreground #57606a +inactive_tab_background #f6f8fa + + +#: The basic 16 colors + +#: black +color0 #24292f +color8 #57606a + +#: red +color1 #b35900 +color9 #8a4600 + +#: green +color2 #0550ae +color10 #0969da + +#: yellow +color3 #4d2d00 +color11 #633c01 + +#: blue +color4 #0969da +color12 #218bff + +#: magenta +color5 #8250df +color13 #a475f9 + +#: cyan +color6 #1b7c83 +color14 #3192aa + +#: white +color7 #6e7781 +color15 #8c959f diff --git a/config/kitty/themes/kitty-themes/themes/GitHub_Light_High_Contrast.conf b/config/kitty/themes/kitty-themes/themes/GitHub_Light_High_Contrast.conf new file mode 100644 index 0000000..07c2f28 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GitHub_Light_High_Contrast.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Light High Contrast +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #0e1116 +background #ffffff +selection_foreground #ffffff +selection_background #0349b4 + + +#: Cursor colors + +cursor #0349b4 + + +#: Tab bar colors + +tab_bar_background #ffffff +active_tab_foreground #0e1116 +active_tab_background #ffffff +inactive_tab_foreground #0e1116 +inactive_tab_background #ffffff + + +#: The basic 16 colors + +#: black +color0 #0e1116 +color8 #4b535d + +#: red +color1 #a0111f +color9 #86061d + +#: green +color2 #024c1a +color10 #055d20 + +#: yellow +color3 #3f2200 +color11 #4e2c00 + +#: blue +color4 #0349b4 +color12 #1168e3 + +#: magenta +color5 #622cbc +color13 #844ae7 + +#: cyan +color6 #1b7c83 +color14 #3192aa + +#: white +color7 #66707b +color15 #88929d diff --git a/config/kitty/themes/kitty-themes/themes/Github.conf b/config/kitty/themes/kitty-themes/themes/Github.conf new file mode 100644 index 0000000..22122d7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Github.conf @@ -0,0 +1,21 @@ +background #f4f4f4 +foreground #3e3e3e +cursor #3f3f3f +selection_background #a9c1e2 +color0 #3e3e3e +color8 #666666 +color1 #970b16 +color9 #de0000 +color2 #07962a +color10 #87d5a2 +color3 #f7edc7 +color11 #f0cf06 +color4 #003e8a +color12 #2e6cba +color5 #e94691 +color13 #ffa29f +color6 #89d1ec +color14 #1cfafe +color7 #ffffff +color15 #ffffff +selection_foreground #f4f4f4 diff --git a/config/kitty/themes/kitty-themes/themes/Glacier.conf b/config/kitty/themes/kitty-themes/themes/Glacier.conf new file mode 100644 index 0000000..08de697 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Glacier.conf @@ -0,0 +1,21 @@ +background #0c1115 +foreground #ffffff +cursor #6c6c6c +selection_background #bd2523 +color0 #2e343c +color8 #404a55 +color1 #bd0f2f +color9 #bd0f2f +color2 #35a770 +color10 #49e998 +color3 #fb9435 +color11 #fddf6e +color4 #1f5872 +color12 #2a8bc1 +color5 #bd2523 +color13 #ea4727 +color6 #778397 +color14 #a0b6d3 +color7 #ffffff +color15 #ffffff +selection_foreground #0c1115 diff --git a/config/kitty/themes/kitty-themes/themes/Gnome-ish_gray-on-black.conf b/config/kitty/themes/kitty-themes/themes/Gnome-ish_gray-on-black.conf new file mode 100644 index 0000000..daa4a73 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Gnome-ish_gray-on-black.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Gnome-ish gray-on-black +## author: Ittner (https://www.ittner.com.br) +## license: GPLv3+ +## blurb: A theme based on the colors of the classic Gnome Terminal + + +#: The basic colors + +background #000000 +foreground #aaaaaa +selection_background #b4d5ff +selection_foreground #000000 + + +#: Cursor colors + +cursor #aaaaaa +cursor_text_color #111111 + + +#: URL underline color when hovering with mouse +url_color #0087bd + + +#: kitty window border colors and terminal bell colors + +active_border_color #00ff00 +inactive_border_color #cccccc +bell_border_color #ff5a00 +visual_bell_color none + + +#: OS Window titlebar colors + +wayland_titlebar_color system +macos_titlebar_color system + + +#: Tab bar colors + +active_tab_foreground #000 +active_tab_background #eee +inactive_tab_foreground #444 +inactive_tab_background #999 +tab_bar_background none +tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +mark1_foreground black +mark1_background #98d3cb +mark2_foreground black +mark2_background #f2dcd3 +mark3_foreground black +mark3_background #f274bc + + +#: The basic 16 colors + +color0 #1e1e1e +color8 #5d5d5d +color1 #c01c28 +color9 #f66151 +color2 #26a269 +color10 #33d17a +color3 #a2734c +color11 #e9ad0c +color4 #12488b +color12 #2a7bde +color5 #a347ba +color13 #c061cb +color6 #2aa1b3 +color14 #33c7de +color7 #cfcfcf +color15 #ffffff + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/GoaBase.conf b/config/kitty/themes/kitty-themes/themes/GoaBase.conf new file mode 100644 index 0000000..fcc6741 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GoaBase.conf @@ -0,0 +1,21 @@ +background #2f0033 +foreground #f6ed00 +cursor #1a6500 +selection_background #100a24 +color0 #880041 +color8 #411a6d +color1 #f78000 +color9 #f800e1 +color2 #249000 +color10 #5743ff +color3 #f40000 +color11 #ea00d7 +color4 #000482 +color12 #b90003 +color5 #f43bff +color13 #9a5952 +color6 #3affff +color14 #c8f9f3 +color7 #000000 +color15 #f5f4fb +selection_foreground #2f0033 diff --git a/config/kitty/themes/kitty-themes/themes/Grape.conf b/config/kitty/themes/kitty-themes/themes/Grape.conf new file mode 100644 index 0000000..38b8a18 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Grape.conf @@ -0,0 +1,21 @@ +background #161423 +foreground #9e9ea0 +cursor #a188f7 +selection_background #483d70 +color0 #2d283e +color8 #58506a +color1 #ec2160 +color9 #f0719a +color2 #1fa91b +color10 #52a95d +color3 #8ddc1f +color11 #b2dc87 +color4 #487cf4 +color12 #a9bbeb +color5 #8c35c8 +color13 #ac81c1 +color6 #3added +color14 #9ce3ea +color7 #9e9ea0 +color15 #a188f7 +selection_foreground #161423 diff --git a/config/kitty/themes/kitty-themes/themes/Grass.conf b/config/kitty/themes/kitty-themes/themes/Grass.conf new file mode 100644 index 0000000..ef9c321 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Grass.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #12773d +foreground #fff0a4 +cursor #8b2800 +selection_background #b64825 +color0 #000000 +color8 #545454 +color1 #ba0000 +color9 #ba0000 +color2 #00ba00 +color10 #00ba00 +color3 #e6af00 +color11 #e6af00 +color4 #0000a3 +color12 #0000ba +color5 #950062 +color13 #ff54ff +color6 #00baba +color14 #54ffff +color7 #bababa +color15 #ffffff +selection_foreground #12773d diff --git a/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkHard.conf b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkHard.conf new file mode 100644 index 0000000..44a3ad7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkHard.conf @@ -0,0 +1,47 @@ +# vim:ft=kitty +## name: Gruvbox Material Dark Hard +## author: Sainnhe Park +## license: MIT +## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-hard.conf +## blurb: A modified version of Gruvbox with softer contrasts + +background #1d2021 +foreground #d4be98 + +selection_background #d4be98 +selection_foreground #1d2021 + +cursor #a89984 +cursor_text_color background + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #d8a657 + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #d4be98 +color15 #d4be98 diff --git a/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkMedium.conf b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkMedium.conf new file mode 100644 index 0000000..88e7be9 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkMedium.conf @@ -0,0 +1,47 @@ +# vim:ft=kitty +## name: Gruvbox Material Dark Medium +## author: Sainnhe Park +## license: MIT +## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-medium.conf +## blurb: A modified version of Gruvbox with softer contrasts + +background #282828 +foreground #d4be98 + +selection_background #d4be98 +selection_foreground #282828 + +cursor #a89984 +cursor_text_color background + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #d8a657 + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #d4be98 +color15 #d4be98 diff --git a/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkSoft.conf b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkSoft.conf new file mode 100644 index 0000000..d6be541 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialDarkSoft.conf @@ -0,0 +1,47 @@ +# vim:ft=kitty +## name: Gruvbox Material Dark Soft +## author: Sainnhe Park +## license: MIT +## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-soft.conf +## blurb: A modified version of Gruvbox with softer contrasts + +background #32302f +foreground #d4be98 + +selection_background #d4be98 +selection_foreground #32302f + +cursor #a89984 +cursor_text_color background + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #d8a657 + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #d4be98 +color15 #d4be98 diff --git a/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightHard.conf b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightHard.conf new file mode 100644 index 0000000..be38bc5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightHard.conf @@ -0,0 +1,47 @@ +# vim:ft=kitty +## name: Gruvbox Material Light Hard +## author: Sainnhe Park +## license: MIT +## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-light-hard.conf +## blurb: A modified version of Gruvbox with softer contrasts + +background #f9f5d7 +foreground #654735 + +selection_background #654735 +selection_foreground #f9f5d7 + +cursor #928374 +cursor_text_color background + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c14a4a +color9 #c14a4a + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c35e0a +color11 #b47109 + +# Blue +color4 #45707a +color12 #45707a + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #654735 +color15 #654735 diff --git a/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightMedium.conf b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightMedium.conf new file mode 100644 index 0000000..dfd3a32 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightMedium.conf @@ -0,0 +1,47 @@ +# vim:ft=kitty +## name: Gruvbox Material Light Medium +## author: Sainnhe Park +## license: MIT +## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-light-medium.conf +## blurb: A modified version of Gruvbox with softer contrasts + +background #fbf1c7 +foreground #654735 + +selection_background #654735 +selection_foreground #fbf1c7 + +cursor #928374 +cursor_text_color background + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c14a4a +color9 #c14a4a + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c35e0a +color11 #b47109 + +# Blue +color4 #45707a +color12 #45707a + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #654735 +color15 #654735 diff --git a/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightSoft.conf b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightSoft.conf new file mode 100644 index 0000000..ee4040f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/GruvboxMaterialLightSoft.conf @@ -0,0 +1,47 @@ +# vim:ft=kitty +## name: Gruvbox Material Light Soft +## author: Sainnhe Park +## license: MIT +## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-light-soft.conf +## blurb: A modified version of Gruvbox with softer contrasts + +background #f2e5bc +foreground #654735 + +selection_background #654735 +selection_foreground #f2e5bc + +cursor #928374 +cursor_text_color background + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c14a4a +color9 #c14a4a + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c35e0a +color11 #b47109 + +# Blue +color4 #45707a +color12 #45707a + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #654735 +color15 #654735 diff --git a/config/kitty/themes/kitty-themes/themes/HachikoRed.conf b/config/kitty/themes/kitty-themes/themes/HachikoRed.conf new file mode 100644 index 0000000..0123f29 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/HachikoRed.conf @@ -0,0 +1,46 @@ +## name: Hachiko +## author: Mert18 + +# Cursor colors +cursor #FF7979 +cursor_text_color #111111 + +# Color Schemes +active_tab_foreground #FFFAFA +active_tab_background #B1003C +active_tab_font_style bold +inactive_tab_foreground #B1003C +inactive_tab_background #FFFAFA +tab_bar_margin_color none + +mark1_foreground #FFFAFA +mark1_background #870300 + +active_border_color #FFFAFA +inactive_border_color #870300 +bell_border_color #870300 +visual_bell_color none + +selection_foreground #FFFAFA +selection_background #870300 + +url_color #FF7979 + +color0 #181818 +color8 #333333 +color1 #960042 +color9 #870300 +color2 #FF0000 +color10 #690000 +color3 #FF5D05 +color11 #6F2700 +color4 #FF2044 +color5 #FFEDCF +color12 #333333 +color13 #FFFFB5 +color6 #6F0027 +color14 #F50056 +color7 #FFDAF1 +color15 #FFE6DA +#white + diff --git a/config/kitty/themes/kitty-themes/themes/Hardcore.conf b/config/kitty/themes/kitty-themes/themes/Hardcore.conf new file mode 100644 index 0000000..9af78ea --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Hardcore.conf @@ -0,0 +1,21 @@ +background #121212 +foreground #a0a0a0 +cursor #bbbbbb +selection_background #453a39 +color0 #1b1d1e +color8 #505354 +color1 #f92672 +color9 #ff669d +color2 #a6e22e +color10 #beed5f +color3 #fd971f +color11 #e6db74 +color4 #66d9ef +color12 #66d9ef +color5 #9e6ffe +color13 #9e6ffe +color6 #5e7175 +color14 #a3babf +color7 #ccccc6 +color15 #f8f8f2 +selection_foreground #121212 diff --git a/config/kitty/themes/kitty-themes/themes/Harper.conf b/config/kitty/themes/kitty-themes/themes/Harper.conf new file mode 100644 index 0000000..2579aac --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Harper.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #a7a39c +cursor #a7a39c +selection_background #5a5753 +color0 #000000 +color8 #716d69 +color1 #f7b63e +color9 #f7b63e +color2 #7fb5e1 +color10 #7fb5e1 +color3 #d6da24 +color11 #d6da24 +color4 #489d48 +color12 #489d48 +color5 #b295c5 +color13 #b295c5 +color6 #f4bed6 +color14 #f4bed6 +color7 #a7a39c +color15 #fefbe9 +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Highway.conf b/config/kitty/themes/kitty-themes/themes/Highway.conf new file mode 100644 index 0000000..f0dfa4d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Highway.conf @@ -0,0 +1,21 @@ +background #212224 +foreground #ededed +cursor #dfd9b8 +selection_background #384563 +color0 #000000 +color8 #5c4f49 +color1 #cf0d17 +color9 #ef7d17 +color2 #128033 +color10 #b1d130 +color3 #ffca3d +color11 #fff11f +color4 #006ab3 +color12 #4fc2fd +color5 #6a2674 +color13 #de0070 +color6 #384563 +color14 #5c4f49 +color7 #ededed +color15 #fefffe +selection_foreground #212224 diff --git a/config/kitty/themes/kitty-themes/themes/Hipster_Green.conf b/config/kitty/themes/kitty-themes/themes/Hipster_Green.conf new file mode 100644 index 0000000..26adfe7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Hipster_Green.conf @@ -0,0 +1,21 @@ +background #0f0a05 +foreground #84c137 +cursor #23ff18 +selection_background #083905 +color0 #000000 +color8 #666666 +color1 #b6204a +color9 #e50000 +color2 #00a600 +color10 #86a83e +color3 #bebe00 +color11 #e5e500 +color4 #246db2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bfbfbf +color15 #e5e5e5 +selection_foreground #0f0a05 diff --git a/config/kitty/themes/kitty-themes/themes/Homebrew.conf b/config/kitty/themes/kitty-themes/themes/Homebrew.conf new file mode 100644 index 0000000..d96bb72 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Homebrew.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #000000 +foreground #00ff00 +cursor #23ff18 +selection_background #083905 +color0 #000000 +color8 #666666 +color1 #990000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #0000b2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bebebe +color15 #e5e5e5 +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Hurtado.conf b/config/kitty/themes/kitty-themes/themes/Hurtado.conf new file mode 100644 index 0000000..1ca0421 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Hurtado.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #dadbda +cursor #bbbbbb +selection_background #b4d5ff +color0 #575757 +color8 #252525 +color1 #ff1b00 +color9 #d41c00 +color2 #a5df55 +color10 #a5df55 +color3 #fbe74a +color11 #fbe749 +color4 #486387 +color12 #89bdff +color5 #fc5ef0 +color13 #bf00c0 +color6 #85e9fe +color14 #85e9fe +color7 #cbcbcb +color15 #dbdbdb +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Hybrid.conf b/config/kitty/themes/kitty-themes/themes/Hybrid.conf new file mode 100644 index 0000000..8f9dc50 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Hybrid.conf @@ -0,0 +1,21 @@ +background #161718 +foreground #b7bcb9 +cursor #b7bcb9 +selection_background #1e1f22 +color0 #2a2e33 +color8 #1d1e21 +color1 #b74d50 +color9 #8c2d32 +color2 #b3be5a +color10 #788331 +color3 #e3b55e +color11 #e5894f +color4 #6d90b0 +color12 #4b6b88 +color5 #a07eab +color13 #6e4f79 +color6 #7fbeb3 +color14 #4d7b73 +color7 #b5b8b6 +color15 #5a6169 +selection_foreground #161718 diff --git a/config/kitty/themes/kitty-themes/themes/IC_Green_PPL.conf b/config/kitty/themes/kitty-themes/themes/IC_Green_PPL.conf new file mode 100644 index 0000000..35587dd --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/IC_Green_PPL.conf @@ -0,0 +1,21 @@ +background #3a3c3e +foreground #d9eed2 +cursor #41ff58 +selection_background #2a9b34 +color0 #1e1e1e +color8 #03260f +color1 #fb0029 +color9 #a6ff3e +color2 #329b24 +color10 #9fff6d +color3 #649a25 +color11 #d1ff6d +color4 #149b45 +color12 #72ffb5 +color5 #53b82b +color13 #50ff3d +color6 #2bb767 +color14 #22ff71 +color7 #dffeee +color15 #daeed0 +selection_foreground #3a3c3e diff --git a/config/kitty/themes/kitty-themes/themes/IC_Orange_PPL.conf b/config/kitty/themes/kitty-themes/themes/IC_Orange_PPL.conf new file mode 100644 index 0000000..b8dead8 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/IC_Orange_PPL.conf @@ -0,0 +1,21 @@ +background #262626 +foreground #ffcb83 +cursor #fb521c +selection_background #c03f1f +color0 #000000 +color8 #6a4e29 +color1 #c03900 +color9 #ff8b67 +color2 #a3a900 +color10 #f6ff3f +color3 #caae00 +color11 #ffe36e +color4 #bd6c00 +color12 #ffbd54 +color5 #fb5d00 +color13 #fc874f +color6 #f79400 +color14 #c59752 +color7 #ffc88a +color15 #f9f9fe +selection_foreground #262626 diff --git a/config/kitty/themes/kitty-themes/themes/IR_Black.conf b/config/kitty/themes/kitty-themes/themes/IR_Black.conf new file mode 100644 index 0000000..5b8709b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/IR_Black.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #f1f1f1 +cursor #7f7f7f +selection_background #b4d5ff +color0 #4f4f4f +color8 #7b7b7b +color1 #fa6c5f +color9 #fcb6af +color2 #a8fe60 +color10 #ceffab +color3 #fffeb6 +color11 #fffecc +color4 #96cafd +color12 #b5dcfe +color5 #fa72fc +color13 #fb9bfe +color6 #c6c4fd +color14 #dfdffd +color7 #eeedee +color15 #fefffe +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Jackie_Brown.conf b/config/kitty/themes/kitty-themes/themes/Jackie_Brown.conf new file mode 100644 index 0000000..08a72e4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Jackie_Brown.conf @@ -0,0 +1,21 @@ +background #2c1c15 +foreground #ffcc2f +cursor #23ff18 +selection_background #ae8c20 +color0 #2c1d16 +color8 #666666 +color1 #ef5734 +color9 #e50000 +color2 #2baf2b +color10 #86a83e +color3 #bdbe00 +color11 #e5e500 +color4 #246db2 +color12 #0000ff +color5 #cf5ec0 +color13 #e500e5 +color6 #00acee +color14 #00e5e5 +color7 #bfbfbf +color15 #e5e5e5 +selection_foreground #2c1c15 diff --git a/config/kitty/themes/kitty-themes/themes/Japanesque.conf b/config/kitty/themes/kitty-themes/themes/Japanesque.conf new file mode 100644 index 0000000..c045273 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Japanesque.conf @@ -0,0 +1,21 @@ +background #1d1d1d +foreground #f7f6ec +cursor #eccf4f +selection_background #165776 +color0 #343835 +color8 #585a58 +color1 #ce3e60 +color9 #d18ea6 +color2 #7bb75b +color10 #767e2b +color3 #e8b32a +color11 #77592e +color4 #4c99d3 +color12 #135879 +color5 #a57fc4 +color13 #5f4190 +color6 #389aac +color14 #76bbca +color7 #f9faf6 +color15 #b1b5ae +selection_foreground #1d1d1d diff --git a/config/kitty/themes/kitty-themes/themes/Jellybeans.conf b/config/kitty/themes/kitty-themes/themes/Jellybeans.conf new file mode 100644 index 0000000..bac5fb7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Jellybeans.conf @@ -0,0 +1,21 @@ +background #111111 +foreground #dedede +cursor #ffa460 +selection_background #464d91 +color0 #919191 +color8 #bdbdbd +color1 #e17373 +color9 #ffa0a0 +color2 #94b978 +color10 #bddeab +color3 #ffb97b +color11 #ffdba0 +color4 #96bddb +color12 #b1d7f6 +color5 #e1c0fa +color13 #fbdaff +color6 #00988e +color14 #19b2a7 +color7 #dedede +color15 #ffffff +selection_foreground #111111 diff --git a/config/kitty/themes/kitty-themes/themes/JetBrains_Darcula.conf b/config/kitty/themes/kitty-themes/themes/JetBrains_Darcula.conf new file mode 100644 index 0000000..64ac146 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/JetBrains_Darcula.conf @@ -0,0 +1,21 @@ +background #202020 +foreground #adadad +cursor #ffffff +selection_background #1a3272 +color0 #000000 +color8 #545454 +color1 #fa5355 +color9 #fb7172 +color2 #126e00 +color10 #67ff4f +color3 #c2c300 +color11 #ffff00 +color4 #4581eb +color12 #6d9df1 +color5 #fa54ff +color13 #fb82ff +color6 #33c2c1 +color14 #60d3d1 +color7 #adadad +color15 #eeeeee +selection_foreground #202020 diff --git a/config/kitty/themes/kitty-themes/themes/Kaolin_Aurora.conf b/config/kitty/themes/kitty-themes/themes/Kaolin_Aurora.conf new file mode 100644 index 0000000..8604d89 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kaolin_Aurora.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Aurora +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Kaolin meets polar lights. + + +# The basic colors +foreground #e6e6e8 +background #14191e +selection_foreground #14191e +selection_background #e6e6e8 + +# Cursor colors +cursor #e6e6e8 +cursor_text_color #14191e + +# kitty window border colors +active_border_color #49bdb0 +inactive_border_color #454459 + +# Tab bar colors +active_tab_background #e6e6e8 +active_tab_foreground #14191e +inactive_tab_background #454459 +inactive_tab_foreground #14191e + +# black +color0 #14191e +color8 #454459 + +# red +color1 #e55c7a +color9 #cd5c60 + +# green +color2 #31E183 +color10 #7CF083 + +# yellow +color3 #f5c791 +color11 #dbac66 + +# blue +color4 #4ca6e8 +color12 #91b9c7 + +# magenta +color5 #9d81ba +color13 #6E6884 + +# cyan +color6 #49bdb0 +color14 #0D9C94 + +# white +color7 #e6e6e8 +color15 #f2f2f2 diff --git a/config/kitty/themes/kitty-themes/themes/Kaolin_Breeze.conf b/config/kitty/themes/kitty-themes/themes/Kaolin_Breeze.conf new file mode 100644 index 0000000..6cd1281 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kaolin_Breeze.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Breeze +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Light Kaolin theme with soft colors + + +# The basic colors +foreground #383e3f +background #EBE8E4 +selection_foreground #EBE8E4 +selection_background #383e3f + +# Cursor colors +cursor #383e3f +cursor_text_color #EBE8E4 + +# kitty window border colors +active_border_color #48a9a9 +inactive_border_color #7D8468 + +# Tab bar colors +active_tab_background #383e3f +active_tab_foreground #C9C2BD +inactive_tab_background #7D8468 +inactive_tab_foreground #EBE8E4 + +# black +color0 #383e3f +color8 #7D8468 + +# red +color1 #cd5c60 +color9 #ef6787 + +# green +color2 #39855f +color10 #3e594e + +# yellow +color3 #b87e3c +color11 #d1832e + +# blue +color4 #2683b5 +color12 #4F9CB8 + +# magenta +color5 #845A84 +color13 #605DB3 + +# cyan +color6 #48a9a9 +color14 #008b8b + +# white +color7 #C9C2BD +color15 #60696b diff --git a/config/kitty/themes/kitty-themes/themes/Kaolin_Dark.conf b/config/kitty/themes/kitty-themes/themes/Kaolin_Dark.conf new file mode 100644 index 0000000..5de905c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kaolin_Dark.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Dark +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Dark jade theme inspired by Sierra.vim. + + +# The basic colors +foreground #E4E4E8 +background #18181B +selection_foreground #18181B +selection_background #E4E4E8 + +# Cursor colors +cursor #E4E4E8 +cursor_text_color #ffffff + +# kitty window border colors +active_border_color #4D9391 +inactive_border_color #4B5254 + +# Tab bar colors +active_tab_background #E4E4E8 +active_tab_foreground #18181B +inactive_tab_background #879193 +inactive_tab_foreground #18181B + +# black +color0 #4B5254 +color8 #879193 + +# red +color1 #CD5C60 +color9 #E36D5B + +# green +color2 #6FB593 +color10 #72CCBA + +# yellow +color3 #DBAC66 +color11 #F2C866 + +# blue +color4 #91B9C7 +color12 #97B8DE + +# magenta +color5 #845A84 +color13 #8C629C + +# cyan +color6 #4D9391 +color14 #5096AB + +# white +color7 #E4E4E8 +color15 #EFEFF1 diff --git a/config/kitty/themes/kitty-themes/themes/Kaolin_Galaxy.conf b/config/kitty/themes/kitty-themes/themes/Kaolin_Galaxy.conf new file mode 100644 index 0000000..4c91c8f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kaolin_Galaxy.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Galaxy +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Theme based on one of the Sebastian Andaur arts + + +# The basic colors +foreground #e6e6e8 +background #212026 +selection_foreground #212026 +selection_background #e6e6e8 + +# Cursor colors +cursor #e6e6e8 +cursor_text_color #212026 + +# kitty window border colors +active_border_color #6bd9db +inactive_border_color #615B75 + +# Tab bar colors +active_tab_background #e6e6e8 +active_tab_foreground #212026 +inactive_tab_background #615B75 +inactive_tab_foreground #212026 + +# black +color0 #212026 +color8 #615B75 + +# red +color1 #ef6787 +color9 #D6224D + +# green +color2 #49bdb0 +color10 #6dd797 + +# yellow +color3 #eed891 +color11 #f5c791 + +# blue +color4 #41b0f3 +color12 #2a57cc + +# magenta +color5 #cea2ca +color13 #9d81ba + +# cyan +color6 #6bd9db +color14 #0bc9cf + +# white +color7 #e6e6e8 +color15 #f2f2f2 diff --git a/config/kitty/themes/kitty-themes/themes/Kaolin_Light.conf b/config/kitty/themes/kitty-themes/themes/Kaolin_Light.conf new file mode 100644 index 0000000..5ed4ce1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kaolin_Light.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Light +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Light variant of the original Kaolin Dark theme. + + +# The basic colors +foreground #353b3c +background #EDEEEB +selection_foreground #EDEEEB +selection_background #353b3c + +# Cursor colors +cursor #353b3c +cursor_text_color #EDEEEB + +# kitty window border colors +active_border_color #6facb3 +inactive_border_color #353b3c + +# Tab bar colors +active_tab_background #353b3c +active_tab_foreground #C8CCC3 +inactive_tab_background #4b5254 +inactive_tab_foreground #EDEEEB + +# black +color0 #353b3c +color8 #4b5254 + +# red +color1 #e84c58 +color9 #e84c58 + +# green +color2 #13665F +color10 #317A56 + +# yellow +color3 #E36B3F +color11 #C5882C + +# blue +color4 #3B84CC +color12 #4C7A90 + +# magenta +color5 #a9779c +color13 #6D46E3 + +# cyan +color6 #6facb3 +color14 #008b8b + +# white +color7 #C8CCC3 +color15 #4b5254 diff --git a/config/kitty/themes/kitty-themes/themes/Kaolin_Ocean.conf b/config/kitty/themes/kitty-themes/themes/Kaolin_Ocean.conf new file mode 100644 index 0000000..707076f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kaolin_Ocean.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Ocean +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Dark blue Kaolin theme + + +# The basic colors +foreground #e6e6e8 +background #14141e +selection_foreground #14141e +selection_background #e6e6e8 + +# Cursor colors +cursor #e6e6e8 +cursor_text_color #14141e + +# kitty window border colors +active_border_color #6bd9db +inactive_border_color #545c5e + +# Tab bar colors +active_tab_background #e6e6e8 +active_tab_foreground #14141e +inactive_tab_background #545c5e +inactive_tab_foreground #14141e + +# black +color0 #14141e +color8 #545c5e + +# red +color1 #e84c58 +color9 #e84c58 + +# green +color2 #35BF88 +color10 #7CF083 + +# yellow +color3 #dbac66 +color11 #eed891 + +# blue +color4 #4ca6e8 +color12 #53859d + +# magenta +color5 #c79af4 +color13 #cea2ca + +# cyan +color6 #6bd9db +color14 #4d9391 + +# white +color7 #e6e6e8 +color15 #bebec4 diff --git a/config/kitty/themes/kitty-themes/themes/Kaolin_Temple.conf b/config/kitty/themes/kitty-themes/themes/Kaolin_Temple.conf new file mode 100644 index 0000000..c9cbb65 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kaolin_Temple.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Temple +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Dark theme where terrestrial sphere imbues the spirit + + +# The basic colors +foreground #EEDCC1 +background #2B2B2F +selection_foreground #2B2B2F +selection_background #EEDCC1 + +# Cursor colors +cursor #EEDCC1 +cursor_text_color #2B2B2F + +# kitty window border colors +active_border_color #49bdb0 +inactive_border_color #697375 + +# Tab bar colors +active_tab_background #EEDCC1 +active_tab_foreground #2B2B2F +inactive_tab_background #697375 +inactive_tab_foreground #2B2B2F + +# black +color0 #2B2B2F +color8 #697375 + +# red +color1 #ef6787 +color9 #BA667D + +# green +color2 #47ba99 +color10 #74B09A + +# yellow +color3 #eed891 +color11 #f5c791 + +# blue +color4 #4EB8CA +color12 #91b9c7 + +# magenta +color5 #fbaed2 +color13 #c791aa + +# cyan +color6 #49bdb0 +color14 #4FA8A3 + +# white +color7 #EEDCC1 +color15 #bebec4 diff --git a/config/kitty/themes/kitty-themes/themes/Kibble.conf b/config/kitty/themes/kitty-themes/themes/Kibble.conf new file mode 100644 index 0000000..3b13105 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Kibble.conf @@ -0,0 +1,21 @@ +background #0e100a +foreground #f7f7f7 +cursor #9fda9c +selection_background #9ba686 +color0 #4d4d4d +color8 #5a5a5a +color1 #c70031 +color9 #f01578 +color2 #29cf13 +color10 #6ce05c +color3 #d8e30e +color11 #f3f79e +color4 #3449d1 +color12 #97a4f7 +color5 #8400ff +color13 #c495f0 +color6 #0798ab +color14 #68f2e0 +color7 #e2d1e3 +color15 #ffffff +selection_foreground #0e100a diff --git a/config/kitty/themes/kitty-themes/themes/Later_This_Evening.conf b/config/kitty/themes/kitty-themes/themes/Later_This_Evening.conf new file mode 100644 index 0000000..1354788 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Later_This_Evening.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #949494 +cursor #424242 +selection_background #424242 +color0 #2b2b2b +color8 #444747 +color1 #d35a5f +color9 #d3222e +color2 #afba66 +color10 #aabb39 +color3 #e5d289 +color11 #e4bd39 +color4 #a0b9d5 +color12 #6599d5 +color5 #bf92d5 +color13 #aa52d5 +color6 #91beb6 +color14 #5fbfad +color7 #3b3c3c +color15 #c0c2c2 +selection_foreground #212121 diff --git a/config/kitty/themes/kitty-themes/themes/Lavandula.conf b/config/kitty/themes/kitty-themes/themes/Lavandula.conf new file mode 100644 index 0000000..14aa7aa --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Lavandula.conf @@ -0,0 +1,21 @@ +background #050014 +foreground #736d7c +cursor #8b91fa +selection_background #36323b +color0 #230045 +color8 #362c45 +color1 #7c1525 +color9 #df5066 +color2 #337e6f +color10 #52e0c4 +color3 #7f6f49 +color11 #e0c286 +color4 #4f4a7f +color12 #8e86df +color5 #593f7e +color13 #a675df +color6 #57767f +color14 #9ad3df +color7 #736d7c +color15 #8b91fa +selection_foreground #050014 diff --git a/config/kitty/themes/kitty-themes/themes/LiquidCarbon.conf b/config/kitty/themes/kitty-themes/themes/LiquidCarbon.conf new file mode 100644 index 0000000..2f3a994 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/LiquidCarbon.conf @@ -0,0 +1,21 @@ +background #2f2f2f +foreground #afc2c2 +cursor #ffffff +selection_background #7cbeff +color0 #000000 +color8 #000000 +color1 #ff2f2f +color9 #ff2f2f +color2 #549a6f +color10 #549a6f +color3 #ccac00 +color11 #ccac00 +color4 #0099cc +color12 #0099cc +color5 #cc68c8 +color13 #cc68c8 +color6 #79c4cc +color14 #79c4cc +color7 #bccccc +color15 #bccccc +selection_foreground #2f2f2f diff --git a/config/kitty/themes/kitty-themes/themes/LiquidCarbonTransparent.conf b/config/kitty/themes/kitty-themes/themes/LiquidCarbonTransparent.conf new file mode 100644 index 0000000..41e5f89 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/LiquidCarbonTransparent.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #afc2c2 +cursor #ffffff +selection_background #7cbeff +color0 #000000 +color8 #000000 +color1 #ff2f2f +color9 #ff2f2f +color2 #549a6f +color10 #549a6f +color3 #ccac00 +color11 #ccac00 +color4 #0099cc +color12 #0099cc +color5 #cc68c8 +color13 #cc68c8 +color6 #79c4cc +color14 #79c4cc +color7 #bccccc +color15 #bccccc +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/LiquidCarbonTransparentInverse.conf b/config/kitty/themes/kitty-themes/themes/LiquidCarbonTransparentInverse.conf new file mode 100644 index 0000000..d584624 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/LiquidCarbonTransparentInverse.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #afc2c2 +cursor #ffffff +selection_background #7cbeff +color0 #bbcbcc +color8 #ffffff +color1 #ff2f2f +color9 #ff2f2f +color2 #549a6f +color10 #549a6f +color3 #ccac00 +color11 #ccac00 +color4 #0099cc +color12 #0099cc +color5 #cc68c8 +color13 #cc68c8 +color6 #79c4cc +color14 #79c4cc +color7 #000000 +color15 #000000 +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Man_Page.conf b/config/kitty/themes/kitty-themes/themes/Man_Page.conf new file mode 100644 index 0000000..7c8aa38 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Man_Page.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #fef49c +foreground #000000 +cursor #7f7f7f +selection_background #a4c9cd +color0 #000000 +color8 #666666 +color1 #cc0000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #0000b2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #cccccc +color15 #e5e5e5 +selection_foreground #fef49c diff --git a/config/kitty/themes/kitty-themes/themes/Material.conf b/config/kitty/themes/kitty-themes/themes/Material.conf new file mode 100644 index 0000000..ba38846 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Material.conf @@ -0,0 +1,21 @@ +background #eaeaea +foreground #222221 +cursor #16aec9 +selection_background #c1c1c1 +color0 #212121 +color8 #424242 +color1 #b7141e +color9 #e83a3f +color2 #457b23 +color10 #7aba39 +color3 #f5971d +color11 #fee92e +color4 #134eb2 +color12 #53a4f3 +color5 #550087 +color13 #a94dbb +color6 #0e707c +color14 #26bad1 +color7 #eeeeee +color15 #d8d8d8 +selection_foreground #eaeaea diff --git a/config/kitty/themes/kitty-themes/themes/MaterialDark.conf b/config/kitty/themes/kitty-themes/themes/MaterialDark.conf new file mode 100644 index 0000000..e599021 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/MaterialDark.conf @@ -0,0 +1,21 @@ +background #222221 +foreground #e4e4e4 +cursor #16aec9 +selection_background #dedede +color0 #212121 +color8 #424242 +color1 #b7141e +color9 #e83a3f +color2 #457b23 +color10 #7aba39 +color3 #f5971d +color11 #fee92e +color4 #134eb2 +color12 #53a4f3 +color5 #550087 +color13 #a94dbb +color6 #0e707c +color14 #26bad1 +color7 #eeeeee +color15 #d8d8d8 +selection_foreground #222221 diff --git a/config/kitty/themes/kitty-themes/themes/Mathias.conf b/config/kitty/themes/kitty-themes/themes/Mathias.conf new file mode 100644 index 0000000..cd1ab14 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Mathias.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #bbbbbb +cursor #bbbbbb +selection_background #545454 +color0 #000000 +color8 #545454 +color1 #e52222 +color9 #ff5555 +color2 #a6e32d +color10 #55ff55 +color3 #fc951e +color11 #ffff55 +color4 #c48dff +color12 #5555ff +color5 #fa2573 +color13 #ff55ff +color6 #67d9f0 +color14 #55ffff +color7 #f2f2f2 +color15 #ffffff +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Medallion.conf b/config/kitty/themes/kitty-themes/themes/Medallion.conf new file mode 100644 index 0000000..0ad8805 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Medallion.conf @@ -0,0 +1,21 @@ +background #1d1808 +foreground #cac296 +cursor #d3b92f +selection_background #616cab +color0 #000000 +color8 #5e5118 +color1 #b54c00 +color9 #ff9148 +color2 #7c8a16 +color10 #b1c93a +color3 #d2bd25 +color11 #ffe449 +color4 #606baf +color12 #abb8ff +color5 #8b5990 +color13 #fe9fff +color6 #906b25 +color14 #ffbb51 +color7 #c9c199 +color15 #fed597 +selection_foreground #1d1808 diff --git a/config/kitty/themes/kitty-themes/themes/Misterioso.conf b/config/kitty/themes/kitty-themes/themes/Misterioso.conf new file mode 100644 index 0000000..1960f9b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Misterioso.conf @@ -0,0 +1,21 @@ +background #2d3743 +foreground #e1e1e0 +cursor #000000 +selection_background #2d37ff +color0 #000000 +color8 #545454 +color1 #ff4141 +color9 #ff3241 +color2 #74ae68 +color10 #74cc68 +color3 #ffac28 +color11 #ffb928 +color4 #338e86 +color12 #23d6d6 +color5 #9413e5 +color13 #ff37ff +color6 #23d6d6 +color14 #00ece1 +color7 #e1e1df +color15 #ffffff +selection_foreground #2d3743 diff --git a/config/kitty/themes/kitty-themes/themes/Modus_Operandi.conf b/config/kitty/themes/kitty-themes/themes/Modus_Operandi.conf new file mode 100644 index 0000000..d0756fe --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Modus_Operandi.conf @@ -0,0 +1,60 @@ +# vim:ft=kitty + +## name: Modus Operandi +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, conforming with the highest +## standard for colour contrast between background and foreground values (WCAG AAA) + +# The basic colors +foreground #000000 +background #ffffff +selection_foreground #000000 +selection_background #bcbcbc + +# Cursor colors +cursor #000000 +cursor_text_color #ffffff + +# kitty window border colors +active_border_color #193668 +inactive_border_color #9f9f9f + +# Tab bar colors +active_tab_foreground #000000 +active_tab_background #c4c4c4 +inactive_tab_foreground #585858 +inactive_tab_background #e3e3e3 + +# The basic 16 colors +# black +color0 #000000 +color8 #585858 + +# red +color1 #a60000 +color9 #972500 + +# green +color2 #006800 +color10 #316500 + +# yellow +color3 #6f5500 +color11 #884900 + +# blue +color4 #0031a9 +color12 #354fcf + +# magenta +color5 #721045 +color13 #531ab6 + +# cyan +color6 #00538b +color14 #005a5f + +# white +color7 #c4c4c4 +color15 #595959 diff --git a/config/kitty/themes/kitty-themes/themes/Modus_Operandi_Tinted.conf b/config/kitty/themes/kitty-themes/themes/Modus_Operandi_Tinted.conf new file mode 100644 index 0000000..3678272 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Modus_Operandi_Tinted.conf @@ -0,0 +1,60 @@ +# vim:ft=kitty + +## name: Modus Operandi Tinted +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, conforming with the highest +## standard for colour contrast between background and foreground values (WCAG AAA) + +# The basic colors +foreground #000000 +background #fbf7f0 +selection_foreground #000000 +selection_background #bcbcbc + +# Cursor colors +cursor #000000 +cursor_text_color #fbf7f0 + +# kitty window border colors +active_border_color #193668 +inactive_border_color #9f9f9f + +# Tab bar colors +active_tab_foreground #000000 +active_tab_background #c9b8b1 +inactive_tab_foreground #585858 +inactive_tab_background #dfd6cd + +# The basic 16 colors +# black +color0 #000000 +color8 #585858 + +# red +color1 #a60000 +color9 #972500 + +# green +color2 #006800 +color10 #316500 + +# yellow +color3 #6f5500 +color11 #884900 + +# blue +color4 #0031a9 +color12 #354fcf + +# magenta +color5 #721045 +color13 #531ab6 + +# cyan +color6 #00538b +color14 #005a5f + +# white +color7 #c9b8b1 +color15 #585858 diff --git a/config/kitty/themes/kitty-themes/themes/Modus_Vivendi.conf b/config/kitty/themes/kitty-themes/themes/Modus_Vivendi.conf new file mode 100644 index 0000000..26efe59 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Modus_Vivendi.conf @@ -0,0 +1,60 @@ +# vim:ft=kitty + +## name: Modus Vivendi +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, conforming with the highest +## standard for colour contrast between background and foreground values (WCAG AAA) + +# The basic colors +foreground #ffffff +background #000000 +selection_foreground #ffffff +selection_background #5c5c5c + +# Cursor colors +cursor #ffffff +cursor_text_color #000000 + +# kitty window border colors +active_border_color #c6daff +inactive_border_color #646464 + +# Tab bar colors +active_tab_foreground #ffffff +active_tab_background #545454 +inactive_tab_foreground #969696 +inactive_tab_background #2f2f2f + +# The basic 16 colors +# black +color0 #000000 +color8 #595959 + +# red +color1 #ff5f59 +color9 #ff7f9f + +# green +color2 #44bc44 +color10 #70b900 + +# yellow +color3 #d0bc00 +color11 #fec43f + +# blue +color4 #2fafff +color12 #79a8ff + +# magenta +color5 #feacd0 +color13 #b6a0ff + +# cyan +color6 #00d3d0 +color14 #6ae4b9 + +# white +color7 #989898 +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Modus_Vivendi_Tinted.conf b/config/kitty/themes/kitty-themes/themes/Modus_Vivendi_Tinted.conf new file mode 100644 index 0000000..eaa3e06 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Modus_Vivendi_Tinted.conf @@ -0,0 +1,60 @@ +# vim:ft=kitty + +## name: Modus Vivendi Tinted +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, conforming with the highest +## standard for colour contrast between background and foreground values (WCAG AAA) + +# The basic colors +foreground #ffffff +background #0d0e1c +selection_foreground #ffffff +selection_background #5c5c5c + +# Cursor colors +cursor #ffffff +cursor_text_color #0d0e1c + +# kitty window border colors +active_border_color #c6daff +inactive_border_color #595959 + +# Tab bar colors +active_tab_foreground #ffffff +active_tab_background #4a4f6a +inactive_tab_foreground #969696 +inactive_tab_background #2b3046 + +# The basic 16 colors +# black +color0 #0d0e1c +color8 #595959 + +# red +color1 #ff5f59 +color9 #ff7f9f + +# green +color2 #44bc44 +color10 #70b900 + +# yellow +color3 #d0bc00 +color11 #fec43f + +# blue +color4 #2fafff +color12 #79a8ff + +# magenta +color5 #feacd0 +color13 #b6a0ff + +# cyan +color6 #00d3d0 +color14 #6ae4b9 + +# white +color7 #989898 +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Molokai.conf b/config/kitty/themes/kitty-themes/themes/Molokai.conf new file mode 100644 index 0000000..cd35d1f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Molokai.conf @@ -0,0 +1,21 @@ +background #121212 +foreground #bbbbbb +cursor #bbbbbb +selection_background #b4d5ff +color0 #121212 +color8 #545454 +color1 #fa2573 +color9 #f5669c +color2 #97e123 +color10 #b0e05e +color3 #dfd460 +color11 #fef26c +color4 #0f7fcf +color12 #00afff +color5 #8700ff +color13 #af87ff +color6 #42a7cf +color14 #50cdfe +color7 #bbbbbb +color15 #ffffff +selection_foreground #121212 diff --git a/config/kitty/themes/kitty-themes/themes/MonaLisa.conf b/config/kitty/themes/kitty-themes/themes/MonaLisa.conf new file mode 100644 index 0000000..3b1602d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/MonaLisa.conf @@ -0,0 +1,21 @@ +background #110b0d +foreground #f6d56a +cursor #c36c32 +selection_background #f6d56a +color0 #341a0d +color8 #874227 +color1 #9b281b +color9 #ff4230 +color2 #626132 +color10 #b3b163 +color3 #c26e27 +color11 #ff9565 +color4 #515b5c +color12 #9eb2b3 +color5 #9b1d29 +color13 #ff5b6a +color6 #588056 +color14 #89cc8e +color7 #f6d75c +color15 #ffe597 +selection_foreground #110b0d diff --git a/config/kitty/themes/kitty-themes/themes/Monoindustrial.conf b/config/kitty/themes/kitty-themes/themes/Monoindustrial.conf new file mode 100644 index 0000000..1f4fdfc --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monoindustrial.conf @@ -0,0 +1,64 @@ +# vim:ft=kitty + +## name: Monoindustrial +## license: MIT +## blurb: A port of the Monoindustrial theme from TextMate + +#: The basic colors + +foreground #FFFFFF +background #222C28 +selection_foreground #FFFFFF +selection_background #909993 + + +#: Cursor colors + +cursor #FFFFFF +cursor_text_color #222C28 + + +#: URL underline color when hovering with mouse + +url_color #648bd2 + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +active_tab_foreground #FFFFFF +active_tab_background #222C28 +inactive_tab_foreground #FFFFFF +inactive_tab_background #151C19 +tab_bar_background none +tab_bar_margin_color none + +#: Colors + +color0 #151C19 +color8 #151C19 + +color1 #A39E64 +color9 #A39E64 + +color2 #A8B3AB +color10 #A8B3AB + +color3 #E98800 +color11 #C87500 + +color4 #648BD2 +color12 #5879B7 + +color5 #588E60 +color13 #588E60 + +color6 #C23800 +color14 #990000 + +color7 #FFFFFF +color15 #eeeeee \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/Monokai.conf b/config/kitty/themes/kitty-themes/themes/Monokai.conf new file mode 100644 index 0000000..660c0cc --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai.conf @@ -0,0 +1,41 @@ +# Monokai + +background #272822 +foreground #f8f8f2 +cursor #f8f8f2 +selection_background #f8f8f2 +selection_foreground #272822 +active_tab_background #75715e +active_tab_foreground #272822 +active_border_color #75715e +inactive_tab_background #272822 +inactive_tab_foreground #75715e +inactive_border_color #75715e +url_color #f8f8f2 + +# 16 Color Space + +# black +color0 #272822 +color8 #75715e +# red +color1 #f92672 +color9 #f92672 +# green +color2 #a6e22e +color10 #a6e22e +# yellow +color3 #e6db74 +color11 #e6db74 +# blue +color4 #66d9ef +color12 #66d9ef +# magenta +color5 #fd971f +color13 #fd971f +# cyan +color6 #ae81ff +color14 #ae81ff +# white +color7 #f8f8f2 +color15 #f8f8f2 diff --git a/config/kitty/themes/kitty-themes/themes/Monokai_Classic.conf b/config/kitty/themes/kitty-themes/themes/Monokai_Classic.conf new file mode 100644 index 0000000..9c74f40 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai_Classic.conf @@ -0,0 +1,47 @@ +background #3b3c35 +foreground #fdfff1 + +cursor #fdfff1 +cursor_text_color #000000 +selection_foreground #3b3c35 +selection_background #fdfff1 + +# dull black +color0 #3b3c35 +# light black +color8 #6e7066 + +# dull red +color1 #f82570 +# light red +color9 #f82570 + +# dull green +color2 #a6e12d +# light green +color10 #a6e12d + +# yellow +color3 #e4db73 +# light yellow +color11 #e4db73 + +# blue +color4 #fc961f +# light blue +color12 #fc961f + +# magenta +color5 #ae81ff +# light magenta +color13 #ae81ff + +# cyan +color6 #66d9ee +# light cyan +color14 #66d9ee + +# dull white +color7 #fdfff1 +# bright white +color15 #fdfff1 diff --git a/config/kitty/themes/kitty-themes/themes/Monokai_Pro.conf b/config/kitty/themes/kitty-themes/themes/Monokai_Pro.conf new file mode 100644 index 0000000..f5a2e8c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai_Pro.conf @@ -0,0 +1,47 @@ +background #403e41 +foreground #fcfcfa + +cursor #fcfcfa +cursor_text_color #000000 +selection_foreground #403e41 +selection_background #fcfcfa + +# dull black +color0 #403e41 +# light black +color8 #727072 + +# dull red +color1 #ff6188 +# light red +color9 #ff6188 + +# dull green +color2 #a9dc76 +# light green +color10 #a9dc76 + +# yellow +color3 #ffd866 +# light yellow +color11 #ffd866 + +# blue +color4 #fc9867 +# light blue +color12 #fc9867 + +# magenta +color5 #ab9df2 +# light magenta +color13 #ab9df2 + +# cyan +color6 #78dce8 +# light cyan +color14 #78dce8 + +# dull white +color7 #fcfcfa +# bright white +color15 #fcfcfa diff --git a/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Machine).conf b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Machine).conf new file mode 100644 index 0000000..b46e1d3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Machine).conf @@ -0,0 +1,47 @@ +background #3a4449 +foreground #f2fffc + +cursor #f2fffc +cursor_text_color #000000 +selection_foreground #3a4449 +selection_background #f2fffc + +# dull black +color0 #3a4449 +# light black +color8 #6b7678 + +# dull red +color1 #ff6d7e +# light red +color9 #ff6d7e + +# dull green +color2 #a2e57b +# light green +color10 #a2e57b + +# yellow +color3 #ffed72 +# light yellow +color11 #ffed72 + +# blue +color4 #ffb270 +# light blue +color12 #ffb270 + +# magenta +color5 #baa0f8 +# light magenta +color13 #baa0f8 + +# cyan +color6 #7cd5f1 +# light cyan +color14 #7cd5f1 + +# dull white +color7 #f2fffc +# bright white +color15 #f2fffc diff --git a/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Octagon).conf b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Octagon).conf new file mode 100644 index 0000000..3aee34a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Octagon).conf @@ -0,0 +1,47 @@ +background #3a3d4b +foreground #eaf2f1 + +cursor #eaf2f1 +cursor_text_color #000000 +selection_foreground #3a3d4b +selection_background #eaf2f1 + +# dull black +color0 #3a3d4b +# light black +color8 #696d77 + +# dull red +color1 #ff657a +# light red +color9 #ff657a + +# dull green +color2 #bad761 +# light green +color10 #bad761 + +# yellow +color3 #ffd76d +# light yellow +color11 #ffd76d + +# blue +color4 #ff9b5e +# light blue +color12 #ff9b5e + +# magenta +color5 #c39ac9 +# light magenta +color13 #c39ac9 + +# cyan +color6 #9cd1bb +# light cyan +color14 #9cd1bb + +# dull white +color7 #eaf2f1 +# bright white +color15 #eaf2f1 diff --git a/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Ristretto).conf b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Ristretto).conf new file mode 100644 index 0000000..599b0e1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Ristretto).conf @@ -0,0 +1,47 @@ +background #403838 +foreground #fff1f3 + +cursor #fff1f3 +cursor_text_color #000000 +selection_foreground #403838 +selection_background #fff1f3 + +# dull black +color0 #403838 +# light black +color8 #72696a + +# dull red +color1 #fd6883 +# light red +color9 #fd6883 + +# dull green +color2 #adda78 +# light green +color10 #adda78 + +# yellow +color3 #f9cc6c +# light yellow +color11 #f9cc6c + +# blue +color4 #f38d70 +# light blue +color12 #f38d70 + +# magenta +color5 #a8a9eb +# light magenta +color13 #a8a9eb + +# cyan +color6 #85dacc +# light cyan +color14 #85dacc + +# dull white +color7 #fff1f3 +# bright white +color15 #fff1f3 diff --git a/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Spectrum).conf b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Spectrum).conf new file mode 100644 index 0000000..5617a6d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai_Pro_(Filter_Spectrum).conf @@ -0,0 +1,47 @@ +background #363537 +foreground #f7f1ff + +cursor #f7f1ff +cursor_text_color #000000 +selection_foreground #363537 +selection_background #f7f1ff + +# dull black +color0 #363537 +# light black +color8 #69676c + +# dull red +color1 #fc618d +# light red +color9 #fc618d + +# dull green +color2 #7bd88f +# light green +color10 #7bd88f + +# yellow +color3 #fce566 +# light yellow +color11 #fce566 + +# blue +color4 #fd9353 +# light blue +color12 #fd9353 + +# magenta +color5 #948ae3 +# light magenta +color13 #948ae3 + +# cyan +color6 #5ad4e6 +# light cyan +color14 #5ad4e6 + +# dull white +color7 #f7f1ff +# bright white +color15 #f7f1ff diff --git a/config/kitty/themes/kitty-themes/themes/Monokai_Soda.conf b/config/kitty/themes/kitty-themes/themes/Monokai_Soda.conf new file mode 100644 index 0000000..eb7a24d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Monokai_Soda.conf @@ -0,0 +1,21 @@ +background #191919 +foreground #c4c4b5 +cursor #f6f6ec +selection_background #343434 +color0 #191919 +color8 #615e4b +color1 #f3005f +color9 #f3005f +color2 #97e023 +color10 #97e023 +color3 #fa8419 +color11 #dfd561 +color4 #9c64fe +color12 #9c64fe +color5 #f3005f +color13 #f3005f +color6 #57d1ea +color14 #57d1ea +color7 #c4c4b5 +color15 #f6f6ee +selection_foreground #191919 diff --git a/config/kitty/themes/kitty-themes/themes/N0tch2k.conf b/config/kitty/themes/kitty-themes/themes/N0tch2k.conf new file mode 100644 index 0000000..3e2bb6c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/N0tch2k.conf @@ -0,0 +1,21 @@ +background #222222 +foreground #a0a0a0 +cursor #a99075 +selection_background #4d4d4d +color0 #383838 +color8 #474747 +color1 #a95551 +color9 #a97775 +color2 #666666 +color10 #8c8c8c +color3 #a98051 +color11 #a99175 +color4 #657d3e +color12 #98bd5e +color5 #767676 +color13 #a3a3a3 +color6 #c9c9c9 +color14 #dcdcdc +color7 #d0b8a3 +color15 #d8c8bb +selection_foreground #222222 diff --git a/config/kitty/themes/kitty-themes/themes/Neopolitan.conf b/config/kitty/themes/kitty-themes/themes/Neopolitan.conf new file mode 100644 index 0000000..2c6ffce --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Neopolitan.conf @@ -0,0 +1,21 @@ +background #271f19 +foreground #ffffff +cursor #ffffff +selection_background #253b76 +color0 #000000 +color8 #000000 +color1 #800000 +color9 #800000 +color2 #61ce3c +color10 #61ce3c +color3 #fbde2d +color11 #fbde2d +color4 #253b76 +color12 #253b76 +color5 #ff0080 +color13 #ff0080 +color6 #8da6ce +color14 #8da6ce +color7 #f8f8f8 +color15 #f8f8f8 +selection_foreground #271f19 diff --git a/config/kitty/themes/kitty-themes/themes/Neowave.conf b/config/kitty/themes/kitty-themes/themes/Neowave.conf new file mode 100644 index 0000000..6db2a3e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Neowave.conf @@ -0,0 +1,87 @@ +# vim:ft=kitty + +## name: Neowave +## author: Everett Howard (neveretth) +## license: MIT license - https://www.mit.edu/~amini/LICENSE.md +## blurb: A very vibrant and very neon colorscheme. + +#: The basic colors + +foreground #00ffff +background #161021 +selection_foreground #000000 +selection_background #50ff50 + + +#: Cursor colors + +cursor #00ffff +cursor_text_color #161021 + + +#: URL underline color when hovering with mouse + +url_color #00ff00 + + +#: kitty window border colors and terminal bell colors + +active_border_color #00ffff +inactive_border_color #161021 +visual_bell_color none +bell_border_color #ff5a00 + + +#: Tab bar colors + +active_tab_foreground #000 +active_tab_background #eee +inactive_tab_foreground #444 +inactive_tab_background #999 +tab_bar_background none +tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +mark1_foreground black +mark1_background #98d3cb +mark2_foreground black +mark2_background #f2dcd3 +mark3_foreground black +mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #123e7c +color8 #1c61c2 + +#: red +color1 #ff0000 +color9 #ff0000 + +#: green +color2 #df00df +color10 #df00df + +#: yellow +color3 #ff7f00 +color11 #ff7f00 + +#: blue +color4 #00ff00 +color12 #00ff00 + +#: magenta +color5 #c11cd1 +color13 #711c91 + +#: cyan +color6 #0afdf6 +color14 #0afdf6 + +#: white +color7 #d7d7d5 +color15 #d7d7d5 diff --git a/config/kitty/themes/kitty-themes/themes/Neutron.conf b/config/kitty/themes/kitty-themes/themes/Neutron.conf new file mode 100644 index 0000000..9f2fe4d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Neutron.conf @@ -0,0 +1,21 @@ +background #1b1d22 +foreground #e6e8ee +cursor #f6f6ec +selection_background #2e353d +color0 #22252b +color8 #22252b +color1 #b53f36 +color9 #b53f36 +color2 #5ab977 +color10 #5ab977 +color3 #ddb566 +color11 #ddb566 +color4 #6a7b92 +color12 #6a7b92 +color5 #a3799d +color13 #a3799d +color6 #3f93a8 +color14 #3f93a8 +color7 #e6e8ee +color15 #ebedf2 +selection_foreground #1b1d22 diff --git a/config/kitty/themes/kitty-themes/themes/NightLion_v1.conf b/config/kitty/themes/kitty-themes/themes/NightLion_v1.conf new file mode 100644 index 0000000..1021c46 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/NightLion_v1.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #bbbbbb +cursor #bbbbbb +selection_background #b4d5ff +color0 #4c4c4c +color8 #545454 +color1 #bb0000 +color9 #ff5555 +color2 #5ede8f +color10 #55ff55 +color3 #f2f067 +color11 #ffff55 +color4 #266ad7 +color12 #5555ff +color5 #bb00bb +color13 #ff55ff +color6 #00d9df +color14 #55ffff +color7 #bbbbbb +color15 #ffffff +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/NightLion_v2.conf b/config/kitty/themes/kitty-themes/themes/NightLion_v2.conf new file mode 100644 index 0000000..aed7f8d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/NightLion_v2.conf @@ -0,0 +1,21 @@ +background #171717 +foreground #bbbbbb +cursor #bbbbbb +selection_background #b4d5ff +color0 #4c4c4c +color8 #545454 +color1 #bb0000 +color9 #ff5555 +color2 #03f622 +color10 #7df61c +color3 #f2f067 +color11 #ffff55 +color4 #63d0f0 +color12 #62cae7 +color5 #ce6fda +color13 #ff9af5 +color6 #00d9df +color14 #00ccd7 +color7 #bbbbbb +color15 #ffffff +selection_foreground #171717 diff --git a/config/kitty/themes/kitty-themes/themes/Nightfox.conf b/config/kitty/themes/kitty-themes/themes/Nightfox.conf new file mode 100644 index 0000000..6e9772d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Nightfox.conf @@ -0,0 +1,52 @@ +# vim:ft=kitty + +## name: Nightfox +## author: EdenEast +## license: MIT +## upstream: https://github.com/EdenEast/nightfox.nvim/blob/main/extra/nightfox/nightfox_kitty.conf + +background #192330 +foreground #cdcecf +selection_background #2b3b51 +selection_foreground #cdcecf +url_color #81b29a + +# Cursor +# uncomment for reverse background +# cursor none +cursor #cdcecf + +# Border +active_border_color #719cd6 +inactive_border_color #39506d +bell_border_color #f4a261 + +# Tabs +active_tab_background #719cd6 +active_tab_foreground #131a24 +inactive_tab_background #2b3b51 +inactive_tab_foreground #738091 + +# normal +color0 #393b44 +color1 #c94f6d +color2 #81b29a +color3 #dbc074 +color4 #719cd6 +color5 #9d79d6 +color6 #63cdcf +color7 #dfdfe0 + +# bright +color8 #575860 +color9 #d16983 +color10 #8ebaa4 +color11 #e0c989 +color12 #86abdc +color13 #baa1e2 +color14 #7ad5d6 +color15 #e4e4e5 + +# extended colors +color16 #f4a261 +color17 #d67ad2 diff --git a/config/kitty/themes/kitty-themes/themes/Nord.conf b/config/kitty/themes/kitty-themes/themes/Nord.conf new file mode 100644 index 0000000..946324f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Nord.conf @@ -0,0 +1,73 @@ +# vim:ft=kitty +## name: Nord +## author: Eric N. Vander Weele +## upstream: https://www.nordtheme.com/ +## blurb: Nord theme utilizing the full Frost and Aurora palette. + +# Basic colors +foreground #d8dee9 +background #2e3440 +selection_foreground #d8dee9 +selection_background #434c5e + +# Cursor colors +cursor #d8dee9 +cursor_text_color #3b4252 + +# URL underline color when hovering with mouse +url_color #0087bd + +# Window border colors and terminal bell colors +active_border_color #81a1c1 +inactive_border_color #4c566a +bell_border_color #88c0d0 +visual_bell_color none + +# Tab bar colors +active_tab_foreground #3b4252 +active_tab_background #88c0d0 +inactive_tab_foreground #e5e9f0 +inactive_tab_background #4c566a +tab_bar_background #3b4252 +tab_bar_margin_color none + +# Mark colors (marked text in the terminal) +mark1_foreground #3b4252 +mark1_background #88c0d0 +mark2_foreground #3b4252 +mark2_background #bf616a +mark3_foreground #3b4252 +mark3_background #ebcb8b + +# The basic 16 colors +# black +color0 #3b4252 +color8 #4c566a + +# red +color1 #bf616a +color9 #bf616a + +# green +color2 #a3be8c +color10 #a3be8c + +# yellow +color3 #ebcb8b +color11 #d08770 + +# blue +color4 #81a1c1 +color12 #5e81ac + +# magenta +color5 #b48ead +color13 #b48ead + +# cyan +color6 #88c0d0 +color14 #8fbcbb + +# white +color7 #e5e9f0 +color15 #eceff4 diff --git a/config/kitty/themes/kitty-themes/themes/Nova.conf b/config/kitty/themes/kitty-themes/themes/Nova.conf new file mode 100644 index 0000000..c3f2da1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Nova.conf @@ -0,0 +1,21 @@ +background #3c4c54 +foreground #8798a3 +cursor #7fc1c9 +color0 #8799a4 +color8 #c4d3dc +color1 #efc08d +color9 #ef8358 +color2 #a6cb91 +color10 #a8ce93 +color3 #d7d690 +color11 #e5e77f +color4 #83afe4 +color12 #69c8ff +color5 #d460da +color13 #d18ec2 +color6 #7fc1b6 +color14 #00e59f +color7 #c4d3dc +color15 #e6eef3 +selection_foreground #3c4c54 +selection_background #7fc1ca diff --git a/config/kitty/themes/kitty-themes/themes/Novel.conf b/config/kitty/themes/kitty-themes/themes/Novel.conf new file mode 100644 index 0000000..03220e3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Novel.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #dfdbc3 +foreground #3b2322 +cursor #73635a +selection_background #a4a390 +color0 #000000 +color8 #7f7f7f +color1 #cc0000 +color9 #cc0000 +color2 #009600 +color10 #009600 +color3 #d06b00 +color11 #d06b00 +color4 #0000cc +color12 #0000cc +color5 #cc00cc +color13 #cc00cc +color6 #0087cc +color14 #0086cb +color7 #cccccc +color15 #ffffff +selection_foreground #dfdbc3 diff --git a/config/kitty/themes/kitty-themes/themes/Obsidian.conf b/config/kitty/themes/kitty-themes/themes/Obsidian.conf new file mode 100644 index 0000000..7265d44 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Obsidian.conf @@ -0,0 +1,21 @@ +background #273032 +foreground #cccccc +cursor #c0cad0 +selection_background #3d4b4e +color0 #000000 +color8 #545454 +color1 #a50001 +color9 #ff0003 +color2 #00bb00 +color10 #92c763 +color3 #fecc22 +color11 #fef773 +color4 #399bda +color12 #a0d6ff +color5 #bb00bb +color13 #ff55ff +color6 #00bbbb +color14 #55ffff +color7 #bbbbbb +color15 #ffffff +selection_foreground #273032 diff --git a/config/kitty/themes/kitty-themes/themes/Ocean.conf b/config/kitty/themes/kitty-themes/themes/Ocean.conf new file mode 100644 index 0000000..ad6205a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Ocean.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #214fbc +foreground #ffffff +cursor #7f7f7f +selection_background #216dff +color0 #000000 +color8 #666666 +color1 #990000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #0000b2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bebebe +color15 #e5e5e5 +selection_foreground #214fbc diff --git a/config/kitty/themes/kitty-themes/themes/OceanicMaterial.conf b/config/kitty/themes/kitty-themes/themes/OceanicMaterial.conf new file mode 100644 index 0000000..9403518 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/OceanicMaterial.conf @@ -0,0 +1,21 @@ +background #1c262b +foreground #c1c8d6 +cursor #b2b8c3 +selection_background #6dc1b8 +color0 #000000 +color8 #767676 +color1 #ee2a29 +color9 #dc5b60 +color2 #3fa33f +color10 #70be71 +color3 #fee92e +color11 #fef063 +color4 #1d80ef +color12 #53a4f3 +color5 #8800a0 +color13 #a94dbb +color6 #16aec9 +color14 #42c6d9 +color7 #a4a4a4 +color15 #fffefe +selection_foreground #1c262b diff --git a/config/kitty/themes/kitty-themes/themes/Ollie.conf b/config/kitty/themes/kitty-themes/themes/Ollie.conf new file mode 100644 index 0000000..66eecf5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Ollie.conf @@ -0,0 +1,21 @@ +background #212024 +foreground #8a8dae +cursor #5b6da7 +selection_background #1e3965 +color0 #000000 +color8 #5a3625 +color1 #ab2e30 +color9 #ff3d48 +color2 #31ab60 +color10 #3bff99 +color3 #ab4200 +color11 #ff5e1e +color4 #2c56ab +color12 #4487ff +color5 #af8427 +color13 #ffc21c +color6 #1fa5ab +color14 #1efaff +color7 #8a8dab +color15 #5b6da7 +selection_foreground #212024 diff --git a/config/kitty/themes/kitty-themes/themes/OneDark-Pro.conf b/config/kitty/themes/kitty-themes/themes/OneDark-Pro.conf new file mode 100644 index 0000000..bb3cee1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/OneDark-Pro.conf @@ -0,0 +1,62 @@ +# vim:ft=kitty + +## name: OneDark-Pro +## author: VictorPL (https://github.com/VictorPLopes) +## license: MIT +## upstream: https://github.com/VictorPLopes/OneDark-Pro-Kitty-Terminal/blob/main/kitty-themes/OneDark-Pro.conf +## blurb: Kitty theme inspired by Binaryify's One Dark Pro theme for Visual Studio Code. + +# Colors + +# The basic colors +foreground #ABB2BF +background #282C34 +selection_foreground #282C34 +selection_background #ABB2BF + +# Cursor colors +cursor #ABB2BF +cursor_text_color #282C34 + +# URL underline color when hovering with mouse +url_color #ABB2BF + +# Tab bar colors +active_tab_foreground #3F4451 +active_tab_background #D7DAE0 +inactive_tab_foreground #ABB2BF +inactive_tab_background #282C34 + +# The 16 terminal colors + +# black +color0 #3F4451 +color8 #4F5666 + +# red +color1 #E06C75 +color9 #BE5046 + +# green +color2 #98C379 +color10 #A5E075 + +# yellow +color3 #D19A66 +color11 #E5C07B + +# blue +color4 #61AFEF +color12 #4DC4FF + +# purple +color5 #C678DD +color13 #DE73FF + +# cyan +color6 #56B6C2 +color14 #4CD1E0 + +# white +color7 #D7DAE0 +color15 #E6E6E6 \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/OneDark.conf b/config/kitty/themes/kitty-themes/themes/OneDark.conf new file mode 100644 index 0000000..2cdbb2f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/OneDark.conf @@ -0,0 +1,32 @@ +# One Dark by Giuseppe Cesarano, https://github.com/GiuseppeCesarano +# This work is licensed under the terms of the GPL-2.0 license. +# For a copy, see https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. + +# Colors + +foreground #979eab +background #282c34 + +color0 #282c34 +color1 #e06c75 +color2 #98c379 +color3 #e5c07b +color4 #61afef +color5 #be5046 +color6 #56b6c2 +color7 #979eab +color8 #393e48 +color9 #d19a66 +color10 #56b6c2 +color11 #e5c07b +color12 #61afef +color13 #be5046 +color14 #56b6c2 +color15 #abb2bf + +# Tab Bar + +active_tab_foreground #282c34 +active_tab_background #979eab +inactive_tab_foreground #abb2bf +inactive_tab_background #282c34 diff --git a/config/kitty/themes/kitty-themes/themes/OneHalfDark.conf b/config/kitty/themes/kitty-themes/themes/OneHalfDark.conf new file mode 100644 index 0000000..1c7dfe0 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/OneHalfDark.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty +## name: One Half Dark +## author: Son A. Pham +## license: MIT +## upstream: https://raw.githubusercontent.com/sonph/onehalf/master/kitty/onehalf-dark.conf +## blurb: Clean, vibrant and pleasing color scheme + +foreground #dcdfe4 +background #282c34 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD + +# black +color0 #282c34 +color8 #5d677a + +# red +color1 #e06c75 +color9 #e06c75 + +# green +color2 #98c379 +color10 #98c379 + +# yellow +color3 #e5c07b +color11 #e5c07b + +# blue +color4 #61afef +color12 #61afef + +# magenta +color5 #c678dd +color13 #c678dd + +# cyan +color6 #56b6c2 +color14 #56b6c2 + +# white +color7 #dcdfe4 +color15 #dcdfe4 diff --git a/config/kitty/themes/kitty-themes/themes/OneHalfLight.conf b/config/kitty/themes/kitty-themes/themes/OneHalfLight.conf new file mode 100644 index 0000000..2cdb3f3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/OneHalfLight.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty +## name: One Half Light +## author: Son A. Pham +## license: MIT +## upstream: https://raw.githubusercontent.com/sonph/onehalf/master/kitty/onehalf-light.conf +## blurb: Clean, vibrant and pleasing color scheme + +foreground #383A42 +background #FAFAFA +selection_foreground #383A42 +selection_background #BFCEFF +url_color #F0F0F0 + +# black +color0 #383A42 +color8 #383A42 + +# red +color1 #E45649 +color9 #E45649 + +# green +color2 #40A14F +color10 #40A14F + +# yellow +color3 #C18401 +color11 #C18401 + +# blue +color4 #0184BC +color12 #0184BC + +# magenta +color5 #A626A4 +color13 #A626A4 + +# cyan +color6 #0997B3 +color14 #0997B3 + +# white +color7 #FAFAFA +color15 #FAFAFA diff --git a/config/kitty/themes/kitty-themes/themes/PaperColor_dark.conf b/config/kitty/themes/kitty-themes/themes/PaperColor_dark.conf new file mode 100644 index 0000000..1fb30e8 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/PaperColor_dark.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty + +## name: PaperColor Dark +## author: Nikyle Nguyen +## license: MIT +## blurb: Dark color scheme inspired by Google's Material Design + +# special +foreground #d0d0d0 +background #1c1c1c +cursor #d0d0d0 +cursor_text_color background + +# black +color0 #1c1c1c +color8 #585858 + +# red +color1 #af005f +color9 #5faf5f + +# green +color2 #5faf00 +color10 #afd700 + +# yellow +color3 #d7af5f +color11 #af87d7 + +# blue +color4 #5fafd7 +color12 #ffaf00 + +# magenta +color5 #808080 +color13 #ff5faf + +# cyan +color6 #d7875f +color14 #00afaf + +# white +color7 #d0d0d0 +color15 #5f8787 diff --git a/config/kitty/themes/kitty-themes/themes/PaperColor_light.conf b/config/kitty/themes/kitty-themes/themes/PaperColor_light.conf new file mode 100644 index 0000000..02c706c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/PaperColor_light.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty + +## name: PaperColor Light +## author: Nikyle Nguyen +## license: MIT +## blurb: Light color scheme inspired by Google's Material Design + +# special +foreground #444444 +background #eeeeee +cursor #444444 +cursor_text_color background + +# black +color0 #eeeeee +color8 #bcbcbc + +# red +color1 #af0000 +color9 #d70000 + +# green +color2 #008700 +color10 #d70087 + +# yellow +color3 #5f8700 +color11 #8700af + +# blue +color4 #0087af +color12 #d75f00 + +# magenta +color5 #878787 +color13 #d75f00 + +# cyan +color6 #005f87 +color14 #005faf + +# white +color7 #444444 +color15 #005f87 diff --git a/config/kitty/themes/kitty-themes/themes/Parasio_Dark.conf b/config/kitty/themes/kitty-themes/themes/Parasio_Dark.conf new file mode 100644 index 0000000..4cc1e8d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Parasio_Dark.conf @@ -0,0 +1,21 @@ +background #2f1d2e +foreground #a39d9b +cursor #a39d9b +selection_background #4f414c +color0 #2f1d2e +color8 #776d70 +color1 #ef6154 +color9 #ef6154 +color2 #48b685 +color10 #48b685 +color3 #fec418 +color11 #fec418 +color4 #05b6ef +color12 #05b6ef +color5 #805ba3 +color13 #805ba3 +color6 #5bc4be +color14 #5bc4be +color7 #a39d9b +color15 #e6e9da +selection_foreground #2f1d2e diff --git a/config/kitty/themes/kitty-themes/themes/PaulMillr.conf b/config/kitty/themes/kitty-themes/themes/PaulMillr.conf new file mode 100644 index 0000000..72cc95c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/PaulMillr.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #f1f1f1 +cursor #4c4c4c +selection_background #414141 +color0 #2a2a2a +color8 #666666 +color1 #ff0000 +color9 #ff007f +color2 #78ff0e +color10 #66ff66 +color3 #e6be00 +color11 #f3d64d +color4 #396ad6 +color12 #7099ec +color5 #b348bd +color13 #da66e5 +color6 #66ccff +color14 #79def1 +color7 #bababa +color15 #ffffff +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/PencilDark.conf b/config/kitty/themes/kitty-themes/themes/PencilDark.conf new file mode 100644 index 0000000..3926f6c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/PencilDark.conf @@ -0,0 +1,21 @@ +background #202020 +foreground #f0f0f0 +cursor #20bafb +selection_background #b6d6fc +color0 #202020 +color8 #414141 +color1 #c30670 +color9 #fb0079 +color2 #10a778 +color10 #5ed6ae +color3 #a79c14 +color11 #f3e42f +color4 #008ec4 +color12 #20bafb +color5 #523b78 +color13 #6854de +color6 #20a4b9 +color14 #4fb8cc +color7 #d9d9d9 +color15 #f0f0f0 +selection_foreground #202020 diff --git a/config/kitty/themes/kitty-themes/themes/PencilLight.conf b/config/kitty/themes/kitty-themes/themes/PencilLight.conf new file mode 100644 index 0000000..4311c70 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/PencilLight.conf @@ -0,0 +1,21 @@ +background #f0f0f0 +foreground #414141 +cursor #20bafb +selection_background #b6d6fc +color0 #202020 +color8 #414141 +color1 #c30670 +color9 #fb0079 +color2 #10a778 +color10 #5ed6ae +color3 #a79c14 +color11 #f3e42f +color4 #008ec4 +color12 #20bafb +color5 #523b78 +color13 #6854de +color6 #20a4b9 +color14 #4fb8cc +color7 #d9d9d9 +color15 #f0f0f0 +selection_foreground #f0f0f0 diff --git a/config/kitty/themes/kitty-themes/themes/Piatto_Light.conf b/config/kitty/themes/kitty-themes/themes/Piatto_Light.conf new file mode 100644 index 0000000..401fe91 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Piatto_Light.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #414141 +cursor #5e76c7 +selection_background #6f6a4e +color0 #414141 +color8 #3e3e3e +color1 #b23670 +color9 #da3365 +color2 #66781d +color10 #829428 +color3 #cc6e33 +color11 #cc6e33 +color4 #3b5ea7 +color12 #3b5ea7 +color5 #a353b2 +color13 #a353b2 +color6 #66781d +color14 #829428 +color7 #ffffff +color15 #f1f1f1 +selection_foreground #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Pnevma.conf b/config/kitty/themes/kitty-themes/themes/Pnevma.conf new file mode 100644 index 0000000..1dda097 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Pnevma.conf @@ -0,0 +1,21 @@ +background #1c1c1c +foreground #d0d0d0 +cursor #e3c8ae +selection_background #4d4d4d +color0 #2f2e2d +color8 #4a4845 +color1 #a36666 +color9 #d78787 +color2 #90a57d +color10 #afbea2 +color3 #d7af87 +color11 #e4c9af +color4 #7fa5bd +color12 #a1bdce +color5 #c79ec4 +color13 #d7beda +color6 #8adbb4 +color14 #b1e7dd +color7 #d0d0d0 +color15 #efefef +selection_foreground #1c1c1c diff --git a/config/kitty/themes/kitty-themes/themes/Pro.conf b/config/kitty/themes/kitty-themes/themes/Pro.conf new file mode 100644 index 0000000..6ffc047 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Pro.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #000000 +foreground #f2f2f2 +cursor #4d4d4d +selection_background #414141 +color0 #000000 +color8 #666666 +color1 #990000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #1f08db +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bfbfbf +color15 #e5e5e5 +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Red_Alert.conf b/config/kitty/themes/kitty-themes/themes/Red_Alert.conf new file mode 100644 index 0000000..020429a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Red_Alert.conf @@ -0,0 +1,21 @@ +background #762423 +foreground #ffffff +cursor #ffffff +selection_background #073642 +color0 #000000 +color8 #262626 +color1 #d52e4d +color9 #e02453 +color2 #71be6b +color10 #aff08b +color3 #beb86b +color11 #dfddb7 +color4 #479bed +color12 #65a9f0 +color5 #e878d6 +color13 #ddb7df +color6 #6bbeb8 +color14 #b7dfdd +color7 #d6d6d6 +color15 #ffffff +selection_foreground #762423 diff --git a/config/kitty/themes/kitty-themes/themes/Red_Sands.conf b/config/kitty/themes/kitty-themes/themes/Red_Sands.conf new file mode 100644 index 0000000..a491f3d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Red_Sands.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #79241d +foreground #d6c8a7 +cursor #ffffff +selection_background #a4a390 +color0 #000000 +color8 #545454 +color1 #ff3e00 +color9 #ba0000 +color2 #00ba00 +color10 #00ba00 +color3 #e6af00 +color11 #e6af00 +color4 #0071ff +color12 #0071ae +color5 #ba00ba +color13 #ff54ff +color6 #00baba +color14 #54ffff +color7 #bababa +color15 #ffffff +selection_foreground #79241d diff --git a/config/kitty/themes/kitty-themes/themes/Relaxed_Afterglow.conf b/config/kitty/themes/kitty-themes/themes/Relaxed_Afterglow.conf new file mode 100644 index 0000000..5988777 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Relaxed_Afterglow.conf @@ -0,0 +1,25 @@ +# Relaxed Afterglow by Michael Kühnel , https://github.com/Relaxed-Theme/relaxed-terminal-themes +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +background #353a44 +foreground #d9d9d9 +cursor #d9d9d9 +selection_foreground #d8d8d8 +selection_background #6a7984 +color0 #151515 +color1 #bc5653 +color2 #909d63 +color3 #ebc17a +color4 #6a8799 +color5 #b06698 +color6 #c9dfff +color7 #d9d9d9 +color8 #636363 +color9 #bc5653 +color10 #a0ac77 +color11 #ebc17a +color12 #7eaac7 +color13 #b06698 +color14 #acbbd0 +color15 #f7f7f7 diff --git a/config/kitty/themes/kitty-themes/themes/Renault_Style.conf b/config/kitty/themes/kitty-themes/themes/Renault_Style.conf new file mode 100644 index 0000000..856818d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Renault_Style.conf @@ -0,0 +1,22 @@ +background #3a3a3a +foreground #e9cb7b +cursor #7f7f7f +selection_background #958553 + +color0 #000000 +color1 #990000 +color2 #00A600 +color3 #999900 +color4 #0000B2 +color5 #B200B2 +color6 #00A6B2 +color7 #BFBFBF +color8 #666666 +color9 #E50000 +color10 #00d800 +color11 #E5E500 +color12 #0000FF +color13 #E500E5 +color14 #00e5e5 +color15 #E5E5E5 +selection_foreground #3a3a3a diff --git a/config/kitty/themes/kitty-themes/themes/Renault_Style_Light.conf b/config/kitty/themes/kitty-themes/themes/Renault_Style_Light.conf new file mode 100644 index 0000000..e08cd6a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Renault_Style_Light.conf @@ -0,0 +1,21 @@ +background #3a3a3a +foreground #e9cb7b +cursor #7f7f7f +selection_background #958553 +color0 #000000 +color8 #323232 +color1 #da4839 +color9 #ff7b6a +color2 #509f50 +color10 #83d082 +color3 #ffd249 +color11 #ffff7b +color4 #46657d +color12 #9fcef0 +color5 #cfcfff +color13 #ffffff +color6 #87c1f1 +color14 #a4d4f8 +color7 #ffffff +color15 #ffffff +selection_foreground #3a3a3a diff --git a/config/kitty/themes/kitty-themes/themes/Rippedcasts.conf b/config/kitty/themes/kitty-themes/themes/Rippedcasts.conf new file mode 100644 index 0000000..20e9872 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Rippedcasts.conf @@ -0,0 +1,21 @@ +background #2b2b2b +foreground #ffffff +cursor #7f7f7f +selection_background #5a637e +color0 #000000 +color8 #666666 +color1 #ccae95 +color9 #edcbac +color2 #a7ff60 +color10 #bced68 +color3 #beba1f +color11 #e5e500 +color4 #74a4af +color12 #86bdc8 +color5 #ff73fd +color13 #e500e5 +color6 #5a637e +color14 #8b9bc4 +color7 #bebebe +color15 #e5e5e5 +selection_foreground #2b2b2b diff --git a/config/kitty/themes/kitty-themes/themes/Royal.conf b/config/kitty/themes/kitty-themes/themes/Royal.conf new file mode 100644 index 0000000..0ebd236 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Royal.conf @@ -0,0 +1,21 @@ +background #100814 +foreground #504868 +cursor #514965 +selection_background #1e1d2a +color0 #241f2a +color8 #312d3c +color1 #90274b +color9 #d4346c +color2 #23801c +color10 #2cd845 +color3 #b49d27 +color11 #fde83a +color4 #6480af +color12 #8fb9f9 +color5 #664d96 +color13 #a479e2 +color6 #8aaabd +color14 #abd3eb +color7 #514965 +color15 #9d8bbd +selection_foreground #100814 diff --git a/config/kitty/themes/kitty-themes/themes/Sakura_Night.conf b/config/kitty/themes/kitty-themes/themes/Sakura_Night.conf new file mode 100644 index 0000000..3df6bcf --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Sakura_Night.conf @@ -0,0 +1,45 @@ +# vim:ft=kitty + +## name: Sakura Night +## license: MIT +## author: PandaCatPlayz +## upstream: https://pandacatplayz.github.io/kitty-themes/Sakura_Night.conf +## blurb: A custom kitty dark theme loosely using the Endesga 32 palette + +background #181425 +foreground #F06292 +cursor #F06292 +selection_background #F06292 + +#: black +color0 #181425 +color8 #262b44 + +#: red +color1 #e43b44 +color9 #ff0044 + +#: green +color2 #3e8948 +color10 #63c74d + +#: yellow +color3 #feae34 +color11 #fee761 + +#: blue +color4 #124e89 +color12 #0099db + +#: magenta +color5 #b55088 +color13 #F06292 + +#: cyan +color6 #008080 +color14 #66b2b2 + +#: white +color7 #c0cbdc +color15 #ffffff +selection_foreground #f7f7f7 diff --git a/config/kitty/themes/kitty-themes/themes/SeaShells.conf b/config/kitty/themes/kitty-themes/themes/SeaShells.conf new file mode 100644 index 0000000..60a2968 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/SeaShells.conf @@ -0,0 +1,21 @@ +background #08131a +foreground #deb88d +cursor #fba02f +selection_background #1e4862 +color0 #17384c +color8 #424b52 +color1 #d05023 +color9 #d38677 +color2 #027b9b +color10 #618c98 +color3 #fba02f +color11 #fdd29e +color4 #1d4850 +color12 #1abcdd +color5 #68d3f0 +color13 #bbe3ee +color6 #50a3b5 +color14 #86abb3 +color7 #deb88d +color15 #fee3cd +selection_foreground #08131a diff --git a/config/kitty/themes/kitty-themes/themes/Seafoam_Pastel.conf b/config/kitty/themes/kitty-themes/themes/Seafoam_Pastel.conf new file mode 100644 index 0000000..c3e95a7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Seafoam_Pastel.conf @@ -0,0 +1,21 @@ +background #243335 +foreground #d3e6d3 +cursor #576379 +selection_background #ffffff +color0 #747474 +color8 #8a8a8a +color1 #825d4c +color9 #cf9279 +color2 #718b62 +color10 #98d9aa +color3 #aca06d +color11 #fae69c +color4 #4c7b82 +color12 #79c3cf +color5 #8a7166 +color13 #d6b2a0 +color6 #719494 +color14 #acdfdf +color7 #dfdfdf +color15 #dfdfdf +selection_foreground #243335 diff --git a/config/kitty/themes/kitty-themes/themes/Seti.conf b/config/kitty/themes/kitty-themes/themes/Seti.conf new file mode 100644 index 0000000..69c4105 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Seti.conf @@ -0,0 +1,21 @@ +background #111213 +foreground #cacecd +cursor #e2be21 +selection_background #303233 +color0 #323232 +color8 #323232 +color1 #c22832 +color9 #c22832 +color2 #8ec43d +color10 #8ec43d +color3 #e0c64f +color11 #e0c64f +color4 #43a5d5 +color12 #43a5d5 +color5 #8b57b5 +color13 #8b57b5 +color6 #8ec43d +color14 #8ec43d +color7 #eeeeee +color15 #ffffff +selection_foreground #111213 diff --git a/config/kitty/themes/kitty-themes/themes/Shaman.conf b/config/kitty/themes/kitty-themes/themes/Shaman.conf new file mode 100644 index 0000000..a316711 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Shaman.conf @@ -0,0 +1,21 @@ +background #001014 +foreground #405555 +cursor #49fcd5 +selection_background #415554 +color0 #012026 +color8 #374350 +color1 #b12f2c +color9 #ff4242 +color2 #00a940 +color10 #2aea5e +color3 #5d8aa9 +color11 #8dd3fd +color4 #449985 +color12 #61d4b9 +color5 #00599c +color13 #1298ff +color6 #5c7e19 +color14 #98cf28 +color7 #405554 +color15 #58fad6 +selection_foreground #001014 diff --git a/config/kitty/themes/kitty-themes/themes/Sierra.conf b/config/kitty/themes/kitty-themes/themes/Sierra.conf new file mode 100644 index 0000000..505961b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Sierra.conf @@ -0,0 +1,28 @@ +# Sierra Colorscheme for Kitty +# Based on https://www.reddit.com/r/unixporn/comments/dgx7gk/bspwm_nostalgic_days/ + +# cursorColor: #cacbb9 +selection_background #1c1a14 +selection_background #cacbb9 +foreground #cacbb9 +background #1c1a14 +url_color #0e0e04 + +macos_titlebar_color #515a45 + +color0 #0e0e04 +color1 #515a45 +color2 #68694f +color3 #7f7f60 +color4 #989876 +color5 #897c5b +color6 #a18e60 +color7 #bb7774 +color8 #a85e5d +color9 #475a2e +color10 #676938 +color11 #7f7f41 +color12 #98984e +color13 #897645 +color14 #a17140 +color15 #c9cbac diff --git a/config/kitty/themes/kitty-themes/themes/Slate.conf b/config/kitty/themes/kitty-themes/themes/Slate.conf new file mode 100644 index 0000000..650e4ab --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Slate.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #34b0d2 +cursor #87d2c3 +selection_background #0f3754 +color0 #212121 +color8 #ffffff +color1 #e1a7bf +color9 #ffccd8 +color2 #80d778 +color10 #bdffa8 +color3 #c4c9bf +color11 #d0cbc9 +color4 #254a49 +color12 #79afd2 +color5 #a380d3 +color13 #c4a7d8 +color6 #14ab9c +color14 #8bdee0 +color7 #02c4e0 +color15 #e0e0e0 +selection_foreground #212121 diff --git a/config/kitty/themes/kitty-themes/themes/Smyck.conf b/config/kitty/themes/kitty-themes/themes/Smyck.conf new file mode 100644 index 0000000..3c97251 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Smyck.conf @@ -0,0 +1,21 @@ +background #1b1b1b +foreground #f7f7f7 +cursor #bbbbbb +selection_background #207383 +color0 #000000 +color8 #7a7a7a +color1 #b74131 +color9 #d6837b +color2 #7da900 +color10 #c4f036 +color3 #c4a400 +color11 #fee14d +color4 #62a3c4 +color12 #8dcff0 +color5 #b98acc +color13 #f799ff +color6 #207383 +color14 #69d9cf +color7 #a0a0a0 +color15 #f7f7f7 +selection_foreground #1b1b1b diff --git a/config/kitty/themes/kitty-themes/themes/SnowDark.conf b/config/kitty/themes/kitty-themes/themes/SnowDark.conf new file mode 100644 index 0000000..baa1d03 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/SnowDark.conf @@ -0,0 +1,31 @@ +# Kitty snow colors - dark +# Just copy the contents into your kitty config file + +# Michael Chris Lopez (http://github.com/mcchrish) + +background #2c2d30 +foreground #afb7c0 +selection_background #afb7c0 +selection_foreground #2c2d30 +url_color #ab916d +cursor #cbd2d9 + +# normal +color0 #2c2d30 +color1 #be868c +color2 #7f9d77 +color3 #ab916d +color4 #759abd +color5 #a88cb3 +color6 #5da19f +color7 #afb7c0 + +# bright +color8 #363a3e +color9 #be868c +color10 #7f9d77 +color11 #ab916d +color12 #759abd +color13 #a88cb3 +color14 #5da19f +color15 #cbd2d9 diff --git a/config/kitty/themes/kitty-themes/themes/SnowLight.conf b/config/kitty/themes/kitty-themes/themes/SnowLight.conf new file mode 100644 index 0000000..66db184 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/SnowLight.conf @@ -0,0 +1,31 @@ +# Kitty snow colors - light +# Just copy the contents into your kitty config file + +# Michael Chris Lopez (http://github.com/mcchrish) + +background #fbffff +foreground #535c65 +selection_background #6d7782 +selection_foreground #fbffff +url_color #906c33 +cursor #434951 + +# normal +color0 #fbffff +color1 #ae5865 +color2 #4d7f43 +color3 #906c33 +color4 #2b7ab2 +color5 #8f63a2 +color6 #008483 +color7 #535c65 + +# bright +color8 #6d7782 +color9 #ae5865 +color10 #4d7f43 +color11 #906c33 +color12 #2b7ab2 +color13 #8f63a2 +color14 #008483 +color15 #434951 \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/SoftServer.conf b/config/kitty/themes/kitty-themes/themes/SoftServer.conf new file mode 100644 index 0000000..e7eb5fe --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/SoftServer.conf @@ -0,0 +1,21 @@ +background #242626 +foreground #99a3a2 +cursor #d1dfde +selection_background #7f8786 +color0 #000000 +color8 #666c6b +color1 #a16869 +color9 #dc5b5f +color2 #99a569 +color10 #bfde54 +color3 #a29069 +color11 #deb35f +color4 #6a8fa3 +color12 #62b1df +color5 #6971a3 +color13 #5f6ede +color6 #6ba48f +color14 #64e39c +color7 #99a3a2 +color15 #d1dfde +selection_foreground #242626 diff --git a/config/kitty/themes/kitty-themes/themes/Solarized8_Dark.conf b/config/kitty/themes/kitty-themes/themes/Solarized8_Dark.conf new file mode 100644 index 0000000..11f0e55 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Solarized8_Dark.conf @@ -0,0 +1,23 @@ +background #002b36 +foreground #93a1a1 +cursor #93a1a1 +selection_background #93a1a1 + +color0 #073642 +color1 #dc322f +color2 #859900 +color3 #b58900 +color4 #268bd2 +color5 #d33682 +color6 #2aa198 +color7 #eee8d5 +color8 #002b36 +color9 #cb4b16 +color10 #586e75 +color11 #657b83 +color12 #839496 +color13 #6c71c4 +color14 #93a1a1 +color15 #fdf6e3 + +selection_foreground #002b36 diff --git a/config/kitty/themes/kitty-themes/themes/Solarized_Darcula.conf b/config/kitty/themes/kitty-themes/themes/Solarized_Darcula.conf new file mode 100644 index 0000000..0a845d4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Solarized_Darcula.conf @@ -0,0 +1,21 @@ +background #3d3f41 +foreground #d2d8d9 +cursor #708183 +selection_background #214283 +color0 #25292a +color8 #25292a +color1 #f24840 +color9 #f24840 +color2 #629655 +color10 #629655 +color3 #b68800 +color11 #b68800 +color4 #2074c7 +color12 #2074c7 +color5 #797fd4 +color13 #797fd4 +color6 #15968d +color14 #15968d +color7 #d2d8d9 +color15 #d2d8d9 +selection_foreground #3d3f41 diff --git a/config/kitty/themes/kitty-themes/themes/Solarized_Dark.conf b/config/kitty/themes/kitty-themes/themes/Solarized_Dark.conf new file mode 100644 index 0000000..0bddb75 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Solarized_Dark.conf @@ -0,0 +1,28 @@ +# vim:ft=kitty + +## name: Solarized Dark +## author: Ethan Schoonover +## license: MIT +## blurb: Precision colors for machines and people + +background #002b36 +foreground #839496 +cursor #708183 +selection_background #073642 +color0 #002731 +color8 #001e26 +color1 #d01b24 +color9 #bd3612 +color2 #728905 +color10 #465a61 +color3 #a57705 +color11 #52676f +color4 #2075c7 +color12 #708183 +color5 #c61b6e +color13 #5856b9 +color6 #259185 +color14 #81908f +color7 #e9e2cb +color15 #fcf4dc +selection_foreground #93a1a1 diff --git a/config/kitty/themes/kitty-themes/themes/Solarized_Dark_-_Patched.conf b/config/kitty/themes/kitty-themes/themes/Solarized_Dark_-_Patched.conf new file mode 100644 index 0000000..37c3597 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Solarized_Dark_-_Patched.conf @@ -0,0 +1,21 @@ +background #001e26 +foreground #708183 +cursor #708183 +selection_background #002731 +color0 #002731 +color8 #465a61 +color1 #d01b24 +color9 #bd3612 +color2 #728905 +color10 #465a61 +color3 #a57705 +color11 #52676f +color4 #2075c7 +color12 #708183 +color5 #c61b6e +color13 #5856b9 +color6 #259185 +color14 #81908f +color7 #e9e2cb +color15 #fcf4dc +selection_foreground #001e26 diff --git a/config/kitty/themes/kitty-themes/themes/Solarized_Dark_Higher_Contrast.conf b/config/kitty/themes/kitty-themes/themes/Solarized_Dark_Higher_Contrast.conf new file mode 100644 index 0000000..8477ea1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Solarized_Dark_Higher_Contrast.conf @@ -0,0 +1,21 @@ +background #001e26 +foreground #9bc1c2 +cursor #f34a00 +selection_background #003747 +color0 #002731 +color8 #006388 +color1 #d01b24 +color9 #f4153b +color2 #6bbe6c +color10 #50ee84 +color3 #a57705 +color11 #b17e28 +color4 #2075c7 +color12 #178dc7 +color5 #c61b6e +color13 #e14d8e +color6 #259185 +color14 #00b29e +color7 #e9e2cb +color15 #fcf4dc +selection_foreground #001e26 diff --git a/config/kitty/themes/kitty-themes/themes/Solarized_Light.conf b/config/kitty/themes/kitty-themes/themes/Solarized_Light.conf new file mode 100644 index 0000000..b1f6332 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Solarized_Light.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Solarized Light +## author: Ethan Schoonover +## license: MIT +## blurb: Precision colors for machines and people + +# The basic colors +foreground #657b83 +background #fdf6e3 +selection_foreground #586e75 +selection_background #eee8d5 + +# Cursor colors +cursor #657b83 +cursor_text_color #fdf6e3 + +# kitty window border colors +active_border_color #cb4b16 +inactive_border_color #93a1a1 + +# Tab bar colors +active_tab_background #fdf6e3 +active_tab_foreground #657b83 +inactive_tab_background #93a1a1 +inactive_tab_foreground #fdf6e3 + +# The basic 16 colors +# black +color0 #073642 +color8 #93a1a1 + +# red +color1 #dc322f +color9 #cb4b16 + +# green +color2 #859900 +color10 #586e75 + +# yellow +color3 #b58900 +color11 #657b83 + +# blue +color4 #268bd2 +color12 #839496 + +# magenta +color5 #d33682 +color13 #6c71c4 + +# cyan +color6 #2aa198 +color14 #93a1a1 + +# white +color7 #eee8d5 +color15 #fdf6e3 diff --git a/config/kitty/themes/kitty-themes/themes/Source_Code_X.conf b/config/kitty/themes/kitty-themes/themes/Source_Code_X.conf new file mode 100644 index 0000000..d3aefa3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Source_Code_X.conf @@ -0,0 +1,21 @@ +foreground #000000 +background #1f1f24 +cursor #7F7F7F +color0 #4e596b +color8 #91a0b1 +color1 #fb695d +color7 #BFBFBF +color9 #fb695d +color2 #74b391 +color10 #aef37c +color3 #fc8e3e +color11 #fc8e3e +color4 #9586f4 +color12 #53a4fb +color5 #fb5ea3 +color13 #fb5ea3 +color6 #79c8b6 +color14 #83d2c0 +color15 #91a0b1 +selection_foreground #1f1f24 +selection_background #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Sourcerer.conf b/config/kitty/themes/kitty-themes/themes/Sourcerer.conf new file mode 100644 index 0000000..1c025c4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Sourcerer.conf @@ -0,0 +1,40 @@ +# Drop these into your kitty.conf + +# ██████ ██████ ██ ██ ██████ █████ █████ ██████ █████ ██████ +# ██░░░░ ██░░░░██░██ ░██░░██░░████░░░██ ██░░░██░░██░░████░░░██░░██░░██ +# ░░█████ ░██ ░██░██ ░██ ░██ ░░░██ ░░ ░███████ ░██ ░░░███████ ░██ ░░ +# ░░░░░██░██ ░██░██ ░██ ░██ ░██ ██░██░░░░ ░██ ░██░░░░ ░██ +# ██████ ░░██████ ░░██████░███ ░░█████ ░░██████░███ ░░██████░███ +# ░░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ +# r e a d c o d e l i k e a w i z a r d +# +# sourcerer by xero harrison (http://sourcerer.xero.nu) +# ├─ based on sorcerer by Jeet Sukumaran (http://jeetworks.org) +# └─ based on mustang by Henrique C. Alves (hcarvalhoalves@gmail.com) + +# █▓▒░ scorcerer colors +foreground #c2c2b0 +background #222222 +cursor #c2c2b0 +selection_background #c2c2b0 +selection_foreground #222222 + +color0 #111111 +color1 #aa4450 +color2 #719611 +color3 #ff9800 +color4 #6688aa +color5 #8f6f8f +color6 #528b8b +color7 #d3d3d3 +color8 #181818 +color9 #ff6a6a +color10 #b1d631 +color11 #87875f +color12 #90b0d1 +color13 #8181a6 +color14 #87ceeb +color15 #c1cdc1 +# colorIT #719611 +# colorBD #d3d3d3 +# colorUL #528b8b diff --git a/config/kitty/themes/kitty-themes/themes/SpaceGray.conf b/config/kitty/themes/kitty-themes/themes/SpaceGray.conf new file mode 100644 index 0000000..ba9afeb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/SpaceGray.conf @@ -0,0 +1,21 @@ +background #20232c +foreground #b2b8c2 +cursor #b2b8c2 +selection_background #15171e +color0 #000000 +color8 #000000 +color1 #af4b57 +color9 #af4b57 +color2 #87b279 +color10 #87b279 +color3 #e5c078 +color11 #e5c078 +color4 #7c8fa3 +color12 #7c8fa3 +color5 #a37996 +color13 #a37996 +color6 #84a6a4 +color14 #84a6a4 +color7 #b2b8c2 +color15 #fffefe +selection_foreground #20232c diff --git a/config/kitty/themes/kitty-themes/themes/SpaceGray_Eighties.conf b/config/kitty/themes/kitty-themes/themes/SpaceGray_Eighties.conf new file mode 100644 index 0000000..8249a17 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/SpaceGray_Eighties.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #bdb9ae +cursor #bbbbbb +selection_background #262e35 +color0 #15171c +color8 #545454 +color1 #ec5f67 +color9 #ff6973 +color2 #80a763 +color10 #93d393 +color3 #fdc253 +color11 #ffd156 +color4 #5485c0 +color12 #4d83d0 +color5 #bf83c0 +color13 #ff55ff +color6 #57c2c0 +color14 #83e8e4 +color7 #eeece7 +color15 #ffffff +selection_foreground #212121 diff --git a/config/kitty/themes/kitty-themes/themes/SpaceGray_Eighties_Dull.conf b/config/kitty/themes/kitty-themes/themes/SpaceGray_Eighties_Dull.conf new file mode 100644 index 0000000..eabf184 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/SpaceGray_Eighties_Dull.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #c8c5bc +cursor #bbbbbb +selection_background #262e36 +color0 #15171c +color8 #545454 +color1 #b14956 +color9 #ec5f67 +color2 #91b377 +color10 #88e985 +color3 #c6725a +color11 #fdc253 +color4 #7b8fa4 +color12 #5485c0 +color5 #a5779e +color13 #bf83c0 +color6 #7fcccb +color14 #58c2c0 +color7 #b2b8c2 +color15 #ffffff +selection_foreground #212121 diff --git a/config/kitty/themes/kitty-themes/themes/Spacedust.conf b/config/kitty/themes/kitty-themes/themes/Spacedust.conf new file mode 100644 index 0000000..08b93c4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Spacedust.conf @@ -0,0 +1,21 @@ +background #0a1e24 +foreground #ecefc1 +cursor #708183 +selection_background #0a385c +color0 #6e5246 +color8 #674c31 +color1 #e35a00 +color9 #ff8a39 +color2 #5cab96 +color10 #adcab8 +color3 #e3cd7b +color11 #ffc777 +color4 #0e548b +color12 #67a0cd +color5 #e35a00 +color13 #ff8a39 +color6 #06afc7 +color14 #83a6b3 +color7 #f0f1ce +color15 #fefff0 +selection_foreground #0a1e24 diff --git a/config/kitty/themes/kitty-themes/themes/Spacemacs.conf b/config/kitty/themes/kitty-themes/themes/Spacemacs.conf new file mode 100644 index 0000000..15e9c5f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Spacemacs.conf @@ -0,0 +1,20 @@ +foreground #bfbfbf +background #282a2e +selection_background #5c4c79 +url_color #29a1ae +color0 #292b2d +color8 #68717b +color1 #ce527a +color9 #ce527a +color2 #2d9474 +color10 #84d82f +color3 #bfa325 +color11 #edad0d +color4 #4e97d6 +color12 #4c91cc +color5 #bb6dc3 +color13 #bb6dc3 +color6 #299ba2 +color14 #299ba2 +color7 #e4e4e4 +color15 #f2f2f2 diff --git a/config/kitty/themes/kitty-themes/themes/Spiderman.conf b/config/kitty/themes/kitty-themes/themes/Spiderman.conf new file mode 100644 index 0000000..a72bbca --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Spiderman.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #e2e2e2 +cursor #2b3fff +selection_background #070e4f +color0 #1b1d1e +color8 #505354 +color1 #e60712 +color9 #ff0325 +color2 #e22828 +color10 #ff3238 +color3 #e24655 +color11 #fe3935 +color4 #2b3fff +color12 #1d4fff +color5 #2435db +color13 #737bff +color6 #3255ff +color14 #6083ff +color7 #fffef6 +color15 #fefff9 +selection_foreground #1b1d1e diff --git a/config/kitty/themes/kitty-themes/themes/Spring.conf b/config/kitty/themes/kitty-themes/themes/Spring.conf new file mode 100644 index 0000000..4df6d1c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Spring.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #4d4d4c +cursor #4d4d4c +selection_background #d6d6d6 +color0 #000000 +color8 #000000 +color1 #ff4c83 +color9 #ff0021 +color2 #1f8c3a +color10 #1fc231 +color3 #1fc95a +color11 #d4b706 +color4 #1cd2ee +color12 #15a9fd +color5 #8959a8 +color13 #8959a8 +color6 #3e999f +color14 #3e999f +color7 #fffefe +color15 #fffefe +selection_foreground #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Square.conf b/config/kitty/themes/kitty-themes/themes/Square.conf new file mode 100644 index 0000000..e5457a5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Square.conf @@ -0,0 +1,21 @@ +background #1a1a1a +foreground #acacab +cursor #fbfacc +selection_background #4d4d4d +color0 #050505 +color8 #141414 +color1 #e9897c +color9 #f99286 +color2 #b6377d +color10 #c3f786 +color3 #ecebbe +color11 #fcfbcc +color4 #a9cdeb +color12 #b6defb +color5 #75507b +color13 #ad7fa8 +color6 #c9caec +color14 #d7d9fc +color7 #f2f2f2 +color15 #e2e2e2 +selection_foreground #1a1a1a diff --git a/config/kitty/themes/kitty-themes/themes/Srcery.conf b/config/kitty/themes/kitty-themes/themes/Srcery.conf new file mode 100644 index 0000000..a81096f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Srcery.conf @@ -0,0 +1,56 @@ +# vim:ft=kitty + +## name: srcery +## author: Daniel Berg +## license: MIT +## upstream: https://github.com/srcery-colors/srcery-terminal/blob/master/kitty/srcery_kitty.conf +## blurb: Srcery is a color scheme with clearly defined contrasting colors and +## a slightly earthy tone. + +#: The basic colors + +foreground #fce8c3 +background #1c1b19 +selection_foreground #1c1b19 +selection_background #fce8c3 + + +#: Cursor colors + +cursor #fbb829 +cursor_text_color background + + +#: The basic 16 colors + +#: black +color0 #1c1b19 +color8 #918175 + +#: red +color1 #ef2f27 +color9 #f75341 + +#: green +color2 #519f50 +color10 #98bc37 + +#: yellow +color3 #fbb829 +color11 #fed06e + +#: blue +color4 #2c78bf +color12 #68a8e4 + +#: magenta +color5 #e02c6d +color13 #ff5c8f + +#: cyan +color6 #0aaeb3 +color14 #2be4d0 + +#: white +color7 #baa67f +color15 #fce8c3 diff --git a/config/kitty/themes/kitty-themes/themes/Substrata.conf b/config/kitty/themes/kitty-themes/themes/Substrata.conf new file mode 100644 index 0000000..90c61d5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Substrata.conf @@ -0,0 +1,26 @@ +# Substrata Theme +# Licence: [ISC License](https://opensource.org/licenses/ISC) + +foreground #b5b4c9 +background #191c25 + +selection_foreground #191c25 +selection_background #b5b4c9 +url_color #fe9f7c + +color0 #2e313d +color8 #5b5f71 +color1 #cf8164 +color9 #fe9f7c +color2 #76a065 +color10 #92c47e +color3 #ab924c +color11 #d2b45f +color4 #8296b0 +color12 #a0b9d8 +color5 #a18daf +color13 #c6aed7 +color6 #659ea2 +color14 #7dc2c7 +color7 #b5b4c9 +color15 #f0ecfe diff --git a/config/kitty/themes/kitty-themes/themes/Sundried.conf b/config/kitty/themes/kitty-themes/themes/Sundried.conf new file mode 100644 index 0000000..d5ff99d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Sundried.conf @@ -0,0 +1,21 @@ +background #1a1818 +foreground #c8c8c8 +cursor #fffefe +selection_background #302b2a +color0 #302b2a +color8 #4d4d47 +color1 #a6463d +color9 #aa000c +color2 #577644 +color10 #128c20 +color3 #9c5f2a +color11 #fc6a20 +color4 #485a98 +color12 #7898f7 +color5 #854551 +color13 #fc89a0 +color6 #9c814e +color14 #fad384 +color7 #c8c8c8 +color15 #fffefe +selection_foreground #1a1818 diff --git a/config/kitty/themes/kitty-themes/themes/Symfonic.conf b/config/kitty/themes/kitty-themes/themes/Symfonic.conf new file mode 100644 index 0000000..9b5e0d3 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Symfonic.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #dc322f +selection_background #073642 +color0 #000000 +color8 #1b1d21 +color1 #dc322f +color9 #dc322f +color2 #56db3a +color10 #56db3a +color3 #ff8400 +color11 #ff8400 +color4 #0084d4 +color12 #0084d4 +color5 #b729d9 +color13 #b729d9 +color6 #ccccff +color14 #ccccff +color7 #ffffff +color15 #ffffff +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Tango_Dark.conf b/config/kitty/themes/kitty-themes/themes/Tango_Dark.conf new file mode 100644 index 0000000..6be2e09 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Tango_Dark.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #ffffff +selection_background #b4d5ff +color0 #000000 +color8 #555753 +color1 #cc0000 +color9 #ef2929 +color2 #4e9a06 +color10 #8ae234 +color3 #c4a000 +color11 #fce94f +color4 #3465a4 +color12 #729fcf +color5 #75507b +color13 #ad7fa8 +color6 #06989a +color14 #34e2e2 +color7 #d3d7cf +color15 #eeeeec +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Tango_Light.conf b/config/kitty/themes/kitty-themes/themes/Tango_Light.conf new file mode 100644 index 0000000..8bb7f59 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Tango_Light.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #000000 +cursor #000000 +selection_background #b4d5ff +color0 #000000 +color8 #555753 +color1 #cc0000 +color9 #ef2929 +color2 #4e9a06 +color10 #8ae234 +color3 #c4a000 +color11 #fce94f +color4 #3465a4 +color12 #729fcf +color5 #75507b +color13 #ad7fa8 +color6 #06989a +color14 #34e2e2 +color7 #d3d7cf +color15 #eeeeec +selection_foreground #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Teerb.conf b/config/kitty/themes/kitty-themes/themes/Teerb.conf new file mode 100644 index 0000000..9e9cab7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Teerb.conf @@ -0,0 +1,21 @@ +background #262626 +foreground #d0d0d0 +cursor #e3c8ae +selection_background #4d4d4d +color0 #1c1c1c +color8 #1c1c1c +color1 #d68686 +color9 #d68686 +color2 #aed686 +color10 #aed686 +color3 #d7af87 +color11 #e4c9af +color4 #86aed6 +color12 #86aed6 +color5 #d6aed6 +color13 #d6aed6 +color6 #8adbb4 +color14 #b1e7dd +color7 #d0d0d0 +color15 #efefef +selection_foreground #262626 diff --git a/config/kitty/themes/kitty-themes/themes/Thayer_Bright.conf b/config/kitty/themes/kitty-themes/themes/Thayer_Bright.conf new file mode 100644 index 0000000..b74bc60 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Thayer_Bright.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #f8f8f8 +cursor #fc971e +selection_background #4d4d4d +color0 #1b1d1e +color8 #505354 +color1 #f92672 +color9 #ff5995 +color2 #4df740 +color10 #b6e354 +color3 #f3fd21 +color11 #feed6c +color4 #2656d6 +color12 #3f78ff +color5 #8c54fe +color13 #9e6ffe +color6 #37c8b4 +color14 #23ced4 +color7 #ccccc6 +color15 #f8f8f2 +selection_foreground #1b1d1e diff --git a/config/kitty/themes/kitty-themes/themes/The_Hulk.conf b/config/kitty/themes/kitty-themes/themes/The_Hulk.conf new file mode 100644 index 0000000..81bd962 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/The_Hulk.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #b4b4b4 +cursor #15b61a +selection_background #4d4f4c +color0 #1b1d1e +color8 #505354 +color1 #259d1a +color9 #8dff2a +color2 #13ce2f +color10 #48ff76 +color3 #62e456 +color11 #3afe15 +color4 #2424f4 +color12 #4f6a95 +color5 #641e73 +color13 #72579d +color6 #378ca9 +color14 #3f85a5 +color7 #d8d8d0 +color15 #e5e5e0 +selection_foreground #1b1d1e diff --git a/config/kitty/themes/kitty-themes/themes/Tomorrow.conf b/config/kitty/themes/kitty-themes/themes/Tomorrow.conf new file mode 100644 index 0000000..23a8dfc --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Tomorrow.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #4c4c4c +cursor #4c4c4c +selection_background #d6d6d6 +color0 #000000 +color8 #000000 +color1 #c82828 +color9 #c82828 +color2 #708b00 +color10 #708b00 +color3 #e9b600 +color11 #e9b600 +color4 #4170ae +color12 #4170ae +color5 #8958a7 +color13 #8958a7 +color6 #3d999f +color14 #3d999f +color7 #fffefe +color15 #fffefe +selection_foreground #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Tomorrow_Night.conf b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night.conf new file mode 100644 index 0000000..0bf3cf7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night.conf @@ -0,0 +1,21 @@ +background #1d1f21 +foreground #c4c8c5 +cursor #c4c8c5 +selection_background #363a41 +color0 #000000 +color8 #000000 +color1 #cc6666 +color9 #cc6666 +color2 #b5bd68 +color10 #b5bd68 +color3 #f0c574 +color11 #f0c574 +color4 #80a1bd +color12 #80a1bd +color5 #b294ba +color13 #b294ba +color6 #8abdb6 +color14 #8abdb6 +color7 #fffefe +color15 #fffefe +selection_foreground #1d1f21 diff --git a/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Blue.conf b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Blue.conf new file mode 100644 index 0000000..b32cbfd --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Blue.conf @@ -0,0 +1,21 @@ +background #002450 +foreground #fffefe +cursor #fffefe +selection_background #003e8e +color0 #000000 +color8 #000000 +color1 #ff9ca3 +color9 #ff9ca3 +color2 #d0f0a8 +color10 #d0f0a8 +color3 #ffedac +color11 #ffedac +color4 #badaff +color12 #badaff +color5 #ebbaff +color13 #ebbaff +color6 #99ffff +color14 #99ffff +color7 #fffefe +color15 #fffefe +selection_foreground #002450 diff --git a/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Bright.conf b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Bright.conf new file mode 100644 index 0000000..346f3dc --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Bright.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #e9e9e9 +cursor #e9e9e9 +selection_background #424242 +color0 #000000 +color8 #000000 +color1 #d44d53 +color9 #d44d53 +color2 #b9c949 +color10 #b9c949 +color3 #e6c446 +color11 #e6c446 +color4 #79a6da +color12 #79a6da +color5 #c396d7 +color13 #c396d7 +color6 #70c0b1 +color14 #70c0b1 +color7 #fffefe +color15 #fffefe +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Eighties.conf b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Eighties.conf new file mode 100644 index 0000000..404efc7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Tomorrow_Night_Eighties.conf @@ -0,0 +1,21 @@ +background #2c2c2c +foreground #cccccc +cursor #cccccc +selection_background #505050 +color0 #000000 +color8 #000000 +color1 #f17779 +color9 #f17779 +color2 #99cc99 +color10 #99cc99 +color3 #ffcc66 +color11 #ffcc66 +color4 #6699cc +color12 #6699cc +color5 #cc99cc +color13 #cc99cc +color6 #66cccc +color14 #66cccc +color7 #fffefe +color15 #fffefe +selection_foreground #2c2c2c diff --git a/config/kitty/themes/kitty-themes/themes/ToyChest.conf b/config/kitty/themes/kitty-themes/themes/ToyChest.conf new file mode 100644 index 0000000..040cb8d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/ToyChest.conf @@ -0,0 +1,21 @@ +background #23364a +foreground #30cf7b +cursor #d4d4d4 +selection_background #5f207a +color0 #2c3f57 +color8 #326889 +color1 #be2d26 +color9 #dd5943 +color2 #199171 +color10 #30cf7b +color3 #da8e26 +color11 #e7d74b +color4 #325d96 +color12 #33a5d9 +color5 #8a5ddb +color13 #ad6bdc +color6 #35a08f +color14 #41c3ad +color7 #23d082 +color15 #d4d4d4 +selection_foreground #23364a diff --git a/config/kitty/themes/kitty-themes/themes/Treehouse.conf b/config/kitty/themes/kitty-themes/themes/Treehouse.conf new file mode 100644 index 0000000..940751e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Treehouse.conf @@ -0,0 +1,21 @@ +background #191919 +foreground #776b53 +cursor #fac814 +selection_background #776b53 +color0 #321200 +color8 #423625 +color1 #b1270e +color9 #ed5c20 +color2 #44a900 +color10 #55f237 +color3 #a9810b +color11 #f1b731 +color4 #578499 +color12 #85cfec +color5 #96363c +color13 #e04b5a +color6 #b2591d +color14 #f07c14 +color7 #776b53 +color15 #ffc800 +selection_foreground #191919 diff --git a/config/kitty/themes/kitty-themes/themes/Twilight.conf b/config/kitty/themes/kitty-themes/themes/Twilight.conf new file mode 100644 index 0000000..452a4d2 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Twilight.conf @@ -0,0 +1,21 @@ +background #141414 +foreground #feffd3 +cursor #ffffff +selection_background #303030 +color0 #141414 +color8 #262626 +color1 #c06c43 +color9 #dd7c4c +color2 #afb979 +color10 #cbd88c +color3 #c2a86c +color11 #e1c47d +color4 #444649 +color12 #5a5d61 +color5 #b4be7b +color13 #d0db8e +color6 #778284 +color14 #8a989a +color7 #feffd3 +color15 #feffd3 +selection_foreground #141414 diff --git a/config/kitty/themes/kitty-themes/themes/Ubuntu.conf b/config/kitty/themes/kitty-themes/themes/Ubuntu.conf new file mode 100644 index 0000000..96e9d09 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Ubuntu.conf @@ -0,0 +1,21 @@ +background #300a24 +foreground #eeeeec +cursor #bbbbbb +selection_background #b4d5ff +color0 #2e3436 +color8 #555753 +color1 #cc0000 +color9 #ef2929 +color2 #4e9a06 +color10 #8ae234 +color3 #c4a000 +color11 #fce94f +color4 #3465a4 +color12 #729fcf +color5 #75507b +color13 #ad7fa8 +color6 #06989a +color14 #34e2e2 +color7 #d3d7cf +color15 #eeeeec +selection_foreground #300a24 diff --git a/config/kitty/themes/kitty-themes/themes/Urple.conf b/config/kitty/themes/kitty-themes/themes/Urple.conf new file mode 100644 index 0000000..a29dcad --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Urple.conf @@ -0,0 +1,21 @@ +background #1b1b23 +foreground #86799a +cursor #a062ea +selection_background #a062ea +color0 #000000 +color8 #5c3125 +color1 #af425b +color9 #ff6387 +color2 #37a315 +color10 #28e51f +color3 #ac5b41 +color11 #f08061 +color4 #554d9a +color12 #8579ed +color5 #6c3ba1 +color13 #a05dee +color6 #808080 +color14 #eaeaea +color7 #87799c +color15 #bfa3ff +selection_foreground #1b1b23 diff --git a/config/kitty/themes/kitty-themes/themes/VSCode_Dark.conf b/config/kitty/themes/kitty-themes/themes/VSCode_Dark.conf new file mode 100644 index 0000000..713f4fb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/VSCode_Dark.conf @@ -0,0 +1,57 @@ +# vim:ft=kitty +## name: VSCode_Dark +## author: ported from Microsoft VSCode by huabeiyou +## license: MIT +## blurb: the integrated terminal's default dark theme + +# The basic colors +foreground #cccccc +background #1e1e1e +selection_foreground #cccccc +selection_background #264f78 + +# Cursor colors +cursor #ffffff +cursor_text_color #1e1e1e + +# kitty window border colors +active_border_color #e7e7e7 +inactive_border_color #414140 + +# Tab bar colors +active_tab_foreground #ffffff +active_tab_background #3a3d41 +inactive_tab_foreground #858485 +inactive_tab_background #1e1e1e + +# black +color0 #000000 +color8 #666666 + +# red +color1 #f14c4c +color9 #cd3131 + +# green +color2 #23d18b +color10 #0dbc79 + +# yellow +color3 #f5f543 +color11 #e5e510 + +# blue +color4 #3b8eea +color12 #2472c8 + +# magenta +color5 #d670d6 +color13 #bc3fbc + +# cyan +color6 #29b8db +color14 #11a8cd + +# white +color7 #e5e5e5 +color15 #e5e5e5 diff --git a/config/kitty/themes/kitty-themes/themes/Vaughn.conf b/config/kitty/themes/kitty-themes/themes/Vaughn.conf new file mode 100644 index 0000000..26d1885 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Vaughn.conf @@ -0,0 +1,21 @@ +background #25234e +foreground #dcdccc +cursor #ff5555 +selection_background #b5d5ff +color0 #24234f +color8 #709080 +color1 #705050 +color9 #dca3a3 +color2 #60b48a +color10 #60b48a +color3 #dfaf8f +color11 #f0dfaf +color4 #5454ff +color12 #5454ff +color5 #f08cc3 +color13 #ec93d3 +color6 #8cd0d3 +color14 #93e0e3 +color7 #709080 +color15 #ffffff +selection_foreground #25234e diff --git a/config/kitty/themes/kitty-themes/themes/VibrantInk.conf b/config/kitty/themes/kitty-themes/themes/VibrantInk.conf new file mode 100644 index 0000000..5fbd281 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/VibrantInk.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #ffffff +selection_background #b4d5ff +color0 #868686 +color8 #545454 +color1 #ff6600 +color9 #ff0000 +color2 #ccff04 +color10 #00ff00 +color3 #ffcc00 +color11 #ffff00 +color4 #44b3cc +color12 #0000ff +color5 #9933cc +color13 #ff00ff +color6 #44b3cc +color14 #00ffff +color7 #f4f4f4 +color15 #e5e5e5 +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/WarmNeon.conf b/config/kitty/themes/kitty-themes/themes/WarmNeon.conf new file mode 100644 index 0000000..3256f5d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/WarmNeon.conf @@ -0,0 +1,21 @@ +background #3f3f3f +foreground #afdab6 +cursor #2fff24 +selection_background #b0ad21 +color0 #000000 +color8 #fdfcfc +color1 #e24345 +color9 #e86f71 +color2 #38b139 +color10 #9bc08f +color3 #dae145 +color11 #ddd979 +color4 #4260c5 +color12 #7a90d5 +color5 #f81ffb +color13 #f674b9 +color6 #29bad3 +color14 #5ed1e4 +color7 #d0b8a3 +color15 #d8c8bb +selection_foreground #3f3f3f diff --git a/config/kitty/themes/kitty-themes/themes/Wez.conf b/config/kitty/themes/kitty-themes/themes/Wez.conf new file mode 100644 index 0000000..11706ab --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Wez.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #b3b3b3 +cursor #52ad70 +selection_background #4c52f8 +color0 #000000 +color8 #555555 +color1 #cc5555 +color9 #ff5555 +color2 #55cc55 +color10 #55ff55 +color3 #cdcd55 +color11 #ffff55 +color4 #5455cb +color12 #5555ff +color5 #cc55cc +color13 #ff55ff +color6 #7acaca +color14 #55ffff +color7 #cccccc +color15 #ffffff +selection_foreground #000000 diff --git a/config/kitty/themes/kitty-themes/themes/WildCherry.conf b/config/kitty/themes/kitty-themes/themes/WildCherry.conf new file mode 100644 index 0000000..a4bfa47 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/WildCherry.conf @@ -0,0 +1,21 @@ +background #1f1626 +foreground #d9faff +cursor #dd00ff +selection_background #002731 +color0 #000506 +color8 #009cc9 +color1 #d94085 +color9 #da6bab +color2 #2ab250 +color10 #f4dba5 +color3 #ffd06e +color11 #eac066 +color4 #873bdb +color12 #2f8bb9 +color5 #ececec +color13 #ae636b +color6 #c1b8b6 +color14 #ff919d +color7 #fff8dd +color15 #e4838d +selection_foreground #1f1626 diff --git a/config/kitty/themes/kitty-themes/themes/Wombat.conf b/config/kitty/themes/kitty-themes/themes/Wombat.conf new file mode 100644 index 0000000..d4616fc --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Wombat.conf @@ -0,0 +1,21 @@ +background #171717 +foreground #ded9ce +cursor #bbbbbb +selection_background #453a39 +color0 #000000 +color8 #313131 +color1 #ff605a +color9 #f58b7f +color2 #b1e869 +color10 #dcf88f +color3 #ead89c +color11 #eee5b2 +color4 #5da9f6 +color12 #a5c7ff +color5 #e86aff +color13 #ddaaff +color6 #82fff6 +color14 #b6fff9 +color7 #ded9ce +color15 #fefffe +selection_foreground #171717 diff --git a/config/kitty/themes/kitty-themes/themes/Wryan.conf b/config/kitty/themes/kitty-themes/themes/Wryan.conf new file mode 100644 index 0000000..73d758d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Wryan.conf @@ -0,0 +1,21 @@ +background #101010 +foreground #999993 +cursor #9d9eca +selection_background #4d4d4d +color0 #333333 +color8 #3d3d3d +color1 #8c4665 +color9 #bf4d80 +color2 #287373 +color10 #53a6a6 +color3 #7c7c99 +color11 #9e9ecb +color4 #395573 +color12 #477ab3 +color5 #5e468c +color13 #7e62b3 +color6 #31658c +color14 #6096bf +color7 #899ca1 +color15 #c0c0c0 +selection_foreground #101010 diff --git a/config/kitty/themes/kitty-themes/themes/YsDark.conf b/config/kitty/themes/kitty-themes/themes/YsDark.conf new file mode 100644 index 0000000..1dd10d6 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/YsDark.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: YsDark +## author: Ya-suke +## license: MIT +## blurb: A dracula inspired colorscheme for kitty. + +# basic colors +foreground #bbc5ff +background #1B1E35 +selection_foreground #ffffff +selection_background #44475a + +# Cursor colors +cursor #bbc5ff +cursor_text_color background + +# URL +url_color #8be9fd + +# Colors for marks +mark1_foreground #1B1E35 +mark1_background #f07178 + +# Tab bar colors +active_tab_foreground #1B1E35 +active_tab_background #bbc5ff +inactive_tab_foreground #1B1E35 +inactive_tab_background #6272a4 + +# black +color0 #101010 +color8 #434758 + +# red +color1 #f07178 +color9 #ff8b92 + +# green +color2 #c3e88d +color10 #ddffa7 + +# yellow +color3 #ffcb6b +color11 #ffe585 + +# blue +color4 #82aaff +color12 #9cc4ff + +# magenta +color5 #e1acff +color13 #c792ea + +# cyan +color6 #89ddff +color14 #a3f7ff + +# white +color7 #d0d0d0 +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/Zenburn.conf b/config/kitty/themes/kitty-themes/themes/Zenburn.conf new file mode 100644 index 0000000..032b99b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/Zenburn.conf @@ -0,0 +1,25 @@ +# Zenburn by jnurmine, https://github.com/jnurmine/Zenburn +# This work is licensed under the terms of the GNU GPL license. +# For a copy, see http://www.gnu.org/licenses/gpl.html. + +background #3f3f3f +foreground #dcdccc +cursor #73635a +selection_background #21322f +color0 #4d4d4d +color8 #709080 +color1 #705050 +color9 #dca3a3 +color2 #60b48a +color10 #c3bf9f +color3 #f0deae +color11 #dfcf9f +color4 #506070 +color12 #94bff3 +color5 #dc8cc3 +color13 #ec93d3 +color6 #8cd0d3 +color14 #93e0e3 +color7 #dcdccc +color15 #ffffff +selection_foreground #3f3f3f diff --git a/config/kitty/themes/kitty-themes/themes/adwaita_dark.conf b/config/kitty/themes/kitty-themes/themes/adwaita_dark.conf new file mode 100644 index 0000000..cb1502d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/adwaita_dark.conf @@ -0,0 +1,51 @@ +# vim:ft=kitty + +## name: Adwaita dark +## license: MIT +## author: Emil Löfquist (https://github.com/ewal) +## upstream: https://github.com/ewal/kitty-adwaita/blob/main/adwaita_dark.conf +## blurb: Adwaita dark - based on https://github.com/Mofiqul/adwaita.nvim + +background #1d1d1d +foreground #deddda + +selection_background #303030 +selection_foreground #c0bfbc + +url_color #1a5fb4 + +wayland_titlebar_color system +macos_titlebar_color system + +cursor #deddda +cursor_text_color #1d1d1d + +active_border_color #4f4f4f +inactive_border_color #282828 +bell_border_color #ed333b +visual_bell_color none + +active_tab_background #242424 +active_tab_foreground #fcfcfc +inactive_tab_background #303030 +inactive_tab_foreground #b0afac +tab_bar_background none +tab_bar_margin_color none + +color0 #1d1d1d +color1 #ed333b +color2 #57e389 +color3 #ff7800 +color4 #62a0ea +color5 #9141ac +color6 #5bc8af +color7 #deddda + +color8 #9a9996 +color9 #f66151 +color10 #8ff0a4 +color11 #ffa348 +color12 #99c1f1 +color13 #dc8add +color14 #93ddc2 +color15 #f6f5f4 diff --git a/config/kitty/themes/kitty-themes/themes/adwaita_darker.conf b/config/kitty/themes/kitty-themes/themes/adwaita_darker.conf new file mode 100644 index 0000000..6cd386b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/adwaita_darker.conf @@ -0,0 +1,51 @@ +# vim:ft=kitty + +## name: Adwaita darker +## license: MIT +## author: Emil Löfquist (https://github.com/ewal) +## upstream: https://github.com/ewal/kitty-adwaita/blob/main/adwaita_darker.conf +## blurb: Adwaita darker - based on https://github.com/Mofiqul/adwaita.nvim + +background #000000 +foreground #deddda + +selection_background #1c1c1c +selection_foreground #c0bfbc + +url_color #1a5fb4 + +wayland_titlebar_color system +macos_titlebar_color system + +cursor #deddda +cursor_text_color #000000 + +active_border_color #1e1e1e +inactive_border_color #282828 +bell_border_color #ed333b +visual_bell_color none + +active_tab_background #101010 +active_tab_foreground #fcfcfc +inactive_tab_background #1c1c1c +inactive_tab_foreground #b0afac +tab_bar_background none +tab_bar_margin_color none + +color0 #000000 +color1 #ed333b +color2 #57e389 +color3 #ff7800 +color4 #62a0ea +color5 #9141ac +color6 #5bc8af +color7 #deddda + +color8 #9a9996 +color9 #f66151 +color10 #8ff0a4 +color11 #ffa348 +color12 #99c1f1 +color13 #dc8add +color14 #93ddc2 +color15 #f6f5f4 diff --git a/config/kitty/themes/kitty-themes/themes/adwaita_light.conf b/config/kitty/themes/kitty-themes/themes/adwaita_light.conf new file mode 100644 index 0000000..6ca6a65 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/adwaita_light.conf @@ -0,0 +1,51 @@ +# vim:ft=kitty + +## name: Adwaita light +## author: Emil Löfquist (https://github.com/ewal) +## license: MIT +## upstream: https://github.com/ewal/kitty-adwaita/blob/main/adwaita_light.conf +## blurb: Adwaita light - based on https://github.com/Mofiqul/adwaita.nvim + +background #fcfcfc +foreground #504e55 + +selection_background #deddda +selection_foreground #5e5c64 + +url_color #1a5fb4 + +wayland_titlebar_color system +macos_titlebar_color system + +cursor #504e55 +cursor_text_color #fcfcfc + +active_border_color #c0bfbc +inactive_border_color #f6f5f4 +bell_border_color #ed333b +visual_bell_color none + +active_tab_background #b0afac +active_tab_foreground #504e55 +inactive_tab_background #deddda +inactive_tab_foreground #5e5c64 +tab_bar_background none +tab_bar_margin_color none + +color0 #fcfcfc +color1 #ed333b +color2 #57e389 +color3 #ff7800 +color4 #62a0ea +color5 #9141ac +color6 #5bc8af +color7 #deddda + +color8 #9a9996 +color9 #f66151 +color10 #8ff0a4 +color11 #ffa348 +color12 #99c1f1 +color13 #dc8add +color14 #93ddc2 +color15 #f6f5f4 diff --git a/config/kitty/themes/kitty-themes/themes/ayu.conf b/config/kitty/themes/kitty-themes/themes/ayu.conf new file mode 100644 index 0000000..8030263 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/ayu.conf @@ -0,0 +1,21 @@ +background #0e1419 +foreground #e5e1cf +cursor #f19618 +selection_background #243340 +color0 #000000 +color8 #323232 +color1 #ff3333 +color9 #ff6565 +color2 #b8cc52 +color10 #e9fe83 +color3 #e6c446 +color11 #fff778 +color4 #36a3d9 +color12 #68d4ff +color5 #f07078 +color13 #ffa3aa +color6 #95e5cb +color14 #c7fffc +color7 #ffffff +color15 #ffffff +selection_foreground #0e1419 diff --git a/config/kitty/themes/kitty-themes/themes/ayu_light.conf b/config/kitty/themes/kitty-themes/themes/ayu_light.conf new file mode 100644 index 0000000..35c532c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/ayu_light.conf @@ -0,0 +1,21 @@ +background #fafafa +foreground #5b6673 +cursor #ff6900 +selection_background #f0ede4 +color0 #000000 +color8 #323232 +color1 #ff3333 +color9 #ff6565 +color2 #86b200 +color10 #b8e532 +color3 #f19618 +color11 #ffc849 +color4 #41a6d9 +color12 #73d7ff +color5 #f07078 +color13 #ffa3aa +color6 #4cbe99 +color14 #7ff0cb +color7 #ffffff +color15 #ffffff +selection_foreground #fafafa diff --git a/config/kitty/themes/kitty-themes/themes/ayu_mirage.conf b/config/kitty/themes/kitty-themes/themes/ayu_mirage.conf new file mode 100644 index 0000000..19d2e40 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/ayu_mirage.conf @@ -0,0 +1,21 @@ +background #212733 +foreground #d9d7ce +cursor #ffcc66 +selection_background #343f4c +color0 #191e2a +color8 #686868 +color1 #ed8274 +color9 #f28779 +color2 #a6cc70 +color10 #bae67e +color3 #fad07b +color11 #ffd580 +color4 #6dcbfa +color12 #73d0ff +color5 #cfbafa +color13 #d4bfff +color6 #90e1c6 +color14 #95e6cb +color7 #c7c7c7 +color15 #ffffff +selection_foreground #212733 diff --git a/config/kitty/themes/kitty-themes/themes/breath2.conf b/config/kitty/themes/kitty-themes/themes/breath2.conf new file mode 100644 index 0000000..d3a8aa0 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/breath2.conf @@ -0,0 +1,53 @@ +## name: Breath2 +## author: b3yc0d3 +## license: MIT +## upstream: https://raw.githubusercontent.com/b3yc0d3/my-kitty-themes/main/themes/breath2.conf +## blurb: Breath2 Theme for Kitty Terminal + +#: The basic colors +foreground #17a88b +background #1e2229 +selection_foreground #1e2229 +selection_background #00bc96 + +#: Cursor +cursor #00bc96 +cursor_text_color #1e2229 + +#: URL underline color when hovering with mouse +url_color #17a88b +url_style straight + +#: The basic 16 colors + +#: black +color0 #0d0f11 +color8 #2e3439 + +#: red +color1 #c0392b +color9 #783228 + +#: green +color2 #55a649 +color10 #32642c + +#: yellow +color3 #fdbc4b +color11 #b65619 + +#: blue +color4 #3daee9 +color12 #1b668f + +#: magenta +color5 #8e44ad +color13 #614a73 + +#: cyan +color6 #16a085 +color14 #186c60 + +#: white +color7 #ffffff +color15 #63686d diff --git a/config/kitty/themes/kitty-themes/themes/cherry-midnight.conf b/config/kitty/themes/kitty-themes/themes/cherry-midnight.conf new file mode 100644 index 0000000..370bf93 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/cherry-midnight.conf @@ -0,0 +1,36 @@ +## name: Cherry Midnight +## author: nullxception +## license: GPLv3 +## upstream: https://github.com/nullxception/cherry-kde/raw/main/kitty/cherry-midnight.conf + +foreground #bdc3df +background #101017 +selection_foreground #101017 +selection_background #bdc3df + +cursor #bdc3df +cursor_text_color #101017 +url_color #85b6ff + +tab_bar_background #101017 +active_tab_foreground #bdc3df +active_tab_background #33333f +inactive_tab_foreground #dedeff +inactive_tab_background #101017 + +color0 #33333f +color1 #ff568e +color2 #64de83 +color3 #efff73 +color4 #73a9ff +color5 #946ff7 +color6 #62c6da +color7 #dedeff +color8 #43435a +color9 #ff69a2 +color10 #73de8a +color11 #f3ff85 +color12 #85b6ff +color13 #a481f7 +color14 #71c2d9 +color15 #ebebff diff --git a/config/kitty/themes/kitty-themes/themes/cherry.conf b/config/kitty/themes/kitty-themes/themes/cherry.conf new file mode 100644 index 0000000..b5a013c --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/cherry.conf @@ -0,0 +1,36 @@ +## name: Cherry +## author: nullxception +## license: GPLv3 +## upstream: https://github.com/nullxception/cherry-kde/raw/main/kitty/cherry.conf + +foreground #bdc3df +background #1f1f2a +selection_foreground #1f1f2a +selection_background #bdc3df + +cursor #bdc3df +cursor_text_color #1f1f2a +url_color #85b6ff + +tab_bar_background #1f1f2a +active_tab_foreground #bdc3df +active_tab_background #43435a +inactive_tab_foreground #dedeff +inactive_tab_background #1f1f2a + +color0 #43435a +color1 #ff568e +color2 #64de83 +color3 #efff73 +color4 #73a9ff +color5 #946ff7 +color6 #62c6da +color7 #dedeff +color8 #53536b +color9 #ff69a2 +color10 #73de8a +color11 #f3ff85 +color12 #85b6ff +color13 #a481f7 +color14 #71c2d9 +color15 #ebebff diff --git a/config/kitty/themes/kitty-themes/themes/citylights.conf b/config/kitty/themes/kitty-themes/themes/citylights.conf new file mode 100644 index 0000000..572c643 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/citylights.conf @@ -0,0 +1,75 @@ +# vim:ft=kitty +## name: citylights +## author: 食無魚 +## license: MIT +## upstream: https://raw.githubusercontent.com/liuyinz/dotfile/master/common/kitty/citylights.conf +## blurb: Theme for Kitty inspired by https://citylights.xyz/ + +# The basic colors +foreground #a0b3c5 +background #1d252c +selection_foreground #1d252c +selection_background #a0b3c5 + +# Cursor colors +cursor #a0b3c5 +cursor_text_color #1d252c + +# URL +url_color #5ec4ff + +# kitty window border colors +active_border_color #a0b3c5 +inactive_border_color #62686e + +# OS Window titlebar colors +wayland_titlebar_color #1d252c +macos_titlebar_color #1d252c + +# Tab bar colors +active_tab_foreground #1d252c +active_tab_background #a0b3c5 +inactive_tab_foreground #a0b3c5 +inactive_tab_background #1d252c + +# Colors for marks (marked text in the terminal) + +mark1_foreground #1d252c +mark1_background #8bd49c +mark2_foreground #1d252c +mark2_background #ebbf83 +mark3_foreground #1d252c +mark3_background #d95468 + +# The basic 16 colors +# black +color0 #1d252c +color8 #566c7d + +# red +color1 #d95468 +color9 #d95468 + +# green +color2 #8bd49c +color10 #8bd49c + +# yellow +color3 #ebbf83 +color11 #ebbf83 + +# blue +color4 #5ec4ff +color12 #5ec4ff + +# magenta +color5 #c06ece +color13 #c06ece + +# cyan +color6 #008b94 +color14 #70e1e8 + +# white +color7 #a0b3c5 +color15 #a0b3c5 diff --git a/config/kitty/themes/kitty-themes/themes/cyberpunk.conf b/config/kitty/themes/kitty-themes/themes/cyberpunk.conf new file mode 100644 index 0000000..b2cb268 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/cyberpunk.conf @@ -0,0 +1,75 @@ +## name: Cyberpunk +## license: MIT +## upstream: https://raw.githubusercontent.com/jandre953/kitty-cyberpunk/master/cyberpunk.conf +## blurb: A cyberpunk theme based on the Cyberpunk VIM Colorscheme by thedenisnikulin. + +#: The basic colors + +foreground #FF0055 +background #120B10 +selection_foreground none +selection_background #563466 + + +#: Cursor colors + +cursor #00FFC8 +cursor_text_color background + + +#: URL underline color when hovering with mouse + +url_color #FFFC58 + + +#: kitty window border colors and terminal bell colors + +active_border_color #FF0055 +inactive_border_color #101116 +bell_border_color #FF0055 +visual_bell_color none + + +#: Tab bar colors + +active_tab_foreground #140007 +active_tab_background #FF0055 +inactive_tab_foreground #FF0055 +inactive_tab_background #120B10 +tab_bar_background #140007 +tab_bar_margin_color #140007 + + +#: The basic 16 colors + +#: black +color0 #000000 +color8 #777777 + +#: red +color1 #FF0055 +color9 #FF4081 + +#: green +color2 #009550 +color10 #00FF9C + +#: yellow +color3 #F4EF00 +color11 #FFFC58 + +#: blue +color4 #6766B3 +color12 #76C1FF + +#: magenta +color5 #D57BFF +color13 #C592FF + +#: cyan +color6 #0DCDCD +color14 #00FFC8 + +#: white +color7 #EEFFFF +color15 #FFFFFF diff --git a/config/kitty/themes/kitty-themes/themes/dark_pride.conf b/config/kitty/themes/kitty-themes/themes/dark_pride.conf new file mode 100644 index 0000000..754e2fb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/dark_pride.conf @@ -0,0 +1,26 @@ +## name: Dark Pride +## author: apathyrecharge +## license: GPLv3 +## blurb: Dark trans-pride colour inspired theme + +background #0d0d1b +foreground #ccccce +selection_background #002a3a +selection_foreground #0d0f18 +cursor #ff0017 +color0 #282828 +color1 #ca1444 +color2 #789aba +color3 #b3879f +color4 #94469b +color5 #cb6fa1 +color6 #fb6e93 +color7 #cf98c1 +color8 #98218e +color9 #cb515d +color10 #5a87b1 +color11 #9c61ab +color12 #9a77b1 +color13 #f2a297 +color14 #f4436f +color15 #ebdbb2 diff --git a/config/kitty/themes/kitty-themes/themes/default.conf b/config/kitty/themes/kitty-themes/themes/default.conf new file mode 100644 index 0000000..6056824 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/default.conf @@ -0,0 +1,8 @@ +# vim:ft=kitty +# The default theme, uses all default settings from kitty + +## name: Default +## author: Kovid Goyal +## license: GPLv3 +## blurb: This theme uses all default settings from kitty. +## Use it to easily restore defaults. diff --git a/config/kitty/themes/kitty-themes/themes/duckbones.conf b/config/kitty/themes/kitty-themes/themes/duckbones.conf new file mode 100644 index 0000000..04f8ec5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/duckbones.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: duckbones +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/duckbones.conf +## blurb: A zenbones variant inspired by Spaceduck. +foreground #EBEFC0 +background #0E101A +selection_foreground #EBEFC0 +selection_background #37382D +# Cursor colors +cursor #EDF2C2 +cursor_text_color #0E101A +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #EBEFC0 +active_tab_background #4D3191 +inactive_tab_foreground #EBEFC0 +inactive_tab_background #232738 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #0E101A +color8 #2B2F46 +# red +color1 #E03600 +color9 #FF4821 +# green +color2 #5DCD97 +color10 #58DB9E +# yellow +color3 #E39500 +color11 #F6A100 +# blue +color4 #00A3CB +color12 #00B4E0 +# magenta +color5 #795CCC +color13 #B3A1E6 +# cyan +color6 #00A3CB +color14 #00B4E0 +# white +color7 #EBEFC0 +color15 #B3B692 +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/everforest_dark_hard.conf b/config/kitty/themes/kitty-themes/themes/everforest_dark_hard.conf new file mode 100644 index 0000000..c7a3b8d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/everforest_dark_hard.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty +## name: Everforest Dark Hard +## author: Sainnhe Park +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_hard.conf +## blurb: A green based color scheme designed to be warm and soft + +foreground #d3c6aa +background #272e33 +selection_foreground #9da9a0 +selection_background #464e53 + +cursor #d3c6aa +cursor_text_color #2e383c + +url_color #7fbbb3 + +active_border_color #a7c080 +inactive_border_color #4f5b58 +bell_border_color #e69875 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #272e33 +active_tab_foreground #d3c6aa +inactive_tab_background #374145 +inactive_tab_foreground #9da9a0 +tab_bar_background #2e383c +tab_bar_margin_color none + +mark1_foreground #272e33 +mark1_background #7fbbb3 +mark2_foreground #272e33 +mark2_background #d3c6aa +mark3_foreground #272e33 +mark3_background #d699b6 + +#: black +color0 #343f44 +color8 #868d80 + +#: red +color1 #e67e80 +color9 #e67e80 + +#: green +color2 #a7c080 +color10 #a7c080 + +#: yellow +color3 #dbbc7f +color11 #dbbc7f + +#: blue +color4 #7fbbb3 +color12 #7fbbb3 + +#: magenta +color5 #d699b6 +color13 #d699b6 + +#: cyan +color6 #83c092 +color14 #83c092 + +#: white +color7 #859289 +color15 #9da9a0 diff --git a/config/kitty/themes/kitty-themes/themes/everforest_dark_medium.conf b/config/kitty/themes/kitty-themes/themes/everforest_dark_medium.conf new file mode 100644 index 0000000..b2c25b4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/everforest_dark_medium.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty +## name: Everforest Dark Medium +## author: Sainnhe Park +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_medium.conf +## blurb: A green based color scheme designed to be warm and soft + +foreground #d3c6aa +background #2d353b +selection_foreground #9da9a0 +selection_background #505a60 + +cursor #d3c6aa +cursor_text_color #343f44 + +url_color #7fbbb3 + +active_border_color #a7c080 +inactive_border_color #56635f +bell_border_color #e69875 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #2d353b +active_tab_foreground #d3c6aa +inactive_tab_background #3d484d +inactive_tab_foreground #9da9a0 +tab_bar_background #343f44 +tab_bar_margin_color none + +mark1_foreground #2d353b +mark1_background #7fbbb3 +mark2_foreground #2d353b +mark2_background #d3c6aa +mark3_foreground #2d353b +mark3_background #d699b6 + +#: black +color0 #343f44 +color8 #868d80 + +#: red +color1 #e67e80 +color9 #e67e80 + +#: green +color2 #a7c080 +color10 #a7c080 + +#: yellow +color3 #dbbc7f +color11 #dbbc7f + +#: blue +color4 #7fbbb3 +color12 #7fbbb3 + +#: magenta +color5 #d699b6 +color13 #d699b6 + +#: cyan +color6 #83c092 +color14 #83c092 + +#: white +color7 #859289 +color15 #9da9a0 diff --git a/config/kitty/themes/kitty-themes/themes/everforest_dark_soft.conf b/config/kitty/themes/kitty-themes/themes/everforest_dark_soft.conf new file mode 100644 index 0000000..3b991ef --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/everforest_dark_soft.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty +## name: Everforest Dark Soft +## author: Sainnhe Park +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_soft.conf +## blurb: A green based color scheme designed to be warm and soft + +foreground #d3c6aa +background #333c43 +selection_foreground #9da9a0 +selection_background #505a60 + +cursor #d3c6aa +cursor_text_color #3a464c + +url_color #7fbbb3 + +active_border_color #a7c080 +inactive_border_color #5d6b66 +bell_border_color #e69875 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #333c43 +active_tab_foreground #d3c6aa +inactive_tab_background #434f55 +inactive_tab_foreground #859289 +tab_bar_background #3a464c +tab_bar_margin_color none + +mark1_foreground #333c43 +mark1_background #7fbbb3 +mark2_foreground #333c43 +mark2_background #d3c6aa +mark3_foreground #333c43 +mark3_background #d699b6 + +#: black +color0 #343f44 +color8 #868d80 + +#: red +color1 #e67e80 +color9 #e67e80 + +#: green +color2 #a7c080 +color10 #a7c080 + +#: yellow +color3 #dbbc7f +color11 #dbbc7f + +#: blue +color4 #7fbbb3 +color12 #7fbbb3 + +#: magenta +color5 #d699b6 +color13 #d699b6 + +#: cyan +color6 #83c092 +color14 #83c092 + +#: white +color7 #859289 +color15 #9da9a0 diff --git a/config/kitty/themes/kitty-themes/themes/everforest_light_hard.conf b/config/kitty/themes/kitty-themes/themes/everforest_light_hard.conf new file mode 100644 index 0000000..fa60335 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/everforest_light_hard.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty +## name: Everforest Light Hard +## author: Sainnhe Park +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_hard.conf +## blurb: A green based color scheme designed to be warm and soft + +foreground #5c6a72 +background #fffbef +selection_foreground #829181 +selection_background #f0f2d4 + +cursor #5c6a72 +cursor_text_color #f8f5e4 + +url_color #3a94c5 + +active_border_color #8da101 +inactive_border_color #bec5b2 +bell_border_color #f57d26 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #fffbef +active_tab_foreground #5c6a72 +inactive_tab_background #f2efdf +inactive_tab_foreground #939f91 +tab_bar_background #f8f5e4 +tab_bar_margin_color none + +mark1_foreground #fffbef +mark1_background #3a94c5 +mark2_foreground #fffbef +mark2_background #d3c6aa +mark3_foreground #fffbef +mark3_background #df69ba + +#: black +color0 #708089 +color8 #829181 + +#: red +color1 #f85552 +color9 #e66868 + +#: green +color2 #8da101 +color10 #93b259 + +#: yellow +color3 #dfa000 +color11 #dfa000 + +#: blue +color4 #3a94c5 +color12 #3a94c5 + +#: magenta +color5 #df69ba +color13 #df69ba + +#: cyan +color6 #35a77c +color14 #35a77c + +#: white +color7 #939f91 +color15 #a6b0a0 diff --git a/config/kitty/themes/kitty-themes/themes/everforest_light_medium.conf b/config/kitty/themes/kitty-themes/themes/everforest_light_medium.conf new file mode 100644 index 0000000..cda16f7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/everforest_light_medium.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty +## name: Everforest Light Medium +## author: Sainnhe Park +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_medium.conf +## blurb: A green based color scheme designed to be warm and soft + +foreground #5c6a72 +background #fdf6e3 +selection_foreground #829181 +selection_background #eaedc8 + +cursor #5c6a72 +cursor_text_color #f4f0d9 + +url_color #3a94c5 + +active_border_color #8da101 +inactive_border_color #bdc3af +bell_border_color #f57d26 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #fdf6e3 +active_tab_foreground #5c6a72 +inactive_tab_background #fdf6e3 +inactive_tab_foreground #939f91 +tab_bar_background #fdf6e3 +tab_bar_margin_color none + +mark1_foreground #fdf6e3 +mark1_background #3a94c5 +mark2_foreground #fdf6e3 +mark2_background #d3c6aa +mark3_foreground #fdf6e3 +mark3_background #df69ba + +#: black +color0 #708089 +color8 #829181 + +#: red +color1 #f85552 +color9 #e66868 + +#: green +color2 #8da101 +color10 #93b259 + +#: yellow +color3 #dfa000 +color11 #dfa000 + +#: blue +color4 #3a94c5 +color12 #3a94c5 + +#: magenta +color5 #df69ba +color13 #df69ba + +#: cyan +color6 #35a77c +color14 #35a77c + +#: white +color7 #939f91 +color15 #a6b0a0 diff --git a/config/kitty/themes/kitty-themes/themes/everforest_light_soft.conf b/config/kitty/themes/kitty-themes/themes/everforest_light_soft.conf new file mode 100644 index 0000000..b248c01 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/everforest_light_soft.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty +## name: Everforest Light Soft +## author: Sainnhe Park +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_soft.conf +## blurb: A green based color scheme designed to be warm and soft + +foreground #5c6a72 +background #f3ead3 +selection_foreground #829181 +selection_background #e1e4bd + +cursor #5c6a72 +cursor_text_color #eae4ca + +url_color #3a94c5 + +active_border_color #8da101 +inactive_border_color #b9c0ab +bell_border_color #f57d26 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #f3ead3 +active_tab_foreground #5c6a72 +inactive_tab_background #e5dfc5 +inactive_tab_foreground #939f91 +tab_bar_background #eae4ca +tab_bar_margin_color none + +mark1_foreground #f3ead3 +mark1_background #3a94c5 +mark2_foreground #f3ead3 +mark2_background #d3c6aa +mark3_foreground #f3ead3 +mark3_background #df69ba + +#: black +color0 #708089 +color8 #829181 + +#: red +color1 #f85552 +color9 #e66868 + +#: green +color2 #8da101 +color10 #93b259 + +#: yellow +color3 #dfa000 +color11 #dfa000 + +#: blue +color4 #3a94c5 +color12 #3a94c5 + +#: magenta +color5 #df69ba +color13 #df69ba + +#: cyan +color6 #35a77c +color14 #35a77c + +#: white +color7 #939f91 +color15 #a6b0a0 diff --git a/config/kitty/themes/kitty-themes/themes/fairyfloss.conf b/config/kitty/themes/kitty-themes/themes/fairyfloss.conf new file mode 100644 index 0000000..509c757 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/fairyfloss.conf @@ -0,0 +1,100 @@ +## name: fairyfloss +## author: Snuggle · https://github.com/Snuggle +## license: MIT +## upstream: https://github.com/Snuggle/kitty-themes +## blurb: A theme inspired by the popular fairyfloss colour theme + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #f8f8f0 +background #5a5475 +selection_foreground #ad5877 +selection_background #ffb8d1 + + +#: Cursor colors + +cursor #ffb8d1 +# cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + +url_color #ad5877 + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +# active_tab_foreground #000 +# active_tab_background #eee +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #464258 +color8 #c19fd8 + +#: red +color1 #ff857f +color9 #f44747 + +#: green +color2 #ad5877 +color10 #ffb8d1 + +#: yellow +color3 #e6c000 +color11 #ffea00 + +#: blue +color4 #6c71c4 +color12 #6796e6 + +#: magenta +color5 #b267e6 +color13 #c5a3ff + +#: cyan +color6 #afecad +color14 #b2ffdd + +#: white +color7 #cccccc +color15 #f8f8f0 + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/flexoki_dark.conf b/config/kitty/themes/kitty-themes/themes/flexoki_dark.conf new file mode 100644 index 0000000..943cf18 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/flexoki_dark.conf @@ -0,0 +1,60 @@ +# vim:ft=kitty + +## name: Flexoki (Dark) +## author: Kepano +## license: MIT +## upstream: https://raw.githubusercontent.com/kepano/flexoki/main/kitty/flexoki_dark.conf +## blurb: An inky color scheme for prose and code + +# The basic colors +foreground #FFFCF0 +background #100F0F +selection_foreground #FFFCF0 +selection_background #403E3C + +# Cursor colors +cursor #FFFCF0 +cursor_text_color #100F0F + +# kitty window border colors +active_border_color #AF3029 +inactive_border_color #403E3C + +# Tab bar colors +active_tab_foreground #FFFCF0 +active_tab_background #403E3C +inactive_tab_foreground #878580 +inactive_tab_background #282726 + +# The basic 16 colors +# black +color0 #100F0F +color8 #6F6E69 + +# red +color1 #AF3029 +color9 #D14D41 + +# green +color2 #66800B +color10 #879A39 + +# yellow +color3 #AD8301 +color11 #D0A215 + +# blue +color4 #205EA6 +color12 #4385BE + +# magenta +color5 #A02F6F +color13 #CE5D97 + +# cyan +color6 #24837B +color14 #3AA99F + +# white +color7 #F2F0E5 +color15 #FFFCF0 \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/flexoki_light.conf b/config/kitty/themes/kitty-themes/themes/flexoki_light.conf new file mode 100644 index 0000000..d2d22ca --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/flexoki_light.conf @@ -0,0 +1,67 @@ +# vim:ft=kitty + +## name: Flexoki (Light) +## author: Kepano +## license: MIT +## upstream: https://raw.githubusercontent.com/kepano/flexoki/main/kitty/flexoki_light.conf +## blurb: An inky color scheme for prose and code + +# The basic colors +foreground #100F0F +background #FFFCF0 +selection_foreground #100F0F +selection_background #CECDC3 + +# Cursor colors +cursor #100F0F +cursor_text_color #FFFCF0 + +# kitty window border colors +active_border_color #D14D41 +inactive_border_color #CECDC3 + +# Tab bar colors +active_tab_foreground #100F0F +active_tab_background #CECDC3 +inactive_tab_foreground #6F6E69 +inactive_tab_background #E6E4D9 + +# The basic 16 colors +# black +color0 #100F0F +color8 #6F6E69 + + +# red +color1 #D14D41 +color9 #AF3029 + + +# green +color2 #879A39 +color10 #66800B + + +# yellow +color3 #D0A215 +color11 #AD8301 + + +# blue +color4 #4385BE +color12 #205EA6 + + +# magenta +color5 #CE5D97 +color13 #A02F6F + + +# cyan +color6 #3AA99F +color14 #24837B + + +# white +color7 #FFFCF0 +color15 #F2F0E5 diff --git a/config/kitty/themes/kitty-themes/themes/gruvbox-dark-hard.conf b/config/kitty/themes/kitty-themes/themes/gruvbox-dark-hard.conf new file mode 100644 index 0000000..649473f --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/gruvbox-dark-hard.conf @@ -0,0 +1,33 @@ +## name: Gruvbox Dark Hard +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-hard.conf + + +selection_foreground #ebdbb2 +selection_background #d65d0e + +background #1d2021 +foreground #ebdbb2 + +color0 #3c3836 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #a89984 +color8 #928374 +color9 #fb4934 +color10 #b8bb26 +color11 #fabd2f +color12 #83a598 +color13 #d3869b +color14 #8ec07c +color15 #fbf1c7 + +cursor #bdae93 +cursor_text_color #665c54 + +url_color #458588 diff --git a/config/kitty/themes/kitty-themes/themes/gruvbox-dark-soft.conf b/config/kitty/themes/kitty-themes/themes/gruvbox-dark-soft.conf new file mode 100644 index 0000000..54e6ea5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/gruvbox-dark-soft.conf @@ -0,0 +1,33 @@ +## name: Gruvbox Dark Soft +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-soft.conf + + +selection_foreground #ebdbb2 +selection_background #d65d0e + +background #32302f +foreground #ebdbb2 + +color0 #3c3836 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #a89984 +color8 #928374 +color9 #fb4934 +color10 #b8bb26 +color11 #fabd2f +color12 #83a598 +color13 #d3869b +color14 #8ec07c +color15 #fbf1c7 + +cursor #bdae93 +cursor_text_color #665c54 + +url_color #458588 diff --git a/config/kitty/themes/kitty-themes/themes/gruvbox-dark.conf b/config/kitty/themes/kitty-themes/themes/gruvbox-dark.conf new file mode 100644 index 0000000..b93d4a8 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/gruvbox-dark.conf @@ -0,0 +1,32 @@ +## name: Gruvbox Dark +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark.conf + +selection_foreground #ebdbb2 +selection_background #d65d0e + +background #282828 +foreground #ebdbb2 + +color0 #3c3836 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #a89984 +color8 #928374 +color9 #fb4934 +color10 #b8bb26 +color11 #fabd2f +color12 #83a598 +color13 #d3869b +color14 #8ec07c +color15 #fbf1c7 + +cursor #bdae93 +cursor_text_color #665c54 + +url_color #458588 diff --git a/config/kitty/themes/kitty-themes/themes/gruvbox-light-hard.conf b/config/kitty/themes/kitty-themes/themes/gruvbox-light-hard.conf new file mode 100644 index 0000000..cd81199 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/gruvbox-light-hard.conf @@ -0,0 +1,32 @@ +## name: Gruvbox Light Hard +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-hard.conf + +selection_foreground #3c3836 +selection_background #d65d0e + +background #f9f5d7 +foreground #3c3836 + +color0 #ebdbb2 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #7c6f64 +color8 #928374 +color9 #9d0006 +color10 #79740e +color11 #b57614 +color12 #076678 +color13 #8f3f71 +color14 #427b58 +color15 #282828 + +cursor #665c54 +cursor_text_color #bdae93 + +url_color #458588 diff --git a/config/kitty/themes/kitty-themes/themes/gruvbox-light-soft.conf b/config/kitty/themes/kitty-themes/themes/gruvbox-light-soft.conf new file mode 100644 index 0000000..60f1838 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/gruvbox-light-soft.conf @@ -0,0 +1,32 @@ +## name: Gruvbox Light Soft +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-soft.conf + +selection_foreground #3c3836 +selection_background #d65d0e + +background #f2e5bc +foreground #3c3836 + +color0 #ebdbb2 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #7c6f64 +color8 #928374 +color9 #9d0006 +color10 #79740e +color11 #b57614 +color12 #076678 +color13 #8f3f71 +color14 #427b58 +color15 #282828 + +cursor #665c54 +cursor_text_color #bdae93 + +url_color #458588 diff --git a/config/kitty/themes/kitty-themes/themes/gruvbox-light.conf b/config/kitty/themes/kitty-themes/themes/gruvbox-light.conf new file mode 100644 index 0000000..716499a --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/gruvbox-light.conf @@ -0,0 +1,33 @@ +## name: Gruvbox Light +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light.conf + + +selection_foreground #3c3836 +selection_background #d65d0e + +background #fbf1c7 +foreground #3c3836 + +color0 #ebdbb2 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #7c6f64 +color8 #928374 +color9 #9d0006 +color10 #79740e +color11 #b57614 +color12 #076678 +color13 #8f3f71 +color14 #427b58 +color15 #282828 + +cursor #665c54 +cursor_text_color #bdae93 + +url_color #458588 diff --git a/config/kitty/themes/kitty-themes/themes/h_pux.conf b/config/kitty/themes/kitty-themes/themes/h_pux.conf new file mode 100644 index 0000000..a10a4a7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/h_pux.conf @@ -0,0 +1,94 @@ +# vim:ft=kitty +## name: H-PUX +## author: Jacob Chapman +## license: CC0 Public Domain +## upstream: https://github.com/chapmanjacobd/computer/blob/main/.config/kitty/theme.conf + +#: The basic colors + +foreground #000000 +background #d1bca7 +selection_foreground #dfdbc3 +selection_background #223322 + + +#: Cursor colors + +cursor #73635a +# cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + +# url_color #0087bd + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +# active_tab_foreground #000 +# active_tab_background #eee +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #000000 +color8 #545454 + +#: red +color1 #8c0000 +color9 #ff0000 + +#: green +color2 #007d00 +color10 #00ee00 + +#: yellow +color3 #8c7000 +color11 #ffff00 + +#: blue +color4 #003cb4 +color12 #0000ff + +#: magenta +color5 #820082 +color13 #ff00ff + +#: cyan +color6 #008b8b +color14 #00cdcd + +# : white +color7 #bbbbbb +color15 #ffffff + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/idleToes.conf b/config/kitty/themes/kitty-themes/themes/idleToes.conf new file mode 100644 index 0000000..941d4b2 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/idleToes.conf @@ -0,0 +1,21 @@ +background #323232 +foreground #ffffff +cursor #d6d6d6 +selection_background #5b5b5b +color0 #323232 +color8 #535353 +color1 #d25252 +color9 #f07070 +color2 #7fe173 +color10 #9dff90 +color3 #ffc66d +color11 #ffe48b +color4 #4098ff +color12 #5eb7f7 +color5 #f57fff +color13 #ff9dff +color6 #bed6ff +color14 #dcf4ff +color7 #eeeeec +color15 #ffffff +selection_foreground #323232 diff --git a/config/kitty/themes/kitty-themes/themes/kanagawa.conf b/config/kitty/themes/kitty-themes/themes/kanagawa.conf new file mode 100644 index 0000000..072cbc9 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/kanagawa.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty + +## name: Kanagawa +## author: Tommaso Laurenzi +## license: MIT +## upstream: https://github.com/rebelot/kanagawa.nvim/ +## blurb: NeoVim dark colorscheme inspired by the colors of the famous painting +## by Katsushika Hokusai. + +#: The basic colors + +foreground #dcd7ba +background #1f1f28 +selection_foreground #c8c093 +selection_background #2d4f67 + +#: Cursor colors + +cursor #c8c093 + +#: URL underline color when overing with mouse + +url_color #72a7bc + +#: Tab bar colors + +active_tab_foreground #c8c093 +active_tab_background #1f1f28 +inactive_tab_foreground #727169 +inactive_tab_background #1f1f28 + +#: The basic 16 colors + +#: black +color0 #16161d +color8 #727169 + +#: red +color1 #c34043 +color9 #e82424 + +#: green +color2 #76946a +color10 #98bb6c + +#: yellow +color3 #c0a36e +color11 #e6c384 + +#: blue +color4 #7e9cd8 +color12 #7fb4ca + +#: magenta +color5 #957fb8 +color13 #938aa9 + +#: cyan +color6 #6a9589 +color14 #7aa89f + +#: white +color7 #c8c093 +color15 #dcd7ba + + +#: You can set the remaining 240 colors as color16 to color255. + +color16 #ffa066 +color17 #ff5d62 diff --git a/config/kitty/themes/kitty-themes/themes/kanagawa_dragon.conf b/config/kitty/themes/kitty-themes/themes/kanagawa_dragon.conf new file mode 100644 index 0000000..de67b69 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/kanagawa_dragon.conf @@ -0,0 +1,70 @@ +# vim:ft=kitty + +## name: Kanagawa_dragon +## license: MIT +## author: Tommaso Laurenzi +## upstream: https://github.com/rebelot/kanagawa.nvim/ +## blurb: NeoVim dark colorscheme inspired by the colors of the famous painting +## by Katsushika Hokusai. Dragon version. + +#: The basic colors + +foreground #c5c9c5 +background #181616 +selection_foreground #c8c093 +selection_background #2d4f67 + +#: Cursor colors + +cursor #c8c093 + +#: URL underline color when overing with mouse + +url_color #72a7bc + +#: Tab bar colors + +active_tab_foreground #c8c093 +active_tab_background #12120f +inactive_tab_foreground #a6a69c +inactive_tab_background #12120f + +#: The basic 16 colors + +#: black +color0 #0d0c0c +color8 #a6a69c + +#: red +color1 #c4746e +color9 #e46876 + +#: green +color2 #8a9a7b +color10 #87a987 + +#: yellow +color3 #c4b28a +color11 #e6c384 + +#: blue +color4 #8ba4b0 +color12 #7fb4ca + +#: magenta +color5 #a292a3 +color13 #938aa9 + +#: cyan +color6 #8ea4a2 +color14 #7aa89f + +#: white +color7 #c8c093 +color15 #c5c9c5 + + +#: You can set the remaining 240 colors as color16 to color255. + +color16 #b6927b +color17 #b98d7b diff --git a/config/kitty/themes/kitty-themes/themes/kanagawa_light.conf b/config/kitty/themes/kitty-themes/themes/kanagawa_light.conf new file mode 100644 index 0000000..5c4e019 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/kanagawa_light.conf @@ -0,0 +1,72 @@ +# vim:ft=kitty + +## name: Kanagawa_light +## license: MIT +## author: Tommaso Laurenzi +## upstream: https://github.com/rebelot/kanagawa.nvim/ +## blurb: NeoVim dark colorscheme inspired by the colors of the famous painting +## by Katsushika Hokusai. Light version. + +#: The basic colors + +foreground #545464 +background #f2ecbc +selection_foreground #43436c +selection_background #c9cbd1 + +#: Cursor colors + +cursor #43436c +cursor_text_color #f2ecbc + +#: URL underline color when overing with mouse + +url_color #73a7bc + +#: Tab bar colors + +active_tab_foreground #716e61 +active_tab_background #e5ddb0 +inactive_tab_foreground #8a8980 +inactive_tab_background #d5cea3 + +#: The basic 16 colors + +# normal +#: black +color0 #1f1f28 +color8 #8a8980 + +#: red +color1 #c84053 +color9 #d7474b + +#: green +color2 #6f894e +color10 #6e915f + +#: yellow +color3 #77713f +color11 #836f4a + +#: blue +color4 #4d699b +color12 #6693bf + +#: magenta +color5 #b35b79 +color13 #624c83 + +#: cyan +color6 #597b75 +color14 #5e857a + +#: white +color7 #545464 +color15 #43436c + + +#: You can set the remaining 240 colors as color16 to color255. + +color16 #cc6d00 +color17 #e82424 diff --git a/config/kitty/themes/kitty-themes/themes/kanagawabones.conf b/config/kitty/themes/kitty-themes/themes/kanagawabones.conf new file mode 100644 index 0000000..43eb940 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/kanagawabones.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: kanagawabones +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/kanagawabones.conf +## blurb: A zenbones variant inspired by Kanagawa. +foreground #DDD8BB +background #1F1F28 +selection_foreground #DDD8BB +selection_background #49473E +# Cursor colors +cursor #E6E0C2 +cursor_text_color #1F1F28 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #DDD8BB +active_tab_background #614A82 +inactive_tab_foreground #DDD8BB +inactive_tab_background #363644 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #1F1F28 +color8 #3C3C51 +# red +color1 #E46A78 +color9 #EC818C +# green +color2 #98BC6D +color10 #9EC967 +# yellow +color3 #E5C283 +color11 #F1C982 +# blue +color4 #7EB3C9 +color12 #7BC2DF +# magenta +color5 #957FB8 +color13 #A98FD2 +# cyan +color6 #7EB3C9 +color14 #7BC2DF +# white +color7 #DDD8BB +color15 #A8A48D +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/kurayami.conf b/config/kitty/themes/kitty-themes/themes/kurayami.conf new file mode 100644 index 0000000..6d6a9b1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/kurayami.conf @@ -0,0 +1,83 @@ +# vim:ft=kitty +## name: Kurayami +## author: Kevin M (github.com/kevinm6) +## license: MIT +## upstream: https://github.com/kevinm6/kitty-themes/blob/master/themes/kurayami.conf + + +# The basic colors +foreground #cccccc +background #1c1c1c +selection_foreground #cccccc +selection_background #264f78 + +# Cursor colors +cursor #ffffff +cursor_text_color #3c3c3c + +# kitty window border colors +active_border_color none +inactive_border_color #414140 + +# Tab bar colors +active_tab_foreground #DCDCDC +active_tab_background #015A60 +inactive_tab_foreground #808080 +inactive_tab_background #3c3c3c + +#: OS Window titlebar colors +wayland_titlebar_color background +macos_titlebar_color background + +# Url +url_color #0087bd + + +# black +color0 #2c2c2c +color8 #626262 + +# red +color1 #bf616a +color9 #b2201f + +# green +color2 #00af87 +color10 #36F57A + +# yellow +color3 #cecb00 +color11 #fffd00 + +# blue +color4 #158C8A +color12 #1a8fff + +# purple +color5 #B48EAD +color13 #cb1ed1 + +# cyan +color6 #1a8fff +color14 #14ffff + +# white +color7 #dcdcdc +color15 #ffffff + + +#: Colors for marks (marked text in the terminal) +#: Color for marks of type 1 +mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) +mark2_foreground black + +#: Color for marks of type 2 +mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) +mark3_foreground black + +#: Color for marks of type 3 +mark3_background #f274bc diff --git a/config/kitty/themes/kitty-themes/themes/leaf_dark.conf b/config/kitty/themes/kitty-themes/themes/leaf_dark.conf new file mode 100644 index 0000000..f548711 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/leaf_dark.conf @@ -0,0 +1,101 @@ +# vim:ft=kitty +## name: Leaf Dark +## author: qewer33, brought to kitty by KodiakWeb +## license: GPLv3 +## upstream: +## blurb: a green accent, forest colored dark theme, adapted from leaf kde + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + + foreground #e1e4dc + background #2e2c2f +# selection_foreground #000000 +# selection_background #fffacd + + +#: Cursor colors + +# cursor #cccccc +# cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + + url_color #5292c6 + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + + active_tab_foreground #403F42 + active_tab_background #729B79 + inactive_tab_foreground #729B79 + inactive_tab_background #2e2c2f +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black + color0 #2e2c2f + color8 #403F42 + +#: red + color1 #BA5860 + color9 #D6797A + +#: green + color2 #729B79 + color10 #98CCA4 + +#: yellow + color3 #CCAA6C + color11 #E3C882 + +#: blue + color4 #5292C6 + color12 #76ACE6 + +#: magenta + color5 #8C6AA8 + color13 #B798E6 + +#: cyan + color6 #489CA5 + color14 #77C5DA + +#: white + color7 #e1e4dc + color15 #FCFFF6 + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/leaf_light.conf b/config/kitty/themes/kitty-themes/themes/leaf_light.conf new file mode 100644 index 0000000..32d3ce7 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/leaf_light.conf @@ -0,0 +1,102 @@ +# vim:ft=kitty + +## name: Leaf Light +## author: qewer33, brought to kitty by KodiakWeb +## license: GPLv3 +## upstream: +## blurb: A green accent, forest colored light theme, adapted from leaf kde + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + + foreground #2e2c2f + background #e1e4dc +# selection_foreground #000000 +# selection_background #fffacd + + +#: Cursor colors + +# cursor #2e2c2f +# cursor_text_color #e1e4dc + + +#: URL underline color when hovering with mouse + +#url_color #2e2c2f + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + + active_tab_foreground #2e2c2f + active_tab_background #729B79 + inactive_tab_foreground #2e2c2f + inactive_tab_background #b1b3ad +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black + color0 #2e2c2f + color8 #403f42 + +#: red + color1 #BA5860 + color9 #9d4b53 + +#: green + color2 #729B79 + color10 #59795f + +#: yellow + color3 #CCAA6C + color11 #a78a58 + +#: blue + color4 #5292C6 + color12 #40739a + +#: magenta + color5 #8C6AA8 + color13 #715688 + +#: cyan + color6 #489CA5 + color14 #3b8187 + +#: white + color7 #e1e4dc + color15 #b1b3ad + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/mayukai.conf b/config/kitty/themes/kitty-themes/themes/mayukai.conf new file mode 100644 index 0000000..760b929 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/mayukai.conf @@ -0,0 +1,31 @@ +## name: Mayukai +## author: Gulajava Ministudio +## license: MIT +## upstream: https://github.com/elianiva/mayukai-terminal-themes/blob/master/kitty.conf +## blurb: Mayukai Theme is dark and yellow bluish mirage theme with +## bright colors for easy readibility syntax. +## This theme is inspired from mixed color swatch in Ayu Theme, +## Material Theme, Monokai, Andromeda, and Gruvbox Darktooth Original Colors. + +#: The basic colors + +background #1b1c24 +foreground #cbccc6 + +color0 #191e2a +color1 #ed8274 +color2 #a6cc70 +color3 #fad07b +color4 #95e6cb +color5 #cfbafa +color6 #95e6cb +color7 #c7c7c7 + +color8 #686868 +color9 #f28779 +color10 #bae67e +color11 #ffd580 +color12 #95e6cb +color13 #d4bfff +color14 #95e6cb +color15 #ffffff \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/midsummer-night.conf b/config/kitty/themes/kitty-themes/themes/midsummer-night.conf new file mode 100644 index 0000000..ed2f525 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/midsummer-night.conf @@ -0,0 +1,65 @@ +## name: Midsummer Night +## author: abrielleing + + +#: The basic colors + +foreground #C6B8B1 +background #1C1E26 +selection_foreground None +selection_background #2E303E + + +#: Cursor colors + +cursor #D34C6B +cursor_text_color #1C1E26 + + +#: URL underline color when hovering with mouse + +url_color #35A5BB + + +#: Tab bar colors + +active_tab_foreground #1C1E26 +active_tab_background #B1C7C9 +inactive_tab_foreground #879596 +inactive_tab_background #1C1E26 + + +#: The basic 16 colors + +#: black +color0 #000000 +color8 #666666 + +#: red +color1 #D85069 +color9 #D85069 + +#: green +color2 #2DCBBE +color10 #2DCBBE + +#: yellow +color3 #E5A382 +color11 #E5A382 + +#: blue +color4 #35A5BB +color12 #35A5BB + +#: magenta +color5 #D34C68 +color13 #D34C68 + +#: cyan +color6 #2DCBBE +color14 #2DCBBE + +#: white +color7 #B1C7C9 +color15 #B1C7C9 + diff --git a/config/kitty/themes/kitty-themes/themes/mishran.conf b/config/kitty/themes/kitty-themes/themes/mishran.conf new file mode 100644 index 0000000..fc3d1e4 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/mishran.conf @@ -0,0 +1,58 @@ +# vim:ft=kitty + +## name: Mishran +## author: Anupam Srivastava +## license: GPL-3 +## upstream: https://github.com/kovidgoyal/kitty-themes +## blurb: A mixtures of different themes that work well with powerlevel10k + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #bebebe +background #000000 + + +#: Cursor colors + +cursor #ff6d0a +cursor_text_color #111111 + + +#: The basic 16 colors + +#: black +color0 #4e4e4e +color8 #7c7c7c + +#: red +color1 #ff6c60 +color9 #ffb6b0 + +#: green +color2 #a8ff60 +color10 #ceffab + +#: yellow +color3 #ffffb6 +color11 #ffffcb + +#: blue +color4 #96cbfe +color12 #b5dcfe + +#: magenta +color5 #ff73fd +color13 #ff9cfe + +#: cyan +color6 #c6c5fe +color14 #dfdffe + +#: white +color7 #eeeeee +color15 #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/moonlight.conf b/config/kitty/themes/kitty-themes/themes/moonlight.conf new file mode 100644 index 0000000..c849f7b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/moonlight.conf @@ -0,0 +1,41 @@ +# vim:ft=kitty + +## name: moonlight +## author: Ramon Saraiva +## license: MIT +## upstream: https://raw.githubusercontent.com/ramonsaraiva/kitty-moonlight/main/moonlight.conf +## blurb: A port of moonlight vscode extension for kitty terminal + +foreground #e4f3fa +background #212337 +selection_foreground #e4f3fa +selection_background #403c64 + +cursor #5cb4fc +cursor_text_color #111111 + +url_color #80cbc4 + +active_tab_foreground #e4f3fa +active_tab_background #403c64 +inactive_tab_foreground #e4f3fa +inactive_tab_background #212337 +tab_bar_background none +tab_bar_margin_color none + +color0 #000000 +color8 #767676 +color1 #ff757f +color9 #f78b92 +color2 #2df4c0 +color10 #4ff0c6 +color3 #ffc777 +color11 #fcce8b +color4 #04d1f9 +color12 #2ddbfc +color5 #ecb2f0 +color13 #ebc5ed +color6 #b994f1 +color14 #bf9ef0 +color7 #eeffff +color15 #edf7f7 diff --git a/config/kitty/themes/kitty-themes/themes/neobones_dark.conf b/config/kitty/themes/kitty-themes/themes/neobones_dark.conf new file mode 100644 index 0000000..5d7a2fb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/neobones_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: neobones_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_dark.conf +## blurb: A zenbones variant inspired by neovim.io. +foreground #C6D5CF +background #0F191F +selection_foreground #C6D5CF +selection_background #3A3E3D +# Cursor colors +cursor #CEDDD7 +cursor_text_color #0F191F +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #C6D5CF +active_tab_background #62415B +inactive_tab_foreground #C6D5CF +inactive_tab_background #20303A +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #0F191F +color8 #263945 +# red +color1 #DE6E7C +color9 #E8838F +# green +color2 #90FF6B +color10 #A0FF85 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #8190D4 +color12 #92A0E2 +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #C6D5CF +color15 #98A39E +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/neobones_light.conf b/config/kitty/themes/kitty-themes/themes/neobones_light.conf new file mode 100644 index 0000000..6183ecb --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/neobones_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: neobones_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_light.conf +## blurb: A zenbones variant inspired by neovim.io. +foreground #202E18 +background #E5EDE6 +selection_foreground #202E18 +selection_background #ADE48C +# Cursor colors +cursor #202E18 +cursor_text_color #E5EDE6 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #202E18 +active_tab_background #DCB5D4 +inactive_tab_foreground #202E18 +inactive_tab_background #C2CFC4 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #E5EDE6 +color8 #B3C6B6 +# red +color1 #A8334C +color9 #94253E +# green +color2 #567A30 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #202E18 +color15 #415934 +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/night_owl.conf b/config/kitty/themes/kitty-themes/themes/night_owl.conf new file mode 100644 index 0000000..eda51f2 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/night_owl.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty +## name: Night Owl +## author: Luke Glazebrook +## upstream: https://github.com/Glazy/night-owl-kitty-theme/blob/main/night-owl.conf +## license: MIT + +foreground #d6deeb +background #011627 +selection_foreground none +selection_background #1d3b53 + + +#: Cursor colors +cursor #80a4c2 +cursor_text_color background + + +#: The basic 16 colors + +#: black +color0 #011627 +color8 #575656 + +#: red +color1 #ef5350 +color9 #ef5350 + +#: green +color2 #22da6e +color10 #22da6e + +#: yellow +color3 #addb67 +color11 #ffeb95 + +#: blue +color4 #82aaff +color12 #82aaff + +#: magenta +color5 #c792ea +color13 #c792ea + +#: cyan +color6 #21c7a8 +color14 #7fdbca + +#: white +color7 #ffffff +color15 #ffffff \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/nightfly.conf b/config/kitty/themes/kitty-themes/themes/nightfly.conf new file mode 100644 index 0000000..31872ec --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/nightfly.conf @@ -0,0 +1,25 @@ +## name: Nightfly +## license: MIT +## upstream: https://github.com/bluz71/vim-nightfly-guicolors/blob/master/terminal_themes/kitty-theme.conf + +background #011627 +foreground #acb4c2 +cursor #9ca1aa +selection_foreground #080808 +selection_background #b2ceee +color0 #9ca1aa +color1 #fc514e +color2 #a1cd5e +color3 #e3d18a +color4 #82aaff +color5 #c792ea +color6 #7fdbca +color7 #a1aab8 +color8 #7c8f8f +color9 #ff5874 +color10 #21c7a8 +color11 #ecc48d +color12 #82aaff +color13 #ae81ff +color14 #7fdbca +color15 #d6deeb diff --git a/config/kitty/themes/kitty-themes/themes/noirblaze.conf b/config/kitty/themes/kitty-themes/themes/noirblaze.conf new file mode 100644 index 0000000..b1b3c95 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/noirblaze.conf @@ -0,0 +1,82 @@ +## name: noirblaze +## author: Dimitar Dimitrov (https://github.com/n1ghtmare) + + +#: The basic colors + +foreground #d5d5d5 +background #121212 +selection_foreground #121212 +selection_background #b0b0b0 + + +#: Cursor colors + +cursor #ff0088 +cursor_text_color background + + +#: URL underline color when hovering with mouse + +url_color #b0b0b0 + +#: kitty window border colors and terminal bell colors + +active_border_color #ff0088 +inactive_border_color #323232 +bell_border_color #ff0088 + + +#: Tab bar colors + +active_tab_foreground #d5d5d5 +active_tab_background #121212 +inactive_tab_foreground #b4b4b4 +inactive_tab_background #323232 + + +#: The basic 16 colors + +#: black +color0 #121212 +color8 #737373 + +#: red +color1 #ff0088 +color9 #FD319E + +#: green +color2 #00ff77 +color10 #FD319E + +#: yellow +color3 #ffffff +color11 #FDFDFD + +#: blue +color4 #b0b0b0 +color12 #BEBEBE + +#: magenta +color5 #7a7a7a +color13 #939393 + +#: cyan +color6 #787878 +color14 #919191 + +#: white +color7 #d5d5d5 +color15 #f5f5f5 + + +#: Colors for marks (marked text in the terminal) + +mark1_foreground #121212 +mark1_background #787878 + +mark2_foreground #121212 +mark2_background #7a7a7a + +mark3_foreground #121212 +mark3_background #ffffff diff --git a/config/kitty/themes/kitty-themes/themes/outrun_electric.conf b/config/kitty/themes/kitty-themes/themes/outrun_electric.conf new file mode 100644 index 0000000..094c4e1 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/outrun_electric.conf @@ -0,0 +1,126 @@ +# vim:ft=kitty + +## name: Tropical Neon +## author: Anoduck +## license: MIT +## --------------------------------------------------------------------------- +# Copyright (C) 2022 anoduck + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +## ----------------------------------------------------------------------------- +## upstream: https://github.com/anoduck/Tropical-Neon/Tropical-Neon_kitty.conf +## blurb: A Retro Neon theme inspired by a bright tropical print on a bikini +## (So, sue me... I am not dead, yet.) + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +background #0E122D +foreground #fe85e7 + +# Selected Text + +selection_background #465688 +selection_foreground #E19FB8 + + +#: Cursor colors + +cursor #0abdc6 +cursor_text_color #000b1e + + +#: URL underline color when hovering with mouse + +url_color #ec7970 + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +# active_tab_foreground #000 +# active_tab_background #eee +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #000b1e +color8 #0E122d + +#: red +color1 #b0426e +color9 #fe5f55 + +#: green +color2 #00916e +color10 #85FF9E + +#: yellow +color3 #6fcd3c +color11 #ded945 + +#: blue +color4 #0072A1 +color12 #465688 + +#: magenta +color5 #fe67f7 +color13 #ff85e6 + +#: cyan +color6 #87efff +color14 #a1fcdf + +#: white +color7 #E6ABB6 +color15 #caf3f3 + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/purpurite.conf b/config/kitty/themes/kitty-themes/themes/purpurite.conf new file mode 100644 index 0000000..e802c66 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/purpurite.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty +## name: purpurite +## author: Ehan Ahamed and contributors +## license: UPL-1.0 +## upstream: https://raw.githubusercontent.com/purpurite/kitty/main/purpurite.conf +## blurb: A purple-ish-dark theme for kitty & more + +# General +foreground #CCDDFF +background #1F2533 +selection_foreground #1F2533 +selection_background #9999FF + +# Cursor +cursor #9999FF +cursor_text_color #1F2533 + +# Links +url_color #99FFDD + +# Borders +active_border_color #9999FF +inactive_border_color #99FFDD +bell_border_color #99FFDD +visual_bell_color #99FFDD + +# Tabs +active_tab_foreground #9999FF +active_tab_background #1F2533 +inactive_tab_foreground #99FFDD +inactive_tab_background #3D4B66 +tab_bar_background #3D4B66 +tab_bar_margin_color #3D4B66 + +# Colors +# black +color0 #1F2533 +color8 #3D4B66 +# red +color1 #FF6666 +color9 #FF9999 +# green +color2 #99FF99 +color10 #99FFDD +# yellow +color3 #FF9966 +color11 #FFCC66 +# blue +color4 #99BBFF +color12 #CCDDFF +# magenta +color5 #FF99DD +color13 #9999FF +# cyan +color6 #99DDFF +color14 #CCEEFF +# white +color7 #CCDDFF +color15 #99FFDD diff --git a/config/kitty/themes/kitty-themes/themes/rose-pine-dawn.conf b/config/kitty/themes/kitty-themes/themes/rose-pine-dawn.conf new file mode 100644 index 0000000..74773ad --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/rose-pine-dawn.conf @@ -0,0 +1,53 @@ +## name: Rosé Pine Dawn +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-dawn.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist + +foreground #575279 +background #faf4ed +selection_foreground #575279 +selection_background #dfdad9 + +cursor #cecacd +cursor_text_color #575279 + +url_color #907aa9 + +active_tab_foreground #575279 +active_tab_background #f2e9e1 +inactive_tab_foreground #9893a5 +inactive_tab_background #faf4ed + +# black +color0 #f2e9e1 +color8 #9893a5 + +# red +color1 #b4637a +color9 #b4637a + +# green +color2 #286983 +color10 #286983 + +# yellow +color3 #ea9d34 +color11 #ea9d34 + +# blue +color4 #56949f +color12 #56949f + +# magenta +color5 #907aa9 +color13 #907aa9 + +# cyan +color6 #d7827e +color14 #d7827e + +# white +color7 #575279 +color15 #575279 + diff --git a/config/kitty/themes/kitty-themes/themes/rose-pine-moon.conf b/config/kitty/themes/kitty-themes/themes/rose-pine-moon.conf new file mode 100644 index 0000000..b27902e --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/rose-pine-moon.conf @@ -0,0 +1,53 @@ +## name: Rosé Pine Moon +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist + +foreground #e0def4 +background #232136 +selection_foreground #e0def4 +selection_background #44415a + +cursor #56526e +cursor_text_color #e0def4 + +url_color #c4a7e7 + +active_tab_foreground #e0def4 +active_tab_background #393552 +inactive_tab_foreground #6e6a86 +inactive_tab_background #232136 + +# black +color0 #393552 +color8 #6e6a86 + +# red +color1 #eb6f92 +color9 #eb6f92 + +# green +color2 #3e8fb0 +color10 #3e8fb0 + +# yellow +color3 #f6c177 +color11 #f6c177 + +# blue +color4 #9ccfd8 +color12 #9ccfd8 + +# magenta +color5 #c4a7e7 +color13 #c4a7e7 + +# cyan +color6 #ea9a97 +color14 #ea9a97 + +# white +color7 #e0def4 +color15 #e0def4 + diff --git a/config/kitty/themes/kitty-themes/themes/rose-pine.conf b/config/kitty/themes/kitty-themes/themes/rose-pine.conf new file mode 100644 index 0000000..fca9531 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/rose-pine.conf @@ -0,0 +1,53 @@ +## name: Rosé Pine +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist + +foreground #e0def4 +background #191724 +selection_foreground #e0def4 +selection_background #403d52 + +cursor #524f67 +cursor_text_color #e0def4 + +url_color #c4a7e7 + +active_tab_foreground #e0def4 +active_tab_background #26233a +inactive_tab_foreground #6e6a86 +inactive_tab_background #191724 + +# black +color0 #26233a +color8 #6e6a86 + +# red +color1 #eb6f92 +color9 #eb6f92 + +# green +color2 #31748f +color10 #31748f + +# yellow +color3 #f6c177 +color11 #f6c177 + +# blue +color4 #9ccfd8 +color12 #9ccfd8 + +# magenta +color5 #c4a7e7 +color13 #c4a7e7 + +# cyan +color6 #ebbcba +color14 #ebbcba + +# white +color7 #e0def4 +color15 #e0def4 + diff --git a/config/kitty/themes/kitty-themes/themes/selenized-black.conf b/config/kitty/themes/kitty-themes/themes/selenized-black.conf new file mode 100644 index 0000000..64ca096 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/selenized-black.conf @@ -0,0 +1,86 @@ +## name: Selenized Black +## license: MIT +## author: Jan Warchol +## upstream: https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-black.conf +## blurb: Selenized black color scheme for Kitty + +#: The foreground and background colors +foreground #b9b9b9 +background #181818 + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the default background color's +#: opacity. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost) +background_opacity 1.0 + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +dynamic_background_opacity no + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). +dim_opacity 0.625 + +#: The foreground for text selected with the mouse. A value of none +#: means to leave the color unchanged. +selection_foreground none + +#: The background for text selected with the mouse. +selection_background #3b3b3b + +#: Tab bar colors +active_tab_foreground #dedede +active_tab_background #3b3b3b +inactive_tab_foreground #777777 +inactive_tab_background #181818 +tab_bar_background #181818 + +#: The 16 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version. You can also set the remaining colors from +#: the 256 color table as color16 to color255. + +#: black +color0 #252525 +color8 #3b3b3b + +#: red +color1 #ed4a46 +color9 #ff5e56 + +#: green +color2 #70b433 +color10 #83c746 + +#: yellow +color3 #dbb32d +color11 #efc541 + +#: blue +color4 #368aeb +color12 #4f9cfe + +#: magenta +color5 #eb6eb7 +color13 #ff81ca + +#: cyan +color6 #3fc5b7 +color14 #56d8c9 + +#: white +color7 #777777 +color15 #dedede + diff --git a/config/kitty/themes/kitty-themes/themes/selenized-dark.conf b/config/kitty/themes/kitty-themes/themes/selenized-dark.conf new file mode 100644 index 0000000..185f48d --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/selenized-dark.conf @@ -0,0 +1,85 @@ +## name: Selenized Dark +## license: MIT +## author: Jan Warchol +## upstream: https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-dark.conf +## blurb: Selenized dark color scheme for Kitty + +#: The foreground and background colors +foreground #adbcbc +background #103c48 + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the default background color's +#: opacity. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost) +background_opacity 1.0 + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +dynamic_background_opacity no + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). +dim_opacity 0.625 + +#: The foreground for text selected with the mouse. A value of none +#: means to leave the color unchanged. +selection_foreground none + +#: The background for text selected with the mouse. +selection_background #325b66 + +#: Tab bar colors +active_tab_foreground #cad8d9 +active_tab_background #325b66 +inactive_tab_foreground #72898f +inactive_tab_background #103c48 +tab_bar_background #103c48 + +#: The 16 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version. You can also set the remaining colors from +#: the 256 color table as color16 to color255. + +#: black +color0 #174956 +color8 #325b66 + +#: red +color1 #fa5750 +color9 #ff665c + +#: green +color2 #75b938 +color10 #84c747 + +#: yellow +color3 #dbb32d +color11 #ebc13d + +#: blue +color4 #4695f7 +color12 #58a3ff + +#: magenta +color5 #f275be +color13 #ff84cd + +#: cyan +color6 #41c7b9 +color14 #53d6c7 + +#: white +color7 #72898f +color15 #cad8d9 diff --git a/config/kitty/themes/kitty-themes/themes/selenized-light.conf b/config/kitty/themes/kitty-themes/themes/selenized-light.conf new file mode 100644 index 0000000..1534724 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/selenized-light.conf @@ -0,0 +1,85 @@ +## name: Selenized Light +## license: MIT +## author: Jan Warchol +## upstream: https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-light.conf +## blurb: Selenized light color scheme for Kitty + +#: The foreground and background colors +foreground #53676d +background #fbf3db + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the default background color's +#: opacity. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost) +background_opacity 1.0 + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +dynamic_background_opacity no + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). +dim_opacity 0.625 + +#: The foreground for text selected with the mouse. A value of none +#: means to leave the color unchanged. +selection_foreground none + +#: The background for text selected with the mouse. +selection_background #cfcebe + +#: Tab bar colors +active_tab_foreground #3a4d53 +active_tab_background #cfcebe +inactive_tab_foreground #909995 +inactive_tab_background #fbf3db +tab_bar_background #fbf3db + +#: The 16 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version. You can also set the remaining colors from +#: the 256 color table as color16 to color255. + +#: black +color0 #e9e4d0 +color8 #cfcebe + +#: red +color1 #d2212d +color9 #cc1729 + +#: green +color2 #489100 +color10 #428b00 + +#: yellow +color3 #ad8900 +color11 #a78300 + +#: blue +color4 #0072d4 +color12 #006dce + +#: magenta +color5 #ca4898 +color13 #c44392 + +#: cyan +color6 #009c8f +color14 #00978a + +#: white +color7 #909995 +color15 #3a4d53 diff --git a/config/kitty/themes/kitty-themes/themes/selenized-white.conf b/config/kitty/themes/kitty-themes/themes/selenized-white.conf new file mode 100644 index 0000000..0f89680 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/selenized-white.conf @@ -0,0 +1,85 @@ +## name: Selenized White +## license: MIT +## author: Jan Warchol +## upstream: https://github.com/jan-warchol/selenized/raw/master/terminals/kitty/kitty-selenized-white.conf +## blurb: Selenized white color scheme for Kitty + +#: The foreground and background colors +foreground #474747 +background #ffffff + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the default background color's +#: opacity. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost) +background_opacity 1.0 + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +dynamic_background_opacity no + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). +dim_opacity 0.625 + +#: The foreground for text selected with the mouse. A value of none +#: means to leave the color unchanged. +selection_foreground none + +#: The background for text selected with the mouse. +selection_background #cdcdcd + +#: Tab bar colors +active_tab_foreground #282828 +active_tab_background #cdcdcd +inactive_tab_foreground #878787 +inactive_tab_background #ffffff +tab_bar_background #ffffff + +#: The 16 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version. You can also set the remaining colors from +#: the 256 color table as color16 to color255. + +#: black +color0 #ebebeb +color8 #cdcdcd + +#: red +color1 #d6000c +color9 #bf0000 + +#: green +color2 #1d9700 +color10 #008400 + +#: yellow +color3 #c49700 +color11 #af8500 + +#: blue +color4 #0064e4 +color12 #0054cf + +#: magenta +color5 #dd0f9d +color13 #c7008b + +#: cyan +color6 #00ad9c +color14 #009a8a + +#: white +color7 #878787 +color15 #282828 diff --git a/config/kitty/themes/kitty-themes/themes/seoulbones_dark.conf b/config/kitty/themes/kitty-themes/themes/seoulbones_dark.conf new file mode 100644 index 0000000..a86ac5b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/seoulbones_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: seoulbones_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_dark.conf +## blurb: A zenbones variant inspired by Seoul256. +foreground #DDDDDD +background #4B4B4B +selection_foreground #DDDDDD +selection_background #777777 +# Cursor colors +cursor #E2E2E2 +cursor_text_color #4B4B4B +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #DDDDDD +active_tab_background #8283AD +inactive_tab_foreground #DDDDDD +inactive_tab_background #5E5E5E +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #4B4B4B +color8 #6C6465 +# red +color1 #E388A3 +color9 #EB99B1 +# green +color2 #98BD99 +color10 #8FCD92 +# yellow +color3 #FFDF9B +color11 #FFE5B3 +# blue +color4 #97BDDE +color12 #A2C8E9 +# magenta +color5 #A5A6C5 +color13 #B2B3DA +# cyan +color6 #6FBDBE +color14 #6BCACB +# white +color7 #DDDDDD +color15 #A8A8A8 +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/seoulbones_light.conf b/config/kitty/themes/kitty-themes/themes/seoulbones_light.conf new file mode 100644 index 0000000..895fc48 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/seoulbones_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: seoulbones_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_light.conf +## blurb: A zenbones variant inspired by Seoul256. +foreground #555555 +background #E2E2E2 +selection_foreground #555555 +selection_background #CCCCCC +# Cursor colors +cursor #555555 +cursor_text_color #E2E2E2 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #555555 +active_tab_background #CBB1CA +inactive_tab_foreground #555555 +inactive_tab_background #C4C4C4 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #E2E2E2 +color8 #BFBABB +# red +color1 #DC5284 +color9 #BE3C6D +# green +color2 #628562 +color10 #487249 +# yellow +color3 #C48562 +color11 #A76B48 +# blue +color4 #0084A3 +color12 #006F89 +# magenta +color5 #896788 +color13 #7F4C7E +# cyan +color6 #008586 +color14 #006F70 +# white +color7 #555555 +color15 #777777 +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/shadotheme.conf b/config/kitty/themes/kitty-themes/themes/shadotheme.conf new file mode 100644 index 0000000..def7514 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/shadotheme.conf @@ -0,0 +1,54 @@ +## name: shadotheme +## author: Shadorain (kitty port by kelpwave) +## blurb: The ultimate purple and pink dark cherry blossom theme! +## license: The BSD 3-Clause License + +foreground #e3c7fc +background #191724 +selection_foreground #f1c4e0 +selection_background #140a1d + +cursor #f1c4e0 +cursor_text_color #140a1d + +url_color #bd93f9 + +active_tab_foreground #e3c7fc +active_tab_background #140a1d +inactive_tab_foreground #a8899c +inactive_tab_background #09090d + + + +# black +color0 #140a1d +color8 #a8899c + +# red +color1 #B52A5B +color9 #B52A5B + +# green +color2 #FF4971 +color10 #FF4971 + +# yellow +color3 #8897F4 +color11 #8897F4 + +# blue +color4 #bd93f9 +color12 #bd93f9 + +# magenta +color5 #E9729D +color13 #E9729D + +# cyan +color6 #F18FB0 +color14 #F18FB0 + +# white +color7 #f1c4e0 +color15 #f1c4e0 + diff --git a/config/kitty/themes/kitty-themes/themes/snazzy.conf b/config/kitty/themes/kitty-themes/themes/snazzy.conf new file mode 100644 index 0000000..2ed5ff5 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/snazzy.conf @@ -0,0 +1,46 @@ +# snazzy by Connor Holyday (holyday.me) +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +# Snazzy Colorscheme for Kitty +# Based on https://github.com/sindresorhus/hyper-snazzy + +foreground #eff0eb +background #282a36 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD +cursor #97979B +cursor_text_color #282A36 + +# black +color0 #282a36 +color8 #686868 + +# red +color1 #FF5C57 +color9 #FF5C57 + +# green +color2 #5AF78E +color10 #5AF78E + +# yellow +color3 #F3F99D +color11 #F3F99D + +# blue +color4 #57C7FF +color12 #57C7FF + +# magenta +color5 #FF6AC1 +color13 #FF6AC1 + +# cyan +color6 #9AEDFE +color14 #9AEDFE + +# white +color7 #F1F1F0 +color15 #EFF0EB diff --git a/config/kitty/themes/kitty-themes/themes/spaceduck.conf b/config/kitty/themes/kitty-themes/themes/spaceduck.conf new file mode 100644 index 0000000..f7c5790 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/spaceduck.conf @@ -0,0 +1,40 @@ +# vim:ft=kitty + +#: Repository: https://github.com/pineapplegiant/spaceduck + +## name: spaceduck +## author: Guillermo Rodriguez +## license: MIT + +## upstream: https://github.com/foofrog/kitty-themes/blob/master/themes/spaceduck.conf + +## blurb: An intergalactic space theme for Vim, Terminal & more! + +#: Disclaimer: Yellow and Purple colors are intentionally swapped by the author +#: This is because Spaceduck is a purple-oriented colorscheme +#: To check out the visual differences, refer to this issue: https://github.com/pineapplegiant/spaceduck-terminal/pull/2 + +background #0f111b +foreground #ecf0c1 + +cursor #ecf0c1 + +selection_background #686f9a +selection_foreground #ffffff + +color0 #000000 +color8 #686f9a +color1 #e33400 +color9 #e33400 +color2 #5ccc96 +color10 #5ccc96 +color3 #b3a1e6 +color11 #b3a1e6 +color4 #00a3cc +color12 #00a3cc +color5 #f2ce00 +color13 #f2ce00 +color6 #7a5ccc +color14 #7a5ccc +color7 #686f9a +color15 #f0f1ce diff --git a/config/kitty/themes/kitty-themes/themes/tokyo_night_day.conf b/config/kitty/themes/kitty-themes/themes/tokyo_night_day.conf new file mode 100644 index 0000000..75f6029 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/tokyo_night_day.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Tokyo Night Day +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_day.conf + + +background #e1e2e7 +foreground #3760bf +selection_background #b6bfe2 +selection_foreground #3760bf +url_color #387068 +cursor #3760bf +cursor_text_color #e1e2e7 + +# Tabs +active_tab_background #2e7de9 +active_tab_foreground #e9e9ec +inactive_tab_background #c4c8da +inactive_tab_foreground #8990b3 +#tab_bar_background #e9e9ed + +# Windows +active_border_color #2e7de9 +inactive_border_color #c4c8da + +# normal +color0 #e9e9ed +color1 #f52a65 +color2 #587539 +color3 #8c6c3e +color4 #2e7de9 +color5 #9854f1 +color6 #007197 +color7 #6172b0 + +# bright +color8 #a1a6c5 +color9 #f52a65 +color10 #587539 +color11 #8c6c3e +color12 #2e7de9 +color13 #9854f1 +color14 #007197 +color15 #3760bf + +# extended colors +color16 #b15c00 +color17 #c64343 diff --git a/config/kitty/themes/kitty-themes/themes/tokyo_night_moon.conf b/config/kitty/themes/kitty-themes/themes/tokyo_night_moon.conf new file mode 100644 index 0000000..014901b --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/tokyo_night_moon.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Tokyo Night Moon +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_moon.conf + + +background #222436 +foreground #c8d3f5 +selection_background #2d3f76 +selection_foreground #c8d3f5 +url_color #4fd6be +cursor #c8d3f5 +cursor_text_color #222436 + +# Tabs +active_tab_background #82aaff +active_tab_foreground #1e2030 +inactive_tab_background #2f334d +inactive_tab_foreground #545c7e +#tab_bar_background #1b1d2b + +# Windows +active_border_color #82aaff +inactive_border_color #2f334d + +# normal +color0 #1b1d2b +color1 #ff757f +color2 #c3e88d +color3 #ffc777 +color4 #82aaff +color5 #c099ff +color6 #86e1fc +color7 #828bb8 + +# bright +color8 #444a73 +color9 #ff757f +color10 #c3e88d +color11 #ffc777 +color12 #82aaff +color13 #c099ff +color14 #86e1fc +color15 #c8d3f5 + +# extended colors +color16 #ff966c +color17 #c53b53 diff --git a/config/kitty/themes/kitty-themes/themes/tokyo_night_night.conf b/config/kitty/themes/kitty-themes/themes/tokyo_night_night.conf new file mode 100644 index 0000000..f2d9728 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/tokyo_night_night.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Tokyo Night +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf + + +background #1a1b26 +foreground #c0caf5 +selection_background #283457 +selection_foreground #c0caf5 +url_color #73daca +cursor #c0caf5 +cursor_text_color #1a1b26 + +# Tabs +active_tab_background #7aa2f7 +active_tab_foreground #16161e +inactive_tab_background #292e42 +inactive_tab_foreground #545c7e +#tab_bar_background #15161e + +# Windows +active_border_color #7aa2f7 +inactive_border_color #292e42 + +# normal +color0 #15161e +color1 #f7768e +color2 #9ece6a +color3 #e0af68 +color4 #7aa2f7 +color5 #bb9af7 +color6 #7dcfff +color7 #a9b1d6 + +# bright +color8 #414868 +color9 #f7768e +color10 #9ece6a +color11 #e0af68 +color12 #7aa2f7 +color13 #bb9af7 +color14 #7dcfff +color15 #c0caf5 + +# extended colors +color16 #ff9e64 +color17 #db4b4b diff --git a/config/kitty/themes/kitty-themes/themes/tokyo_night_storm.conf b/config/kitty/themes/kitty-themes/themes/tokyo_night_storm.conf new file mode 100644 index 0000000..20e6fca --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/tokyo_night_storm.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty + +## name: Tokyo Night Storm +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_storm.conf + + +background #24283b +foreground #c0caf5 +selection_background #2e3c64 +selection_foreground #c0caf5 +url_color #73daca +cursor #c0caf5 +cursor_text_color #24283b + +# Tabs +active_tab_background #7aa2f7 +active_tab_foreground #1f2335 +inactive_tab_background #292e42 +inactive_tab_foreground #545c7e +#tab_bar_background #1d202f + +# Windows +active_border_color #7aa2f7 +inactive_border_color #292e42 + +# normal +color0 #1d202f +color1 #f7768e +color2 #9ece6a +color3 #e0af68 +color4 #7aa2f7 +color5 #bb9af7 +color6 #7dcfff +color7 #a9b1d6 + +# bright +color8 #414868 +color9 #f7768e +color10 #9ece6a +color11 #e0af68 +color12 #7aa2f7 +color13 #bb9af7 +color14 #7dcfff +color15 #c0caf5 + +# extended colors +color16 #ff9e64 +color17 #db4b4b diff --git a/config/kitty/themes/kitty-themes/themes/vimbones.conf b/config/kitty/themes/kitty-themes/themes/vimbones.conf new file mode 100644 index 0000000..c5e8c77 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/vimbones.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: vimbones +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/vimbones.conf +## blurb: A zenbones variant inspired by vim.org. +foreground #353535 +background #F0F0CA +selection_foreground #353535 +selection_background #D7D7D7 +# Cursor colors +cursor #353535 +cursor_text_color #F0F0CA +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #353535 +active_tab_background #DEB9D6 +inactive_tab_foreground #353535 +inactive_tab_background #D1D1B0 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #F0F0CA +color8 #C6C6A3 +# red +color1 #A8334C +color9 #94253E +# green +color2 #4F6C31 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #353535 +color15 #5C5C5C +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/wizzy-bright.conf b/config/kitty/themes/kitty-themes/themes/wizzy-bright.conf new file mode 100644 index 0000000..b804606 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/wizzy-bright.conf @@ -0,0 +1,57 @@ +# vim:ft=kitty + +## name: Wizzy Bright +## license: MIT +## author: erin +## upstream: https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-bright.conf +## blurb: A variant of Wryan for a certain special Lain + +background #100814 +selection_background #4d4d4d +cursor #9d9eca + +# a nearly imperceptible purple +foreground #b2b8c4 +# alternate, deeper shades of purple +#foreground #8a8dae +#foreground #9b9ebf +url_color #75c8c8 +selection_foreground #101010 + +# black +color0 #666666 +color8 #6f6f6f + +# red +color1 #bf7998 +color9 #cf7fb3 + +# green +color2 #5ba6a6 +color10 #75c8c8 + +# yellow +color3 #8d8daa +color11 #afafdc + +# blue +color4 #6c88a6 +color12 #7aade6 + +# magenta +color5 #8f79bf +color13 #af95e6 + +# cyan +color6 #6498bf +color14 #82b8df + +# white +color7 #abbec5 +color15 #bccfd4 + +# tab bar +active_tab_foreground #322a69 +active_tab_background #afafdc +inactive_tab_foreground #322a36 +inactive_tab_background #8d8daa \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/wizzy-muted.conf b/config/kitty/themes/kitty-themes/themes/wizzy-muted.conf new file mode 100644 index 0000000..b6b1b85 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/wizzy-muted.conf @@ -0,0 +1,57 @@ +# vim:ft=kitty + +## name: Wizzy Muted +## license: MIT +## author: erin +## upstream: https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-muted.conf +## blurb: A variant of Wryan for a certain special Lain + +background #100814 +selection_background #4d4d4d +cursor #9d9eca + +# a nearly imperceptible purple +foreground #b2b8c4 +# alternate, deeper shades of purple +#foreground #8a8dae +#foreground #9b9ebf +url_color #64b7b7 +selection_foreground #101010 + +# black +color0 #444444 +color8 #4e4e4e + +# red +color1 #9d5776 +color9 #cf5e91 + +# green +color2 #398484 +color10 #64b7b7 + +# yellow +color3 #6b6b88 +color11 #8d8dba + +# blue +color4 #4a6684 +color12 #588bc4 + +# magenta +color5 #6f579d +color13 #8f73c4 + +# cyan +color6 #42769d +color14 #71a7cf + +# white +color7 #9aadb2 +color15 #d1d1d1 + +# tab bar +active_tab_foreground #100847 +active_tab_background #8d8dba +inactive_tab_foreground #100814 +inactive_tab_background #6b6b88 \ No newline at end of file diff --git a/config/kitty/themes/kitty-themes/themes/xcodedark.conf b/config/kitty/themes/kitty-themes/themes/xcodedark.conf new file mode 100644 index 0000000..bff5544 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/xcodedark.conf @@ -0,0 +1,49 @@ +# xcodedark by arzg, https://github.com/arzg/vim-colors-xcode +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +background #292a30 +foreground #dfdfe0 + +cursor #53606e + +selection_foreground #53606e +selection_background #393b44 + +color0 #292a30 +color8 #53606e + +# red +color1 #ff8170 +# pink +color9 #ff7ab2 + +# teal +color2 #78c2b3 +# lighy teal +color10 #acf2e4 + +# yellow +color3 #ffa14f +# light yellow +color11 #d9c97c + +# blue +color4 #4eb0cc +# light blue +color12 #6bdfff + +# purple +color5 #b281eb +# light purple +color13 #dabaff + +# green +color6 #84b360 +# light green +color14 #b0e687 + +# light gray +color7 #a3b1bf +# dark gray +color15 #53606e diff --git a/config/kitty/themes/kitty-themes/themes/zenbones_dark.conf b/config/kitty/themes/kitty-themes/themes/zenbones_dark.conf new file mode 100644 index 0000000..98c4649 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/zenbones_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenbones_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_dark.conf +## blurb: A contrast-based colorscheme. +foreground #B4BDC3 +background #1C1917 +selection_foreground #B4BDC3 +selection_background #3D4042 +# Cursor colors +cursor #C4CACF +cursor_text_color #1C1917 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #B4BDC3 +active_tab_background #65435E +inactive_tab_foreground #B4BDC3 +inactive_tab_background #352F2D +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #1C1917 +color8 #403833 +# red +color1 #DE6E7C +color9 #E8838F +# green +color2 #819B69 +color10 #8BAE68 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #6099C0 +color12 #61ABDA +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #B4BDC3 +color15 #888F94 +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/zenbones_light.conf b/config/kitty/themes/kitty-themes/themes/zenbones_light.conf new file mode 100644 index 0000000..7fd88c2 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/zenbones_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenbones_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_light.conf +## blurb: A contrast-based colorscheme. +foreground #2C363C +background #F0EDEC +selection_foreground #2C363C +selection_background #CBD9E3 +# Cursor colors +cursor #2C363C +cursor_text_color #F0EDEC +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #2C363C +active_tab_background #DEB9D6 +inactive_tab_foreground #2C363C +inactive_tab_background #D6CDC9 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #F0EDEC +color8 #CFC1BA +# red +color1 #A8334C +color9 #94253E +# green +color2 #4F6C31 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #2C363C +color15 #4F5E68 +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/zenburned.conf b/config/kitty/themes/kitty-themes/themes/zenburned.conf new file mode 100644 index 0000000..248a995 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/zenburned.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenburned +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenburned.conf +## blurb: A zenbones variant inspired by Zenburn. +foreground #F0E4CF +background #404040 +selection_foreground #F0E4CF +selection_background #746956 +# Cursor colors +cursor #F3EADB +cursor_text_color #404040 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #F0E4CF +active_tab_background #9C6992 +inactive_tab_foreground #F0E4CF +inactive_tab_background #555555 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #404040 +color8 #625A5B +# red +color1 #E3716E +color9 #EC8685 +# green +color2 #819B69 +color10 #8BAE68 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #6099C0 +color12 #61ABDA +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #F0E4CF +color15 #C0AB86 +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/zenwritten_dark.conf b/config/kitty/themes/kitty-themes/themes/zenwritten_dark.conf new file mode 100644 index 0000000..97a7b68 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/zenwritten_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenwritten_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf +## blurb: A zenbones variant with zero hue and saturation. +foreground #BBBBBB +background #191919 +selection_foreground #BBBBBB +selection_background #404040 +# Cursor colors +cursor #C9C9C9 +cursor_text_color #191919 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #BBBBBB +active_tab_background #65435E +inactive_tab_foreground #BBBBBB +inactive_tab_background #303030 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #191919 +color8 #3D3839 +# red +color1 #DE6E7C +color9 #E8838F +# green +color2 #819B69 +color10 #8BAE68 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #6099C0 +color12 #61ABDA +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #BBBBBB +color15 #8E8E8E +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/kitty-themes/themes/zenwritten_light.conf b/config/kitty/themes/kitty-themes/themes/zenwritten_light.conf new file mode 100644 index 0000000..cb10be0 --- /dev/null +++ b/config/kitty/themes/kitty-themes/themes/zenwritten_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenwritten_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf +## blurb: A zenbones variant with zero hue and saturation. +foreground #353535 +background #EEEEEE +selection_foreground #353535 +selection_background #D7D7D7 +# Cursor colors +cursor #353535 +cursor_text_color #EEEEEE +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #353535 +active_tab_background #DEB9D6 +inactive_tab_foreground #353535 +inactive_tab_background #CFCFCF +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #EEEEEE +color8 #C6C3C3 +# red +color1 #A8334C +color9 #94253E +# green +color2 #4F6C31 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #353535 +color15 #5C5C5C +# You can set the remaining 240 colors as color16 to color255. diff --git a/config/kitty/themes/tokyonights.conf b/config/kitty/themes/tokyonights.conf new file mode 100644 index 0000000..8e04865 --- /dev/null +++ b/config/kitty/themes/tokyonights.conf @@ -0,0 +1,79 @@ +# vim:fileencoding=utf-8:ft=conf +# +# Tokyo Night color scheme for kitty terminal emulator +# https://github.com/davidmathers/tokyo-night-kitty-theme +# +# Based on Tokyo Night color theme for Visual Studio Code +# https://github.com/enkia/tokyo-night-vscode-theme + +foreground #a9b1d6 +background #1a1b26 + +# Black +color0 #414868 +color8 #414868 + +# Red +color1 #f7768e +color9 #f7768e + +# Green +color2 #73daca +color10 #73daca + +# Yellow +color3 #e0af68 +color11 #e0af68 + +# Blue +color4 #7aa2f7 +color12 #7aa2f7 + +# Magenta +color5 #bb9af7 +color13 #bb9af7 + +# Cyan +color6 #7dcfff +color14 #7dcfff + +# White +color7 #c0caf5 +color15 #c0caf5 + +# Cursor +cursor #c0caf5 +cursor_text_color #1a1b26 + +# Selection highlight +selection_foreground none +selection_background #28344a + +# The color for highlighting URLs on mouse-over +url_color #9ece6a + +# Window borders +active_border_color #3d59a1 +inactive_border_color #101014 +bell_border_color #e0af68 + +# Tab bar +tab_bar_style fade +tab_fade 1 +active_tab_foreground #3d59a1 +active_tab_background #16161e +active_tab_font_style bold +inactive_tab_foreground #787c99 +inactive_tab_background #16161e +inactive_tab_font_style bold +tab_bar_background #101014 + +# Title bar +macos_titlebar_color #16161e + +# Storm +background #24283b +cursor_text_color #24283b +active_tab_background #1f2335 +inactive_tab_background #1f2335 +# macos_titlebar_color #1f2335 diff --git a/config/oh-my-zsh b/config/oh-my-zsh new file mode 160000 index 0000000..5b37e21 --- /dev/null +++ b/config/oh-my-zsh @@ -0,0 +1 @@ +Subproject commit 5b37e218e5275c11cb5fecc61f943e6cea3e64bf diff --git a/config/sshman/sshman.json b/config/sshman/sshman.json new file mode 100644 index 0000000..44e4f84 --- /dev/null +++ b/config/sshman/sshman.json @@ -0,0 +1,6 @@ +{ + "databasepath": "~/.local/share/sshman/sshman.db", + "logpath": "~/.local/share/sshman/sshman.log", + "maskInput": true, + "decryptionRetries": 1 +} diff --git a/config/starship.toml b/config/starship.toml new file mode 100644 index 0000000..e3e7c04 --- /dev/null +++ b/config/starship.toml @@ -0,0 +1,9 @@ +# ~/.config/starship.toml + +[cmd_duration] +min_time = 10_000 # Show command duration over 10,000 milliseconds (=10 sec) +format = " took [$duration]($style)" + +[character] +success_symbol = "▲(bold green)" +error_symbol = "[✖](bold red)" diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf new file mode 100644 index 0000000..4ae87e1 --- /dev/null +++ b/config/tmux/tmux.conf @@ -0,0 +1,74 @@ +# global options +set -g default-terminal "xterm-256color" +set -g escape-time 40 +set -g allow-rename off +set -g mouse on + +## Window options +set -g base-index 1 + +## Pane options +setw -g pane-base-index 1 +setw -g visual-bell off +setw -g visual-activity on + +# true color settings +#set -g default-terminal "$TERM" +#set -ag terminal-overrides ",$TERM:Tc" + +# Prefix binds +## General binds +bind g send-keys C-g +bind : command-prompt + + + +set -g mouse on +bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" +bind -n WheelDownPane select-pane -t= \; send-keys -M +bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M +bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up +bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down +bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up +bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down + +# To copy, left click and drag to highlight text in yellow, +# once you release left click yellow text will disappear and will automatically be available in clibboard +# # Use vim keybindings in copy mode +setw -g mode-keys vi +# Update default binding of `Enter` to also use copy-pipe +unbind -T copy-mode-vi Enter +bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c" +bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" + + +# hop between panels (vim keybindings) +bind -r h select-pane -L +bind -r j select-pane -D +bind -r k select-pane -U +bind -r l select-pane -R + +# split windows (sane keybindings) +bind -r v run-shell 'tmux split-window -v -c "#{pane_current_path}"' +bind -r m run-shell 'tmux split-window -hf -c "#{pane_current_path}"' +bind -r o run-shell 'tmux split-window -p 33 -c "#{pane_current_path}"' + +# themeing +set -g status-position top +set -g status-justify left +set -g status-style 'fg=#fabd2f' + +set -g status-left '' +set -g status-right '#{pane_current_path} ' +set -g status-right-length 80 +set -g status-left-length 10 + +setw -g window-status-current-style 'fg=#504945 bg=#fabd2f bold' +setw -g window-status-current-format ' #I | #W ' + +setw -g window-status-style 'fg=#bdae93 dim' +setw -g window-status-format ' #I | #W ' +setw -g window-status-bell-style 'fg=#3c3836 bg=#fb4934 bold' + +# reload the config on the fly +bind-key r source-file $HOME/.config/tmux/tmux.conf \; display-message "$HOME/.config/tmux/tmux.conf reloaded" diff --git a/config/wallpaper_engine/config.json b/config/wallpaper_engine/config.json new file mode 100644 index 0000000..ae9b1a6 --- /dev/null +++ b/config/wallpaper_engine/config.json @@ -0,0 +1,13 @@ +{ + "engine": "gnome", + "random_wallpaper": true, + "wallpaper_path": "~/Pictures/Wallpaper", + "wallpapers": [], + "blacklist": [], + "remember": { + "remember_set_wallpapers": true, + "max_rotations": 15, + "remember_path": "~/.wpe.store" + }, + "valid_extensions": [".jpg", ".jpeg", ".png"] +} diff --git a/config/wallpaper_engine/work.json b/config/wallpaper_engine/work.json new file mode 100644 index 0000000..d56d2c7 --- /dev/null +++ b/config/wallpaper_engine/work.json @@ -0,0 +1,13 @@ +{ + "engine": "gnome", + "random_wallpaper": true, + "wallpaper_path": "~/Pictures/Wallpaper/landscape", + "wallpapers": [], + "blacklist": [], + "remember": { + "remember_set_wallpapers": false, + "max_rotations": 10, + "remember_path": "~/.wpe.store" + }, + "valid_extensions": [".jpg", ".jpeg", ".png", ".webp"] +} diff --git a/config/zshrc b/config/zshrc new file mode 100644 index 0000000..2a3d4ec --- /dev/null +++ b/config/zshrc @@ -0,0 +1,141 @@ +# Add deno completions to search path +if [[ ":$FPATH:" != *":/Users/mike/.zsh/completions:"* ]]; then export FPATH="/Users/mike/.zsh/completions:$FPATH"; fi +# start starship +eval "$(starship init zsh)" + +ZSH_DISABLE_COMPFIX=true + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Export my language settings. +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +# Define the theme. +# ZSH_THEME="chronos" +ZSH_THEME="" + +# Uncomment the following line to change how often to auto-update (in days). +export UPDATE_ZSH_DAYS=5 + +# Uncomment the following line to disable auto-setting terminal title. +DISABLE_AUTO_TITLE="true" + +# Change the tab_title to a fixed string. +# Make sure that AUTO_TITLE is disabled. +function precmd () { + print -Pn - '\e]0;%~\a' + # title="`hostname`" + # window_title="print -P - '\e]0;$title\a'" + # echo -ne "$window_title" +} + +# Waiting dots. +COMPLETION_WAITING_DOTS="true" + +# History file and size settings. +HISTFILE=~/.histfile +HISTSIZE=20000 +SAVEHIST=10000 + +# Disable bell ring notification thingy. +setopt notify +bindkey -e + +# Load Plugin +plugins=( + git +) + +# Don't delete this. +source $ZSH/oh-my-zsh.sh + +### User configuration ### + +# Load aliases and fzf. +[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc" + +# ZSH_AUTOSUGGEST change the color +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#5fafd7,bold" +ZSH_AUTOSUGGEST_USE_ASYN=true + +export PATH +export EDITOR=nvim + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +autoload -U add-zsh-hook +load-nvmrc() { + local node_version="$(nvm version)" + local nvmrc_path="$(nvm_find_nvmrc)" + + if [ -n "$nvmrc_path" ]; then + local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") + + if [ "$nvmrc_node_version" = "N/A" ]; then + nvm install + elif [ "$nvmrc_node_version" != "$node_version" ]; then + nvm use + fi + elif [ "$node_version" != "$(nvm version default)" ]; then + echo "Reverting to nvm default version" + nvm use default + fi +} + +add-zsh-hook chpwd load-nvmrc + +# ctrl+k = accept suggestions +bindkey '^k' autosuggest-accept +# ctrl+l = forward-word in suggestions +bindkey '^l' forward-word +# ctrl+l = backward-word in suggestions +bindkey '^h' backward-word + +# pnpm +export PNPM_HOME="/Users/mike/Library/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac + +# pnpm end + +# export java +export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH" + +# export sdkmanager and other android cmd tools +export PATH="/opt/homebrew/share/android-commandlinetools/cmdline-tools/latest/bin:$PATH" + + +# export python installed with brew +export PATH="$(brew --prefix python)/libexec/bin:$PATH" + +export PATH="/Users/mike/.local/bin:$PATH" + +source $HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh + + +# Added by LM Studio CLI (lms) +export PATH="$PATH:/Users/mike/.lmstudio/bin" +export PATH="/Users/mike/.config/herd-lite/bin:$PATH" +export PHP_INI_SCAN_DIR="/Users/mike/.config/herd-lite/bin:$PHP_INI_SCAN_DIR" +eval +TWILIO_AC_BASH_SETUP_PATH=/Users/mike/.twilio-cli/autocomplete/bash_setup && test -f $TWILIO_AC_BASH_SETUP_PATH && source $TWILIO_AC_BASH_SETUP_PATH; # twilio autocomplete setup + +# twilio main account credentials +. "/Users/mike/.deno/env" + +# Initialize zsh completions (added by deno install script) +autoload -Uz compinit && compinit -u +compinit +# bun completions +[ -s "/Users/mike/.bun/_bun" ] && source "/Users/mike/.bun/_bun" + +# bun +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" + diff --git a/fonts/Fira Code Bold Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Code Bold Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..6a7339a Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Code Bold Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fira Code Bold Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..0485c09 Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fira Code Bold Nerd Font Complete Mono.otf b/fonts/Fira Code Bold Nerd Font Complete Mono.otf new file mode 100644 index 0000000..2d01abd Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Code Bold Nerd Font Complete Mono.ttf b/fonts/Fira Code Bold Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..6ad2054 Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fira Code Bold Nerd Font Complete Windows Compatible.otf b/fonts/Fira Code Bold Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..c8ec326 Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Code Bold Nerd Font Complete Windows Compatible.ttf b/fonts/Fira Code Bold Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..bef3694 Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fira Code Bold Nerd Font Complete.otf b/fonts/Fira Code Bold Nerd Font Complete.otf new file mode 100644 index 0000000..98c4353 Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete.otf differ diff --git a/fonts/Fira Code Bold Nerd Font Complete.ttf b/fonts/Fira Code Bold Nerd Font Complete.ttf new file mode 100644 index 0000000..9109dae Binary files /dev/null and b/fonts/Fira Code Bold Nerd Font Complete.ttf differ diff --git a/fonts/Fira Code Light Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Code Light Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..c706360 Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Code Light Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fira Code Light Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..599a8ef Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fira Code Light Nerd Font Complete Mono.otf b/fonts/Fira Code Light Nerd Font Complete Mono.otf new file mode 100644 index 0000000..1280c0d Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Code Light Nerd Font Complete Mono.ttf b/fonts/Fira Code Light Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..29beae2 Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fira Code Light Nerd Font Complete Windows Compatible.otf b/fonts/Fira Code Light Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..54c198b Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Code Light Nerd Font Complete Windows Compatible.ttf b/fonts/Fira Code Light Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..88d60b5 Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fira Code Light Nerd Font Complete.otf b/fonts/Fira Code Light Nerd Font Complete.otf new file mode 100644 index 0000000..147cca6 Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete.otf differ diff --git a/fonts/Fira Code Light Nerd Font Complete.ttf b/fonts/Fira Code Light Nerd Font Complete.ttf new file mode 100644 index 0000000..c97381d Binary files /dev/null and b/fonts/Fira Code Light Nerd Font Complete.ttf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Code Medium Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..5109781 Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fira Code Medium Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..9294d56 Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete Mono.otf b/fonts/Fira Code Medium Nerd Font Complete Mono.otf new file mode 100644 index 0000000..d1c0352 Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete Mono.ttf b/fonts/Fira Code Medium Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..bcbb90e Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete Windows Compatible.otf b/fonts/Fira Code Medium Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..2db48d4 Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete Windows Compatible.ttf b/fonts/Fira Code Medium Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..9aaf690 Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete.otf b/fonts/Fira Code Medium Nerd Font Complete.otf new file mode 100644 index 0000000..754330b Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete.otf differ diff --git a/fonts/Fira Code Medium Nerd Font Complete.ttf b/fonts/Fira Code Medium Nerd Font Complete.ttf new file mode 100644 index 0000000..ce277e8 Binary files /dev/null and b/fonts/Fira Code Medium Nerd Font Complete.ttf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Code Regular Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..4e4f754 Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fira Code Regular Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..d29b180 Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete Mono.otf b/fonts/Fira Code Regular Nerd Font Complete Mono.otf new file mode 100644 index 0000000..a02a9c0 Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete Mono.ttf b/fonts/Fira Code Regular Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..c1073e3 Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete Windows Compatible.otf b/fonts/Fira Code Regular Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..ed8c64d Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete Windows Compatible.ttf b/fonts/Fira Code Regular Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..5c59280 Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete.otf b/fonts/Fira Code Regular Nerd Font Complete.otf new file mode 100644 index 0000000..20f5847 Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete.otf differ diff --git a/fonts/Fira Code Regular Nerd Font Complete.ttf b/fonts/Fira Code Regular Nerd Font Complete.ttf new file mode 100644 index 0000000..6d6a9a4 Binary files /dev/null and b/fonts/Fira Code Regular Nerd Font Complete.ttf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Code Retina Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..0ef1123 Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fira Code Retina Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..f3e0a60 Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete Mono.otf b/fonts/Fira Code Retina Nerd Font Complete Mono.otf new file mode 100644 index 0000000..e1d46be Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete Mono.ttf b/fonts/Fira Code Retina Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..9259202 Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete Windows Compatible.otf b/fonts/Fira Code Retina Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..23d3cc1 Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete Windows Compatible.ttf b/fonts/Fira Code Retina Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..0757c47 Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete.otf b/fonts/Fira Code Retina Nerd Font Complete.otf new file mode 100644 index 0000000..e354a3a Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete.otf differ diff --git a/fonts/Fira Code Retina Nerd Font Complete.ttf b/fonts/Fira Code Retina Nerd Font Complete.ttf new file mode 100644 index 0000000..82054d9 Binary files /dev/null and b/fonts/Fira Code Retina Nerd Font Complete.ttf differ diff --git a/fonts/Fira Mono Bold Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Mono Bold Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..3921db4 Binary files /dev/null and b/fonts/Fira Mono Bold Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Mono Bold Nerd Font Complete Mono.otf b/fonts/Fira Mono Bold Nerd Font Complete Mono.otf new file mode 100644 index 0000000..8a8e984 Binary files /dev/null and b/fonts/Fira Mono Bold Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Mono Bold Nerd Font Complete Windows Compatible.otf b/fonts/Fira Mono Bold Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..10ca016 Binary files /dev/null and b/fonts/Fira Mono Bold Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Mono Bold Nerd Font Complete.otf b/fonts/Fira Mono Bold Nerd Font Complete.otf new file mode 100644 index 0000000..27060a1 Binary files /dev/null and b/fonts/Fira Mono Bold Nerd Font Complete.otf differ diff --git a/fonts/Fira Mono Medium Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Mono Medium Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..260805b Binary files /dev/null and b/fonts/Fira Mono Medium Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Mono Medium Nerd Font Complete Mono.otf b/fonts/Fira Mono Medium Nerd Font Complete Mono.otf new file mode 100644 index 0000000..40bb3e8 Binary files /dev/null and b/fonts/Fira Mono Medium Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Mono Medium Nerd Font Complete Windows Compatible.otf b/fonts/Fira Mono Medium Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..1cf32fd Binary files /dev/null and b/fonts/Fira Mono Medium Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Mono Medium Nerd Font Complete.otf b/fonts/Fira Mono Medium Nerd Font Complete.otf new file mode 100644 index 0000000..a272c6d Binary files /dev/null and b/fonts/Fira Mono Medium Nerd Font Complete.otf differ diff --git a/fonts/Fira Mono Regular Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fira Mono Regular Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..0a13f40 Binary files /dev/null and b/fonts/Fira Mono Regular Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fira Mono Regular Nerd Font Complete Mono.otf b/fonts/Fira Mono Regular Nerd Font Complete Mono.otf new file mode 100644 index 0000000..5a34fa2 Binary files /dev/null and b/fonts/Fira Mono Regular Nerd Font Complete Mono.otf differ diff --git a/fonts/Fira Mono Regular Nerd Font Complete Windows Compatible.otf b/fonts/Fira Mono Regular Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..8c81f88 Binary files /dev/null and b/fonts/Fira Mono Regular Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fira Mono Regular Nerd Font Complete.otf b/fonts/Fira Mono Regular Nerd Font Complete.otf new file mode 100644 index 0000000..1d1c469 Binary files /dev/null and b/fonts/Fira Mono Regular Nerd Font Complete.otf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Code Bold Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..02d027d Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fura Code Bold Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..5e36d33 Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete Mono.otf b/fonts/Fura Code Bold Nerd Font Complete Mono.otf new file mode 100644 index 0000000..9ac59ab Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete Mono.ttf b/fonts/Fura Code Bold Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..fe63a30 Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete Windows Compatible.otf b/fonts/Fura Code Bold Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..3958578 Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete Windows Compatible.ttf b/fonts/Fura Code Bold Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..4c2b2c4 Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete.otf b/fonts/Fura Code Bold Nerd Font Complete.otf new file mode 100644 index 0000000..2780f2a Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete.otf differ diff --git a/fonts/Fura Code Bold Nerd Font Complete.ttf b/fonts/Fura Code Bold Nerd Font Complete.ttf new file mode 100644 index 0000000..78e3a8a Binary files /dev/null and b/fonts/Fura Code Bold Nerd Font Complete.ttf differ diff --git a/fonts/Fura Code Light Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Code Light Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..9d1577a Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Code Light Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fura Code Light Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..a22e17a Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fura Code Light Nerd Font Complete Mono.otf b/fonts/Fura Code Light Nerd Font Complete Mono.otf new file mode 100644 index 0000000..c621024 Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Code Light Nerd Font Complete Mono.ttf b/fonts/Fura Code Light Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..b45754a Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fura Code Light Nerd Font Complete Windows Compatible.otf b/fonts/Fura Code Light Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..8d509c2 Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Code Light Nerd Font Complete Windows Compatible.ttf b/fonts/Fura Code Light Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..53e63b4 Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fura Code Light Nerd Font Complete.otf b/fonts/Fura Code Light Nerd Font Complete.otf new file mode 100644 index 0000000..4143767 Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete.otf differ diff --git a/fonts/Fura Code Light Nerd Font Complete.ttf b/fonts/Fura Code Light Nerd Font Complete.ttf new file mode 100644 index 0000000..f9b180a Binary files /dev/null and b/fonts/Fura Code Light Nerd Font Complete.ttf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Code Medium Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..3d0457f Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fura Code Medium Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..f1146cb Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete Mono.otf b/fonts/Fura Code Medium Nerd Font Complete Mono.otf new file mode 100644 index 0000000..6caacf3 Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete Mono.ttf b/fonts/Fura Code Medium Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..297c267 Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete Windows Compatible.otf b/fonts/Fura Code Medium Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..033a357 Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete Windows Compatible.ttf b/fonts/Fura Code Medium Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..3303f5f Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete.otf b/fonts/Fura Code Medium Nerd Font Complete.otf new file mode 100644 index 0000000..1dd6735 Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete.otf differ diff --git a/fonts/Fura Code Medium Nerd Font Complete.ttf b/fonts/Fura Code Medium Nerd Font Complete.ttf new file mode 100644 index 0000000..cbda437 Binary files /dev/null and b/fonts/Fura Code Medium Nerd Font Complete.ttf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Code Regular Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..c7cdda6 Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fura Code Regular Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..5ca0a24 Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete Mono.otf b/fonts/Fura Code Regular Nerd Font Complete Mono.otf new file mode 100644 index 0000000..56d3872 Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete Mono.ttf b/fonts/Fura Code Regular Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..265554c Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete Windows Compatible.otf b/fonts/Fura Code Regular Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..76477cb Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete Windows Compatible.ttf b/fonts/Fura Code Regular Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..cf0dd69 Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete.otf b/fonts/Fura Code Regular Nerd Font Complete.otf new file mode 100644 index 0000000..6e65585 Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete.otf differ diff --git a/fonts/Fura Code Regular Nerd Font Complete.ttf b/fonts/Fura Code Regular Nerd Font Complete.ttf new file mode 100644 index 0000000..0968982 Binary files /dev/null and b/fonts/Fura Code Regular Nerd Font Complete.ttf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Code Retina Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..718eb64 Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete Mono Windows Compatible.ttf b/fonts/Fura Code Retina Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..21a4b2e Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete Mono.otf b/fonts/Fura Code Retina Nerd Font Complete Mono.otf new file mode 100644 index 0000000..3f224a4 Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete Mono.ttf b/fonts/Fura Code Retina Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..b2177d7 Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete Mono.ttf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete Windows Compatible.otf b/fonts/Fura Code Retina Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..f8624c3 Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete Windows Compatible.ttf b/fonts/Fura Code Retina Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..282a30f Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete Windows Compatible.ttf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete.otf b/fonts/Fura Code Retina Nerd Font Complete.otf new file mode 100644 index 0000000..af45df1 Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete.otf differ diff --git a/fonts/Fura Code Retina Nerd Font Complete.ttf b/fonts/Fura Code Retina Nerd Font Complete.ttf new file mode 100644 index 0000000..c02b8d4 Binary files /dev/null and b/fonts/Fura Code Retina Nerd Font Complete.ttf differ diff --git a/fonts/Fura Mono Bold Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Mono Bold Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..b6f9ae2 Binary files /dev/null and b/fonts/Fura Mono Bold Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Mono Bold Nerd Font Complete Mono.otf b/fonts/Fura Mono Bold Nerd Font Complete Mono.otf new file mode 100644 index 0000000..c55ff2c Binary files /dev/null and b/fonts/Fura Mono Bold Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Mono Bold Nerd Font Complete Windows Compatible.otf b/fonts/Fura Mono Bold Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..d55a343 Binary files /dev/null and b/fonts/Fura Mono Bold Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Mono Bold Nerd Font Complete.otf b/fonts/Fura Mono Bold Nerd Font Complete.otf new file mode 100644 index 0000000..d2fc81b Binary files /dev/null and b/fonts/Fura Mono Bold Nerd Font Complete.otf differ diff --git a/fonts/Fura Mono Medium Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Mono Medium Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..902643a Binary files /dev/null and b/fonts/Fura Mono Medium Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Mono Medium Nerd Font Complete Mono.otf b/fonts/Fura Mono Medium Nerd Font Complete Mono.otf new file mode 100644 index 0000000..1d28a17 Binary files /dev/null and b/fonts/Fura Mono Medium Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Mono Medium Nerd Font Complete Windows Compatible.otf b/fonts/Fura Mono Medium Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..608b87a Binary files /dev/null and b/fonts/Fura Mono Medium Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Mono Medium Nerd Font Complete.otf b/fonts/Fura Mono Medium Nerd Font Complete.otf new file mode 100644 index 0000000..94ef5e4 Binary files /dev/null and b/fonts/Fura Mono Medium Nerd Font Complete.otf differ diff --git a/fonts/Fura Mono Regular Nerd Font Complete Mono Windows Compatible.otf b/fonts/Fura Mono Regular Nerd Font Complete Mono Windows Compatible.otf new file mode 100644 index 0000000..9542222 Binary files /dev/null and b/fonts/Fura Mono Regular Nerd Font Complete Mono Windows Compatible.otf differ diff --git a/fonts/Fura Mono Regular Nerd Font Complete Mono.otf b/fonts/Fura Mono Regular Nerd Font Complete Mono.otf new file mode 100644 index 0000000..5820042 Binary files /dev/null and b/fonts/Fura Mono Regular Nerd Font Complete Mono.otf differ diff --git a/fonts/Fura Mono Regular Nerd Font Complete Windows Compatible.otf b/fonts/Fura Mono Regular Nerd Font Complete Windows Compatible.otf new file mode 100644 index 0000000..877f160 Binary files /dev/null and b/fonts/Fura Mono Regular Nerd Font Complete Windows Compatible.otf differ diff --git a/fonts/Fura Mono Regular Nerd Font Complete.otf b/fonts/Fura Mono Regular Nerd Font Complete.otf new file mode 100644 index 0000000..63ca8b0 Binary files /dev/null and b/fonts/Fura Mono Regular Nerd Font Complete.otf differ diff --git a/fonts/GeistMonoNerdFont-Black.otf b/fonts/GeistMonoNerdFont-Black.otf new file mode 100644 index 0000000..de6aebf Binary files /dev/null and b/fonts/GeistMonoNerdFont-Black.otf differ diff --git a/fonts/GeistMonoNerdFont-Bold.otf b/fonts/GeistMonoNerdFont-Bold.otf new file mode 100644 index 0000000..d2b8a6c Binary files /dev/null and b/fonts/GeistMonoNerdFont-Bold.otf differ diff --git a/fonts/GeistMonoNerdFont-Light.otf b/fonts/GeistMonoNerdFont-Light.otf new file mode 100644 index 0000000..1c43b15 Binary files /dev/null and b/fonts/GeistMonoNerdFont-Light.otf differ diff --git a/fonts/GeistMonoNerdFont-Medium.otf b/fonts/GeistMonoNerdFont-Medium.otf new file mode 100644 index 0000000..347fea7 Binary files /dev/null and b/fonts/GeistMonoNerdFont-Medium.otf differ diff --git a/fonts/GeistMonoNerdFont-Regular.otf b/fonts/GeistMonoNerdFont-Regular.otf new file mode 100644 index 0000000..8e669b6 Binary files /dev/null and b/fonts/GeistMonoNerdFont-Regular.otf differ diff --git a/fonts/GeistMonoNerdFont-SemiBold.otf b/fonts/GeistMonoNerdFont-SemiBold.otf new file mode 100644 index 0000000..d1b6fac Binary files /dev/null and b/fonts/GeistMonoNerdFont-SemiBold.otf differ diff --git a/fonts/GeistMonoNerdFont-Thin.otf b/fonts/GeistMonoNerdFont-Thin.otf new file mode 100644 index 0000000..4353ced Binary files /dev/null and b/fonts/GeistMonoNerdFont-Thin.otf differ diff --git a/fonts/GeistMonoNerdFont-UltraBlack.otf b/fonts/GeistMonoNerdFont-UltraBlack.otf new file mode 100644 index 0000000..918e994 Binary files /dev/null and b/fonts/GeistMonoNerdFont-UltraBlack.otf differ diff --git a/fonts/GeistMonoNerdFont-UltraLight.otf b/fonts/GeistMonoNerdFont-UltraLight.otf new file mode 100644 index 0000000..b6c83ea Binary files /dev/null and b/fonts/GeistMonoNerdFont-UltraLight.otf differ diff --git a/fonts/GeistMonoNerdFontMono-Black.otf b/fonts/GeistMonoNerdFontMono-Black.otf new file mode 100644 index 0000000..ebaab72 Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-Black.otf differ diff --git a/fonts/GeistMonoNerdFontMono-Bold.otf b/fonts/GeistMonoNerdFontMono-Bold.otf new file mode 100644 index 0000000..8848630 Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-Bold.otf differ diff --git a/fonts/GeistMonoNerdFontMono-Light.otf b/fonts/GeistMonoNerdFontMono-Light.otf new file mode 100644 index 0000000..668db77 Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-Light.otf differ diff --git a/fonts/GeistMonoNerdFontMono-Medium.otf b/fonts/GeistMonoNerdFontMono-Medium.otf new file mode 100644 index 0000000..199396a Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-Medium.otf differ diff --git a/fonts/GeistMonoNerdFontMono-Regular.otf b/fonts/GeistMonoNerdFontMono-Regular.otf new file mode 100644 index 0000000..5297c37 Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-Regular.otf differ diff --git a/fonts/GeistMonoNerdFontMono-SemiBold.otf b/fonts/GeistMonoNerdFontMono-SemiBold.otf new file mode 100644 index 0000000..0255cfa Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-SemiBold.otf differ diff --git a/fonts/GeistMonoNerdFontMono-Thin.otf b/fonts/GeistMonoNerdFontMono-Thin.otf new file mode 100644 index 0000000..e958951 Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-Thin.otf differ diff --git a/fonts/GeistMonoNerdFontMono-UltraBlack.otf b/fonts/GeistMonoNerdFontMono-UltraBlack.otf new file mode 100644 index 0000000..bcdb03d Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-UltraBlack.otf differ diff --git a/fonts/GeistMonoNerdFontMono-UltraLight.otf b/fonts/GeistMonoNerdFontMono-UltraLight.otf new file mode 100644 index 0000000..182541f Binary files /dev/null and b/fonts/GeistMonoNerdFontMono-UltraLight.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-Black.otf b/fonts/GeistMonoNerdFontPropo-Black.otf new file mode 100644 index 0000000..e5dbcd5 Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-Black.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-Bold.otf b/fonts/GeistMonoNerdFontPropo-Bold.otf new file mode 100644 index 0000000..76ce282 Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-Bold.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-Light.otf b/fonts/GeistMonoNerdFontPropo-Light.otf new file mode 100644 index 0000000..3c5b31e Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-Light.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-Medium.otf b/fonts/GeistMonoNerdFontPropo-Medium.otf new file mode 100644 index 0000000..dfedbbb Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-Medium.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-Regular.otf b/fonts/GeistMonoNerdFontPropo-Regular.otf new file mode 100644 index 0000000..4eb47cc Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-Regular.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-SemiBold.otf b/fonts/GeistMonoNerdFontPropo-SemiBold.otf new file mode 100644 index 0000000..caacaea Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-SemiBold.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-Thin.otf b/fonts/GeistMonoNerdFontPropo-Thin.otf new file mode 100644 index 0000000..8e3be93 Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-Thin.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-UltraBlack.otf b/fonts/GeistMonoNerdFontPropo-UltraBlack.otf new file mode 100644 index 0000000..f87020a Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-UltraBlack.otf differ diff --git a/fonts/GeistMonoNerdFontPropo-UltraLight.otf b/fonts/GeistMonoNerdFontPropo-UltraLight.otf new file mode 100644 index 0000000..d013b68 Binary files /dev/null and b/fonts/GeistMonoNerdFontPropo-UltraLight.otf differ diff --git a/fonts/README.md b/fonts/README.md new file mode 100644 index 0000000..5ab6f4d --- /dev/null +++ b/fonts/README.md @@ -0,0 +1,12 @@ +# fonts + +> I currently use "GeistMono" as my primary font for eg. kitty. + +To install the fonts, create the `.fonts` folder in your home directory, copy +the fonts in there, et voila - you now have patched (nerd-) fonts + +## Installed fonts + +- [Fira Code Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) +- [Fira Mono Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraMono) +- [Geist Mono Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/GeistMono) diff --git a/general/alacritty/themes/ayu.yml b/general/alacritty/themes/ayu.yml deleted file mode 100644 index 79d5a83..0000000 --- a/general/alacritty/themes/ayu.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Colors (Ayu Dark) -colors: - # Default colors - primary: - background: '#0A0E14' - foreground: '#B3B1AD' - - # Normal colors - normal: - black: '#01060E' - red: '#EA6C73' - green: '#91B362' - yellow: '#F9AF4F' - blue: '#53BDFA' - magenta: '#FAE994' - cyan: '#90E1C6' - white: '#C7C7C7' - - # Bright colors - bright: - black: '#686868' - red: '#F07178' - green: '#C2D94C' - yellow: '#FFB454' - blue: '#59C2FF' - magenta: '#FFEE99' - cyan: '#95E6CB' - white: '#FFFFFF' - diff --git a/general/alacritty/themes/monokai-pro.yml b/general/alacritty/themes/monokai-pro.yml deleted file mode 100644 index be6fd5a..0000000 --- a/general/alacritty/themes/monokai-pro.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Colors (Monokai Pro) -colors: - # Default colors - primary: - background: '#2D2A2E' - foreground: '#FCFCFA' - - # Normal colors - normal: - black: '#403E41' - red: '#FF6188' - green: '#A9DC76' - yellow: '#FFD866' - blue: '#FC9867' - magenta: '#AB9DF2' - cyan: '#78DCE8' - white: '#FCFCFA' - - # Bright colors - bright: - black: '#727072' - red: '#FF6188' - green: '#A9DC76' - yellow: '#FFD866' - blue: '#FC9867' - magenta: '#AB9DF2' - cyan: '#78DCE8' - white: '#FCFCFA' - diff --git a/general/alacritty/themes/monokai-soda.yml b/general/alacritty/themes/monokai-soda.yml deleted file mode 100644 index 58d0db7..0000000 --- a/general/alacritty/themes/monokai-soda.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Colors (Monokai Soda) -colors: - # Default colors - primary: - background: '#1a1a1a' - foreground: '#c4c5b5' - - # Normal colors - normal: - black: '#1a1a1a' - red: '#f4005f' - green: '#98e024' - yellow: '#fa8419' - blue: '#9d65ff' - magenta: '#f4005f' - cyan: '#58d1eb' - white: '#c4c5b5' - - # Bright colors - bright: - black: '#625e4c' - red: '#f4005f' - green: '#98e024' - yellow: '#e0d561' - blue: '#9d65ff' - magenta: '#f4005f' - cyan: '#58d1eb' - white: '#f6f6ef' - diff --git a/general/alacritty/themes/monokai.yml b/general/alacritty/themes/monokai.yml deleted file mode 100644 index a0605f1..0000000 --- a/general/alacritty/themes/monokai.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Colors (Monokai Dark) -colors: - # Default colors - primary: - background: '#272822' - foreground: '#F8F8F2' - - # Normal colors - normal: - black: '#272822' - red: '#F92672' - green: '#A6E22E' - yellow: '#F4BF75' - blue: '#66D9EF' - magenta: '#AE81FF' - cyan: '#A1EFE4' - white: '#F8F8F2' - - # Bright colors - bright: - black: '#75715E' - red: '#F92672' - green: '#A6E22E' - yellow: '#F4BF75' - blue: '#66D9EF' - magenta: '#AE81FF' - cyan: '#A1EFE4' - white: '#F9F8F5' - diff --git a/general/kitty/themes/ayu.conf b/general/kitty/themes/ayu.conf deleted file mode 100644 index 7a203c1..0000000 --- a/general/kitty/themes/ayu.conf +++ /dev/null @@ -1,84 +0,0 @@ -# vim:fileencoding=utf-8:ft=conf - -#: Color scheme {{{ - -foreground #bfbab0 -background #0f1419 - -#: The foreground and background colors - -background_opacity 0.95 -# dynamic_background_opacity yes - -#: The opacity of the background. A number between 0 and 1, where 1 is -#: opaque and 0 is fully transparent. This will only work if -#: supported by the OS (for instance, when using a compositor under -#: X11). Note that it only sets the default background color's -#: opacity. This is so that things like the status bar in vim, -#: powerline prompts, etc. still look good. But it means that if you -#: use a color theme with a background color in your editor, it will -#: not be rendered as transparent. Instead you should change the -#: default background color in your kitty config and not use a -#: background color in the editor color scheme. Or use the escape -#: codes to set the terminals default colors in a shell script to -#: launch your editor. Be aware that using a value less than 1.0 is a -#: (possibly significant) performance hit. If you want to dynamically -#: change transparency of windows set dynamic_background_opacity to -#: yes (this is off by default as it has a performance cost) - -# dim_opacity 0.75 - -#: How much to dim text that has the DIM/FAINT attribute set. One -#: means no dimming and zero means fully dimmed (i.e. invisible). - -selection_foreground #0f1419 -selection_background #ffb454 - -#: The foreground and background for text selected with the mouse - - -#: The 16 terminal colors. There are 8 basic colors, each color has a -#: dull and bright version. You can also set the remaining colors from -#: the 256 color table as color16 to color255. - -color0 #9da2a6 -color8 #d9dbdd - -#: black - -color1 #ff3333 -color9 #f51818 - -#: red - -color2 #bae67e -color10 #c2d94c - -#: green - -color3 #ffcc66 -color11 #f29718 - -#: yellow - -color4 #73d0ff -color12 #59c2ff - -#: blue - -color5 #d4bfff -color13 #b77ee0 - -#: magenta - -color6 #83cec6 -color14 #5ccfe6 - -#: cyan - -color7 #f0f0f0 -color15 #ffffff - -#: white - -#: }}} diff --git a/general/kitty/themes/github.conf b/general/kitty/themes/github.conf deleted file mode 100644 index 705bc30..0000000 --- a/general/kitty/themes/github.conf +++ /dev/null @@ -1,42 +0,0 @@ -# github colors for Kitty - -background #24292e -foreground #d1d5da -selection_background #284566 -selection_foreground #d1d5da -url_color #d1d5da -cursor #c8e1ff - -# Tabs -active_tab_background #3b8eea -active_tab_foreground #1f2428 -inactive_tab_background #d1d5da -inactive_tab_foreground #1f2428 - -# Windows Border -active_border_color #444c56 -inactive_border_color #444c56 - -# normal -color0 #24292e -color1 #f14c4c -color2 #23d18b -color3 #e2e210 -color4 #3b8eea -color5 #bc3fbc -color6 #29b7da -color7 #666666 - -# bright -color8 #666666 -color9 #f14c4c -color10 #23d18b -color11 #f5f543 -color12 #3b8eea -color13 #d670d6 -color14 #29b8db -color15 #d1d5da - -# extended colors -color16 #f5f543 -color17 #f14c4c diff --git a/general/kitty/themes/uwu.conf b/general/kitty/themes/uwu.conf deleted file mode 100644 index 9e53519..0000000 --- a/general/kitty/themes/uwu.conf +++ /dev/null @@ -1,35 +0,0 @@ -foreground #c5c8c9 -background #131A1C -/* cursor #232a2c */ -cursor #e74c4c -color0 #1b2224 -color1 #e74c4c -color2 #6bb05d -color3 #e59e67 -color4 #5b98a9 -color5 #ef7cbb -color6 #51a39f -color7 #c4c4c4 -color8 #343636 -color9 #c26f6f -color10 #8dc776 -color11 #e7ac7e -color12 #7ab3c3 -color13 #d3869b -color14 #6db0ad -color15 #bfbfbf -selection_foreground #e74c4c -selection_background #232a2c - -# Tabs - -tab_bar_edge bottom -tab_bar_style powerline - -tab_separator "|" - -active_tab_foreground #E182E0 -active_tab_background #1b2224 -inactive_tab_foreground #CD69CC -inactive_tab_background #232a2c -active_tab_font_style italic diff --git a/general/nvim/.gitignore b/general/nvim/.gitignore deleted file mode 100644 index 8cb205e..0000000 --- a/general/nvim/.gitignore +++ /dev/null @@ -1 +0,0 @@ -plugin diff --git a/general/nvim/.luarc.json b/general/nvim/.luarc.json deleted file mode 100644 index 9e4dfb6..0000000 --- a/general/nvim/.luarc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", - "Lua.diagnostics.disable": [ - "unused-function", - "unused-local", - "redefined-local" - ], - "Lua.diagnostics.globals": [ - "vim", - "statusline_hide", - "hide_statusline", - "extra_which_keys", - "disable_plugins", - "additional_plugins", - "user_lualine_style", - "user_indent_blankline_style", - "nt_explorer" - ] -} diff --git a/general/nvim/LICENSE b/general/nvim/LICENSE deleted file mode 100644 index f288702..0000000 --- a/general/nvim/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/general/nvim/README.md b/general/nvim/README.md deleted file mode 100644 index 997cee3..0000000 --- a/general/nvim/README.md +++ /dev/null @@ -1,155 +0,0 @@ -

👨‍💻CodeArt:art:

- -

- :camera_flash: Screenshots - :construction: Installation - ⬆️📅 How to update CodeArt - :sparkles: Important features -

- -
- - License - - - Repo size - - - Discord server - - - - Open issues - - - - Last commit - -
- -## :warning: I chaged CodeArt directory structure on 23th of april. If you downloaded CodeArt before that day please make backup of your config remove nvim config directory and clone https://github.com/artart222/CodeArt as your nvim config directory. - - - -## :construction: Install CodeArt easily - -**_please backup any existing configuration files_** - -🐧🍎 On linux and macOS: - -```bash -git clone https://github.com/artart222/CodeArt ~/.config/nvim -chmod +x ~/.config/nvim/installer/linux-mac.sh -exec ~/.config/nvim/installer/linux-mac.sh -``` - -**_If you have debian, after the instalation finished you must [add debian testing repos](https://serverfault.com/a/550856) and after that run_**: - -```bash -sudo apt update; sudo apt install neovim -``` - -**_And after that open neovim and run `:PackerSync` and then reopen nevom!_** - -🪟 on Windows: - -**_please backup any existing configuration files_** - -⚡🐚 open a powershell session as administrator and run this command: - -```powershell -git clone https://github.com/artart222/CodeArt $HOME\AppData\Local\nvim -powershell.exe -executionpolicy bypass -file $HOME\AppData\Local\installer\windows.ps1 -``` - -#### 🌲💺Σ🖥️ Install lsp and treesitter: - -- You can install lsp for a language with `:LspInstall ` -- You can install treesitter with `:TSInstall ` - -#### These NeoVim configurations use many nerd fonts icons. JetBrains Mono will be installed by default. If you have problem for fonts and see weird icons you must change your terminal font. - - - -## ⬆️📅 How to update CodeArt: - -#### Very important note: Updating CodeArt will replace this github repo configs directory with ~/.config/nvim so if you don't want to lose any existing modifications you've made you must put your modifications into ~/.config/nvim/lua/user_settings.lua on linux and mac, put your configs in C:\Users\your_user\AppData\Local\nvim\lua\user_settings.lua if you use Windows - -- Run `:CodeArtUpdate` inside NeoVim -- Restart NeoVim -- Run `:PackerSync` -- Restart NeoVim! - - - -## :camera_flash: Screenshots: - -![Screenshot1](/utils/media/Screenshot1.png "Screenshots1") - -### :art: Many themes! - -
- -[Enfocado](https://github.com/wuelnerdotexe/vim-enfocado) -![Screenshot8](/utils/media/Screenshot8.png "Screenshots8") -[Tokyonight](https://github.com/folke/tokyonight.nvim) with storm style -![Screenshot2](/utils/media/Screenshot2.png "Screenshots2") -[Tokyonight](https://github.com/folke/tokyonight.nvim) with night style -![Screenshot3](/utils/media/Screenshot3.png "Screenshots3") -[Tokyonight](https://github.com/folke/tokyonight.nvim) with day style -![Screenshot4](/utils/media/Screenshot4.png "Screenshots4") -[Nightfly](https://github.com/bluz71/vim-nightfly-guicolors) -![Screenshot5](/utils/media/Screenshot5.png "Screenshots5") -[Moonfly](https://github.com/bluz71/vim-moonfly-colors) -![Screenshot6](/utils/media/Screenshot6.png "Screenshots6") -[Nord](https://github.com/shaunsingh/nord.nvim) -![Screenshot7](/utils/media/Screenshot7.png "Screenshots7") -[Onedark](https://github.com/navarasu/onedark.nvim) with dark style -![Screenshot9](/utils/media/Screenshot9.png "Screenshots9") -[Onedark](https://github.com/navarasu/onedark.nvim) with darker style -![Screenshot10](/utils/media/Screenshot10.png "Screenshots10") -[Onedark](https://github.com/navarasu/onedark.nvim) with cool style -![Screenshot11](/utils/media/Screenshot11.png "Screenshots11") -[Onedark](https://github.com/navarasu/onedark.nvim) with deep style -![Screenshot12](/utils/media/Screenshot12.png "Screenshots12") -[Onedark](https://github.com/navarasu/onedark.nvim) with warm style -![Screenshot13](/utils/media/Screenshot13.png "Screenshots13") -[Onedark](https://github.com/navarasu/onedark.nvim) with warmer style -![Screenshot13](/utils/media/Screenshot14.png "Screenshots14") - -
- - - -## :sparkles: Features: - -- 😴 Lazy load plugins!. With lazy loading NeoVim starts up very fast. It took me around 20 miliseconds on a virtual machine with 4GB ram and 2 Cores - ![LazyLoad](/utils/media/LazyLoad.png "LazyLoad") - -- Σ🖥️ Native LSP code completion support with documentation - ![CodeCompletion](/utils/media/CodeCompletion.png "CodeCompletion") - -- 🌲💺 [Treesitter](https://github.com/nvim-treesitter/nvim-treesitter) based code highlighting - ![Treesitter](/utils/media/Treesitter.png "Treesitter") - -- 🌳:card_file_box: [NvimTree](https://github.com/kyazdani42/nvim-tree.lua) as file tree - ![FileTree](/utils/media/FileTree.png "FileTree") - -- 🚏🚌 [ToggleTerm](https://github.com/akinsho/toggleterm.nvim) as built in terminal - ![Terminal](/utils/media/Terminal.png "Terminal") - -- 🔭 [Fuzzy finder](https://github.com/nvim-telescope/telescope.nvim) - ![Telescope](/utils/media/Telescope.png "Telescope") - -- :white_check_mark: [TODO viewer](https://github.com/folke/todo-comments.nvim) - ![TODO1](/utils/media/TODO.png "TODO") - ![TODO2](/utils/media/TODO2.png "TODO2") - -- :bookmark: [Tag viewer](https://github.com/liuchengxu/vista.vim#commands) - ![TagViewer](/utils/media/TagViewer.png "TagViewer") - -- 🤔🔑 [Whichkey](https://github.com/folke/which-key.nvim) - ![Wichkey](/utils/media/Wichkey.png "Wichkey") - -- ┇ [Status line](https://github.com/nvim-lualine/lualine.nvim) with git and lsp indicator + File manager and [bufferline](https://github.com/akinsho/nvim-bufferline.lua) lsp indicator - ![StatusLine](/utils/media/StatusLine.png "StatusLine") diff --git a/general/nvim/init.lua b/general/nvim/init.lua deleted file mode 100755 index 648590a..0000000 --- a/general/nvim/init.lua +++ /dev/null @@ -1,8 +0,0 @@ --- sourcing config files. -require("settings") -require("plugins") -require("theme") -require("maps") - -local user_settings_file = require("user_settings") -user_settings_file.other_configs() diff --git a/general/nvim/lua/maps.lua b/general/nvim/lua/maps.lua deleted file mode 100755 index 55a1fe0..0000000 --- a/general/nvim/lua/maps.lua +++ /dev/null @@ -1,52 +0,0 @@ --- Function for make mapping easier. -local map = require("utils").map - --- Map leader key to space. -vim.g.mapleader = " " - --- Split navigations. -map("n", "", "") -map("n", "", "") -map("n", "", "") -map("n", "", "") - --- Buffer resizing. -map("n", "", ":call ResizeLeft(3)") -map("n", "", ":call ResizeRight(3)") -map("n", "", ":call ResizeUp(1)") -map("n", "", ":call ResizeDown(1)") - --- Buffer switching. -map("n", "", ":BufferLineCyclePrev") -map("n", "", ":BufferLineCycleNext") - --- Moving lines in visual select. -map("v", "K", ":move '<-2gv-gv") -map("v", "J", ":move '>+1gv-gv") - --- ToggleTerm -function _G.set_terminal_keymaps() - map("t", "", "") - map("t", "", "h") - map("t", "", "j") - map("t", "", "k") - map("t", "", "l") - - map("t", "", ":call ResizeLeft(3)") - map("t", "", ":call ResizeDown(1)") - map("t", "", ":call ResizeUp(1)") - map("t", "", ":call ResizeRight(3)") -end -vim.api.nvim_create_autocmd("TermOpen", { - pattern = "term://*", - callback = function() - set_terminal_keymaps() - end, -}) - --- Don't copy the replaced text after pasting. -map("v", "p", '"_dP') - --- With this you can use > < multiple time for changing indent when you visual selected text. -map("v", "<", "", ">gv") diff --git a/general/nvim/lua/plugins.lua b/general/nvim/lua/plugins.lua deleted file mode 100755 index c107d7b..0000000 --- a/general/nvim/lua/plugins.lua +++ /dev/null @@ -1,598 +0,0 @@ -local utils = require("utils") -local fn = vim.fn - --- Disable some builtin plugins. -local disabled_built_ins = { - "2html_plugin", - "gzip", - "matchit", - "rrhelper", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "zip", - "zipPlugin", - "tar", - "tarPlugin", - "getscript", - "getscriptPlugin", - "vimball", - "vimballPlugin", - "logipat", - "spellfile_plugin", -} -for _, plugin in pairs(disabled_built_ins) do - vim.g["loaded_" .. plugin] = 1 -end - --- Install packer.nvim if it's not installed. -local packer_bootstrap -if not utils.is_plugin_installed("packer.nvim") then - packer_bootstrap = fn.system({ - "git", - "clone", - "--depth", - "1", - "https://github.com/wbthomason/packer.nvim", - utils.plugins_path .. "/start/packer.nvim", - }) - vim.cmd([[packadd packer.nvim]]) -end - -local use = require("packer").use -local user_settings_file = require("user_settings") - -return require("packer").startup({ - function() - use({ "wbthomason/packer.nvim" }) - - -- These two plugins make CodeArt startup faster. - -- In addition FixCursorHold can fix this bug: - -- https://github.com/neovim/neovim/issues/12587 - use({ - "lewis6991/impatient.nvim", - config = function() - require("impatient") - end, - disable = disable_plugins.impatient, - }) - use({ - "antoinemadec/FixCursorHold.nvim", - event = { "BufRead", "BufNewFile" }, - disable = disable_plugins.fix_cursor_hold, - }) - - -- gives you a useful undotree (and history) - use({ - "mbbill/undotree", - config = function() - require("plugins/undotree") - end, - }) - - -- This plugin is needed for many plugins(like telescope) so this is one of - -- default CodeArt's plugins. - use({ - "nvim-lua/plenary.nvim", - disable = disable_plugins.plenary, - }) - - -- Color schemes. - use({ - "folke/tokyonight.nvim", - disable = disable_plugins.tokyonight, - }) - use({ - "bluz71/vim-nightfly-guicolors", - disable = disable_plugins.nightfly, - }) - use({ - "bluz71/vim-moonfly-colors", - disable = disable_plugins.moonfly, - }) - use({ - "shaunsingh/nord.nvim", - disable = disable_plugins.nord, - }) - use({ - "navarasu/onedark.nvim", - config = function() - require("plugins/onedark") - end, - disable = disable_plugins.onedark, - }) - use({ - "artart222/nvim-enfocado", - disable = disable_plugins.nvim_enfocado, - }) - - -- custom colorscheme and config call - use({ - "catppuccin/nvim", - as = "catppuccin", - config = function() - require("plugins/catppuccin") - end, - disable = disable_plugins.catppuccin, - }) - - -- TrueZen.nvim is a Neovim plugin that aims to provide a cleaner and less cluttered interface - -- when toggled in either of it has three different modes (Ataraxis, Minimalist and Focus). - use({ - "Pocco81/TrueZen.nvim", - cmd = { - "TZFocus", - "TZAtaraxis", - "TZMinimalist", - }, - config = function() - require("plugins/true-zen") - end, - disable = disable_plugins.truezen, - }) - - -- This plugin adds indentation guides to all lines (including empty lines). - use({ - "lukas-reineke/indent-blankline.nvim", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins/indent-blankline") - end, - disable = disable_plugins.indent_blankline, - }) - - -- Icons. - use({ - "kyazdani42/nvim-web-devicons", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins.nvim_web_devicons") - end, - disable = disable_plugins.nvim_web_devicons, - }) - - -- File explorer tree. - use({ - "kyazdani42/nvim-tree.lua", - cmd = { - "NvimTreeOpen", - "NvimTreeFocus", - "NvimTreeToggle", - }, - config = function() - require("plugins.nvim-tree") - end, - disable = disable_plugins.nvim_tree, - }) - - -- Bufferline. - use({ - "akinsho/bufferline.nvim", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins/bufferline") - end, - disable = disable_plugins.nvim_bufferline, - }) - - -- Statusline. - use({ - "nvim-lualine/lualine.nvim", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins/lualine/lualine") - end, - disable = disable_plugins.lualine, - }) - - -- Better escape --> For escaping easily from insert mode with jk/jj. - use({ - "max397574/better-escape.nvim", - event = "InsertEnter", - config = function() - require("plugins.better_escape") - end, - disable = disable_plugins.better_escape, - }) - - -- TreeSitter. - use({ - "nvim-treesitter/nvim-treesitter", - run = ":TSUpdate", - event = { "BufRead", "BufNewFile" }, - cmd = { - "TSInstall", - "TSInstallInfo", - "TSInstallSync", - "TSUninstall", - "TSUpdate", - "TSUpdateSync", - "TSDisableAll", - "TSEnableAll", - }, - config = function() - require("plugins/treesitter") - end, - disable = disable_plugins.treesitter, - }) - - -- Colorizer (for highlighting color codes). - use({ - "norcalli/nvim-colorizer.lua", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins/colorizer") - vim.cmd("ColorizerAttachToBuffer") - end, - disable = disable_plugins.nvim_colorizer, - }) - - -- Startup screen. - use({ - "goolord/alpha-nvim", - cmd = "Alpha", - config = function() - require("plugins.alpha") - end, - disable = disable_plugins.alpha, - }) - - use({ - "nvim-telescope/telescope-fzf-native.nvim", - run = "make", - cmd = "Telescope", - disable = disable_plugins.telescope_fzf_native, - }) - use({ - "artart222/telescope_find_directories", - after = "telescope-fzf-native.nvim", - disable = disable_plugins.telescope_find_directories, - }) - use({ - "nvim-telescope/telescope.nvim", - after = "telescope_find_directories", - config = function() - require("plugins/telescope") - end, - disable = disable_plugins.telescope, - }) - - -- LSP, LSP installer and tab completion. - use({ - "williamboman/nvim-lsp-installer", - event = { "BufRead", "BufNewFile" }, - cmd = { - "LspInstall", - "LspInstallInfo", - "LspPrintInstalled", - "LspRestart", - "LspStart", - "LspStop", - "LspUninstall", - "LspUninstallAll", - }, - disable = disable_plugins.nvim_lsp_installer, - }) - use({ - "jose-elias-alvarez/null-ls.nvim", - after = "nvim-lsp-installer", - config = function() - local config = require("user_settings") - if config.null_ls ~= nil then - config.null_ls() - end - end, - disable = disable_plugins.null_ls, - }) - use({ - "neovim/nvim-lspconfig", - after = "null-ls.nvim", - config = function() - require("plugins.lsp.lsp") - end, - disable = disable_plugins.nvim_lspconfig, - }) - - use({ - "tami5/lspsaga.nvim", - cmd = "Lspsaga", - disable = disable_plugins.lspsaga, - }) - - use({ - "simrat39/symbols-outline.nvim", - cmd = { - "SymbolsOutline", - "SymbolsOutlineOpen", - "SymbolsOutlineClose", - }, - config = function() - require("plugins.symbols-outline") - end, - disable = disable_plugins.symbols_outline, - }) - - use({ - "rafamadriz/friendly-snippets", - event = "InsertEnter", - disable = disable_plugins.friendly_snippets, - }) - use({ - "L3MON4D3/LuaSnip", - after = "friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").load() - require("luasnip.loaders.from_snipmate").lazy_load() - end, - disable = disable_plugins.luasnip, - }) - use({ - "hrsh7th/nvim-cmp", - after = "LuaSnip", - config = function() - require("plugins/cmp") - end, - disable = disable_plugins.nvim_cmp, - }) - use({ - "hrsh7th/cmp-buffer", - after = "nvim-cmp", - disable = disable_plugins.cmp_buffer, - }) - use({ - "hrsh7th/cmp-path", - after = "nvim-cmp", - disable = disable_plugins.cmp_path, - }) - use({ - "hrsh7th/cmp-nvim-lsp", - after = "nvim-cmp", - disable = disable_plugins.cmp_nvim_lsp, - }) - use({ - "saadparwaiz1/cmp_luasnip", - after = "LuaSnip", - disable = disable_plugins.cmp_luasnip, - }) - use({ - "hrsh7th/cmp-nvim-lua", - ft = "lua", - disable = disable_plugins.cmp_nvim_lua, - }) - - -- LSP signature. - use({ - "ray-x/lsp_signature.nvim", - event = "InsertEnter", - config = function() - require("lsp_signature").setup() - end, - disable = disable_plugins.lsp_signature, - }) - - -- TODO: Do better lazyloading here for dap. - use({ - "mfussenegger/nvim-dap", - event = { "BufRead", "BufNewFile" }, - disable = disable_plugins.nvim_dap, - }) - - use({ - "Pocco81/dap-buddy.nvim", - after = "nvim-dap", - config = function() - require("plugins/dap") - end, - disable = disable_plugins.dap_install, - }) - use({ - "rcarriga/nvim-dap-ui", - after = "dap-buddy.nvim", - config = function() - require("plugins/dapui") - end, - disable = disable_plugins.nvim_dap_ui, - }) - - -- Terminal. - use({ - "akinsho/toggleterm.nvim", - keys = "", - cmd = "ToggleTerm", - config = function() - require("plugins/toggleterm") - end, - disable = disable_plugins.toggleterm, - }) - - -- Git support for nvim. - use({ - "tpope/vim-fugitive", - cmd = "Git", - disable = disable_plugins.fugitive, - }) - - -- Git signs. - use({ - "lewis6991/gitsigns.nvim", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins/gitsigns") - end, - disable = disable_plugins.gitsigns, - }) - - -- Auto closes. - use({ - "windwp/nvim-autopairs", - keys = { - { "i", "(" }, - { "i", "[" }, - { "i", "{" }, - { "i", "'" }, - { "i", '"' }, - { "i", "" }, - }, - config = function() - require("nvim-autopairs").setup() - end, - disable = disable_plugins.autopairs, - }) - -- This is for html and it can autorename too! - use({ - "windwp/nvim-ts-autotag", - ft = { - "html", - "javascript", - "typescript", - "javascriptreact", - "typescriptreact", - "svelte", - "vue", - "tsx", - "jsx", - "rescript", - "xml", - "php", - "markdown", - "glimmer", - "handlebars", - "hbs", - }, - disable = disable_plugins.nvim_ts_autotag, - }) - - -- Scrollbar. - use({ - "dstein64/nvim-scrollview", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins/nvim-scroll") - end, - disable = disable_plugins.scrollview, - }) - - -- Smooth scroll. - use({ - "karb94/neoscroll.nvim", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins.neoscroll") - end, - disable = disable_plugins.neoscroll, - }) - -- todo-comments is a lua plugin for Neovim to highlight and search for - -- todo comments like TODO, HACK, BUG in code base. - use({ - "folke/todo-comments.nvim", - event = { "BufRead", "BufNewFile" }, - config = function() - require("plugins/todo-comments") - end, - disable = disable_plugins.todo_comments, - }) - -- WhichKey is a lua plugin that displays a popup with possible - -- key bindings of the command you started typing. - use({ - "folke/which-key.nvim", - keys = { - "", - "g", - "d", - "y", - "!", - "z", - ">", - "<", - "]", - "[", - "v", - "c", - }, - config = function() - require("plugins/which_key") - end, - disable = disable_plugins.which_key, - }) - - -- A plugin for neovim that automatically creates missing directories - -- on saving a file. - use({ - "jghauser/mkdir.nvim", - event = { "FileWritePre", "BufWritePre" }, - config = function() - require("mkdir") - end, - disable = disable_plugins.mkdir, - }) - - -- Neovim plugin to comment in/out text. - use({ - "b3nj5m1n/kommentary", - keys = { - "kommentary_line_default", - "kommentary_visual_default", - }, - config = function() - require("plugins.kommentary") - end, - disable = disable_plugins.kommentary, - }) - use({ - "JoosepAlviste/nvim-ts-context-commentstring", - after = "nvim-treesitter", - disable = disable_plugins.ts_context_commentstring, - }) - - -- match-up is a plugin that lets you highlight, navigate, and operate on sets of matching text. - use({ - "andymass/vim-matchup", - event = { "BufRead", "BufNewFile" }, - config = function() - vim.g.matchup_matchparen_offscreen = {} - end, - disable = disable_plugins.vim_matchup, - }) - - -- With this plugin you can resize Neovim buffers easily. - use({ - "artart222/vim-resize", - event = { - "FuncUndefined ResizeDown", - "FuncUndefined ResizeUp", - "FuncUndefined ResizeLeft", - "FuncUndefined ResizeRight", - }, - disable = disable_plugins.vim_resize, - }) - - -- Install additional user plugins. - for _, plugin in pairs(additional_plugins) do - if type(plugin) == "string" then - use({ plugin }) - else - use({ table.unpack(plugin) }) - end - end - - -- Run :PackerSync if packer.nvim was not installed and - -- CodeArt installed that. - if packer_bootstrap then - require("packer").sync() - end - end, - config = { - -- Default compile path of packer_compiled file. - compile_path = fn.stdpath("config") .. "/plugin/" .. "packer_compiled.lua", - git = { - clone_timeout = 300, - }, - -- Adding single border to packer window. - display = { - open_fn = function() - return require("packer.util").float({ border = "single" }) - end, - }, - }, -}) diff --git a/general/nvim/lua/plugins/alpha.lua b/general/nvim/lua/plugins/alpha.lua deleted file mode 100644 index 6656dfa..0000000 --- a/general/nvim/lua/plugins/alpha.lua +++ /dev/null @@ -1,101 +0,0 @@ -local fn = vim.fn - -local present, alpha = pcall(require, "alpha") -if not present then - return -end -local dashboard = require("alpha.themes.dashboard") - -local os = require("utils").os - -local function button(sc, txt, keybind) - local sc_ = sc:gsub("%s", ""):gsub("SPC", "") - - local opts = { - position = "center", - text = txt, - shortcut = sc, - cursor = 5, - width = 36, - align_shortcut = "right", - hl = "AlphaCenter", - hl_shortcut = "AlphaShortcut", - } - - if keybind then - opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } } - end - - return { - type = "button", - val = txt, - on_press = function() - local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) - vim.api.nvim_feedkeys(key, "normal", false) - end, - opts = opts, - } -end - --- dashboard.section.header.val = { --- " ", --- " ", --- " █████████ █████ █████████ █████ ", --- " ███░░░░░███ ░░███ ███░░░░░███ ░░███ ", --- " ███ ░░░ ██████ ███████ ██████ ░███ ░███ ████████ ███████ ", --- " ░███ ███░░███ ███░░███ ███░░███ ░███████████ ░░███░░███░░░███░ ", --- " ░███ ░███ ░███░███ ░███ ░███████ ░███░░░░░███ ░███ ░░░ ░███ ", --- " ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░███ ░███ ███ ", --- " ░░█████████ ░░██████ ░░████████░░██████ █████ █████ █████ ░░█████ ", --- " ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ", --- " ", --- } -dashboard.section.header.val = { -"", -"", -"", -" * ,MMM8&&&. * ", -" MMMM88&&&&& . ", -" MMMM88&&&&&&& ", -" * MMM88&&&&&&&& ", -" MMM88&&&&&&&& ", -" 'MMM88&&&&&&' ", -" 'MMM8&&&' * ", -" |\\___/| ", -" ) ( . ' ", -" =\\ /= ", -" )===( * ", -" / \\ ", -" | | ", -" / \\ ", -" \\ / ", -" _/\\_/\\_/\\__ _/_/\\_/\\_/\\_/\\_/\\_/\\_/\\_/\\_/\\_ ", -" | | | |( ( | | | | | | | | | | ", -" | | | | ) ) | | | | | | | | | | ", -" | | | |(_( | | | | | | | | | | ", -" | | | | | | | | | | | | | | | ", -" | | | | | | | | | | | | | | | ", -} -dashboard.section.header.opts.hl = "AlphaHeader" - -dashboard.section.buttons.val = { - button("SPC f f", " Find File", ":Telescope find_files"), - button("SPC f d", " Find directory", ":Telescope find_directories"), - button("SPC f o", " Recents", ":Telescope oldfiles"), - button("SPC f w", " Find Word", ":Telescope live_grep"), - button("SPC f n", " New File", ":ene startinsert"), - button("SPC f m", " Bookmarks", ":Telescope marks"), -} -dashboard.section.buttons.opts.hl = "AlphaCenter" -dashboard.section.buttons.opts.hl_shortcut = "AlphaShortcut" - -local plugins_count -if os == "Windows_NT" then - plugins_count = fn.len(fn.globpath("~/AppData/Local/nvim-data/site/pack/packer/start", "*", 0, 1)) -else - plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) -end -dashboard.section.footer.val = "CodeArt Loaded " .. plugins_count .. " plugins!  " -dashboard.section.footer.opts.hl = "AlphaFooter" - -alpha.setup(dashboard.config) diff --git a/general/nvim/lua/plugins/better_escape.lua b/general/nvim/lua/plugins/better_escape.lua deleted file mode 100755 index d6ed35e..0000000 --- a/general/nvim/lua/plugins/better_escape.lua +++ /dev/null @@ -1,15 +0,0 @@ -local present, better_escape_setup = pcall(require, "better_escape") -if not present then - return -end - -local better_escape_config = { clear_empty_lines = true } - -local config = require("user_settings") -if config.better_escape then - for k, v in pairs(config.better_escape) do - better_escape_config[k] = v - end -end - -better_escape_setup.setup(better_escape_config) diff --git a/general/nvim/lua/plugins/bufferline.lua b/general/nvim/lua/plugins/bufferline.lua deleted file mode 100755 index cfa7fa8..0000000 --- a/general/nvim/lua/plugins/bufferline.lua +++ /dev/null @@ -1,40 +0,0 @@ -local present, bufferline_setup = pcall(require, "bufferline") -if not present then - return -end - -local bufferline_config = { - options = { - numbers = function(opts) - return string.format("%s", opts.id) - end, - diagnostics = "nvim_lsp", - offsets = { - { - filetype = "NvimTree", - text = "File Explorer", - highlight = "Directory", - text_align = "left", - }, - { - filetype = "vista_kind", - text = "Lsp Tags", - text_align = "center", - }, - { - filetype = "Outline", - text = " Lsp Tags", - text_align = "center", - }, - }, - }, -} - -local config = require("user_settings") -if config.bufferline then - for k, v in pairs(config.bufferline) do - bufferline_config[k] = v - end -end - -bufferline_setup.setup(bufferline_config) diff --git a/general/nvim/lua/plugins/catppuccin.lua b/general/nvim/lua/plugins/catppuccin.lua deleted file mode 100755 index 2a65cb9..0000000 --- a/general/nvim/lua/plugins/catppuccin.lua +++ /dev/null @@ -1,77 +0,0 @@ -local present, catppuccin_setup = pcall(require, "catppuccin") -if not present then - return -end - -local catppuccin_config = { -transparent_background = false, -term_colors = false, -styles = { - comments = "italic", - functions = "italic", - keywords = "italic", - strings = "NONE", - variables = "italic", -}, -integrations = { - treesitter = true, - native_lsp = { - enabled = true, - virtual_text = { - errors = "italic", - hints = "italic", - warnings = "italic", - information = "italic", - }, - underlines = { - errors = "underline", - hints = "underline", - warnings = "underline", - information = "underline", - }, - }, - lsp_trouble = false, - cmp = true, - lsp_saga = false, - gitgutter = false, - gitsigns = true, - telescope = true, - nvimtree = { - enabled = true, - show_root = false, - transparent_panel = false, - }, - neotree = { - enabled = false, - show_root = false, - transparent_panel = false, - }, - which_key = false, - indent_blankline = { - enabled = true, - colored_indent_levels = false, - }, - dashboard = true, - neogit = false, - vim_sneak = false, - fern = false, - barbar = false, - bufferline = true, - markdown = true, - lightspeed = false, - ts_rainbow = false, - hop = false, - notify = true, - telekasten = true, - symbols_outline = true, -} -} - -local config = require("user_settings") -if config.catppuccin then - for k, v in pairs(config.catppuccin) do - catppuccin_config[k] = v - end -end - -catppuccin_setup.setup(catppuccin_config) diff --git a/general/nvim/lua/plugins/cmp.lua b/general/nvim/lua/plugins/cmp.lua deleted file mode 100755 index e230a64..0000000 --- a/general/nvim/lua/plugins/cmp.lua +++ /dev/null @@ -1,106 +0,0 @@ -local present, cmp = pcall(require, "cmp") -if not present then - return -end - -local cmp_kinds = { - Text = " ", - Method = " ", - Function = " ", - Constructor = "略 ", - Field = "ﰠ", - Variable = " ", - Class = " ", - Interface = " ", - Module = " ", - Property = " ", - Unit = "塞 ", - Value = " ", - Enum = " ", - Keyword = " ", - Snippet = " ", - Color = " ", - File = " ", - Reference = " ", - Folder = " ", - EnumMember = " ", - Constant = " ", - Struct = " ", - Event = " ", - Operator = " ", - TypeParameter = " ", -} - -local cmp_config = { - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - formatting = { - fields = { "abbr", "kind", "menu" }, - format = function(entry, vim_item) - -- Kind icons - vim_item.kind = string.format("%s %s", vim_item.kind, cmp_kinds[vim_item.kind]) -- This concatonates the icons with the name of the item kind - -- Source - vim_item.menu = ({ - buffer = "[Buffer]", - nvim_lsp = "[LSP]", - luasnip = "[LuaSnip]", - nvim_lua = "[Lua]", - path = "[Path]", - })[entry.source.name] - - return vim_item - end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - experimental = { - ghost_text = true, - native_menu = false, - }, - mapping = { - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.close(), - [""] = cmp.mapping.confirm({ select = true }), - [""] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") - else - fallback() - end - end, - [""] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end, - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "nvim_lua" }, - { name = "buffer" }, - { name = "path" }, - }, -} - -local config = require("user_settings") -if config.cmp then - for k, v in pairs(config.cmp) do - cmp_config[k] = v - end -end - -cmp.setup(cmp_config) diff --git a/general/nvim/lua/plugins/colorizer.lua b/general/nvim/lua/plugins/colorizer.lua deleted file mode 100755 index 20205ed..0000000 --- a/general/nvim/lua/plugins/colorizer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local present, color = pcall(require, "colorizer") -if not present then - return -end - -local colorizer_config = { - "*", - css = { rgb_fn = true }, -} - -local config = require("user_settings") -if config.colorizer then - for k, v in pairs(config.colorizer) do - colorizer_config[k] = v - end -end - -color.setup(colorizer_config) diff --git a/general/nvim/lua/plugins/dap.lua b/general/nvim/lua/plugins/dap.lua deleted file mode 100755 index ca0622e..0000000 --- a/general/nvim/lua/plugins/dap.lua +++ /dev/null @@ -1,23 +0,0 @@ -local present, dap = pcall(require, "dap") -if not present then - return -end - --- dap-install configurations -local dap_install = require("dap-install") -dap_install.setup({ - installation_path = vim.fn.stdpath("data") .. "/dapinstall/", -}) -local dap_install = require("dap-install") -local dbg_list = require("dap-install.api.debuggers").get_installed_debuggers() - -for _, debugger in ipairs(dbg_list) do - dap_install.config(debugger) -end - -dap.defaults.fallback.terminal_win_cmd = "ToggleTerm" -vim.fn.sign_define("DapBreakpoint", { text = "● ", texthl = "DiagnosticSignError", linehl = "", numhl = "" }) -vim.fn.sign_define("DapBreakpointCondition", { text = "● ", texthl = "DiagnosticSignWarn", linehl = "", numhl = "" }) -vim.fn.sign_define("DapLogPoint", { text = "● ", texthl = "DiagnosticSignInfo", linehl = "", numhl = "" }) -vim.fn.sign_define("DapStopped", { text = "→ ", texthl = "DiagnosticSignWarn", linehl = "", numhl = "" }) -vim.fn.sign_define("DapBreakpointReject", { text = "●", texthl = "DiagnosticSignHint", linehl = "", numhl = "" }) diff --git a/general/nvim/lua/plugins/dapui.lua b/general/nvim/lua/plugins/dapui.lua deleted file mode 100755 index 73090b5..0000000 --- a/general/nvim/lua/plugins/dapui.lua +++ /dev/null @@ -1,55 +0,0 @@ -local present, dapui = pcall(require, "dapui") -if not present then - return -end - --- dap-ui configurations -local dapui_config = { - icons = { expanded = "▾", collapsed = "▸" }, - mappings = { - -- Use a table to apply multiple mappings - expand = { "", "<2-LeftMouse>" }, - open = "o", - remove = "d", - edit = "e", - repl = "r", - }, - sidebar = { - -- You can change the order of elements in the sidebar - elements = { - -- Provide as ID strings or tables with "id" and "size" keys - { - id = "scopes", - size = 0.25, -- Can be float or integer > 1 - }, - { id = "breakpoints", size = 0.25 }, - { id = "stacks", size = 0.25 }, - { id = "watches", size = 00.25 }, - }, - size = 40, - position = "left", -- Can be "left", "right", "top", "bottom" - }, - tray = { - elements = { "repl" }, - size = 10, - position = "bottom", -- Can be "left", "right", "top", "bottom" - }, - floating = { - max_height = nil, -- These can be integers or a float between 0 and 1. - max_width = nil, -- Floats will be treated as percentage of your screen. - border = "single", -- Border style. Can be "single", "double" or "rounded" - mappings = { - close = { "q", "" }, - }, - }, - windows = { indent = 1 }, -} - -local config = require("user_settings") -if config.dapui then - for k, v in pairs(config.dapui) do - dapui_config[k] = v - end -end - -dapui.setup() diff --git a/general/nvim/lua/plugins/gitsigns.lua b/general/nvim/lua/plugins/gitsigns.lua deleted file mode 100755 index ff6c934..0000000 --- a/general/nvim/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,34 +0,0 @@ -local status_ok, gitsigns_setup = pcall(require, "gitsigns") -if not status_ok then - return -end - -local gitsigns_config = { - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - attach_to_untracked = true, - current_line_blame = false, - sign_priority = 1, - update_debounce = 100, - max_file_length = 40000, - keymaps = { - noremap = true, - buffer = true, - }, - signs = { - add = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, - change = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - delete = { hl = "GitSignsDelete", text = "│", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - topdelete = { hl = "GitSignsDelete", text = "│", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - changedelete = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - }, -} - -local config = require("user_settings") -if config.gitsigns then - for k, v in pairs(config.gitsigns) do - gitsigns_config[k] = v - end -end - -gitsigns_setup.setup(gitsigns_config) diff --git a/general/nvim/lua/plugins/indent-blankline.lua b/general/nvim/lua/plugins/indent-blankline.lua deleted file mode 100755 index 762d2b2..0000000 --- a/general/nvim/lua/plugins/indent-blankline.lua +++ /dev/null @@ -1,63 +0,0 @@ -local present, blankline = pcall(require, "indent_blankline") -if not present then - return -end - -require("../user_settings") -local indent_blankline_style = 1 -if user_indent_blankline_style then - if type(user_indent_blankline_style) == "number" then - indent_blankline_style = user_indent_blankline_style - elseif type(user_indent_blankline_style) == "string" then - indent_blankline_style = user_indent_blankline_style - end -end - -local indent_blankline_styles = { - "▏", - "¦", - "┆", - "│", - "⎸", - "|", -} -if type(user_indent_blankline_style) == "number" then - vim.g.indent_blankline_char = indent_blankline_styles[indent_blankline_style] - vim.g.indent_blankline_context_char = indent_blankline_styles[indent_blankline_style] -elseif type(user_indent_blankline_style) == "string" then - vim.g.indent_blankline_char = user_indent_blankline_style - vim.g.indent_blankline_context_char = user_indent_blankline_style -elseif type(user_indent_blankline_style) == "nil" then - vim.g.indent_blankline_char = indent_blankline_styles[indent_blankline_style] - vim.g.indent_blankline_context_char = indent_blankline_styles[indent_blankline_style] -end - -local blankline_config = { - show_trailing_blankline_indent = false, - indent_blankline_use_treesitter = true, - show_first_indent_level = true, - show_current_context = true, - buftype_exclude = { "terminal", "nofile", "help" }, - filetype_exclude = { - "help", - "toggleterm", - "alpha", - "packer", - "lsp-installer", - "lspinfo", - "vista_kind", - "terminal", - "TelescopePrompt", - "TelescopeResults", - }, -} - -local config = require("user_settings") -if config.indent_blankline then - for k, v in pairs(config.indent_blankline) do - blankline_config[k] = v - end -end - --- Disable indent-blankline on these pages. -blankline.setup(blankline_config) diff --git a/general/nvim/lua/plugins/kommentary.lua b/general/nvim/lua/plugins/kommentary.lua deleted file mode 100755 index f0641b1..0000000 --- a/general/nvim/lua/plugins/kommentary.lua +++ /dev/null @@ -1,22 +0,0 @@ -local present, kommentary_config = pcall(require, "kommentary.config") -if not present then - return -end - -local langs = require("kommentary.config").config -- all default supported langs -for lang, _ in pairs(langs) do - kommentary_config.configure_language(lang, { - single_line_comment_string = "auto", - multi_line_comment_strings = "auto", - prefer_multi_line_comments = true, - use_consistent_indentation = true, - ignore_whitespace = true, - hook_function = function() - if require("utils").is_plugin_installed("kommentary") then - require("ts_context_commentstring.internal").update_commentstring() - end - end, - }) -end - -vim.g.kommentary_create_default_mappings = false diff --git a/general/nvim/lua/plugins/lsp/lsp.lua b/general/nvim/lua/plugins/lsp/lsp.lua deleted file mode 100755 index a1cf2a5..0000000 --- a/general/nvim/lua/plugins/lsp/lsp.lua +++ /dev/null @@ -1,27 +0,0 @@ -local lsp_installer = require("nvim-lsp-installer") -lsp_installer.setup() - -for _, server in pairs(lsp_installer.get_installed_servers()) do - require("lspconfig")[server.name].setup({ - on_attach = function(client, bufnr) - require("lsp_signature").on_attach({ - hint_prefix = "", - }) - - local formatters = require("plugins.lsp.utils") - local client_filetypes = client.config.filetypes or {} - for _, filetype in ipairs(client_filetypes) do - if #vim.tbl_keys(formatters.list_registered_formatters(filetype)) > 0 then - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false - end - end - - if client.name == "clangd" then - client.offset_encoding = "utf-16" - end - end, - - capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()), - }) -end diff --git a/general/nvim/lua/plugins/lsp/utils.lua b/general/nvim/lua/plugins/lsp/utils.lua deleted file mode 100644 index b2a8ed1..0000000 --- a/general/nvim/lua/plugins/lsp/utils.lua +++ /dev/null @@ -1,28 +0,0 @@ -local M = {} - -function M.list_registered_providers_names(filetype) - local s = require("null-ls.sources") - local available_sources = s.get_available(filetype) - local registered = {} - for _, source in ipairs(available_sources) do - for method in pairs(source.methods) do - registered[method] = registered[method] or {} - table.insert(registered[method], source.name) - end - end - return registered -end - -function M.list_registered_formatters(filetype) - local registered_providers = M.list_registered_providers_names(filetype) - local method = require("null-ls").methods.FORMATTING - return registered_providers[method] or {} -end - -function M.list_registered_linters(filetype) - local registered_providers = M.list_registered_providers_names(filetype) - local method = require("null-ls").methods.DIAGNOSTICS - return registered_providers[method] or {} -end - -return M diff --git a/general/nvim/lua/plugins/lualine/components.lua b/general/nvim/lua/plugins/lualine/components.lua deleted file mode 100755 index 3f3a012..0000000 --- a/general/nvim/lua/plugins/lualine/components.lua +++ /dev/null @@ -1,67 +0,0 @@ -local M = {} - -local lsp_utils = require("plugins.lsp.utils") - -function M.lsp_progress(_) - local Lsp = vim.lsp.util.get_progress_messages()[1] - - if Lsp then - local msg = Lsp.message or "" - local percentage = Lsp.percentage or 0 - local title = Lsp.title or "" - - local spinners = { "", "", "" } - local success_icon = { "", "", "" } - - local ms = vim.loop.hrtime() / 1000000 - local frame = math.floor(ms / 120) % #spinners - - if percentage >= 70 then - return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) - end - - return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) - end - - return "" -end - -function M.treesitter_status(_) - local b = vim.api.nvim_get_current_buf() - if type(vim.treesitter.highlighter.active[b]) ~= "nil" then - if next(vim.treesitter.highlighter.active[b]) then - return " TS" - end - return " TS" - end - return " TS" -end - -function M.lsp_name(msg) - msg = msg or "Inactive" - local buf_clients = vim.lsp.buf_get_clients() - if next(buf_clients) == nil then - if type(msg) == "boolean" or #msg == 0 then - return "Inactive" - end - return msg - end - local buf_ft = vim.bo.filetype - local buf_client_names = {} - - for _, client in pairs(buf_clients) do - if client.name ~= "null-ls" then - table.insert(buf_client_names, client.name) - end - end - - local supported_formatters = lsp_utils.list_registered_formatters(buf_ft) - vim.list_extend(buf_client_names, supported_formatters) - - local supported_linters = lsp_utils.list_registered_linters(buf_ft) - vim.list_extend(buf_client_names, supported_linters) - - return table.concat(buf_client_names, ", ") -end - -return M diff --git a/general/nvim/lua/plugins/lualine/lualine.lua b/general/nvim/lua/plugins/lualine/lualine.lua deleted file mode 100755 index 832c6c0..0000000 --- a/general/nvim/lua/plugins/lualine/lualine.lua +++ /dev/null @@ -1,112 +0,0 @@ -local present, lualine_setup = pcall(require, "lualine") -if not present then - return -end - -local utils = require("plugins.lualine.components") - -require("../user_settings") -local lualine_style = 1 -if user_lualine_style then - if type(user_lualine_style) == "number" then - lualine_style = user_lualine_style - elseif type(user_lualine_style) == "table" then - lualine_style = { user_lualine_style[1], user_lualine_style[2] } - end -end - -local lualine_styles = { - { - { left = " ", right = " " }, - { left = "│", right = "│" }, - }, - { - { left = " ", right = "" }, - { left = " ", right = " " }, - }, - { - { left = "", right = "" }, - { left = " ", right = " " }, - }, - { - { left = "", right = "" }, - { left = "", right = "" }, - }, - { - { left = "", right = "" }, - { left = " ", right = " " }, - }, -} - -local section_char, component_char -if user_lualine_style then - if type(user_lualine_style) == "number" then - section_char = lualine_styles[lualine_style][1] - component_char = lualine_styles[lualine_style][2] - elseif type(user_lualine_style) == "table" then - section_char = user_lualine_style[1] - component_char = user_lualine_style[2] - end -else - section_char = lualine_styles[lualine_style][1] - component_char = lualine_styles[lualine_style][2] -end - -local lualine_config = { - options = { - globalstatus = true, - theme = "auto", - disabled_filetypes = { - "TelescopePrompt", - "TelescopeResults", - "aerial", - "dapui_scopes", - "dapui_breakpoints", - "dapui_stacks", - "dapui_watches", - "dap-repl", - }, - - section_separators = section_char, - component_separators = component_char, - }, - extensions = { "fugitive", "nvim-tree", "toggleterm", "aerial", "quickfix", "symbols-outline" }, - sections = { - lualine_a = { "mode" }, - lualine_b = { - { "branch" }, - { - "diff", - symbols = { added = "  ", modified = "柳", removed = " " }, -- changes diff symbols - }, - { "diagnostics" }, - }, - lualine_c = { - { "filetype", icon_only = true, padding = { left = 1, right = 0 }, separator = " " }, - { "filename", padding = { left = 0, right = 1 } }, - }, - lualine_x = { - { - utils.lsp_name, - icon = " ", - color = { gui = "none" }, - }, - { - utils.treesitter_status, - color = { fg = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("DiffChange")), "fg") }, - }, - "fileformat", - }, - lualine_y = { utils.lsp_progress, "progress" }, - lualine_z = { "location" }, - }, -} - -local config = require("user_settings") -if config.lualine then - for k, v in pairs(config.lualine) do - lualine_config[k] = v - end -end - -lualine_setup.setup(lualine_config) diff --git a/general/nvim/lua/plugins/neoscroll.lua b/general/nvim/lua/plugins/neoscroll.lua deleted file mode 100755 index 568a3da..0000000 --- a/general/nvim/lua/plugins/neoscroll.lua +++ /dev/null @@ -1,15 +0,0 @@ -local present, neoscroll_setup = pcall(require, "neoscroll") -if not present then - return -end - -local neoscroll_config = {} - -local config = require("user_settings") -if config.neoscroll then - for k, v in pairs(config.neoscroll) do - neoscroll_config[k] = v - end -end - -neoscroll_setup.setup(neoscroll_config) diff --git a/general/nvim/lua/plugins/nvim-scroll.lua b/general/nvim/lua/plugins/nvim-scroll.lua deleted file mode 100755 index c29e994..0000000 --- a/general/nvim/lua/plugins/nvim-scroll.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.g.scrollview_excluded_filetypes = { "NvimTree", "vista_kind" } -require("utils").highlight("ScrollView", { bg = "LightCyan", ctermbg = 160 }) diff --git a/general/nvim/lua/plugins/nvim-tree.lua b/general/nvim/lua/plugins/nvim-tree.lua deleted file mode 100755 index b9e13fe..0000000 --- a/general/nvim/lua/plugins/nvim-tree.lua +++ /dev/null @@ -1,97 +0,0 @@ -local present, nvimtree = pcall(require, "nvim-tree") -if not present then - return -end -local tree_cb = require("nvim-tree.config").nvim_tree_callback - --- Set alias for vim.g. -local g = vim.g - -g.nvim_tree_auto_ignore_ft = { "alpha" } -- Don't open tree on specific fiypes. -g.nvim_tree_git_hl = 1 -- Will enable file highlight for git attributes (can be used without the icons). -g.nvim_tree_highlight_opened_files = 0 -- Will enable folder and file icon highlight for opened files/directories. -g.nvim_tree_add_trailing = 0 -- Append a trailing slash to folder names. ]] - -local nvimtree_config = { - open_on_tab = false, - update_cwd = true, - disable_netrw = true, - hijack_netrw = true, - hijack_unnamed_buffer_when_opening = false, - diagnostics = { - enable = true, - icons = { - hint = "", - info = "", - warning = "", - error = "", - }, - }, - git = { - enable = true, - ignore = false, - timeout = 500, - }, - filters = { - custom = { - ".git", - "node_modules", - ".cache", - "__pycache__", - }, - }, - renderer = { - indent_markers = { - enable = true, - }, - }, - view = { - width = math.floor(vim.fn.winwidth(0) * 0.15), -- Finding 15% of windows width. - side = "left", - preserve_window_proportions = false, - mappings = { - list = { - { key = "", cb = ":call ResizeLeft(3)" }, - { key = "", cb = tree_cb("toggle_dotfiles") }, - }, - }, - }, - actions = { - use_system_clipboard = true, - change_dir = { - enable = true, - global = false, - restrict_above_cwd = false, - }, - open_file = { - quit_on_open = false, - resize_window = false, - window_picker = { - enable = true, - chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", - exclude = { - filetype = { - "notify", - "packer", - "qf", - "diff", - "fugitive", - "fugitiveblame", - "Outline", - "toggleterm", - }, - buftype = { "nofile", "terminal", "help" }, - }, - }, - }, - }, -} - -local config = require("user_settings") -if config.nvim_tree then - for k, v in pairs(config.nvim_tree) do - nvimtree_config[k] = v - end -end - -nvimtree.setup(nvimtree_config) diff --git a/general/nvim/lua/plugins/nvim_web_devicons.lua b/general/nvim/lua/plugins/nvim_web_devicons.lua deleted file mode 100755 index bca0ccc..0000000 --- a/general/nvim/lua/plugins/nvim_web_devicons.lua +++ /dev/null @@ -1,15 +0,0 @@ -local present, devicons = pcall(require, "nvim-web-devicons") -if not present then - return -end - -local devicons_config = {} - -local config = require("user_settings") -if config.nvim_web_devicons then - for k, v in pairs(config.nvim_web_devicons) do - devicons_config[k] = v - end -end - -devicons.setup(devicons_config) diff --git a/general/nvim/lua/plugins/onedark.lua b/general/nvim/lua/plugins/onedark.lua deleted file mode 100755 index dd15f8d..0000000 --- a/general/nvim/lua/plugins/onedark.lua +++ /dev/null @@ -1,33 +0,0 @@ -local present, onedark_setup = pcall(require, "onedark") -if not present then - return -end - -local onedark_config = { - -- Main options -- - style = "deep", -- 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light' - toggle_style_key = "co", -- Default keybinding to toggle - term_colors = true, - code_style = { - comments = "italic", - keywords = "none", - functions = "none", - strings = "none", - variables = "none", - }, - -- Plugins Config -- - diagnostics = { - darker = true, -- darker colors for diagnostic - undercurl = true, -- use undercurl instead of underline for diagnostics - background = true, -- use background color for virtual text - }, -} - -local config = require("user_settings") -if config.onedark then - for k, v in pairs(config.onedark) do - onedark_config[k] = v - end -end - -onedark_setup.setup(onedark_config) diff --git a/general/nvim/lua/plugins/symbols-outline.lua b/general/nvim/lua/plugins/symbols-outline.lua deleted file mode 100644 index 0aac0de..0000000 --- a/general/nvim/lua/plugins/symbols-outline.lua +++ /dev/null @@ -1,52 +0,0 @@ -vim.g.symbols_outline = { - highlight_hovered_item = true, - show_guides = true, - auto_preview = true, - position = "right", - relative_width = true, - width = 16, - auto_close = false, - show_numbers = false, - show_relative_numbers = false, - show_symbol_details = true, - preview_bg_highlight = "Pmenu", - keymaps = { -- These keymaps can be a string or a table for multiple keys - close = { "", "q" }, - goto_location = "", - focus_location = "o", - hover_symbol = "", - toggle_preview = "K", - rename_symbol = "r", - code_actions = "a", - }, - lsp_blacklist = {}, - symbol_blacklist = {}, - symbols = { - File = { icon = "", hl = "TSURI" }, - Module = { icon = "", hl = "TSNamespace" }, - Namespace = { icon = "", hl = "TSNamespace" }, - Package = { icon = "", hl = "TSNamespace" }, - Class = { icon = "𝓒", hl = "TSType" }, - Method = { icon = "ƒ", hl = "TSMethod" }, - Property = { icon = "", hl = "TSMethod" }, - Field = { icon = "", hl = "TSField" }, - Constructor = { icon = "", hl = "TSConstructor" }, - Enum = { icon = "ℰ", hl = "TSType" }, - Interface = { icon = "ﰮ", hl = "TSType" }, - Function = { icon = "", hl = "TSFunction" }, - Variable = { icon = "", hl = "TSConstant" }, - Constant = { icon = "", hl = "TSConstant" }, - String = { icon = "𝓐", hl = "TSString" }, - Number = { icon = "#", hl = "TSNumber" }, - Boolean = { icon = "⊨", hl = "TSBoolean" }, - Array = { icon = "", hl = "TSConstant" }, - Object = { icon = "⦿", hl = "TSType" }, - Key = { icon = "🔐", hl = "TSType" }, - Null = { icon = "NULL", hl = "TSType" }, - EnumMember = { icon = "", hl = "TSField" }, - Struct = { icon = "𝓢", hl = "TSType" }, - Event = { icon = "🗲", hl = "TSType" }, - Operator = { icon = "+", hl = "TSOperator" }, - TypeParameter = { icon = "𝙏", hl = "TSParameter" }, - }, -} diff --git a/general/nvim/lua/plugins/telescope.lua b/general/nvim/lua/plugins/telescope.lua deleted file mode 100755 index e5ea5ad..0000000 --- a/general/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,91 +0,0 @@ -local present, telescope_setup = pcall(require, "telescope") -if not present then - return -end - -local previewers = require("telescope.previewers") -local Job = require("plenary.job") -local new_maker = function(filepath, bufnr, opts) - filepath = vim.fn.expand(filepath) - Job - :new({ - command = "file", - args = { "--mime-type", "-b", filepath }, - on_exit = function(j) - local mime_type = vim.split(j:result()[1], "/")[1] - if mime_type == "text" then - previewers.buffer_previewer_maker(filepath, bufnr, opts) - else - -- maybe we want to write something to the buffer here - vim.schedule(function() - vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { "BINARY" }) - end) - end - end, - }) - :sync() -end - -local os = require("utils").os -local buffer_previewer_maker -local finder -if os == "Linux" or os == "Darwin" then - -- Find the name of the fd binary file in the operating system. - if vim.fn.filereadable("/bin/fdfind") == 1 or vim.fn.filereadable("/usr/bin/fdfind") == 1 then - finder = "fdfind" - else - finder = "fd" - end - buffer_previewer_maker = new_maker -else - finder = "fd" - buffer_previewer_maker = nil -end - -local telescope_config = { - defaults = { - buffer_previewer_maker = buffer_previewer_maker, - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - "--hidden", - "--glob=!.git/", - }, - prompt_prefix = "  ", - selection_caret = " ", - }, - pickers = { - find_files = { - find_command = { finder, "--type=file", "--follow", "--exclude=.git" }, - }, - }, - extensions = {}, -} - -if require("utils").is_plugin_installed("telescope-fzf-native.nvim") then - telescope_config.extensions["fzf"] = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - } - telescope_setup.load_extension("fzf") -end - -if require("utils").is_plugin_installed("telescope_find_directories") then - telescope_setup.load_extension("find_directories") -end - -local config = require("user_settings") -if config.telescope then - for k, v in pairs(config.telescope) do - telescope_config[k] = v - end -end - -telescope_setup.setup(telescope_config) diff --git a/general/nvim/lua/plugins/todo-comments.lua b/general/nvim/lua/plugins/todo-comments.lua deleted file mode 100755 index 65c69ce..0000000 --- a/general/nvim/lua/plugins/todo-comments.lua +++ /dev/null @@ -1,70 +0,0 @@ -local present, todo_comments_setup = pcall(require, "todo-comments") -if not present then - return -end - -local todo_comments_config = { - signs = true, -- show icons in the signs column - sign_priority = 2, -- sign priority - -- keywords recognized as todo comments - keywords = { - FIX = { - icon = " ", -- icon used for the sign, and in search results - color = "error", -- can be a hex color, or a named color (see below) - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords - -- signs = false, -- configure signs for some keywords individually - }, - TODO = { icon = " ", color = "info" }, - HACK = { icon = " ", color = "warning" }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - }, - merge_keywords = true, -- when true, custom keywords will be merged with the defaults - -- highlighting of the line containing the todo comment - -- * before: highlights before the keyword (typically comment characters) - -- * keyword: highlights of the keyword - -- * after: highlights after the keyword (todo text) - highlight = { - before = "", -- "fg" or "bg" or empty - keyword = "wide", -- "fg", "bg", "wide" or empty. (wide is the same as bg, but will also highlight surrounding characters) - after = "fg", -- "fg" or "bg" or empty - --pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlightng (vim regex) - pattern = [[(KEYWORDS)]], -- pattern or table of patterns, used for highlightng (vim regex) - comments_only = true, -- uses treesitter to match keywords in comments only - max_line_len = 400, -- ignore lines longer than this - exclude = {}, -- list of file types to exclude highlighting - }, - -- list of named colors where we try to extract the guifg from the - -- list of hilight groups or use the hex color if hl not found as a fallback - colors = { - error = { "LspDiagnosticsDefaultError", "ErrorMsg", "#DC2626" }, - warning = { "LspDiagnosticsDefaultWarning", "WarningMsg", "#FBBF24" }, - info = { "LspDiagnosticsDefaultInformation", "#2563EB" }, - hint = { "LspDiagnosticsDefaultHint", "#10B981" }, - default = { "Identifier", "#7C3AED" }, - }, - search = { - command = "rg", - args = { - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - }, - -- regex that will be used to match keywords. - -- don"t replace the (KEYWORDS) placeholder - -- pattern = [[\b(KEYWORDS):]], -- ripgrep regex - pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You"ll likely get false positives - }, -} - -local config = require("user_settings") -if config.todo_comments then - for k, v in pairs(config.todo_comments) do - todo_comments_config[k] = v - end -end - -todo_comments_setup.setup(todo_comments_config) diff --git a/general/nvim/lua/plugins/toggleterm.lua b/general/nvim/lua/plugins/toggleterm.lua deleted file mode 100755 index f5bcdc2..0000000 --- a/general/nvim/lua/plugins/toggleterm.lua +++ /dev/null @@ -1,67 +0,0 @@ -local present, toggle_term = pcall(require, "toggleterm") -if not present then - return -end - -local toggleterm_config = { - open_mapping = "", - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_terminals = false, - start_in_insert = true, - insert_mappings = true, -- whether or not the open mapping applies in insert mode - persist_size = true, - direction = "horizontal", - close_on_exit = true, -- close the terminal window when the process exits - highlights = { - Normal = { - guibg = "Normal", - }, - }, - float_opts = { - border = "curved", - width = 120, - height = 40, - winblend = 3, - }, -} - -local Terminal = require("toggleterm.terminal").Terminal - -local lazygit = Terminal:new({ cmd = "lazygit", hidden = true, direction = "float" }) -function _LAZYGIT_TOGGLE() - lazygit:toggle() -end - -local node = Terminal:new({ cmd = "node", hidden = true, direction = "float" }) -function _NODE_TOGGLE() - node:toggle() -end - -local ncdu = Terminal:new({ cmd = "ncdu", hidden = true, direction = "float" }) -function _NCDU_TOGGLE() - ncdu:toggle() -end - -local htop = Terminal:new({ cmd = "htop", hidden = true, direction = "float" }) -function _HTOP_TOGGLE() - htop:toggle() -end - -local python = Terminal:new({ cmd = "python", hidden = true, direction = "float" }) -function _PYTHON_TOGGLE() - python:toggle() -end - -local ranger = Terminal:new({ cmd = "ranger", hidden = true, direction = "float" }) -function _RANGER_TOGGLE() - ranger:toggle() -end - -local config = require("user_settings") -if config.toggleterm then - for k, v in pairs(config.toggleterm) do - toggleterm_config[k] = v - end -end - -toggle_term.setup(toggleterm_config) diff --git a/general/nvim/lua/plugins/treesitter.lua b/general/nvim/lua/plugins/treesitter.lua deleted file mode 100755 index 5a5ce25..0000000 --- a/general/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,34 +0,0 @@ -local present, nvim_treesitter = pcall(require, "nvim-treesitter.configs") -if not present then - return -end - -local treesitter_config = { - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - matchup = { - enable = true, - }, - indent = { - enable = true, - disable = { "python" }, - }, - autotag = { - enable = true, - }, - context_commentstring = { - enable = true, - enable_autocmd = false, - }, -} - -local config = require("user_settings") -if config.treesitter then - for k, v in pairs(config.treesitter) do - treesitter_config[k] = v - end -end - -nvim_treesitter.setup(treesitter_config) diff --git a/general/nvim/lua/plugins/true-zen.lua b/general/nvim/lua/plugins/true-zen.lua deleted file mode 100755 index b7b2210..0000000 --- a/general/nvim/lua/plugins/true-zen.lua +++ /dev/null @@ -1,80 +0,0 @@ -local present, tzen = pcall(require, "true-zen") -if not present then - return -end - -local truezen_config = { - ui = { - bottom = { - laststatus = 0, - ruler = false, - showmode = false, - showcmd = false, - cmdheight = 1, - }, - top = { - showtabline = 0, - }, - left = { - number = false, - relativenumber = false, - signcolumn = "no", - }, - }, - modes = { - ataraxis = { - left_padding = 32, - right_padding = 32, - top_padding = 1, - bottom_padding = 1, - ideal_writing_area_width = { 0 }, - auto_padding = true, - keep_default_fold_fillchars = true, - custom_bg = { "none", "" }, - bg_configuration = true, - quit = "untoggle", - ignore_floating_windows = true, - affected_higroups = { - NonText = {}, - FoldColumn = {}, - ColorColumn = {}, - VertSplit = {}, - StatusLine = {}, - StatusLineNC = {}, - SignColumn = {}, - }, - }, - focus = { - margin_of_error = 5, - focus_method = "experimental", - }, - }, - integrations = { - vim_gitgutter = false, - galaxyline = false, - tmux = false, - gitsigns = false, - nvim_bufferline = false, - limelight = false, - twilight = false, - vim_airline = false, - vim_powerline = false, - vim_signify = false, - express_line = false, - lualine = false, - }, - misc = { - on_off_commands = false, - ui_elements_commands = false, - cursor_by_mode = false, - }, -} - -local config = require("user_settings") -if config.true_zen then - for k, v in pairs(config.true_zen) do - truezen_config[k] = v - end -end - -tzen.setup(truezen_config) diff --git a/general/nvim/lua/plugins/undotree.lua b/general/nvim/lua/plugins/undotree.lua deleted file mode 100644 index 3773b6a..0000000 --- a/general/nvim/lua/plugins/undotree.lua +++ /dev/null @@ -1,7 +0,0 @@ -local target_path = vim.fn.expand('~/.undodir') - -if vim.fn.isdirectory(target_path) == false then - vim.call(vim.fn.mkdir(target_path, "p", 0700)) -end - -vim.cmd("set undodir", target_path) diff --git a/general/nvim/lua/plugins/which_key.lua b/general/nvim/lua/plugins/which_key.lua deleted file mode 100755 index 98efccd..0000000 --- a/general/nvim/lua/plugins/which_key.lua +++ /dev/null @@ -1,235 +0,0 @@ -local present, which_key = pcall(require, "which-key") -if not present then - return -end - -local user_settings = require("../user_settings") - --- This function is for using Nvimtree as fullscreen explorer -function nt_explorer() - local view = require("nvim-tree.view") - if view.is_visible() then - vim.cmd("NvimTreeClose") - vim.cmd("e .") - else - vim.cmd("e .") - vim.cmd("NvimTreeOpen") - end -end - -which_key.setup({ - plugins = { - marks = false, - registers = false, - spelling = { - enabled = true, - suggestions = 20, - }, - presets = { - operators = true, - motions = true, - text_objects = true, - nav = true, - z = false, - g = false, - windows = false, -- default bindings on - }, - }, - key_labels = { - [""] = "SPC", - [""] = "SPC", - [""] = "ENT", - [""] = "TAB", - [""] = "ALT", - [""] = "SHI", - [""] = "CTR", - }, - window = { - border = "single", -- none, single, double, shadow - position = "bottom", -- bottom, top - margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] - padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] - winblend = 0, - }, - ignore_missing = false, -}) - --- Packer -which_key.register({ - p = { - name = "Packer", - i = { ":PackerInstall", "Install CodeArt packages" }, - u = { ":PackerUpdate", "Update CodeArt packages" }, - r = { ":PackerClean", "Uninstall unnecessary CodeArt packages" }, - s = { ":PackerSync", "Sync CodeArt packages" }, - c = { ":PackerCompile", "Compile CodeArt packages" }, - }, -}, { prefix = "" }) - -which_key.register({ - b = { - name = "Buffer", - c = { ":BufferLinePickClose", "Close Buffer" }, - C = { ":bdelete! ", "Close Current Buffer" }, - e = { ":noh", "Erase Search Highlights" }, - l = { ":BufferLineMoveNext", "Move Buffer Right" }, - h = { ":BufferLineMovePrev", "Move buffer Left" }, - n = { ":ene startinsert", "New Buffer" }, - m = { ":TZFocus", "Maximize Current Buffer" }, - }, -}, { prefix = "" }) - -which_key.register({ - ["r"] = { ":lua vim.lsp.buf.formatting_sync()", "Format" }, -}, { prefix = "" }) - --- NvimTree -if require("utils").is_plugin_installed("nvim-tree.lua") then - which_key.register({ - n = { - name = "NvimTree", - t = { ":NvimTreeToggle", "Toggle NvimTree" }, - f = { ":NvimTreeFocus", "Focus on NvimTree" }, - e = { ":lua nt_explorer()", "Fullscreen Explorer" }, - }, - }, { prefix = "" }) -end - --- Finding different stuf. -which_key.register({ - f = { - name = "Find", - w = { ":Telescope live_grep", "Word" }, - f = { ":Telescope find_files", "File" }, - o = { ":Telescope oldfiles", "Old File" }, - d = { ":Telescope find_directories", "Directory" }, - b = { ":Telescope buffers", "Buffer" }, - h = { ":Telescope help_tags", "Help File" }, - B = { ":Telescope marks", "Find BookMark" }, - }, -}, { prefix = "" }) - --- Git keybinds. -which_key.register({ - g = { - name = "Git", - s = { ":Telescope git_status", "Status + Git Diff" }, - c = { ":Telescope git_commits", "Commit History" }, - C = { ":Telescope git_bcommits", "Buffer Commit History" }, - b = { ":Telescope git_branches", "Branches history" }, - k = { ":Gitsigns prev_hunk", "Next Hunk" }, - j = { ":Gitsigns next_hunk", "Prev Hunk" }, - p = { ":Gitsigns preview_hunk", "Preview Hunk" }, - r = { ":Gitsigns reset_hunk", "Reset Hunk" }, - R = { ":Gitsigns reset_buffer", "Reset Buffer" }, - d = { ":Gitsigns diffthis", "Git Diff" }, - l = { ":Gitsigns blame_line", "Blame For Current Line" }, - S = { ":Gitsigns stage_hunk", "Stage Hunk" }, - u = { ":Gitsigns undo_stage_hunk", "Undo Stage Hunk" }, - }, -}, { prefix = "" }) - --- ColorScheme keybindings. -which_key.register({ - c = { - name = "Colorscheme", - f = { ":Telescope colorscheme", "Find Colorscheme" }, - p = { ":Telescope colorscheme enable_preview=true", "Find Colorscheme with previwer " }, - o = { ':lua require("onedark").toggle()', "Toggle Onedark Style" }, - }, -}, { prefix = "" }) - --- Terminal. -which_key.register({ - t = { - name = "Terminal", - n = { ":lua _NODE_TOGGLE()", "Node" }, - N = { ":lua _NCDU_TOGGLE()", "Ncdu" }, - H = { ":lua _HTOP_TOGGLE()", "Htop" }, - p = { ":lua _PYTHON_TOGGLE()", "Python" }, - r = { ":lua _RANGER_TOGGLE()", "Ranger" }, - l = { ":lua _LAZYGIT_TOGGLE()", "LazyGit" }, - f = { ":ToggleTerm direction=float", "Float" }, - h = { ":ToggleTerm direction=horizontal", "Horizontal" }, - v = { ":ToggleTerm direction=vertical", "Vertical" }, - }, -}, { prefix = "" }) - --- Lsp -which_key.register({ - l = { - name = "LSP", - a = { ":Lspsaga range_code_action", "Code Action" }, - d = { ":Lspsaga show_line_diagnostics", "Show Current Line Diagnostics" }, - i = { ":LspInfo", "Info" }, - I = { ":LspInstallInfo", "Installer Info" }, - r = { ":Lspsaga rename", "Rename" }, - h = { ":Lspsaga hover_doc", "Display Information Of Symbol" }, - s = { ":lua vim.lsp.buf.signature_help()", "Signature Help" }, - g = { - name = "GOTO", - D = { ":lua vim.lsp.buf.declaration()", "Go To Declaration" }, - i = { ":lua vim.lsp.buf.implementation()", "Go To Implementation" }, - d = { "::lua vim.lsp.buf.definition()", "Go to Definition" }, - j = { ":Lspsaga diagnostic_jump_next", "Go To Previous Diagnostics" }, - k = { ":Lspsaga diagnostic_jump_prev", "Go To Next Diagnostics" }, - t = { ":lua vim.lsp.buf.type_definition()", "Go To Type Definition" }, - }, - w = { - name = "Workspace", - l = { ":lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", "List Workspace Folder" }, - a = { ":lua vim.lsp.buf.add_workspace_folder()", "Add Workspace Folder" }, - r = { ":lua vim.lsp.buf.remove_workspace_folder()", "Remove Workspace Folder" }, - }, - l = { - name = "List Reference/Diagnostic", - d = { ":lua vim.lsp.diagnostic.set_loclist()", "List Diagnostic" }, - D = { ":Telescope diagnostics", "Show Diagnostics list via Telescope" }, - r = { ":lua vim.lsp.buf.references()", "Show References" }, - }, - }, -}, { prefix = "" }) - --- Dap -which_key.register({ - d = { - name = "Debugging", - c = { ':lua require("dap").continue()', "Continue" }, - t = { ':lua require("dap").terminate()', "Terminate" }, - l = { ':lua require("dap").run_last()', "Run Last Debugging Config" }, - d = { ':lua require("dap").repl.open()', "Open Debug Console" }, - b = { - name = "Breakpoint", - t = { ':lua require("dap").toggle_breakpoint()', "Toggle" }, - c = { ':lua require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))', "Set conditional" }, - l = { - ':lua require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: "))', - "With Log Point Message", - }, - }, - s = { - name = "Step", - o = { ':lua require("dap").step_over()', "Step Over" }, - O = { ':lua require("dap").step_into()', "Step Into" }, - i = { ':lua require("dap").step_out()', "Step Out" }, - b = { ':lua require("dap").step_back()', "Step Back" }, - c = { ':lua require("dap").run_to_cursor()', "Run To Cursor" }, - }, - u = { ':lua require("dapui").toggle()', "Toggle UI" }, - }, -}, { prefix = "" }) - --- Comment -which_key.register({ - ["/"] = { "kommentary_line_default", "Comment" }, -}, { prefix = "", noremap = false }) -which_key.register({ - ["/"] = { "kommentary_visual_default", "Comment" }, -}, { prefix = "", noremap = false, mode = "v" }) - --- Adding user mappings -if extra_which_keys then - for _, v in ipairs(extra_which_keys) do - which_key.register(v[1], v[2]) - end -end diff --git a/general/nvim/lua/settings.lua b/general/nvim/lua/settings.lua deleted file mode 100755 index 81ec433..0000000 --- a/general/nvim/lua/settings.lua +++ /dev/null @@ -1,195 +0,0 @@ --- Defining alias for vim.opt. -local opt = vim.opt -local exec = vim.api.nvim_exec - --- Defining alias for some functions. -local is_plugin_installed = require("utils").is_plugin_installed -local autocmd = vim.api.nvim_create_autocmd - --- Using new filetype detection system(written in lua). -vim.g.do_filetype_lua = 1 -vim.g.did_load_filetypes = 0 - --- Decrease time of completion menu. -opt.updatetime = 300 - --- Set cursorhold updatetime(: . -vim.g.cursorhold_updatetime = 100 - --- Set file encoding to utf-8. -opt.fileencoding = "utf-8" - --- Line number settings. -opt.number = true -opt.numberwidth = 2 -opt.relativenumber = true - --- Set signcolumn width to 3. -vim.opt.signcolumn = "yes:3" - --- Remove showing mode. -opt.showmode = false - --- Adding true color to NeoVim. -opt.termguicolors = true - --- Enable clipboard. -opt.clipboard = "unnamedplus" - --- Enable mouse in all modes. -opt.mouse = "a" - --- Setting colorcolumn. This is set because of --- this (https://github.com/lukas-reineke/indent-blankline.nvim/issues/59) --- indent-blankline bug. -opt.colorcolumn = "9999" - --- With set hidden you’re telling Neovim that you can --- have unsaved worked that’s not displayed on your screen. -opt.hidden = true - --- Set indentation stuf. -opt.tabstop = 8 -opt.shiftwidth = 4 -opt.smartindent = true -opt.smartcase = true -opt.expandtab = true - --- Setting completion menu height. -opt.pumheight = 20 -- pop up menu height. - --- Set searching stuf. -opt.hlsearch = true -opt.incsearch = true -opt.ignorecase = true - --- Set terminal bidirectual. --- For writing in right to left languages like arabic, persian and hebrew. -opt.termbidi = true - --- Without this option some times backspace did not work correctly. -opt.backspace = "indent,eol,start" - --- For opening splits on right or bottom. -opt.splitbelow = true -opt.splitright = true - --- Setting time that Neovim wait after each keystroke. -opt.timeoutlen = 200 - --- Setting up autocomplete menu. -opt.completeopt = { "menuone", "noselect" } - --- Seting fold settings. -opt.foldmethod = "expr" -opt.foldexpr = "nvim_treesitter#foldexpr()" -opt.foldlevel = 99 - --- Set line number for help files. -local help_config = vim.api.nvim_create_augroup("help_config", { clear = true }) -autocmd("FileType", { - pattern = "help", - callback = function() - opt.number = true - end, - group = help_config, -}) - --- Trim Whitespace -autocmd("BufWritePre", { - pattern = "*", - callback = function() - exec( - [[ - function! NoWhitespace() - let l:save = winsaveview() - keeppatterns %s/\s\+$//e - call winrestview(l:save) - endfunction - call NoWhitespace() - ]], - true - ) - end, -}) - --- Auto open nvim-tree when writing (nvim .) in command line --- and auto open Alpha when nothing given as argument. -if vim.fn.index(vim.fn.argv(), ".") >= 0 then - autocmd("VimEnter", { - pattern = "*", - callback = function() - if is_plugin_installed("nvim-tree.lua") == true then - vim.cmd("NvimTreeOpen") - end - end, - }) - vim.cmd("bd1") -elseif vim.fn.len(vim.fn.argv()) == 0 then - autocmd("VimEnter", { - pattern = "*", - callback = function() - if is_plugin_installed("alpha-nvim") == true then - vim.cmd("Alpha") - vim.cmd("bd 1") - end - end, - }) -end - --- Defining CodeArtUpdate commands. -vim.api.nvim_create_user_command("CodeArtUpdate", function() - require("utils").update() -end, { nargs = 0 }) - --- NOTE: Set your shell to powershell because of :CodeArtUpdate command and --- other problems with cmd in Windows. -vim.cmd([[ -if has("win32") - set shell=powershell " Set shell to powershell. - let &shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;" - let &shellredir = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode" - let &shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode" - set shellquote= shellxquote= -endif -]]) - --- Creating CodeArtTransparent command. -vim.api.nvim_create_user_command("CodeArtTransparent", "lua make_codeart_transparent()", { nargs = 0 }) - --- Add/Diasable cursorline and statusline in some buffers and filetypes. -statusline_hide = { - "alpha", - "TelescopePrompt", - "TelescopeResults", - "packer", - "lspinfo", - "lsp-installer", -} - -function hide_statusline(types) - for _, type in pairs(types) do - if vim.bo.filetype == type or vim.bo.buftype == type then - opt.laststatus = 0 - opt.ruler = false - opt.cursorline = false - break - else - opt.laststatus = 3 - opt.ruler = true - opt.cursorline = true - end - end -end - --- Remove signcolumn and cursorline in toggleterm. -autocmd({ "BufEnter", "BufRead", "BufWinEnter", "FileType", "WinEnter" }, { - pattern = "*", - callback = function() - hide_statusline(statusline_hide) - if vim.bo.filetype == "toggleterm" then - opt.signcolumn = "no" - opt.cursorline = false - end - end, -}) diff --git a/general/nvim/lua/theme.lua b/general/nvim/lua/theme.lua deleted file mode 100755 index 0b0b3d0..0000000 --- a/general/nvim/lua/theme.lua +++ /dev/null @@ -1,137 +0,0 @@ --- Hide ~ from end of lines. -vim.opt.fillchars = { eob = " " } - -local highlight = require("utils").highlight - --- -- Highlightign line number for lsp diagnostics sings based on colorscheme -vim.api.nvim_create_autocmd({ "ColorScheme", "VimEnter" }, { - pattern = "*", - - callback = function() - local fn = vim.fn - - -- Getting diagnostic signs color. - local error_bcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignError")), "fg") - local info_bcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignInfo")), "fg") - local warn_bcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignWarn")), "fg") - local hint_bcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignHint")), "fg") - - local error_fcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignError")), "bg") - local info_fcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignInfo")), "bg") - local warn_fcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignWarn")), "bg") - local hint_fcolor = fn.synIDattr(fn.synIDtrans(fn.hlID("DiagnosticSignHint")), "bg") - - -- Applying thoes colors to diagnostic line number. - highlight("DiagnosticLineNrError", { bg = error_bcolor, fg = error_fcolor }, { bold = true }) - highlight("DiagnosticLineNrWarn", { bg = warn_bcolor, fg = warn_fcolor }, { bold = true }) - highlight("DiagnosticLineNrInfo", { bg = info_bcolor, fg = info_fcolor }, { bold = true }) - highlight("DiagnosticLineNrHint", { bg = hint_bcolor, fg = hint_fcolor }, { bold = true }) - - -- Applying diagnostic line number and remove diagnostic signs - fn.sign_define("DiagnosticSignError", { text = "", texthl = "", numhl = "DiagnosticLineNrError" }) - fn.sign_define("DiagnosticSignWarn", { text = "", texthl = "", numhl = "DiagnosticLineNrWarn" }) - fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "", numhl = "DiagnosticLineNrInfo" }) - fn.sign_define("DiagnosticSignHint", { text = "", texthl = "", numhl = "DiagnosticLineNrHint" }) - end, -}) - -vim.g.tokyonight_style = "night" -- styles: storm, night and day. -vim.g.enfocado_style = "nature" -- styles: nature and neon. - --- In enfocado colorscheme you can enable highlight some plugins. --- You can set enabled plugins like this(This is CodeArt supported plugins). -vim.g.enfocado_plugins = { - "cmp", - "alpha", - "gitsigns", - "lsp", - "lsp-installer", - "matchup", - "packer", - "scrollview", - "telescope", - "todo-comments", - "tree", - "treesitter", - "which-key", -} - --- Removing background and/or foreground from some highlight groups -function _G.make_codeart_transparent() - highlight("Normal", { bg = "NONE", fg = "NONE" }) - highlight("NormalNc", { bg = "NONE", fg = "NONE" }) - highlight("LineNr", { bg = "NONE", fg = "NONE" }) - highlight("CursorLineNr", { bg = "NONE", fg = "NONE" }) - highlight("SignColumn", { bg = "NONE", fg = "NONE" }) - highlight("EndOfBuffer", { bg = "NONE", fg = "NONE" }) - highlight("NormalFloat", { bg = "NONE" }) - highlight("Float", { bg = "NONE" }) - - highlight("AlphaCenter", { bg = "NONE", fg = "NONE" }) - highlight("AlphaFooter", { bg = "NONE", fg = "NONE" }) - - highlight("NvimTreeNormal", { bg = "NONE", fg = "NONE" }) - highlight("NvimTreeNormalNc", { bg = "NONE", fg = "NONE" }) - highlight("NvimTreeEndOfBuffer", { bg = "NONE", fg = "NONE" }) - highlight("NvimTreeFolderIcon", { bg = "NONE", fg = "NONE" }) - highlight("NvimTreeOpenedFolderName", { bg = "NONE", fg = "NONE" }) - - highlight("BufferLineFill", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineDiagnostics", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineTab", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineTabSelected", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineTabClose", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineDuplicate", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineDuplicateSelected", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineDuplicateVisible", { bg = "NONE", fg = "NONE" }) - - highlight("BufferLineBackground", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineCloseButton", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineCloseButtonSelected", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineCloseButtonVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineBufferVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineSeperator", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineSeperatorVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineGroupSeperator", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineSeparator", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineBufferSelected", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineDiagnostic", { bg = "NONE", fg = "NONE" }) - - highlight("BufferLinePick", { bg = "NONE" }) - highlight("BufferLinePickSelected", { bg = "NONE" }) - highlight("BufferLineSeparatorSelected", { bg = "NONE" }) - highlight("BufferLineIndicatorSelected", { bg = "NONE" }) - highlight("BufferLineDevIconLuaSelected", { bg = "NONE" }) - highlight("BufferLineDevIconDefaultInactive", { bg = "NONE" }) - - highlight("BufferLineError", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineErrorDiagnostic", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineErrorVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineErrorDiagnosticVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineErrorSelected", { bg = "NONE" }) - highlight("BufferLineErrorDiagnosticSelected", { bg = "NONE" }) - highlight("BufferLineErrorDiagnosticSelected", { bg = "NONE" }) - - highlight("BufferLineWarning", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineWarningVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineWarningDiagnosticVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineWarningDiagnostic", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineWarningSelected", { bg = "NONE" }) - highlight("BufferLineWarningDiagnosticSelected", { bg = "NONE" }) - highlight("BufferLineWarningDiagnosticSelected", { bg = "NONE" }) - - highlight("BufferLineInfo", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineInfoVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineInfoDiagnosticVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineInfoDiagnostic", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineInfoSelected", { bg = "NONE" }) - highlight("BufferLineInfoDiagnosticSelected", { bg = "NONE" }) - highlight("BufferLineInfoDiagnosticSelected", { bg = "NONE" }) - - highlight("BufferLineModifiedVisible", { bg = "NONE", fg = "NONE" }) - highlight("BufferLineModified", { bg = "NONE" }) - highlight("BufferLineModifiedSelected", { bg = "NONE" }) - - highlight("WhichKeyFloat", { bg = "NONE" }) - highlight("WhichKey", { bg = "NONE" }) -end diff --git a/general/nvim/lua/user_settings.lua b/general/nvim/lua/user_settings.lua deleted file mode 100755 index 1af0bd5..0000000 --- a/general/nvim/lua/user_settings.lua +++ /dev/null @@ -1,236 +0,0 @@ -local map = require("utils").map -local which_key = require("utils").wk_add - --- WARN: Do not touch this table. -extra_which_keys = {} - -disable_plugins = { - -- NOTE: These two plugins are for better performance - -- and fixing one of neovim bugs. - impatient = false, - fix_cursor_hold = false, - - -- NOTE: Many plugins use this plugin as a dependency. - -- I suggest to not remove this plugins. - plenary = false, - - -- NOTE: These plugins are colorscheme. By default only - -- enfocado is enabled. you can enable other by changing - -- true to false. - tokyonight = false, - nightfly = false, - moonfly = false, - nord = false, - onedark = false, - nvim_enfocado = false, - catppuccin = false, - - -- NOTE: These plugins are for debugging. You can install - -- Some debug servers with dap_install but the list of those - -- Are realy small. You can install debugger by your self and - -- then configure it by your self so you can use nvim_dap and nvim_dap_ui - -- without dap_install - nvim_dap = true, - dap_install = true, - nvim_dap_ui = true, - - -- NOTE: these plugins are telescope and telescope extensions. fzf is for - -- better searching experince and you can fuzzy find directories with - -- telescope_find_directories - telescope_fzf_native = false, - telescope_find_directories = false, - telescope = false, - - -- NOTE: scrollview is builtin scrollbar for CodeArt and - -- And neoscroll is for scroll animation. - scrollview = false, - neoscroll = false, - - -- NOTE: nvim-cmp and luasnip are for code completion. - nvim_cmp = false, - luasnip = false, - friendly_snippets = false, - cmp_buffer = false, - cmp_path = false, - cmp_nvim_lsp = false, - cmp_luasnip = false, - cmp_nvim_lua = false, - - nvim_web_devicons = false, - lualine = false, - nvim_bufferline = false, - indent_blankline = false, - - better_escape = true, -- For exiting from insert mode with jj and jk - - truezen = false, - nvim_tree = false, - treesitter = false, - nvim_colorizer = false, - alpha = false, - nvim_lspconfig = false, - lsp_installer = false, - null_ls = false, - lspsaga = false, - symbols_outline = false, - lsp_signature = false, - toggleterm = false, - fugitive = false, - gitsigns = false, - autopairs = false, - nvim_ts_autotag = false, - todo_comments = false, - which_key = false, - mkdir = false, - kommentary = false, - ts_context_commentstring = false, - vim_matchup = false, - vim_resize = false, -} - -additional_plugins = { - -- You can put your additional plugins here. - -- Syntax is like normal packer.nvim Syntax. - -- If you need to set some settings for your plugins - -- you must put configs in config = function() like below examples - - -- { "famiu/feline.nvim", branch = "develop" }, - - -- "mhartington/formatter.nvim", - - -- { "crispgm/nvim-go", ft = "go" }, - - -- { - -- "iamcco/markdown-preview.nvim", - -- ft = "markdown", - -- run = ":call mkdp#util#install()", - -- config = function() - -- vim.g.mkdp_auto_close = 0 - -- end, - -- }, - - -- { - -- "andweeb/presence.nvim", - -- config = function() - -- require("presence"):setup({ - -- log_level = "info", -- Log messages (one of the following: "debug", "info", "warn", "error") - -- debounce_timeout = 5, - -- blacklist = {}, -- file name, path, or workspace matches - -- }) - -- end, - -- }, -} - --- NOTE: here --- Name of functions is exactly like config file in nvim/lua/plugins directory --- the only diffrence is if in file name you have hifen(-) here you must --- replace it with underline. -local config = { - -- null-ls configuration - null_ls = function() - -- Formatting and linting - -- https://github.com/jose-elias-alvarez/null-ls.nvim - local status_ok, null_ls = pcall(require, "null-ls") - if not status_ok then - return - end - - -- Check supported formatters - -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting - local formatting = null_ls.builtins.formatting - - -- Check supported linters - -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics - local diagnostics = null_ls.builtins.diagnostics - - null_ls.setup({ - debug = false, - sources = { - -- Settings up some linters and code formatters. - formatting.black, - formatting.stylua, - formatting.rustfmt, - formatting.clang_format, - formatting.prettier, - formatting.taplo, - formatting.shfmt.with({ - command = "shfmt", - args = { - "-i", - "2", - "-ci", - "-bn", - "$FILENAME", - "-w", - }, - }), - diagnostics.zsh, - -- diagnostics.luacheck, - diagnostics.pylint, - }, - -- This function is for format on save. - -- on_attach = function(client) - -- if client.resolved_capabilities.document_formatting then - -- vim.cmd([[ - -- augroup LspFormatting - -- autocmd! * - -- autocmd BufWritePre lua vim.lsp.buf.formatting_sync() - -- augroup END - -- ]]) - -- end - -- end, - }) - end, - treesitter = { - highlight = { - enable = true, - }, - }, - other_configs = function() - vim.cmd("colorscheme catppuccin") - -- Other settings here - -- For examples for disabling line number: - -- vim.opt.number = false - -- vim.opt.relativenumber = false - - vim.cmd("set nowrap") - - -- Or for changing terminal toggle mapping: - -- first argument is mode of mapping. second argument is keymap. - -- third argument is command. and last argument is optional argument like {expr = true}. - -- map("n", "", ":ToggleTerm") - -- map("t", "", ":ToggleTerm") - - map("", "F5", ":UndotreeToggle") - - -- This is example of how to make keymap and add it to - -- which_keys(that pop of window on bottom of NeoVim that help you to find keymaps) - -- This will make new group of keymaps names Something with two commands and they're describtions. - -- with pressing ` + s` you can trigger which keys to show you - -- Something commands. with pressing e it will echo hello on command prompt at the end of NeoVim - -- and with pressing f it will echo Goodbye on command prompt at the end of NeoVim - -- wk_add( - -- { - -- s = { - -- name = "Something", - -- e = { ":echo 'Hello'", "Echo Hello" }, - -- f = { ":echo 'Goodbye'", "Echo Goodbye" }, - -- }, - -- }, - -- { prefix = "", mode = "v" } -- mode = "v" means it only works on visual mode. - -- extra_which_keys - -- ) - - -- user_lualine_style = 1 -- You can choose between predefined 1, 2, 3, 4 and 5 - -- or you can define your custome seperator like this. - -- first item is for component seperator and second item is - -- for section seperator. - -- user_lualine_style = { { left = " ", right = " " }, { left = "", right = "" } } - - -- user_indent_blankline_style = 1 -- You can choose between predefined 1, 2, 3, 4,5 and 6 - -- or you can use your favorite character. - -- user_indent_blankline_style = "" - end, -} - -return config diff --git a/general/nvim/lua/utils.lua b/general/nvim/lua/utils.lua deleted file mode 100755 index daa787c..0000000 --- a/general/nvim/lua/utils.lua +++ /dev/null @@ -1,142 +0,0 @@ -local fn = vim.fn - -local M = {} - --- Finding os name and packer instalation path. -M.plugins_path = fn.stdpath("data") .. "/site/pack/packer" -M.os = vim.loop.os_uname().sysname - --- Check for instalation status of plugin. -function M.is_plugin_installed(plugins_name) - if - fn.empty(fn.glob(M.plugins_path .. "/start/" .. plugins_name)) > 0 - and fn.empty(fn.glob(M.plugins_path .. "/opt/" .. plugins_name)) > 0 - then - return false - else - return true - end -end - --- Functions for make mappings easier. -function M.map(mode, lhs, rhs, opts) - local options = { noremap = true } - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) -end - --- This will add which-key mapping to given maps_list table. -function M.wk_add(mappings, options, maps_list) - table.insert(maps_list, { mappings, options }) -end - --- Function for working easier with nvim_set_hl(). -function M.highlight(highlight_group, colors, opts) - -- Function for getting default options(colors and styles) of highlight group. - local function get_attr(attr) - return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(highlight_group)), attr) - end - - -- Setting previous bg and fg. - local options = { - bg = get_attr("bg"), - fg = get_attr("fg"), - } - - -- Setting some styles if they were in colorscheme for current highlight group. - if get_attr("bold") == "1" then - options.bold = true - end - if get_attr("italic") == "1" then - options.italic = true - end - - if get_attr("undercurl") == "1" then - options.undercurl = true - end - if get_attr("underline") == "1" then - options.underline = true - end - - -- Adding new color if they excist. - for k, v in pairs(colors) do - if colors[k] == "NONE" then - options[k] = nil - else - options[k] = v - end - end - - -- Adding new options if they excist. - if opts then - for k, v in pairs(opts) do - options[k] = v - end - end - - -- Applying colors and options. - vim.api.nvim_set_hl(0, highlight_group, options) -end - -function M.update_neovim() - vim.notify("Updating NeoVim.", vim.log.levels.WARN, { title = "CodeArt" }) - if M.os == "Windows_NT" then - vim.notify("Please check for NeoVim u.", vim.log.levels.WARN, { title = "CodeArt" }) - if vim.fn.has("nvim-0.7.0") == "0" then - vim.notify( - "Please update your NeoVim. You can probably update it with opening powershell session as addministrator and running choco install --force neovim. After that open NeoVim and run :CodeArtUpdate", - vim.log.levels.WARN, - { title = "CodeArt" } - ) - end - elseif M.os == "Linux" then - if vim.fn.system("command -v pacman") ~= "" then - vim.fn.system("sudo pacman -Sy neovim --noconfirm") - elseif vim.fn.system("command -v apt-get") ~= "" then - vim.fn.system("sudo apt update; sudo apt install neovim -y") - elseif vim.fn.system("command -v dnf") ~= "" then - vim.fn.system("sudo dnf update -y; sudo dnf install neovim -y") - elseif vim.fn.system("command -v zypper") ~= "" then - vim.fn.system("sudo zypper ref; sudo zypper -n neovim") - elseif vim.fn.system("command -v emerge") ~= "" then - vim.fn.system("emerge app-editors/neovim") - end - vim.notify("NeoVim Updated.", vim.log.levels.WARN, { title = "CodeArt" }) - else - vim.fn.system("brew install neovim") - vim.notify("NeoVim Updated.", vim.log.levels.WARN, { title = "CodeArt" }) - end -end - -function M.update() - -- M.update_neovim() - - -- Update CodeArt via git pull --ff-only - local Job = require("plenary.job") - local job_status - Job - :new({ - command = "git", - args = { "pull", "--ff-only" }, - cwd = vim.fn.stdpath("config"), - on_exit = function(_, return_val) - if return_val == 0 then - job_status = 0 - else - job_status = 1 - end - end, - }) - :sync() - - -- Show status to user - if job_status == 0 then - vim.api.nvim_notify("CodeArt Updated!", vim.log.levels.WARN, { title = "CodeArt" }) - else - vim.notify("Update failed! Please try pulling manually.", vim.log.levels.ERROR, { title = "CodeArt" }) - end -end - -return M diff --git a/general/nvim/node_modules/.bin/neovim-node-host b/general/nvim/node_modules/.bin/neovim-node-host deleted file mode 120000 index b189863..0000000 --- a/general/nvim/node_modules/.bin/neovim-node-host +++ /dev/null @@ -1 +0,0 @@ -../neovim/bin/cli.js \ No newline at end of file diff --git a/general/nvim/node_modules/.bin/semver b/general/nvim/node_modules/.bin/semver deleted file mode 120000 index 5aaadf4..0000000 --- a/general/nvim/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver.js \ No newline at end of file diff --git a/general/nvim/node_modules/.package-lock.json b/general/nvim/node_modules/.package-lock.json deleted file mode 100644 index af2f928..0000000 --- a/general/nvim/node_modules/.package-lock.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "name": "nvim", - "lockfileVersion": 2, - "requires": true, - "packages": { - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", - "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "node_modules/@msgpack/msgpack": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-2.7.2.tgz", - "integrity": "sha512-rYEi46+gIzufyYUAoHDnRzkWGxajpD9vVXFQ3g1vbjrBm6P7MBmm+s/fqPa46sxa+8FOUdEuRQKaugo5a4JWpw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/async": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", - "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" - }, - "node_modules/color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/colorspace": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", - "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "node_modules/enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" - }, - "node_modules/fecha": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" - }, - "node_modules/fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" - }, - "node_modules/logform": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.0.tgz", - "integrity": "sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw==", - "dependencies": { - "@colors/colors": "1.5.0", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/neovim": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/neovim/-/neovim-4.10.1.tgz", - "integrity": "sha512-H46Jl2bh/LAFJsitv2MiIK3oCxvQnEK9t3efNMUUkKzsTYlLIikVxGWVk/vJnHzvxoHYBIRB/KHwPAOm+9UStg==", - "dependencies": { - "@msgpack/msgpack": "^2.7.1", - "semver": "^7.3.5", - "winston": "3.3.3" - }, - "bin": { - "neovim-node-host": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "dependencies": { - "fn.name": "1.x.x" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-stable-stringify": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz", - "integrity": "sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==", - "engines": { - "node": ">=10" - } - }, - "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "engines": { - "node": "*" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, - "node_modules/triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "node_modules/winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", - "dependencies": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - }, - "engines": { - "node": ">= 6.4.0" - } - }, - "node_modules/winston-transport": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", - "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 6.4.0" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } -} diff --git a/general/nvim/node_modules/@colors/colors/LICENSE b/general/nvim/node_modules/@colors/colors/LICENSE deleted file mode 100644 index 6b86056..0000000 --- a/general/nvim/node_modules/@colors/colors/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -MIT License - -Original Library - - Copyright (c) Marak Squires - -Additional Functionality - - Copyright (c) Sindre Sorhus (sindresorhus.com) - - Copyright (c) DABH (https://github.com/DABH) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/general/nvim/node_modules/@colors/colors/README.md b/general/nvim/node_modules/@colors/colors/README.md deleted file mode 100644 index e2479ce..0000000 --- a/general/nvim/node_modules/@colors/colors/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# @colors/colors ("colors.js") -[![Build Status](https://github.com/DABH/colors.js/actions/workflows/ci.yml/badge.svg)](https://github.com/DABH/colors.js/actions/workflows/ci.yml) -[![version](https://img.shields.io/npm/v/@colors/colors.svg)](https://www.npmjs.org/package/@colors/colors) - -Please check out the [roadmap](ROADMAP.md) for upcoming features and releases. Please open Issues to provide feedback. - -## get color and style in your node.js console - -![Demo](https://raw.githubusercontent.com/DABH/colors.js/master/screenshots/colors.png) - -## Installation - - npm install @colors/colors - -## colors and styles! - -### text colors - - - black - - red - - green - - yellow - - blue - - magenta - - cyan - - white - - gray - - grey - -### bright text colors - - - brightRed - - brightGreen - - brightYellow - - brightBlue - - brightMagenta - - brightCyan - - brightWhite - -### background colors - - - bgBlack - - bgRed - - bgGreen - - bgYellow - - bgBlue - - bgMagenta - - bgCyan - - bgWhite - - bgGray - - bgGrey - -### bright background colors - - - bgBrightRed - - bgBrightGreen - - bgBrightYellow - - bgBrightBlue - - bgBrightMagenta - - bgBrightCyan - - bgBrightWhite - -### styles - - - reset - - bold - - dim - - italic - - underline - - inverse - - hidden - - strikethrough - -### extras - - - rainbow - - zebra - - america - - trap - - random - - -## Usage - -By popular demand, `@colors/colors` now ships with two types of usages! - -The super nifty way - -```js -var colors = require('@colors/colors'); - -console.log('hello'.green); // outputs green text -console.log('i like cake and pies'.underline.red); // outputs red underlined text -console.log('inverse the color'.inverse); // inverses the color -console.log('OMG Rainbows!'.rainbow); // rainbow -console.log('Run the trap'.trap); // Drops the bass - -``` - -or a slightly less nifty way which doesn't extend `String.prototype` - -```js -var colors = require('@colors/colors/safe'); - -console.log(colors.green('hello')); // outputs green text -console.log(colors.red.underline('i like cake and pies')); // outputs red underlined text -console.log(colors.inverse('inverse the color')); // inverses the color -console.log(colors.rainbow('OMG Rainbows!')); // rainbow -console.log(colors.trap('Run the trap')); // Drops the bass - -``` - -I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way. - -If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object. - -## Enabling/Disabling Colors - -The package will auto-detect whether your terminal can use colors and enable/disable accordingly. When colors are disabled, the color functions do nothing. You can override this with a command-line flag: - -```bash -node myapp.js --no-color -node myapp.js --color=false - -node myapp.js --color -node myapp.js --color=true -node myapp.js --color=always - -FORCE_COLOR=1 node myapp.js -``` - -Or in code: - -```javascript -var colors = require('@colors/colors'); -colors.enable(); -colors.disable(); -``` - -## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data) - -```js -var name = 'Beowulf'; -console.log(colors.green('Hello %s'), name); -// outputs -> 'Hello Beowulf' -``` - -## Custom themes - -### Using standard API - -```js - -var colors = require('@colors/colors'); - -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); -``` - -### Using string safe API - -```js -var colors = require('@colors/colors/safe'); - -// set single property -var error = colors.red; -error('this is red'); - -// set theme -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log(colors.error("this is an error")); - -// outputs yellow text -console.log(colors.warn("this is a warning")); - -``` - -### Combining Colors - -```javascript -var colors = require('@colors/colors'); - -colors.setTheme({ - custom: ['red', 'underline'] -}); - -console.log('test'.custom); -``` - -*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.* diff --git a/general/nvim/node_modules/@colors/colors/examples/normal-usage.js b/general/nvim/node_modules/@colors/colors/examples/normal-usage.js deleted file mode 100644 index a4bfe7b..0000000 --- a/general/nvim/node_modules/@colors/colors/examples/normal-usage.js +++ /dev/null @@ -1,83 +0,0 @@ -var colors = require('../lib/index'); - -console.log('First some yellow text'.yellow); - -console.log('Underline that text'.yellow.underline); - -console.log('Make it bold and red'.red.bold); - -console.log(('Double Raindows All Day Long').rainbow); - -console.log('Drop the bass'.trap); - -console.log('DROP THE RAINBOW BASS'.trap.rainbow); - -// styles not widely supported -console.log('Chains are also cool.'.bold.italic.underline.red); - -// styles not widely supported -console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse - + ' styles! '.yellow.bold); -console.log('Zebras are so fun!'.zebra); - -// -// Remark: .strikethrough may not work with Mac OS Terminal App -// -console.log('This is ' + 'not'.strikethrough + ' fun.'); - -console.log('Background color attack!'.black.bgWhite); -console.log('Use random styles on everything!'.random); -console.log('America, Heck Yeah!'.america); - -// eslint-disable-next-line max-len -console.log('Blindingly '.brightCyan + 'bright? '.brightRed + 'Why '.brightYellow + 'not?!'.brightGreen); - -console.log('Setting themes is useful'); - -// -// Custom themes -// -console.log('Generic logging theme as JSON'.green.bold.underline); -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red', -}); - -// outputs red text -console.log('this is an error'.error); - -// outputs yellow text -console.log('this is a warning'.warn); - -// outputs grey text -console.log('this is an input'.input); - -console.log('Generic logging theme as file'.green.bold.underline); - -// Load a theme from file -try { - colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); -} catch (err) { - console.log(err); -} - -// outputs red text -console.log('this is an error'.error); - -// outputs yellow text -console.log('this is a warning'.warn); - -// outputs grey text -console.log('this is an input'.input); - -// console.log("Don't summon".zalgo) - diff --git a/general/nvim/node_modules/@colors/colors/examples/safe-string.js b/general/nvim/node_modules/@colors/colors/examples/safe-string.js deleted file mode 100644 index fc66474..0000000 --- a/general/nvim/node_modules/@colors/colors/examples/safe-string.js +++ /dev/null @@ -1,80 +0,0 @@ -var colors = require('../safe'); - -console.log(colors.yellow('First some yellow text')); - -console.log(colors.yellow.underline('Underline that text')); - -console.log(colors.red.bold('Make it bold and red')); - -console.log(colors.rainbow('Double Raindows All Day Long')); - -console.log(colors.trap('Drop the bass')); - -console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS'))); - -// styles not widely supported -console.log(colors.bold.italic.underline.red('Chains are also cool.')); - -// styles not widely supported -console.log(colors.green('So ') + colors.underline('are') + ' ' - + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); - -console.log(colors.zebra('Zebras are so fun!')); - -console.log('This is ' + colors.strikethrough('not') + ' fun.'); - - -console.log(colors.black.bgWhite('Background color attack!')); -console.log(colors.random('Use random styles on everything!')); -console.log(colors.america('America, Heck Yeah!')); - -// eslint-disable-next-line max-len -console.log(colors.brightCyan('Blindingly ') + colors.brightRed('bright? ') + colors.brightYellow('Why ') + colors.brightGreen('not?!')); - -console.log('Setting themes is useful'); - -// -// Custom themes -// -// console.log('Generic logging theme as JSON'.green.bold.underline); -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'blue', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red', -}); - -// outputs red text -console.log(colors.error('this is an error')); - -// outputs yellow text -console.log(colors.warn('this is a warning')); - -// outputs blue text -console.log(colors.input('this is an input')); - - -// console.log('Generic logging theme as file'.green.bold.underline); - -// Load a theme from file -colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); - -// outputs red text -console.log(colors.error('this is an error')); - -// outputs yellow text -console.log(colors.warn('this is a warning')); - -// outputs grey text -console.log(colors.input('this is an input')); - -// console.log(colors.zalgo("Don't summon him")) - - diff --git a/general/nvim/node_modules/@colors/colors/index.d.ts b/general/nvim/node_modules/@colors/colors/index.d.ts deleted file mode 100644 index df3f2e6..0000000 --- a/general/nvim/node_modules/@colors/colors/index.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -// Type definitions for @colors/colors 1.4+ -// Project: https://github.com/Marak/colors.js -// Definitions by: Bart van der Schoor , Staffan Eketorp -// Definitions: https://github.com/DABH/colors.js - -export interface Color { - (text: string): string; - - strip: Color; - stripColors: Color; - - black: Color; - red: Color; - green: Color; - yellow: Color; - blue: Color; - magenta: Color; - cyan: Color; - white: Color; - gray: Color; - grey: Color; - - bgBlack: Color; - bgRed: Color; - bgGreen: Color; - bgYellow: Color; - bgBlue: Color; - bgMagenta: Color; - bgCyan: Color; - bgWhite: Color; - - reset: Color; - bold: Color; - dim: Color; - italic: Color; - underline: Color; - inverse: Color; - hidden: Color; - strikethrough: Color; - - rainbow: Color; - zebra: Color; - america: Color; - trap: Color; - random: Color; - zalgo: Color; -} - -export function enable(): void; -export function disable(): void; -export function setTheme(theme: any): void; - -export let enabled: boolean; - -export const strip: Color; -export const stripColors: Color; - -export const black: Color; -export const red: Color; -export const green: Color; -export const yellow: Color; -export const blue: Color; -export const magenta: Color; -export const cyan: Color; -export const white: Color; -export const gray: Color; -export const grey: Color; - -export const bgBlack: Color; -export const bgRed: Color; -export const bgGreen: Color; -export const bgYellow: Color; -export const bgBlue: Color; -export const bgMagenta: Color; -export const bgCyan: Color; -export const bgWhite: Color; - -export const reset: Color; -export const bold: Color; -export const dim: Color; -export const italic: Color; -export const underline: Color; -export const inverse: Color; -export const hidden: Color; -export const strikethrough: Color; - -export const rainbow: Color; -export const zebra: Color; -export const america: Color; -export const trap: Color; -export const random: Color; -export const zalgo: Color; - -declare global { - interface String { - strip: string; - stripColors: string; - - black: string; - red: string; - green: string; - yellow: string; - blue: string; - magenta: string; - cyan: string; - white: string; - gray: string; - grey: string; - - bgBlack: string; - bgRed: string; - bgGreen: string; - bgYellow: string; - bgBlue: string; - bgMagenta: string; - bgCyan: string; - bgWhite: string; - - reset: string; - // @ts-ignore - bold: string; - dim: string; - italic: string; - underline: string; - inverse: string; - hidden: string; - strikethrough: string; - - rainbow: string; - zebra: string; - america: string; - trap: string; - random: string; - zalgo: string; - } -} diff --git a/general/nvim/node_modules/@colors/colors/lib/colors.js b/general/nvim/node_modules/@colors/colors/lib/colors.js deleted file mode 100644 index d9fb087..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/colors.js +++ /dev/null @@ -1,211 +0,0 @@ -/* - -The MIT License (MIT) - -Original Library - - Copyright (c) Marak Squires - -Additional functionality - - Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -var colors = {}; -module['exports'] = colors; - -colors.themes = {}; - -var util = require('util'); -var ansiStyles = colors.styles = require('./styles'); -var defineProps = Object.defineProperties; -var newLineRegex = new RegExp(/[\r\n]+/g); - -colors.supportsColor = require('./system/supports-colors').supportsColor; - -if (typeof colors.enabled === 'undefined') { - colors.enabled = colors.supportsColor() !== false; -} - -colors.enable = function() { - colors.enabled = true; -}; - -colors.disable = function() { - colors.enabled = false; -}; - -colors.stripColors = colors.strip = function(str) { - return ('' + str).replace(/\x1B\[\d+m/g, ''); -}; - -// eslint-disable-next-line no-unused-vars -var stylize = colors.stylize = function stylize(str, style) { - if (!colors.enabled) { - return str+''; - } - - var styleMap = ansiStyles[style]; - - // Stylize should work for non-ANSI styles, too - if (!styleMap && style in colors) { - // Style maps like trap operate as functions on strings; - // they don't have properties like open or close. - return colors[style](str); - } - - return styleMap.open + str + styleMap.close; -}; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; -var escapeStringRegexp = function(str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - return str.replace(matchOperatorsRe, '\\$&'); -}; - -function build(_styles) { - var builder = function builder() { - return applyStyle.apply(builder, arguments); - }; - builder._styles = _styles; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - builder.__proto__ = proto; - return builder; -} - -var styles = (function() { - var ret = {}; - ansiStyles.grey = ansiStyles.gray; - Object.keys(ansiStyles).forEach(function(key) { - ansiStyles[key].closeRe = - new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - ret[key] = { - get: function() { - return build(this._styles.concat(key)); - }, - }; - }); - return ret; -})(); - -var proto = defineProps(function colors() {}, styles); - -function applyStyle() { - var args = Array.prototype.slice.call(arguments); - - var str = args.map(function(arg) { - // Use weak equality check so we can colorize null/undefined in safe mode - if (arg != null && arg.constructor === String) { - return arg; - } else { - return util.inspect(arg); - } - }).join(' '); - - if (!colors.enabled || !str) { - return str; - } - - var newLinesPresent = str.indexOf('\n') != -1; - - var nestedStyles = this._styles; - - var i = nestedStyles.length; - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - str = code.open + str.replace(code.closeRe, code.open) + code.close; - if (newLinesPresent) { - str = str.replace(newLineRegex, function(match) { - return code.close + match + code.open; - }); - } - } - - return str; -} - -colors.setTheme = function(theme) { - if (typeof theme === 'string') { - console.log('colors.setTheme now only accepts an object, not a string. ' + - 'If you are trying to set a theme from a file, it is now your (the ' + - 'caller\'s) responsibility to require the file. The old syntax ' + - 'looked like colors.setTheme(__dirname + ' + - '\'/../themes/generic-logging.js\'); The new syntax looks like '+ - 'colors.setTheme(require(__dirname + ' + - '\'/../themes/generic-logging.js\'));'); - return; - } - for (var style in theme) { - (function(style) { - colors[style] = function(str) { - if (typeof theme[style] === 'object') { - var out = str; - for (var i in theme[style]) { - out = colors[theme[style][i]](out); - } - return out; - } - return colors[theme[style]](str); - }; - })(style); - } -}; - -function init() { - var ret = {}; - Object.keys(styles).forEach(function(name) { - ret[name] = { - get: function() { - return build([name]); - }, - }; - }); - return ret; -} - -var sequencer = function sequencer(map, str) { - var exploded = str.split(''); - exploded = exploded.map(map); - return exploded.join(''); -}; - -// custom formatter methods -colors.trap = require('./custom/trap'); -colors.zalgo = require('./custom/zalgo'); - -// maps -colors.maps = {}; -colors.maps.america = require('./maps/america')(colors); -colors.maps.zebra = require('./maps/zebra')(colors); -colors.maps.rainbow = require('./maps/rainbow')(colors); -colors.maps.random = require('./maps/random')(colors); - -for (var map in colors.maps) { - (function(map) { - colors[map] = function(str) { - return sequencer(colors.maps[map], str); - }; - })(map); -} - -defineProps(colors, init()); diff --git a/general/nvim/node_modules/@colors/colors/lib/custom/trap.js b/general/nvim/node_modules/@colors/colors/lib/custom/trap.js deleted file mode 100644 index fbccf88..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/custom/trap.js +++ /dev/null @@ -1,46 +0,0 @@ -module['exports'] = function runTheTrap(text, options) { - var result = ''; - text = text || 'Run the trap, drop the bass'; - text = text.split(''); - var trap = { - a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'], - b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'], - c: ['\u00a9', '\u023b', '\u03fe'], - d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'], - e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc', - '\u0a6c'], - f: ['\u04fa'], - g: ['\u0262'], - h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'], - i: ['\u0f0f'], - j: ['\u0134'], - k: ['\u0138', '\u04a0', '\u04c3', '\u051e'], - l: ['\u0139'], - m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'], - n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'], - o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd', - '\u06dd', '\u0e4f'], - p: ['\u01f7', '\u048e'], - q: ['\u09cd'], - r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'], - s: ['\u00a7', '\u03de', '\u03df', '\u03e8'], - t: ['\u0141', '\u0166', '\u0373'], - u: ['\u01b1', '\u054d'], - v: ['\u05d8'], - w: ['\u0428', '\u0460', '\u047c', '\u0d70'], - x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'], - y: ['\u00a5', '\u04b0', '\u04cb'], - z: ['\u01b5', '\u0240'], - }; - text.forEach(function(c) { - c = c.toLowerCase(); - var chars = trap[c] || [' ']; - var rand = Math.floor(Math.random() * chars.length); - if (typeof trap[c] !== 'undefined') { - result += trap[c][rand]; - } else { - result += c; - } - }); - return result; -}; diff --git a/general/nvim/node_modules/@colors/colors/lib/custom/zalgo.js b/general/nvim/node_modules/@colors/colors/lib/custom/zalgo.js deleted file mode 100644 index 0ef2b01..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/custom/zalgo.js +++ /dev/null @@ -1,110 +0,0 @@ -// please no -module['exports'] = function zalgo(text, options) { - text = text || ' he is here '; - var soul = { - 'up': [ - '̍', '̎', '̄', '̅', - '̿', '̑', '̆', '̐', - '͒', '͗', '͑', '̇', - '̈', '̊', '͂', '̓', - '̈', '͊', '͋', '͌', - '̃', '̂', '̌', '͐', - '̀', '́', '̋', '̏', - '̒', '̓', '̔', '̽', - '̉', 'ͣ', 'ͤ', 'ͥ', - 'ͦ', 'ͧ', 'ͨ', 'ͩ', - 'ͪ', 'ͫ', 'ͬ', 'ͭ', - 'ͮ', 'ͯ', '̾', '͛', - '͆', '̚', - ], - 'down': [ - '̖', '̗', '̘', '̙', - '̜', '̝', '̞', '̟', - '̠', '̤', '̥', '̦', - '̩', '̪', '̫', '̬', - '̭', '̮', '̯', '̰', - '̱', '̲', '̳', '̹', - '̺', '̻', '̼', 'ͅ', - '͇', '͈', '͉', '͍', - '͎', '͓', '͔', '͕', - '͖', '͙', '͚', '̣', - ], - 'mid': [ - '̕', '̛', '̀', '́', - '͘', '̡', '̢', '̧', - '̨', '̴', '̵', '̶', - '͜', '͝', '͞', - '͟', '͠', '͢', '̸', - '̷', '͡', ' ҉', - ], - }; - var all = [].concat(soul.up, soul.down, soul.mid); - - function randomNumber(range) { - var r = Math.floor(Math.random() * range); - return r; - } - - function isChar(character) { - var bool = false; - all.filter(function(i) { - bool = (i === character); - }); - return bool; - } - - - function heComes(text, options) { - var result = ''; - var counts; - var l; - options = options || {}; - options['up'] = - typeof options['up'] !== 'undefined' ? options['up'] : true; - options['mid'] = - typeof options['mid'] !== 'undefined' ? options['mid'] : true; - options['down'] = - typeof options['down'] !== 'undefined' ? options['down'] : true; - options['size'] = - typeof options['size'] !== 'undefined' ? options['size'] : 'maxi'; - text = text.split(''); - for (l in text) { - if (isChar(l)) { - continue; - } - result = result + text[l]; - counts = {'up': 0, 'down': 0, 'mid': 0}; - switch (options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.mid = randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.mid = randomNumber(4) + 1; - counts.down = randomNumber(64) + 3; - break; - default: - counts.up = randomNumber(8) + 1; - counts.mid = randomNumber(6) / 2; - counts.down = randomNumber(8) + 1; - break; - } - - var arr = ['up', 'mid', 'down']; - for (var d in arr) { - var index = arr[d]; - for (var i = 0; i <= counts[index]; i++) { - if (options[index]) { - result = result + soul[index][randomNumber(soul[index].length)]; - } - } - } - } - return result; - } - // don't summon him - return heComes(text, options); -}; - diff --git a/general/nvim/node_modules/@colors/colors/lib/extendStringPrototype.js b/general/nvim/node_modules/@colors/colors/lib/extendStringPrototype.js deleted file mode 100644 index 46fd386..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/extendStringPrototype.js +++ /dev/null @@ -1,110 +0,0 @@ -var colors = require('./colors'); - -module['exports'] = function() { - // - // Extends prototype of native string object to allow for "foo".red syntax - // - var addProperty = function(color, func) { - String.prototype.__defineGetter__(color, func); - }; - - addProperty('strip', function() { - return colors.strip(this); - }); - - addProperty('stripColors', function() { - return colors.strip(this); - }); - - addProperty('trap', function() { - return colors.trap(this); - }); - - addProperty('zalgo', function() { - return colors.zalgo(this); - }); - - addProperty('zebra', function() { - return colors.zebra(this); - }); - - addProperty('rainbow', function() { - return colors.rainbow(this); - }); - - addProperty('random', function() { - return colors.random(this); - }); - - addProperty('america', function() { - return colors.america(this); - }); - - // - // Iterate through all default styles and colors - // - var x = Object.keys(colors.styles); - x.forEach(function(style) { - addProperty(style, function() { - return colors.stylize(this, style); - }); - }); - - function applyTheme(theme) { - // - // Remark: This is a list of methods that exist - // on String that you should not overwrite. - // - var stringPrototypeBlacklist = [ - '__defineGetter__', '__defineSetter__', '__lookupGetter__', - '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty', - 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', - 'valueOf', 'charCodeAt', 'indexOf', 'lastIndexOf', 'length', - 'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice', - 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase', - 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', - ]; - - Object.keys(theme).forEach(function(prop) { - if (stringPrototypeBlacklist.indexOf(prop) !== -1) { - console.log('warn: '.red + ('String.prototype' + prop).magenta + - ' is probably something you don\'t want to override. ' + - 'Ignoring style name'); - } else { - if (typeof(theme[prop]) === 'string') { - colors[prop] = colors[theme[prop]]; - addProperty(prop, function() { - return colors[prop](this); - }); - } else { - var themePropApplicator = function(str) { - var ret = str || this; - for (var t = 0; t < theme[prop].length; t++) { - ret = colors[theme[prop][t]](ret); - } - return ret; - }; - addProperty(prop, themePropApplicator); - colors[prop] = function(str) { - return themePropApplicator(str); - }; - } - } - }); - } - - colors.setTheme = function(theme) { - if (typeof theme === 'string') { - console.log('colors.setTheme now only accepts an object, not a string. ' + - 'If you are trying to set a theme from a file, it is now your (the ' + - 'caller\'s) responsibility to require the file. The old syntax ' + - 'looked like colors.setTheme(__dirname + ' + - '\'/../themes/generic-logging.js\'); The new syntax looks like '+ - 'colors.setTheme(require(__dirname + ' + - '\'/../themes/generic-logging.js\'));'); - return; - } else { - applyTheme(theme); - } - }; -}; diff --git a/general/nvim/node_modules/@colors/colors/lib/index.js b/general/nvim/node_modules/@colors/colors/lib/index.js deleted file mode 100644 index 9df5ab7..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var colors = require('./colors'); -module['exports'] = colors; - -// Remark: By default, colors will add style properties to String.prototype. -// -// If you don't wish to extend String.prototype, you can do this instead and -// native String will not be touched: -// -// var colors = require('colors/safe); -// colors.red("foo") -// -// -require('./extendStringPrototype')(); diff --git a/general/nvim/node_modules/@colors/colors/lib/maps/america.js b/general/nvim/node_modules/@colors/colors/lib/maps/america.js deleted file mode 100644 index dc96903..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/maps/america.js +++ /dev/null @@ -1,10 +0,0 @@ -module['exports'] = function(colors) { - return function(letter, i, exploded) { - if (letter === ' ') return letter; - switch (i%3) { - case 0: return colors.red(letter); - case 1: return colors.white(letter); - case 2: return colors.blue(letter); - } - }; -}; diff --git a/general/nvim/node_modules/@colors/colors/lib/maps/rainbow.js b/general/nvim/node_modules/@colors/colors/lib/maps/rainbow.js deleted file mode 100644 index 2b00ac0..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/maps/rainbow.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = function(colors) { - // RoY G BiV - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; - return function(letter, i, exploded) { - if (letter === ' ') { - return letter; - } else { - return colors[rainbowColors[i++ % rainbowColors.length]](letter); - } - }; -}; - diff --git a/general/nvim/node_modules/@colors/colors/lib/maps/random.js b/general/nvim/node_modules/@colors/colors/lib/maps/random.js deleted file mode 100644 index 3d82a39..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/maps/random.js +++ /dev/null @@ -1,11 +0,0 @@ -module['exports'] = function(colors) { - var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', - 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed', - 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta']; - return function(letter, i, exploded) { - return letter === ' ' ? letter : - colors[ - available[Math.round(Math.random() * (available.length - 2))] - ](letter); - }; -}; diff --git a/general/nvim/node_modules/@colors/colors/lib/maps/zebra.js b/general/nvim/node_modules/@colors/colors/lib/maps/zebra.js deleted file mode 100644 index fa73623..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/maps/zebra.js +++ /dev/null @@ -1,5 +0,0 @@ -module['exports'] = function(colors) { - return function(letter, i, exploded) { - return i % 2 === 0 ? letter : colors.inverse(letter); - }; -}; diff --git a/general/nvim/node_modules/@colors/colors/lib/styles.js b/general/nvim/node_modules/@colors/colors/lib/styles.js deleted file mode 100644 index 011dafd..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/styles.js +++ /dev/null @@ -1,95 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -var styles = {}; -module['exports'] = styles; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - grey: [90, 39], - - brightRed: [91, 39], - brightGreen: [92, 39], - brightYellow: [93, 39], - brightBlue: [94, 39], - brightMagenta: [95, 39], - brightCyan: [96, 39], - brightWhite: [97, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - bgGray: [100, 49], - bgGrey: [100, 49], - - bgBrightRed: [101, 49], - bgBrightGreen: [102, 49], - bgBrightYellow: [103, 49], - bgBrightBlue: [104, 49], - bgBrightMagenta: [105, 49], - bgBrightCyan: [106, 49], - bgBrightWhite: [107, 49], - - // legacy styles for colors pre v1.0.0 - blackBG: [40, 49], - redBG: [41, 49], - greenBG: [42, 49], - yellowBG: [43, 49], - blueBG: [44, 49], - magentaBG: [45, 49], - cyanBG: [46, 49], - whiteBG: [47, 49], - -}; - -Object.keys(codes).forEach(function(key) { - var val = codes[key]; - var style = styles[key] = []; - style.open = '\u001b[' + val[0] + 'm'; - style.close = '\u001b[' + val[1] + 'm'; -}); diff --git a/general/nvim/node_modules/@colors/colors/lib/system/has-flag.js b/general/nvim/node_modules/@colors/colors/lib/system/has-flag.js deleted file mode 100644 index a347dd4..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/system/has-flag.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -'use strict'; - -module.exports = function(flag, argv) { - argv = argv || process.argv; - - var terminatorPos = argv.indexOf('--'); - var prefix = /^-{1,2}/.test(flag) ? '' : '--'; - var pos = argv.indexOf(prefix + flag); - - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; diff --git a/general/nvim/node_modules/@colors/colors/lib/system/supports-colors.js b/general/nvim/node_modules/@colors/colors/lib/system/supports-colors.js deleted file mode 100644 index f1f9c8f..0000000 --- a/general/nvim/node_modules/@colors/colors/lib/system/supports-colors.js +++ /dev/null @@ -1,151 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -'use strict'; - -var os = require('os'); -var hasFlag = require('./has-flag.js'); - -var env = process.env; - -var forceColor = void 0; -if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') - || hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 - || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level: level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3, - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || hasFlag('color=full') - || hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - var min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first - // Windows release that supports 256 colors. Windows 10 build 14931 is the - // first release that supports 16m/TrueColor. - var osRelease = os.release().split('.'); - if (Number(process.versions.node.split('.')[0]) >= 8 - && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) { - return sign in env; - }) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0 - ); - } - - if ('TERM_PROGRAM' in env) { - var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Hyper': - return 3; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - var level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr), -}; diff --git a/general/nvim/node_modules/@colors/colors/package.json b/general/nvim/node_modules/@colors/colors/package.json deleted file mode 100644 index cb87f20..0000000 --- a/general/nvim/node_modules/@colors/colors/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@colors/colors", - "description": "get colors in your node.js console", - "version": "1.5.0", - "author": "DABH", - "contributors": [ - { - "name": "DABH", - "url": "https://github.com/DABH" - } - ], - "homepage": "https://github.com/DABH/colors.js", - "bugs": "https://github.com/DABH/colors.js/issues", - "keywords": [ - "ansi", - "terminal", - "colors" - ], - "repository": { - "type": "git", - "url": "http://github.com/DABH/colors.js.git" - }, - "license": "MIT", - "scripts": { - "lint": "eslint . --fix", - "test": "export FORCE_COLOR=1 && node tests/basic-test.js && node tests/safe-test.js" - }, - "engines": { - "node": ">=0.1.90" - }, - "main": "lib/index.js", - "files": [ - "examples", - "lib", - "LICENSE", - "safe.js", - "themes", - "index.d.ts", - "safe.d.ts" - ], - "devDependencies": { - "eslint": "^5.2.0", - "eslint-config-google": "^0.11.0" - } -} diff --git a/general/nvim/node_modules/@colors/colors/safe.d.ts b/general/nvim/node_modules/@colors/colors/safe.d.ts deleted file mode 100644 index 2bafc27..0000000 --- a/general/nvim/node_modules/@colors/colors/safe.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Type definitions for Colors.js 1.2 -// Project: https://github.com/Marak/colors.js -// Definitions by: Bart van der Schoor , Staffan Eketorp -// Definitions: https://github.com/Marak/colors.js - -export const enabled: boolean; -export function enable(): void; -export function disable(): void; -export function setTheme(theme: any): void; - -export function strip(str: string): string; -export function stripColors(str: string): string; - -export function black(str: string): string; -export function red(str: string): string; -export function green(str: string): string; -export function yellow(str: string): string; -export function blue(str: string): string; -export function magenta(str: string): string; -export function cyan(str: string): string; -export function white(str: string): string; -export function gray(str: string): string; -export function grey(str: string): string; - -export function bgBlack(str: string): string; -export function bgRed(str: string): string; -export function bgGreen(str: string): string; -export function bgYellow(str: string): string; -export function bgBlue(str: string): string; -export function bgMagenta(str: string): string; -export function bgCyan(str: string): string; -export function bgWhite(str: string): string; - -export function reset(str: string): string; -export function bold(str: string): string; -export function dim(str: string): string; -export function italic(str: string): string; -export function underline(str: string): string; -export function inverse(str: string): string; -export function hidden(str: string): string; -export function strikethrough(str: string): string; - -export function rainbow(str: string): string; -export function zebra(str: string): string; -export function america(str: string): string; -export function trap(str: string): string; -export function random(str: string): string; -export function zalgo(str: string): string; diff --git a/general/nvim/node_modules/@colors/colors/safe.js b/general/nvim/node_modules/@colors/colors/safe.js deleted file mode 100644 index a013d54..0000000 --- a/general/nvim/node_modules/@colors/colors/safe.js +++ /dev/null @@ -1,10 +0,0 @@ -// -// Remark: Requiring this file will use the "safe" colors API, -// which will not touch String.prototype. -// -// var colors = require('colors/safe'); -// colors.red("foo") -// -// -var colors = require('./lib/colors'); -module['exports'] = colors; diff --git a/general/nvim/node_modules/@colors/colors/themes/generic-logging.js b/general/nvim/node_modules/@colors/colors/themes/generic-logging.js deleted file mode 100644 index 63adfe4..0000000 --- a/general/nvim/node_modules/@colors/colors/themes/generic-logging.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = { - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red', -}; diff --git a/general/nvim/node_modules/@dabh/diagnostics/CHANGELOG.md b/general/nvim/node_modules/@dabh/diagnostics/CHANGELOG.md deleted file mode 100644 index b04af38..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# CHANGELOG - -### 2.0.2 - -- Bump to kuler 2.0, which removes colornames as dependency, which we - never used. So smaller install size, less dependencies for all. - -### 2.0.1 - -- Use `storag-engine@3.0` which will automatically detect the correct - AsyncStorage implementation. -- The upgrade also fixes a bug where it the `debug` and `diagnostics` values - to be JSON encoded instead of regular plain text. - -### 2.0.0 - -- Documentation improvements. -- Fixed a issue where async adapters were incorrectly detected. -- Correctly inherit colors after applying colors the browser's console. - -### 2.0.0-alpha - -- Complete rewrite of all internals, now comes with separate builds for `browser` - `node` and `react-native` as well as dedicated builds for `production` and - `development` environments. Various utility methods and properties have - been added to the returned logger to make your lives even easier. diff --git a/general/nvim/node_modules/@dabh/diagnostics/LICENSE b/general/nvim/node_modules/@dabh/diagnostics/LICENSE deleted file mode 100644 index 9beaab1..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Arnout Kazemier, Martijn Swaagman, the Contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/general/nvim/node_modules/@dabh/diagnostics/README.md b/general/nvim/node_modules/@dabh/diagnostics/README.md deleted file mode 100644 index 0cd2519..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/README.md +++ /dev/null @@ -1,473 +0,0 @@ -# `diagnostics` - -Diagnostics in the evolution of debug pattern that is used in the Node.js core, -this extremely small but powerful technique can best be compared as feature -flags for loggers. The created debug logger is disabled by default but can be -enabled without changing a line of code, using flags. - -- Allows debugging in multiple JavaScript environments such as Node.js, browsers - and React-Native. -- Separated development and production builds to minimize impact on your - application when bundled. -- Allows for customization of logger, messages, and much more. - -![Output Example](example.png) - -## Installation - -The module is released in the public npm registry and can be installed by -running: - -``` -npm install --save @dabh/diagnostics -``` - -## Usage - -- [Introduction](#introduction) -- [Advanced usage](#advanced-usage) - - [Production and development builds](#production-and-development-builds) - - [WebPack](#webpack) - - [Node.js](#nodejs) -- [API](#api) - - [.enabled](#enabled) - - [.namespace](#namespace) - - [.dev/prod](#devprod) - - [set](#set) - - [modify](#modify) - - [use](#use) -- [Modifiers](#modifiers) - - [namespace](#namespace-1) -- [Adapters](#adapters) - - [process.env](#process-env) - - [hash](#hash) - - [localStorage](#localstorage) - - [AsyncStorage](#asyncstorage) -- [Loggers](#loggers) - -### Introduction - -To create a new logger simply `require` the `@dabh/diagnostics` module and call -the returned function. It accepts 2 arguments: - -1. `namespace` **Required** This is the namespace of your logger so we know if we need to - enable your logger when a debug flag is used. Generally you use the name of - your library or application as first root namespace. For example if you're - building a parser in a library (example) you would set namespace - `example:parser`. -2. `options` An object with additional configuration for the logger. - following keys are recognized: - - `force` Force the logger to be enabled. - - `colors` Colors are enabled by default for the logs, but you can set this - option to `false` to disable it. - -```js -const debug = require('@dabh/diagnostics')('foo:bar:baz'); -const debug = require('@dabh/diagnostics')('foo:bar:baz', { options }); - -debug('this is a log message %s', 'that will only show up when enabled'); -debug('that is pretty neat', { log: 'more', data: 1337 }); -``` - -Unlike `console.log` statements that add and remove during your development -lifecycle you create meaningful log statements that will give you insight in -the library or application that you're developing. - -The created debugger uses different "adapters" to extract the debug flag -out of the JavaScript environment. To learn more about enabling the debug flag -in your specific environment click on one of the enabled adapters below. - -- **browser**: [localStorage](#localstorage), [hash](#hash) -- **node.js**: [environment variables](#processenv) -- **react-native**: [AsyncStorage](#asyncstorage) - -Please note that the returned logger is fully configured out of the box, you -do not need to set any of the adapters/modifiers your self, they are there -for when you want more advanced control over the process. But if you want to -learn more about that, read the next section. - -### Advanced usage - -There are 2 specific usage patterns for `diagnostic`, library developers who -implement it as part of their modules and applications developers who either -use it in their application or are searching for ways to consume the messages. - -With the simple log interface as discussed in the [introduction](#introduction) -section we make it easy for developers to add it as part of their libraries -and applications, and with powerful [API](#api) we allow infinite customization -by allowing custom adapters, loggers and modifiers to ensure that this library -maintains relevant. These methods not only allow introduction of new loggers, -but allow you think outside the box. For example you can maintain a history -of past log messages, and output those when an uncaught exception happens in -your application so you have additional context - -```js -const diagnostics = require('@dabh/diagnostics'); - -let index = 0; -const limit = 200; -const history = new Array(limit); - -// -// Force all `diagnostic` loggers to be enabled. -// -diagnostics.force = process.env.NODE_ENV === 'prod'; -diagnostics.set(function customLogger(meta, message) { - history[index]= { meta, message, now: Date.now() }; - if (index++ === limit) index = 0; - - // - // We're running a development build, so output. - // - if (meta.dev) console.log.apply(console, message); -}); - -process.on('uncaughtException', async function (err) { - await saveErrorToDisk(err, history); - process.exit(1); -}); -``` - -The small snippet above will maintain a 200 limited FIFO (First In First Out) -queue of all debug messages that can be referenced when your application crashes - -#### Production and development builds - -When you `require` the `@dabh/diagnostics` module you will be given a logger that is -optimized for `development` so it can provide the best developer experience -possible. - -The development logger enables all the [adapters](#adapters) for your -JavaScript environment, adds a logger that outputs the messages to `console.log` -and registers our message modifiers so log messages will be prefixed with the -supplied namespace so you know where the log messages originates from. - -The development logger does not have any adapter, modifier and logger enabled -by default. This ensures that your log messages never accidentally show up in -production. However this does not mean that it's not possible to get debug -messages in production. You can `force` the debugger to be enabled, and -supply a [custom logger](#loggers). - -```js -const diagnostics = require('@dabh/diagnostics'); -const debug = debug('foo:bar', { force: true }); - -// -// Or enable _every_ diagnostic instance: -// -diagnostics.force = true; -``` - -##### WebPack - -WebPack has the concept of [mode](https://webpack.js.org/concepts/mode/#usage)'s -which creates different - -```js -module.exports = { - mode: 'development' // 'production' -} -``` - -When you are building your app using the WebPack CLI you can use the `--mode` -flag: - -``` -webpack --mode=production app.js -o /dist/bundle.js -``` - -##### Node.js - -When you are running your app using `Node.js` you should the `NODE_ENV` -environment variable to `production` to ensure that you libraries that you -import are optimized for production. - -``` -NODE_ENV=production node app.js -``` - -### API - -The returned logger exposes some addition properties that can be used used in -your application or library: - -#### .enabled - -The returned logger will have a `.enabled` property assigned to it. This boolean -can be used to check if the logger was enabled: - -```js -const debug = require('@dabh/diagnostics')('foo:bar'); - -if (debug.enabled) { - // - // Do something special - // -} -``` - -This property is exposed as: - -- Property on the logger. -- Property on the meta/options object. - -#### .namespace - -This is the namespace that you originally provided to the function. - -```js -const debug = require('@dabh/diagnostics')('foo:bar'); - -console.log(debug.namespace); // foo:bar -``` - -This property is exposed as: - -- Property on the logger. -- Property on the meta/options object. - -#### .dev/prod - -There are different builds available of `diagnostics`, when you create a -production build of your application using `NODE_ENV=production` you will be -given an optimized, smaller build of `diagnostics` to reduce your bundle size. -The `dev` and `prod` booleans on the returned logger indicate if you have a -production or development version of the logger. - -```js -const debug = require('@dabh/diagnostics')('foo:bar'); - -if (debug.prod) { - // do stuff -} -``` - -This property is exposed as: - -- Property on the logger. -- Property on the meta/options object. - -#### set - -Sets a new logger as default for **all** `diagnostic` instances. The passed -argument should be a function that write the log messages to where ever you -want. It receives 2 arguments: - -1. `meta` An object with all the options that was provided to the original - logger that wants to write the log message as well as properties of the - debugger such as `prod`, `dev`, `namespace`, `enabled`. See [API](#api) for - all exposed properties. -2. `args` An array of the log messages that needs to be written. - -```js -const debug = require('@dabh/diagnostics')('foo:more:namespaces'); - -debug.use(function logger(meta, args) { - console.log(meta); - console.debug(...args); -}); -``` - -This method is exposed as: - -- Method on the logger. -- Method on the meta/options object. -- Method on `diagnostics` module. - -#### modify - -The modify method allows you add a new message modifier to **all** `diagnostic` -instances. The passed argument should be a function that returns the passed -message after modification. The function receives 2 arguments: - -1. `message`, Array, the log message. -2. `options`, Object, the options that were passed into the logger when it was - initially created. - -```js -const debug = require('@dabh/diagnostics')('example:modifiers'); - -debug.modify(function (message, options) { - return messages; -}); -``` - -This method is exposed as: - -- Method on the logger. -- Method on the meta/options object. -- Method on `diagnostics` module. - -See [modifiers](#modifiers) for more information. - -#### use - -Adds a new `adapter` to **all** `diagnostic` instances. The passed argument -should be a function returns a boolean that indicates if the passed in -`namespace` is allowed to write log messages. - -```js -const diagnostics = require('@dabh/diagnostics'); -const debug = diagnostics('foo:bar'); - -debug.use(function (namespace) { - return namespace === 'foo:bar'; -}); -``` - -This method is exposed as: - -- Method on the logger. -- Method on the meta/options object. -- Method on `diagnostics` module. - -See [adapters](#adapters) for more information. - -### Modifiers - -To be as flexible as possible when it comes to transforming messages we've -come up with the concept of `modifiers` which can enhance the debug messages. -This allows you to introduce functionality or details that you find important -for debug messages, and doesn't require us to add additional bloat to the -`diagnostic` core. - -For example, you want the messages to be prefixed with the date-time of when -the log message occured: - -```js -const diagnostics = require('@dabh/diagnostics'); - -diagnostics.modify(function datetime(args, options) { - args.unshift(new Date()); - return args; -}); -``` - -Now all messages will be prefixed with date that is outputted by `new Date()`. -The following modifiers are shipped with `diagnostics` and are enabled in -**development** mode only: - -- [namespace](#namespace) - -#### namespace - -This modifier is enabled for all debug instances and prefixes the messages -with the name of namespace under which it is logged. The namespace is colored -using the `colorspace` module which groups similar namespaces under the same -colorspace. You can have multiple namespaces for the debuggers where each -namespace should be separated by a `:` - -``` -foo -foo:bar -foo:bar:baz -``` - -For console based output the `namespace-ansi` is used. - -### Adapters - -Adapters allows `diagnostics` to pull the `DEBUG` and `DIAGNOSTICS` environment -variables from different sources. Not every JavaScript environment has a -`process.env` that we can leverage. Adapters allows us to have different -adapters for different environments. It means you can write your own custom -adapter if needed as well. - -The `adapter` function should be passed a function as argument, this function -will receive the `namespace` of a logger as argument and it should return a -boolean that indicates if that logger should be enabled or not. - -```js -const debug = require('@dabh/diagnostics')('example:namespace'); - -debug.adapter(require('@dabh/diagnostics/adapters/localstorage')); -``` - -The modifiers are only enabled for `development`. The following adapters are -available are available: - -#### process.env - -This adapter is enabled for `node.js`. - -Uses the `DEBUG` or `DIAGNOSTICS` (both are recognized) environment variables to -pass in debug flag: - -**UNIX/Linux/Mac** -``` -DEBUG=foo* node index.js -``` - -Using environment variables on Windows is a bit different, and also depends on -toolchain you are using: - -**Windows** -``` -set DEBUG=foo* & node index.js -``` - -**Powershell** -``` -$env:DEBUG='foo*';node index.js -``` - -#### hash - -This adapter is enabled for `browsers`. - -This adapter uses the `window.location.hash` of as source for the environment -variables. It assumes that hash is formatted using the same syntax as query -strings: - -```js -http://example.com/foo/bar#debug=foo* -``` - -It triggers on both the `debug=` and `diagnostics=` names. - -#### localStorage - -This adapter is enabled for `browsers`. - -This adapter uses the `localStorage` of the browser to store the debug flags. -You can set the debug flag your self in your application code, but you can -also open browser WebInspector and enable it through the console. - -```js -localStorage.setItem('debug', 'foo*'); -``` - -It triggers on both the `debug` and `diagnostics` storage items. (Please note -that these keys should be entered in lowercase) - -#### AsyncStorage - -This adapter is enabled for `react-native`. - -This adapter uses the `AsyncStorage` API that is exposed by the `react-native` -library to store and read the `debug` or `diagnostics` storage items. - -```js -import { AsyncStorage } from 'react-native'; - -AsyncStorage.setItem('debug', 'foo*'); -``` - -Unlike other adapters, this is the only adapter that is `async` so that means -that we're not able to instantly determine if a created logger should be -enabled or disabled. So when a logger is created in `react-native` we initially -assume it's disabled, any message that send during period will be queued -internally. - -Once we've received the data from the `AsyncStorage` API we will determine -if the logger should be enabled, flush the queued messages if needed and set -all `enabled` properties accordingly on the returned logger. - -### Loggers - -By default it will log all messages to `console.log` in when the logger is -enabled using the debug flag that is set using one of the adapters. - -## License - -[MIT](LICENSE) diff --git a/general/nvim/node_modules/@dabh/diagnostics/adapters/hash.js b/general/nvim/node_modules/@dabh/diagnostics/adapters/hash.js deleted file mode 100644 index a41aae5..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/adapters/hash.js +++ /dev/null @@ -1,11 +0,0 @@ -var adapter = require('./'); - -/** - * Extracts the values from process.env. - * - * @type {Function} - * @public - */ -module.exports = adapter(function hash() { - return /(debug|diagnostics)=([^&]+)/i.exec(window.location.hash)[2]; -}); diff --git a/general/nvim/node_modules/@dabh/diagnostics/adapters/index.js b/general/nvim/node_modules/@dabh/diagnostics/adapters/index.js deleted file mode 100644 index d60aaea..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/adapters/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var enabled = require('enabled'); - -/** - * Creates a new Adapter. - * - * @param {Function} fn Function that returns the value. - * @returns {Function} The adapter logic. - * @public - */ -module.exports = function create(fn) { - return function adapter(namespace) { - try { - return enabled(namespace, fn()); - } catch (e) { /* Any failure means that we found nothing */ } - - return false; - }; -} diff --git a/general/nvim/node_modules/@dabh/diagnostics/adapters/localstorage.js b/general/nvim/node_modules/@dabh/diagnostics/adapters/localstorage.js deleted file mode 100644 index bb88987..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/adapters/localstorage.js +++ /dev/null @@ -1,11 +0,0 @@ -var adapter = require('./'); - -/** - * Extracts the values from process.env. - * - * @type {Function} - * @public - */ -module.exports = adapter(function storage() { - return localStorage.getItem('debug') || localStorage.getItem('diagnostics'); -}); diff --git a/general/nvim/node_modules/@dabh/diagnostics/adapters/process.env.js b/general/nvim/node_modules/@dabh/diagnostics/adapters/process.env.js deleted file mode 100644 index 5ab166a..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/adapters/process.env.js +++ /dev/null @@ -1,11 +0,0 @@ -var adapter = require('./'); - -/** - * Extracts the values from process.env. - * - * @type {Function} - * @public - */ -module.exports = adapter(function processenv() { - return process.env.DEBUG || process.env.DIAGNOSTICS; -}); diff --git a/general/nvim/node_modules/@dabh/diagnostics/browser/development.js b/general/nvim/node_modules/@dabh/diagnostics/browser/development.js deleted file mode 100644 index e36dfaa..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/browser/development.js +++ /dev/null @@ -1,35 +0,0 @@ -var create = require('../diagnostics'); - -/** - * Create a new diagnostics logger. - * - * @param {String} namespace The namespace it should enable. - * @param {Object} options Additional options. - * @returns {Function} The logger. - * @public - */ -var diagnostics = create(function dev(namespace, options) { - options = options || {}; - options.namespace = namespace; - options.prod = false; - options.dev = true; - - if (!dev.enabled(namespace) && !(options.force || dev.force)) { - return dev.nope(options); - } - - return dev.yep(options); -}); - -// -// Configure the logger for the given environment. -// -diagnostics.modify(require('../modifiers/namespace')); -diagnostics.use(require('../adapters/localstorage')); -diagnostics.use(require('../adapters/hash')); -diagnostics.set(require('../logger/console')); - -// -// Expose the diagnostics logger. -// -module.exports = diagnostics; diff --git a/general/nvim/node_modules/@dabh/diagnostics/browser/index.js b/general/nvim/node_modules/@dabh/diagnostics/browser/index.js deleted file mode 100644 index ae0f2f8..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/browser/index.js +++ /dev/null @@ -1,8 +0,0 @@ -// -// Select the correct build version depending on the environment. -// -if (process.env.NODE_ENV === 'production') { - module.exports = require('./production.js'); -} else { - module.exports = require('./development.js'); -} diff --git a/general/nvim/node_modules/@dabh/diagnostics/browser/override.js b/general/nvim/node_modules/@dabh/diagnostics/browser/override.js deleted file mode 100644 index 8f36377..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/browser/override.js +++ /dev/null @@ -1,6 +0,0 @@ -var diagnostics = require('./'); - -// -// No way to override `debug` with `diagnostics` in the browser. -// -module.exports = diagnostics; diff --git a/general/nvim/node_modules/@dabh/diagnostics/browser/production.js b/general/nvim/node_modules/@dabh/diagnostics/browser/production.js deleted file mode 100644 index 1a19ce3..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/browser/production.js +++ /dev/null @@ -1,24 +0,0 @@ -var create = require('../diagnostics'); - -/** - * Create a new diagnostics logger. - * - * @param {String} namespace The namespace it should enable. - * @param {Object} options Additional options. - * @returns {Function} The logger. - * @public - */ -var diagnostics = create(function prod(namespace, options) { - options = options || {}; - options.namespace = namespace; - options.prod = true; - options.dev = false; - - if (!(options.force || prod.force)) return prod.nope(options); - return prod.yep(options); -}); - -// -// Expose the diagnostics logger. -// -module.exports = diagnostics; diff --git a/general/nvim/node_modules/@dabh/diagnostics/diagnostics.js b/general/nvim/node_modules/@dabh/diagnostics/diagnostics.js deleted file mode 100644 index 12dc1f3..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/diagnostics.js +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Contains all configured adapters for the given environment. - * - * @type {Array} - * @public - */ -var adapters = []; - -/** - * Contains all modifier functions. - * - * @typs {Array} - * @public - */ -var modifiers = []; - -/** - * Our default logger. - * - * @public - */ -var logger = function devnull() {}; - -/** - * Register a new adapter that will used to find environments. - * - * @param {Function} adapter A function that will return the possible env. - * @returns {Boolean} Indication of a successful add. - * @public - */ -function use(adapter) { - if (~adapters.indexOf(adapter)) return false; - - adapters.push(adapter); - return true; -} - -/** - * Assign a new log method. - * - * @param {Function} custom The log method. - * @public - */ -function set(custom) { - logger = custom; -} - -/** - * Check if the namespace is allowed by any of our adapters. - * - * @param {String} namespace The namespace that needs to be enabled - * @returns {Boolean|Promise} Indication if the namespace is enabled by our adapters. - * @public - */ -function enabled(namespace) { - var async = []; - - for (var i = 0; i < adapters.length; i++) { - if (adapters[i].async) { - async.push(adapters[i]); - continue; - } - - if (adapters[i](namespace)) return true; - } - - if (!async.length) return false; - - // - // Now that we know that we Async functions, we know we run in an ES6 - // environment and can use all the API's that they offer, in this case - // we want to return a Promise so that we can `await` in React-Native - // for an async adapter. - // - return new Promise(function pinky(resolve) { - Promise.all( - async.map(function prebind(fn) { - return fn(namespace); - }) - ).then(function resolved(values) { - resolve(values.some(Boolean)); - }); - }); -} - -/** - * Add a new message modifier to the debugger. - * - * @param {Function} fn Modification function. - * @returns {Boolean} Indication of a successful add. - * @public - */ -function modify(fn) { - if (~modifiers.indexOf(fn)) return false; - - modifiers.push(fn); - return true; -} - -/** - * Write data to the supplied logger. - * - * @param {Object} meta Meta information about the log. - * @param {Array} args Arguments for console.log. - * @public - */ -function write() { - logger.apply(logger, arguments); -} - -/** - * Process the message with the modifiers. - * - * @param {Mixed} message The message to be transformed by modifers. - * @returns {String} Transformed message. - * @public - */ -function process(message) { - for (var i = 0; i < modifiers.length; i++) { - message = modifiers[i].apply(modifiers[i], arguments); - } - - return message; -} - -/** - * Introduce options to the logger function. - * - * @param {Function} fn Calback function. - * @param {Object} options Properties to introduce on fn. - * @returns {Function} The passed function - * @public - */ -function introduce(fn, options) { - var has = Object.prototype.hasOwnProperty; - - for (var key in options) { - if (has.call(options, key)) { - fn[key] = options[key]; - } - } - - return fn; -} - -/** - * Nope, we're not allowed to write messages. - * - * @returns {Boolean} false - * @public - */ -function nope(options) { - options.enabled = false; - options.modify = modify; - options.set = set; - options.use = use; - - return introduce(function diagnopes() { - return false; - }, options); -} - -/** - * Yep, we're allowed to write debug messages. - * - * @param {Object} options The options for the process. - * @returns {Function} The function that does the logging. - * @public - */ -function yep(options) { - /** - * The function that receives the actual debug information. - * - * @returns {Boolean} indication that we're logging. - * @public - */ - function diagnostics() { - var args = Array.prototype.slice.call(arguments, 0); - - write.call(write, options, process(args, options)); - return true; - } - - options.enabled = true; - options.modify = modify; - options.set = set; - options.use = use; - - return introduce(diagnostics, options); -} - -/** - * Simple helper function to introduce various of helper methods to our given - * diagnostics function. - * - * @param {Function} diagnostics The diagnostics function. - * @returns {Function} diagnostics - * @public - */ -module.exports = function create(diagnostics) { - diagnostics.introduce = introduce; - diagnostics.enabled = enabled; - diagnostics.process = process; - diagnostics.modify = modify; - diagnostics.write = write; - diagnostics.nope = nope; - diagnostics.yep = yep; - diagnostics.set = set; - diagnostics.use = use; - - return diagnostics; -} diff --git a/general/nvim/node_modules/@dabh/diagnostics/logger/console.js b/general/nvim/node_modules/@dabh/diagnostics/logger/console.js deleted file mode 100644 index 7423eff..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/logger/console.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * An idiot proof logger to be used as default. We've wrapped it in a try/catch - * statement to ensure the environments without the `console` API do not crash - * as well as an additional fix for ancient browsers like IE8 where the - * `console.log` API doesn't have an `apply`, so we need to use the Function's - * apply functionality to apply the arguments. - * - * @param {Object} meta Options of the logger. - * @param {Array} messages The actuall message that needs to be logged. - * @public - */ -module.exports = function (meta, messages) { - // - // So yea. IE8 doesn't have an apply so we need a work around to puke the - // arguments in place. - // - try { Function.prototype.apply.call(console.log, console, messages); } - catch (e) {} -} diff --git a/general/nvim/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js b/general/nvim/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js deleted file mode 100644 index e3d1ec6..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js +++ /dev/null @@ -1,20 +0,0 @@ -var colorspace = require('colorspace'); -var kuler = require('kuler'); - -/** - * Prefix the messages with a colored namespace. - * - * @param {Array} args The messages array that is getting written. - * @param {Object} options Options for diagnostics. - * @returns {Array} Altered messages array. - * @public - */ -module.exports = function ansiModifier(args, options) { - var namespace = options.namespace; - var ansi = options.colors !== false - ? kuler(namespace +':', colorspace(namespace)) - : namespace +':'; - - args[0] = ansi +' '+ args[0]; - return args; -}; diff --git a/general/nvim/node_modules/@dabh/diagnostics/modifiers/namespace.js b/general/nvim/node_modules/@dabh/diagnostics/modifiers/namespace.js deleted file mode 100644 index ac19077..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/modifiers/namespace.js +++ /dev/null @@ -1,32 +0,0 @@ -var colorspace = require('colorspace'); - -/** - * Prefix the messages with a colored namespace. - * - * @param {Array} messages The messages array that is getting written. - * @param {Object} options Options for diagnostics. - * @returns {Array} Altered messages array. - * @public - */ -module.exports = function colorNamespace(args, options) { - var namespace = options.namespace; - - if (options.colors === false) { - args[0] = namespace +': '+ args[0]; - return args; - } - - var color = colorspace(namespace); - - // - // The console API supports a special %c formatter in browsers. This is used - // to style console messages with any CSS styling, in our case we want to - // use colorize the namespace for clarity. As these are formatters, and - // we need to inject our CSS string as second messages argument so it - // gets picked up correctly. - // - args[0] = '%c'+ namespace +':%c '+ args[0]; - args.splice(1, 0, 'color:'+ color, 'color:inherit'); - - return args; -}; diff --git a/general/nvim/node_modules/@dabh/diagnostics/node/development.js b/general/nvim/node_modules/@dabh/diagnostics/node/development.js deleted file mode 100644 index 51dc51b..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/node/development.js +++ /dev/null @@ -1,36 +0,0 @@ -var create = require('../diagnostics'); -var tty = require('tty').isatty(1); - -/** - * Create a new diagnostics logger. - * - * @param {String} namespace The namespace it should enable. - * @param {Object} options Additional options. - * @returns {Function} The logger. - * @public - */ -var diagnostics = create(function dev(namespace, options) { - options = options || {}; - options.colors = 'colors' in options ? options.colors : tty; - options.namespace = namespace; - options.prod = false; - options.dev = true; - - if (!dev.enabled(namespace) && !(options.force || dev.force)) { - return dev.nope(options); - } - - return dev.yep(options); -}); - -// -// Configure the logger for the given environment. -// -diagnostics.modify(require('../modifiers/namespace-ansi')); -diagnostics.use(require('../adapters/process.env')); -diagnostics.set(require('../logger/console')); - -// -// Expose the diagnostics logger. -// -module.exports = diagnostics; diff --git a/general/nvim/node_modules/@dabh/diagnostics/node/index.js b/general/nvim/node_modules/@dabh/diagnostics/node/index.js deleted file mode 100644 index ae0f2f8..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/node/index.js +++ /dev/null @@ -1,8 +0,0 @@ -// -// Select the correct build version depending on the environment. -// -if (process.env.NODE_ENV === 'production') { - module.exports = require('./production.js'); -} else { - module.exports = require('./development.js'); -} diff --git a/general/nvim/node_modules/@dabh/diagnostics/node/override.js b/general/nvim/node_modules/@dabh/diagnostics/node/override.js deleted file mode 100644 index 936e28b..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/node/override.js +++ /dev/null @@ -1,21 +0,0 @@ -const diagnostics = require('./'); - -// -// Override the existing `debug` call so it will use `diagnostics` instead -// of the `debug` module. -// -try { - var key = require.resolve('debug'); - - require.cache[key] = { - exports: diagnostics, - filename: key, - loaded: true, - id: key - }; -} catch (e) { /* We don't really care if it fails */ } - -// -// Export the default import as exports again. -// -module.exports = diagnostics; diff --git a/general/nvim/node_modules/@dabh/diagnostics/node/production.js b/general/nvim/node_modules/@dabh/diagnostics/node/production.js deleted file mode 100644 index 1a19ce3..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/node/production.js +++ /dev/null @@ -1,24 +0,0 @@ -var create = require('../diagnostics'); - -/** - * Create a new diagnostics logger. - * - * @param {String} namespace The namespace it should enable. - * @param {Object} options Additional options. - * @returns {Function} The logger. - * @public - */ -var diagnostics = create(function prod(namespace, options) { - options = options || {}; - options.namespace = namespace; - options.prod = true; - options.dev = false; - - if (!(options.force || prod.force)) return prod.nope(options); - return prod.yep(options); -}); - -// -// Expose the diagnostics logger. -// -module.exports = diagnostics; diff --git a/general/nvim/node_modules/@dabh/diagnostics/package.json b/general/nvim/node_modules/@dabh/diagnostics/package.json deleted file mode 100644 index 7e1efd9..0000000 --- a/general/nvim/node_modules/@dabh/diagnostics/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "@dabh/diagnostics", - "version": "2.0.3", - "description": "Tools for debugging your node.js modules and event loop", - "main": "./node", - "browser": "./browser", - "scripts": { - "test:basic": "mocha --require test/mock.js test/*.test.js", - "test:node": "mocha --require test/mock test/node.js", - "test:browser": "mocha --require test/mock test/browser.js", - "test:runner": "npm run test:basic && npm run test:node && npm run test:browser", - "webpack:node:prod": "webpack --mode=production node/index.js -o /dev/null --json | webpack-bundle-size-analyzer", - "webpack:node:dev": "webpack --mode=development node/index.js -o /dev/null --json | webpack-bundle-size-analyzer", - "webpack:browser:prod": "webpack --mode=production browser/index.js -o /dev/null --json | webpack-bundle-size-analyzer", - "webpack:browser:dev": "webpack --mode=development browser/index.js -o /dev/null --json | webpack-bundle-size-analyzer", - "test": "nyc --reporter=text --reporter=lcov npm run test:runner" - }, - "repository": { - "type": "git", - "url": "git://github.com/3rd-Eden/diagnostics.git" - }, - "keywords": [ - "debug", - "debugger", - "debugging", - "diagnostic", - "diagnostics", - "event", - "loop", - "metrics", - "stats" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "bugs": { - "url": "https://github.com/3rd-Eden/diagnostics/issues" - }, - "homepage": "https://github.com/3rd-Eden/diagnostics", - "devDependencies": { - "assume": "2.3.x", - "asyncstorageapi": "^1.0.2", - "mocha": "9.2.x", - "nyc": "^15.1.0", - "objstorage": "^1.0.0", - "pre-commit": "1.2.x", - "require-poisoning": "^2.0.0", - "webpack": "4.x", - "webpack-bundle-size-analyzer": "^3.0.0", - "webpack-cli": "3.x" - }, - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - }, - "contributors": [ - "Martijn Swaagman (https://github.com/swaagie)", - "Jarrett Cruger (https://github.com/jcrugzz)", - "Sevastos (https://github.com/sevastos)" - ], - "directories": { - "test": "test" - } -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/LICENSE b/general/nvim/node_modules/@msgpack/msgpack/LICENSE deleted file mode 100644 index f0e7f3e..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -Copyright 2019 The MessagePack Community. - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/general/nvim/node_modules/@msgpack/msgpack/README.md b/general/nvim/node_modules/@msgpack/msgpack/README.md deleted file mode 100644 index b856080..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/README.md +++ /dev/null @@ -1,620 +0,0 @@ -# MessagePack for JavaScript/ECMA-262 - -[![npm version](https://img.shields.io/npm/v/@msgpack/msgpack.svg)](https://www.npmjs.com/package/@msgpack/msgpack) ![CI](https://github.com/msgpack/msgpack-javascript/workflows/CI/badge.svg) [![codecov](https://codecov.io/gh/msgpack/msgpack-javascript/branch/master/graphs/badge.svg)](https://codecov.io/gh/msgpack/msgpack-javascript) [![minzip](https://badgen.net/bundlephobia/minzip/@msgpack/msgpack)](https://bundlephobia.com/result?p=@msgpack/msgpack) [![tree-shaking](https://badgen.net/bundlephobia/tree-shaking/@msgpack/msgpack)](https://bundlephobia.com/result?p=@msgpack/msgpack) - -This is a JavaScript/ECMA-262 implementation of **MessagePack**, an efficient binary serilization format: - -https://msgpack.org/ - -This library is a universal JavaScript, meaning it is compatible with all the major browsers and NodeJS. In addition, because it is implemented in [TypeScript](https://www.typescriptlang.org/), type definition files (`d.ts`) are bundled in the distribution. - -*Note that this is the second version of MessagePack for JavaScript. The first version, which was implemented in ES5 and was never released to npmjs.com, is tagged as [classic](https://github.com/msgpack/msgpack-javascript/tree/classic).* - -## Synopsis - -```typescript -import { deepStrictEqual } from "assert"; -import { encode, decode } from "@msgpack/msgpack"; - -const object = { - nil: null, - integer: 1, - float: Math.PI, - string: "Hello, world!", - binary: Uint8Array.from([1, 2, 3]), - array: [10, 20, 30], - map: { foo: "bar" }, - timestampExt: new Date(), -}; - -const encoded: Uint8Array = encode(object); - -deepStrictEqual(decode(encoded), object); -``` - -## Table of Contents - -- [Synopsis](#synopsis) -- [Table of Contents](#table-of-contents) -- [Install](#install) -- [API](#api) - - [`encode(data: unknown, options?: EncodeOptions): Uint8Array`](#encodedata-unknown-options-encodeoptions-uint8array) - - [`EncodeOptions`](#encodeoptions) - - [`decode(buffer: ArrayLike | BufferSource, options?: DecodeOptions): unknown`](#decodebuffer-arraylikenumber--buffersource-options-decodeoptions-unknown) - - [`DecodeOptions`](#decodeoptions) - - [`decodeMulti(buffer: ArrayLike | BufferSource, options?: DecodeOptions): Generator`](#decodemultibuffer-arraylikenumber--buffersource-options-decodeoptions-generatorunknown-void-unknown) - - [`decodeAsync(stream: ReadableStreamLike | BufferSource>, options?: DecodeAsyncOptions): Promise`](#decodeasyncstream-readablestreamlikearraylikenumber--buffersource-options-decodeasyncoptions-promiseunknown) - - [`decodeArrayStream(stream: ReadableStreamLike | BufferSource>, options?: DecodeAsyncOptions): AsyncIterable`](#decodearraystreamstream-readablestreamlikearraylikenumber--buffersource-options-decodeasyncoptions-asynciterableunknown) - - [`decodeMultiStream(stream: ReadableStreamLike | BufferSource>, options?: DecodeAsyncOptions): AsyncIterable`](#decodemultistreamstream-readablestreamlikearraylikenumber--buffersource-options-decodeasyncoptions-asynciterableunknown) - - [Reusing Encoder and Decoder instances](#reusing-encoder-and-decoder-instances) -- [Extension Types](#extension-types) - - [ExtensionCodec context](#extensioncodec-context) - - [Handling BigInt with ExtensionCodec](#handling-bigint-with-extensioncodec) - - [The temporal module as timestamp extensions](#the-temporal-module-as-timestamp-extensions) -- [Decoding a Blob](#decoding-a-blob) -- [MessagePack Specification](#messagepack-specification) - - [MessagePack Mapping Table](#messagepack-mapping-table) -- [Prerequisites](#prerequisites) - - [ECMA-262](#ecma-262) - - [NodeJS](#nodejs) - - [TypeScript Compiler / Type Definitions](#typescript-compiler--type-definitions) -- [Benchmark](#benchmark) -- [Distribution](#distribution) - - [NPM / npmjs.com](#npm--npmjscom) - - [CDN / unpkg.com](#cdn--unpkgcom) -- [Deno Support](#deno-support) -- [Maintenance](#maintenance) - - [Testing](#testing) - - [Continuous Integration](#continuous-integration) - - [Release Engineering](#release-engineering) - - [Updating Dependencies](#updating-dependencies) -- [License](#license) - -## Install - -This library is published to `npmjs.com` as [@msgpack/msgpack](https://www.npmjs.com/package/@msgpack/msgpack). - -```shell -npm install @msgpack/msgpack -``` - -## API - -### `encode(data: unknown, options?: EncodeOptions): Uint8Array` - -It encodes `data` into a single MessagePack-encoded object, and returns a byte array as `Uint8Array`, throwing errors if `data` is, or includes, a non-serializable object such as a `function` or a `symbol`. - -for example: - -```typescript -import { encode } from "@msgpack/msgpack"; - -const encoded: Uint8Array = encode({ foo: "bar" }); -console.log(encoded); -``` - -If you'd like to convert an `uint8array` to a NodeJS `Buffer`, use `Buffer.from(arrayBuffer, offset, length)` in order not to copy the underlying `ArrayBuffer`, while `Buffer.from(uint8array)` copies it: - -```typescript -import { encode } from "@msgpack/msgpack"; - -const encoded: Uint8Array = encode({ foo: "bar" }); - -// `buffer` refers the same ArrayBuffer as `encoded`. -const buffer: Buffer = Buffer.from(encoded.buffer, encoded.byteOffset, encoded.byteLength); -console.log(buffer); -``` - -#### `EncodeOptions` - -Name|Type|Default -----|----|---- -extensionCodec | ExtensionCodec | `ExtensionCodec.defaultCodec` -maxDepth | number | `100` -initialBufferSize | number | `2048` -sortKeys | boolean | false -forceFloat32 | boolean | false -forceIntegerToFloat | boolean | false -ignoreUndefined | boolean | false -context | user-defined | - - -### `decode(buffer: ArrayLike | BufferSource, options?: DecodeOptions): unknown` - -It decodes `buffer` that includes a MessagePack-encoded object, and returns the decoded object typed `unknown`. - -`buffer` must be an array of bytes, which is typically `Uint8Array` or `ArrayBuffer`. `BufferSource` is defined as `ArrayBuffer | ArrayBufferView`. - -In addition, `buffer` can include a single encoded object. If the `buffer` includes extra bytes after an object, it will throw `RangeError`. To decode `buffer` that includes multiple encoded objects, use `decodeMulti()` or `decodeMultiStream()` (recommended) instead. - -for example: - -```typescript -import { decode } from "@msgpack/msgpack"; - -const encoded: Uint8Array; -const object = decode(encoded); -console.log(object); -``` - -NodeJS `Buffer` is also acceptable because it is a subclass of `Uint8Array`. - -#### `DecodeOptions` - -Name|Type|Default -----|----|---- -extensionCodec | ExtensionCodec | `ExtensionCodec.defaultCodec` -maxStrLength | number | `4_294_967_295` (UINT32_MAX) -maxBinLength | number | `4_294_967_295` (UINT32_MAX) -maxArrayLength | number | `4_294_967_295` (UINT32_MAX) -maxMapLength | number | `4_294_967_295` (UINT32_MAX) -maxExtLength | number | `4_294_967_295` (UINT32_MAX) -context | user-defined | - - -You can use `max${Type}Length` to limit the length of each type decoded. - -### `decodeMulti(buffer: ArrayLike | BufferSource, options?: DecodeOptions): Generator` - -It decodes `buffer` that includes multiple MessagePack-encoded objects, and returns decoded objects as a generator. That is, this is a synchronous variant for `decodeMultiStream()`. - -This function is not recommended to decode a MessagePack binary via I/O stream including sockets because it's synchronous. Instead, `decodeMultiStream()` decodes it asynchronously, typically spending less time and memory. - -for example: - -```typescript -import { decode } from "@msgpack/msgpack"; - -const encoded: Uint8Array; - -for (const object of decodeMulti(encoded)) { - console.log(object); -} -``` - -### `decodeAsync(stream: ReadableStreamLike | BufferSource>, options?: DecodeAsyncOptions): Promise` - -It decodes `stream`, where `ReadableStreamLike` is defined as `ReadableStream | AsyncIterable`, in an async iterable of byte arrays, and returns decoded object as `unknown` type, wrapped in `Promise`. This function works asynchronously. This is an async variant for `decode()`. - -`DecodeAsyncOptions` is the same as `DecodeOptions` for `decode()`. - -This function is designed to work with whatwg `fetch()` like this: - -```typescript -import { decodeAsync } from "@msgpack/msgpack"; - -const MSGPACK_TYPE = "application/x-msgpack"; - -const response = await fetch(url); -const contentType = response.headers.get("Content-Type"); -if (contentType && contentType.startsWith(MSGPACK_TYPE) && response.body != null) { - const object = await decodeAsync(response.body); - // do something with object -} else { /* handle errors */ } -``` - -### `decodeArrayStream(stream: ReadableStreamLike | BufferSource>, options?: DecodeAsyncOptions): AsyncIterable` - -It is alike to `decodeAsync()`, but only accepts a `stream` that includes an array of items, and emits a decoded item one by one. - -for example: - -```typescript -import { decodeArrayStream } from "@msgpack/msgpack"; - -const stream: AsyncIterator; - -// in an async function: -for await (const item of decodeArrayStream(stream)) { - console.log(item); -} -``` - -### `decodeMultiStream(stream: ReadableStreamLike | BufferSource>, options?: DecodeAsyncOptions): AsyncIterable` - -It is alike to `decodeAsync()` and `decodeArrayStream()`, but the input `stream` must consist of multiple MessagePack-encoded items. This is an asynchronous variant for `decodeMulti()`. - -In other words, it could decode an unlimited stream and emits a decoded item one by one. - -for example: - -```typescript -import { decodeMultiStream } from "@msgpack/msgpack"; - -const stream: AsyncIterator; - -// in an async function: -for await (const item of decodeMultiStream(stream)) { - console.log(item); -} -``` - -This function is available since v2.4.0; previously it was called as `decodeStream()`. - -### Reusing Encoder and Decoder instances - -`Encoder` and `Decoder` classes is provided for better performance: - -```typescript -import { deepStrictEqual } from "assert"; -import { Encoder, Decoder } from "@msgpack/msgpack"; - -const encoder = new Encoder(); -const decoder = new Decoder(); - -const encoded: Uint8Array = encoder.encode(object); -deepStrictEqual(decoder.decode(encoded), object); -``` - -According to our benchmark, reusing `Encoder` instance is about 20% faster -than `encode()` function, and reusing `Decoder` instance is about 2% faster -than `decode()` function. Note that the result should vary in environments -and data structure. - -## Extension Types - -To handle [MessagePack Extension Types](https://github.com/msgpack/msgpack/blob/master/spec.md#extension-types), this library provides `ExtensionCodec` class. - -Here is an example to setup custom extension types that handles `Map` and `Set` classes in TypeScript: - -```typescript -import { encode, decode, ExtensionCodec } from "@msgpack/msgpack"; - -const extensionCodec = new ExtensionCodec(); - -// Set -const SET_EXT_TYPE = 0 // Any in 0-127 -extensionCodec.register({ - type: SET_EXT_TYPE, - encode: (object: unknown): Uint8Array | null => { - if (object instanceof Set) { - return encode([...object]); - } else { - return null; - } - }, - decode: (data: Uint8Array) => { - const array = decode(data) as Array; - return new Set(array); - }, -}); - -// Map -const MAP_EXT_TYPE = 1; // Any in 0-127 -extensionCodec.register({ - type: MAP_EXT_TYPE, - encode: (object: unknown): Uint8Array => { - if (object instanceof Map) { - return encode([...object]); - } else { - return null; - } - }, - decode: (data: Uint8Array) => { - const array = decode(data) as Array<[unknown, unknown]>; - return new Map(array); - }, -}); - -const encoded = encode([new Set(), new Map()], { extensionCodec }); -const decoded = decode(encoded, { extensionCodec }); -``` - -Not that extension types for custom objects must be `[0, 127]`, while `[-1, -128]` is reserved for MessagePack itself. - -#### ExtensionCodec context - -When using an extension codec, it may be necessary to keep encoding/decoding state, to keep track of which objects got encoded/re-created. To do this, pass a `context` to the `EncodeOptions` and `DecodeOptions` (and if using typescript, type the `ExtensionCodec` too). Don't forget to pass the `{extensionCodec, context}` along recursive encoding/decoding: - -```typescript -import { encode, decode, ExtensionCodec } from "@msgpack/msgpack"; - -class MyContext { - track(object: any) { /*...*/ } -} - -class MyType { /* ... */ } - -const extensionCodec = new ExtensionCodec(); - -// MyType -const MYTYPE_EXT_TYPE = 0 // Any in 0-127 -extensionCodec.register({ - type: MYTYPE_EXT_TYPE, - encode: (object, context) => { - if (object instanceof MyType) { - context.track(object); // <-- like this - return encode(object.toJSON(), { extensionCodec, context }); - } else { - return null; - } - }, - decode: (data, extType, context) => { - const decoded = decode(data, { extensionCodec, context }); - const my = new MyType(decoded); - context.track(my); // <-- and like this - return my; - }, -}); - -// and later -import { encode, decode } from "@msgpack/msgpack"; - -const context = new MyContext(); - -const encoded = = encode({myType: new MyType()}, { extensionCodec, context }); -const decoded = decode(encoded, { extensionCodec, context }); -``` - -#### Handling BigInt with ExtensionCodec - -This library does not handle BigInt by default, but you can handle it with `ExtensionCodec` like this: - -```typescript -import { deepStrictEqual } from "assert"; -import { encode, decode, ExtensionCodec } from "@msgpack/msgpack"; - -const BIGINT_EXT_TYPE = 0; // Any in 0-127 -const extensionCodec = new ExtensionCodec(); -extensionCodec.register({ - type: BIGINT_EXT_TYPE, - encode: (input: unknown) => { - if (typeof input === "bigint") { - if (input <= Number.MAX_SAFE_INTEGER && input >= Number.MIN_SAFE_INTEGER) { - return encode(parseInt(input.toString(), 10)); - } else { - return encode(input.toString()); - } - } else { - return null; - } - }, - decode: (data: Uint8Array) => { - return BigInt(decode(data)); - }, -}); - -const value = BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1); -const encoded: = encode(value, { extensionCodec }); -deepStrictEqual(decode(encoded, { extensionCodec }), value); -``` - -#### The temporal module as timestamp extensions - -There is a proposal for a new date/time representations in JavaScript: - -* https://github.com/tc39/proposal-temporal - -This library maps `Date` to the MessagePack timestamp extension by default, but you can re-map the temporal module (or [Temporal Polyfill](https://github.com/tc39/proposal-temporal/tree/main/polyfill)) to the timestamp extension like this: - -```typescript -import { Instant } from "@std-proposal/temporal"; -import { deepStrictEqual } from "assert"; -import { - encode, - decode, - ExtensionCodec, - EXT_TIMESTAMP, - encodeTimeSpecToTimestamp, - decodeTimestampToTimeSpec, -} from "@msgpack/msgpack"; - -const extensionCodec = new ExtensionCodec(); -extensionCodec.register({ - type: EXT_TIMESTAMP, // override the default behavior! - encode: (input: any) => { - if (input instanceof Instant) { - const sec = input.seconds; - const nsec = Number(input.nanoseconds - BigInt(sec) * BigInt(1e9)); - return encodeTimeSpecToTimestamp({ sec, nsec }); - } else { - return null; - } - }, - decode: (data: Uint8Array) => { - const timeSpec = decodeTimestampToTimeSpec(data); - const sec = BigInt(timeSpec.sec); - const nsec = BigInt(timeSpec.nsec); - return Instant.fromEpochNanoseconds(sec * BigInt(1e9) + nsec); - }, -}); - -const instant = Instant.fromEpochMilliseconds(Date.now()); -const encoded = encode(instant, { extensionCodec }); -const decoded = decode(encoded, { extensionCodec }); -deepStrictEqual(decoded, instant); -``` - -This will be default once the temporal module is standardizied, which is not a near-future, though. - -## Decoding a Blob - -[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) is a binary data container provided by browsers. To read its contents, you can use `Blob#arrayBuffer()` or `Blob#stream()`. `Blob#stream()` -is recommended if your target platform support it. This is because streaming -decode should be faster for large objects. In both ways, you need to use -asynchronous API. - -```typescript -async function decodeFromBlob(blob: Blob): unknown { - if (blob.stream) { - // Blob#stream(): ReadableStream (recommended) - return await decodeAsync(blob.stream()); - } else { - // Blob#arrayBuffer(): Promise (if stream() is not available) - return decode(await blob.arrayBuffer()); - } -} -``` - -## MessagePack Specification - -This library is compatible with the "August 2017" revision of MessagePack specification at the point where timestamp ext was added: - -* [x] str/bin separation, added at August 2013 -* [x] extension types, added at August 2013 -* [x] timestamp ext type, added at August 2017 - -The livinng specification is here: - -https://github.com/msgpack/msgpack - -Note that as of June 2019 there're no official "version" on the MessagePack specification. See https://github.com/msgpack/msgpack/issues/195 for the discussions. - -### MessagePack Mapping Table - -The following table shows how JavaScript values are mapped to [MessagePack formats](https://github.com/msgpack/msgpack/blob/master/spec.md) and vice versa. - -Source Value|MessagePack Format|Value Decoded -----|----|---- -null, undefined|nil|null (*1) -boolean (true, false)|bool family|boolean (true, false) -number (53-bit int)|int family|number (53-bit int) -number (64-bit float)|float family|number (64-bit float) -string|str family|string -ArrayBufferView |bin family|Uint8Array (*2) -Array|array family|Array -Object|map family|Object (*3) -Date|timestamp ext family|Date (*4) - -* *1 Both `null` and `undefined` are mapped to `nil` (`0xC0`) type, and are decoded into `null` -* *2 Any `ArrayBufferView`s including NodeJS's `Buffer` are mapped to `bin` family, and are decoded into `Uint8Array` -* *3 In handling `Object`, it is regarded as `Record` in terms of TypeScript -* *4 MessagePack timestamps may have nanoseconds, which will lost when it is decoded into JavaScript `Date`. This behavior can be overridden by registering `-1` for the extension codec. - -## Prerequisites - -This is a universal JavaScript library that supports major browsers and NodeJS. - -### ECMA-262 - -* ES5 language features -* ES2018 standard library, including: - * Typed arrays (ES2015) - * Async iterations (ES2018) - * Features added in ES2015-ES2018 - -ES2018 standard library used in this library can be polyfilled with [core-js](https://github.com/zloirock/core-js). - -If you support IE11, import `core-js` in your application entrypoints, as this library does in testing for browsers. - -### NodeJS - -NodeJS v10 is required, but NodeJS v12 or later is recommended because it includes the V8 feature of [Improving DataView performance in V8](https://v8.dev/blog/dataview). - -NodeJS before v10 will work by importing `@msgpack/msgpack/dist.es5+umd/msgpack`. - -### TypeScript Compiler / Type Definitions - -This module requires type definitions of `AsyncIterator`, `SourceBuffer`, whatwg streams, and so on. They are provided by `"lib": ["ES2021", "DOM"]` in `tsconfig.json`. - -Regarding the TypeScript compiler version, only the latest TypeScript is tested in development. - -## Benchmark - -Run-time performance is not the only reason to use MessagePack, but it's important to choose MessagePack libraries, so a benchmark suite is provided to monitor the performance of this library. - -V8's built-in JSON has been improved for years, esp. `JSON.parse()` is [significantly improved in V8/7.6](https://v8.dev/blog/v8-release-76), it is the fastest deserializer as of 2019, as the benchmark result bellow suggests. - -However, MessagePack can handles binary data effectively, actual performance depends on situations. You'd better take benchmark on your own use-case if performance matters. - -Benchmark on NodeJS/v12.18.3 (V8/7.8) - -operation | op | ms | op/s ------------------------------------------------------------------ | ------: | ----: | ------: -buf = Buffer.from(JSON.stringify(obj)); | 840700 | 5000 | 168140 -buf = JSON.stringify(obj); | 1249800 | 5000 | 249960 -obj = JSON.parse(buf); | 1648000 | 5000 | 329600 -buf = require("msgpack-lite").encode(obj); | 603500 | 5000 | 120700 -obj = require("msgpack-lite").decode(buf); | 315900 | 5000 | 63180 -buf = require("@msgpack/msgpack").encode(obj); | 945400 | 5000 | 189080 -obj = require("@msgpack/msgpack").decode(buf); | 770200 | 5000 | 154040 -buf = /* @msgpack/msgpack */ encoder.encode(obj); | 1162600 | 5000 | 232520 -obj = /* @msgpack/msgpack */ decoder.decode(buf); | 787800 | 5000 | 157560 - -Note that `Buffer.from()` for `JSON.stringify()` is necessary to emulate I/O where a JavaScript string must be converted into a byte array encoded in UTF-8, whereas MessagePack's `encode()` returns a byte array. - -## Distribution - -### NPM / npmjs.com - -The NPM package distributed in npmjs.com includes both ES2015+ and ES5 files: - -* `dist/` is compiled into ES2019 with CommomJS, provided for NodeJS v10 -* `dist.es5+umd/` is compiled into ES5 with UMD - * `dist.es5+umd/msgpack.min.js` - the minified file - * `dist.es5+umd/msgpack.js` - the non-minified file -* `dist.es5+esm/` is compiled into ES5 with ES modules, provided for webpack-like bundlers and NodeJS's ESM-mode - -If you use NodeJS and/or webpack, their module resolvers use the suitable one automatically. - -### CDN / unpkg.com - -This library is available via CDN: - -```html - -``` - -It loads `MessagePack` module to the global object. - - -## Deno Support - -You can use this module on Deno. - -See `example/deno-*.ts` for examples. - -`deno.land/x` is not supported yet. - -## Maintenance - -### Testing - -For simple testing: - -``` -npm run test -``` - -### Continuous Integration - -This library uses Travis CI. - -test matrix: - -* TypeScript targets - * `target=es2019` / `target=es5` -* JavaScript engines - * NodeJS, browsers (Chrome, Firefox, Safari, IE11, and so on) - -See [test:* in package.json](./package.json) and [.travis.yml](./.travis.yml) for details. - -### Release Engineering - -```console -# run tests on NodeJS, Chrome, and Firefox -make test-all - -# edit the changelog -code CHANGELOG.md - -# bump version -npm version patch|minor|major - -# run the publishing task -make publish -``` - -### Updating Dependencies - -```console -npm run update-dependencies -``` - -## License - -Copyright 2019 The MessagePack community. - -This software uses the ISC license: - -https://opensource.org/licenses/ISC - -See [LICENSE](./LICENSE) for details. diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/CachedKeyDecoder.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/CachedKeyDecoder.mjs deleted file mode 100644 index 853b7cd..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/CachedKeyDecoder.mjs +++ /dev/null @@ -1,64 +0,0 @@ -import { utf8DecodeJs } from "./utils/utf8.mjs"; -var DEFAULT_MAX_KEY_LENGTH = 16; -var DEFAULT_MAX_LENGTH_PER_KEY = 16; -var CachedKeyDecoder = /** @class */ (function () { - function CachedKeyDecoder(maxKeyLength, maxLengthPerKey) { - if (maxKeyLength === void 0) { maxKeyLength = DEFAULT_MAX_KEY_LENGTH; } - if (maxLengthPerKey === void 0) { maxLengthPerKey = DEFAULT_MAX_LENGTH_PER_KEY; } - this.maxKeyLength = maxKeyLength; - this.maxLengthPerKey = maxLengthPerKey; - this.hit = 0; - this.miss = 0; - // avoid `new Array(N)`, which makes a sparse array, - // because a sparse array is typically slower than a non-sparse array. - this.caches = []; - for (var i = 0; i < this.maxKeyLength; i++) { - this.caches.push([]); - } - } - CachedKeyDecoder.prototype.canBeCached = function (byteLength) { - return byteLength > 0 && byteLength <= this.maxKeyLength; - }; - CachedKeyDecoder.prototype.find = function (bytes, inputOffset, byteLength) { - var records = this.caches[byteLength - 1]; - FIND_CHUNK: for (var _i = 0, records_1 = records; _i < records_1.length; _i++) { - var record = records_1[_i]; - var recordBytes = record.bytes; - for (var j = 0; j < byteLength; j++) { - if (recordBytes[j] !== bytes[inputOffset + j]) { - continue FIND_CHUNK; - } - } - return record.str; - } - return null; - }; - CachedKeyDecoder.prototype.store = function (bytes, value) { - var records = this.caches[bytes.length - 1]; - var record = { bytes: bytes, str: value }; - if (records.length >= this.maxLengthPerKey) { - // `records` are full! - // Set `record` to an arbitrary position. - records[(Math.random() * records.length) | 0] = record; - } - else { - records.push(record); - } - }; - CachedKeyDecoder.prototype.decode = function (bytes, inputOffset, byteLength) { - var cachedValue = this.find(bytes, inputOffset, byteLength); - if (cachedValue != null) { - this.hit++; - return cachedValue; - } - this.miss++; - var str = utf8DecodeJs(bytes, inputOffset, byteLength); - // Ensure to copy a slice of bytes because the byte may be NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer. - var slicedCopyOfBytes = Uint8Array.prototype.slice.call(bytes, inputOffset, inputOffset + byteLength); - this.store(slicedCopyOfBytes, str); - return str; - }; - return CachedKeyDecoder; -}()); -export { CachedKeyDecoder }; -//# sourceMappingURL=CachedKeyDecoder.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/CachedKeyDecoder.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/CachedKeyDecoder.mjs.map deleted file mode 100644 index 328257d..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/CachedKeyDecoder.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CachedKeyDecoder.mjs","sourceRoot":"","sources":["../src/CachedKeyDecoder.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/DecodeError.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/DecodeError.mjs deleted file mode 100644 index 983f3f6..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/DecodeError.mjs +++ /dev/null @@ -1,33 +0,0 @@ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var DecodeError = /** @class */ (function (_super) { - __extends(DecodeError, _super); - function DecodeError(message) { - var _this = _super.call(this, message) || this; - // fix the prototype chain in a cross-platform way - var proto = Object.create(DecodeError.prototype); - Object.setPrototypeOf(_this, proto); - Object.defineProperty(_this, "name", { - configurable: true, - enumerable: false, - value: DecodeError.name, - }); - return _this; - } - return DecodeError; -}(Error)); -export { DecodeError }; -//# sourceMappingURL=DecodeError.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/DecodeError.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/DecodeError.mjs.map deleted file mode 100644 index 537cb78..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/DecodeError.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DecodeError.mjs","sourceRoot":"","sources":["../src/DecodeError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;IAAiC,+BAAK;IACpC,qBAAY,OAAe;QAA3B,YACE,kBAAM,OAAO,CAAC,SAWf;QATC,kDAAkD;QAClD,IAAM,KAAK,GAAiC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACjF,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,KAAK,CAAC,CAAC;QAEnC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,MAAM,EAAE;YAClC,YAAY,EAAE,IAAI;YAClB,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,WAAW,CAAC,IAAI;SACxB,CAAC,CAAC;;IACL,CAAC;IACH,kBAAC;AAAD,CAAC,AAdD,CAAiC,KAAK,GAcrC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Decoder.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Decoder.mjs deleted file mode 100644 index d233479..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Decoder.mjs +++ /dev/null @@ -1,734 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __asyncValues = (this && this.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -}; -var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } -var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; -import { prettyByte } from "./utils/prettyByte.mjs"; -import { ExtensionCodec } from "./ExtensionCodec.mjs"; -import { getInt64, getUint64, UINT32_MAX } from "./utils/int.mjs"; -import { utf8DecodeJs, TEXT_DECODER_THRESHOLD, utf8DecodeTD } from "./utils/utf8.mjs"; -import { createDataView, ensureUint8Array } from "./utils/typedArrays.mjs"; -import { CachedKeyDecoder } from "./CachedKeyDecoder.mjs"; -import { DecodeError } from "./DecodeError.mjs"; -var isValidMapKeyType = function (key) { - var keyType = typeof key; - return keyType === "string" || keyType === "number"; -}; -var HEAD_BYTE_REQUIRED = -1; -var EMPTY_VIEW = new DataView(new ArrayBuffer(0)); -var EMPTY_BYTES = new Uint8Array(EMPTY_VIEW.buffer); -// IE11: Hack to support IE11. -// IE11: Drop this hack and just use RangeError when IE11 is obsolete. -export var DataViewIndexOutOfBoundsError = (function () { - try { - // IE11: The spec says it should throw RangeError, - // IE11: but in IE11 it throws TypeError. - EMPTY_VIEW.getInt8(0); - } - catch (e) { - return e.constructor; - } - throw new Error("never reached"); -})(); -var MORE_DATA = new DataViewIndexOutOfBoundsError("Insufficient data"); -var sharedCachedKeyDecoder = new CachedKeyDecoder(); -var Decoder = /** @class */ (function () { - function Decoder(extensionCodec, context, maxStrLength, maxBinLength, maxArrayLength, maxMapLength, maxExtLength, keyDecoder) { - if (extensionCodec === void 0) { extensionCodec = ExtensionCodec.defaultCodec; } - if (context === void 0) { context = undefined; } - if (maxStrLength === void 0) { maxStrLength = UINT32_MAX; } - if (maxBinLength === void 0) { maxBinLength = UINT32_MAX; } - if (maxArrayLength === void 0) { maxArrayLength = UINT32_MAX; } - if (maxMapLength === void 0) { maxMapLength = UINT32_MAX; } - if (maxExtLength === void 0) { maxExtLength = UINT32_MAX; } - if (keyDecoder === void 0) { keyDecoder = sharedCachedKeyDecoder; } - this.extensionCodec = extensionCodec; - this.context = context; - this.maxStrLength = maxStrLength; - this.maxBinLength = maxBinLength; - this.maxArrayLength = maxArrayLength; - this.maxMapLength = maxMapLength; - this.maxExtLength = maxExtLength; - this.keyDecoder = keyDecoder; - this.totalPos = 0; - this.pos = 0; - this.view = EMPTY_VIEW; - this.bytes = EMPTY_BYTES; - this.headByte = HEAD_BYTE_REQUIRED; - this.stack = []; - } - Decoder.prototype.reinitializeState = function () { - this.totalPos = 0; - this.headByte = HEAD_BYTE_REQUIRED; - this.stack.length = 0; - // view, bytes, and pos will be re-initialized in setBuffer() - }; - Decoder.prototype.setBuffer = function (buffer) { - this.bytes = ensureUint8Array(buffer); - this.view = createDataView(this.bytes); - this.pos = 0; - }; - Decoder.prototype.appendBuffer = function (buffer) { - if (this.headByte === HEAD_BYTE_REQUIRED && !this.hasRemaining(1)) { - this.setBuffer(buffer); - } - else { - var remainingData = this.bytes.subarray(this.pos); - var newData = ensureUint8Array(buffer); - // concat remainingData + newData - var newBuffer = new Uint8Array(remainingData.length + newData.length); - newBuffer.set(remainingData); - newBuffer.set(newData, remainingData.length); - this.setBuffer(newBuffer); - } - }; - Decoder.prototype.hasRemaining = function (size) { - return this.view.byteLength - this.pos >= size; - }; - Decoder.prototype.createExtraByteError = function (posToShow) { - var _a = this, view = _a.view, pos = _a.pos; - return new RangeError("Extra ".concat(view.byteLength - pos, " of ").concat(view.byteLength, " byte(s) found at buffer[").concat(posToShow, "]")); - }; - /** - * @throws {DecodeError} - * @throws {RangeError} - */ - Decoder.prototype.decode = function (buffer) { - this.reinitializeState(); - this.setBuffer(buffer); - var object = this.doDecodeSync(); - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.pos); - } - return object; - }; - Decoder.prototype.decodeMulti = function (buffer) { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.reinitializeState(); - this.setBuffer(buffer); - _a.label = 1; - case 1: - if (!this.hasRemaining(1)) return [3 /*break*/, 3]; - return [4 /*yield*/, this.doDecodeSync()]; - case 2: - _a.sent(); - return [3 /*break*/, 1]; - case 3: return [2 /*return*/]; - } - }); - }; - Decoder.prototype.decodeAsync = function (stream) { - var stream_1, stream_1_1; - var e_1, _a; - return __awaiter(this, void 0, void 0, function () { - var decoded, object, buffer, e_1_1, _b, headByte, pos, totalPos; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - decoded = false; - _c.label = 1; - case 1: - _c.trys.push([1, 6, 7, 12]); - stream_1 = __asyncValues(stream); - _c.label = 2; - case 2: return [4 /*yield*/, stream_1.next()]; - case 3: - if (!(stream_1_1 = _c.sent(), !stream_1_1.done)) return [3 /*break*/, 5]; - buffer = stream_1_1.value; - if (decoded) { - throw this.createExtraByteError(this.totalPos); - } - this.appendBuffer(buffer); - try { - object = this.doDecodeSync(); - decoded = true; - } - catch (e) { - if (!(e instanceof DataViewIndexOutOfBoundsError)) { - throw e; // rethrow - } - // fallthrough - } - this.totalPos += this.pos; - _c.label = 4; - case 4: return [3 /*break*/, 2]; - case 5: return [3 /*break*/, 12]; - case 6: - e_1_1 = _c.sent(); - e_1 = { error: e_1_1 }; - return [3 /*break*/, 12]; - case 7: - _c.trys.push([7, , 10, 11]); - if (!(stream_1_1 && !stream_1_1.done && (_a = stream_1.return))) return [3 /*break*/, 9]; - return [4 /*yield*/, _a.call(stream_1)]; - case 8: - _c.sent(); - _c.label = 9; - case 9: return [3 /*break*/, 11]; - case 10: - if (e_1) throw e_1.error; - return [7 /*endfinally*/]; - case 11: return [7 /*endfinally*/]; - case 12: - if (decoded) { - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.totalPos); - } - return [2 /*return*/, object]; - } - _b = this, headByte = _b.headByte, pos = _b.pos, totalPos = _b.totalPos; - throw new RangeError("Insufficient data in parsing ".concat(prettyByte(headByte), " at ").concat(totalPos, " (").concat(pos, " in the current buffer)")); - } - }); - }); - }; - Decoder.prototype.decodeArrayStream = function (stream) { - return this.decodeMultiAsync(stream, true); - }; - Decoder.prototype.decodeStream = function (stream) { - return this.decodeMultiAsync(stream, false); - }; - Decoder.prototype.decodeMultiAsync = function (stream, isArray) { - return __asyncGenerator(this, arguments, function decodeMultiAsync_1() { - var isArrayHeaderRequired, arrayItemsLeft, stream_2, stream_2_1, buffer, e_2, e_3_1; - var e_3, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - isArrayHeaderRequired = isArray; - arrayItemsLeft = -1; - _b.label = 1; - case 1: - _b.trys.push([1, 13, 14, 19]); - stream_2 = __asyncValues(stream); - _b.label = 2; - case 2: return [4 /*yield*/, __await(stream_2.next())]; - case 3: - if (!(stream_2_1 = _b.sent(), !stream_2_1.done)) return [3 /*break*/, 12]; - buffer = stream_2_1.value; - if (isArray && arrayItemsLeft === 0) { - throw this.createExtraByteError(this.totalPos); - } - this.appendBuffer(buffer); - if (isArrayHeaderRequired) { - arrayItemsLeft = this.readArraySize(); - isArrayHeaderRequired = false; - this.complete(); - } - _b.label = 4; - case 4: - _b.trys.push([4, 9, , 10]); - _b.label = 5; - case 5: - if (!true) return [3 /*break*/, 8]; - return [4 /*yield*/, __await(this.doDecodeSync())]; - case 6: return [4 /*yield*/, _b.sent()]; - case 7: - _b.sent(); - if (--arrayItemsLeft === 0) { - return [3 /*break*/, 8]; - } - return [3 /*break*/, 5]; - case 8: return [3 /*break*/, 10]; - case 9: - e_2 = _b.sent(); - if (!(e_2 instanceof DataViewIndexOutOfBoundsError)) { - throw e_2; // rethrow - } - return [3 /*break*/, 10]; - case 10: - this.totalPos += this.pos; - _b.label = 11; - case 11: return [3 /*break*/, 2]; - case 12: return [3 /*break*/, 19]; - case 13: - e_3_1 = _b.sent(); - e_3 = { error: e_3_1 }; - return [3 /*break*/, 19]; - case 14: - _b.trys.push([14, , 17, 18]); - if (!(stream_2_1 && !stream_2_1.done && (_a = stream_2.return))) return [3 /*break*/, 16]; - return [4 /*yield*/, __await(_a.call(stream_2))]; - case 15: - _b.sent(); - _b.label = 16; - case 16: return [3 /*break*/, 18]; - case 17: - if (e_3) throw e_3.error; - return [7 /*endfinally*/]; - case 18: return [7 /*endfinally*/]; - case 19: return [2 /*return*/]; - } - }); - }); - }; - Decoder.prototype.doDecodeSync = function () { - DECODE: while (true) { - var headByte = this.readHeadByte(); - var object = void 0; - if (headByte >= 0xe0) { - // negative fixint (111x xxxx) 0xe0 - 0xff - object = headByte - 0x100; - } - else if (headByte < 0xc0) { - if (headByte < 0x80) { - // positive fixint (0xxx xxxx) 0x00 - 0x7f - object = headByte; - } - else if (headByte < 0x90) { - // fixmap (1000 xxxx) 0x80 - 0x8f - var size = headByte - 0x80; - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte < 0xa0) { - // fixarray (1001 xxxx) 0x90 - 0x9f - var size = headByte - 0x90; - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else { - // fixstr (101x xxxx) 0xa0 - 0xbf - var byteLength = headByte - 0xa0; - object = this.decodeUtf8String(byteLength, 0); - } - } - else if (headByte === 0xc0) { - // nil - object = null; - } - else if (headByte === 0xc2) { - // false - object = false; - } - else if (headByte === 0xc3) { - // true - object = true; - } - else if (headByte === 0xca) { - // float 32 - object = this.readF32(); - } - else if (headByte === 0xcb) { - // float 64 - object = this.readF64(); - } - else if (headByte === 0xcc) { - // uint 8 - object = this.readU8(); - } - else if (headByte === 0xcd) { - // uint 16 - object = this.readU16(); - } - else if (headByte === 0xce) { - // uint 32 - object = this.readU32(); - } - else if (headByte === 0xcf) { - // uint 64 - object = this.readU64(); - } - else if (headByte === 0xd0) { - // int 8 - object = this.readI8(); - } - else if (headByte === 0xd1) { - // int 16 - object = this.readI16(); - } - else if (headByte === 0xd2) { - // int 32 - object = this.readI32(); - } - else if (headByte === 0xd3) { - // int 64 - object = this.readI64(); - } - else if (headByte === 0xd9) { - // str 8 - var byteLength = this.lookU8(); - object = this.decodeUtf8String(byteLength, 1); - } - else if (headByte === 0xda) { - // str 16 - var byteLength = this.lookU16(); - object = this.decodeUtf8String(byteLength, 2); - } - else if (headByte === 0xdb) { - // str 32 - var byteLength = this.lookU32(); - object = this.decodeUtf8String(byteLength, 4); - } - else if (headByte === 0xdc) { - // array 16 - var size = this.readU16(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else if (headByte === 0xdd) { - // array 32 - var size = this.readU32(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else if (headByte === 0xde) { - // map 16 - var size = this.readU16(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte === 0xdf) { - // map 32 - var size = this.readU32(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte === 0xc4) { - // bin 8 - var size = this.lookU8(); - object = this.decodeBinary(size, 1); - } - else if (headByte === 0xc5) { - // bin 16 - var size = this.lookU16(); - object = this.decodeBinary(size, 2); - } - else if (headByte === 0xc6) { - // bin 32 - var size = this.lookU32(); - object = this.decodeBinary(size, 4); - } - else if (headByte === 0xd4) { - // fixext 1 - object = this.decodeExtension(1, 0); - } - else if (headByte === 0xd5) { - // fixext 2 - object = this.decodeExtension(2, 0); - } - else if (headByte === 0xd6) { - // fixext 4 - object = this.decodeExtension(4, 0); - } - else if (headByte === 0xd7) { - // fixext 8 - object = this.decodeExtension(8, 0); - } - else if (headByte === 0xd8) { - // fixext 16 - object = this.decodeExtension(16, 0); - } - else if (headByte === 0xc7) { - // ext 8 - var size = this.lookU8(); - object = this.decodeExtension(size, 1); - } - else if (headByte === 0xc8) { - // ext 16 - var size = this.lookU16(); - object = this.decodeExtension(size, 2); - } - else if (headByte === 0xc9) { - // ext 32 - var size = this.lookU32(); - object = this.decodeExtension(size, 4); - } - else { - throw new DecodeError("Unrecognized type byte: ".concat(prettyByte(headByte))); - } - this.complete(); - var stack = this.stack; - while (stack.length > 0) { - // arrays and maps - var state = stack[stack.length - 1]; - if (state.type === 0 /* ARRAY */) { - state.array[state.position] = object; - state.position++; - if (state.position === state.size) { - stack.pop(); - object = state.array; - } - else { - continue DECODE; - } - } - else if (state.type === 1 /* MAP_KEY */) { - if (!isValidMapKeyType(object)) { - throw new DecodeError("The type of key must be string or number but " + typeof object); - } - if (object === "__proto__") { - throw new DecodeError("The key __proto__ is not allowed"); - } - state.key = object; - state.type = 2 /* MAP_VALUE */; - continue DECODE; - } - else { - // it must be `state.type === State.MAP_VALUE` here - state.map[state.key] = object; - state.readCount++; - if (state.readCount === state.size) { - stack.pop(); - object = state.map; - } - else { - state.key = null; - state.type = 1 /* MAP_KEY */; - continue DECODE; - } - } - } - return object; - } - }; - Decoder.prototype.readHeadByte = function () { - if (this.headByte === HEAD_BYTE_REQUIRED) { - this.headByte = this.readU8(); - // console.log("headByte", prettyByte(this.headByte)); - } - return this.headByte; - }; - Decoder.prototype.complete = function () { - this.headByte = HEAD_BYTE_REQUIRED; - }; - Decoder.prototype.readArraySize = function () { - var headByte = this.readHeadByte(); - switch (headByte) { - case 0xdc: - return this.readU16(); - case 0xdd: - return this.readU32(); - default: { - if (headByte < 0xa0) { - return headByte - 0x90; - } - else { - throw new DecodeError("Unrecognized array type byte: ".concat(prettyByte(headByte))); - } - } - } - }; - Decoder.prototype.pushMapState = function (size) { - if (size > this.maxMapLength) { - throw new DecodeError("Max length exceeded: map length (".concat(size, ") > maxMapLengthLength (").concat(this.maxMapLength, ")")); - } - this.stack.push({ - type: 1 /* MAP_KEY */, - size: size, - key: null, - readCount: 0, - map: {}, - }); - }; - Decoder.prototype.pushArrayState = function (size) { - if (size > this.maxArrayLength) { - throw new DecodeError("Max length exceeded: array length (".concat(size, ") > maxArrayLength (").concat(this.maxArrayLength, ")")); - } - this.stack.push({ - type: 0 /* ARRAY */, - size: size, - array: new Array(size), - position: 0, - }); - }; - Decoder.prototype.decodeUtf8String = function (byteLength, headerOffset) { - var _a; - if (byteLength > this.maxStrLength) { - throw new DecodeError("Max length exceeded: UTF-8 byte length (".concat(byteLength, ") > maxStrLength (").concat(this.maxStrLength, ")")); - } - if (this.bytes.byteLength < this.pos + headerOffset + byteLength) { - throw MORE_DATA; - } - var offset = this.pos + headerOffset; - var object; - if (this.stateIsMapKey() && ((_a = this.keyDecoder) === null || _a === void 0 ? void 0 : _a.canBeCached(byteLength))) { - object = this.keyDecoder.decode(this.bytes, offset, byteLength); - } - else if (byteLength > TEXT_DECODER_THRESHOLD) { - object = utf8DecodeTD(this.bytes, offset, byteLength); - } - else { - object = utf8DecodeJs(this.bytes, offset, byteLength); - } - this.pos += headerOffset + byteLength; - return object; - }; - Decoder.prototype.stateIsMapKey = function () { - if (this.stack.length > 0) { - var state = this.stack[this.stack.length - 1]; - return state.type === 1 /* MAP_KEY */; - } - return false; - }; - Decoder.prototype.decodeBinary = function (byteLength, headOffset) { - if (byteLength > this.maxBinLength) { - throw new DecodeError("Max length exceeded: bin length (".concat(byteLength, ") > maxBinLength (").concat(this.maxBinLength, ")")); - } - if (!this.hasRemaining(byteLength + headOffset)) { - throw MORE_DATA; - } - var offset = this.pos + headOffset; - var object = this.bytes.subarray(offset, offset + byteLength); - this.pos += headOffset + byteLength; - return object; - }; - Decoder.prototype.decodeExtension = function (size, headOffset) { - if (size > this.maxExtLength) { - throw new DecodeError("Max length exceeded: ext length (".concat(size, ") > maxExtLength (").concat(this.maxExtLength, ")")); - } - var extType = this.view.getInt8(this.pos + headOffset); - var data = this.decodeBinary(size, headOffset + 1 /* extType */); - return this.extensionCodec.decode(data, extType, this.context); - }; - Decoder.prototype.lookU8 = function () { - return this.view.getUint8(this.pos); - }; - Decoder.prototype.lookU16 = function () { - return this.view.getUint16(this.pos); - }; - Decoder.prototype.lookU32 = function () { - return this.view.getUint32(this.pos); - }; - Decoder.prototype.readU8 = function () { - var value = this.view.getUint8(this.pos); - this.pos++; - return value; - }; - Decoder.prototype.readI8 = function () { - var value = this.view.getInt8(this.pos); - this.pos++; - return value; - }; - Decoder.prototype.readU16 = function () { - var value = this.view.getUint16(this.pos); - this.pos += 2; - return value; - }; - Decoder.prototype.readI16 = function () { - var value = this.view.getInt16(this.pos); - this.pos += 2; - return value; - }; - Decoder.prototype.readU32 = function () { - var value = this.view.getUint32(this.pos); - this.pos += 4; - return value; - }; - Decoder.prototype.readI32 = function () { - var value = this.view.getInt32(this.pos); - this.pos += 4; - return value; - }; - Decoder.prototype.readU64 = function () { - var value = getUint64(this.view, this.pos); - this.pos += 8; - return value; - }; - Decoder.prototype.readI64 = function () { - var value = getInt64(this.view, this.pos); - this.pos += 8; - return value; - }; - Decoder.prototype.readF32 = function () { - var value = this.view.getFloat32(this.pos); - this.pos += 4; - return value; - }; - Decoder.prototype.readF64 = function () { - var value = this.view.getFloat64(this.pos); - this.pos += 8; - return value; - }; - return Decoder; -}()); -export { Decoder }; -//# sourceMappingURL=Decoder.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Decoder.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Decoder.mjs.map deleted file mode 100644 index 38bddd5..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Decoder.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Decoder.mjs","sourceRoot":"","sources":["../src/Decoder.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Encoder.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Encoder.mjs deleted file mode 100644 index 378a056..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Encoder.mjs +++ /dev/null @@ -1,407 +0,0 @@ -import { utf8EncodeJs, utf8Count, TEXT_ENCODER_THRESHOLD, utf8EncodeTE } from "./utils/utf8.mjs"; -import { ExtensionCodec } from "./ExtensionCodec.mjs"; -import { setInt64, setUint64 } from "./utils/int.mjs"; -import { ensureUint8Array } from "./utils/typedArrays.mjs"; -export var DEFAULT_MAX_DEPTH = 100; -export var DEFAULT_INITIAL_BUFFER_SIZE = 2048; -var Encoder = /** @class */ (function () { - function Encoder(extensionCodec, context, maxDepth, initialBufferSize, sortKeys, forceFloat32, ignoreUndefined, forceIntegerToFloat) { - if (extensionCodec === void 0) { extensionCodec = ExtensionCodec.defaultCodec; } - if (context === void 0) { context = undefined; } - if (maxDepth === void 0) { maxDepth = DEFAULT_MAX_DEPTH; } - if (initialBufferSize === void 0) { initialBufferSize = DEFAULT_INITIAL_BUFFER_SIZE; } - if (sortKeys === void 0) { sortKeys = false; } - if (forceFloat32 === void 0) { forceFloat32 = false; } - if (ignoreUndefined === void 0) { ignoreUndefined = false; } - if (forceIntegerToFloat === void 0) { forceIntegerToFloat = false; } - this.extensionCodec = extensionCodec; - this.context = context; - this.maxDepth = maxDepth; - this.initialBufferSize = initialBufferSize; - this.sortKeys = sortKeys; - this.forceFloat32 = forceFloat32; - this.ignoreUndefined = ignoreUndefined; - this.forceIntegerToFloat = forceIntegerToFloat; - this.pos = 0; - this.view = new DataView(new ArrayBuffer(this.initialBufferSize)); - this.bytes = new Uint8Array(this.view.buffer); - } - Encoder.prototype.getUint8Array = function () { - return this.bytes.subarray(0, this.pos); - }; - Encoder.prototype.reinitializeState = function () { - this.pos = 0; - }; - Encoder.prototype.encode = function (object) { - this.reinitializeState(); - this.doEncode(object, 1); - return this.getUint8Array(); - }; - Encoder.prototype.doEncode = function (object, depth) { - if (depth > this.maxDepth) { - throw new Error("Too deep objects in depth ".concat(depth)); - } - if (object == null) { - this.encodeNil(); - } - else if (typeof object === "boolean") { - this.encodeBoolean(object); - } - else if (typeof object === "number") { - this.encodeNumber(object); - } - else if (typeof object === "string") { - this.encodeString(object); - } - else { - this.encodeObject(object, depth); - } - }; - Encoder.prototype.ensureBufferSizeToWrite = function (sizeToWrite) { - var requiredSize = this.pos + sizeToWrite; - if (this.view.byteLength < requiredSize) { - this.resizeBuffer(requiredSize * 2); - } - }; - Encoder.prototype.resizeBuffer = function (newSize) { - var newBuffer = new ArrayBuffer(newSize); - var newBytes = new Uint8Array(newBuffer); - var newView = new DataView(newBuffer); - newBytes.set(this.bytes); - this.view = newView; - this.bytes = newBytes; - }; - Encoder.prototype.encodeNil = function () { - this.writeU8(0xc0); - }; - Encoder.prototype.encodeBoolean = function (object) { - if (object === false) { - this.writeU8(0xc2); - } - else { - this.writeU8(0xc3); - } - }; - Encoder.prototype.encodeNumber = function (object) { - if (Number.isSafeInteger(object) && !this.forceIntegerToFloat) { - if (object >= 0) { - if (object < 0x80) { - // positive fixint - this.writeU8(object); - } - else if (object < 0x100) { - // uint 8 - this.writeU8(0xcc); - this.writeU8(object); - } - else if (object < 0x10000) { - // uint 16 - this.writeU8(0xcd); - this.writeU16(object); - } - else if (object < 0x100000000) { - // uint 32 - this.writeU8(0xce); - this.writeU32(object); - } - else { - // uint 64 - this.writeU8(0xcf); - this.writeU64(object); - } - } - else { - if (object >= -0x20) { - // negative fixint - this.writeU8(0xe0 | (object + 0x20)); - } - else if (object >= -0x80) { - // int 8 - this.writeU8(0xd0); - this.writeI8(object); - } - else if (object >= -0x8000) { - // int 16 - this.writeU8(0xd1); - this.writeI16(object); - } - else if (object >= -0x80000000) { - // int 32 - this.writeU8(0xd2); - this.writeI32(object); - } - else { - // int 64 - this.writeU8(0xd3); - this.writeI64(object); - } - } - } - else { - // non-integer numbers - if (this.forceFloat32) { - // float 32 - this.writeU8(0xca); - this.writeF32(object); - } - else { - // float 64 - this.writeU8(0xcb); - this.writeF64(object); - } - } - }; - Encoder.prototype.writeStringHeader = function (byteLength) { - if (byteLength < 32) { - // fixstr - this.writeU8(0xa0 + byteLength); - } - else if (byteLength < 0x100) { - // str 8 - this.writeU8(0xd9); - this.writeU8(byteLength); - } - else if (byteLength < 0x10000) { - // str 16 - this.writeU8(0xda); - this.writeU16(byteLength); - } - else if (byteLength < 0x100000000) { - // str 32 - this.writeU8(0xdb); - this.writeU32(byteLength); - } - else { - throw new Error("Too long string: ".concat(byteLength, " bytes in UTF-8")); - } - }; - Encoder.prototype.encodeString = function (object) { - var maxHeaderSize = 1 + 4; - var strLength = object.length; - if (strLength > TEXT_ENCODER_THRESHOLD) { - var byteLength = utf8Count(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - utf8EncodeTE(object, this.bytes, this.pos); - this.pos += byteLength; - } - else { - var byteLength = utf8Count(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - utf8EncodeJs(object, this.bytes, this.pos); - this.pos += byteLength; - } - }; - Encoder.prototype.encodeObject = function (object, depth) { - // try to encode objects with custom codec first of non-primitives - var ext = this.extensionCodec.tryToEncode(object, this.context); - if (ext != null) { - this.encodeExtension(ext); - } - else if (Array.isArray(object)) { - this.encodeArray(object, depth); - } - else if (ArrayBuffer.isView(object)) { - this.encodeBinary(object); - } - else if (typeof object === "object") { - this.encodeMap(object, depth); - } - else { - // symbol, function and other special object come here unless extensionCodec handles them. - throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(object))); - } - }; - Encoder.prototype.encodeBinary = function (object) { - var size = object.byteLength; - if (size < 0x100) { - // bin 8 - this.writeU8(0xc4); - this.writeU8(size); - } - else if (size < 0x10000) { - // bin 16 - this.writeU8(0xc5); - this.writeU16(size); - } - else if (size < 0x100000000) { - // bin 32 - this.writeU8(0xc6); - this.writeU32(size); - } - else { - throw new Error("Too large binary: ".concat(size)); - } - var bytes = ensureUint8Array(object); - this.writeU8a(bytes); - }; - Encoder.prototype.encodeArray = function (object, depth) { - var size = object.length; - if (size < 16) { - // fixarray - this.writeU8(0x90 + size); - } - else if (size < 0x10000) { - // array 16 - this.writeU8(0xdc); - this.writeU16(size); - } - else if (size < 0x100000000) { - // array 32 - this.writeU8(0xdd); - this.writeU32(size); - } - else { - throw new Error("Too large array: ".concat(size)); - } - for (var _i = 0, object_1 = object; _i < object_1.length; _i++) { - var item = object_1[_i]; - this.doEncode(item, depth + 1); - } - }; - Encoder.prototype.countWithoutUndefined = function (object, keys) { - var count = 0; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - if (object[key] !== undefined) { - count++; - } - } - return count; - }; - Encoder.prototype.encodeMap = function (object, depth) { - var keys = Object.keys(object); - if (this.sortKeys) { - keys.sort(); - } - var size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length; - if (size < 16) { - // fixmap - this.writeU8(0x80 + size); - } - else if (size < 0x10000) { - // map 16 - this.writeU8(0xde); - this.writeU16(size); - } - else if (size < 0x100000000) { - // map 32 - this.writeU8(0xdf); - this.writeU32(size); - } - else { - throw new Error("Too large map object: ".concat(size)); - } - for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) { - var key = keys_2[_i]; - var value = object[key]; - if (!(this.ignoreUndefined && value === undefined)) { - this.encodeString(key); - this.doEncode(value, depth + 1); - } - } - }; - Encoder.prototype.encodeExtension = function (ext) { - var size = ext.data.length; - if (size === 1) { - // fixext 1 - this.writeU8(0xd4); - } - else if (size === 2) { - // fixext 2 - this.writeU8(0xd5); - } - else if (size === 4) { - // fixext 4 - this.writeU8(0xd6); - } - else if (size === 8) { - // fixext 8 - this.writeU8(0xd7); - } - else if (size === 16) { - // fixext 16 - this.writeU8(0xd8); - } - else if (size < 0x100) { - // ext 8 - this.writeU8(0xc7); - this.writeU8(size); - } - else if (size < 0x10000) { - // ext 16 - this.writeU8(0xc8); - this.writeU16(size); - } - else if (size < 0x100000000) { - // ext 32 - this.writeU8(0xc9); - this.writeU32(size); - } - else { - throw new Error("Too large extension object: ".concat(size)); - } - this.writeI8(ext.type); - this.writeU8a(ext.data); - }; - Encoder.prototype.writeU8 = function (value) { - this.ensureBufferSizeToWrite(1); - this.view.setUint8(this.pos, value); - this.pos++; - }; - Encoder.prototype.writeU8a = function (values) { - var size = values.length; - this.ensureBufferSizeToWrite(size); - this.bytes.set(values, this.pos); - this.pos += size; - }; - Encoder.prototype.writeI8 = function (value) { - this.ensureBufferSizeToWrite(1); - this.view.setInt8(this.pos, value); - this.pos++; - }; - Encoder.prototype.writeU16 = function (value) { - this.ensureBufferSizeToWrite(2); - this.view.setUint16(this.pos, value); - this.pos += 2; - }; - Encoder.prototype.writeI16 = function (value) { - this.ensureBufferSizeToWrite(2); - this.view.setInt16(this.pos, value); - this.pos += 2; - }; - Encoder.prototype.writeU32 = function (value) { - this.ensureBufferSizeToWrite(4); - this.view.setUint32(this.pos, value); - this.pos += 4; - }; - Encoder.prototype.writeI32 = function (value) { - this.ensureBufferSizeToWrite(4); - this.view.setInt32(this.pos, value); - this.pos += 4; - }; - Encoder.prototype.writeF32 = function (value) { - this.ensureBufferSizeToWrite(4); - this.view.setFloat32(this.pos, value); - this.pos += 4; - }; - Encoder.prototype.writeF64 = function (value) { - this.ensureBufferSizeToWrite(8); - this.view.setFloat64(this.pos, value); - this.pos += 8; - }; - Encoder.prototype.writeU64 = function (value) { - this.ensureBufferSizeToWrite(8); - setUint64(this.view, this.pos, value); - this.pos += 8; - }; - Encoder.prototype.writeI64 = function (value) { - this.ensureBufferSizeToWrite(8); - setInt64(this.view, this.pos, value); - this.pos += 8; - }; - return Encoder; -}()); -export { Encoder }; -//# sourceMappingURL=Encoder.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Encoder.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Encoder.mjs.map deleted file mode 100644 index 6eef322..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/Encoder.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Encoder.mjs","sourceRoot":"","sources":["../src/Encoder.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtData.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtData.mjs deleted file mode 100644 index d0d86a5..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtData.mjs +++ /dev/null @@ -1,12 +0,0 @@ -/** - * ExtData is used to handle Extension Types that are not registered to ExtensionCodec. - */ -var ExtData = /** @class */ (function () { - function ExtData(type, data) { - this.type = type; - this.data = data; - } - return ExtData; -}()); -export { ExtData }; -//# sourceMappingURL=ExtData.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtData.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtData.mjs.map deleted file mode 100644 index a2e020b..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtData.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExtData.mjs","sourceRoot":"","sources":["../src/ExtData.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;IACE,iBAAqB,IAAY,EAAW,IAAgB;QAAvC,SAAI,GAAJ,IAAI,CAAQ;QAAW,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAClE,cAAC;AAAD,CAAC,AAFD,IAEC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtensionCodec.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtensionCodec.mjs deleted file mode 100644 index 56bac53..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtensionCodec.mjs +++ /dev/null @@ -1,71 +0,0 @@ -// ExtensionCodec to handle MessagePack extensions -import { ExtData } from "./ExtData.mjs"; -import { timestampExtension } from "./timestamp.mjs"; -var ExtensionCodec = /** @class */ (function () { - function ExtensionCodec() { - // built-in extensions - this.builtInEncoders = []; - this.builtInDecoders = []; - // custom extensions - this.encoders = []; - this.decoders = []; - this.register(timestampExtension); - } - ExtensionCodec.prototype.register = function (_a) { - var type = _a.type, encode = _a.encode, decode = _a.decode; - if (type >= 0) { - // custom extensions - this.encoders[type] = encode; - this.decoders[type] = decode; - } - else { - // built-in extensions - var index = 1 + type; - this.builtInEncoders[index] = encode; - this.builtInDecoders[index] = decode; - } - }; - ExtensionCodec.prototype.tryToEncode = function (object, context) { - // built-in extensions - for (var i = 0; i < this.builtInEncoders.length; i++) { - var encodeExt = this.builtInEncoders[i]; - if (encodeExt != null) { - var data = encodeExt(object, context); - if (data != null) { - var type = -1 - i; - return new ExtData(type, data); - } - } - } - // custom extensions - for (var i = 0; i < this.encoders.length; i++) { - var encodeExt = this.encoders[i]; - if (encodeExt != null) { - var data = encodeExt(object, context); - if (data != null) { - var type = i; - return new ExtData(type, data); - } - } - } - if (object instanceof ExtData) { - // to keep ExtData as is - return object; - } - return null; - }; - ExtensionCodec.prototype.decode = function (data, type, context) { - var decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type]; - if (decodeExt) { - return decodeExt(data, type, context); - } - else { - // decode() does not fail, returns ExtData instead. - return new ExtData(type, data); - } - }; - ExtensionCodec.defaultCodec = new ExtensionCodec(); - return ExtensionCodec; -}()); -export { ExtensionCodec }; -//# sourceMappingURL=ExtensionCodec.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtensionCodec.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtensionCodec.mjs.map deleted file mode 100644 index fe9949d..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/ExtensionCodec.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExtensionCodec.mjs","sourceRoot":"","sources":["../src/ExtensionCodec.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/context.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/context.mjs deleted file mode 100644 index b14618b..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/context.mjs +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -export {}; -//# sourceMappingURL=context.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/context.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/context.mjs.map deleted file mode 100644 index c5cb521..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/context.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"context.mjs","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,iDAAiD"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decode.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decode.mjs deleted file mode 100644 index cf20e64..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decode.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import { Decoder } from "./Decoder.mjs"; -export var defaultDecodeOptions = {}; -/** - * It decodes a single MessagePack object in a buffer. - * - * This is a synchronous decoding function. - * See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}. - */ -export function decode(buffer, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decode(buffer); -} -/** - * It decodes multiple MessagePack objects in a buffer. - * This is corresponding to {@link decodeMultiStream()}. - */ -export function decodeMulti(buffer, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeMulti(buffer); -} -//# sourceMappingURL=decode.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decode.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decode.mjs.map deleted file mode 100644 index bf73e35..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decode.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.mjs","sourceRoot":"","sources":["../src/decode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0CpC,MAAM,CAAC,IAAM,oBAAoB,GAAkB,EAAE,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CACpB,MAAwC,EACxC,OAAiF;IAAjF,wBAAA,EAAA,UAAsD,oBAA2B;IAEjF,IAAM,OAAO,GAAG,IAAI,OAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CACzB,MAAwC,EACxC,OAAiF;IAAjF,wBAAA,EAAA,UAAsD,oBAA2B;IAEjF,IAAM,OAAO,GAAG,IAAI,OAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IACF,OAAO,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decodeAsync.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decodeAsync.mjs deleted file mode 100644 index 83f7369..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decodeAsync.mjs +++ /dev/null @@ -1,70 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -import { Decoder } from "./Decoder.mjs"; -import { ensureAsyncIterable } from "./utils/stream.mjs"; -import { defaultDecodeOptions } from "./decode.mjs"; -export function decodeAsync(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - return __awaiter(this, void 0, void 0, function () { - var stream, decoder; - return __generator(this, function (_a) { - stream = ensureAsyncIterable(streamLike); - decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return [2 /*return*/, decoder.decodeAsync(stream)]; - }); - }); -} -export function decodeArrayStream(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var stream = ensureAsyncIterable(streamLike); - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeArrayStream(stream); -} -export function decodeMultiStream(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var stream = ensureAsyncIterable(streamLike); - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeStream(stream); -} -/** - * @deprecated Use {@link decodeMultiStream()} instead. - */ -export function decodeStream(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - return decodeMultiStream(streamLike, options); -} -//# sourceMappingURL=decodeAsync.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decodeAsync.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decodeAsync.mjs.map deleted file mode 100644 index c007044..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/decodeAsync.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decodeAsync.mjs","sourceRoot":"","sources":["../src/decodeAsync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKhD,MAAM,UAAgB,WAAW,CAC/B,UAAgE,EAChE,OAAiF;IAAjF,wBAAA,EAAA,UAAsD,oBAA2B;;;;YAE3E,MAAM,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;YAEzC,OAAO,GAAG,IAAI,OAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;YACF,sBAAO,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,EAAC;;;CACpC;AAED,MAAM,UAAU,iBAAiB,CAC/B,UAAgE,EAChE,OAAiF;IAAjF,wBAAA,EAAA,UAAsD,oBAA2B;IAEjF,IAAM,MAAM,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAE/C,IAAM,OAAO,GAAG,IAAI,OAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IAEF,OAAO,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,UAAgE,EAChE,OAAiF;IAAjF,wBAAA,EAAA,UAAsD,oBAA2B;IAEjF,IAAM,MAAM,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAE/C,IAAM,OAAO,GAAG,IAAI,OAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IAEF,OAAO,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAgE,EAChE,OAAiF;IAAjF,wBAAA,EAAA,UAAsD,oBAA2B;IAEjF,OAAO,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/encode.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/encode.mjs deleted file mode 100644 index c74eee2..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/encode.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { Encoder } from "./Encoder.mjs"; -var defaultEncodeOptions = {}; -/** - * It encodes `value` in the MessagePack format and - * returns a byte buffer. - * - * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`. - */ -export function encode(value, options) { - if (options === void 0) { options = defaultEncodeOptions; } - var encoder = new Encoder(options.extensionCodec, options.context, options.maxDepth, options.initialBufferSize, options.sortKeys, options.forceFloat32, options.ignoreUndefined, options.forceIntegerToFloat); - return encoder.encode(value); -} -//# sourceMappingURL=encode.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/encode.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/encode.mjs.map deleted file mode 100644 index 29acf4b..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/encode.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.mjs","sourceRoot":"","sources":["../src/encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyDpC,IAAM,oBAAoB,GAAkB,EAAE,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CACpB,KAAc,EACd,OAAiF;IAAjF,wBAAA,EAAA,UAAsD,oBAA2B;IAEjF,IAAM,OAAO,GAAG,IAAI,OAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,iBAAiB,EACzB,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,mBAAmB,CAC5B,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/index.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/index.mjs deleted file mode 100644 index a0179b2..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/index.mjs +++ /dev/null @@ -1,20 +0,0 @@ -// Main Functions: -import { encode } from "./encode.mjs"; -export { encode }; -import { decode, decodeMulti } from "./decode.mjs"; -export { decode, decodeMulti }; -import { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream } from "./decodeAsync.mjs"; -export { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream }; -import { Decoder, DataViewIndexOutOfBoundsError } from "./Decoder.mjs"; -import { DecodeError } from "./DecodeError.mjs"; -export { Decoder, DecodeError, DataViewIndexOutOfBoundsError }; -import { Encoder } from "./Encoder.mjs"; -export { Encoder }; -// Utilitiies for Extension Types: -import { ExtensionCodec } from "./ExtensionCodec.mjs"; -export { ExtensionCodec }; -import { ExtData } from "./ExtData.mjs"; -export { ExtData }; -import { EXT_TIMESTAMP, encodeDateToTimeSpec, encodeTimeSpecToTimestamp, decodeTimestampToTimeSpec, encodeTimestampExtension, decodeTimestampExtension, } from "./timestamp.mjs"; -export { EXT_TIMESTAMP, encodeDateToTimeSpec, encodeTimeSpecToTimestamp, decodeTimestampToTimeSpec, encodeTimestampExtension, decodeTimestampExtension, }; -//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/index.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/index.mjs.map deleted file mode 100644 index dfaef4a..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,CAAC;AAIlB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAI/B,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AAE3E,OAAO,EAAE,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,kCAAkC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,CAAC;AAG1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/timestamp.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/timestamp.mjs deleted file mode 100644 index bbfd364..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/timestamp.mjs +++ /dev/null @@ -1,97 +0,0 @@ -// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type -import { DecodeError } from "./DecodeError.mjs"; -import { getInt64, setInt64 } from "./utils/int.mjs"; -export var EXT_TIMESTAMP = -1; -var TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int -var TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int -export function encodeTimeSpecToTimestamp(_a) { - var sec = _a.sec, nsec = _a.nsec; - if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) { - // Here sec >= 0 && nsec >= 0 - if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) { - // timestamp 32 = { sec32 (unsigned) } - var rv = new Uint8Array(4); - var view = new DataView(rv.buffer); - view.setUint32(0, sec); - return rv; - } - else { - // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) } - var secHigh = sec / 0x100000000; - var secLow = sec & 0xffffffff; - var rv = new Uint8Array(8); - var view = new DataView(rv.buffer); - // nsec30 | secHigh2 - view.setUint32(0, (nsec << 2) | (secHigh & 0x3)); - // secLow32 - view.setUint32(4, secLow); - return rv; - } - } - else { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - var rv = new Uint8Array(12); - var view = new DataView(rv.buffer); - view.setUint32(0, nsec); - setInt64(view, 4, sec); - return rv; - } -} -export function encodeDateToTimeSpec(date) { - var msec = date.getTime(); - var sec = Math.floor(msec / 1e3); - var nsec = (msec - sec * 1e3) * 1e6; - // Normalizes { sec, nsec } to ensure nsec is unsigned. - var nsecInSec = Math.floor(nsec / 1e9); - return { - sec: sec + nsecInSec, - nsec: nsec - nsecInSec * 1e9, - }; -} -export function encodeTimestampExtension(object) { - if (object instanceof Date) { - var timeSpec = encodeDateToTimeSpec(object); - return encodeTimeSpecToTimestamp(timeSpec); - } - else { - return null; - } -} -export function decodeTimestampToTimeSpec(data) { - var view = new DataView(data.buffer, data.byteOffset, data.byteLength); - // data may be 32, 64, or 96 bits - switch (data.byteLength) { - case 4: { - // timestamp 32 = { sec32 } - var sec = view.getUint32(0); - var nsec = 0; - return { sec: sec, nsec: nsec }; - } - case 8: { - // timestamp 64 = { nsec30, sec34 } - var nsec30AndSecHigh2 = view.getUint32(0); - var secLow32 = view.getUint32(4); - var sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32; - var nsec = nsec30AndSecHigh2 >>> 2; - return { sec: sec, nsec: nsec }; - } - case 12: { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - var sec = getInt64(view, 4); - var nsec = view.getUint32(0); - return { sec: sec, nsec: nsec }; - } - default: - throw new DecodeError("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(data.length)); - } -} -export function decodeTimestampExtension(data) { - var timeSpec = decodeTimestampToTimeSpec(data); - return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6); -} -export var timestampExtension = { - type: EXT_TIMESTAMP, - encode: encodeTimestampExtension, - decode: decodeTimestampExtension, -}; -//# sourceMappingURL=timestamp.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/timestamp.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/timestamp.mjs.map deleted file mode 100644 index cfb7100..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/timestamp.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timestamp.mjs","sourceRoot":"","sources":["../src/timestamp.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/int.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/int.mjs deleted file mode 100644 index 139369b..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/int.mjs +++ /dev/null @@ -1,27 +0,0 @@ -// Integer Utility -export var UINT32_MAX = 4294967295; -// DataView extension to handle int64 / uint64, -// where the actual range is 53-bits integer (a.k.a. safe integer) -export function setUint64(view, offset, value) { - var high = value / 4294967296; - var low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} -export function setInt64(view, offset, value) { - var high = Math.floor(value / 4294967296); - var low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} -export function getInt64(view, offset) { - var high = view.getInt32(offset); - var low = view.getUint32(offset + 4); - return high * 4294967296 + low; -} -export function getUint64(view, offset) { - var high = view.getUint32(offset); - var low = view.getUint32(offset + 4); - return high * 4294967296 + low; -} -//# sourceMappingURL=int.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/int.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/int.mjs.map deleted file mode 100644 index 52d29e8..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/int.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"int.mjs","sourceRoot":"","sources":["../../src/utils/int.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,MAAM,CAAC,IAAM,UAAU,GAAG,UAAW,CAAC;AAEtC,+CAA+C;AAC/C,kEAAkE;AAElE,MAAM,UAAU,SAAS,CAAC,IAAc,EAAE,MAAc,EAAE,KAAa;IACrE,IAAM,IAAI,GAAG,KAAK,GAAG,UAAa,CAAC;IACnC,IAAM,GAAG,GAAG,KAAK,CAAC,CAAC,sCAAsC;IACzD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAc,EAAE,MAAc,EAAE,KAAa;IACpE,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,UAAa,CAAC,CAAC;IAC/C,IAAM,GAAG,GAAG,KAAK,CAAC,CAAC,sCAAsC;IACzD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAc,EAAE,MAAc;IACrD,IAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvC,OAAO,IAAI,GAAG,UAAa,GAAG,GAAG,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAc,EAAE,MAAc;IACtD,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACpC,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvC,OAAO,IAAI,GAAG,UAAa,GAAG,GAAG,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/prettyByte.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/prettyByte.mjs deleted file mode 100644 index b5cbaf9..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/prettyByte.mjs +++ /dev/null @@ -1,4 +0,0 @@ -export function prettyByte(byte) { - return "".concat(byte < 0 ? "-" : "", "0x").concat(Math.abs(byte).toString(16).padStart(2, "0")); -} -//# sourceMappingURL=prettyByte.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/prettyByte.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/prettyByte.mjs.map deleted file mode 100644 index eef54de..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/prettyByte.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prettyByte.mjs","sourceRoot":"","sources":["../../src/utils/prettyByte.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,UAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,eAAK,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAE,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/stream.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/stream.mjs deleted file mode 100644 index 51e9d8a..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/stream.mjs +++ /dev/null @@ -1,92 +0,0 @@ -// utility for whatwg streams -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } -var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; -export function isAsyncIterable(object) { - return object[Symbol.asyncIterator] != null; -} -function assertNonNull(value) { - if (value == null) { - throw new Error("Assertion Failure: value must not be null nor undefined"); - } -} -export function asyncIterableFromStream(stream) { - return __asyncGenerator(this, arguments, function asyncIterableFromStream_1() { - var reader, _a, done, value; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - reader = stream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - if (!true) return [3 /*break*/, 8]; - return [4 /*yield*/, __await(reader.read())]; - case 3: - _a = _b.sent(), done = _a.done, value = _a.value; - if (!done) return [3 /*break*/, 5]; - return [4 /*yield*/, __await(void 0)]; - case 4: return [2 /*return*/, _b.sent()]; - case 5: - assertNonNull(value); - return [4 /*yield*/, __await(value)]; - case 6: return [4 /*yield*/, _b.sent()]; - case 7: - _b.sent(); - return [3 /*break*/, 2]; - case 8: return [3 /*break*/, 10]; - case 9: - reader.releaseLock(); - return [7 /*endfinally*/]; - case 10: return [2 /*return*/]; - } - }); - }); -} -export function ensureAsyncIterable(streamLike) { - if (isAsyncIterable(streamLike)) { - return streamLike; - } - else { - return asyncIterableFromStream(streamLike); - } -} -//# sourceMappingURL=stream.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/stream.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/stream.mjs.map deleted file mode 100644 index ad04a36..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/stream.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stream.mjs","sourceRoot":"","sources":["../../src/utils/stream.ts"],"names":[],"mappings":"AAAA,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQ7B,MAAM,UAAU,eAAe,CAAI,MAA6B;IAC9D,OAAQ,MAAc,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;AACvD,CAAC;AAED,SAAS,aAAa,CAAI,KAA2B;IACnD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;AACH,CAAC;AAED,MAAM,UAAiB,uBAAuB,CAAI,MAAyB;;;;;;oBACnE,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;;;;;;yBAGzB,IAAI;oBACe,6BAAM,MAAM,CAAC,IAAI,EAAE,GAAA;;oBAArC,KAAkB,SAAmB,EAAnC,IAAI,UAAA,EAAE,KAAK,WAAA;yBACf,IAAI,EAAJ,wBAAI;;wBACN,iCAAO;;oBAET,aAAa,CAAC,KAAK,CAAC,CAAC;iDACf,KAAK;wBAAX,gCAAW;;oBAAX,SAAW,CAAC;;;;oBAGd,MAAM,CAAC,WAAW,EAAE,CAAC;;;;;;CAExB;AAED,MAAM,UAAU,mBAAmB,CAAI,UAAiC;IACtE,IAAI,eAAe,CAAC,UAAU,CAAC,EAAE;QAC/B,OAAO,UAAU,CAAC;KACnB;SAAM;QACL,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;KAC5C;AACH,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/typedArrays.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/typedArrays.mjs deleted file mode 100644 index fe3ba43..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/typedArrays.mjs +++ /dev/null @@ -1,23 +0,0 @@ -export function ensureUint8Array(buffer) { - if (buffer instanceof Uint8Array) { - return buffer; - } - else if (ArrayBuffer.isView(buffer)) { - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - } - else if (buffer instanceof ArrayBuffer) { - return new Uint8Array(buffer); - } - else { - // ArrayLike - return Uint8Array.from(buffer); - } -} -export function createDataView(buffer) { - if (buffer instanceof ArrayBuffer) { - return new DataView(buffer); - } - var bufferView = ensureUint8Array(buffer); - return new DataView(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength); -} -//# sourceMappingURL=typedArrays.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/typedArrays.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/typedArrays.mjs.map deleted file mode 100644 index 1a116d8..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/typedArrays.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"typedArrays.mjs","sourceRoot":"","sources":["../../src/utils/typedArrays.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,MAAsE;IACrG,IAAI,MAAM,YAAY,UAAU,EAAE;QAChC,OAAO,MAAM,CAAC;KACf;SAAM,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;QACrC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;KAC5E;SAAM,IAAI,MAAM,YAAY,WAAW,EAAE;QACxC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;KAC/B;SAAM;QACL,oBAAoB;QACpB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAyD;IACtF,IAAI,MAAM,YAAY,WAAW,EAAE;QACjC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;KAC7B;IAED,IAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/utf8.mjs b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/utf8.mjs deleted file mode 100644 index 0cc4f8e..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/utf8.mjs +++ /dev/null @@ -1,160 +0,0 @@ -var _a, _b, _c; -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ -import { UINT32_MAX } from "./int.mjs"; -var TEXT_ENCODING_AVAILABLE = (typeof process === "undefined" || ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a["TEXT_ENCODING"]) !== "never") && - typeof TextEncoder !== "undefined" && - typeof TextDecoder !== "undefined"; -export function utf8Count(str) { - var strLength = str.length; - var byteLength = 0; - var pos = 0; - while (pos < strLength) { - var value = str.charCodeAt(pos++); - if ((value & 0xffffff80) === 0) { - // 1-byte - byteLength++; - continue; - } - else if ((value & 0xfffff800) === 0) { - // 2-bytes - byteLength += 2; - } - else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - var extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - if ((value & 0xffff0000) === 0) { - // 3-byte - byteLength += 3; - } - else { - // 4-byte - byteLength += 4; - } - } - } - return byteLength; -} -export function utf8EncodeJs(str, output, outputOffset) { - var strLength = str.length; - var offset = outputOffset; - var pos = 0; - while (pos < strLength) { - var value = str.charCodeAt(pos++); - if ((value & 0xffffff80) === 0) { - // 1-byte - output[offset++] = value; - continue; - } - else if ((value & 0xfffff800) === 0) { - // 2-bytes - output[offset++] = ((value >> 6) & 0x1f) | 0xc0; - } - else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - var extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - if ((value & 0xffff0000) === 0) { - // 3-byte - output[offset++] = ((value >> 12) & 0x0f) | 0xe0; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } - else { - // 4-byte - output[offset++] = ((value >> 18) & 0x07) | 0xf0; - output[offset++] = ((value >> 12) & 0x3f) | 0x80; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } - } - output[offset++] = (value & 0x3f) | 0x80; - } -} -var sharedTextEncoder = TEXT_ENCODING_AVAILABLE ? new TextEncoder() : undefined; -export var TEXT_ENCODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? UINT32_MAX - : typeof process !== "undefined" && ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b["TEXT_ENCODING"]) !== "force" - ? 200 - : 0; -function utf8EncodeTEencode(str, output, outputOffset) { - output.set(sharedTextEncoder.encode(str), outputOffset); -} -function utf8EncodeTEencodeInto(str, output, outputOffset) { - sharedTextEncoder.encodeInto(str, output.subarray(outputOffset)); -} -export var utf8EncodeTE = (sharedTextEncoder === null || sharedTextEncoder === void 0 ? void 0 : sharedTextEncoder.encodeInto) ? utf8EncodeTEencodeInto : utf8EncodeTEencode; -var CHUNK_SIZE = 4096; -export function utf8DecodeJs(bytes, inputOffset, byteLength) { - var offset = inputOffset; - var end = offset + byteLength; - var units = []; - var result = ""; - while (offset < end) { - var byte1 = bytes[offset++]; - if ((byte1 & 0x80) === 0) { - // 1 byte - units.push(byte1); - } - else if ((byte1 & 0xe0) === 0xc0) { - // 2 bytes - var byte2 = bytes[offset++] & 0x3f; - units.push(((byte1 & 0x1f) << 6) | byte2); - } - else if ((byte1 & 0xf0) === 0xe0) { - // 3 bytes - var byte2 = bytes[offset++] & 0x3f; - var byte3 = bytes[offset++] & 0x3f; - units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3); - } - else if ((byte1 & 0xf8) === 0xf0) { - // 4 bytes - var byte2 = bytes[offset++] & 0x3f; - var byte3 = bytes[offset++] & 0x3f; - var byte4 = bytes[offset++] & 0x3f; - var unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - if (unit > 0xffff) { - unit -= 0x10000; - units.push(((unit >>> 10) & 0x3ff) | 0xd800); - unit = 0xdc00 | (unit & 0x3ff); - } - units.push(unit); - } - else { - units.push(byte1); - } - if (units.length >= CHUNK_SIZE) { - result += String.fromCharCode.apply(String, units); - units.length = 0; - } - } - if (units.length > 0) { - result += String.fromCharCode.apply(String, units); - } - return result; -} -var sharedTextDecoder = TEXT_ENCODING_AVAILABLE ? new TextDecoder() : null; -export var TEXT_DECODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? UINT32_MAX - : typeof process !== "undefined" && ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c["TEXT_DECODER"]) !== "force" - ? 200 - : 0; -export function utf8DecodeTD(bytes, inputOffset, byteLength) { - var stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength); - return sharedTextDecoder.decode(stringBytes); -} -//# sourceMappingURL=utf8.mjs.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/utf8.mjs.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/utf8.mjs.map deleted file mode 100644 index 9a84a9a..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+esm/utils/utf8.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utf8.mjs","sourceRoot":"","sources":["../../src/utils/utf8.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.js b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.js deleted file mode 100644 index 4b22aa6..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.js +++ /dev/null @@ -1,2031 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["MessagePack"] = factory(); - else - root["MessagePack"] = factory(); -})(this, function() { -return /******/ (function() { // webpackBootstrap -/******/ "use strict"; -/******/ // The require scope -/******/ var __webpack_require__ = {}; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ !function() { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ !function() { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ }(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "DataViewIndexOutOfBoundsError": function() { return /* reexport */ DataViewIndexOutOfBoundsError; }, - "DecodeError": function() { return /* reexport */ DecodeError; }, - "Decoder": function() { return /* reexport */ Decoder; }, - "EXT_TIMESTAMP": function() { return /* reexport */ EXT_TIMESTAMP; }, - "Encoder": function() { return /* reexport */ Encoder; }, - "ExtData": function() { return /* reexport */ ExtData; }, - "ExtensionCodec": function() { return /* reexport */ ExtensionCodec; }, - "decode": function() { return /* reexport */ decode; }, - "decodeArrayStream": function() { return /* reexport */ decodeArrayStream; }, - "decodeAsync": function() { return /* reexport */ decodeAsync; }, - "decodeMulti": function() { return /* reexport */ decodeMulti; }, - "decodeMultiStream": function() { return /* reexport */ decodeMultiStream; }, - "decodeStream": function() { return /* reexport */ decodeStream; }, - "decodeTimestampExtension": function() { return /* reexport */ decodeTimestampExtension; }, - "decodeTimestampToTimeSpec": function() { return /* reexport */ decodeTimestampToTimeSpec; }, - "encode": function() { return /* reexport */ encode; }, - "encodeDateToTimeSpec": function() { return /* reexport */ encodeDateToTimeSpec; }, - "encodeTimeSpecToTimestamp": function() { return /* reexport */ encodeTimeSpecToTimestamp; }, - "encodeTimestampExtension": function() { return /* reexport */ encodeTimestampExtension; } -}); - -;// CONCATENATED MODULE: ./src/utils/int.ts -// Integer Utility -var UINT32_MAX = 4294967295; -// DataView extension to handle int64 / uint64, -// where the actual range is 53-bits integer (a.k.a. safe integer) -function setUint64(view, offset, value) { - var high = value / 4294967296; - var low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} -function setInt64(view, offset, value) { - var high = Math.floor(value / 4294967296); - var low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} -function getInt64(view, offset) { - var high = view.getInt32(offset); - var low = view.getUint32(offset + 4); - return high * 4294967296 + low; -} -function getUint64(view, offset) { - var high = view.getUint32(offset); - var low = view.getUint32(offset + 4); - return high * 4294967296 + low; -} - -;// CONCATENATED MODULE: ./src/utils/utf8.ts -var __read = (undefined && undefined.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var _a, _b, _c; -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ - -var TEXT_ENCODING_AVAILABLE = (typeof process === "undefined" || ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a["TEXT_ENCODING"]) !== "never") && - typeof TextEncoder !== "undefined" && - typeof TextDecoder !== "undefined"; -function utf8Count(str) { - var strLength = str.length; - var byteLength = 0; - var pos = 0; - while (pos < strLength) { - var value = str.charCodeAt(pos++); - if ((value & 0xffffff80) === 0) { - // 1-byte - byteLength++; - continue; - } - else if ((value & 0xfffff800) === 0) { - // 2-bytes - byteLength += 2; - } - else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - var extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - if ((value & 0xffff0000) === 0) { - // 3-byte - byteLength += 3; - } - else { - // 4-byte - byteLength += 4; - } - } - } - return byteLength; -} -function utf8EncodeJs(str, output, outputOffset) { - var strLength = str.length; - var offset = outputOffset; - var pos = 0; - while (pos < strLength) { - var value = str.charCodeAt(pos++); - if ((value & 0xffffff80) === 0) { - // 1-byte - output[offset++] = value; - continue; - } - else if ((value & 0xfffff800) === 0) { - // 2-bytes - output[offset++] = ((value >> 6) & 0x1f) | 0xc0; - } - else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - var extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - if ((value & 0xffff0000) === 0) { - // 3-byte - output[offset++] = ((value >> 12) & 0x0f) | 0xe0; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } - else { - // 4-byte - output[offset++] = ((value >> 18) & 0x07) | 0xf0; - output[offset++] = ((value >> 12) & 0x3f) | 0x80; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } - } - output[offset++] = (value & 0x3f) | 0x80; - } -} -var sharedTextEncoder = TEXT_ENCODING_AVAILABLE ? new TextEncoder() : undefined; -var TEXT_ENCODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? UINT32_MAX - : typeof process !== "undefined" && ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b["TEXT_ENCODING"]) !== "force" - ? 200 - : 0; -function utf8EncodeTEencode(str, output, outputOffset) { - output.set(sharedTextEncoder.encode(str), outputOffset); -} -function utf8EncodeTEencodeInto(str, output, outputOffset) { - sharedTextEncoder.encodeInto(str, output.subarray(outputOffset)); -} -var utf8EncodeTE = (sharedTextEncoder === null || sharedTextEncoder === void 0 ? void 0 : sharedTextEncoder.encodeInto) ? utf8EncodeTEencodeInto : utf8EncodeTEencode; -var CHUNK_SIZE = 4096; -function utf8DecodeJs(bytes, inputOffset, byteLength) { - var offset = inputOffset; - var end = offset + byteLength; - var units = []; - var result = ""; - while (offset < end) { - var byte1 = bytes[offset++]; - if ((byte1 & 0x80) === 0) { - // 1 byte - units.push(byte1); - } - else if ((byte1 & 0xe0) === 0xc0) { - // 2 bytes - var byte2 = bytes[offset++] & 0x3f; - units.push(((byte1 & 0x1f) << 6) | byte2); - } - else if ((byte1 & 0xf0) === 0xe0) { - // 3 bytes - var byte2 = bytes[offset++] & 0x3f; - var byte3 = bytes[offset++] & 0x3f; - units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3); - } - else if ((byte1 & 0xf8) === 0xf0) { - // 4 bytes - var byte2 = bytes[offset++] & 0x3f; - var byte3 = bytes[offset++] & 0x3f; - var byte4 = bytes[offset++] & 0x3f; - var unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - if (unit > 0xffff) { - unit -= 0x10000; - units.push(((unit >>> 10) & 0x3ff) | 0xd800); - unit = 0xdc00 | (unit & 0x3ff); - } - units.push(unit); - } - else { - units.push(byte1); - } - if (units.length >= CHUNK_SIZE) { - result += String.fromCharCode.apply(String, __spreadArray([], __read(units), false)); - units.length = 0; - } - } - if (units.length > 0) { - result += String.fromCharCode.apply(String, __spreadArray([], __read(units), false)); - } - return result; -} -var sharedTextDecoder = TEXT_ENCODING_AVAILABLE ? new TextDecoder() : null; -var TEXT_DECODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? UINT32_MAX - : typeof process !== "undefined" && ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c["TEXT_DECODER"]) !== "force" - ? 200 - : 0; -function utf8DecodeTD(bytes, inputOffset, byteLength) { - var stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength); - return sharedTextDecoder.decode(stringBytes); -} - -;// CONCATENATED MODULE: ./src/ExtData.ts -/** - * ExtData is used to handle Extension Types that are not registered to ExtensionCodec. - */ -var ExtData = /** @class */ (function () { - function ExtData(type, data) { - this.type = type; - this.data = data; - } - return ExtData; -}()); - - -;// CONCATENATED MODULE: ./src/DecodeError.ts -var __extends = (undefined && undefined.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var DecodeError = /** @class */ (function (_super) { - __extends(DecodeError, _super); - function DecodeError(message) { - var _this = _super.call(this, message) || this; - // fix the prototype chain in a cross-platform way - var proto = Object.create(DecodeError.prototype); - Object.setPrototypeOf(_this, proto); - Object.defineProperty(_this, "name", { - configurable: true, - enumerable: false, - value: DecodeError.name, - }); - return _this; - } - return DecodeError; -}(Error)); - - -;// CONCATENATED MODULE: ./src/timestamp.ts -// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type - - -var EXT_TIMESTAMP = -1; -var TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int -var TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int -function encodeTimeSpecToTimestamp(_a) { - var sec = _a.sec, nsec = _a.nsec; - if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) { - // Here sec >= 0 && nsec >= 0 - if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) { - // timestamp 32 = { sec32 (unsigned) } - var rv = new Uint8Array(4); - var view = new DataView(rv.buffer); - view.setUint32(0, sec); - return rv; - } - else { - // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) } - var secHigh = sec / 0x100000000; - var secLow = sec & 0xffffffff; - var rv = new Uint8Array(8); - var view = new DataView(rv.buffer); - // nsec30 | secHigh2 - view.setUint32(0, (nsec << 2) | (secHigh & 0x3)); - // secLow32 - view.setUint32(4, secLow); - return rv; - } - } - else { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - var rv = new Uint8Array(12); - var view = new DataView(rv.buffer); - view.setUint32(0, nsec); - setInt64(view, 4, sec); - return rv; - } -} -function encodeDateToTimeSpec(date) { - var msec = date.getTime(); - var sec = Math.floor(msec / 1e3); - var nsec = (msec - sec * 1e3) * 1e6; - // Normalizes { sec, nsec } to ensure nsec is unsigned. - var nsecInSec = Math.floor(nsec / 1e9); - return { - sec: sec + nsecInSec, - nsec: nsec - nsecInSec * 1e9, - }; -} -function encodeTimestampExtension(object) { - if (object instanceof Date) { - var timeSpec = encodeDateToTimeSpec(object); - return encodeTimeSpecToTimestamp(timeSpec); - } - else { - return null; - } -} -function decodeTimestampToTimeSpec(data) { - var view = new DataView(data.buffer, data.byteOffset, data.byteLength); - // data may be 32, 64, or 96 bits - switch (data.byteLength) { - case 4: { - // timestamp 32 = { sec32 } - var sec = view.getUint32(0); - var nsec = 0; - return { sec: sec, nsec: nsec }; - } - case 8: { - // timestamp 64 = { nsec30, sec34 } - var nsec30AndSecHigh2 = view.getUint32(0); - var secLow32 = view.getUint32(4); - var sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32; - var nsec = nsec30AndSecHigh2 >>> 2; - return { sec: sec, nsec: nsec }; - } - case 12: { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - var sec = getInt64(view, 4); - var nsec = view.getUint32(0); - return { sec: sec, nsec: nsec }; - } - default: - throw new DecodeError("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(data.length)); - } -} -function decodeTimestampExtension(data) { - var timeSpec = decodeTimestampToTimeSpec(data); - return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6); -} -var timestampExtension = { - type: EXT_TIMESTAMP, - encode: encodeTimestampExtension, - decode: decodeTimestampExtension, -}; - -;// CONCATENATED MODULE: ./src/ExtensionCodec.ts -// ExtensionCodec to handle MessagePack extensions - - -var ExtensionCodec = /** @class */ (function () { - function ExtensionCodec() { - // built-in extensions - this.builtInEncoders = []; - this.builtInDecoders = []; - // custom extensions - this.encoders = []; - this.decoders = []; - this.register(timestampExtension); - } - ExtensionCodec.prototype.register = function (_a) { - var type = _a.type, encode = _a.encode, decode = _a.decode; - if (type >= 0) { - // custom extensions - this.encoders[type] = encode; - this.decoders[type] = decode; - } - else { - // built-in extensions - var index = 1 + type; - this.builtInEncoders[index] = encode; - this.builtInDecoders[index] = decode; - } - }; - ExtensionCodec.prototype.tryToEncode = function (object, context) { - // built-in extensions - for (var i = 0; i < this.builtInEncoders.length; i++) { - var encodeExt = this.builtInEncoders[i]; - if (encodeExt != null) { - var data = encodeExt(object, context); - if (data != null) { - var type = -1 - i; - return new ExtData(type, data); - } - } - } - // custom extensions - for (var i = 0; i < this.encoders.length; i++) { - var encodeExt = this.encoders[i]; - if (encodeExt != null) { - var data = encodeExt(object, context); - if (data != null) { - var type = i; - return new ExtData(type, data); - } - } - } - if (object instanceof ExtData) { - // to keep ExtData as is - return object; - } - return null; - }; - ExtensionCodec.prototype.decode = function (data, type, context) { - var decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type]; - if (decodeExt) { - return decodeExt(data, type, context); - } - else { - // decode() does not fail, returns ExtData instead. - return new ExtData(type, data); - } - }; - ExtensionCodec.defaultCodec = new ExtensionCodec(); - return ExtensionCodec; -}()); - - -;// CONCATENATED MODULE: ./src/utils/typedArrays.ts -function ensureUint8Array(buffer) { - if (buffer instanceof Uint8Array) { - return buffer; - } - else if (ArrayBuffer.isView(buffer)) { - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - } - else if (buffer instanceof ArrayBuffer) { - return new Uint8Array(buffer); - } - else { - // ArrayLike - return Uint8Array.from(buffer); - } -} -function createDataView(buffer) { - if (buffer instanceof ArrayBuffer) { - return new DataView(buffer); - } - var bufferView = ensureUint8Array(buffer); - return new DataView(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength); -} - -;// CONCATENATED MODULE: ./src/Encoder.ts -var Encoder_values = (undefined && undefined.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; - - - - -var DEFAULT_MAX_DEPTH = 100; -var DEFAULT_INITIAL_BUFFER_SIZE = 2048; -var Encoder = /** @class */ (function () { - function Encoder(extensionCodec, context, maxDepth, initialBufferSize, sortKeys, forceFloat32, ignoreUndefined, forceIntegerToFloat) { - if (extensionCodec === void 0) { extensionCodec = ExtensionCodec.defaultCodec; } - if (context === void 0) { context = undefined; } - if (maxDepth === void 0) { maxDepth = DEFAULT_MAX_DEPTH; } - if (initialBufferSize === void 0) { initialBufferSize = DEFAULT_INITIAL_BUFFER_SIZE; } - if (sortKeys === void 0) { sortKeys = false; } - if (forceFloat32 === void 0) { forceFloat32 = false; } - if (ignoreUndefined === void 0) { ignoreUndefined = false; } - if (forceIntegerToFloat === void 0) { forceIntegerToFloat = false; } - this.extensionCodec = extensionCodec; - this.context = context; - this.maxDepth = maxDepth; - this.initialBufferSize = initialBufferSize; - this.sortKeys = sortKeys; - this.forceFloat32 = forceFloat32; - this.ignoreUndefined = ignoreUndefined; - this.forceIntegerToFloat = forceIntegerToFloat; - this.pos = 0; - this.view = new DataView(new ArrayBuffer(this.initialBufferSize)); - this.bytes = new Uint8Array(this.view.buffer); - } - Encoder.prototype.getUint8Array = function () { - return this.bytes.subarray(0, this.pos); - }; - Encoder.prototype.reinitializeState = function () { - this.pos = 0; - }; - Encoder.prototype.encode = function (object) { - this.reinitializeState(); - this.doEncode(object, 1); - return this.getUint8Array(); - }; - Encoder.prototype.doEncode = function (object, depth) { - if (depth > this.maxDepth) { - throw new Error("Too deep objects in depth ".concat(depth)); - } - if (object == null) { - this.encodeNil(); - } - else if (typeof object === "boolean") { - this.encodeBoolean(object); - } - else if (typeof object === "number") { - this.encodeNumber(object); - } - else if (typeof object === "string") { - this.encodeString(object); - } - else { - this.encodeObject(object, depth); - } - }; - Encoder.prototype.ensureBufferSizeToWrite = function (sizeToWrite) { - var requiredSize = this.pos + sizeToWrite; - if (this.view.byteLength < requiredSize) { - this.resizeBuffer(requiredSize * 2); - } - }; - Encoder.prototype.resizeBuffer = function (newSize) { - var newBuffer = new ArrayBuffer(newSize); - var newBytes = new Uint8Array(newBuffer); - var newView = new DataView(newBuffer); - newBytes.set(this.bytes); - this.view = newView; - this.bytes = newBytes; - }; - Encoder.prototype.encodeNil = function () { - this.writeU8(0xc0); - }; - Encoder.prototype.encodeBoolean = function (object) { - if (object === false) { - this.writeU8(0xc2); - } - else { - this.writeU8(0xc3); - } - }; - Encoder.prototype.encodeNumber = function (object) { - if (Number.isSafeInteger(object) && !this.forceIntegerToFloat) { - if (object >= 0) { - if (object < 0x80) { - // positive fixint - this.writeU8(object); - } - else if (object < 0x100) { - // uint 8 - this.writeU8(0xcc); - this.writeU8(object); - } - else if (object < 0x10000) { - // uint 16 - this.writeU8(0xcd); - this.writeU16(object); - } - else if (object < 0x100000000) { - // uint 32 - this.writeU8(0xce); - this.writeU32(object); - } - else { - // uint 64 - this.writeU8(0xcf); - this.writeU64(object); - } - } - else { - if (object >= -0x20) { - // negative fixint - this.writeU8(0xe0 | (object + 0x20)); - } - else if (object >= -0x80) { - // int 8 - this.writeU8(0xd0); - this.writeI8(object); - } - else if (object >= -0x8000) { - // int 16 - this.writeU8(0xd1); - this.writeI16(object); - } - else if (object >= -0x80000000) { - // int 32 - this.writeU8(0xd2); - this.writeI32(object); - } - else { - // int 64 - this.writeU8(0xd3); - this.writeI64(object); - } - } - } - else { - // non-integer numbers - if (this.forceFloat32) { - // float 32 - this.writeU8(0xca); - this.writeF32(object); - } - else { - // float 64 - this.writeU8(0xcb); - this.writeF64(object); - } - } - }; - Encoder.prototype.writeStringHeader = function (byteLength) { - if (byteLength < 32) { - // fixstr - this.writeU8(0xa0 + byteLength); - } - else if (byteLength < 0x100) { - // str 8 - this.writeU8(0xd9); - this.writeU8(byteLength); - } - else if (byteLength < 0x10000) { - // str 16 - this.writeU8(0xda); - this.writeU16(byteLength); - } - else if (byteLength < 0x100000000) { - // str 32 - this.writeU8(0xdb); - this.writeU32(byteLength); - } - else { - throw new Error("Too long string: ".concat(byteLength, " bytes in UTF-8")); - } - }; - Encoder.prototype.encodeString = function (object) { - var maxHeaderSize = 1 + 4; - var strLength = object.length; - if (strLength > TEXT_ENCODER_THRESHOLD) { - var byteLength = utf8Count(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - utf8EncodeTE(object, this.bytes, this.pos); - this.pos += byteLength; - } - else { - var byteLength = utf8Count(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - utf8EncodeJs(object, this.bytes, this.pos); - this.pos += byteLength; - } - }; - Encoder.prototype.encodeObject = function (object, depth) { - // try to encode objects with custom codec first of non-primitives - var ext = this.extensionCodec.tryToEncode(object, this.context); - if (ext != null) { - this.encodeExtension(ext); - } - else if (Array.isArray(object)) { - this.encodeArray(object, depth); - } - else if (ArrayBuffer.isView(object)) { - this.encodeBinary(object); - } - else if (typeof object === "object") { - this.encodeMap(object, depth); - } - else { - // symbol, function and other special object come here unless extensionCodec handles them. - throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(object))); - } - }; - Encoder.prototype.encodeBinary = function (object) { - var size = object.byteLength; - if (size < 0x100) { - // bin 8 - this.writeU8(0xc4); - this.writeU8(size); - } - else if (size < 0x10000) { - // bin 16 - this.writeU8(0xc5); - this.writeU16(size); - } - else if (size < 0x100000000) { - // bin 32 - this.writeU8(0xc6); - this.writeU32(size); - } - else { - throw new Error("Too large binary: ".concat(size)); - } - var bytes = ensureUint8Array(object); - this.writeU8a(bytes); - }; - Encoder.prototype.encodeArray = function (object, depth) { - var e_1, _a; - var size = object.length; - if (size < 16) { - // fixarray - this.writeU8(0x90 + size); - } - else if (size < 0x10000) { - // array 16 - this.writeU8(0xdc); - this.writeU16(size); - } - else if (size < 0x100000000) { - // array 32 - this.writeU8(0xdd); - this.writeU32(size); - } - else { - throw new Error("Too large array: ".concat(size)); - } - try { - for (var object_1 = Encoder_values(object), object_1_1 = object_1.next(); !object_1_1.done; object_1_1 = object_1.next()) { - var item = object_1_1.value; - this.doEncode(item, depth + 1); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (object_1_1 && !object_1_1.done && (_a = object_1.return)) _a.call(object_1); - } - finally { if (e_1) throw e_1.error; } - } - }; - Encoder.prototype.countWithoutUndefined = function (object, keys) { - var e_2, _a; - var count = 0; - try { - for (var keys_1 = Encoder_values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) { - var key = keys_1_1.value; - if (object[key] !== undefined) { - count++; - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1); - } - finally { if (e_2) throw e_2.error; } - } - return count; - }; - Encoder.prototype.encodeMap = function (object, depth) { - var e_3, _a; - var keys = Object.keys(object); - if (this.sortKeys) { - keys.sort(); - } - var size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length; - if (size < 16) { - // fixmap - this.writeU8(0x80 + size); - } - else if (size < 0x10000) { - // map 16 - this.writeU8(0xde); - this.writeU16(size); - } - else if (size < 0x100000000) { - // map 32 - this.writeU8(0xdf); - this.writeU32(size); - } - else { - throw new Error("Too large map object: ".concat(size)); - } - try { - for (var keys_2 = Encoder_values(keys), keys_2_1 = keys_2.next(); !keys_2_1.done; keys_2_1 = keys_2.next()) { - var key = keys_2_1.value; - var value = object[key]; - if (!(this.ignoreUndefined && value === undefined)) { - this.encodeString(key); - this.doEncode(value, depth + 1); - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (keys_2_1 && !keys_2_1.done && (_a = keys_2.return)) _a.call(keys_2); - } - finally { if (e_3) throw e_3.error; } - } - }; - Encoder.prototype.encodeExtension = function (ext) { - var size = ext.data.length; - if (size === 1) { - // fixext 1 - this.writeU8(0xd4); - } - else if (size === 2) { - // fixext 2 - this.writeU8(0xd5); - } - else if (size === 4) { - // fixext 4 - this.writeU8(0xd6); - } - else if (size === 8) { - // fixext 8 - this.writeU8(0xd7); - } - else if (size === 16) { - // fixext 16 - this.writeU8(0xd8); - } - else if (size < 0x100) { - // ext 8 - this.writeU8(0xc7); - this.writeU8(size); - } - else if (size < 0x10000) { - // ext 16 - this.writeU8(0xc8); - this.writeU16(size); - } - else if (size < 0x100000000) { - // ext 32 - this.writeU8(0xc9); - this.writeU32(size); - } - else { - throw new Error("Too large extension object: ".concat(size)); - } - this.writeI8(ext.type); - this.writeU8a(ext.data); - }; - Encoder.prototype.writeU8 = function (value) { - this.ensureBufferSizeToWrite(1); - this.view.setUint8(this.pos, value); - this.pos++; - }; - Encoder.prototype.writeU8a = function (values) { - var size = values.length; - this.ensureBufferSizeToWrite(size); - this.bytes.set(values, this.pos); - this.pos += size; - }; - Encoder.prototype.writeI8 = function (value) { - this.ensureBufferSizeToWrite(1); - this.view.setInt8(this.pos, value); - this.pos++; - }; - Encoder.prototype.writeU16 = function (value) { - this.ensureBufferSizeToWrite(2); - this.view.setUint16(this.pos, value); - this.pos += 2; - }; - Encoder.prototype.writeI16 = function (value) { - this.ensureBufferSizeToWrite(2); - this.view.setInt16(this.pos, value); - this.pos += 2; - }; - Encoder.prototype.writeU32 = function (value) { - this.ensureBufferSizeToWrite(4); - this.view.setUint32(this.pos, value); - this.pos += 4; - }; - Encoder.prototype.writeI32 = function (value) { - this.ensureBufferSizeToWrite(4); - this.view.setInt32(this.pos, value); - this.pos += 4; - }; - Encoder.prototype.writeF32 = function (value) { - this.ensureBufferSizeToWrite(4); - this.view.setFloat32(this.pos, value); - this.pos += 4; - }; - Encoder.prototype.writeF64 = function (value) { - this.ensureBufferSizeToWrite(8); - this.view.setFloat64(this.pos, value); - this.pos += 8; - }; - Encoder.prototype.writeU64 = function (value) { - this.ensureBufferSizeToWrite(8); - setUint64(this.view, this.pos, value); - this.pos += 8; - }; - Encoder.prototype.writeI64 = function (value) { - this.ensureBufferSizeToWrite(8); - setInt64(this.view, this.pos, value); - this.pos += 8; - }; - return Encoder; -}()); - - -;// CONCATENATED MODULE: ./src/encode.ts - -var defaultEncodeOptions = {}; -/** - * It encodes `value` in the MessagePack format and - * returns a byte buffer. - * - * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`. - */ -function encode(value, options) { - if (options === void 0) { options = defaultEncodeOptions; } - var encoder = new Encoder(options.extensionCodec, options.context, options.maxDepth, options.initialBufferSize, options.sortKeys, options.forceFloat32, options.ignoreUndefined, options.forceIntegerToFloat); - return encoder.encode(value); -} - -;// CONCATENATED MODULE: ./src/utils/prettyByte.ts -function prettyByte(byte) { - return "".concat(byte < 0 ? "-" : "", "0x").concat(Math.abs(byte).toString(16).padStart(2, "0")); -} - -;// CONCATENATED MODULE: ./src/CachedKeyDecoder.ts -var CachedKeyDecoder_values = (undefined && undefined.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; - -var DEFAULT_MAX_KEY_LENGTH = 16; -var DEFAULT_MAX_LENGTH_PER_KEY = 16; -var CachedKeyDecoder = /** @class */ (function () { - function CachedKeyDecoder(maxKeyLength, maxLengthPerKey) { - if (maxKeyLength === void 0) { maxKeyLength = DEFAULT_MAX_KEY_LENGTH; } - if (maxLengthPerKey === void 0) { maxLengthPerKey = DEFAULT_MAX_LENGTH_PER_KEY; } - this.maxKeyLength = maxKeyLength; - this.maxLengthPerKey = maxLengthPerKey; - this.hit = 0; - this.miss = 0; - // avoid `new Array(N)`, which makes a sparse array, - // because a sparse array is typically slower than a non-sparse array. - this.caches = []; - for (var i = 0; i < this.maxKeyLength; i++) { - this.caches.push([]); - } - } - CachedKeyDecoder.prototype.canBeCached = function (byteLength) { - return byteLength > 0 && byteLength <= this.maxKeyLength; - }; - CachedKeyDecoder.prototype.find = function (bytes, inputOffset, byteLength) { - var e_1, _a; - var records = this.caches[byteLength - 1]; - try { - FIND_CHUNK: for (var records_1 = CachedKeyDecoder_values(records), records_1_1 = records_1.next(); !records_1_1.done; records_1_1 = records_1.next()) { - var record = records_1_1.value; - var recordBytes = record.bytes; - for (var j = 0; j < byteLength; j++) { - if (recordBytes[j] !== bytes[inputOffset + j]) { - continue FIND_CHUNK; - } - } - return record.str; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (records_1_1 && !records_1_1.done && (_a = records_1.return)) _a.call(records_1); - } - finally { if (e_1) throw e_1.error; } - } - return null; - }; - CachedKeyDecoder.prototype.store = function (bytes, value) { - var records = this.caches[bytes.length - 1]; - var record = { bytes: bytes, str: value }; - if (records.length >= this.maxLengthPerKey) { - // `records` are full! - // Set `record` to an arbitrary position. - records[(Math.random() * records.length) | 0] = record; - } - else { - records.push(record); - } - }; - CachedKeyDecoder.prototype.decode = function (bytes, inputOffset, byteLength) { - var cachedValue = this.find(bytes, inputOffset, byteLength); - if (cachedValue != null) { - this.hit++; - return cachedValue; - } - this.miss++; - var str = utf8DecodeJs(bytes, inputOffset, byteLength); - // Ensure to copy a slice of bytes because the byte may be NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer. - var slicedCopyOfBytes = Uint8Array.prototype.slice.call(bytes, inputOffset, inputOffset + byteLength); - this.store(slicedCopyOfBytes, str); - return str; - }; - return CachedKeyDecoder; -}()); - - -;// CONCATENATED MODULE: ./src/Decoder.ts -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (undefined && undefined.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __asyncValues = (undefined && undefined.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -}; -var __await = (undefined && undefined.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } -var __asyncGenerator = (undefined && undefined.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; - - - - - - - -var isValidMapKeyType = function (key) { - var keyType = typeof key; - return keyType === "string" || keyType === "number"; -}; -var HEAD_BYTE_REQUIRED = -1; -var EMPTY_VIEW = new DataView(new ArrayBuffer(0)); -var EMPTY_BYTES = new Uint8Array(EMPTY_VIEW.buffer); -// IE11: Hack to support IE11. -// IE11: Drop this hack and just use RangeError when IE11 is obsolete. -var DataViewIndexOutOfBoundsError = (function () { - try { - // IE11: The spec says it should throw RangeError, - // IE11: but in IE11 it throws TypeError. - EMPTY_VIEW.getInt8(0); - } - catch (e) { - return e.constructor; - } - throw new Error("never reached"); -})(); -var MORE_DATA = new DataViewIndexOutOfBoundsError("Insufficient data"); -var sharedCachedKeyDecoder = new CachedKeyDecoder(); -var Decoder = /** @class */ (function () { - function Decoder(extensionCodec, context, maxStrLength, maxBinLength, maxArrayLength, maxMapLength, maxExtLength, keyDecoder) { - if (extensionCodec === void 0) { extensionCodec = ExtensionCodec.defaultCodec; } - if (context === void 0) { context = undefined; } - if (maxStrLength === void 0) { maxStrLength = UINT32_MAX; } - if (maxBinLength === void 0) { maxBinLength = UINT32_MAX; } - if (maxArrayLength === void 0) { maxArrayLength = UINT32_MAX; } - if (maxMapLength === void 0) { maxMapLength = UINT32_MAX; } - if (maxExtLength === void 0) { maxExtLength = UINT32_MAX; } - if (keyDecoder === void 0) { keyDecoder = sharedCachedKeyDecoder; } - this.extensionCodec = extensionCodec; - this.context = context; - this.maxStrLength = maxStrLength; - this.maxBinLength = maxBinLength; - this.maxArrayLength = maxArrayLength; - this.maxMapLength = maxMapLength; - this.maxExtLength = maxExtLength; - this.keyDecoder = keyDecoder; - this.totalPos = 0; - this.pos = 0; - this.view = EMPTY_VIEW; - this.bytes = EMPTY_BYTES; - this.headByte = HEAD_BYTE_REQUIRED; - this.stack = []; - } - Decoder.prototype.reinitializeState = function () { - this.totalPos = 0; - this.headByte = HEAD_BYTE_REQUIRED; - this.stack.length = 0; - // view, bytes, and pos will be re-initialized in setBuffer() - }; - Decoder.prototype.setBuffer = function (buffer) { - this.bytes = ensureUint8Array(buffer); - this.view = createDataView(this.bytes); - this.pos = 0; - }; - Decoder.prototype.appendBuffer = function (buffer) { - if (this.headByte === HEAD_BYTE_REQUIRED && !this.hasRemaining(1)) { - this.setBuffer(buffer); - } - else { - var remainingData = this.bytes.subarray(this.pos); - var newData = ensureUint8Array(buffer); - // concat remainingData + newData - var newBuffer = new Uint8Array(remainingData.length + newData.length); - newBuffer.set(remainingData); - newBuffer.set(newData, remainingData.length); - this.setBuffer(newBuffer); - } - }; - Decoder.prototype.hasRemaining = function (size) { - return this.view.byteLength - this.pos >= size; - }; - Decoder.prototype.createExtraByteError = function (posToShow) { - var _a = this, view = _a.view, pos = _a.pos; - return new RangeError("Extra ".concat(view.byteLength - pos, " of ").concat(view.byteLength, " byte(s) found at buffer[").concat(posToShow, "]")); - }; - /** - * @throws {DecodeError} - * @throws {RangeError} - */ - Decoder.prototype.decode = function (buffer) { - this.reinitializeState(); - this.setBuffer(buffer); - var object = this.doDecodeSync(); - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.pos); - } - return object; - }; - Decoder.prototype.decodeMulti = function (buffer) { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.reinitializeState(); - this.setBuffer(buffer); - _a.label = 1; - case 1: - if (!this.hasRemaining(1)) return [3 /*break*/, 3]; - return [4 /*yield*/, this.doDecodeSync()]; - case 2: - _a.sent(); - return [3 /*break*/, 1]; - case 3: return [2 /*return*/]; - } - }); - }; - Decoder.prototype.decodeAsync = function (stream) { - var stream_1, stream_1_1; - var e_1, _a; - return __awaiter(this, void 0, void 0, function () { - var decoded, object, buffer, e_1_1, _b, headByte, pos, totalPos; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - decoded = false; - _c.label = 1; - case 1: - _c.trys.push([1, 6, 7, 12]); - stream_1 = __asyncValues(stream); - _c.label = 2; - case 2: return [4 /*yield*/, stream_1.next()]; - case 3: - if (!(stream_1_1 = _c.sent(), !stream_1_1.done)) return [3 /*break*/, 5]; - buffer = stream_1_1.value; - if (decoded) { - throw this.createExtraByteError(this.totalPos); - } - this.appendBuffer(buffer); - try { - object = this.doDecodeSync(); - decoded = true; - } - catch (e) { - if (!(e instanceof DataViewIndexOutOfBoundsError)) { - throw e; // rethrow - } - // fallthrough - } - this.totalPos += this.pos; - _c.label = 4; - case 4: return [3 /*break*/, 2]; - case 5: return [3 /*break*/, 12]; - case 6: - e_1_1 = _c.sent(); - e_1 = { error: e_1_1 }; - return [3 /*break*/, 12]; - case 7: - _c.trys.push([7, , 10, 11]); - if (!(stream_1_1 && !stream_1_1.done && (_a = stream_1.return))) return [3 /*break*/, 9]; - return [4 /*yield*/, _a.call(stream_1)]; - case 8: - _c.sent(); - _c.label = 9; - case 9: return [3 /*break*/, 11]; - case 10: - if (e_1) throw e_1.error; - return [7 /*endfinally*/]; - case 11: return [7 /*endfinally*/]; - case 12: - if (decoded) { - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.totalPos); - } - return [2 /*return*/, object]; - } - _b = this, headByte = _b.headByte, pos = _b.pos, totalPos = _b.totalPos; - throw new RangeError("Insufficient data in parsing ".concat(prettyByte(headByte), " at ").concat(totalPos, " (").concat(pos, " in the current buffer)")); - } - }); - }); - }; - Decoder.prototype.decodeArrayStream = function (stream) { - return this.decodeMultiAsync(stream, true); - }; - Decoder.prototype.decodeStream = function (stream) { - return this.decodeMultiAsync(stream, false); - }; - Decoder.prototype.decodeMultiAsync = function (stream, isArray) { - return __asyncGenerator(this, arguments, function decodeMultiAsync_1() { - var isArrayHeaderRequired, arrayItemsLeft, stream_2, stream_2_1, buffer, e_2, e_3_1; - var e_3, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - isArrayHeaderRequired = isArray; - arrayItemsLeft = -1; - _b.label = 1; - case 1: - _b.trys.push([1, 13, 14, 19]); - stream_2 = __asyncValues(stream); - _b.label = 2; - case 2: return [4 /*yield*/, __await(stream_2.next())]; - case 3: - if (!(stream_2_1 = _b.sent(), !stream_2_1.done)) return [3 /*break*/, 12]; - buffer = stream_2_1.value; - if (isArray && arrayItemsLeft === 0) { - throw this.createExtraByteError(this.totalPos); - } - this.appendBuffer(buffer); - if (isArrayHeaderRequired) { - arrayItemsLeft = this.readArraySize(); - isArrayHeaderRequired = false; - this.complete(); - } - _b.label = 4; - case 4: - _b.trys.push([4, 9, , 10]); - _b.label = 5; - case 5: - if (false) {} - return [4 /*yield*/, __await(this.doDecodeSync())]; - case 6: return [4 /*yield*/, _b.sent()]; - case 7: - _b.sent(); - if (--arrayItemsLeft === 0) { - return [3 /*break*/, 8]; - } - return [3 /*break*/, 5]; - case 8: return [3 /*break*/, 10]; - case 9: - e_2 = _b.sent(); - if (!(e_2 instanceof DataViewIndexOutOfBoundsError)) { - throw e_2; // rethrow - } - return [3 /*break*/, 10]; - case 10: - this.totalPos += this.pos; - _b.label = 11; - case 11: return [3 /*break*/, 2]; - case 12: return [3 /*break*/, 19]; - case 13: - e_3_1 = _b.sent(); - e_3 = { error: e_3_1 }; - return [3 /*break*/, 19]; - case 14: - _b.trys.push([14, , 17, 18]); - if (!(stream_2_1 && !stream_2_1.done && (_a = stream_2.return))) return [3 /*break*/, 16]; - return [4 /*yield*/, __await(_a.call(stream_2))]; - case 15: - _b.sent(); - _b.label = 16; - case 16: return [3 /*break*/, 18]; - case 17: - if (e_3) throw e_3.error; - return [7 /*endfinally*/]; - case 18: return [7 /*endfinally*/]; - case 19: return [2 /*return*/]; - } - }); - }); - }; - Decoder.prototype.doDecodeSync = function () { - DECODE: while (true) { - var headByte = this.readHeadByte(); - var object = void 0; - if (headByte >= 0xe0) { - // negative fixint (111x xxxx) 0xe0 - 0xff - object = headByte - 0x100; - } - else if (headByte < 0xc0) { - if (headByte < 0x80) { - // positive fixint (0xxx xxxx) 0x00 - 0x7f - object = headByte; - } - else if (headByte < 0x90) { - // fixmap (1000 xxxx) 0x80 - 0x8f - var size = headByte - 0x80; - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte < 0xa0) { - // fixarray (1001 xxxx) 0x90 - 0x9f - var size = headByte - 0x90; - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else { - // fixstr (101x xxxx) 0xa0 - 0xbf - var byteLength = headByte - 0xa0; - object = this.decodeUtf8String(byteLength, 0); - } - } - else if (headByte === 0xc0) { - // nil - object = null; - } - else if (headByte === 0xc2) { - // false - object = false; - } - else if (headByte === 0xc3) { - // true - object = true; - } - else if (headByte === 0xca) { - // float 32 - object = this.readF32(); - } - else if (headByte === 0xcb) { - // float 64 - object = this.readF64(); - } - else if (headByte === 0xcc) { - // uint 8 - object = this.readU8(); - } - else if (headByte === 0xcd) { - // uint 16 - object = this.readU16(); - } - else if (headByte === 0xce) { - // uint 32 - object = this.readU32(); - } - else if (headByte === 0xcf) { - // uint 64 - object = this.readU64(); - } - else if (headByte === 0xd0) { - // int 8 - object = this.readI8(); - } - else if (headByte === 0xd1) { - // int 16 - object = this.readI16(); - } - else if (headByte === 0xd2) { - // int 32 - object = this.readI32(); - } - else if (headByte === 0xd3) { - // int 64 - object = this.readI64(); - } - else if (headByte === 0xd9) { - // str 8 - var byteLength = this.lookU8(); - object = this.decodeUtf8String(byteLength, 1); - } - else if (headByte === 0xda) { - // str 16 - var byteLength = this.lookU16(); - object = this.decodeUtf8String(byteLength, 2); - } - else if (headByte === 0xdb) { - // str 32 - var byteLength = this.lookU32(); - object = this.decodeUtf8String(byteLength, 4); - } - else if (headByte === 0xdc) { - // array 16 - var size = this.readU16(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else if (headByte === 0xdd) { - // array 32 - var size = this.readU32(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else if (headByte === 0xde) { - // map 16 - var size = this.readU16(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte === 0xdf) { - // map 32 - var size = this.readU32(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte === 0xc4) { - // bin 8 - var size = this.lookU8(); - object = this.decodeBinary(size, 1); - } - else if (headByte === 0xc5) { - // bin 16 - var size = this.lookU16(); - object = this.decodeBinary(size, 2); - } - else if (headByte === 0xc6) { - // bin 32 - var size = this.lookU32(); - object = this.decodeBinary(size, 4); - } - else if (headByte === 0xd4) { - // fixext 1 - object = this.decodeExtension(1, 0); - } - else if (headByte === 0xd5) { - // fixext 2 - object = this.decodeExtension(2, 0); - } - else if (headByte === 0xd6) { - // fixext 4 - object = this.decodeExtension(4, 0); - } - else if (headByte === 0xd7) { - // fixext 8 - object = this.decodeExtension(8, 0); - } - else if (headByte === 0xd8) { - // fixext 16 - object = this.decodeExtension(16, 0); - } - else if (headByte === 0xc7) { - // ext 8 - var size = this.lookU8(); - object = this.decodeExtension(size, 1); - } - else if (headByte === 0xc8) { - // ext 16 - var size = this.lookU16(); - object = this.decodeExtension(size, 2); - } - else if (headByte === 0xc9) { - // ext 32 - var size = this.lookU32(); - object = this.decodeExtension(size, 4); - } - else { - throw new DecodeError("Unrecognized type byte: ".concat(prettyByte(headByte))); - } - this.complete(); - var stack = this.stack; - while (stack.length > 0) { - // arrays and maps - var state = stack[stack.length - 1]; - if (state.type === 0 /* ARRAY */) { - state.array[state.position] = object; - state.position++; - if (state.position === state.size) { - stack.pop(); - object = state.array; - } - else { - continue DECODE; - } - } - else if (state.type === 1 /* MAP_KEY */) { - if (!isValidMapKeyType(object)) { - throw new DecodeError("The type of key must be string or number but " + typeof object); - } - if (object === "__proto__") { - throw new DecodeError("The key __proto__ is not allowed"); - } - state.key = object; - state.type = 2 /* MAP_VALUE */; - continue DECODE; - } - else { - // it must be `state.type === State.MAP_VALUE` here - state.map[state.key] = object; - state.readCount++; - if (state.readCount === state.size) { - stack.pop(); - object = state.map; - } - else { - state.key = null; - state.type = 1 /* MAP_KEY */; - continue DECODE; - } - } - } - return object; - } - }; - Decoder.prototype.readHeadByte = function () { - if (this.headByte === HEAD_BYTE_REQUIRED) { - this.headByte = this.readU8(); - // console.log("headByte", prettyByte(this.headByte)); - } - return this.headByte; - }; - Decoder.prototype.complete = function () { - this.headByte = HEAD_BYTE_REQUIRED; - }; - Decoder.prototype.readArraySize = function () { - var headByte = this.readHeadByte(); - switch (headByte) { - case 0xdc: - return this.readU16(); - case 0xdd: - return this.readU32(); - default: { - if (headByte < 0xa0) { - return headByte - 0x90; - } - else { - throw new DecodeError("Unrecognized array type byte: ".concat(prettyByte(headByte))); - } - } - } - }; - Decoder.prototype.pushMapState = function (size) { - if (size > this.maxMapLength) { - throw new DecodeError("Max length exceeded: map length (".concat(size, ") > maxMapLengthLength (").concat(this.maxMapLength, ")")); - } - this.stack.push({ - type: 1 /* MAP_KEY */, - size: size, - key: null, - readCount: 0, - map: {}, - }); - }; - Decoder.prototype.pushArrayState = function (size) { - if (size > this.maxArrayLength) { - throw new DecodeError("Max length exceeded: array length (".concat(size, ") > maxArrayLength (").concat(this.maxArrayLength, ")")); - } - this.stack.push({ - type: 0 /* ARRAY */, - size: size, - array: new Array(size), - position: 0, - }); - }; - Decoder.prototype.decodeUtf8String = function (byteLength, headerOffset) { - var _a; - if (byteLength > this.maxStrLength) { - throw new DecodeError("Max length exceeded: UTF-8 byte length (".concat(byteLength, ") > maxStrLength (").concat(this.maxStrLength, ")")); - } - if (this.bytes.byteLength < this.pos + headerOffset + byteLength) { - throw MORE_DATA; - } - var offset = this.pos + headerOffset; - var object; - if (this.stateIsMapKey() && ((_a = this.keyDecoder) === null || _a === void 0 ? void 0 : _a.canBeCached(byteLength))) { - object = this.keyDecoder.decode(this.bytes, offset, byteLength); - } - else if (byteLength > TEXT_DECODER_THRESHOLD) { - object = utf8DecodeTD(this.bytes, offset, byteLength); - } - else { - object = utf8DecodeJs(this.bytes, offset, byteLength); - } - this.pos += headerOffset + byteLength; - return object; - }; - Decoder.prototype.stateIsMapKey = function () { - if (this.stack.length > 0) { - var state = this.stack[this.stack.length - 1]; - return state.type === 1 /* MAP_KEY */; - } - return false; - }; - Decoder.prototype.decodeBinary = function (byteLength, headOffset) { - if (byteLength > this.maxBinLength) { - throw new DecodeError("Max length exceeded: bin length (".concat(byteLength, ") > maxBinLength (").concat(this.maxBinLength, ")")); - } - if (!this.hasRemaining(byteLength + headOffset)) { - throw MORE_DATA; - } - var offset = this.pos + headOffset; - var object = this.bytes.subarray(offset, offset + byteLength); - this.pos += headOffset + byteLength; - return object; - }; - Decoder.prototype.decodeExtension = function (size, headOffset) { - if (size > this.maxExtLength) { - throw new DecodeError("Max length exceeded: ext length (".concat(size, ") > maxExtLength (").concat(this.maxExtLength, ")")); - } - var extType = this.view.getInt8(this.pos + headOffset); - var data = this.decodeBinary(size, headOffset + 1 /* extType */); - return this.extensionCodec.decode(data, extType, this.context); - }; - Decoder.prototype.lookU8 = function () { - return this.view.getUint8(this.pos); - }; - Decoder.prototype.lookU16 = function () { - return this.view.getUint16(this.pos); - }; - Decoder.prototype.lookU32 = function () { - return this.view.getUint32(this.pos); - }; - Decoder.prototype.readU8 = function () { - var value = this.view.getUint8(this.pos); - this.pos++; - return value; - }; - Decoder.prototype.readI8 = function () { - var value = this.view.getInt8(this.pos); - this.pos++; - return value; - }; - Decoder.prototype.readU16 = function () { - var value = this.view.getUint16(this.pos); - this.pos += 2; - return value; - }; - Decoder.prototype.readI16 = function () { - var value = this.view.getInt16(this.pos); - this.pos += 2; - return value; - }; - Decoder.prototype.readU32 = function () { - var value = this.view.getUint32(this.pos); - this.pos += 4; - return value; - }; - Decoder.prototype.readI32 = function () { - var value = this.view.getInt32(this.pos); - this.pos += 4; - return value; - }; - Decoder.prototype.readU64 = function () { - var value = getUint64(this.view, this.pos); - this.pos += 8; - return value; - }; - Decoder.prototype.readI64 = function () { - var value = getInt64(this.view, this.pos); - this.pos += 8; - return value; - }; - Decoder.prototype.readF32 = function () { - var value = this.view.getFloat32(this.pos); - this.pos += 4; - return value; - }; - Decoder.prototype.readF64 = function () { - var value = this.view.getFloat64(this.pos); - this.pos += 8; - return value; - }; - return Decoder; -}()); - - -;// CONCATENATED MODULE: ./src/decode.ts - -var defaultDecodeOptions = {}; -/** - * It decodes a single MessagePack object in a buffer. - * - * This is a synchronous decoding function. - * See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}. - */ -function decode(buffer, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decode(buffer); -} -/** - * It decodes multiple MessagePack objects in a buffer. - * This is corresponding to {@link decodeMultiStream()}. - */ -function decodeMulti(buffer, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeMulti(buffer); -} - -;// CONCATENATED MODULE: ./src/utils/stream.ts -// utility for whatwg streams -var stream_generator = (undefined && undefined.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var stream_await = (undefined && undefined.__await) || function (v) { return this instanceof stream_await ? (this.v = v, this) : new stream_await(v); } -var stream_asyncGenerator = (undefined && undefined.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof stream_await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; -function isAsyncIterable(object) { - return object[Symbol.asyncIterator] != null; -} -function assertNonNull(value) { - if (value == null) { - throw new Error("Assertion Failure: value must not be null nor undefined"); - } -} -function asyncIterableFromStream(stream) { - return stream_asyncGenerator(this, arguments, function asyncIterableFromStream_1() { - var reader, _a, done, value; - return stream_generator(this, function (_b) { - switch (_b.label) { - case 0: - reader = stream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - if (false) {} - return [4 /*yield*/, stream_await(reader.read())]; - case 3: - _a = _b.sent(), done = _a.done, value = _a.value; - if (!done) return [3 /*break*/, 5]; - return [4 /*yield*/, stream_await(void 0)]; - case 4: return [2 /*return*/, _b.sent()]; - case 5: - assertNonNull(value); - return [4 /*yield*/, stream_await(value)]; - case 6: return [4 /*yield*/, _b.sent()]; - case 7: - _b.sent(); - return [3 /*break*/, 2]; - case 8: return [3 /*break*/, 10]; - case 9: - reader.releaseLock(); - return [7 /*endfinally*/]; - case 10: return [2 /*return*/]; - } - }); - }); -} -function ensureAsyncIterable(streamLike) { - if (isAsyncIterable(streamLike)) { - return streamLike; - } - else { - return asyncIterableFromStream(streamLike); - } -} - -;// CONCATENATED MODULE: ./src/decodeAsync.ts -var decodeAsync_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var decodeAsync_generator = (undefined && undefined.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; - - - -function decodeAsync(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - return decodeAsync_awaiter(this, void 0, void 0, function () { - var stream, decoder; - return decodeAsync_generator(this, function (_a) { - stream = ensureAsyncIterable(streamLike); - decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return [2 /*return*/, decoder.decodeAsync(stream)]; - }); - }); -} -function decodeArrayStream(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var stream = ensureAsyncIterable(streamLike); - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeArrayStream(stream); -} -function decodeMultiStream(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - var stream = ensureAsyncIterable(streamLike); - var decoder = new Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeStream(stream); -} -/** - * @deprecated Use {@link decodeMultiStream()} instead. - */ -function decodeStream(streamLike, options) { - if (options === void 0) { options = defaultDecodeOptions; } - return decodeMultiStream(streamLike, options); -} - -;// CONCATENATED MODULE: ./src/index.ts -// Main Functions: - - - - - - - - - - - -// Utilitiies for Extension Types: - - - - - - - -/******/ return __webpack_exports__; -/******/ })() -; -}); -//# sourceMappingURL=msgpack.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.js.map deleted file mode 100644 index 846c13e..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"msgpack.js","mappings":"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","sources":["webpack://MessagePack/webpack/universalModuleDefinition","webpack://MessagePack/webpack/bootstrap","webpack://MessagePack/webpack/runtime/define property getters","webpack://MessagePack/webpack/runtime/hasOwnProperty shorthand","webpack://MessagePack/webpack/runtime/make namespace object","webpack://MessagePack/./src/utils/int.ts","webpack://MessagePack/./src/utils/utf8.ts","webpack://MessagePack/./src/ExtData.ts","webpack://MessagePack/./src/DecodeError.ts","webpack://MessagePack/./src/timestamp.ts","webpack://MessagePack/./src/ExtensionCodec.ts","webpack://MessagePack/./src/utils/typedArrays.ts","webpack://MessagePack/./src/Encoder.ts","webpack://MessagePack/./src/encode.ts","webpack://MessagePack/./src/utils/prettyByte.ts","webpack://MessagePack/./src/CachedKeyDecoder.ts","webpack://MessagePack/./src/Decoder.ts","webpack://MessagePack/./src/decode.ts","webpack://MessagePack/./src/utils/stream.ts","webpack://MessagePack/./src/decodeAsync.ts","webpack://MessagePack/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MessagePack\"] = factory();\n\telse\n\t\troot[\"MessagePack\"] = factory();\n})(this, function() {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// Integer Utility\n\nexport const UINT32_MAX = 0xffff_ffff;\n\n// DataView extension to handle int64 / uint64,\n// where the actual range is 53-bits integer (a.k.a. safe integer)\n\nexport function setUint64(view: DataView, offset: number, value: number): void {\n const high = value / 0x1_0000_0000;\n const low = value; // high bits are truncated by DataView\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n}\n\nexport function setInt64(view: DataView, offset: number, value: number): void {\n const high = Math.floor(value / 0x1_0000_0000);\n const low = value; // high bits are truncated by DataView\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n}\n\nexport function getInt64(view: DataView, offset: number): number {\n const high = view.getInt32(offset);\n const low = view.getUint32(offset + 4);\n return high * 0x1_0000_0000 + low;\n}\n\nexport function getUint64(view: DataView, offset: number): number {\n const high = view.getUint32(offset);\n const low = view.getUint32(offset + 4);\n return high * 0x1_0000_0000 + low;\n}\n","/* eslint-disable @typescript-eslint/no-unnecessary-condition */\nimport { UINT32_MAX } from \"./int\";\n\nconst TEXT_ENCODING_AVAILABLE =\n (typeof process === \"undefined\" || process?.env?.[\"TEXT_ENCODING\"] !== \"never\") &&\n typeof TextEncoder !== \"undefined\" &&\n typeof TextDecoder !== \"undefined\";\n\nexport function utf8Count(str: string): number {\n const strLength = str.length;\n\n let byteLength = 0;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n\n if ((value & 0xffffff80) === 0) {\n // 1-byte\n byteLength++;\n continue;\n } else if ((value & 0xfffff800) === 0) {\n // 2-bytes\n byteLength += 2;\n } else {\n // handle surrogate pair\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n byteLength += 3;\n } else {\n // 4-byte\n byteLength += 4;\n }\n }\n }\n return byteLength;\n}\n\nexport function utf8EncodeJs(str: string, output: Uint8Array, outputOffset: number): void {\n const strLength = str.length;\n let offset = outputOffset;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n\n if ((value & 0xffffff80) === 0) {\n // 1-byte\n output[offset++] = value;\n continue;\n } else if ((value & 0xfffff800) === 0) {\n // 2-bytes\n output[offset++] = ((value >> 6) & 0x1f) | 0xc0;\n } else {\n // handle surrogate pair\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n output[offset++] = ((value >> 12) & 0x0f) | 0xe0;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n } else {\n // 4-byte\n output[offset++] = ((value >> 18) & 0x07) | 0xf0;\n output[offset++] = ((value >> 12) & 0x3f) | 0x80;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n }\n }\n\n output[offset++] = (value & 0x3f) | 0x80;\n }\n}\n\nconst sharedTextEncoder = TEXT_ENCODING_AVAILABLE ? new TextEncoder() : undefined;\nexport const TEXT_ENCODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE\n ? UINT32_MAX\n : typeof process !== \"undefined\" && process?.env?.[\"TEXT_ENCODING\"] !== \"force\"\n ? 200\n : 0;\n\nfunction utf8EncodeTEencode(str: string, output: Uint8Array, outputOffset: number): void {\n output.set(sharedTextEncoder!.encode(str), outputOffset);\n}\n\nfunction utf8EncodeTEencodeInto(str: string, output: Uint8Array, outputOffset: number): void {\n sharedTextEncoder!.encodeInto(str, output.subarray(outputOffset));\n}\n\nexport const utf8EncodeTE = sharedTextEncoder?.encodeInto ? utf8EncodeTEencodeInto : utf8EncodeTEencode;\n\nconst CHUNK_SIZE = 0x1_000;\n\nexport function utf8DecodeJs(bytes: Uint8Array, inputOffset: number, byteLength: number): string {\n let offset = inputOffset;\n const end = offset + byteLength;\n\n const units: Array = [];\n let result = \"\";\n while (offset < end) {\n const byte1 = bytes[offset++]!;\n if ((byte1 & 0x80) === 0) {\n // 1 byte\n units.push(byte1);\n } else if ((byte1 & 0xe0) === 0xc0) {\n // 2 bytes\n const byte2 = bytes[offset++]! & 0x3f;\n units.push(((byte1 & 0x1f) << 6) | byte2);\n } else if ((byte1 & 0xf0) === 0xe0) {\n // 3 bytes\n const byte2 = bytes[offset++]! & 0x3f;\n const byte3 = bytes[offset++]! & 0x3f;\n units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);\n } else if ((byte1 & 0xf8) === 0xf0) {\n // 4 bytes\n const byte2 = bytes[offset++]! & 0x3f;\n const byte3 = bytes[offset++]! & 0x3f;\n const byte4 = bytes[offset++]! & 0x3f;\n let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;\n if (unit > 0xffff) {\n unit -= 0x10000;\n units.push(((unit >>> 10) & 0x3ff) | 0xd800);\n unit = 0xdc00 | (unit & 0x3ff);\n }\n units.push(unit);\n } else {\n units.push(byte1);\n }\n\n if (units.length >= CHUNK_SIZE) {\n result += String.fromCharCode(...units);\n units.length = 0;\n }\n }\n\n if (units.length > 0) {\n result += String.fromCharCode(...units);\n }\n\n return result;\n}\n\nconst sharedTextDecoder = TEXT_ENCODING_AVAILABLE ? new TextDecoder() : null;\nexport const TEXT_DECODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE\n ? UINT32_MAX\n : typeof process !== \"undefined\" && process?.env?.[\"TEXT_DECODER\"] !== \"force\"\n ? 200\n : 0;\n\nexport function utf8DecodeTD(bytes: Uint8Array, inputOffset: number, byteLength: number): string {\n const stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength);\n return sharedTextDecoder!.decode(stringBytes);\n}\n","/**\n * ExtData is used to handle Extension Types that are not registered to ExtensionCodec.\n */\nexport class ExtData {\n constructor(readonly type: number, readonly data: Uint8Array) {}\n}\n","export class DecodeError extends Error {\n constructor(message: string) {\n super(message);\n\n // fix the prototype chain in a cross-platform way\n const proto: typeof DecodeError.prototype = Object.create(DecodeError.prototype);\n Object.setPrototypeOf(this, proto);\n\n Object.defineProperty(this, \"name\", {\n configurable: true,\n enumerable: false,\n value: DecodeError.name,\n });\n }\n}\n","// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type\nimport { DecodeError } from \"./DecodeError\";\nimport { getInt64, setInt64 } from \"./utils/int\";\n\nexport const EXT_TIMESTAMP = -1;\n\nexport type TimeSpec = {\n sec: number;\n nsec: number;\n};\n\nconst TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int\nconst TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int\n\nexport function encodeTimeSpecToTimestamp({ sec, nsec }: TimeSpec): Uint8Array {\n if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {\n // Here sec >= 0 && nsec >= 0\n if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {\n // timestamp 32 = { sec32 (unsigned) }\n const rv = new Uint8Array(4);\n const view = new DataView(rv.buffer);\n view.setUint32(0, sec);\n return rv;\n } else {\n // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) }\n const secHigh = sec / 0x100000000;\n const secLow = sec & 0xffffffff;\n const rv = new Uint8Array(8);\n const view = new DataView(rv.buffer);\n // nsec30 | secHigh2\n view.setUint32(0, (nsec << 2) | (secHigh & 0x3));\n // secLow32\n view.setUint32(4, secLow);\n return rv;\n }\n } else {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n const rv = new Uint8Array(12);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec);\n setInt64(view, 4, sec);\n return rv;\n }\n}\n\nexport function encodeDateToTimeSpec(date: Date): TimeSpec {\n const msec = date.getTime();\n const sec = Math.floor(msec / 1e3);\n const nsec = (msec - sec * 1e3) * 1e6;\n\n // Normalizes { sec, nsec } to ensure nsec is unsigned.\n const nsecInSec = Math.floor(nsec / 1e9);\n return {\n sec: sec + nsecInSec,\n nsec: nsec - nsecInSec * 1e9,\n };\n}\n\nexport function encodeTimestampExtension(object: unknown): Uint8Array | null {\n if (object instanceof Date) {\n const timeSpec = encodeDateToTimeSpec(object);\n return encodeTimeSpecToTimestamp(timeSpec);\n } else {\n return null;\n }\n}\n\nexport function decodeTimestampToTimeSpec(data: Uint8Array): TimeSpec {\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n\n // data may be 32, 64, or 96 bits\n switch (data.byteLength) {\n case 4: {\n // timestamp 32 = { sec32 }\n const sec = view.getUint32(0);\n const nsec = 0;\n return { sec, nsec };\n }\n case 8: {\n // timestamp 64 = { nsec30, sec34 }\n const nsec30AndSecHigh2 = view.getUint32(0);\n const secLow32 = view.getUint32(4);\n const sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32;\n const nsec = nsec30AndSecHigh2 >>> 2;\n return { sec, nsec };\n }\n case 12: {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n\n const sec = getInt64(view, 4);\n const nsec = view.getUint32(0);\n return { sec, nsec };\n }\n default:\n throw new DecodeError(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`);\n }\n}\n\nexport function decodeTimestampExtension(data: Uint8Array): Date {\n const timeSpec = decodeTimestampToTimeSpec(data);\n return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6);\n}\n\nexport const timestampExtension = {\n type: EXT_TIMESTAMP,\n encode: encodeTimestampExtension,\n decode: decodeTimestampExtension,\n};\n","// ExtensionCodec to handle MessagePack extensions\n\nimport { ExtData } from \"./ExtData\";\nimport { timestampExtension } from \"./timestamp\";\n\nexport type ExtensionDecoderType = (\n data: Uint8Array,\n extensionType: number,\n context: ContextType,\n) => unknown;\n\nexport type ExtensionEncoderType = (input: unknown, context: ContextType) => Uint8Array | null;\n\n// immutable interfce to ExtensionCodec\nexport type ExtensionCodecType = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n __brand?: ContextType;\n tryToEncode(object: unknown, context: ContextType): ExtData | null;\n decode(data: Uint8Array, extType: number, context: ContextType): unknown;\n};\n\nexport class ExtensionCodec implements ExtensionCodecType {\n public static readonly defaultCodec: ExtensionCodecType = new ExtensionCodec();\n\n // ensures ExtensionCodecType matches ExtensionCodec\n // this will make type errors a lot more clear\n // eslint-disable-next-line @typescript-eslint/naming-convention\n __brand?: ContextType;\n\n // built-in extensions\n private readonly builtInEncoders: Array | undefined | null> = [];\n private readonly builtInDecoders: Array | undefined | null> = [];\n\n // custom extensions\n private readonly encoders: Array | undefined | null> = [];\n private readonly decoders: Array | undefined | null> = [];\n\n public constructor() {\n this.register(timestampExtension);\n }\n\n public register({\n type,\n encode,\n decode,\n }: {\n type: number;\n encode: ExtensionEncoderType;\n decode: ExtensionDecoderType;\n }): void {\n if (type >= 0) {\n // custom extensions\n this.encoders[type] = encode;\n this.decoders[type] = decode;\n } else {\n // built-in extensions\n const index = 1 + type;\n this.builtInEncoders[index] = encode;\n this.builtInDecoders[index] = decode;\n }\n }\n\n public tryToEncode(object: unknown, context: ContextType): ExtData | null {\n // built-in extensions\n for (let i = 0; i < this.builtInEncoders.length; i++) {\n const encodeExt = this.builtInEncoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = -1 - i;\n return new ExtData(type, data);\n }\n }\n }\n\n // custom extensions\n for (let i = 0; i < this.encoders.length; i++) {\n const encodeExt = this.encoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = i;\n return new ExtData(type, data);\n }\n }\n }\n\n if (object instanceof ExtData) {\n // to keep ExtData as is\n return object;\n }\n return null;\n }\n\n public decode(data: Uint8Array, type: number, context: ContextType): unknown {\n const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type];\n if (decodeExt) {\n return decodeExt(data, type, context);\n } else {\n // decode() does not fail, returns ExtData instead.\n return new ExtData(type, data);\n }\n }\n}\n","export function ensureUint8Array(buffer: ArrayLike | Uint8Array | ArrayBufferView | ArrayBuffer): Uint8Array {\n if (buffer instanceof Uint8Array) {\n return buffer;\n } else if (ArrayBuffer.isView(buffer)) {\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n } else if (buffer instanceof ArrayBuffer) {\n return new Uint8Array(buffer);\n } else {\n // ArrayLike\n return Uint8Array.from(buffer);\n }\n}\n\nexport function createDataView(buffer: ArrayLike | ArrayBufferView | ArrayBuffer): DataView {\n if (buffer instanceof ArrayBuffer) {\n return new DataView(buffer);\n }\n\n const bufferView = ensureUint8Array(buffer);\n return new DataView(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\n}\n","import { utf8EncodeJs, utf8Count, TEXT_ENCODER_THRESHOLD, utf8EncodeTE } from \"./utils/utf8\";\nimport { ExtensionCodec, ExtensionCodecType } from \"./ExtensionCodec\";\nimport { setInt64, setUint64 } from \"./utils/int\";\nimport { ensureUint8Array } from \"./utils/typedArrays\";\nimport type { ExtData } from \"./ExtData\";\n\nexport const DEFAULT_MAX_DEPTH = 100;\nexport const DEFAULT_INITIAL_BUFFER_SIZE = 2048;\n\nexport class Encoder {\n private pos = 0;\n private view = new DataView(new ArrayBuffer(this.initialBufferSize));\n private bytes = new Uint8Array(this.view.buffer);\n\n public constructor(\n private readonly extensionCodec: ExtensionCodecType = ExtensionCodec.defaultCodec as any,\n private readonly context: ContextType = undefined as any,\n private readonly maxDepth = DEFAULT_MAX_DEPTH,\n private readonly initialBufferSize = DEFAULT_INITIAL_BUFFER_SIZE,\n private readonly sortKeys = false,\n private readonly forceFloat32 = false,\n private readonly ignoreUndefined = false,\n private readonly forceIntegerToFloat = false,\n ) {}\n\n private getUint8Array(): Uint8Array {\n return this.bytes.subarray(0, this.pos);\n }\n\n private reinitializeState() {\n this.pos = 0;\n }\n\n public encode(object: unknown): Uint8Array {\n this.reinitializeState();\n this.doEncode(object, 1);\n return this.getUint8Array();\n }\n\n private doEncode(object: unknown, depth: number): void {\n if (depth > this.maxDepth) {\n throw new Error(`Too deep objects in depth ${depth}`);\n }\n\n if (object == null) {\n this.encodeNil();\n } else if (typeof object === \"boolean\") {\n this.encodeBoolean(object);\n } else if (typeof object === \"number\") {\n this.encodeNumber(object);\n } else if (typeof object === \"string\") {\n this.encodeString(object);\n } else {\n this.encodeObject(object, depth);\n }\n }\n\n private ensureBufferSizeToWrite(sizeToWrite: number) {\n const requiredSize = this.pos + sizeToWrite;\n\n if (this.view.byteLength < requiredSize) {\n this.resizeBuffer(requiredSize * 2);\n }\n }\n\n private resizeBuffer(newSize: number) {\n const newBuffer = new ArrayBuffer(newSize);\n const newBytes = new Uint8Array(newBuffer);\n const newView = new DataView(newBuffer);\n\n newBytes.set(this.bytes);\n\n this.view = newView;\n this.bytes = newBytes;\n }\n\n private encodeNil() {\n this.writeU8(0xc0);\n }\n\n private encodeBoolean(object: boolean) {\n if (object === false) {\n this.writeU8(0xc2);\n } else {\n this.writeU8(0xc3);\n }\n }\n private encodeNumber(object: number) {\n if (Number.isSafeInteger(object) && !this.forceIntegerToFloat) {\n if (object >= 0) {\n if (object < 0x80) {\n // positive fixint\n this.writeU8(object);\n } else if (object < 0x100) {\n // uint 8\n this.writeU8(0xcc);\n this.writeU8(object);\n } else if (object < 0x10000) {\n // uint 16\n this.writeU8(0xcd);\n this.writeU16(object);\n } else if (object < 0x100000000) {\n // uint 32\n this.writeU8(0xce);\n this.writeU32(object);\n } else {\n // uint 64\n this.writeU8(0xcf);\n this.writeU64(object);\n }\n } else {\n if (object >= -0x20) {\n // negative fixint\n this.writeU8(0xe0 | (object + 0x20));\n } else if (object >= -0x80) {\n // int 8\n this.writeU8(0xd0);\n this.writeI8(object);\n } else if (object >= -0x8000) {\n // int 16\n this.writeU8(0xd1);\n this.writeI16(object);\n } else if (object >= -0x80000000) {\n // int 32\n this.writeU8(0xd2);\n this.writeI32(object);\n } else {\n // int 64\n this.writeU8(0xd3);\n this.writeI64(object);\n }\n }\n } else {\n // non-integer numbers\n if (this.forceFloat32) {\n // float 32\n this.writeU8(0xca);\n this.writeF32(object);\n } else {\n // float 64\n this.writeU8(0xcb);\n this.writeF64(object);\n }\n }\n }\n\n private writeStringHeader(byteLength: number) {\n if (byteLength < 32) {\n // fixstr\n this.writeU8(0xa0 + byteLength);\n } else if (byteLength < 0x100) {\n // str 8\n this.writeU8(0xd9);\n this.writeU8(byteLength);\n } else if (byteLength < 0x10000) {\n // str 16\n this.writeU8(0xda);\n this.writeU16(byteLength);\n } else if (byteLength < 0x100000000) {\n // str 32\n this.writeU8(0xdb);\n this.writeU32(byteLength);\n } else {\n throw new Error(`Too long string: ${byteLength} bytes in UTF-8`);\n }\n }\n\n private encodeString(object: string) {\n const maxHeaderSize = 1 + 4;\n const strLength = object.length;\n\n if (strLength > TEXT_ENCODER_THRESHOLD) {\n const byteLength = utf8Count(object);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8EncodeTE(object, this.bytes, this.pos);\n this.pos += byteLength;\n } else {\n const byteLength = utf8Count(object);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8EncodeJs(object, this.bytes, this.pos);\n this.pos += byteLength;\n }\n }\n\n private encodeObject(object: unknown, depth: number) {\n // try to encode objects with custom codec first of non-primitives\n const ext = this.extensionCodec.tryToEncode(object, this.context);\n if (ext != null) {\n this.encodeExtension(ext);\n } else if (Array.isArray(object)) {\n this.encodeArray(object, depth);\n } else if (ArrayBuffer.isView(object)) {\n this.encodeBinary(object);\n } else if (typeof object === \"object\") {\n this.encodeMap(object as Record, depth);\n } else {\n // symbol, function and other special object come here unless extensionCodec handles them.\n throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object)}`);\n }\n }\n\n private encodeBinary(object: ArrayBufferView) {\n const size = object.byteLength;\n if (size < 0x100) {\n // bin 8\n this.writeU8(0xc4);\n this.writeU8(size);\n } else if (size < 0x10000) {\n // bin 16\n this.writeU8(0xc5);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // bin 32\n this.writeU8(0xc6);\n this.writeU32(size);\n } else {\n throw new Error(`Too large binary: ${size}`);\n }\n const bytes = ensureUint8Array(object);\n this.writeU8a(bytes);\n }\n\n private encodeArray(object: Array, depth: number) {\n const size = object.length;\n if (size < 16) {\n // fixarray\n this.writeU8(0x90 + size);\n } else if (size < 0x10000) {\n // array 16\n this.writeU8(0xdc);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // array 32\n this.writeU8(0xdd);\n this.writeU32(size);\n } else {\n throw new Error(`Too large array: ${size}`);\n }\n for (const item of object) {\n this.doEncode(item, depth + 1);\n }\n }\n\n private countWithoutUndefined(object: Record, keys: ReadonlyArray): number {\n let count = 0;\n\n for (const key of keys) {\n if (object[key] !== undefined) {\n count++;\n }\n }\n\n return count;\n }\n\n private encodeMap(object: Record, depth: number) {\n const keys = Object.keys(object);\n if (this.sortKeys) {\n keys.sort();\n }\n\n const size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length;\n\n if (size < 16) {\n // fixmap\n this.writeU8(0x80 + size);\n } else if (size < 0x10000) {\n // map 16\n this.writeU8(0xde);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // map 32\n this.writeU8(0xdf);\n this.writeU32(size);\n } else {\n throw new Error(`Too large map object: ${size}`);\n }\n\n for (const key of keys) {\n const value = object[key];\n\n if (!(this.ignoreUndefined && value === undefined)) {\n this.encodeString(key);\n this.doEncode(value, depth + 1);\n }\n }\n }\n\n private encodeExtension(ext: ExtData) {\n const size = ext.data.length;\n if (size === 1) {\n // fixext 1\n this.writeU8(0xd4);\n } else if (size === 2) {\n // fixext 2\n this.writeU8(0xd5);\n } else if (size === 4) {\n // fixext 4\n this.writeU8(0xd6);\n } else if (size === 8) {\n // fixext 8\n this.writeU8(0xd7);\n } else if (size === 16) {\n // fixext 16\n this.writeU8(0xd8);\n } else if (size < 0x100) {\n // ext 8\n this.writeU8(0xc7);\n this.writeU8(size);\n } else if (size < 0x10000) {\n // ext 16\n this.writeU8(0xc8);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // ext 32\n this.writeU8(0xc9);\n this.writeU32(size);\n } else {\n throw new Error(`Too large extension object: ${size}`);\n }\n this.writeI8(ext.type);\n this.writeU8a(ext.data);\n }\n\n private writeU8(value: number) {\n this.ensureBufferSizeToWrite(1);\n\n this.view.setUint8(this.pos, value);\n this.pos++;\n }\n\n private writeU8a(values: ArrayLike) {\n const size = values.length;\n this.ensureBufferSizeToWrite(size);\n\n this.bytes.set(values, this.pos);\n this.pos += size;\n }\n\n private writeI8(value: number) {\n this.ensureBufferSizeToWrite(1);\n\n this.view.setInt8(this.pos, value);\n this.pos++;\n }\n\n private writeU16(value: number) {\n this.ensureBufferSizeToWrite(2);\n\n this.view.setUint16(this.pos, value);\n this.pos += 2;\n }\n\n private writeI16(value: number) {\n this.ensureBufferSizeToWrite(2);\n\n this.view.setInt16(this.pos, value);\n this.pos += 2;\n }\n\n private writeU32(value: number) {\n this.ensureBufferSizeToWrite(4);\n\n this.view.setUint32(this.pos, value);\n this.pos += 4;\n }\n\n private writeI32(value: number) {\n this.ensureBufferSizeToWrite(4);\n\n this.view.setInt32(this.pos, value);\n this.pos += 4;\n }\n\n private writeF32(value: number) {\n this.ensureBufferSizeToWrite(4);\n this.view.setFloat32(this.pos, value);\n this.pos += 4;\n }\n\n private writeF64(value: number) {\n this.ensureBufferSizeToWrite(8);\n this.view.setFloat64(this.pos, value);\n this.pos += 8;\n }\n\n private writeU64(value: number) {\n this.ensureBufferSizeToWrite(8);\n\n setUint64(this.view, this.pos, value);\n this.pos += 8;\n }\n\n private writeI64(value: number) {\n this.ensureBufferSizeToWrite(8);\n\n setInt64(this.view, this.pos, value);\n this.pos += 8;\n }\n}\n","import { Encoder } from \"./Encoder\";\nimport type { ExtensionCodecType } from \"./ExtensionCodec\";\nimport type { ContextOf, SplitUndefined } from \"./context\";\n\nexport type EncodeOptions = Partial<\n Readonly<{\n extensionCodec: ExtensionCodecType;\n\n /**\n * The maximum depth in nested objects and arrays.\n *\n * Defaults to 100.\n */\n maxDepth: number;\n\n /**\n * The initial size of the internal buffer.\n *\n * Defaults to 2048.\n */\n initialBufferSize: number;\n\n /**\n * If `true`, the keys of an object is sorted. In other words, the encoded\n * binary is canonical and thus comparable to another encoded binary.\n *\n * Defaults to `false`. If enabled, it spends more time in encoding objects.\n */\n sortKeys: boolean;\n /**\n * If `true`, non-integer numbers are encoded in float32, not in float64 (the default).\n *\n * Only use it if precisions don't matter.\n *\n * Defaults to `false`.\n */\n forceFloat32: boolean;\n\n /**\n * If `true`, an object property with `undefined` value are ignored.\n * e.g. `{ foo: undefined }` will be encoded as `{}`, as `JSON.stringify()` does.\n *\n * Defaults to `false`. If enabled, it spends more time in encoding objects.\n */\n ignoreUndefined: boolean;\n\n /**\n * If `true`, integer numbers are encoded as floating point numbers,\n * with the `forceFloat32` option taken into account.\n *\n * Defaults to `false`.\n */\n forceIntegerToFloat: boolean;\n }>\n> &\n ContextOf;\n\nconst defaultEncodeOptions: EncodeOptions = {};\n\n/**\n * It encodes `value` in the MessagePack format and\n * returns a byte buffer.\n *\n * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`.\n */\nexport function encode(\n value: unknown,\n options: EncodeOptions> = defaultEncodeOptions as any,\n): Uint8Array {\n const encoder = new Encoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxDepth,\n options.initialBufferSize,\n options.sortKeys,\n options.forceFloat32,\n options.ignoreUndefined,\n options.forceIntegerToFloat,\n );\n return encoder.encode(value);\n}\n","export function prettyByte(byte: number): string {\n return `${byte < 0 ? \"-\" : \"\"}0x${Math.abs(byte).toString(16).padStart(2, \"0\")}`;\n}\n","import { utf8DecodeJs } from \"./utils/utf8\";\n\nconst DEFAULT_MAX_KEY_LENGTH = 16;\nconst DEFAULT_MAX_LENGTH_PER_KEY = 16;\n\nexport interface KeyDecoder {\n canBeCached(byteLength: number): boolean;\n decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string;\n}\ninterface KeyCacheRecord {\n readonly bytes: Uint8Array;\n readonly str: string;\n}\n\nexport class CachedKeyDecoder implements KeyDecoder {\n hit = 0;\n miss = 0;\n private readonly caches: Array>;\n\n constructor(readonly maxKeyLength = DEFAULT_MAX_KEY_LENGTH, readonly maxLengthPerKey = DEFAULT_MAX_LENGTH_PER_KEY) {\n // avoid `new Array(N)`, which makes a sparse array,\n // because a sparse array is typically slower than a non-sparse array.\n this.caches = [];\n for (let i = 0; i < this.maxKeyLength; i++) {\n this.caches.push([]);\n }\n }\n\n public canBeCached(byteLength: number): boolean {\n return byteLength > 0 && byteLength <= this.maxKeyLength;\n }\n\n private find(bytes: Uint8Array, inputOffset: number, byteLength: number): string | null {\n const records = this.caches[byteLength - 1]!;\n\n FIND_CHUNK: for (const record of records) {\n const recordBytes = record.bytes;\n\n for (let j = 0; j < byteLength; j++) {\n if (recordBytes[j] !== bytes[inputOffset + j]) {\n continue FIND_CHUNK;\n }\n }\n return record.str;\n }\n return null;\n }\n\n private store(bytes: Uint8Array, value: string) {\n const records = this.caches[bytes.length - 1]!;\n const record: KeyCacheRecord = { bytes, str: value };\n\n if (records.length >= this.maxLengthPerKey) {\n // `records` are full!\n // Set `record` to an arbitrary position.\n records[(Math.random() * records.length) | 0] = record;\n } else {\n records.push(record);\n }\n }\n\n public decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string {\n const cachedValue = this.find(bytes, inputOffset, byteLength);\n if (cachedValue != null) {\n this.hit++;\n return cachedValue;\n }\n this.miss++;\n\n const str = utf8DecodeJs(bytes, inputOffset, byteLength);\n // Ensure to copy a slice of bytes because the byte may be NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer.\n const slicedCopyOfBytes = Uint8Array.prototype.slice.call(bytes, inputOffset, inputOffset + byteLength);\n this.store(slicedCopyOfBytes, str);\n return str;\n }\n}\n","import { prettyByte } from \"./utils/prettyByte\";\nimport { ExtensionCodec, ExtensionCodecType } from \"./ExtensionCodec\";\nimport { getInt64, getUint64, UINT32_MAX } from \"./utils/int\";\nimport { utf8DecodeJs, TEXT_DECODER_THRESHOLD, utf8DecodeTD } from \"./utils/utf8\";\nimport { createDataView, ensureUint8Array } from \"./utils/typedArrays\";\nimport { CachedKeyDecoder, KeyDecoder } from \"./CachedKeyDecoder\";\nimport { DecodeError } from \"./DecodeError\";\n\nconst enum State {\n ARRAY,\n MAP_KEY,\n MAP_VALUE,\n}\n\ntype MapKeyType = string | number;\n\nconst isValidMapKeyType = (key: unknown): key is MapKeyType => {\n const keyType = typeof key;\n\n return keyType === \"string\" || keyType === \"number\";\n};\n\ntype StackMapState = {\n type: State.MAP_KEY | State.MAP_VALUE;\n size: number;\n key: MapKeyType | null;\n readCount: number;\n map: Record;\n};\n\ntype StackArrayState = {\n type: State.ARRAY;\n size: number;\n array: Array;\n position: number;\n};\n\ntype StackState = StackArrayState | StackMapState;\n\nconst HEAD_BYTE_REQUIRED = -1;\n\nconst EMPTY_VIEW = new DataView(new ArrayBuffer(0));\nconst EMPTY_BYTES = new Uint8Array(EMPTY_VIEW.buffer);\n\n// IE11: Hack to support IE11.\n// IE11: Drop this hack and just use RangeError when IE11 is obsolete.\nexport const DataViewIndexOutOfBoundsError: typeof Error = (() => {\n try {\n // IE11: The spec says it should throw RangeError,\n // IE11: but in IE11 it throws TypeError.\n EMPTY_VIEW.getInt8(0);\n } catch (e: any) {\n return e.constructor;\n }\n throw new Error(\"never reached\");\n})();\n\nconst MORE_DATA = new DataViewIndexOutOfBoundsError(\"Insufficient data\");\n\nconst sharedCachedKeyDecoder = new CachedKeyDecoder();\n\nexport class Decoder {\n private totalPos = 0;\n private pos = 0;\n\n private view = EMPTY_VIEW;\n private bytes = EMPTY_BYTES;\n private headByte = HEAD_BYTE_REQUIRED;\n private readonly stack: Array = [];\n\n public constructor(\n private readonly extensionCodec: ExtensionCodecType = ExtensionCodec.defaultCodec as any,\n private readonly context: ContextType = undefined as any,\n private readonly maxStrLength = UINT32_MAX,\n private readonly maxBinLength = UINT32_MAX,\n private readonly maxArrayLength = UINT32_MAX,\n private readonly maxMapLength = UINT32_MAX,\n private readonly maxExtLength = UINT32_MAX,\n private readonly keyDecoder: KeyDecoder | null = sharedCachedKeyDecoder,\n ) {}\n\n private reinitializeState() {\n this.totalPos = 0;\n this.headByte = HEAD_BYTE_REQUIRED;\n this.stack.length = 0;\n\n // view, bytes, and pos will be re-initialized in setBuffer()\n }\n\n private setBuffer(buffer: ArrayLike | BufferSource): void {\n this.bytes = ensureUint8Array(buffer);\n this.view = createDataView(this.bytes);\n this.pos = 0;\n }\n\n private appendBuffer(buffer: ArrayLike | BufferSource) {\n if (this.headByte === HEAD_BYTE_REQUIRED && !this.hasRemaining(1)) {\n this.setBuffer(buffer);\n } else {\n const remainingData = this.bytes.subarray(this.pos);\n const newData = ensureUint8Array(buffer);\n\n // concat remainingData + newData\n const newBuffer = new Uint8Array(remainingData.length + newData.length);\n newBuffer.set(remainingData);\n newBuffer.set(newData, remainingData.length);\n this.setBuffer(newBuffer);\n }\n }\n\n private hasRemaining(size: number) {\n return this.view.byteLength - this.pos >= size;\n }\n\n private createExtraByteError(posToShow: number): Error {\n const { view, pos } = this;\n return new RangeError(`Extra ${view.byteLength - pos} of ${view.byteLength} byte(s) found at buffer[${posToShow}]`);\n }\n\n /**\n * @throws {DecodeError}\n * @throws {RangeError}\n */\n public decode(buffer: ArrayLike | BufferSource): unknown {\n this.reinitializeState();\n this.setBuffer(buffer);\n\n const object = this.doDecodeSync();\n if (this.hasRemaining(1)) {\n throw this.createExtraByteError(this.pos);\n }\n return object;\n }\n\n public *decodeMulti(buffer: ArrayLike | BufferSource): Generator {\n this.reinitializeState();\n this.setBuffer(buffer);\n\n while (this.hasRemaining(1)) {\n yield this.doDecodeSync();\n }\n }\n\n public async decodeAsync(stream: AsyncIterable | BufferSource>): Promise {\n let decoded = false;\n let object: unknown;\n for await (const buffer of stream) {\n if (decoded) {\n throw this.createExtraByteError(this.totalPos);\n }\n\n this.appendBuffer(buffer);\n\n try {\n object = this.doDecodeSync();\n decoded = true;\n } catch (e) {\n if (!(e instanceof DataViewIndexOutOfBoundsError)) {\n throw e; // rethrow\n }\n // fallthrough\n }\n this.totalPos += this.pos;\n }\n\n if (decoded) {\n if (this.hasRemaining(1)) {\n throw this.createExtraByteError(this.totalPos);\n }\n return object;\n }\n\n const { headByte, pos, totalPos } = this;\n throw new RangeError(\n `Insufficient data in parsing ${prettyByte(headByte)} at ${totalPos} (${pos} in the current buffer)`,\n );\n }\n\n public decodeArrayStream(\n stream: AsyncIterable | BufferSource>,\n ): AsyncGenerator {\n return this.decodeMultiAsync(stream, true);\n }\n\n public decodeStream(stream: AsyncIterable | BufferSource>): AsyncGenerator {\n return this.decodeMultiAsync(stream, false);\n }\n\n private async *decodeMultiAsync(stream: AsyncIterable | BufferSource>, isArray: boolean) {\n let isArrayHeaderRequired = isArray;\n let arrayItemsLeft = -1;\n\n for await (const buffer of stream) {\n if (isArray && arrayItemsLeft === 0) {\n throw this.createExtraByteError(this.totalPos);\n }\n\n this.appendBuffer(buffer);\n\n if (isArrayHeaderRequired) {\n arrayItemsLeft = this.readArraySize();\n isArrayHeaderRequired = false;\n this.complete();\n }\n\n try {\n while (true) {\n yield this.doDecodeSync();\n if (--arrayItemsLeft === 0) {\n break;\n }\n }\n } catch (e) {\n if (!(e instanceof DataViewIndexOutOfBoundsError)) {\n throw e; // rethrow\n }\n // fallthrough\n }\n this.totalPos += this.pos;\n }\n }\n\n private doDecodeSync(): unknown {\n DECODE: while (true) {\n const headByte = this.readHeadByte();\n let object: unknown;\n\n if (headByte >= 0xe0) {\n // negative fixint (111x xxxx) 0xe0 - 0xff\n object = headByte - 0x100;\n } else if (headByte < 0xc0) {\n if (headByte < 0x80) {\n // positive fixint (0xxx xxxx) 0x00 - 0x7f\n object = headByte;\n } else if (headByte < 0x90) {\n // fixmap (1000 xxxx) 0x80 - 0x8f\n const size = headByte - 0x80;\n if (size !== 0) {\n this.pushMapState(size);\n this.complete();\n continue DECODE;\n } else {\n object = {};\n }\n } else if (headByte < 0xa0) {\n // fixarray (1001 xxxx) 0x90 - 0x9f\n const size = headByte - 0x90;\n if (size !== 0) {\n this.pushArrayState(size);\n this.complete();\n continue DECODE;\n } else {\n object = [];\n }\n } else {\n // fixstr (101x xxxx) 0xa0 - 0xbf\n const byteLength = headByte - 0xa0;\n object = this.decodeUtf8String(byteLength, 0);\n }\n } else if (headByte === 0xc0) {\n // nil\n object = null;\n } else if (headByte === 0xc2) {\n // false\n object = false;\n } else if (headByte === 0xc3) {\n // true\n object = true;\n } else if (headByte === 0xca) {\n // float 32\n object = this.readF32();\n } else if (headByte === 0xcb) {\n // float 64\n object = this.readF64();\n } else if (headByte === 0xcc) {\n // uint 8\n object = this.readU8();\n } else if (headByte === 0xcd) {\n // uint 16\n object = this.readU16();\n } else if (headByte === 0xce) {\n // uint 32\n object = this.readU32();\n } else if (headByte === 0xcf) {\n // uint 64\n object = this.readU64();\n } else if (headByte === 0xd0) {\n // int 8\n object = this.readI8();\n } else if (headByte === 0xd1) {\n // int 16\n object = this.readI16();\n } else if (headByte === 0xd2) {\n // int 32\n object = this.readI32();\n } else if (headByte === 0xd3) {\n // int 64\n object = this.readI64();\n } else if (headByte === 0xd9) {\n // str 8\n const byteLength = this.lookU8();\n object = this.decodeUtf8String(byteLength, 1);\n } else if (headByte === 0xda) {\n // str 16\n const byteLength = this.lookU16();\n object = this.decodeUtf8String(byteLength, 2);\n } else if (headByte === 0xdb) {\n // str 32\n const byteLength = this.lookU32();\n object = this.decodeUtf8String(byteLength, 4);\n } else if (headByte === 0xdc) {\n // array 16\n const size = this.readU16();\n if (size !== 0) {\n this.pushArrayState(size);\n this.complete();\n continue DECODE;\n } else {\n object = [];\n }\n } else if (headByte === 0xdd) {\n // array 32\n const size = this.readU32();\n if (size !== 0) {\n this.pushArrayState(size);\n this.complete();\n continue DECODE;\n } else {\n object = [];\n }\n } else if (headByte === 0xde) {\n // map 16\n const size = this.readU16();\n if (size !== 0) {\n this.pushMapState(size);\n this.complete();\n continue DECODE;\n } else {\n object = {};\n }\n } else if (headByte === 0xdf) {\n // map 32\n const size = this.readU32();\n if (size !== 0) {\n this.pushMapState(size);\n this.complete();\n continue DECODE;\n } else {\n object = {};\n }\n } else if (headByte === 0xc4) {\n // bin 8\n const size = this.lookU8();\n object = this.decodeBinary(size, 1);\n } else if (headByte === 0xc5) {\n // bin 16\n const size = this.lookU16();\n object = this.decodeBinary(size, 2);\n } else if (headByte === 0xc6) {\n // bin 32\n const size = this.lookU32();\n object = this.decodeBinary(size, 4);\n } else if (headByte === 0xd4) {\n // fixext 1\n object = this.decodeExtension(1, 0);\n } else if (headByte === 0xd5) {\n // fixext 2\n object = this.decodeExtension(2, 0);\n } else if (headByte === 0xd6) {\n // fixext 4\n object = this.decodeExtension(4, 0);\n } else if (headByte === 0xd7) {\n // fixext 8\n object = this.decodeExtension(8, 0);\n } else if (headByte === 0xd8) {\n // fixext 16\n object = this.decodeExtension(16, 0);\n } else if (headByte === 0xc7) {\n // ext 8\n const size = this.lookU8();\n object = this.decodeExtension(size, 1);\n } else if (headByte === 0xc8) {\n // ext 16\n const size = this.lookU16();\n object = this.decodeExtension(size, 2);\n } else if (headByte === 0xc9) {\n // ext 32\n const size = this.lookU32();\n object = this.decodeExtension(size, 4);\n } else {\n throw new DecodeError(`Unrecognized type byte: ${prettyByte(headByte)}`);\n }\n\n this.complete();\n\n const stack = this.stack;\n while (stack.length > 0) {\n // arrays and maps\n const state = stack[stack.length - 1]!;\n if (state.type === State.ARRAY) {\n state.array[state.position] = object;\n state.position++;\n if (state.position === state.size) {\n stack.pop();\n object = state.array;\n } else {\n continue DECODE;\n }\n } else if (state.type === State.MAP_KEY) {\n if (!isValidMapKeyType(object)) {\n throw new DecodeError(\"The type of key must be string or number but \" + typeof object);\n }\n if (object === \"__proto__\") {\n throw new DecodeError(\"The key __proto__ is not allowed\");\n }\n\n state.key = object;\n state.type = State.MAP_VALUE;\n continue DECODE;\n } else {\n // it must be `state.type === State.MAP_VALUE` here\n\n state.map[state.key!] = object;\n state.readCount++;\n\n if (state.readCount === state.size) {\n stack.pop();\n object = state.map;\n } else {\n state.key = null;\n state.type = State.MAP_KEY;\n continue DECODE;\n }\n }\n }\n\n return object;\n }\n }\n\n private readHeadByte(): number {\n if (this.headByte === HEAD_BYTE_REQUIRED) {\n this.headByte = this.readU8();\n // console.log(\"headByte\", prettyByte(this.headByte));\n }\n\n return this.headByte;\n }\n\n private complete(): void {\n this.headByte = HEAD_BYTE_REQUIRED;\n }\n\n private readArraySize(): number {\n const headByte = this.readHeadByte();\n\n switch (headByte) {\n case 0xdc:\n return this.readU16();\n case 0xdd:\n return this.readU32();\n default: {\n if (headByte < 0xa0) {\n return headByte - 0x90;\n } else {\n throw new DecodeError(`Unrecognized array type byte: ${prettyByte(headByte)}`);\n }\n }\n }\n }\n\n private pushMapState(size: number) {\n if (size > this.maxMapLength) {\n throw new DecodeError(`Max length exceeded: map length (${size}) > maxMapLengthLength (${this.maxMapLength})`);\n }\n\n this.stack.push({\n type: State.MAP_KEY,\n size,\n key: null,\n readCount: 0,\n map: {},\n });\n }\n\n private pushArrayState(size: number) {\n if (size > this.maxArrayLength) {\n throw new DecodeError(`Max length exceeded: array length (${size}) > maxArrayLength (${this.maxArrayLength})`);\n }\n\n this.stack.push({\n type: State.ARRAY,\n size,\n array: new Array(size),\n position: 0,\n });\n }\n\n private decodeUtf8String(byteLength: number, headerOffset: number): string {\n if (byteLength > this.maxStrLength) {\n throw new DecodeError(\n `Max length exceeded: UTF-8 byte length (${byteLength}) > maxStrLength (${this.maxStrLength})`,\n );\n }\n\n if (this.bytes.byteLength < this.pos + headerOffset + byteLength) {\n throw MORE_DATA;\n }\n\n const offset = this.pos + headerOffset;\n let object: string;\n if (this.stateIsMapKey() && this.keyDecoder?.canBeCached(byteLength)) {\n object = this.keyDecoder.decode(this.bytes, offset, byteLength);\n } else if (byteLength > TEXT_DECODER_THRESHOLD) {\n object = utf8DecodeTD(this.bytes, offset, byteLength);\n } else {\n object = utf8DecodeJs(this.bytes, offset, byteLength);\n }\n this.pos += headerOffset + byteLength;\n return object;\n }\n\n private stateIsMapKey(): boolean {\n if (this.stack.length > 0) {\n const state = this.stack[this.stack.length - 1]!;\n return state.type === State.MAP_KEY;\n }\n return false;\n }\n\n private decodeBinary(byteLength: number, headOffset: number): Uint8Array {\n if (byteLength > this.maxBinLength) {\n throw new DecodeError(`Max length exceeded: bin length (${byteLength}) > maxBinLength (${this.maxBinLength})`);\n }\n\n if (!this.hasRemaining(byteLength + headOffset)) {\n throw MORE_DATA;\n }\n\n const offset = this.pos + headOffset;\n const object = this.bytes.subarray(offset, offset + byteLength);\n this.pos += headOffset + byteLength;\n return object;\n }\n\n private decodeExtension(size: number, headOffset: number): unknown {\n if (size > this.maxExtLength) {\n throw new DecodeError(`Max length exceeded: ext length (${size}) > maxExtLength (${this.maxExtLength})`);\n }\n\n const extType = this.view.getInt8(this.pos + headOffset);\n const data = this.decodeBinary(size, headOffset + 1 /* extType */);\n return this.extensionCodec.decode(data, extType, this.context);\n }\n\n private lookU8() {\n return this.view.getUint8(this.pos);\n }\n\n private lookU16() {\n return this.view.getUint16(this.pos);\n }\n\n private lookU32() {\n return this.view.getUint32(this.pos);\n }\n\n private readU8(): number {\n const value = this.view.getUint8(this.pos);\n this.pos++;\n return value;\n }\n\n private readI8(): number {\n const value = this.view.getInt8(this.pos);\n this.pos++;\n return value;\n }\n\n private readU16(): number {\n const value = this.view.getUint16(this.pos);\n this.pos += 2;\n return value;\n }\n\n private readI16(): number {\n const value = this.view.getInt16(this.pos);\n this.pos += 2;\n return value;\n }\n\n private readU32(): number {\n const value = this.view.getUint32(this.pos);\n this.pos += 4;\n return value;\n }\n\n private readI32(): number {\n const value = this.view.getInt32(this.pos);\n this.pos += 4;\n return value;\n }\n\n private readU64(): number {\n const value = getUint64(this.view, this.pos);\n this.pos += 8;\n return value;\n }\n\n private readI64(): number {\n const value = getInt64(this.view, this.pos);\n this.pos += 8;\n return value;\n }\n\n private readF32() {\n const value = this.view.getFloat32(this.pos);\n this.pos += 4;\n return value;\n }\n\n private readF64() {\n const value = this.view.getFloat64(this.pos);\n this.pos += 8;\n return value;\n }\n}\n","import { Decoder } from \"./Decoder\";\nimport type { ExtensionCodecType } from \"./ExtensionCodec\";\nimport type { ContextOf, SplitUndefined } from \"./context\";\n\nexport type DecodeOptions = Readonly<\n Partial<{\n extensionCodec: ExtensionCodecType;\n\n /**\n * Maximum string length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxStrLength: number;\n /**\n * Maximum binary length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxBinLength: number;\n /**\n * Maximum array length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxArrayLength: number;\n /**\n * Maximum map length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxMapLength: number;\n /**\n * Maximum extension length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxExtLength: number;\n }>\n> &\n ContextOf;\n\nexport const defaultDecodeOptions: DecodeOptions = {};\n\n/**\n * It decodes a single MessagePack object in a buffer.\n *\n * This is a synchronous decoding function.\n * See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}.\n */\nexport function decode(\n buffer: ArrayLike | BufferSource,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): unknown {\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n return decoder.decode(buffer);\n}\n\n/**\n * It decodes multiple MessagePack objects in a buffer.\n * This is corresponding to {@link decodeMultiStream()}.\n */\nexport function decodeMulti(\n buffer: ArrayLike | BufferSource,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): Generator {\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n return decoder.decodeMulti(buffer);\n}\n","// utility for whatwg streams\n\n// The living standard of whatwg streams says\n// ReadableStream is also AsyncIterable, but\n// as of June 2019, no browser implements it.\n// See https://streams.spec.whatwg.org/ for details\nexport type ReadableStreamLike = AsyncIterable | ReadableStream;\n\nexport function isAsyncIterable(object: ReadableStreamLike): object is AsyncIterable {\n return (object as any)[Symbol.asyncIterator] != null;\n}\n\nfunction assertNonNull(value: T | null | undefined): asserts value is T {\n if (value == null) {\n throw new Error(\"Assertion Failure: value must not be null nor undefined\");\n }\n}\n\nexport async function* asyncIterableFromStream(stream: ReadableStream): AsyncIterable {\n const reader = stream.getReader();\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n return;\n }\n assertNonNull(value);\n yield value;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function ensureAsyncIterable(streamLike: ReadableStreamLike): AsyncIterable {\n if (isAsyncIterable(streamLike)) {\n return streamLike;\n } else {\n return asyncIterableFromStream(streamLike);\n }\n}\n","import { Decoder } from \"./Decoder\";\nimport { ensureAsyncIterable } from \"./utils/stream\";\nimport { defaultDecodeOptions } from \"./decode\";\nimport type { ReadableStreamLike } from \"./utils/stream\";\nimport type { DecodeOptions } from \"./decode\";\nimport type { SplitUndefined } from \"./context\";\n\nexport async function decodeAsync(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): Promise {\n const stream = ensureAsyncIterable(streamLike);\n\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n return decoder.decodeAsync(stream);\n}\n\nexport function decodeArrayStream(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): AsyncGenerator {\n const stream = ensureAsyncIterable(streamLike);\n\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n\n return decoder.decodeArrayStream(stream);\n}\n\nexport function decodeMultiStream(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): AsyncGenerator {\n const stream = ensureAsyncIterable(streamLike);\n\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n\n return decoder.decodeStream(stream);\n}\n\n/**\n * @deprecated Use {@link decodeMultiStream()} instead.\n */\nexport function decodeStream(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): AsyncGenerator {\n return decodeMultiStream(streamLike, options);\n}\n","// Main Functions:\n\nimport { encode } from \"./encode\";\nexport { encode };\nimport type { EncodeOptions } from \"./encode\";\nexport type { EncodeOptions };\n\nimport { decode, decodeMulti } from \"./decode\";\nexport { decode, decodeMulti };\nimport type { DecodeOptions } from \"./decode\";\nexport { DecodeOptions };\n\nimport { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream } from \"./decodeAsync\";\nexport { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream };\n\nimport { Decoder, DataViewIndexOutOfBoundsError } from \"./Decoder\";\nimport { DecodeError } from \"./DecodeError\";\nexport { Decoder, DecodeError, DataViewIndexOutOfBoundsError };\n\nimport { Encoder } from \"./Encoder\";\nexport { Encoder };\n\n// Utilitiies for Extension Types:\n\nimport { ExtensionCodec } from \"./ExtensionCodec\";\nexport { ExtensionCodec };\nimport type { ExtensionCodecType, ExtensionDecoderType, ExtensionEncoderType } from \"./ExtensionCodec\";\nexport type { ExtensionCodecType, ExtensionDecoderType, ExtensionEncoderType };\nimport { ExtData } from \"./ExtData\";\nexport { ExtData };\n\nimport {\n EXT_TIMESTAMP,\n encodeDateToTimeSpec,\n encodeTimeSpecToTimestamp,\n decodeTimestampToTimeSpec,\n encodeTimestampExtension,\n decodeTimestampExtension,\n} from \"./timestamp\";\nexport {\n EXT_TIMESTAMP,\n encodeDateToTimeSpec,\n encodeTimeSpecToTimestamp,\n decodeTimestampToTimeSpec,\n encodeTimestampExtension,\n decodeTimestampExtension,\n};\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.min.js b/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.min.js deleted file mode 100644 index a328635..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist.es5+umd/msgpack.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.MessagePack=e():t.MessagePack=e()}(this,(function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{DataViewIndexOutOfBoundsError:function(){return R},DecodeError:function(){return m},Decoder:function(){return G},EXT_TIMESTAMP:function(){return U},Encoder:function(){return D},ExtData:function(){return b},ExtensionCodec:function(){return I},decode:function(){return q},decodeArrayStream:function(){return nt},decodeAsync:function(){return et},decodeMulti:function(){return J},decodeMultiStream:function(){return rt},decodeStream:function(){return it},decodeTimestampExtension:function(){return L},decodeTimestampToTimeSpec:function(){return T},encode:function(){return C},encodeDateToTimeSpec:function(){return E},encodeTimeSpecToTimestamp:function(){return S},encodeTimestampExtension:function(){return B}});var n=4294967295;function r(t,e,n){var r=Math.floor(n/4294967296),i=n;t.setUint32(e,r),t.setUint32(e+4,i)}function i(t,e){return 4294967296*t.getInt32(e)+t.getUint32(e+4)}var o,s,a,c=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},h=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i=55296&&i<=56319&&r65535&&(l-=65536,o.push(l>>>10&1023|55296),l=56320|1023&l),o.push(l)}else o.push(a);o.length>=4096&&(s+=String.fromCharCode.apply(String,h([],c(o),!1)),o.length=0)}return o.length>0&&(s+=String.fromCharCode.apply(String,h([],c(o),!1))),s}var w,v=u?new TextDecoder:null,g=u?"undefined"!=typeof process&&"force"!==(null===(a=null===process||void 0===process?void 0:process.env)||void 0===a?void 0:a.TEXT_DECODER)?200:0:n,b=function(t,e){this.type=t,this.data=e},x=(w=function(t,e){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},w(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=function(t){function e(n){var r=t.call(this,n)||this,i=Object.create(e.prototype);return Object.setPrototypeOf(r,i),Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,value:e.name}),r}return x(e,t),e}(Error),U=-1;function S(t){var e,n=t.sec,i=t.nsec;if(n>=0&&i>=0&&n<=17179869183){if(0===i&&n<=4294967295){var o=new Uint8Array(4);return(e=new DataView(o.buffer)).setUint32(0,n),o}var s=n/4294967296,a=4294967295&n;return o=new Uint8Array(8),(e=new DataView(o.buffer)).setUint32(0,i<<2|3&s),e.setUint32(4,a),o}return o=new Uint8Array(12),(e=new DataView(o.buffer)).setUint32(0,i),r(e,4,n),o}function E(t){var e=t.getTime(),n=Math.floor(e/1e3),r=1e6*(e-1e3*n),i=Math.floor(r/1e9);return{sec:n+i,nsec:r-1e9*i}}function B(t){return t instanceof Date?S(E(t)):null}function T(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:var n=e.getUint32(0);return{sec:4294967296*(3&n)+e.getUint32(4),nsec:n>>>2};case 12:return{sec:i(e,4),nsec:e.getUint32(0)};default:throw new m("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(t.length))}}function L(t){var e=T(t);return new Date(1e3*e.sec+e.nsec/1e6)}var A={type:U,encode:B,decode:L},I=function(){function t(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(A)}return t.prototype.register=function(t){var e=t.type,n=t.encode,r=t.decode;if(e>=0)this.encoders[e]=n,this.decoders[e]=r;else{var i=1+e;this.builtInEncoders[i]=n,this.builtInDecoders[i]=r}},t.prototype.tryToEncode=function(t,e){for(var n=0;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},D=function(){function t(t,e,n,r,i,o,s,a){void 0===t&&(t=I.defaultCodec),void 0===e&&(e=void 0),void 0===n&&(n=100),void 0===r&&(r=2048),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===a&&(a=!1),this.extensionCodec=t,this.context=e,this.maxDepth=n,this.initialBufferSize=r,this.sortKeys=i,this.forceFloat32=o,this.ignoreUndefined=s,this.forceIntegerToFloat=a,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return t.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},t.prototype.reinitializeState=function(){this.pos=0},t.prototype.encode=function(t){return this.reinitializeState(),this.doEncode(t,1),this.getUint8Array()},t.prototype.doEncode=function(t,e){if(e>this.maxDepth)throw new Error("Too deep objects in depth ".concat(e));null==t?this.encodeNil():"boolean"==typeof t?this.encodeBoolean(t):"number"==typeof t?this.encodeNumber(t):"string"==typeof t?this.encodeString(t):this.encodeObject(t,e)},t.prototype.ensureBufferSizeToWrite=function(t){var e=this.pos+t;this.view.byteLength=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):(this.writeU8(211),this.writeI64(t)):this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))},t.prototype.writeStringHeader=function(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too long string: ".concat(t," bytes in UTF-8"));this.writeU8(219),this.writeU32(t)}},t.prototype.encodeString=function(t){if(t.length>p){var e=f(t);this.ensureBufferSizeToWrite(5+e),this.writeStringHeader(e),d(t,this.bytes,this.pos),this.pos+=e}else e=f(t),this.ensureBufferSizeToWrite(5+e),this.writeStringHeader(e),function(t,e,n){for(var r=t.length,i=n,o=0;o>6&31|192;else{if(s>=55296&&s<=56319&&o>12&15|224,e[i++]=s>>6&63|128):(e[i++]=s>>18&7|240,e[i++]=s>>12&63|128,e[i++]=s>>6&63|128)}e[i++]=63&s|128}else e[i++]=s}}(t,this.bytes,this.pos),this.pos+=e},t.prototype.encodeObject=function(t,e){var n=this.extensionCodec.tryToEncode(t,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(t))this.encodeArray(t,e);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else{if("object"!=typeof t)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(t)));this.encodeMap(t,e)}},t.prototype.encodeBinary=function(t){var e=t.byteLength;if(e<256)this.writeU8(196),this.writeU8(e);else if(e<65536)this.writeU8(197),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too large binary: ".concat(e));this.writeU8(198),this.writeU32(e)}var n=k(t);this.writeU8a(n)},t.prototype.encodeArray=function(t,e){var n,r,i=t.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too large array: ".concat(i));this.writeU8(221),this.writeU32(i)}try{for(var o=M(t),s=o.next();!s.done;s=o.next()){var a=s.value;this.doEncode(a,e+1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.countWithoutUndefined=function(t,e){var n,r,i=0;try{for(var o=M(e),s=o.next();!s.done;s=o.next())void 0!==t[s.value]&&i++}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t.prototype.encodeMap=function(t,e){var n,r,i=Object.keys(t);this.sortKeys&&i.sort();var o=this.ignoreUndefined?this.countWithoutUndefined(t,i):i.length;if(o<16)this.writeU8(128+o);else if(o<65536)this.writeU8(222),this.writeU16(o);else{if(!(o<4294967296))throw new Error("Too large map object: ".concat(o));this.writeU8(223),this.writeU32(o)}try{for(var s=M(i),a=s.next();!a.done;a=s.next()){var c=a.value,h=t[c];this.ignoreUndefined&&void 0===h||(this.encodeString(c),this.doEncode(h,e+1))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},t.prototype.encodeExtension=function(t){var e=t.data.length;if(1===e)this.writeU8(212);else if(2===e)this.writeU8(213);else if(4===e)this.writeU8(214);else if(8===e)this.writeU8(215);else if(16===e)this.writeU8(216);else if(e<256)this.writeU8(199),this.writeU8(e);else if(e<65536)this.writeU8(200),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too large extension object: ".concat(e));this.writeU8(201),this.writeU32(e)}this.writeI8(t.type),this.writeU8a(t.data)},t.prototype.writeU8=function(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++},t.prototype.writeU8a=function(t){var e=t.length;this.ensureBufferSizeToWrite(e),this.bytes.set(t,this.pos),this.pos+=e},t.prototype.writeI8=function(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++},t.prototype.writeU16=function(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2},t.prototype.writeI16=function(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2},t.prototype.writeU32=function(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4},t.prototype.writeI32=function(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4},t.prototype.writeF32=function(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4},t.prototype.writeF64=function(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8},t.prototype.writeU64=function(t){this.ensureBufferSizeToWrite(8),function(t,e,n){var r=n/4294967296,i=n;t.setUint32(e,r),t.setUint32(e+4,i)}(this.view,this.pos,t),this.pos+=8},t.prototype.writeI64=function(t){this.ensureBufferSizeToWrite(8),r(this.view,this.pos,t),this.pos+=8},t}(),z={};function C(t,e){return void 0===e&&(e=z),new D(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat).encode(t)}function P(t){return"".concat(t<0?"-":"","0x").concat(Math.abs(t).toString(16).padStart(2,"0"))}var O=function(){function t(t,e){void 0===t&&(t=16),void 0===e&&(e=16),this.maxKeyLength=t,this.maxLengthPerKey=e,this.hit=0,this.miss=0,this.caches=[];for(var n=0;n0&&t<=this.maxKeyLength},t.prototype.find=function(t,e,n){var r,i,o=this.caches[n-1];try{t:for(var s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),a=s.next();!a.done;a=s.next()){for(var c=a.value,h=c.bytes,u=0;u=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)},t.prototype.decode=function(t,e,n){var r=this.find(t,e,n);if(null!=r)return this.hit++,r;this.miss++;var i=y(t,e,n),o=Uint8Array.prototype.slice.call(t,e,e+n);return this.store(o,i),i},t}(),_=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1||a(t,e)}))})}function a(t,e){try{(n=i[t](e)).value instanceof F?Promise.resolve(n.value.v).then(c,h):u(o[0][2],n)}catch(t){u(o[0][3],t)}var n}function c(t){a("next",t)}function h(t){a("throw",t)}function u(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}},V=new DataView(new ArrayBuffer(0)),K=new Uint8Array(V.buffer),R=function(){try{V.getInt8(0)}catch(t){return t.constructor}throw new Error("never reached")}(),N=new R("Insufficient data"),H=new O,G=function(){function t(t,e,r,i,o,s,a,c){void 0===t&&(t=I.defaultCodec),void 0===e&&(e=void 0),void 0===r&&(r=n),void 0===i&&(i=n),void 0===o&&(o=n),void 0===s&&(s=n),void 0===a&&(a=n),void 0===c&&(c=H),this.extensionCodec=t,this.context=e,this.maxStrLength=r,this.maxBinLength=i,this.maxArrayLength=o,this.maxMapLength=s,this.maxExtLength=a,this.keyDecoder=c,this.totalPos=0,this.pos=0,this.view=V,this.bytes=K,this.headByte=-1,this.stack=[]}return t.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1,this.stack.length=0},t.prototype.setBuffer=function(t){this.bytes=k(t),this.view=function(t){if(t instanceof ArrayBuffer)return new DataView(t);var e=k(t);return new DataView(e.buffer,e.byteOffset,e.byteLength)}(this.bytes),this.pos=0},t.prototype.appendBuffer=function(t){if(-1!==this.headByte||this.hasRemaining(1)){var e=this.bytes.subarray(this.pos),n=k(t),r=new Uint8Array(e.length+n.length);r.set(e),r.set(n,e.length),this.setBuffer(r)}else this.setBuffer(t)},t.prototype.hasRemaining=function(t){return this.view.byteLength-this.pos>=t},t.prototype.createExtraByteError=function(t){var e=this.view,n=this.pos;return new RangeError("Extra ".concat(e.byteLength-n," of ").concat(e.byteLength," byte(s) found at buffer[").concat(t,"]"))},t.prototype.decode=function(t){this.reinitializeState(),this.setBuffer(t);var e=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return e},t.prototype.decodeMulti=function(t){return _(this,(function(e){switch(e.label){case 0:this.reinitializeState(),this.setBuffer(t),e.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}}))},t.prototype.decodeAsync=function(t){var e,n,r,i,o,s,a,c;return o=this,s=void 0,c=function(){var o,s,a,c,h,u,f,l;return _(this,(function(p){switch(p.label){case 0:o=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),e=j(t),p.label=2;case 2:return[4,e.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,o)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),o=!0}catch(t){if(!(t instanceof R))throw t}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),r={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(i=e.return)?[4,i.call(e)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(r)throw r.error;return[7];case 11:return[7];case 12:if(o){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,s]}throw u=(h=this).headByte,f=h.pos,l=h.totalPos,new RangeError("Insufficient data in parsing ".concat(P(u)," at ").concat(l," (").concat(f," in the current buffer)"))}}))},new((a=void 0)||(a=Promise))((function(t,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):(i=e.value,i instanceof a?i:new a((function(t){t(i)}))).then(n,r)}i((c=c.apply(o,s||[])).next())}))},t.prototype.decodeArrayStream=function(t){return this.decodeMultiAsync(t,!0)},t.prototype.decodeStream=function(t){return this.decodeMultiAsync(t,!1)},t.prototype.decodeMultiAsync=function(t,e){return W(this,arguments,(function(){var n,r,i,o,s,a,c,h,u;return _(this,(function(f){switch(f.label){case 0:n=e,r=-1,f.label=1;case 1:f.trys.push([1,13,14,19]),i=j(t),f.label=2;case 2:return[4,F(i.next())];case 3:if((o=f.sent()).done)return[3,12];if(s=o.value,e&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(r=this.readArraySize(),n=!1,this.complete()),f.label=4;case 4:f.trys.push([4,9,,10]),f.label=5;case 5:return[4,F(this.doDecodeSync())];case 6:return[4,f.sent()];case 7:return f.sent(),0==--r?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=f.sent())instanceof R))throw a;return[3,10];case 10:this.totalPos+=this.pos,f.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=f.sent(),h={error:c},[3,19];case 14:return f.trys.push([14,,17,18]),o&&!o.done&&(u=i.return)?[4,F(u.call(i))]:[3,16];case 15:f.sent(),f.label=16;case 16:return[3,18];case 17:if(h)throw h.error;return[7];case 18:return[7];case 19:return[2]}}))}))},t.prototype.doDecodeSync=function(){t:for(;;){var t=this.readHeadByte(),e=void 0;if(t>=224)e=t-256;else if(t<192)if(t<128)e=t;else if(t<144){if(0!=(r=t-128)){this.pushMapState(r),this.complete();continue t}e={}}else if(t<160){if(0!=(r=t-144)){this.pushArrayState(r),this.complete();continue t}e=[]}else{var n=t-160;e=this.decodeUtf8String(n,0)}else if(192===t)e=null;else if(194===t)e=!1;else if(195===t)e=!0;else if(202===t)e=this.readF32();else if(203===t)e=this.readF64();else if(204===t)e=this.readU8();else if(205===t)e=this.readU16();else if(206===t)e=this.readU32();else if(207===t)e=this.readU64();else if(208===t)e=this.readI8();else if(209===t)e=this.readI16();else if(210===t)e=this.readI32();else if(211===t)e=this.readI64();else if(217===t)n=this.lookU8(),e=this.decodeUtf8String(n,1);else if(218===t)n=this.lookU16(),e=this.decodeUtf8String(n,2);else if(219===t)n=this.lookU32(),e=this.decodeUtf8String(n,4);else if(220===t){if(0!==(r=this.readU16())){this.pushArrayState(r),this.complete();continue t}e=[]}else if(221===t){if(0!==(r=this.readU32())){this.pushArrayState(r),this.complete();continue t}e=[]}else if(222===t){if(0!==(r=this.readU16())){this.pushMapState(r),this.complete();continue t}e={}}else if(223===t){if(0!==(r=this.readU32())){this.pushMapState(r),this.complete();continue t}e={}}else if(196===t){var r=this.lookU8();e=this.decodeBinary(r,1)}else if(197===t)r=this.lookU16(),e=this.decodeBinary(r,2);else if(198===t)r=this.lookU32(),e=this.decodeBinary(r,4);else if(212===t)e=this.decodeExtension(1,0);else if(213===t)e=this.decodeExtension(2,0);else if(214===t)e=this.decodeExtension(4,0);else if(215===t)e=this.decodeExtension(8,0);else if(216===t)e=this.decodeExtension(16,0);else if(199===t)r=this.lookU8(),e=this.decodeExtension(r,1);else if(200===t)r=this.lookU16(),e=this.decodeExtension(r,2);else{if(201!==t)throw new m("Unrecognized type byte: ".concat(P(t)));r=this.lookU32(),e=this.decodeExtension(r,4)}this.complete();for(var i=this.stack;i.length>0;){var o=i[i.length-1];if(0===o.type){if(o.array[o.position]=e,o.position++,o.position!==o.size)continue t;i.pop(),e=o.array}else{if(1===o.type){if(void 0,"string"!=(s=typeof e)&&"number"!==s)throw new m("The type of key must be string or number but "+typeof e);if("__proto__"===e)throw new m("The key __proto__ is not allowed");o.key=e,o.type=2;continue t}if(o.map[o.key]=e,o.readCount++,o.readCount!==o.size){o.key=null,o.type=1;continue t}i.pop(),e=o.map}}return e}var s},t.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},t.prototype.complete=function(){this.headByte=-1},t.prototype.readArraySize=function(){var t=this.readHeadByte();switch(t){case 220:return this.readU16();case 221:return this.readU32();default:if(t<160)return t-144;throw new m("Unrecognized array type byte: ".concat(P(t)))}},t.prototype.pushMapState=function(t){if(t>this.maxMapLength)throw new m("Max length exceeded: map length (".concat(t,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:t,key:null,readCount:0,map:{}})},t.prototype.pushArrayState=function(t){if(t>this.maxArrayLength)throw new m("Max length exceeded: array length (".concat(t,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:t,array:new Array(t),position:0})},t.prototype.decodeUtf8String=function(t,e){var n;if(t>this.maxStrLength)throw new m("Max length exceeded: UTF-8 byte length (".concat(t,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthg?function(t,e,n){var r=t.subarray(e,e+n);return v.decode(r)}(this.bytes,i,t):y(this.bytes,i,t),this.pos+=e+t,r},t.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},t.prototype.decodeBinary=function(t,e){if(t>this.maxBinLength)throw new m("Max length exceeded: bin length (".concat(t,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(t+e))throw N;var n=this.pos+e,r=this.bytes.subarray(n,n+t);return this.pos+=e+t,r},t.prototype.decodeExtension=function(t,e){if(t>this.maxExtLength)throw new m("Max length exceeded: ext length (".concat(t,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+e),r=this.decodeBinary(t,e+1);return this.extensionCodec.decode(r,n,this.context)},t.prototype.lookU8=function(){return this.view.getUint8(this.pos)},t.prototype.lookU16=function(){return this.view.getUint16(this.pos)},t.prototype.lookU32=function(){return this.view.getUint32(this.pos)},t.prototype.readU8=function(){var t=this.view.getUint8(this.pos);return this.pos++,t},t.prototype.readI8=function(){var t=this.view.getInt8(this.pos);return this.pos++,t},t.prototype.readU16=function(){var t=this.view.getUint16(this.pos);return this.pos+=2,t},t.prototype.readI16=function(){var t=this.view.getInt16(this.pos);return this.pos+=2,t},t.prototype.readU32=function(){var t=this.view.getUint32(this.pos);return this.pos+=4,t},t.prototype.readI32=function(){var t=this.view.getInt32(this.pos);return this.pos+=4,t},t.prototype.readU64=function(){var t,e,n=(t=this.view,e=this.pos,4294967296*t.getUint32(e)+t.getUint32(e+4));return this.pos+=8,n},t.prototype.readI64=function(){var t=i(this.view,this.pos);return this.pos+=8,t},t.prototype.readF32=function(){var t=this.view.getFloat32(this.pos);return this.pos+=4,t},t.prototype.readF64=function(){var t=this.view.getFloat64(this.pos);return this.pos+=8,t},t}(),X={};function q(t,e){return void 0===e&&(e=X),new G(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decode(t)}function J(t,e){return void 0===e&&(e=X),new G(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeMulti(t)}var Q=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1||a(t,e)}))})}function a(t,e){try{(n=i[t](e)).value instanceof Y?Promise.resolve(n.value.v).then(c,h):u(o[0][2],n)}catch(t){u(o[0][3],t)}var n}function c(t){a("next",t)}function h(t){a("throw",t)}function u(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}};function $(t){if(null==t)throw new Error("Assertion Failure: value must not be null nor undefined")}function tt(t){return null!=t[Symbol.asyncIterator]?t:function(t){return Z(this,arguments,(function(){var e,n,r,i;return Q(this,(function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Y(e.read())];case 3:return n=o.sent(),r=n.done,i=n.value,r?[4,Y(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return $(i),[4,Y(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}}))}))}(t)}function et(t,e){return void 0===e&&(e=X),n=this,r=void 0,o=function(){var n;return function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n byteLength += 3;\n } else {\n // 4-byte\n byteLength += 4;\n }\n }\n }\n return byteLength;\n}\n\nexport function utf8EncodeJs(str: string, output: Uint8Array, outputOffset: number): void {\n const strLength = str.length;\n let offset = outputOffset;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n\n if ((value & 0xffffff80) === 0) {\n // 1-byte\n output[offset++] = value;\n continue;\n } else if ((value & 0xfffff800) === 0) {\n // 2-bytes\n output[offset++] = ((value >> 6) & 0x1f) | 0xc0;\n } else {\n // handle surrogate pair\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n output[offset++] = ((value >> 12) & 0x0f) | 0xe0;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n } else {\n // 4-byte\n output[offset++] = ((value >> 18) & 0x07) | 0xf0;\n output[offset++] = ((value >> 12) & 0x3f) | 0x80;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n }\n }\n\n output[offset++] = (value & 0x3f) | 0x80;\n }\n}\n\nconst sharedTextEncoder = TEXT_ENCODING_AVAILABLE ? new TextEncoder() : undefined;\nexport const TEXT_ENCODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE\n ? UINT32_MAX\n : typeof process !== \"undefined\" && process?.env?.[\"TEXT_ENCODING\"] !== \"force\"\n ? 200\n : 0;\n\nfunction utf8EncodeTEencode(str: string, output: Uint8Array, outputOffset: number): void {\n output.set(sharedTextEncoder!.encode(str), outputOffset);\n}\n\nfunction utf8EncodeTEencodeInto(str: string, output: Uint8Array, outputOffset: number): void {\n sharedTextEncoder!.encodeInto(str, output.subarray(outputOffset));\n}\n\nexport const utf8EncodeTE = sharedTextEncoder?.encodeInto ? utf8EncodeTEencodeInto : utf8EncodeTEencode;\n\nconst CHUNK_SIZE = 0x1_000;\n\nexport function utf8DecodeJs(bytes: Uint8Array, inputOffset: number, byteLength: number): string {\n let offset = inputOffset;\n const end = offset + byteLength;\n\n const units: Array = [];\n let result = \"\";\n while (offset < end) {\n const byte1 = bytes[offset++]!;\n if ((byte1 & 0x80) === 0) {\n // 1 byte\n units.push(byte1);\n } else if ((byte1 & 0xe0) === 0xc0) {\n // 2 bytes\n const byte2 = bytes[offset++]! & 0x3f;\n units.push(((byte1 & 0x1f) << 6) | byte2);\n } else if ((byte1 & 0xf0) === 0xe0) {\n // 3 bytes\n const byte2 = bytes[offset++]! & 0x3f;\n const byte3 = bytes[offset++]! & 0x3f;\n units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);\n } else if ((byte1 & 0xf8) === 0xf0) {\n // 4 bytes\n const byte2 = bytes[offset++]! & 0x3f;\n const byte3 = bytes[offset++]! & 0x3f;\n const byte4 = bytes[offset++]! & 0x3f;\n let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;\n if (unit > 0xffff) {\n unit -= 0x10000;\n units.push(((unit >>> 10) & 0x3ff) | 0xd800);\n unit = 0xdc00 | (unit & 0x3ff);\n }\n units.push(unit);\n } else {\n units.push(byte1);\n }\n\n if (units.length >= CHUNK_SIZE) {\n result += String.fromCharCode(...units);\n units.length = 0;\n }\n }\n\n if (units.length > 0) {\n result += String.fromCharCode(...units);\n }\n\n return result;\n}\n\nconst sharedTextDecoder = TEXT_ENCODING_AVAILABLE ? new TextDecoder() : null;\nexport const TEXT_DECODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE\n ? UINT32_MAX\n : typeof process !== \"undefined\" && process?.env?.[\"TEXT_DECODER\"] !== \"force\"\n ? 200\n : 0;\n\nexport function utf8DecodeTD(bytes: Uint8Array, inputOffset: number, byteLength: number): string {\n const stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength);\n return sharedTextDecoder!.decode(stringBytes);\n}\n","/**\n * ExtData is used to handle Extension Types that are not registered to ExtensionCodec.\n */\nexport class ExtData {\n constructor(readonly type: number, readonly data: Uint8Array) {}\n}\n","export class DecodeError extends Error {\n constructor(message: string) {\n super(message);\n\n // fix the prototype chain in a cross-platform way\n const proto: typeof DecodeError.prototype = Object.create(DecodeError.prototype);\n Object.setPrototypeOf(this, proto);\n\n Object.defineProperty(this, \"name\", {\n configurable: true,\n enumerable: false,\n value: DecodeError.name,\n });\n }\n}\n","// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type\nimport { DecodeError } from \"./DecodeError\";\nimport { getInt64, setInt64 } from \"./utils/int\";\n\nexport const EXT_TIMESTAMP = -1;\n\nexport type TimeSpec = {\n sec: number;\n nsec: number;\n};\n\nconst TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int\nconst TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int\n\nexport function encodeTimeSpecToTimestamp({ sec, nsec }: TimeSpec): Uint8Array {\n if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {\n // Here sec >= 0 && nsec >= 0\n if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {\n // timestamp 32 = { sec32 (unsigned) }\n const rv = new Uint8Array(4);\n const view = new DataView(rv.buffer);\n view.setUint32(0, sec);\n return rv;\n } else {\n // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) }\n const secHigh = sec / 0x100000000;\n const secLow = sec & 0xffffffff;\n const rv = new Uint8Array(8);\n const view = new DataView(rv.buffer);\n // nsec30 | secHigh2\n view.setUint32(0, (nsec << 2) | (secHigh & 0x3));\n // secLow32\n view.setUint32(4, secLow);\n return rv;\n }\n } else {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n const rv = new Uint8Array(12);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec);\n setInt64(view, 4, sec);\n return rv;\n }\n}\n\nexport function encodeDateToTimeSpec(date: Date): TimeSpec {\n const msec = date.getTime();\n const sec = Math.floor(msec / 1e3);\n const nsec = (msec - sec * 1e3) * 1e6;\n\n // Normalizes { sec, nsec } to ensure nsec is unsigned.\n const nsecInSec = Math.floor(nsec / 1e9);\n return {\n sec: sec + nsecInSec,\n nsec: nsec - nsecInSec * 1e9,\n };\n}\n\nexport function encodeTimestampExtension(object: unknown): Uint8Array | null {\n if (object instanceof Date) {\n const timeSpec = encodeDateToTimeSpec(object);\n return encodeTimeSpecToTimestamp(timeSpec);\n } else {\n return null;\n }\n}\n\nexport function decodeTimestampToTimeSpec(data: Uint8Array): TimeSpec {\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n\n // data may be 32, 64, or 96 bits\n switch (data.byteLength) {\n case 4: {\n // timestamp 32 = { sec32 }\n const sec = view.getUint32(0);\n const nsec = 0;\n return { sec, nsec };\n }\n case 8: {\n // timestamp 64 = { nsec30, sec34 }\n const nsec30AndSecHigh2 = view.getUint32(0);\n const secLow32 = view.getUint32(4);\n const sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32;\n const nsec = nsec30AndSecHigh2 >>> 2;\n return { sec, nsec };\n }\n case 12: {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n\n const sec = getInt64(view, 4);\n const nsec = view.getUint32(0);\n return { sec, nsec };\n }\n default:\n throw new DecodeError(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`);\n }\n}\n\nexport function decodeTimestampExtension(data: Uint8Array): Date {\n const timeSpec = decodeTimestampToTimeSpec(data);\n return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6);\n}\n\nexport const timestampExtension = {\n type: EXT_TIMESTAMP,\n encode: encodeTimestampExtension,\n decode: decodeTimestampExtension,\n};\n","// ExtensionCodec to handle MessagePack extensions\n\nimport { ExtData } from \"./ExtData\";\nimport { timestampExtension } from \"./timestamp\";\n\nexport type ExtensionDecoderType = (\n data: Uint8Array,\n extensionType: number,\n context: ContextType,\n) => unknown;\n\nexport type ExtensionEncoderType = (input: unknown, context: ContextType) => Uint8Array | null;\n\n// immutable interfce to ExtensionCodec\nexport type ExtensionCodecType = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n __brand?: ContextType;\n tryToEncode(object: unknown, context: ContextType): ExtData | null;\n decode(data: Uint8Array, extType: number, context: ContextType): unknown;\n};\n\nexport class ExtensionCodec implements ExtensionCodecType {\n public static readonly defaultCodec: ExtensionCodecType = new ExtensionCodec();\n\n // ensures ExtensionCodecType matches ExtensionCodec\n // this will make type errors a lot more clear\n // eslint-disable-next-line @typescript-eslint/naming-convention\n __brand?: ContextType;\n\n // built-in extensions\n private readonly builtInEncoders: Array | undefined | null> = [];\n private readonly builtInDecoders: Array | undefined | null> = [];\n\n // custom extensions\n private readonly encoders: Array | undefined | null> = [];\n private readonly decoders: Array | undefined | null> = [];\n\n public constructor() {\n this.register(timestampExtension);\n }\n\n public register({\n type,\n encode,\n decode,\n }: {\n type: number;\n encode: ExtensionEncoderType;\n decode: ExtensionDecoderType;\n }): void {\n if (type >= 0) {\n // custom extensions\n this.encoders[type] = encode;\n this.decoders[type] = decode;\n } else {\n // built-in extensions\n const index = 1 + type;\n this.builtInEncoders[index] = encode;\n this.builtInDecoders[index] = decode;\n }\n }\n\n public tryToEncode(object: unknown, context: ContextType): ExtData | null {\n // built-in extensions\n for (let i = 0; i < this.builtInEncoders.length; i++) {\n const encodeExt = this.builtInEncoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = -1 - i;\n return new ExtData(type, data);\n }\n }\n }\n\n // custom extensions\n for (let i = 0; i < this.encoders.length; i++) {\n const encodeExt = this.encoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = i;\n return new ExtData(type, data);\n }\n }\n }\n\n if (object instanceof ExtData) {\n // to keep ExtData as is\n return object;\n }\n return null;\n }\n\n public decode(data: Uint8Array, type: number, context: ContextType): unknown {\n const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type];\n if (decodeExt) {\n return decodeExt(data, type, context);\n } else {\n // decode() does not fail, returns ExtData instead.\n return new ExtData(type, data);\n }\n }\n}\n","export function ensureUint8Array(buffer: ArrayLike | Uint8Array | ArrayBufferView | ArrayBuffer): Uint8Array {\n if (buffer instanceof Uint8Array) {\n return buffer;\n } else if (ArrayBuffer.isView(buffer)) {\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n } else if (buffer instanceof ArrayBuffer) {\n return new Uint8Array(buffer);\n } else {\n // ArrayLike\n return Uint8Array.from(buffer);\n }\n}\n\nexport function createDataView(buffer: ArrayLike | ArrayBufferView | ArrayBuffer): DataView {\n if (buffer instanceof ArrayBuffer) {\n return new DataView(buffer);\n }\n\n const bufferView = ensureUint8Array(buffer);\n return new DataView(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength);\n}\n","import { utf8EncodeJs, utf8Count, TEXT_ENCODER_THRESHOLD, utf8EncodeTE } from \"./utils/utf8\";\nimport { ExtensionCodec, ExtensionCodecType } from \"./ExtensionCodec\";\nimport { setInt64, setUint64 } from \"./utils/int\";\nimport { ensureUint8Array } from \"./utils/typedArrays\";\nimport type { ExtData } from \"./ExtData\";\n\nexport const DEFAULT_MAX_DEPTH = 100;\nexport const DEFAULT_INITIAL_BUFFER_SIZE = 2048;\n\nexport class Encoder {\n private pos = 0;\n private view = new DataView(new ArrayBuffer(this.initialBufferSize));\n private bytes = new Uint8Array(this.view.buffer);\n\n public constructor(\n private readonly extensionCodec: ExtensionCodecType = ExtensionCodec.defaultCodec as any,\n private readonly context: ContextType = undefined as any,\n private readonly maxDepth = DEFAULT_MAX_DEPTH,\n private readonly initialBufferSize = DEFAULT_INITIAL_BUFFER_SIZE,\n private readonly sortKeys = false,\n private readonly forceFloat32 = false,\n private readonly ignoreUndefined = false,\n private readonly forceIntegerToFloat = false,\n ) {}\n\n private getUint8Array(): Uint8Array {\n return this.bytes.subarray(0, this.pos);\n }\n\n private reinitializeState() {\n this.pos = 0;\n }\n\n public encode(object: unknown): Uint8Array {\n this.reinitializeState();\n this.doEncode(object, 1);\n return this.getUint8Array();\n }\n\n private doEncode(object: unknown, depth: number): void {\n if (depth > this.maxDepth) {\n throw new Error(`Too deep objects in depth ${depth}`);\n }\n\n if (object == null) {\n this.encodeNil();\n } else if (typeof object === \"boolean\") {\n this.encodeBoolean(object);\n } else if (typeof object === \"number\") {\n this.encodeNumber(object);\n } else if (typeof object === \"string\") {\n this.encodeString(object);\n } else {\n this.encodeObject(object, depth);\n }\n }\n\n private ensureBufferSizeToWrite(sizeToWrite: number) {\n const requiredSize = this.pos + sizeToWrite;\n\n if (this.view.byteLength < requiredSize) {\n this.resizeBuffer(requiredSize * 2);\n }\n }\n\n private resizeBuffer(newSize: number) {\n const newBuffer = new ArrayBuffer(newSize);\n const newBytes = new Uint8Array(newBuffer);\n const newView = new DataView(newBuffer);\n\n newBytes.set(this.bytes);\n\n this.view = newView;\n this.bytes = newBytes;\n }\n\n private encodeNil() {\n this.writeU8(0xc0);\n }\n\n private encodeBoolean(object: boolean) {\n if (object === false) {\n this.writeU8(0xc2);\n } else {\n this.writeU8(0xc3);\n }\n }\n private encodeNumber(object: number) {\n if (Number.isSafeInteger(object) && !this.forceIntegerToFloat) {\n if (object >= 0) {\n if (object < 0x80) {\n // positive fixint\n this.writeU8(object);\n } else if (object < 0x100) {\n // uint 8\n this.writeU8(0xcc);\n this.writeU8(object);\n } else if (object < 0x10000) {\n // uint 16\n this.writeU8(0xcd);\n this.writeU16(object);\n } else if (object < 0x100000000) {\n // uint 32\n this.writeU8(0xce);\n this.writeU32(object);\n } else {\n // uint 64\n this.writeU8(0xcf);\n this.writeU64(object);\n }\n } else {\n if (object >= -0x20) {\n // negative fixint\n this.writeU8(0xe0 | (object + 0x20));\n } else if (object >= -0x80) {\n // int 8\n this.writeU8(0xd0);\n this.writeI8(object);\n } else if (object >= -0x8000) {\n // int 16\n this.writeU8(0xd1);\n this.writeI16(object);\n } else if (object >= -0x80000000) {\n // int 32\n this.writeU8(0xd2);\n this.writeI32(object);\n } else {\n // int 64\n this.writeU8(0xd3);\n this.writeI64(object);\n }\n }\n } else {\n // non-integer numbers\n if (this.forceFloat32) {\n // float 32\n this.writeU8(0xca);\n this.writeF32(object);\n } else {\n // float 64\n this.writeU8(0xcb);\n this.writeF64(object);\n }\n }\n }\n\n private writeStringHeader(byteLength: number) {\n if (byteLength < 32) {\n // fixstr\n this.writeU8(0xa0 + byteLength);\n } else if (byteLength < 0x100) {\n // str 8\n this.writeU8(0xd9);\n this.writeU8(byteLength);\n } else if (byteLength < 0x10000) {\n // str 16\n this.writeU8(0xda);\n this.writeU16(byteLength);\n } else if (byteLength < 0x100000000) {\n // str 32\n this.writeU8(0xdb);\n this.writeU32(byteLength);\n } else {\n throw new Error(`Too long string: ${byteLength} bytes in UTF-8`);\n }\n }\n\n private encodeString(object: string) {\n const maxHeaderSize = 1 + 4;\n const strLength = object.length;\n\n if (strLength > TEXT_ENCODER_THRESHOLD) {\n const byteLength = utf8Count(object);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8EncodeTE(object, this.bytes, this.pos);\n this.pos += byteLength;\n } else {\n const byteLength = utf8Count(object);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8EncodeJs(object, this.bytes, this.pos);\n this.pos += byteLength;\n }\n }\n\n private encodeObject(object: unknown, depth: number) {\n // try to encode objects with custom codec first of non-primitives\n const ext = this.extensionCodec.tryToEncode(object, this.context);\n if (ext != null) {\n this.encodeExtension(ext);\n } else if (Array.isArray(object)) {\n this.encodeArray(object, depth);\n } else if (ArrayBuffer.isView(object)) {\n this.encodeBinary(object);\n } else if (typeof object === \"object\") {\n this.encodeMap(object as Record, depth);\n } else {\n // symbol, function and other special object come here unless extensionCodec handles them.\n throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object)}`);\n }\n }\n\n private encodeBinary(object: ArrayBufferView) {\n const size = object.byteLength;\n if (size < 0x100) {\n // bin 8\n this.writeU8(0xc4);\n this.writeU8(size);\n } else if (size < 0x10000) {\n // bin 16\n this.writeU8(0xc5);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // bin 32\n this.writeU8(0xc6);\n this.writeU32(size);\n } else {\n throw new Error(`Too large binary: ${size}`);\n }\n const bytes = ensureUint8Array(object);\n this.writeU8a(bytes);\n }\n\n private encodeArray(object: Array, depth: number) {\n const size = object.length;\n if (size < 16) {\n // fixarray\n this.writeU8(0x90 + size);\n } else if (size < 0x10000) {\n // array 16\n this.writeU8(0xdc);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // array 32\n this.writeU8(0xdd);\n this.writeU32(size);\n } else {\n throw new Error(`Too large array: ${size}`);\n }\n for (const item of object) {\n this.doEncode(item, depth + 1);\n }\n }\n\n private countWithoutUndefined(object: Record, keys: ReadonlyArray): number {\n let count = 0;\n\n for (const key of keys) {\n if (object[key] !== undefined) {\n count++;\n }\n }\n\n return count;\n }\n\n private encodeMap(object: Record, depth: number) {\n const keys = Object.keys(object);\n if (this.sortKeys) {\n keys.sort();\n }\n\n const size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length;\n\n if (size < 16) {\n // fixmap\n this.writeU8(0x80 + size);\n } else if (size < 0x10000) {\n // map 16\n this.writeU8(0xde);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // map 32\n this.writeU8(0xdf);\n this.writeU32(size);\n } else {\n throw new Error(`Too large map object: ${size}`);\n }\n\n for (const key of keys) {\n const value = object[key];\n\n if (!(this.ignoreUndefined && value === undefined)) {\n this.encodeString(key);\n this.doEncode(value, depth + 1);\n }\n }\n }\n\n private encodeExtension(ext: ExtData) {\n const size = ext.data.length;\n if (size === 1) {\n // fixext 1\n this.writeU8(0xd4);\n } else if (size === 2) {\n // fixext 2\n this.writeU8(0xd5);\n } else if (size === 4) {\n // fixext 4\n this.writeU8(0xd6);\n } else if (size === 8) {\n // fixext 8\n this.writeU8(0xd7);\n } else if (size === 16) {\n // fixext 16\n this.writeU8(0xd8);\n } else if (size < 0x100) {\n // ext 8\n this.writeU8(0xc7);\n this.writeU8(size);\n } else if (size < 0x10000) {\n // ext 16\n this.writeU8(0xc8);\n this.writeU16(size);\n } else if (size < 0x100000000) {\n // ext 32\n this.writeU8(0xc9);\n this.writeU32(size);\n } else {\n throw new Error(`Too large extension object: ${size}`);\n }\n this.writeI8(ext.type);\n this.writeU8a(ext.data);\n }\n\n private writeU8(value: number) {\n this.ensureBufferSizeToWrite(1);\n\n this.view.setUint8(this.pos, value);\n this.pos++;\n }\n\n private writeU8a(values: ArrayLike) {\n const size = values.length;\n this.ensureBufferSizeToWrite(size);\n\n this.bytes.set(values, this.pos);\n this.pos += size;\n }\n\n private writeI8(value: number) {\n this.ensureBufferSizeToWrite(1);\n\n this.view.setInt8(this.pos, value);\n this.pos++;\n }\n\n private writeU16(value: number) {\n this.ensureBufferSizeToWrite(2);\n\n this.view.setUint16(this.pos, value);\n this.pos += 2;\n }\n\n private writeI16(value: number) {\n this.ensureBufferSizeToWrite(2);\n\n this.view.setInt16(this.pos, value);\n this.pos += 2;\n }\n\n private writeU32(value: number) {\n this.ensureBufferSizeToWrite(4);\n\n this.view.setUint32(this.pos, value);\n this.pos += 4;\n }\n\n private writeI32(value: number) {\n this.ensureBufferSizeToWrite(4);\n\n this.view.setInt32(this.pos, value);\n this.pos += 4;\n }\n\n private writeF32(value: number) {\n this.ensureBufferSizeToWrite(4);\n this.view.setFloat32(this.pos, value);\n this.pos += 4;\n }\n\n private writeF64(value: number) {\n this.ensureBufferSizeToWrite(8);\n this.view.setFloat64(this.pos, value);\n this.pos += 8;\n }\n\n private writeU64(value: number) {\n this.ensureBufferSizeToWrite(8);\n\n setUint64(this.view, this.pos, value);\n this.pos += 8;\n }\n\n private writeI64(value: number) {\n this.ensureBufferSizeToWrite(8);\n\n setInt64(this.view, this.pos, value);\n this.pos += 8;\n }\n}\n","import { Encoder } from \"./Encoder\";\nimport type { ExtensionCodecType } from \"./ExtensionCodec\";\nimport type { ContextOf, SplitUndefined } from \"./context\";\n\nexport type EncodeOptions = Partial<\n Readonly<{\n extensionCodec: ExtensionCodecType;\n\n /**\n * The maximum depth in nested objects and arrays.\n *\n * Defaults to 100.\n */\n maxDepth: number;\n\n /**\n * The initial size of the internal buffer.\n *\n * Defaults to 2048.\n */\n initialBufferSize: number;\n\n /**\n * If `true`, the keys of an object is sorted. In other words, the encoded\n * binary is canonical and thus comparable to another encoded binary.\n *\n * Defaults to `false`. If enabled, it spends more time in encoding objects.\n */\n sortKeys: boolean;\n /**\n * If `true`, non-integer numbers are encoded in float32, not in float64 (the default).\n *\n * Only use it if precisions don't matter.\n *\n * Defaults to `false`.\n */\n forceFloat32: boolean;\n\n /**\n * If `true`, an object property with `undefined` value are ignored.\n * e.g. `{ foo: undefined }` will be encoded as `{}`, as `JSON.stringify()` does.\n *\n * Defaults to `false`. If enabled, it spends more time in encoding objects.\n */\n ignoreUndefined: boolean;\n\n /**\n * If `true`, integer numbers are encoded as floating point numbers,\n * with the `forceFloat32` option taken into account.\n *\n * Defaults to `false`.\n */\n forceIntegerToFloat: boolean;\n }>\n> &\n ContextOf;\n\nconst defaultEncodeOptions: EncodeOptions = {};\n\n/**\n * It encodes `value` in the MessagePack format and\n * returns a byte buffer.\n *\n * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`.\n */\nexport function encode(\n value: unknown,\n options: EncodeOptions> = defaultEncodeOptions as any,\n): Uint8Array {\n const encoder = new Encoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxDepth,\n options.initialBufferSize,\n options.sortKeys,\n options.forceFloat32,\n options.ignoreUndefined,\n options.forceIntegerToFloat,\n );\n return encoder.encode(value);\n}\n","export function prettyByte(byte: number): string {\n return `${byte < 0 ? \"-\" : \"\"}0x${Math.abs(byte).toString(16).padStart(2, \"0\")}`;\n}\n","import { utf8DecodeJs } from \"./utils/utf8\";\n\nconst DEFAULT_MAX_KEY_LENGTH = 16;\nconst DEFAULT_MAX_LENGTH_PER_KEY = 16;\n\nexport interface KeyDecoder {\n canBeCached(byteLength: number): boolean;\n decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string;\n}\ninterface KeyCacheRecord {\n readonly bytes: Uint8Array;\n readonly str: string;\n}\n\nexport class CachedKeyDecoder implements KeyDecoder {\n hit = 0;\n miss = 0;\n private readonly caches: Array>;\n\n constructor(readonly maxKeyLength = DEFAULT_MAX_KEY_LENGTH, readonly maxLengthPerKey = DEFAULT_MAX_LENGTH_PER_KEY) {\n // avoid `new Array(N)`, which makes a sparse array,\n // because a sparse array is typically slower than a non-sparse array.\n this.caches = [];\n for (let i = 0; i < this.maxKeyLength; i++) {\n this.caches.push([]);\n }\n }\n\n public canBeCached(byteLength: number): boolean {\n return byteLength > 0 && byteLength <= this.maxKeyLength;\n }\n\n private find(bytes: Uint8Array, inputOffset: number, byteLength: number): string | null {\n const records = this.caches[byteLength - 1]!;\n\n FIND_CHUNK: for (const record of records) {\n const recordBytes = record.bytes;\n\n for (let j = 0; j < byteLength; j++) {\n if (recordBytes[j] !== bytes[inputOffset + j]) {\n continue FIND_CHUNK;\n }\n }\n return record.str;\n }\n return null;\n }\n\n private store(bytes: Uint8Array, value: string) {\n const records = this.caches[bytes.length - 1]!;\n const record: KeyCacheRecord = { bytes, str: value };\n\n if (records.length >= this.maxLengthPerKey) {\n // `records` are full!\n // Set `record` to an arbitrary position.\n records[(Math.random() * records.length) | 0] = record;\n } else {\n records.push(record);\n }\n }\n\n public decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string {\n const cachedValue = this.find(bytes, inputOffset, byteLength);\n if (cachedValue != null) {\n this.hit++;\n return cachedValue;\n }\n this.miss++;\n\n const str = utf8DecodeJs(bytes, inputOffset, byteLength);\n // Ensure to copy a slice of bytes because the byte may be NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer.\n const slicedCopyOfBytes = Uint8Array.prototype.slice.call(bytes, inputOffset, inputOffset + byteLength);\n this.store(slicedCopyOfBytes, str);\n return str;\n }\n}\n","import { prettyByte } from \"./utils/prettyByte\";\nimport { ExtensionCodec, ExtensionCodecType } from \"./ExtensionCodec\";\nimport { getInt64, getUint64, UINT32_MAX } from \"./utils/int\";\nimport { utf8DecodeJs, TEXT_DECODER_THRESHOLD, utf8DecodeTD } from \"./utils/utf8\";\nimport { createDataView, ensureUint8Array } from \"./utils/typedArrays\";\nimport { CachedKeyDecoder, KeyDecoder } from \"./CachedKeyDecoder\";\nimport { DecodeError } from \"./DecodeError\";\n\nconst enum State {\n ARRAY,\n MAP_KEY,\n MAP_VALUE,\n}\n\ntype MapKeyType = string | number;\n\nconst isValidMapKeyType = (key: unknown): key is MapKeyType => {\n const keyType = typeof key;\n\n return keyType === \"string\" || keyType === \"number\";\n};\n\ntype StackMapState = {\n type: State.MAP_KEY | State.MAP_VALUE;\n size: number;\n key: MapKeyType | null;\n readCount: number;\n map: Record;\n};\n\ntype StackArrayState = {\n type: State.ARRAY;\n size: number;\n array: Array;\n position: number;\n};\n\ntype StackState = StackArrayState | StackMapState;\n\nconst HEAD_BYTE_REQUIRED = -1;\n\nconst EMPTY_VIEW = new DataView(new ArrayBuffer(0));\nconst EMPTY_BYTES = new Uint8Array(EMPTY_VIEW.buffer);\n\n// IE11: Hack to support IE11.\n// IE11: Drop this hack and just use RangeError when IE11 is obsolete.\nexport const DataViewIndexOutOfBoundsError: typeof Error = (() => {\n try {\n // IE11: The spec says it should throw RangeError,\n // IE11: but in IE11 it throws TypeError.\n EMPTY_VIEW.getInt8(0);\n } catch (e: any) {\n return e.constructor;\n }\n throw new Error(\"never reached\");\n})();\n\nconst MORE_DATA = new DataViewIndexOutOfBoundsError(\"Insufficient data\");\n\nconst sharedCachedKeyDecoder = new CachedKeyDecoder();\n\nexport class Decoder {\n private totalPos = 0;\n private pos = 0;\n\n private view = EMPTY_VIEW;\n private bytes = EMPTY_BYTES;\n private headByte = HEAD_BYTE_REQUIRED;\n private readonly stack: Array = [];\n\n public constructor(\n private readonly extensionCodec: ExtensionCodecType = ExtensionCodec.defaultCodec as any,\n private readonly context: ContextType = undefined as any,\n private readonly maxStrLength = UINT32_MAX,\n private readonly maxBinLength = UINT32_MAX,\n private readonly maxArrayLength = UINT32_MAX,\n private readonly maxMapLength = UINT32_MAX,\n private readonly maxExtLength = UINT32_MAX,\n private readonly keyDecoder: KeyDecoder | null = sharedCachedKeyDecoder,\n ) {}\n\n private reinitializeState() {\n this.totalPos = 0;\n this.headByte = HEAD_BYTE_REQUIRED;\n this.stack.length = 0;\n\n // view, bytes, and pos will be re-initialized in setBuffer()\n }\n\n private setBuffer(buffer: ArrayLike | BufferSource): void {\n this.bytes = ensureUint8Array(buffer);\n this.view = createDataView(this.bytes);\n this.pos = 0;\n }\n\n private appendBuffer(buffer: ArrayLike | BufferSource) {\n if (this.headByte === HEAD_BYTE_REQUIRED && !this.hasRemaining(1)) {\n this.setBuffer(buffer);\n } else {\n const remainingData = this.bytes.subarray(this.pos);\n const newData = ensureUint8Array(buffer);\n\n // concat remainingData + newData\n const newBuffer = new Uint8Array(remainingData.length + newData.length);\n newBuffer.set(remainingData);\n newBuffer.set(newData, remainingData.length);\n this.setBuffer(newBuffer);\n }\n }\n\n private hasRemaining(size: number) {\n return this.view.byteLength - this.pos >= size;\n }\n\n private createExtraByteError(posToShow: number): Error {\n const { view, pos } = this;\n return new RangeError(`Extra ${view.byteLength - pos} of ${view.byteLength} byte(s) found at buffer[${posToShow}]`);\n }\n\n /**\n * @throws {DecodeError}\n * @throws {RangeError}\n */\n public decode(buffer: ArrayLike | BufferSource): unknown {\n this.reinitializeState();\n this.setBuffer(buffer);\n\n const object = this.doDecodeSync();\n if (this.hasRemaining(1)) {\n throw this.createExtraByteError(this.pos);\n }\n return object;\n }\n\n public *decodeMulti(buffer: ArrayLike | BufferSource): Generator {\n this.reinitializeState();\n this.setBuffer(buffer);\n\n while (this.hasRemaining(1)) {\n yield this.doDecodeSync();\n }\n }\n\n public async decodeAsync(stream: AsyncIterable | BufferSource>): Promise {\n let decoded = false;\n let object: unknown;\n for await (const buffer of stream) {\n if (decoded) {\n throw this.createExtraByteError(this.totalPos);\n }\n\n this.appendBuffer(buffer);\n\n try {\n object = this.doDecodeSync();\n decoded = true;\n } catch (e) {\n if (!(e instanceof DataViewIndexOutOfBoundsError)) {\n throw e; // rethrow\n }\n // fallthrough\n }\n this.totalPos += this.pos;\n }\n\n if (decoded) {\n if (this.hasRemaining(1)) {\n throw this.createExtraByteError(this.totalPos);\n }\n return object;\n }\n\n const { headByte, pos, totalPos } = this;\n throw new RangeError(\n `Insufficient data in parsing ${prettyByte(headByte)} at ${totalPos} (${pos} in the current buffer)`,\n );\n }\n\n public decodeArrayStream(\n stream: AsyncIterable | BufferSource>,\n ): AsyncGenerator {\n return this.decodeMultiAsync(stream, true);\n }\n\n public decodeStream(stream: AsyncIterable | BufferSource>): AsyncGenerator {\n return this.decodeMultiAsync(stream, false);\n }\n\n private async *decodeMultiAsync(stream: AsyncIterable | BufferSource>, isArray: boolean) {\n let isArrayHeaderRequired = isArray;\n let arrayItemsLeft = -1;\n\n for await (const buffer of stream) {\n if (isArray && arrayItemsLeft === 0) {\n throw this.createExtraByteError(this.totalPos);\n }\n\n this.appendBuffer(buffer);\n\n if (isArrayHeaderRequired) {\n arrayItemsLeft = this.readArraySize();\n isArrayHeaderRequired = false;\n this.complete();\n }\n\n try {\n while (true) {\n yield this.doDecodeSync();\n if (--arrayItemsLeft === 0) {\n break;\n }\n }\n } catch (e) {\n if (!(e instanceof DataViewIndexOutOfBoundsError)) {\n throw e; // rethrow\n }\n // fallthrough\n }\n this.totalPos += this.pos;\n }\n }\n\n private doDecodeSync(): unknown {\n DECODE: while (true) {\n const headByte = this.readHeadByte();\n let object: unknown;\n\n if (headByte >= 0xe0) {\n // negative fixint (111x xxxx) 0xe0 - 0xff\n object = headByte - 0x100;\n } else if (headByte < 0xc0) {\n if (headByte < 0x80) {\n // positive fixint (0xxx xxxx) 0x00 - 0x7f\n object = headByte;\n } else if (headByte < 0x90) {\n // fixmap (1000 xxxx) 0x80 - 0x8f\n const size = headByte - 0x80;\n if (size !== 0) {\n this.pushMapState(size);\n this.complete();\n continue DECODE;\n } else {\n object = {};\n }\n } else if (headByte < 0xa0) {\n // fixarray (1001 xxxx) 0x90 - 0x9f\n const size = headByte - 0x90;\n if (size !== 0) {\n this.pushArrayState(size);\n this.complete();\n continue DECODE;\n } else {\n object = [];\n }\n } else {\n // fixstr (101x xxxx) 0xa0 - 0xbf\n const byteLength = headByte - 0xa0;\n object = this.decodeUtf8String(byteLength, 0);\n }\n } else if (headByte === 0xc0) {\n // nil\n object = null;\n } else if (headByte === 0xc2) {\n // false\n object = false;\n } else if (headByte === 0xc3) {\n // true\n object = true;\n } else if (headByte === 0xca) {\n // float 32\n object = this.readF32();\n } else if (headByte === 0xcb) {\n // float 64\n object = this.readF64();\n } else if (headByte === 0xcc) {\n // uint 8\n object = this.readU8();\n } else if (headByte === 0xcd) {\n // uint 16\n object = this.readU16();\n } else if (headByte === 0xce) {\n // uint 32\n object = this.readU32();\n } else if (headByte === 0xcf) {\n // uint 64\n object = this.readU64();\n } else if (headByte === 0xd0) {\n // int 8\n object = this.readI8();\n } else if (headByte === 0xd1) {\n // int 16\n object = this.readI16();\n } else if (headByte === 0xd2) {\n // int 32\n object = this.readI32();\n } else if (headByte === 0xd3) {\n // int 64\n object = this.readI64();\n } else if (headByte === 0xd9) {\n // str 8\n const byteLength = this.lookU8();\n object = this.decodeUtf8String(byteLength, 1);\n } else if (headByte === 0xda) {\n // str 16\n const byteLength = this.lookU16();\n object = this.decodeUtf8String(byteLength, 2);\n } else if (headByte === 0xdb) {\n // str 32\n const byteLength = this.lookU32();\n object = this.decodeUtf8String(byteLength, 4);\n } else if (headByte === 0xdc) {\n // array 16\n const size = this.readU16();\n if (size !== 0) {\n this.pushArrayState(size);\n this.complete();\n continue DECODE;\n } else {\n object = [];\n }\n } else if (headByte === 0xdd) {\n // array 32\n const size = this.readU32();\n if (size !== 0) {\n this.pushArrayState(size);\n this.complete();\n continue DECODE;\n } else {\n object = [];\n }\n } else if (headByte === 0xde) {\n // map 16\n const size = this.readU16();\n if (size !== 0) {\n this.pushMapState(size);\n this.complete();\n continue DECODE;\n } else {\n object = {};\n }\n } else if (headByte === 0xdf) {\n // map 32\n const size = this.readU32();\n if (size !== 0) {\n this.pushMapState(size);\n this.complete();\n continue DECODE;\n } else {\n object = {};\n }\n } else if (headByte === 0xc4) {\n // bin 8\n const size = this.lookU8();\n object = this.decodeBinary(size, 1);\n } else if (headByte === 0xc5) {\n // bin 16\n const size = this.lookU16();\n object = this.decodeBinary(size, 2);\n } else if (headByte === 0xc6) {\n // bin 32\n const size = this.lookU32();\n object = this.decodeBinary(size, 4);\n } else if (headByte === 0xd4) {\n // fixext 1\n object = this.decodeExtension(1, 0);\n } else if (headByte === 0xd5) {\n // fixext 2\n object = this.decodeExtension(2, 0);\n } else if (headByte === 0xd6) {\n // fixext 4\n object = this.decodeExtension(4, 0);\n } else if (headByte === 0xd7) {\n // fixext 8\n object = this.decodeExtension(8, 0);\n } else if (headByte === 0xd8) {\n // fixext 16\n object = this.decodeExtension(16, 0);\n } else if (headByte === 0xc7) {\n // ext 8\n const size = this.lookU8();\n object = this.decodeExtension(size, 1);\n } else if (headByte === 0xc8) {\n // ext 16\n const size = this.lookU16();\n object = this.decodeExtension(size, 2);\n } else if (headByte === 0xc9) {\n // ext 32\n const size = this.lookU32();\n object = this.decodeExtension(size, 4);\n } else {\n throw new DecodeError(`Unrecognized type byte: ${prettyByte(headByte)}`);\n }\n\n this.complete();\n\n const stack = this.stack;\n while (stack.length > 0) {\n // arrays and maps\n const state = stack[stack.length - 1]!;\n if (state.type === State.ARRAY) {\n state.array[state.position] = object;\n state.position++;\n if (state.position === state.size) {\n stack.pop();\n object = state.array;\n } else {\n continue DECODE;\n }\n } else if (state.type === State.MAP_KEY) {\n if (!isValidMapKeyType(object)) {\n throw new DecodeError(\"The type of key must be string or number but \" + typeof object);\n }\n if (object === \"__proto__\") {\n throw new DecodeError(\"The key __proto__ is not allowed\");\n }\n\n state.key = object;\n state.type = State.MAP_VALUE;\n continue DECODE;\n } else {\n // it must be `state.type === State.MAP_VALUE` here\n\n state.map[state.key!] = object;\n state.readCount++;\n\n if (state.readCount === state.size) {\n stack.pop();\n object = state.map;\n } else {\n state.key = null;\n state.type = State.MAP_KEY;\n continue DECODE;\n }\n }\n }\n\n return object;\n }\n }\n\n private readHeadByte(): number {\n if (this.headByte === HEAD_BYTE_REQUIRED) {\n this.headByte = this.readU8();\n // console.log(\"headByte\", prettyByte(this.headByte));\n }\n\n return this.headByte;\n }\n\n private complete(): void {\n this.headByte = HEAD_BYTE_REQUIRED;\n }\n\n private readArraySize(): number {\n const headByte = this.readHeadByte();\n\n switch (headByte) {\n case 0xdc:\n return this.readU16();\n case 0xdd:\n return this.readU32();\n default: {\n if (headByte < 0xa0) {\n return headByte - 0x90;\n } else {\n throw new DecodeError(`Unrecognized array type byte: ${prettyByte(headByte)}`);\n }\n }\n }\n }\n\n private pushMapState(size: number) {\n if (size > this.maxMapLength) {\n throw new DecodeError(`Max length exceeded: map length (${size}) > maxMapLengthLength (${this.maxMapLength})`);\n }\n\n this.stack.push({\n type: State.MAP_KEY,\n size,\n key: null,\n readCount: 0,\n map: {},\n });\n }\n\n private pushArrayState(size: number) {\n if (size > this.maxArrayLength) {\n throw new DecodeError(`Max length exceeded: array length (${size}) > maxArrayLength (${this.maxArrayLength})`);\n }\n\n this.stack.push({\n type: State.ARRAY,\n size,\n array: new Array(size),\n position: 0,\n });\n }\n\n private decodeUtf8String(byteLength: number, headerOffset: number): string {\n if (byteLength > this.maxStrLength) {\n throw new DecodeError(\n `Max length exceeded: UTF-8 byte length (${byteLength}) > maxStrLength (${this.maxStrLength})`,\n );\n }\n\n if (this.bytes.byteLength < this.pos + headerOffset + byteLength) {\n throw MORE_DATA;\n }\n\n const offset = this.pos + headerOffset;\n let object: string;\n if (this.stateIsMapKey() && this.keyDecoder?.canBeCached(byteLength)) {\n object = this.keyDecoder.decode(this.bytes, offset, byteLength);\n } else if (byteLength > TEXT_DECODER_THRESHOLD) {\n object = utf8DecodeTD(this.bytes, offset, byteLength);\n } else {\n object = utf8DecodeJs(this.bytes, offset, byteLength);\n }\n this.pos += headerOffset + byteLength;\n return object;\n }\n\n private stateIsMapKey(): boolean {\n if (this.stack.length > 0) {\n const state = this.stack[this.stack.length - 1]!;\n return state.type === State.MAP_KEY;\n }\n return false;\n }\n\n private decodeBinary(byteLength: number, headOffset: number): Uint8Array {\n if (byteLength > this.maxBinLength) {\n throw new DecodeError(`Max length exceeded: bin length (${byteLength}) > maxBinLength (${this.maxBinLength})`);\n }\n\n if (!this.hasRemaining(byteLength + headOffset)) {\n throw MORE_DATA;\n }\n\n const offset = this.pos + headOffset;\n const object = this.bytes.subarray(offset, offset + byteLength);\n this.pos += headOffset + byteLength;\n return object;\n }\n\n private decodeExtension(size: number, headOffset: number): unknown {\n if (size > this.maxExtLength) {\n throw new DecodeError(`Max length exceeded: ext length (${size}) > maxExtLength (${this.maxExtLength})`);\n }\n\n const extType = this.view.getInt8(this.pos + headOffset);\n const data = this.decodeBinary(size, headOffset + 1 /* extType */);\n return this.extensionCodec.decode(data, extType, this.context);\n }\n\n private lookU8() {\n return this.view.getUint8(this.pos);\n }\n\n private lookU16() {\n return this.view.getUint16(this.pos);\n }\n\n private lookU32() {\n return this.view.getUint32(this.pos);\n }\n\n private readU8(): number {\n const value = this.view.getUint8(this.pos);\n this.pos++;\n return value;\n }\n\n private readI8(): number {\n const value = this.view.getInt8(this.pos);\n this.pos++;\n return value;\n }\n\n private readU16(): number {\n const value = this.view.getUint16(this.pos);\n this.pos += 2;\n return value;\n }\n\n private readI16(): number {\n const value = this.view.getInt16(this.pos);\n this.pos += 2;\n return value;\n }\n\n private readU32(): number {\n const value = this.view.getUint32(this.pos);\n this.pos += 4;\n return value;\n }\n\n private readI32(): number {\n const value = this.view.getInt32(this.pos);\n this.pos += 4;\n return value;\n }\n\n private readU64(): number {\n const value = getUint64(this.view, this.pos);\n this.pos += 8;\n return value;\n }\n\n private readI64(): number {\n const value = getInt64(this.view, this.pos);\n this.pos += 8;\n return value;\n }\n\n private readF32() {\n const value = this.view.getFloat32(this.pos);\n this.pos += 4;\n return value;\n }\n\n private readF64() {\n const value = this.view.getFloat64(this.pos);\n this.pos += 8;\n return value;\n }\n}\n","import { Decoder } from \"./Decoder\";\nimport type { ExtensionCodecType } from \"./ExtensionCodec\";\nimport type { ContextOf, SplitUndefined } from \"./context\";\n\nexport type DecodeOptions = Readonly<\n Partial<{\n extensionCodec: ExtensionCodecType;\n\n /**\n * Maximum string length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxStrLength: number;\n /**\n * Maximum binary length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxBinLength: number;\n /**\n * Maximum array length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxArrayLength: number;\n /**\n * Maximum map length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxMapLength: number;\n /**\n * Maximum extension length.\n *\n * Defaults to 4_294_967_295 (UINT32_MAX).\n */\n maxExtLength: number;\n }>\n> &\n ContextOf;\n\nexport const defaultDecodeOptions: DecodeOptions = {};\n\n/**\n * It decodes a single MessagePack object in a buffer.\n *\n * This is a synchronous decoding function.\n * See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}.\n */\nexport function decode(\n buffer: ArrayLike | BufferSource,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): unknown {\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n return decoder.decode(buffer);\n}\n\n/**\n * It decodes multiple MessagePack objects in a buffer.\n * This is corresponding to {@link decodeMultiStream()}.\n */\nexport function decodeMulti(\n buffer: ArrayLike | BufferSource,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): Generator {\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n return decoder.decodeMulti(buffer);\n}\n","// utility for whatwg streams\n\n// The living standard of whatwg streams says\n// ReadableStream is also AsyncIterable, but\n// as of June 2019, no browser implements it.\n// See https://streams.spec.whatwg.org/ for details\nexport type ReadableStreamLike = AsyncIterable | ReadableStream;\n\nexport function isAsyncIterable(object: ReadableStreamLike): object is AsyncIterable {\n return (object as any)[Symbol.asyncIterator] != null;\n}\n\nfunction assertNonNull(value: T | null | undefined): asserts value is T {\n if (value == null) {\n throw new Error(\"Assertion Failure: value must not be null nor undefined\");\n }\n}\n\nexport async function* asyncIterableFromStream(stream: ReadableStream): AsyncIterable {\n const reader = stream.getReader();\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n return;\n }\n assertNonNull(value);\n yield value;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function ensureAsyncIterable(streamLike: ReadableStreamLike): AsyncIterable {\n if (isAsyncIterable(streamLike)) {\n return streamLike;\n } else {\n return asyncIterableFromStream(streamLike);\n }\n}\n","import { Decoder } from \"./Decoder\";\nimport { ensureAsyncIterable } from \"./utils/stream\";\nimport { defaultDecodeOptions } from \"./decode\";\nimport type { ReadableStreamLike } from \"./utils/stream\";\nimport type { DecodeOptions } from \"./decode\";\nimport type { SplitUndefined } from \"./context\";\n\nexport async function decodeAsync(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): Promise {\n const stream = ensureAsyncIterable(streamLike);\n\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n return decoder.decodeAsync(stream);\n}\n\nexport function decodeArrayStream(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): AsyncGenerator {\n const stream = ensureAsyncIterable(streamLike);\n\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n\n return decoder.decodeArrayStream(stream);\n}\n\nexport function decodeMultiStream(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): AsyncGenerator {\n const stream = ensureAsyncIterable(streamLike);\n\n const decoder = new Decoder(\n options.extensionCodec,\n (options as typeof options & { context: any }).context,\n options.maxStrLength,\n options.maxBinLength,\n options.maxArrayLength,\n options.maxMapLength,\n options.maxExtLength,\n );\n\n return decoder.decodeStream(stream);\n}\n\n/**\n * @deprecated Use {@link decodeMultiStream()} instead.\n */\nexport function decodeStream(\n streamLike: ReadableStreamLike | BufferSource>,\n options: DecodeOptions> = defaultDecodeOptions as any,\n): AsyncGenerator {\n return decodeMultiStream(streamLike, options);\n}\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","UINT32_MAX","setInt64","view","offset","high","Math","floor","low","setUint32","getInt64","getInt32","getUint32","TEXT_ENCODING_AVAILABLE","process","env","TextEncoder","TextDecoder","utf8Count","str","strLength","length","byteLength","pos","charCodeAt","extra","sharedTextEncoder","undefined","TEXT_ENCODER_THRESHOLD","utf8EncodeTE","encodeInto","output","outputOffset","subarray","set","encode","utf8DecodeJs","bytes","inputOffset","end","units","result","byte1","push","byte2","byte3","unit","String","fromCharCode","sharedTextDecoder","TEXT_DECODER_THRESHOLD","type","data","message","proto","create","DecodeError","setPrototypeOf","configurable","name","Error","EXT_TIMESTAMP","encodeTimeSpecToTimestamp","sec","nsec","rv","Uint8Array","DataView","buffer","secHigh","secLow","encodeDateToTimeSpec","date","msec","getTime","nsecInSec","encodeTimestampExtension","object","Date","decodeTimestampToTimeSpec","byteOffset","nsec30AndSecHigh2","decodeTimestampExtension","timeSpec","timestampExtension","decode","builtInEncoders","builtInDecoders","encoders","decoders","register","index","tryToEncode","context","i","encodeExt","ExtData","decodeExt","defaultCodec","ExtensionCodec","ensureUint8Array","ArrayBuffer","isView","from","extensionCodec","maxDepth","initialBufferSize","sortKeys","forceFloat32","ignoreUndefined","forceIntegerToFloat","getUint8Array","reinitializeState","doEncode","depth","encodeNil","encodeBoolean","encodeNumber","encodeString","encodeObject","ensureBufferSizeToWrite","sizeToWrite","requiredSize","resizeBuffer","newSize","newBuffer","newBytes","newView","writeU8","Number","isSafeInteger","writeU16","writeU32","writeU64","writeI8","writeI16","writeI32","writeI64","writeF32","writeF64","writeStringHeader","utf8EncodeJs","ext","encodeExtension","Array","isArray","encodeArray","encodeBinary","toString","apply","encodeMap","size","writeU8a","item","countWithoutUndefined","keys","count","sort","setUint8","values","setInt8","setUint16","setInt16","setInt32","setFloat32","setFloat64","setUint64","defaultEncodeOptions","options","Encoder","prettyByte","byte","abs","padStart","maxKeyLength","maxLengthPerKey","hit","miss","caches","canBeCached","find","records","FIND_CHUNK","record","recordBytes","j","store","random","cachedValue","slicedCopyOfBytes","slice","EMPTY_VIEW","EMPTY_BYTES","DataViewIndexOutOfBoundsError","getInt8","e","constructor","MORE_DATA","sharedCachedKeyDecoder","CachedKeyDecoder","maxStrLength","maxBinLength","maxArrayLength","maxMapLength","maxExtLength","keyDecoder","totalPos","headByte","stack","setBuffer","bufferView","createDataView","appendBuffer","hasRemaining","remainingData","newData","createExtraByteError","posToShow","RangeError","doDecodeSync","decodeMulti","decodeAsync","stream","decoded","decodeArrayStream","decodeMultiAsync","decodeStream","isArrayHeaderRequired","arrayItemsLeft","readArraySize","complete","DECODE","readHeadByte","pushMapState","pushArrayState","decodeUtf8String","readF32","readF64","readU8","readU16","readU32","readU64","readI8","readI16","readI32","readI64","lookU8","lookU16","lookU32","decodeBinary","decodeExtension","state","array","position","pop","keyType","map","readCount","headerOffset","stateIsMapKey","stringBytes","utf8DecodeTD","headOffset","extType","getUint8","getUint16","getInt16","getFloat32","getFloat64","defaultDecodeOptions","Decoder","assertNonNull","ensureAsyncIterable","streamLike","asyncIterator","reader","getReader","read","done","releaseLock","asyncIterableFromStream","decodeMultiStream"],"sourceRoot":""} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.d.ts deleted file mode 100644 index 977c98f..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface KeyDecoder { - canBeCached(byteLength: number): boolean; - decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string; -} -export declare class CachedKeyDecoder implements KeyDecoder { - readonly maxKeyLength: number; - readonly maxLengthPerKey: number; - hit: number; - miss: number; - private readonly caches; - constructor(maxKeyLength?: number, maxLengthPerKey?: number); - canBeCached(byteLength: number): boolean; - private find; - private store; - decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string; -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.js b/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.js deleted file mode 100644 index 93c09a7..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CachedKeyDecoder = void 0; -const utf8_1 = require("./utils/utf8"); -const DEFAULT_MAX_KEY_LENGTH = 16; -const DEFAULT_MAX_LENGTH_PER_KEY = 16; -class CachedKeyDecoder { - constructor(maxKeyLength = DEFAULT_MAX_KEY_LENGTH, maxLengthPerKey = DEFAULT_MAX_LENGTH_PER_KEY) { - this.maxKeyLength = maxKeyLength; - this.maxLengthPerKey = maxLengthPerKey; - this.hit = 0; - this.miss = 0; - // avoid `new Array(N)`, which makes a sparse array, - // because a sparse array is typically slower than a non-sparse array. - this.caches = []; - for (let i = 0; i < this.maxKeyLength; i++) { - this.caches.push([]); - } - } - canBeCached(byteLength) { - return byteLength > 0 && byteLength <= this.maxKeyLength; - } - find(bytes, inputOffset, byteLength) { - const records = this.caches[byteLength - 1]; - FIND_CHUNK: for (const record of records) { - const recordBytes = record.bytes; - for (let j = 0; j < byteLength; j++) { - if (recordBytes[j] !== bytes[inputOffset + j]) { - continue FIND_CHUNK; - } - } - return record.str; - } - return null; - } - store(bytes, value) { - const records = this.caches[bytes.length - 1]; - const record = { bytes, str: value }; - if (records.length >= this.maxLengthPerKey) { - // `records` are full! - // Set `record` to an arbitrary position. - records[(Math.random() * records.length) | 0] = record; - } - else { - records.push(record); - } - } - decode(bytes, inputOffset, byteLength) { - const cachedValue = this.find(bytes, inputOffset, byteLength); - if (cachedValue != null) { - this.hit++; - return cachedValue; - } - this.miss++; - const str = (0, utf8_1.utf8DecodeJs)(bytes, inputOffset, byteLength); - // Ensure to copy a slice of bytes because the byte may be NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer. - const slicedCopyOfBytes = Uint8Array.prototype.slice.call(bytes, inputOffset, inputOffset + byteLength); - this.store(slicedCopyOfBytes, str); - return str; - } -} -exports.CachedKeyDecoder = CachedKeyDecoder; -//# sourceMappingURL=CachedKeyDecoder.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.js.map deleted file mode 100644 index f06ca1a..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/CachedKeyDecoder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CachedKeyDecoder.js","sourceRoot":"","sources":["../src/CachedKeyDecoder.ts"],"names":[],"mappings":";;;AAAA,uCAA4C;AAE5C,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAWtC,MAAa,gBAAgB;IAK3B,YAAqB,eAAe,sBAAsB,EAAW,kBAAkB,0BAA0B;QAA5F,iBAAY,GAAZ,YAAY,CAAyB;QAAW,oBAAe,GAAf,eAAe,CAA6B;QAJjH,QAAG,GAAG,CAAC,CAAC;QACR,SAAI,GAAG,CAAC,CAAC;QAIP,oDAAoD;QACpD,sEAAsE;QACtE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE;YAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACtB;IACH,CAAC;IAEM,WAAW,CAAC,UAAkB;QACnC,OAAO,UAAU,GAAG,CAAC,IAAI,UAAU,IAAI,IAAI,CAAC,YAAY,CAAC;IAC3D,CAAC;IAEO,IAAI,CAAC,KAAiB,EAAE,WAAmB,EAAE,UAAkB;QACrE,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAE,CAAC;QAE7C,UAAU,EAAE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YACxC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;YAEjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;gBACnC,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;oBAC7C,SAAS,UAAU,CAAC;iBACrB;aACF;YACD,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,KAAiB,EAAE,KAAa;QAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC;QAC/C,MAAM,MAAM,GAAmB,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;QAErD,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,eAAe,EAAE;YAC1C,sBAAsB;YACtB,yCAAyC;YACzC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;SACxD;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACtB;IACH,CAAC;IAEM,MAAM,CAAC,KAAiB,EAAE,WAAmB,EAAE,UAAkB;QACtE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QAC9D,IAAI,WAAW,IAAI,IAAI,EAAE;YACvB,IAAI,CAAC,GAAG,EAAE,CAAC;YACX,OAAO,WAAW,CAAC;SACpB;QACD,IAAI,CAAC,IAAI,EAAE,CAAC;QAEZ,MAAM,GAAG,GAAG,IAAA,mBAAY,EAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QACzD,4IAA4I;QAC5I,MAAM,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,GAAG,UAAU,CAAC,CAAC;QACxG,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;QACnC,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA7DD,4CA6DC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.d.ts deleted file mode 100644 index 1ce9297..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare class DecodeError extends Error { - constructor(message: string); -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.js b/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.js deleted file mode 100644 index 37cde9a..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DecodeError = void 0; -class DecodeError extends Error { - constructor(message) { - super(message); - // fix the prototype chain in a cross-platform way - const proto = Object.create(DecodeError.prototype); - Object.setPrototypeOf(this, proto); - Object.defineProperty(this, "name", { - configurable: true, - enumerable: false, - value: DecodeError.name, - }); - } -} -exports.DecodeError = DecodeError; -//# sourceMappingURL=DecodeError.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.js.map deleted file mode 100644 index 53f0bf5..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/DecodeError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DecodeError.js","sourceRoot":"","sources":["../src/DecodeError.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAY,SAAQ,KAAK;IACpC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,kDAAkD;QAClD,MAAM,KAAK,GAAiC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACjF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEnC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YAClC,YAAY,EAAE,IAAI;YAClB,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,WAAW,CAAC,IAAI;SACxB,CAAC,CAAC;IACL,CAAC;CACF;AAdD,kCAcC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.d.ts deleted file mode 100644 index 62d343c..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { ExtensionCodecType } from "./ExtensionCodec"; -import { KeyDecoder } from "./CachedKeyDecoder"; -export declare const DataViewIndexOutOfBoundsError: typeof Error; -export declare class Decoder { - private readonly extensionCodec; - private readonly context; - private readonly maxStrLength; - private readonly maxBinLength; - private readonly maxArrayLength; - private readonly maxMapLength; - private readonly maxExtLength; - private readonly keyDecoder; - private totalPos; - private pos; - private view; - private bytes; - private headByte; - private readonly stack; - constructor(extensionCodec?: ExtensionCodecType, context?: ContextType, maxStrLength?: number, maxBinLength?: number, maxArrayLength?: number, maxMapLength?: number, maxExtLength?: number, keyDecoder?: KeyDecoder | null); - private reinitializeState; - private setBuffer; - private appendBuffer; - private hasRemaining; - private createExtraByteError; - /** - * @throws {DecodeError} - * @throws {RangeError} - */ - decode(buffer: ArrayLike | BufferSource): unknown; - decodeMulti(buffer: ArrayLike | BufferSource): Generator; - decodeAsync(stream: AsyncIterable | BufferSource>): Promise; - decodeArrayStream(stream: AsyncIterable | BufferSource>): AsyncGenerator; - decodeStream(stream: AsyncIterable | BufferSource>): AsyncGenerator; - private decodeMultiAsync; - private doDecodeSync; - private readHeadByte; - private complete; - private readArraySize; - private pushMapState; - private pushArrayState; - private decodeUtf8String; - private stateIsMapKey; - private decodeBinary; - private decodeExtension; - private lookU8; - private lookU16; - private lookU32; - private readU8; - private readI8; - private readU16; - private readI16; - private readU32; - private readI32; - private readU64; - private readI64; - private readF32; - private readF64; -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.js b/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.js deleted file mode 100644 index 18627a6..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.js +++ /dev/null @@ -1,583 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Decoder = exports.DataViewIndexOutOfBoundsError = void 0; -const prettyByte_1 = require("./utils/prettyByte"); -const ExtensionCodec_1 = require("./ExtensionCodec"); -const int_1 = require("./utils/int"); -const utf8_1 = require("./utils/utf8"); -const typedArrays_1 = require("./utils/typedArrays"); -const CachedKeyDecoder_1 = require("./CachedKeyDecoder"); -const DecodeError_1 = require("./DecodeError"); -const isValidMapKeyType = (key) => { - const keyType = typeof key; - return keyType === "string" || keyType === "number"; -}; -const HEAD_BYTE_REQUIRED = -1; -const EMPTY_VIEW = new DataView(new ArrayBuffer(0)); -const EMPTY_BYTES = new Uint8Array(EMPTY_VIEW.buffer); -// IE11: Hack to support IE11. -// IE11: Drop this hack and just use RangeError when IE11 is obsolete. -exports.DataViewIndexOutOfBoundsError = (() => { - try { - // IE11: The spec says it should throw RangeError, - // IE11: but in IE11 it throws TypeError. - EMPTY_VIEW.getInt8(0); - } - catch (e) { - return e.constructor; - } - throw new Error("never reached"); -})(); -const MORE_DATA = new exports.DataViewIndexOutOfBoundsError("Insufficient data"); -const sharedCachedKeyDecoder = new CachedKeyDecoder_1.CachedKeyDecoder(); -class Decoder { - constructor(extensionCodec = ExtensionCodec_1.ExtensionCodec.defaultCodec, context = undefined, maxStrLength = int_1.UINT32_MAX, maxBinLength = int_1.UINT32_MAX, maxArrayLength = int_1.UINT32_MAX, maxMapLength = int_1.UINT32_MAX, maxExtLength = int_1.UINT32_MAX, keyDecoder = sharedCachedKeyDecoder) { - this.extensionCodec = extensionCodec; - this.context = context; - this.maxStrLength = maxStrLength; - this.maxBinLength = maxBinLength; - this.maxArrayLength = maxArrayLength; - this.maxMapLength = maxMapLength; - this.maxExtLength = maxExtLength; - this.keyDecoder = keyDecoder; - this.totalPos = 0; - this.pos = 0; - this.view = EMPTY_VIEW; - this.bytes = EMPTY_BYTES; - this.headByte = HEAD_BYTE_REQUIRED; - this.stack = []; - } - reinitializeState() { - this.totalPos = 0; - this.headByte = HEAD_BYTE_REQUIRED; - this.stack.length = 0; - // view, bytes, and pos will be re-initialized in setBuffer() - } - setBuffer(buffer) { - this.bytes = (0, typedArrays_1.ensureUint8Array)(buffer); - this.view = (0, typedArrays_1.createDataView)(this.bytes); - this.pos = 0; - } - appendBuffer(buffer) { - if (this.headByte === HEAD_BYTE_REQUIRED && !this.hasRemaining(1)) { - this.setBuffer(buffer); - } - else { - const remainingData = this.bytes.subarray(this.pos); - const newData = (0, typedArrays_1.ensureUint8Array)(buffer); - // concat remainingData + newData - const newBuffer = new Uint8Array(remainingData.length + newData.length); - newBuffer.set(remainingData); - newBuffer.set(newData, remainingData.length); - this.setBuffer(newBuffer); - } - } - hasRemaining(size) { - return this.view.byteLength - this.pos >= size; - } - createExtraByteError(posToShow) { - const { view, pos } = this; - return new RangeError(`Extra ${view.byteLength - pos} of ${view.byteLength} byte(s) found at buffer[${posToShow}]`); - } - /** - * @throws {DecodeError} - * @throws {RangeError} - */ - decode(buffer) { - this.reinitializeState(); - this.setBuffer(buffer); - const object = this.doDecodeSync(); - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.pos); - } - return object; - } - *decodeMulti(buffer) { - this.reinitializeState(); - this.setBuffer(buffer); - while (this.hasRemaining(1)) { - yield this.doDecodeSync(); - } - } - async decodeAsync(stream) { - let decoded = false; - let object; - for await (const buffer of stream) { - if (decoded) { - throw this.createExtraByteError(this.totalPos); - } - this.appendBuffer(buffer); - try { - object = this.doDecodeSync(); - decoded = true; - } - catch (e) { - if (!(e instanceof exports.DataViewIndexOutOfBoundsError)) { - throw e; // rethrow - } - // fallthrough - } - this.totalPos += this.pos; - } - if (decoded) { - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.totalPos); - } - return object; - } - const { headByte, pos, totalPos } = this; - throw new RangeError(`Insufficient data in parsing ${(0, prettyByte_1.prettyByte)(headByte)} at ${totalPos} (${pos} in the current buffer)`); - } - decodeArrayStream(stream) { - return this.decodeMultiAsync(stream, true); - } - decodeStream(stream) { - return this.decodeMultiAsync(stream, false); - } - async *decodeMultiAsync(stream, isArray) { - let isArrayHeaderRequired = isArray; - let arrayItemsLeft = -1; - for await (const buffer of stream) { - if (isArray && arrayItemsLeft === 0) { - throw this.createExtraByteError(this.totalPos); - } - this.appendBuffer(buffer); - if (isArrayHeaderRequired) { - arrayItemsLeft = this.readArraySize(); - isArrayHeaderRequired = false; - this.complete(); - } - try { - while (true) { - yield this.doDecodeSync(); - if (--arrayItemsLeft === 0) { - break; - } - } - } - catch (e) { - if (!(e instanceof exports.DataViewIndexOutOfBoundsError)) { - throw e; // rethrow - } - // fallthrough - } - this.totalPos += this.pos; - } - } - doDecodeSync() { - DECODE: while (true) { - const headByte = this.readHeadByte(); - let object; - if (headByte >= 0xe0) { - // negative fixint (111x xxxx) 0xe0 - 0xff - object = headByte - 0x100; - } - else if (headByte < 0xc0) { - if (headByte < 0x80) { - // positive fixint (0xxx xxxx) 0x00 - 0x7f - object = headByte; - } - else if (headByte < 0x90) { - // fixmap (1000 xxxx) 0x80 - 0x8f - const size = headByte - 0x80; - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte < 0xa0) { - // fixarray (1001 xxxx) 0x90 - 0x9f - const size = headByte - 0x90; - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else { - // fixstr (101x xxxx) 0xa0 - 0xbf - const byteLength = headByte - 0xa0; - object = this.decodeUtf8String(byteLength, 0); - } - } - else if (headByte === 0xc0) { - // nil - object = null; - } - else if (headByte === 0xc2) { - // false - object = false; - } - else if (headByte === 0xc3) { - // true - object = true; - } - else if (headByte === 0xca) { - // float 32 - object = this.readF32(); - } - else if (headByte === 0xcb) { - // float 64 - object = this.readF64(); - } - else if (headByte === 0xcc) { - // uint 8 - object = this.readU8(); - } - else if (headByte === 0xcd) { - // uint 16 - object = this.readU16(); - } - else if (headByte === 0xce) { - // uint 32 - object = this.readU32(); - } - else if (headByte === 0xcf) { - // uint 64 - object = this.readU64(); - } - else if (headByte === 0xd0) { - // int 8 - object = this.readI8(); - } - else if (headByte === 0xd1) { - // int 16 - object = this.readI16(); - } - else if (headByte === 0xd2) { - // int 32 - object = this.readI32(); - } - else if (headByte === 0xd3) { - // int 64 - object = this.readI64(); - } - else if (headByte === 0xd9) { - // str 8 - const byteLength = this.lookU8(); - object = this.decodeUtf8String(byteLength, 1); - } - else if (headByte === 0xda) { - // str 16 - const byteLength = this.lookU16(); - object = this.decodeUtf8String(byteLength, 2); - } - else if (headByte === 0xdb) { - // str 32 - const byteLength = this.lookU32(); - object = this.decodeUtf8String(byteLength, 4); - } - else if (headByte === 0xdc) { - // array 16 - const size = this.readU16(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else if (headByte === 0xdd) { - // array 32 - const size = this.readU32(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } - else { - object = []; - } - } - else if (headByte === 0xde) { - // map 16 - const size = this.readU16(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte === 0xdf) { - // map 32 - const size = this.readU32(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } - else { - object = {}; - } - } - else if (headByte === 0xc4) { - // bin 8 - const size = this.lookU8(); - object = this.decodeBinary(size, 1); - } - else if (headByte === 0xc5) { - // bin 16 - const size = this.lookU16(); - object = this.decodeBinary(size, 2); - } - else if (headByte === 0xc6) { - // bin 32 - const size = this.lookU32(); - object = this.decodeBinary(size, 4); - } - else if (headByte === 0xd4) { - // fixext 1 - object = this.decodeExtension(1, 0); - } - else if (headByte === 0xd5) { - // fixext 2 - object = this.decodeExtension(2, 0); - } - else if (headByte === 0xd6) { - // fixext 4 - object = this.decodeExtension(4, 0); - } - else if (headByte === 0xd7) { - // fixext 8 - object = this.decodeExtension(8, 0); - } - else if (headByte === 0xd8) { - // fixext 16 - object = this.decodeExtension(16, 0); - } - else if (headByte === 0xc7) { - // ext 8 - const size = this.lookU8(); - object = this.decodeExtension(size, 1); - } - else if (headByte === 0xc8) { - // ext 16 - const size = this.lookU16(); - object = this.decodeExtension(size, 2); - } - else if (headByte === 0xc9) { - // ext 32 - const size = this.lookU32(); - object = this.decodeExtension(size, 4); - } - else { - throw new DecodeError_1.DecodeError(`Unrecognized type byte: ${(0, prettyByte_1.prettyByte)(headByte)}`); - } - this.complete(); - const stack = this.stack; - while (stack.length > 0) { - // arrays and maps - const state = stack[stack.length - 1]; - if (state.type === 0 /* ARRAY */) { - state.array[state.position] = object; - state.position++; - if (state.position === state.size) { - stack.pop(); - object = state.array; - } - else { - continue DECODE; - } - } - else if (state.type === 1 /* MAP_KEY */) { - if (!isValidMapKeyType(object)) { - throw new DecodeError_1.DecodeError("The type of key must be string or number but " + typeof object); - } - if (object === "__proto__") { - throw new DecodeError_1.DecodeError("The key __proto__ is not allowed"); - } - state.key = object; - state.type = 2 /* MAP_VALUE */; - continue DECODE; - } - else { - // it must be `state.type === State.MAP_VALUE` here - state.map[state.key] = object; - state.readCount++; - if (state.readCount === state.size) { - stack.pop(); - object = state.map; - } - else { - state.key = null; - state.type = 1 /* MAP_KEY */; - continue DECODE; - } - } - } - return object; - } - } - readHeadByte() { - if (this.headByte === HEAD_BYTE_REQUIRED) { - this.headByte = this.readU8(); - // console.log("headByte", prettyByte(this.headByte)); - } - return this.headByte; - } - complete() { - this.headByte = HEAD_BYTE_REQUIRED; - } - readArraySize() { - const headByte = this.readHeadByte(); - switch (headByte) { - case 0xdc: - return this.readU16(); - case 0xdd: - return this.readU32(); - default: { - if (headByte < 0xa0) { - return headByte - 0x90; - } - else { - throw new DecodeError_1.DecodeError(`Unrecognized array type byte: ${(0, prettyByte_1.prettyByte)(headByte)}`); - } - } - } - } - pushMapState(size) { - if (size > this.maxMapLength) { - throw new DecodeError_1.DecodeError(`Max length exceeded: map length (${size}) > maxMapLengthLength (${this.maxMapLength})`); - } - this.stack.push({ - type: 1 /* MAP_KEY */, - size, - key: null, - readCount: 0, - map: {}, - }); - } - pushArrayState(size) { - if (size > this.maxArrayLength) { - throw new DecodeError_1.DecodeError(`Max length exceeded: array length (${size}) > maxArrayLength (${this.maxArrayLength})`); - } - this.stack.push({ - type: 0 /* ARRAY */, - size, - array: new Array(size), - position: 0, - }); - } - decodeUtf8String(byteLength, headerOffset) { - var _a; - if (byteLength > this.maxStrLength) { - throw new DecodeError_1.DecodeError(`Max length exceeded: UTF-8 byte length (${byteLength}) > maxStrLength (${this.maxStrLength})`); - } - if (this.bytes.byteLength < this.pos + headerOffset + byteLength) { - throw MORE_DATA; - } - const offset = this.pos + headerOffset; - let object; - if (this.stateIsMapKey() && ((_a = this.keyDecoder) === null || _a === void 0 ? void 0 : _a.canBeCached(byteLength))) { - object = this.keyDecoder.decode(this.bytes, offset, byteLength); - } - else if (byteLength > utf8_1.TEXT_DECODER_THRESHOLD) { - object = (0, utf8_1.utf8DecodeTD)(this.bytes, offset, byteLength); - } - else { - object = (0, utf8_1.utf8DecodeJs)(this.bytes, offset, byteLength); - } - this.pos += headerOffset + byteLength; - return object; - } - stateIsMapKey() { - if (this.stack.length > 0) { - const state = this.stack[this.stack.length - 1]; - return state.type === 1 /* MAP_KEY */; - } - return false; - } - decodeBinary(byteLength, headOffset) { - if (byteLength > this.maxBinLength) { - throw new DecodeError_1.DecodeError(`Max length exceeded: bin length (${byteLength}) > maxBinLength (${this.maxBinLength})`); - } - if (!this.hasRemaining(byteLength + headOffset)) { - throw MORE_DATA; - } - const offset = this.pos + headOffset; - const object = this.bytes.subarray(offset, offset + byteLength); - this.pos += headOffset + byteLength; - return object; - } - decodeExtension(size, headOffset) { - if (size > this.maxExtLength) { - throw new DecodeError_1.DecodeError(`Max length exceeded: ext length (${size}) > maxExtLength (${this.maxExtLength})`); - } - const extType = this.view.getInt8(this.pos + headOffset); - const data = this.decodeBinary(size, headOffset + 1 /* extType */); - return this.extensionCodec.decode(data, extType, this.context); - } - lookU8() { - return this.view.getUint8(this.pos); - } - lookU16() { - return this.view.getUint16(this.pos); - } - lookU32() { - return this.view.getUint32(this.pos); - } - readU8() { - const value = this.view.getUint8(this.pos); - this.pos++; - return value; - } - readI8() { - const value = this.view.getInt8(this.pos); - this.pos++; - return value; - } - readU16() { - const value = this.view.getUint16(this.pos); - this.pos += 2; - return value; - } - readI16() { - const value = this.view.getInt16(this.pos); - this.pos += 2; - return value; - } - readU32() { - const value = this.view.getUint32(this.pos); - this.pos += 4; - return value; - } - readI32() { - const value = this.view.getInt32(this.pos); - this.pos += 4; - return value; - } - readU64() { - const value = (0, int_1.getUint64)(this.view, this.pos); - this.pos += 8; - return value; - } - readI64() { - const value = (0, int_1.getInt64)(this.view, this.pos); - this.pos += 8; - return value; - } - readF32() { - const value = this.view.getFloat32(this.pos); - this.pos += 4; - return value; - } - readF64() { - const value = this.view.getFloat64(this.pos); - this.pos += 8; - return value; - } -} -exports.Decoder = Decoder; -//# sourceMappingURL=Decoder.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.js.map deleted file mode 100644 index 9111689..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/Decoder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Decoder.js","sourceRoot":"","sources":["../src/Decoder.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.d.ts deleted file mode 100644 index 467a0b2..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ExtensionCodecType } from "./ExtensionCodec"; -export declare const DEFAULT_MAX_DEPTH = 100; -export declare const DEFAULT_INITIAL_BUFFER_SIZE = 2048; -export declare class Encoder { - private readonly extensionCodec; - private readonly context; - private readonly maxDepth; - private readonly initialBufferSize; - private readonly sortKeys; - private readonly forceFloat32; - private readonly ignoreUndefined; - private readonly forceIntegerToFloat; - private pos; - private view; - private bytes; - constructor(extensionCodec?: ExtensionCodecType, context?: ContextType, maxDepth?: number, initialBufferSize?: number, sortKeys?: boolean, forceFloat32?: boolean, ignoreUndefined?: boolean, forceIntegerToFloat?: boolean); - private getUint8Array; - private reinitializeState; - encode(object: unknown): Uint8Array; - private doEncode; - private ensureBufferSizeToWrite; - private resizeBuffer; - private encodeNil; - private encodeBoolean; - private encodeNumber; - private writeStringHeader; - private encodeString; - private encodeObject; - private encodeBinary; - private encodeArray; - private countWithoutUndefined; - private encodeMap; - private encodeExtension; - private writeU8; - private writeU8a; - private writeI8; - private writeU16; - private writeI16; - private writeU32; - private writeI32; - private writeF32; - private writeF64; - private writeU64; - private writeI64; -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.js b/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.js deleted file mode 100644 index e561f62..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.js +++ /dev/null @@ -1,398 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Encoder = exports.DEFAULT_INITIAL_BUFFER_SIZE = exports.DEFAULT_MAX_DEPTH = void 0; -const utf8_1 = require("./utils/utf8"); -const ExtensionCodec_1 = require("./ExtensionCodec"); -const int_1 = require("./utils/int"); -const typedArrays_1 = require("./utils/typedArrays"); -exports.DEFAULT_MAX_DEPTH = 100; -exports.DEFAULT_INITIAL_BUFFER_SIZE = 2048; -class Encoder { - constructor(extensionCodec = ExtensionCodec_1.ExtensionCodec.defaultCodec, context = undefined, maxDepth = exports.DEFAULT_MAX_DEPTH, initialBufferSize = exports.DEFAULT_INITIAL_BUFFER_SIZE, sortKeys = false, forceFloat32 = false, ignoreUndefined = false, forceIntegerToFloat = false) { - this.extensionCodec = extensionCodec; - this.context = context; - this.maxDepth = maxDepth; - this.initialBufferSize = initialBufferSize; - this.sortKeys = sortKeys; - this.forceFloat32 = forceFloat32; - this.ignoreUndefined = ignoreUndefined; - this.forceIntegerToFloat = forceIntegerToFloat; - this.pos = 0; - this.view = new DataView(new ArrayBuffer(this.initialBufferSize)); - this.bytes = new Uint8Array(this.view.buffer); - } - getUint8Array() { - return this.bytes.subarray(0, this.pos); - } - reinitializeState() { - this.pos = 0; - } - encode(object) { - this.reinitializeState(); - this.doEncode(object, 1); - return this.getUint8Array(); - } - doEncode(object, depth) { - if (depth > this.maxDepth) { - throw new Error(`Too deep objects in depth ${depth}`); - } - if (object == null) { - this.encodeNil(); - } - else if (typeof object === "boolean") { - this.encodeBoolean(object); - } - else if (typeof object === "number") { - this.encodeNumber(object); - } - else if (typeof object === "string") { - this.encodeString(object); - } - else { - this.encodeObject(object, depth); - } - } - ensureBufferSizeToWrite(sizeToWrite) { - const requiredSize = this.pos + sizeToWrite; - if (this.view.byteLength < requiredSize) { - this.resizeBuffer(requiredSize * 2); - } - } - resizeBuffer(newSize) { - const newBuffer = new ArrayBuffer(newSize); - const newBytes = new Uint8Array(newBuffer); - const newView = new DataView(newBuffer); - newBytes.set(this.bytes); - this.view = newView; - this.bytes = newBytes; - } - encodeNil() { - this.writeU8(0xc0); - } - encodeBoolean(object) { - if (object === false) { - this.writeU8(0xc2); - } - else { - this.writeU8(0xc3); - } - } - encodeNumber(object) { - if (Number.isSafeInteger(object) && !this.forceIntegerToFloat) { - if (object >= 0) { - if (object < 0x80) { - // positive fixint - this.writeU8(object); - } - else if (object < 0x100) { - // uint 8 - this.writeU8(0xcc); - this.writeU8(object); - } - else if (object < 0x10000) { - // uint 16 - this.writeU8(0xcd); - this.writeU16(object); - } - else if (object < 0x100000000) { - // uint 32 - this.writeU8(0xce); - this.writeU32(object); - } - else { - // uint 64 - this.writeU8(0xcf); - this.writeU64(object); - } - } - else { - if (object >= -0x20) { - // negative fixint - this.writeU8(0xe0 | (object + 0x20)); - } - else if (object >= -0x80) { - // int 8 - this.writeU8(0xd0); - this.writeI8(object); - } - else if (object >= -0x8000) { - // int 16 - this.writeU8(0xd1); - this.writeI16(object); - } - else if (object >= -0x80000000) { - // int 32 - this.writeU8(0xd2); - this.writeI32(object); - } - else { - // int 64 - this.writeU8(0xd3); - this.writeI64(object); - } - } - } - else { - // non-integer numbers - if (this.forceFloat32) { - // float 32 - this.writeU8(0xca); - this.writeF32(object); - } - else { - // float 64 - this.writeU8(0xcb); - this.writeF64(object); - } - } - } - writeStringHeader(byteLength) { - if (byteLength < 32) { - // fixstr - this.writeU8(0xa0 + byteLength); - } - else if (byteLength < 0x100) { - // str 8 - this.writeU8(0xd9); - this.writeU8(byteLength); - } - else if (byteLength < 0x10000) { - // str 16 - this.writeU8(0xda); - this.writeU16(byteLength); - } - else if (byteLength < 0x100000000) { - // str 32 - this.writeU8(0xdb); - this.writeU32(byteLength); - } - else { - throw new Error(`Too long string: ${byteLength} bytes in UTF-8`); - } - } - encodeString(object) { - const maxHeaderSize = 1 + 4; - const strLength = object.length; - if (strLength > utf8_1.TEXT_ENCODER_THRESHOLD) { - const byteLength = (0, utf8_1.utf8Count)(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - (0, utf8_1.utf8EncodeTE)(object, this.bytes, this.pos); - this.pos += byteLength; - } - else { - const byteLength = (0, utf8_1.utf8Count)(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - (0, utf8_1.utf8EncodeJs)(object, this.bytes, this.pos); - this.pos += byteLength; - } - } - encodeObject(object, depth) { - // try to encode objects with custom codec first of non-primitives - const ext = this.extensionCodec.tryToEncode(object, this.context); - if (ext != null) { - this.encodeExtension(ext); - } - else if (Array.isArray(object)) { - this.encodeArray(object, depth); - } - else if (ArrayBuffer.isView(object)) { - this.encodeBinary(object); - } - else if (typeof object === "object") { - this.encodeMap(object, depth); - } - else { - // symbol, function and other special object come here unless extensionCodec handles them. - throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object)}`); - } - } - encodeBinary(object) { - const size = object.byteLength; - if (size < 0x100) { - // bin 8 - this.writeU8(0xc4); - this.writeU8(size); - } - else if (size < 0x10000) { - // bin 16 - this.writeU8(0xc5); - this.writeU16(size); - } - else if (size < 0x100000000) { - // bin 32 - this.writeU8(0xc6); - this.writeU32(size); - } - else { - throw new Error(`Too large binary: ${size}`); - } - const bytes = (0, typedArrays_1.ensureUint8Array)(object); - this.writeU8a(bytes); - } - encodeArray(object, depth) { - const size = object.length; - if (size < 16) { - // fixarray - this.writeU8(0x90 + size); - } - else if (size < 0x10000) { - // array 16 - this.writeU8(0xdc); - this.writeU16(size); - } - else if (size < 0x100000000) { - // array 32 - this.writeU8(0xdd); - this.writeU32(size); - } - else { - throw new Error(`Too large array: ${size}`); - } - for (const item of object) { - this.doEncode(item, depth + 1); - } - } - countWithoutUndefined(object, keys) { - let count = 0; - for (const key of keys) { - if (object[key] !== undefined) { - count++; - } - } - return count; - } - encodeMap(object, depth) { - const keys = Object.keys(object); - if (this.sortKeys) { - keys.sort(); - } - const size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length; - if (size < 16) { - // fixmap - this.writeU8(0x80 + size); - } - else if (size < 0x10000) { - // map 16 - this.writeU8(0xde); - this.writeU16(size); - } - else if (size < 0x100000000) { - // map 32 - this.writeU8(0xdf); - this.writeU32(size); - } - else { - throw new Error(`Too large map object: ${size}`); - } - for (const key of keys) { - const value = object[key]; - if (!(this.ignoreUndefined && value === undefined)) { - this.encodeString(key); - this.doEncode(value, depth + 1); - } - } - } - encodeExtension(ext) { - const size = ext.data.length; - if (size === 1) { - // fixext 1 - this.writeU8(0xd4); - } - else if (size === 2) { - // fixext 2 - this.writeU8(0xd5); - } - else if (size === 4) { - // fixext 4 - this.writeU8(0xd6); - } - else if (size === 8) { - // fixext 8 - this.writeU8(0xd7); - } - else if (size === 16) { - // fixext 16 - this.writeU8(0xd8); - } - else if (size < 0x100) { - // ext 8 - this.writeU8(0xc7); - this.writeU8(size); - } - else if (size < 0x10000) { - // ext 16 - this.writeU8(0xc8); - this.writeU16(size); - } - else if (size < 0x100000000) { - // ext 32 - this.writeU8(0xc9); - this.writeU32(size); - } - else { - throw new Error(`Too large extension object: ${size}`); - } - this.writeI8(ext.type); - this.writeU8a(ext.data); - } - writeU8(value) { - this.ensureBufferSizeToWrite(1); - this.view.setUint8(this.pos, value); - this.pos++; - } - writeU8a(values) { - const size = values.length; - this.ensureBufferSizeToWrite(size); - this.bytes.set(values, this.pos); - this.pos += size; - } - writeI8(value) { - this.ensureBufferSizeToWrite(1); - this.view.setInt8(this.pos, value); - this.pos++; - } - writeU16(value) { - this.ensureBufferSizeToWrite(2); - this.view.setUint16(this.pos, value); - this.pos += 2; - } - writeI16(value) { - this.ensureBufferSizeToWrite(2); - this.view.setInt16(this.pos, value); - this.pos += 2; - } - writeU32(value) { - this.ensureBufferSizeToWrite(4); - this.view.setUint32(this.pos, value); - this.pos += 4; - } - writeI32(value) { - this.ensureBufferSizeToWrite(4); - this.view.setInt32(this.pos, value); - this.pos += 4; - } - writeF32(value) { - this.ensureBufferSizeToWrite(4); - this.view.setFloat32(this.pos, value); - this.pos += 4; - } - writeF64(value) { - this.ensureBufferSizeToWrite(8); - this.view.setFloat64(this.pos, value); - this.pos += 8; - } - writeU64(value) { - this.ensureBufferSizeToWrite(8); - (0, int_1.setUint64)(this.view, this.pos, value); - this.pos += 8; - } - writeI64(value) { - this.ensureBufferSizeToWrite(8); - (0, int_1.setInt64)(this.view, this.pos, value); - this.pos += 8; - } -} -exports.Encoder = Encoder; -//# sourceMappingURL=Encoder.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.js.map deleted file mode 100644 index 8f508be..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/Encoder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Encoder.js","sourceRoot":"","sources":["../src/Encoder.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.d.ts deleted file mode 100644 index 3014852..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ExtData is used to handle Extension Types that are not registered to ExtensionCodec. - */ -export declare class ExtData { - readonly type: number; - readonly data: Uint8Array; - constructor(type: number, data: Uint8Array); -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.js b/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.js deleted file mode 100644 index 7f9c147..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExtData = void 0; -/** - * ExtData is used to handle Extension Types that are not registered to ExtensionCodec. - */ -class ExtData { - constructor(type, data) { - this.type = type; - this.data = data; - } -} -exports.ExtData = ExtData; -//# sourceMappingURL=ExtData.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.js.map deleted file mode 100644 index 01fce18..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExtData.js","sourceRoot":"","sources":["../src/ExtData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,OAAO;IAClB,YAAqB,IAAY,EAAW,IAAgB;QAAvC,SAAI,GAAJ,IAAI,CAAQ;QAAW,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;CACjE;AAFD,0BAEC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.d.ts deleted file mode 100644 index 1362cb1..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ExtData } from "./ExtData"; -export declare type ExtensionDecoderType = (data: Uint8Array, extensionType: number, context: ContextType) => unknown; -export declare type ExtensionEncoderType = (input: unknown, context: ContextType) => Uint8Array | null; -export declare type ExtensionCodecType = { - __brand?: ContextType; - tryToEncode(object: unknown, context: ContextType): ExtData | null; - decode(data: Uint8Array, extType: number, context: ContextType): unknown; -}; -export declare class ExtensionCodec implements ExtensionCodecType { - static readonly defaultCodec: ExtensionCodecType; - __brand?: ContextType; - private readonly builtInEncoders; - private readonly builtInDecoders; - private readonly encoders; - private readonly decoders; - constructor(); - register({ type, encode, decode, }: { - type: number; - encode: ExtensionEncoderType; - decode: ExtensionDecoderType; - }): void; - tryToEncode(object: unknown, context: ContextType): ExtData | null; - decode(data: Uint8Array, type: number, context: ContextType): unknown; -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.js b/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.js deleted file mode 100644 index 712a655..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -// ExtensionCodec to handle MessagePack extensions -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExtensionCodec = void 0; -const ExtData_1 = require("./ExtData"); -const timestamp_1 = require("./timestamp"); -class ExtensionCodec { - constructor() { - // built-in extensions - this.builtInEncoders = []; - this.builtInDecoders = []; - // custom extensions - this.encoders = []; - this.decoders = []; - this.register(timestamp_1.timestampExtension); - } - register({ type, encode, decode, }) { - if (type >= 0) { - // custom extensions - this.encoders[type] = encode; - this.decoders[type] = decode; - } - else { - // built-in extensions - const index = 1 + type; - this.builtInEncoders[index] = encode; - this.builtInDecoders[index] = decode; - } - } - tryToEncode(object, context) { - // built-in extensions - for (let i = 0; i < this.builtInEncoders.length; i++) { - const encodeExt = this.builtInEncoders[i]; - if (encodeExt != null) { - const data = encodeExt(object, context); - if (data != null) { - const type = -1 - i; - return new ExtData_1.ExtData(type, data); - } - } - } - // custom extensions - for (let i = 0; i < this.encoders.length; i++) { - const encodeExt = this.encoders[i]; - if (encodeExt != null) { - const data = encodeExt(object, context); - if (data != null) { - const type = i; - return new ExtData_1.ExtData(type, data); - } - } - } - if (object instanceof ExtData_1.ExtData) { - // to keep ExtData as is - return object; - } - return null; - } - decode(data, type, context) { - const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type]; - if (decodeExt) { - return decodeExt(data, type, context); - } - else { - // decode() does not fail, returns ExtData instead. - return new ExtData_1.ExtData(type, data); - } - } -} -exports.ExtensionCodec = ExtensionCodec; -ExtensionCodec.defaultCodec = new ExtensionCodec(); -//# sourceMappingURL=ExtensionCodec.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.js.map deleted file mode 100644 index c6a47d9..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/ExtensionCodec.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExtensionCodec.js","sourceRoot":"","sources":["../src/ExtensionCodec.ts"],"names":[],"mappings":";AAAA,kDAAkD;;;AAElD,uCAAoC;AACpC,2CAAiD;AAkBjD,MAAa,cAAc;IAgBzB;QARA,sBAAsB;QACL,oBAAe,GAAgE,EAAE,CAAC;QAClF,oBAAe,GAAgE,EAAE,CAAC;QAEnG,oBAAoB;QACH,aAAQ,GAAgE,EAAE,CAAC;QAC3E,aAAQ,GAAgE,EAAE,CAAC;QAG1F,IAAI,CAAC,QAAQ,CAAC,8BAAkB,CAAC,CAAC;IACpC,CAAC;IAEM,QAAQ,CAAC,EACd,IAAI,EACJ,MAAM,EACN,MAAM,GAKP;QACC,IAAI,IAAI,IAAI,CAAC,EAAE;YACb,oBAAoB;YACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;SAC9B;aAAM;YACL,sBAAsB;YACtB,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;YACrC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;SACtC;IACH,CAAC;IAEM,WAAW,CAAC,MAAe,EAAE,OAAoB;QACtD,sBAAsB;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpD,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YAC1C,IAAI,SAAS,IAAI,IAAI,EAAE;gBACrB,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBACxC,IAAI,IAAI,IAAI,IAAI,EAAE;oBAChB,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;oBACpB,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;iBAChC;aACF;SACF;QAED,oBAAoB;QACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACnC,IAAI,SAAS,IAAI,IAAI,EAAE;gBACrB,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBACxC,IAAI,IAAI,IAAI,IAAI,EAAE;oBAChB,MAAM,IAAI,GAAG,CAAC,CAAC;oBACf,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;iBAChC;aACF;SACF;QAED,IAAI,MAAM,YAAY,iBAAO,EAAE;YAC7B,wBAAwB;YACxB,OAAO,MAAM,CAAC;SACf;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,MAAM,CAAC,IAAgB,EAAE,IAAY,EAAE,OAAoB;QAChE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnF,IAAI,SAAS,EAAE;YACb,OAAO,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;SACvC;aAAM;YACL,mDAAmD;YACnD,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAChC;IACH,CAAC;;AAjFH,wCAkFC;AAjFwB,2BAAY,GAAkC,IAAI,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/context.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/context.d.ts deleted file mode 100644 index 6ecbbc3..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/context.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare type SplitTypes = U extends T ? (Exclude extends never ? T : Exclude) : T; -export declare type SplitUndefined = SplitTypes; -export declare type ContextOf = ContextType extends undefined ? {} : { - /** - * Custom user-defined data, read/writable - */ - context: ContextType; -}; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/context.js b/general/nvim/node_modules/@msgpack/msgpack/dist/context.js deleted file mode 100644 index 2c4ecb5..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/context.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -/* eslint-disable @typescript-eslint/ban-types */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/context.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/context.js.map deleted file mode 100644 index 1f3e412..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/context.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";AAAA,iDAAiD"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/decode.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/decode.d.ts deleted file mode 100644 index 8bdce77..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/decode.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { ExtensionCodecType } from "./ExtensionCodec"; -import type { ContextOf, SplitUndefined } from "./context"; -export declare type DecodeOptions = Readonly; - /** - * Maximum string length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxStrLength: number; - /** - * Maximum binary length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxBinLength: number; - /** - * Maximum array length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxArrayLength: number; - /** - * Maximum map length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxMapLength: number; - /** - * Maximum extension length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxExtLength: number; -}>> & ContextOf; -export declare const defaultDecodeOptions: DecodeOptions; -/** - * It decodes a single MessagePack object in a buffer. - * - * This is a synchronous decoding function. - * See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}. - */ -export declare function decode(buffer: ArrayLike | BufferSource, options?: DecodeOptions>): unknown; -/** - * It decodes multiple MessagePack objects in a buffer. - * This is corresponding to {@link decodeMultiStream()}. - */ -export declare function decodeMulti(buffer: ArrayLike | BufferSource, options?: DecodeOptions>): Generator; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/decode.js b/general/nvim/node_modules/@msgpack/msgpack/dist/decode.js deleted file mode 100644 index 4b9ad65..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/decode.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeMulti = exports.decode = exports.defaultDecodeOptions = void 0; -const Decoder_1 = require("./Decoder"); -exports.defaultDecodeOptions = {}; -/** - * It decodes a single MessagePack object in a buffer. - * - * This is a synchronous decoding function. - * See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}. - */ -function decode(buffer, options = exports.defaultDecodeOptions) { - const decoder = new Decoder_1.Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decode(buffer); -} -exports.decode = decode; -/** - * It decodes multiple MessagePack objects in a buffer. - * This is corresponding to {@link decodeMultiStream()}. - */ -function decodeMulti(buffer, options = exports.defaultDecodeOptions) { - const decoder = new Decoder_1.Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeMulti(buffer); -} -exports.decodeMulti = decodeMulti; -//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/decode.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/decode.js.map deleted file mode 100644 index 4a9f6de..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/decode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.js","sourceRoot":"","sources":["../src/decode.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AA0CvB,QAAA,oBAAoB,GAAkB,EAAE,CAAC;AAEtD;;;;;GAKG;AACH,SAAgB,MAAM,CACpB,MAAwC,EACxC,UAAsD,4BAA2B;IAEjF,MAAM,OAAO,GAAG,IAAI,iBAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAdD,wBAcC;AAED;;;GAGG;AACH,SAAgB,WAAW,CACzB,MAAwC,EACxC,UAAsD,4BAA2B;IAEjF,MAAM,OAAO,GAAG,IAAI,iBAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IACF,OAAO,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC;AAdD,kCAcC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.d.ts deleted file mode 100644 index a6fe0de..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ReadableStreamLike } from "./utils/stream"; -import type { DecodeOptions } from "./decode"; -import type { SplitUndefined } from "./context"; -export declare function decodeAsync(streamLike: ReadableStreamLike | BufferSource>, options?: DecodeOptions>): Promise; -export declare function decodeArrayStream(streamLike: ReadableStreamLike | BufferSource>, options?: DecodeOptions>): AsyncGenerator; -export declare function decodeMultiStream(streamLike: ReadableStreamLike | BufferSource>, options?: DecodeOptions>): AsyncGenerator; -/** - * @deprecated Use {@link decodeMultiStream()} instead. - */ -export declare function decodeStream(streamLike: ReadableStreamLike | BufferSource>, options?: DecodeOptions>): AsyncGenerator; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.js b/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.js deleted file mode 100644 index ce065ac..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeStream = exports.decodeMultiStream = exports.decodeArrayStream = exports.decodeAsync = void 0; -const Decoder_1 = require("./Decoder"); -const stream_1 = require("./utils/stream"); -const decode_1 = require("./decode"); -async function decodeAsync(streamLike, options = decode_1.defaultDecodeOptions) { - const stream = (0, stream_1.ensureAsyncIterable)(streamLike); - const decoder = new Decoder_1.Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeAsync(stream); -} -exports.decodeAsync = decodeAsync; -function decodeArrayStream(streamLike, options = decode_1.defaultDecodeOptions) { - const stream = (0, stream_1.ensureAsyncIterable)(streamLike); - const decoder = new Decoder_1.Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeArrayStream(stream); -} -exports.decodeArrayStream = decodeArrayStream; -function decodeMultiStream(streamLike, options = decode_1.defaultDecodeOptions) { - const stream = (0, stream_1.ensureAsyncIterable)(streamLike); - const decoder = new Decoder_1.Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength); - return decoder.decodeStream(stream); -} -exports.decodeMultiStream = decodeMultiStream; -/** - * @deprecated Use {@link decodeMultiStream()} instead. - */ -function decodeStream(streamLike, options = decode_1.defaultDecodeOptions) { - return decodeMultiStream(streamLike, options); -} -exports.decodeStream = decodeStream; -//# sourceMappingURL=decodeAsync.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.js.map deleted file mode 100644 index ff975bf..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/decodeAsync.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decodeAsync.js","sourceRoot":"","sources":["../src/decodeAsync.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AACpC,2CAAqD;AACrD,qCAAgD;AAKzC,KAAK,UAAU,WAAW,CAC/B,UAAgE,EAChE,UAAsD,6BAA2B;IAEjF,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,UAAU,CAAC,CAAC;IAE/C,MAAM,OAAO,GAAG,IAAI,iBAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IACF,OAAO,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC;AAhBD,kCAgBC;AAED,SAAgB,iBAAiB,CAC/B,UAAgE,EAChE,UAAsD,6BAA2B;IAEjF,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,UAAU,CAAC,CAAC;IAE/C,MAAM,OAAO,GAAG,IAAI,iBAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IAEF,OAAO,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AAjBD,8CAiBC;AAED,SAAgB,iBAAiB,CAC/B,UAAgE,EAChE,UAAsD,6BAA2B;IAEjF,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,UAAU,CAAC,CAAC;IAE/C,MAAM,OAAO,GAAG,IAAI,iBAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,YAAY,CACrB,CAAC;IAEF,OAAO,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAjBD,8CAiBC;AAED;;GAEG;AACH,SAAgB,YAAY,CAC1B,UAAgE,EAChE,UAAsD,6BAA2B;IAEjF,OAAO,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC;AALD,oCAKC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/encode.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/encode.d.ts deleted file mode 100644 index e378207..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/encode.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { ExtensionCodecType } from "./ExtensionCodec"; -import type { ContextOf, SplitUndefined } from "./context"; -export declare type EncodeOptions = Partial; - /** - * The maximum depth in nested objects and arrays. - * - * Defaults to 100. - */ - maxDepth: number; - /** - * The initial size of the internal buffer. - * - * Defaults to 2048. - */ - initialBufferSize: number; - /** - * If `true`, the keys of an object is sorted. In other words, the encoded - * binary is canonical and thus comparable to another encoded binary. - * - * Defaults to `false`. If enabled, it spends more time in encoding objects. - */ - sortKeys: boolean; - /** - * If `true`, non-integer numbers are encoded in float32, not in float64 (the default). - * - * Only use it if precisions don't matter. - * - * Defaults to `false`. - */ - forceFloat32: boolean; - /** - * If `true`, an object property with `undefined` value are ignored. - * e.g. `{ foo: undefined }` will be encoded as `{}`, as `JSON.stringify()` does. - * - * Defaults to `false`. If enabled, it spends more time in encoding objects. - */ - ignoreUndefined: boolean; - /** - * If `true`, integer numbers are encoded as floating point numbers, - * with the `forceFloat32` option taken into account. - * - * Defaults to `false`. - */ - forceIntegerToFloat: boolean; -}>> & ContextOf; -/** - * It encodes `value` in the MessagePack format and - * returns a byte buffer. - * - * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`. - */ -export declare function encode(value: unknown, options?: EncodeOptions>): Uint8Array; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/encode.js b/general/nvim/node_modules/@msgpack/msgpack/dist/encode.js deleted file mode 100644 index 37b6170..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/encode.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encode = void 0; -const Encoder_1 = require("./Encoder"); -const defaultEncodeOptions = {}; -/** - * It encodes `value` in the MessagePack format and - * returns a byte buffer. - * - * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`. - */ -function encode(value, options = defaultEncodeOptions) { - const encoder = new Encoder_1.Encoder(options.extensionCodec, options.context, options.maxDepth, options.initialBufferSize, options.sortKeys, options.forceFloat32, options.ignoreUndefined, options.forceIntegerToFloat); - return encoder.encode(value); -} -exports.encode = encode; -//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/encode.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/encode.js.map deleted file mode 100644 index 583b8e3..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/encode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.js","sourceRoot":"","sources":["../src/encode.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAyDpC,MAAM,oBAAoB,GAAkB,EAAE,CAAC;AAE/C;;;;;GAKG;AACH,SAAgB,MAAM,CACpB,KAAc,EACd,UAAsD,oBAA2B;IAEjF,MAAM,OAAO,GAAG,IAAI,iBAAO,CACzB,OAAO,CAAC,cAAc,EACrB,OAA6C,CAAC,OAAO,EACtD,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,iBAAiB,EACzB,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,mBAAmB,CAC5B,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAfD,wBAeC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/index.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/index.d.ts deleted file mode 100644 index dd0f9ca..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { encode } from "./encode"; -export { encode }; -import type { EncodeOptions } from "./encode"; -export type { EncodeOptions }; -import { decode, decodeMulti } from "./decode"; -export { decode, decodeMulti }; -import type { DecodeOptions } from "./decode"; -export { DecodeOptions }; -import { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream } from "./decodeAsync"; -export { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream }; -import { Decoder, DataViewIndexOutOfBoundsError } from "./Decoder"; -import { DecodeError } from "./DecodeError"; -export { Decoder, DecodeError, DataViewIndexOutOfBoundsError }; -import { Encoder } from "./Encoder"; -export { Encoder }; -import { ExtensionCodec } from "./ExtensionCodec"; -export { ExtensionCodec }; -import type { ExtensionCodecType, ExtensionDecoderType, ExtensionEncoderType } from "./ExtensionCodec"; -export type { ExtensionCodecType, ExtensionDecoderType, ExtensionEncoderType }; -import { ExtData } from "./ExtData"; -export { ExtData }; -import { EXT_TIMESTAMP, encodeDateToTimeSpec, encodeTimeSpecToTimestamp, decodeTimestampToTimeSpec, encodeTimestampExtension, decodeTimestampExtension } from "./timestamp"; -export { EXT_TIMESTAMP, encodeDateToTimeSpec, encodeTimeSpecToTimestamp, decodeTimestampToTimeSpec, encodeTimestampExtension, decodeTimestampExtension, }; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/index.js b/general/nvim/node_modules/@msgpack/msgpack/dist/index.js deleted file mode 100644 index 4cde149..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/index.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -// Main Functions: -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeTimestampExtension = exports.encodeTimestampExtension = exports.decodeTimestampToTimeSpec = exports.encodeTimeSpecToTimestamp = exports.encodeDateToTimeSpec = exports.EXT_TIMESTAMP = exports.ExtData = exports.ExtensionCodec = exports.Encoder = exports.DataViewIndexOutOfBoundsError = exports.DecodeError = exports.Decoder = exports.decodeStream = exports.decodeMultiStream = exports.decodeArrayStream = exports.decodeAsync = exports.decodeMulti = exports.decode = exports.encode = void 0; -const encode_1 = require("./encode"); -Object.defineProperty(exports, "encode", { enumerable: true, get: function () { return encode_1.encode; } }); -const decode_1 = require("./decode"); -Object.defineProperty(exports, "decode", { enumerable: true, get: function () { return decode_1.decode; } }); -Object.defineProperty(exports, "decodeMulti", { enumerable: true, get: function () { return decode_1.decodeMulti; } }); -const decodeAsync_1 = require("./decodeAsync"); -Object.defineProperty(exports, "decodeAsync", { enumerable: true, get: function () { return decodeAsync_1.decodeAsync; } }); -Object.defineProperty(exports, "decodeArrayStream", { enumerable: true, get: function () { return decodeAsync_1.decodeArrayStream; } }); -Object.defineProperty(exports, "decodeMultiStream", { enumerable: true, get: function () { return decodeAsync_1.decodeMultiStream; } }); -Object.defineProperty(exports, "decodeStream", { enumerable: true, get: function () { return decodeAsync_1.decodeStream; } }); -const Decoder_1 = require("./Decoder"); -Object.defineProperty(exports, "Decoder", { enumerable: true, get: function () { return Decoder_1.Decoder; } }); -Object.defineProperty(exports, "DataViewIndexOutOfBoundsError", { enumerable: true, get: function () { return Decoder_1.DataViewIndexOutOfBoundsError; } }); -const DecodeError_1 = require("./DecodeError"); -Object.defineProperty(exports, "DecodeError", { enumerable: true, get: function () { return DecodeError_1.DecodeError; } }); -const Encoder_1 = require("./Encoder"); -Object.defineProperty(exports, "Encoder", { enumerable: true, get: function () { return Encoder_1.Encoder; } }); -// Utilitiies for Extension Types: -const ExtensionCodec_1 = require("./ExtensionCodec"); -Object.defineProperty(exports, "ExtensionCodec", { enumerable: true, get: function () { return ExtensionCodec_1.ExtensionCodec; } }); -const ExtData_1 = require("./ExtData"); -Object.defineProperty(exports, "ExtData", { enumerable: true, get: function () { return ExtData_1.ExtData; } }); -const timestamp_1 = require("./timestamp"); -Object.defineProperty(exports, "EXT_TIMESTAMP", { enumerable: true, get: function () { return timestamp_1.EXT_TIMESTAMP; } }); -Object.defineProperty(exports, "encodeDateToTimeSpec", { enumerable: true, get: function () { return timestamp_1.encodeDateToTimeSpec; } }); -Object.defineProperty(exports, "encodeTimeSpecToTimestamp", { enumerable: true, get: function () { return timestamp_1.encodeTimeSpecToTimestamp; } }); -Object.defineProperty(exports, "decodeTimestampToTimeSpec", { enumerable: true, get: function () { return timestamp_1.decodeTimestampToTimeSpec; } }); -Object.defineProperty(exports, "encodeTimestampExtension", { enumerable: true, get: function () { return timestamp_1.encodeTimestampExtension; } }); -Object.defineProperty(exports, "decodeTimestampExtension", { enumerable: true, get: function () { return timestamp_1.decodeTimestampExtension; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/index.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/index.js.map deleted file mode 100644 index 9571089..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,qCAAkC;AACzB,uFADA,eAAM,OACA;AAIf,qCAA+C;AACtC,uFADA,eAAM,OACA;AAAE,4FADA,oBAAW,OACA;AAI5B,+CAAgG;AACvF,4FADA,yBAAW,OACA;AAAE,kGADA,+BAAiB,OACA;AAAE,kGADA,+BAAiB,OACA;AAAE,6FADA,0BAAY,OACA;AAExE,uCAAmE;AAE1D,wFAFA,iBAAO,OAEA;AAAe,8GAFb,uCAA6B,OAEa;AAD5D,+CAA4C;AAC1B,4FADT,yBAAW,OACS;AAE7B,uCAAoC;AAC3B,wFADA,iBAAO,OACA;AAEhB,kCAAkC;AAElC,qDAAkD;AACzC,+FADA,+BAAc,OACA;AAGvB,uCAAoC;AAC3B,wFADA,iBAAO,OACA;AAEhB,2CAOqB;AAEnB,8FARA,yBAAa,OAQA;AACb,qGARA,gCAAoB,OAQA;AACpB,0GARA,qCAAyB,OAQA;AACzB,0GARA,qCAAyB,OAQA;AACzB,yGARA,oCAAwB,OAQA;AACxB,yGARA,oCAAwB,OAQA"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.d.ts deleted file mode 100644 index 2ea55a4..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export declare const EXT_TIMESTAMP = -1; -export declare type TimeSpec = { - sec: number; - nsec: number; -}; -export declare function encodeTimeSpecToTimestamp({ sec, nsec }: TimeSpec): Uint8Array; -export declare function encodeDateToTimeSpec(date: Date): TimeSpec; -export declare function encodeTimestampExtension(object: unknown): Uint8Array | null; -export declare function decodeTimestampToTimeSpec(data: Uint8Array): TimeSpec; -export declare function decodeTimestampExtension(data: Uint8Array): Date; -export declare const timestampExtension: { - type: number; - encode: typeof encodeTimestampExtension; - decode: typeof decodeTimestampExtension; -}; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.js b/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.js deleted file mode 100644 index 4049225..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.timestampExtension = exports.decodeTimestampExtension = exports.decodeTimestampToTimeSpec = exports.encodeTimestampExtension = exports.encodeDateToTimeSpec = exports.encodeTimeSpecToTimestamp = exports.EXT_TIMESTAMP = void 0; -// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type -const DecodeError_1 = require("./DecodeError"); -const int_1 = require("./utils/int"); -exports.EXT_TIMESTAMP = -1; -const TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int -const TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int -function encodeTimeSpecToTimestamp({ sec, nsec }) { - if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) { - // Here sec >= 0 && nsec >= 0 - if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) { - // timestamp 32 = { sec32 (unsigned) } - const rv = new Uint8Array(4); - const view = new DataView(rv.buffer); - view.setUint32(0, sec); - return rv; - } - else { - // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) } - const secHigh = sec / 0x100000000; - const secLow = sec & 0xffffffff; - const rv = new Uint8Array(8); - const view = new DataView(rv.buffer); - // nsec30 | secHigh2 - view.setUint32(0, (nsec << 2) | (secHigh & 0x3)); - // secLow32 - view.setUint32(4, secLow); - return rv; - } - } - else { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - const rv = new Uint8Array(12); - const view = new DataView(rv.buffer); - view.setUint32(0, nsec); - (0, int_1.setInt64)(view, 4, sec); - return rv; - } -} -exports.encodeTimeSpecToTimestamp = encodeTimeSpecToTimestamp; -function encodeDateToTimeSpec(date) { - const msec = date.getTime(); - const sec = Math.floor(msec / 1e3); - const nsec = (msec - sec * 1e3) * 1e6; - // Normalizes { sec, nsec } to ensure nsec is unsigned. - const nsecInSec = Math.floor(nsec / 1e9); - return { - sec: sec + nsecInSec, - nsec: nsec - nsecInSec * 1e9, - }; -} -exports.encodeDateToTimeSpec = encodeDateToTimeSpec; -function encodeTimestampExtension(object) { - if (object instanceof Date) { - const timeSpec = encodeDateToTimeSpec(object); - return encodeTimeSpecToTimestamp(timeSpec); - } - else { - return null; - } -} -exports.encodeTimestampExtension = encodeTimestampExtension; -function decodeTimestampToTimeSpec(data) { - const view = new DataView(data.buffer, data.byteOffset, data.byteLength); - // data may be 32, 64, or 96 bits - switch (data.byteLength) { - case 4: { - // timestamp 32 = { sec32 } - const sec = view.getUint32(0); - const nsec = 0; - return { sec, nsec }; - } - case 8: { - // timestamp 64 = { nsec30, sec34 } - const nsec30AndSecHigh2 = view.getUint32(0); - const secLow32 = view.getUint32(4); - const sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32; - const nsec = nsec30AndSecHigh2 >>> 2; - return { sec, nsec }; - } - case 12: { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - const sec = (0, int_1.getInt64)(view, 4); - const nsec = view.getUint32(0); - return { sec, nsec }; - } - default: - throw new DecodeError_1.DecodeError(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`); - } -} -exports.decodeTimestampToTimeSpec = decodeTimestampToTimeSpec; -function decodeTimestampExtension(data) { - const timeSpec = decodeTimestampToTimeSpec(data); - return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6); -} -exports.decodeTimestampExtension = decodeTimestampExtension; -exports.timestampExtension = { - type: exports.EXT_TIMESTAMP, - encode: encodeTimestampExtension, - decode: decodeTimestampExtension, -}; -//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.js.map deleted file mode 100644 index 7712628..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/timestamp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../src/timestamp.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.d.ts deleted file mode 100644 index f86c13d..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare const UINT32_MAX = 4294967295; -export declare function setUint64(view: DataView, offset: number, value: number): void; -export declare function setInt64(view: DataView, offset: number, value: number): void; -export declare function getInt64(view: DataView, offset: number): number; -export declare function getUint64(view: DataView, offset: number): number; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.js b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.js deleted file mode 100644 index 1d76f7b..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -// Integer Utility -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getUint64 = exports.getInt64 = exports.setInt64 = exports.setUint64 = exports.UINT32_MAX = void 0; -exports.UINT32_MAX = 4294967295; -// DataView extension to handle int64 / uint64, -// where the actual range is 53-bits integer (a.k.a. safe integer) -function setUint64(view, offset, value) { - const high = value / 4294967296; - const low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} -exports.setUint64 = setUint64; -function setInt64(view, offset, value) { - const high = Math.floor(value / 4294967296); - const low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} -exports.setInt64 = setInt64; -function getInt64(view, offset) { - const high = view.getInt32(offset); - const low = view.getUint32(offset + 4); - return high * 4294967296 + low; -} -exports.getInt64 = getInt64; -function getUint64(view, offset) { - const high = view.getUint32(offset); - const low = view.getUint32(offset + 4); - return high * 4294967296 + low; -} -exports.getUint64 = getUint64; -//# sourceMappingURL=int.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.js.map deleted file mode 100644 index cffbaff..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/int.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"int.js","sourceRoot":"","sources":["../../src/utils/int.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAEL,QAAA,UAAU,GAAG,UAAW,CAAC;AAEtC,+CAA+C;AAC/C,kEAAkE;AAElE,SAAgB,SAAS,CAAC,IAAc,EAAE,MAAc,EAAE,KAAa;IACrE,MAAM,IAAI,GAAG,KAAK,GAAG,UAAa,CAAC;IACnC,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,sCAAsC;IACzD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AALD,8BAKC;AAED,SAAgB,QAAQ,CAAC,IAAc,EAAE,MAAc,EAAE,KAAa;IACpE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,UAAa,CAAC,CAAC;IAC/C,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,sCAAsC;IACzD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AALD,4BAKC;AAED,SAAgB,QAAQ,CAAC,IAAc,EAAE,MAAc;IACrD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvC,OAAO,IAAI,GAAG,UAAa,GAAG,GAAG,CAAC;AACpC,CAAC;AAJD,4BAIC;AAED,SAAgB,SAAS,CAAC,IAAc,EAAE,MAAc;IACtD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvC,OAAO,IAAI,GAAG,UAAa,GAAG,GAAG,CAAC;AACpC,CAAC;AAJD,8BAIC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.d.ts deleted file mode 100644 index 6d67d28..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function prettyByte(byte: number): string; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.js b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.js deleted file mode 100644 index 2cf7378..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.prettyByte = void 0; -function prettyByte(byte) { - return `${byte < 0 ? "-" : ""}0x${Math.abs(byte).toString(16).padStart(2, "0")}`; -} -exports.prettyByte = prettyByte; -//# sourceMappingURL=prettyByte.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.js.map deleted file mode 100644 index 0f6f0a2..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/prettyByte.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prettyByte.js","sourceRoot":"","sources":["../../src/utils/prettyByte.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CAAC,IAAY;IACrC,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACnF,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.d.ts deleted file mode 100644 index d498220..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare type ReadableStreamLike = AsyncIterable | ReadableStream; -export declare function isAsyncIterable(object: ReadableStreamLike): object is AsyncIterable; -export declare function asyncIterableFromStream(stream: ReadableStream): AsyncIterable; -export declare function ensureAsyncIterable(streamLike: ReadableStreamLike): AsyncIterable; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.js b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.js deleted file mode 100644 index 94014a0..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -// utility for whatwg streams -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ensureAsyncIterable = exports.asyncIterableFromStream = exports.isAsyncIterable = void 0; -function isAsyncIterable(object) { - return object[Symbol.asyncIterator] != null; -} -exports.isAsyncIterable = isAsyncIterable; -function assertNonNull(value) { - if (value == null) { - throw new Error("Assertion Failure: value must not be null nor undefined"); - } -} -async function* asyncIterableFromStream(stream) { - const reader = stream.getReader(); - try { - while (true) { - const { done, value } = await reader.read(); - if (done) { - return; - } - assertNonNull(value); - yield value; - } - } - finally { - reader.releaseLock(); - } -} -exports.asyncIterableFromStream = asyncIterableFromStream; -function ensureAsyncIterable(streamLike) { - if (isAsyncIterable(streamLike)) { - return streamLike; - } - else { - return asyncIterableFromStream(streamLike); - } -} -exports.ensureAsyncIterable = ensureAsyncIterable; -//# sourceMappingURL=stream.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.js.map deleted file mode 100644 index 61d13ca..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/stream.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../src/utils/stream.ts"],"names":[],"mappings":";AAAA,6BAA6B;;;AAQ7B,SAAgB,eAAe,CAAI,MAA6B;IAC9D,OAAQ,MAAc,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;AACvD,CAAC;AAFD,0CAEC;AAED,SAAS,aAAa,CAAI,KAA2B;IACnD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;AACH,CAAC;AAEM,KAAK,SAAS,CAAC,CAAC,uBAAuB,CAAI,MAAyB;IACzE,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAElC,IAAI;QACF,OAAO,IAAI,EAAE;YACX,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAC5C,IAAI,IAAI,EAAE;gBACR,OAAO;aACR;YACD,aAAa,CAAC,KAAK,CAAC,CAAC;YACrB,MAAM,KAAK,CAAC;SACb;KACF;YAAS;QACR,MAAM,CAAC,WAAW,EAAE,CAAC;KACtB;AACH,CAAC;AAfD,0DAeC;AAED,SAAgB,mBAAmB,CAAI,UAAiC;IACtE,IAAI,eAAe,CAAC,UAAU,CAAC,EAAE;QAC/B,OAAO,UAAU,CAAC;KACnB;SAAM;QACL,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;KAC5C;AACH,CAAC;AAND,kDAMC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.d.ts deleted file mode 100644 index 8099733..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function ensureUint8Array(buffer: ArrayLike | Uint8Array | ArrayBufferView | ArrayBuffer): Uint8Array; -export declare function createDataView(buffer: ArrayLike | ArrayBufferView | ArrayBuffer): DataView; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.js b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.js deleted file mode 100644 index 4db1b89..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createDataView = exports.ensureUint8Array = void 0; -function ensureUint8Array(buffer) { - if (buffer instanceof Uint8Array) { - return buffer; - } - else if (ArrayBuffer.isView(buffer)) { - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - } - else if (buffer instanceof ArrayBuffer) { - return new Uint8Array(buffer); - } - else { - // ArrayLike - return Uint8Array.from(buffer); - } -} -exports.ensureUint8Array = ensureUint8Array; -function createDataView(buffer) { - if (buffer instanceof ArrayBuffer) { - return new DataView(buffer); - } - const bufferView = ensureUint8Array(buffer); - return new DataView(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength); -} -exports.createDataView = createDataView; -//# sourceMappingURL=typedArrays.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.js.map deleted file mode 100644 index 8b5cac3..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/typedArrays.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"typedArrays.js","sourceRoot":"","sources":["../../src/utils/typedArrays.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB,CAAC,MAAsE;IACrG,IAAI,MAAM,YAAY,UAAU,EAAE;QAChC,OAAO,MAAM,CAAC;KACf;SAAM,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;QACrC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;KAC5E;SAAM,IAAI,MAAM,YAAY,WAAW,EAAE;QACxC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;KAC/B;SAAM;QACL,oBAAoB;QACpB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;AACH,CAAC;AAXD,4CAWC;AAED,SAAgB,cAAc,CAAC,MAAyD;IACtF,IAAI,MAAM,YAAY,WAAW,EAAE;QACjC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;KAC7B;IAED,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;AACvF,CAAC;AAPD,wCAOC"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.d.ts b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.d.ts deleted file mode 100644 index 84f4532..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export declare function utf8Count(str: string): number; -export declare function utf8EncodeJs(str: string, output: Uint8Array, outputOffset: number): void; -export declare const TEXT_ENCODER_THRESHOLD: number; -declare function utf8EncodeTEencodeInto(str: string, output: Uint8Array, outputOffset: number): void; -export declare const utf8EncodeTE: typeof utf8EncodeTEencodeInto; -export declare function utf8DecodeJs(bytes: Uint8Array, inputOffset: number, byteLength: number): string; -export declare const TEXT_DECODER_THRESHOLD: number; -export declare function utf8DecodeTD(bytes: Uint8Array, inputOffset: number, byteLength: number): string; -export {}; diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.js b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.js deleted file mode 100644 index 555c14c..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; -var _a, _b, _c; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.utf8DecodeTD = exports.TEXT_DECODER_THRESHOLD = exports.utf8DecodeJs = exports.utf8EncodeTE = exports.TEXT_ENCODER_THRESHOLD = exports.utf8EncodeJs = exports.utf8Count = void 0; -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ -const int_1 = require("./int"); -const TEXT_ENCODING_AVAILABLE = (typeof process === "undefined" || ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a["TEXT_ENCODING"]) !== "never") && - typeof TextEncoder !== "undefined" && - typeof TextDecoder !== "undefined"; -function utf8Count(str) { - const strLength = str.length; - let byteLength = 0; - let pos = 0; - while (pos < strLength) { - let value = str.charCodeAt(pos++); - if ((value & 0xffffff80) === 0) { - // 1-byte - byteLength++; - continue; - } - else if ((value & 0xfffff800) === 0) { - // 2-bytes - byteLength += 2; - } - else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - const extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - if ((value & 0xffff0000) === 0) { - // 3-byte - byteLength += 3; - } - else { - // 4-byte - byteLength += 4; - } - } - } - return byteLength; -} -exports.utf8Count = utf8Count; -function utf8EncodeJs(str, output, outputOffset) { - const strLength = str.length; - let offset = outputOffset; - let pos = 0; - while (pos < strLength) { - let value = str.charCodeAt(pos++); - if ((value & 0xffffff80) === 0) { - // 1-byte - output[offset++] = value; - continue; - } - else if ((value & 0xfffff800) === 0) { - // 2-bytes - output[offset++] = ((value >> 6) & 0x1f) | 0xc0; - } - else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - const extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - if ((value & 0xffff0000) === 0) { - // 3-byte - output[offset++] = ((value >> 12) & 0x0f) | 0xe0; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } - else { - // 4-byte - output[offset++] = ((value >> 18) & 0x07) | 0xf0; - output[offset++] = ((value >> 12) & 0x3f) | 0x80; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } - } - output[offset++] = (value & 0x3f) | 0x80; - } -} -exports.utf8EncodeJs = utf8EncodeJs; -const sharedTextEncoder = TEXT_ENCODING_AVAILABLE ? new TextEncoder() : undefined; -exports.TEXT_ENCODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? int_1.UINT32_MAX - : typeof process !== "undefined" && ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b["TEXT_ENCODING"]) !== "force" - ? 200 - : 0; -function utf8EncodeTEencode(str, output, outputOffset) { - output.set(sharedTextEncoder.encode(str), outputOffset); -} -function utf8EncodeTEencodeInto(str, output, outputOffset) { - sharedTextEncoder.encodeInto(str, output.subarray(outputOffset)); -} -exports.utf8EncodeTE = (sharedTextEncoder === null || sharedTextEncoder === void 0 ? void 0 : sharedTextEncoder.encodeInto) ? utf8EncodeTEencodeInto : utf8EncodeTEencode; -const CHUNK_SIZE = 4096; -function utf8DecodeJs(bytes, inputOffset, byteLength) { - let offset = inputOffset; - const end = offset + byteLength; - const units = []; - let result = ""; - while (offset < end) { - const byte1 = bytes[offset++]; - if ((byte1 & 0x80) === 0) { - // 1 byte - units.push(byte1); - } - else if ((byte1 & 0xe0) === 0xc0) { - // 2 bytes - const byte2 = bytes[offset++] & 0x3f; - units.push(((byte1 & 0x1f) << 6) | byte2); - } - else if ((byte1 & 0xf0) === 0xe0) { - // 3 bytes - const byte2 = bytes[offset++] & 0x3f; - const byte3 = bytes[offset++] & 0x3f; - units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3); - } - else if ((byte1 & 0xf8) === 0xf0) { - // 4 bytes - const byte2 = bytes[offset++] & 0x3f; - const byte3 = bytes[offset++] & 0x3f; - const byte4 = bytes[offset++] & 0x3f; - let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - if (unit > 0xffff) { - unit -= 0x10000; - units.push(((unit >>> 10) & 0x3ff) | 0xd800); - unit = 0xdc00 | (unit & 0x3ff); - } - units.push(unit); - } - else { - units.push(byte1); - } - if (units.length >= CHUNK_SIZE) { - result += String.fromCharCode(...units); - units.length = 0; - } - } - if (units.length > 0) { - result += String.fromCharCode(...units); - } - return result; -} -exports.utf8DecodeJs = utf8DecodeJs; -const sharedTextDecoder = TEXT_ENCODING_AVAILABLE ? new TextDecoder() : null; -exports.TEXT_DECODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? int_1.UINT32_MAX - : typeof process !== "undefined" && ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c["TEXT_DECODER"]) !== "force" - ? 200 - : 0; -function utf8DecodeTD(bytes, inputOffset, byteLength) { - const stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength); - return sharedTextDecoder.decode(stringBytes); -} -exports.utf8DecodeTD = utf8DecodeTD; -//# sourceMappingURL=utf8.js.map \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.js.map b/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.js.map deleted file mode 100644 index 12e295e..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/dist/utils/utf8.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../src/utils/utf8.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/@msgpack/msgpack/mod.ts b/general/nvim/node_modules/@msgpack/msgpack/mod.ts deleted file mode 100644 index 47fe56b..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/mod.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./dist.es5+esm/index.mjs"; diff --git a/general/nvim/node_modules/@msgpack/msgpack/package.json b/general/nvim/node_modules/@msgpack/msgpack/package.json deleted file mode 100644 index 109661a..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "name": "@msgpack/msgpack", - "version": "2.7.2", - "description": "MessagePack for ECMA-262/JavaScript/TypeScript", - "author": "The MessagePack community", - "license": "ISC", - "main": "./dist/index.js", - "module": "./dist.es5+esm/index.mjs", - "cdn": "./dist.es5+umd/msgpack.min.js", - "unpkg": "./dist.es5+umd/msgpack.min.js", - "types": "./dist/index.d.ts", - "sideEffects": false, - "scripts": { - "build": "npm publish --dry-run", - "prepare": "npm run clean && webpack --bail && tsc --build tsconfig.dist.json tsconfig.dist.es5+esm.json && ts-node tools/esmify.ts dist.es5+esm/*.js dist.es5+esm/*/*.js", - "prepublishOnly": "run-p 'test:dist:*' && npm run test:browser", - "clean": "rimraf build dist dist.*", - "test": "mocha 'test/**/*.test.ts'", - "test:purejs": "TEXT_ENCODING=never mocha 'test/**/*.test.ts'", - "test:te": "TEXT_ENCODING=force mocha 'test/**/*.test.ts'", - "test:dist:purejs": "TS_NODE_PROJECT=tsconfig.test-dist-es5-purejs.json npm run test:purejs -- --reporter=dot", - "test:cover": "npm run cover:clean && npm-run-all 'test:cover:*' && npm run cover:report", - "test:cover:purejs": "npx nyc --no-clean npm run test:purejs", - "test:cover:te": "npx nyc --no-clean npm run test:te", - "test:deno": "deno test test/deno_test.ts", - "test:fuzz": "npm exec -- jsfuzz@git+https://gitlab.com/gitlab-org/security-products/analyzers/fuzzers/jsfuzz.git --fuzzTime 60 --no-versifier test/decode.jsfuzz.js corpus", - "cover:clean": "rimraf .nyc_output coverage/", - "cover:report": "npx nyc report --reporter=text-summary --reporter=html --reporter=json", - "test:browser": "karma start --single-run", - "test:browser:firefox": "karma start --single-run --browsers FirefoxHeadless", - "test:browser:chrome": "karma start --single-run --browsers ChromeHeadless", - "test:watch:browser": "karma start --browsers ChromeHeadless,FirefoxHeadless", - "test:watch:nodejs": "mocha -w 'test/**/*.test.ts'", - "lint": "eslint --ext .ts src test", - "lint:fix": "prettier --loglevel=warn --write 'src/**/*.ts' 'test/**/*.ts' && eslint --fix --ext .ts src test", - "lint:print-config": "eslint --print-config .eslintrc.js", - "update-dependencies": "npx rimraf node_modules/ package-lock.json ; npm install ; npm audit fix --force ; git restore package.json ; npm install" - }, - "homepage": "https://msgpack.org/", - "repository": { - "type": "git", - "url": "https://github.com/msgpack/msgpack-javascript.git" - }, - "bugs": { - "url": "https://github.com/msgpack/msgpack-javascript/issues" - }, - "keywords": [ - "msgpack", - "MessagePack", - "serialization", - "universal" - ], - "engines": { - "node": ">= 10" - }, - "devDependencies": { - "@bitjourney/check-es-version-webpack-plugin": "latest", - "@types/lodash": "latest", - "@types/mocha": "latest", - "@types/node": "latest", - "@typescript-eslint/eslint-plugin": "latest", - "@typescript-eslint/parser": "latest", - "assert": "latest", - "blob-polyfill": "latest", - "buffer": "latest", - "core-js": "latest", - "eslint": "latest", - "eslint-config-prettier": "latest", - "eslint-plugin-import": "latest", - "ieee754": "latest", - "karma": "latest", - "karma-chrome-launcher": "latest", - "karma-cli": "latest", - "karma-firefox-launcher": "latest", - "karma-mocha": "latest", - "karma-sourcemap-loader": "latest", - "karma-webpack": "latest", - "lodash": "latest", - "mocha": "latest", - "msgpack-test-js": "latest", - "npm-run-all": "latest", - "prettier": "latest", - "rimraf": "latest", - "ts-loader": "latest", - "ts-node": "latest", - "tsconfig-paths": "latest", - "typescript": "latest", - "web-streams-polyfill": "latest", - "webpack": "latest", - "webpack-cli": "latest" - }, - "files": [ - "mod.ts", - "src/**/*.*", - "dist/**/*.*", - "dist.es5+umd/**/*.*", - "dist.es5+esm/**/*.*" - ] -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/CachedKeyDecoder.ts b/general/nvim/node_modules/@msgpack/msgpack/src/CachedKeyDecoder.ts deleted file mode 100644 index cd21b2d..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/CachedKeyDecoder.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { utf8DecodeJs } from "./utils/utf8"; - -const DEFAULT_MAX_KEY_LENGTH = 16; -const DEFAULT_MAX_LENGTH_PER_KEY = 16; - -export interface KeyDecoder { - canBeCached(byteLength: number): boolean; - decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string; -} -interface KeyCacheRecord { - readonly bytes: Uint8Array; - readonly str: string; -} - -export class CachedKeyDecoder implements KeyDecoder { - hit = 0; - miss = 0; - private readonly caches: Array>; - - constructor(readonly maxKeyLength = DEFAULT_MAX_KEY_LENGTH, readonly maxLengthPerKey = DEFAULT_MAX_LENGTH_PER_KEY) { - // avoid `new Array(N)`, which makes a sparse array, - // because a sparse array is typically slower than a non-sparse array. - this.caches = []; - for (let i = 0; i < this.maxKeyLength; i++) { - this.caches.push([]); - } - } - - public canBeCached(byteLength: number): boolean { - return byteLength > 0 && byteLength <= this.maxKeyLength; - } - - private find(bytes: Uint8Array, inputOffset: number, byteLength: number): string | null { - const records = this.caches[byteLength - 1]!; - - FIND_CHUNK: for (const record of records) { - const recordBytes = record.bytes; - - for (let j = 0; j < byteLength; j++) { - if (recordBytes[j] !== bytes[inputOffset + j]) { - continue FIND_CHUNK; - } - } - return record.str; - } - return null; - } - - private store(bytes: Uint8Array, value: string) { - const records = this.caches[bytes.length - 1]!; - const record: KeyCacheRecord = { bytes, str: value }; - - if (records.length >= this.maxLengthPerKey) { - // `records` are full! - // Set `record` to an arbitrary position. - records[(Math.random() * records.length) | 0] = record; - } else { - records.push(record); - } - } - - public decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string { - const cachedValue = this.find(bytes, inputOffset, byteLength); - if (cachedValue != null) { - this.hit++; - return cachedValue; - } - this.miss++; - - const str = utf8DecodeJs(bytes, inputOffset, byteLength); - // Ensure to copy a slice of bytes because the byte may be NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer. - const slicedCopyOfBytes = Uint8Array.prototype.slice.call(bytes, inputOffset, inputOffset + byteLength); - this.store(slicedCopyOfBytes, str); - return str; - } -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/DecodeError.ts b/general/nvim/node_modules/@msgpack/msgpack/src/DecodeError.ts deleted file mode 100644 index 203fe1b..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/DecodeError.ts +++ /dev/null @@ -1,15 +0,0 @@ -export class DecodeError extends Error { - constructor(message: string) { - super(message); - - // fix the prototype chain in a cross-platform way - const proto: typeof DecodeError.prototype = Object.create(DecodeError.prototype); - Object.setPrototypeOf(this, proto); - - Object.defineProperty(this, "name", { - configurable: true, - enumerable: false, - value: DecodeError.name, - }); - } -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/Decoder.ts b/general/nvim/node_modules/@msgpack/msgpack/src/Decoder.ts deleted file mode 100644 index 4c02be3..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/Decoder.ts +++ /dev/null @@ -1,627 +0,0 @@ -import { prettyByte } from "./utils/prettyByte"; -import { ExtensionCodec, ExtensionCodecType } from "./ExtensionCodec"; -import { getInt64, getUint64, UINT32_MAX } from "./utils/int"; -import { utf8DecodeJs, TEXT_DECODER_THRESHOLD, utf8DecodeTD } from "./utils/utf8"; -import { createDataView, ensureUint8Array } from "./utils/typedArrays"; -import { CachedKeyDecoder, KeyDecoder } from "./CachedKeyDecoder"; -import { DecodeError } from "./DecodeError"; - -const enum State { - ARRAY, - MAP_KEY, - MAP_VALUE, -} - -type MapKeyType = string | number; - -const isValidMapKeyType = (key: unknown): key is MapKeyType => { - const keyType = typeof key; - - return keyType === "string" || keyType === "number"; -}; - -type StackMapState = { - type: State.MAP_KEY | State.MAP_VALUE; - size: number; - key: MapKeyType | null; - readCount: number; - map: Record; -}; - -type StackArrayState = { - type: State.ARRAY; - size: number; - array: Array; - position: number; -}; - -type StackState = StackArrayState | StackMapState; - -const HEAD_BYTE_REQUIRED = -1; - -const EMPTY_VIEW = new DataView(new ArrayBuffer(0)); -const EMPTY_BYTES = new Uint8Array(EMPTY_VIEW.buffer); - -// IE11: Hack to support IE11. -// IE11: Drop this hack and just use RangeError when IE11 is obsolete. -export const DataViewIndexOutOfBoundsError: typeof Error = (() => { - try { - // IE11: The spec says it should throw RangeError, - // IE11: but in IE11 it throws TypeError. - EMPTY_VIEW.getInt8(0); - } catch (e: any) { - return e.constructor; - } - throw new Error("never reached"); -})(); - -const MORE_DATA = new DataViewIndexOutOfBoundsError("Insufficient data"); - -const sharedCachedKeyDecoder = new CachedKeyDecoder(); - -export class Decoder { - private totalPos = 0; - private pos = 0; - - private view = EMPTY_VIEW; - private bytes = EMPTY_BYTES; - private headByte = HEAD_BYTE_REQUIRED; - private readonly stack: Array = []; - - public constructor( - private readonly extensionCodec: ExtensionCodecType = ExtensionCodec.defaultCodec as any, - private readonly context: ContextType = undefined as any, - private readonly maxStrLength = UINT32_MAX, - private readonly maxBinLength = UINT32_MAX, - private readonly maxArrayLength = UINT32_MAX, - private readonly maxMapLength = UINT32_MAX, - private readonly maxExtLength = UINT32_MAX, - private readonly keyDecoder: KeyDecoder | null = sharedCachedKeyDecoder, - ) {} - - private reinitializeState() { - this.totalPos = 0; - this.headByte = HEAD_BYTE_REQUIRED; - this.stack.length = 0; - - // view, bytes, and pos will be re-initialized in setBuffer() - } - - private setBuffer(buffer: ArrayLike | BufferSource): void { - this.bytes = ensureUint8Array(buffer); - this.view = createDataView(this.bytes); - this.pos = 0; - } - - private appendBuffer(buffer: ArrayLike | BufferSource) { - if (this.headByte === HEAD_BYTE_REQUIRED && !this.hasRemaining(1)) { - this.setBuffer(buffer); - } else { - const remainingData = this.bytes.subarray(this.pos); - const newData = ensureUint8Array(buffer); - - // concat remainingData + newData - const newBuffer = new Uint8Array(remainingData.length + newData.length); - newBuffer.set(remainingData); - newBuffer.set(newData, remainingData.length); - this.setBuffer(newBuffer); - } - } - - private hasRemaining(size: number) { - return this.view.byteLength - this.pos >= size; - } - - private createExtraByteError(posToShow: number): Error { - const { view, pos } = this; - return new RangeError(`Extra ${view.byteLength - pos} of ${view.byteLength} byte(s) found at buffer[${posToShow}]`); - } - - /** - * @throws {DecodeError} - * @throws {RangeError} - */ - public decode(buffer: ArrayLike | BufferSource): unknown { - this.reinitializeState(); - this.setBuffer(buffer); - - const object = this.doDecodeSync(); - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.pos); - } - return object; - } - - public *decodeMulti(buffer: ArrayLike | BufferSource): Generator { - this.reinitializeState(); - this.setBuffer(buffer); - - while (this.hasRemaining(1)) { - yield this.doDecodeSync(); - } - } - - public async decodeAsync(stream: AsyncIterable | BufferSource>): Promise { - let decoded = false; - let object: unknown; - for await (const buffer of stream) { - if (decoded) { - throw this.createExtraByteError(this.totalPos); - } - - this.appendBuffer(buffer); - - try { - object = this.doDecodeSync(); - decoded = true; - } catch (e) { - if (!(e instanceof DataViewIndexOutOfBoundsError)) { - throw e; // rethrow - } - // fallthrough - } - this.totalPos += this.pos; - } - - if (decoded) { - if (this.hasRemaining(1)) { - throw this.createExtraByteError(this.totalPos); - } - return object; - } - - const { headByte, pos, totalPos } = this; - throw new RangeError( - `Insufficient data in parsing ${prettyByte(headByte)} at ${totalPos} (${pos} in the current buffer)`, - ); - } - - public decodeArrayStream( - stream: AsyncIterable | BufferSource>, - ): AsyncGenerator { - return this.decodeMultiAsync(stream, true); - } - - public decodeStream(stream: AsyncIterable | BufferSource>): AsyncGenerator { - return this.decodeMultiAsync(stream, false); - } - - private async *decodeMultiAsync(stream: AsyncIterable | BufferSource>, isArray: boolean) { - let isArrayHeaderRequired = isArray; - let arrayItemsLeft = -1; - - for await (const buffer of stream) { - if (isArray && arrayItemsLeft === 0) { - throw this.createExtraByteError(this.totalPos); - } - - this.appendBuffer(buffer); - - if (isArrayHeaderRequired) { - arrayItemsLeft = this.readArraySize(); - isArrayHeaderRequired = false; - this.complete(); - } - - try { - while (true) { - yield this.doDecodeSync(); - if (--arrayItemsLeft === 0) { - break; - } - } - } catch (e) { - if (!(e instanceof DataViewIndexOutOfBoundsError)) { - throw e; // rethrow - } - // fallthrough - } - this.totalPos += this.pos; - } - } - - private doDecodeSync(): unknown { - DECODE: while (true) { - const headByte = this.readHeadByte(); - let object: unknown; - - if (headByte >= 0xe0) { - // negative fixint (111x xxxx) 0xe0 - 0xff - object = headByte - 0x100; - } else if (headByte < 0xc0) { - if (headByte < 0x80) { - // positive fixint (0xxx xxxx) 0x00 - 0x7f - object = headByte; - } else if (headByte < 0x90) { - // fixmap (1000 xxxx) 0x80 - 0x8f - const size = headByte - 0x80; - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } else { - object = {}; - } - } else if (headByte < 0xa0) { - // fixarray (1001 xxxx) 0x90 - 0x9f - const size = headByte - 0x90; - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } else { - object = []; - } - } else { - // fixstr (101x xxxx) 0xa0 - 0xbf - const byteLength = headByte - 0xa0; - object = this.decodeUtf8String(byteLength, 0); - } - } else if (headByte === 0xc0) { - // nil - object = null; - } else if (headByte === 0xc2) { - // false - object = false; - } else if (headByte === 0xc3) { - // true - object = true; - } else if (headByte === 0xca) { - // float 32 - object = this.readF32(); - } else if (headByte === 0xcb) { - // float 64 - object = this.readF64(); - } else if (headByte === 0xcc) { - // uint 8 - object = this.readU8(); - } else if (headByte === 0xcd) { - // uint 16 - object = this.readU16(); - } else if (headByte === 0xce) { - // uint 32 - object = this.readU32(); - } else if (headByte === 0xcf) { - // uint 64 - object = this.readU64(); - } else if (headByte === 0xd0) { - // int 8 - object = this.readI8(); - } else if (headByte === 0xd1) { - // int 16 - object = this.readI16(); - } else if (headByte === 0xd2) { - // int 32 - object = this.readI32(); - } else if (headByte === 0xd3) { - // int 64 - object = this.readI64(); - } else if (headByte === 0xd9) { - // str 8 - const byteLength = this.lookU8(); - object = this.decodeUtf8String(byteLength, 1); - } else if (headByte === 0xda) { - // str 16 - const byteLength = this.lookU16(); - object = this.decodeUtf8String(byteLength, 2); - } else if (headByte === 0xdb) { - // str 32 - const byteLength = this.lookU32(); - object = this.decodeUtf8String(byteLength, 4); - } else if (headByte === 0xdc) { - // array 16 - const size = this.readU16(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } else { - object = []; - } - } else if (headByte === 0xdd) { - // array 32 - const size = this.readU32(); - if (size !== 0) { - this.pushArrayState(size); - this.complete(); - continue DECODE; - } else { - object = []; - } - } else if (headByte === 0xde) { - // map 16 - const size = this.readU16(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } else { - object = {}; - } - } else if (headByte === 0xdf) { - // map 32 - const size = this.readU32(); - if (size !== 0) { - this.pushMapState(size); - this.complete(); - continue DECODE; - } else { - object = {}; - } - } else if (headByte === 0xc4) { - // bin 8 - const size = this.lookU8(); - object = this.decodeBinary(size, 1); - } else if (headByte === 0xc5) { - // bin 16 - const size = this.lookU16(); - object = this.decodeBinary(size, 2); - } else if (headByte === 0xc6) { - // bin 32 - const size = this.lookU32(); - object = this.decodeBinary(size, 4); - } else if (headByte === 0xd4) { - // fixext 1 - object = this.decodeExtension(1, 0); - } else if (headByte === 0xd5) { - // fixext 2 - object = this.decodeExtension(2, 0); - } else if (headByte === 0xd6) { - // fixext 4 - object = this.decodeExtension(4, 0); - } else if (headByte === 0xd7) { - // fixext 8 - object = this.decodeExtension(8, 0); - } else if (headByte === 0xd8) { - // fixext 16 - object = this.decodeExtension(16, 0); - } else if (headByte === 0xc7) { - // ext 8 - const size = this.lookU8(); - object = this.decodeExtension(size, 1); - } else if (headByte === 0xc8) { - // ext 16 - const size = this.lookU16(); - object = this.decodeExtension(size, 2); - } else if (headByte === 0xc9) { - // ext 32 - const size = this.lookU32(); - object = this.decodeExtension(size, 4); - } else { - throw new DecodeError(`Unrecognized type byte: ${prettyByte(headByte)}`); - } - - this.complete(); - - const stack = this.stack; - while (stack.length > 0) { - // arrays and maps - const state = stack[stack.length - 1]!; - if (state.type === State.ARRAY) { - state.array[state.position] = object; - state.position++; - if (state.position === state.size) { - stack.pop(); - object = state.array; - } else { - continue DECODE; - } - } else if (state.type === State.MAP_KEY) { - if (!isValidMapKeyType(object)) { - throw new DecodeError("The type of key must be string or number but " + typeof object); - } - if (object === "__proto__") { - throw new DecodeError("The key __proto__ is not allowed"); - } - - state.key = object; - state.type = State.MAP_VALUE; - continue DECODE; - } else { - // it must be `state.type === State.MAP_VALUE` here - - state.map[state.key!] = object; - state.readCount++; - - if (state.readCount === state.size) { - stack.pop(); - object = state.map; - } else { - state.key = null; - state.type = State.MAP_KEY; - continue DECODE; - } - } - } - - return object; - } - } - - private readHeadByte(): number { - if (this.headByte === HEAD_BYTE_REQUIRED) { - this.headByte = this.readU8(); - // console.log("headByte", prettyByte(this.headByte)); - } - - return this.headByte; - } - - private complete(): void { - this.headByte = HEAD_BYTE_REQUIRED; - } - - private readArraySize(): number { - const headByte = this.readHeadByte(); - - switch (headByte) { - case 0xdc: - return this.readU16(); - case 0xdd: - return this.readU32(); - default: { - if (headByte < 0xa0) { - return headByte - 0x90; - } else { - throw new DecodeError(`Unrecognized array type byte: ${prettyByte(headByte)}`); - } - } - } - } - - private pushMapState(size: number) { - if (size > this.maxMapLength) { - throw new DecodeError(`Max length exceeded: map length (${size}) > maxMapLengthLength (${this.maxMapLength})`); - } - - this.stack.push({ - type: State.MAP_KEY, - size, - key: null, - readCount: 0, - map: {}, - }); - } - - private pushArrayState(size: number) { - if (size > this.maxArrayLength) { - throw new DecodeError(`Max length exceeded: array length (${size}) > maxArrayLength (${this.maxArrayLength})`); - } - - this.stack.push({ - type: State.ARRAY, - size, - array: new Array(size), - position: 0, - }); - } - - private decodeUtf8String(byteLength: number, headerOffset: number): string { - if (byteLength > this.maxStrLength) { - throw new DecodeError( - `Max length exceeded: UTF-8 byte length (${byteLength}) > maxStrLength (${this.maxStrLength})`, - ); - } - - if (this.bytes.byteLength < this.pos + headerOffset + byteLength) { - throw MORE_DATA; - } - - const offset = this.pos + headerOffset; - let object: string; - if (this.stateIsMapKey() && this.keyDecoder?.canBeCached(byteLength)) { - object = this.keyDecoder.decode(this.bytes, offset, byteLength); - } else if (byteLength > TEXT_DECODER_THRESHOLD) { - object = utf8DecodeTD(this.bytes, offset, byteLength); - } else { - object = utf8DecodeJs(this.bytes, offset, byteLength); - } - this.pos += headerOffset + byteLength; - return object; - } - - private stateIsMapKey(): boolean { - if (this.stack.length > 0) { - const state = this.stack[this.stack.length - 1]!; - return state.type === State.MAP_KEY; - } - return false; - } - - private decodeBinary(byteLength: number, headOffset: number): Uint8Array { - if (byteLength > this.maxBinLength) { - throw new DecodeError(`Max length exceeded: bin length (${byteLength}) > maxBinLength (${this.maxBinLength})`); - } - - if (!this.hasRemaining(byteLength + headOffset)) { - throw MORE_DATA; - } - - const offset = this.pos + headOffset; - const object = this.bytes.subarray(offset, offset + byteLength); - this.pos += headOffset + byteLength; - return object; - } - - private decodeExtension(size: number, headOffset: number): unknown { - if (size > this.maxExtLength) { - throw new DecodeError(`Max length exceeded: ext length (${size}) > maxExtLength (${this.maxExtLength})`); - } - - const extType = this.view.getInt8(this.pos + headOffset); - const data = this.decodeBinary(size, headOffset + 1 /* extType */); - return this.extensionCodec.decode(data, extType, this.context); - } - - private lookU8() { - return this.view.getUint8(this.pos); - } - - private lookU16() { - return this.view.getUint16(this.pos); - } - - private lookU32() { - return this.view.getUint32(this.pos); - } - - private readU8(): number { - const value = this.view.getUint8(this.pos); - this.pos++; - return value; - } - - private readI8(): number { - const value = this.view.getInt8(this.pos); - this.pos++; - return value; - } - - private readU16(): number { - const value = this.view.getUint16(this.pos); - this.pos += 2; - return value; - } - - private readI16(): number { - const value = this.view.getInt16(this.pos); - this.pos += 2; - return value; - } - - private readU32(): number { - const value = this.view.getUint32(this.pos); - this.pos += 4; - return value; - } - - private readI32(): number { - const value = this.view.getInt32(this.pos); - this.pos += 4; - return value; - } - - private readU64(): number { - const value = getUint64(this.view, this.pos); - this.pos += 8; - return value; - } - - private readI64(): number { - const value = getInt64(this.view, this.pos); - this.pos += 8; - return value; - } - - private readF32() { - const value = this.view.getFloat32(this.pos); - this.pos += 4; - return value; - } - - private readF64() { - const value = this.view.getFloat64(this.pos); - this.pos += 8; - return value; - } -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/Encoder.ts b/general/nvim/node_modules/@msgpack/msgpack/src/Encoder.ts deleted file mode 100644 index afea365..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/Encoder.ts +++ /dev/null @@ -1,402 +0,0 @@ -import { utf8EncodeJs, utf8Count, TEXT_ENCODER_THRESHOLD, utf8EncodeTE } from "./utils/utf8"; -import { ExtensionCodec, ExtensionCodecType } from "./ExtensionCodec"; -import { setInt64, setUint64 } from "./utils/int"; -import { ensureUint8Array } from "./utils/typedArrays"; -import type { ExtData } from "./ExtData"; - -export const DEFAULT_MAX_DEPTH = 100; -export const DEFAULT_INITIAL_BUFFER_SIZE = 2048; - -export class Encoder { - private pos = 0; - private view = new DataView(new ArrayBuffer(this.initialBufferSize)); - private bytes = new Uint8Array(this.view.buffer); - - public constructor( - private readonly extensionCodec: ExtensionCodecType = ExtensionCodec.defaultCodec as any, - private readonly context: ContextType = undefined as any, - private readonly maxDepth = DEFAULT_MAX_DEPTH, - private readonly initialBufferSize = DEFAULT_INITIAL_BUFFER_SIZE, - private readonly sortKeys = false, - private readonly forceFloat32 = false, - private readonly ignoreUndefined = false, - private readonly forceIntegerToFloat = false, - ) {} - - private getUint8Array(): Uint8Array { - return this.bytes.subarray(0, this.pos); - } - - private reinitializeState() { - this.pos = 0; - } - - public encode(object: unknown): Uint8Array { - this.reinitializeState(); - this.doEncode(object, 1); - return this.getUint8Array(); - } - - private doEncode(object: unknown, depth: number): void { - if (depth > this.maxDepth) { - throw new Error(`Too deep objects in depth ${depth}`); - } - - if (object == null) { - this.encodeNil(); - } else if (typeof object === "boolean") { - this.encodeBoolean(object); - } else if (typeof object === "number") { - this.encodeNumber(object); - } else if (typeof object === "string") { - this.encodeString(object); - } else { - this.encodeObject(object, depth); - } - } - - private ensureBufferSizeToWrite(sizeToWrite: number) { - const requiredSize = this.pos + sizeToWrite; - - if (this.view.byteLength < requiredSize) { - this.resizeBuffer(requiredSize * 2); - } - } - - private resizeBuffer(newSize: number) { - const newBuffer = new ArrayBuffer(newSize); - const newBytes = new Uint8Array(newBuffer); - const newView = new DataView(newBuffer); - - newBytes.set(this.bytes); - - this.view = newView; - this.bytes = newBytes; - } - - private encodeNil() { - this.writeU8(0xc0); - } - - private encodeBoolean(object: boolean) { - if (object === false) { - this.writeU8(0xc2); - } else { - this.writeU8(0xc3); - } - } - private encodeNumber(object: number) { - if (Number.isSafeInteger(object) && !this.forceIntegerToFloat) { - if (object >= 0) { - if (object < 0x80) { - // positive fixint - this.writeU8(object); - } else if (object < 0x100) { - // uint 8 - this.writeU8(0xcc); - this.writeU8(object); - } else if (object < 0x10000) { - // uint 16 - this.writeU8(0xcd); - this.writeU16(object); - } else if (object < 0x100000000) { - // uint 32 - this.writeU8(0xce); - this.writeU32(object); - } else { - // uint 64 - this.writeU8(0xcf); - this.writeU64(object); - } - } else { - if (object >= -0x20) { - // negative fixint - this.writeU8(0xe0 | (object + 0x20)); - } else if (object >= -0x80) { - // int 8 - this.writeU8(0xd0); - this.writeI8(object); - } else if (object >= -0x8000) { - // int 16 - this.writeU8(0xd1); - this.writeI16(object); - } else if (object >= -0x80000000) { - // int 32 - this.writeU8(0xd2); - this.writeI32(object); - } else { - // int 64 - this.writeU8(0xd3); - this.writeI64(object); - } - } - } else { - // non-integer numbers - if (this.forceFloat32) { - // float 32 - this.writeU8(0xca); - this.writeF32(object); - } else { - // float 64 - this.writeU8(0xcb); - this.writeF64(object); - } - } - } - - private writeStringHeader(byteLength: number) { - if (byteLength < 32) { - // fixstr - this.writeU8(0xa0 + byteLength); - } else if (byteLength < 0x100) { - // str 8 - this.writeU8(0xd9); - this.writeU8(byteLength); - } else if (byteLength < 0x10000) { - // str 16 - this.writeU8(0xda); - this.writeU16(byteLength); - } else if (byteLength < 0x100000000) { - // str 32 - this.writeU8(0xdb); - this.writeU32(byteLength); - } else { - throw new Error(`Too long string: ${byteLength} bytes in UTF-8`); - } - } - - private encodeString(object: string) { - const maxHeaderSize = 1 + 4; - const strLength = object.length; - - if (strLength > TEXT_ENCODER_THRESHOLD) { - const byteLength = utf8Count(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - utf8EncodeTE(object, this.bytes, this.pos); - this.pos += byteLength; - } else { - const byteLength = utf8Count(object); - this.ensureBufferSizeToWrite(maxHeaderSize + byteLength); - this.writeStringHeader(byteLength); - utf8EncodeJs(object, this.bytes, this.pos); - this.pos += byteLength; - } - } - - private encodeObject(object: unknown, depth: number) { - // try to encode objects with custom codec first of non-primitives - const ext = this.extensionCodec.tryToEncode(object, this.context); - if (ext != null) { - this.encodeExtension(ext); - } else if (Array.isArray(object)) { - this.encodeArray(object, depth); - } else if (ArrayBuffer.isView(object)) { - this.encodeBinary(object); - } else if (typeof object === "object") { - this.encodeMap(object as Record, depth); - } else { - // symbol, function and other special object come here unless extensionCodec handles them. - throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object)}`); - } - } - - private encodeBinary(object: ArrayBufferView) { - const size = object.byteLength; - if (size < 0x100) { - // bin 8 - this.writeU8(0xc4); - this.writeU8(size); - } else if (size < 0x10000) { - // bin 16 - this.writeU8(0xc5); - this.writeU16(size); - } else if (size < 0x100000000) { - // bin 32 - this.writeU8(0xc6); - this.writeU32(size); - } else { - throw new Error(`Too large binary: ${size}`); - } - const bytes = ensureUint8Array(object); - this.writeU8a(bytes); - } - - private encodeArray(object: Array, depth: number) { - const size = object.length; - if (size < 16) { - // fixarray - this.writeU8(0x90 + size); - } else if (size < 0x10000) { - // array 16 - this.writeU8(0xdc); - this.writeU16(size); - } else if (size < 0x100000000) { - // array 32 - this.writeU8(0xdd); - this.writeU32(size); - } else { - throw new Error(`Too large array: ${size}`); - } - for (const item of object) { - this.doEncode(item, depth + 1); - } - } - - private countWithoutUndefined(object: Record, keys: ReadonlyArray): number { - let count = 0; - - for (const key of keys) { - if (object[key] !== undefined) { - count++; - } - } - - return count; - } - - private encodeMap(object: Record, depth: number) { - const keys = Object.keys(object); - if (this.sortKeys) { - keys.sort(); - } - - const size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length; - - if (size < 16) { - // fixmap - this.writeU8(0x80 + size); - } else if (size < 0x10000) { - // map 16 - this.writeU8(0xde); - this.writeU16(size); - } else if (size < 0x100000000) { - // map 32 - this.writeU8(0xdf); - this.writeU32(size); - } else { - throw new Error(`Too large map object: ${size}`); - } - - for (const key of keys) { - const value = object[key]; - - if (!(this.ignoreUndefined && value === undefined)) { - this.encodeString(key); - this.doEncode(value, depth + 1); - } - } - } - - private encodeExtension(ext: ExtData) { - const size = ext.data.length; - if (size === 1) { - // fixext 1 - this.writeU8(0xd4); - } else if (size === 2) { - // fixext 2 - this.writeU8(0xd5); - } else if (size === 4) { - // fixext 4 - this.writeU8(0xd6); - } else if (size === 8) { - // fixext 8 - this.writeU8(0xd7); - } else if (size === 16) { - // fixext 16 - this.writeU8(0xd8); - } else if (size < 0x100) { - // ext 8 - this.writeU8(0xc7); - this.writeU8(size); - } else if (size < 0x10000) { - // ext 16 - this.writeU8(0xc8); - this.writeU16(size); - } else if (size < 0x100000000) { - // ext 32 - this.writeU8(0xc9); - this.writeU32(size); - } else { - throw new Error(`Too large extension object: ${size}`); - } - this.writeI8(ext.type); - this.writeU8a(ext.data); - } - - private writeU8(value: number) { - this.ensureBufferSizeToWrite(1); - - this.view.setUint8(this.pos, value); - this.pos++; - } - - private writeU8a(values: ArrayLike) { - const size = values.length; - this.ensureBufferSizeToWrite(size); - - this.bytes.set(values, this.pos); - this.pos += size; - } - - private writeI8(value: number) { - this.ensureBufferSizeToWrite(1); - - this.view.setInt8(this.pos, value); - this.pos++; - } - - private writeU16(value: number) { - this.ensureBufferSizeToWrite(2); - - this.view.setUint16(this.pos, value); - this.pos += 2; - } - - private writeI16(value: number) { - this.ensureBufferSizeToWrite(2); - - this.view.setInt16(this.pos, value); - this.pos += 2; - } - - private writeU32(value: number) { - this.ensureBufferSizeToWrite(4); - - this.view.setUint32(this.pos, value); - this.pos += 4; - } - - private writeI32(value: number) { - this.ensureBufferSizeToWrite(4); - - this.view.setInt32(this.pos, value); - this.pos += 4; - } - - private writeF32(value: number) { - this.ensureBufferSizeToWrite(4); - this.view.setFloat32(this.pos, value); - this.pos += 4; - } - - private writeF64(value: number) { - this.ensureBufferSizeToWrite(8); - this.view.setFloat64(this.pos, value); - this.pos += 8; - } - - private writeU64(value: number) { - this.ensureBufferSizeToWrite(8); - - setUint64(this.view, this.pos, value); - this.pos += 8; - } - - private writeI64(value: number) { - this.ensureBufferSizeToWrite(8); - - setInt64(this.view, this.pos, value); - this.pos += 8; - } -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/ExtData.ts b/general/nvim/node_modules/@msgpack/msgpack/src/ExtData.ts deleted file mode 100644 index f69060e..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/ExtData.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * ExtData is used to handle Extension Types that are not registered to ExtensionCodec. - */ -export class ExtData { - constructor(readonly type: number, readonly data: Uint8Array) {} -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/ExtensionCodec.ts b/general/nvim/node_modules/@msgpack/msgpack/src/ExtensionCodec.ts deleted file mode 100644 index d38705e..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/ExtensionCodec.ts +++ /dev/null @@ -1,104 +0,0 @@ -// ExtensionCodec to handle MessagePack extensions - -import { ExtData } from "./ExtData"; -import { timestampExtension } from "./timestamp"; - -export type ExtensionDecoderType = ( - data: Uint8Array, - extensionType: number, - context: ContextType, -) => unknown; - -export type ExtensionEncoderType = (input: unknown, context: ContextType) => Uint8Array | null; - -// immutable interfce to ExtensionCodec -export type ExtensionCodecType = { - // eslint-disable-next-line @typescript-eslint/naming-convention - __brand?: ContextType; - tryToEncode(object: unknown, context: ContextType): ExtData | null; - decode(data: Uint8Array, extType: number, context: ContextType): unknown; -}; - -export class ExtensionCodec implements ExtensionCodecType { - public static readonly defaultCodec: ExtensionCodecType = new ExtensionCodec(); - - // ensures ExtensionCodecType matches ExtensionCodec - // this will make type errors a lot more clear - // eslint-disable-next-line @typescript-eslint/naming-convention - __brand?: ContextType; - - // built-in extensions - private readonly builtInEncoders: Array | undefined | null> = []; - private readonly builtInDecoders: Array | undefined | null> = []; - - // custom extensions - private readonly encoders: Array | undefined | null> = []; - private readonly decoders: Array | undefined | null> = []; - - public constructor() { - this.register(timestampExtension); - } - - public register({ - type, - encode, - decode, - }: { - type: number; - encode: ExtensionEncoderType; - decode: ExtensionDecoderType; - }): void { - if (type >= 0) { - // custom extensions - this.encoders[type] = encode; - this.decoders[type] = decode; - } else { - // built-in extensions - const index = 1 + type; - this.builtInEncoders[index] = encode; - this.builtInDecoders[index] = decode; - } - } - - public tryToEncode(object: unknown, context: ContextType): ExtData | null { - // built-in extensions - for (let i = 0; i < this.builtInEncoders.length; i++) { - const encodeExt = this.builtInEncoders[i]; - if (encodeExt != null) { - const data = encodeExt(object, context); - if (data != null) { - const type = -1 - i; - return new ExtData(type, data); - } - } - } - - // custom extensions - for (let i = 0; i < this.encoders.length; i++) { - const encodeExt = this.encoders[i]; - if (encodeExt != null) { - const data = encodeExt(object, context); - if (data != null) { - const type = i; - return new ExtData(type, data); - } - } - } - - if (object instanceof ExtData) { - // to keep ExtData as is - return object; - } - return null; - } - - public decode(data: Uint8Array, type: number, context: ContextType): unknown { - const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type]; - if (decodeExt) { - return decodeExt(data, type, context); - } else { - // decode() does not fail, returns ExtData instead. - return new ExtData(type, data); - } - } -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/context.ts b/general/nvim/node_modules/@msgpack/msgpack/src/context.ts deleted file mode 100644 index 68c4c96..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/context.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ - -export type SplitTypes = U extends T ? (Exclude extends never ? T : Exclude) : T; - -export type SplitUndefined = SplitTypes; - -export type ContextOf = ContextType extends undefined - ? {} - : { - /** - * Custom user-defined data, read/writable - */ - context: ContextType; - }; diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/decode.ts b/general/nvim/node_modules/@msgpack/msgpack/src/decode.ts deleted file mode 100644 index 267b7d9..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/decode.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Decoder } from "./Decoder"; -import type { ExtensionCodecType } from "./ExtensionCodec"; -import type { ContextOf, SplitUndefined } from "./context"; - -export type DecodeOptions = Readonly< - Partial<{ - extensionCodec: ExtensionCodecType; - - /** - * Maximum string length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxStrLength: number; - /** - * Maximum binary length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxBinLength: number; - /** - * Maximum array length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxArrayLength: number; - /** - * Maximum map length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxMapLength: number; - /** - * Maximum extension length. - * - * Defaults to 4_294_967_295 (UINT32_MAX). - */ - maxExtLength: number; - }> -> & - ContextOf; - -export const defaultDecodeOptions: DecodeOptions = {}; - -/** - * It decodes a single MessagePack object in a buffer. - * - * This is a synchronous decoding function. - * See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}. - */ -export function decode( - buffer: ArrayLike | BufferSource, - options: DecodeOptions> = defaultDecodeOptions as any, -): unknown { - const decoder = new Decoder( - options.extensionCodec, - (options as typeof options & { context: any }).context, - options.maxStrLength, - options.maxBinLength, - options.maxArrayLength, - options.maxMapLength, - options.maxExtLength, - ); - return decoder.decode(buffer); -} - -/** - * It decodes multiple MessagePack objects in a buffer. - * This is corresponding to {@link decodeMultiStream()}. - */ -export function decodeMulti( - buffer: ArrayLike | BufferSource, - options: DecodeOptions> = defaultDecodeOptions as any, -): Generator { - const decoder = new Decoder( - options.extensionCodec, - (options as typeof options & { context: any }).context, - options.maxStrLength, - options.maxBinLength, - options.maxArrayLength, - options.maxMapLength, - options.maxExtLength, - ); - return decoder.decodeMulti(buffer); -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/decodeAsync.ts b/general/nvim/node_modules/@msgpack/msgpack/src/decodeAsync.ts deleted file mode 100644 index 7637736..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/decodeAsync.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Decoder } from "./Decoder"; -import { ensureAsyncIterable } from "./utils/stream"; -import { defaultDecodeOptions } from "./decode"; -import type { ReadableStreamLike } from "./utils/stream"; -import type { DecodeOptions } from "./decode"; -import type { SplitUndefined } from "./context"; - -export async function decodeAsync( - streamLike: ReadableStreamLike | BufferSource>, - options: DecodeOptions> = defaultDecodeOptions as any, -): Promise { - const stream = ensureAsyncIterable(streamLike); - - const decoder = new Decoder( - options.extensionCodec, - (options as typeof options & { context: any }).context, - options.maxStrLength, - options.maxBinLength, - options.maxArrayLength, - options.maxMapLength, - options.maxExtLength, - ); - return decoder.decodeAsync(stream); -} - -export function decodeArrayStream( - streamLike: ReadableStreamLike | BufferSource>, - options: DecodeOptions> = defaultDecodeOptions as any, -): AsyncGenerator { - const stream = ensureAsyncIterable(streamLike); - - const decoder = new Decoder( - options.extensionCodec, - (options as typeof options & { context: any }).context, - options.maxStrLength, - options.maxBinLength, - options.maxArrayLength, - options.maxMapLength, - options.maxExtLength, - ); - - return decoder.decodeArrayStream(stream); -} - -export function decodeMultiStream( - streamLike: ReadableStreamLike | BufferSource>, - options: DecodeOptions> = defaultDecodeOptions as any, -): AsyncGenerator { - const stream = ensureAsyncIterable(streamLike); - - const decoder = new Decoder( - options.extensionCodec, - (options as typeof options & { context: any }).context, - options.maxStrLength, - options.maxBinLength, - options.maxArrayLength, - options.maxMapLength, - options.maxExtLength, - ); - - return decoder.decodeStream(stream); -} - -/** - * @deprecated Use {@link decodeMultiStream()} instead. - */ -export function decodeStream( - streamLike: ReadableStreamLike | BufferSource>, - options: DecodeOptions> = defaultDecodeOptions as any, -): AsyncGenerator { - return decodeMultiStream(streamLike, options); -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/encode.ts b/general/nvim/node_modules/@msgpack/msgpack/src/encode.ts deleted file mode 100644 index 07d59ad..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/encode.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Encoder } from "./Encoder"; -import type { ExtensionCodecType } from "./ExtensionCodec"; -import type { ContextOf, SplitUndefined } from "./context"; - -export type EncodeOptions = Partial< - Readonly<{ - extensionCodec: ExtensionCodecType; - - /** - * The maximum depth in nested objects and arrays. - * - * Defaults to 100. - */ - maxDepth: number; - - /** - * The initial size of the internal buffer. - * - * Defaults to 2048. - */ - initialBufferSize: number; - - /** - * If `true`, the keys of an object is sorted. In other words, the encoded - * binary is canonical and thus comparable to another encoded binary. - * - * Defaults to `false`. If enabled, it spends more time in encoding objects. - */ - sortKeys: boolean; - /** - * If `true`, non-integer numbers are encoded in float32, not in float64 (the default). - * - * Only use it if precisions don't matter. - * - * Defaults to `false`. - */ - forceFloat32: boolean; - - /** - * If `true`, an object property with `undefined` value are ignored. - * e.g. `{ foo: undefined }` will be encoded as `{}`, as `JSON.stringify()` does. - * - * Defaults to `false`. If enabled, it spends more time in encoding objects. - */ - ignoreUndefined: boolean; - - /** - * If `true`, integer numbers are encoded as floating point numbers, - * with the `forceFloat32` option taken into account. - * - * Defaults to `false`. - */ - forceIntegerToFloat: boolean; - }> -> & - ContextOf; - -const defaultEncodeOptions: EncodeOptions = {}; - -/** - * It encodes `value` in the MessagePack format and - * returns a byte buffer. - * - * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`. - */ -export function encode( - value: unknown, - options: EncodeOptions> = defaultEncodeOptions as any, -): Uint8Array { - const encoder = new Encoder( - options.extensionCodec, - (options as typeof options & { context: any }).context, - options.maxDepth, - options.initialBufferSize, - options.sortKeys, - options.forceFloat32, - options.ignoreUndefined, - options.forceIntegerToFloat, - ); - return encoder.encode(value); -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/index.ts b/general/nvim/node_modules/@msgpack/msgpack/src/index.ts deleted file mode 100644 index 28560f1..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Main Functions: - -import { encode } from "./encode"; -export { encode }; -import type { EncodeOptions } from "./encode"; -export type { EncodeOptions }; - -import { decode, decodeMulti } from "./decode"; -export { decode, decodeMulti }; -import type { DecodeOptions } from "./decode"; -export { DecodeOptions }; - -import { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream } from "./decodeAsync"; -export { decodeAsync, decodeArrayStream, decodeMultiStream, decodeStream }; - -import { Decoder, DataViewIndexOutOfBoundsError } from "./Decoder"; -import { DecodeError } from "./DecodeError"; -export { Decoder, DecodeError, DataViewIndexOutOfBoundsError }; - -import { Encoder } from "./Encoder"; -export { Encoder }; - -// Utilitiies for Extension Types: - -import { ExtensionCodec } from "./ExtensionCodec"; -export { ExtensionCodec }; -import type { ExtensionCodecType, ExtensionDecoderType, ExtensionEncoderType } from "./ExtensionCodec"; -export type { ExtensionCodecType, ExtensionDecoderType, ExtensionEncoderType }; -import { ExtData } from "./ExtData"; -export { ExtData }; - -import { - EXT_TIMESTAMP, - encodeDateToTimeSpec, - encodeTimeSpecToTimestamp, - decodeTimestampToTimeSpec, - encodeTimestampExtension, - decodeTimestampExtension, -} from "./timestamp"; -export { - EXT_TIMESTAMP, - encodeDateToTimeSpec, - encodeTimeSpecToTimestamp, - decodeTimestampToTimeSpec, - encodeTimestampExtension, - decodeTimestampExtension, -}; diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/timestamp.ts b/general/nvim/node_modules/@msgpack/msgpack/src/timestamp.ts deleted file mode 100644 index e3fe015..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/timestamp.ts +++ /dev/null @@ -1,108 +0,0 @@ -// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type -import { DecodeError } from "./DecodeError"; -import { getInt64, setInt64 } from "./utils/int"; - -export const EXT_TIMESTAMP = -1; - -export type TimeSpec = { - sec: number; - nsec: number; -}; - -const TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int -const TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int - -export function encodeTimeSpecToTimestamp({ sec, nsec }: TimeSpec): Uint8Array { - if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) { - // Here sec >= 0 && nsec >= 0 - if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) { - // timestamp 32 = { sec32 (unsigned) } - const rv = new Uint8Array(4); - const view = new DataView(rv.buffer); - view.setUint32(0, sec); - return rv; - } else { - // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) } - const secHigh = sec / 0x100000000; - const secLow = sec & 0xffffffff; - const rv = new Uint8Array(8); - const view = new DataView(rv.buffer); - // nsec30 | secHigh2 - view.setUint32(0, (nsec << 2) | (secHigh & 0x3)); - // secLow32 - view.setUint32(4, secLow); - return rv; - } - } else { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - const rv = new Uint8Array(12); - const view = new DataView(rv.buffer); - view.setUint32(0, nsec); - setInt64(view, 4, sec); - return rv; - } -} - -export function encodeDateToTimeSpec(date: Date): TimeSpec { - const msec = date.getTime(); - const sec = Math.floor(msec / 1e3); - const nsec = (msec - sec * 1e3) * 1e6; - - // Normalizes { sec, nsec } to ensure nsec is unsigned. - const nsecInSec = Math.floor(nsec / 1e9); - return { - sec: sec + nsecInSec, - nsec: nsec - nsecInSec * 1e9, - }; -} - -export function encodeTimestampExtension(object: unknown): Uint8Array | null { - if (object instanceof Date) { - const timeSpec = encodeDateToTimeSpec(object); - return encodeTimeSpecToTimestamp(timeSpec); - } else { - return null; - } -} - -export function decodeTimestampToTimeSpec(data: Uint8Array): TimeSpec { - const view = new DataView(data.buffer, data.byteOffset, data.byteLength); - - // data may be 32, 64, or 96 bits - switch (data.byteLength) { - case 4: { - // timestamp 32 = { sec32 } - const sec = view.getUint32(0); - const nsec = 0; - return { sec, nsec }; - } - case 8: { - // timestamp 64 = { nsec30, sec34 } - const nsec30AndSecHigh2 = view.getUint32(0); - const secLow32 = view.getUint32(4); - const sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32; - const nsec = nsec30AndSecHigh2 >>> 2; - return { sec, nsec }; - } - case 12: { - // timestamp 96 = { nsec32 (unsigned), sec64 (signed) } - - const sec = getInt64(view, 4); - const nsec = view.getUint32(0); - return { sec, nsec }; - } - default: - throw new DecodeError(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`); - } -} - -export function decodeTimestampExtension(data: Uint8Array): Date { - const timeSpec = decodeTimestampToTimeSpec(data); - return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6); -} - -export const timestampExtension = { - type: EXT_TIMESTAMP, - encode: encodeTimestampExtension, - decode: decodeTimestampExtension, -}; diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/utils/int.ts b/general/nvim/node_modules/@msgpack/msgpack/src/utils/int.ts deleted file mode 100644 index 7fa93fb..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/utils/int.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Integer Utility - -export const UINT32_MAX = 0xffff_ffff; - -// DataView extension to handle int64 / uint64, -// where the actual range is 53-bits integer (a.k.a. safe integer) - -export function setUint64(view: DataView, offset: number, value: number): void { - const high = value / 0x1_0000_0000; - const low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} - -export function setInt64(view: DataView, offset: number, value: number): void { - const high = Math.floor(value / 0x1_0000_0000); - const low = value; // high bits are truncated by DataView - view.setUint32(offset, high); - view.setUint32(offset + 4, low); -} - -export function getInt64(view: DataView, offset: number): number { - const high = view.getInt32(offset); - const low = view.getUint32(offset + 4); - return high * 0x1_0000_0000 + low; -} - -export function getUint64(view: DataView, offset: number): number { - const high = view.getUint32(offset); - const low = view.getUint32(offset + 4); - return high * 0x1_0000_0000 + low; -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/utils/prettyByte.ts b/general/nvim/node_modules/@msgpack/msgpack/src/utils/prettyByte.ts deleted file mode 100644 index c598138..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/utils/prettyByte.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function prettyByte(byte: number): string { - return `${byte < 0 ? "-" : ""}0x${Math.abs(byte).toString(16).padStart(2, "0")}`; -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/utils/stream.ts b/general/nvim/node_modules/@msgpack/msgpack/src/utils/stream.ts deleted file mode 100644 index b7549e1..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/utils/stream.ts +++ /dev/null @@ -1,42 +0,0 @@ -// utility for whatwg streams - -// The living standard of whatwg streams says -// ReadableStream is also AsyncIterable, but -// as of June 2019, no browser implements it. -// See https://streams.spec.whatwg.org/ for details -export type ReadableStreamLike = AsyncIterable | ReadableStream; - -export function isAsyncIterable(object: ReadableStreamLike): object is AsyncIterable { - return (object as any)[Symbol.asyncIterator] != null; -} - -function assertNonNull(value: T | null | undefined): asserts value is T { - if (value == null) { - throw new Error("Assertion Failure: value must not be null nor undefined"); - } -} - -export async function* asyncIterableFromStream(stream: ReadableStream): AsyncIterable { - const reader = stream.getReader(); - - try { - while (true) { - const { done, value } = await reader.read(); - if (done) { - return; - } - assertNonNull(value); - yield value; - } - } finally { - reader.releaseLock(); - } -} - -export function ensureAsyncIterable(streamLike: ReadableStreamLike): AsyncIterable { - if (isAsyncIterable(streamLike)) { - return streamLike; - } else { - return asyncIterableFromStream(streamLike); - } -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/utils/typedArrays.ts b/general/nvim/node_modules/@msgpack/msgpack/src/utils/typedArrays.ts deleted file mode 100644 index 6e04c21..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/utils/typedArrays.ts +++ /dev/null @@ -1,21 +0,0 @@ -export function ensureUint8Array(buffer: ArrayLike | Uint8Array | ArrayBufferView | ArrayBuffer): Uint8Array { - if (buffer instanceof Uint8Array) { - return buffer; - } else if (ArrayBuffer.isView(buffer)) { - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - } else if (buffer instanceof ArrayBuffer) { - return new Uint8Array(buffer); - } else { - // ArrayLike - return Uint8Array.from(buffer); - } -} - -export function createDataView(buffer: ArrayLike | ArrayBufferView | ArrayBuffer): DataView { - if (buffer instanceof ArrayBuffer) { - return new DataView(buffer); - } - - const bufferView = ensureUint8Array(buffer); - return new DataView(bufferView.buffer, bufferView.byteOffset, bufferView.byteLength); -} diff --git a/general/nvim/node_modules/@msgpack/msgpack/src/utils/utf8.ts b/general/nvim/node_modules/@msgpack/msgpack/src/utils/utf8.ts deleted file mode 100644 index 4d08690..0000000 --- a/general/nvim/node_modules/@msgpack/msgpack/src/utils/utf8.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ -import { UINT32_MAX } from "./int"; - -const TEXT_ENCODING_AVAILABLE = - (typeof process === "undefined" || process?.env?.["TEXT_ENCODING"] !== "never") && - typeof TextEncoder !== "undefined" && - typeof TextDecoder !== "undefined"; - -export function utf8Count(str: string): number { - const strLength = str.length; - - let byteLength = 0; - let pos = 0; - while (pos < strLength) { - let value = str.charCodeAt(pos++); - - if ((value & 0xffffff80) === 0) { - // 1-byte - byteLength++; - continue; - } else if ((value & 0xfffff800) === 0) { - // 2-bytes - byteLength += 2; - } else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - const extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - - if ((value & 0xffff0000) === 0) { - // 3-byte - byteLength += 3; - } else { - // 4-byte - byteLength += 4; - } - } - } - return byteLength; -} - -export function utf8EncodeJs(str: string, output: Uint8Array, outputOffset: number): void { - const strLength = str.length; - let offset = outputOffset; - let pos = 0; - while (pos < strLength) { - let value = str.charCodeAt(pos++); - - if ((value & 0xffffff80) === 0) { - // 1-byte - output[offset++] = value; - continue; - } else if ((value & 0xfffff800) === 0) { - // 2-bytes - output[offset++] = ((value >> 6) & 0x1f) | 0xc0; - } else { - // handle surrogate pair - if (value >= 0xd800 && value <= 0xdbff) { - // high surrogate - if (pos < strLength) { - const extra = str.charCodeAt(pos); - if ((extra & 0xfc00) === 0xdc00) { - ++pos; - value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - } - } - } - - if ((value & 0xffff0000) === 0) { - // 3-byte - output[offset++] = ((value >> 12) & 0x0f) | 0xe0; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } else { - // 4-byte - output[offset++] = ((value >> 18) & 0x07) | 0xf0; - output[offset++] = ((value >> 12) & 0x3f) | 0x80; - output[offset++] = ((value >> 6) & 0x3f) | 0x80; - } - } - - output[offset++] = (value & 0x3f) | 0x80; - } -} - -const sharedTextEncoder = TEXT_ENCODING_AVAILABLE ? new TextEncoder() : undefined; -export const TEXT_ENCODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? UINT32_MAX - : typeof process !== "undefined" && process?.env?.["TEXT_ENCODING"] !== "force" - ? 200 - : 0; - -function utf8EncodeTEencode(str: string, output: Uint8Array, outputOffset: number): void { - output.set(sharedTextEncoder!.encode(str), outputOffset); -} - -function utf8EncodeTEencodeInto(str: string, output: Uint8Array, outputOffset: number): void { - sharedTextEncoder!.encodeInto(str, output.subarray(outputOffset)); -} - -export const utf8EncodeTE = sharedTextEncoder?.encodeInto ? utf8EncodeTEencodeInto : utf8EncodeTEencode; - -const CHUNK_SIZE = 0x1_000; - -export function utf8DecodeJs(bytes: Uint8Array, inputOffset: number, byteLength: number): string { - let offset = inputOffset; - const end = offset + byteLength; - - const units: Array = []; - let result = ""; - while (offset < end) { - const byte1 = bytes[offset++]!; - if ((byte1 & 0x80) === 0) { - // 1 byte - units.push(byte1); - } else if ((byte1 & 0xe0) === 0xc0) { - // 2 bytes - const byte2 = bytes[offset++]! & 0x3f; - units.push(((byte1 & 0x1f) << 6) | byte2); - } else if ((byte1 & 0xf0) === 0xe0) { - // 3 bytes - const byte2 = bytes[offset++]! & 0x3f; - const byte3 = bytes[offset++]! & 0x3f; - units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3); - } else if ((byte1 & 0xf8) === 0xf0) { - // 4 bytes - const byte2 = bytes[offset++]! & 0x3f; - const byte3 = bytes[offset++]! & 0x3f; - const byte4 = bytes[offset++]! & 0x3f; - let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - if (unit > 0xffff) { - unit -= 0x10000; - units.push(((unit >>> 10) & 0x3ff) | 0xd800); - unit = 0xdc00 | (unit & 0x3ff); - } - units.push(unit); - } else { - units.push(byte1); - } - - if (units.length >= CHUNK_SIZE) { - result += String.fromCharCode(...units); - units.length = 0; - } - } - - if (units.length > 0) { - result += String.fromCharCode(...units); - } - - return result; -} - -const sharedTextDecoder = TEXT_ENCODING_AVAILABLE ? new TextDecoder() : null; -export const TEXT_DECODER_THRESHOLD = !TEXT_ENCODING_AVAILABLE - ? UINT32_MAX - : typeof process !== "undefined" && process?.env?.["TEXT_DECODER"] !== "force" - ? 200 - : 0; - -export function utf8DecodeTD(bytes: Uint8Array, inputOffset: number, byteLength: number): string { - const stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength); - return sharedTextDecoder!.decode(stringBytes); -} diff --git a/general/nvim/node_modules/async/CHANGELOG.md b/general/nvim/node_modules/async/CHANGELOG.md deleted file mode 100644 index 133d05c..0000000 --- a/general/nvim/node_modules/async/CHANGELOG.md +++ /dev/null @@ -1,344 +0,0 @@ -# v3.2.3 -- Fix bugs in comment parsing in `autoInject`. (#1767, #1780) - -# v3.2.2 -- Fix potential prototype pollution exploit - -# v3.2.1 -- Use `queueMicrotask` if available to the environment (#1761) -- Minor perf improvement in `priorityQueue` (#1727) -- More examples in documentation (#1726) -- Various doc fixes (#1708, #1712, #1717, #1740, #1739, #1749, #1756) -- Improved test coverage (#1754) - -# v3.2.0 -- Fix a bug in Safari related to overwriting `func.name` -- Remove built-in browserify configuration (#1653) -- Varios doc fixes (#1688, #1703, #1704) - -# v3.1.1 -- Allow redefining `name` property on wrapped functions. - -# v3.1.0 - -- Added `q.pushAsync` and `q.unshiftAsync`, analagous to `q.push` and `q.unshift`, except they always do not accept a callback, and reject if processing the task errors. (#1659) -- Promises returned from `q.push` and `q.unshift` when a callback is not passed now resolve even if an error ocurred. (#1659) -- Fixed a parsing bug in `autoInject` with complicated function bodies (#1663) -- Added ES6+ configuration for Browserify bundlers (#1653) -- Various doc fixes (#1664, #1658, #1665, #1652) - -# v3.0.1 - -## Bug fixes -- Fixed a regression where arrays passed to `queue` and `cargo` would be completely flattened. (#1645) -- Clarified Async's browser support (#1643) - - -# v3.0.0 - -The `async`/`await` release! - -There are a lot of new features and subtle breaking changes in this major version, but the biggest feature is that most Async methods return a Promise if you omit the callback, meaning you can `await` them from within an `async` function. - -```js -const results = await async.mapLimit(urls, 5, async url => { - const resp = await fetch(url) - return resp.body -}) -``` - -## Breaking Changes -- Most Async methods return a Promise when the final callback is omitted, making them `await`-able! (#1572) -- We are now making heavy use of ES2015 features, this means we have dropped out-of-the-box support for Node 4 and earlier, and many old versions of browsers. (#1541, #1553) -- In `queue`, `priorityQueue`, `cargo` and `cargoQueue`, the "event"-style methods, like `q.drain` and `q.saturated` are now methods that register a callback, rather than properties you assign a callback to. They are now of the form `q.drain(callback)`. If you do not pass a callback a Promise will be returned for the next occurrence of the event, making them `await`-able, e.g. `await q.drain()`. (#1586, #1641) -- Calling `callback(false)` will cancel an async method, preventing further iteration and callback calls. This is useful for preventing memory leaks when you break out of an async flow by calling an outer callback. (#1064, #1542) -- `during` and `doDuring` have been removed, and instead `whilst`, `doWhilst`, `until` and `doUntil` now have asynchronous `test` functions. (#850, #1557) -- `limits` of less than 1 now cause an error to be thrown in queues and collection methods. (#1249, #1552) -- `memoize` no longer memoizes errors (#1465, #1466) -- `applyEach`/`applyEachSeries` have a simpler interface, to make them more easily type-able. It always returns a function that takes in a single callback argument. If that callback is omitted, a promise is returned, making it awaitable. (#1228, #1640) - -## New Features -- Async generators are now supported in all the Collection methods. (#1560) -- Added `cargoQueue`, a queue with both `concurrency` and `payload` size parameters. (#1567) -- Queue objects returned from `queue` now have a `Symbol.iterator` method, meaning they can be iterated over to inspect the current list of items in the queue. (#1459, #1556) -- A ESM-flavored `async.mjs` is included in the `async` package. This is described in the `package.json` `"module"` field, meaning it should be automatically used by Webpack and other compatible bundlers. - -## Bug fixes -- Better handle arbitrary error objects in `asyncify` (#1568, #1569) - -## Other -- Removed Lodash as a dependency (#1283, #1528) -- Miscellaneous docs fixes (#1393, #1501, #1540, #1543, #1558, #1563, #1564, #1579, #1581) -- Miscellaneous test fixes (#1538) - -------- - -# v2.6.1 -- Updated lodash to prevent `npm audit` warnings. (#1532, #1533) -- Made `async-es` more optimized for webpack users (#1517) -- Fixed a stack overflow with large collections and a synchronous iterator (#1514) -- Various small fixes/chores (#1505, #1511, #1527, #1530) - -# v2.6.0 -- Added missing aliases for many methods. Previously, you could not (e.g.) `require('async/find')` or use `async.anyLimit`. (#1483) -- Improved `queue` performance. (#1448, #1454) -- Add missing sourcemap (#1452, #1453) -- Various doc updates (#1448, #1471, #1483) - -# v2.5.0 -- Added `concatLimit`, the `Limit` equivalent of [`concat`](https://caolan.github.io/async/docs.html#concat) ([#1426](https://github.com/caolan/async/issues/1426), [#1430](https://github.com/caolan/async/pull/1430)) -- `concat` improvements: it now preserves order, handles falsy values and the `iteratee` callback takes a variable number of arguments ([#1437](https://github.com/caolan/async/issues/1437), [#1436](https://github.com/caolan/async/pull/1436)) -- Fixed an issue in `queue` where there was a size discrepancy between `workersList().length` and `running()` ([#1428](https://github.com/caolan/async/issues/1428), [#1429](https://github.com/caolan/async/pull/1429)) -- Various doc fixes ([#1422](https://github.com/caolan/async/issues/1422), [#1424](https://github.com/caolan/async/pull/1424)) - -# v2.4.1 -- Fixed a bug preventing functions wrapped with `timeout()` from being re-used. ([#1418](https://github.com/caolan/async/issues/1418), [#1419](https://github.com/caolan/async/issues/1419)) - -# v2.4.0 -- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. ([#1365](https://github.com/caolan/async/issues/1365), [#687](https://github.com/caolan/async/issues/687)) -- Improved performance, most notably in `parallel` and `waterfall` ([#1395](https://github.com/caolan/async/issues/1395)) -- Added `queue.remove()`, for removing items in a `queue` ([#1397](https://github.com/caolan/async/issues/1397), [#1391](https://github.com/caolan/async/issues/1391)) -- Fixed using `eval`, preventing Async from running in pages with Content Security Policy ([#1404](https://github.com/caolan/async/issues/1404), [#1403](https://github.com/caolan/async/issues/1403)) -- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise ([#1408](https://github.com/caolan/async/issues/1408)) -- Fixed timing of `queue.empty()` ([#1367](https://github.com/caolan/async/issues/1367)) -- Various doc fixes ([#1314](https://github.com/caolan/async/issues/1314), [#1394](https://github.com/caolan/async/issues/1394), [#1412](https://github.com/caolan/async/issues/1412)) - -# v2.3.0 -- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will only work if `async` functions are supported natively in your environment, transpiled implementations can't be detected. ([#1386](https://github.com/caolan/async/issues/1386), [#1390](https://github.com/caolan/async/issues/1390)) -- Small doc fix ([#1392](https://github.com/caolan/async/issues/1392)) - -# v2.2.0 -- Added `groupBy`, and the `Series`/`Limit` equivalents, analogous to [`_.groupBy`](http://lodash.com/docs#groupBy) ([#1364](https://github.com/caolan/async/issues/1364)) -- Fixed `transform` bug when `callback` was not passed ([#1381](https://github.com/caolan/async/issues/1381)) -- Added note about `reflect` to `parallel` docs ([#1385](https://github.com/caolan/async/issues/1385)) - -# v2.1.5 -- Fix `auto` bug when function names collided with Array.prototype ([#1358](https://github.com/caolan/async/issues/1358)) -- Improve some error messages ([#1349](https://github.com/caolan/async/issues/1349)) -- Avoid stack overflow case in queue -- Fixed an issue in `some`, `every` and `find` where processing would continue after the result was determined. -- Cleanup implementations of `some`, `every` and `find` - -# v2.1.3 -- Make bundle size smaller -- Create optimized hotpath for `filter` in array case. - -# v2.1.2 -- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs ([#1293](https://github.com/caolan/async/issues/1293)). - -# v2.1.0 - -- `retry` and `retryable` now support an optional `errorFilter` function that determines if the `task` should retry on the error ([#1256](https://github.com/caolan/async/issues/1256), [#1261](https://github.com/caolan/async/issues/1261)) -- Optimized array iteration in `race`, `cargo`, `queue`, and `priorityQueue` ([#1253](https://github.com/caolan/async/issues/1253)) -- Added alias documentation to doc site ([#1251](https://github.com/caolan/async/issues/1251), [#1254](https://github.com/caolan/async/issues/1254)) -- Added [BootStrap scrollspy](http://getbootstrap.com/javascript/#scrollspy) to docs to highlight in the sidebar the current method being viewed ([#1289](https://github.com/caolan/async/issues/1289), [#1300](https://github.com/caolan/async/issues/1300)) -- Various minor doc fixes ([#1263](https://github.com/caolan/async/issues/1263), [#1264](https://github.com/caolan/async/issues/1264), [#1271](https://github.com/caolan/async/issues/1271), [#1278](https://github.com/caolan/async/issues/1278), [#1280](https://github.com/caolan/async/issues/1280), [#1282](https://github.com/caolan/async/issues/1282), [#1302](https://github.com/caolan/async/issues/1302)) - -# v2.0.1 - -- Significantly optimized all iteration based collection methods such as `each`, `map`, `filter`, etc ([#1245](https://github.com/caolan/async/issues/1245), [#1246](https://github.com/caolan/async/issues/1246), [#1247](https://github.com/caolan/async/issues/1247)). - -# v2.0.0 - -Lots of changes here! - -First and foremost, we have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**@hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**@ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well. - -The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before. - -We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size. - -Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy. - -Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that: - -1. Takes a variable number of arguments -2. The last argument is always a callback -3. The callback can accept any number of arguments -4. The first argument passed to the callback will be treated as an error result, if the argument is truthy -5. Any number of result arguments can be passed after the "error" argument -6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop. - -There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, `filter`, `reject` and `detect`. - -Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`. - -Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205). - -## New Features - -- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) -- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) -- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. ([#568](https://github.com/caolan/async/issues/568), [#1038](https://github.com/caolan/async/issues/1038)) -- Collection methods now accept ES2015 iterators. Maps, Sets, and anything that implements the iterator spec can now be passed directly to `each`, `map`, `parallel`, etc.. ([#579](https://github.com/caolan/async/issues/579), [#839](https://github.com/caolan/async/issues/839), [#1074](https://github.com/caolan/async/issues/1074)) -- Added `mapValues`, for mapping over the properties of an object and returning an object with the same keys. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) -- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. ([#1007](https://github.com/caolan/async/issues/1007), [#1027](https://github.com/caolan/async/issues/1027)) -- Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. ([#942](https://github.com/caolan/async/issues/942), [#1012](https://github.com/caolan/async/issues/1012), [#1095](https://github.com/caolan/async/issues/1095)) -- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. ([#1016](https://github.com/caolan/async/issues/1016), [#1052](https://github.com/caolan/async/issues/1052)) -- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. ([#940](https://github.com/caolan/async/issues/940), [#1053](https://github.com/caolan/async/issues/1053)) -- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) ([#1140](https://github.com/caolan/async/issues/1140)). -- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. ([#608](https://github.com/caolan/async/issues/608), [#1055](https://github.com/caolan/async/issues/1055), [#1099](https://github.com/caolan/async/issues/1099), [#1100](https://github.com/caolan/async/issues/1100)) -- You can now limit the concurrency of `auto` tasks. ([#635](https://github.com/caolan/async/issues/635), [#637](https://github.com/caolan/async/issues/637)) -- Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. ([#1058](https://github.com/caolan/async/issues/1058)) -- `retry` now supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. ([#1161](https://github.com/caolan/async/issues/1161)) -- `retry` will now pass all of the arguments the task function was resolved with to the callback ([#1231](https://github.com/caolan/async/issues/1231)). -- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. ([#868](https://github.com/caolan/async/issues/868), [#1030](https://github.com/caolan/async/issues/1030), [#1033](https://github.com/caolan/async/issues/1033), [#1034](https://github.com/caolan/async/issues/1034)) -- Added `q.error` -- a callback called whenever a `queue` task calls its callback with an error. ([#1170](https://github.com/caolan/async/issues/1170)) -- `applyEach` and `applyEachSeries` now pass results to the final callback. ([#1088](https://github.com/caolan/async/issues/1088)) - -## Breaking changes - -- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. ([#814](https://github.com/caolan/async/issues/814), [#815](https://github.com/caolan/async/issues/815), [#1048](https://github.com/caolan/async/issues/1048), [#1050](https://github.com/caolan/async/issues/1050)) -- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) ([#1036](https://github.com/caolan/async/issues/1036), [#1042](https://github.com/caolan/async/issues/1042)) -- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. ([#696](https://github.com/caolan/async/issues/696), [#704](https://github.com/caolan/async/issues/704), [#1049](https://github.com/caolan/async/issues/1049), [#1050](https://github.com/caolan/async/issues/1050)) -- `map` used to return an object when iterating over an object. `map` now always returns an array, like in other libraries. The previous object behavior has been split out into `mapValues`. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) -- `filter`, `reject`, `some`, `every`, `detect` and their families like `{METHOD}Series` and `{METHOD}Limit` now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. ([#118](https://github.com/caolan/async/issues/118), [#774](https://github.com/caolan/async/issues/774), [#1028](https://github.com/caolan/async/issues/1028), [#1041](https://github.com/caolan/async/issues/1041)) -- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. ([#778](https://github.com/caolan/async/issues/778), [#847](https://github.com/caolan/async/issues/847)) -- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. ([#1054](https://github.com/caolan/async/issues/1054), [#1058](https://github.com/caolan/async/issues/1058)) -- The test function for `whilst`, `until`, and `during` used to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only the `doWhilst`, `doUntil`, and `doDuring` functions pass iteratee callback arguments to the test function ([#1217](https://github.com/caolan/async/issues/1217), [#1224](https://github.com/caolan/async/issues/1224)) -- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs ([#1205](https://github.com/caolan/async/issues/1205)). -- The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. ([#724](https://github.com/caolan/async/issues/724), [#1078](https://github.com/caolan/async/issues/1078)) -- Removed `iterator` method in favour of [ES2015 iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators ) which natively supports arrays ([#1237](https://github.com/caolan/async/issues/1237)) -- Dropped support for Component, Jam, SPM, and Volo ([#1175](https://github.com/caolan/async/issues/1175), #[#176](https://github.com/caolan/async/issues/176)) - -## Bug Fixes - -- Improved handling of no dependency cases in `auto` & `autoInject` ([#1147](https://github.com/caolan/async/issues/1147)). -- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice ([#1197](https://github.com/caolan/async/issues/1197)). -- Fixed several documented optional callbacks not actually being optional ([#1223](https://github.com/caolan/async/issues/1223)). - -## Other - -- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases. -- Added `find` as an alias for `detect. (as well as `findLimit` and `findSeries`). -- Various doc fixes ([#1005](https://github.com/caolan/async/issues/1005), [#1008](https://github.com/caolan/async/issues/1008), [#1010](https://github.com/caolan/async/issues/1010), [#1015](https://github.com/caolan/async/issues/1015), [#1021](https://github.com/caolan/async/issues/1021), [#1037](https://github.com/caolan/async/issues/1037), [#1039](https://github.com/caolan/async/issues/1039), [#1051](https://github.com/caolan/async/issues/1051), [#1102](https://github.com/caolan/async/issues/1102), [#1107](https://github.com/caolan/async/issues/1107), [#1121](https://github.com/caolan/async/issues/1121), [#1123](https://github.com/caolan/async/issues/1123), [#1129](https://github.com/caolan/async/issues/1129), [#1135](https://github.com/caolan/async/issues/1135), [#1138](https://github.com/caolan/async/issues/1138), [#1141](https://github.com/caolan/async/issues/1141), [#1153](https://github.com/caolan/async/issues/1153), [#1216](https://github.com/caolan/async/issues/1216), [#1217](https://github.com/caolan/async/issues/1217), [#1232](https://github.com/caolan/async/issues/1232), [#1233](https://github.com/caolan/async/issues/1233), [#1236](https://github.com/caolan/async/issues/1236), [#1238](https://github.com/caolan/async/issues/1238)) - -Thank you [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for taking the lead on version 2 of async. - ------------------------------------------- - -# v1.5.2 -- Allow using `"constructor"` as an argument in `memoize` ([#998](https://github.com/caolan/async/issues/998)) -- Give a better error messsage when `auto` dependency checking fails ([#994](https://github.com/caolan/async/issues/994)) -- Various doc updates ([#936](https://github.com/caolan/async/issues/936), [#956](https://github.com/caolan/async/issues/956), [#979](https://github.com/caolan/async/issues/979), [#1002](https://github.com/caolan/async/issues/1002)) - -# v1.5.1 -- Fix issue with `pause` in `queue` with concurrency enabled ([#946](https://github.com/caolan/async/issues/946)) -- `while` and `until` now pass the final result to callback ([#963](https://github.com/caolan/async/issues/963)) -- `auto` will properly handle concurrency when there is no callback ([#966](https://github.com/caolan/async/issues/966)) -- `auto` will no. properly stop execution when an error occurs ([#988](https://github.com/caolan/async/issues/988), [#993](https://github.com/caolan/async/issues/993)) -- Various doc fixes ([#971](https://github.com/caolan/async/issues/971), [#980](https://github.com/caolan/async/issues/980)) - -# v1.5.0 - -- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) ([#892](https://github.com/caolan/async/issues/892)) -- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. ([#873](https://github.com/caolan/async/issues/873)) -- `auto` now accepts an optional `concurrency` argument to limit the number o. running tasks ([#637](https://github.com/caolan/async/issues/637)) -- Added `queue#workersList()`, to retrieve the lis. of currently running tasks. ([#891](https://github.com/caolan/async/issues/891)) -- Various code simplifications ([#896](https://github.com/caolan/async/issues/896), [#904](https://github.com/caolan/async/issues/904)) -- Various doc fixes :scroll: ([#890](https://github.com/caolan/async/issues/890), [#894](https://github.com/caolan/async/issues/894), [#903](https://github.com/caolan/async/issues/903), [#905](https://github.com/caolan/async/issues/905), [#912](https://github.com/caolan/async/issues/912)) - -# v1.4.2 - -- Ensure coverage files don't get published on npm ([#879](https://github.com/caolan/async/issues/879)) - -# v1.4.1 - -- Add in overlooked `detectLimit` method ([#866](https://github.com/caolan/async/issues/866)) -- Removed unnecessary files from npm releases ([#861](https://github.com/caolan/async/issues/861)) -- Removed usage of a reserved word to prevent :boom: in older environments ([#870](https://github.com/caolan/async/issues/870)) - -# v1.4.0 - -- `asyncify` now supports promises ([#840](https://github.com/caolan/async/issues/840)) -- Added `Limit` versions of `filter` and `reject` ([#836](https://github.com/caolan/async/issues/836)) -- Add `Limit` versions of `detect`, `some` and `every` ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) -- `some`, `every` and `detect` now short circuit early ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) -- Improve detection of the global object ([#804](https://github.com/caolan/async/issues/804)), enabling use in WebWorkers -- `whilst` now called with arguments from iterator ([#823](https://github.com/caolan/async/issues/823)) -- `during` now gets called with arguments from iterator ([#824](https://github.com/caolan/async/issues/824)) -- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0)) - - -# v1.3.0 - -New Features: -- Added `constant` -- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. ([#671](https://github.com/caolan/async/issues/671), [#806](https://github.com/caolan/async/issues/806)) -- Added `during` and `doDuring`, which are like `whilst` with an async truth test. ([#800](https://github.com/caolan/async/issues/800)) -- `retry` now accepts an `interval` parameter to specify a delay between retries. ([#793](https://github.com/caolan/async/issues/793)) -- `async` should work better in Web Workers due to better `root` detection ([#804](https://github.com/caolan/async/issues/804)) -- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` ([#642](https://github.com/caolan/async/issues/642)) -- Various internal updates ([#786](https://github.com/caolan/async/issues/786), [#801](https://github.com/caolan/async/issues/801), [#802](https://github.com/caolan/async/issues/802), [#803](https://github.com/caolan/async/issues/803)) -- Various doc fixes ([#790](https://github.com/caolan/async/issues/790), [#794](https://github.com/caolan/async/issues/794)) - -Bug Fixes: -- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. ([#740](https://github.com/caolan/async/issues/740), [#744](https://github.com/caolan/async/issues/744), [#783](https://github.com/caolan/async/issues/783)) - - -# v1.2.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) - - -# v1.2.0 - -New Features: - -- Added `timesLimit` ([#743](https://github.com/caolan/async/issues/743)) -- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. ([#747](https://github.com/caolan/async/issues/747), [#772](https://github.com/caolan/async/issues/772)) - -Bug Fixes: - -- Fixed a regression in `each` and family with empty arrays that have additional properties. ([#775](https://github.com/caolan/async/issues/775), [#777](https://github.com/caolan/async/issues/777)) - - -# v1.1.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) - - -# v1.1.0 - -New Features: - -- `cargo` now supports all of the same methods and event callbacks as `queue`. -- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. ([#769](https://github.com/caolan/async/issues/769)) -- Optimized `map`, `eachOf`, and `waterfall` families of functions -- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array ([#667](https://github.com/caolan/async/issues/667)). -- The callback is now optional for the composed results of `compose` and `seq`. ([#618](https://github.com/caolan/async/issues/618)) -- Reduced file size by 4kb, (minified version by 1kb) -- Added code coverage through `nyc` and `coveralls` ([#768](https://github.com/caolan/async/issues/768)) - -Bug Fixes: - -- `forever` will no longer stack overflow with a synchronous iterator ([#622](https://github.com/caolan/async/issues/622)) -- `eachLimit` and other limit functions will stop iterating once an error occurs ([#754](https://github.com/caolan/async/issues/754)) -- Always pass `null` in callbacks when there is no error ([#439](https://github.com/caolan/async/issues/439)) -- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue ([#668](https://github.com/caolan/async/issues/668)) -- `each` and family will properly handle an empty array ([#578](https://github.com/caolan/async/issues/578)) -- `eachSeries` and family will finish if the underlying array is modified during execution ([#557](https://github.com/caolan/async/issues/557)) -- `queue` will throw if a non-function is passed to `q.push()` ([#593](https://github.com/caolan/async/issues/593)) -- Doc fixes ([#629](https://github.com/caolan/async/issues/629), [#766](https://github.com/caolan/async/issues/766)) - - -# v1.0.0 - -No known breaking changes, we are simply complying with semver from here on out. - -Changes: - -- Start using a changelog! -- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) ([#168](https://github.com/caolan/async/issues/168) [#704](https://github.com/caolan/async/issues/704) [#321](https://github.com/caolan/async/issues/321)) -- Detect deadlocks in `auto` ([#663](https://github.com/caolan/async/issues/663)) -- Better support for require.js ([#527](https://github.com/caolan/async/issues/527)) -- Throw if queue created with concurrency `0` ([#714](https://github.com/caolan/async/issues/714)) -- Fix unneeded iteration in `queue.resume()` ([#758](https://github.com/caolan/async/issues/758)) -- Guard against timer mocking overriding `setImmediate` ([#609](https://github.com/caolan/async/issues/609) [#611](https://github.com/caolan/async/issues/611)) -- Miscellaneous doc fixes ([#542](https://github.com/caolan/async/issues/542) [#596](https://github.com/caolan/async/issues/596) [#615](https://github.com/caolan/async/issues/615) [#628](https://github.com/caolan/async/issues/628) [#631](https://github.com/caolan/async/issues/631) [#690](https://github.com/caolan/async/issues/690) [#729](https://github.com/caolan/async/issues/729)) -- Use single noop function internally ([#546](https://github.com/caolan/async/issues/546)) -- Optimize internal `_each`, `_map` and `_keys` functions. diff --git a/general/nvim/node_modules/async/LICENSE b/general/nvim/node_modules/async/LICENSE deleted file mode 100644 index b18aed6..0000000 --- a/general/nvim/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2018 Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/general/nvim/node_modules/async/README.md b/general/nvim/node_modules/async/README.md deleted file mode 100644 index c679263..0000000 --- a/general/nvim/node_modules/async/README.md +++ /dev/null @@ -1,60 +0,0 @@ -![Async Logo](https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg) - -[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) -[![Build Status via Azure Pipelines](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master) -[![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async) -[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master) -[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/async/badge?style=rounded)](https://www.jsdelivr.com/package/npm/async) - - - -Async is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/v3/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm i async`, it can also be used directly in the browser. A ESM/MJS version is included in the main `async` package that should automatically be used with compatible bundlers such as Webpack and Rollup. - -A pure ESM version of Async is available as [`async-es`](https://www.npmjs.com/package/async-es). - -For Documentation, visit - -*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)* - - -```javascript -// for use with Node-style callbacks... -var async = require("async"); - -var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; -var configs = {}; - -async.forEachOf(obj, (value, key, callback) => { - fs.readFile(__dirname + value, "utf8", (err, data) => { - if (err) return callback(err); - try { - configs[key] = JSON.parse(data); - } catch (e) { - return callback(e); - } - callback(); - }); -}, err => { - if (err) console.error(err.message); - // configs is now a map of JSON data - doSomethingWith(configs); -}); -``` - -```javascript -var async = require("async"); - -// ...or ES2017 async functions -async.mapLimit(urls, 5, async function(url) { - const response = await fetch(url) - return response.body -}, (err, results) => { - if (err) throw err - // results is now an array of the response bodies - console.log(results) -}) -``` diff --git a/general/nvim/node_modules/async/all.js b/general/nvim/node_modules/async/all.js deleted file mode 100644 index 148db68..0000000 --- a/general/nvim/node_modules/async/all.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.every(fileList, fileExists, function(err, result) { - * console.log(result); - * // true - * // result is true since every file exists - * }); - * - * async.every(withMissingFileList, fileExists, function(err, result) { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }); - * - * // Using Promises - * async.every(fileList, fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.every(withMissingFileList, fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.every(fileList, fileExists); - * console.log(result); - * // true - * // result is true since every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.every(withMissingFileList, fileExists); - * console.log(result); - * // false - * // result is false since NOT every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function every(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(every, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/allLimit.js b/general/nvim/node_modules/async/allLimit.js deleted file mode 100644 index 25b2c08..0000000 --- a/general/nvim/node_modules/async/allLimit.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function everyLimit(coll, limit, iteratee, callback) { - return (0, _createTester2.default)(bool => !bool, res => !res)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(everyLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/allSeries.js b/general/nvim/node_modules/async/allSeries.js deleted file mode 100644 index 147c3dc..0000000 --- a/general/nvim/node_modules/async/allSeries.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function everySeries(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(everySeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/any.js b/general/nvim/node_modules/async/any.js deleted file mode 100644 index 2046cf6..0000000 --- a/general/nvim/node_modules/async/any.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - *); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // false - * // result is false since none of the files exists - * } - *); - * - * // Using Promises - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since some file in the list exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since none of the files exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists); - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists); - * console.log(result); - * // false - * // result is false since none of the files exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function some(coll, iteratee, callback) { - return (0, _createTester2.default)(Boolean, res => res)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(some, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/anyLimit.js b/general/nvim/node_modules/async/anyLimit.js deleted file mode 100644 index c8a295a..0000000 --- a/general/nvim/node_modules/async/anyLimit.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function someLimit(coll, limit, iteratee, callback) { - return (0, _createTester2.default)(Boolean, res => res)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(someLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/anySeries.js b/general/nvim/node_modules/async/anySeries.js deleted file mode 100644 index ee0654b..0000000 --- a/general/nvim/node_modules/async/anySeries.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function someSeries(coll, iteratee, callback) { - return (0, _createTester2.default)(Boolean, res => res)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(someSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/apply.js b/general/nvim/node_modules/async/apply.js deleted file mode 100644 index 5246833..0000000 --- a/general/nvim/node_modules/async/apply.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (fn, ...args) { - return (...callArgs) => fn(...args, ...callArgs); -}; - -module.exports = exports["default"]; /** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ \ No newline at end of file diff --git a/general/nvim/node_modules/async/applyEach.js b/general/nvim/node_modules/async/applyEach.js deleted file mode 100644 index b08c670..0000000 --- a/general/nvim/node_modules/async/applyEach.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _applyEach = require('./internal/applyEach.js'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _map = require('./map.js'); - -var _map2 = _interopRequireDefault(_map); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. The results - * for each of the applied async functions are passed to the final callback - * as an array. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - Returns a function that takes no args other than - * an optional callback, that is the result of applying the `args` to each - * of the functions. - * @example - * - * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket') - * - * appliedFn((err, results) => { - * // results[0] is the results for `enableSearch` - * // results[1] is the results for `updateSchema` - * }); - * - * // partial application example: - * async.each( - * buckets, - * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(), - * callback - * ); - */ -exports.default = (0, _applyEach2.default)(_map2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/applyEachSeries.js b/general/nvim/node_modules/async/applyEachSeries.js deleted file mode 100644 index 6a19ca3..0000000 --- a/general/nvim/node_modules/async/applyEachSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _applyEach = require('./internal/applyEach.js'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _mapSeries = require('./mapSeries.js'); - -var _mapSeries2 = _interopRequireDefault(_mapSeries); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - A function, that when called, is the result of - * appling the `args` to the list of functions. It takes no args, other than - * a callback. - */ -exports.default = (0, _applyEach2.default)(_mapSeries2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/asyncify.js b/general/nvim/node_modules/async/asyncify.js deleted file mode 100644 index 3c3bf88..0000000 --- a/general/nvim/node_modules/async/asyncify.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = asyncify; - -var _initialParams = require('./internal/initialParams.js'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _setImmediate = require('./internal/setImmediate.js'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - if ((0, _wrapAsync.isAsync)(func)) { - return function (...args /*, callback*/) { - const callback = args.pop(); - const promise = func.apply(this, args); - return handlePromise(promise, callback); - }; - } - - return (0, _initialParams2.default)(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (result && typeof result.then === 'function') { - return handlePromise(result, callback); - } else { - callback(null, result); - } - }); -} - -function handlePromise(promise, callback) { - return promise.then(value => { - invokeCallback(callback, null, value); - }, err => { - invokeCallback(callback, err && err.message ? err : new Error(err)); - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (err) { - (0, _setImmediate2.default)(e => { - throw e; - }, err); - } -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/auto.js b/general/nvim/node_modules/async/auto.js deleted file mode 100644 index c4a85d4..0000000 --- a/general/nvim/node_modules/async/auto.js +++ /dev/null @@ -1,333 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = auto; - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _promiseCallback = require('./internal/promiseCallback.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * @example - * - * //Using Callbacks - * async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * if (err) { - * console.log('err = ', err); - * } - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }); - * - * //Using Promises - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }).then(results => { - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }).catch(err => { - * console.log('err = ', err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }); - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function auto(tasks, concurrency, callback) { - if (typeof concurrency !== 'number') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = (0, _once2.default)(callback || (0, _promiseCallback.promiseCallback)()); - var numTasks = Object.keys(tasks).length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var canceled = false; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - Object.keys(tasks).forEach(key => { - var task = tasks[key]; - if (!Array.isArray(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - dependencies.forEach(dependencyName => { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + '` has a non-existent dependency `' + dependencyName + '` in ' + dependencies.join(', ')); - } - addListener(dependencyName, () => { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(() => runTask(key, task)); - } - - function processQueue() { - if (canceled) return; - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while (readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - taskListeners.forEach(fn => fn()); - processQueue(); - } - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = (0, _onlyOnce2.default)((err, ...result) => { - runningTasks--; - if (err === false) { - canceled = true; - return; - } - if (result.length < 2) { - [result] = result; - } - if (err) { - var safeResults = {}; - Object.keys(results).forEach(rkey => { - safeResults[rkey] = results[rkey]; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - if (canceled) return; - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = (0, _wrapAsync2.default)(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - getDependents(currentTask).forEach(dependent => { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error('async.auto cannot execute tasks due to a recursive dependency'); - } - } - - function getDependents(taskName) { - var result = []; - Object.keys(tasks).forEach(key => { - const task = tasks[key]; - if (Array.isArray(task) && task.indexOf(taskName) >= 0) { - result.push(key); - } - }); - return result; - } - - return callback[_promiseCallback.PROMISE_SYMBOL]; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/autoInject.js b/general/nvim/node_modules/async/autoInject.js deleted file mode 100644 index 393baad..0000000 --- a/general/nvim/node_modules/async/autoInject.js +++ /dev/null @@ -1,182 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = autoInject; - -var _auto = require('./auto.js'); - -var _auto2 = _interopRequireDefault(_auto); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/; -var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/; -var FN_ARG_SPLIT = /,/; -var FN_ARG = /(=.+)?(\s*)$/; - -function stripComments(string) { - let stripped = ''; - let index = 0; - let endBlockComment = string.indexOf('*/'); - while (index < string.length) { - if (string[index] === '/' && string[index + 1] === '/') { - // inline comment - let endIndex = string.indexOf('\n', index); - index = endIndex === -1 ? string.length : endIndex; - } else if (endBlockComment !== -1 && string[index] === '/' && string[index + 1] === '*') { - // block comment - let endIndex = string.indexOf('*/', index); - if (endIndex !== -1) { - index = endIndex + 2; - endBlockComment = string.indexOf('*/', index); - } else { - stripped += string[index]; - index++; - } - } else { - stripped += string[index]; - index++; - } - } - return stripped; -} - -function parseParams(func) { - const src = stripComments(func.toString()); - let match = src.match(FN_ARGS); - if (!match) { - match = src.match(ARROW_FN_ARGS); - } - if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src); - let [, args] = match; - return args.replace(/\s/g, '').split(FN_ARG_SPLIT).map(arg => arg.replace(FN_ARG, '').trim()); -} - -/** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ -function autoInject(tasks, callback) { - var newTasks = {}; - - Object.keys(tasks).forEach(key => { - var taskFn = tasks[key]; - var params; - var fnIsAsync = (0, _wrapAsync.isAsync)(taskFn); - var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0; - - if (Array.isArray(taskFn)) { - params = [...taskFn]; - taskFn = params.pop(); - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = params.map(name => results[name]); - newArgs.push(taskCb); - (0, _wrapAsync2.default)(taskFn)(...newArgs); - } - }); - - return (0, _auto2.default)(newTasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/bower.json b/general/nvim/node_modules/async/bower.json deleted file mode 100644 index 390c650..0000000 --- a/general/nvim/node_modules/async/bower.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "async", - "main": "dist/async.js", - "ignore": [ - "bower_components", - "lib", - "test", - "node_modules", - "perf", - "support", - "**/.*", - "*.config.js", - "*.json", - "index.js", - "Makefile" - ] -} diff --git a/general/nvim/node_modules/async/cargo.js b/general/nvim/node_modules/async/cargo.js deleted file mode 100644 index aa385f8..0000000 --- a/general/nvim/node_modules/async/cargo.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cargo; - -var _queue = require('./internal/queue.js'); - -var _queue2 = _interopRequireDefault(_queue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir) - * .then(results => { - * console.log(results); - * }).catch(err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.concat(directoryList, fs.readdir); - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.concat(withMissingDirectoryList, fs.readdir); - * console.log(results); - * } catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } - * } - * - */ -function concat(coll, iteratee, callback) { - return (0, _concatLimit2.default)(coll, Infinity, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(concat, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/concatLimit.js b/general/nvim/node_modules/async/concatLimit.js deleted file mode 100644 index 3d170f1..0000000 --- a/general/nvim/node_modules/async/concatLimit.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _mapLimit = require('./mapLimit.js'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. - * - * @name concatLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapLimit - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ -function concatLimit(coll, limit, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _mapLimit2.default)(coll, limit, (val, iterCb) => { - _iteratee(val, (err, ...args) => { - if (err) return iterCb(err); - return iterCb(err, args); - }); - }, (err, mapResults) => { - var result = []; - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - result = result.concat(...mapResults[i]); - } - } - - return callback(err, result); - }); -} -exports.default = (0, _awaitify2.default)(concatLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/concatSeries.js b/general/nvim/node_modules/async/concatSeries.js deleted file mode 100644 index 84add3b..0000000 --- a/general/nvim/node_modules/async/concatSeries.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _concatLimit = require('./concatLimit.js'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. - * - * @name concatSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapSeries - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`. - * The iteratee should complete with an array an array of results. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ -function concatSeries(coll, iteratee, callback) { - return (0, _concatLimit2.default)(coll, 1, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(concatSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/constant.js b/general/nvim/node_modules/async/constant.js deleted file mode 100644 index 0759653..0000000 --- a/general/nvim/node_modules/async/constant.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (...args) { - return function (...ignoredArgs /*, callback*/) { - var callback = ignoredArgs.pop(); - return callback(null, ...args); - }; -}; - -module.exports = exports["default"]; /** - * Returns a function that when called, calls-back with the values provided. - * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to - * [`auto`]{@link module:ControlFlow.auto}. - * - * @name constant - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {...*} arguments... - Any number of arguments to automatically invoke - * callback with. - * @returns {AsyncFunction} Returns a function that when invoked, automatically - * invokes the callback with the previous given arguments. - * @example - * - * async.waterfall([ - * async.constant(42), - * function (value, next) { - * // value === 42 - * }, - * //... - * ], callback); - * - * async.waterfall([ - * async.constant(filename, "utf8"), - * fs.readFile, - * function (fileData, next) { - * //... - * } - * //... - * ], callback); - * - * async.auto({ - * hostname: async.constant("https://server.net/"), - * port: findFreePort, - * launchServer: ["hostname", "port", function (options, cb) { - * startServer(options, cb); - * }], - * //... - * }, callback); - */ \ No newline at end of file diff --git a/general/nvim/node_modules/async/detect.js b/general/nvim/node_modules/async/detect.js deleted file mode 100644 index b3ed7ab..0000000 --- a/general/nvim/node_modules/async/detect.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * } - *); - * - * // Using Promises - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists) - * .then(result => { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists); - * console.log(result); - * // dir1/file1.txt - * // result now equals the file in the list that exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function detect(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => bool, (res, item) => item)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(detect, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/detectLimit.js b/general/nvim/node_modules/async/detectLimit.js deleted file mode 100644 index 0ddb860..0000000 --- a/general/nvim/node_modules/async/detectLimit.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ -function detectLimit(coll, limit, iteratee, callback) { - return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(detectLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/detectSeries.js b/general/nvim/node_modules/async/detectSeries.js deleted file mode 100644 index 0c4f26a..0000000 --- a/general/nvim/node_modules/async/detectSeries.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ -function detectSeries(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(1), coll, iteratee, callback); -} - -exports.default = (0, _awaitify2.default)(detectSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/dir.js b/general/nvim/node_modules/async/dir.js deleted file mode 100644 index 950d0a2..0000000 --- a/general/nvim/node_modules/async/dir.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _consoleFunc = require('./internal/consoleFunc.js'); - -var _consoleFunc2 = _interopRequireDefault(_consoleFunc); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Logs the result of an [`async` function]{@link AsyncFunction} to the - * `console` using `console.dir` to display the properties of the resulting object. - * Only works in Node.js or in browsers that support `console.dir` and - * `console.error` (such as FF and Chrome). - * If multiple arguments are returned from the async function, - * `console.dir` is called on each argument in order. - * - * @name dir - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, {hello: name}); - * }, 1000); - * }; - * - * // in the node repl - * node> async.dir(hello, 'world'); - * {hello: 'world'} - */ -exports.default = (0, _consoleFunc2.default)('dir'); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/dist/async.js b/general/nvim/node_modules/async/dist/async.js deleted file mode 100644 index 832ca57..0000000 --- a/general/nvim/node_modules/async/dist/async.js +++ /dev/null @@ -1,6057 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.async = {}))); -}(this, (function (exports) { 'use strict'; - - /** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ - function apply(fn, ...args) { - return (...callArgs) => fn(...args,...callArgs); - } - - function initialParams (fn) { - return function (...args/*, callback*/) { - var callback = args.pop(); - return fn.call(this, args, callback); - }; - } - - /* istanbul ignore file */ - - var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask; - var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; - var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - - function fallback(fn) { - setTimeout(fn, 0); - } - - function wrap(defer) { - return (fn, ...args) => defer(() => fn(...args)); - } - - var _defer; - - if (hasQueueMicrotask) { - _defer = queueMicrotask; - } else if (hasSetImmediate) { - _defer = setImmediate; - } else if (hasNextTick) { - _defer = process.nextTick; - } else { - _defer = fallback; - } - - var setImmediate$1 = wrap(_defer); - - /** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ - function asyncify(func) { - if (isAsync(func)) { - return function (...args/*, callback*/) { - const callback = args.pop(); - const promise = func.apply(this, args); - return handlePromise(promise, callback) - } - } - - return initialParams(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (result && typeof result.then === 'function') { - return handlePromise(result, callback) - } else { - callback(null, result); - } - }); - } - - function handlePromise(promise, callback) { - return promise.then(value => { - invokeCallback(callback, null, value); - }, err => { - invokeCallback(callback, err && err.message ? err : new Error(err)); - }); - } - - function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (err) { - setImmediate$1(e => { throw e }, err); - } - } - - function isAsync(fn) { - return fn[Symbol.toStringTag] === 'AsyncFunction'; - } - - function isAsyncGenerator(fn) { - return fn[Symbol.toStringTag] === 'AsyncGenerator'; - } - - function isAsyncIterable(obj) { - return typeof obj[Symbol.asyncIterator] === 'function'; - } - - function wrapAsync(asyncFn) { - if (typeof asyncFn !== 'function') throw new Error('expected a function') - return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; - } - - // conditionally promisify a function. - // only return a promise if a callback is omitted - function awaitify (asyncFn, arity = asyncFn.length) { - if (!arity) throw new Error('arity is undefined') - function awaitable (...args) { - if (typeof args[arity - 1] === 'function') { - return asyncFn.apply(this, args) - } - - return new Promise((resolve, reject) => { - args[arity - 1] = (err, ...cbArgs) => { - if (err) return reject(err) - resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); - }; - asyncFn.apply(this, args); - }) - } - - return awaitable - } - - function applyEach (eachfn) { - return function applyEach(fns, ...callArgs) { - const go = awaitify(function (callback) { - var that = this; - return eachfn(fns, (fn, cb) => { - wrapAsync(fn).apply(that, callArgs.concat(cb)); - }, callback); - }); - return go; - }; - } - - function _asyncMap(eachfn, arr, iteratee, callback) { - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = wrapAsync(iteratee); - - return eachfn(arr, (value, _, iterCb) => { - var index = counter++; - _iteratee(value, (err, v) => { - results[index] = v; - iterCb(err); - }); - }, err => { - callback(err, results); - }); - } - - function isArrayLike(value) { - return value && - typeof value.length === 'number' && - value.length >= 0 && - value.length % 1 === 0; - } - - // A temporary value used to identify if the loop should be broken. - // See #1064, #1293 - const breakLoop = {}; - - function once(fn) { - function wrapper (...args) { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, args); - } - Object.assign(wrapper, fn); - return wrapper - } - - function getIterator (coll) { - return coll[Symbol.iterator] && coll[Symbol.iterator](); - } - - function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? {value: coll[i], key: i} : null; - } - } - - function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) - return null; - i++; - return {value: item.value, key: i}; - } - } - - function createObjectIterator(obj) { - var okeys = obj ? Object.keys(obj) : []; - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? {value: obj[key], key} : null; - }; - } - - function createIterator(coll) { - if (isArrayLike(coll)) { - return createArrayIterator(coll); - } - - var iterator = getIterator(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); - } - - function onlyOnce(fn) { - return function (...args) { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, args); - }; - } - - // for async generators - function asyncEachOfLimit(generator, limit, iteratee, callback) { - let done = false; - let canceled = false; - let awaiting = false; - let running = 0; - let idx = 0; - - function replenish() { - //console.log('replenish') - if (running >= limit || awaiting || done) return - //console.log('replenish awaiting') - awaiting = true; - generator.next().then(({value, done: iterDone}) => { - //console.log('got value', value) - if (canceled || done) return - awaiting = false; - if (iterDone) { - done = true; - if (running <= 0) { - //console.log('done nextCb') - callback(null); - } - return; - } - running++; - iteratee(value, idx, iterateeCallback); - idx++; - replenish(); - }).catch(handleError); - } - - function iterateeCallback(err, result) { - //console.log('iterateeCallback') - running -= 1; - if (canceled) return - if (err) return handleError(err) - - if (err === false) { - done = true; - canceled = true; - return - } - - if (result === breakLoop || (done && running <= 0)) { - done = true; - //console.log('done iterCb') - return callback(null); - } - replenish(); - } - - function handleError(err) { - if (canceled) return - awaiting = false; - done = true; - callback(err); - } - - replenish(); - } - - var eachOfLimit = (limit) => { - return (obj, iteratee, callback) => { - callback = once(callback); - if (limit <= 0) { - throw new RangeError('concurrency limit cannot be less than 1') - } - if (!obj) { - return callback(null); - } - if (isAsyncGenerator(obj)) { - return asyncEachOfLimit(obj, limit, iteratee, callback) - } - if (isAsyncIterable(obj)) { - return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback) - } - var nextElem = createIterator(obj); - var done = false; - var canceled = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - if (canceled) return - running -= 1; - if (err) { - done = true; - callback(err); - } - else if (err === false) { - done = true; - canceled = true; - } - else if (value === breakLoop || (done && running <= 0)) { - done = true; - return callback(null); - } - else if (!looping) { - replenish(); - } - } - - function replenish () { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; - }; - - /** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachOfLimit$1(coll, limit, iteratee, callback) { - return eachOfLimit(limit)(coll, wrapAsync(iteratee), callback); - } - - var eachOfLimit$2 = awaitify(eachOfLimit$1, 4); - - // eachOf implementation optimized for array-likes - function eachOfArrayLike(coll, iteratee, callback) { - callback = once(callback); - var index = 0, - completed = 0, - {length} = coll, - canceled = false; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err === false) { - canceled = true; - } - if (canceled === true) return - if (err) { - callback(err); - } else if ((++completed === length) || value === breakLoop) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, onlyOnce(iteratorCallback)); - } - } - - // a generic version of eachOf which can handle array, object, and iterator cases. - function eachOfGeneric (coll, iteratee, callback) { - return eachOfLimit$2(coll, Infinity, iteratee, callback); - } - - /** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dev.json is a file containing a valid json object config for dev environment - * // dev.json is a file containing a valid json object config for test environment - * // prod.json is a file containing a valid json object config for prod environment - * // invalid.json is a file with a malformed json object - * - * let configs = {}; //global variable - * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'}; - * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'}; - * - * // asynchronous function that reads a json file and parses the contents as json object - * function parseFile(file, key, callback) { - * fs.readFile(file, "utf8", function(err, data) { - * if (err) return calback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * } - * - * // Using callbacks - * async.forEachOf(validConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * } else { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * // JSON parse error exception - * } else { - * console.log(configs); - * } - * }); - * - * // Using Promises - * async.forEachOf(validConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * }).catch( err => { - * console.error(err); - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * }).catch( err => { - * console.error(err); - * // JSON parse error exception - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.forEachOf(validConfigFileMap, parseFile); - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * catch (err) { - * console.log(err); - * } - * } - * - * //Error handing - * async () => { - * try { - * let result = await async.forEachOf(invalidConfigFileMap, parseFile); - * console.log(configs); - * } - * catch (err) { - * console.log(err); - * // JSON parse error exception - * } - * } - * - */ - function eachOf(coll, iteratee, callback) { - var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; - return eachOfImplementation(coll, wrapAsync(iteratee), callback); - } - - var eachOf$1 = awaitify(eachOf, 3); - - /** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callbacks - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.map(fileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.map(fileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.map(fileList, getFileSizeInBytes); - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.map(withMissingFileList, getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function map (coll, iteratee, callback) { - return _asyncMap(eachOf$1, coll, iteratee, callback) - } - var map$1 = awaitify(map, 3); - - /** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. The results - * for each of the applied async functions are passed to the final callback - * as an array. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - Returns a function that takes no args other than - * an optional callback, that is the result of applying the `args` to each - * of the functions. - * @example - * - * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket') - * - * appliedFn((err, results) => { - * // results[0] is the results for `enableSearch` - * // results[1] is the results for `updateSchema` - * }); - * - * // partial application example: - * async.each( - * buckets, - * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(), - * callback - * ); - */ - var applyEach$1 = applyEach(map$1); - - /** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachOfSeries(coll, iteratee, callback) { - return eachOfLimit$2(coll, 1, iteratee, callback) - } - var eachOfSeries$1 = awaitify(eachOfSeries, 3); - - /** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function mapSeries (coll, iteratee, callback) { - return _asyncMap(eachOfSeries$1, coll, iteratee, callback) - } - var mapSeries$1 = awaitify(mapSeries, 3); - - /** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - A function, that when called, is the result of - * appling the `args` to the list of functions. It takes no args, other than - * a callback. - */ - var applyEachSeries = applyEach(mapSeries$1); - - const PROMISE_SYMBOL = Symbol('promiseCallback'); - - function promiseCallback () { - let resolve, reject; - function callback (err, ...args) { - if (err) return reject(err) - resolve(args.length > 1 ? args : args[0]); - } - - callback[PROMISE_SYMBOL] = new Promise((res, rej) => { - resolve = res, - reject = rej; - }); - - return callback - } - - /** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * @example - * - * //Using Callbacks - * async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * if (err) { - * console.log('err = ', err); - * } - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }); - * - * //Using Promises - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }).then(results => { - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }).catch(err => { - * console.log('err = ', err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }); - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function auto(tasks, concurrency, callback) { - if (typeof concurrency !== 'number') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = once(callback || promiseCallback()); - var numTasks = Object.keys(tasks).length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var canceled = false; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - Object.keys(tasks).forEach(key => { - var task = tasks[key]; - if (!Array.isArray(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - dependencies.forEach(dependencyName => { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + - '` has a non-existent dependency `' + - dependencyName + '` in ' + - dependencies.join(', ')); - } - addListener(dependencyName, () => { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(() => runTask(key, task)); - } - - function processQueue() { - if (canceled) return - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while(readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - taskListeners.forEach(fn => fn()); - processQueue(); - } - - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = onlyOnce((err, ...result) => { - runningTasks--; - if (err === false) { - canceled = true; - return - } - if (result.length < 2) { - [result] = result; - } - if (err) { - var safeResults = {}; - Object.keys(results).forEach(rkey => { - safeResults[rkey] = results[rkey]; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - if (canceled) return - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = wrapAsync(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - getDependents(currentTask).forEach(dependent => { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error( - 'async.auto cannot execute tasks due to a recursive dependency' - ); - } - } - - function getDependents(taskName) { - var result = []; - Object.keys(tasks).forEach(key => { - const task = tasks[key]; - if (Array.isArray(task) && task.indexOf(taskName) >= 0) { - result.push(key); - } - }); - return result; - } - - return callback[PROMISE_SYMBOL] - } - - var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/; - var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/; - var FN_ARG_SPLIT = /,/; - var FN_ARG = /(=.+)?(\s*)$/; - - function stripComments(string) { - let stripped = ''; - let index = 0; - let endBlockComment = string.indexOf('*/'); - while (index < string.length) { - if (string[index] === '/' && string[index+1] === '/') { - // inline comment - let endIndex = string.indexOf('\n', index); - index = (endIndex === -1) ? string.length : endIndex; - } else if ((endBlockComment !== -1) && (string[index] === '/') && (string[index+1] === '*')) { - // block comment - let endIndex = string.indexOf('*/', index); - if (endIndex !== -1) { - index = endIndex + 2; - endBlockComment = string.indexOf('*/', index); - } else { - stripped += string[index]; - index++; - } - } else { - stripped += string[index]; - index++; - } - } - return stripped; - } - - function parseParams(func) { - const src = stripComments(func.toString()); - let match = src.match(FN_ARGS); - if (!match) { - match = src.match(ARROW_FN_ARGS); - } - if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src) - let [, args] = match; - return args - .replace(/\s/g, '') - .split(FN_ARG_SPLIT) - .map((arg) => arg.replace(FN_ARG, '').trim()); - } - - /** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ - function autoInject(tasks, callback) { - var newTasks = {}; - - Object.keys(tasks).forEach(key => { - var taskFn = tasks[key]; - var params; - var fnIsAsync = isAsync(taskFn); - var hasNoDeps = - (!fnIsAsync && taskFn.length === 1) || - (fnIsAsync && taskFn.length === 0); - - if (Array.isArray(taskFn)) { - params = [...taskFn]; - taskFn = params.pop(); - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if ((taskFn.length === 0 && !fnIsAsync) && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = params.map(name => results[name]); - newArgs.push(taskCb); - wrapAsync(taskFn)(...newArgs); - } - }); - - return auto(newTasks, callback); - } - - // Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation - // used for queues. This implementation assumes that the node provided by the user can be modified - // to adjust the next and last properties. We implement only the minimal functionality - // for queue support. - class DLL { - constructor() { - this.head = this.tail = null; - this.length = 0; - } - - removeLink(node) { - if (node.prev) node.prev.next = node.next; - else this.head = node.next; - if (node.next) node.next.prev = node.prev; - else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; - } - - empty () { - while(this.head) this.shift(); - return this; - } - - insertAfter(node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode; - else this.tail = newNode; - node.next = newNode; - this.length += 1; - } - - insertBefore(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode; - else this.head = newNode; - node.prev = newNode; - this.length += 1; - } - - unshift(node) { - if (this.head) this.insertBefore(this.head, node); - else setInitial(this, node); - } - - push(node) { - if (this.tail) this.insertAfter(this.tail, node); - else setInitial(this, node); - } - - shift() { - return this.head && this.removeLink(this.head); - } - - pop() { - return this.tail && this.removeLink(this.tail); - } - - toArray() { - return [...this] - } - - *[Symbol.iterator] () { - var cur = this.head; - while (cur) { - yield cur.data; - cur = cur.next; - } - } - - remove (testFn) { - var curr = this.head; - while(curr) { - var {next} = curr; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; - } - } - - function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; - } - - function queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new RangeError('Concurrency must not be zero'); - } - - var _worker = wrapAsync(worker); - var numRunning = 0; - var workersList = []; - const events = { - error: [], - drain: [], - saturated: [], - unsaturated: [], - empty: [] - }; - - function on (event, handler) { - events[event].push(handler); - } - - function once (event, handler) { - const handleAndRemove = (...args) => { - off(event, handleAndRemove); - handler(...args); - }; - events[event].push(handleAndRemove); - } - - function off (event, handler) { - if (!event) return Object.keys(events).forEach(ev => events[ev] = []) - if (!handler) return events[event] = [] - events[event] = events[event].filter(ev => ev !== handler); - } - - function trigger (event, ...args) { - events[event].forEach(handler => handler(...args)); - } - - var processingScheduled = false; - function _insert(data, insertAtFront, rejectOnError, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - - var res, rej; - function promiseCallback (err, ...args) { - // we don't care about the error, let the global error handler - // deal with it - if (err) return rejectOnError ? rej(err) : res() - if (args.length <= 1) return res(args[0]) - res(args); - } - - var item = { - data, - callback: rejectOnError ? - promiseCallback : - (callback || promiseCallback) - }; - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - - if (!processingScheduled) { - processingScheduled = true; - setImmediate$1(() => { - processingScheduled = false; - q.process(); - }); - } - - if (rejectOnError || !callback) { - return new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }) - } - } - - function _createCB(tasks) { - return function (err, ...args) { - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = workersList.indexOf(task); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback(err, ...args); - - if (err != null) { - trigger('error', err, task.data); - } - } - - if (numRunning <= (q.concurrency - q.buffer) ) { - trigger('unsaturated'); - } - - if (q.idle()) { - trigger('drain'); - } - q.process(); - }; - } - - function _maybeDrain(data) { - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - setImmediate$1(() => trigger('drain')); - return true - } - return false - } - - const eventMethod = (name) => (handler) => { - if (!handler) { - return new Promise((resolve, reject) => { - once(name, (err, data) => { - if (err) return reject(err) - resolve(data); - }); - }) - } - off(name); - on(name, handler); - - }; - - var isProcessing = false; - var q = { - _tasks: new DLL(), - *[Symbol.iterator] () { - yield* q._tasks[Symbol.iterator](); - }, - concurrency, - payload, - buffer: concurrency / 4, - started: false, - paused: false, - push (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, false, false, callback)) - } - return _insert(data, false, false, callback); - }, - pushAsync (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, false, true, callback)) - } - return _insert(data, false, true, callback); - }, - kill () { - off(); - q._tasks.empty(); - }, - unshift (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, true, false, callback)) - } - return _insert(data, true, false, callback); - }, - unshiftAsync (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, true, true, callback)) - } - return _insert(data, true, true, callback); - }, - remove (testFn) { - q._tasks.remove(testFn); - }, - process () { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while(!q.paused && numRunning < q.concurrency && q._tasks.length){ - var tasks = [], data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - trigger('empty'); - } - - if (numRunning === q.concurrency) { - trigger('saturated'); - } - - var cb = onlyOnce(_createCB(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length () { - return q._tasks.length; - }, - running () { - return numRunning; - }, - workersList () { - return workersList; - }, - idle() { - return q._tasks.length + numRunning === 0; - }, - pause () { - q.paused = true; - }, - resume () { - if (q.paused === false) { return; } - q.paused = false; - setImmediate$1(q.process); - } - }; - // define these as fixed properties, so people get useful errors when updating - Object.defineProperties(q, { - saturated: { - writable: false, - value: eventMethod('saturated') - }, - unsaturated: { - writable: false, - value: eventMethod('unsaturated') - }, - empty: { - writable: false, - value: eventMethod('empty') - }, - drain: { - writable: false, - value: eventMethod('drain') - }, - error: { - writable: false, - value: eventMethod('error') - }, - }); - return q; - } - - /** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.reduce(fileList, 0, getFileSizeInBytes); - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function reduce(coll, memo, iteratee, callback) { - callback = once(callback); - var _iteratee = wrapAsync(iteratee); - return eachOfSeries$1(coll, (x, i, iterCb) => { - _iteratee(memo, x, (err, v) => { - memo = v; - iterCb(err); - }); - }, err => callback(err, memo)); - } - var reduce$1 = awaitify(reduce, 4); - - /** - * Version of the compose function that is more natural to read. Each function - * consumes the return value of the previous function. It is the equivalent of - * [compose]{@link module:ControlFlow.compose} with the arguments reversed. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name seq - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.compose]{@link module:ControlFlow.compose} - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} a function that composes the `functions` in order - * @example - * - * // Requires lodash (or underscore), express3 and dresende's orm2. - * // Part of an app, that fetches cats of the logged user. - * // This example uses `seq` function to avoid overnesting and error - * // handling clutter. - * app.get('/cats', function(request, response) { - * var User = request.models.User; - * async.seq( - * User.get.bind(User), // 'User.get' has signature (id, callback(err, data)) - * function(user, fn) { - * user.getCats(fn); // 'getCats' has signature (callback(err, data)) - * } - * )(req.session.user_id, function (err, cats) { - * if (err) { - * console.error(err); - * response.json({ status: 'error', message: err.message }); - * } else { - * response.json({ status: 'ok', message: 'Cats found', data: cats }); - * } - * }); - * }); - */ - function seq(...functions) { - var _functions = functions.map(wrapAsync); - return function (...args) { - var that = this; - - var cb = args[args.length - 1]; - if (typeof cb == 'function') { - args.pop(); - } else { - cb = promiseCallback(); - } - - reduce$1(_functions, args, (newargs, fn, iterCb) => { - fn.apply(that, newargs.concat((err, ...nextargs) => { - iterCb(err, nextargs); - })); - }, - (err, results) => cb(err, ...results)); - - return cb[PROMISE_SYMBOL] - }; - } - - /** - * Creates a function which is a composition of the passed asynchronous - * functions. Each function consumes the return value of the function that - * follows. Composing functions `f()`, `g()`, and `h()` would produce the result - * of `f(g(h()))`, only this version uses callbacks to obtain the return values. - * - * If the last argument to the composed function is not a function, a promise - * is returned when you call it. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name compose - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} an asynchronous function that is the composed - * asynchronous `functions` - * @example - * - * function add1(n, callback) { - * setTimeout(function () { - * callback(null, n + 1); - * }, 10); - * } - * - * function mul3(n, callback) { - * setTimeout(function () { - * callback(null, n * 3); - * }, 10); - * } - * - * var add1mul3 = async.compose(mul3, add1); - * add1mul3(4, function (err, result) { - * // result now equals 15 - * }); - */ - function compose(...args) { - return seq(...args.reverse()); - } - - /** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function mapLimit (coll, limit, iteratee, callback) { - return _asyncMap(eachOfLimit(limit), coll, iteratee, callback) - } - var mapLimit$1 = awaitify(mapLimit, 4); - - /** - * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. - * - * @name concatLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapLimit - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ - function concatLimit(coll, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val, iterCb) => { - _iteratee(val, (err, ...args) => { - if (err) return iterCb(err); - return iterCb(err, args); - }); - }, (err, mapResults) => { - var result = []; - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - result = result.concat(...mapResults[i]); - } - } - - return callback(err, result); - }); - } - var concatLimit$1 = awaitify(concatLimit, 4); - - /** - * Applies `iteratee` to each item in `coll`, concatenating the results. Returns - * the concatenated list. The `iteratee`s are called in parallel, and the - * results are concatenated as they return. The results array will be returned in - * the original order of `coll` passed to the `iteratee` function. - * - * @name concat - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @alias flatMap - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * let directoryList = ['dir1','dir2','dir3']; - * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4']; - * - * // Using callbacks - * async.concat(directoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.concat(directoryList, fs.readdir) - * .then(results => { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir) - * .then(results => { - * console.log(results); - * }).catch(err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.concat(directoryList, fs.readdir); - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.concat(withMissingDirectoryList, fs.readdir); - * console.log(results); - * } catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } - * } - * - */ - function concat(coll, iteratee, callback) { - return concatLimit$1(coll, Infinity, iteratee, callback) - } - var concat$1 = awaitify(concat, 3); - - /** - * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. - * - * @name concatSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapSeries - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`. - * The iteratee should complete with an array an array of results. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ - function concatSeries(coll, iteratee, callback) { - return concatLimit$1(coll, 1, iteratee, callback) - } - var concatSeries$1 = awaitify(concatSeries, 3); - - /** - * Returns a function that when called, calls-back with the values provided. - * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to - * [`auto`]{@link module:ControlFlow.auto}. - * - * @name constant - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {...*} arguments... - Any number of arguments to automatically invoke - * callback with. - * @returns {AsyncFunction} Returns a function that when invoked, automatically - * invokes the callback with the previous given arguments. - * @example - * - * async.waterfall([ - * async.constant(42), - * function (value, next) { - * // value === 42 - * }, - * //... - * ], callback); - * - * async.waterfall([ - * async.constant(filename, "utf8"), - * fs.readFile, - * function (fileData, next) { - * //... - * } - * //... - * ], callback); - * - * async.auto({ - * hostname: async.constant("https://server.net/"), - * port: findFreePort, - * launchServer: ["hostname", "port", function (options, cb) { - * startServer(options, cb); - * }], - * //... - * }, callback); - */ - function constant(...args) { - return function (...ignoredArgs/*, callback*/) { - var callback = ignoredArgs.pop(); - return callback(null, ...args); - }; - } - - function _createTester(check, getResult) { - return (eachfn, arr, _iteratee, cb) => { - var testPassed = false; - var testResult; - const iteratee = wrapAsync(_iteratee); - eachfn(arr, (value, _, callback) => { - iteratee(value, (err, result) => { - if (err || err === false) return callback(err); - - if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - return callback(null, breakLoop); - } - callback(); - }); - }, err => { - if (err) return cb(err); - cb(null, testPassed ? testResult : getResult(false)); - }); - }; - } - - /** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * } - *); - * - * // Using Promises - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists) - * .then(result => { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists); - * console.log(result); - * // dir1/file1.txt - * // result now equals the file in the list that exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function detect(coll, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback) - } - var detect$1 = awaitify(detect, 3); - - /** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ - function detectLimit(coll, limit, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOfLimit(limit), coll, iteratee, callback) - } - var detectLimit$1 = awaitify(detectLimit, 4); - - /** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ - function detectSeries(coll, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOfLimit(1), coll, iteratee, callback) - } - - var detectSeries$1 = awaitify(detectSeries, 3); - - function consoleFunc(name) { - return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { - /* istanbul ignore else */ - if (typeof console === 'object') { - /* istanbul ignore else */ - if (err) { - /* istanbul ignore else */ - if (console.error) { - console.error(err); - } - } else if (console[name]) { /* istanbul ignore else */ - resultArgs.forEach(x => console[name](x)); - } - } - }) - } - - /** - * Logs the result of an [`async` function]{@link AsyncFunction} to the - * `console` using `console.dir` to display the properties of the resulting object. - * Only works in Node.js or in browsers that support `console.dir` and - * `console.error` (such as FF and Chrome). - * If multiple arguments are returned from the async function, - * `console.dir` is called on each argument in order. - * - * @name dir - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, {hello: name}); - * }, 1000); - * }; - * - * // in the node repl - * node> async.dir(hello, 'world'); - * {hello: 'world'} - */ - var dir = consoleFunc('dir'); - - /** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ - function doWhilst(iteratee, test, callback) { - callback = onlyOnce(callback); - var _fn = wrapAsync(iteratee); - var _test = wrapAsync(test); - var results; - - function next(err, ...args) { - if (err) return callback(err); - if (err === false) return; - results = args; - _test(...args, check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return check(null, true); - } - - var doWhilst$1 = awaitify(doWhilst, 3); - - /** - * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the - * argument ordering differs from `until`. - * - * @name doUntil - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee` - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ - function doUntil(iteratee, test, callback) { - const _test = wrapAsync(test); - return doWhilst$1(iteratee, (...args) => { - const cb = args.pop(); - _test(...args, (err, truth) => cb (err, !truth)); - }, callback); - } - - function _withoutIndex(iteratee) { - return (value, index, callback) => iteratee(value, callback); - } - - /** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt']; - * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt']; - * - * // asynchronous function that deletes a file - * const deleteFile = function(file, callback) { - * fs.unlink(file, callback); - * }; - * - * // Using callbacks - * async.each(fileList, deleteFile, function(err) { - * if( err ) { - * console.log(err); - * } else { - * console.log('All files have been deleted successfully'); - * } - * }); - * - * // Error Handling - * async.each(withMissingFileList, deleteFile, function(err){ - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using Promises - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using async/await - * async () => { - * try { - * await async.each(files, deleteFile); - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * await async.each(withMissingFileList, deleteFile); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * } - * } - * - */ - function eachLimit(coll, iteratee, callback) { - return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); - } - - var each = awaitify(eachLimit, 3); - - /** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachLimit$1(coll, limit, iteratee, callback) { - return eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); - } - var eachLimit$2 = awaitify(eachLimit$1, 4); - - /** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item - * in series and therefore the iteratee functions will complete in order. - - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachSeries(coll, iteratee, callback) { - return eachLimit$2(coll, 1, iteratee, callback) - } - var eachSeries$1 = awaitify(eachSeries, 3); - - /** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ - function ensureAsync(fn) { - if (isAsync(fn)) return fn; - return function (...args/*, callback*/) { - var callback = args.pop(); - var sync = true; - args.push((...innerArgs) => { - if (sync) { - setImmediate$1(() => callback(...innerArgs)); - } else { - callback(...innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }; - } - - /** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.every(fileList, fileExists, function(err, result) { - * console.log(result); - * // true - * // result is true since every file exists - * }); - * - * async.every(withMissingFileList, fileExists, function(err, result) { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }); - * - * // Using Promises - * async.every(fileList, fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.every(withMissingFileList, fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.every(fileList, fileExists); - * console.log(result); - * // true - * // result is true since every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.every(withMissingFileList, fileExists); - * console.log(result); - * // false - * // result is false since NOT every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function every(coll, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOf$1, coll, iteratee, callback) - } - var every$1 = awaitify(every, 3); - - /** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function everyLimit(coll, limit, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOfLimit(limit), coll, iteratee, callback) - } - var everyLimit$1 = awaitify(everyLimit, 4); - - /** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function everySeries(coll, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOfSeries$1, coll, iteratee, callback) - } - var everySeries$1 = awaitify(everySeries, 3); - - function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, (x, index, iterCb) => { - iteratee(x, (err, v) => { - truthValues[index] = !!v; - iterCb(err); - }); - }, err => { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); - } - - function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, (x, index, iterCb) => { - iteratee(x, (err, v) => { - if (err) return iterCb(err); - if (v) { - results.push({index, value: x}); - } - iterCb(err); - }); - }, err => { - if (err) return callback(err); - callback(null, results - .sort((a, b) => a.index - b.index) - .map(v => v.value)); - }); - } - - function _filter(eachfn, coll, iteratee, callback) { - var filter = isArrayLike(coll) ? filterArray : filterGeneric; - return filter(eachfn, coll, wrapAsync(iteratee), callback); - } - - /** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.filter(files, fileExists, function(err, results) { - * if(err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * }); - * - * // Using Promises - * async.filter(files, fileExists) - * .then(results => { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.filter(files, fileExists); - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function filter (coll, iteratee, callback) { - return _filter(eachOf$1, coll, iteratee, callback) - } - var filter$1 = awaitify(filter, 3); - - /** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - */ - function filterLimit (coll, limit, iteratee, callback) { - return _filter(eachOfLimit(limit), coll, iteratee, callback) - } - var filterLimit$1 = awaitify(filterLimit, 4); - - /** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - * @returns {Promise} a promise, if no callback provided - */ - function filterSeries (coll, iteratee, callback) { - return _filter(eachOfSeries$1, coll, iteratee, callback) - } - var filterSeries$1 = awaitify(filterSeries, 3); - - /** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @returns {Promise} a promise that rejects if an error occurs and an errback - * is not passed - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ - function forever(fn, errback) { - var done = onlyOnce(errback); - var task = wrapAsync(ensureAsync(fn)); - - function next(err) { - if (err) return done(err); - if (err === false) return; - task(next); - } - return next(); - } - var forever$1 = awaitify(forever, 2); - - /** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ - function groupByLimit(coll, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val, iterCb) => { - _iteratee(val, (err, key) => { - if (err) return iterCb(err); - return iterCb(err, {key, val}); - }); - }, (err, mapResults) => { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var {hasOwnProperty} = Object.prototype; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var {key} = mapResults[i]; - var {val} = mapResults[i]; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); - } - - var groupByLimit$1 = awaitify(groupByLimit, 4); - - /** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const files = ['dir1/file1.txt','dir2','dir4'] - * - * // asynchronous function that detects file type as none, file, or directory - * function detectFile(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(null, 'none'); - * } - * callback(null, stat.isDirectory() ? 'directory' : 'file'); - * }); - * } - * - * //Using callbacks - * async.groupBy(files, detectFile, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * }); - * - * // Using Promises - * async.groupBy(files, detectFile) - * .then( result => { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.groupBy(files, detectFile); - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function groupBy (coll, iteratee, callback) { - return groupByLimit$1(coll, Infinity, iteratee, callback) - } - - /** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whose - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ - function groupBySeries (coll, iteratee, callback) { - return groupByLimit$1(coll, 1, iteratee, callback) - } - - /** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ - var log = consoleFunc('log'); - - /** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ - function mapValuesLimit(obj, limit, iteratee, callback) { - callback = once(callback); - var newObj = {}; - var _iteratee = wrapAsync(iteratee); - return eachOfLimit(limit)(obj, (val, key, next) => { - _iteratee(val, key, (err, result) => { - if (err) return next(err); - newObj[key] = result; - next(err); - }); - }, err => callback(err, newObj)); - } - - var mapValuesLimit$1 = awaitify(mapValuesLimit, 4); - - /** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file3.txt' - * }; - * - * const withMissingFileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file4.txt' - * }; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, key, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.mapValues(fileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * }); - * - * // Error handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(result); - * } - * }); - * - * // Using Promises - * async.mapValues(fileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * }).catch (err => { - * console.log(err); - * }); - * - * // Error Handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch (err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.mapValues(fileMap, getFileSizeInBytes); - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.mapValues(withMissingFileMap, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function mapValues(obj, iteratee, callback) { - return mapValuesLimit$1(obj, Infinity, iteratee, callback) - } - - /** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ - function mapValuesSeries(obj, iteratee, callback) { - return mapValuesLimit$1(obj, 1, iteratee, callback) - } - - /** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * **Note: if the async function errs, the result will not be cached and - * subsequent calls will call the wrapped function.** - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ - function memoize(fn, hasher = v => v) { - var memo = Object.create(null); - var queues = Object.create(null); - var _fn = wrapAsync(fn); - var memoized = initialParams((args, callback) => { - var key = hasher(...args); - if (key in memo) { - setImmediate$1(() => callback(null, ...memo[key])); - } else if (key in queues) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn(...args, (err, ...resultArgs) => { - // #1465 don't memoize if an error occurred - if (!err) { - memo[key] = resultArgs; - } - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i](err, ...resultArgs); - } - }); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - } - - /* istanbul ignore file */ - - /** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ - var _defer$1; - - if (hasNextTick) { - _defer$1 = process.nextTick; - } else if (hasSetImmediate) { - _defer$1 = setImmediate; - } else { - _defer$1 = fallback; - } - - var nextTick = wrap(_defer$1); - - var _parallel = awaitify((eachfn, tasks, callback) => { - var results = isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, (task, key, taskCb) => { - wrapAsync(task)((err, ...result) => { - if (result.length < 2) { - [result] = result; - } - results[key] = result; - taskCb(err); - }); - }, err => callback(err, results)); - }, 3); - - /** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * - * //Using Callbacks - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function parallel(tasks, callback) { - return _parallel(eachOf$1, tasks, callback); - } - - /** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - */ - function parallelLimit(tasks, limit, callback) { - return _parallel(eachOfLimit(limit), tasks, callback); - } - - /** - * A queue of tasks for the worker function to complete. - * @typedef {Iterable} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {number} payload - an integer that specifies how many items are - * passed to the worker function at a time. only applies if this is a - * [cargo]{@link module:ControlFlow.cargo} object - * @property {AsyncFunction} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {AsyncFunction} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {AsyncFunction} pushAsync - the same as `q.push`, except this returns - * a promise that rejects if an error occurs. - * @property {AsyncFunction} unshiftAsync - the same as `q.unshift`, except this returns - * a promise that rejects if an error occurs. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a function that sets a callback that is - * called when the number of running workers hits the `concurrency` limit, and - * further tasks will be queued. If the callback is omitted, `q.saturated()` - * returns a promise for the next occurrence. - * @property {Function} unsaturated - a function that sets a callback that is - * called when the number of running workers is less than the `concurrency` & - * `buffer` limits, and further tasks will not be queued. If the callback is - * omitted, `q.unsaturated()` returns a promise for the next occurrence. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a function that sets a callback that is called - * when the last item from the `queue` is given to a `worker`. If the callback - * is omitted, `q.empty()` returns a promise for the next occurrence. - * @property {Function} drain - a function that sets a callback that is called - * when the last item from the `queue` has returned from the `worker`. If the - * callback is omitted, `q.drain()` returns a promise for the next occurrence. - * @property {Function} error - a function that sets a callback that is called - * when a task errors. Has the signature `function(error, task)`. If the - * callback is omitted, `error()` returns a promise that rejects on the next - * error. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - * - * @example - * const q = async.queue(worker, 2) - * q.push(item1) - * q.push(item2) - * q.push(item3) - * // queues are iterable, spread into an array to inspect - * const items = [...q] // [item1, item2, item3] - * // or use for of - * for (let item of q) { - * console.log(item) - * } - * - * q.drain(() => { - * console.log('all done') - * }) - * // or - * await q.drain() - */ - - /** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can be - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain(function() { - * console.log('all items have been processed'); - * }); - * // or await the end - * await q.drain() - * - * // assign an error callback - * q.error(function(err, task) { - * console.error('task experienced an error'); - * }); - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * // callback is optional - * q.push({name: 'bar'}); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ - function queue$1 (worker, concurrency) { - var _worker = wrapAsync(worker); - return queue((items, cb) => { - _worker(items[0], cb); - }, concurrency, 1); - } - - // Binary min-heap implementation used for priority queue. - // Implementation is stable, i.e. push time is considered for equal priorities - class Heap { - constructor() { - this.heap = []; - this.pushCount = Number.MIN_SAFE_INTEGER; - } - - get length() { - return this.heap.length; - } - - empty () { - this.heap = []; - return this; - } - - percUp(index) { - let p; - - while (index > 0 && smaller(this.heap[index], this.heap[p=parent(index)])) { - let t = this.heap[index]; - this.heap[index] = this.heap[p]; - this.heap[p] = t; - - index = p; - } - } - - percDown(index) { - let l; - - while ((l=leftChi(index)) < this.heap.length) { - if (l+1 < this.heap.length && smaller(this.heap[l+1], this.heap[l])) { - l = l+1; - } - - if (smaller(this.heap[index], this.heap[l])) { - break; - } - - let t = this.heap[index]; - this.heap[index] = this.heap[l]; - this.heap[l] = t; - - index = l; - } - } - - push(node) { - node.pushCount = ++this.pushCount; - this.heap.push(node); - this.percUp(this.heap.length-1); - } - - unshift(node) { - return this.heap.push(node); - } - - shift() { - let [top] = this.heap; - - this.heap[0] = this.heap[this.heap.length-1]; - this.heap.pop(); - this.percDown(0); - - return top; - } - - toArray() { - return [...this]; - } - - *[Symbol.iterator] () { - for (let i = 0; i < this.heap.length; i++) { - yield this.heap[i].data; - } - } - - remove (testFn) { - let j = 0; - for (let i = 0; i < this.heap.length; i++) { - if (!testFn(this.heap[i])) { - this.heap[j] = this.heap[i]; - j++; - } - } - - this.heap.splice(j); - - for (let i = parent(this.heap.length-1); i >= 0; i--) { - this.percDown(i); - } - - return this; - } - } - - function leftChi(i) { - return (i<<1)+1; - } - - function parent(i) { - return ((i+1)>>1)-1; - } - - function smaller(x, y) { - if (x.priority !== y.priority) { - return x.priority < y.priority; - } - else { - return x.pushCount < y.pushCount; - } - } - - /** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * The `unshift` method was removed. - */ - function priorityQueue(worker, concurrency) { - // Start with a normal queue - var q = queue$1(worker, concurrency); - var processingScheduled = false; - - q._tasks = new Heap(); - - // Override push to accept second parameter representing priority - q.push = function(data, priority = 0, callback = () => {}) { - if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!Array.isArray(data)) { - data = [data]; - } - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return setImmediate$1(() => q.drain()); - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - priority, - callback - }; - - q._tasks.push(item); - } - - if (!processingScheduled) { - processingScheduled = true; - setImmediate$1(() => { - processingScheduled = false; - q.process(); - }); - } - }; - - // Remove unshift function - delete q.unshift; - - return q; - } - - /** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns undefined - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ - function race(tasks, callback) { - callback = once(callback); - if (!Array.isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - wrapAsync(tasks[i])(callback); - } - } - - var race$1 = awaitify(race, 2); - - /** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - */ - function reduceRight (array, memo, iteratee, callback) { - var reversed = [...array].reverse(); - return reduce$1(reversed, memo, iteratee, callback); - } - - /** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ - function reflect(fn) { - var _fn = wrapAsync(fn); - return initialParams(function reflectOn(args, reflectCallback) { - args.push((error, ...cbArgs) => { - let retVal = {}; - if (error) { - retVal.error = error; - } - if (cbArgs.length > 0){ - var value = cbArgs; - if (cbArgs.length <= 1) { - [value] = cbArgs; - } - retVal.value = value; - } - reflectCallback(null, retVal); - }); - - return _fn.apply(this, args); - }); - } - - /** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ - function reflectAll(tasks) { - var results; - if (Array.isArray(tasks)) { - results = tasks.map(reflect); - } else { - results = {}; - Object.keys(tasks).forEach(key => { - results[key] = reflect.call(this, tasks[key]); - }); - } - return results; - } - - function reject(eachfn, arr, _iteratee, callback) { - const iteratee = wrapAsync(_iteratee); - return _filter(eachfn, arr, (value, cb) => { - iteratee(value, (err, v) => { - cb(err, !v); - }); - }, callback); - } - - /** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.reject(fileList, fileExists, function(err, results) { - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }); - * - * // Using Promises - * async.reject(fileList, fileExists) - * .then( results => { - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.reject(fileList, fileExists); - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function reject$1 (coll, iteratee, callback) { - return reject(eachOf$1, coll, iteratee, callback) - } - var reject$2 = awaitify(reject$1, 3); - - /** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function rejectLimit (coll, limit, iteratee, callback) { - return reject(eachOfLimit(limit), coll, iteratee, callback) - } - var rejectLimit$1 = awaitify(rejectLimit, 4); - - /** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function rejectSeries (coll, iteratee, callback) { - return reject(eachOfSeries$1, coll, iteratee, callback) - } - var rejectSeries$1 = awaitify(rejectSeries, 3); - - function constant$1(value) { - return function () { - return value; - } - } - - /** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * @returns {Promise} a promise if no callback provided - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ - const DEFAULT_TIMES = 5; - const DEFAULT_INTERVAL = 0; - - function retry(opts, task, callback) { - var options = { - times: DEFAULT_TIMES, - intervalFunc: constant$1(DEFAULT_INTERVAL) - }; - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || promiseCallback(); - task = opts; - } else { - parseTimes(options, opts); - callback = callback || promiseCallback(); - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = wrapAsync(task); - - var attempt = 1; - function retryAttempt() { - _task((err, ...args) => { - if (err === false) return - if (err && attempt++ < options.times && - (typeof options.errorFilter != 'function' || - options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); - } else { - callback(err, ...args); - } - }); - } - - retryAttempt(); - return callback[PROMISE_SYMBOL] - } - - function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? - t.interval : - constant$1(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } - } - - /** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry`, except for a `opts.arity` that - * is the arity of the `task` function, defaulting to `task.length` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ - function retryable (opts, task) { - if (!task) { - task = opts; - opts = null; - } - let arity = (opts && opts.arity) || task.length; - if (isAsync(task)) { - arity += 1; - } - var _task = wrapAsync(task); - return initialParams((args, callback) => { - if (args.length < arity - 1 || callback == null) { - args.push(callback); - callback = promiseCallback(); - } - function taskFn(cb) { - _task(...args, cb); - } - - if (opts) retry(opts, taskFn, callback); - else retry(taskFn, callback); - - return callback[PROMISE_SYMBOL] - }); - } - - /** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @return {Promise} a promise, if no callback is passed - * @example - * - * //Using Callbacks - * async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] - * }); - * - * // an example using objects instead of arrays - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.series([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function series(tasks, callback) { - return _parallel(eachOfSeries$1, tasks, callback); - } - - /** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - *); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // false - * // result is false since none of the files exists - * } - *); - * - * // Using Promises - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since some file in the list exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since none of the files exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists); - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists); - * console.log(result); - * // false - * // result is false since none of the files exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function some(coll, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOf$1, coll, iteratee, callback) - } - var some$1 = awaitify(some, 3); - - /** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function someLimit(coll, limit, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOfLimit(limit), coll, iteratee, callback) - } - var someLimit$1 = awaitify(someLimit, 4); - - /** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function someSeries(coll, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOfSeries$1, coll, iteratee, callback) - } - var someSeries$1 = awaitify(someSeries, 3); - - /** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @returns {Promise} a promise, if no callback passed - * @example - * - * // bigfile.txt is a file that is 251100 bytes in size - * // mediumfile.txt is a file that is 11000 bytes in size - * // smallfile.txt is a file that is 121 bytes in size - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) return callback(getFileSizeErr); - * callback(null, fileSize); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // descending order - * async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) { - * return callback(getFileSizeErr); - * } - * callback(null, fileSize * -1); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'bigfile.txt', 'mediumfile.txt', 'smallfile.txt'] - * } - * } - * ); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * } - * ); - * - * // Using Promises - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * (async () => { - * try { - * let results = await async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * // Error handling - * async () => { - * try { - * let results = await async.sortBy(['missingfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function sortBy (coll, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return map$1(coll, (x, iterCb) => { - _iteratee(x, (err, criteria) => { - if (err) return iterCb(err); - iterCb(err, {value: x, criteria}); - }); - }, (err, results) => { - if (err) return callback(err); - callback(null, results.sort(comparator).map(v => v.value)); - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } - } - var sortBy$1 = awaitify(sortBy, 3); - - /** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ - function timeout(asyncFn, milliseconds, info) { - var fn = wrapAsync(asyncFn); - - return initialParams((args, callback) => { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push((...cbArgs) => { - if (!timedOut) { - callback(...cbArgs); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn(...args); - }); - } - - function range(size) { - var result = Array(size); - while (size--) { - result[size] = size; - } - return result; - } - - /** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ - function timesLimit(count, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(range(count), limit, _iteratee, callback); - } - - /** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ - function times (n, iteratee, callback) { - return timesLimit(n, Infinity, iteratee, callback) - } - - /** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ - function timesSeries (n, iteratee, callback) { - return timesLimit(n, 1, iteratee, callback) - } - - /** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in parallel, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileList, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * }); - * - * // Using Promises - * async.transform(fileList, transformFileSize) - * .then(result => { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * (async () => { - * try { - * let result = await async.transform(fileList, transformFileSize); - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' }; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileMap, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * }); - * - * // Using Promises - * async.transform(fileMap, transformFileSize) - * .then(result => { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.transform(fileMap, transformFileSize); - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function transform (coll, accumulator, iteratee, callback) { - if (arguments.length <= 3 && typeof accumulator === 'function') { - callback = iteratee; - iteratee = accumulator; - accumulator = Array.isArray(coll) ? [] : {}; - } - callback = once(callback || promiseCallback()); - var _iteratee = wrapAsync(iteratee); - - eachOf$1(coll, (v, k, cb) => { - _iteratee(accumulator, v, k, cb); - }, err => callback(err, accumulator)); - return callback[PROMISE_SYMBOL] - } - - /** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ - function tryEach(tasks, callback) { - var error = null; - var result; - return eachSeries$1(tasks, (task, taskCb) => { - wrapAsync(task)((err, ...args) => { - if (err === false) return taskCb(err); - - if (args.length < 2) { - [result] = args; - } else { - result = args; - } - error = err; - taskCb(err ? null : {}); - }); - }, () => callback(error, result)); - } - - var tryEach$1 = awaitify(tryEach); - - /** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ - function unmemoize(fn) { - return (...args) => { - return (fn.unmemoized || fn)(...args); - }; - } - - /** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - * @example - * - * var count = 0; - * async.whilst( - * function test(cb) { cb(null, count < 5); }, - * function iter(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ - function whilst(test, iteratee, callback) { - callback = onlyOnce(callback); - var _fn = wrapAsync(iteratee); - var _test = wrapAsync(test); - var results = []; - - function next(err, ...rest) { - if (err) return callback(err); - results = rest; - if (err === false) return; - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return _test(check); - } - var whilst$1 = awaitify(whilst, 3); - - /** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (callback). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * const results = [] - * let finished = false - * async.until(function test(cb) { - * cb(null, finished) - * }, function iter(next) { - * fetchPage(url, (err, body) => { - * if (err) return next(err) - * results = results.concat(body.objects) - * finished = !!body.next - * next(err) - * }) - * }, function done (err) { - * // all pages have been fetched - * }) - */ - function until(test, iteratee, callback) { - const _test = wrapAsync(test); - return whilst$1((cb) => _test((err, truth) => cb (err, !truth)), iteratee, callback); - } - - /** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns undefined - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ - function waterfall (tasks, callback) { - callback = once(callback); - if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = wrapAsync(tasks[taskIndex++]); - task(...args, onlyOnce(next)); - } - - function next(err, ...args) { - if (err === false) return - if (err || taskIndex === tasks.length) { - return callback(err, ...args); - } - nextTask(args); - } - - nextTask([]); - } - - var waterfall$1 = awaitify(waterfall); - - /** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - - var index = { - apply, - applyEach: applyEach$1, - applyEachSeries, - asyncify, - auto, - autoInject, - cargo, - cargoQueue: cargo$1, - compose, - concat: concat$1, - concatLimit: concatLimit$1, - concatSeries: concatSeries$1, - constant, - detect: detect$1, - detectLimit: detectLimit$1, - detectSeries: detectSeries$1, - dir, - doUntil, - doWhilst: doWhilst$1, - each, - eachLimit: eachLimit$2, - eachOf: eachOf$1, - eachOfLimit: eachOfLimit$2, - eachOfSeries: eachOfSeries$1, - eachSeries: eachSeries$1, - ensureAsync, - every: every$1, - everyLimit: everyLimit$1, - everySeries: everySeries$1, - filter: filter$1, - filterLimit: filterLimit$1, - filterSeries: filterSeries$1, - forever: forever$1, - groupBy, - groupByLimit: groupByLimit$1, - groupBySeries, - log, - map: map$1, - mapLimit: mapLimit$1, - mapSeries: mapSeries$1, - mapValues, - mapValuesLimit: mapValuesLimit$1, - mapValuesSeries, - memoize, - nextTick, - parallel, - parallelLimit, - priorityQueue, - queue: queue$1, - race: race$1, - reduce: reduce$1, - reduceRight, - reflect, - reflectAll, - reject: reject$2, - rejectLimit: rejectLimit$1, - rejectSeries: rejectSeries$1, - retry, - retryable, - seq, - series, - setImmediate: setImmediate$1, - some: some$1, - someLimit: someLimit$1, - someSeries: someSeries$1, - sortBy: sortBy$1, - timeout, - times, - timesLimit, - timesSeries, - transform, - tryEach: tryEach$1, - unmemoize, - until, - waterfall: waterfall$1, - whilst: whilst$1, - - // aliases - all: every$1, - allLimit: everyLimit$1, - allSeries: everySeries$1, - any: some$1, - anyLimit: someLimit$1, - anySeries: someSeries$1, - find: detect$1, - findLimit: detectLimit$1, - findSeries: detectSeries$1, - flatMap: concat$1, - flatMapLimit: concatLimit$1, - flatMapSeries: concatSeries$1, - forEach: each, - forEachSeries: eachSeries$1, - forEachLimit: eachLimit$2, - forEachOf: eachOf$1, - forEachOfSeries: eachOfSeries$1, - forEachOfLimit: eachOfLimit$2, - inject: reduce$1, - foldl: reduce$1, - foldr: reduceRight, - select: filter$1, - selectLimit: filterLimit$1, - selectSeries: filterSeries$1, - wrapSync: asyncify, - during: whilst$1, - doDuring: doWhilst$1 - }; - - exports.default = index; - exports.apply = apply; - exports.applyEach = applyEach$1; - exports.applyEachSeries = applyEachSeries; - exports.asyncify = asyncify; - exports.auto = auto; - exports.autoInject = autoInject; - exports.cargo = cargo; - exports.cargoQueue = cargo$1; - exports.compose = compose; - exports.concat = concat$1; - exports.concatLimit = concatLimit$1; - exports.concatSeries = concatSeries$1; - exports.constant = constant; - exports.detect = detect$1; - exports.detectLimit = detectLimit$1; - exports.detectSeries = detectSeries$1; - exports.dir = dir; - exports.doUntil = doUntil; - exports.doWhilst = doWhilst$1; - exports.each = each; - exports.eachLimit = eachLimit$2; - exports.eachOf = eachOf$1; - exports.eachOfLimit = eachOfLimit$2; - exports.eachOfSeries = eachOfSeries$1; - exports.eachSeries = eachSeries$1; - exports.ensureAsync = ensureAsync; - exports.every = every$1; - exports.everyLimit = everyLimit$1; - exports.everySeries = everySeries$1; - exports.filter = filter$1; - exports.filterLimit = filterLimit$1; - exports.filterSeries = filterSeries$1; - exports.forever = forever$1; - exports.groupBy = groupBy; - exports.groupByLimit = groupByLimit$1; - exports.groupBySeries = groupBySeries; - exports.log = log; - exports.map = map$1; - exports.mapLimit = mapLimit$1; - exports.mapSeries = mapSeries$1; - exports.mapValues = mapValues; - exports.mapValuesLimit = mapValuesLimit$1; - exports.mapValuesSeries = mapValuesSeries; - exports.memoize = memoize; - exports.nextTick = nextTick; - exports.parallel = parallel; - exports.parallelLimit = parallelLimit; - exports.priorityQueue = priorityQueue; - exports.queue = queue$1; - exports.race = race$1; - exports.reduce = reduce$1; - exports.reduceRight = reduceRight; - exports.reflect = reflect; - exports.reflectAll = reflectAll; - exports.reject = reject$2; - exports.rejectLimit = rejectLimit$1; - exports.rejectSeries = rejectSeries$1; - exports.retry = retry; - exports.retryable = retryable; - exports.seq = seq; - exports.series = series; - exports.setImmediate = setImmediate$1; - exports.some = some$1; - exports.someLimit = someLimit$1; - exports.someSeries = someSeries$1; - exports.sortBy = sortBy$1; - exports.timeout = timeout; - exports.times = times; - exports.timesLimit = timesLimit; - exports.timesSeries = timesSeries; - exports.transform = transform; - exports.tryEach = tryEach$1; - exports.unmemoize = unmemoize; - exports.until = until; - exports.waterfall = waterfall$1; - exports.whilst = whilst$1; - exports.all = every$1; - exports.allLimit = everyLimit$1; - exports.allSeries = everySeries$1; - exports.any = some$1; - exports.anyLimit = someLimit$1; - exports.anySeries = someSeries$1; - exports.find = detect$1; - exports.findLimit = detectLimit$1; - exports.findSeries = detectSeries$1; - exports.flatMap = concat$1; - exports.flatMapLimit = concatLimit$1; - exports.flatMapSeries = concatSeries$1; - exports.forEach = each; - exports.forEachSeries = eachSeries$1; - exports.forEachLimit = eachLimit$2; - exports.forEachOf = eachOf$1; - exports.forEachOfSeries = eachOfSeries$1; - exports.forEachOfLimit = eachOfLimit$2; - exports.inject = reduce$1; - exports.foldl = reduce$1; - exports.foldr = reduceRight; - exports.select = filter$1; - exports.selectLimit = filterLimit$1; - exports.selectSeries = filterSeries$1; - exports.wrapSync = asyncify; - exports.during = whilst$1; - exports.doDuring = doWhilst$1; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/general/nvim/node_modules/async/dist/async.min.js b/general/nvim/node_modules/async/dist/async.min.js deleted file mode 100644 index 63aa33c..0000000 --- a/general/nvim/node_modules/async/dist/async.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.async={})})(this,function(e){'use strict';function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}function a(e){setTimeout(e,0)}function i(e){return(t,...n)=>e(()=>t(...n))}function r(e){return u(e)?function(...t){const n=t.pop(),a=e.apply(this,t);return s(a,n)}:n(function(t,n){var a;try{a=e.apply(this,t)}catch(t){return n(t)}return a&&"function"==typeof a.then?s(a,n):void n(null,a)})}function s(e,t){return e.then(e=>{l(t,null,e)},e=>{l(t,e&&e.message?e:new Error(e))})}function l(e,t,n){try{e(t,n)}catch(e){be(t=>{throw t},e)}}function u(e){return"AsyncFunction"===e[Symbol.toStringTag]}function d(e){return"AsyncGenerator"===e[Symbol.toStringTag]}function c(e){return"function"==typeof e[Symbol.asyncIterator]}function p(e){if("function"!=typeof e)throw new Error("expected a function");return u(e)?r(e):e}function o(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise((a,i)=>{n[t-1]=(e,...t)=>e?i(e):void a(1{p(e).apply(i,n.concat(t))},a)});return a}}function f(e,t,n,a){t=t||[];var i=[],r=0,s=p(n);return e(t,(e,t,n)=>{var a=r++;s(e,(e,t)=>{i[a]=t,n(e)})},e=>{a(e,i)})}function y(e){return e&&"number"==typeof e.length&&0<=e.length&&0==e.length%1}function m(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function g(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function k(e){var t=-1,n=e.length;return function(){return++t=t||d||l||(d=!0,e.next().then(({value:e,done:t})=>{if(!(u||l))return d=!1,t?(l=!0,void(0>=c&&a(null))):void(c++,n(e,p,r),p++,i())}).catch(s))}function r(e,t){return c-=1,u?void 0:e?s(e):!1===e?(l=!0,void(u=!0)):t===_e||l&&0>=c?(l=!0,a(null)):void i()}function s(e){u||(d=!1,l=!0,a(e))}let l=!1,u=!1,d=!1,c=0,p=0;i()}function O(e,t,n){function a(e,t){!1===e&&(l=!0);!0===l||(e?n(e):(++r===s||t===_e)&&n(null))}n=m(n);var i=0,r=0,{length:s}=e,l=!1;for(0===s&&n(null);i{t=e,n=a}),e}function M(e,t,n){function a(e,t){g.push(()=>l(e,t))}function i(){if(!h){if(0===g.length&&0===o)return n(null,c);for(;g.length&&oe()),i()}function l(e,t){if(!f){var a=L((t,...a)=>{if(o--,!1===t)return void(h=!0);if(2>a.length&&([a]=a),t){var i={};if(Object.keys(c).forEach(e=>{i[e]=c[e]}),i[e]=a,f=!0,y=Object.create(null),h)return;n(t,i)}else c[e]=a,s(e)});o++;var i=p(t[t.length-1]);1{const i=e[a];Array.isArray(i)&&0<=i.indexOf(t)&&n.push(a)}),n}"number"!=typeof t&&(n=t,t=null),n=m(n||_());var d=Object.keys(e).length;if(!d)return n(null);t||(t=d);var c={},o=0,h=!1,f=!1,y=Object.create(null),g=[],k=[],v={};return Object.keys(e).forEach(t=>{var n=e[t];if(!Array.isArray(n))return a(t,[n]),void k.push(t);var i=n.slice(0,n.length-1),s=i.length;return 0===s?(a(t,n),void k.push(t)):void(v[t]=s,i.forEach(l=>{if(!e[l])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+l+"` in "+i.join(", "));r(l,()=>{s--,0===s&&a(t,n)})}))}),function(){for(var e,t=0;k.length;)e=k.pop(),t++,u(e).forEach(e=>{0==--v[e]&&k.push(e)});if(t!==d)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),i(),n[Ce]}function A(e){let t="",n=0,a=e.indexOf("*/");for(;ne.replace(Ne,"").trim())}function j(e,t){var n={};return Object.keys(e).forEach(t=>{function a(e,t){var n=i.map(t=>e[t]);n.push(t),p(r)(...n)}var i,r=e[t],s=u(r),l=!s&&1===r.length||s&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(0{r(e,n),t(...a)};f[e].push(n)}function r(e,t){return e?t?void(f[e]=f[e].filter(e=>e!==t)):f[e]=[]:Object.keys(f).forEach(e=>f[e]=[])}function s(e,...t){f[e].forEach(e=>e(...t))}function l(e,t,n,a){function i(e,...t){return e?n?s(e):r():1>=t.length?r(t[0]):void r(t)}if(null!=a&&"function"!=typeof a)throw new Error("task callback must be a function");k.started=!0;var r,s,l={data:e,callback:n?i:a||i};if(t?k._tasks.unshift(l):k._tasks.push(l),y||(y=!0,be(()=>{y=!1,k.process()})),n||!a)return new Promise((e,t)=>{r=e,s=t})}function u(e){return function(t,...n){o-=1;for(var a=0,r=e.length;as("drain")),!0)}if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var c=p(e),o=0,h=[];const f={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};var y=!1;const m=e=>t=>t?void(r(e),a(e,t)):new Promise((t,n)=>{i(e,(e,a)=>e?n(e):void t(a))});var g=!1,k={_tasks:new Ve,*[Symbol.iterator](){yield*k._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){return Array.isArray(e)?d(e)?void 0:e.map(e=>l(e,!1,!1,t)):l(e,!1,!1,t)},pushAsync(e,t){return Array.isArray(e)?d(e)?void 0:e.map(e=>l(e,!1,!0,t)):l(e,!1,!0,t)},kill(){r(),k._tasks.empty()},unshift(e,t){return Array.isArray(e)?d(e)?void 0:e.map(e=>l(e,!0,!1,t)):l(e,!0,!1,t)},unshiftAsync(e,t){return Array.isArray(e)?d(e)?void 0:e.map(e=>l(e,!0,!0,t)):l(e,!0,!0,t)},remove(e){k._tasks.remove(e)},process(){var e=Math.min;if(!g){for(g=!0;!k.paused&&o{t.apply(n,e.concat((e,...t)=>{a(e,t)}))},(e,t)=>a(e,...t)),a[Ce]}}function P(...e){return C(...e.reverse())}function R(...e){return function(...t){var n=t.pop();return n(null,...e)}}function z(e,t){return(n,a,i,r)=>{var s,l=!1;const u=p(i);n(a,(n,a,i)=>{u(n,(a,r)=>a||!1===a?i(a):e(r)&&!s?(l=!0,s=t(!0,n),i(null,_e)):void i())},e=>e?r(e):void r(null,l?s:t(!1)))}}function N(e){return(t,...n)=>p(t)(...n,(t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach(t=>console[e](t)))})}function V(e,t,n){const a=p(t);return Xe(e,(...e)=>{const t=e.pop();a(...e,(e,n)=>t(e,!n))},n)}function Y(e){return(t,n,a)=>e(t,a)}function q(e){return u(e)?e:function(...t){var n=t.pop(),a=!0;t.push((...e)=>{a?be(()=>n(...e)):n(...e)}),e.apply(this,t),a=!1}}function D(e,t,n,a){var r=Array(t.length);e(t,(e,t,a)=>{n(e,(e,n)=>{r[t]=!!n,a(e)})},e=>{if(e)return a(e);for(var n=[],s=0;s{n(e,(n,r)=>n?a(n):void(r&&i.push({index:t,value:e}),a(n)))},e=>e?a(e):void a(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value)))}function U(e,t,n,a){var i=y(t)?D:Q;return i(e,t,p(n),a)}function G(e,t,n){return ut(e,1/0,t,n)}function W(e,t,n){return ut(e,1,t,n)}function H(e,t,n){return ct(e,1/0,t,n)}function J(e,t,n){return ct(e,1,t,n)}function K(e,t=e=>e){var a=Object.create(null),r=Object.create(null),s=p(e),l=n((e,n)=>{var u=t(...e);u in a?be(()=>n(null,...a[u])):u in r?r[u].push(n):(r[u]=[n],s(...e,(e,...t)=>{e||(a[u]=t);var n=r[u];delete r[u];for(var s=0,d=n.length;s{n(e[0],t)},t,1)}function ee(e){return(e<<1)+1}function te(e){return(e+1>>1)-1}function ne(e,t){return e.priority===t.priority?e.pushCount{}){if("function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return be(()=>n.drain());for(var s,u=0,d=e.length;u{a=!1,n.process()}))},delete n.unshift,n}function ie(e,t,n,a){var i=[...e].reverse();return qe(i,t,n,a)}function re(e){var t=p(e);return n(function(e,n){return e.push((e,...t)=>{let a={};if(e&&(a.error=e),0=t.length&&([i]=t),a.value=i}n(null,a)}),t.apply(this,e)})}function se(e){var t;return Array.isArray(e)?t=e.map(re):(t={},Object.keys(e).forEach(n=>{t[n]=re.call(this,e[n])})),t}function le(e,t,n,a){const i=p(n);return U(e,t,(e,t)=>{i(e,(e,n)=>{t(e,!n)})},a)}function ue(e){return function(){return e}}function de(e,t,n){function a(){r((e,...t)=>{!1===e||(e&&s++arguments.length&&"function"==typeof e?(n=t||_(),t=e):(ce(i,e),n=n||_()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=p(t),s=1;return a(),n[Ce]}function ce(e,n){if("object"==typeof n)e.times=+n.times||kt,e.intervalFunc="function"==typeof n.interval?n.interval:ue(+n.interval||vt),e.errorFilter=n.errorFilter;else if("number"==typeof n||"string"==typeof n)e.times=+n||kt;else throw new Error("Invalid arguments for async.retry")}function pe(e,t){t||(t=e,e=null);let a=e&&e.arity||t.length;u(t)&&(a+=1);var i=p(t);return n((t,n)=>{function r(e){i(...t,e)}return(t.length{var s,l=!1;n.push((...e)=>{l||(r(...e),clearTimeout(s))}),s=setTimeout(function(){var t=e.name||"anonymous",n=new Error("Callback function \""+t+"\" timed out.");n.code="ETIMEDOUT",a&&(n.info=a),l=!0,r(n)},t),i(...n)})}function fe(e){for(var t=Array(e);e--;)t[e]=e;return t}function ye(e,t,n,a){var i=p(n);return De(fe(e),t,i,a)}function me(e,t,n){return ye(e,1/0,t,n)}function ge(e,t,n){return ye(e,1,t,n)}function ke(e,t,n,a){3>=arguments.length&&"function"==typeof t&&(a=n,n=t,t=Array.isArray(e)?[]:{}),a=m(a||_());var i=p(n);return Ie(e,(e,n,a)=>{i(t,e,n,a)},e=>a(e,t)),a[Ce]}function ve(e){return(...t)=>(e.unmemoized||e)(...t)}function Se(e,t,n){const a=p(e);return bt(e=>a((t,n)=>e(t,!n)),t,n)}var xe,Le="function"==typeof queueMicrotask&&queueMicrotask,Ee="function"==typeof setImmediate&&setImmediate,Oe="object"==typeof process&&"function"==typeof process.nextTick;xe=Le?queueMicrotask:Ee?setImmediate:Oe?process.nextTick:a;var be=i(xe);const _e={};var Me=e=>(t,n,a)=>{function i(e,t){if(!u)if(p-=1,e)l=!0,a(e);else if(!1===e)l=!0,u=!0;else{if(t===_e||l&&0>=p)return l=!0,a(null);o||r()}}function r(){for(o=!0;p=p&&a(null));p+=1,n(t.value,t.key,L(i))}o=!1}if(a=m(a),0>=e)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return a(null);if(d(t))return E(t,e,n,a);if(c(t))return E(t[Symbol.asyncIterator](),e,n,a);var s=x(t),l=!1,u=!1,p=0,o=!1;r()},Ae=o(function(e,t,n,a){return Me(t)(e,p(n),a)},4),Ie=o(function(e,t,n){var a=y(e)?O:b;return a(e,p(t),n)},3),je=o(function(e,t,n){return f(Ie,e,t,n)},3),we=h(je),Be=o(function(e,t,n){return Ae(e,1,t,n)},3),Fe=o(function(e,t,n){return f(Be,e,t,n)},3),Te=h(Fe);const Ce=Symbol("promiseCallback");var Pe=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,Re=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,ze=/,/,Ne=/(=.+)?(\s*)$/;class Ve{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):w(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):w(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}var Ye,qe=o(function(e,t,n,a){a=m(a);var r=p(n);return Be(e,(e,n,a)=>{r(t,e,(e,n)=>{t=n,a(e)})},e=>a(e,t))},4),De=o(function(e,t,n,a){return f(Me(t),e,n,a)},4),Qe=o(function(e,t,n,a){var i=p(n);return De(e,t,(e,t)=>{i(e,(e,...n)=>e?t(e):t(e,n))},(e,t)=>{for(var n=[],r=0;re,(e,t)=>t)(Ie,e,t,n)},3),He=o(function(e,t,n,a){return z(e=>e,(e,t)=>t)(Me(t),e,n,a)},4),Je=o(function(e,t,n){return z(e=>e,(e,t)=>t)(Me(1),e,t,n)},3),Ke=N("dir"),Xe=o(function(e,t,n){function a(e,...t){return e?n(e):void(!1===e||(r=t,l(...t,i)))}function i(e,t){return e?n(e):!1===e?void 0:t?void s(a):n(null,...r)}n=L(n);var r,s=p(e),l=p(t);return i(null,!0)},3),Ze=o(function(e,t,n){return Ie(e,Y(p(t)),n)},3),$e=o(function(e,t,n,a){return Me(t)(e,Y(p(n)),a)},4),et=o(function(e,t,n){return $e(e,1,t,n)},3),tt=o(function(e,t,n){return z(e=>!e,e=>!e)(Ie,e,t,n)},3),nt=o(function(e,t,n,a){return z(e=>!e,e=>!e)(Me(t),e,n,a)},4),at=o(function(e,t,n){return z(e=>!e,e=>!e)(Be,e,t,n)},3),it=o(function(e,t,n){return U(Ie,e,t,n)},3),rt=o(function(e,t,n,a){return U(Me(t),e,n,a)},4),st=o(function(e,t,n){return U(Be,e,t,n)},3),lt=o(function(e,t){function n(e){return e?a(e):void(!1===e||i(n))}var a=L(t),i=p(q(e));return n()},2),ut=o(function(e,t,n,a){var i=p(n);return De(e,t,(e,t)=>{i(e,(n,a)=>n?t(n):t(n,{key:a,val:e}))},(e,t)=>{for(var n={},{hasOwnProperty:r}=Object.prototype,s=0;s{r(e,t,(e,a)=>e?n(e):void(i[t]=a,n(e)))},e=>a(e,i))},4);Ye=Oe?process.nextTick:Ee?setImmediate:a;var pt=i(Ye),ot=o((e,t,n)=>{var a=y(t)?[]:{};e(t,(e,t,n)=>{p(e)((e,...i)=>{2>i.length&&([i]=i),a[t]=i,n(e)})},e=>n(e,a))},3);class ht{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){for(let n;0e)(Ie,e,t,n)},3),xt=o(function(e,t,n,a){return z(Boolean,e=>e)(Me(t),e,n,a)},4),Lt=o(function(e,t,n){return z(Boolean,e=>e)(Be,e,t,n)},3),Et=o(function(e,t,n){function a(e,t){var n=e.criteria,a=t.criteria;return na?1:0}var i=p(t);return je(e,(e,t)=>{i(e,(n,a)=>n?t(n):void t(n,{value:e,criteria:a}))},(e,t)=>e?n(e):void n(null,t.sort(a).map(e=>e.value)))},3),Ot=o(function(e,t){var n,a=null;return et(e,(e,t)=>{p(e)((e,...i)=>!1===e?t(e):void(2>i.length?[n]=i:n=i,a=e,t(e?null:{})))},()=>t(a,n))}),bt=o(function(e,t,n){function a(e,...t){if(e)return n(e);l=t;!1===e||s(i)}function i(e,t){return e?n(e):!1===e?void 0:t?void r(a):n(null,...l)}n=L(n);var r=p(t),s=p(e),l=[];return s(i)},3),_t=o(function(e,t){function n(t){var n=p(e[i++]);n(...t,L(a))}function a(a,...r){return!1===a?void 0:a||i===e.length?t(a,...r):void n(r)}if(t=m(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var i=0;n([])});e.default={apply:t,applyEach:we,applyEachSeries:Te,asyncify:r,auto:M,autoInject:j,cargo:F,cargoQueue:T,compose:P,concat:Ue,concatLimit:Qe,concatSeries:Ge,constant:R,detect:We,detectLimit:He,detectSeries:Je,dir:Ke,doUntil:V,doWhilst:Xe,each:Ze,eachLimit:$e,eachOf:Ie,eachOfLimit:Ae,eachOfSeries:Be,eachSeries:et,ensureAsync:q,every:tt,everyLimit:nt,everySeries:at,filter:it,filterLimit:rt,filterSeries:st,forever:lt,groupBy:G,groupByLimit:ut,groupBySeries:W,log:dt,map:je,mapLimit:De,mapSeries:Fe,mapValues:H,mapValuesLimit:ct,mapValuesSeries:J,memoize:K,nextTick:pt,parallel:X,parallelLimit:Z,priorityQueue:ae,queue:$,race:ft,reduce:qe,reduceRight:ie,reflect:re,reflectAll:se,reject:yt,rejectLimit:mt,rejectSeries:gt,retry:de,retryable:pe,seq:C,series:oe,setImmediate:be,some:St,someLimit:xt,someSeries:Lt,sortBy:Et,timeout:he,times:me,timesLimit:ye,timesSeries:ge,transform:ke,tryEach:Ot,unmemoize:ve,until:Se,waterfall:_t,whilst:bt,all:tt,allLimit:nt,allSeries:at,any:St,anyLimit:xt,anySeries:Lt,find:We,findLimit:He,findSeries:Je,flatMap:Ue,flatMapLimit:Qe,flatMapSeries:Ge,forEach:Ze,forEachSeries:et,forEachLimit:$e,forEachOf:Ie,forEachOfSeries:Be,forEachOfLimit:Ae,inject:qe,foldl:qe,foldr:ie,select:it,selectLimit:rt,selectSeries:st,wrapSync:r,during:bt,doDuring:Xe},e.apply=t,e.applyEach=we,e.applyEachSeries=Te,e.asyncify=r,e.auto=M,e.autoInject=j,e.cargo=F,e.cargoQueue=T,e.compose=P,e.concat=Ue,e.concatLimit=Qe,e.concatSeries=Ge,e.constant=R,e.detect=We,e.detectLimit=He,e.detectSeries=Je,e.dir=Ke,e.doUntil=V,e.doWhilst=Xe,e.each=Ze,e.eachLimit=$e,e.eachOf=Ie,e.eachOfLimit=Ae,e.eachOfSeries=Be,e.eachSeries=et,e.ensureAsync=q,e.every=tt,e.everyLimit=nt,e.everySeries=at,e.filter=it,e.filterLimit=rt,e.filterSeries=st,e.forever=lt,e.groupBy=G,e.groupByLimit=ut,e.groupBySeries=W,e.log=dt,e.map=je,e.mapLimit=De,e.mapSeries=Fe,e.mapValues=H,e.mapValuesLimit=ct,e.mapValuesSeries=J,e.memoize=K,e.nextTick=pt,e.parallel=X,e.parallelLimit=Z,e.priorityQueue=ae,e.queue=$,e.race=ft,e.reduce=qe,e.reduceRight=ie,e.reflect=re,e.reflectAll=se,e.reject=yt,e.rejectLimit=mt,e.rejectSeries=gt,e.retry=de,e.retryable=pe,e.seq=C,e.series=oe,e.setImmediate=be,e.some=St,e.someLimit=xt,e.someSeries=Lt,e.sortBy=Et,e.timeout=he,e.times=me,e.timesLimit=ye,e.timesSeries=ge,e.transform=ke,e.tryEach=Ot,e.unmemoize=ve,e.until=Se,e.waterfall=_t,e.whilst=bt,e.all=tt,e.allLimit=nt,e.allSeries=at,e.any=St,e.anyLimit=xt,e.anySeries=Lt,e.find=We,e.findLimit=He,e.findSeries=Je,e.flatMap=Ue,e.flatMapLimit=Qe,e.flatMapSeries=Ge,e.forEach=Ze,e.forEachSeries=et,e.forEachLimit=$e,e.forEachOf=Ie,e.forEachOfSeries=Be,e.forEachOfLimit=Ae,e.inject=qe,e.foldl=qe,e.foldr=ie,e.select=it,e.selectLimit=rt,e.selectSeries=st,e.wrapSync=r,e.during=bt,e.doDuring=Xe,Object.defineProperty(e,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/general/nvim/node_modules/async/dist/async.mjs b/general/nvim/node_modules/async/dist/async.mjs deleted file mode 100644 index 5453a4b..0000000 --- a/general/nvim/node_modules/async/dist/async.mjs +++ /dev/null @@ -1,5945 +0,0 @@ -/** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ -function apply(fn, ...args) { - return (...callArgs) => fn(...args,...callArgs); -} - -function initialParams (fn) { - return function (...args/*, callback*/) { - var callback = args.pop(); - return fn.call(this, args, callback); - }; -} - -/* istanbul ignore file */ - -var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask; -var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; -var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - -function fallback(fn) { - setTimeout(fn, 0); -} - -function wrap(defer) { - return (fn, ...args) => defer(() => fn(...args)); -} - -var _defer; - -if (hasQueueMicrotask) { - _defer = queueMicrotask; -} else if (hasSetImmediate) { - _defer = setImmediate; -} else if (hasNextTick) { - _defer = process.nextTick; -} else { - _defer = fallback; -} - -var setImmediate$1 = wrap(_defer); - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - if (isAsync(func)) { - return function (...args/*, callback*/) { - const callback = args.pop(); - const promise = func.apply(this, args); - return handlePromise(promise, callback) - } - } - - return initialParams(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (result && typeof result.then === 'function') { - return handlePromise(result, callback) - } else { - callback(null, result); - } - }); -} - -function handlePromise(promise, callback) { - return promise.then(value => { - invokeCallback(callback, null, value); - }, err => { - invokeCallback(callback, err && err.message ? err : new Error(err)); - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (err) { - setImmediate$1(e => { throw e }, err); - } -} - -function isAsync(fn) { - return fn[Symbol.toStringTag] === 'AsyncFunction'; -} - -function isAsyncGenerator(fn) { - return fn[Symbol.toStringTag] === 'AsyncGenerator'; -} - -function isAsyncIterable(obj) { - return typeof obj[Symbol.asyncIterator] === 'function'; -} - -function wrapAsync(asyncFn) { - if (typeof asyncFn !== 'function') throw new Error('expected a function') - return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; -} - -// conditionally promisify a function. -// only return a promise if a callback is omitted -function awaitify (asyncFn, arity = asyncFn.length) { - if (!arity) throw new Error('arity is undefined') - function awaitable (...args) { - if (typeof args[arity - 1] === 'function') { - return asyncFn.apply(this, args) - } - - return new Promise((resolve, reject) => { - args[arity - 1] = (err, ...cbArgs) => { - if (err) return reject(err) - resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); - }; - asyncFn.apply(this, args); - }) - } - - return awaitable -} - -function applyEach (eachfn) { - return function applyEach(fns, ...callArgs) { - const go = awaitify(function (callback) { - var that = this; - return eachfn(fns, (fn, cb) => { - wrapAsync(fn).apply(that, callArgs.concat(cb)); - }, callback); - }); - return go; - }; -} - -function _asyncMap(eachfn, arr, iteratee, callback) { - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = wrapAsync(iteratee); - - return eachfn(arr, (value, _, iterCb) => { - var index = counter++; - _iteratee(value, (err, v) => { - results[index] = v; - iterCb(err); - }); - }, err => { - callback(err, results); - }); -} - -function isArrayLike(value) { - return value && - typeof value.length === 'number' && - value.length >= 0 && - value.length % 1 === 0; -} - -// A temporary value used to identify if the loop should be broken. -// See #1064, #1293 -const breakLoop = {}; - -function once(fn) { - function wrapper (...args) { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, args); - } - Object.assign(wrapper, fn); - return wrapper -} - -function getIterator (coll) { - return coll[Symbol.iterator] && coll[Symbol.iterator](); -} - -function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? {value: coll[i], key: i} : null; - } -} - -function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) - return null; - i++; - return {value: item.value, key: i}; - } -} - -function createObjectIterator(obj) { - var okeys = obj ? Object.keys(obj) : []; - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? {value: obj[key], key} : null; - }; -} - -function createIterator(coll) { - if (isArrayLike(coll)) { - return createArrayIterator(coll); - } - - var iterator = getIterator(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); -} - -function onlyOnce(fn) { - return function (...args) { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, args); - }; -} - -// for async generators -function asyncEachOfLimit(generator, limit, iteratee, callback) { - let done = false; - let canceled = false; - let awaiting = false; - let running = 0; - let idx = 0; - - function replenish() { - //console.log('replenish') - if (running >= limit || awaiting || done) return - //console.log('replenish awaiting') - awaiting = true; - generator.next().then(({value, done: iterDone}) => { - //console.log('got value', value) - if (canceled || done) return - awaiting = false; - if (iterDone) { - done = true; - if (running <= 0) { - //console.log('done nextCb') - callback(null); - } - return; - } - running++; - iteratee(value, idx, iterateeCallback); - idx++; - replenish(); - }).catch(handleError); - } - - function iterateeCallback(err, result) { - //console.log('iterateeCallback') - running -= 1; - if (canceled) return - if (err) return handleError(err) - - if (err === false) { - done = true; - canceled = true; - return - } - - if (result === breakLoop || (done && running <= 0)) { - done = true; - //console.log('done iterCb') - return callback(null); - } - replenish(); - } - - function handleError(err) { - if (canceled) return - awaiting = false; - done = true; - callback(err); - } - - replenish(); -} - -var eachOfLimit = (limit) => { - return (obj, iteratee, callback) => { - callback = once(callback); - if (limit <= 0) { - throw new RangeError('concurrency limit cannot be less than 1') - } - if (!obj) { - return callback(null); - } - if (isAsyncGenerator(obj)) { - return asyncEachOfLimit(obj, limit, iteratee, callback) - } - if (isAsyncIterable(obj)) { - return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback) - } - var nextElem = createIterator(obj); - var done = false; - var canceled = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - if (canceled) return - running -= 1; - if (err) { - done = true; - callback(err); - } - else if (err === false) { - done = true; - canceled = true; - } - else if (value === breakLoop || (done && running <= 0)) { - done = true; - return callback(null); - } - else if (!looping) { - replenish(); - } - } - - function replenish () { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; -}; - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfLimit$1(coll, limit, iteratee, callback) { - return eachOfLimit(limit)(coll, wrapAsync(iteratee), callback); -} - -var eachOfLimit$2 = awaitify(eachOfLimit$1, 4); - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = once(callback); - var index = 0, - completed = 0, - {length} = coll, - canceled = false; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err === false) { - canceled = true; - } - if (canceled === true) return - if (err) { - callback(err); - } else if ((++completed === length) || value === breakLoop) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, onlyOnce(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -function eachOfGeneric (coll, iteratee, callback) { - return eachOfLimit$2(coll, Infinity, iteratee, callback); -} - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dev.json is a file containing a valid json object config for dev environment - * // dev.json is a file containing a valid json object config for test environment - * // prod.json is a file containing a valid json object config for prod environment - * // invalid.json is a file with a malformed json object - * - * let configs = {}; //global variable - * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'}; - * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'}; - * - * // asynchronous function that reads a json file and parses the contents as json object - * function parseFile(file, key, callback) { - * fs.readFile(file, "utf8", function(err, data) { - * if (err) return calback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * } - * - * // Using callbacks - * async.forEachOf(validConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * } else { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * // JSON parse error exception - * } else { - * console.log(configs); - * } - * }); - * - * // Using Promises - * async.forEachOf(validConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * }).catch( err => { - * console.error(err); - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * }).catch( err => { - * console.error(err); - * // JSON parse error exception - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.forEachOf(validConfigFileMap, parseFile); - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * catch (err) { - * console.log(err); - * } - * } - * - * //Error handing - * async () => { - * try { - * let result = await async.forEachOf(invalidConfigFileMap, parseFile); - * console.log(configs); - * } - * catch (err) { - * console.log(err); - * // JSON parse error exception - * } - * } - * - */ -function eachOf(coll, iteratee, callback) { - var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; - return eachOfImplementation(coll, wrapAsync(iteratee), callback); -} - -var eachOf$1 = awaitify(eachOf, 3); - -/** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callbacks - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.map(fileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.map(fileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.map(fileList, getFileSizeInBytes); - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.map(withMissingFileList, getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function map (coll, iteratee, callback) { - return _asyncMap(eachOf$1, coll, iteratee, callback) -} -var map$1 = awaitify(map, 3); - -/** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. The results - * for each of the applied async functions are passed to the final callback - * as an array. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - Returns a function that takes no args other than - * an optional callback, that is the result of applying the `args` to each - * of the functions. - * @example - * - * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket') - * - * appliedFn((err, results) => { - * // results[0] is the results for `enableSearch` - * // results[1] is the results for `updateSchema` - * }); - * - * // partial application example: - * async.each( - * buckets, - * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(), - * callback - * ); - */ -var applyEach$1 = applyEach(map$1); - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfSeries(coll, iteratee, callback) { - return eachOfLimit$2(coll, 1, iteratee, callback) -} -var eachOfSeries$1 = awaitify(eachOfSeries, 3); - -/** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function mapSeries (coll, iteratee, callback) { - return _asyncMap(eachOfSeries$1, coll, iteratee, callback) -} -var mapSeries$1 = awaitify(mapSeries, 3); - -/** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - A function, that when called, is the result of - * appling the `args` to the list of functions. It takes no args, other than - * a callback. - */ -var applyEachSeries = applyEach(mapSeries$1); - -const PROMISE_SYMBOL = Symbol('promiseCallback'); - -function promiseCallback () { - let resolve, reject; - function callback (err, ...args) { - if (err) return reject(err) - resolve(args.length > 1 ? args : args[0]); - } - - callback[PROMISE_SYMBOL] = new Promise((res, rej) => { - resolve = res, - reject = rej; - }); - - return callback -} - -/** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * @example - * - * //Using Callbacks - * async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * if (err) { - * console.log('err = ', err); - * } - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }); - * - * //Using Promises - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }).then(results => { - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }).catch(err => { - * console.log('err = ', err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }); - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function auto(tasks, concurrency, callback) { - if (typeof concurrency !== 'number') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = once(callback || promiseCallback()); - var numTasks = Object.keys(tasks).length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var canceled = false; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - Object.keys(tasks).forEach(key => { - var task = tasks[key]; - if (!Array.isArray(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - dependencies.forEach(dependencyName => { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + - '` has a non-existent dependency `' + - dependencyName + '` in ' + - dependencies.join(', ')); - } - addListener(dependencyName, () => { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(() => runTask(key, task)); - } - - function processQueue() { - if (canceled) return - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while(readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - taskListeners.forEach(fn => fn()); - processQueue(); - } - - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = onlyOnce((err, ...result) => { - runningTasks--; - if (err === false) { - canceled = true; - return - } - if (result.length < 2) { - [result] = result; - } - if (err) { - var safeResults = {}; - Object.keys(results).forEach(rkey => { - safeResults[rkey] = results[rkey]; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - if (canceled) return - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = wrapAsync(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - getDependents(currentTask).forEach(dependent => { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error( - 'async.auto cannot execute tasks due to a recursive dependency' - ); - } - } - - function getDependents(taskName) { - var result = []; - Object.keys(tasks).forEach(key => { - const task = tasks[key]; - if (Array.isArray(task) && task.indexOf(taskName) >= 0) { - result.push(key); - } - }); - return result; - } - - return callback[PROMISE_SYMBOL] -} - -var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/; -var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/; -var FN_ARG_SPLIT = /,/; -var FN_ARG = /(=.+)?(\s*)$/; - -function stripComments(string) { - let stripped = ''; - let index = 0; - let endBlockComment = string.indexOf('*/'); - while (index < string.length) { - if (string[index] === '/' && string[index+1] === '/') { - // inline comment - let endIndex = string.indexOf('\n', index); - index = (endIndex === -1) ? string.length : endIndex; - } else if ((endBlockComment !== -1) && (string[index] === '/') && (string[index+1] === '*')) { - // block comment - let endIndex = string.indexOf('*/', index); - if (endIndex !== -1) { - index = endIndex + 2; - endBlockComment = string.indexOf('*/', index); - } else { - stripped += string[index]; - index++; - } - } else { - stripped += string[index]; - index++; - } - } - return stripped; -} - -function parseParams(func) { - const src = stripComments(func.toString()); - let match = src.match(FN_ARGS); - if (!match) { - match = src.match(ARROW_FN_ARGS); - } - if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src) - let [, args] = match; - return args - .replace(/\s/g, '') - .split(FN_ARG_SPLIT) - .map((arg) => arg.replace(FN_ARG, '').trim()); -} - -/** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ -function autoInject(tasks, callback) { - var newTasks = {}; - - Object.keys(tasks).forEach(key => { - var taskFn = tasks[key]; - var params; - var fnIsAsync = isAsync(taskFn); - var hasNoDeps = - (!fnIsAsync && taskFn.length === 1) || - (fnIsAsync && taskFn.length === 0); - - if (Array.isArray(taskFn)) { - params = [...taskFn]; - taskFn = params.pop(); - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if ((taskFn.length === 0 && !fnIsAsync) && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = params.map(name => results[name]); - newArgs.push(taskCb); - wrapAsync(taskFn)(...newArgs); - } - }); - - return auto(newTasks, callback); -} - -// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation -// used for queues. This implementation assumes that the node provided by the user can be modified -// to adjust the next and last properties. We implement only the minimal functionality -// for queue support. -class DLL { - constructor() { - this.head = this.tail = null; - this.length = 0; - } - - removeLink(node) { - if (node.prev) node.prev.next = node.next; - else this.head = node.next; - if (node.next) node.next.prev = node.prev; - else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; - } - - empty () { - while(this.head) this.shift(); - return this; - } - - insertAfter(node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode; - else this.tail = newNode; - node.next = newNode; - this.length += 1; - } - - insertBefore(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode; - else this.head = newNode; - node.prev = newNode; - this.length += 1; - } - - unshift(node) { - if (this.head) this.insertBefore(this.head, node); - else setInitial(this, node); - } - - push(node) { - if (this.tail) this.insertAfter(this.tail, node); - else setInitial(this, node); - } - - shift() { - return this.head && this.removeLink(this.head); - } - - pop() { - return this.tail && this.removeLink(this.tail); - } - - toArray() { - return [...this] - } - - *[Symbol.iterator] () { - var cur = this.head; - while (cur) { - yield cur.data; - cur = cur.next; - } - } - - remove (testFn) { - var curr = this.head; - while(curr) { - var {next} = curr; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; - } -} - -function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; -} - -function queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new RangeError('Concurrency must not be zero'); - } - - var _worker = wrapAsync(worker); - var numRunning = 0; - var workersList = []; - const events = { - error: [], - drain: [], - saturated: [], - unsaturated: [], - empty: [] - }; - - function on (event, handler) { - events[event].push(handler); - } - - function once (event, handler) { - const handleAndRemove = (...args) => { - off(event, handleAndRemove); - handler(...args); - }; - events[event].push(handleAndRemove); - } - - function off (event, handler) { - if (!event) return Object.keys(events).forEach(ev => events[ev] = []) - if (!handler) return events[event] = [] - events[event] = events[event].filter(ev => ev !== handler); - } - - function trigger (event, ...args) { - events[event].forEach(handler => handler(...args)); - } - - var processingScheduled = false; - function _insert(data, insertAtFront, rejectOnError, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - - var res, rej; - function promiseCallback (err, ...args) { - // we don't care about the error, let the global error handler - // deal with it - if (err) return rejectOnError ? rej(err) : res() - if (args.length <= 1) return res(args[0]) - res(args); - } - - var item = { - data, - callback: rejectOnError ? - promiseCallback : - (callback || promiseCallback) - }; - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - - if (!processingScheduled) { - processingScheduled = true; - setImmediate$1(() => { - processingScheduled = false; - q.process(); - }); - } - - if (rejectOnError || !callback) { - return new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }) - } - } - - function _createCB(tasks) { - return function (err, ...args) { - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = workersList.indexOf(task); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback(err, ...args); - - if (err != null) { - trigger('error', err, task.data); - } - } - - if (numRunning <= (q.concurrency - q.buffer) ) { - trigger('unsaturated'); - } - - if (q.idle()) { - trigger('drain'); - } - q.process(); - }; - } - - function _maybeDrain(data) { - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - setImmediate$1(() => trigger('drain')); - return true - } - return false - } - - const eventMethod = (name) => (handler) => { - if (!handler) { - return new Promise((resolve, reject) => { - once(name, (err, data) => { - if (err) return reject(err) - resolve(data); - }); - }) - } - off(name); - on(name, handler); - - }; - - var isProcessing = false; - var q = { - _tasks: new DLL(), - *[Symbol.iterator] () { - yield* q._tasks[Symbol.iterator](); - }, - concurrency, - payload, - buffer: concurrency / 4, - started: false, - paused: false, - push (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, false, false, callback)) - } - return _insert(data, false, false, callback); - }, - pushAsync (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, false, true, callback)) - } - return _insert(data, false, true, callback); - }, - kill () { - off(); - q._tasks.empty(); - }, - unshift (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, true, false, callback)) - } - return _insert(data, true, false, callback); - }, - unshiftAsync (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, true, true, callback)) - } - return _insert(data, true, true, callback); - }, - remove (testFn) { - q._tasks.remove(testFn); - }, - process () { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while(!q.paused && numRunning < q.concurrency && q._tasks.length){ - var tasks = [], data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - trigger('empty'); - } - - if (numRunning === q.concurrency) { - trigger('saturated'); - } - - var cb = onlyOnce(_createCB(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length () { - return q._tasks.length; - }, - running () { - return numRunning; - }, - workersList () { - return workersList; - }, - idle() { - return q._tasks.length + numRunning === 0; - }, - pause () { - q.paused = true; - }, - resume () { - if (q.paused === false) { return; } - q.paused = false; - setImmediate$1(q.process); - } - }; - // define these as fixed properties, so people get useful errors when updating - Object.defineProperties(q, { - saturated: { - writable: false, - value: eventMethod('saturated') - }, - unsaturated: { - writable: false, - value: eventMethod('unsaturated') - }, - empty: { - writable: false, - value: eventMethod('empty') - }, - drain: { - writable: false, - value: eventMethod('drain') - }, - error: { - writable: false, - value: eventMethod('error') - }, - }); - return q; -} - -/** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.reduce(fileList, 0, getFileSizeInBytes); - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function reduce(coll, memo, iteratee, callback) { - callback = once(callback); - var _iteratee = wrapAsync(iteratee); - return eachOfSeries$1(coll, (x, i, iterCb) => { - _iteratee(memo, x, (err, v) => { - memo = v; - iterCb(err); - }); - }, err => callback(err, memo)); -} -var reduce$1 = awaitify(reduce, 4); - -/** - * Version of the compose function that is more natural to read. Each function - * consumes the return value of the previous function. It is the equivalent of - * [compose]{@link module:ControlFlow.compose} with the arguments reversed. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name seq - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.compose]{@link module:ControlFlow.compose} - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} a function that composes the `functions` in order - * @example - * - * // Requires lodash (or underscore), express3 and dresende's orm2. - * // Part of an app, that fetches cats of the logged user. - * // This example uses `seq` function to avoid overnesting and error - * // handling clutter. - * app.get('/cats', function(request, response) { - * var User = request.models.User; - * async.seq( - * User.get.bind(User), // 'User.get' has signature (id, callback(err, data)) - * function(user, fn) { - * user.getCats(fn); // 'getCats' has signature (callback(err, data)) - * } - * )(req.session.user_id, function (err, cats) { - * if (err) { - * console.error(err); - * response.json({ status: 'error', message: err.message }); - * } else { - * response.json({ status: 'ok', message: 'Cats found', data: cats }); - * } - * }); - * }); - */ -function seq(...functions) { - var _functions = functions.map(wrapAsync); - return function (...args) { - var that = this; - - var cb = args[args.length - 1]; - if (typeof cb == 'function') { - args.pop(); - } else { - cb = promiseCallback(); - } - - reduce$1(_functions, args, (newargs, fn, iterCb) => { - fn.apply(that, newargs.concat((err, ...nextargs) => { - iterCb(err, nextargs); - })); - }, - (err, results) => cb(err, ...results)); - - return cb[PROMISE_SYMBOL] - }; -} - -/** - * Creates a function which is a composition of the passed asynchronous - * functions. Each function consumes the return value of the function that - * follows. Composing functions `f()`, `g()`, and `h()` would produce the result - * of `f(g(h()))`, only this version uses callbacks to obtain the return values. - * - * If the last argument to the composed function is not a function, a promise - * is returned when you call it. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name compose - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} an asynchronous function that is the composed - * asynchronous `functions` - * @example - * - * function add1(n, callback) { - * setTimeout(function () { - * callback(null, n + 1); - * }, 10); - * } - * - * function mul3(n, callback) { - * setTimeout(function () { - * callback(null, n * 3); - * }, 10); - * } - * - * var add1mul3 = async.compose(mul3, add1); - * add1mul3(4, function (err, result) { - * // result now equals 15 - * }); - */ -function compose(...args) { - return seq(...args.reverse()); -} - -/** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function mapLimit (coll, limit, iteratee, callback) { - return _asyncMap(eachOfLimit(limit), coll, iteratee, callback) -} -var mapLimit$1 = awaitify(mapLimit, 4); - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. - * - * @name concatLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapLimit - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ -function concatLimit(coll, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val, iterCb) => { - _iteratee(val, (err, ...args) => { - if (err) return iterCb(err); - return iterCb(err, args); - }); - }, (err, mapResults) => { - var result = []; - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - result = result.concat(...mapResults[i]); - } - } - - return callback(err, result); - }); -} -var concatLimit$1 = awaitify(concatLimit, 4); - -/** - * Applies `iteratee` to each item in `coll`, concatenating the results. Returns - * the concatenated list. The `iteratee`s are called in parallel, and the - * results are concatenated as they return. The results array will be returned in - * the original order of `coll` passed to the `iteratee` function. - * - * @name concat - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @alias flatMap - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * let directoryList = ['dir1','dir2','dir3']; - * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4']; - * - * // Using callbacks - * async.concat(directoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.concat(directoryList, fs.readdir) - * .then(results => { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir) - * .then(results => { - * console.log(results); - * }).catch(err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.concat(directoryList, fs.readdir); - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.concat(withMissingDirectoryList, fs.readdir); - * console.log(results); - * } catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } - * } - * - */ -function concat(coll, iteratee, callback) { - return concatLimit$1(coll, Infinity, iteratee, callback) -} -var concat$1 = awaitify(concat, 3); - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. - * - * @name concatSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapSeries - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`. - * The iteratee should complete with an array an array of results. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ -function concatSeries(coll, iteratee, callback) { - return concatLimit$1(coll, 1, iteratee, callback) -} -var concatSeries$1 = awaitify(concatSeries, 3); - -/** - * Returns a function that when called, calls-back with the values provided. - * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to - * [`auto`]{@link module:ControlFlow.auto}. - * - * @name constant - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {...*} arguments... - Any number of arguments to automatically invoke - * callback with. - * @returns {AsyncFunction} Returns a function that when invoked, automatically - * invokes the callback with the previous given arguments. - * @example - * - * async.waterfall([ - * async.constant(42), - * function (value, next) { - * // value === 42 - * }, - * //... - * ], callback); - * - * async.waterfall([ - * async.constant(filename, "utf8"), - * fs.readFile, - * function (fileData, next) { - * //... - * } - * //... - * ], callback); - * - * async.auto({ - * hostname: async.constant("https://server.net/"), - * port: findFreePort, - * launchServer: ["hostname", "port", function (options, cb) { - * startServer(options, cb); - * }], - * //... - * }, callback); - */ -function constant(...args) { - return function (...ignoredArgs/*, callback*/) { - var callback = ignoredArgs.pop(); - return callback(null, ...args); - }; -} - -function _createTester(check, getResult) { - return (eachfn, arr, _iteratee, cb) => { - var testPassed = false; - var testResult; - const iteratee = wrapAsync(_iteratee); - eachfn(arr, (value, _, callback) => { - iteratee(value, (err, result) => { - if (err || err === false) return callback(err); - - if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - return callback(null, breakLoop); - } - callback(); - }); - }, err => { - if (err) return cb(err); - cb(null, testPassed ? testResult : getResult(false)); - }); - }; -} - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * } - *); - * - * // Using Promises - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists) - * .then(result => { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists); - * console.log(result); - * // dir1/file1.txt - * // result now equals the file in the list that exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function detect(coll, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback) -} -var detect$1 = awaitify(detect, 3); - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ -function detectLimit(coll, limit, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOfLimit(limit), coll, iteratee, callback) -} -var detectLimit$1 = awaitify(detectLimit, 4); - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ -function detectSeries(coll, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOfLimit(1), coll, iteratee, callback) -} - -var detectSeries$1 = awaitify(detectSeries, 3); - -function consoleFunc(name) { - return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { - /* istanbul ignore else */ - if (typeof console === 'object') { - /* istanbul ignore else */ - if (err) { - /* istanbul ignore else */ - if (console.error) { - console.error(err); - } - } else if (console[name]) { /* istanbul ignore else */ - resultArgs.forEach(x => console[name](x)); - } - } - }) -} - -/** - * Logs the result of an [`async` function]{@link AsyncFunction} to the - * `console` using `console.dir` to display the properties of the resulting object. - * Only works in Node.js or in browsers that support `console.dir` and - * `console.error` (such as FF and Chrome). - * If multiple arguments are returned from the async function, - * `console.dir` is called on each argument in order. - * - * @name dir - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, {hello: name}); - * }, 1000); - * }; - * - * // in the node repl - * node> async.dir(hello, 'world'); - * {hello: 'world'} - */ -var dir = consoleFunc('dir'); - -/** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ -function doWhilst(iteratee, test, callback) { - callback = onlyOnce(callback); - var _fn = wrapAsync(iteratee); - var _test = wrapAsync(test); - var results; - - function next(err, ...args) { - if (err) return callback(err); - if (err === false) return; - results = args; - _test(...args, check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return check(null, true); -} - -var doWhilst$1 = awaitify(doWhilst, 3); - -/** - * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the - * argument ordering differs from `until`. - * - * @name doUntil - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee` - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ -function doUntil(iteratee, test, callback) { - const _test = wrapAsync(test); - return doWhilst$1(iteratee, (...args) => { - const cb = args.pop(); - _test(...args, (err, truth) => cb (err, !truth)); - }, callback); -} - -function _withoutIndex(iteratee) { - return (value, index, callback) => iteratee(value, callback); -} - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt']; - * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt']; - * - * // asynchronous function that deletes a file - * const deleteFile = function(file, callback) { - * fs.unlink(file, callback); - * }; - * - * // Using callbacks - * async.each(fileList, deleteFile, function(err) { - * if( err ) { - * console.log(err); - * } else { - * console.log('All files have been deleted successfully'); - * } - * }); - * - * // Error Handling - * async.each(withMissingFileList, deleteFile, function(err){ - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using Promises - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using async/await - * async () => { - * try { - * await async.each(files, deleteFile); - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * await async.each(withMissingFileList, deleteFile); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * } - * } - * - */ -function eachLimit(coll, iteratee, callback) { - return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); -} - -var each = awaitify(eachLimit, 3); - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachLimit$1(coll, limit, iteratee, callback) { - return eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); -} -var eachLimit$2 = awaitify(eachLimit$1, 4); - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item - * in series and therefore the iteratee functions will complete in order. - - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachSeries(coll, iteratee, callback) { - return eachLimit$2(coll, 1, iteratee, callback) -} -var eachSeries$1 = awaitify(eachSeries, 3); - -/** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ -function ensureAsync(fn) { - if (isAsync(fn)) return fn; - return function (...args/*, callback*/) { - var callback = args.pop(); - var sync = true; - args.push((...innerArgs) => { - if (sync) { - setImmediate$1(() => callback(...innerArgs)); - } else { - callback(...innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }; -} - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.every(fileList, fileExists, function(err, result) { - * console.log(result); - * // true - * // result is true since every file exists - * }); - * - * async.every(withMissingFileList, fileExists, function(err, result) { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }); - * - * // Using Promises - * async.every(fileList, fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.every(withMissingFileList, fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.every(fileList, fileExists); - * console.log(result); - * // true - * // result is true since every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.every(withMissingFileList, fileExists); - * console.log(result); - * // false - * // result is false since NOT every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function every(coll, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOf$1, coll, iteratee, callback) -} -var every$1 = awaitify(every, 3); - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function everyLimit(coll, limit, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOfLimit(limit), coll, iteratee, callback) -} -var everyLimit$1 = awaitify(everyLimit, 4); - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function everySeries(coll, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOfSeries$1, coll, iteratee, callback) -} -var everySeries$1 = awaitify(everySeries, 3); - -function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, (x, index, iterCb) => { - iteratee(x, (err, v) => { - truthValues[index] = !!v; - iterCb(err); - }); - }, err => { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); -} - -function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, (x, index, iterCb) => { - iteratee(x, (err, v) => { - if (err) return iterCb(err); - if (v) { - results.push({index, value: x}); - } - iterCb(err); - }); - }, err => { - if (err) return callback(err); - callback(null, results - .sort((a, b) => a.index - b.index) - .map(v => v.value)); - }); -} - -function _filter(eachfn, coll, iteratee, callback) { - var filter = isArrayLike(coll) ? filterArray : filterGeneric; - return filter(eachfn, coll, wrapAsync(iteratee), callback); -} - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.filter(files, fileExists, function(err, results) { - * if(err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * }); - * - * // Using Promises - * async.filter(files, fileExists) - * .then(results => { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.filter(files, fileExists); - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function filter (coll, iteratee, callback) { - return _filter(eachOf$1, coll, iteratee, callback) -} -var filter$1 = awaitify(filter, 3); - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - */ -function filterLimit (coll, limit, iteratee, callback) { - return _filter(eachOfLimit(limit), coll, iteratee, callback) -} -var filterLimit$1 = awaitify(filterLimit, 4); - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - * @returns {Promise} a promise, if no callback provided - */ -function filterSeries (coll, iteratee, callback) { - return _filter(eachOfSeries$1, coll, iteratee, callback) -} -var filterSeries$1 = awaitify(filterSeries, 3); - -/** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @returns {Promise} a promise that rejects if an error occurs and an errback - * is not passed - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ -function forever(fn, errback) { - var done = onlyOnce(errback); - var task = wrapAsync(ensureAsync(fn)); - - function next(err) { - if (err) return done(err); - if (err === false) return; - task(next); - } - return next(); -} -var forever$1 = awaitify(forever, 2); - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ -function groupByLimit(coll, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val, iterCb) => { - _iteratee(val, (err, key) => { - if (err) return iterCb(err); - return iterCb(err, {key, val}); - }); - }, (err, mapResults) => { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var {hasOwnProperty} = Object.prototype; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var {key} = mapResults[i]; - var {val} = mapResults[i]; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); -} - -var groupByLimit$1 = awaitify(groupByLimit, 4); - -/** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const files = ['dir1/file1.txt','dir2','dir4'] - * - * // asynchronous function that detects file type as none, file, or directory - * function detectFile(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(null, 'none'); - * } - * callback(null, stat.isDirectory() ? 'directory' : 'file'); - * }); - * } - * - * //Using callbacks - * async.groupBy(files, detectFile, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * }); - * - * // Using Promises - * async.groupBy(files, detectFile) - * .then( result => { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.groupBy(files, detectFile); - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function groupBy (coll, iteratee, callback) { - return groupByLimit$1(coll, Infinity, iteratee, callback) -} - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whose - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ -function groupBySeries (coll, iteratee, callback) { - return groupByLimit$1(coll, 1, iteratee, callback) -} - -/** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ -var log = consoleFunc('log'); - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ -function mapValuesLimit(obj, limit, iteratee, callback) { - callback = once(callback); - var newObj = {}; - var _iteratee = wrapAsync(iteratee); - return eachOfLimit(limit)(obj, (val, key, next) => { - _iteratee(val, key, (err, result) => { - if (err) return next(err); - newObj[key] = result; - next(err); - }); - }, err => callback(err, newObj)); -} - -var mapValuesLimit$1 = awaitify(mapValuesLimit, 4); - -/** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file3.txt' - * }; - * - * const withMissingFileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file4.txt' - * }; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, key, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.mapValues(fileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * }); - * - * // Error handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(result); - * } - * }); - * - * // Using Promises - * async.mapValues(fileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * }).catch (err => { - * console.log(err); - * }); - * - * // Error Handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch (err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.mapValues(fileMap, getFileSizeInBytes); - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.mapValues(withMissingFileMap, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function mapValues(obj, iteratee, callback) { - return mapValuesLimit$1(obj, Infinity, iteratee, callback) -} - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ -function mapValuesSeries(obj, iteratee, callback) { - return mapValuesLimit$1(obj, 1, iteratee, callback) -} - -/** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * **Note: if the async function errs, the result will not be cached and - * subsequent calls will call the wrapped function.** - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ -function memoize(fn, hasher = v => v) { - var memo = Object.create(null); - var queues = Object.create(null); - var _fn = wrapAsync(fn); - var memoized = initialParams((args, callback) => { - var key = hasher(...args); - if (key in memo) { - setImmediate$1(() => callback(null, ...memo[key])); - } else if (key in queues) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn(...args, (err, ...resultArgs) => { - // #1465 don't memoize if an error occurred - if (!err) { - memo[key] = resultArgs; - } - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i](err, ...resultArgs); - } - }); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; -} - -/* istanbul ignore file */ - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -var _defer$1; - -if (hasNextTick) { - _defer$1 = process.nextTick; -} else if (hasSetImmediate) { - _defer$1 = setImmediate; -} else { - _defer$1 = fallback; -} - -var nextTick = wrap(_defer$1); - -var _parallel = awaitify((eachfn, tasks, callback) => { - var results = isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, (task, key, taskCb) => { - wrapAsync(task)((err, ...result) => { - if (result.length < 2) { - [result] = result; - } - results[key] = result; - taskCb(err); - }); - }, err => callback(err, results)); -}, 3); - -/** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * - * //Using Callbacks - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function parallel(tasks, callback) { - return _parallel(eachOf$1, tasks, callback); -} - -/** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - */ -function parallelLimit(tasks, limit, callback) { - return _parallel(eachOfLimit(limit), tasks, callback); -} - -/** - * A queue of tasks for the worker function to complete. - * @typedef {Iterable} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {number} payload - an integer that specifies how many items are - * passed to the worker function at a time. only applies if this is a - * [cargo]{@link module:ControlFlow.cargo} object - * @property {AsyncFunction} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {AsyncFunction} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {AsyncFunction} pushAsync - the same as `q.push`, except this returns - * a promise that rejects if an error occurs. - * @property {AsyncFunction} unshiftAsync - the same as `q.unshift`, except this returns - * a promise that rejects if an error occurs. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a function that sets a callback that is - * called when the number of running workers hits the `concurrency` limit, and - * further tasks will be queued. If the callback is omitted, `q.saturated()` - * returns a promise for the next occurrence. - * @property {Function} unsaturated - a function that sets a callback that is - * called when the number of running workers is less than the `concurrency` & - * `buffer` limits, and further tasks will not be queued. If the callback is - * omitted, `q.unsaturated()` returns a promise for the next occurrence. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a function that sets a callback that is called - * when the last item from the `queue` is given to a `worker`. If the callback - * is omitted, `q.empty()` returns a promise for the next occurrence. - * @property {Function} drain - a function that sets a callback that is called - * when the last item from the `queue` has returned from the `worker`. If the - * callback is omitted, `q.drain()` returns a promise for the next occurrence. - * @property {Function} error - a function that sets a callback that is called - * when a task errors. Has the signature `function(error, task)`. If the - * callback is omitted, `error()` returns a promise that rejects on the next - * error. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - * - * @example - * const q = async.queue(worker, 2) - * q.push(item1) - * q.push(item2) - * q.push(item3) - * // queues are iterable, spread into an array to inspect - * const items = [...q] // [item1, item2, item3] - * // or use for of - * for (let item of q) { - * console.log(item) - * } - * - * q.drain(() => { - * console.log('all done') - * }) - * // or - * await q.drain() - */ - -/** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can be - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain(function() { - * console.log('all items have been processed'); - * }); - * // or await the end - * await q.drain() - * - * // assign an error callback - * q.error(function(err, task) { - * console.error('task experienced an error'); - * }); - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * // callback is optional - * q.push({name: 'bar'}); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ -function queue$1 (worker, concurrency) { - var _worker = wrapAsync(worker); - return queue((items, cb) => { - _worker(items[0], cb); - }, concurrency, 1); -} - -// Binary min-heap implementation used for priority queue. -// Implementation is stable, i.e. push time is considered for equal priorities -class Heap { - constructor() { - this.heap = []; - this.pushCount = Number.MIN_SAFE_INTEGER; - } - - get length() { - return this.heap.length; - } - - empty () { - this.heap = []; - return this; - } - - percUp(index) { - let p; - - while (index > 0 && smaller(this.heap[index], this.heap[p=parent(index)])) { - let t = this.heap[index]; - this.heap[index] = this.heap[p]; - this.heap[p] = t; - - index = p; - } - } - - percDown(index) { - let l; - - while ((l=leftChi(index)) < this.heap.length) { - if (l+1 < this.heap.length && smaller(this.heap[l+1], this.heap[l])) { - l = l+1; - } - - if (smaller(this.heap[index], this.heap[l])) { - break; - } - - let t = this.heap[index]; - this.heap[index] = this.heap[l]; - this.heap[l] = t; - - index = l; - } - } - - push(node) { - node.pushCount = ++this.pushCount; - this.heap.push(node); - this.percUp(this.heap.length-1); - } - - unshift(node) { - return this.heap.push(node); - } - - shift() { - let [top] = this.heap; - - this.heap[0] = this.heap[this.heap.length-1]; - this.heap.pop(); - this.percDown(0); - - return top; - } - - toArray() { - return [...this]; - } - - *[Symbol.iterator] () { - for (let i = 0; i < this.heap.length; i++) { - yield this.heap[i].data; - } - } - - remove (testFn) { - let j = 0; - for (let i = 0; i < this.heap.length; i++) { - if (!testFn(this.heap[i])) { - this.heap[j] = this.heap[i]; - j++; - } - } - - this.heap.splice(j); - - for (let i = parent(this.heap.length-1); i >= 0; i--) { - this.percDown(i); - } - - return this; - } -} - -function leftChi(i) { - return (i<<1)+1; -} - -function parent(i) { - return ((i+1)>>1)-1; -} - -function smaller(x, y) { - if (x.priority !== y.priority) { - return x.priority < y.priority; - } - else { - return x.pushCount < y.pushCount; - } -} - -/** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * The `unshift` method was removed. - */ -function priorityQueue(worker, concurrency) { - // Start with a normal queue - var q = queue$1(worker, concurrency); - var processingScheduled = false; - - q._tasks = new Heap(); - - // Override push to accept second parameter representing priority - q.push = function(data, priority = 0, callback = () => {}) { - if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!Array.isArray(data)) { - data = [data]; - } - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return setImmediate$1(() => q.drain()); - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - priority, - callback - }; - - q._tasks.push(item); - } - - if (!processingScheduled) { - processingScheduled = true; - setImmediate$1(() => { - processingScheduled = false; - q.process(); - }); - } - }; - - // Remove unshift function - delete q.unshift; - - return q; -} - -/** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns undefined - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ -function race(tasks, callback) { - callback = once(callback); - if (!Array.isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - wrapAsync(tasks[i])(callback); - } -} - -var race$1 = awaitify(race, 2); - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - */ -function reduceRight (array, memo, iteratee, callback) { - var reversed = [...array].reverse(); - return reduce$1(reversed, memo, iteratee, callback); -} - -/** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ -function reflect(fn) { - var _fn = wrapAsync(fn); - return initialParams(function reflectOn(args, reflectCallback) { - args.push((error, ...cbArgs) => { - let retVal = {}; - if (error) { - retVal.error = error; - } - if (cbArgs.length > 0){ - var value = cbArgs; - if (cbArgs.length <= 1) { - [value] = cbArgs; - } - retVal.value = value; - } - reflectCallback(null, retVal); - }); - - return _fn.apply(this, args); - }); -} - -/** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ -function reflectAll(tasks) { - var results; - if (Array.isArray(tasks)) { - results = tasks.map(reflect); - } else { - results = {}; - Object.keys(tasks).forEach(key => { - results[key] = reflect.call(this, tasks[key]); - }); - } - return results; -} - -function reject(eachfn, arr, _iteratee, callback) { - const iteratee = wrapAsync(_iteratee); - return _filter(eachfn, arr, (value, cb) => { - iteratee(value, (err, v) => { - cb(err, !v); - }); - }, callback); -} - -/** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.reject(fileList, fileExists, function(err, results) { - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }); - * - * // Using Promises - * async.reject(fileList, fileExists) - * .then( results => { - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.reject(fileList, fileExists); - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function reject$1 (coll, iteratee, callback) { - return reject(eachOf$1, coll, iteratee, callback) -} -var reject$2 = awaitify(reject$1, 3); - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function rejectLimit (coll, limit, iteratee, callback) { - return reject(eachOfLimit(limit), coll, iteratee, callback) -} -var rejectLimit$1 = awaitify(rejectLimit, 4); - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function rejectSeries (coll, iteratee, callback) { - return reject(eachOfSeries$1, coll, iteratee, callback) -} -var rejectSeries$1 = awaitify(rejectSeries, 3); - -function constant$1(value) { - return function () { - return value; - } -} - -/** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * @returns {Promise} a promise if no callback provided - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ -const DEFAULT_TIMES = 5; -const DEFAULT_INTERVAL = 0; - -function retry(opts, task, callback) { - var options = { - times: DEFAULT_TIMES, - intervalFunc: constant$1(DEFAULT_INTERVAL) - }; - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || promiseCallback(); - task = opts; - } else { - parseTimes(options, opts); - callback = callback || promiseCallback(); - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = wrapAsync(task); - - var attempt = 1; - function retryAttempt() { - _task((err, ...args) => { - if (err === false) return - if (err && attempt++ < options.times && - (typeof options.errorFilter != 'function' || - options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); - } else { - callback(err, ...args); - } - }); - } - - retryAttempt(); - return callback[PROMISE_SYMBOL] -} - -function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? - t.interval : - constant$1(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } -} - -/** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry`, except for a `opts.arity` that - * is the arity of the `task` function, defaulting to `task.length` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ -function retryable (opts, task) { - if (!task) { - task = opts; - opts = null; - } - let arity = (opts && opts.arity) || task.length; - if (isAsync(task)) { - arity += 1; - } - var _task = wrapAsync(task); - return initialParams((args, callback) => { - if (args.length < arity - 1 || callback == null) { - args.push(callback); - callback = promiseCallback(); - } - function taskFn(cb) { - _task(...args, cb); - } - - if (opts) retry(opts, taskFn, callback); - else retry(taskFn, callback); - - return callback[PROMISE_SYMBOL] - }); -} - -/** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @return {Promise} a promise, if no callback is passed - * @example - * - * //Using Callbacks - * async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] - * }); - * - * // an example using objects instead of arrays - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.series([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function series(tasks, callback) { - return _parallel(eachOfSeries$1, tasks, callback); -} - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - *); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // false - * // result is false since none of the files exists - * } - *); - * - * // Using Promises - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since some file in the list exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since none of the files exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists); - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists); - * console.log(result); - * // false - * // result is false since none of the files exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function some(coll, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOf$1, coll, iteratee, callback) -} -var some$1 = awaitify(some, 3); - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function someLimit(coll, limit, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOfLimit(limit), coll, iteratee, callback) -} -var someLimit$1 = awaitify(someLimit, 4); - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function someSeries(coll, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOfSeries$1, coll, iteratee, callback) -} -var someSeries$1 = awaitify(someSeries, 3); - -/** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @returns {Promise} a promise, if no callback passed - * @example - * - * // bigfile.txt is a file that is 251100 bytes in size - * // mediumfile.txt is a file that is 11000 bytes in size - * // smallfile.txt is a file that is 121 bytes in size - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) return callback(getFileSizeErr); - * callback(null, fileSize); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // descending order - * async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) { - * return callback(getFileSizeErr); - * } - * callback(null, fileSize * -1); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'bigfile.txt', 'mediumfile.txt', 'smallfile.txt'] - * } - * } - * ); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * } - * ); - * - * // Using Promises - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * (async () => { - * try { - * let results = await async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * // Error handling - * async () => { - * try { - * let results = await async.sortBy(['missingfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function sortBy (coll, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return map$1(coll, (x, iterCb) => { - _iteratee(x, (err, criteria) => { - if (err) return iterCb(err); - iterCb(err, {value: x, criteria}); - }); - }, (err, results) => { - if (err) return callback(err); - callback(null, results.sort(comparator).map(v => v.value)); - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } -} -var sortBy$1 = awaitify(sortBy, 3); - -/** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ -function timeout(asyncFn, milliseconds, info) { - var fn = wrapAsync(asyncFn); - - return initialParams((args, callback) => { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push((...cbArgs) => { - if (!timedOut) { - callback(...cbArgs); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn(...args); - }); -} - -function range(size) { - var result = Array(size); - while (size--) { - result[size] = size; - } - return result; -} - -/** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ -function timesLimit(count, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(range(count), limit, _iteratee, callback); -} - -/** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ -function times (n, iteratee, callback) { - return timesLimit(n, Infinity, iteratee, callback) -} - -/** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ -function timesSeries (n, iteratee, callback) { - return timesLimit(n, 1, iteratee, callback) -} - -/** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in parallel, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileList, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * }); - * - * // Using Promises - * async.transform(fileList, transformFileSize) - * .then(result => { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * (async () => { - * try { - * let result = await async.transform(fileList, transformFileSize); - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' }; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileMap, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * }); - * - * // Using Promises - * async.transform(fileMap, transformFileSize) - * .then(result => { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.transform(fileMap, transformFileSize); - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function transform (coll, accumulator, iteratee, callback) { - if (arguments.length <= 3 && typeof accumulator === 'function') { - callback = iteratee; - iteratee = accumulator; - accumulator = Array.isArray(coll) ? [] : {}; - } - callback = once(callback || promiseCallback()); - var _iteratee = wrapAsync(iteratee); - - eachOf$1(coll, (v, k, cb) => { - _iteratee(accumulator, v, k, cb); - }, err => callback(err, accumulator)); - return callback[PROMISE_SYMBOL] -} - -/** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ -function tryEach(tasks, callback) { - var error = null; - var result; - return eachSeries$1(tasks, (task, taskCb) => { - wrapAsync(task)((err, ...args) => { - if (err === false) return taskCb(err); - - if (args.length < 2) { - [result] = args; - } else { - result = args; - } - error = err; - taskCb(err ? null : {}); - }); - }, () => callback(error, result)); -} - -var tryEach$1 = awaitify(tryEach); - -/** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ -function unmemoize(fn) { - return (...args) => { - return (fn.unmemoized || fn)(...args); - }; -} - -/** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - * @example - * - * var count = 0; - * async.whilst( - * function test(cb) { cb(null, count < 5); }, - * function iter(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ -function whilst(test, iteratee, callback) { - callback = onlyOnce(callback); - var _fn = wrapAsync(iteratee); - var _test = wrapAsync(test); - var results = []; - - function next(err, ...rest) { - if (err) return callback(err); - results = rest; - if (err === false) return; - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return _test(check); -} -var whilst$1 = awaitify(whilst, 3); - -/** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (callback). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * const results = [] - * let finished = false - * async.until(function test(cb) { - * cb(null, finished) - * }, function iter(next) { - * fetchPage(url, (err, body) => { - * if (err) return next(err) - * results = results.concat(body.objects) - * finished = !!body.next - * next(err) - * }) - * }, function done (err) { - * // all pages have been fetched - * }) - */ -function until(test, iteratee, callback) { - const _test = wrapAsync(test); - return whilst$1((cb) => _test((err, truth) => cb (err, !truth)), iteratee, callback); -} - -/** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns undefined - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ -function waterfall (tasks, callback) { - callback = once(callback); - if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = wrapAsync(tasks[taskIndex++]); - task(...args, onlyOnce(next)); - } - - function next(err, ...args) { - if (err === false) return - if (err || taskIndex === tasks.length) { - return callback(err, ...args); - } - nextTask(args); - } - - nextTask([]); -} - -var waterfall$1 = awaitify(waterfall); - -/** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - -var index = { - apply, - applyEach: applyEach$1, - applyEachSeries, - asyncify, - auto, - autoInject, - cargo, - cargoQueue: cargo$1, - compose, - concat: concat$1, - concatLimit: concatLimit$1, - concatSeries: concatSeries$1, - constant, - detect: detect$1, - detectLimit: detectLimit$1, - detectSeries: detectSeries$1, - dir, - doUntil, - doWhilst: doWhilst$1, - each, - eachLimit: eachLimit$2, - eachOf: eachOf$1, - eachOfLimit: eachOfLimit$2, - eachOfSeries: eachOfSeries$1, - eachSeries: eachSeries$1, - ensureAsync, - every: every$1, - everyLimit: everyLimit$1, - everySeries: everySeries$1, - filter: filter$1, - filterLimit: filterLimit$1, - filterSeries: filterSeries$1, - forever: forever$1, - groupBy, - groupByLimit: groupByLimit$1, - groupBySeries, - log, - map: map$1, - mapLimit: mapLimit$1, - mapSeries: mapSeries$1, - mapValues, - mapValuesLimit: mapValuesLimit$1, - mapValuesSeries, - memoize, - nextTick, - parallel, - parallelLimit, - priorityQueue, - queue: queue$1, - race: race$1, - reduce: reduce$1, - reduceRight, - reflect, - reflectAll, - reject: reject$2, - rejectLimit: rejectLimit$1, - rejectSeries: rejectSeries$1, - retry, - retryable, - seq, - series, - setImmediate: setImmediate$1, - some: some$1, - someLimit: someLimit$1, - someSeries: someSeries$1, - sortBy: sortBy$1, - timeout, - times, - timesLimit, - timesSeries, - transform, - tryEach: tryEach$1, - unmemoize, - until, - waterfall: waterfall$1, - whilst: whilst$1, - - // aliases - all: every$1, - allLimit: everyLimit$1, - allSeries: everySeries$1, - any: some$1, - anyLimit: someLimit$1, - anySeries: someSeries$1, - find: detect$1, - findLimit: detectLimit$1, - findSeries: detectSeries$1, - flatMap: concat$1, - flatMapLimit: concatLimit$1, - flatMapSeries: concatSeries$1, - forEach: each, - forEachSeries: eachSeries$1, - forEachLimit: eachLimit$2, - forEachOf: eachOf$1, - forEachOfSeries: eachOfSeries$1, - forEachOfLimit: eachOfLimit$2, - inject: reduce$1, - foldl: reduce$1, - foldr: reduceRight, - select: filter$1, - selectLimit: filterLimit$1, - selectSeries: filterSeries$1, - wrapSync: asyncify, - during: whilst$1, - doDuring: doWhilst$1 -}; - -export default index; -export { apply, applyEach$1 as applyEach, applyEachSeries, asyncify, auto, autoInject, cargo, cargo$1 as cargoQueue, compose, concat$1 as concat, concatLimit$1 as concatLimit, concatSeries$1 as concatSeries, constant, detect$1 as detect, detectLimit$1 as detectLimit, detectSeries$1 as detectSeries, dir, doUntil, doWhilst$1 as doWhilst, each, eachLimit$2 as eachLimit, eachOf$1 as eachOf, eachOfLimit$2 as eachOfLimit, eachOfSeries$1 as eachOfSeries, eachSeries$1 as eachSeries, ensureAsync, every$1 as every, everyLimit$1 as everyLimit, everySeries$1 as everySeries, filter$1 as filter, filterLimit$1 as filterLimit, filterSeries$1 as filterSeries, forever$1 as forever, groupBy, groupByLimit$1 as groupByLimit, groupBySeries, log, map$1 as map, mapLimit$1 as mapLimit, mapSeries$1 as mapSeries, mapValues, mapValuesLimit$1 as mapValuesLimit, mapValuesSeries, memoize, nextTick, parallel, parallelLimit, priorityQueue, queue$1 as queue, race$1 as race, reduce$1 as reduce, reduceRight, reflect, reflectAll, reject$2 as reject, rejectLimit$1 as rejectLimit, rejectSeries$1 as rejectSeries, retry, retryable, seq, series, setImmediate$1 as setImmediate, some$1 as some, someLimit$1 as someLimit, someSeries$1 as someSeries, sortBy$1 as sortBy, timeout, times, timesLimit, timesSeries, transform, tryEach$1 as tryEach, unmemoize, until, waterfall$1 as waterfall, whilst$1 as whilst, every$1 as all, everyLimit$1 as allLimit, everySeries$1 as allSeries, some$1 as any, someLimit$1 as anyLimit, someSeries$1 as anySeries, detect$1 as find, detectLimit$1 as findLimit, detectSeries$1 as findSeries, concat$1 as flatMap, concatLimit$1 as flatMapLimit, concatSeries$1 as flatMapSeries, each as forEach, eachSeries$1 as forEachSeries, eachLimit$2 as forEachLimit, eachOf$1 as forEachOf, eachOfSeries$1 as forEachOfSeries, eachOfLimit$2 as forEachOfLimit, reduce$1 as inject, reduce$1 as foldl, reduceRight as foldr, filter$1 as select, filterLimit$1 as selectLimit, filterSeries$1 as selectSeries, asyncify as wrapSync, whilst$1 as during, doWhilst$1 as doDuring }; diff --git a/general/nvim/node_modules/async/doDuring.js b/general/nvim/node_modules/async/doDuring.js deleted file mode 100644 index 4c98e9e..0000000 --- a/general/nvim/node_modules/async/doDuring.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ -function doWhilst(iteratee, test, callback) { - callback = (0, _onlyOnce2.default)(callback); - var _fn = (0, _wrapAsync2.default)(iteratee); - var _test = (0, _wrapAsync2.default)(test); - var results; - - function next(err, ...args) { - if (err) return callback(err); - if (err === false) return; - results = args; - _test(...args, check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return check(null, true); -} - -exports.default = (0, _awaitify2.default)(doWhilst, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/doUntil.js b/general/nvim/node_modules/async/doUntil.js deleted file mode 100644 index 8aa0935..0000000 --- a/general/nvim/node_modules/async/doUntil.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doUntil; - -var _doWhilst = require('./doWhilst.js'); - -var _doWhilst2 = _interopRequireDefault(_doWhilst); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the - * argument ordering differs from `until`. - * - * @name doUntil - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee` - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ -function doUntil(iteratee, test, callback) { - const _test = (0, _wrapAsync2.default)(test); - return (0, _doWhilst2.default)(iteratee, (...args) => { - const cb = args.pop(); - _test(...args, (err, truth) => cb(err, !truth)); - }, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/doWhilst.js b/general/nvim/node_modules/async/doWhilst.js deleted file mode 100644 index 4c98e9e..0000000 --- a/general/nvim/node_modules/async/doWhilst.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ -function doWhilst(iteratee, test, callback) { - callback = (0, _onlyOnce2.default)(callback); - var _fn = (0, _wrapAsync2.default)(iteratee); - var _test = (0, _wrapAsync2.default)(test); - var results; - - function next(err, ...args) { - if (err) return callback(err); - if (err === false) return; - results = args; - _test(...args, check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return check(null, true); -} - -exports.default = (0, _awaitify2.default)(doWhilst, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/during.js b/general/nvim/node_modules/async/during.js deleted file mode 100644 index 32a4776..0000000 --- a/general/nvim/node_modules/async/during.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - * @example - * - * var count = 0; - * async.whilst( - * function test(cb) { cb(null, count < 5); }, - * function iter(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ -function whilst(test, iteratee, callback) { - callback = (0, _onlyOnce2.default)(callback); - var _fn = (0, _wrapAsync2.default)(iteratee); - var _test = (0, _wrapAsync2.default)(test); - var results = []; - - function next(err, ...rest) { - if (err) return callback(err); - results = rest; - if (err === false) return; - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return _test(check); -} -exports.default = (0, _awaitify2.default)(whilst, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/each.js b/general/nvim/node_modules/async/each.js deleted file mode 100644 index 405d495..0000000 --- a/general/nvim/node_modules/async/each.js +++ /dev/null @@ -1,129 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _withoutIndex = require('./internal/withoutIndex.js'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt']; - * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt']; - * - * // asynchronous function that deletes a file - * const deleteFile = function(file, callback) { - * fs.unlink(file, callback); - * }; - * - * // Using callbacks - * async.each(fileList, deleteFile, function(err) { - * if( err ) { - * console.log(err); - * } else { - * console.log('All files have been deleted successfully'); - * } - * }); - * - * // Error Handling - * async.each(withMissingFileList, deleteFile, function(err){ - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using Promises - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using async/await - * async () => { - * try { - * await async.each(files, deleteFile); - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * await async.each(withMissingFileList, deleteFile); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * } - * } - * - */ -function eachLimit(coll, iteratee, callback) { - return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} - -exports.default = (0, _awaitify2.default)(eachLimit, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/eachLimit.js b/general/nvim/node_modules/async/eachLimit.js deleted file mode 100644 index 5f3d009..0000000 --- a/general/nvim/node_modules/async/eachLimit.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _withoutIndex = require('./internal/withoutIndex.js'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachLimit(coll, limit, iteratee, callback) { - return (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -exports.default = (0, _awaitify2.default)(eachLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/eachOf.js b/general/nvim/node_modules/async/eachOf.js deleted file mode 100644 index c22614f..0000000 --- a/general/nvim/node_modules/async/eachOf.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _isArrayLike = require('./internal/isArrayLike.js'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _breakLoop = require('./internal/breakLoop.js'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _eachOfLimit = require('./eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = (0, _once2.default)(callback); - var index = 0, - completed = 0, - { length } = coll, - canceled = false; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err === false) { - canceled = true; - } - if (canceled === true) return; - if (err) { - callback(err); - } else if (++completed === length || value === _breakLoop2.default) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -function eachOfGeneric(coll, iteratee, callback) { - return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback); -} - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dev.json is a file containing a valid json object config for dev environment - * // dev.json is a file containing a valid json object config for test environment - * // prod.json is a file containing a valid json object config for prod environment - * // invalid.json is a file with a malformed json object - * - * let configs = {}; //global variable - * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'}; - * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'}; - * - * // asynchronous function that reads a json file and parses the contents as json object - * function parseFile(file, key, callback) { - * fs.readFile(file, "utf8", function(err, data) { - * if (err) return calback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * } - * - * // Using callbacks - * async.forEachOf(validConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * } else { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * // JSON parse error exception - * } else { - * console.log(configs); - * } - * }); - * - * // Using Promises - * async.forEachOf(validConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * }).catch( err => { - * console.error(err); - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * }).catch( err => { - * console.error(err); - * // JSON parse error exception - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.forEachOf(validConfigFileMap, parseFile); - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * catch (err) { - * console.log(err); - * } - * } - * - * //Error handing - * async () => { - * try { - * let result = await async.forEachOf(invalidConfigFileMap, parseFile); - * console.log(configs); - * } - * catch (err) { - * console.log(err); - * // JSON parse error exception - * } - * } - * - */ -function eachOf(coll, iteratee, callback) { - var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; - return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); -} - -exports.default = (0, _awaitify2.default)(eachOf, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/eachOfLimit.js b/general/nvim/node_modules/async/eachOfLimit.js deleted file mode 100644 index e9fc4db..0000000 --- a/general/nvim/node_modules/async/eachOfLimit.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit2 = require('./internal/eachOfLimit.js'); - -var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfLimit(coll, limit, iteratee, callback) { - return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); -} - -exports.default = (0, _awaitify2.default)(eachOfLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/eachOfSeries.js b/general/nvim/node_modules/async/eachOfSeries.js deleted file mode 100644 index cfb0f33..0000000 --- a/general/nvim/node_modules/async/eachOfSeries.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfSeries(coll, iteratee, callback) { - return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(eachOfSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/eachSeries.js b/general/nvim/node_modules/async/eachSeries.js deleted file mode 100644 index d674d0c..0000000 --- a/general/nvim/node_modules/async/eachSeries.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachLimit = require('./eachLimit.js'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item - * in series and therefore the iteratee functions will complete in order. - - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachSeries(coll, iteratee, callback) { - return (0, _eachLimit2.default)(coll, 1, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(eachSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/ensureAsync.js b/general/nvim/node_modules/async/ensureAsync.js deleted file mode 100644 index ad8beb5..0000000 --- a/general/nvim/node_modules/async/ensureAsync.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = ensureAsync; - -var _setImmediate = require('./internal/setImmediate.js'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ -function ensureAsync(fn) { - if ((0, _wrapAsync.isAsync)(fn)) return fn; - return function (...args /*, callback*/) { - var callback = args.pop(); - var sync = true; - args.push((...innerArgs) => { - if (sync) { - (0, _setImmediate2.default)(() => callback(...innerArgs)); - } else { - callback(...innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/every.js b/general/nvim/node_modules/async/every.js deleted file mode 100644 index 148db68..0000000 --- a/general/nvim/node_modules/async/every.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.every(fileList, fileExists, function(err, result) { - * console.log(result); - * // true - * // result is true since every file exists - * }); - * - * async.every(withMissingFileList, fileExists, function(err, result) { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }); - * - * // Using Promises - * async.every(fileList, fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.every(withMissingFileList, fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.every(fileList, fileExists); - * console.log(result); - * // true - * // result is true since every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.every(withMissingFileList, fileExists); - * console.log(result); - * // false - * // result is false since NOT every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function every(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(every, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/everyLimit.js b/general/nvim/node_modules/async/everyLimit.js deleted file mode 100644 index 25b2c08..0000000 --- a/general/nvim/node_modules/async/everyLimit.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function everyLimit(coll, limit, iteratee, callback) { - return (0, _createTester2.default)(bool => !bool, res => !res)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(everyLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/everySeries.js b/general/nvim/node_modules/async/everySeries.js deleted file mode 100644 index 147c3dc..0000000 --- a/general/nvim/node_modules/async/everySeries.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function everySeries(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(everySeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/filter.js b/general/nvim/node_modules/async/filter.js deleted file mode 100644 index 303dc1f..0000000 --- a/general/nvim/node_modules/async/filter.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter2 = require('./internal/filter.js'); - -var _filter3 = _interopRequireDefault(_filter2); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.filter(files, fileExists, function(err, results) { - * if(err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * }); - * - * // Using Promises - * async.filter(files, fileExists) - * .then(results => { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.filter(files, fileExists); - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function filter(coll, iteratee, callback) { - return (0, _filter3.default)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(filter, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/filterLimit.js b/general/nvim/node_modules/async/filterLimit.js deleted file mode 100644 index 89e55f5..0000000 --- a/general/nvim/node_modules/async/filterLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter2 = require('./internal/filter.js'); - -var _filter3 = _interopRequireDefault(_filter2); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - */ -function filterLimit(coll, limit, iteratee, callback) { - return (0, _filter3.default)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(filterLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/filterSeries.js b/general/nvim/node_modules/async/filterSeries.js deleted file mode 100644 index a045e52..0000000 --- a/general/nvim/node_modules/async/filterSeries.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter2 = require('./internal/filter.js'); - -var _filter3 = _interopRequireDefault(_filter2); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - * @returns {Promise} a promise, if no callback provided - */ -function filterSeries(coll, iteratee, callback) { - return (0, _filter3.default)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(filterSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/find.js b/general/nvim/node_modules/async/find.js deleted file mode 100644 index b3ed7ab..0000000 --- a/general/nvim/node_modules/async/find.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * } - *); - * - * // Using Promises - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists) - * .then(result => { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists); - * console.log(result); - * // dir1/file1.txt - * // result now equals the file in the list that exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function detect(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => bool, (res, item) => item)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(detect, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/findLimit.js b/general/nvim/node_modules/async/findLimit.js deleted file mode 100644 index 0ddb860..0000000 --- a/general/nvim/node_modules/async/findLimit.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ -function detectLimit(coll, limit, iteratee, callback) { - return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(detectLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/findSeries.js b/general/nvim/node_modules/async/findSeries.js deleted file mode 100644 index 0c4f26a..0000000 --- a/general/nvim/node_modules/async/findSeries.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns a Promise if no callback is passed - */ -function detectSeries(coll, iteratee, callback) { - return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(1), coll, iteratee, callback); -} - -exports.default = (0, _awaitify2.default)(detectSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/flatMap.js b/general/nvim/node_modules/async/flatMap.js deleted file mode 100644 index 8eed1ac..0000000 --- a/general/nvim/node_modules/async/flatMap.js +++ /dev/null @@ -1,115 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _concatLimit = require('./concatLimit.js'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies `iteratee` to each item in `coll`, concatenating the results. Returns - * the concatenated list. The `iteratee`s are called in parallel, and the - * results are concatenated as they return. The results array will be returned in - * the original order of `coll` passed to the `iteratee` function. - * - * @name concat - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @alias flatMap - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * let directoryList = ['dir1','dir2','dir3']; - * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4']; - * - * // Using callbacks - * async.concat(directoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.concat(directoryList, fs.readdir) - * .then(results => { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir) - * .then(results => { - * console.log(results); - * }).catch(err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.concat(directoryList, fs.readdir); - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.concat(withMissingDirectoryList, fs.readdir); - * console.log(results); - * } catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } - * } - * - */ -function concat(coll, iteratee, callback) { - return (0, _concatLimit2.default)(coll, Infinity, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(concat, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/flatMapLimit.js b/general/nvim/node_modules/async/flatMapLimit.js deleted file mode 100644 index 3d170f1..0000000 --- a/general/nvim/node_modules/async/flatMapLimit.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _mapLimit = require('./mapLimit.js'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. - * - * @name concatLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapLimit - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ -function concatLimit(coll, limit, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _mapLimit2.default)(coll, limit, (val, iterCb) => { - _iteratee(val, (err, ...args) => { - if (err) return iterCb(err); - return iterCb(err, args); - }); - }, (err, mapResults) => { - var result = []; - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - result = result.concat(...mapResults[i]); - } - } - - return callback(err, result); - }); -} -exports.default = (0, _awaitify2.default)(concatLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/flatMapSeries.js b/general/nvim/node_modules/async/flatMapSeries.js deleted file mode 100644 index 84add3b..0000000 --- a/general/nvim/node_modules/async/flatMapSeries.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _concatLimit = require('./concatLimit.js'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. - * - * @name concatSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapSeries - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`. - * The iteratee should complete with an array an array of results. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ -function concatSeries(coll, iteratee, callback) { - return (0, _concatLimit2.default)(coll, 1, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(concatSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/foldl.js b/general/nvim/node_modules/async/foldl.js deleted file mode 100644 index 56e2db8..0000000 --- a/general/nvim/node_modules/async/foldl.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file3.txt', 'file4.txt']; - * - * // asynchronous function that computes the file size in bytes - * // file size is added to the memoized value, then returned - * function getFileSizeInBytes(memo, file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, memo + stat.size); - * }); - * } - * - * // Using callbacks - * async.reduce(fileList, 0, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(result); - * } - * }); - * - * // Using Promises - * async.reduce(fileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.reduce(fileList, 0, getFileSizeInBytes); - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _eachOfSeries2.default)(coll, (x, i, iterCb) => { - _iteratee(memo, x, (err, v) => { - memo = v; - iterCb(err); - }); - }, err => callback(err, memo)); -} -exports.default = (0, _awaitify2.default)(reduce, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/foldr.js b/general/nvim/node_modules/async/foldr.js deleted file mode 100644 index bee5391..0000000 --- a/general/nvim/node_modules/async/foldr.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduceRight; - -var _reduce = require('./reduce.js'); - -var _reduce2 = _interopRequireDefault(_reduce); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - */ -function reduceRight(array, memo, iteratee, callback) { - var reversed = [...array].reverse(); - return (0, _reduce2.default)(reversed, memo, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/forEach.js b/general/nvim/node_modules/async/forEach.js deleted file mode 100644 index 405d495..0000000 --- a/general/nvim/node_modules/async/forEach.js +++ /dev/null @@ -1,129 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _withoutIndex = require('./internal/withoutIndex.js'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt']; - * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt']; - * - * // asynchronous function that deletes a file - * const deleteFile = function(file, callback) { - * fs.unlink(file, callback); - * }; - * - * // Using callbacks - * async.each(fileList, deleteFile, function(err) { - * if( err ) { - * console.log(err); - * } else { - * console.log('All files have been deleted successfully'); - * } - * }); - * - * // Error Handling - * async.each(withMissingFileList, deleteFile, function(err){ - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using Promises - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using async/await - * async () => { - * try { - * await async.each(files, deleteFile); - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * await async.each(withMissingFileList, deleteFile); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * } - * } - * - */ -function eachLimit(coll, iteratee, callback) { - return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} - -exports.default = (0, _awaitify2.default)(eachLimit, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/forEachLimit.js b/general/nvim/node_modules/async/forEachLimit.js deleted file mode 100644 index 5f3d009..0000000 --- a/general/nvim/node_modules/async/forEachLimit.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _withoutIndex = require('./internal/withoutIndex.js'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachLimit(coll, limit, iteratee, callback) { - return (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -exports.default = (0, _awaitify2.default)(eachLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/forEachOf.js b/general/nvim/node_modules/async/forEachOf.js deleted file mode 100644 index c22614f..0000000 --- a/general/nvim/node_modules/async/forEachOf.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _isArrayLike = require('./internal/isArrayLike.js'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _breakLoop = require('./internal/breakLoop.js'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _eachOfLimit = require('./eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = (0, _once2.default)(callback); - var index = 0, - completed = 0, - { length } = coll, - canceled = false; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err === false) { - canceled = true; - } - if (canceled === true) return; - if (err) { - callback(err); - } else if (++completed === length || value === _breakLoop2.default) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -function eachOfGeneric(coll, iteratee, callback) { - return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback); -} - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dev.json is a file containing a valid json object config for dev environment - * // dev.json is a file containing a valid json object config for test environment - * // prod.json is a file containing a valid json object config for prod environment - * // invalid.json is a file with a malformed json object - * - * let configs = {}; //global variable - * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'}; - * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'}; - * - * // asynchronous function that reads a json file and parses the contents as json object - * function parseFile(file, key, callback) { - * fs.readFile(file, "utf8", function(err, data) { - * if (err) return calback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * } - * - * // Using callbacks - * async.forEachOf(validConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * } else { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * // JSON parse error exception - * } else { - * console.log(configs); - * } - * }); - * - * // Using Promises - * async.forEachOf(validConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * }).catch( err => { - * console.error(err); - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * }).catch( err => { - * console.error(err); - * // JSON parse error exception - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.forEachOf(validConfigFileMap, parseFile); - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * catch (err) { - * console.log(err); - * } - * } - * - * //Error handing - * async () => { - * try { - * let result = await async.forEachOf(invalidConfigFileMap, parseFile); - * console.log(configs); - * } - * catch (err) { - * console.log(err); - * // JSON parse error exception - * } - * } - * - */ -function eachOf(coll, iteratee, callback) { - var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; - return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); -} - -exports.default = (0, _awaitify2.default)(eachOf, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/forEachOfLimit.js b/general/nvim/node_modules/async/forEachOfLimit.js deleted file mode 100644 index e9fc4db..0000000 --- a/general/nvim/node_modules/async/forEachOfLimit.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit2 = require('./internal/eachOfLimit.js'); - -var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfLimit(coll, limit, iteratee, callback) { - return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); -} - -exports.default = (0, _awaitify2.default)(eachOfLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/forEachOfSeries.js b/general/nvim/node_modules/async/forEachOfSeries.js deleted file mode 100644 index cfb0f33..0000000 --- a/general/nvim/node_modules/async/forEachOfSeries.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfSeries(coll, iteratee, callback) { - return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(eachOfSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/forEachSeries.js b/general/nvim/node_modules/async/forEachSeries.js deleted file mode 100644 index d674d0c..0000000 --- a/general/nvim/node_modules/async/forEachSeries.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachLimit = require('./eachLimit.js'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item - * in series and therefore the iteratee functions will complete in order. - - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachSeries(coll, iteratee, callback) { - return (0, _eachLimit2.default)(coll, 1, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(eachSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/forever.js b/general/nvim/node_modules/async/forever.js deleted file mode 100644 index 2c8d5b8..0000000 --- a/general/nvim/node_modules/async/forever.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _ensureAsync = require('./ensureAsync.js'); - -var _ensureAsync2 = _interopRequireDefault(_ensureAsync); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @returns {Promise} a promise that rejects if an error occurs and an errback - * is not passed - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ -function forever(fn, errback) { - var done = (0, _onlyOnce2.default)(errback); - var task = (0, _wrapAsync2.default)((0, _ensureAsync2.default)(fn)); - - function next(err) { - if (err) return done(err); - if (err === false) return; - task(next); - } - return next(); -} -exports.default = (0, _awaitify2.default)(forever, 2); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/groupBy.js b/general/nvim/node_modules/async/groupBy.js deleted file mode 100644 index 6bb52aa..0000000 --- a/general/nvim/node_modules/async/groupBy.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = groupBy; - -var _groupByLimit = require('./groupByLimit.js'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const files = ['dir1/file1.txt','dir2','dir4'] - * - * // asynchronous function that detects file type as none, file, or directory - * function detectFile(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(null, 'none'); - * } - * callback(null, stat.isDirectory() ? 'directory' : 'file'); - * }); - * } - * - * //Using callbacks - * async.groupBy(files, detectFile, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * }); - * - * // Using Promises - * async.groupBy(files, detectFile) - * .then( result => { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.groupBy(files, detectFile); - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function groupBy(coll, iteratee, callback) { - return (0, _groupByLimit2.default)(coll, Infinity, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/groupByLimit.js b/general/nvim/node_modules/async/groupByLimit.js deleted file mode 100644 index 5766d6e..0000000 --- a/general/nvim/node_modules/async/groupByLimit.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _mapLimit = require('./mapLimit.js'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ -function groupByLimit(coll, limit, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _mapLimit2.default)(coll, limit, (val, iterCb) => { - _iteratee(val, (err, key) => { - if (err) return iterCb(err); - return iterCb(err, { key, val }); - }); - }, (err, mapResults) => { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var { hasOwnProperty } = Object.prototype; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var { key } = mapResults[i]; - var { val } = mapResults[i]; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); -} - -exports.default = (0, _awaitify2.default)(groupByLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/groupBySeries.js b/general/nvim/node_modules/async/groupBySeries.js deleted file mode 100644 index 6056743..0000000 --- a/general/nvim/node_modules/async/groupBySeries.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = groupBySeries; - -var _groupByLimit = require('./groupByLimit.js'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whose - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ -function groupBySeries(coll, iteratee, callback) { - return (0, _groupByLimit2.default)(coll, 1, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/index.js b/general/nvim/node_modules/async/index.js deleted file mode 100644 index ce647d5..0000000 --- a/general/nvim/node_modules/async/index.js +++ /dev/null @@ -1,588 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.doDuring = exports.during = exports.wrapSync = undefined; -exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.flatMapSeries = exports.flatMapLimit = exports.flatMap = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.tryEach = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.groupBySeries = exports.groupByLimit = exports.groupBy = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.doWhilst = exports.doUntil = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concatLimit = exports.concat = exports.compose = exports.cargoQueue = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.applyEachSeries = exports.applyEach = exports.apply = undefined; - -var _apply = require('./apply'); - -var _apply2 = _interopRequireDefault(_apply); - -var _applyEach = require('./applyEach'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _applyEachSeries = require('./applyEachSeries'); - -var _applyEachSeries2 = _interopRequireDefault(_applyEachSeries); - -var _asyncify = require('./asyncify'); - -var _asyncify2 = _interopRequireDefault(_asyncify); - -var _auto = require('./auto'); - -var _auto2 = _interopRequireDefault(_auto); - -var _autoInject = require('./autoInject'); - -var _autoInject2 = _interopRequireDefault(_autoInject); - -var _cargo = require('./cargo'); - -var _cargo2 = _interopRequireDefault(_cargo); - -var _cargoQueue = require('./cargoQueue'); - -var _cargoQueue2 = _interopRequireDefault(_cargoQueue); - -var _compose = require('./compose'); - -var _compose2 = _interopRequireDefault(_compose); - -var _concat = require('./concat'); - -var _concat2 = _interopRequireDefault(_concat); - -var _concatLimit = require('./concatLimit'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -var _concatSeries = require('./concatSeries'); - -var _concatSeries2 = _interopRequireDefault(_concatSeries); - -var _constant = require('./constant'); - -var _constant2 = _interopRequireDefault(_constant); - -var _detect = require('./detect'); - -var _detect2 = _interopRequireDefault(_detect); - -var _detectLimit = require('./detectLimit'); - -var _detectLimit2 = _interopRequireDefault(_detectLimit); - -var _detectSeries = require('./detectSeries'); - -var _detectSeries2 = _interopRequireDefault(_detectSeries); - -var _dir = require('./dir'); - -var _dir2 = _interopRequireDefault(_dir); - -var _doUntil = require('./doUntil'); - -var _doUntil2 = _interopRequireDefault(_doUntil); - -var _doWhilst = require('./doWhilst'); - -var _doWhilst2 = _interopRequireDefault(_doWhilst); - -var _each = require('./each'); - -var _each2 = _interopRequireDefault(_each); - -var _eachLimit = require('./eachLimit'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _eachSeries = require('./eachSeries'); - -var _eachSeries2 = _interopRequireDefault(_eachSeries); - -var _ensureAsync = require('./ensureAsync'); - -var _ensureAsync2 = _interopRequireDefault(_ensureAsync); - -var _every = require('./every'); - -var _every2 = _interopRequireDefault(_every); - -var _everyLimit = require('./everyLimit'); - -var _everyLimit2 = _interopRequireDefault(_everyLimit); - -var _everySeries = require('./everySeries'); - -var _everySeries2 = _interopRequireDefault(_everySeries); - -var _filter = require('./filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _filterLimit = require('./filterLimit'); - -var _filterLimit2 = _interopRequireDefault(_filterLimit); - -var _filterSeries = require('./filterSeries'); - -var _filterSeries2 = _interopRequireDefault(_filterSeries); - -var _forever = require('./forever'); - -var _forever2 = _interopRequireDefault(_forever); - -var _groupBy = require('./groupBy'); - -var _groupBy2 = _interopRequireDefault(_groupBy); - -var _groupByLimit = require('./groupByLimit'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -var _groupBySeries = require('./groupBySeries'); - -var _groupBySeries2 = _interopRequireDefault(_groupBySeries); - -var _log = require('./log'); - -var _log2 = _interopRequireDefault(_log); - -var _map = require('./map'); - -var _map2 = _interopRequireDefault(_map); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _mapSeries = require('./mapSeries'); - -var _mapSeries2 = _interopRequireDefault(_mapSeries); - -var _mapValues = require('./mapValues'); - -var _mapValues2 = _interopRequireDefault(_mapValues); - -var _mapValuesLimit = require('./mapValuesLimit'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -var _mapValuesSeries = require('./mapValuesSeries'); - -var _mapValuesSeries2 = _interopRequireDefault(_mapValuesSeries); - -var _memoize = require('./memoize'); - -var _memoize2 = _interopRequireDefault(_memoize); - -var _nextTick = require('./nextTick'); - -var _nextTick2 = _interopRequireDefault(_nextTick); - -var _parallel = require('./parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -var _parallelLimit = require('./parallelLimit'); - -var _parallelLimit2 = _interopRequireDefault(_parallelLimit); - -var _priorityQueue = require('./priorityQueue'); - -var _priorityQueue2 = _interopRequireDefault(_priorityQueue); - -var _queue = require('./queue'); - -var _queue2 = _interopRequireDefault(_queue); - -var _race = require('./race'); - -var _race2 = _interopRequireDefault(_race); - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _reduceRight = require('./reduceRight'); - -var _reduceRight2 = _interopRequireDefault(_reduceRight); - -var _reflect = require('./reflect'); - -var _reflect2 = _interopRequireDefault(_reflect); - -var _reflectAll = require('./reflectAll'); - -var _reflectAll2 = _interopRequireDefault(_reflectAll); - -var _reject = require('./reject'); - -var _reject2 = _interopRequireDefault(_reject); - -var _rejectLimit = require('./rejectLimit'); - -var _rejectLimit2 = _interopRequireDefault(_rejectLimit); - -var _rejectSeries = require('./rejectSeries'); - -var _rejectSeries2 = _interopRequireDefault(_rejectSeries); - -var _retry = require('./retry'); - -var _retry2 = _interopRequireDefault(_retry); - -var _retryable = require('./retryable'); - -var _retryable2 = _interopRequireDefault(_retryable); - -var _seq = require('./seq'); - -var _seq2 = _interopRequireDefault(_seq); - -var _series = require('./series'); - -var _series2 = _interopRequireDefault(_series); - -var _setImmediate = require('./setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _some = require('./some'); - -var _some2 = _interopRequireDefault(_some); - -var _someLimit = require('./someLimit'); - -var _someLimit2 = _interopRequireDefault(_someLimit); - -var _someSeries = require('./someSeries'); - -var _someSeries2 = _interopRequireDefault(_someSeries); - -var _sortBy = require('./sortBy'); - -var _sortBy2 = _interopRequireDefault(_sortBy); - -var _timeout = require('./timeout'); - -var _timeout2 = _interopRequireDefault(_timeout); - -var _times = require('./times'); - -var _times2 = _interopRequireDefault(_times); - -var _timesLimit = require('./timesLimit'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -var _timesSeries = require('./timesSeries'); - -var _timesSeries2 = _interopRequireDefault(_timesSeries); - -var _transform = require('./transform'); - -var _transform2 = _interopRequireDefault(_transform); - -var _tryEach = require('./tryEach'); - -var _tryEach2 = _interopRequireDefault(_tryEach); - -var _unmemoize = require('./unmemoize'); - -var _unmemoize2 = _interopRequireDefault(_unmemoize); - -var _until = require('./until'); - -var _until2 = _interopRequireDefault(_until); - -var _waterfall = require('./waterfall'); - -var _waterfall2 = _interopRequireDefault(_waterfall); - -var _whilst = require('./whilst'); - -var _whilst2 = _interopRequireDefault(_whilst); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - -/** - * Async is a utility module which provides straight-forward, powerful functions - * for working with asynchronous JavaScript. Although originally designed for - * use with [Node.js](http://nodejs.org) and installable via - * `npm install --save async`, it can also be used directly in the browser. - * @module async - * @see AsyncFunction - */ - -/** - * A collection of `async` functions for manipulating collections, such as - * arrays and objects. - * @module Collections - */ - -/** - * A collection of `async` functions for controlling the flow through a script. - * @module ControlFlow - */ - -/** - * A collection of `async` utility functions. - * @module Utils - */ - -exports.default = { - apply: _apply2.default, - applyEach: _applyEach2.default, - applyEachSeries: _applyEachSeries2.default, - asyncify: _asyncify2.default, - auto: _auto2.default, - autoInject: _autoInject2.default, - cargo: _cargo2.default, - cargoQueue: _cargoQueue2.default, - compose: _compose2.default, - concat: _concat2.default, - concatLimit: _concatLimit2.default, - concatSeries: _concatSeries2.default, - constant: _constant2.default, - detect: _detect2.default, - detectLimit: _detectLimit2.default, - detectSeries: _detectSeries2.default, - dir: _dir2.default, - doUntil: _doUntil2.default, - doWhilst: _doWhilst2.default, - each: _each2.default, - eachLimit: _eachLimit2.default, - eachOf: _eachOf2.default, - eachOfLimit: _eachOfLimit2.default, - eachOfSeries: _eachOfSeries2.default, - eachSeries: _eachSeries2.default, - ensureAsync: _ensureAsync2.default, - every: _every2.default, - everyLimit: _everyLimit2.default, - everySeries: _everySeries2.default, - filter: _filter2.default, - filterLimit: _filterLimit2.default, - filterSeries: _filterSeries2.default, - forever: _forever2.default, - groupBy: _groupBy2.default, - groupByLimit: _groupByLimit2.default, - groupBySeries: _groupBySeries2.default, - log: _log2.default, - map: _map2.default, - mapLimit: _mapLimit2.default, - mapSeries: _mapSeries2.default, - mapValues: _mapValues2.default, - mapValuesLimit: _mapValuesLimit2.default, - mapValuesSeries: _mapValuesSeries2.default, - memoize: _memoize2.default, - nextTick: _nextTick2.default, - parallel: _parallel2.default, - parallelLimit: _parallelLimit2.default, - priorityQueue: _priorityQueue2.default, - queue: _queue2.default, - race: _race2.default, - reduce: _reduce2.default, - reduceRight: _reduceRight2.default, - reflect: _reflect2.default, - reflectAll: _reflectAll2.default, - reject: _reject2.default, - rejectLimit: _rejectLimit2.default, - rejectSeries: _rejectSeries2.default, - retry: _retry2.default, - retryable: _retryable2.default, - seq: _seq2.default, - series: _series2.default, - setImmediate: _setImmediate2.default, - some: _some2.default, - someLimit: _someLimit2.default, - someSeries: _someSeries2.default, - sortBy: _sortBy2.default, - timeout: _timeout2.default, - times: _times2.default, - timesLimit: _timesLimit2.default, - timesSeries: _timesSeries2.default, - transform: _transform2.default, - tryEach: _tryEach2.default, - unmemoize: _unmemoize2.default, - until: _until2.default, - waterfall: _waterfall2.default, - whilst: _whilst2.default, - - // aliases - all: _every2.default, - allLimit: _everyLimit2.default, - allSeries: _everySeries2.default, - any: _some2.default, - anyLimit: _someLimit2.default, - anySeries: _someSeries2.default, - find: _detect2.default, - findLimit: _detectLimit2.default, - findSeries: _detectSeries2.default, - flatMap: _concat2.default, - flatMapLimit: _concatLimit2.default, - flatMapSeries: _concatSeries2.default, - forEach: _each2.default, - forEachSeries: _eachSeries2.default, - forEachLimit: _eachLimit2.default, - forEachOf: _eachOf2.default, - forEachOfSeries: _eachOfSeries2.default, - forEachOfLimit: _eachOfLimit2.default, - inject: _reduce2.default, - foldl: _reduce2.default, - foldr: _reduceRight2.default, - select: _filter2.default, - selectLimit: _filterLimit2.default, - selectSeries: _filterSeries2.default, - wrapSync: _asyncify2.default, - during: _whilst2.default, - doDuring: _doWhilst2.default -}; -exports.apply = _apply2.default; -exports.applyEach = _applyEach2.default; -exports.applyEachSeries = _applyEachSeries2.default; -exports.asyncify = _asyncify2.default; -exports.auto = _auto2.default; -exports.autoInject = _autoInject2.default; -exports.cargo = _cargo2.default; -exports.cargoQueue = _cargoQueue2.default; -exports.compose = _compose2.default; -exports.concat = _concat2.default; -exports.concatLimit = _concatLimit2.default; -exports.concatSeries = _concatSeries2.default; -exports.constant = _constant2.default; -exports.detect = _detect2.default; -exports.detectLimit = _detectLimit2.default; -exports.detectSeries = _detectSeries2.default; -exports.dir = _dir2.default; -exports.doUntil = _doUntil2.default; -exports.doWhilst = _doWhilst2.default; -exports.each = _each2.default; -exports.eachLimit = _eachLimit2.default; -exports.eachOf = _eachOf2.default; -exports.eachOfLimit = _eachOfLimit2.default; -exports.eachOfSeries = _eachOfSeries2.default; -exports.eachSeries = _eachSeries2.default; -exports.ensureAsync = _ensureAsync2.default; -exports.every = _every2.default; -exports.everyLimit = _everyLimit2.default; -exports.everySeries = _everySeries2.default; -exports.filter = _filter2.default; -exports.filterLimit = _filterLimit2.default; -exports.filterSeries = _filterSeries2.default; -exports.forever = _forever2.default; -exports.groupBy = _groupBy2.default; -exports.groupByLimit = _groupByLimit2.default; -exports.groupBySeries = _groupBySeries2.default; -exports.log = _log2.default; -exports.map = _map2.default; -exports.mapLimit = _mapLimit2.default; -exports.mapSeries = _mapSeries2.default; -exports.mapValues = _mapValues2.default; -exports.mapValuesLimit = _mapValuesLimit2.default; -exports.mapValuesSeries = _mapValuesSeries2.default; -exports.memoize = _memoize2.default; -exports.nextTick = _nextTick2.default; -exports.parallel = _parallel2.default; -exports.parallelLimit = _parallelLimit2.default; -exports.priorityQueue = _priorityQueue2.default; -exports.queue = _queue2.default; -exports.race = _race2.default; -exports.reduce = _reduce2.default; -exports.reduceRight = _reduceRight2.default; -exports.reflect = _reflect2.default; -exports.reflectAll = _reflectAll2.default; -exports.reject = _reject2.default; -exports.rejectLimit = _rejectLimit2.default; -exports.rejectSeries = _rejectSeries2.default; -exports.retry = _retry2.default; -exports.retryable = _retryable2.default; -exports.seq = _seq2.default; -exports.series = _series2.default; -exports.setImmediate = _setImmediate2.default; -exports.some = _some2.default; -exports.someLimit = _someLimit2.default; -exports.someSeries = _someSeries2.default; -exports.sortBy = _sortBy2.default; -exports.timeout = _timeout2.default; -exports.times = _times2.default; -exports.timesLimit = _timesLimit2.default; -exports.timesSeries = _timesSeries2.default; -exports.transform = _transform2.default; -exports.tryEach = _tryEach2.default; -exports.unmemoize = _unmemoize2.default; -exports.until = _until2.default; -exports.waterfall = _waterfall2.default; -exports.whilst = _whilst2.default; -exports.all = _every2.default; -exports.allLimit = _everyLimit2.default; -exports.allSeries = _everySeries2.default; -exports.any = _some2.default; -exports.anyLimit = _someLimit2.default; -exports.anySeries = _someSeries2.default; -exports.find = _detect2.default; -exports.findLimit = _detectLimit2.default; -exports.findSeries = _detectSeries2.default; -exports.flatMap = _concat2.default; -exports.flatMapLimit = _concatLimit2.default; -exports.flatMapSeries = _concatSeries2.default; -exports.forEach = _each2.default; -exports.forEachSeries = _eachSeries2.default; -exports.forEachLimit = _eachLimit2.default; -exports.forEachOf = _eachOf2.default; -exports.forEachOfSeries = _eachOfSeries2.default; -exports.forEachOfLimit = _eachOfLimit2.default; -exports.inject = _reduce2.default; -exports.foldl = _reduce2.default; -exports.foldr = _reduceRight2.default; -exports.select = _filter2.default; -exports.selectLimit = _filterLimit2.default; -exports.selectSeries = _filterSeries2.default; -exports.wrapSync = _asyncify2.default; -exports.during = _whilst2.default; -exports.doDuring = _doWhilst2.default; \ No newline at end of file diff --git a/general/nvim/node_modules/async/inject.js b/general/nvim/node_modules/async/inject.js deleted file mode 100644 index 56e2db8..0000000 --- a/general/nvim/node_modules/async/inject.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file3.txt', 'file4.txt']; - * - * // asynchronous function that computes the file size in bytes - * // file size is added to the memoized value, then returned - * function getFileSizeInBytes(memo, file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, memo + stat.size); - * }); - * } - * - * // Using callbacks - * async.reduce(fileList, 0, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(result); - * } - * }); - * - * // Using Promises - * async.reduce(fileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.reduce(fileList, 0, getFileSizeInBytes); - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _eachOfSeries2.default)(coll, (x, i, iterCb) => { - _iteratee(memo, x, (err, v) => { - memo = v; - iterCb(err); - }); - }, err => callback(err, memo)); -} -exports.default = (0, _awaitify2.default)(reduce, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/DoublyLinkedList.js b/general/nvim/node_modules/async/internal/DoublyLinkedList.js deleted file mode 100644 index cd11c3b..0000000 --- a/general/nvim/node_modules/async/internal/DoublyLinkedList.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation -// used for queues. This implementation assumes that the node provided by the user can be modified -// to adjust the next and last properties. We implement only the minimal functionality -// for queue support. -class DLL { - constructor() { - this.head = this.tail = null; - this.length = 0; - } - - removeLink(node) { - if (node.prev) node.prev.next = node.next;else this.head = node.next; - if (node.next) node.next.prev = node.prev;else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; - } - - empty() { - while (this.head) this.shift(); - return this; - } - - insertAfter(node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode;else this.tail = newNode; - node.next = newNode; - this.length += 1; - } - - insertBefore(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode;else this.head = newNode; - node.prev = newNode; - this.length += 1; - } - - unshift(node) { - if (this.head) this.insertBefore(this.head, node);else setInitial(this, node); - } - - push(node) { - if (this.tail) this.insertAfter(this.tail, node);else setInitial(this, node); - } - - shift() { - return this.head && this.removeLink(this.head); - } - - pop() { - return this.tail && this.removeLink(this.tail); - } - - toArray() { - return [...this]; - } - - *[Symbol.iterator]() { - var cur = this.head; - while (cur) { - yield cur.data; - cur = cur.next; - } - } - - remove(testFn) { - var curr = this.head; - while (curr) { - var { next } = curr; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; - } -} - -exports.default = DLL; -function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/Heap.js b/general/nvim/node_modules/async/internal/Heap.js deleted file mode 100644 index 80762fe..0000000 --- a/general/nvim/node_modules/async/internal/Heap.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// Binary min-heap implementation used for priority queue. -// Implementation is stable, i.e. push time is considered for equal priorities -class Heap { - constructor() { - this.heap = []; - this.pushCount = Number.MIN_SAFE_INTEGER; - } - - get length() { - return this.heap.length; - } - - empty() { - this.heap = []; - return this; - } - - percUp(index) { - let p; - - while (index > 0 && smaller(this.heap[index], this.heap[p = parent(index)])) { - let t = this.heap[index]; - this.heap[index] = this.heap[p]; - this.heap[p] = t; - - index = p; - } - } - - percDown(index) { - let l; - - while ((l = leftChi(index)) < this.heap.length) { - if (l + 1 < this.heap.length && smaller(this.heap[l + 1], this.heap[l])) { - l = l + 1; - } - - if (smaller(this.heap[index], this.heap[l])) { - break; - } - - let t = this.heap[index]; - this.heap[index] = this.heap[l]; - this.heap[l] = t; - - index = l; - } - } - - push(node) { - node.pushCount = ++this.pushCount; - this.heap.push(node); - this.percUp(this.heap.length - 1); - } - - unshift(node) { - return this.heap.push(node); - } - - shift() { - let [top] = this.heap; - - this.heap[0] = this.heap[this.heap.length - 1]; - this.heap.pop(); - this.percDown(0); - - return top; - } - - toArray() { - return [...this]; - } - - *[Symbol.iterator]() { - for (let i = 0; i < this.heap.length; i++) { - yield this.heap[i].data; - } - } - - remove(testFn) { - let j = 0; - for (let i = 0; i < this.heap.length; i++) { - if (!testFn(this.heap[i])) { - this.heap[j] = this.heap[i]; - j++; - } - } - - this.heap.splice(j); - - for (let i = parent(this.heap.length - 1); i >= 0; i--) { - this.percDown(i); - } - - return this; - } -} - -exports.default = Heap; -function leftChi(i) { - return (i << 1) + 1; -} - -function parent(i) { - return (i + 1 >> 1) - 1; -} - -function smaller(x, y) { - if (x.priority !== y.priority) { - return x.priority < y.priority; - } else { - return x.pushCount < y.pushCount; - } -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/applyEach.js b/general/nvim/node_modules/async/internal/applyEach.js deleted file mode 100644 index a3f4ef1..0000000 --- a/general/nvim/node_modules/async/internal/applyEach.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (eachfn) { - return function applyEach(fns, ...callArgs) { - const go = (0, _awaitify2.default)(function (callback) { - var that = this; - return eachfn(fns, (fn, cb) => { - (0, _wrapAsync2.default)(fn).apply(that, callArgs.concat(cb)); - }, callback); - }); - return go; - }; -}; - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/asyncEachOfLimit.js b/general/nvim/node_modules/async/internal/asyncEachOfLimit.js deleted file mode 100644 index bba74c7..0000000 --- a/general/nvim/node_modules/async/internal/asyncEachOfLimit.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = asyncEachOfLimit; - -var _breakLoop = require('./breakLoop.js'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// for async generators -function asyncEachOfLimit(generator, limit, iteratee, callback) { - let done = false; - let canceled = false; - let awaiting = false; - let running = 0; - let idx = 0; - - function replenish() { - //console.log('replenish') - if (running >= limit || awaiting || done) return; - //console.log('replenish awaiting') - awaiting = true; - generator.next().then(({ value, done: iterDone }) => { - //console.log('got value', value) - if (canceled || done) return; - awaiting = false; - if (iterDone) { - done = true; - if (running <= 0) { - //console.log('done nextCb') - callback(null); - } - return; - } - running++; - iteratee(value, idx, iterateeCallback); - idx++; - replenish(); - }).catch(handleError); - } - - function iterateeCallback(err, result) { - //console.log('iterateeCallback') - running -= 1; - if (canceled) return; - if (err) return handleError(err); - - if (err === false) { - done = true; - canceled = true; - return; - } - - if (result === _breakLoop2.default || done && running <= 0) { - done = true; - //console.log('done iterCb') - return callback(null); - } - replenish(); - } - - function handleError(err) { - if (canceled) return; - awaiting = false; - done = true; - callback(err); - } - - replenish(); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/awaitify.js b/general/nvim/node_modules/async/internal/awaitify.js deleted file mode 100644 index 7b36f1a..0000000 --- a/general/nvim/node_modules/async/internal/awaitify.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = awaitify; -// conditionally promisify a function. -// only return a promise if a callback is omitted -function awaitify(asyncFn, arity = asyncFn.length) { - if (!arity) throw new Error('arity is undefined'); - function awaitable(...args) { - if (typeof args[arity - 1] === 'function') { - return asyncFn.apply(this, args); - } - - return new Promise((resolve, reject) => { - args[arity - 1] = (err, ...cbArgs) => { - if (err) return reject(err); - resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); - }; - asyncFn.apply(this, args); - }); - } - - return awaitable; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/breakLoop.js b/general/nvim/node_modules/async/internal/breakLoop.js deleted file mode 100644 index 8245e55..0000000 --- a/general/nvim/node_modules/async/internal/breakLoop.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// A temporary value used to identify if the loop should be broken. -// See #1064, #1293 -const breakLoop = {}; -exports.default = breakLoop; -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/consoleFunc.js b/general/nvim/node_modules/async/internal/consoleFunc.js deleted file mode 100644 index 70347a5..0000000 --- a/general/nvim/node_modules/async/internal/consoleFunc.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = consoleFunc; - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function consoleFunc(name) { - return (fn, ...args) => (0, _wrapAsync2.default)(fn)(...args, (err, ...resultArgs) => { - /* istanbul ignore else */ - if (typeof console === 'object') { - /* istanbul ignore else */ - if (err) { - /* istanbul ignore else */ - if (console.error) { - console.error(err); - } - } else if (console[name]) { - /* istanbul ignore else */ - resultArgs.forEach(x => console[name](x)); - } - } - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/createTester.js b/general/nvim/node_modules/async/internal/createTester.js deleted file mode 100644 index 7b2d734..0000000 --- a/general/nvim/node_modules/async/internal/createTester.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _createTester; - -var _breakLoop = require('./breakLoop.js'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _createTester(check, getResult) { - return (eachfn, arr, _iteratee, cb) => { - var testPassed = false; - var testResult; - const iteratee = (0, _wrapAsync2.default)(_iteratee); - eachfn(arr, (value, _, callback) => { - iteratee(value, (err, result) => { - if (err || err === false) return callback(err); - - if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - return callback(null, _breakLoop2.default); - } - callback(); - }); - }, err => { - if (err) return cb(err); - cb(null, testPassed ? testResult : getResult(false)); - }); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/eachOfLimit.js b/general/nvim/node_modules/async/internal/eachOfLimit.js deleted file mode 100644 index fc26b20..0000000 --- a/general/nvim/node_modules/async/internal/eachOfLimit.js +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _once = require('./once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _iterator = require('./iterator.js'); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _onlyOnce = require('./onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./wrapAsync.js'); - -var _asyncEachOfLimit = require('./asyncEachOfLimit.js'); - -var _asyncEachOfLimit2 = _interopRequireDefault(_asyncEachOfLimit); - -var _breakLoop = require('./breakLoop.js'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = limit => { - return (obj, iteratee, callback) => { - callback = (0, _once2.default)(callback); - if (limit <= 0) { - throw new RangeError('concurrency limit cannot be less than 1'); - } - if (!obj) { - return callback(null); - } - if ((0, _wrapAsync.isAsyncGenerator)(obj)) { - return (0, _asyncEachOfLimit2.default)(obj, limit, iteratee, callback); - } - if ((0, _wrapAsync.isAsyncIterable)(obj)) { - return (0, _asyncEachOfLimit2.default)(obj[Symbol.asyncIterator](), limit, iteratee, callback); - } - var nextElem = (0, _iterator2.default)(obj); - var done = false; - var canceled = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - if (canceled) return; - running -= 1; - if (err) { - done = true; - callback(err); - } else if (err === false) { - done = true; - canceled = true; - } else if (value === _breakLoop2.default || done && running <= 0) { - done = true; - return callback(null); - } else if (!looping) { - replenish(); - } - } - - function replenish() { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; -}; - -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/filter.js b/general/nvim/node_modules/async/internal/filter.js deleted file mode 100644 index aef2b9d..0000000 --- a/general/nvim/node_modules/async/internal/filter.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _filter; - -var _isArrayLike = require('./isArrayLike.js'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, (x, index, iterCb) => { - iteratee(x, (err, v) => { - truthValues[index] = !!v; - iterCb(err); - }); - }, err => { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); -} - -function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, (x, index, iterCb) => { - iteratee(x, (err, v) => { - if (err) return iterCb(err); - if (v) { - results.push({ index, value: x }); - } - iterCb(err); - }); - }, err => { - if (err) return callback(err); - callback(null, results.sort((a, b) => a.index - b.index).map(v => v.value)); - }); -} - -function _filter(eachfn, coll, iteratee, callback) { - var filter = (0, _isArrayLike2.default)(coll) ? filterArray : filterGeneric; - return filter(eachfn, coll, (0, _wrapAsync2.default)(iteratee), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/getIterator.js b/general/nvim/node_modules/async/internal/getIterator.js deleted file mode 100644 index 830a545..0000000 --- a/general/nvim/node_modules/async/internal/getIterator.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll) { - return coll[Symbol.iterator] && coll[Symbol.iterator](); -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/initialParams.js b/general/nvim/node_modules/async/internal/initialParams.js deleted file mode 100644 index 245378c..0000000 --- a/general/nvim/node_modules/async/internal/initialParams.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (fn) { - return function (...args /*, callback*/) { - var callback = args.pop(); - return fn.call(this, args, callback); - }; -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/isArrayLike.js b/general/nvim/node_modules/async/internal/isArrayLike.js deleted file mode 100644 index ce07670..0000000 --- a/general/nvim/node_modules/async/internal/isArrayLike.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isArrayLike; -function isArrayLike(value) { - return value && typeof value.length === 'number' && value.length >= 0 && value.length % 1 === 0; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/iterator.js b/general/nvim/node_modules/async/internal/iterator.js deleted file mode 100644 index 90b0223..0000000 --- a/general/nvim/node_modules/async/internal/iterator.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createIterator; - -var _isArrayLike = require('./isArrayLike.js'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _getIterator = require('./getIterator.js'); - -var _getIterator2 = _interopRequireDefault(_getIterator); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? { value: coll[i], key: i } : null; - }; -} - -function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) return null; - i++; - return { value: item.value, key: i }; - }; -} - -function createObjectIterator(obj) { - var okeys = obj ? Object.keys(obj) : []; - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? { value: obj[key], key } : null; - }; -} - -function createIterator(coll) { - if ((0, _isArrayLike2.default)(coll)) { - return createArrayIterator(coll); - } - - var iterator = (0, _getIterator2.default)(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/map.js b/general/nvim/node_modules/async/internal/map.js deleted file mode 100644 index af3fd09..0000000 --- a/general/nvim/node_modules/async/internal/map.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _asyncMap; - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncMap(eachfn, arr, iteratee, callback) { - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - - return eachfn(arr, (value, _, iterCb) => { - var index = counter++; - _iteratee(value, (err, v) => { - results[index] = v; - iterCb(err); - }); - }, err => { - callback(err, results); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/once.js b/general/nvim/node_modules/async/internal/once.js deleted file mode 100644 index 49f3727..0000000 --- a/general/nvim/node_modules/async/internal/once.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = once; -function once(fn) { - function wrapper(...args) { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, args); - } - Object.assign(wrapper, fn); - return wrapper; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/onlyOnce.js b/general/nvim/node_modules/async/internal/onlyOnce.js deleted file mode 100644 index 6ad721b..0000000 --- a/general/nvim/node_modules/async/internal/onlyOnce.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = onlyOnce; -function onlyOnce(fn) { - return function (...args) { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, args); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/parallel.js b/general/nvim/node_modules/async/internal/parallel.js deleted file mode 100644 index 75741bb..0000000 --- a/general/nvim/node_modules/async/internal/parallel.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _isArrayLike = require('./isArrayLike.js'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = (0, _awaitify2.default)((eachfn, tasks, callback) => { - var results = (0, _isArrayLike2.default)(tasks) ? [] : {}; - - eachfn(tasks, (task, key, taskCb) => { - (0, _wrapAsync2.default)(task)((err, ...result) => { - if (result.length < 2) { - [result] = result; - } - results[key] = result; - taskCb(err); - }); - }, err => callback(err, results)); -}, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/promiseCallback.js b/general/nvim/node_modules/async/internal/promiseCallback.js deleted file mode 100644 index 17a8301..0000000 --- a/general/nvim/node_modules/async/internal/promiseCallback.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -const PROMISE_SYMBOL = Symbol('promiseCallback'); - -function promiseCallback() { - let resolve, reject; - function callback(err, ...args) { - if (err) return reject(err); - resolve(args.length > 1 ? args : args[0]); - } - - callback[PROMISE_SYMBOL] = new Promise((res, rej) => { - resolve = res, reject = rej; - }); - - return callback; -} - -exports.promiseCallback = promiseCallback; -exports.PROMISE_SYMBOL = PROMISE_SYMBOL; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/queue.js b/general/nvim/node_modules/async/internal/queue.js deleted file mode 100644 index c22b5b8..0000000 --- a/general/nvim/node_modules/async/internal/queue.js +++ /dev/null @@ -1,291 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = queue; - -var _onlyOnce = require('./onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _setImmediate = require('./setImmediate.js'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _DoublyLinkedList = require('./DoublyLinkedList.js'); - -var _DoublyLinkedList2 = _interopRequireDefault(_DoublyLinkedList); - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } else if (concurrency === 0) { - throw new RangeError('Concurrency must not be zero'); - } - - var _worker = (0, _wrapAsync2.default)(worker); - var numRunning = 0; - var workersList = []; - const events = { - error: [], - drain: [], - saturated: [], - unsaturated: [], - empty: [] - }; - - function on(event, handler) { - events[event].push(handler); - } - - function once(event, handler) { - const handleAndRemove = (...args) => { - off(event, handleAndRemove); - handler(...args); - }; - events[event].push(handleAndRemove); - } - - function off(event, handler) { - if (!event) return Object.keys(events).forEach(ev => events[ev] = []); - if (!handler) return events[event] = []; - events[event] = events[event].filter(ev => ev !== handler); - } - - function trigger(event, ...args) { - events[event].forEach(handler => handler(...args)); - } - - var processingScheduled = false; - function _insert(data, insertAtFront, rejectOnError, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - - var res, rej; - function promiseCallback(err, ...args) { - // we don't care about the error, let the global error handler - // deal with it - if (err) return rejectOnError ? rej(err) : res(); - if (args.length <= 1) return res(args[0]); - res(args); - } - - var item = { - data, - callback: rejectOnError ? promiseCallback : callback || promiseCallback - }; - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - - if (!processingScheduled) { - processingScheduled = true; - (0, _setImmediate2.default)(() => { - processingScheduled = false; - q.process(); - }); - } - - if (rejectOnError || !callback) { - return new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); - } - } - - function _createCB(tasks) { - return function (err, ...args) { - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = workersList.indexOf(task); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback(err, ...args); - - if (err != null) { - trigger('error', err, task.data); - } - } - - if (numRunning <= q.concurrency - q.buffer) { - trigger('unsaturated'); - } - - if (q.idle()) { - trigger('drain'); - } - q.process(); - }; - } - - function _maybeDrain(data) { - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - (0, _setImmediate2.default)(() => trigger('drain')); - return true; - } - return false; - } - - const eventMethod = name => handler => { - if (!handler) { - return new Promise((resolve, reject) => { - once(name, (err, data) => { - if (err) return reject(err); - resolve(data); - }); - }); - } - off(name); - on(name, handler); - }; - - var isProcessing = false; - var q = { - _tasks: new _DoublyLinkedList2.default(), - *[Symbol.iterator]() { - yield* q._tasks[Symbol.iterator](); - }, - concurrency, - payload, - buffer: concurrency / 4, - started: false, - paused: false, - push(data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return; - return data.map(datum => _insert(datum, false, false, callback)); - } - return _insert(data, false, false, callback); - }, - pushAsync(data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return; - return data.map(datum => _insert(datum, false, true, callback)); - } - return _insert(data, false, true, callback); - }, - kill() { - off(); - q._tasks.empty(); - }, - unshift(data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return; - return data.map(datum => _insert(datum, true, false, callback)); - } - return _insert(data, true, false, callback); - }, - unshiftAsync(data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return; - return data.map(datum => _insert(datum, true, true, callback)); - } - return _insert(data, true, true, callback); - }, - remove(testFn) { - q._tasks.remove(testFn); - }, - process() { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while (!q.paused && numRunning < q.concurrency && q._tasks.length) { - var tasks = [], - data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - trigger('empty'); - } - - if (numRunning === q.concurrency) { - trigger('saturated'); - } - - var cb = (0, _onlyOnce2.default)(_createCB(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length() { - return q._tasks.length; - }, - running() { - return numRunning; - }, - workersList() { - return workersList; - }, - idle() { - return q._tasks.length + numRunning === 0; - }, - pause() { - q.paused = true; - }, - resume() { - if (q.paused === false) { - return; - } - q.paused = false; - (0, _setImmediate2.default)(q.process); - } - }; - // define these as fixed properties, so people get useful errors when updating - Object.defineProperties(q, { - saturated: { - writable: false, - value: eventMethod('saturated') - }, - unsaturated: { - writable: false, - value: eventMethod('unsaturated') - }, - empty: { - writable: false, - value: eventMethod('empty') - }, - drain: { - writable: false, - value: eventMethod('drain') - }, - error: { - writable: false, - value: eventMethod('error') - } - }); - return q; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/range.js b/general/nvim/node_modules/async/internal/range.js deleted file mode 100644 index 6680e64..0000000 --- a/general/nvim/node_modules/async/internal/range.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = range; -function range(size) { - var result = Array(size); - while (size--) { - result[size] = size; - } - return result; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/reject.js b/general/nvim/node_modules/async/internal/reject.js deleted file mode 100644 index 7388ef4..0000000 --- a/general/nvim/node_modules/async/internal/reject.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reject; - -var _filter = require('./filter.js'); - -var _filter2 = _interopRequireDefault(_filter); - -var _wrapAsync = require('./wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function reject(eachfn, arr, _iteratee, callback) { - const iteratee = (0, _wrapAsync2.default)(_iteratee); - return (0, _filter2.default)(eachfn, arr, (value, cb) => { - iteratee(value, (err, v) => { - cb(err, !v); - }); - }, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/setImmediate.js b/general/nvim/node_modules/async/internal/setImmediate.js deleted file mode 100644 index 513efd1..0000000 --- a/general/nvim/node_modules/async/internal/setImmediate.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.fallback = fallback; -exports.wrap = wrap; -/* istanbul ignore file */ - -var hasQueueMicrotask = exports.hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask; -var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate; -var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - -function fallback(fn) { - setTimeout(fn, 0); -} - -function wrap(defer) { - return (fn, ...args) => defer(() => fn(...args)); -} - -var _defer; - -if (hasQueueMicrotask) { - _defer = queueMicrotask; -} else if (hasSetImmediate) { - _defer = setImmediate; -} else if (hasNextTick) { - _defer = process.nextTick; -} else { - _defer = fallback; -} - -exports.default = wrap(_defer); \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/withoutIndex.js b/general/nvim/node_modules/async/internal/withoutIndex.js deleted file mode 100644 index ec45fa3..0000000 --- a/general/nvim/node_modules/async/internal/withoutIndex.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _withoutIndex; -function _withoutIndex(iteratee) { - return (value, index, callback) => iteratee(value, callback); -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/internal/wrapAsync.js b/general/nvim/node_modules/async/internal/wrapAsync.js deleted file mode 100644 index ad4d619..0000000 --- a/general/nvim/node_modules/async/internal/wrapAsync.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isAsyncIterable = exports.isAsyncGenerator = exports.isAsync = undefined; - -var _asyncify = require('../asyncify.js'); - -var _asyncify2 = _interopRequireDefault(_asyncify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isAsync(fn) { - return fn[Symbol.toStringTag] === 'AsyncFunction'; -} - -function isAsyncGenerator(fn) { - return fn[Symbol.toStringTag] === 'AsyncGenerator'; -} - -function isAsyncIterable(obj) { - return typeof obj[Symbol.asyncIterator] === 'function'; -} - -function wrapAsync(asyncFn) { - if (typeof asyncFn !== 'function') throw new Error('expected a function'); - return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; -} - -exports.default = wrapAsync; -exports.isAsync = isAsync; -exports.isAsyncGenerator = isAsyncGenerator; -exports.isAsyncIterable = isAsyncIterable; \ No newline at end of file diff --git a/general/nvim/node_modules/async/log.js b/general/nvim/node_modules/async/log.js deleted file mode 100644 index 8fc1ed5..0000000 --- a/general/nvim/node_modules/async/log.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _consoleFunc = require('./internal/consoleFunc.js'); - -var _consoleFunc2 = _interopRequireDefault(_consoleFunc); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ -exports.default = (0, _consoleFunc2.default)('log'); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/map.js b/general/nvim/node_modules/async/map.js deleted file mode 100644 index ec4135d..0000000 --- a/general/nvim/node_modules/async/map.js +++ /dev/null @@ -1,142 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _map2 = require('./internal/map.js'); - -var _map3 = _interopRequireDefault(_map2); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callbacks - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.map(fileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.map(fileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.map(fileList, getFileSizeInBytes); - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.map(withMissingFileList, getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function map(coll, iteratee, callback) { - return (0, _map3.default)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(map, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/mapLimit.js b/general/nvim/node_modules/async/mapLimit.js deleted file mode 100644 index b5e461c..0000000 --- a/general/nvim/node_modules/async/mapLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _map2 = require('./internal/map.js'); - -var _map3 = _interopRequireDefault(_map2); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function mapLimit(coll, limit, iteratee, callback) { - return (0, _map3.default)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(mapLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/mapSeries.js b/general/nvim/node_modules/async/mapSeries.js deleted file mode 100644 index 91f36bf..0000000 --- a/general/nvim/node_modules/async/mapSeries.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _map2 = require('./internal/map.js'); - -var _map3 = _interopRequireDefault(_map2); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function mapSeries(coll, iteratee, callback) { - return (0, _map3.default)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(mapSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/mapValues.js b/general/nvim/node_modules/async/mapValues.js deleted file mode 100644 index 00da926..0000000 --- a/general/nvim/node_modules/async/mapValues.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mapValues; - -var _mapValuesLimit = require('./mapValuesLimit.js'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file3.txt' - * }; - * - * const withMissingFileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file4.txt' - * }; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, key, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.mapValues(fileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * }); - * - * // Error handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(result); - * } - * }); - * - * // Using Promises - * async.mapValues(fileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * }).catch (err => { - * console.log(err); - * }); - * - * // Error Handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch (err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.mapValues(fileMap, getFileSizeInBytes); - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.mapValues(withMissingFileMap, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function mapValues(obj, iteratee, callback) { - return (0, _mapValuesLimit2.default)(obj, Infinity, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/mapValuesLimit.js b/general/nvim/node_modules/async/mapValuesLimit.js deleted file mode 100644 index 93066ee..0000000 --- a/general/nvim/node_modules/async/mapValuesLimit.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ -function mapValuesLimit(obj, limit, iteratee, callback) { - callback = (0, _once2.default)(callback); - var newObj = {}; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _eachOfLimit2.default)(limit)(obj, (val, key, next) => { - _iteratee(val, key, (err, result) => { - if (err) return next(err); - newObj[key] = result; - next(err); - }); - }, err => callback(err, newObj)); -} - -exports.default = (0, _awaitify2.default)(mapValuesLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/mapValuesSeries.js b/general/nvim/node_modules/async/mapValuesSeries.js deleted file mode 100644 index 560058a..0000000 --- a/general/nvim/node_modules/async/mapValuesSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mapValuesSeries; - -var _mapValuesLimit = require('./mapValuesLimit.js'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ -function mapValuesSeries(obj, iteratee, callback) { - return (0, _mapValuesLimit2.default)(obj, 1, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/memoize.js b/general/nvim/node_modules/async/memoize.js deleted file mode 100644 index 6003e41..0000000 --- a/general/nvim/node_modules/async/memoize.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = memoize; - -var _setImmediate = require('./internal/setImmediate.js'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _initialParams = require('./internal/initialParams.js'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * **Note: if the async function errs, the result will not be cached and - * subsequent calls will call the wrapped function.** - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ -function memoize(fn, hasher = v => v) { - var memo = Object.create(null); - var queues = Object.create(null); - var _fn = (0, _wrapAsync2.default)(fn); - var memoized = (0, _initialParams2.default)((args, callback) => { - var key = hasher(...args); - if (key in memo) { - (0, _setImmediate2.default)(() => callback(null, ...memo[key])); - } else if (key in queues) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn(...args, (err, ...resultArgs) => { - // #1465 don't memoize if an error occurred - if (!err) { - memo[key] = resultArgs; - } - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i](err, ...resultArgs); - } - }); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/nextTick.js b/general/nvim/node_modules/async/nextTick.js deleted file mode 100644 index e6d321b..0000000 --- a/general/nvim/node_modules/async/nextTick.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _setImmediate = require('./internal/setImmediate.js'); - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -var _defer; /* istanbul ignore file */ - - -if (_setImmediate.hasNextTick) { - _defer = process.nextTick; -} else if (_setImmediate.hasSetImmediate) { - _defer = setImmediate; -} else { - _defer = _setImmediate.fallback; -} - -exports.default = (0, _setImmediate.wrap)(_defer); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/package.json b/general/nvim/node_modules/async/package.json deleted file mode 100644 index 2c729a8..0000000 --- a/general/nvim/node_modules/async/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "3.2.3", - "main": "dist/async.js", - "author": "Caolan McMahon", - "homepage": "https://caolan.github.io/async/", - "repository": { - "type": "git", - "url": "https://github.com/caolan/async.git" - }, - "bugs": { - "url": "https://github.com/caolan/async/issues" - }, - "keywords": [ - "async", - "callback", - "module", - "utility" - ], - "devDependencies": { - "babel-core": "^6.26.3", - "babel-eslint": "^8.2.6", - "babel-minify": "^0.5.0", - "babel-plugin-add-module-exports": "^0.2.1", - "babel-plugin-istanbul": "^5.1.4", - "babel-plugin-syntax-async-generators": "^6.13.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", - "babel-preset-es2015": "^6.3.13", - "babel-preset-es2017": "^6.22.0", - "babel-register": "^6.26.0", - "babelify": "^8.0.0", - "benchmark": "^2.1.1", - "bluebird": "^3.4.6", - "browserify": "^16.2.3", - "chai": "^4.2.0", - "cheerio": "^0.22.0", - "coveralls": "^3.0.4", - "es6-promise": "^2.3.0", - "eslint": "^6.0.1", - "eslint-plugin-prefer-arrow": "^1.1.5", - "fs-extra": "^0.26.7", - "jsdoc": "^3.6.2", - "karma": "^4.1.0", - "karma-browserify": "^5.3.0", - "karma-edge-launcher": "^0.4.2", - "karma-firefox-launcher": "^1.1.0", - "karma-junit-reporter": "^1.2.0", - "karma-mocha": "^1.2.0", - "karma-mocha-reporter": "^2.2.0", - "karma-safari-launcher": "^1.0.0", - "mocha": "^6.1.4", - "mocha-junit-reporter": "^1.18.0", - "native-promise-only": "^0.8.0-a", - "nyc": "^14.1.1", - "rollup": "^0.63.4", - "rollup-plugin-node-resolve": "^2.0.0", - "rollup-plugin-npm": "^2.0.0", - "rsvp": "^3.0.18", - "semver": "^5.5.0", - "yargs": "^11.0.0" - }, - "scripts": { - "coverage": "nyc npm run mocha-node-test -- --grep @nycinvalid --invert", - "coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls", - "jsdoc": "jsdoc -c ./support/jsdoc/jsdoc.json && node support/jsdoc/jsdoc-fix-html.js", - "lint": "eslint --fix lib/ test/ perf/memory.js perf/suites.js perf/benchmark.js support/build/ support/*.js karma.conf.js", - "mocha-browser-test": "karma start", - "mocha-node-test": "mocha", - "mocha-test": "npm run mocha-node-test && npm run mocha-browser-test", - "test": "npm run lint && npm run mocha-node-test" - }, - "license": "MIT", - "nyc": { - "exclude": [ - "test" - ] - }, - "module": "dist/async.mjs" -} \ No newline at end of file diff --git a/general/nvim/node_modules/async/parallel.js b/general/nvim/node_modules/async/parallel.js deleted file mode 100644 index 76bc624..0000000 --- a/general/nvim/node_modules/async/parallel.js +++ /dev/null @@ -1,180 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parallel; - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _parallel2 = require('./internal/parallel.js'); - -var _parallel3 = _interopRequireDefault(_parallel2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * - * //Using Callbacks - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function parallel(tasks, callback) { - return (0, _parallel3.default)(_eachOf2.default, tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/parallelLimit.js b/general/nvim/node_modules/async/parallelLimit.js deleted file mode 100644 index dbe0bb8..0000000 --- a/general/nvim/node_modules/async/parallelLimit.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parallelLimit; - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _parallel = require('./internal/parallel.js'); - -var _parallel2 = _interopRequireDefault(_parallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - */ -function parallelLimit(tasks, limit, callback) { - return (0, _parallel2.default)((0, _eachOfLimit2.default)(limit), tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/priorityQueue.js b/general/nvim/node_modules/async/priorityQueue.js deleted file mode 100644 index 6b7c331..0000000 --- a/general/nvim/node_modules/async/priorityQueue.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (worker, concurrency) { - // Start with a normal queue - var q = (0, _queue2.default)(worker, concurrency); - var processingScheduled = false; - - q._tasks = new _Heap2.default(); - - // Override push to accept second parameter representing priority - q.push = function (data, priority = 0, callback = () => {}) { - if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!Array.isArray(data)) { - data = [data]; - } - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return (0, _setImmediate2.default)(() => q.drain()); - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - priority, - callback - }; - - q._tasks.push(item); - } - - if (!processingScheduled) { - processingScheduled = true; - (0, _setImmediate2.default)(() => { - processingScheduled = false; - q.process(); - }); - } - }; - - // Remove unshift function - delete q.unshift; - - return q; -}; - -var _setImmediate = require('./setImmediate.js'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _queue = require('./queue.js'); - -var _queue2 = _interopRequireDefault(_queue); - -var _Heap = require('./internal/Heap.js'); - -var _Heap2 = _interopRequireDefault(_Heap); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * The `unshift` method was removed. - */ \ No newline at end of file diff --git a/general/nvim/node_modules/async/queue.js b/general/nvim/node_modules/async/queue.js deleted file mode 100644 index c69becb..0000000 --- a/general/nvim/node_modules/async/queue.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (worker, concurrency) { - var _worker = (0, _wrapAsync2.default)(worker); - return (0, _queue2.default)((items, cb) => { - _worker(items[0], cb); - }, concurrency, 1); -}; - -var _queue = require('./internal/queue.js'); - -var _queue2 = _interopRequireDefault(_queue); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * A queue of tasks for the worker function to complete. - * @typedef {Iterable} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {number} payload - an integer that specifies how many items are - * passed to the worker function at a time. only applies if this is a - * [cargo]{@link module:ControlFlow.cargo} object - * @property {AsyncFunction} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {AsyncFunction} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {AsyncFunction} pushAsync - the same as `q.push`, except this returns - * a promise that rejects if an error occurs. - * @property {AsyncFunction} unshiftAsync - the same as `q.unshift`, except this returns - * a promise that rejects if an error occurs. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a function that sets a callback that is - * called when the number of running workers hits the `concurrency` limit, and - * further tasks will be queued. If the callback is omitted, `q.saturated()` - * returns a promise for the next occurrence. - * @property {Function} unsaturated - a function that sets a callback that is - * called when the number of running workers is less than the `concurrency` & - * `buffer` limits, and further tasks will not be queued. If the callback is - * omitted, `q.unsaturated()` returns a promise for the next occurrence. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a function that sets a callback that is called - * when the last item from the `queue` is given to a `worker`. If the callback - * is omitted, `q.empty()` returns a promise for the next occurrence. - * @property {Function} drain - a function that sets a callback that is called - * when the last item from the `queue` has returned from the `worker`. If the - * callback is omitted, `q.drain()` returns a promise for the next occurrence. - * @property {Function} error - a function that sets a callback that is called - * when a task errors. Has the signature `function(error, task)`. If the - * callback is omitted, `error()` returns a promise that rejects on the next - * error. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - * - * @example - * const q = async.queue(worker, 2) - * q.push(item1) - * q.push(item2) - * q.push(item3) - * // queues are iterable, spread into an array to inspect - * const items = [...q] // [item1, item2, item3] - * // or use for of - * for (let item of q) { - * console.log(item) - * } - * - * q.drain(() => { - * console.log('all done') - * }) - * // or - * await q.drain() - */ - -/** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can be - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain(function() { - * console.log('all items have been processed'); - * }); - * // or await the end - * await q.drain() - * - * // assign an error callback - * q.error(function(err, task) { - * console.error('task experienced an error'); - * }); - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * // callback is optional - * q.push({name: 'bar'}); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ \ No newline at end of file diff --git a/general/nvim/node_modules/async/race.js b/general/nvim/node_modules/async/race.js deleted file mode 100644 index 236a9f0..0000000 --- a/general/nvim/node_modules/async/race.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns undefined - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ -function race(tasks, callback) { - callback = (0, _once2.default)(callback); - if (!Array.isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - (0, _wrapAsync2.default)(tasks[i])(callback); - } -} - -exports.default = (0, _awaitify2.default)(race, 2); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/reduce.js b/general/nvim/node_modules/async/reduce.js deleted file mode 100644 index 56e2db8..0000000 --- a/general/nvim/node_modules/async/reduce.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file3.txt', 'file4.txt']; - * - * // asynchronous function that computes the file size in bytes - * // file size is added to the memoized value, then returned - * function getFileSizeInBytes(memo, file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, memo + stat.size); - * }); - * } - * - * // Using callbacks - * async.reduce(fileList, 0, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(result); - * } - * }); - * - * // Using Promises - * async.reduce(fileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.reduce(fileList, 0, getFileSizeInBytes); - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _eachOfSeries2.default)(coll, (x, i, iterCb) => { - _iteratee(memo, x, (err, v) => { - memo = v; - iterCb(err); - }); - }, err => callback(err, memo)); -} -exports.default = (0, _awaitify2.default)(reduce, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/reduceRight.js b/general/nvim/node_modules/async/reduceRight.js deleted file mode 100644 index bee5391..0000000 --- a/general/nvim/node_modules/async/reduceRight.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduceRight; - -var _reduce = require('./reduce.js'); - -var _reduce2 = _interopRequireDefault(_reduce); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - */ -function reduceRight(array, memo, iteratee, callback) { - var reversed = [...array].reverse(); - return (0, _reduce2.default)(reversed, memo, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/reflect.js b/general/nvim/node_modules/async/reflect.js deleted file mode 100644 index 297ed79..0000000 --- a/general/nvim/node_modules/async/reflect.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reflect; - -var _initialParams = require('./internal/initialParams.js'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ -function reflect(fn) { - var _fn = (0, _wrapAsync2.default)(fn); - return (0, _initialParams2.default)(function reflectOn(args, reflectCallback) { - args.push((error, ...cbArgs) => { - let retVal = {}; - if (error) { - retVal.error = error; - } - if (cbArgs.length > 0) { - var value = cbArgs; - if (cbArgs.length <= 1) { - [value] = cbArgs; - } - retVal.value = value; - } - reflectCallback(null, retVal); - }); - - return _fn.apply(this, args); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/reflectAll.js b/general/nvim/node_modules/async/reflectAll.js deleted file mode 100644 index a862ff0..0000000 --- a/general/nvim/node_modules/async/reflectAll.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reflectAll; - -var _reflect = require('./reflect.js'); - -var _reflect2 = _interopRequireDefault(_reflect); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ -function reflectAll(tasks) { - var results; - if (Array.isArray(tasks)) { - results = tasks.map(_reflect2.default); - } else { - results = {}; - Object.keys(tasks).forEach(key => { - results[key] = _reflect2.default.call(this, tasks[key]); - }); - } - return results; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/reject.js b/general/nvim/node_modules/async/reject.js deleted file mode 100644 index cabd96e..0000000 --- a/general/nvim/node_modules/async/reject.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reject2 = require('./internal/reject.js'); - -var _reject3 = _interopRequireDefault(_reject2); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.reject(fileList, fileExists, function(err, results) { - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }); - * - * // Using Promises - * async.reject(fileList, fileExists) - * .then( results => { - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.reject(fileList, fileExists); - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function reject(coll, iteratee, callback) { - return (0, _reject3.default)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(reject, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/rejectLimit.js b/general/nvim/node_modules/async/rejectLimit.js deleted file mode 100644 index 1a89925..0000000 --- a/general/nvim/node_modules/async/rejectLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reject2 = require('./internal/reject.js'); - -var _reject3 = _interopRequireDefault(_reject2); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function rejectLimit(coll, limit, iteratee, callback) { - return (0, _reject3.default)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(rejectLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/rejectSeries.js b/general/nvim/node_modules/async/rejectSeries.js deleted file mode 100644 index 6e1a1c5..0000000 --- a/general/nvim/node_modules/async/rejectSeries.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reject2 = require('./internal/reject.js'); - -var _reject3 = _interopRequireDefault(_reject2); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ -function rejectSeries(coll, iteratee, callback) { - return (0, _reject3.default)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(rejectSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/retry.js b/general/nvim/node_modules/async/retry.js deleted file mode 100644 index dba3030..0000000 --- a/general/nvim/node_modules/async/retry.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = retry; - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _promiseCallback = require('./internal/promiseCallback.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function constant(value) { - return function () { - return value; - }; -} - -/** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * @returns {Promise} a promise if no callback provided - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ -const DEFAULT_TIMES = 5; -const DEFAULT_INTERVAL = 0; - -function retry(opts, task, callback) { - var options = { - times: DEFAULT_TIMES, - intervalFunc: constant(DEFAULT_INTERVAL) - }; - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || (0, _promiseCallback.promiseCallback)(); - task = opts; - } else { - parseTimes(options, opts); - callback = callback || (0, _promiseCallback.promiseCallback)(); - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = (0, _wrapAsync2.default)(task); - - var attempt = 1; - function retryAttempt() { - _task((err, ...args) => { - if (err === false) return; - if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); - } else { - callback(err, ...args); - } - }); - } - - retryAttempt(); - return callback[_promiseCallback.PROMISE_SYMBOL]; -} - -function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? t.interval : constant(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/retryable.js b/general/nvim/node_modules/async/retryable.js deleted file mode 100644 index 1b1147c..0000000 --- a/general/nvim/node_modules/async/retryable.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = retryable; - -var _retry = require('./retry.js'); - -var _retry2 = _interopRequireDefault(_retry); - -var _initialParams = require('./internal/initialParams.js'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _promiseCallback = require('./internal/promiseCallback.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry`, except for a `opts.arity` that - * is the arity of the `task` function, defaulting to `task.length` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ -function retryable(opts, task) { - if (!task) { - task = opts; - opts = null; - } - let arity = opts && opts.arity || task.length; - if ((0, _wrapAsync.isAsync)(task)) { - arity += 1; - } - var _task = (0, _wrapAsync2.default)(task); - return (0, _initialParams2.default)((args, callback) => { - if (args.length < arity - 1 || callback == null) { - args.push(callback); - callback = (0, _promiseCallback.promiseCallback)(); - } - function taskFn(cb) { - _task(...args, cb); - } - - if (opts) (0, _retry2.default)(opts, taskFn, callback);else (0, _retry2.default)(taskFn, callback); - - return callback[_promiseCallback.PROMISE_SYMBOL]; - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/select.js b/general/nvim/node_modules/async/select.js deleted file mode 100644 index 303dc1f..0000000 --- a/general/nvim/node_modules/async/select.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter2 = require('./internal/filter.js'); - -var _filter3 = _interopRequireDefault(_filter2); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.filter(files, fileExists, function(err, results) { - * if(err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * }); - * - * // Using Promises - * async.filter(files, fileExists) - * .then(results => { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.filter(files, fileExists); - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function filter(coll, iteratee, callback) { - return (0, _filter3.default)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(filter, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/selectLimit.js b/general/nvim/node_modules/async/selectLimit.js deleted file mode 100644 index 89e55f5..0000000 --- a/general/nvim/node_modules/async/selectLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter2 = require('./internal/filter.js'); - -var _filter3 = _interopRequireDefault(_filter2); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - */ -function filterLimit(coll, limit, iteratee, callback) { - return (0, _filter3.default)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(filterLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/selectSeries.js b/general/nvim/node_modules/async/selectSeries.js deleted file mode 100644 index a045e52..0000000 --- a/general/nvim/node_modules/async/selectSeries.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter2 = require('./internal/filter.js'); - -var _filter3 = _interopRequireDefault(_filter2); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - * @returns {Promise} a promise, if no callback provided - */ -function filterSeries(coll, iteratee, callback) { - return (0, _filter3.default)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(filterSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/seq.js b/general/nvim/node_modules/async/seq.js deleted file mode 100644 index 28c825f..0000000 --- a/general/nvim/node_modules/async/seq.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = seq; - -var _reduce = require('./reduce.js'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _promiseCallback = require('./internal/promiseCallback.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Version of the compose function that is more natural to read. Each function - * consumes the return value of the previous function. It is the equivalent of - * [compose]{@link module:ControlFlow.compose} with the arguments reversed. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name seq - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.compose]{@link module:ControlFlow.compose} - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} a function that composes the `functions` in order - * @example - * - * // Requires lodash (or underscore), express3 and dresende's orm2. - * // Part of an app, that fetches cats of the logged user. - * // This example uses `seq` function to avoid overnesting and error - * // handling clutter. - * app.get('/cats', function(request, response) { - * var User = request.models.User; - * async.seq( - * User.get.bind(User), // 'User.get' has signature (id, callback(err, data)) - * function(user, fn) { - * user.getCats(fn); // 'getCats' has signature (callback(err, data)) - * } - * )(req.session.user_id, function (err, cats) { - * if (err) { - * console.error(err); - * response.json({ status: 'error', message: err.message }); - * } else { - * response.json({ status: 'ok', message: 'Cats found', data: cats }); - * } - * }); - * }); - */ -function seq(...functions) { - var _functions = functions.map(_wrapAsync2.default); - return function (...args) { - var that = this; - - var cb = args[args.length - 1]; - if (typeof cb == 'function') { - args.pop(); - } else { - cb = (0, _promiseCallback.promiseCallback)(); - } - - (0, _reduce2.default)(_functions, args, (newargs, fn, iterCb) => { - fn.apply(that, newargs.concat((err, ...nextargs) => { - iterCb(err, nextargs); - })); - }, (err, results) => cb(err, ...results)); - - return cb[_promiseCallback.PROMISE_SYMBOL]; - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/series.js b/general/nvim/node_modules/async/series.js deleted file mode 100644 index 56e78f9..0000000 --- a/general/nvim/node_modules/async/series.js +++ /dev/null @@ -1,186 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = series; - -var _parallel2 = require('./internal/parallel.js'); - -var _parallel3 = _interopRequireDefault(_parallel2); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @return {Promise} a promise, if no callback is passed - * @example - * - * //Using Callbacks - * async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] - * }); - * - * // an example using objects instead of arrays - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.series([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function series(tasks, callback) { - return (0, _parallel3.default)(_eachOfSeries2.default, tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/setImmediate.js b/general/nvim/node_modules/async/setImmediate.js deleted file mode 100644 index c712ec3..0000000 --- a/general/nvim/node_modules/async/setImmediate.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _setImmediate = require('./internal/setImmediate.js'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `setImmediate`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name setImmediate - * @static - * @memberOf module:Utils - * @method - * @see [async.nextTick]{@link module:Utils.nextTick} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -exports.default = _setImmediate2.default; -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/some.js b/general/nvim/node_modules/async/some.js deleted file mode 100644 index 2046cf6..0000000 --- a/general/nvim/node_modules/async/some.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - *); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // false - * // result is false since none of the files exists - * } - *); - * - * // Using Promises - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since some file in the list exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since none of the files exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists); - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists); - * console.log(result); - * // false - * // result is false since none of the files exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function some(coll, iteratee, callback) { - return (0, _createTester2.default)(Boolean, res => res)(_eachOf2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(some, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/someLimit.js b/general/nvim/node_modules/async/someLimit.js deleted file mode 100644 index c8a295a..0000000 --- a/general/nvim/node_modules/async/someLimit.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfLimit = require('./internal/eachOfLimit.js'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function someLimit(coll, limit, iteratee, callback) { - return (0, _createTester2.default)(Boolean, res => res)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(someLimit, 4); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/someSeries.js b/general/nvim/node_modules/async/someSeries.js deleted file mode 100644 index ee0654b..0000000 --- a/general/nvim/node_modules/async/someSeries.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester.js'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _eachOfSeries = require('./eachOfSeries.js'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ -function someSeries(coll, iteratee, callback) { - return (0, _createTester2.default)(Boolean, res => res)(_eachOfSeries2.default, coll, iteratee, callback); -} -exports.default = (0, _awaitify2.default)(someSeries, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/sortBy.js b/general/nvim/node_modules/async/sortBy.js deleted file mode 100644 index d17fb6a..0000000 --- a/general/nvim/node_modules/async/sortBy.js +++ /dev/null @@ -1,190 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _map = require('./map.js'); - -var _map2 = _interopRequireDefault(_map); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @returns {Promise} a promise, if no callback passed - * @example - * - * // bigfile.txt is a file that is 251100 bytes in size - * // mediumfile.txt is a file that is 11000 bytes in size - * // smallfile.txt is a file that is 121 bytes in size - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) return callback(getFileSizeErr); - * callback(null, fileSize); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // descending order - * async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) { - * return callback(getFileSizeErr); - * } - * callback(null, fileSize * -1); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'bigfile.txt', 'mediumfile.txt', 'smallfile.txt'] - * } - * } - * ); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * } - * ); - * - * // Using Promises - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * (async () => { - * try { - * let results = await async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * // Error handling - * async () => { - * try { - * let results = await async.sortBy(['missingfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ -function sortBy(coll, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _map2.default)(coll, (x, iterCb) => { - _iteratee(x, (err, criteria) => { - if (err) return iterCb(err); - iterCb(err, { value: x, criteria }); - }); - }, (err, results) => { - if (err) return callback(err); - callback(null, results.sort(comparator).map(v => v.value)); - }); - - function comparator(left, right) { - var a = left.criteria, - b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } -} -exports.default = (0, _awaitify2.default)(sortBy, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/timeout.js b/general/nvim/node_modules/async/timeout.js deleted file mode 100644 index dd58eb3..0000000 --- a/general/nvim/node_modules/async/timeout.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = timeout; - -var _initialParams = require('./internal/initialParams.js'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ -function timeout(asyncFn, milliseconds, info) { - var fn = (0, _wrapAsync2.default)(asyncFn); - - return (0, _initialParams2.default)((args, callback) => { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push((...cbArgs) => { - if (!timedOut) { - callback(...cbArgs); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn(...args); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/times.js b/general/nvim/node_modules/async/times.js deleted file mode 100644 index 4484c73..0000000 --- a/general/nvim/node_modules/async/times.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = times; - -var _timesLimit = require('./timesLimit.js'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ -function times(n, iteratee, callback) { - return (0, _timesLimit2.default)(n, Infinity, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/timesLimit.js b/general/nvim/node_modules/async/timesLimit.js deleted file mode 100644 index 9fb0ba3..0000000 --- a/general/nvim/node_modules/async/timesLimit.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = timesLimit; - -var _mapLimit = require('./mapLimit.js'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _range = require('./internal/range.js'); - -var _range2 = _interopRequireDefault(_range); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ -function timesLimit(count, limit, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - return (0, _mapLimit2.default)((0, _range2.default)(count), limit, _iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/timesSeries.js b/general/nvim/node_modules/async/timesSeries.js deleted file mode 100644 index a10f0cb..0000000 --- a/general/nvim/node_modules/async/timesSeries.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = timesSeries; - -var _timesLimit = require('./timesLimit.js'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ -function timesSeries(n, iteratee, callback) { - return (0, _timesLimit2.default)(n, 1, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/transform.js b/general/nvim/node_modules/async/transform.js deleted file mode 100644 index 75b754e..0000000 --- a/general/nvim/node_modules/async/transform.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = transform; - -var _eachOf = require('./eachOf.js'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _promiseCallback = require('./internal/promiseCallback.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in parallel, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileList, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * }); - * - * // Using Promises - * async.transform(fileList, transformFileSize) - * .then(result => { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * (async () => { - * try { - * let result = await async.transform(fileList, transformFileSize); - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' }; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileMap, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * }); - * - * // Using Promises - * async.transform(fileMap, transformFileSize) - * .then(result => { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.transform(fileMap, transformFileSize); - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function transform(coll, accumulator, iteratee, callback) { - if (arguments.length <= 3 && typeof accumulator === 'function') { - callback = iteratee; - iteratee = accumulator; - accumulator = Array.isArray(coll) ? [] : {}; - } - callback = (0, _once2.default)(callback || (0, _promiseCallback.promiseCallback)()); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - - (0, _eachOf2.default)(coll, (v, k, cb) => { - _iteratee(accumulator, v, k, cb); - }, err => callback(err, accumulator)); - return callback[_promiseCallback.PROMISE_SYMBOL]; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/tryEach.js b/general/nvim/node_modules/async/tryEach.js deleted file mode 100644 index 82fe8ec..0000000 --- a/general/nvim/node_modules/async/tryEach.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachSeries = require('./eachSeries.js'); - -var _eachSeries2 = _interopRequireDefault(_eachSeries); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ -function tryEach(tasks, callback) { - var error = null; - var result; - return (0, _eachSeries2.default)(tasks, (task, taskCb) => { - (0, _wrapAsync2.default)(task)((err, ...args) => { - if (err === false) return taskCb(err); - - if (args.length < 2) { - [result] = args; - } else { - result = args; - } - error = err; - taskCb(err ? null : {}); - }); - }, () => callback(error, result)); -} - -exports.default = (0, _awaitify2.default)(tryEach); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/unmemoize.js b/general/nvim/node_modules/async/unmemoize.js deleted file mode 100644 index 47a92b4..0000000 --- a/general/nvim/node_modules/async/unmemoize.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = unmemoize; -/** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ -function unmemoize(fn) { - return (...args) => { - return (fn.unmemoized || fn)(...args); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/general/nvim/node_modules/async/until.js b/general/nvim/node_modules/async/until.js deleted file mode 100644 index 3c71e51..0000000 --- a/general/nvim/node_modules/async/until.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = until; - -var _whilst = require('./whilst.js'); - -var _whilst2 = _interopRequireDefault(_whilst); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (callback). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * const results = [] - * let finished = false - * async.until(function test(cb) { - * cb(null, finished) - * }, function iter(next) { - * fetchPage(url, (err, body) => { - * if (err) return next(err) - * results = results.concat(body.objects) - * finished = !!body.next - * next(err) - * }) - * }, function done (err) { - * // all pages have been fetched - * }) - */ -function until(test, iteratee, callback) { - const _test = (0, _wrapAsync2.default)(test); - return (0, _whilst2.default)(cb => _test((err, truth) => cb(err, !truth)), iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/waterfall.js b/general/nvim/node_modules/async/waterfall.js deleted file mode 100644 index 8d88829..0000000 --- a/general/nvim/node_modules/async/waterfall.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _once = require('./internal/once.js'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns undefined - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ -function waterfall(tasks, callback) { - callback = (0, _once2.default)(callback); - if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = (0, _wrapAsync2.default)(tasks[taskIndex++]); - task(...args, (0, _onlyOnce2.default)(next)); - } - - function next(err, ...args) { - if (err === false) return; - if (err || taskIndex === tasks.length) { - return callback(err, ...args); - } - nextTask(args); - } - - nextTask([]); -} - -exports.default = (0, _awaitify2.default)(waterfall); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/whilst.js b/general/nvim/node_modules/async/whilst.js deleted file mode 100644 index 32a4776..0000000 --- a/general/nvim/node_modules/async/whilst.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _onlyOnce = require('./internal/onlyOnce.js'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = require('./internal/awaitify.js'); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - * @example - * - * var count = 0; - * async.whilst( - * function test(cb) { cb(null, count < 5); }, - * function iter(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ -function whilst(test, iteratee, callback) { - callback = (0, _onlyOnce2.default)(callback); - var _fn = (0, _wrapAsync2.default)(iteratee); - var _test = (0, _wrapAsync2.default)(test); - var results = []; - - function next(err, ...rest) { - if (err) return callback(err); - results = rest; - if (err === false) return; - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return _test(check); -} -exports.default = (0, _awaitify2.default)(whilst, 3); -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/async/wrapSync.js b/general/nvim/node_modules/async/wrapSync.js deleted file mode 100644 index 3c3bf88..0000000 --- a/general/nvim/node_modules/async/wrapSync.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = asyncify; - -var _initialParams = require('./internal/initialParams.js'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _setImmediate = require('./internal/setImmediate.js'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _wrapAsync = require('./internal/wrapAsync.js'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - if ((0, _wrapAsync.isAsync)(func)) { - return function (...args /*, callback*/) { - const callback = args.pop(); - const promise = func.apply(this, args); - return handlePromise(promise, callback); - }; - } - - return (0, _initialParams2.default)(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (result && typeof result.then === 'function') { - return handlePromise(result, callback); - } else { - callback(null, result); - } - }); -} - -function handlePromise(promise, callback) { - return promise.then(value => { - invokeCallback(callback, null, value); - }, err => { - invokeCallback(callback, err && err.message ? err : new Error(err)); - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (err) { - (0, _setImmediate2.default)(e => { - throw e; - }, err); - } -} -module.exports = exports['default']; \ No newline at end of file diff --git a/general/nvim/node_modules/color-convert/CHANGELOG.md b/general/nvim/node_modules/color-convert/CHANGELOG.md deleted file mode 100644 index 0a7bce4..0000000 --- a/general/nvim/node_modules/color-convert/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# 1.0.0 - 2016-01-07 - -- Removed: unused speed test -- Added: Automatic routing between previously unsupported conversions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `convert()` class -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: all functions to lookup dictionary -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: `ansi` to `ansi256` -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Fixed: argument grouping for functions requiring only one argument -([#27](https://github.com/Qix-/color-convert/pull/27)) - -# 0.6.0 - 2015-07-23 - -- Added: methods to handle -[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: - - rgb2ansi16 - - rgb2ansi - - hsl2ansi16 - - hsl2ansi - - hsv2ansi16 - - hsv2ansi - - hwb2ansi16 - - hwb2ansi - - cmyk2ansi16 - - cmyk2ansi - - keyword2ansi16 - - keyword2ansi - - ansi162rgb - - ansi162hsl - - ansi162hsv - - ansi162hwb - - ansi162cmyk - - ansi162keyword - - ansi2rgb - - ansi2hsl - - ansi2hsv - - ansi2hwb - - ansi2cmyk - - ansi2keyword -([#18](https://github.com/harthur/color-convert/pull/18)) - -# 0.5.3 - 2015-06-02 - -- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` -([#15](https://github.com/harthur/color-convert/issues/15)) - ---- - -Check out commit logs for older releases diff --git a/general/nvim/node_modules/color-convert/LICENSE b/general/nvim/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386..0000000 --- a/general/nvim/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/general/nvim/node_modules/color-convert/README.md b/general/nvim/node_modules/color-convert/README.md deleted file mode 100644 index d4b08fc..0000000 --- a/general/nvim/node_modules/color-convert/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# color-convert - -[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) - -Color-convert is a color conversion library for JavaScript and node. -It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): - -```js -var convert = require('color-convert'); - -convert.rgb.hsl(140, 200, 100); // [96, 48, 59] -convert.keyword.rgb('blue'); // [0, 0, 255] - -var rgbChannels = convert.rgb.channels; // 3 -var cmykChannels = convert.cmyk.channels; // 4 -var ansiChannels = convert.ansi16.channels; // 1 -``` - -# Install - -```console -$ npm install color-convert -``` - -# API - -Simply get the property of the _from_ and _to_ conversion that you're looking for. - -All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. - -All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). - -```js -var convert = require('color-convert'); - -// Hex to LAB -convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] -convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] - -// RGB to CMYK -convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] -convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] -``` - -### Arrays -All functions that accept multiple arguments also support passing an array. - -Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) - -```js -var convert = require('color-convert'); - -convert.rgb.hex(123, 45, 67); // '7B2D43' -convert.rgb.hex([123, 45, 67]); // '7B2D43' -``` - -## Routing - -Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). - -Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). - -# Contribute - -If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. - -# License -Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/general/nvim/node_modules/color-convert/conversions.js b/general/nvim/node_modules/color-convert/conversions.js deleted file mode 100644 index 3217200..0000000 --- a/general/nvim/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,868 +0,0 @@ -/* MIT license */ -var cssKeywords = require('color-name'); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -var reverseKeywords = {}; -for (var key in cssKeywords) { - if (cssKeywords.hasOwnProperty(key)) { - reverseKeywords[cssKeywords[key]] = key; - } -} - -var convert = module.exports = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -// hide .channels and .labels properties -for (var model in convert) { - if (convert.hasOwnProperty(model)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - var channels = convert[model].channels; - var labels = convert[model].labels; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); - } -} - -convert.rgb.hsl = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - var h; - var s; - var l; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - var rdif; - var gdif; - var bdif; - var h; - var s; - - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var v = Math.max(r, g, b); - var diff = v - Math.min(r, g, b); - var diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var h = convert.rgb.hsl(rgb)[0]; - var w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var c; - var m; - var y; - var k; - - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -/** - * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - * */ -function comparativeDistance(x, y) { - return ( - Math.pow(x[0] - y[0], 2) + - Math.pow(x[1] - y[1], 2) + - Math.pow(x[2] - y[2], 2) - ); -} - -convert.rgb.keyword = function (rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - var currentClosestDistance = Infinity; - var currentClosestKeyword; - - for (var keyword in cssKeywords) { - if (cssKeywords.hasOwnProperty(keyword)) { - var value = cssKeywords[keyword]; - - // Compute comparative distance - var distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - - // assume sRGB - r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); - g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); - b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); - - var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - var xyz = convert.rgb.xyz(rgb); - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - var h = hsl[0] / 360; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var t1; - var t2; - var t3; - var rgb; - var val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - t1 = 2 * l - t2; - - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - var h = hsl[0]; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var smin = s; - var lmin = Math.max(l, 0.01); - var sv; - var v; - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - v = (l + s) / 2; - sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - var h = hsv[0] / 60; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var hi = Math.floor(h) % 6; - - var f = h - Math.floor(h); - var p = 255 * v * (1 - s); - var q = 255 * v * (1 - (s * f)); - var t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - var h = hsv[0]; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var vmin = Math.max(v, 0.01); - var lmin; - var sl; - var l; - - l = (2 - s) * v; - lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - var h = hwb[0] / 360; - var wh = hwb[1] / 100; - var bl = hwb[2] / 100; - var ratio = wh + bl; - var i; - var v; - var f; - var n; - - // wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - n = wh + f * (v - wh); // linear interpolation - - var r; - var g; - var b; - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - var c = cmyk[0] / 100; - var m = cmyk[1] / 100; - var y = cmyk[2] / 100; - var k = cmyk[3] / 100; - var r; - var g; - var b; - - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - var x = xyz[0] / 100; - var y = xyz[1] / 100; - var z = xyz[2] / 100; - var r; - var g; - var b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // assume sRGB - r = r > 0.0031308 - ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var x; - var y; - var z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - var y2 = Math.pow(y, 3); - var x2 = Math.pow(x, 3); - var z2 = Math.pow(z, 3); - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var hr; - var h; - var c; - - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - var l = lch[0]; - var c = lch[1]; - var h = lch[2]; - var a; - var b; - var hr; - - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - var ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - - // we use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - var ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - var color = args % 10; - - // handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - var mult = (~~(args > 50) + 1) * 0.5; - var r = ((color & 1) * mult) * 255; - var g = (((color >> 1) & 1) * mult) * 255; - var b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // handle greyscale - if (args >= 232) { - var c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - var rem; - var r = Math.floor(args / 36) / 5 * 255; - var g = Math.floor((rem = args % 36) / 6) / 5 * 255; - var b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - var integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - var colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(function (char) { - return char + char; - }).join(''); - } - - var integer = parseInt(colorString, 16); - var r = (integer >> 16) & 0xFF; - var g = (integer >> 8) & 0xFF; - var b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max = Math.max(Math.max(r, g), b); - var min = Math.min(Math.min(r, g), b); - var chroma = (max - min); - var grayscale; - var hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma + 4; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 1; - var f = 0; - - if (l < 0.5) { - c = 2.0 * s * l; - } else { - c = 2.0 * s * (1.0 - l); - } - - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - var s = hsv[1] / 100; - var v = hsv[2] / 100; - - var c = s * v; - var f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - var pure = [0, 0, 0]; - var hi = (h % 1) * 6; - var v = hi % 1; - var w = 1 - v; - var mg = 0; - - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var v = c + g * (1.0 - c); - var f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var l = g * (1.0 - c) + 0.5 * c; - var s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = convert.gray.hsv = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - var val = Math.round(gray[0] / 100 * 255) & 0xFF; - var integer = (val << 16) + (val << 8) + val; - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - var val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; diff --git a/general/nvim/node_modules/color-convert/index.js b/general/nvim/node_modules/color-convert/index.js deleted file mode 100644 index e65b5d7..0000000 --- a/general/nvim/node_modules/color-convert/index.js +++ /dev/null @@ -1,78 +0,0 @@ -var conversions = require('./conversions'); -var route = require('./route'); - -var convert = {}; - -var models = Object.keys(conversions); - -function wrapRaw(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - return fn(args); - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - var result = fn(args); - - // we're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (var len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(function (fromModel) { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - var routes = route(fromModel); - var routeModels = Object.keys(routes); - - routeModels.forEach(function (toModel) { - var fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; diff --git a/general/nvim/node_modules/color-convert/package.json b/general/nvim/node_modules/color-convert/package.json deleted file mode 100644 index dfbc471..0000000 --- a/general/nvim/node_modules/color-convert/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "color-convert", - "description": "Plain color conversion functions", - "version": "1.9.3", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "files": [ - "index.js", - "conversions.js", - "css-keywords.js", - "route.js" - ], - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - }, - "devDependencies": { - "chalk": "1.1.1", - "xo": "0.11.2" - }, - "dependencies": { - "color-name": "1.1.3" - } -} diff --git a/general/nvim/node_modules/color-convert/route.js b/general/nvim/node_modules/color-convert/route.js deleted file mode 100644 index 0a1fdea..0000000 --- a/general/nvim/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -var conversions = require('./conversions'); - -/* - this function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - var graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - var models = Object.keys(conversions); - - for (var len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - var graph = buildGraph(); - var queue = [fromModel]; // unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - var current = queue.pop(); - var adjacents = Object.keys(conversions[current]); - - for (var len = adjacents.length, i = 0; i < len; i++) { - var adjacent = adjacents[i]; - var node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - var path = [graph[toModel].parent, toModel]; - var fn = conversions[graph[toModel].parent][toModel]; - - var cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - var graph = deriveBFS(fromModel); - var conversion = {}; - - var models = Object.keys(graph); - for (var len = models.length, i = 0; i < len; i++) { - var toModel = models[i]; - var node = graph[toModel]; - - if (node.parent === null) { - // no possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - diff --git a/general/nvim/node_modules/color-name/.eslintrc.json b/general/nvim/node_modules/color-name/.eslintrc.json deleted file mode 100644 index c50c250..0000000 --- a/general/nvim/node_modules/color-name/.eslintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/general/nvim/node_modules/color-name/.npmignore b/general/nvim/node_modules/color-name/.npmignore deleted file mode 100644 index f9f2816..0000000 --- a/general/nvim/node_modules/color-name/.npmignore +++ /dev/null @@ -1,107 +0,0 @@ -//this will affect all the git repos -git config --global core.excludesfile ~/.gitignore - - -//update files since .ignore won't if already tracked -git rm --cached - -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -# Icon? -ehthumbs.db -Thumbs.db -.cache -.project -.settings -.tmproj -*.esproj -nbproject - -# Numerous always-ignore extensions # -##################################### -*.diff -*.err -*.orig -*.rej -*.swn -*.swo -*.swp -*.vi -*~ -*.sass-cache -*.grunt -*.tmp - -# Dreamweaver added files # -########################### -_notes -dwsync.xml - -# Komodo # -########################### -*.komodoproject -.komodotools - -# Node # -##################### -node_modules - -# Bower # -##################### -bower_components - -# Folders to ignore # -##################### -.hg -.svn -.CVS -intermediate -publish -.idea -.graphics -_test -_archive -uploads -tmp - -# Vim files to ignore # -####################### -.VimballRecord -.netrwhist - -bundle.* - -_demo \ No newline at end of file diff --git a/general/nvim/node_modules/color-name/LICENSE b/general/nvim/node_modules/color-name/LICENSE deleted file mode 100644 index c6b1001..0000000 --- a/general/nvim/node_modules/color-name/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/general/nvim/node_modules/color-name/README.md b/general/nvim/node_modules/color-name/README.md deleted file mode 100644 index 932b979..0000000 --- a/general/nvim/node_modules/color-name/README.md +++ /dev/null @@ -1,11 +0,0 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - diff --git a/general/nvim/node_modules/color-name/index.js b/general/nvim/node_modules/color-name/index.js deleted file mode 100644 index b7c198a..0000000 --- a/general/nvim/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; diff --git a/general/nvim/node_modules/color-name/package.json b/general/nvim/node_modules/color-name/package.json deleted file mode 100644 index d061123..0000000 --- a/general/nvim/node_modules/color-name/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "color-name", - "version": "1.1.3", - "description": "A list of color names and its values", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:dfcreative/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dfcreative/color-name/issues" - }, - "homepage": "https://github.com/dfcreative/color-name" -} diff --git a/general/nvim/node_modules/color-name/test.js b/general/nvim/node_modules/color-name/test.js deleted file mode 100644 index 6e6bf30..0000000 --- a/general/nvim/node_modules/color-name/test.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -var names = require('./'); -var assert = require('assert'); - -assert.deepEqual(names.red, [255,0,0]); -assert.deepEqual(names.aliceblue, [240,248,255]); diff --git a/general/nvim/node_modules/color-string/LICENSE b/general/nvim/node_modules/color-string/LICENSE deleted file mode 100644 index a8b08d4..0000000 --- a/general/nvim/node_modules/color-string/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/general/nvim/node_modules/color-string/README.md b/general/nvim/node_modules/color-string/README.md deleted file mode 100644 index e58670c..0000000 --- a/general/nvim/node_modules/color-string/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# color-string - -> library for parsing and generating CSS color strings. - -## Install - -With [npm](http://npmjs.org/): - -```console -$ npm install color-string -``` - -## Usage - -### Parsing - -```js -colorString.get('#FFF') // {model: 'rgb', value: [255, 255, 255, 1]} -colorString.get('#FFFA') // {model: 'rgb', value: [255, 255, 255, 0.67]} -colorString.get('#FFFFFFAA') // {model: 'rgb', value: [255, 255, 255, 0.67]} -colorString.get('hsl(360, 100%, 50%)') // {model: 'hsl', value: [0, 100, 50, 1]} -colorString.get('hsl(360 100% 50%)') // {model: 'hsl', value: [0, 100, 50, 1]} -colorString.get('hwb(60, 3%, 60%)') // {model: 'hwb', value: [60, 3, 60, 1]} - -colorString.get.rgb('#FFF') // [255, 255, 255, 1] -colorString.get.rgb('blue') // [0, 0, 255, 1] -colorString.get.rgb('rgba(200, 60, 60, 0.3)') // [200, 60, 60, 0.3] -colorString.get.rgb('rgba(200 60 60 / 0.3)') // [200, 60, 60, 0.3] -colorString.get.rgb('rgba(200 60 60 / 30%)') // [200, 60, 60, 0.3] -colorString.get.rgb('rgb(200, 200, 200)') // [200, 200, 200, 1] -colorString.get.rgb('rgb(200 200 200)') // [200, 200, 200, 1] - -colorString.get.hsl('hsl(360, 100%, 50%)') // [0, 100, 50, 1] -colorString.get.hsl('hsl(360 100% 50%)') // [0, 100, 50, 1] -colorString.get.hsl('hsla(360, 60%, 50%, 0.4)') // [0, 60, 50, 0.4] -colorString.get.hsl('hsl(360 60% 50% / 0.4)') // [0, 60, 50, 0.4] - -colorString.get.hwb('hwb(60, 3%, 60%)') // [60, 3, 60, 1] -colorString.get.hwb('hwb(60, 3%, 60%, 0.6)') // [60, 3, 60, 0.6] - -colorString.get.rgb('invalid color string') // null -``` - -### Generation - -```js -colorString.to.hex([255, 255, 255]) // "#FFFFFF" -colorString.to.hex([0, 0, 255, 0.4]) // "#0000FF66" -colorString.to.hex([0, 0, 255], 0.4) // "#0000FF66" -colorString.to.rgb([255, 255, 255]) // "rgb(255, 255, 255)" -colorString.to.rgb([0, 0, 255, 0.4]) // "rgba(0, 0, 255, 0.4)" -colorString.to.rgb([0, 0, 255], 0.4) // "rgba(0, 0, 255, 0.4)" -colorString.to.rgb.percent([0, 0, 255]) // "rgb(0%, 0%, 100%)" -colorString.to.keyword([255, 255, 0]) // "yellow" -colorString.to.hsl([360, 100, 100]) // "hsl(360, 100%, 100%)" -colorString.to.hwb([50, 3, 15]) // "hwb(50, 3%, 15%)" - -// all functions also support swizzling -colorString.to.rgb(0, [0, 255], 0.4) // "rgba(0, 0, 255, 0.4)" -colorString.to.rgb([0, 0], [255], 0.4) // "rgba(0, 0, 255, 0.4)" -colorString.to.rgb([0], 0, [255, 0.4]) // "rgba(0, 0, 255, 0.4)" -``` diff --git a/general/nvim/node_modules/color-string/index.js b/general/nvim/node_modules/color-string/index.js deleted file mode 100644 index dd5d2b7..0000000 --- a/general/nvim/node_modules/color-string/index.js +++ /dev/null @@ -1,242 +0,0 @@ -/* MIT license */ -var colorNames = require('color-name'); -var swizzle = require('simple-swizzle'); -var hasOwnProperty = Object.hasOwnProperty; - -var reverseNames = Object.create(null); - -// create a list of reverse color names -for (var name in colorNames) { - if (hasOwnProperty.call(colorNames, name)) { - reverseNames[colorNames[name]] = name; - } -} - -var cs = module.exports = { - to: {}, - get: {} -}; - -cs.get = function (string) { - var prefix = string.substring(0, 3).toLowerCase(); - var val; - var model; - switch (prefix) { - case 'hsl': - val = cs.get.hsl(string); - model = 'hsl'; - break; - case 'hwb': - val = cs.get.hwb(string); - model = 'hwb'; - break; - default: - val = cs.get.rgb(string); - model = 'rgb'; - break; - } - - if (!val) { - return null; - } - - return {model: model, value: val}; -}; - -cs.get.rgb = function (string) { - if (!string) { - return null; - } - - var abbr = /^#([a-f0-9]{3,4})$/i; - var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; - var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; - var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; - var keyword = /^(\w+)$/; - - var rgb = [0, 0, 0, 1]; - var match; - var i; - var hexAlpha; - - if (match = string.match(hex)) { - hexAlpha = match[2]; - match = match[1]; - - for (i = 0; i < 3; i++) { - // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 - var i2 = i * 2; - rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); - } - - if (hexAlpha) { - rgb[3] = parseInt(hexAlpha, 16) / 255; - } - } else if (match = string.match(abbr)) { - match = match[1]; - hexAlpha = match[3]; - - for (i = 0; i < 3; i++) { - rgb[i] = parseInt(match[i] + match[i], 16); - } - - if (hexAlpha) { - rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; - } - } else if (match = string.match(rgba)) { - for (i = 0; i < 3; i++) { - rgb[i] = parseInt(match[i + 1], 0); - } - - if (match[4]) { - if (match[5]) { - rgb[3] = parseFloat(match[4]) * 0.01; - } else { - rgb[3] = parseFloat(match[4]); - } - } - } else if (match = string.match(per)) { - for (i = 0; i < 3; i++) { - rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); - } - - if (match[4]) { - if (match[5]) { - rgb[3] = parseFloat(match[4]) * 0.01; - } else { - rgb[3] = parseFloat(match[4]); - } - } - } else if (match = string.match(keyword)) { - if (match[1] === 'transparent') { - return [0, 0, 0, 0]; - } - - if (!hasOwnProperty.call(colorNames, match[1])) { - return null; - } - - rgb = colorNames[match[1]]; - rgb[3] = 1; - - return rgb; - } else { - return null; - } - - for (i = 0; i < 3; i++) { - rgb[i] = clamp(rgb[i], 0, 255); - } - rgb[3] = clamp(rgb[3], 0, 1); - - return rgb; -}; - -cs.get.hsl = function (string) { - if (!string) { - return null; - } - - var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; - var match = string.match(hsl); - - if (match) { - var alpha = parseFloat(match[4]); - var h = ((parseFloat(match[1]) % 360) + 360) % 360; - var s = clamp(parseFloat(match[2]), 0, 100); - var l = clamp(parseFloat(match[3]), 0, 100); - var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); - - return [h, s, l, a]; - } - - return null; -}; - -cs.get.hwb = function (string) { - if (!string) { - return null; - } - - var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; - var match = string.match(hwb); - - if (match) { - var alpha = parseFloat(match[4]); - var h = ((parseFloat(match[1]) % 360) + 360) % 360; - var w = clamp(parseFloat(match[2]), 0, 100); - var b = clamp(parseFloat(match[3]), 0, 100); - var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); - return [h, w, b, a]; - } - - return null; -}; - -cs.to.hex = function () { - var rgba = swizzle(arguments); - - return ( - '#' + - hexDouble(rgba[0]) + - hexDouble(rgba[1]) + - hexDouble(rgba[2]) + - (rgba[3] < 1 - ? (hexDouble(Math.round(rgba[3] * 255))) - : '') - ); -}; - -cs.to.rgb = function () { - var rgba = swizzle(arguments); - - return rgba.length < 4 || rgba[3] === 1 - ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' - : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; -}; - -cs.to.rgb.percent = function () { - var rgba = swizzle(arguments); - - var r = Math.round(rgba[0] / 255 * 100); - var g = Math.round(rgba[1] / 255 * 100); - var b = Math.round(rgba[2] / 255 * 100); - - return rgba.length < 4 || rgba[3] === 1 - ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' - : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; -}; - -cs.to.hsl = function () { - var hsla = swizzle(arguments); - return hsla.length < 4 || hsla[3] === 1 - ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' - : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; -}; - -// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax -// (hwb have alpha optional & 1 is default value) -cs.to.hwb = function () { - var hwba = swizzle(arguments); - - var a = ''; - if (hwba.length >= 4 && hwba[3] !== 1) { - a = ', ' + hwba[3]; - } - - return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; -}; - -cs.to.keyword = function (rgb) { - return reverseNames[rgb.slice(0, 3)]; -}; - -// helpers -function clamp(num, min, max) { - return Math.min(Math.max(min, num), max); -} - -function hexDouble(num) { - var str = Math.round(num).toString(16).toUpperCase(); - return (str.length < 2) ? '0' + str : str; -} diff --git a/general/nvim/node_modules/color-string/package.json b/general/nvim/node_modules/color-string/package.json deleted file mode 100644 index f34ee98..0000000 --- a/general/nvim/node_modules/color-string/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "color-string", - "description": "Parser and generator for CSS color strings", - "version": "1.9.1", - "author": "Heather Arthur ", - "contributors": [ - "Maxime Thirouin", - "Dyma Ywanov ", - "Josh Junon" - ], - "repository": "Qix-/color-string", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "xo": { - "rules": { - "no-cond-assign": 0, - "operator-linebreak": 0 - } - }, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - }, - "devDependencies": { - "xo": "^0.12.1" - }, - "keywords": [ - "color", - "colour", - "rgb", - "css" - ] -} diff --git a/general/nvim/node_modules/color/LICENSE b/general/nvim/node_modules/color/LICENSE deleted file mode 100644 index 68c864e..0000000 --- a/general/nvim/node_modules/color/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2012 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/general/nvim/node_modules/color/README.md b/general/nvim/node_modules/color/README.md deleted file mode 100644 index 7d48f73..0000000 --- a/general/nvim/node_modules/color/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# color [![Build Status](https://travis-ci.org/Qix-/color.svg?branch=master)](https://travis-ci.org/Qix-/color) - -> JavaScript library for immutable color conversion and manipulation with support for CSS color strings. - -```js -var color = Color('#7743CE').alpha(0.5).lighten(0.5); -console.log(color.hsl().string()); // 'hsla(262, 59%, 81%, 0.5)' - -console.log(color.cmyk().round().array()); // [ 16, 25, 0, 8, 0.5 ] - -console.log(color.ansi256().object()); // { ansi256: 183, alpha: 0.5 } -``` - -## Install -```console -$ npm install color -``` - -## Usage -```js -var Color = require('color'); -``` - -### Constructors -```js -var color = Color('rgb(255, 255, 255)') -var color = Color({r: 255, g: 255, b: 255}) -var color = Color.rgb(255, 255, 255) -var color = Color.rgb([255, 255, 255]) -``` - -Set the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturationl` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black` - -String constructors are handled by [color-string](https://www.npmjs.com/package/color-string) - -### Getters -```js -color.hsl(); -``` -Convert a color to a different space (`hsl()`, `cmyk()`, etc.). - -```js -color.object(); // {r: 255, g: 255, b: 255} -``` -Get a hash of the color value. Reflects the color's current model (see above). - -```js -color.rgb().array() // [255, 255, 255] -``` -Get an array of the values with `array()`. Reflects the color's current model (see above). - -```js -color.rgbNumber() // 16777215 (0xffffff) -``` -Get the rgb number value. - -```js -color.hex() // #ffffff -``` -Get the hex value. - -```js -color.red() // 255 -``` -Get the value for an individual channel. - -### CSS Strings -```js -color.hsl().string() // 'hsl(320, 50%, 100%)' -``` - -Calling `.string()` with a number rounds the numbers to that decimal place. It defaults to 1. - -### Luminosity -```js -color.luminosity(); // 0.412 -``` -The [WCAG luminosity](http://www.w3.org/TR/WCAG20/#relativeluminancedef) of the color. 0 is black, 1 is white. - -```js -color.contrast(Color("blue")) // 12 -``` -The [WCAG contrast ratio](http://www.w3.org/TR/WCAG20/#contrast-ratiodef) to another color, from 1 (same color) to 21 (contrast b/w white and black). - -```js -color.isLight(); // true -color.isDark(); // false -``` -Get whether the color is "light" or "dark", useful for deciding text color. - -### Manipulation -```js -color.negate() // rgb(0, 100, 255) -> rgb(255, 155, 0) - -color.lighten(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 75%) -color.lighten(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0) -color.darken(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 25%) -color.darken(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0) - -color.lightness(50) // hsl(100, 50%, 10%) -> hsl(100, 50%, 50%) - -color.saturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 75%, 50%) -color.desaturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 25%, 50%) -color.grayscale() // #5CBF54 -> #969696 - -color.whiten(0.5) // hwb(100, 50%, 50%) -> hwb(100, 75%, 50%) -color.blacken(0.5) // hwb(100, 50%, 50%) -> hwb(100, 50%, 75%) - -color.fade(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 0.4) -color.opaquer(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 1.0) - -color.rotate(180) // hsl(60, 20%, 20%) -> hsl(240, 20%, 20%) -color.rotate(-90) // hsl(60, 20%, 20%) -> hsl(330, 20%, 20%) - -color.mix(Color("yellow")) // cyan -> rgb(128, 255, 128) -color.mix(Color("yellow"), 0.3) // cyan -> rgb(77, 255, 179) - -// chaining -color.green(100).grayscale().lighten(0.6) -``` - -## Propers -The API was inspired by [color-js](https://github.com/brehaut/color-js). Manipulation functions by CSS tools like Sass, LESS, and Stylus. diff --git a/general/nvim/node_modules/color/index.js b/general/nvim/node_modules/color/index.js deleted file mode 100644 index c756588..0000000 --- a/general/nvim/node_modules/color/index.js +++ /dev/null @@ -1,482 +0,0 @@ -'use strict'; - -var colorString = require('color-string'); -var convert = require('color-convert'); - -var _slice = [].slice; - -var skippedModels = [ - // to be honest, I don't really feel like keyword belongs in color convert, but eh. - 'keyword', - - // gray conflicts with some method names, and has its own method defined. - 'gray', - - // shouldn't really be in color-convert either... - 'hex' -]; - -var hashedModelKeys = {}; -Object.keys(convert).forEach(function (model) { - hashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model; -}); - -var limiters = {}; - -function Color(obj, model) { - if (!(this instanceof Color)) { - return new Color(obj, model); - } - - if (model && model in skippedModels) { - model = null; - } - - if (model && !(model in convert)) { - throw new Error('Unknown model: ' + model); - } - - var i; - var channels; - - if (obj == null) { // eslint-disable-line no-eq-null,eqeqeq - this.model = 'rgb'; - this.color = [0, 0, 0]; - this.valpha = 1; - } else if (obj instanceof Color) { - this.model = obj.model; - this.color = obj.color.slice(); - this.valpha = obj.valpha; - } else if (typeof obj === 'string') { - var result = colorString.get(obj); - if (result === null) { - throw new Error('Unable to parse color from string: ' + obj); - } - - this.model = result.model; - channels = convert[this.model].channels; - this.color = result.value.slice(0, channels); - this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; - } else if (obj.length) { - this.model = model || 'rgb'; - channels = convert[this.model].channels; - var newArr = _slice.call(obj, 0, channels); - this.color = zeroArray(newArr, channels); - this.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1; - } else if (typeof obj === 'number') { - // this is always RGB - can be converted later on. - obj &= 0xFFFFFF; - this.model = 'rgb'; - this.color = [ - (obj >> 16) & 0xFF, - (obj >> 8) & 0xFF, - obj & 0xFF - ]; - this.valpha = 1; - } else { - this.valpha = 1; - - var keys = Object.keys(obj); - if ('alpha' in obj) { - keys.splice(keys.indexOf('alpha'), 1); - this.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0; - } - - var hashedKeys = keys.sort().join(''); - if (!(hashedKeys in hashedModelKeys)) { - throw new Error('Unable to parse color from object: ' + JSON.stringify(obj)); - } - - this.model = hashedModelKeys[hashedKeys]; - - var labels = convert[this.model].labels; - var color = []; - for (i = 0; i < labels.length; i++) { - color.push(obj[labels[i]]); - } - - this.color = zeroArray(color); - } - - // perform limitations (clamping, etc.) - if (limiters[this.model]) { - channels = convert[this.model].channels; - for (i = 0; i < channels; i++) { - var limit = limiters[this.model][i]; - if (limit) { - this.color[i] = limit(this.color[i]); - } - } - } - - this.valpha = Math.max(0, Math.min(1, this.valpha)); - - if (Object.freeze) { - Object.freeze(this); - } -} - -Color.prototype = { - toString: function () { - return this.string(); - }, - - toJSON: function () { - return this[this.model](); - }, - - string: function (places) { - var self = this.model in colorString.to ? this : this.rgb(); - self = self.round(typeof places === 'number' ? places : 1); - var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); - return colorString.to[self.model](args); - }, - - percentString: function (places) { - var self = this.rgb().round(typeof places === 'number' ? places : 1); - var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); - return colorString.to.rgb.percent(args); - }, - - array: function () { - return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); - }, - - object: function () { - var result = {}; - var channels = convert[this.model].channels; - var labels = convert[this.model].labels; - - for (var i = 0; i < channels; i++) { - result[labels[i]] = this.color[i]; - } - - if (this.valpha !== 1) { - result.alpha = this.valpha; - } - - return result; - }, - - unitArray: function () { - var rgb = this.rgb().color; - rgb[0] /= 255; - rgb[1] /= 255; - rgb[2] /= 255; - - if (this.valpha !== 1) { - rgb.push(this.valpha); - } - - return rgb; - }, - - unitObject: function () { - var rgb = this.rgb().object(); - rgb.r /= 255; - rgb.g /= 255; - rgb.b /= 255; - - if (this.valpha !== 1) { - rgb.alpha = this.valpha; - } - - return rgb; - }, - - round: function (places) { - places = Math.max(places || 0, 0); - return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); - }, - - alpha: function (val) { - if (arguments.length) { - return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); - } - - return this.valpha; - }, - - // rgb - red: getset('rgb', 0, maxfn(255)), - green: getset('rgb', 1, maxfn(255)), - blue: getset('rgb', 2, maxfn(255)), - - hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style - - saturationl: getset('hsl', 1, maxfn(100)), - lightness: getset('hsl', 2, maxfn(100)), - - saturationv: getset('hsv', 1, maxfn(100)), - value: getset('hsv', 2, maxfn(100)), - - chroma: getset('hcg', 1, maxfn(100)), - gray: getset('hcg', 2, maxfn(100)), - - white: getset('hwb', 1, maxfn(100)), - wblack: getset('hwb', 2, maxfn(100)), - - cyan: getset('cmyk', 0, maxfn(100)), - magenta: getset('cmyk', 1, maxfn(100)), - yellow: getset('cmyk', 2, maxfn(100)), - black: getset('cmyk', 3, maxfn(100)), - - x: getset('xyz', 0, maxfn(100)), - y: getset('xyz', 1, maxfn(100)), - z: getset('xyz', 2, maxfn(100)), - - l: getset('lab', 0, maxfn(100)), - a: getset('lab', 1), - b: getset('lab', 2), - - keyword: function (val) { - if (arguments.length) { - return new Color(val); - } - - return convert[this.model].keyword(this.color); - }, - - hex: function (val) { - if (arguments.length) { - return new Color(val); - } - - return colorString.to.hex(this.rgb().round().color); - }, - - rgbNumber: function () { - var rgb = this.rgb().color; - return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); - }, - - luminosity: function () { - // http://www.w3.org/TR/WCAG20/#relativeluminancedef - var rgb = this.rgb().color; - - var lum = []; - for (var i = 0; i < rgb.length; i++) { - var chan = rgb[i] / 255; - lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); - } - - return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; - }, - - contrast: function (color2) { - // http://www.w3.org/TR/WCAG20/#contrast-ratiodef - var lum1 = this.luminosity(); - var lum2 = color2.luminosity(); - - if (lum1 > lum2) { - return (lum1 + 0.05) / (lum2 + 0.05); - } - - return (lum2 + 0.05) / (lum1 + 0.05); - }, - - level: function (color2) { - var contrastRatio = this.contrast(color2); - if (contrastRatio >= 7.1) { - return 'AAA'; - } - - return (contrastRatio >= 4.5) ? 'AA' : ''; - }, - - isDark: function () { - // YIQ equation from http://24ways.org/2010/calculating-color-contrast - var rgb = this.rgb().color; - var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; - return yiq < 128; - }, - - isLight: function () { - return !this.isDark(); - }, - - negate: function () { - var rgb = this.rgb(); - for (var i = 0; i < 3; i++) { - rgb.color[i] = 255 - rgb.color[i]; - } - return rgb; - }, - - lighten: function (ratio) { - var hsl = this.hsl(); - hsl.color[2] += hsl.color[2] * ratio; - return hsl; - }, - - darken: function (ratio) { - var hsl = this.hsl(); - hsl.color[2] -= hsl.color[2] * ratio; - return hsl; - }, - - saturate: function (ratio) { - var hsl = this.hsl(); - hsl.color[1] += hsl.color[1] * ratio; - return hsl; - }, - - desaturate: function (ratio) { - var hsl = this.hsl(); - hsl.color[1] -= hsl.color[1] * ratio; - return hsl; - }, - - whiten: function (ratio) { - var hwb = this.hwb(); - hwb.color[1] += hwb.color[1] * ratio; - return hwb; - }, - - blacken: function (ratio) { - var hwb = this.hwb(); - hwb.color[2] += hwb.color[2] * ratio; - return hwb; - }, - - grayscale: function () { - // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale - var rgb = this.rgb().color; - var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; - return Color.rgb(val, val, val); - }, - - fade: function (ratio) { - return this.alpha(this.valpha - (this.valpha * ratio)); - }, - - opaquer: function (ratio) { - return this.alpha(this.valpha + (this.valpha * ratio)); - }, - - rotate: function (degrees) { - var hsl = this.hsl(); - var hue = hsl.color[0]; - hue = (hue + degrees) % 360; - hue = hue < 0 ? 360 + hue : hue; - hsl.color[0] = hue; - return hsl; - }, - - mix: function (mixinColor, weight) { - // ported from sass implementation in C - // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 - if (!mixinColor || !mixinColor.rgb) { - throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); - } - var color1 = mixinColor.rgb(); - var color2 = this.rgb(); - var p = weight === undefined ? 0.5 : weight; - - var w = 2 * p - 1; - var a = color1.alpha() - color2.alpha(); - - var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; - var w2 = 1 - w1; - - return Color.rgb( - w1 * color1.red() + w2 * color2.red(), - w1 * color1.green() + w2 * color2.green(), - w1 * color1.blue() + w2 * color2.blue(), - color1.alpha() * p + color2.alpha() * (1 - p)); - } -}; - -// model conversion methods and static constructors -Object.keys(convert).forEach(function (model) { - if (skippedModels.indexOf(model) !== -1) { - return; - } - - var channels = convert[model].channels; - - // conversion methods - Color.prototype[model] = function () { - if (this.model === model) { - return new Color(this); - } - - if (arguments.length) { - return new Color(arguments, model); - } - - var newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha; - return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); - }; - - // 'static' construction methods - Color[model] = function (color) { - if (typeof color === 'number') { - color = zeroArray(_slice.call(arguments), channels); - } - return new Color(color, model); - }; -}); - -function roundTo(num, places) { - return Number(num.toFixed(places)); -} - -function roundToPlace(places) { - return function (num) { - return roundTo(num, places); - }; -} - -function getset(model, channel, modifier) { - model = Array.isArray(model) ? model : [model]; - - model.forEach(function (m) { - (limiters[m] || (limiters[m] = []))[channel] = modifier; - }); - - model = model[0]; - - return function (val) { - var result; - - if (arguments.length) { - if (modifier) { - val = modifier(val); - } - - result = this[model](); - result.color[channel] = val; - return result; - } - - result = this[model]().color[channel]; - if (modifier) { - result = modifier(result); - } - - return result; - }; -} - -function maxfn(max) { - return function (v) { - return Math.max(0, Math.min(max, v)); - }; -} - -function assertArray(val) { - return Array.isArray(val) ? val : [val]; -} - -function zeroArray(arr, length) { - for (var i = 0; i < length; i++) { - if (typeof arr[i] !== 'number') { - arr[i] = 0; - } - } - - return arr; -} - -module.exports = Color; diff --git a/general/nvim/node_modules/color/package.json b/general/nvim/node_modules/color/package.json deleted file mode 100644 index 8e6ca3f..0000000 --- a/general/nvim/node_modules/color/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "color", - "version": "3.2.1", - "description": "Color conversion and manipulation with CSS string support", - "keywords": [ - "color", - "colour", - "css" - ], - "authors": [ - "Josh Junon ", - "Heather Arthur ", - "Maxime Thirouin" - ], - "license": "MIT", - "repository": "Qix-/color", - "xo": { - "rules": { - "no-cond-assign": 0, - "new-cap": 0 - } - }, - "files": [ - "CHANGELOG.md", - "LICENSE", - "index.js" - ], - "scripts": { - "pretest": "xo", - "test": "mocha" - }, - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - }, - "devDependencies": { - "mocha": "9.0.2", - "xo": "0.12.1" - } -} diff --git a/general/nvim/node_modules/colorspace/LICENSE.md b/general/nvim/node_modules/colorspace/LICENSE.md deleted file mode 100644 index 9beaab1..0000000 --- a/general/nvim/node_modules/colorspace/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Arnout Kazemier, Martijn Swaagman, the Contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/general/nvim/node_modules/colorspace/README.md b/general/nvim/node_modules/colorspace/README.md deleted file mode 100644 index c26690f..0000000 --- a/general/nvim/node_modules/colorspace/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# colorspace - -Colorspace is a simple module which generates HEX color codes for namespaces. -The base color is decided by the first part of the namespace. All other parts of -the namespace alters the color tone. This way you can visually see which -namespaces belong together and which does not. - -## Installation - -The module is released in the public npm registry and can be installed by -running: - -``` -npm install --save colorspace -``` - -## Usage - -We assume that you've already required the module using the following code: - -```js -'use strict'; - -var colorspace = require('colorspace'); -``` - -The returned function accepts 2 arguments: - -1. `namespace` **string**, The namespace that needs to have a HEX color - generated. -2. `delimiter`, **string**, **optional**, Delimiter to find the different - sections of the namespace. Defaults to `:` - -#### Example - -```js -console.log(colorspace('color')) // #6b4b3a -console.log(colorspace('color:space')) // #796B67 -``` - -## License - -MIT diff --git a/general/nvim/node_modules/colorspace/index.js b/general/nvim/node_modules/colorspace/index.js deleted file mode 100644 index cb56eb6..0000000 --- a/general/nvim/node_modules/colorspace/index.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var color = require('color') - , hex = require('text-hex'); - -/** - * Generate a color for a given name. But be reasonably smart about it by - * understanding name spaces and coloring each namespace a bit lighter so they - * still have the same base color as the root. - * - * @param {string} namespace The namespace - * @param {string} [delimiter] The delimiter - * @returns {string} color - */ -module.exports = function colorspace(namespace, delimiter) { - var split = namespace.split(delimiter || ':'); - var base = hex(split[0]); - - if (!split.length) return base; - - for (var i = 0, l = split.length - 1; i < l; i++) { - base = color(base) - .mix(color(hex(split[i + 1]))) - .saturate(1) - .hex(); - } - - return base; -}; diff --git a/general/nvim/node_modules/colorspace/package.json b/general/nvim/node_modules/colorspace/package.json deleted file mode 100644 index ede6f4b..0000000 --- a/general/nvim/node_modules/colorspace/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "colorspace", - "version": "1.1.4", - "description": "Generate HEX colors for a given namespace.", - "main": "index.js", - "scripts": { - "test": "mocha test.js" - }, - "keywords": [ - "namespace", - "color", - "hex", - "colorize", - "name", - "space", - "colorspace" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "bugs": { - "url": "https://github.com/3rd-Eden/colorspace/issues" - }, - "homepage": "https://github.com/3rd-Eden/colorspace", - "repository": { - "type": "git", - "url": "https://github.com/3rd-Eden/colorspace" - }, - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - }, - "devDependencies": { - "assume": "2.1.x", - "mocha": "5.2.x", - "pre-commit": "1.2.x" - } -} diff --git a/general/nvim/node_modules/enabled/.travis.yml b/general/nvim/node_modules/enabled/.travis.yml deleted file mode 100644 index 6b89a86..0000000 --- a/general/nvim/node_modules/enabled/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "10" - - "9" - - "8" -after_script: - - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls" -matrix: - fast_finish: true diff --git a/general/nvim/node_modules/enabled/LICENSE b/general/nvim/node_modules/enabled/LICENSE deleted file mode 100644 index 9beaab1..0000000 --- a/general/nvim/node_modules/enabled/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Arnout Kazemier, Martijn Swaagman, the Contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/general/nvim/node_modules/enabled/README.md b/general/nvim/node_modules/enabled/README.md deleted file mode 100644 index bed6de3..0000000 --- a/general/nvim/node_modules/enabled/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# enabled - -[![Version npm][version]](http://browsenpm.org/package/enabled)[![Build Status][build]](https://travis-ci.org/3rd-Eden/enabled)[![Dependencies][david]](https://david-dm.org/3rd-Eden/enabled)[![Coverage Status][cover]](https://coveralls.io/r/3rd-Eden/enabled?branch=master) - -[version]: http://img.shields.io/npm/v/enabled.svg?style=flat-square -[build]: http://img.shields.io/travis/3rd-Eden/enabled/master.svg?style=flat-square -[david]: https://img.shields.io/david/3rd-Eden/enabled.svg?style=flat-square -[cover]: http://img.shields.io/coveralls/3rd-Eden/enabled/master.svg?style=flat-square - -Enabled is a small utility that can check if certain namespace are enabled by -environment variables which are automatically transformed to regular expressions -for matching. - -## Installation - -The module is release in the public npm registry and can be used in browsers and -servers as it uses plain ol ES3 to make the magic work. - -``` -npm install --save enabled -``` - -## Usage - -First of all make sure you've required the module using: - -```js -'use strict'; - -var enabled = require('enabled'); -``` - -The returned `enabled` function accepts 2 arguments. - -1. `name` **string**, The namespace that should match. -2. `pattern` **string**, The pattern that the name should satisfy - -It will return a boolean indication of a match. - -#### Examples - -```js -var flag = 'foo'; - -enabled('foo', flag); // true; -enabled('bar', flag); // false; - -// -// Use * for wild cards. -// -var wildcard = 'foob*'; - -enabled('foobar', wildcard); // true; -enabled('barfoo', wildcard); // false; - -// -// Use - to ignore. -// -var ignore = 'foobar,-shizzle,nizzle'; - -enabled('foobar', ignore); // true; -enabled('shizzle-my-nizzle', ignore); // false; -enabled('nizzle', ignore); // true; -``` - -## License - -[MIT](./LICENSE) diff --git a/general/nvim/node_modules/enabled/index.js b/general/nvim/node_modules/enabled/index.js deleted file mode 100644 index 69ee650..0000000 --- a/general/nvim/node_modules/enabled/index.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -/** - * Checks if a given namespace is allowed by the given variable. - * - * @param {String} name namespace that should be included. - * @param {String} variable Value that needs to be tested. - * @returns {Boolean} Indication if namespace is enabled. - * @public - */ -module.exports = function enabled(name, variable) { - if (!variable) return false; - - var variables = variable.split(/[\s,]+/) - , i = 0; - - for (; i < variables.length; i++) { - variable = variables[i].replace('*', '.*?'); - - if ('-' === variable.charAt(0)) { - if ((new RegExp('^'+ variable.substr(1) +'$')).test(name)) { - return false; - } - - continue; - } - - if ((new RegExp('^'+ variable +'$')).test(name)) { - return true; - } - } - - return false; -}; diff --git a/general/nvim/node_modules/enabled/package.json b/general/nvim/node_modules/enabled/package.json deleted file mode 100644 index 17408a6..0000000 --- a/general/nvim/node_modules/enabled/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "enabled", - "version": "2.0.0", - "description": "Check if a certain debug flag is enabled.", - "main": "index.js", - "scripts": { - "100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100", - "test": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js", - "watch": "mocha --watch test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/3rd-Eden/enabled.git" - }, - "keywords": [ - "enabled", - "debug", - "diagnostics", - "flag", - "env", - "variable", - "localstorage" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "assume": "2.1.x", - "istanbul": "^0.4.5", - "mocha": "5.2.x", - "pre-commit": "1.2.x" - } -} diff --git a/general/nvim/node_modules/enabled/test.js b/general/nvim/node_modules/enabled/test.js deleted file mode 100644 index a160b71..0000000 --- a/general/nvim/node_modules/enabled/test.js +++ /dev/null @@ -1,39 +0,0 @@ -describe('enabled', function () { - 'use strict'; - - var assume = require('assume') - , enabled = require('./'); - - it('supports wildcards', function () { - var variable = 'b*'; - - assume(enabled('bigpipe', variable)).to.be.true(); - assume(enabled('bro-fist', variable)).to.be.true(); - assume(enabled('ro-fist', variable)).to.be.false(); - }); - - it('is disabled by default', function () { - assume(enabled('bigpipe', '')).to.be.false(); - assume(enabled('bigpipe', 'bigpipe')).to.be.true(); - }); - - it('can ignore loggers using a -', function () { - var variable = 'bigpipe,-primus,sack,-other'; - - assume(enabled('bigpipe', variable)).to.be.true(); - assume(enabled('sack', variable)).to.be.true(); - assume(enabled('primus', variable)).to.be.false(); - assume(enabled('other', variable)).to.be.false(); - assume(enabled('unknown', variable)).to.be.false(); - }); - - it('supports multiple ranges', function () { - var variable = 'bigpipe*,primus*'; - - assume(enabled('bigpipe:', variable)).to.be.true(); - assume(enabled('bigpipes', variable)).to.be.true(); - assume(enabled('primus:', variable)).to.be.true(); - assume(enabled('primush', variable)).to.be.true(); - assume(enabled('unknown', variable)).to.be.false(); - }); -}); diff --git a/general/nvim/node_modules/fecha/LICENSE b/general/nvim/node_modules/fecha/LICENSE deleted file mode 100644 index cc9084b..0000000 --- a/general/nvim/node_modules/fecha/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Taylor Hakes - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/general/nvim/node_modules/fecha/README.md b/general/nvim/node_modules/fecha/README.md deleted file mode 100644 index b128a5a..0000000 --- a/general/nvim/node_modules/fecha/README.md +++ /dev/null @@ -1,320 +0,0 @@ -# fecha [![Build Status](https://travis-ci.org/taylorhakes/fecha.svg?branch=master)](https://travis-ci.org/taylorhakes/fecha) - -Lightweight date formatting and parsing (~2KB). Meant to replace parsing and formatting functionality of moment.js. - -### NPM -``` -npm install fecha --save -``` -### Yarn -``` -yarn add fecha -``` - -### Fecha vs Moment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FechaMoment
Size (Min. and Gzipped)2.1KBs13.1KBs
Date Parsing
Date Formatting
Date Manipulation
I18n Support
- -## Use it - -#### Formatting -`format` accepts a Date object (or timestamp) and a string format and returns a formatted string. See below for -available format tokens. - -Note: `format` will throw an error when passed invalid parameters -```js -import { format } from 'fecha'; - -type format = (date: Date, format?: string, i18n?: I18nSettings) => str; - -// Custom formats -format(new Date(2015, 10, 20), 'dddd MMMM Do, YYYY'); // 'Friday November 20th, 2015' -format(new Date(1998, 5, 3, 15, 23, 10, 350), 'YYYY-MM-DD hh:mm:ss.SSS A'); // '1998-06-03 03:23:10.350 PM' - -// Named masks -format(new Date(2015, 10, 20), 'isoDate'); // '2015-11-20' -format(new Date(2015, 10, 20), 'mediumDate'); // 'Nov 20, 2015' -format(new Date(2015, 10, 20, 3, 2, 1), 'isoDateTime'); // '2015-11-20T03:02:01-05:00' -format(new Date(2015, 2, 10, 5, 30, 20), 'shortTime'); // '05:30' - -// Literals -format(new Date(2001, 2, 5, 6, 7, 2, 5), '[on] MM-DD-YYYY [at] HH:mm'); // 'on 03-05-2001 at 06:07' -``` - -#### Parsing -`parse` accepts a Date string and a string format and returns a Date object. See below for available format tokens. - -*NOTE*: `parse` will throw an error when passed invalid string format or missing format. You MUST specify a format. -```js -import { parse } from 'fecha'; - -type parse = (dateStr: string, format: string, i18n?: I18nSettingsOptional) => Date|null; - -// Custom formats -parse('February 3rd, 2014', 'MMMM Do, YYYY'); // new Date(2014, 1, 3) -parse('10-12-10 14:11:12', 'YY-MM-DD HH:mm:ss'); // new Date(2010, 11, 10, 14, 11, 12) - -// Named masks -parse('5/3/98', 'shortDate'); // new Date(1998, 4, 3) -parse('November 4, 2005', 'longDate'); // new Date(2005, 10, 4) -parse('2015-11-20T03:02:01-05:00', 'isoDateTime'); // new Date(2015, 10, 20, 3, 2, 1) - -// Override i18n -parse('4 de octubre de 1983', 'M de MMMM de YYYY', { - monthNames: [ - 'enero', - 'febrero', - 'marzo', - 'abril', - 'mayo', - 'junio', - 'julio', - 'agosto', - 'septiembre', - 'octubre', - 'noviembre', - 'diciembre' - ] -}); // new Date(1983, 9, 4) -``` - -#### i18n Support -```js -import {setGlobalDateI18n} from 'fecha'; - -/* -Default I18n Settings -{ - dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat'], - dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - amPm: ['am', 'pm'], - // D is the day of the month, function returns something like... 3rd or 11th - DoFn(dayOfMonth) { - return dayOfMonth + [ 'th', 'st', 'nd', 'rd' ][ dayOfMonth % 10 > 3 ? 0 : (dayOfMonth - dayOfMonth % 10 !== 10) * dayOfMonth % 10 ]; - } -} -*/ - -setGlobalDateI18n({ - dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat'], - dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - amPm: ['am', 'pm'], - // D is the day of the month, function returns something like... 3rd or 11th - DoFn: function (D) { - return D + [ 'th', 'st', 'nd', 'rd' ][ D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10 ]; - } -}); - -``` - -#### Custom Named Masks -```js -import { format, setGlobalDateMasks } from 'fecha'; -/* -Default global masks -{ - default: 'ddd MMM DD YYYY HH:mm:ss', - shortDate: 'M/D/YY', - mediumDate: 'MMM D, YYYY', - longDate: 'MMMM D, YYYY', - fullDate: 'dddd, MMMM D, YYYY', - shortTime: 'HH:mm', - mediumTime: 'HH:mm:ss', - longTime: 'HH:mm:ss.SSS' -} -*/ - -// Create a new mask -setGlobalDateMasks({ - myMask: 'HH:mm:ss YY/MM/DD'; -}); - -// Use it -format(new Date(2014, 5, 6, 14, 10, 45), 'myMask'); // '14:10:45 14/06/06' -``` - -### Formatting Tokens - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TokenOutput
MonthM1 2 ... 11 12
MM01 02 ... 11 12
MMMJan Feb ... Nov Dec
MMMMJanuary February ... November December
Day of MonthD1 2 ... 30 31
Do1st 2nd ... 30th 31st
DD01 02 ... 30 31
Day of Weekd0 1 ... 5 6
dddSun Mon ... Fri Sat
ddddSunday Monday ... Friday Saturday
YearYY70 71 ... 29 30
YYYY1970 1971 ... 2029 2030
AM/PMAAM PM
aam pm
HourH0 1 ... 22 23
HH00 01 ... 22 23
h1 2 ... 11 12
hh01 02 ... 11 12
Minutem0 1 ... 58 59
mm00 01 ... 58 59
Seconds0 1 ... 58 59
ss00 01 ... 58 59
Fractional SecondS0 1 ... 8 9
SS0 1 ... 98 99
SSS0 1 ... 998 999
TimezoneZ - -07:00 -06:00 ... +06:00 +07:00 -
ZZ - -0700 -0600 ... +0600 +0700 -
diff --git a/general/nvim/node_modules/fecha/dist/fecha.min.js b/general/nvim/node_modules/fecha/dist/fecha.min.js deleted file mode 100644 index fc2b201..0000000 --- a/general/nvim/node_modules/fecha/dist/fecha.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.fecha={})}(this,function(t){"use strict";var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,e="[^\\s]+",r=/\[([^]*?)\]/gm;function o(t,n){for(var e=[],r=0,o=t.length;r-1?r:null}};function a(t){for(var n=[],e=1;e3?0:(t-t%10!=10?1:0)*t%10]}},m=a({},f),c=function(t){return m=a(m,t)},l=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},h=function(t,n){for(void 0===n&&(n=2),t=String(t);t.length0?"-":"+")+h(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4)},Z:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+h(Math.floor(Math.abs(n)/60),2)+":"+h(Math.abs(n)%60,2)}},M=function(t){return+t-1},D=[null,"\\d\\d?"],Y=[null,e],y=["isPm",e,function(t,n){var e=t.toLowerCase();return e===n.amPm[0]?0:e===n.amPm[1]?1:null}],p=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var n=(t+"").match(/([+-]|\d\d)/gi);if(n){var e=60*+n[1]+parseInt(n[2],10);return"+"===n[0]?e:-e}return 0}],S={D:["day","\\d\\d?"],DD:["day","\\d\\d"],Do:["day","\\d\\d?"+e,function(t){return parseInt(t,10)}],M:["month","\\d\\d?",M],MM:["month","\\d\\d",M],YY:["year","\\d\\d",function(t){var n=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour","\\d\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","\\d\\d?"],HH:["hour","\\d\\d"],m:["minute","\\d\\d?"],mm:["minute","\\d\\d"],s:["second","\\d\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond","\\d\\d",function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:D,dd:D,ddd:Y,dddd:Y,MMM:["month",e,u("monthNamesShort")],MMMM:["month",e,u("monthNames")],a:y,A:y,ZZ:p,Z:p},v={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},H=function(t){return a(v,t)},b=function(t,e,o){if(void 0===e&&(e=v.default),void 0===o&&(o={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var u=[];e=(e=v[e]||e).replace(r,function(t,n){return u.push(n),"@@@"});var i=a(a({},m),o);return(e=e.replace(n,function(n){return g[n](t,i)})).replace(/@@@/g,function(){return u.shift()})};function w(t,e,o){if(void 0===o&&(o={}),"string"!=typeof e)throw new Error("Invalid format in fecha parse");if(e=v[e]||e,t.length>1e3)return null;var u={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],d=[],s=e.replace(r,function(t,n){return d.push(l(n)),"@@@"}),f={},c={};s=l(s).replace(n,function(t){var n=S[t],e=n[0],r=n[1],o=n[3];if(f[e])throw new Error("Invalid format. "+e+" specified twice in format");return f[e]=!0,o&&(c[o]=!0),i.push(n),"("+r+")"}),Object.keys(c).forEach(function(t){if(!f[t])throw new Error("Invalid format. "+t+" is required in specified format")}),s=s.replace(/@@@/g,function(){return d.shift()});var h=t.match(new RegExp(s,"i"));if(!h)return null;for(var g,M=a(a({},m),o),D=1;D11||u.month<0||u.day>31||u.day<1||u.hour>23||u.hour<0||u.minute>59||u.minute<0||u.second>59||u.second<0)return null;return g}var P={format:b,parse:w,defaultI18n:f,setGlobalDateI18n:c,setGlobalDateMasks:H};t.assign=a,t.default=P,t.format=b,t.parse=w,t.defaultI18n=f,t.setGlobalDateI18n=c,t.setGlobalDateMasks=H,Object.defineProperty(t,"__esModule",{value:!0})}); -//# sourceMappingURL=fecha.min.js.map diff --git a/general/nvim/node_modules/fecha/dist/fecha.min.js.map b/general/nvim/node_modules/fecha/dist/fecha.min.js.map deleted file mode 100644 index 723f49b..0000000 --- a/general/nvim/node_modules/fecha/dist/fecha.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fecha.min.js","sources":["../src/fecha.ts"],"sourcesContent":["const token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\nconst twoDigitsOptional = \"\\\\d\\\\d?\";\nconst twoDigits = \"\\\\d\\\\d\";\nconst threeDigits = \"\\\\d{3}\";\nconst fourDigits = \"\\\\d{4}\";\nconst word = \"[^\\\\s]+\";\nconst literal = /\\[([^]*?)\\]/gm;\n\ntype DateInfo = {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n millisecond: number;\n isPm: number | null;\n timezoneOffset: number | null;\n};\n\nexport type I18nSettings = {\n amPm: [string, string];\n dayNames: Days;\n dayNamesShort: Days;\n monthNames: Months;\n monthNamesShort: Months;\n DoFn(dayOfMonth: number): string;\n};\n\nexport type I18nSettingsOptional = Partial;\n\nexport type Days = [string, string, string, string, string, string, string];\nexport type Months = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string\n];\n\nfunction shorten(arr: T, sLen: number): string[] {\n const newArr: string[] = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n newArr.push(arr[i].substr(0, sLen));\n }\n return newArr;\n}\n\nconst monthUpdate = (\n arrName: \"monthNames\" | \"monthNamesShort\" | \"dayNames\" | \"dayNamesShort\"\n) => (v: string, i18n: I18nSettings): number | null => {\n const lowerCaseArr = i18n[arrName].map(v => v.toLowerCase());\n const index = lowerCaseArr.indexOf(v.toLowerCase());\n if (index > -1) {\n return index;\n }\n return null;\n};\n\nexport function assign(a: A): A;\nexport function assign(a: A, b: B): A & B;\nexport function assign(a: A, b: B, c: C): A & B & C;\nexport function assign(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function assign(origObj: any, ...args: any[]): any {\n for (const obj of args) {\n for (const key in obj) {\n // @ts-ignore ex\n origObj[key] = obj[key];\n }\n }\n return origObj;\n}\n\nconst dayNames: Days = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\nconst monthNames: Months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nconst monthNamesShort: Months = shorten(monthNames, 3) as Months;\nconst dayNamesShort: Days = shorten(dayNames, 3) as Days;\n\nconst defaultI18n: I18nSettings = {\n dayNamesShort,\n dayNames,\n monthNamesShort,\n monthNames,\n amPm: [\"am\", \"pm\"],\n DoFn(dayOfMonth: number) {\n return (\n dayOfMonth +\n [\"th\", \"st\", \"nd\", \"rd\"][\n dayOfMonth % 10 > 3\n ? 0\n : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10\n ]\n );\n }\n};\nlet globalI18n = assign({}, defaultI18n);\nconst setGlobalDateI18n = (i18n: I18nSettingsOptional): I18nSettings =>\n (globalI18n = assign(globalI18n, i18n));\n\nconst regexEscape = (str: string): string =>\n str.replace(/[|\\\\{()[^$+*?.-]/g, \"\\\\$&\");\n\nconst pad = (val: string | number, len = 2): string => {\n val = String(val);\n while (val.length < len) {\n val = \"0\" + val;\n }\n return val;\n};\n\nconst formatFlags: Record<\n string,\n (dateObj: Date, i18n: I18nSettings) => string\n> = {\n D: (dateObj: Date): string => String(dateObj.getDate()),\n DD: (dateObj: Date): string => pad(dateObj.getDate()),\n Do: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.DoFn(dateObj.getDate()),\n d: (dateObj: Date): string => String(dateObj.getDay()),\n dd: (dateObj: Date): string => pad(dateObj.getDay()),\n ddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNamesShort[dateObj.getDay()],\n dddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNames[dateObj.getDay()],\n M: (dateObj: Date): string => String(dateObj.getMonth() + 1),\n MM: (dateObj: Date): string => pad(dateObj.getMonth() + 1),\n MMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNamesShort[dateObj.getMonth()],\n MMMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNames[dateObj.getMonth()],\n YY: (dateObj: Date): string =>\n pad(String(dateObj.getFullYear()), 4).substr(2),\n YYYY: (dateObj: Date): string => pad(dateObj.getFullYear(), 4),\n h: (dateObj: Date): string => String(dateObj.getHours() % 12 || 12),\n hh: (dateObj: Date): string => pad(dateObj.getHours() % 12 || 12),\n H: (dateObj: Date): string => String(dateObj.getHours()),\n HH: (dateObj: Date): string => pad(dateObj.getHours()),\n m: (dateObj: Date): string => String(dateObj.getMinutes()),\n mm: (dateObj: Date): string => pad(dateObj.getMinutes()),\n s: (dateObj: Date): string => String(dateObj.getSeconds()),\n ss: (dateObj: Date): string => pad(dateObj.getSeconds()),\n S: (dateObj: Date): string =>\n String(Math.round(dateObj.getMilliseconds() / 100)),\n SS: (dateObj: Date): string =>\n pad(Math.round(dateObj.getMilliseconds() / 10), 2),\n SSS: (dateObj: Date): string => pad(dateObj.getMilliseconds(), 3),\n a: (dateObj: Date, i18n: I18nSettings): string =>\n dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1],\n A: (dateObj: Date, i18n: I18nSettings): string =>\n dateObj.getHours() < 12\n ? i18n.amPm[0].toUpperCase()\n : i18n.amPm[1].toUpperCase(),\n ZZ(dateObj: Date): string {\n const offset = dateObj.getTimezoneOffset();\n return (\n (offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4)\n );\n },\n Z(dateObj: Date): string {\n const offset = dateObj.getTimezoneOffset();\n return (\n (offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60), 2) +\n \":\" +\n pad(Math.abs(offset) % 60, 2)\n );\n }\n};\n\ntype ParseInfo = [\n keyof DateInfo,\n string,\n ((v: string, i18n: I18nSettings) => number | null)?,\n string?\n];\nconst monthParse = (v: string): number => +v - 1;\nconst emptyDigits: ParseInfo = [null, twoDigitsOptional];\nconst emptyWord: ParseInfo = [null, word];\nconst amPm: ParseInfo = [\n \"isPm\",\n word,\n (v: string, i18n: I18nSettings): number | null => {\n const val = v.toLowerCase();\n if (val === i18n.amPm[0]) {\n return 0;\n } else if (val === i18n.amPm[1]) {\n return 1;\n }\n return null;\n }\n];\nconst timezoneOffset: ParseInfo = [\n \"timezoneOffset\",\n \"[^\\\\s]*?[\\\\+\\\\-]\\\\d\\\\d:?\\\\d\\\\d|[^\\\\s]*?Z?\",\n (v: string): number | null => {\n const parts = (v + \"\").match(/([+-]|\\d\\d)/gi);\n\n if (parts) {\n const minutes = +parts[1] * 60 + parseInt(parts[2], 10);\n return parts[0] === \"+\" ? minutes : -minutes;\n }\n\n return 0;\n }\n];\nconst parseFlags: Record = {\n D: [\"day\", twoDigitsOptional],\n DD: [\"day\", twoDigits],\n Do: [\"day\", twoDigitsOptional + word, (v: string): number => parseInt(v, 10)],\n M: [\"month\", twoDigitsOptional, monthParse],\n MM: [\"month\", twoDigits, monthParse],\n YY: [\n \"year\",\n twoDigits,\n (v: string): number => {\n const now = new Date();\n const cent = +(\"\" + now.getFullYear()).substr(0, 2);\n return +(\"\" + (+v > 68 ? cent - 1 : cent) + v);\n }\n ],\n h: [\"hour\", twoDigitsOptional, undefined, \"isPm\"],\n hh: [\"hour\", twoDigits, undefined, \"isPm\"],\n H: [\"hour\", twoDigitsOptional],\n HH: [\"hour\", twoDigits],\n m: [\"minute\", twoDigitsOptional],\n mm: [\"minute\", twoDigits],\n s: [\"second\", twoDigitsOptional],\n ss: [\"second\", twoDigits],\n YYYY: [\"year\", fourDigits],\n S: [\"millisecond\", \"\\\\d\", (v: string): number => +v * 100],\n SS: [\"millisecond\", twoDigits, (v: string): number => +v * 10],\n SSS: [\"millisecond\", threeDigits],\n d: emptyDigits,\n dd: emptyDigits,\n ddd: emptyWord,\n dddd: emptyWord,\n MMM: [\"month\", word, monthUpdate(\"monthNamesShort\")],\n MMMM: [\"month\", word, monthUpdate(\"monthNames\")],\n a: amPm,\n A: amPm,\n ZZ: timezoneOffset,\n Z: timezoneOffset\n};\n\n// Some common format strings\nconst globalMasks: { [key: string]: string } = {\n default: \"ddd MMM DD YYYY HH:mm:ss\",\n shortDate: \"M/D/YY\",\n mediumDate: \"MMM D, YYYY\",\n longDate: \"MMMM D, YYYY\",\n fullDate: \"dddd, MMMM D, YYYY\",\n isoDate: \"YYYY-MM-DD\",\n isoDateTime: \"YYYY-MM-DDTHH:mm:ssZ\",\n shortTime: \"HH:mm\",\n mediumTime: \"HH:mm:ss\",\n longTime: \"HH:mm:ss.SSS\"\n};\nconst setGlobalDateMasks = (masks: {\n [key: string]: string;\n}): { [key: string]: string } => assign(globalMasks, masks);\n\n/***\n * Format a date\n * @method format\n * @param {Date|number} dateObj\n * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'\n * @returns {string} Formatted date string\n */\nconst format = (\n dateObj: Date,\n mask: string = globalMasks[\"default\"],\n i18n: I18nSettingsOptional = {}\n): string => {\n if (typeof dateObj === \"number\") {\n dateObj = new Date(dateObj);\n }\n\n if (\n Object.prototype.toString.call(dateObj) !== \"[object Date]\" ||\n isNaN(dateObj.getTime())\n ) {\n throw new Error(\"Invalid Date pass to format\");\n }\n\n mask = globalMasks[mask] || mask;\n\n const literals: string[] = [];\n\n // Make literals inactive by replacing them with @@@\n mask = mask.replace(literal, function($0, $1) {\n literals.push($1);\n return \"@@@\";\n });\n\n const combinedI18nSettings: I18nSettings = assign(\n assign({}, globalI18n),\n i18n\n );\n // Apply formatting rules\n mask = mask.replace(token, $0 =>\n formatFlags[$0](dateObj, combinedI18nSettings)\n );\n // Inline literal values back into the formatted value\n return mask.replace(/@@@/g, () => literals.shift());\n};\n\n/**\n * Parse a date string into a Javascript Date object /\n * @method parse\n * @param {string} dateStr Date string\n * @param {string} format Date parse format\n * @param {i18n} I18nSettingsOptional Full or subset of I18N settings\n * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format\n */\nfunction parse(\n dateStr: string,\n format: string,\n i18n: I18nSettingsOptional = {}\n): Date | null {\n if (typeof format !== \"string\") {\n throw new Error(\"Invalid format in fecha parse\");\n }\n\n // Check to see if the format is actually a mask\n format = globalMasks[format] || format;\n\n // Avoid regular expression denial of service, fail early for really long strings\n // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS\n if (dateStr.length > 1000) {\n return null;\n }\n\n // Default to the beginning of the year.\n const today = new Date();\n const dateInfo: DateInfo = {\n year: today.getFullYear(),\n month: 0,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n isPm: null,\n timezoneOffset: null\n };\n const parseInfo: ParseInfo[] = [];\n const literals: string[] = [];\n\n // Replace all the literals with @@@. Hopefully a string that won't exist in the format\n let newFormat = format.replace(literal, ($0, $1) => {\n literals.push(regexEscape($1));\n return \"@@@\";\n });\n const specifiedFields: { [field: string]: boolean } = {};\n const requiredFields: { [field: string]: boolean } = {};\n\n // Change every token that we find into the correct regex\n newFormat = regexEscape(newFormat).replace(token, $0 => {\n const info = parseFlags[$0];\n const [field, regex, , requiredField] = info;\n\n // Check if the person has specified the same field twice. This will lead to confusing results.\n if (specifiedFields[field]) {\n throw new Error(`Invalid format. ${field} specified twice in format`);\n }\n\n specifiedFields[field] = true;\n\n // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified\n if (requiredField) {\n requiredFields[requiredField] = true;\n }\n\n parseInfo.push(info);\n return \"(\" + regex + \")\";\n });\n\n // Check all the required fields are present\n Object.keys(requiredFields).forEach(field => {\n if (!specifiedFields[field]) {\n throw new Error(\n `Invalid format. ${field} is required in specified format`\n );\n }\n });\n\n // Add back all the literals after\n newFormat = newFormat.replace(/@@@/g, () => literals.shift());\n\n // Check if the date string matches the format. If it doesn't return null\n const matches = dateStr.match(new RegExp(newFormat, \"i\"));\n if (!matches) {\n return null;\n }\n\n const combinedI18nSettings: I18nSettings = assign(\n assign({}, globalI18n),\n i18n\n );\n\n // For each match, call the parser function for that date part\n for (let i = 1; i < matches.length; i++) {\n const [field, , parser] = parseInfo[i - 1];\n const value = parser\n ? parser(matches[i], combinedI18nSettings)\n : +matches[i];\n\n // If the parser can't make sense of the value, return null\n if (value == null) {\n return null;\n }\n\n dateInfo[field] = value;\n }\n\n if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) {\n dateInfo.hour = +dateInfo.hour + 12;\n } else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) {\n dateInfo.hour = 0;\n }\n\n let dateTZ: Date;\n if (dateInfo.timezoneOffset == null) {\n dateTZ = new Date(\n dateInfo.year,\n dateInfo.month,\n dateInfo.day,\n dateInfo.hour,\n dateInfo.minute,\n dateInfo.second,\n dateInfo.millisecond\n );\n const validateFields: [\n \"month\" | \"day\" | \"hour\" | \"minute\" | \"second\",\n \"getMonth\" | \"getDate\" | \"getHours\" | \"getMinutes\" | \"getSeconds\"\n ][] = [\n [\"month\", \"getMonth\"],\n [\"day\", \"getDate\"],\n [\"hour\", \"getHours\"],\n [\"minute\", \"getMinutes\"],\n [\"second\", \"getSeconds\"]\n ];\n for (let i = 0, len = validateFields.length; i < len; i++) {\n // Check to make sure the date field is within the allowed range. Javascript dates allows values\n // outside the allowed range. If the values don't match the value was invalid\n if (\n specifiedFields[validateFields[i][0]] &&\n dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()\n ) {\n return null;\n }\n }\n } else {\n dateTZ = new Date(\n Date.UTC(\n dateInfo.year,\n dateInfo.month,\n dateInfo.day,\n dateInfo.hour,\n dateInfo.minute - dateInfo.timezoneOffset,\n dateInfo.second,\n dateInfo.millisecond\n )\n );\n\n // We can't validate dates in another timezone unfortunately. Do a basic check instead\n if (\n dateInfo.month > 11 ||\n dateInfo.month < 0 ||\n dateInfo.day > 31 ||\n dateInfo.day < 1 ||\n dateInfo.hour > 23 ||\n dateInfo.hour < 0 ||\n dateInfo.minute > 59 ||\n dateInfo.minute < 0 ||\n dateInfo.second > 59 ||\n dateInfo.second < 0\n ) {\n return null;\n }\n }\n\n // Don't allow invalid dates\n\n return dateTZ;\n}\nexport default {\n format,\n parse,\n defaultI18n,\n setGlobalDateI18n,\n setGlobalDateMasks\n};\nexport { format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks };\n"],"names":["token","word","literal","shorten","arr","sLen","newArr","i","len","length","push","substr","monthUpdate","arrName","v","i18n","index","map","toLowerCase","indexOf","assign","origObj","_i","args","args_1","_a","obj","key","dayNames","monthNames","monthNamesShort","defaultI18n","dayNamesShort","amPm","DoFn","dayOfMonth","globalI18n","setGlobalDateI18n","regexEscape","str","replace","pad","val","String","formatFlags","D","dateObj","getDate","DD","Do","d","getDay","dd","ddd","dddd","M","getMonth","MM","MMM","MMMM","YY","getFullYear","YYYY","h","getHours","hh","H","HH","m","getMinutes","mm","s","getSeconds","ss","S","Math","round","getMilliseconds","SS","SSS","a","A","toUpperCase","ZZ","offset","getTimezoneOffset","floor","abs","Z","monthParse","emptyDigits","emptyWord","timezoneOffset","parts","match","minutes","parseInt","parseFlags","cent","Date","undefined","globalMasks","default","shortDate","mediumDate","longDate","fullDate","isoDate","isoDateTime","shortTime","mediumTime","longTime","setGlobalDateMasks","masks","format","mask","Object","prototype","toString","call","isNaN","getTime","Error","literals","$0","$1","combinedI18nSettings","shift","parse","dateStr","dateInfo","year","month","day","hour","minute","second","millisecond","isPm","parseInfo","newFormat","specifiedFields","requiredFields","info","field","regex","requiredField","keys","forEach","matches","RegExp","dateTZ","parser","value","validateFields","UTC"],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/fecha/lib/fecha.d.ts b/general/nvim/node_modules/fecha/lib/fecha.d.ts deleted file mode 100644 index 47404a0..0000000 --- a/general/nvim/node_modules/fecha/lib/fecha.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export declare type I18nSettings = { - amPm: [string, string]; - dayNames: Days; - dayNamesShort: Days; - monthNames: Months; - monthNamesShort: Months; - DoFn(dayOfMonth: number): string; -}; -export declare type I18nSettingsOptional = Partial; -export declare type Days = [string, string, string, string, string, string, string]; -export declare type Months = [string, string, string, string, string, string, string, string, string, string, string, string]; -export declare function assign(a: A): A; -export declare function assign(a: A, b: B): A & B; -export declare function assign(a: A, b: B, c: C): A & B & C; -export declare function assign(a: A, b: B, c: C, d: D): A & B & C & D; -declare const defaultI18n: I18nSettings; -declare const setGlobalDateI18n: (i18n: I18nSettingsOptional) => I18nSettings; -declare const setGlobalDateMasks: (masks: { - [key: string]: string; -}) => { - [key: string]: string; -}; -/*** - * Format a date - * @method format - * @param {Date|number} dateObj - * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate' - * @returns {string} Formatted date string - */ -declare const format: (dateObj: Date, mask?: string, i18n?: I18nSettingsOptional) => string; -/** - * Parse a date string into a Javascript Date object / - * @method parse - * @param {string} dateStr Date string - * @param {string} format Date parse format - * @param {i18n} I18nSettingsOptional Full or subset of I18N settings - * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format - */ -declare function parse(dateStr: string, format: string, i18n?: I18nSettingsOptional): Date | null; -declare const _default: { - format: (dateObj: Date, mask?: string, i18n?: Partial) => string; - parse: typeof parse; - defaultI18n: I18nSettings; - setGlobalDateI18n: (i18n: Partial) => I18nSettings; - setGlobalDateMasks: (masks: { - [key: string]: string; - }) => { - [key: string]: string; - }; -}; -export default _default; -export { format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks }; diff --git a/general/nvim/node_modules/fecha/lib/fecha.js b/general/nvim/node_modules/fecha/lib/fecha.js deleted file mode 100644 index db93109..0000000 --- a/general/nvim/node_modules/fecha/lib/fecha.js +++ /dev/null @@ -1,403 +0,0 @@ -var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g; -var twoDigitsOptional = "\\d\\d?"; -var twoDigits = "\\d\\d"; -var threeDigits = "\\d{3}"; -var fourDigits = "\\d{4}"; -var word = "[^\\s]+"; -var literal = /\[([^]*?)\]/gm; -function shorten(arr, sLen) { - var newArr = []; - for (var i = 0, len = arr.length; i < len; i++) { - newArr.push(arr[i].substr(0, sLen)); - } - return newArr; -} -var monthUpdate = function (arrName) { return function (v, i18n) { - var lowerCaseArr = i18n[arrName].map(function (v) { return v.toLowerCase(); }); - var index = lowerCaseArr.indexOf(v.toLowerCase()); - if (index > -1) { - return index; - } - return null; -}; }; -function assign(origObj) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - for (var _a = 0, args_1 = args; _a < args_1.length; _a++) { - var obj = args_1[_a]; - for (var key in obj) { - // @ts-ignore ex - origObj[key] = obj[key]; - } - } - return origObj; -} -var dayNames = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -]; -var monthNames = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -]; -var monthNamesShort = shorten(monthNames, 3); -var dayNamesShort = shorten(dayNames, 3); -var defaultI18n = { - dayNamesShort: dayNamesShort, - dayNames: dayNames, - monthNamesShort: monthNamesShort, - monthNames: monthNames, - amPm: ["am", "pm"], - DoFn: function (dayOfMonth) { - return (dayOfMonth + - ["th", "st", "nd", "rd"][dayOfMonth % 10 > 3 - ? 0 - : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10]); - } -}; -var globalI18n = assign({}, defaultI18n); -var setGlobalDateI18n = function (i18n) { - return (globalI18n = assign(globalI18n, i18n)); -}; -var regexEscape = function (str) { - return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&"); -}; -var pad = function (val, len) { - if (len === void 0) { len = 2; } - val = String(val); - while (val.length < len) { - val = "0" + val; - } - return val; -}; -var formatFlags = { - D: function (dateObj) { return String(dateObj.getDate()); }, - DD: function (dateObj) { return pad(dateObj.getDate()); }, - Do: function (dateObj, i18n) { - return i18n.DoFn(dateObj.getDate()); - }, - d: function (dateObj) { return String(dateObj.getDay()); }, - dd: function (dateObj) { return pad(dateObj.getDay()); }, - ddd: function (dateObj, i18n) { - return i18n.dayNamesShort[dateObj.getDay()]; - }, - dddd: function (dateObj, i18n) { - return i18n.dayNames[dateObj.getDay()]; - }, - M: function (dateObj) { return String(dateObj.getMonth() + 1); }, - MM: function (dateObj) { return pad(dateObj.getMonth() + 1); }, - MMM: function (dateObj, i18n) { - return i18n.monthNamesShort[dateObj.getMonth()]; - }, - MMMM: function (dateObj, i18n) { - return i18n.monthNames[dateObj.getMonth()]; - }, - YY: function (dateObj) { - return pad(String(dateObj.getFullYear()), 4).substr(2); - }, - YYYY: function (dateObj) { return pad(dateObj.getFullYear(), 4); }, - h: function (dateObj) { return String(dateObj.getHours() % 12 || 12); }, - hh: function (dateObj) { return pad(dateObj.getHours() % 12 || 12); }, - H: function (dateObj) { return String(dateObj.getHours()); }, - HH: function (dateObj) { return pad(dateObj.getHours()); }, - m: function (dateObj) { return String(dateObj.getMinutes()); }, - mm: function (dateObj) { return pad(dateObj.getMinutes()); }, - s: function (dateObj) { return String(dateObj.getSeconds()); }, - ss: function (dateObj) { return pad(dateObj.getSeconds()); }, - S: function (dateObj) { - return String(Math.round(dateObj.getMilliseconds() / 100)); - }, - SS: function (dateObj) { - return pad(Math.round(dateObj.getMilliseconds() / 10), 2); - }, - SSS: function (dateObj) { return pad(dateObj.getMilliseconds(), 3); }, - a: function (dateObj, i18n) { - return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]; - }, - A: function (dateObj, i18n) { - return dateObj.getHours() < 12 - ? i18n.amPm[0].toUpperCase() - : i18n.amPm[1].toUpperCase(); - }, - ZZ: function (dateObj) { - var offset = dateObj.getTimezoneOffset(); - return ((offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4)); - }, - Z: function (dateObj) { - var offset = dateObj.getTimezoneOffset(); - return ((offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60), 2) + - ":" + - pad(Math.abs(offset) % 60, 2)); - } -}; -var monthParse = function (v) { return +v - 1; }; -var emptyDigits = [null, twoDigitsOptional]; -var emptyWord = [null, word]; -var amPm = [ - "isPm", - word, - function (v, i18n) { - var val = v.toLowerCase(); - if (val === i18n.amPm[0]) { - return 0; - } - else if (val === i18n.amPm[1]) { - return 1; - } - return null; - } -]; -var timezoneOffset = [ - "timezoneOffset", - "[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?", - function (v) { - var parts = (v + "").match(/([+-]|\d\d)/gi); - if (parts) { - var minutes = +parts[1] * 60 + parseInt(parts[2], 10); - return parts[0] === "+" ? minutes : -minutes; - } - return 0; - } -]; -var parseFlags = { - D: ["day", twoDigitsOptional], - DD: ["day", twoDigits], - Do: ["day", twoDigitsOptional + word, function (v) { return parseInt(v, 10); }], - M: ["month", twoDigitsOptional, monthParse], - MM: ["month", twoDigits, monthParse], - YY: [ - "year", - twoDigits, - function (v) { - var now = new Date(); - var cent = +("" + now.getFullYear()).substr(0, 2); - return +("" + (+v > 68 ? cent - 1 : cent) + v); - } - ], - h: ["hour", twoDigitsOptional, undefined, "isPm"], - hh: ["hour", twoDigits, undefined, "isPm"], - H: ["hour", twoDigitsOptional], - HH: ["hour", twoDigits], - m: ["minute", twoDigitsOptional], - mm: ["minute", twoDigits], - s: ["second", twoDigitsOptional], - ss: ["second", twoDigits], - YYYY: ["year", fourDigits], - S: ["millisecond", "\\d", function (v) { return +v * 100; }], - SS: ["millisecond", twoDigits, function (v) { return +v * 10; }], - SSS: ["millisecond", threeDigits], - d: emptyDigits, - dd: emptyDigits, - ddd: emptyWord, - dddd: emptyWord, - MMM: ["month", word, monthUpdate("monthNamesShort")], - MMMM: ["month", word, monthUpdate("monthNames")], - a: amPm, - A: amPm, - ZZ: timezoneOffset, - Z: timezoneOffset -}; -// Some common format strings -var globalMasks = { - default: "ddd MMM DD YYYY HH:mm:ss", - shortDate: "M/D/YY", - mediumDate: "MMM D, YYYY", - longDate: "MMMM D, YYYY", - fullDate: "dddd, MMMM D, YYYY", - isoDate: "YYYY-MM-DD", - isoDateTime: "YYYY-MM-DDTHH:mm:ssZ", - shortTime: "HH:mm", - mediumTime: "HH:mm:ss", - longTime: "HH:mm:ss.SSS" -}; -var setGlobalDateMasks = function (masks) { return assign(globalMasks, masks); }; -/*** - * Format a date - * @method format - * @param {Date|number} dateObj - * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate' - * @returns {string} Formatted date string - */ -var format = function (dateObj, mask, i18n) { - if (mask === void 0) { mask = globalMasks["default"]; } - if (i18n === void 0) { i18n = {}; } - if (typeof dateObj === "number") { - dateObj = new Date(dateObj); - } - if (Object.prototype.toString.call(dateObj) !== "[object Date]" || - isNaN(dateObj.getTime())) { - throw new Error("Invalid Date pass to format"); - } - mask = globalMasks[mask] || mask; - var literals = []; - // Make literals inactive by replacing them with @@@ - mask = mask.replace(literal, function ($0, $1) { - literals.push($1); - return "@@@"; - }); - var combinedI18nSettings = assign(assign({}, globalI18n), i18n); - // Apply formatting rules - mask = mask.replace(token, function ($0) { - return formatFlags[$0](dateObj, combinedI18nSettings); - }); - // Inline literal values back into the formatted value - return mask.replace(/@@@/g, function () { return literals.shift(); }); -}; -/** - * Parse a date string into a Javascript Date object / - * @method parse - * @param {string} dateStr Date string - * @param {string} format Date parse format - * @param {i18n} I18nSettingsOptional Full or subset of I18N settings - * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format - */ -function parse(dateStr, format, i18n) { - if (i18n === void 0) { i18n = {}; } - if (typeof format !== "string") { - throw new Error("Invalid format in fecha parse"); - } - // Check to see if the format is actually a mask - format = globalMasks[format] || format; - // Avoid regular expression denial of service, fail early for really long strings - // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS - if (dateStr.length > 1000) { - return null; - } - // Default to the beginning of the year. - var today = new Date(); - var dateInfo = { - year: today.getFullYear(), - month: 0, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0, - isPm: null, - timezoneOffset: null - }; - var parseInfo = []; - var literals = []; - // Replace all the literals with @@@. Hopefully a string that won't exist in the format - var newFormat = format.replace(literal, function ($0, $1) { - literals.push(regexEscape($1)); - return "@@@"; - }); - var specifiedFields = {}; - var requiredFields = {}; - // Change every token that we find into the correct regex - newFormat = regexEscape(newFormat).replace(token, function ($0) { - var info = parseFlags[$0]; - var field = info[0], regex = info[1], requiredField = info[3]; - // Check if the person has specified the same field twice. This will lead to confusing results. - if (specifiedFields[field]) { - throw new Error("Invalid format. " + field + " specified twice in format"); - } - specifiedFields[field] = true; - // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified - if (requiredField) { - requiredFields[requiredField] = true; - } - parseInfo.push(info); - return "(" + regex + ")"; - }); - // Check all the required fields are present - Object.keys(requiredFields).forEach(function (field) { - if (!specifiedFields[field]) { - throw new Error("Invalid format. " + field + " is required in specified format"); - } - }); - // Add back all the literals after - newFormat = newFormat.replace(/@@@/g, function () { return literals.shift(); }); - // Check if the date string matches the format. If it doesn't return null - var matches = dateStr.match(new RegExp(newFormat, "i")); - if (!matches) { - return null; - } - var combinedI18nSettings = assign(assign({}, globalI18n), i18n); - // For each match, call the parser function for that date part - for (var i = 1; i < matches.length; i++) { - var _a = parseInfo[i - 1], field = _a[0], parser = _a[2]; - var value = parser - ? parser(matches[i], combinedI18nSettings) - : +matches[i]; - // If the parser can't make sense of the value, return null - if (value == null) { - return null; - } - dateInfo[field] = value; - } - if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) { - dateInfo.hour = +dateInfo.hour + 12; - } - else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) { - dateInfo.hour = 0; - } - var dateTZ; - if (dateInfo.timezoneOffset == null) { - dateTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond); - var validateFields = [ - ["month", "getMonth"], - ["day", "getDate"], - ["hour", "getHours"], - ["minute", "getMinutes"], - ["second", "getSeconds"] - ]; - for (var i = 0, len = validateFields.length; i < len; i++) { - // Check to make sure the date field is within the allowed range. Javascript dates allows values - // outside the allowed range. If the values don't match the value was invalid - if (specifiedFields[validateFields[i][0]] && - dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()) { - return null; - } - } - } - else { - dateTZ = new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond)); - // We can't validate dates in another timezone unfortunately. Do a basic check instead - if (dateInfo.month > 11 || - dateInfo.month < 0 || - dateInfo.day > 31 || - dateInfo.day < 1 || - dateInfo.hour > 23 || - dateInfo.hour < 0 || - dateInfo.minute > 59 || - dateInfo.minute < 0 || - dateInfo.second > 59 || - dateInfo.second < 0) { - return null; - } - } - // Don't allow invalid dates - return dateTZ; -} -var fecha = { - format: format, - parse: parse, - defaultI18n: defaultI18n, - setGlobalDateI18n: setGlobalDateI18n, - setGlobalDateMasks: setGlobalDateMasks -}; - -export default fecha; -export { assign, format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks }; -//# sourceMappingURL=fecha.js.map diff --git a/general/nvim/node_modules/fecha/lib/fecha.js.map b/general/nvim/node_modules/fecha/lib/fecha.js.map deleted file mode 100644 index d61aa71..0000000 --- a/general/nvim/node_modules/fecha/lib/fecha.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fecha.js","sources":["../src/fecha.ts"],"sourcesContent":["const token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\nconst twoDigitsOptional = \"\\\\d\\\\d?\";\nconst twoDigits = \"\\\\d\\\\d\";\nconst threeDigits = \"\\\\d{3}\";\nconst fourDigits = \"\\\\d{4}\";\nconst word = \"[^\\\\s]+\";\nconst literal = /\\[([^]*?)\\]/gm;\n\ntype DateInfo = {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n millisecond: number;\n isPm: number | null;\n timezoneOffset: number | null;\n};\n\nexport type I18nSettings = {\n amPm: [string, string];\n dayNames: Days;\n dayNamesShort: Days;\n monthNames: Months;\n monthNamesShort: Months;\n DoFn(dayOfMonth: number): string;\n};\n\nexport type I18nSettingsOptional = Partial;\n\nexport type Days = [string, string, string, string, string, string, string];\nexport type Months = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string\n];\n\nfunction shorten(arr: T, sLen: number): string[] {\n const newArr: string[] = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n newArr.push(arr[i].substr(0, sLen));\n }\n return newArr;\n}\n\nconst monthUpdate = (\n arrName: \"monthNames\" | \"monthNamesShort\" | \"dayNames\" | \"dayNamesShort\"\n) => (v: string, i18n: I18nSettings): number | null => {\n const lowerCaseArr = i18n[arrName].map(v => v.toLowerCase());\n const index = lowerCaseArr.indexOf(v.toLowerCase());\n if (index > -1) {\n return index;\n }\n return null;\n};\n\nexport function assign(a: A): A;\nexport function assign(a: A, b: B): A & B;\nexport function assign(a: A, b: B, c: C): A & B & C;\nexport function assign(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function assign(origObj: any, ...args: any[]): any {\n for (const obj of args) {\n for (const key in obj) {\n // @ts-ignore ex\n origObj[key] = obj[key];\n }\n }\n return origObj;\n}\n\nconst dayNames: Days = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\nconst monthNames: Months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nconst monthNamesShort: Months = shorten(monthNames, 3) as Months;\nconst dayNamesShort: Days = shorten(dayNames, 3) as Days;\n\nconst defaultI18n: I18nSettings = {\n dayNamesShort,\n dayNames,\n monthNamesShort,\n monthNames,\n amPm: [\"am\", \"pm\"],\n DoFn(dayOfMonth: number) {\n return (\n dayOfMonth +\n [\"th\", \"st\", \"nd\", \"rd\"][\n dayOfMonth % 10 > 3\n ? 0\n : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10\n ]\n );\n }\n};\nlet globalI18n = assign({}, defaultI18n);\nconst setGlobalDateI18n = (i18n: I18nSettingsOptional): I18nSettings =>\n (globalI18n = assign(globalI18n, i18n));\n\nconst regexEscape = (str: string): string =>\n str.replace(/[|\\\\{()[^$+*?.-]/g, \"\\\\$&\");\n\nconst pad = (val: string | number, len = 2): string => {\n val = String(val);\n while (val.length < len) {\n val = \"0\" + val;\n }\n return val;\n};\n\nconst formatFlags: Record<\n string,\n (dateObj: Date, i18n: I18nSettings) => string\n> = {\n D: (dateObj: Date): string => String(dateObj.getDate()),\n DD: (dateObj: Date): string => pad(dateObj.getDate()),\n Do: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.DoFn(dateObj.getDate()),\n d: (dateObj: Date): string => String(dateObj.getDay()),\n dd: (dateObj: Date): string => pad(dateObj.getDay()),\n ddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNamesShort[dateObj.getDay()],\n dddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNames[dateObj.getDay()],\n M: (dateObj: Date): string => String(dateObj.getMonth() + 1),\n MM: (dateObj: Date): string => pad(dateObj.getMonth() + 1),\n MMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNamesShort[dateObj.getMonth()],\n MMMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNames[dateObj.getMonth()],\n YY: (dateObj: Date): string =>\n pad(String(dateObj.getFullYear()), 4).substr(2),\n YYYY: (dateObj: Date): string => pad(dateObj.getFullYear(), 4),\n h: (dateObj: Date): string => String(dateObj.getHours() % 12 || 12),\n hh: (dateObj: Date): string => pad(dateObj.getHours() % 12 || 12),\n H: (dateObj: Date): string => String(dateObj.getHours()),\n HH: (dateObj: Date): string => pad(dateObj.getHours()),\n m: (dateObj: Date): string => String(dateObj.getMinutes()),\n mm: (dateObj: Date): string => pad(dateObj.getMinutes()),\n s: (dateObj: Date): string => String(dateObj.getSeconds()),\n ss: (dateObj: Date): string => pad(dateObj.getSeconds()),\n S: (dateObj: Date): string =>\n String(Math.round(dateObj.getMilliseconds() / 100)),\n SS: (dateObj: Date): string =>\n pad(Math.round(dateObj.getMilliseconds() / 10), 2),\n SSS: (dateObj: Date): string => pad(dateObj.getMilliseconds(), 3),\n a: (dateObj: Date, i18n: I18nSettings): string =>\n dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1],\n A: (dateObj: Date, i18n: I18nSettings): string =>\n dateObj.getHours() < 12\n ? i18n.amPm[0].toUpperCase()\n : i18n.amPm[1].toUpperCase(),\n ZZ(dateObj: Date): string {\n const offset = dateObj.getTimezoneOffset();\n return (\n (offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4)\n );\n },\n Z(dateObj: Date): string {\n const offset = dateObj.getTimezoneOffset();\n return (\n (offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60), 2) +\n \":\" +\n pad(Math.abs(offset) % 60, 2)\n );\n }\n};\n\ntype ParseInfo = [\n keyof DateInfo,\n string,\n ((v: string, i18n: I18nSettings) => number | null)?,\n string?\n];\nconst monthParse = (v: string): number => +v - 1;\nconst emptyDigits: ParseInfo = [null, twoDigitsOptional];\nconst emptyWord: ParseInfo = [null, word];\nconst amPm: ParseInfo = [\n \"isPm\",\n word,\n (v: string, i18n: I18nSettings): number | null => {\n const val = v.toLowerCase();\n if (val === i18n.amPm[0]) {\n return 0;\n } else if (val === i18n.amPm[1]) {\n return 1;\n }\n return null;\n }\n];\nconst timezoneOffset: ParseInfo = [\n \"timezoneOffset\",\n \"[^\\\\s]*?[\\\\+\\\\-]\\\\d\\\\d:?\\\\d\\\\d|[^\\\\s]*?Z?\",\n (v: string): number | null => {\n const parts = (v + \"\").match(/([+-]|\\d\\d)/gi);\n\n if (parts) {\n const minutes = +parts[1] * 60 + parseInt(parts[2], 10);\n return parts[0] === \"+\" ? minutes : -minutes;\n }\n\n return 0;\n }\n];\nconst parseFlags: Record = {\n D: [\"day\", twoDigitsOptional],\n DD: [\"day\", twoDigits],\n Do: [\"day\", twoDigitsOptional + word, (v: string): number => parseInt(v, 10)],\n M: [\"month\", twoDigitsOptional, monthParse],\n MM: [\"month\", twoDigits, monthParse],\n YY: [\n \"year\",\n twoDigits,\n (v: string): number => {\n const now = new Date();\n const cent = +(\"\" + now.getFullYear()).substr(0, 2);\n return +(\"\" + (+v > 68 ? cent - 1 : cent) + v);\n }\n ],\n h: [\"hour\", twoDigitsOptional, undefined, \"isPm\"],\n hh: [\"hour\", twoDigits, undefined, \"isPm\"],\n H: [\"hour\", twoDigitsOptional],\n HH: [\"hour\", twoDigits],\n m: [\"minute\", twoDigitsOptional],\n mm: [\"minute\", twoDigits],\n s: [\"second\", twoDigitsOptional],\n ss: [\"second\", twoDigits],\n YYYY: [\"year\", fourDigits],\n S: [\"millisecond\", \"\\\\d\", (v: string): number => +v * 100],\n SS: [\"millisecond\", twoDigits, (v: string): number => +v * 10],\n SSS: [\"millisecond\", threeDigits],\n d: emptyDigits,\n dd: emptyDigits,\n ddd: emptyWord,\n dddd: emptyWord,\n MMM: [\"month\", word, monthUpdate(\"monthNamesShort\")],\n MMMM: [\"month\", word, monthUpdate(\"monthNames\")],\n a: amPm,\n A: amPm,\n ZZ: timezoneOffset,\n Z: timezoneOffset\n};\n\n// Some common format strings\nconst globalMasks: { [key: string]: string } = {\n default: \"ddd MMM DD YYYY HH:mm:ss\",\n shortDate: \"M/D/YY\",\n mediumDate: \"MMM D, YYYY\",\n longDate: \"MMMM D, YYYY\",\n fullDate: \"dddd, MMMM D, YYYY\",\n isoDate: \"YYYY-MM-DD\",\n isoDateTime: \"YYYY-MM-DDTHH:mm:ssZ\",\n shortTime: \"HH:mm\",\n mediumTime: \"HH:mm:ss\",\n longTime: \"HH:mm:ss.SSS\"\n};\nconst setGlobalDateMasks = (masks: {\n [key: string]: string;\n}): { [key: string]: string } => assign(globalMasks, masks);\n\n/***\n * Format a date\n * @method format\n * @param {Date|number} dateObj\n * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'\n * @returns {string} Formatted date string\n */\nconst format = (\n dateObj: Date,\n mask: string = globalMasks[\"default\"],\n i18n: I18nSettingsOptional = {}\n): string => {\n if (typeof dateObj === \"number\") {\n dateObj = new Date(dateObj);\n }\n\n if (\n Object.prototype.toString.call(dateObj) !== \"[object Date]\" ||\n isNaN(dateObj.getTime())\n ) {\n throw new Error(\"Invalid Date pass to format\");\n }\n\n mask = globalMasks[mask] || mask;\n\n const literals: string[] = [];\n\n // Make literals inactive by replacing them with @@@\n mask = mask.replace(literal, function($0, $1) {\n literals.push($1);\n return \"@@@\";\n });\n\n const combinedI18nSettings: I18nSettings = assign(\n assign({}, globalI18n),\n i18n\n );\n // Apply formatting rules\n mask = mask.replace(token, $0 =>\n formatFlags[$0](dateObj, combinedI18nSettings)\n );\n // Inline literal values back into the formatted value\n return mask.replace(/@@@/g, () => literals.shift());\n};\n\n/**\n * Parse a date string into a Javascript Date object /\n * @method parse\n * @param {string} dateStr Date string\n * @param {string} format Date parse format\n * @param {i18n} I18nSettingsOptional Full or subset of I18N settings\n * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format\n */\nfunction parse(\n dateStr: string,\n format: string,\n i18n: I18nSettingsOptional = {}\n): Date | null {\n if (typeof format !== \"string\") {\n throw new Error(\"Invalid format in fecha parse\");\n }\n\n // Check to see if the format is actually a mask\n format = globalMasks[format] || format;\n\n // Avoid regular expression denial of service, fail early for really long strings\n // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS\n if (dateStr.length > 1000) {\n return null;\n }\n\n // Default to the beginning of the year.\n const today = new Date();\n const dateInfo: DateInfo = {\n year: today.getFullYear(),\n month: 0,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n isPm: null,\n timezoneOffset: null\n };\n const parseInfo: ParseInfo[] = [];\n const literals: string[] = [];\n\n // Replace all the literals with @@@. Hopefully a string that won't exist in the format\n let newFormat = format.replace(literal, ($0, $1) => {\n literals.push(regexEscape($1));\n return \"@@@\";\n });\n const specifiedFields: { [field: string]: boolean } = {};\n const requiredFields: { [field: string]: boolean } = {};\n\n // Change every token that we find into the correct regex\n newFormat = regexEscape(newFormat).replace(token, $0 => {\n const info = parseFlags[$0];\n const [field, regex, , requiredField] = info;\n\n // Check if the person has specified the same field twice. This will lead to confusing results.\n if (specifiedFields[field]) {\n throw new Error(`Invalid format. ${field} specified twice in format`);\n }\n\n specifiedFields[field] = true;\n\n // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified\n if (requiredField) {\n requiredFields[requiredField] = true;\n }\n\n parseInfo.push(info);\n return \"(\" + regex + \")\";\n });\n\n // Check all the required fields are present\n Object.keys(requiredFields).forEach(field => {\n if (!specifiedFields[field]) {\n throw new Error(\n `Invalid format. ${field} is required in specified format`\n );\n }\n });\n\n // Add back all the literals after\n newFormat = newFormat.replace(/@@@/g, () => literals.shift());\n\n // Check if the date string matches the format. If it doesn't return null\n const matches = dateStr.match(new RegExp(newFormat, \"i\"));\n if (!matches) {\n return null;\n }\n\n const combinedI18nSettings: I18nSettings = assign(\n assign({}, globalI18n),\n i18n\n );\n\n // For each match, call the parser function for that date part\n for (let i = 1; i < matches.length; i++) {\n const [field, , parser] = parseInfo[i - 1];\n const value = parser\n ? parser(matches[i], combinedI18nSettings)\n : +matches[i];\n\n // If the parser can't make sense of the value, return null\n if (value == null) {\n return null;\n }\n\n dateInfo[field] = value;\n }\n\n if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) {\n dateInfo.hour = +dateInfo.hour + 12;\n } else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) {\n dateInfo.hour = 0;\n }\n\n let dateTZ: Date;\n if (dateInfo.timezoneOffset == null) {\n dateTZ = new Date(\n dateInfo.year,\n dateInfo.month,\n dateInfo.day,\n dateInfo.hour,\n dateInfo.minute,\n dateInfo.second,\n dateInfo.millisecond\n );\n const validateFields: [\n \"month\" | \"day\" | \"hour\" | \"minute\" | \"second\",\n \"getMonth\" | \"getDate\" | \"getHours\" | \"getMinutes\" | \"getSeconds\"\n ][] = [\n [\"month\", \"getMonth\"],\n [\"day\", \"getDate\"],\n [\"hour\", \"getHours\"],\n [\"minute\", \"getMinutes\"],\n [\"second\", \"getSeconds\"]\n ];\n for (let i = 0, len = validateFields.length; i < len; i++) {\n // Check to make sure the date field is within the allowed range. Javascript dates allows values\n // outside the allowed range. If the values don't match the value was invalid\n if (\n specifiedFields[validateFields[i][0]] &&\n dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()\n ) {\n return null;\n }\n }\n } else {\n dateTZ = new Date(\n Date.UTC(\n dateInfo.year,\n dateInfo.month,\n dateInfo.day,\n dateInfo.hour,\n dateInfo.minute - dateInfo.timezoneOffset,\n dateInfo.second,\n dateInfo.millisecond\n )\n );\n\n // We can't validate dates in another timezone unfortunately. Do a basic check instead\n if (\n dateInfo.month > 11 ||\n dateInfo.month < 0 ||\n dateInfo.day > 31 ||\n dateInfo.day < 1 ||\n dateInfo.hour > 23 ||\n dateInfo.hour < 0 ||\n dateInfo.minute > 59 ||\n dateInfo.minute < 0 ||\n dateInfo.second > 59 ||\n dateInfo.second < 0\n ) {\n return null;\n }\n }\n\n // Don't allow invalid dates\n\n return dateTZ;\n}\nexport default {\n format,\n parse,\n defaultI18n,\n setGlobalDateI18n,\n setGlobalDateMasks\n};\nexport { format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks };\n"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/general/nvim/node_modules/fecha/lib/fecha.umd.js b/general/nvim/node_modules/fecha/lib/fecha.umd.js deleted file mode 100644 index b61a0f6..0000000 --- a/general/nvim/node_modules/fecha/lib/fecha.umd.js +++ /dev/null @@ -1,418 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.fecha = {}))); -}(this, (function (exports) { 'use strict'; - - var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g; - var twoDigitsOptional = "\\d\\d?"; - var twoDigits = "\\d\\d"; - var threeDigits = "\\d{3}"; - var fourDigits = "\\d{4}"; - var word = "[^\\s]+"; - var literal = /\[([^]*?)\]/gm; - function shorten(arr, sLen) { - var newArr = []; - for (var i = 0, len = arr.length; i < len; i++) { - newArr.push(arr[i].substr(0, sLen)); - } - return newArr; - } - var monthUpdate = function (arrName) { return function (v, i18n) { - var lowerCaseArr = i18n[arrName].map(function (v) { return v.toLowerCase(); }); - var index = lowerCaseArr.indexOf(v.toLowerCase()); - if (index > -1) { - return index; - } - return null; - }; }; - function assign(origObj) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - for (var _a = 0, args_1 = args; _a < args_1.length; _a++) { - var obj = args_1[_a]; - for (var key in obj) { - // @ts-ignore ex - origObj[key] = obj[key]; - } - } - return origObj; - } - var dayNames = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ]; - var monthNames = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ]; - var monthNamesShort = shorten(monthNames, 3); - var dayNamesShort = shorten(dayNames, 3); - var defaultI18n = { - dayNamesShort: dayNamesShort, - dayNames: dayNames, - monthNamesShort: monthNamesShort, - monthNames: monthNames, - amPm: ["am", "pm"], - DoFn: function (dayOfMonth) { - return (dayOfMonth + - ["th", "st", "nd", "rd"][dayOfMonth % 10 > 3 - ? 0 - : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10]); - } - }; - var globalI18n = assign({}, defaultI18n); - var setGlobalDateI18n = function (i18n) { - return (globalI18n = assign(globalI18n, i18n)); - }; - var regexEscape = function (str) { - return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&"); - }; - var pad = function (val, len) { - if (len === void 0) { len = 2; } - val = String(val); - while (val.length < len) { - val = "0" + val; - } - return val; - }; - var formatFlags = { - D: function (dateObj) { return String(dateObj.getDate()); }, - DD: function (dateObj) { return pad(dateObj.getDate()); }, - Do: function (dateObj, i18n) { - return i18n.DoFn(dateObj.getDate()); - }, - d: function (dateObj) { return String(dateObj.getDay()); }, - dd: function (dateObj) { return pad(dateObj.getDay()); }, - ddd: function (dateObj, i18n) { - return i18n.dayNamesShort[dateObj.getDay()]; - }, - dddd: function (dateObj, i18n) { - return i18n.dayNames[dateObj.getDay()]; - }, - M: function (dateObj) { return String(dateObj.getMonth() + 1); }, - MM: function (dateObj) { return pad(dateObj.getMonth() + 1); }, - MMM: function (dateObj, i18n) { - return i18n.monthNamesShort[dateObj.getMonth()]; - }, - MMMM: function (dateObj, i18n) { - return i18n.monthNames[dateObj.getMonth()]; - }, - YY: function (dateObj) { - return pad(String(dateObj.getFullYear()), 4).substr(2); - }, - YYYY: function (dateObj) { return pad(dateObj.getFullYear(), 4); }, - h: function (dateObj) { return String(dateObj.getHours() % 12 || 12); }, - hh: function (dateObj) { return pad(dateObj.getHours() % 12 || 12); }, - H: function (dateObj) { return String(dateObj.getHours()); }, - HH: function (dateObj) { return pad(dateObj.getHours()); }, - m: function (dateObj) { return String(dateObj.getMinutes()); }, - mm: function (dateObj) { return pad(dateObj.getMinutes()); }, - s: function (dateObj) { return String(dateObj.getSeconds()); }, - ss: function (dateObj) { return pad(dateObj.getSeconds()); }, - S: function (dateObj) { - return String(Math.round(dateObj.getMilliseconds() / 100)); - }, - SS: function (dateObj) { - return pad(Math.round(dateObj.getMilliseconds() / 10), 2); - }, - SSS: function (dateObj) { return pad(dateObj.getMilliseconds(), 3); }, - a: function (dateObj, i18n) { - return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]; - }, - A: function (dateObj, i18n) { - return dateObj.getHours() < 12 - ? i18n.amPm[0].toUpperCase() - : i18n.amPm[1].toUpperCase(); - }, - ZZ: function (dateObj) { - var offset = dateObj.getTimezoneOffset(); - return ((offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4)); - }, - Z: function (dateObj) { - var offset = dateObj.getTimezoneOffset(); - return ((offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60), 2) + - ":" + - pad(Math.abs(offset) % 60, 2)); - } - }; - var monthParse = function (v) { return +v - 1; }; - var emptyDigits = [null, twoDigitsOptional]; - var emptyWord = [null, word]; - var amPm = [ - "isPm", - word, - function (v, i18n) { - var val = v.toLowerCase(); - if (val === i18n.amPm[0]) { - return 0; - } - else if (val === i18n.amPm[1]) { - return 1; - } - return null; - } - ]; - var timezoneOffset = [ - "timezoneOffset", - "[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?", - function (v) { - var parts = (v + "").match(/([+-]|\d\d)/gi); - if (parts) { - var minutes = +parts[1] * 60 + parseInt(parts[2], 10); - return parts[0] === "+" ? minutes : -minutes; - } - return 0; - } - ]; - var parseFlags = { - D: ["day", twoDigitsOptional], - DD: ["day", twoDigits], - Do: ["day", twoDigitsOptional + word, function (v) { return parseInt(v, 10); }], - M: ["month", twoDigitsOptional, monthParse], - MM: ["month", twoDigits, monthParse], - YY: [ - "year", - twoDigits, - function (v) { - var now = new Date(); - var cent = +("" + now.getFullYear()).substr(0, 2); - return +("" + (+v > 68 ? cent - 1 : cent) + v); - } - ], - h: ["hour", twoDigitsOptional, undefined, "isPm"], - hh: ["hour", twoDigits, undefined, "isPm"], - H: ["hour", twoDigitsOptional], - HH: ["hour", twoDigits], - m: ["minute", twoDigitsOptional], - mm: ["minute", twoDigits], - s: ["second", twoDigitsOptional], - ss: ["second", twoDigits], - YYYY: ["year", fourDigits], - S: ["millisecond", "\\d", function (v) { return +v * 100; }], - SS: ["millisecond", twoDigits, function (v) { return +v * 10; }], - SSS: ["millisecond", threeDigits], - d: emptyDigits, - dd: emptyDigits, - ddd: emptyWord, - dddd: emptyWord, - MMM: ["month", word, monthUpdate("monthNamesShort")], - MMMM: ["month", word, monthUpdate("monthNames")], - a: amPm, - A: amPm, - ZZ: timezoneOffset, - Z: timezoneOffset - }; - // Some common format strings - var globalMasks = { - default: "ddd MMM DD YYYY HH:mm:ss", - shortDate: "M/D/YY", - mediumDate: "MMM D, YYYY", - longDate: "MMMM D, YYYY", - fullDate: "dddd, MMMM D, YYYY", - isoDate: "YYYY-MM-DD", - isoDateTime: "YYYY-MM-DDTHH:mm:ssZ", - shortTime: "HH:mm", - mediumTime: "HH:mm:ss", - longTime: "HH:mm:ss.SSS" - }; - var setGlobalDateMasks = function (masks) { return assign(globalMasks, masks); }; - /*** - * Format a date - * @method format - * @param {Date|number} dateObj - * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate' - * @returns {string} Formatted date string - */ - var format = function (dateObj, mask, i18n) { - if (mask === void 0) { mask = globalMasks["default"]; } - if (i18n === void 0) { i18n = {}; } - if (typeof dateObj === "number") { - dateObj = new Date(dateObj); - } - if (Object.prototype.toString.call(dateObj) !== "[object Date]" || - isNaN(dateObj.getTime())) { - throw new Error("Invalid Date pass to format"); - } - mask = globalMasks[mask] || mask; - var literals = []; - // Make literals inactive by replacing them with @@@ - mask = mask.replace(literal, function ($0, $1) { - literals.push($1); - return "@@@"; - }); - var combinedI18nSettings = assign(assign({}, globalI18n), i18n); - // Apply formatting rules - mask = mask.replace(token, function ($0) { - return formatFlags[$0](dateObj, combinedI18nSettings); - }); - // Inline literal values back into the formatted value - return mask.replace(/@@@/g, function () { return literals.shift(); }); - }; - /** - * Parse a date string into a Javascript Date object / - * @method parse - * @param {string} dateStr Date string - * @param {string} format Date parse format - * @param {i18n} I18nSettingsOptional Full or subset of I18N settings - * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format - */ - function parse(dateStr, format, i18n) { - if (i18n === void 0) { i18n = {}; } - if (typeof format !== "string") { - throw new Error("Invalid format in fecha parse"); - } - // Check to see if the format is actually a mask - format = globalMasks[format] || format; - // Avoid regular expression denial of service, fail early for really long strings - // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS - if (dateStr.length > 1000) { - return null; - } - // Default to the beginning of the year. - var today = new Date(); - var dateInfo = { - year: today.getFullYear(), - month: 0, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0, - isPm: null, - timezoneOffset: null - }; - var parseInfo = []; - var literals = []; - // Replace all the literals with @@@. Hopefully a string that won't exist in the format - var newFormat = format.replace(literal, function ($0, $1) { - literals.push(regexEscape($1)); - return "@@@"; - }); - var specifiedFields = {}; - var requiredFields = {}; - // Change every token that we find into the correct regex - newFormat = regexEscape(newFormat).replace(token, function ($0) { - var info = parseFlags[$0]; - var field = info[0], regex = info[1], requiredField = info[3]; - // Check if the person has specified the same field twice. This will lead to confusing results. - if (specifiedFields[field]) { - throw new Error("Invalid format. " + field + " specified twice in format"); - } - specifiedFields[field] = true; - // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified - if (requiredField) { - requiredFields[requiredField] = true; - } - parseInfo.push(info); - return "(" + regex + ")"; - }); - // Check all the required fields are present - Object.keys(requiredFields).forEach(function (field) { - if (!specifiedFields[field]) { - throw new Error("Invalid format. " + field + " is required in specified format"); - } - }); - // Add back all the literals after - newFormat = newFormat.replace(/@@@/g, function () { return literals.shift(); }); - // Check if the date string matches the format. If it doesn't return null - var matches = dateStr.match(new RegExp(newFormat, "i")); - if (!matches) { - return null; - } - var combinedI18nSettings = assign(assign({}, globalI18n), i18n); - // For each match, call the parser function for that date part - for (var i = 1; i < matches.length; i++) { - var _a = parseInfo[i - 1], field = _a[0], parser = _a[2]; - var value = parser - ? parser(matches[i], combinedI18nSettings) - : +matches[i]; - // If the parser can't make sense of the value, return null - if (value == null) { - return null; - } - dateInfo[field] = value; - } - if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) { - dateInfo.hour = +dateInfo.hour + 12; - } - else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) { - dateInfo.hour = 0; - } - var dateTZ; - if (dateInfo.timezoneOffset == null) { - dateTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond); - var validateFields = [ - ["month", "getMonth"], - ["day", "getDate"], - ["hour", "getHours"], - ["minute", "getMinutes"], - ["second", "getSeconds"] - ]; - for (var i = 0, len = validateFields.length; i < len; i++) { - // Check to make sure the date field is within the allowed range. Javascript dates allows values - // outside the allowed range. If the values don't match the value was invalid - if (specifiedFields[validateFields[i][0]] && - dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()) { - return null; - } - } - } - else { - dateTZ = new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond)); - // We can't validate dates in another timezone unfortunately. Do a basic check instead - if (dateInfo.month > 11 || - dateInfo.month < 0 || - dateInfo.day > 31 || - dateInfo.day < 1 || - dateInfo.hour > 23 || - dateInfo.hour < 0 || - dateInfo.minute > 59 || - dateInfo.minute < 0 || - dateInfo.second > 59 || - dateInfo.second < 0) { - return null; - } - } - // Don't allow invalid dates - return dateTZ; - } - var fecha = { - format: format, - parse: parse, - defaultI18n: defaultI18n, - setGlobalDateI18n: setGlobalDateI18n, - setGlobalDateMasks: setGlobalDateMasks - }; - - exports.assign = assign; - exports.default = fecha; - exports.format = format; - exports.parse = parse; - exports.defaultI18n = defaultI18n; - exports.setGlobalDateI18n = setGlobalDateI18n; - exports.setGlobalDateMasks = setGlobalDateMasks; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=fecha.umd.js.map diff --git a/general/nvim/node_modules/fecha/lib/fecha.umd.js.map b/general/nvim/node_modules/fecha/lib/fecha.umd.js.map deleted file mode 100644 index 850634b..0000000 --- a/general/nvim/node_modules/fecha/lib/fecha.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fecha.umd.js","sources":["../src/fecha.ts"],"sourcesContent":["const token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\nconst twoDigitsOptional = \"\\\\d\\\\d?\";\nconst twoDigits = \"\\\\d\\\\d\";\nconst threeDigits = \"\\\\d{3}\";\nconst fourDigits = \"\\\\d{4}\";\nconst word = \"[^\\\\s]+\";\nconst literal = /\\[([^]*?)\\]/gm;\n\ntype DateInfo = {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n millisecond: number;\n isPm: number | null;\n timezoneOffset: number | null;\n};\n\nexport type I18nSettings = {\n amPm: [string, string];\n dayNames: Days;\n dayNamesShort: Days;\n monthNames: Months;\n monthNamesShort: Months;\n DoFn(dayOfMonth: number): string;\n};\n\nexport type I18nSettingsOptional = Partial;\n\nexport type Days = [string, string, string, string, string, string, string];\nexport type Months = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string\n];\n\nfunction shorten(arr: T, sLen: number): string[] {\n const newArr: string[] = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n newArr.push(arr[i].substr(0, sLen));\n }\n return newArr;\n}\n\nconst monthUpdate = (\n arrName: \"monthNames\" | \"monthNamesShort\" | \"dayNames\" | \"dayNamesShort\"\n) => (v: string, i18n: I18nSettings): number | null => {\n const lowerCaseArr = i18n[arrName].map(v => v.toLowerCase());\n const index = lowerCaseArr.indexOf(v.toLowerCase());\n if (index > -1) {\n return index;\n }\n return null;\n};\n\nexport function assign(a: A): A;\nexport function assign(a: A, b: B): A & B;\nexport function assign(a: A, b: B, c: C): A & B & C;\nexport function assign(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function assign(origObj: any, ...args: any[]): any {\n for (const obj of args) {\n for (const key in obj) {\n // @ts-ignore ex\n origObj[key] = obj[key];\n }\n }\n return origObj;\n}\n\nconst dayNames: Days = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\nconst monthNames: Months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nconst monthNamesShort: Months = shorten(monthNames, 3) as Months;\nconst dayNamesShort: Days = shorten(dayNames, 3) as Days;\n\nconst defaultI18n: I18nSettings = {\n dayNamesShort,\n dayNames,\n monthNamesShort,\n monthNames,\n amPm: [\"am\", \"pm\"],\n DoFn(dayOfMonth: number) {\n return (\n dayOfMonth +\n [\"th\", \"st\", \"nd\", \"rd\"][\n dayOfMonth % 10 > 3\n ? 0\n : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10\n ]\n );\n }\n};\nlet globalI18n = assign({}, defaultI18n);\nconst setGlobalDateI18n = (i18n: I18nSettingsOptional): I18nSettings =>\n (globalI18n = assign(globalI18n, i18n));\n\nconst regexEscape = (str: string): string =>\n str.replace(/[|\\\\{()[^$+*?.-]/g, \"\\\\$&\");\n\nconst pad = (val: string | number, len = 2): string => {\n val = String(val);\n while (val.length < len) {\n val = \"0\" + val;\n }\n return val;\n};\n\nconst formatFlags: Record<\n string,\n (dateObj: Date, i18n: I18nSettings) => string\n> = {\n D: (dateObj: Date): string => String(dateObj.getDate()),\n DD: (dateObj: Date): string => pad(dateObj.getDate()),\n Do: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.DoFn(dateObj.getDate()),\n d: (dateObj: Date): string => String(dateObj.getDay()),\n dd: (dateObj: Date): string => pad(dateObj.getDay()),\n ddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNamesShort[dateObj.getDay()],\n dddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNames[dateObj.getDay()],\n M: (dateObj: Date): string => String(dateObj.getMonth() + 1),\n MM: (dateObj: Date): string => pad(dateObj.getMonth() + 1),\n MMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNamesShort[dateObj.getMonth()],\n MMMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNames[dateObj.getMonth()],\n YY: (dateObj: Date): string =>\n pad(String(dateObj.getFullYear()), 4).substr(2),\n YYYY: (dateObj: Date): string => pad(dateObj.getFullYear(), 4),\n h: (dateObj: Date): string => String(dateObj.getHours() % 12 || 12),\n hh: (dateObj: Date): string => pad(dateObj.getHours() % 12 || 12),\n H: (dateObj: Date): string => String(dateObj.getHours()),\n HH: (dateObj: Date): string => pad(dateObj.getHours()),\n m: (dateObj: Date): string => String(dateObj.getMinutes()),\n mm: (dateObj: Date): string => pad(dateObj.getMinutes()),\n s: (dateObj: Date): string => String(dateObj.getSeconds()),\n ss: (dateObj: Date): string => pad(dateObj.getSeconds()),\n S: (dateObj: Date): string =>\n String(Math.round(dateObj.getMilliseconds() / 100)),\n SS: (dateObj: Date): string =>\n pad(Math.round(dateObj.getMilliseconds() / 10), 2),\n SSS: (dateObj: Date): string => pad(dateObj.getMilliseconds(), 3),\n a: (dateObj: Date, i18n: I18nSettings): string =>\n dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1],\n A: (dateObj: Date, i18n: I18nSettings): string =>\n dateObj.getHours() < 12\n ? i18n.amPm[0].toUpperCase()\n : i18n.amPm[1].toUpperCase(),\n ZZ(dateObj: Date): string {\n const offset = dateObj.getTimezoneOffset();\n return (\n (offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4)\n );\n },\n Z(dateObj: Date): string {\n const offset = dateObj.getTimezoneOffset();\n return (\n (offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60), 2) +\n \":\" +\n pad(Math.abs(offset) % 60, 2)\n );\n }\n};\n\ntype ParseInfo = [\n keyof DateInfo,\n string,\n ((v: string, i18n: I18nSettings) => number | null)?,\n string?\n];\nconst monthParse = (v: string): number => +v - 1;\nconst emptyDigits: ParseInfo = [null, twoDigitsOptional];\nconst emptyWord: ParseInfo = [null, word];\nconst amPm: ParseInfo = [\n \"isPm\",\n word,\n (v: string, i18n: I18nSettings): number | null => {\n const val = v.toLowerCase();\n if (val === i18n.amPm[0]) {\n return 0;\n } else if (val === i18n.amPm[1]) {\n return 1;\n }\n return null;\n }\n];\nconst timezoneOffset: ParseInfo = [\n \"timezoneOffset\",\n \"[^\\\\s]*?[\\\\+\\\\-]\\\\d\\\\d:?\\\\d\\\\d|[^\\\\s]*?Z?\",\n (v: string): number | null => {\n const parts = (v + \"\").match(/([+-]|\\d\\d)/gi);\n\n if (parts) {\n const minutes = +parts[1] * 60 + parseInt(parts[2], 10);\n return parts[0] === \"+\" ? minutes : -minutes;\n }\n\n return 0;\n }\n];\nconst parseFlags: Record = {\n D: [\"day\", twoDigitsOptional],\n DD: [\"day\", twoDigits],\n Do: [\"day\", twoDigitsOptional + word, (v: string): number => parseInt(v, 10)],\n M: [\"month\", twoDigitsOptional, monthParse],\n MM: [\"month\", twoDigits, monthParse],\n YY: [\n \"year\",\n twoDigits,\n (v: string): number => {\n const now = new Date();\n const cent = +(\"\" + now.getFullYear()).substr(0, 2);\n return +(\"\" + (+v > 68 ? cent - 1 : cent) + v);\n }\n ],\n h: [\"hour\", twoDigitsOptional, undefined, \"isPm\"],\n hh: [\"hour\", twoDigits, undefined, \"isPm\"],\n H: [\"hour\", twoDigitsOptional],\n HH: [\"hour\", twoDigits],\n m: [\"minute\", twoDigitsOptional],\n mm: [\"minute\", twoDigits],\n s: [\"second\", twoDigitsOptional],\n ss: [\"second\", twoDigits],\n YYYY: [\"year\", fourDigits],\n S: [\"millisecond\", \"\\\\d\", (v: string): number => +v * 100],\n SS: [\"millisecond\", twoDigits, (v: string): number => +v * 10],\n SSS: [\"millisecond\", threeDigits],\n d: emptyDigits,\n dd: emptyDigits,\n ddd: emptyWord,\n dddd: emptyWord,\n MMM: [\"month\", word, monthUpdate(\"monthNamesShort\")],\n MMMM: [\"month\", word, monthUpdate(\"monthNames\")],\n a: amPm,\n A: amPm,\n ZZ: timezoneOffset,\n Z: timezoneOffset\n};\n\n// Some common format strings\nconst globalMasks: { [key: string]: string } = {\n default: \"ddd MMM DD YYYY HH:mm:ss\",\n shortDate: \"M/D/YY\",\n mediumDate: \"MMM D, YYYY\",\n longDate: \"MMMM D, YYYY\",\n fullDate: \"dddd, MMMM D, YYYY\",\n isoDate: \"YYYY-MM-DD\",\n isoDateTime: \"YYYY-MM-DDTHH:mm:ssZ\",\n shortTime: \"HH:mm\",\n mediumTime: \"HH:mm:ss\",\n longTime: \"HH:mm:ss.SSS\"\n};\nconst setGlobalDateMasks = (masks: {\n [key: string]: string;\n}): { [key: string]: string } => assign(globalMasks, masks);\n\n/***\n * Format a date\n * @method format\n * @param {Date|number} dateObj\n * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'\n * @returns {string} Formatted date string\n */\nconst format = (\n dateObj: Date,\n mask: string = globalMasks[\"default\"],\n i18n: I18nSettingsOptional = {}\n): string => {\n if (typeof dateObj === \"number\") {\n dateObj = new Date(dateObj);\n }\n\n if (\n Object.prototype.toString.call(dateObj) !== \"[object Date]\" ||\n isNaN(dateObj.getTime())\n ) {\n throw new Error(\"Invalid Date pass to format\");\n }\n\n mask = globalMasks[mask] || mask;\n\n const literals: string[] = [];\n\n // Make literals inactive by replacing them with @@@\n mask = mask.replace(literal, function($0, $1) {\n literals.push($1);\n return \"@@@\";\n });\n\n const combinedI18nSettings: I18nSettings = assign(\n assign({}, globalI18n),\n i18n\n );\n // Apply formatting rules\n mask = mask.replace(token, $0 =>\n formatFlags[$0](dateObj, combinedI18nSettings)\n );\n // Inline literal values back into the formatted value\n return mask.replace(/@@@/g, () => literals.shift());\n};\n\n/**\n * Parse a date string into a Javascript Date object /\n * @method parse\n * @param {string} dateStr Date string\n * @param {string} format Date parse format\n * @param {i18n} I18nSettingsOptional Full or subset of I18N settings\n * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format\n */\nfunction parse(\n dateStr: string,\n format: string,\n i18n: I18nSettingsOptional = {}\n): Date | null {\n if (typeof format !== \"string\") {\n throw new Error(\"Invalid format in fecha parse\");\n }\n\n // Check to see if the format is actually a mask\n format = globalMasks[format] || format;\n\n // Avoid regular expression denial of service, fail early for really long strings\n // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS\n if (dateStr.length > 1000) {\n return null;\n }\n\n // Default to the beginning of the year.\n const today = new Date();\n const dateInfo: DateInfo = {\n year: today.getFullYear(),\n month: 0,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n isPm: null,\n timezoneOffset: null\n };\n const parseInfo: ParseInfo[] = [];\n const literals: string[] = [];\n\n // Replace all the literals with @@@. Hopefully a string that won't exist in the format\n let newFormat = format.replace(literal, ($0, $1) => {\n literals.push(regexEscape($1));\n return \"@@@\";\n });\n const specifiedFields: { [field: string]: boolean } = {};\n const requiredFields: { [field: string]: boolean } = {};\n\n // Change every token that we find into the correct regex\n newFormat = regexEscape(newFormat).replace(token, $0 => {\n const info = parseFlags[$0];\n const [field, regex, , requiredField] = info;\n\n // Check if the person has specified the same field twice. This will lead to confusing results.\n if (specifiedFields[field]) {\n throw new Error(`Invalid format. ${field} specified twice in format`);\n }\n\n specifiedFields[field] = true;\n\n // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified\n if (requiredField) {\n requiredFields[requiredField] = true;\n }\n\n parseInfo.push(info);\n return \"(\" + regex + \")\";\n });\n\n // Check all the required fields are present\n Object.keys(requiredFields).forEach(field => {\n if (!specifiedFields[field]) {\n throw new Error(\n `Invalid format. ${field} is required in specified format`\n );\n }\n });\n\n // Add back all the literals after\n newFormat = newFormat.replace(/@@@/g, () => literals.shift());\n\n // Check if the date string matches the format. If it doesn't return null\n const matches = dateStr.match(new RegExp(newFormat, \"i\"));\n if (!matches) {\n return null;\n }\n\n const combinedI18nSettings: I18nSettings = assign(\n assign({}, globalI18n),\n i18n\n );\n\n // For each match, call the parser function for that date part\n for (let i = 1; i < matches.length; i++) {\n const [field, , parser] = parseInfo[i - 1];\n const value = parser\n ? parser(matches[i], combinedI18nSettings)\n : +matches[i];\n\n // If the parser can't make sense of the value, return null\n if (value == null) {\n return null;\n }\n\n dateInfo[field] = value;\n }\n\n if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) {\n dateInfo.hour = +dateInfo.hour + 12;\n } else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) {\n dateInfo.hour = 0;\n }\n\n let dateTZ: Date;\n if (dateInfo.timezoneOffset == null) {\n dateTZ = new Date(\n dateInfo.year,\n dateInfo.month,\n dateInfo.day,\n dateInfo.hour,\n dateInfo.minute,\n dateInfo.second,\n dateInfo.millisecond\n );\n const validateFields: [\n \"month\" | \"day\" | \"hour\" | \"minute\" | \"second\",\n \"getMonth\" | \"getDate\" | \"getHours\" | \"getMinutes\" | \"getSeconds\"\n ][] = [\n [\"month\", \"getMonth\"],\n [\"day\", \"getDate\"],\n [\"hour\", \"getHours\"],\n [\"minute\", \"getMinutes\"],\n [\"second\", \"getSeconds\"]\n ];\n for (let i = 0, len = validateFields.length; i < len; i++) {\n // Check to make sure the date field is within the allowed range. Javascript dates allows values\n // outside the allowed range. If the values don't match the value was invalid\n if (\n specifiedFields[validateFields[i][0]] &&\n dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()\n ) {\n return null;\n }\n }\n } else {\n dateTZ = new Date(\n Date.UTC(\n dateInfo.year,\n dateInfo.month,\n dateInfo.day,\n dateInfo.hour,\n dateInfo.minute - dateInfo.timezoneOffset,\n dateInfo.second,\n dateInfo.millisecond\n )\n );\n\n // We can't validate dates in another timezone unfortunately. Do a basic check instead\n if (\n dateInfo.month > 11 ||\n dateInfo.month < 0 ||\n dateInfo.day > 31 ||\n dateInfo.day < 1 ||\n dateInfo.hour > 23 ||\n dateInfo.hour < 0 ||\n dateInfo.minute > 59 ||\n dateInfo.minute < 0 ||\n dateInfo.second > 59 ||\n dateInfo.second < 0\n ) {\n return null;\n }\n }\n\n // Don't allow invalid dates\n\n return dateTZ;\n}\nexport default {\n format,\n parse,\n defaultI18n,\n setGlobalDateI18n,\n setGlobalDateMasks\n};\nexport { format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks };\n"],"names":[],"mappings":";;;;;;EAAA,IAAM,KAAK,GAAG,4EAA4E,CAAC;EAC3F,IAAM,iBAAiB,GAAG,SAAS,CAAC;EACpC,IAAM,SAAS,GAAG,QAAQ,CAAC;EAC3B,IAAM,WAAW,GAAG,QAAQ,CAAC;EAC7B,IAAM,UAAU,GAAG,QAAQ,CAAC;EAC5B,IAAM,IAAI,GAAG,SAAS,CAAC;EACvB,IAAM,OAAO,GAAG,eAAe,CAAC;EAyChC,SAAS,OAAO,CAAqB,GAAM,EAAE,IAAY;MACvD,IAAM,MAAM,GAAa,EAAE,CAAC;MAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;UAC9C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;OACrC;MACD,OAAO,MAAM,CAAC;EAChB,CAAC;EAED,IAAM,WAAW,GAAG,UAClB,OAAwE,IACrE,OAAA,UAAC,CAAS,EAAE,IAAkB;MACjC,IAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,WAAW,EAAE,GAAA,CAAC,CAAC;MAC7D,IAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;MACpD,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;UACd,OAAO,KAAK,CAAC;OACd;MACD,OAAO,IAAI,CAAC;EACd,CAAC,GAAA,CAAC;AAMF,WAAgB,MAAM,CAAC,OAAY;MAAE,cAAc;WAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;UAAd,6BAAc;;MACjD,KAAkB,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI,EAAE;UAAnB,IAAM,GAAG,aAAA;UACZ,KAAK,IAAM,GAAG,IAAI,GAAG,EAAE;;cAErB,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;WACzB;OACF;MACD,OAAO,OAAO,CAAC;EACjB,CAAC;EAED,IAAM,QAAQ,GAAS;MACrB,QAAQ;MACR,QAAQ;MACR,SAAS;MACT,WAAW;MACX,UAAU;MACV,QAAQ;MACR,UAAU;GACX,CAAC;EACF,IAAM,UAAU,GAAW;MACzB,SAAS;MACT,UAAU;MACV,OAAO;MACP,OAAO;MACP,KAAK;MACL,MAAM;MACN,MAAM;MACN,QAAQ;MACR,WAAW;MACX,SAAS;MACT,UAAU;MACV,UAAU;GACX,CAAC;EAEF,IAAM,eAAe,GAAW,OAAO,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;EACjE,IAAM,aAAa,GAAS,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAS,CAAC;AAEzD,MAAM,WAAW,GAAiB;MAChC,aAAa,eAAA;MACb,QAAQ,UAAA;MACR,eAAe,iBAAA;MACf,UAAU,YAAA;MACV,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;MAClB,IAAI,EAAJ,UAAK,UAAkB;UACrB,QACE,UAAU;cACV,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CACtB,UAAU,GAAG,EAAE,GAAG,CAAC;oBACf,CAAC;oBACD,CAAC,CAAC,UAAU,IAAI,UAAU,GAAG,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,UAAU,IAAI,EAAE,CACxE,EACD;OACH;GACF,CAAC;EACF,IAAI,UAAU,GAAG,MAAM,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;AACzC,MAAM,iBAAiB,GAAG,UAAC,IAA0B;MACnD,QAAC,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;EAAtC,CAAuC,CAAC;EAE1C,IAAM,WAAW,GAAG,UAAC,GAAW;MAC9B,OAAA,GAAG,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;EAAxC,CAAwC,CAAC;EAE3C,IAAM,GAAG,GAAG,UAAC,GAAoB,EAAE,GAAO;MAAP,oBAAA,EAAA,OAAO;MACxC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;MAClB,OAAO,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE;UACvB,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;OACjB;MACD,OAAO,GAAG,CAAC;EACb,CAAC,CAAC;EAEF,IAAM,WAAW,GAGb;MACF,CAAC,EAAE,UAAC,OAAa,IAAa,OAAA,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,GAAA;MACvD,EAAE,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,GAAA;MACrD,EAAE,EAAE,UAAC,OAAa,EAAE,IAAkB;UACpC,OAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;OAAA;MAC9B,CAAC,EAAE,UAAC,OAAa,IAAa,OAAA,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,GAAA;MACtD,EAAE,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,GAAA;MACpD,GAAG,EAAE,UAAC,OAAa,EAAE,IAAkB;UACrC,OAAA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;OAAA;MACtC,IAAI,EAAE,UAAC,OAAa,EAAE,IAAkB;UACtC,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;OAAA;MACjC,CAAC,EAAE,UAAC,OAAa,IAAa,OAAA,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAA;MAC5D,EAAE,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAA;MAC1D,GAAG,EAAE,UAAC,OAAa,EAAE,IAAkB;UACrC,OAAA,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;OAAA;MAC1C,IAAI,EAAE,UAAC,OAAa,EAAE,IAAkB;UACtC,OAAA,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;OAAA;MACrC,EAAE,EAAE,UAAC,OAAa;UAChB,OAAA,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;OAAA;MACjD,IAAI,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,GAAA;MAC9D,CAAC,EAAE,UAAC,OAAa,IAAa,OAAA,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,GAAA;MACnE,EAAE,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,GAAA;MACjE,CAAC,EAAE,UAAC,OAAa,IAAa,OAAA,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAA;MACxD,EAAE,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAA;MACtD,CAAC,EAAE,UAAC,OAAa,IAAa,OAAA,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,GAAA;MAC1D,EAAE,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,GAAA;MACxD,CAAC,EAAE,UAAC,OAAa,IAAa,OAAA,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,GAAA;MAC1D,EAAE,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,GAAA;MACxD,CAAC,EAAE,UAAC,OAAa;UACf,OAAA,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;OAAA;MACrD,EAAE,EAAE,UAAC,OAAa;UAChB,OAAA,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;OAAA;MACpD,GAAG,EAAE,UAAC,OAAa,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,GAAA;MACjE,CAAC,EAAE,UAAC,OAAa,EAAE,IAAkB;UACnC,OAAA,OAAO,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;OAAA;MACvD,CAAC,EAAE,UAAC,OAAa,EAAE,IAAkB;UACnC,OAAA,OAAO,CAAC,QAAQ,EAAE,GAAG,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC1B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;OAAA;MAChC,EAAE,EAAF,UAAG,OAAa;UACd,IAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;UAC3C,QACE,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;cACvB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EACzE;OACH;MACD,CAAC,EAAD,UAAE,OAAa;UACb,IAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;UAC3C,QACE,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;cACvB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;cACzC,GAAG;cACH,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAC7B;OACH;GACF,CAAC;EAQF,IAAM,UAAU,GAAG,UAAC,CAAS,IAAa,OAAA,CAAC,CAAC,GAAG,CAAC,GAAA,CAAC;EACjD,IAAM,WAAW,GAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;EACzD,IAAM,SAAS,GAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAC1C,IAAM,IAAI,GAAc;MACtB,MAAM;MACN,IAAI;MACJ,UAAC,CAAS,EAAE,IAAkB;UAC5B,IAAM,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;UAC5B,IAAI,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;cACxB,OAAO,CAAC,CAAC;WACV;eAAM,IAAI,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;cAC/B,OAAO,CAAC,CAAC;WACV;UACD,OAAO,IAAI,CAAC;OACb;GACF,CAAC;EACF,IAAM,cAAc,GAAc;MAChC,gBAAgB;MAChB,2CAA2C;MAC3C,UAAC,CAAS;UACR,IAAM,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;UAE9C,IAAI,KAAK,EAAE;cACT,IAAM,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;cACxD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,OAAO,GAAG,CAAC,OAAO,CAAC;WAC9C;UAED,OAAO,CAAC,CAAC;OACV;GACF,CAAC;EACF,IAAM,UAAU,GAA8B;MAC5C,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC;MAC7B,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC;MACtB,EAAE,EAAE,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,EAAE,UAAC,CAAS,IAAa,OAAA,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,GAAA,CAAC;MAC7E,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,UAAU,CAAC;MAC3C,EAAE,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;MACpC,EAAE,EAAE;UACF,MAAM;UACN,SAAS;UACT,UAAC,CAAS;cACR,IAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;cACvB,IAAM,IAAI,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;cACpD,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;WAChD;OACF;MACD,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC;MACjD,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC;MAC1C,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC;MAC9B,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;MACvB,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC;MAChC,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;MACzB,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC;MAChC,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;MACzB,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;MAC1B,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,EAAE,UAAC,CAAS,IAAa,OAAA,CAAC,CAAC,GAAG,GAAG,GAAA,CAAC;MAC1D,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,UAAC,CAAS,IAAa,OAAA,CAAC,CAAC,GAAG,EAAE,GAAA,CAAC;MAC9D,GAAG,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC;MACjC,CAAC,EAAE,WAAW;MACd,EAAE,EAAE,WAAW;MACf,GAAG,EAAE,SAAS;MACd,IAAI,EAAE,SAAS;MACf,GAAG,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;MACpD,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;MAChD,CAAC,EAAE,IAAI;MACP,CAAC,EAAE,IAAI;MACP,EAAE,EAAE,cAAc;MAClB,CAAC,EAAE,cAAc;GAClB,CAAC;EAEF;EACA,IAAM,WAAW,GAA8B;MAC7C,OAAO,EAAE,0BAA0B;MACnC,SAAS,EAAE,QAAQ;MACnB,UAAU,EAAE,aAAa;MACzB,QAAQ,EAAE,cAAc;MACxB,QAAQ,EAAE,oBAAoB;MAC9B,OAAO,EAAE,YAAY;MACrB,WAAW,EAAE,sBAAsB;MACnC,SAAS,EAAE,OAAO;MAClB,UAAU,EAAE,UAAU;MACtB,QAAQ,EAAE,cAAc;GACzB,CAAC;AACF,MAAM,kBAAkB,GAAG,UAAC,KAE3B,IAAgC,OAAA,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,GAAA,CAAC;EAE5D;;;;;;;AAOA,MAAM,MAAM,GAAG,UACb,OAAa,EACb,IAAqC,EACrC,IAA+B;MAD/B,qBAAA,EAAA,OAAe,WAAW,CAAC,SAAS,CAAC;MACrC,qBAAA,EAAA,SAA+B;MAE/B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;UAC/B,OAAO,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;OAC7B;MAED,IACE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,eAAe;UAC3D,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EACxB;UACA,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;OAChD;MAED,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;MAEjC,IAAM,QAAQ,GAAa,EAAE,CAAC;;MAG9B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAS,EAAE,EAAE,EAAE;UAC1C,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;UAClB,OAAO,KAAK,CAAC;OACd,CAAC,CAAC;MAEH,IAAM,oBAAoB,GAAiB,MAAM,CAC/C,MAAM,CAAC,EAAE,EAAE,UAAU,CAAC,EACtB,IAAI,CACL,CAAC;;MAEF,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,UAAA,EAAE;UAC3B,OAAA,WAAW,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,oBAAoB,CAAC;OAAA,CAC/C,CAAC;;MAEF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,cAAM,OAAA,QAAQ,CAAC,KAAK,EAAE,GAAA,CAAC,CAAC;EACtD,CAAC,CAAC;EAEF;;;;;;;;EAQA,SAAS,KAAK,CACZ,OAAe,EACf,MAAc,EACd,IAA+B;MAA/B,qBAAA,EAAA,SAA+B;MAE/B,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;UAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;OAClD;;MAGD,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;;;MAIvC,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,EAAE;UACzB,OAAO,IAAI,CAAC;OACb;;MAGD,IAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;MACzB,IAAM,QAAQ,GAAa;UACzB,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE;UACzB,KAAK,EAAE,CAAC;UACR,GAAG,EAAE,CAAC;UACN,IAAI,EAAE,CAAC;UACP,MAAM,EAAE,CAAC;UACT,MAAM,EAAE,CAAC;UACT,WAAW,EAAE,CAAC;UACd,IAAI,EAAE,IAAI;UACV,cAAc,EAAE,IAAI;OACrB,CAAC;MACF,IAAM,SAAS,GAAgB,EAAE,CAAC;MAClC,IAAM,QAAQ,GAAa,EAAE,CAAC;;MAG9B,IAAI,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,UAAC,EAAE,EAAE,EAAE;UAC7C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;UAC/B,OAAO,KAAK,CAAC;OACd,CAAC,CAAC;MACH,IAAM,eAAe,GAAiC,EAAE,CAAC;MACzD,IAAM,cAAc,GAAiC,EAAE,CAAC;;MAGxD,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,UAAA,EAAE;UAClD,IAAM,IAAI,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;UACrB,IAAA,KAAK,GAA4B,IAAI,GAAhC,EAAE,KAAK,GAAqB,IAAI,GAAzB,EAAI,aAAa,GAAI,IAAI,GAAR,CAAS;;UAG7C,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;cAC1B,MAAM,IAAI,KAAK,CAAC,qBAAmB,KAAK,+BAA4B,CAAC,CAAC;WACvE;UAED,eAAe,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;;UAG9B,IAAI,aAAa,EAAE;cACjB,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;WACtC;UAED,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;UACrB,OAAO,GAAG,GAAG,KAAK,GAAG,GAAG,CAAC;OAC1B,CAAC,CAAC;;MAGH,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,UAAA,KAAK;UACvC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;cAC3B,MAAM,IAAI,KAAK,CACb,qBAAmB,KAAK,qCAAkC,CAC3D,CAAC;WACH;OACF,CAAC,CAAC;;MAGH,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,cAAM,OAAA,QAAQ,CAAC,KAAK,EAAE,GAAA,CAAC,CAAC;;MAG9D,IAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC;MAC1D,IAAI,CAAC,OAAO,EAAE;UACZ,OAAO,IAAI,CAAC;OACb;MAED,IAAM,oBAAoB,GAAiB,MAAM,CAC/C,MAAM,CAAC,EAAE,EAAE,UAAU,CAAC,EACtB,IAAI,CACL,CAAC;;MAGF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;UACjC,IAAA,KAAoB,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,EAAnC,KAAK,QAAA,EAAI,MAAM,QAAoB,CAAC;UAC3C,IAAM,KAAK,GAAG,MAAM;gBAChB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC;gBACxC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;;UAGhB,IAAI,KAAK,IAAI,IAAI,EAAE;cACjB,OAAO,IAAI,CAAC;WACb;UAED,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;OACzB;MAED,IAAI,QAAQ,CAAC,IAAI,KAAK,CAAC,IAAI,QAAQ,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,EAAE;UACzE,QAAQ,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC;OACrC;WAAM,IAAI,QAAQ,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,EAAE;UACvD,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC;OACnB;MAED,IAAI,MAAY,CAAC;MACjB,IAAI,QAAQ,CAAC,cAAc,IAAI,IAAI,EAAE;UACnC,MAAM,GAAG,IAAI,IAAI,CACf,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,KAAK,EACd,QAAQ,CAAC,GAAG,EACZ,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,WAAW,CACrB,CAAC;UACF,IAAM,cAAc,GAGd;cACJ,CAAC,OAAO,EAAE,UAAU,CAAC;cACrB,CAAC,KAAK,EAAE,SAAS,CAAC;cAClB,CAAC,MAAM,EAAE,UAAU,CAAC;cACpB,CAAC,QAAQ,EAAE,YAAY,CAAC;cACxB,CAAC,QAAQ,EAAE,YAAY,CAAC;WACzB,CAAC;UACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;;;cAGzD,IACE,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;kBACrC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EACjE;kBACA,OAAO,IAAI,CAAC;eACb;WACF;OACF;WAAM;UACL,MAAM,GAAG,IAAI,IAAI,CACf,IAAI,CAAC,GAAG,CACN,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,KAAK,EACd,QAAQ,CAAC,GAAG,EACZ,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,cAAc,EACzC,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,WAAW,CACrB,CACF,CAAC;;UAGF,IACE,QAAQ,CAAC,KAAK,GAAG,EAAE;cACnB,QAAQ,CAAC,KAAK,GAAG,CAAC;cAClB,QAAQ,CAAC,GAAG,GAAG,EAAE;cACjB,QAAQ,CAAC,GAAG,GAAG,CAAC;cAChB,QAAQ,CAAC,IAAI,GAAG,EAAE;cAClB,QAAQ,CAAC,IAAI,GAAG,CAAC;cACjB,QAAQ,CAAC,MAAM,GAAG,EAAE;cACpB,QAAQ,CAAC,MAAM,GAAG,CAAC;cACnB,QAAQ,CAAC,MAAM,GAAG,EAAE;cACpB,QAAQ,CAAC,MAAM,GAAG,CAAC,EACnB;cACA,OAAO,IAAI,CAAC;WACb;OACF;;MAID,OAAO,MAAM,CAAC;EAChB,CAAC;AACD,cAAe;MACb,MAAM,QAAA;MACN,KAAK,OAAA;MACL,WAAW,aAAA;MACX,iBAAiB,mBAAA;MACjB,kBAAkB,oBAAA;GACnB,CAAC;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/general/nvim/node_modules/fecha/package.json b/general/nvim/node_modules/fecha/package.json deleted file mode 100644 index 6ebb621..0000000 --- a/general/nvim/node_modules/fecha/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "fecha", - "version": "4.2.3", - "description": "Date formatting and parsing", - "main": "lib/fecha.umd.js", - "module": "lib/fecha.js", - "scripts": { - "test-only": "ts-node test.js", - "test": "prettier --check *.js src/*.ts && eslint --ext .ts src && npm run build && nyc --cache --reporter=text ts-node test.js", - "build": "NODE_ENV=production rollup -c --sourcemap && tsc", - "format": "prettier --write *.js src/*.ts" - }, - "repository": { - "type": "git", - "url": "https://taylorhakes@github.com/taylorhakes/fecha.git" - }, - "keywords": [ - "date", - "parse", - "moment", - "format", - "fecha", - "formatting" - ], - "author": "Taylor Hakes", - "license": "MIT", - "bugs": { - "url": "https://github.com/taylorhakes/fecha/issues" - }, - "homepage": "https://github.com/taylorhakes/fecha", - "devDependencies": { - "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@typescript-eslint/eslint-plugin": "^2.14.0", - "@typescript-eslint/parser": "^2.14.0", - "eslint": "^7.23.0", - "eslint-config-prettier": "^8.1.0", - "nyc": "^15.0.0", - "painless": "^0.9.7", - "prettier": "1.19.1", - "rollup": "^0.59.0", - "rollup-plugin-sourcemaps": "^0.5.0", - "rollup-plugin-typescript": "^1.0.1", - "rollup-plugin-uglify": "^3.0.0", - "source-map-support": "^0.5.16", - "ts-node": "^8.5.4", - "tslib": "^1.10.0", - "typescript": "^3.7.4" - }, - "files": [ - "lib", - "dist", - "src" - ], - "types": "lib/fecha.d.ts" -} diff --git a/general/nvim/node_modules/fecha/src/fecha.ts b/general/nvim/node_modules/fecha/src/fecha.ts deleted file mode 100644 index 6f6bcff..0000000 --- a/general/nvim/node_modules/fecha/src/fecha.ts +++ /dev/null @@ -1,524 +0,0 @@ -const token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g; -const twoDigitsOptional = "\\d\\d?"; -const twoDigits = "\\d\\d"; -const threeDigits = "\\d{3}"; -const fourDigits = "\\d{4}"; -const word = "[^\\s]+"; -const literal = /\[([^]*?)\]/gm; - -type DateInfo = { - year: number; - month: number; - day: number; - hour: number; - minute: number; - second: number; - millisecond: number; - isPm: number | null; - timezoneOffset: number | null; -}; - -export type I18nSettings = { - amPm: [string, string]; - dayNames: Days; - dayNamesShort: Days; - monthNames: Months; - monthNamesShort: Months; - DoFn(dayOfMonth: number): string; -}; - -export type I18nSettingsOptional = Partial; - -export type Days = [string, string, string, string, string, string, string]; -export type Months = [ - string, - string, - string, - string, - string, - string, - string, - string, - string, - string, - string, - string -]; - -function shorten(arr: T, sLen: number): string[] { - const newArr: string[] = []; - for (let i = 0, len = arr.length; i < len; i++) { - newArr.push(arr[i].substr(0, sLen)); - } - return newArr; -} - -const monthUpdate = ( - arrName: "monthNames" | "monthNamesShort" | "dayNames" | "dayNamesShort" -) => (v: string, i18n: I18nSettings): number | null => { - const lowerCaseArr = i18n[arrName].map(v => v.toLowerCase()); - const index = lowerCaseArr.indexOf(v.toLowerCase()); - if (index > -1) { - return index; - } - return null; -}; - -export function assign(a: A): A; -export function assign(a: A, b: B): A & B; -export function assign(a: A, b: B, c: C): A & B & C; -export function assign(a: A, b: B, c: C, d: D): A & B & C & D; -export function assign(origObj: any, ...args: any[]): any { - for (const obj of args) { - for (const key in obj) { - // @ts-ignore ex - origObj[key] = obj[key]; - } - } - return origObj; -} - -const dayNames: Days = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -]; -const monthNames: Months = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -]; - -const monthNamesShort: Months = shorten(monthNames, 3) as Months; -const dayNamesShort: Days = shorten(dayNames, 3) as Days; - -const defaultI18n: I18nSettings = { - dayNamesShort, - dayNames, - monthNamesShort, - monthNames, - amPm: ["am", "pm"], - DoFn(dayOfMonth: number) { - return ( - dayOfMonth + - ["th", "st", "nd", "rd"][ - dayOfMonth % 10 > 3 - ? 0 - : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10 - ] - ); - } -}; -let globalI18n = assign({}, defaultI18n); -const setGlobalDateI18n = (i18n: I18nSettingsOptional): I18nSettings => - (globalI18n = assign(globalI18n, i18n)); - -const regexEscape = (str: string): string => - str.replace(/[|\\{()[^$+*?.-]/g, "\\$&"); - -const pad = (val: string | number, len = 2): string => { - val = String(val); - while (val.length < len) { - val = "0" + val; - } - return val; -}; - -const formatFlags: Record< - string, - (dateObj: Date, i18n: I18nSettings) => string -> = { - D: (dateObj: Date): string => String(dateObj.getDate()), - DD: (dateObj: Date): string => pad(dateObj.getDate()), - Do: (dateObj: Date, i18n: I18nSettings): string => - i18n.DoFn(dateObj.getDate()), - d: (dateObj: Date): string => String(dateObj.getDay()), - dd: (dateObj: Date): string => pad(dateObj.getDay()), - ddd: (dateObj: Date, i18n: I18nSettings): string => - i18n.dayNamesShort[dateObj.getDay()], - dddd: (dateObj: Date, i18n: I18nSettings): string => - i18n.dayNames[dateObj.getDay()], - M: (dateObj: Date): string => String(dateObj.getMonth() + 1), - MM: (dateObj: Date): string => pad(dateObj.getMonth() + 1), - MMM: (dateObj: Date, i18n: I18nSettings): string => - i18n.monthNamesShort[dateObj.getMonth()], - MMMM: (dateObj: Date, i18n: I18nSettings): string => - i18n.monthNames[dateObj.getMonth()], - YY: (dateObj: Date): string => - pad(String(dateObj.getFullYear()), 4).substr(2), - YYYY: (dateObj: Date): string => pad(dateObj.getFullYear(), 4), - h: (dateObj: Date): string => String(dateObj.getHours() % 12 || 12), - hh: (dateObj: Date): string => pad(dateObj.getHours() % 12 || 12), - H: (dateObj: Date): string => String(dateObj.getHours()), - HH: (dateObj: Date): string => pad(dateObj.getHours()), - m: (dateObj: Date): string => String(dateObj.getMinutes()), - mm: (dateObj: Date): string => pad(dateObj.getMinutes()), - s: (dateObj: Date): string => String(dateObj.getSeconds()), - ss: (dateObj: Date): string => pad(dateObj.getSeconds()), - S: (dateObj: Date): string => - String(Math.round(dateObj.getMilliseconds() / 100)), - SS: (dateObj: Date): string => - pad(Math.round(dateObj.getMilliseconds() / 10), 2), - SSS: (dateObj: Date): string => pad(dateObj.getMilliseconds(), 3), - a: (dateObj: Date, i18n: I18nSettings): string => - dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1], - A: (dateObj: Date, i18n: I18nSettings): string => - dateObj.getHours() < 12 - ? i18n.amPm[0].toUpperCase() - : i18n.amPm[1].toUpperCase(), - ZZ(dateObj: Date): string { - const offset = dateObj.getTimezoneOffset(); - return ( - (offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4) - ); - }, - Z(dateObj: Date): string { - const offset = dateObj.getTimezoneOffset(); - return ( - (offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60), 2) + - ":" + - pad(Math.abs(offset) % 60, 2) - ); - } -}; - -type ParseInfo = [ - keyof DateInfo, - string, - ((v: string, i18n: I18nSettings) => number | null)?, - string? -]; -const monthParse = (v: string): number => +v - 1; -const emptyDigits: ParseInfo = [null, twoDigitsOptional]; -const emptyWord: ParseInfo = [null, word]; -const amPm: ParseInfo = [ - "isPm", - word, - (v: string, i18n: I18nSettings): number | null => { - const val = v.toLowerCase(); - if (val === i18n.amPm[0]) { - return 0; - } else if (val === i18n.amPm[1]) { - return 1; - } - return null; - } -]; -const timezoneOffset: ParseInfo = [ - "timezoneOffset", - "[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?", - (v: string): number | null => { - const parts = (v + "").match(/([+-]|\d\d)/gi); - - if (parts) { - const minutes = +parts[1] * 60 + parseInt(parts[2], 10); - return parts[0] === "+" ? minutes : -minutes; - } - - return 0; - } -]; -const parseFlags: Record = { - D: ["day", twoDigitsOptional], - DD: ["day", twoDigits], - Do: ["day", twoDigitsOptional + word, (v: string): number => parseInt(v, 10)], - M: ["month", twoDigitsOptional, monthParse], - MM: ["month", twoDigits, monthParse], - YY: [ - "year", - twoDigits, - (v: string): number => { - const now = new Date(); - const cent = +("" + now.getFullYear()).substr(0, 2); - return +("" + (+v > 68 ? cent - 1 : cent) + v); - } - ], - h: ["hour", twoDigitsOptional, undefined, "isPm"], - hh: ["hour", twoDigits, undefined, "isPm"], - H: ["hour", twoDigitsOptional], - HH: ["hour", twoDigits], - m: ["minute", twoDigitsOptional], - mm: ["minute", twoDigits], - s: ["second", twoDigitsOptional], - ss: ["second", twoDigits], - YYYY: ["year", fourDigits], - S: ["millisecond", "\\d", (v: string): number => +v * 100], - SS: ["millisecond", twoDigits, (v: string): number => +v * 10], - SSS: ["millisecond", threeDigits], - d: emptyDigits, - dd: emptyDigits, - ddd: emptyWord, - dddd: emptyWord, - MMM: ["month", word, monthUpdate("monthNamesShort")], - MMMM: ["month", word, monthUpdate("monthNames")], - a: amPm, - A: amPm, - ZZ: timezoneOffset, - Z: timezoneOffset -}; - -// Some common format strings -const globalMasks: { [key: string]: string } = { - default: "ddd MMM DD YYYY HH:mm:ss", - shortDate: "M/D/YY", - mediumDate: "MMM D, YYYY", - longDate: "MMMM D, YYYY", - fullDate: "dddd, MMMM D, YYYY", - isoDate: "YYYY-MM-DD", - isoDateTime: "YYYY-MM-DDTHH:mm:ssZ", - shortTime: "HH:mm", - mediumTime: "HH:mm:ss", - longTime: "HH:mm:ss.SSS" -}; -const setGlobalDateMasks = (masks: { - [key: string]: string; -}): { [key: string]: string } => assign(globalMasks, masks); - -/*** - * Format a date - * @method format - * @param {Date|number} dateObj - * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate' - * @returns {string} Formatted date string - */ -const format = ( - dateObj: Date, - mask: string = globalMasks["default"], - i18n: I18nSettingsOptional = {} -): string => { - if (typeof dateObj === "number") { - dateObj = new Date(dateObj); - } - - if ( - Object.prototype.toString.call(dateObj) !== "[object Date]" || - isNaN(dateObj.getTime()) - ) { - throw new Error("Invalid Date pass to format"); - } - - mask = globalMasks[mask] || mask; - - const literals: string[] = []; - - // Make literals inactive by replacing them with @@@ - mask = mask.replace(literal, function($0, $1) { - literals.push($1); - return "@@@"; - }); - - const combinedI18nSettings: I18nSettings = assign( - assign({}, globalI18n), - i18n - ); - // Apply formatting rules - mask = mask.replace(token, $0 => - formatFlags[$0](dateObj, combinedI18nSettings) - ); - // Inline literal values back into the formatted value - return mask.replace(/@@@/g, () => literals.shift()); -}; - -/** - * Parse a date string into a Javascript Date object / - * @method parse - * @param {string} dateStr Date string - * @param {string} format Date parse format - * @param {i18n} I18nSettingsOptional Full or subset of I18N settings - * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format - */ -function parse( - dateStr: string, - format: string, - i18n: I18nSettingsOptional = {} -): Date | null { - if (typeof format !== "string") { - throw new Error("Invalid format in fecha parse"); - } - - // Check to see if the format is actually a mask - format = globalMasks[format] || format; - - // Avoid regular expression denial of service, fail early for really long strings - // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS - if (dateStr.length > 1000) { - return null; - } - - // Default to the beginning of the year. - const today = new Date(); - const dateInfo: DateInfo = { - year: today.getFullYear(), - month: 0, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0, - isPm: null, - timezoneOffset: null - }; - const parseInfo: ParseInfo[] = []; - const literals: string[] = []; - - // Replace all the literals with @@@. Hopefully a string that won't exist in the format - let newFormat = format.replace(literal, ($0, $1) => { - literals.push(regexEscape($1)); - return "@@@"; - }); - const specifiedFields: { [field: string]: boolean } = {}; - const requiredFields: { [field: string]: boolean } = {}; - - // Change every token that we find into the correct regex - newFormat = regexEscape(newFormat).replace(token, $0 => { - const info = parseFlags[$0]; - const [field, regex, , requiredField] = info; - - // Check if the person has specified the same field twice. This will lead to confusing results. - if (specifiedFields[field]) { - throw new Error(`Invalid format. ${field} specified twice in format`); - } - - specifiedFields[field] = true; - - // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified - if (requiredField) { - requiredFields[requiredField] = true; - } - - parseInfo.push(info); - return "(" + regex + ")"; - }); - - // Check all the required fields are present - Object.keys(requiredFields).forEach(field => { - if (!specifiedFields[field]) { - throw new Error( - `Invalid format. ${field} is required in specified format` - ); - } - }); - - // Add back all the literals after - newFormat = newFormat.replace(/@@@/g, () => literals.shift()); - - // Check if the date string matches the format. If it doesn't return null - const matches = dateStr.match(new RegExp(newFormat, "i")); - if (!matches) { - return null; - } - - const combinedI18nSettings: I18nSettings = assign( - assign({}, globalI18n), - i18n - ); - - // For each match, call the parser function for that date part - for (let i = 1; i < matches.length; i++) { - const [field, , parser] = parseInfo[i - 1]; - const value = parser - ? parser(matches[i], combinedI18nSettings) - : +matches[i]; - - // If the parser can't make sense of the value, return null - if (value == null) { - return null; - } - - dateInfo[field] = value; - } - - if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) { - dateInfo.hour = +dateInfo.hour + 12; - } else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) { - dateInfo.hour = 0; - } - - let dateTZ: Date; - if (dateInfo.timezoneOffset == null) { - dateTZ = new Date( - dateInfo.year, - dateInfo.month, - dateInfo.day, - dateInfo.hour, - dateInfo.minute, - dateInfo.second, - dateInfo.millisecond - ); - const validateFields: [ - "month" | "day" | "hour" | "minute" | "second", - "getMonth" | "getDate" | "getHours" | "getMinutes" | "getSeconds" - ][] = [ - ["month", "getMonth"], - ["day", "getDate"], - ["hour", "getHours"], - ["minute", "getMinutes"], - ["second", "getSeconds"] - ]; - for (let i = 0, len = validateFields.length; i < len; i++) { - // Check to make sure the date field is within the allowed range. Javascript dates allows values - // outside the allowed range. If the values don't match the value was invalid - if ( - specifiedFields[validateFields[i][0]] && - dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]() - ) { - return null; - } - } - } else { - dateTZ = new Date( - Date.UTC( - dateInfo.year, - dateInfo.month, - dateInfo.day, - dateInfo.hour, - dateInfo.minute - dateInfo.timezoneOffset, - dateInfo.second, - dateInfo.millisecond - ) - ); - - // We can't validate dates in another timezone unfortunately. Do a basic check instead - if ( - dateInfo.month > 11 || - dateInfo.month < 0 || - dateInfo.day > 31 || - dateInfo.day < 1 || - dateInfo.hour > 23 || - dateInfo.hour < 0 || - dateInfo.minute > 59 || - dateInfo.minute < 0 || - dateInfo.second > 59 || - dateInfo.second < 0 - ) { - return null; - } - } - - // Don't allow invalid dates - - return dateTZ; -} -export default { - format, - parse, - defaultI18n, - setGlobalDateI18n, - setGlobalDateMasks -}; -export { format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks }; diff --git a/general/nvim/node_modules/fn.name/.gitattributes b/general/nvim/node_modules/fn.name/.gitattributes deleted file mode 100644 index 1a6bd45..0000000 --- a/general/nvim/node_modules/fn.name/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -package-lock.json binary diff --git a/general/nvim/node_modules/fn.name/.travis.yml b/general/nvim/node_modules/fn.name/.travis.yml deleted file mode 100644 index dec0339..0000000 --- a/general/nvim/node_modules/fn.name/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - "10" - - "8" - - "6" - - "4" -script: - - "npm run test-travis" -after_script: - - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls" diff --git a/general/nvim/node_modules/fn.name/LICENSE b/general/nvim/node_modules/fn.name/LICENSE deleted file mode 100644 index b68d272..0000000 --- a/general/nvim/node_modules/fn.name/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Arnout Kazemier, Martijn Swaagman, the Contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/general/nvim/node_modules/fn.name/README.md b/general/nvim/node_modules/fn.name/README.md deleted file mode 100644 index 1b199ea..0000000 --- a/general/nvim/node_modules/fn.name/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# fn.name - -[![Version npm][version]](http://npm.im/fn.name)[![Build Status][build]](https://travis-ci.org/3rd-Eden/fn.name)[![Dependencies][david]](https://david-dm.org/3rd-Eden/fn.name)[![Coverage Status][cover]](https://coveralls.io/r/3rd-Eden/fn.name?branch=master) - -[version]: http://img.shields.io/npm/v/fn.name.svg?style=flat-square -[build]: http://img.shields.io/travis/3rd-Eden/fn.name/master.svg?style=flat-square -[david]: https://img.shields.io/david/3rd-Eden/fn.name.svg?style=flat-square -[cover]: http://img.shields.io/coveralls/3rd-Eden/fn.name/master.svg?style=flat-square - -Extract the name of a given function. Nothing more than that. - -## Installation - -This module is compatible with Browserify and Node.js and can be installed -using: - -``` -npm install --save fn.name -``` - -## Usage - -Using this module is super simple, it exposes the function directly on the -exports so it can be required as followed: - -```js -'use strict'; - -var name = require('fn.name'); -``` - -Now that we have the `name` function we can pass it functions: - -```js -console.log(name(function foo() {})) // foo -``` - -And that's it folks! - -## License - -MIT diff --git a/general/nvim/node_modules/fn.name/index.js b/general/nvim/node_modules/fn.name/index.js deleted file mode 100644 index 0fb0f59..0000000 --- a/general/nvim/node_modules/fn.name/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var toString = Object.prototype.toString; - -/** - * Extract names from functions. - * - * @param {Function} fn The function who's name we need to extract. - * @returns {String} The name of the function. - * @public - */ -module.exports = function name(fn) { - if ('string' === typeof fn.displayName && fn.constructor.name) { - return fn.displayName; - } else if ('string' === typeof fn.name && fn.name) { - return fn.name; - } - - // - // Check to see if the constructor has a name. - // - if ( - 'object' === typeof fn - && fn.constructor - && 'string' === typeof fn.constructor.name - ) return fn.constructor.name; - - // - // toString the given function and attempt to parse it out of it, or determine - // the class. - // - var named = fn.toString() - , type = toString.call(fn).slice(8, -1); - - if ('Function' === type) { - named = named.substring(named.indexOf('(') + 1, named.indexOf(')')); - } else { - named = type; - } - - return named || 'anonymous'; -}; diff --git a/general/nvim/node_modules/fn.name/package.json b/general/nvim/node_modules/fn.name/package.json deleted file mode 100644 index 83cde5c..0000000 --- a/general/nvim/node_modules/fn.name/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "fn.name", - "version": "1.1.0", - "description": "Extract names from functions", - "main": "index.js", - "scripts": { - "test": "mocha test.js", - "watch": "mocha --watch test.js", - "coverage": "istanbul cover ./node_modules/.bin/_mocha -- test.js", - "test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/3rd-Eden/fn.name" - }, - "keywords": [ - "fn.name", - "function.name", - "name", - "function", - "extract", - "parse", - "names" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "bugs": { - "url": "https://github.com/3rd-Eden/fn.name/issues" - }, - "devDependencies": { - "assume": "2.x.x", - "istanbul": "0.3.x", - "mocha": "5.x.x", - "pre-commit": "1.x.x" - }, - "homepage": "https://github.com/3rd-Eden/fn.name" -} diff --git a/general/nvim/node_modules/fn.name/test.js b/general/nvim/node_modules/fn.name/test.js deleted file mode 100644 index b7d8f44..0000000 --- a/general/nvim/node_modules/fn.name/test.js +++ /dev/null @@ -1,73 +0,0 @@ -describe('fn.name', function () { - 'use strict'; - - var assume = require('assume') - , name = require('./'); - - it('is exported as a function', function () { - assume(name).is.a('function'); - }); - - it('can extract the name from a function declaration', function () { - function foobar() {} - - assume(name(foobar)).equals('foobar'); - }); - - it('can extract the name from a function expression', function () { - var a = function bar() {}; - - assume(name(a)).equals('bar'); - }); - - it('can be overriden using displayName', function () { - var a = function bar() {}; - a.displayName = 'bro'; - - assume(name(a)).equals('bro'); - }); - - it('works with constructed instances', function () { - function Bar(){} - - var foo = new Bar(); - - assume(name(foo)).equals('Bar'); - }); - - it('works with anonymous', function () { - assume(name(function () {})).equals('anonymous'); - }); - - it('returns the className if we were not given a function', function () { - assume(name('string')).equals('String'); - }); - - // - // Test if the env supports async functions, if so add a test to ensure - // that we will work with async functions. - // - var asyncfn = true; - try { new Function('return async function hello() {}')(); } - catch (e) { asyncfn = false; } - - if (asyncfn) it('detects the name of async functions', function () { - var fn = new Function('return async function hello() {}')(); - - assume(name(fn)).equals('hello'); - }); - - // - // Test that this env supports generators, if so add a test to ensure that - // we will work with generators. - // - var generators = true; - try { new Function('return function* generator() {}')(); } - catch (e) { generator = false; } - - if (generators) it('detecs the name of a generator', function () { - var fn = new Function('return function* hello() {}')(); - - assume(name(fn)).equals('hello'); - }); -}); diff --git a/general/nvim/node_modules/inherits/LICENSE b/general/nvim/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013..0000000 --- a/general/nvim/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/general/nvim/node_modules/inherits/README.md b/general/nvim/node_modules/inherits/README.md deleted file mode 100644 index b1c5665..0000000 --- a/general/nvim/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/general/nvim/node_modules/inherits/inherits.js b/general/nvim/node_modules/inherits/inherits.js deleted file mode 100644 index f71f2d9..0000000 --- a/general/nvim/node_modules/inherits/inherits.js +++ /dev/null @@ -1,9 +0,0 @@ -try { - var util = require('util'); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = require('./inherits_browser.js'); -} diff --git a/general/nvim/node_modules/inherits/inherits_browser.js b/general/nvim/node_modules/inherits/inherits_browser.js deleted file mode 100644 index 86bbb3d..0000000 --- a/general/nvim/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,27 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} diff --git a/general/nvim/node_modules/inherits/package.json b/general/nvim/node_modules/inherits/package.json deleted file mode 100644 index 37b4366..0000000 --- a/general/nvim/node_modules/inherits/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.4", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": "git://github.com/isaacs/inherits", - "license": "ISC", - "scripts": { - "test": "tap" - }, - "devDependencies": { - "tap": "^14.2.4" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ] -} diff --git a/general/nvim/node_modules/is-arrayish/LICENSE b/general/nvim/node_modules/is-arrayish/LICENSE deleted file mode 100644 index 0a5f461..0000000 --- a/general/nvim/node_modules/is-arrayish/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 JD Ballard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/general/nvim/node_modules/is-arrayish/README.md b/general/nvim/node_modules/is-arrayish/README.md deleted file mode 100644 index 7d36072..0000000 --- a/general/nvim/node_modules/is-arrayish/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) -> Determines if an object can be used like an Array - -## Example -```javascript -var isArrayish = require('is-arrayish'); - -isArrayish([]); // true -isArrayish({__proto__: []}); // true -isArrayish({}); // false -isArrayish({length:10}); // false -``` - -## License -Licensed under the [MIT License](http://opensource.org/licenses/MIT). -You can find a copy of it in [LICENSE](LICENSE). diff --git a/general/nvim/node_modules/is-arrayish/index.js b/general/nvim/node_modules/is-arrayish/index.js deleted file mode 100644 index 729ca40..0000000 --- a/general/nvim/node_modules/is-arrayish/index.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function isArrayish(obj) { - if (!obj || typeof obj === 'string') { - return false; - } - - return obj instanceof Array || Array.isArray(obj) || - (obj.length >= 0 && (obj.splice instanceof Function || - (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); -}; diff --git a/general/nvim/node_modules/is-arrayish/package.json b/general/nvim/node_modules/is-arrayish/package.json deleted file mode 100644 index 8a54e33..0000000 --- a/general/nvim/node_modules/is-arrayish/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "is-arrayish", - "description": "Determines if an object can be used as an array", - "version": "0.3.2", - "author": "Qix (http://github.com/qix-)", - "keywords": [ - "is", - "array", - "duck", - "type", - "arrayish", - "similar", - "proto", - "prototype", - "type" - ], - "license": "MIT", - "scripts": { - "test": "mocha --require coffeescript/register ./test/**/*.coffee", - "lint": "zeit-eslint --ext .jsx,.js .", - "lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint" - }, - "repository": { - "type": "git", - "url": "https://github.com/qix-/node-is-arrayish.git" - }, - "devDependencies": { - "@zeit/eslint-config-node": "^0.3.0", - "@zeit/git-hooks": "^0.1.4", - "coffeescript": "^2.3.1", - "coveralls": "^3.0.1", - "eslint": "^4.19.1", - "istanbul": "^0.4.5", - "mocha": "^5.2.0", - "should": "^13.2.1" - }, - "eslintConfig": { - "extends": [ - "@zeit/eslint-config-node" - ] - }, - "git": { - "pre-commit": "lint-staged" - } -} diff --git a/general/nvim/node_modules/is-arrayish/yarn-error.log b/general/nvim/node_modules/is-arrayish/yarn-error.log deleted file mode 100644 index d3dcf37..0000000 --- a/general/nvim/node_modules/is-arrayish/yarn-error.log +++ /dev/null @@ -1,1443 +0,0 @@ -Arguments: - /Users/junon/n/bin/node /Users/junon/.yarn/bin/yarn.js test - -PATH: - /Users/junon/.yarn/bin:/Users/junon/.config/yarn/global/node_modules/.bin:/Users/junon/perl5/bin:/Users/junon/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/junon/bin:/Users/junon/.local/bin:/src/.go/bin:/src/llvm/llvm/build/bin:/Users/junon/Library/Android/sdk/platform-tools:/Users/junon/n/bin:/usr/local/texlive/2017/bin/x86_64-darwin/ - -Yarn version: - 1.5.1 - -Node version: - 9.6.1 - -Platform: - darwin x64 - -npm manifest: - { - "name": "is-arrayish", - "description": "Determines if an object can be used as an array", - "version": "0.3.1", - "author": "Qix (http://github.com/qix-)", - "keywords": [ - "is", - "array", - "duck", - "type", - "arrayish", - "similar", - "proto", - "prototype", - "type" - ], - "license": "MIT", - "scripts": { - "test": "mocha --require coffeescript/register", - "lint": "zeit-eslint --ext .jsx,.js .", - "lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint" - }, - "repository": { - "type": "git", - "url": "https://github.com/qix-/node-is-arrayish.git" - }, - "devDependencies": { - "@zeit/eslint-config-node": "^0.3.0", - "@zeit/git-hooks": "^0.1.4", - "coffeescript": "^2.3.1", - "coveralls": "^3.0.1", - "eslint": "^4.19.1", - "istanbul": "^0.4.5", - "mocha": "^5.2.0", - "should": "^13.2.1" - }, - "eslintConfig": { - "extends": [ - "@zeit/eslint-config-node" - ] - }, - "git": { - "pre-commit": "lint-staged" - } - } - -yarn manifest: - No manifest - -Lockfile: - # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - # yarn lockfile v1 - - - "@zeit/eslint-config-base@0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@zeit/eslint-config-base/-/eslint-config-base-0.3.0.tgz#32a58c3e52eca4025604758cb4591f3d28e22fb4" - dependencies: - arg "^1.0.0" - chalk "^2.3.0" - - "@zeit/eslint-config-node@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@zeit/eslint-config-node/-/eslint-config-node-0.3.0.tgz#6e328328f366f66c2a0549a69131bbcd9735f098" - dependencies: - "@zeit/eslint-config-base" "0.3.0" - - "@zeit/git-hooks@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@zeit/git-hooks/-/git-hooks-0.1.4.tgz#70583db5dd69726a62c7963520e67f2c3a33cc5f" - - abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - - abbrev@1.0.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - - acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" - - acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - - acorn@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" - - ajv-keywords@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" - - ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - - align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - - amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - - ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" - - ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - - ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - - ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - - ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - dependencies: - color-convert "^1.9.0" - - arg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arg/-/arg-1.0.1.tgz#892a26d841bd5a64880bbc8f73dd64a705910ca3" - - argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - dependencies: - sprintf-js "~1.0.2" - - array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - - array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - - arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - - asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - - assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - - async@1.x, async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - - asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - - aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - - aws4@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" - - babel-code-frame@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - - balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - - bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - - brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - - browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - - buffer-from@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" - - caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - - callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - - camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - - caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - - center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - - chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - - chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - - chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - - circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - - cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - dependencies: - restore-cursor "^2.0.0" - - cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - - cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - - co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - - coffeescript@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.3.1.tgz#a25f69c251d25805c9842e57fc94bfc453ef6aed" - - color-convert@^1.9.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" - dependencies: - color-name "1.1.1" - - color-name@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" - - combined-stream@1.0.6, combined-stream@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" - dependencies: - delayed-stream "~1.0.0" - - commander@2.15.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - - concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - - concat-stream@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - - core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - - coveralls@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.1.tgz#12e15914eaa29204e56869a5ece7b9e1492d2ae2" - dependencies: - js-yaml "^3.6.1" - lcov-parse "^0.0.10" - log-driver "^1.2.5" - minimist "^1.2.0" - request "^2.79.0" - - cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - - dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - - debug@3.1.0, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - dependencies: - ms "2.0.0" - - decamelize@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - - deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - - del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - - delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - - diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - - doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - dependencies: - esutils "^2.0.2" - - ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - - escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - - escodegen@1.8.x: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - - eslint-scope@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - - eslint-visitor-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" - - eslint@^4.19.1: - version "4.19.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" - dependencies: - ajv "^5.3.0" - babel-code-frame "^6.22.0" - chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" - debug "^3.1.0" - doctrine "^2.1.0" - eslint-scope "^3.7.1" - eslint-visitor-keys "^1.0.0" - espree "^3.5.4" - esquery "^1.0.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.0.1" - ignore "^3.3.3" - imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - pluralize "^7.0.0" - progress "^2.0.0" - regexpp "^1.0.1" - require-uncached "^1.0.3" - semver "^5.3.0" - strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "4.0.2" - text-table "~0.2.0" - - espree@^3.5.4: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" - dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" - - esprima@2.7.x, esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - - esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - - esquery@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" - dependencies: - estraverse "^4.0.0" - - esrecurse@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" - dependencies: - estraverse "^4.1.0" - - estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - - estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - - esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - - extend@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - - external-editor@^2.0.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - - extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - - extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - - fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - - fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - - fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - - figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - dependencies: - escape-string-regexp "^1.0.5" - - file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - - flat-cache@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" - dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" - - forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - - form-data@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" - dependencies: - asynckit "^0.4.0" - combined-stream "1.0.6" - mime-types "^2.1.12" - - fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - - functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - - getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - - glob@7.1.2, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - - glob@^5.0.15: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - - globals@^11.0.1: - version "11.5.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" - - globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - - graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - - growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - - handlebars@^4.0.1: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - - har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - - har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - - has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - - has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - - has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - - he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - - http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - - iconv-lite@^0.4.17: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - dependencies: - safer-buffer ">= 2.1.2 < 3" - - ignore@^3.3.3: - version "3.3.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b" - - imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - - inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - - inherits@2, inherits@^2.0.3, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - - inquirer@^3.0.6: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - - is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - - is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - - is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - - is-path-in-cwd@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" - dependencies: - is-path-inside "^1.0.0" - - is-path-inside@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" - dependencies: - path-is-inside "^1.0.1" - - is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - - is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - - is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - - isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - - isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - - isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - - istanbul@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - - js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - - js-yaml@3.x, js-yaml@^3.6.1, js-yaml@^3.9.1: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - - jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - - json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - - json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - - json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - - json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - - jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - - kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - - lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - - lcov-parse@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" - - levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - - lodash@^4.17.4, lodash@^4.3.0: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - - log-driver@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - - longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - - lru-cache@^4.0.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - - mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - - mime-types@^2.1.12, mime-types@~2.1.17: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - dependencies: - mime-db "~1.33.0" - - mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - - "minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - - minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - - minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - - minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - - mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - - mocha@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" - dependencies: - browser-stdout "1.3.1" - commander "2.15.1" - debug "3.1.0" - diff "3.5.0" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.5" - he "1.1.1" - minimatch "3.0.4" - mkdirp "0.5.1" - supports-color "5.4.0" - - ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - - mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - - natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - - nopt@3.x: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - - oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - - object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - - once@1.x, once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - - onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - dependencies: - mimic-fn "^1.0.0" - - optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - - optionator@^0.8.1, optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - - os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - - path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - - path-is-inside@^1.0.1, path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - - performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - - pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - - pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - - pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - - pluralize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" - - prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - - process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - - progress@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" - - pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - - punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - - qs@~6.5.1: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - - readable-stream@^2.2.2: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - - regexpp@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" - - repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - - request@^2.79.0: - version "2.87.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - - require-uncached@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - - resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - - resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - - restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - - right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - - rimraf@^2.2.8: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - - run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - dependencies: - is-promise "^2.1.0" - - rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - dependencies: - rx-lite "*" - - rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - - safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - - "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - - semver@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - - shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - dependencies: - shebang-regex "^1.0.0" - - shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - - should-equal@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" - dependencies: - should-type "^1.4.0" - - should-format@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" - dependencies: - should-type "^1.3.0" - should-type-adaptors "^1.0.1" - - should-type-adaptors@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" - dependencies: - should-type "^1.3.0" - should-util "^1.0.0" - - should-type@^1.3.0, should-type@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" - - should-util@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063" - - should@^13.2.1: - version "13.2.1" - resolved "https://registry.yarnpkg.com/should/-/should-13.2.1.tgz#84e6ebfbb145c79e0ae42307b25b3f62dcaf574e" - dependencies: - should-equal "^2.0.0" - should-format "^3.0.3" - should-type "^1.4.0" - should-type-adaptors "^1.0.1" - should-util "^1.0.0" - - signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - - slice-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" - dependencies: - is-fullwidth-code-point "^2.0.0" - - source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - - source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - dependencies: - amdefine ">=0.0.4" - - source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - - sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - - sshpk@^1.7.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - safer-buffer "^2.0.2" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - - string-width@^2.1.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - - string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - dependencies: - safe-buffer "~5.1.0" - - strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - - strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - - strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - - supports-color@5.4.0, supports-color@^5.3.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" - dependencies: - has-flag "^3.0.0" - - supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - - supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - - table@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" - dependencies: - ajv "^5.2.3" - ajv-keywords "^2.1.0" - chalk "^2.1.0" - lodash "^4.17.4" - slice-ansi "1.0.0" - string-width "^2.1.1" - - text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - - through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - - tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - dependencies: - os-tmpdir "~1.0.2" - - tough-cookie@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - dependencies: - punycode "^1.4.1" - - tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - - tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - - type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" - - typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - - uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - - uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - - util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - - uuid@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" - - verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - - which@^1.1.1, which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - dependencies: - isexe "^2.0.0" - - window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - - wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - - wordwrap@^1.0.0, wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - - wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - - wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - - write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" - - yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - - yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -Trace: - Error: Command failed. - Exit code: 1 - Command: sh - Arguments: -c mocha --require coffeescript/register - Directory: /src/qix-/node-is-arrayish - Output: - - at ProcessTermError.MessageError (/Users/junon/.yarn/lib/cli.js:186:110) - at new ProcessTermError (/Users/junon/.yarn/lib/cli.js:226:113) - at ChildProcess. (/Users/junon/.yarn/lib/cli.js:30281:17) - at ChildProcess.emit (events.js:127:13) - at maybeClose (internal/child_process.js:933:16) - at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) diff --git a/general/nvim/node_modules/is-stream/index.d.ts b/general/nvim/node_modules/is-stream/index.d.ts deleted file mode 100644 index eee2e83..0000000 --- a/general/nvim/node_modules/is-stream/index.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import * as stream from 'stream'; - -declare const isStream: { - /** - @returns Whether `stream` is a [`Stream`](https://nodejs.org/api/stream.html#stream_stream). - - @example - ``` - import * as fs from 'fs'; - import isStream = require('is-stream'); - - isStream(fs.createReadStream('unicorn.png')); - //=> true - - isStream({}); - //=> false - ``` - */ - (stream: unknown): stream is stream.Stream; - - /** - @returns Whether `stream` is a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable). - - @example - ``` - import * as fs from 'fs'; - import isStream = require('is-stream'); - - isStream.writable(fs.createWriteStrem('unicorn.txt')); - //=> true - ``` - */ - writable(stream: unknown): stream is stream.Writable; - - /** - @returns Whether `stream` is a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable). - - @example - ``` - import * as fs from 'fs'; - import isStream = require('is-stream'); - - isStream.readable(fs.createReadStream('unicorn.png')); - //=> true - ``` - */ - readable(stream: unknown): stream is stream.Readable; - - /** - @returns Whether `stream` is a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex). - - @example - ``` - import {Duplex} from 'stream'; - import isStream = require('is-stream'); - - isStream.duplex(new Duplex()); - //=> true - ``` - */ - duplex(stream: unknown): stream is stream.Duplex; - - /** - @returns Whether `stream` is a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform). - - @example - ``` - import * as fs from 'fs'; - import Stringify = require('streaming-json-stringify'); - import isStream = require('is-stream'); - - isStream.transform(Stringify()); - //=> true - ``` - */ - transform(input: unknown): input is stream.Transform; -}; - -export = isStream; diff --git a/general/nvim/node_modules/is-stream/index.js b/general/nvim/node_modules/is-stream/index.js deleted file mode 100644 index 2e43434..0000000 --- a/general/nvim/node_modules/is-stream/index.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const isStream = stream => - stream !== null && - typeof stream === 'object' && - typeof stream.pipe === 'function'; - -isStream.writable = stream => - isStream(stream) && - stream.writable !== false && - typeof stream._write === 'function' && - typeof stream._writableState === 'object'; - -isStream.readable = stream => - isStream(stream) && - stream.readable !== false && - typeof stream._read === 'function' && - typeof stream._readableState === 'object'; - -isStream.duplex = stream => - isStream.writable(stream) && - isStream.readable(stream); - -isStream.transform = stream => - isStream.duplex(stream) && - typeof stream._transform === 'function'; - -module.exports = isStream; diff --git a/general/nvim/node_modules/is-stream/license b/general/nvim/node_modules/is-stream/license deleted file mode 100644 index fa7ceba..0000000 --- a/general/nvim/node_modules/is-stream/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/general/nvim/node_modules/is-stream/package.json b/general/nvim/node_modules/is-stream/package.json deleted file mode 100644 index c3b5673..0000000 --- a/general/nvim/node_modules/is-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "is-stream", - "version": "2.0.1", - "description": "Check if something is a Node.js stream", - "license": "MIT", - "repository": "sindresorhus/is-stream", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "stream", - "type", - "streams", - "writable", - "readable", - "duplex", - "transform", - "check", - "detect", - "is" - ], - "devDependencies": { - "@types/node": "^11.13.6", - "ava": "^1.4.1", - "tempy": "^0.3.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/general/nvim/node_modules/is-stream/readme.md b/general/nvim/node_modules/is-stream/readme.md deleted file mode 100644 index 19308e7..0000000 --- a/general/nvim/node_modules/is-stream/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# is-stream - -> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) - -## Install - -``` -$ npm install is-stream -``` - -## Usage - -```js -const fs = require('fs'); -const isStream = require('is-stream'); - -isStream(fs.createReadStream('unicorn.png')); -//=> true - -isStream({}); -//=> false -``` - -## API - -### isStream(stream) - -Returns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream). - -#### isStream.writable(stream) - -Returns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable). - -#### isStream.readable(stream) - -Returns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable). - -#### isStream.duplex(stream) - -Returns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex). - -#### isStream.transform(stream) - -Returns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform). - -## Related - -- [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/general/nvim/node_modules/kuler/.travis.yml b/general/nvim/node_modules/kuler/.travis.yml deleted file mode 100644 index 5f98e90..0000000 --- a/general/nvim/node_modules/kuler/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "9" - - "8" - - "6" diff --git a/general/nvim/node_modules/kuler/LICENSE b/general/nvim/node_modules/kuler/LICENSE deleted file mode 100644 index d57b787..0000000 --- a/general/nvim/node_modules/kuler/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2014 Arnout Kazemier - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/general/nvim/node_modules/kuler/README.md b/general/nvim/node_modules/kuler/README.md deleted file mode 100644 index d9a4cb8..0000000 --- a/general/nvim/node_modules/kuler/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# kuler - -Kuler is small and nifty node module that allows you to create terminal based -colors using hex color codes, just like you're used to doing in your CSS. We're -in a modern world now and terminals support more than 16 colors so we are stupid -to not take advantage of this. - -## Installation - -The package is released in the public npm registry and can be installed by -running: - -``` -npm install --save kuler -``` - -## Usage - -To color a string simply pass it the string you want to have colored as first -argument and the color as hex as second argument: - -```js -'use strict'; - -const kuler = require('kuler'); -const str = kuler('foo', '#FF6600'); -``` - -The color code sequence is automatically terminated at the end of the string so -the colors do no bleed to other pieces of text. So doing: - -```js -console.log(kuler('red', '#F00'), 'normal'); -``` - -Will work without any issues. - -## License - -[MIT](LICENSE) diff --git a/general/nvim/node_modules/kuler/index.js b/general/nvim/node_modules/kuler/index.js deleted file mode 100644 index bff36ae..0000000 --- a/general/nvim/node_modules/kuler/index.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -/** - * Kuler: Color text using CSS colors - * - * @constructor - * @param {String} text The text that needs to be styled - * @param {String} color Optional color for alternate API. - * @api public - */ -function Kuler(text, color) { - if (color) return (new Kuler(text)).style(color); - if (!(this instanceof Kuler)) return new Kuler(text); - - this.text = text; -} - -/** - * ANSI color codes. - * - * @type {String} - * @private - */ -Kuler.prototype.prefix = '\x1b['; -Kuler.prototype.suffix = 'm'; - -/** - * Parse a hex color string and parse it to it's RGB equiv. - * - * @param {String} color - * @returns {Array} - * @api private - */ -Kuler.prototype.hex = function hex(color) { - color = color[0] === '#' ? color.substring(1) : color; - - // - // Pre-parse for shorthand hex colors. - // - if (color.length === 3) { - color = color.split(''); - - color[5] = color[2]; // F60##0 - color[4] = color[2]; // F60#00 - color[3] = color[1]; // F60600 - color[2] = color[1]; // F66600 - color[1] = color[0]; // FF6600 - - color = color.join(''); - } - - var r = color.substring(0, 2) - , g = color.substring(2, 4) - , b = color.substring(4, 6); - - return [ parseInt(r, 16), parseInt(g, 16), parseInt(b, 16) ]; -}; - -/** - * Transform a 255 RGB value to an RGV code. - * - * @param {Number} r Red color channel. - * @param {Number} g Green color channel. - * @param {Number} b Blue color channel. - * @returns {String} - * @api public - */ -Kuler.prototype.rgb = function rgb(r, g, b) { - var red = r / 255 * 5 - , green = g / 255 * 5 - , blue = b / 255 * 5; - - return this.ansi(red, green, blue); -}; - -/** - * Turns RGB 0-5 values into a single ANSI code. - * - * @param {Number} r Red color channel. - * @param {Number} g Green color channel. - * @param {Number} b Blue color channel. - * @returns {String} - * @api public - */ -Kuler.prototype.ansi = function ansi(r, g, b) { - var red = Math.round(r) - , green = Math.round(g) - , blue = Math.round(b); - - return 16 + (red * 36) + (green * 6) + blue; -}; - -/** - * Marks an end of color sequence. - * - * @returns {String} Reset sequence. - * @api public - */ -Kuler.prototype.reset = function reset() { - return this.prefix +'39;49'+ this.suffix; -}; - -/** - * Colour the terminal using CSS. - * - * @param {String} color The HEX color code. - * @returns {String} the escape code. - * @api public - */ -Kuler.prototype.style = function style(color) { - return this.prefix +'38;5;'+ this.rgb.apply(this, this.hex(color)) + this.suffix + this.text + this.reset(); -}; - - -// -// Expose the actual interface. -// -module.exports = Kuler; diff --git a/general/nvim/node_modules/kuler/package.json b/general/nvim/node_modules/kuler/package.json deleted file mode 100644 index fe85abc..0000000 --- a/general/nvim/node_modules/kuler/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "kuler", - "version": "2.0.0", - "description": "Color your terminal using CSS/hex color codes", - "main": "index.js", - "scripts": { - "test": "mocha test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/3rd-Eden/kuler" - }, - "keywords": [ - "kuler", - "ansi", - "color", - "colour", - "chalk", - "css", - "hex", - "rgb", - "rgv" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "bugs": { - "url": "https://github.com/3rd-Eden/kuler/issues" - }, - "homepage": "https://github.com/3rd-Eden/kuler", - "devDependencies": { - "assume": "^2.0.1", - "mocha": "^5.1.1" - } -} diff --git a/general/nvim/node_modules/kuler/test.js b/general/nvim/node_modules/kuler/test.js deleted file mode 100644 index c0b1a5b..0000000 --- a/general/nvim/node_modules/kuler/test.js +++ /dev/null @@ -1,23 +0,0 @@ -const { it, describe } = require('mocha'); -const assume = require('assume'); -const kuler = require('./'); - -describe('kuler', function () { - it('renders colors in the terminal', function () { - console.log(' VISUAL INSPECTION'); - console.log(' '+ kuler('red').style('F00')); - console.log(' '+ kuler('black').style('#000')); - console.log(' '+ kuler('white').style('#FFFFFF')); - console.log(' '+ kuler('lime').style('AAFF5B')); - console.log(' '+ kuler('violet').style('#ee82ee')); - console.log(' '+ kuler('purple').style('#800080')); - console.log(' '+ kuler('purple').style('#800080'), 'correctly reset to normal color'); - console.log(' '+ kuler('green', '#008000')); - }); - - describe('#style', function () { - it('has a style method', function () { - assume(kuler('what').style).is.a('function'); - }); - }); -}); diff --git a/general/nvim/node_modules/logform/.babelrc b/general/nvim/node_modules/logform/.babelrc deleted file mode 100644 index 1320b9a..0000000 --- a/general/nvim/node_modules/logform/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["@babel/preset-env"] -} diff --git a/general/nvim/node_modules/logform/.eslintrc b/general/nvim/node_modules/logform/.eslintrc deleted file mode 100644 index 3960796..0000000 --- a/general/nvim/node_modules/logform/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "@dabh/eslint-config-populist", - "rules": { - "no-undefined": 0, - "strict": 0 - } -} diff --git a/general/nvim/node_modules/logform/.gitattributes b/general/nvim/node_modules/logform/.gitattributes deleted file mode 100644 index 1a6bd45..0000000 --- a/general/nvim/node_modules/logform/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -package-lock.json binary diff --git a/general/nvim/node_modules/logform/CHANGELOG.md b/general/nvim/node_modules/logform/CHANGELOG.md deleted file mode 100644 index 4e7f481..0000000 --- a/general/nvim/node_modules/logform/CHANGELOG.md +++ /dev/null @@ -1,256 +0,0 @@ -# CHANGELOG - -### 2.4.0 -**2022/02/12** - -- Updated all dependencies -- [#135] Use CLI levels (not NPM levels) in `CliFormat` (this was likely a typo originally) -- [#134] Expose `safe-stable-stringify` 2.x options as parameters in `JsonOptions` - -### 2.3.2 -**2022/01/09** - -This update, which also used up version number 2.3.1, pinned the version of the `colors` dependency -due to vandalism by a developer of that package, as noted [here](https://www.bleepingcomputer.com/news/security/dev-corrupts-npm-libs-colors-and-faker-breaking-thousands-of-apps/). -[As discussed in the `winston` package](https://github.com/winstonjs/winston/issues/2011), all users should update to this (or a later version, should one exist) ASAP. - -### 2.3.0 -**2021/09/21** - -- Update dependencies -- Removing some superfluous semicolons & commas lint -- Avoid dynamic requires [#117] -- Replace JSON stringify library "fast-safe-stringify" by "safe-stable-stringify" [#98] -- More correctly format errors even if the “message” property is enumerable [#101] -- Fix errors and ms export for browsers [#106] - -### 2.2.0 -**2020/06/21** - -- [#90], [#91] Add option for using stable stringify when formatting as JSON. -- [#84] Add replacer for BigInt on JSON formatter. -- [#79] Timestamp format type definitions can accept functions. -- Update dependencies and fix most of the oustanding npm audit notices. - -### 2.1.2 -**2019/01/31** - -- [#74] Remove all internal symbols before invoking `util.inspect`. - - Related to [#31]. - -### 2.1.1 -**2019/01/29** - -- [#71] Bump logform to be consistent with winston. - - Fixes https://github.com/winstonjs/winston/issues/1584 - -### 2.1.0 -**2019/01/07** - -- [#59], [#68], [#69] Add error normalizing format. -- [#65] When MESSAGE symbol has a value and `{ all: true }` is set, colorize the entire serialized message. - -### 2.0.0 -**2018/12/23** - -- **BREAKING** [#57] Try better fix for [winston#1485]. See: - [New `splat` behavior`](#new-splat-behavior) below. -- [#54] Fix typo in `README.md` -- [#55] Strip info[LEVEL] in prettyPrint. Fixes [#31]. -- [#56] Document built-in formats. -- [#64] Add TypeScript definitions for all format options. - Relates to [#9] and [#48]. - -#### New `splat` behavior - -Previously `splat` would have added a `meta` property for any additional -`info[SPLAT]` beyond the expected number of tokens. - -**As of `logform@2.0.0`,** `format.splat` assumes additional splat paramters -(aka "metas") are objects and merges enumerable properties into the `info`. -e.g. - -``` js -const { format } = require('logform'); -const { splat } = format; -const { MESSAGE, LEVEL, SPLAT } = require('triple-beam'); - -console.log( - // Expects two tokens, but three splat parameters provided. - splat().transform({ - level: 'info', - message: 'Let us %s for %j', - [LEVEL]: 'info', - [MESSAGE]: 'Let us %s for %j', - [SPLAT]: ['objects', { label: 'sure' }, { thisIsMeta: 'wut' }] - }) -); - -// logform@1.x behavior: -// Added "meta" property. -// -// { level: 'info', -// message: 'Let us objects for {"label":"sure"}', -// meta: { thisIsMeta: 'wut' }, -// [Symbol(level)]: 'info', -// [Symbol(message)]: 'Let us %s for %j', -// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] } - -// logform@2.x behavior: -// Enumerable properties assigned into `info`. -// -// { level: 'info', -// message: 'Let us objects for {"label":"sure"}', -// thisIsMeta: 'wut', -// [Symbol(level)]: 'info', -// [Symbol(message)]: 'Let us %s for %j', -// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] } -``` - -The reason for this change is to be consistent with how `winston` itself -handles `meta` objects in its variable-arity conventions. - -**BE ADVISED** previous "metas" that _were not objects_ will very likely lead -to odd behavior. e.g. - -``` js -const { format } = require('logform'); -const { splat } = format; -const { MESSAGE, LEVEL, SPLAT } = require('triple-beam'); - -console.log( - // Expects two tokens, but three splat parameters provided. - splat().transform({ - level: 'info', - message: 'Let us %s for %j', - [LEVEL]: 'info', - [MESSAGE]: 'Let us %s for %j', - // !!NOTICE!! Additional parameters are a string and an Array - [SPLAT]: ['objects', { label: 'sure' }, 'lol', ['ok', 'why']] - }) -); - -// logform@1.x behavior: -// Added "meta" property. -// -// { level: 'info', -// message: 'Let us objects for {"label":"sure"}', -// meta: ['lol', ['ok', 'why']], -// [Symbol(level)]: 'info', -// [Symbol(message)]: 'Let us %s for %j', -// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] } - -// logform@2.x behavior: Enumerable properties assigned into `info`. -// **Strings and Arrays only have NUMERIC enumerable properties!** -// -// { '0': 'ok', -// '1': 'why', -// '2': 'l', -// level: 'info', -// message: 'Let us objects for {"label":"sure"}', -// [Symbol(level)]: 'info', -// [Symbol(message)]: 'Let us %s for %j', -// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] } -``` - -### 1.10.0 -**2018/09/17** - -- [#52] Add types field in package.json. -- [#46], [#49] Changes for splat when there are no tokens present and no splat present. -- [#47], [#53] Expose transpiled code for Browser-only scenarios. - -### 1.9.1 -**2018/06/26** - -- [#39] Don't break when there are % placeholders but no values. -- [#42] Only set `meta` when non-zero additional `SPLAT` arguments are - provided. (Fixes [winstonjs/winston#1358]). - -### 1.9.0 -**2018/06/12** - -- [#38] Migrate functionality from winston Logger to splat format. -- [#37] Match expectations from `winston@2.x` for padLevels. Create a correct `Cli` format with initial state. (Fixes [#36]). - -### 1.8.0 -**2018/06/11** - -- [#35] Use `fast-safe-stringify` for perf and to support circular refs. -- [#34] Colorize level symbol. - -### 1.7.0 -**2018/05/24** - -- [#28] Use more es6-features across the board. -- [#30] Fix combine return value. -- [#29] Add metadata function to format namespace. - -### 1.6.0 -**2018/04/25** - -- [#25] Implement padLevels format. -- [#26] Update `dependencies` and add `node@10` to the travis build of the project. -- [#27] Refactor logform to use triple-beam. - -### 1.5.0 -**2018/04/22** - -- [#23], (@ChrisAlderson) Add ms format to support '+N ms' format. Fixes #20. -- [#24], (@aneilbaboo) Fix `webpack` warnings. -- Add `.travis.yml`. - -### 1.4.2 -**2018/04/19** - -- [#22], (@Jasu) Fix compilation on Babel 6. - -### 1.4.1 -**2018/04/06** - -- [#21], (@dabh) Add tsconfig.json. Fixes #19. - -### 1.4.0 -**2018/03/23** - -- [#14] @iamkirkbater Added Initial Metadata Support. -- Correct JSDoc for printf.js. Fixes #10. - -### 1.3.0 -**2018/03/16** - -- [#18] Expose browser.js for rollup and the like. Fixes [#5]. -- [#13] @dabh Use new version of colors. -- [#15] @dabh Add Typescript typings (ported from DefinitelyTyped). -- [#17], [#16] Fix error messages other typos. - -### 1.2.2 -**2017/12/05** - -- [#4], [#11] Fix timestamp and replace `date-fns` with `fecha` (with test cases) [`@ChrisAlderson`]. - -### 1.2.1 -**2017/10/01** - -- [#3] Strip `info.splat` in `format.simple` to avoid double inclusion. - -### 1.2.0 -**2017/09/30** - -- Transition from `info.raw` to `info[Symbol.for('message')]`. -- Finish `README.md` except for full list of all built-in formats. -- 100% coverage for everything except for `{ align, cli, padLevels }`. - -### 1.1.0 -**2017/09/29** - -- [#2] Add baseline expected formats that were previously exposed as options to `common.log` in `winston@2.x` and below. -- [#2] Introduce `format.combine` to remove inconsistency in behavior between `format(fn0)` and `format(fn0, ...moreFns)`. -- [#2] `README.md` now covers all of the basics for `logform`. - -### 1.0.0 -**2017/09/26** - -- Initial release. - -[winstonjs/winston#1358]: https://github.com/winstonjs/winston/issues/1358 diff --git a/general/nvim/node_modules/logform/LICENSE b/general/nvim/node_modules/logform/LICENSE deleted file mode 100644 index c20a404..0000000 --- a/general/nvim/node_modules/logform/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Charlie Robbins & the Contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/general/nvim/node_modules/logform/README.md b/general/nvim/node_modules/logform/README.md deleted file mode 100644 index f58fe8b..0000000 --- a/general/nvim/node_modules/logform/README.md +++ /dev/null @@ -1,653 +0,0 @@ -# logform - -A mutable object-based log format designed for chaining & objectMode streams. - -``` js -const { format } = require('logform'); - -const alignedWithColorsAndTime = format.combine( - format.colorize(), - format.timestamp(), - format.align(), - format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`) -); -``` - -- [`info` Objects](#info-objects) -- [Understanding formats](#understanding-formats) - - [Combining formats](#combining-formats) - - [Filtering `info` objects](#filtering-info-objects) -- [Formats](#formats) - - [Align](#align) - - [CLI](#cli) - - [Colorize](#colorize) - - [Combine](#combine) - - [Errors](#errors) - - [JSON](#json) - - [Label](#label) - - [Logstash](#logstash) - - [Metadata](#metadata) - - [PadLevels](#padlevels) - - [PrettyPrint](#prettyprint) - - [Printf](#printf) - - [Simple](#simple) - - [Splat](#splat) - - [Timestamp](#timestamp) - - [Uncolorize](#uncolorize) - -## `info` Objects - -The `info` parameter provided to a given format represents a single log -message. The object itself is mutable. Every `info` must have at least the -`level` and `message` properties: - -``` js -const info = { - level: 'info', // Level of the logging message - message: 'Hey! Log something?' // Descriptive message being logged. -} -``` - -Properties **besides level and message** are considered as "`meta`". i.e.: - -``` js -const { level, message, ...meta } = info; -``` - -Several of the formats in `logform` itself add additional properties: - -| Property | Format added by | Description | -| ----------- | --------------- | ----------- | -| `splat` | `splat()` | String interpolation splat for `%d %s`-style messages. | -| `timestamp` | `timestamp()` | timestamp the message was received. | -| `label` | `label()` | Custom label associated with each message. | -| `ms` | `ms()` | Number of milliseconds since the previous log message. | - -As a consumer you may add whatever properties you wish – _internal state is -maintained by `Symbol` properties:_ - -- `Symbol.for('level')` _**(READ-ONLY)**:_ equal to `level` property. - **Is treated as immutable by all code.** -- `Symbol.for('message'):` complete string message set by "finalizing formats": - - `json` - - `logstash` - - `printf` - - `prettyPrint` - - `simple` -- `Symbol.for('splat')`: additional string interpolation arguments. _Used - exclusively by `splat()` format._ - -These Symbols are stored in another package: `triple-beam` so that all -consumers of `logform` can have the same Symbol reference. i.e.: - -``` js -const { LEVEL, MESSAGE, SPLAT } = require('triple-beam'); - -console.log(LEVEL === Symbol.for('level')); -// true - -console.log(MESSAGE === Symbol.for('message')); -// true - -console.log(SPLAT === Symbol.for('splat')); -// true -``` - -## Understanding formats - -Formats are prototypal objects (i.e. class instances) that define a single method: `transform(info, opts)` and return the mutated `info` - -- `info`: an object representing the log message. -- `opts`: setting specific to the current instance of the format. - -They are expected to return one of two things: - -- **An `info` Object** representing the modified `info` argument. Object references need not be preserved if immutability is preferred. All current built-in formats consider `info` mutable, but [immutablejs] is being considered for future releases. -- **A falsey value** indicating that the `info` argument should be ignored by the caller. (See: [Filtering `info` Objects](#filtering-info-objects)) below. - -`logform.format` is designed to be as simple as possible. To define a new format simple pass it a `transform(info, opts)` function to get a new `Format`. - -The named `Format` returned can be used to create as many copies of the given `Format` as desired: - -``` js -const { format } = require('logform'); - -const volume = format((info, opts) => { - if (opts.yell) { - info.message = info.message.toUpperCase(); - } else if (opts.whisper) { - info.message = info.message.toLowerCase(); - } - - return info; -}); - -// `volume` is now a function that returns instances of the format. -const scream = volume({ yell: true }); -console.dir(scream.transform({ - level: 'info', - message: `sorry for making you YELL in your head!` -}, scream.options)); -// { -// level: 'info' -// message: 'SORRY FOR MAKING YOU YELL IN YOUR HEAD!' -// } - -// `volume` can be used multiple times to create different formats. -const whisper = volume({ whisper: true }); -console.dir(whisper.transform({ - level: 'info', - message: `WHY ARE THEY MAKING US YELL SO MUCH!` -}), whisper.options); -// { -// level: 'info' -// message: 'why are they making us yell so much!' -// } -``` - -### Combining formats - -Any number of formats may be combined into a single format using `format.combine`. Since `format.combine` takes no `opts`, as a convenience it returns pre-created instance of the combined format. - -``` js -const { format } = require('logform'); -const { combine, timestamp, label } = format; - -const labelTimestamp = combine( - label({ label: 'right meow!' }), - timestamp() -); - -const info = labelTimestamp.transform({ - level: 'info', - message: 'What time is the testing at?' -}); - -console.dir(info); -// { level: 'info', -// message: 'What time is the testing at?', -// label: 'right meow!', -// timestamp: '2017-09-30T03:57:26.875Z' } -``` - -### Filtering `info` Objects - -If you wish to filter out a given `info` Object completely then simply return a falsey value. - -``` js -const ignorePrivate = format((info, opts) => { - if (info.private) { return false; } - return info; -}); - -console.dir(ignorePrivate.transform({ - level: 'error', - message: 'Public error to share' -})); -// { level: 'error', message: 'Public error to share' } - -console.dir(ignorePrivate.transform({ - level: 'error', - private: true, - message: 'This is super secret - hide it.' -})); -// false -``` - -Use of `format.combine` will respect any falsey values return and stop evaluation of later formats in the series. For example: - -``` js -const { format } = require('logform'); -const { combine, timestamp, label } = format; - -const willNeverThrow = format.combine( - format(info => { return false })(), // Ignores everything - format(info => { throw new Error('Never reached') })() -); - -console.dir(willNeverThrow.transform({ - level: 'info', - message: 'wow such testing' -})) -``` - -## Formats - -### Align - -The `align` format adds a `\t` delimiter before the message to align it in the same place. - -```js -const { format } = require('logform'); - -const alignFormat = format.align(); - -const info = alignFormat.transform({ - level: 'info', - message: 'my message' -}); - -console.log(info); -// { level: 'info', message: '\tmy message' } -``` - -This was previously exposed as `{ align: true }` in `winston < 3.0.0`. - -### CLI - -The `cli` format is a combination of the `colorize` and the `padLevels` formats. It turns a log `info` object into the same format previously available in `winston.cli()` in `winston < 3.0.0`. - -```js -const { format } = require('logform'); -const LEVEL = Symbol.for('level'); - -const cliFormat = format.cli({ colors: { info: 'blue' }}); - -const info = cliFormat.transform({ - [LEVEL]: 'info', - level: 'info', - message: 'my message' -}, { all: true }); - -console.log(info); -// { level: '\u001b[34minfo\u001b[39m', -// message: '\u001b[34m my message\u001b[39m', -// [Symbol(level)]: 'info', -// [Symbol(message)]: -// '\u001b[34minfo\u001b[39m:\u001b[34m my message\u001b[39m' } -``` - -### Colorize - -The `colorize` format adds different colors depending on the log level to the message and/or level. -It accepts the following options: - -* **level**: If set to `true` the color will be applied to the `level`. -* **all**: If set to `true` the color will be applied to the `message` and `level`. -* **message**: If set to `true` the color will be applied to the `message`. -* **colors**: An object containing the colors for the log levels. For example: `{ info: 'blue', error: 'red' }` - -```js -const { format } = require('logform'); -const LEVEL = Symbol.for('level'); - -const colorizeFormat = format.colorize({ colors: { info: 'blue' }}); - -const info = colorizeFormat.transform({ - [LEVEL]: 'info', - level: 'info', - message: 'my message' -}, { all: true }); - -console.log(info); -// { level: '\u001b[34minfo\u001b[39m', -// message: '\u001b[34mmy message\u001b[39m', -// [Symbol(level)]: 'info' } -``` - -This was previously exposed as `{ colorize: true }` to transports in `winston < 3.0.0`. - -### Combine - -The `combine` Format allows to combine multiple formats: - -```js -const { format } = require('logform'); -const { combine, timestamp, json } = format; - -const jsonWithTimestamp = combine( - timestamp(), - json() -); - -const info = jsonWithTimestamp.transform({ - level: 'info', - message: 'my message' -}); - -console.log(info); -// { level: 'info', -// message: 'my message', -// timestamp: '2018-10-02T15:03:14.230Z', -// [Symbol(message)]: -// '{"level":"info","message":"my message","timestamp":"2018-10-02T15:03:14.230Z"}' } -``` - -### Errors - -The `errors` format allows you to pass in an instance of a JavaScript `Error` -directly to the logger. It allows you to specify whether not to include the -stack-trace. - -```js -const { format } = require('logform'); -const { errors } = format; - -const errorsFormat = errors({ stack: true }) - -const info = errorsFormat.transform(new Error('Oh no!')); - -console.log(info); -// Error: Oh no! -// at repl:1:13 -// at ContextifyScript.Script.runInThisContext (vm.js:50:33) -// at REPLServer.defaultEval (repl.js:240:29) -// at bound (domain.js:301:14) -// at REPLServer.runBound [as eval] (domain.js:314:12) -// at REPLServer.onLine (repl.js:468:10) -// at emitOne (events.js:121:20) -// at REPLServer.emit (events.js:211:7) -// at REPLServer.Interface._onLine (readline.js:282:10) -// at REPLServer.Interface._line (readline.js:631:8) -``` - -It will also handle `{ message }` properties as `Error` instances: - -```js -const { format } = require('logform'); -const { errors } = format; - -const errorsFormat = errors({ stack: true }) - -const info = errorsFormat.transform({ - message: new Error('Oh no!') -}); - -console.log(info); -// Error: Oh no! -// at repl:1:13 -// at ContextifyScript.Script.runInThisContext (vm.js:50:33) -// at REPLServer.defaultEval (repl.js:240:29) -// at bound (domain.js:301:14) -// at REPLServer.runBound [as eval] (domain.js:314:12) -// at REPLServer.onLine (repl.js:468:10) -// at emitOne (events.js:121:20) -// at REPLServer.emit (events.js:211:7) -// at REPLServer.Interface._onLine (readline.js:282:10) -// at REPLServer.Interface._line (readline.js:631:8) -``` - -### JSON - -The `json` format uses `safe-stable-stringify` to finalize the message. -It accepts the following options: - -* **replacer**: A function that influences how the `info` is stringified. -* **space**: The number of white space used to format the json. - -```js -const { format } = require('logform'); - -const jsonFormat = format.json(); - -const info = jsonFormat.transform({ - level: 'info', - message: 'my message', -}); -console.log(info); -// { level: 'info', -// message: 'my message', -// [Symbol(message)]: '{"level":"info","message":"my message"}' } -``` - -This was previously exposed as `{ json: true }` to transports in `winston < 3.0.0`. - -### Label - -The `label` format adds the specified `label` before the message or adds it to the `info` object. -It accepts the following options: - -* **label**: A label to be added before the message. -* **message**: If set to `true` the `label` will be added to `info.message`. If set to `false` the `label` will be added as `info.label`. - -```js -const { format } = require('logform'); - -const labelFormat = format.label(); - -const info = labelFormat.transform({ - level: 'info', - message: 'my message' -}, { label: 'my label', message: true }); - -console.log(info); -// { level: 'info', message: '[my label] my message' } -``` - -This was previously exposed as `{ label: 'my label' }` to transports in `winston < 3.0.0`. - -### Logstash - -The `logstash` Format turns a log `info` object into pure JSON with the appropriate logstash options. - -```js -const { format } = require('logform'); -const { logstash, combine, timestamp } = format; - -const logstashFormat = combine( - timestamp(), - logstash() -); - -const info = logstashFormat.transform({ - level: 'info', - message: 'my message' -}); - -console.log(info); -// { level: 'info', -// [Symbol(message)]: -// '{"@message":"my message","@timestamp":"2018-10-02T11:04:52.915Z","@fields":{"level":"info"}}' } -``` - -This was previously exposed as `{ logstash: true }` to transports in `winston < 3.0.0`. - -### Metadata - -The `metadata` format adds a metadata object to collect extraneous data, similar to the metadata object in winston 2.x. -It accepts the following options: - -* **key**: The name of the key used for the metadata object. Defaults to `metadata`. -* **fillExcept**: An array of keys that should not be added to the metadata object. -* **fillWith**: An array of keys that will be added to the metadata object. - -```js -const { format } = require('logform'); - -const metadataFormat = format.metadata(); - -const info = metadataFormat.transform({ - level: 'info', - message: 'my message', - meta: 42 -}); - -console.log(info); -// { level: 'info', message: 'my message', metadata: { meta: 42 } } -``` - -### PadLevels - -The `padLevels` format pads levels to be the same length. - -```js -const { format } = require('logform'); -const LEVEL = Symbol.for('level'); - -const padLevelsFormat = format.padLevels(); - -const info = padLevelsFormat.transform({ - [LEVEL]: 'info', - message: 'my message' -}); - -console.log(info); -// { message: ' my message', [Symbol(level)]: 'info' } -``` - -This was previously exposed as `{ padLevels: true }` to transports in `winston < 3.0.0`. - -### PrettyPrint - -The `prettyPrint` format finalizes the message using `util.inspect`. -It accepts the following options: - -* **depth**: A `number` that specifies the maximum depth of the `info` object being stringified by `util.inspect`. Defaults to `2`. -* **colorize**: Colorizes the message if set to `true`. Defaults to `false`. - -The `prettyPrint` format should not be used in production because it may impact performance negatively and block the event loop. - -> **NOTE:** the `LEVEL`, `MESSAGE`, and `SPLAT` symbols are stripped from the -> output message _by design._ - -This was previously exposed as `{ prettyPrint: true }` to transports in `winston < 3.0.0`. - -```js -const { format } = require('logform'); - -const prettyPrintFormat = format.prettyPrint(); - -const info = prettyPrintFormat.transform({ - [LEVEL]: 'info', - level: 'info', - message: 'my message' -}); - -console.log(info); -// { level: 'info', -// message: 'my message', -// [Symbol(level)]: 'info', -// [Symbol(message)]: '{ level: \'info\', message: \'my message\' }' } -``` - -### Printf - -The `printf` format allows to create a custom logging format: - -```js -const { format } = require('logform'); - -const myFormat = format.printf((info) => { - return `${info.level} ${info.message}`; -}) - -const info = myFormat.transform({ - level: 'info', - message: 'my message' -}); - -console.log(info); -// { level: 'info', -// message: 'my message', -// [Symbol(message)]: 'info my message' } -``` - -### Simple - -The `simple` format finalizes the `info` object using the format: `level: message stringifiedRest`. -```js -const { format } = require('logform'); -const MESSAGE = Symbol.for('message'); - -const simpleFormat = format.simple(); - -const info = simpleFormat.transform({ - level: 'info', - message: 'my message', - number: 123 -}); -console.log(info[MESSAGE]); -// info: my message {number:123} -``` - -### Splat - -The `splat` format transforms the message by using `util.format` to complete any `info.message` provided it has string interpolation tokens. - -```js -const { format } = require('logform'); - -const splatFormat = format.splat(); - -const info = splatFormat.transform({ - level: 'info', - message: 'my message %s', - splat: ['test'] -}); - -console.log(info); -// { level: 'info', message: 'my message test', splat: [ 'test' ] } -``` - -Any additional splat parameters beyond those needed for the `%` tokens -(aka "metas") are assumed to be objects. Their enumerable properties are -merged into the `info`. - -```js -const { format } = require('logform'); - -const splatFormat = format.splat(); - -const info = splatFormat.transform({ - level: 'info', - message: 'my message %s', - splat: ['test', { thisIsMeta: true }] -}); - -console.log(info); -// { level: 'info', -// message: 'my message test', -// thisIsMeta: true, -// splat: [ 'test' ] } -``` - -This was previously exposed implicitly in `winston < 3.0.0`. - -### Timestamp - -The `timestamp` format adds a timestamp to the info. -It accepts the following options: - -* **format**: Either the format as a string accepted by the [fecha](https://github.com/taylorhakes/fecha) module or a function that returns a formatted date. If no format is provided `new Date().toISOString()` will be used. -* **alias**: The name of an alias for the timestamp property, that will be added to the `info` object. - -```js -const { format } = require('logform'); - -const timestampFormat = format.timestamp(); - -const info = timestampFormat.transform({ - level: 'info', - message: 'my message' -}); - -console.log(info); -// { level: 'info', -// message: 'my message', -// timestamp: '2018-10-02T11:47:02.682Z' } -``` - -It was previously available in `winston < 3.0.0` as `{ timestamp: true }` and `{ timestamp: function:String }`. - - -### Uncolorize - -The `uncolorize` format strips colors from `info` objects. -It accepts the following options: - -* **level**: Disables the uncolorize format for `info.level` if set to `false`. -* **message**: Disables the uncolorize format for `info.message` if set to `false`. -* **raw**: Disables the uncolorize format for `info[MESSAGE]` if set to `false`. - -This was previously exposed as `{ stripColors: true }` to transports in `winston < 3.0.0`. - -## Tests - -Tests are written with `mocha`, `assume`, and `nyc`. They can be run with `npm`: - -``` -npm test -``` - -##### LICENSE: MIT -##### AUTHOR: [Charlie Robbins](https://github.com/indexzero) diff --git a/general/nvim/node_modules/logform/align.js b/general/nvim/node_modules/logform/align.js deleted file mode 100644 index 358514b..0000000 --- a/general/nvim/node_modules/logform/align.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -const format = require('./format'); - -/* - * function align (info) - * Returns a new instance of the align Format which adds a `\t` - * delimiter before the message to properly align it in the same place. - * It was previously { align: true } in winston < 3.0.0 - */ -module.exports = format(info => { - info.message = `\t${info.message}`; - return info; -}); diff --git a/general/nvim/node_modules/logform/browser.js b/general/nvim/node_modules/logform/browser.js deleted file mode 100644 index 843044b..0000000 --- a/general/nvim/node_modules/logform/browser.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -/* - * @api public - * @property {function} format - * Both the construction method and set of exposed - * formats. - */ -const format = exports.format = require('././format'); - -/* - * @api public - * @method {function} levels - * Registers the specified levels with logform. - */ -exports.levels = require('././levels'); - -// -// Setup all transports as eager-loaded exports -// so that they are static for the bundlers. -// -Object.defineProperty(format, 'align', { value: require('./align') }); -Object.defineProperty(format, 'cli', { value: require('./cli') }); -Object.defineProperty(format, 'colorize', { value: require('./colorize') }); -Object.defineProperty(format, 'combine', { value: require('./combine') }); -Object.defineProperty(format, 'errors', { value: require('./errors') }); -Object.defineProperty(format, 'json', { value: require('./json') }); -Object.defineProperty(format, 'label', { value: require('./label') }); -Object.defineProperty(format, 'logstash', { value: require('./logstash') }); -Object.defineProperty(format, 'metadata', { value: require('./metadata') }); -Object.defineProperty(format, 'ms', { value: require('./ms') }); -Object.defineProperty(format, 'padLevels', { value: require('./pad-levels') }); -Object.defineProperty(format, 'prettyPrint', { value: require('./pretty-print') }); -Object.defineProperty(format, 'printf', { value: require('./printf') }); -Object.defineProperty(format, 'simple', { value: require('./simple') }); -Object.defineProperty(format, 'splat', { value: require('./splat') }); -Object.defineProperty(format, 'timestamp', { value: require('./timestamp') }); -Object.defineProperty(format, 'uncolorize', { value: require('./uncolorize') }); diff --git a/general/nvim/node_modules/logform/cli.js b/general/nvim/node_modules/logform/cli.js deleted file mode 100644 index 4fc74b7..0000000 --- a/general/nvim/node_modules/logform/cli.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -const { Colorizer } = require('./colorize'); -const { Padder } = require('./pad-levels'); -const { configs, MESSAGE } = require('triple-beam'); - - -/** - * Cli format class that handles initial state for a a separate - * Colorizer and Padder instance. - */ -class CliFormat { - constructor(opts = {}) { - if (!opts.levels) { - opts.levels = configs.cli.levels; - } - - this.colorizer = new Colorizer(opts); - this.padder = new Padder(opts); - this.options = opts; - } - - /* - * function transform (info, opts) - * Attempts to both: - * 1. Pad the { level } - * 2. Colorize the { level, message } - * of the given `logform` info object depending on the `opts`. - */ - transform(info, opts) { - this.colorizer.transform( - this.padder.transform(info, opts), - opts - ); - - info[MESSAGE] = `${info.level}:${info.message}`; - return info; - } -} - -/* - * function cli (opts) - * Returns a new instance of the CLI format that turns a log - * `info` object into the same format previously available - * in `winston.cli()` in `winston < 3.0.0`. - */ -module.exports = opts => new CliFormat(opts); - -// -// Attach the CliFormat for registration purposes -// -module.exports.Format = CliFormat; diff --git a/general/nvim/node_modules/logform/colorize.js b/general/nvim/node_modules/logform/colorize.js deleted file mode 100644 index 0186c6e..0000000 --- a/general/nvim/node_modules/logform/colorize.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict'; - -const colors = require('@colors/colors/safe'); -const { LEVEL, MESSAGE } = require('triple-beam'); - -// -// Fix colors not appearing in non-tty environments -// -colors.enabled = true; - -/** - * @property {RegExp} hasSpace - * Simple regex to check for presence of spaces. - */ -const hasSpace = /\s+/; - -/* - * Colorizer format. Wraps the `level` and/or `message` properties - * of the `info` objects with ANSI color codes based on a few options. - */ -class Colorizer { - constructor(opts = {}) { - if (opts.colors) { - this.addColors(opts.colors); - } - - this.options = opts; - } - - /* - * Adds the colors Object to the set of allColors - * known by the Colorizer - * - * @param {Object} colors Set of color mappings to add. - */ - static addColors(clrs) { - const nextColors = Object.keys(clrs).reduce((acc, level) => { - acc[level] = hasSpace.test(clrs[level]) - ? clrs[level].split(hasSpace) - : clrs[level]; - - return acc; - }, {}); - - Colorizer.allColors = Object.assign({}, Colorizer.allColors || {}, nextColors); - return Colorizer.allColors; - } - - /* - * Adds the colors Object to the set of allColors - * known by the Colorizer - * - * @param {Object} colors Set of color mappings to add. - */ - addColors(clrs) { - return Colorizer.addColors(clrs); - } - - /* - * function colorize (lookup, level, message) - * Performs multi-step colorization using @colors/colors/safe - */ - colorize(lookup, level, message) { - if (typeof message === 'undefined') { - message = level; - } - - // - // If the color for the level is just a string - // then attempt to colorize the message with it. - // - if (!Array.isArray(Colorizer.allColors[lookup])) { - return colors[Colorizer.allColors[lookup]](message); - } - - // - // If it is an Array then iterate over that Array, applying - // the colors function for each item. - // - for (let i = 0, len = Colorizer.allColors[lookup].length; i < len; i++) { - message = colors[Colorizer.allColors[lookup][i]](message); - } - - return message; - } - - /* - * function transform (info, opts) - * Attempts to colorize the { level, message } of the given - * `logform` info object. - */ - transform(info, opts) { - if (opts.all && typeof info[MESSAGE] === 'string') { - info[MESSAGE] = this.colorize(info[LEVEL], info.level, info[MESSAGE]); - } - - if (opts.level || opts.all || !opts.message) { - info.level = this.colorize(info[LEVEL], info.level); - } - - if (opts.all || opts.message) { - info.message = this.colorize(info[LEVEL], info.level, info.message); - } - - return info; - } -} - -/* - * function colorize (info) - * Returns a new instance of the colorize Format that applies - * level colors to `info` objects. This was previously exposed - * as { colorize: true } to transports in `winston < 3.0.0`. - */ -module.exports = opts => new Colorizer(opts); - -// -// Attach the Colorizer for registration purposes -// -module.exports.Colorizer - = module.exports.Format - = Colorizer; diff --git a/general/nvim/node_modules/logform/combine.js b/general/nvim/node_modules/logform/combine.js deleted file mode 100644 index 975482c..0000000 --- a/general/nvim/node_modules/logform/combine.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -const format = require('./format'); - -/* - * function cascade(formats) - * Returns a function that invokes the `._format` function in-order - * for the specified set of `formats`. In this manner we say that Formats - * are "pipe-like", but not a pure pumpify implementation. Since there is no back - * pressure we can remove all of the "readable" plumbing in Node streams. - */ -function cascade(formats) { - if (!formats.every(isValidFormat)) { - return; - } - - return info => { - let obj = info; - for (let i = 0; i < formats.length; i++) { - obj = formats[i].transform(obj, formats[i].options); - if (!obj) { - return false; - } - } - - return obj; - }; -} - -/* - * function isValidFormat(format) - * If the format does not define a `transform` function throw an error - * with more detailed usage. - */ -function isValidFormat(fmt) { - if (typeof fmt.transform !== 'function') { - throw new Error([ - 'No transform function found on format. Did you create a format instance?', - 'const myFormat = format(formatFn);', - 'const instance = myFormat();' - ].join('\n')); - } - - return true; -} - -/* - * function combine (info) - * Returns a new instance of the combine Format which combines the specified - * formats into a new format. This is similar to a pipe-chain in transform streams. - * We choose to combine the prototypes this way because there is no back pressure in - * an in-memory transform chain. - */ -module.exports = (...formats) => { - const combinedFormat = format(cascade(formats)); - const instance = combinedFormat(); - instance.Format = combinedFormat.Format; - return instance; -}; - -// -// Export the cascade method for use in cli and other -// combined formats that should not be assumed to be -// singletons. -// -module.exports.cascade = cascade; diff --git a/general/nvim/node_modules/logform/dist/align.js b/general/nvim/node_modules/logform/dist/align.js deleted file mode 100644 index b4378e2..0000000 --- a/general/nvim/node_modules/logform/dist/align.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var format = require('./format'); -/* - * function align (info) - * Returns a new instance of the align Format which adds a `\t` - * delimiter before the message to properly align it in the same place. - * It was previously { align: true } in winston < 3.0.0 - */ - - -module.exports = format(function (info) { - info.message = "\t".concat(info.message); - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/browser.js b/general/nvim/node_modules/logform/dist/browser.js deleted file mode 100644 index 2e6530b..0000000 --- a/general/nvim/node_modules/logform/dist/browser.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; -/* - * @api public - * @property {function} format - * Both the construction method and set of exposed - * formats. - */ - -var format = exports.format = require('././format'); -/* - * @api public - * @method {function} levels - * Registers the specified levels with logform. - */ - - -exports.levels = require('././levels'); // -// Setup all transports as eager-loaded exports -// so that they are static for the bundlers. -// - -Object.defineProperty(format, 'align', { - value: require('./align') -}); -Object.defineProperty(format, 'cli', { - value: require('./cli') -}); -Object.defineProperty(format, 'colorize', { - value: require('./colorize') -}); -Object.defineProperty(format, 'combine', { - value: require('./combine') -}); -Object.defineProperty(format, 'errors', { - value: require('./errors') -}); -Object.defineProperty(format, 'json', { - value: require('./json') -}); -Object.defineProperty(format, 'label', { - value: require('./label') -}); -Object.defineProperty(format, 'logstash', { - value: require('./logstash') -}); -Object.defineProperty(format, 'metadata', { - value: require('./metadata') -}); -Object.defineProperty(format, 'ms', { - value: require('./ms') -}); -Object.defineProperty(format, 'padLevels', { - value: require('./pad-levels') -}); -Object.defineProperty(format, 'prettyPrint', { - value: require('./pretty-print') -}); -Object.defineProperty(format, 'printf', { - value: require('./printf') -}); -Object.defineProperty(format, 'simple', { - value: require('./simple') -}); -Object.defineProperty(format, 'splat', { - value: require('./splat') -}); -Object.defineProperty(format, 'timestamp', { - value: require('./timestamp') -}); -Object.defineProperty(format, 'uncolorize', { - value: require('./uncolorize') -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/cli.js b/general/nvim/node_modules/logform/dist/cli.js deleted file mode 100644 index ae8a0f3..0000000 --- a/general/nvim/node_modules/logform/dist/cli.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -var _require = require('./colorize'), - Colorizer = _require.Colorizer; - -var _require2 = require('./pad-levels'), - Padder = _require2.Padder; - -var _require3 = require('triple-beam'), - configs = _require3.configs, - MESSAGE = _require3.MESSAGE; -/** - * Cli format class that handles initial state for a a separate - * Colorizer and Padder instance. - */ - - -var CliFormat = /*#__PURE__*/function () { - function CliFormat() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, CliFormat); - - if (!opts.levels) { - opts.levels = configs.cli.levels; - } - - this.colorizer = new Colorizer(opts); - this.padder = new Padder(opts); - this.options = opts; - } - /* - * function transform (info, opts) - * Attempts to both: - * 1. Pad the { level } - * 2. Colorize the { level, message } - * of the given `logform` info object depending on the `opts`. - */ - - - _createClass(CliFormat, [{ - key: "transform", - value: function transform(info, opts) { - this.colorizer.transform(this.padder.transform(info, opts), opts); - info[MESSAGE] = "".concat(info.level, ":").concat(info.message); - return info; - } - }]); - - return CliFormat; -}(); -/* - * function cli (opts) - * Returns a new instance of the CLI format that turns a log - * `info` object into the same format previously available - * in `winston.cli()` in `winston < 3.0.0`. - */ - - -module.exports = function (opts) { - return new CliFormat(opts); -}; // -// Attach the CliFormat for registration purposes -// - - -module.exports.Format = CliFormat; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/colorize.js b/general/nvim/node_modules/logform/dist/colorize.js deleted file mode 100644 index 0b090d3..0000000 --- a/general/nvim/node_modules/logform/dist/colorize.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -var colors = require('@colors/colors/safe'); - -var _require = require('triple-beam'), - LEVEL = _require.LEVEL, - MESSAGE = _require.MESSAGE; // -// Fix colors not appearing in non-tty environments -// - - -colors.enabled = true; -/** - * @property {RegExp} hasSpace - * Simple regex to check for presence of spaces. - */ - -var hasSpace = /\s+/; -/* - * Colorizer format. Wraps the `level` and/or `message` properties - * of the `info` objects with ANSI color codes based on a few options. - */ - -var Colorizer = /*#__PURE__*/function () { - function Colorizer() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Colorizer); - - if (opts.colors) { - this.addColors(opts.colors); - } - - this.options = opts; - } - /* - * Adds the colors Object to the set of allColors - * known by the Colorizer - * - * @param {Object} colors Set of color mappings to add. - */ - - - _createClass(Colorizer, [{ - key: "addColors", - value: - /* - * Adds the colors Object to the set of allColors - * known by the Colorizer - * - * @param {Object} colors Set of color mappings to add. - */ - function addColors(clrs) { - return Colorizer.addColors(clrs); - } - /* - * function colorize (lookup, level, message) - * Performs multi-step colorization using @colors/colors/safe - */ - - }, { - key: "colorize", - value: function colorize(lookup, level, message) { - if (typeof message === 'undefined') { - message = level; - } // - // If the color for the level is just a string - // then attempt to colorize the message with it. - // - - - if (!Array.isArray(Colorizer.allColors[lookup])) { - return colors[Colorizer.allColors[lookup]](message); - } // - // If it is an Array then iterate over that Array, applying - // the colors function for each item. - // - - - for (var i = 0, len = Colorizer.allColors[lookup].length; i < len; i++) { - message = colors[Colorizer.allColors[lookup][i]](message); - } - - return message; - } - /* - * function transform (info, opts) - * Attempts to colorize the { level, message } of the given - * `logform` info object. - */ - - }, { - key: "transform", - value: function transform(info, opts) { - if (opts.all && typeof info[MESSAGE] === 'string') { - info[MESSAGE] = this.colorize(info[LEVEL], info.level, info[MESSAGE]); - } - - if (opts.level || opts.all || !opts.message) { - info.level = this.colorize(info[LEVEL], info.level); - } - - if (opts.all || opts.message) { - info.message = this.colorize(info[LEVEL], info.level, info.message); - } - - return info; - } - }], [{ - key: "addColors", - value: function addColors(clrs) { - var nextColors = Object.keys(clrs).reduce(function (acc, level) { - acc[level] = hasSpace.test(clrs[level]) ? clrs[level].split(hasSpace) : clrs[level]; - return acc; - }, {}); - Colorizer.allColors = Object.assign({}, Colorizer.allColors || {}, nextColors); - return Colorizer.allColors; - } - }]); - - return Colorizer; -}(); -/* - * function colorize (info) - * Returns a new instance of the colorize Format that applies - * level colors to `info` objects. This was previously exposed - * as { colorize: true } to transports in `winston < 3.0.0`. - */ - - -module.exports = function (opts) { - return new Colorizer(opts); -}; // -// Attach the Colorizer for registration purposes -// - - -module.exports.Colorizer = module.exports.Format = Colorizer; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/combine.js b/general/nvim/node_modules/logform/dist/combine.js deleted file mode 100644 index 7b386e6..0000000 --- a/general/nvim/node_modules/logform/dist/combine.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -var format = require('./format'); -/* - * function cascade(formats) - * Returns a function that invokes the `._format` function in-order - * for the specified set of `formats`. In this manner we say that Formats - * are "pipe-like", but not a pure pumpify implementation. Since there is no back - * pressure we can remove all of the "readable" plumbing in Node streams. - */ - - -function cascade(formats) { - if (!formats.every(isValidFormat)) { - return; - } - - return function (info) { - var obj = info; - - for (var i = 0; i < formats.length; i++) { - obj = formats[i].transform(obj, formats[i].options); - - if (!obj) { - return false; - } - } - - return obj; - }; -} -/* - * function isValidFormat(format) - * If the format does not define a `transform` function throw an error - * with more detailed usage. - */ - - -function isValidFormat(fmt) { - if (typeof fmt.transform !== 'function') { - throw new Error(['No transform function found on format. Did you create a format instance?', 'const myFormat = format(formatFn);', 'const instance = myFormat();'].join('\n')); - } - - return true; -} -/* - * function combine (info) - * Returns a new instance of the combine Format which combines the specified - * formats into a new format. This is similar to a pipe-chain in transform streams. - * We choose to combine the prototypes this way because there is no back pressure in - * an in-memory transform chain. - */ - - -module.exports = function () { - for (var _len = arguments.length, formats = new Array(_len), _key = 0; _key < _len; _key++) { - formats[_key] = arguments[_key]; - } - - var combinedFormat = format(cascade(formats)); - var instance = combinedFormat(); - instance.Format = combinedFormat.Format; - return instance; -}; // -// Export the cascade method for use in cli and other -// combined formats that should not be assumed to be -// singletons. -// - - -module.exports.cascade = cascade; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/errors.js b/general/nvim/node_modules/logform/dist/errors.js deleted file mode 100644 index 9d924d2..0000000 --- a/general/nvim/node_modules/logform/dist/errors.js +++ /dev/null @@ -1,43 +0,0 @@ -/* eslint no-undefined: 0 */ -'use strict'; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var format = require('./format'); - -var _require = require('triple-beam'), - LEVEL = _require.LEVEL, - MESSAGE = _require.MESSAGE; -/* - * function errors (info) - * If the `message` property of the `info` object is an instance of `Error`, - * replace the `Error` object its own `message` property. - * - * Optionally, the Error's `stack` property can also be appended to the `info` object. - */ - - -module.exports = format(function (einfo, _ref) { - var stack = _ref.stack; - - if (einfo instanceof Error) { - var _Object$assign; - - var info = Object.assign({}, einfo, (_Object$assign = { - level: einfo.level - }, _defineProperty(_Object$assign, LEVEL, einfo[LEVEL] || einfo.level), _defineProperty(_Object$assign, "message", einfo.message), _defineProperty(_Object$assign, MESSAGE, einfo[MESSAGE] || einfo.message), _Object$assign)); - if (stack) info.stack = einfo.stack; - return info; - } - - if (!(einfo.message instanceof Error)) return einfo; // Assign all enumerable properties and the - // message property from the error provided. - - var err = einfo.message; - Object.assign(einfo, err); - einfo.message = err.message; - einfo[MESSAGE] = err.message; // Assign the stack if requested. - - if (stack) einfo.stack = err.stack; - return einfo; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/format.js b/general/nvim/node_modules/logform/dist/format.js deleted file mode 100644 index a45b04d..0000000 --- a/general/nvim/node_modules/logform/dist/format.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; -/* - * Displays a helpful message and the source of - * the format when it is invalid. - */ - -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } - -function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - -function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var InvalidFormatError = /*#__PURE__*/function (_Error) { - _inherits(InvalidFormatError, _Error); - - var _super = _createSuper(InvalidFormatError); - - function InvalidFormatError(formatFn) { - var _this; - - _classCallCheck(this, InvalidFormatError); - - _this = _super.call(this, "Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ".concat(formatFn.toString().split('\n')[0], "\n")); - Error.captureStackTrace(_assertThisInitialized(_this), InvalidFormatError); - return _this; - } - - return _createClass(InvalidFormatError); -}( /*#__PURE__*/_wrapNativeSuper(Error)); -/* - * function format (formatFn) - * Returns a create function for the `formatFn`. - */ - - -module.exports = function (formatFn) { - if (formatFn.length > 2) { - throw new InvalidFormatError(formatFn); - } - /* - * function Format (options) - * Base prototype which calls a `_format` - * function and pushes the result. - */ - - - function Format() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - this.options = options; - } - - Format.prototype.transform = formatFn; // - // Create a function which returns new instances of - // FormatWrap for simple syntax like: - // - // require('winston').formats.json(); - // - - function createFormatWrap(opts) { - return new Format(opts); - } // - // Expose the FormatWrap through the create function - // for testability. - // - - - createFormatWrap.Format = Format; - return createFormatWrap; -}; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/index.js b/general/nvim/node_modules/logform/dist/index.js deleted file mode 100644 index 5ab44fe..0000000 --- a/general/nvim/node_modules/logform/dist/index.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; -/* - * @api public - * @property {function} format - * Both the construction method and set of exposed - * formats. - */ - -var format = exports.format = require('./format'); -/* - * @api public - * @method {function} levels - * Registers the specified levels with logform. - */ - - -exports.levels = require('./levels'); -/* - * @api private - * method {function} exposeFormat - * Exposes a sub-format on the main format object - * as a lazy-loaded getter. - */ - -function exposeFormat(name, requireFormat) { - Object.defineProperty(format, name, { - get: function get() { - return requireFormat(); - }, - configurable: true - }); -} // -// Setup all transports as lazy-loaded getters. -// - - -exposeFormat('align', function () { - return require('./align'); -}); -exposeFormat('errors', function () { - return require('./errors'); -}); -exposeFormat('cli', function () { - return require('./cli'); -}); -exposeFormat('combine', function () { - return require('./combine'); -}); -exposeFormat('colorize', function () { - return require('./colorize'); -}); -exposeFormat('json', function () { - return require('./json'); -}); -exposeFormat('label', function () { - return require('./label'); -}); -exposeFormat('logstash', function () { - return require('./logstash'); -}); -exposeFormat('metadata', function () { - return require('./metadata'); -}); -exposeFormat('ms', function () { - return require('./ms'); -}); -exposeFormat('padLevels', function () { - return require('./pad-levels'); -}); -exposeFormat('prettyPrint', function () { - return require('./pretty-print'); -}); -exposeFormat('printf', function () { - return require('./printf'); -}); -exposeFormat('simple', function () { - return require('./simple'); -}); -exposeFormat('splat', function () { - return require('./splat'); -}); -exposeFormat('timestamp', function () { - return require('./timestamp'); -}); -exposeFormat('uncolorize', function () { - return require('./uncolorize'); -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/json.js b/general/nvim/node_modules/logform/dist/json.js deleted file mode 100644 index 0e4ff34..0000000 --- a/general/nvim/node_modules/logform/dist/json.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var format = require('./format'); - -var _require = require('triple-beam'), - MESSAGE = _require.MESSAGE; - -var stringify = require('safe-stable-stringify'); -/* - * function replacer (key, value) - * Handles proper stringification of Buffer and bigint output. - */ - - -function replacer(key, value) { - // safe-stable-stringify does support BigInt, however, it doesn't wrap the value in quotes. - // Leading to a loss in fidelity if the resulting string is parsed. - // It would also be a breaking change for logform. - if (typeof value === 'bigint') return value.toString(); - return value; -} -/* - * function json (info) - * Returns a new instance of the JSON format that turns a log `info` - * object into pure JSON. This was previously exposed as { json: true } - * to transports in `winston < 3.0.0`. - */ - - -module.exports = format(function (info, opts) { - var jsonStringify = stringify.configure(opts); - info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space); - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/label.js b/general/nvim/node_modules/logform/dist/label.js deleted file mode 100644 index 6e28f59..0000000 --- a/general/nvim/node_modules/logform/dist/label.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var format = require('./format'); -/* - * function label (info) - * Returns a new instance of the label Format which adds the specified - * `opts.label` before the message. This was previously exposed as - * { label: 'my label' } to transports in `winston < 3.0.0`. - */ - - -module.exports = format(function (info, opts) { - if (opts.message) { - info.message = "[".concat(opts.label, "] ").concat(info.message); - return info; - } - - info.label = opts.label; - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/levels.js b/general/nvim/node_modules/logform/dist/levels.js deleted file mode 100644 index 277ec3f..0000000 --- a/general/nvim/node_modules/logform/dist/levels.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var _require = require('./colorize'), - Colorizer = _require.Colorizer; -/* - * Simple method to register colors with a simpler require - * path within the module. - */ - - -module.exports = function (config) { - Colorizer.addColors(config.colors || config); - return config; -}; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/logstash.js b/general/nvim/node_modules/logform/dist/logstash.js deleted file mode 100644 index df52e4f..0000000 --- a/general/nvim/node_modules/logform/dist/logstash.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var format = require('./format'); - -var _require = require('triple-beam'), - MESSAGE = _require.MESSAGE; - -var jsonStringify = require('safe-stable-stringify'); -/* - * function logstash (info) - * Returns a new instance of the LogStash Format that turns a - * log `info` object into pure JSON with the appropriate logstash - * options. This was previously exposed as { logstash: true } - * to transports in `winston < 3.0.0`. - */ - - -module.exports = format(function (info) { - var logstash = {}; - - if (info.message) { - logstash['@message'] = info.message; - delete info.message; - } - - if (info.timestamp) { - logstash['@timestamp'] = info.timestamp; - delete info.timestamp; - } - - logstash['@fields'] = info; - info[MESSAGE] = jsonStringify(logstash); - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/metadata.js b/general/nvim/node_modules/logform/dist/metadata.js deleted file mode 100644 index cfabc3b..0000000 --- a/general/nvim/node_modules/logform/dist/metadata.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var format = require('./format'); - -function fillExcept(info, fillExceptKeys, metadataKey) { - var savedKeys = fillExceptKeys.reduce(function (acc, key) { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - var metadata = Object.keys(info).reduce(function (acc, key) { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - Object.assign(info, savedKeys, _defineProperty({}, metadataKey, metadata)); - return info; -} - -function fillWith(info, fillWithKeys, metadataKey) { - info[metadataKey] = fillWithKeys.reduce(function (acc, key) { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - return info; -} -/** - * Adds in a "metadata" object to collect extraneous data, similar to the metadata - * object in winston 2.x. - */ - - -module.exports = format(function (info) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var metadataKey = 'metadata'; - - if (opts.key) { - metadataKey = opts.key; - } - - var fillExceptKeys = []; - - if (!opts.fillExcept && !opts.fillWith) { - fillExceptKeys.push('level'); - fillExceptKeys.push('message'); - } - - if (opts.fillExcept) { - fillExceptKeys = opts.fillExcept; - } - - if (fillExceptKeys.length > 0) { - return fillExcept(info, fillExceptKeys, metadataKey); - } - - if (opts.fillWith) { - return fillWith(info, opts.fillWith, metadataKey); - } - - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/ms.js b/general/nvim/node_modules/logform/dist/ms.js deleted file mode 100644 index ba30032..0000000 --- a/general/nvim/node_modules/logform/dist/ms.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -var _this = void 0; - -var format = require('./format'); - -var ms = require('ms'); -/* - * function ms (info) - * Returns an `info` with a `ms` property. The `ms` property holds the Value - * of the time difference between two calls in milliseconds. - */ - - -module.exports = format(function (info) { - var curr = +new Date(); - _this.diff = curr - (_this.prevTime || curr); - _this.prevTime = curr; - info.ms = "+".concat(ms(_this.diff)); - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/pad-levels.js b/general/nvim/node_modules/logform/dist/pad-levels.js deleted file mode 100644 index 985e744..0000000 --- a/general/nvim/node_modules/logform/dist/pad-levels.js +++ /dev/null @@ -1,127 +0,0 @@ -/* eslint no-unused-vars: 0 */ -'use strict'; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -var _require = require('triple-beam'), - configs = _require.configs, - LEVEL = _require.LEVEL, - MESSAGE = _require.MESSAGE; - -var Padder = /*#__PURE__*/function () { - function Padder() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - levels: configs.npm.levels - }; - - _classCallCheck(this, Padder); - - this.paddings = Padder.paddingForLevels(opts.levels, opts.filler); - this.options = opts; - } - /** - * Returns the maximum length of keys in the specified `levels` Object. - * @param {Object} levels Set of all levels to calculate longest level against. - * @returns {Number} Maximum length of the longest level string. - */ - - - _createClass(Padder, [{ - key: "transform", - value: - /** - * Prepends the padding onto the `message` based on the `LEVEL` of - * the `info`. This is based on the behavior of `winston@2` which also - * prepended the level onto the message. - * - * See: https://github.com/winstonjs/winston/blob/2.x/lib/winston/logger.js#L198-L201 - * - * @param {Info} info Logform info object - * @param {Object} opts Options passed along to this instance. - * @returns {Info} Modified logform info object. - */ - function transform(info, opts) { - info.message = "".concat(this.paddings[info[LEVEL]]).concat(info.message); - - if (info[MESSAGE]) { - info[MESSAGE] = "".concat(this.paddings[info[LEVEL]]).concat(info[MESSAGE]); - } - - return info; - } - }], [{ - key: "getLongestLevel", - value: function getLongestLevel(levels) { - var lvls = Object.keys(levels).map(function (level) { - return level.length; - }); - return Math.max.apply(Math, _toConsumableArray(lvls)); - } - /** - * Returns the padding for the specified `level` assuming that the - * maximum length of all levels it's associated with is `maxLength`. - * @param {String} level Level to calculate padding for. - * @param {String} filler Repeatable text to use for padding. - * @param {Number} maxLength Length of the longest level - * @returns {String} Padding string for the `level` - */ - - }, { - key: "paddingForLevel", - value: function paddingForLevel(level, filler, maxLength) { - var targetLen = maxLength + 1 - level.length; - var rep = Math.floor(targetLen / filler.length); - var padding = "".concat(filler).concat(filler.repeat(rep)); - return padding.slice(0, targetLen); - } - /** - * Returns an object with the string paddings for the given `levels` - * using the specified `filler`. - * @param {Object} levels Set of all levels to calculate padding for. - * @param {String} filler Repeatable text to use for padding. - * @returns {Object} Mapping of level to desired padding. - */ - - }, { - key: "paddingForLevels", - value: function paddingForLevels(levels) { - var filler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' '; - var maxLength = Padder.getLongestLevel(levels); - return Object.keys(levels).reduce(function (acc, level) { - acc[level] = Padder.paddingForLevel(level, filler, maxLength); - return acc; - }, {}); - } - }]); - - return Padder; -}(); -/* - * function padLevels (info) - * Returns a new instance of the padLevels Format which pads - * levels to be the same length. This was previously exposed as - * { padLevels: true } to transports in `winston < 3.0.0`. - */ - - -module.exports = function (opts) { - return new Padder(opts); -}; - -module.exports.Padder = module.exports.Format = Padder; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/pretty-print.js b/general/nvim/node_modules/logform/dist/pretty-print.js deleted file mode 100644 index 0d5ed70..0000000 --- a/general/nvim/node_modules/logform/dist/pretty-print.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var inspect = require('util').inspect; - -var format = require('./format'); - -var _require = require('triple-beam'), - LEVEL = _require.LEVEL, - MESSAGE = _require.MESSAGE, - SPLAT = _require.SPLAT; -/* - * function prettyPrint (info) - * Returns a new instance of the prettyPrint Format that "prettyPrint" - * serializes `info` objects. This was previously exposed as - * { prettyPrint: true } to transports in `winston < 3.0.0`. - */ - - -module.exports = format(function (info) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - // - // info[{LEVEL, MESSAGE, SPLAT}] are enumerable here. Since they - // are internal, we remove them before util.inspect so they - // are not printed. - // - var stripped = Object.assign({}, info); // Remark (indexzero): update this technique in April 2019 - // when node@6 is EOL - - delete stripped[LEVEL]; - delete stripped[MESSAGE]; - delete stripped[SPLAT]; - info[MESSAGE] = inspect(stripped, false, opts.depth || null, opts.colorize); - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/printf.js b/general/nvim/node_modules/logform/dist/printf.js deleted file mode 100644 index 77e47ab..0000000 --- a/general/nvim/node_modules/logform/dist/printf.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -var _require = require('triple-beam'), - MESSAGE = _require.MESSAGE; - -var Printf = /*#__PURE__*/function () { - function Printf(templateFn) { - _classCallCheck(this, Printf); - - this.template = templateFn; - } - - _createClass(Printf, [{ - key: "transform", - value: function transform(info) { - info[MESSAGE] = this.template(info); - return info; - } - }]); - - return Printf; -}(); -/* - * function printf (templateFn) - * Returns a new instance of the printf Format that creates an - * intermediate prototype to store the template string-based formatter - * function. - */ - - -module.exports = function (opts) { - return new Printf(opts); -}; - -module.exports.Printf = module.exports.Format = Printf; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/simple.js b/general/nvim/node_modules/logform/dist/simple.js deleted file mode 100644 index 9f1ae08..0000000 --- a/general/nvim/node_modules/logform/dist/simple.js +++ /dev/null @@ -1,37 +0,0 @@ -/* eslint no-undefined: 0 */ -'use strict'; - -var format = require('./format'); - -var _require = require('triple-beam'), - MESSAGE = _require.MESSAGE; - -var jsonStringify = require('safe-stable-stringify'); -/* - * function simple (info) - * Returns a new instance of the simple format TransformStream - * which writes a simple representation of logs. - * - * const { level, message, splat, ...rest } = info; - * - * ${level}: ${message} if rest is empty - * ${level}: ${message} ${JSON.stringify(rest)} otherwise - */ - - -module.exports = format(function (info) { - var stringifiedRest = jsonStringify(Object.assign({}, info, { - level: undefined, - message: undefined, - splat: undefined - })); - var padding = info.padding && info.padding[info.level] || ''; - - if (stringifiedRest !== '{}') { - info[MESSAGE] = "".concat(info.level, ":").concat(padding, " ").concat(info.message, " ").concat(stringifiedRest); - } else { - info[MESSAGE] = "".concat(info.level, ":").concat(padding, " ").concat(info.message); - } - - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/splat.js b/general/nvim/node_modules/logform/dist/splat.js deleted file mode 100644 index 50191df..0000000 --- a/general/nvim/node_modules/logform/dist/splat.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -var util = require('util'); - -var _require = require('triple-beam'), - SPLAT = _require.SPLAT; -/** - * Captures the number of format (i.e. %s strings) in a given string. - * Based on `util.format`, see Node.js source: - * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230 - * @type {RegExp} - */ - - -var formatRegExp = /%[scdjifoO%]/g; -/** - * Captures the number of escaped % signs in a format string (i.e. %s strings). - * @type {RegExp} - */ - -var escapedPercent = /%%/g; - -var Splatter = /*#__PURE__*/function () { - function Splatter(opts) { - _classCallCheck(this, Splatter); - - this.options = opts; - } - /** - * Check to see if tokens <= splat.length, assign { splat, meta } into the - * `info` accordingly, and write to this instance. - * - * @param {Info} info Logform info message. - * @param {String[]} tokens Set of string interpolation tokens. - * @returns {Info} Modified info message - * @private - */ - - - _createClass(Splatter, [{ - key: "_splat", - value: function _splat(info, tokens) { - var msg = info.message; - var splat = info[SPLAT] || info.splat || []; - var percents = msg.match(escapedPercent); - var escapes = percents && percents.length || 0; // The expected splat is the number of tokens minus the number of escapes - // e.g. - // - { expectedSplat: 3 } '%d %s %j' - // - { expectedSplat: 5 } '[%s] %d%% %d%% %s %j' - // - // Any "meta" will be arugments in addition to the expected splat size - // regardless of type. e.g. - // - // logger.log('info', '%d%% %s %j', 100, 'wow', { such: 'js' }, { thisIsMeta: true }); - // would result in splat of four (4), but only three (3) are expected. Therefore: - // - // extraSplat = 3 - 4 = -1 - // metas = [100, 'wow', { such: 'js' }, { thisIsMeta: true }].splice(-1, -1 * -1); - // splat = [100, 'wow', { such: 'js' }] - - var expectedSplat = tokens.length - escapes; - var extraSplat = expectedSplat - splat.length; - var metas = extraSplat < 0 ? splat.splice(extraSplat, -1 * extraSplat) : []; // Now that { splat } has been separated from any potential { meta }. we - // can assign this to the `info` object and write it to our format stream. - // If the additional metas are **NOT** objects or **LACK** enumerable properties - // you are going to have a bad time. - - var metalen = metas.length; - - if (metalen) { - for (var i = 0; i < metalen; i++) { - Object.assign(info, metas[i]); - } - } - - info.message = util.format.apply(util, [msg].concat(_toConsumableArray(splat))); - return info; - } - /** - * Transforms the `info` message by using `util.format` to complete - * any `info.message` provided it has string interpolation tokens. - * If no tokens exist then `info` is immutable. - * - * @param {Info} info Logform info message. - * @param {Object} opts Options for this instance. - * @returns {Info} Modified info message - */ - - }, { - key: "transform", - value: function transform(info) { - var msg = info.message; - var splat = info[SPLAT] || info.splat; // No need to process anything if splat is undefined - - if (!splat || !splat.length) { - return info; - } // Extract tokens, if none available default to empty array to - // ensure consistancy in expected results - - - var tokens = msg && msg.match && msg.match(formatRegExp); // This condition will take care of inputs with info[SPLAT] - // but no tokens present - - if (!tokens && (splat || splat.length)) { - var metas = splat.length > 1 ? splat.splice(0) : splat; // Now that { splat } has been separated from any potential { meta }. we - // can assign this to the `info` object and write it to our format stream. - // If the additional metas are **NOT** objects or **LACK** enumerable properties - // you are going to have a bad time. - - var metalen = metas.length; - - if (metalen) { - for (var i = 0; i < metalen; i++) { - Object.assign(info, metas[i]); - } - } - - return info; - } - - if (tokens) { - return this._splat(info, tokens); - } - - return info; - } - }]); - - return Splatter; -}(); -/* - * function splat (info) - * Returns a new instance of the splat format TransformStream - * which performs string interpolation from `info` objects. This was - * previously exposed implicitly in `winston < 3.0.0`. - */ - - -module.exports = function (opts) { - return new Splatter(opts); -}; \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/timestamp.js b/general/nvim/node_modules/logform/dist/timestamp.js deleted file mode 100644 index fe88b52..0000000 --- a/general/nvim/node_modules/logform/dist/timestamp.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var fecha = require('fecha'); - -var format = require('./format'); -/* - * function timestamp (info) - * Returns a new instance of the timestamp Format which adds a timestamp - * to the info. It was previously available in winston < 3.0.0 as: - * - * - { timestamp: true } // `new Date.toISOString()` - * - { timestamp: function:String } // Value returned by `timestamp()` - */ - - -module.exports = format(function (info) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if (opts.format) { - info.timestamp = typeof opts.format === 'function' ? opts.format() : fecha.format(new Date(), opts.format); - } - - if (!info.timestamp) { - info.timestamp = new Date().toISOString(); - } - - if (opts.alias) { - info[opts.alias] = info.timestamp; - } - - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/dist/uncolorize.js b/general/nvim/node_modules/logform/dist/uncolorize.js deleted file mode 100644 index cf0d256..0000000 --- a/general/nvim/node_modules/logform/dist/uncolorize.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var colors = require('@colors/colors/safe'); - -var format = require('./format'); - -var _require = require('triple-beam'), - MESSAGE = _require.MESSAGE; -/* - * function uncolorize (info) - * Returns a new instance of the uncolorize Format that strips colors - * from `info` objects. This was previously exposed as { stripColors: true } - * to transports in `winston < 3.0.0`. - */ - - -module.exports = format(function (info, opts) { - if (opts.level !== false) { - info.level = colors.strip(info.level); - } - - if (opts.message !== false) { - info.message = colors.strip(info.message); - } - - if (opts.raw !== false && info[MESSAGE]) { - info[MESSAGE] = colors.strip(info[MESSAGE]); - } - - return info; -}); \ No newline at end of file diff --git a/general/nvim/node_modules/logform/errors.js b/general/nvim/node_modules/logform/errors.js deleted file mode 100644 index b71f4de..0000000 --- a/general/nvim/node_modules/logform/errors.js +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint no-undefined: 0 */ -'use strict'; - -const format = require('./format'); -const { LEVEL, MESSAGE } = require('triple-beam'); - -/* - * function errors (info) - * If the `message` property of the `info` object is an instance of `Error`, - * replace the `Error` object its own `message` property. - * - * Optionally, the Error's `stack` property can also be appended to the `info` object. - */ -module.exports = format((einfo, { stack }) => { - if (einfo instanceof Error) { - const info = Object.assign({}, einfo, { - level: einfo.level, - [LEVEL]: einfo[LEVEL] || einfo.level, - message: einfo.message, - [MESSAGE]: einfo[MESSAGE] || einfo.message - }); - - if (stack) info.stack = einfo.stack; - return info; - } - - if (!(einfo.message instanceof Error)) return einfo; - - // Assign all enumerable properties and the - // message property from the error provided. - const err = einfo.message; - Object.assign(einfo, err); - einfo.message = err.message; - einfo[MESSAGE] = err.message; - - // Assign the stack if requested. - if (stack) einfo.stack = err.stack; - return einfo; -}); diff --git a/general/nvim/node_modules/logform/examples/combine.js b/general/nvim/node_modules/logform/examples/combine.js deleted file mode 100644 index 71a70be..0000000 --- a/general/nvim/node_modules/logform/examples/combine.js +++ /dev/null @@ -1,14 +0,0 @@ -const { format } = require('../'); -const { combine, timestamp, label } = format; - -const labelTimestamp = combine( - label({ label: 'right meow!' }), - timestamp() -); - -const info = labelTimestamp.transform({ - level: 'info', - message: 'What time is the testing at?' -}); - -console.dir(info); diff --git a/general/nvim/node_modules/logform/examples/filter.js b/general/nvim/node_modules/logform/examples/filter.js deleted file mode 100644 index 89a1678..0000000 --- a/general/nvim/node_modules/logform/examples/filter.js +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint no-unused-vars: 0 */ - -const { format } = require('../'); -const { combine, timestamp, label } = format; - -const ignorePrivate = format((info, opts) => { - if (info.private) { return false; } - return info; -})(); - -console.dir(ignorePrivate.transform({ - level: 'error', - message: 'Public error to share' -})); - -console.dir(ignorePrivate.transform({ - level: 'error', - private: true, - message: 'This is super secret - hide it.' -})); - -const willNeverThrow = format.combine( - format(info => { return false; })(), // Ignores everything - format(info => { throw new Error('Never reached'); })() -); - -console.dir(willNeverThrow.transform({ - level: 'info', - message: 'wow such testing' -})); diff --git a/general/nvim/node_modules/logform/examples/invalid.js b/general/nvim/node_modules/logform/examples/invalid.js deleted file mode 100644 index bd2b408..0000000 --- a/general/nvim/node_modules/logform/examples/invalid.js +++ /dev/null @@ -1,6 +0,0 @@ -/* eslint no-unused-vars: 0 */ -const { format } = require('../'); - -const invalid = format(function invalid(just, too, many, args) { - return just; -}); diff --git a/general/nvim/node_modules/logform/examples/metadata.js b/general/nvim/node_modules/logform/examples/metadata.js deleted file mode 100644 index 4846f74..0000000 --- a/general/nvim/node_modules/logform/examples/metadata.js +++ /dev/null @@ -1,78 +0,0 @@ -const { format } = require('../'); -const { combine, json, metadata, timestamp } = format; - -// Default Functionality (no options passed) -const defaultFormatter = combine( - timestamp(), - metadata(), - json() -); - -const defaultMessage = defaultFormatter.transform({ - level: 'info', - message: 'This should be a message.', - application: 'Microsoft Office', - store: 'Big Box Store', - purchaseAmount: '9.99' -}); - -console.dir(defaultMessage); - - -// Fill all keys into metadata except those provided -const formattedLogger = combine( - timestamp(), - metadata({ fillExcept: ['message', 'level', 'timestamp'] }), - json() -); - -const fillExceptMessage = formattedLogger.transform({ - level: 'info', - message: 'This should have attached metadata', - category: 'movies', - subCategory: 'action' -}); - -console.dir(fillExceptMessage); - - -// Fill only the keys provided into the object, and also give it a different key -const customMetadataLogger = combine( - timestamp(), - metadata({ fillWith: ['publisher', 'author', 'book'], key: 'bookInfo' }), - json() -); - -const fillWithMessage = customMetadataLogger.transform({ - level: 'debug', - message: 'This message should be outside of the bookInfo object', - publisher: 'Lorem Press', - author: 'Albert Einstein', - book: '4D Chess for Dummies', - label: 'myCustomLabel' -}); - -console.dir(fillWithMessage); - -// Demonstrates Metadata 'chaining' to combine multiple datapoints. -const chainedMetadata = combine( - timestamp(), - metadata({ fillWith: ['publisher', 'author', 'book'], key: 'bookInfo' }), - metadata({ fillWith: ['purchasePrice', 'purchaseDate', 'transactionId'], key: 'transactionInfo' }), - metadata({ fillExcept: ['level', 'message', 'label', 'timestamp'] }), - json() -); - -const chainedMessage = chainedMetadata.transform({ - level: 'debug', - message: 'This message should be outside of the bookInfo object', - publisher: 'Lorem Press', - author: 'Albert Einstein', - book: '4D Chess for Dummies', - label: 'myCustomLabel', - purchasePrice: '9.99', - purchaseDate: '2.10.2018', - transactionId: '123ABC' -}); - -console.dir(chainedMessage); diff --git a/general/nvim/node_modules/logform/examples/padLevels.js b/general/nvim/node_modules/logform/examples/padLevels.js deleted file mode 100644 index 568964d..0000000 --- a/general/nvim/node_modules/logform/examples/padLevels.js +++ /dev/null @@ -1,39 +0,0 @@ -const { format } = require('../'); -const { combine, padLevels, simple } = format; - -const { MESSAGE } = require('triple-beam'); - -const paddedFormat = combine( - padLevels({ - // Uncomment for a custom filler for the padding, defaults to ' '. - // filler: 'foo', - // Levels has to be defined, same as `winston.createLoggers({ levels })`. - levels: { - error: 0, - warn: 1, - info: 2, - http: 3, - verbose: 4, - debug: 5, - silly: 6 - } - }), - simple() -); - -const info = paddedFormat.transform({ - level: 'info', - message: 'This is an info level message.' -}); -const error = paddedFormat.transform({ - level: 'error', - message: 'This is an error level message.' -}); -const verbose = paddedFormat.transform({ - level: 'verbose', - message: 'This is a verbose level message.' -}); - -console.dir(info[MESSAGE]); -console.dir(error[MESSAGE]); -console.dir(verbose[MESSAGE]); diff --git a/general/nvim/node_modules/logform/examples/volume.js b/general/nvim/node_modules/logform/examples/volume.js deleted file mode 100644 index cce36f6..0000000 --- a/general/nvim/node_modules/logform/examples/volume.js +++ /dev/null @@ -1,25 +0,0 @@ -const { format } = require('../'); - -const volume = format((info, opts) => { - if (opts.yell) { - info.message = info.message.toUpperCase(); - } else if (opts.whisper) { - info.message = info.message.toLowerCase(); - } - - return info; -}); - -// `volume` is now a function that returns instances of the format. -const scream = volume({ yell: true }); -console.dir(scream.transform({ - level: 'info', - message: `sorry for making you YELL in your head!` -}, scream.options)); - -// `volume` can be used multiple times to create different formats. -const whisper = volume({ whisper: true }); -console.dir(whisper.transform({ - level: 'info', - message: `WHY ARE THEY MAKING US YELL SO MUCH!` -}, whisper.options)); diff --git a/general/nvim/node_modules/logform/format.js b/general/nvim/node_modules/logform/format.js deleted file mode 100644 index c2294b6..0000000 --- a/general/nvim/node_modules/logform/format.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* - * Displays a helpful message and the source of - * the format when it is invalid. - */ -class InvalidFormatError extends Error { - constructor(formatFn) { - super(`Format functions must be synchronous taking a two arguments: (info, opts) -Found: ${formatFn.toString().split('\n')[0]}\n`); - - Error.captureStackTrace(this, InvalidFormatError); - } -} - -/* - * function format (formatFn) - * Returns a create function for the `formatFn`. - */ -module.exports = formatFn => { - if (formatFn.length > 2) { - throw new InvalidFormatError(formatFn); - } - - /* - * function Format (options) - * Base prototype which calls a `_format` - * function and pushes the result. - */ - function Format(options = {}) { - this.options = options; - } - - Format.prototype.transform = formatFn; - - // - // Create a function which returns new instances of - // FormatWrap for simple syntax like: - // - // require('winston').formats.json(); - // - function createFormatWrap(opts) { - return new Format(opts); - } - - // - // Expose the FormatWrap through the create function - // for testability. - // - createFormatWrap.Format = Format; - return createFormatWrap; -}; diff --git a/general/nvim/node_modules/logform/index.d.ts b/general/nvim/node_modules/logform/index.d.ts deleted file mode 100644 index 02ae253..0000000 --- a/general/nvim/node_modules/logform/index.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -// Type definitions for logform 1.2 -// Project: https://github.com/winstonjs/logform -// Definitions by: DABH -// Definitions: https://github.com/winstonjs/logform -// TypeScript Version: 2.2 - -export interface TransformableInfo { - level: string; - message: string; - [key: string]: any; -} - -export type TransformFunction = (info: TransformableInfo, opts?: any) => TransformableInfo | boolean; -export type Colors = { [key: string]: string | string[] }; // tslint:disable-line interface-over-type-literal -export type FormatWrap = (opts?: any) => Format; - -export class Format { - constructor(opts?: object); - - options?: object; - transform: TransformFunction; -} - -export class Colorizer extends Format { - constructor(opts?: object); - - createColorize: (opts?: object) => Colorizer; - addColors: (colors: Colors) => Colors; - colorize: (level: string, message: string) => string; -} - -export function format(transform: TransformFunction): FormatWrap; - -export function levels(config: object): object; - -export namespace format { - function align(): Format; - function cli(opts?: CliOptions): Format; - function colorize(opts?: ColorizeOptions): Colorizer; - function combine(...formats: Format[]): Format; - function errors(opts?: object): Format; - function json(opts?: JsonOptions): Format; - function label(opts?: LabelOptions): Format; - function logstash(): Format; - function metadata(opts?: MetadataOptions): Format; - function ms(): Format; - function padLevels(opts?: PadLevelsOptions): Format; - function prettyPrint(opts?: PrettyPrintOptions): Format; - function printf(templateFunction: (info: TransformableInfo) => string): Format; - function simple(): Format; - function splat(): Format; - function timestamp(opts?: TimestampOptions): Format; - function uncolorize(opts?: UncolorizeOptions): Format; -} - -export interface CliOptions extends ColorizeOptions, PadLevelsOptions {} - -export interface ColorizeOptions { - /** - * If set to `true` the color will be applied to the `level`. - */ - level?: boolean; - /** - * If set to `true` the color will be applied to the `message` and `level`. - */ - all?: boolean; - /** - * If set to `true` the color will be applied to the `message`. - */ - message?: boolean; - /** - * An object containing the colors for the log levels. For example: `{ info: 'blue', error: 'red' }`. - */ - colors?: Record; -} - -export interface JsonOptions { - /** - * A function that influences how the `info` is stringified. - */ - replacer?: (this: any, key: string, value: any) => any; - /** - * The number of white space used to format the json. - */ - space?: number; - - // The following options come from safe-stable-stringify - // https://github.com/BridgeAR/safe-stable-stringify/blob/main/index.d.ts - - /** - * If `true`, bigint values are converted to a number. Otherwise, they are ignored. - * This option is ignored by default as Logform stringifies BigInt in the default replacer. - * @default true - */ - bigint?: boolean, - /** - * Defines the value for circular references. - * Set to `undefined`, circular properties are not serialized (array entries are replaced with null). - * Set to `Error`, to throw on circular references. - * @default "[Circular]" - */ - circularValue?: string | null | TypeErrorConstructor | ErrorConstructor, - /** - * If `true`, guarantee a deterministic key order instead of relying on the insertion order. - * @default true - */ - deterministic?: boolean, - /** - * Maximum number of entries to serialize per object (at least one). - * The serialized output contains information about how many entries have not been serialized. - * Ignored properties are counted as well (e.g., properties with symbol values). - * Using the array replacer overrules this option. - * @default Infinity - */ - maximumBreadth?: number, - /** - * Maximum number of object nesting levels (at least 1) that will be serialized. - * Objects at the maximum level are serialized as `"[Object]"` and arrays as `"[Array]"`. - * @default Infinity - */ - maximumDepth?: number, -} - -export interface LabelOptions { - /** - * A label to be added before the message. - */ - label?: string; - /** - * If set to `true` the `label` will be added to `info.message`. If set to `false` the `label` - * will be added as `info.label`. - */ - message?: boolean; -} - -export interface MetadataOptions { - /** - * The name of the key used for the metadata object. Defaults to `metadata`. - */ - key?: string; - /** - * An array of keys that should not be added to the metadata object. - */ - fillExcept?: string[]; - /** - * An array of keys that will be added to the metadata object. - */ - fillWith?: string[]; -} - -export interface PadLevelsOptions { - /** - * Log levels. Defaults to `configs.npm.levels` from [triple-beam](https://github.com/winstonjs/triple-beam) - * module. - */ - levels?: Record; -} - -export interface PrettyPrintOptions { - /** - * A `number` that specifies the maximum depth of the `info` object being stringified by - * `util.inspect`. Defaults to `2`. - */ - depth?: number; - /** - * Colorizes the message if set to `true`. Defaults to `false`. - */ - colorize?: boolean; -} - -export interface TimestampOptions { - /** - * Either the format as a string accepted by the [fecha](https://github.com/taylorhakes/fecha) - * module or a function that returns a formatted date. If no format is provided `new - * Date().toISOString()` will be used. - */ - format?: string | (() => string); - /** - * The name of an alias for the timestamp property, that will be added to the `info` object. - */ - alias?: string; -} - -export interface UncolorizeOptions { - /** - * Disables the uncolorize format for `info.level` if set to `false`. - */ - level?: boolean; - /** - * Disables the uncolorize format for `info.message` if set to `false`. - */ - message?: boolean; - /** - * Disables the uncolorize format for `info[MESSAGE]` if set to `false`. - */ - raw?: boolean; -} diff --git a/general/nvim/node_modules/logform/index.js b/general/nvim/node_modules/logform/index.js deleted file mode 100644 index 0edfc05..0000000 --- a/general/nvim/node_modules/logform/index.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* - * @api public - * @property {function} format - * Both the construction method and set of exposed - * formats. - */ -const format = exports.format = require('./format'); - -/* - * @api public - * @method {function} levels - * Registers the specified levels with logform. - */ -exports.levels = require('./levels'); - -/* - * @api private - * method {function} exposeFormat - * Exposes a sub-format on the main format object - * as a lazy-loaded getter. - */ -function exposeFormat(name, requireFormat) { - Object.defineProperty(format, name, { - get() { - return requireFormat(); - }, - configurable: true - }); -} - -// -// Setup all transports as lazy-loaded getters. -// -exposeFormat('align', function () { return require('./align'); }); -exposeFormat('errors', function () { return require('./errors'); }); -exposeFormat('cli', function () { return require('./cli'); }); -exposeFormat('combine', function () { return require('./combine'); }); -exposeFormat('colorize', function () { return require('./colorize'); }); -exposeFormat('json', function () { return require('./json'); }); -exposeFormat('label', function () { return require('./label'); }); -exposeFormat('logstash', function () { return require('./logstash'); }); -exposeFormat('metadata', function () { return require('./metadata'); }); -exposeFormat('ms', function () { return require('./ms'); }); -exposeFormat('padLevels', function () { return require('./pad-levels'); }); -exposeFormat('prettyPrint', function () { return require('./pretty-print'); }); -exposeFormat('printf', function () { return require('./printf'); }); -exposeFormat('simple', function () { return require('./simple'); }); -exposeFormat('splat', function () { return require('./splat'); }); -exposeFormat('timestamp', function () { return require('./timestamp'); }); -exposeFormat('uncolorize', function () { return require('./uncolorize'); }); diff --git a/general/nvim/node_modules/logform/json.js b/general/nvim/node_modules/logform/json.js deleted file mode 100644 index fb91c97..0000000 --- a/general/nvim/node_modules/logform/json.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const format = require('./format'); -const { MESSAGE } = require('triple-beam'); -const stringify = require('safe-stable-stringify'); - -/* - * function replacer (key, value) - * Handles proper stringification of Buffer and bigint output. - */ -function replacer(key, value) { - // safe-stable-stringify does support BigInt, however, it doesn't wrap the value in quotes. - // Leading to a loss in fidelity if the resulting string is parsed. - // It would also be a breaking change for logform. - if (typeof value === 'bigint') - return value.toString(); - return value; -} - -/* - * function json (info) - * Returns a new instance of the JSON format that turns a log `info` - * object into pure JSON. This was previously exposed as { json: true } - * to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts) => { - const jsonStringify = stringify.configure(opts); - info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space); - return info; -}); diff --git a/general/nvim/node_modules/logform/label.js b/general/nvim/node_modules/logform/label.js deleted file mode 100644 index e6127fd..0000000 --- a/general/nvim/node_modules/logform/label.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const format = require('./format'); - -/* - * function label (info) - * Returns a new instance of the label Format which adds the specified - * `opts.label` before the message. This was previously exposed as - * { label: 'my label' } to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts) => { - if (opts.message) { - info.message = `[${opts.label}] ${info.message}`; - return info; - } - - info.label = opts.label; - return info; -}); diff --git a/general/nvim/node_modules/logform/levels.js b/general/nvim/node_modules/logform/levels.js deleted file mode 100644 index 5a7345c..0000000 --- a/general/nvim/node_modules/logform/levels.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -const { Colorizer } = require('./colorize'); - -/* - * Simple method to register colors with a simpler require - * path within the module. - */ -module.exports = config => { - Colorizer.addColors(config.colors || config); - return config; -}; diff --git a/general/nvim/node_modules/logform/logstash.js b/general/nvim/node_modules/logform/logstash.js deleted file mode 100644 index 3493733..0000000 --- a/general/nvim/node_modules/logform/logstash.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const format = require('./format'); -const { MESSAGE } = require('triple-beam'); -const jsonStringify = require('safe-stable-stringify'); - -/* - * function logstash (info) - * Returns a new instance of the LogStash Format that turns a - * log `info` object into pure JSON with the appropriate logstash - * options. This was previously exposed as { logstash: true } - * to transports in `winston < 3.0.0`. - */ -module.exports = format(info => { - const logstash = {}; - if (info.message) { - logstash['@message'] = info.message; - delete info.message; - } - - if (info.timestamp) { - logstash['@timestamp'] = info.timestamp; - delete info.timestamp; - } - - logstash['@fields'] = info; - info[MESSAGE] = jsonStringify(logstash); - return info; -}); diff --git a/general/nvim/node_modules/logform/metadata.js b/general/nvim/node_modules/logform/metadata.js deleted file mode 100644 index dc796db..0000000 --- a/general/nvim/node_modules/logform/metadata.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -const format = require('./format'); - -function fillExcept(info, fillExceptKeys, metadataKey) { - const savedKeys = fillExceptKeys.reduce((acc, key) => { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - const metadata = Object.keys(info).reduce((acc, key) => { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - - Object.assign(info, savedKeys, { - [metadataKey]: metadata - }); - return info; -} - -function fillWith(info, fillWithKeys, metadataKey) { - info[metadataKey] = fillWithKeys.reduce((acc, key) => { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - return info; -} - -/** - * Adds in a "metadata" object to collect extraneous data, similar to the metadata - * object in winston 2.x. - */ -module.exports = format((info, opts = {}) => { - let metadataKey = 'metadata'; - if (opts.key) { - metadataKey = opts.key; - } - - let fillExceptKeys = []; - if (!opts.fillExcept && !opts.fillWith) { - fillExceptKeys.push('level'); - fillExceptKeys.push('message'); - } - - if (opts.fillExcept) { - fillExceptKeys = opts.fillExcept; - } - - if (fillExceptKeys.length > 0) { - return fillExcept(info, fillExceptKeys, metadataKey); - } - - if (opts.fillWith) { - return fillWith(info, opts.fillWith, metadataKey); - } - - return info; -}); diff --git a/general/nvim/node_modules/logform/ms.js b/general/nvim/node_modules/logform/ms.js deleted file mode 100644 index 88830fa..0000000 --- a/general/nvim/node_modules/logform/ms.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const format = require('./format'); -const ms = require('ms'); - -/* - * function ms (info) - * Returns an `info` with a `ms` property. The `ms` property holds the Value - * of the time difference between two calls in milliseconds. - */ -module.exports = format(info => { - const curr = +new Date(); - this.diff = curr - (this.prevTime || curr); - this.prevTime = curr; - info.ms = `+${ms(this.diff)}`; - - return info; -}); diff --git a/general/nvim/node_modules/logform/package.json b/general/nvim/node_modules/logform/package.json deleted file mode 100644 index bcf8d67..0000000 --- a/general/nvim/node_modules/logform/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "logform", - "version": "2.4.0", - "description": "An mutable object-based log format designed for chaining & objectMode streams.", - "main": "index.js", - "browser": "dist/browser.js", - "scripts": { - "lint": "eslint *.js test/*.js examples/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist", - "pretest": "npm run lint && npm run build", - "test": "nyc mocha test/*.test.js", - "build": "rimraf dist && babel *.js -d ./dist", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/winstonjs/logform.git" - }, - "keywords": [ - "winston", - "logging", - "format", - "winstonjs" - ], - "author": "Charlie Robbins ", - "license": "MIT", - "bugs": { - "url": "https://github.com/winstonjs/logform/issues" - }, - "homepage": "https://github.com/winstonjs/logform#readme", - "dependencies": { - "@colors/colors": "1.5.0", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - }, - "devDependencies": { - "@babel/cli": "^7.10.3", - "@babel/core": "^7.10.3", - "@babel/preset-env": "^7.10.3", - "@dabh/eslint-config-populist": "^5.0.0", - "assume": "^2.2.0", - "eslint": "^8.8.0", - "mocha": "^9.2.0", - "nyc": "^15.1.0", - "rimraf": "^3.0.2" - }, - "types": "./index.d.ts" -} diff --git a/general/nvim/node_modules/logform/pad-levels.js b/general/nvim/node_modules/logform/pad-levels.js deleted file mode 100644 index 7db5a9d..0000000 --- a/general/nvim/node_modules/logform/pad-levels.js +++ /dev/null @@ -1,83 +0,0 @@ -/* eslint no-unused-vars: 0 */ -'use strict'; - -const { configs, LEVEL, MESSAGE } = require('triple-beam'); - -class Padder { - constructor(opts = { levels: configs.npm.levels }) { - this.paddings = Padder.paddingForLevels(opts.levels, opts.filler); - this.options = opts; - } - - /** - * Returns the maximum length of keys in the specified `levels` Object. - * @param {Object} levels Set of all levels to calculate longest level against. - * @returns {Number} Maximum length of the longest level string. - */ - static getLongestLevel(levels) { - const lvls = Object.keys(levels).map(level => level.length); - return Math.max(...lvls); - } - - /** - * Returns the padding for the specified `level` assuming that the - * maximum length of all levels it's associated with is `maxLength`. - * @param {String} level Level to calculate padding for. - * @param {String} filler Repeatable text to use for padding. - * @param {Number} maxLength Length of the longest level - * @returns {String} Padding string for the `level` - */ - static paddingForLevel(level, filler, maxLength) { - const targetLen = maxLength + 1 - level.length; - const rep = Math.floor(targetLen / filler.length); - const padding = `${filler}${filler.repeat(rep)}`; - return padding.slice(0, targetLen); - } - - /** - * Returns an object with the string paddings for the given `levels` - * using the specified `filler`. - * @param {Object} levels Set of all levels to calculate padding for. - * @param {String} filler Repeatable text to use for padding. - * @returns {Object} Mapping of level to desired padding. - */ - static paddingForLevels(levels, filler = ' ') { - const maxLength = Padder.getLongestLevel(levels); - return Object.keys(levels).reduce((acc, level) => { - acc[level] = Padder.paddingForLevel(level, filler, maxLength); - return acc; - }, {}); - } - - /** - * Prepends the padding onto the `message` based on the `LEVEL` of - * the `info`. This is based on the behavior of `winston@2` which also - * prepended the level onto the message. - * - * See: https://github.com/winstonjs/winston/blob/2.x/lib/winston/logger.js#L198-L201 - * - * @param {Info} info Logform info object - * @param {Object} opts Options passed along to this instance. - * @returns {Info} Modified logform info object. - */ - transform(info, opts) { - info.message = `${this.paddings[info[LEVEL]]}${info.message}`; - if (info[MESSAGE]) { - info[MESSAGE] = `${this.paddings[info[LEVEL]]}${info[MESSAGE]}`; - } - - return info; - } -} - -/* - * function padLevels (info) - * Returns a new instance of the padLevels Format which pads - * levels to be the same length. This was previously exposed as - * { padLevels: true } to transports in `winston < 3.0.0`. - */ -module.exports = opts => new Padder(opts); - -module.exports.Padder - = module.exports.Format - = Padder; diff --git a/general/nvim/node_modules/logform/pretty-print.js b/general/nvim/node_modules/logform/pretty-print.js deleted file mode 100644 index 2ad3dbe..0000000 --- a/general/nvim/node_modules/logform/pretty-print.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const inspect = require('util').inspect; -const format = require('./format'); -const { LEVEL, MESSAGE, SPLAT } = require('triple-beam'); - -/* - * function prettyPrint (info) - * Returns a new instance of the prettyPrint Format that "prettyPrint" - * serializes `info` objects. This was previously exposed as - * { prettyPrint: true } to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts = {}) => { - // - // info[{LEVEL, MESSAGE, SPLAT}] are enumerable here. Since they - // are internal, we remove them before util.inspect so they - // are not printed. - // - const stripped = Object.assign({}, info); - - // Remark (indexzero): update this technique in April 2019 - // when node@6 is EOL - delete stripped[LEVEL]; - delete stripped[MESSAGE]; - delete stripped[SPLAT]; - - info[MESSAGE] = inspect(stripped, false, opts.depth || null, opts.colorize); - return info; -}); diff --git a/general/nvim/node_modules/logform/printf.js b/general/nvim/node_modules/logform/printf.js deleted file mode 100644 index 4e60bbc..0000000 --- a/general/nvim/node_modules/logform/printf.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -const { MESSAGE } = require('triple-beam'); - -class Printf { - constructor(templateFn) { - this.template = templateFn; - } - - transform(info) { - info[MESSAGE] = this.template(info); - return info; - } -} - -/* - * function printf (templateFn) - * Returns a new instance of the printf Format that creates an - * intermediate prototype to store the template string-based formatter - * function. - */ -module.exports = opts => new Printf(opts); - -module.exports.Printf - = module.exports.Format - = Printf; diff --git a/general/nvim/node_modules/logform/simple.js b/general/nvim/node_modules/logform/simple.js deleted file mode 100644 index af3254b..0000000 --- a/general/nvim/node_modules/logform/simple.js +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint no-undefined: 0 */ -'use strict'; - -const format = require('./format'); -const { MESSAGE } = require('triple-beam'); -const jsonStringify = require('safe-stable-stringify'); - -/* - * function simple (info) - * Returns a new instance of the simple format TransformStream - * which writes a simple representation of logs. - * - * const { level, message, splat, ...rest } = info; - * - * ${level}: ${message} if rest is empty - * ${level}: ${message} ${JSON.stringify(rest)} otherwise - */ -module.exports = format(info => { - const stringifiedRest = jsonStringify(Object.assign({}, info, { - level: undefined, - message: undefined, - splat: undefined - })); - - const padding = info.padding && info.padding[info.level] || ''; - if (stringifiedRest !== '{}') { - info[MESSAGE] = `${info.level}:${padding} ${info.message} ${stringifiedRest}`; - } else { - info[MESSAGE] = `${info.level}:${padding} ${info.message}`; - } - - return info; -}); diff --git a/general/nvim/node_modules/logform/splat.js b/general/nvim/node_modules/logform/splat.js deleted file mode 100644 index 08ff6f7..0000000 --- a/general/nvim/node_modules/logform/splat.js +++ /dev/null @@ -1,132 +0,0 @@ -'use strict'; - -const util = require('util'); -const { SPLAT } = require('triple-beam'); - -/** - * Captures the number of format (i.e. %s strings) in a given string. - * Based on `util.format`, see Node.js source: - * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230 - * @type {RegExp} - */ -const formatRegExp = /%[scdjifoO%]/g; - -/** - * Captures the number of escaped % signs in a format string (i.e. %s strings). - * @type {RegExp} - */ -const escapedPercent = /%%/g; - -class Splatter { - constructor(opts) { - this.options = opts; - } - - /** - * Check to see if tokens <= splat.length, assign { splat, meta } into the - * `info` accordingly, and write to this instance. - * - * @param {Info} info Logform info message. - * @param {String[]} tokens Set of string interpolation tokens. - * @returns {Info} Modified info message - * @private - */ - _splat(info, tokens) { - const msg = info.message; - const splat = info[SPLAT] || info.splat || []; - const percents = msg.match(escapedPercent); - const escapes = percents && percents.length || 0; - - // The expected splat is the number of tokens minus the number of escapes - // e.g. - // - { expectedSplat: 3 } '%d %s %j' - // - { expectedSplat: 5 } '[%s] %d%% %d%% %s %j' - // - // Any "meta" will be arugments in addition to the expected splat size - // regardless of type. e.g. - // - // logger.log('info', '%d%% %s %j', 100, 'wow', { such: 'js' }, { thisIsMeta: true }); - // would result in splat of four (4), but only three (3) are expected. Therefore: - // - // extraSplat = 3 - 4 = -1 - // metas = [100, 'wow', { such: 'js' }, { thisIsMeta: true }].splice(-1, -1 * -1); - // splat = [100, 'wow', { such: 'js' }] - const expectedSplat = tokens.length - escapes; - const extraSplat = expectedSplat - splat.length; - const metas = extraSplat < 0 - ? splat.splice(extraSplat, -1 * extraSplat) - : []; - - // Now that { splat } has been separated from any potential { meta }. we - // can assign this to the `info` object and write it to our format stream. - // If the additional metas are **NOT** objects or **LACK** enumerable properties - // you are going to have a bad time. - const metalen = metas.length; - if (metalen) { - for (let i = 0; i < metalen; i++) { - Object.assign(info, metas[i]); - } - } - - info.message = util.format(msg, ...splat); - return info; - } - - /** - * Transforms the `info` message by using `util.format` to complete - * any `info.message` provided it has string interpolation tokens. - * If no tokens exist then `info` is immutable. - * - * @param {Info} info Logform info message. - * @param {Object} opts Options for this instance. - * @returns {Info} Modified info message - */ - transform(info) { - const msg = info.message; - const splat = info[SPLAT] || info.splat; - - // No need to process anything if splat is undefined - if (!splat || !splat.length) { - return info; - } - - // Extract tokens, if none available default to empty array to - // ensure consistancy in expected results - const tokens = msg && msg.match && msg.match(formatRegExp); - - // This condition will take care of inputs with info[SPLAT] - // but no tokens present - if (!tokens && (splat || splat.length)) { - const metas = splat.length > 1 - ? splat.splice(0) - : splat; - - // Now that { splat } has been separated from any potential { meta }. we - // can assign this to the `info` object and write it to our format stream. - // If the additional metas are **NOT** objects or **LACK** enumerable properties - // you are going to have a bad time. - const metalen = metas.length; - if (metalen) { - for (let i = 0; i < metalen; i++) { - Object.assign(info, metas[i]); - } - } - - return info; - } - - if (tokens) { - return this._splat(info, tokens); - } - - return info; - } -} - -/* - * function splat (info) - * Returns a new instance of the splat format TransformStream - * which performs string interpolation from `info` objects. This was - * previously exposed implicitly in `winston < 3.0.0`. - */ -module.exports = opts => new Splatter(opts); diff --git a/general/nvim/node_modules/logform/timestamp.js b/general/nvim/node_modules/logform/timestamp.js deleted file mode 100644 index 706e488..0000000 --- a/general/nvim/node_modules/logform/timestamp.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const fecha = require('fecha'); -const format = require('./format'); - -/* - * function timestamp (info) - * Returns a new instance of the timestamp Format which adds a timestamp - * to the info. It was previously available in winston < 3.0.0 as: - * - * - { timestamp: true } // `new Date.toISOString()` - * - { timestamp: function:String } // Value returned by `timestamp()` - */ -module.exports = format((info, opts = {}) => { - if (opts.format) { - info.timestamp = typeof opts.format === 'function' - ? opts.format() - : fecha.format(new Date(), opts.format); - } - - if (!info.timestamp) { - info.timestamp = new Date().toISOString(); - } - - if (opts.alias) { - info[opts.alias] = info.timestamp; - } - - return info; -}); diff --git a/general/nvim/node_modules/logform/tsconfig.json b/general/nvim/node_modules/logform/tsconfig.json deleted file mode 100644 index 1d494cf..0000000 --- a/general/nvim/node_modules/logform/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts" - ] -} diff --git a/general/nvim/node_modules/logform/uncolorize.js b/general/nvim/node_modules/logform/uncolorize.js deleted file mode 100644 index 8bd864e..0000000 --- a/general/nvim/node_modules/logform/uncolorize.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -const colors = require('@colors/colors/safe'); -const format = require('./format'); -const { MESSAGE } = require('triple-beam'); - -/* - * function uncolorize (info) - * Returns a new instance of the uncolorize Format that strips colors - * from `info` objects. This was previously exposed as { stripColors: true } - * to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts) => { - if (opts.level !== false) { - info.level = colors.strip(info.level); - } - - if (opts.message !== false) { - info.message = colors.strip(info.message); - } - - if (opts.raw !== false && info[MESSAGE]) { - info[MESSAGE] = colors.strip(info[MESSAGE]); - } - - return info; -}); diff --git a/general/nvim/node_modules/lru-cache/LICENSE b/general/nvim/node_modules/lru-cache/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/general/nvim/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/general/nvim/node_modules/lru-cache/README.md b/general/nvim/node_modules/lru-cache/README.md deleted file mode 100644 index 435dfeb..0000000 --- a/general/nvim/node_modules/lru-cache/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) - -## Installation: - -```javascript -npm install lru-cache --save -``` - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n, key) { return n * 2 + key.length } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = new LRU(options) - , otherCache = new LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -// non-string keys ARE fully supported -// but note that it must be THE SAME object, not -// just a JSON-equivalent object. -var someObject = { a: 1 } -cache.set(someObject, 'a value') -// Object keys are not toString()-ed -cache.set('[object Object]', 'a different value') -assert.equal(cache.get(someObject), 'a value') -// A similar object with same keys/values won't work, -// because it's a different object identity -assert.equal(cache.get({ a: 1 }), undefined) - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. Setting it to a non-number or negative number will - throw a `TypeError`. Setting it to 0 makes it be `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. - Setting this to a negative value will make everything seem old! - Setting it to a non-number will throw a `TypeError`. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n, key){return n.length}`. The default is - `function(){return 1}`, which is fine if you want to store `max` - like-sized things. The item is passed as the first argument, and - the key is passed as the second argumnet. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. -* `noDisposeOnSet` By default, if you set a `dispose()` method, then - it'll be called whenever a `set()` operation overwrites an existing - key. If you set this option, `dispose()` will only be called when a - key falls out of the cache, not when it is overwritten. -* `updateAgeOnGet` When using time-expiring entries with `maxAge`, - setting this to `true` will make each item's effective time update - to the current time whenever it is retrieved from cache, causing it - to not expire. (It can still fall out of cache based on recency of - use, of course.) - -## API - -* `set(key, value, maxAge)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. `maxAge` is optional and overrides the - cache `maxAge` option if provided. - - If the key is not found, `get()` will return `undefined`. - - The key and val can be any value. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `rforEach(function(value,key,cache), [thisp])` - - The same as `cache.forEach(...)` but items are iterated over in - reverse order. (ie, less recently used items are iterated over - first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. - -* `length` - - Return total length of objects in cache taking into account - `length` options function. - -* `itemCount` - - Return total quantity of objects currently in cache. Note, that - `stale` (see options) items are returned as part of this item - count. - -* `dump()` - - Return an array of the cache entries ready for serialization and usage - with 'destinationCache.load(arr)`. - -* `load(cacheEntriesArray)` - - Loads another cache entries array, obtained with `sourceCache.dump()`, - into the cache. The destination cache is reset before loading new entries - -* `prune()` - - Manually iterates over the entire cache proactively pruning old entries diff --git a/general/nvim/node_modules/lru-cache/index.js b/general/nvim/node_modules/lru-cache/index.js deleted file mode 100644 index 573b6b8..0000000 --- a/general/nvim/node_modules/lru-cache/index.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict' - -// A linked list to keep track of recently-used-ness -const Yallist = require('yallist') - -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') - -const naiveLength = () => 1 - -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity - - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } - - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') - - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } - - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } - - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') - - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } - - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength - - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) - } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } - } - - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next - } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } - - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } - - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } - - dumpLru () { - return this[LRU_LIST] - } - - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] - - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) - - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } - - const node = this[CACHE].get(key) - const item = node.value - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - - const hit = new Entry(key, value, len, now, maxAge) - - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value) - - return false - } - - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } - - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } - - get (key) { - return get(this, key, true) - } - - peek (key) { - return get(this, key, false) - } - - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null - - del(this, node) - return node.value - } - - del (key) { - del(this, this[CACHE].get(key)) - } - - load (arr) { - // reset the cache - this.reset() - - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const expiresAt = hit.e || 0 - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v) - else { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } - } - - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value - } -} - -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} - -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } - } -} - -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) - - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) - } -} - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} - -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} - -module.exports = LRUCache diff --git a/general/nvim/node_modules/lru-cache/package.json b/general/nvim/node_modules/lru-cache/package.json deleted file mode 100644 index 43b7502..0000000 --- a/general/nvim/node_modules/lru-cache/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "6.0.0", - "author": "Isaac Z. Schlueter ", - "keywords": [ - "mru", - "lru", - "cache" - ], - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "main": "index.js", - "repository": "git://github.com/isaacs/node-lru-cache.git", - "devDependencies": { - "benchmark": "^2.1.4", - "tap": "^14.10.7" - }, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "files": [ - "index.js" - ], - "engines": { - "node": ">=10" - } -} diff --git a/general/nvim/node_modules/ms/index.js b/general/nvim/node_modules/ms/index.js deleted file mode 100644 index ea734fb..0000000 --- a/general/nvim/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/general/nvim/node_modules/ms/license.md b/general/nvim/node_modules/ms/license.md deleted file mode 100644 index fa5d39b..0000000 --- a/general/nvim/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/general/nvim/node_modules/ms/package.json b/general/nvim/node_modules/ms/package.json deleted file mode 100644 index 4997189..0000000 --- a/general/nvim/node_modules/ms/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "ms", - "version": "2.1.3", - "description": "Tiny millisecond conversion utility", - "repository": "vercel/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "4.18.2", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1", - "prettier": "2.0.5" - } -} diff --git a/general/nvim/node_modules/ms/readme.md b/general/nvim/node_modules/ms/readme.md deleted file mode 100644 index 0fc1abb..0000000 --- a/general/nvim/node_modules/ms/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# ms - -![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/general/nvim/node_modules/neovim/bin/cli.js b/general/nvim/node_modules/neovim/bin/cli.js deleted file mode 100755 index 804a868..0000000 --- a/general/nvim/node_modules/neovim/bin/cli.js +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env node -const { Host } = require('../lib/host'); -const { logger } = require('../lib/utils/logger'); -const { spawnSync } = require('child_process'); -const semver = require('semver'); - -// node -const [, , ...args] = process.argv; - -if (args[0] === '--version') { - // eslint-disable-next-line global-require - const pkg = require('../package.json'); - // eslint-disable-next-line no-console - console.log(pkg.version); - process.exit(0); -} - -if ( - process.env.NVIM_NODE_HOST_DEBUG && - semver.satisfies(process.version, '>=7.6.0 || >=6.12.0 <7.0.0') && - process.execArgv.every(token => token !== '--inspect-brk') -) { - const childHost = spawnSync( - process.execPath, - process.execArgv.concat(['--inspect-brk']).concat(process.argv.slice(1)), - { stdio: 'inherit' } - ); - process.exit(childHost.status); -} - -try { - const host = new Host(args); - host.start({ proc: process }); -} catch (err) { - logger.error(err); -} - -process.on('unhandledRejection', (reason, p) => { - logger.info('Unhandled Rejection at:', p, 'reason:', reason); -}); diff --git a/general/nvim/node_modules/neovim/bin/generate-typescript-interfaces.js b/general/nvim/node_modules/neovim/bin/generate-typescript-interfaces.js deleted file mode 100755 index 32c200f..0000000 --- a/general/nvim/node_modules/neovim/bin/generate-typescript-interfaces.js +++ /dev/null @@ -1,93 +0,0 @@ -const cp = require('child_process'); -const { attach } = require('../lib/attach'); - -const proc = cp.spawn('nvim', ['-u', 'NONE', '--embed', '-n'], { - cwd: __dirname, -}); - -const typeMap = { - String: 'string', - Integer: 'number', - Boolean: 'boolean', - Array: 'Array', - Dictionary: '{}', -}; - -function convertType(type) { - if (typeMap[type]) return typeMap[type]; - const genericMatch = /Of\((\w+)[^)]*\)/.exec(type); - if (genericMatch) { - const t = convertType(genericMatch[1]); - if (/^Array/.test(type)) return `Array<${t}>`; - return `{ [key: string]: ${t}; }`; - } - return type; -} - -function metadataToSignature(method) { - const params = []; - method.parameters.forEach((param, i) => { - let type; - if (i < method.parameterTypes.length) { - type = convertType(method.parameterTypes[i]); - } - params.push(`${method.parameters[i]}: ${type}`); - }); - const rtype = convertType(method.returnType); - // eslint-disable-next-line - const returnTypeString = rtype === 'void' ? rtype : `Promise<${rtype}>`; - return ` ${method.name}(${params.join(', ')}): ${returnTypeString};\n`; -} - -async function main() { - const nvim = attach({ proc }); - const interfaces = { - Neovim: nvim.constructor, - Buffer: nvim.Buffer, - Window: nvim.Window, - Tabpage: nvim.Tabpage, - }; - - // use a similar reference path to other definitely typed declarations - process.stdout.write('interface AttachOptions {\n'); - process.stdout.write(' writer?: NodeJS.WritableStream,\n'); - process.stdout.write(' reader?: NodeJS.ReadableStream,\n'); - process.stdout.write(' proc?: NodeJS.ChildProcess,\n'); - process.stdout.write(' socket?: String,\n'); - process.stdout.write('}\n'); - process.stdout.write( - 'export default function attach(options: AttachOptions): Neovim;\n\n' - ); - - Object.keys(interfaces).forEach(key => { - let name = key; - if (key === 'Neovim') { - name = `${name} extends NodeJS.EventEmitter`; - } - process.stdout.write(`export interface ${name} {\n`); - if (key === 'Neovim') { - process.stdout.write(' quit(): void;\n'); - process.stdout.write(' isApiReady(): Boolean;\n'); - process.stdout.write(' requestApi(): Promise<[integer, any]>;\n'); - } - process.stdout.write(` equals(rhs: ${key}): boolean;\n`); - - Object.keys(interfaces[key].prototype).forEach(methodName => { - const method = interfaces[key].prototype[methodName]; - if (method.metadata) { - process.stdout.write(metadataToSignature(method.metadata)); - } - }); - process.stdout.write('}\n'); - }); - - proc.stdin.end(); -} - -try { - main(); -} catch (err) { - // eslint-disable-next-line no-console - console.error(err); - process.exit(1); -} diff --git a/general/nvim/node_modules/neovim/lib/api/Base.d.ts b/general/nvim/node_modules/neovim/lib/api/Base.d.ts deleted file mode 100644 index 4ef93c3..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Base.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/// -import { EventEmitter } from 'events'; -import { Transport } from '../utils/transport'; -import { Logger } from '../utils/logger'; -import { VimValue } from '../types/VimValue'; -export interface BaseConstructorOptions { - transport?: Transport; - logger?: Logger; - data?: Buffer; - metadata?: any; - client?: any; -} -declare const DO_REQUEST: unique symbol; -export declare class BaseApi extends EventEmitter { - protected transport: Transport; - protected _isReady: Promise; - protected prefix: string; - logger: Logger; - data: Buffer | number; - protected client: any; - constructor({ transport, data, logger, metadata, client, }: BaseConstructorOptions); - protected setTransport(transport: Transport): void; - equals(other: BaseApi): boolean; - [DO_REQUEST]: (name: string, args?: any[]) => Promise; - asyncRequest(name: string, args: any[], stack: string): Promise; - request(name: string, args?: any[]): Promise; - _getArgsByPrefix(...args: any[]): any[]; - /** Retrieves a scoped variable depending on type (using `this.prefix`) */ - getVar(name: string): Promise; - /** Set a scoped variable */ - setVar(name: string, value: VimValue): Promise; - /** Delete a scoped variable */ - deleteVar(name: string): Promise; - /** Retrieves a scoped option depending on type of `this` */ - getOption(name: string): Promise | void; - /** Set scoped option */ - setOption(name: string, value: VimValue): Promise | void; - /** `request` is basically the same except you can choose to wait forpromise to be resolved */ - notify(name: string, args: any[]): void; -} -export {}; diff --git a/general/nvim/node_modules/neovim/lib/api/Base.js b/general/nvim/node_modules/neovim/lib/api/Base.js deleted file mode 100644 index 521debd..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Base.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseApi = void 0; -const events_1 = require("events"); -const DO_REQUEST = Symbol('DO_REQUEST'); -// TODO: -// APIs that should not be allowed to be called directly -// attach/detach should be handled by the API client instead of the -// user directly. -// -// i.e. a plugin that detaches will affect all plugins registered on host -// const EXCLUDED = ['nvim_buf_attach', 'nvim_buf_detach']; -// Instead of dealing with multiple inheritance (or lackof), just extend EE -// Only the Neovim API class should use EE though -class BaseApi extends events_1.EventEmitter { - constructor({ transport, data, logger, metadata, client, }) { - super(); - this[_a] = (name, args = []) => new Promise((resolve, reject) => { - this.transport.request(name, args, (err, res) => { - this.logger.debug(`response -> neovim.api.${name}: ${res}`); - if (err) { - reject(new Error(`${name}: ${err[1]}`)); - } - else { - resolve(res); - } - }); - }); - this.setTransport(transport); - this.data = data; - // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires - this.logger = logger || require('../utils/logger').logger; - this.client = client; - if (metadata) { - Object.defineProperty(this, 'metadata', { value: metadata }); - } - } - setTransport(transport) { - this.transport = transport; - } - equals(other) { - try { - return String(this.data) === String(other.data); - } - catch (e) { - return false; - } - } - asyncRequest(name, args = [], stack) { - return __awaiter(this, void 0, void 0, function* () { - // `this._isReady` is undefined in ExtType classes (i.e. Buffer, Window, Tabpage) - // But this is just for Neovim API, since it's possible to call this method from Neovim class - // before transport is ready. - // Not possible for ExtType classes since they are only created after transport is ready - yield this._isReady; - this.logger.debug(`request -> neovim.api.${name}`); - return this[DO_REQUEST](name, args).catch(err => { - const newError = new Error(err.message); - newError.stack = stack; - this.logger.error(`Error making request to ${name}`, newError); - throw newError; - }); - }); - } - request(name, args = []) { - const error = new Error(`Error making request to ${name}`); - return this.asyncRequest(name, args, error.stack); - } - _getArgsByPrefix(...args) { - const _args = []; - // Check if class is Neovim and if so, should not send `this` as first arg - if (this.prefix !== 'nvim_') { - _args.push(this); - } - return _args.concat(args); - } - /** Retrieves a scoped variable depending on type (using `this.prefix`) */ - getVar(name) { - return __awaiter(this, void 0, void 0, function* () { - const args = this._getArgsByPrefix(name); - return this.request(`${this.prefix}get_var`, args).then(res => res, err => { - if (err && err.message && err.message.includes('not found')) { - return null; - } - throw err; - }); - }); - } - /** Set a scoped variable */ - setVar(name, value) { - const args = this._getArgsByPrefix(name, value); - return this.request(`${this.prefix}set_var`, args); - } - /** Delete a scoped variable */ - deleteVar(name) { - const args = this._getArgsByPrefix(name); - return this.request(`${this.prefix}del_var`, args); - } - /** Retrieves a scoped option depending on type of `this` */ - getOption(name) { - const args = this._getArgsByPrefix(name); - return this.request(`${this.prefix}get_option`, args); - } - /** Set scoped option */ - setOption(name, value) { - const args = this._getArgsByPrefix(name, value); - return this.request(`${this.prefix}set_option`, args); - } - // TODO: Is this necessary? - /** `request` is basically the same except you can choose to wait forpromise to be resolved */ - notify(name, args) { - this.logger.debug(`notify -> neovim.api.${name}`); - this.transport.notify(name, args); - } -} -exports.BaseApi = BaseApi; -_a = DO_REQUEST; diff --git a/general/nvim/node_modules/neovim/lib/api/Buffer.d.ts b/general/nvim/node_modules/neovim/lib/api/Buffer.d.ts deleted file mode 100644 index 8df5b3c..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Buffer.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { BaseApi } from './Base'; -export interface BufferSetLines { - start?: number; - end?: number; - strictIndexing?: boolean; -} -export interface BufferHighlight { - hlGroup?: string; - line?: number; - colStart?: number; - colEnd?: number; - srcId?: number; -} -export interface BufferClearHighlight { - srcId?: number; - lineStart?: number; - lineEnd?: number; -} -export interface BufferClearNamespace { - nsId?: number; - lineStart?: number; - lineEnd?: number; -} -export declare type VirtualTextChunk = [string, string]; -export declare const DETACH: unique symbol; -export declare const ATTACH: unique symbol; -export declare class Buffer extends BaseApi { - prefix: string; - get isAttached(): boolean; - /** - * Attach to buffer to listen to buffer events - * @param sendBuffer Set to true if the initial notification should contain - * the whole buffer. If so, the first notification will be a - * `nvim_buf_lines_event`. Otherwise, the first notification will be - * a `nvim_buf_changedtick_event` - */ - [ATTACH]: (sendBuffer?: boolean, options?: {}) => Promise; - /** - * Detach from buffer to stop listening to buffer events - */ - [DETACH]: () => Promise; - /** - * Get the bufnr of Buffer - */ - get id(): number; - /** Total number of lines in buffer */ - get length(): Promise; - /** Get lines in buffer */ - get lines(): Promise; - /** Gets a changed tick of a buffer */ - get changedtick(): Promise; - get commands(): Promise>; - getCommands(options?: {}): Promise>; - /** Get specific lines of buffer */ - getLines({ start, end, strictIndexing }?: { - start: number; - end: number; - strictIndexing: boolean; - }): Promise; - /** Set lines of buffer given indeces */ - setLines(_lines: string | string[], { start: _start, end: _end, strictIndexing }?: BufferSetLines): Promise; - /** Insert lines at `start` index */ - insert(lines: string[] | string, start: number): Promise; - /** Replace lines starting at `start` index */ - replace(_lines: string[] | string, start: number): Promise; - /** Remove lines at index */ - remove(start: number, end: number, strictIndexing: boolean): Promise; - /** Append a string or list of lines to end of buffer */ - append(lines: string[] | string): Promise; - /** Get buffer name */ - get name(): string | Promise; - /** Set current buffer name */ - set name(value: string | Promise); - /** Is current buffer valid */ - get valid(): Promise; - /** Get mark position given mark name */ - mark(name: string): Promise<[number, number]>; - /** - * Gets a list of buffer-local |mapping| definitions. - */ - getKeymap(mode: string): Promise; - /** - * Checks if a buffer is valid and loaded. See |api-buffer| for - * more info about unloaded buffers. - */ - get loaded(): Promise; - /** - * Returns the byte offset for a line. - * - * Line 1 (index=0) has offset 0. UTF-8 bytes are counted. EOL is - * one byte. 'fileformat' and 'fileencoding' are ignored. The - * line index just after the last line gives the total byte-count - * of the buffer. A final EOL byte is counted if it would be - * written, see 'eol'. - * - * Unlike |line2byte()|, throws error for out-of-bounds indexing. - * Returns -1 for unloaded buffer. - * - * @return {Number} Integer byte offset, or -1 for unloaded buffer. - */ - getOffset(index: number): Promise; - /** - * Adds a highlight to buffer. - * - * Useful for plugins that dynamically generate highlights to a - * buffer (like a semantic highlighter or linter). The function - * adds a single highlight to a buffer. Unlike |matchaddpos()| - * highlights follow changes to line numbering (as lines are - * inserted/removed above the highlighted line), like signs and - * marks do. - * - * Namespaces are used for batch deletion/updating of a set of - * highlights. To create a namespace, use |nvim_create_namespace| - * which returns a namespace id. Pass it in to this function as - * `ns_id` to add highlights to the namespace. All highlights in - * the same namespace can then be cleared with single call to - * |nvim_buf_clear_namespace|. If the highlight never will be - * deleted by an API call, pass `ns_id = -1`. - * - * As a shorthand, `ns_id = 0` can be used to create a new - * namespace for the highlight, the allocated id is then - * returned. If `hl_group` is the empty string no highlight is - * added, but a new `ns_id` is still returned. This is supported - * for backwards compatibility, new code should use - * |nvim_create_namespace| to create a new empty namespace. - */ - addHighlight({ hlGroup: _hlGroup, line, colStart: _start, colEnd: _end, srcId: _srcId, }: BufferHighlight): Promise; - /** - * Deprecated - */ - clearHighlight(args?: BufferClearHighlight): Promise; - /** - * Clears namespaced objects, highlights and virtual text, from a line range - * - * To clear the namespace in the entire buffer, pass in 0 and -1 to line_start and line_end respectively. - * - * @param {Number} nsId Namespace to clear, or -1 to clear all namespaces - * @param {Number} lineStart Start of range of lines to clear - * @param {Number} lineEnd End of range of lines to clear (exclusive) or -1 to clear to end of buffer - */ - clearNamespace(args: BufferClearNamespace): void; - /** - * Set the virtual text (annotation) for a buffer line. - * - * By default (and currently the only option) the text will be - * placed after the buffer text. Virtual text will never cause - * reflow, rather virtual text will be truncated at the end of - * the screen line. The virtual text will begin one cell - * (|lcs-eol| or space) after the ordinary text. - * - * Namespaces are used to support batch deletion/updating of - * virtual text. To create a namespace, use - * |nvim_create_namespace|. Virtual text is cleared using - * |nvim_buf_clear_namespace|. The same `ns_id` can be used for - * both virtual text and highlights added by - * |nvim_buf_add_highlight|, both can then be cleared with a - * single call to |nvim_buf_clear_namespace|. If the virtual text - * never will be cleared by an API call, pass `ns_id = -1`. - * - * As a shorthand, `ns_id = 0` can be used to create a new - * namespace for the virtual text, the allocated id is then - * returned. - * - * @param - * @param {Number} nsId Namespace to use or 0 to create a namespace, or -1 for a ungrouped annotation - * @param {Number} line Line to annotate with virtual text (zero-indexed) - * @param {VirtualTextChunk[]} chunks A list of [text, hl_group] arrays, each - representing a text chunk with specified - highlight. `hl_group` element can be omitted for - no highlight. - * @param {Object} opts Optional parameters. Currently not used. - */ - setVirtualText(nsId: number, line: number, chunks: VirtualTextChunk[], opts?: {}): Promise; - /** - * Listens to buffer for events - */ - listen(eventName: string, cb: Function): Function; - unlisten(eventName: string, cb: Function): void; -} -export interface AsyncBuffer extends Buffer, Promise { -} diff --git a/general/nvim/node_modules/neovim/lib/api/Buffer.js b/general/nvim/node_modules/neovim/lib/api/Buffer.js deleted file mode 100644 index 15de99d..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Buffer.js +++ /dev/null @@ -1,320 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var _a, _b; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Buffer = exports.ATTACH = exports.DETACH = void 0; -const Base_1 = require("./Base"); -const types_1 = require("./types"); -exports.DETACH = Symbol('detachBuffer'); -exports.ATTACH = Symbol('attachBuffer'); -class Buffer extends Base_1.BaseApi { - constructor() { - super(...arguments); - this.prefix = types_1.Metadata[types_1.ExtType.Buffer].prefix; - /** - * Attach to buffer to listen to buffer events - * @param sendBuffer Set to true if the initial notification should contain - * the whole buffer. If so, the first notification will be a - * `nvim_buf_lines_event`. Otherwise, the first notification will be - * a `nvim_buf_changedtick_event` - */ - this[_a] = (sendBuffer = false, options = {}) => __awaiter(this, void 0, void 0, function* () { - if (this.client.isAttached(this)) - return true; - return this.request(`${this.prefix}attach`, [this, sendBuffer, options]); - }); - /** - * Detach from buffer to stop listening to buffer events - */ - this[_b] = () => this.request(`${this.prefix}detach`, [this]); - } - get isAttached() { - return this.client.isAttached(this); - } - /** - * Get the bufnr of Buffer - */ - get id() { - return this.data; - } - /** Total number of lines in buffer */ - get length() { - return this.request(`${this.prefix}line_count`, [this]); - } - /** Get lines in buffer */ - get lines() { - return this.getLines(); - } - /** Gets a changed tick of a buffer */ - get changedtick() { - return this.request(`${this.prefix}get_changedtick`, [this]); - } - get commands() { - return this.getCommands(); - } - getCommands(options = {}) { - return this.request(`${this.prefix}get_commands`, [this, options]); - } - /** Get specific lines of buffer */ - getLines({ start, end, strictIndexing } = { start: 0, end: -1, strictIndexing: true }) { - const indexing = typeof strictIndexing === 'undefined' ? true : strictIndexing; - return this.request(`${this.prefix}get_lines`, [ - this, - start, - end, - indexing, - ]); - } - /** Set lines of buffer given indeces */ - setLines(_lines, { start: _start, end: _end, strictIndexing } = { - strictIndexing: true, - }) { - // TODO: Error checking - // if (typeof start === 'undefined' || typeof end === 'undefined') { - // } - const indexing = typeof strictIndexing === 'undefined' ? true : strictIndexing; - const lines = typeof _lines === 'string' ? [_lines] : _lines; - const end = typeof _end !== 'undefined' ? _end : _start + 1; - return this.request(`${this.prefix}set_lines`, [ - this, - _start, - end, - indexing, - lines, - ]); - } - /** Insert lines at `start` index */ - insert(lines, start) { - return this.setLines(lines, { - start, - end: start, - strictIndexing: true, - }); - } - /** Replace lines starting at `start` index */ - replace(_lines, start) { - const lines = typeof _lines === 'string' ? [_lines] : _lines; - return this.setLines(lines, { - start, - end: start + lines.length, - strictIndexing: false, - }); - } - /** Remove lines at index */ - remove(start, end, strictIndexing) { - return this.setLines([], { start, end, strictIndexing }); - } - /** Append a string or list of lines to end of buffer */ - append(lines) { - return this.setLines(lines, { - start: -1, - end: -1, - strictIndexing: false, - }); - } - /** Get buffer name */ - get name() { - return this.request(`${this.prefix}get_name`, [this]); - } - /** Set current buffer name */ - set name(value) { - this.request(`${this.prefix}set_name`, [this, value]); - } - /** Is current buffer valid */ - get valid() { - return this.request(`${this.prefix}is_valid`, [this]); - } - /** Get mark position given mark name */ - mark(name) { - return this.request(`${this.prefix}get_mark`, [this, name]); - } - // range(start, end) { - // """Return a `Range` object, which represents part of the Buffer.""" - // return Range(this, start, end) - // } - /** - * Gets a list of buffer-local |mapping| definitions. - */ - getKeymap(mode) { - return this.request(`${this.prefix}get_keymap`, [this, mode]); - } - /** - * Checks if a buffer is valid and loaded. See |api-buffer| for - * more info about unloaded buffers. - */ - get loaded() { - return this.request(`${this.prefix}is_loaded`, [this]); - } - /** - * Returns the byte offset for a line. - * - * Line 1 (index=0) has offset 0. UTF-8 bytes are counted. EOL is - * one byte. 'fileformat' and 'fileencoding' are ignored. The - * line index just after the last line gives the total byte-count - * of the buffer. A final EOL byte is counted if it would be - * written, see 'eol'. - * - * Unlike |line2byte()|, throws error for out-of-bounds indexing. - * Returns -1 for unloaded buffer. - * - * @return {Number} Integer byte offset, or -1 for unloaded buffer. - */ - getOffset(index) { - return this.request(`${this.prefix}get_offset`, [this, index]); - } - /** - * Adds a highlight to buffer. - * - * Useful for plugins that dynamically generate highlights to a - * buffer (like a semantic highlighter or linter). The function - * adds a single highlight to a buffer. Unlike |matchaddpos()| - * highlights follow changes to line numbering (as lines are - * inserted/removed above the highlighted line), like signs and - * marks do. - * - * Namespaces are used for batch deletion/updating of a set of - * highlights. To create a namespace, use |nvim_create_namespace| - * which returns a namespace id. Pass it in to this function as - * `ns_id` to add highlights to the namespace. All highlights in - * the same namespace can then be cleared with single call to - * |nvim_buf_clear_namespace|. If the highlight never will be - * deleted by an API call, pass `ns_id = -1`. - * - * As a shorthand, `ns_id = 0` can be used to create a new - * namespace for the highlight, the allocated id is then - * returned. If `hl_group` is the empty string no highlight is - * added, but a new `ns_id` is still returned. This is supported - * for backwards compatibility, new code should use - * |nvim_create_namespace| to create a new empty namespace. - */ - addHighlight({ hlGroup: _hlGroup, line, colStart: _start, colEnd: _end, srcId: _srcId, }) { - const hlGroup = typeof _hlGroup !== 'undefined' ? _hlGroup : ''; - const colEnd = typeof _end !== 'undefined' ? _end : -1; - const colStart = typeof _start !== 'undefined' ? _start : -0; - const srcId = typeof _srcId !== 'undefined' ? _srcId : -1; - return this.request(`${this.prefix}add_highlight`, [ - this, - srcId, - hlGroup, - line, - colStart, - colEnd, - ]); - } - /** - * Deprecated - */ - clearHighlight(args = {}) { - // eslint-disable-next-line no-console - console.warn('`clearHighlight` is deprecated, use ``clearNamespace()` instead'); - const defaults = { - srcId: -1, - lineStart: 0, - lineEnd: -1, - }; - const { srcId, lineStart, lineEnd } = Object.assign(Object.assign({}, defaults), args); - return this.request(`${this.prefix}clear_highlight`, [ - this, - srcId, - lineStart, - lineEnd, - ]); - } - /** - * Clears namespaced objects, highlights and virtual text, from a line range - * - * To clear the namespace in the entire buffer, pass in 0 and -1 to line_start and line_end respectively. - * - * @param {Number} nsId Namespace to clear, or -1 to clear all namespaces - * @param {Number} lineStart Start of range of lines to clear - * @param {Number} lineEnd End of range of lines to clear (exclusive) or -1 to clear to end of buffer - */ - clearNamespace(args) { - const defaults = { - nsId: -1, - lineStart: 0, - lineEnd: -1, - }; - const { nsId, lineStart, lineEnd } = Object.assign(Object.assign({}, defaults), args); - this.request(`${this.prefix}clear_namespace`, [ - this, - nsId, - lineStart, - lineEnd, - ]); - } - /** - * Set the virtual text (annotation) for a buffer line. - * - * By default (and currently the only option) the text will be - * placed after the buffer text. Virtual text will never cause - * reflow, rather virtual text will be truncated at the end of - * the screen line. The virtual text will begin one cell - * (|lcs-eol| or space) after the ordinary text. - * - * Namespaces are used to support batch deletion/updating of - * virtual text. To create a namespace, use - * |nvim_create_namespace|. Virtual text is cleared using - * |nvim_buf_clear_namespace|. The same `ns_id` can be used for - * both virtual text and highlights added by - * |nvim_buf_add_highlight|, both can then be cleared with a - * single call to |nvim_buf_clear_namespace|. If the virtual text - * never will be cleared by an API call, pass `ns_id = -1`. - * - * As a shorthand, `ns_id = 0` can be used to create a new - * namespace for the virtual text, the allocated id is then - * returned. - * - * @param - * @param {Number} nsId Namespace to use or 0 to create a namespace, or -1 for a ungrouped annotation - * @param {Number} line Line to annotate with virtual text (zero-indexed) - * @param {VirtualTextChunk[]} chunks A list of [text, hl_group] arrays, each - representing a text chunk with specified - highlight. `hl_group` element can be omitted for - no highlight. - * @param {Object} opts Optional parameters. Currently not used. - */ - setVirtualText(nsId, line, chunks, opts = {}) { - return this.request(`${this.prefix}set_virtual_text`, [ - this, - nsId, - line, - chunks, - opts, - ]); - } - /** - * Listens to buffer for events - */ - listen(eventName, cb) { - if (!this.isAttached) { - this[exports.ATTACH]().then(attached => { - if (!attached) { - this.unlisten(eventName, cb); - } - }); - } - this.client.attachBuffer(this, eventName, cb); - return () => { - this.unlisten(eventName, cb); - }; - } - unlisten(eventName, cb) { - if (!this.isAttached) - return; - const shouldDetach = this.client.detachBuffer(this, eventName, cb); - if (!shouldDetach) - return; - this[exports.DETACH](); - } -} -exports.Buffer = Buffer; -_a = exports.ATTACH, _b = exports.DETACH; diff --git a/general/nvim/node_modules/neovim/lib/api/Neovim.d.ts b/general/nvim/node_modules/neovim/lib/api/Neovim.d.ts deleted file mode 100644 index 53179d0..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Neovim.d.ts +++ /dev/null @@ -1,620 +0,0 @@ -import { BaseApi } from './Base'; -import { Buffer, AsyncBuffer } from './Buffer'; -import { Tabpage, AsyncTabpage } from './Tabpage'; -import { Window, AsyncWindow } from './Window'; -import { VimValue } from '../types/VimValue'; -import { ApiInfo } from '../types/ApiInfo'; -export interface UiAttachOptions { - rgb?: boolean; - override?: boolean; - ext_cmdline?: boolean; - ext_hlstate?: boolean; - ext_linegrid?: boolean; - ext_messages?: boolean; - ext_multigrid?: boolean; - ext_popupmenu?: boolean; - ext_tabline?: boolean; - ext_wildmenu?: boolean; - ext_termcolors?: boolean; -} -export declare type Ui = UiAttachOptions & { - height: number; - width: number; - chan?: number; -}; -export interface Proc { - ppid: number; - name: string; - pid: number; -} -export interface Channel { - id: number; - stream: string; - stdio?: object; - stderr?: object; - socket?: object; - job?: any; - mode?: string; -} -export interface Command { - bang: boolean; - nargs: string; - range: string; - name: string; - script_id: number; - bar: boolean; - register: boolean; - definition: string; - complete?: null; - addr?: any; - count?: any; - complete_arg?: any; -} -export interface OpenWindowOptions { - relative?: 'editor' | 'win' | 'cursor'; - anchor?: 'NW' | 'NE' | 'SW' | 'SE'; - focusable?: boolean; - row?: number; - col?: number; - win?: number; - external?: boolean; - width: number; - height: number; - bufpos?: [number, number]; - zindex?: number; - style?: 'minimal'; - border?: 'none' | 'single' | 'double' | 'rounded' | 'solid' | 'shadow' | string[]; - noautocmd?: boolean; -} -/** - * Neovim API - */ -export declare class Neovim extends BaseApi { - protected prefix: string; - Buffer: typeof Buffer; - Window: typeof Window; - Tabpage: typeof Tabpage; - /** - * Retrieves nvim API information - */ - get apiInfo(): Promise<[number, ApiInfo]>; - /** - * Gets the current list of buffer handles - * - * Includes unlisted (unloaded/deleted) buffers, like `ls!`. Use `buffer.loaded` - * to check if a buffer is loaded - * - * @return {Buffer[]} List of buffer handles - */ - get buffers(): Promise; - /** - * Gets the current buffer - * - * @return {Buffer} Buffer handle - */ - get buffer(): AsyncBuffer; - /** - * Sets the current buffer - */ - set buffer(buffer: AsyncBuffer); - /** - * Get information about all open channels - * - * @return {Channel[]} Array of channels - */ - get chans(): Promise; - /** - * Gets information about a channel - * - * @param {Number} chan The channel number - * @return {Channel} A channel - */ - getChanInfo(chan: number): Promise; - /** - * Gets a map of buffer-local |user-commands|. - */ - get commands(): Promise; - /** - * Gets a map of buffer-local |user-commands|. - * - * @param {Object} options Optional parameters (currently not used) - * @return {Object} Map of maps describing commands - */ - getCommands(options?: {}): Promise; - /** - * Gets the current list of tabpage handles - * - * @return {Tabpage[]} List of tagpage handles - */ - get tabpages(): Promise; - /** - * Gets the window tabpage - * - * @return {Tabpage} Tagpage that contains the window - */ - get tabpage(): AsyncTabpage; - /** - * Sets the current tabpage - */ - set tabpage(tabpage: AsyncTabpage); - /** - * Gets the current list of window handles - * - * @return {Window[]} List of window handles - */ - get windows(): Promise; - /** - * Gets the current window - * - * @return {Window} Window handle - */ - get window(): AsyncWindow; - /** - * Sets the current window - * - * @param {Window} Window handle - */ - set window(win: AsyncWindow); - /** - * Gets the current list of window handles - * - * @return {Window[]} List of window handles - */ - getWindows(): Promise; - /** - * Gets the current window - * - * @return {Window} Window handle - */ - getWindow(): AsyncWindow; - /** - * Sets the current window - * - * @param {Window} Window handle - */ - setWindow(win: Window): Promise; - /** - * Gets the paths contained in "runtimepath" - * - * @return {String[]} List of paths - */ - get runtimePaths(): Promise; - /** - * Changes the global working directory - * - * @param {String} Directory path - * - */ - set dir(dir: string); - /** - * Gets the current line - * - * @return {String} Current line string - */ - get line(): string | Promise; - /** - * Sets current line - * - * @param {String} line Line contents - */ - set line(line: string | Promise); - /** - * Gets the current line - * - * @return {String} Current line string - */ - getLine(): Promise; - /** - * Sets current line - * - * @param {String} line Line contents - */ - setLine(line: string): Promise; - /** - * Gets a list of global (non-buffer-local) |mapping| definitions. - * - * @param {String} mode Mode short-name ("n", "i", "v", ...) - * @return {Object[]} Array of maparg()-like dictionaries describing mappings. The "buffer" key is always zero. - */ - getKeymap(mode: string): Promise; - /** - * Gets the current mode. |mode()| "blocking" is true if Nvim is waiting for input. - * - * @return {Object} Dictionary { "mode": String, "blocking": Boolean } - */ - get mode(): Promise<{ - mode: string; - blocking: boolean; - }>; - /** - * Gets map of defined colors - * - * @return {Object} Color map - */ - get colorMap(): Promise<{ - [name: string]: number; - }>; - /** - * Get color by name - * - * @param {String} name Color name - * @return {Number} Color value - */ - getColorByName(name: string): Promise; - /** - * Get highlight by name or id - * - * @param {String|Number} nameOrId Name or ID - * @param {Boolean} isRgb Should export RGB colors - * @return {Object} Highlight definition map - */ - getHighlight(nameOrId: string | number, isRgb?: boolean): Promise | void; - /** - * Get highlight definition by name - * - * @param {String} name Highlight group name - * @param {Boolean} isRgb Should export RGB colors - * @return {Object} Highlight definition map - */ - getHighlightByName(name: string, isRgb?: boolean): Promise; - /** - * Get highlight definition by id |hlID()| - * - * @param {Number} id Highlight id as returned by |hlID()| - * @param {Boolean} isRgb Should export RGB colors - * @return {Object} Highlight definition map - */ - getHighlightById(id: number, isRgb?: boolean): Promise; - /** - * Deletes the current line - */ - deleteCurrentLine(): Promise; - /** - * Evaluates a VimL expression (:help expression). Dictionaries - * and Lists are recursively expanded. On VimL error: Returns a - * generic error; v:errmsg is not updated. - * - */ - eval(expr: string): Promise; - /** - * Executes lua, it's possible neovim client does not support this - */ - lua(code: string, args?: VimValue[]): Promise; - /** - * Alias for `lua()` to be consistent with neovim API - */ - executeLua(code: string, args?: VimValue[]): Promise; - /** - * Calls a VimL |Dictionary-function| with the given arguments. - * - * On execution error: fails with VimL error, does not update v:errmsg. - */ - callDictFunction(dict: object, fname: string, args?: VimValue | VimValue[]): object; - /** - * Calls a VimL function with the given arguments. - * - * On execution error: fails with VimL error, does not update v:errmsg. - */ - call(fname: string, args?: VimValue | VimValue[]): Promise; - /** - * Alias for `call` - */ - callFunction(fname: string, args?: VimValue | VimValue[]): Promise; - /** - * Calls many API methods atomically. - * - * This has two main usages: - * - To perform several requests from an async context atomically, i.e. without - * interleaving redraws, RPC requests from other clients, or user interactions - * (however API methods may trigger autocommands or event processing which have - * such side-effects, e.g. |:sleep| may wake timers) - * - * - To minimize RPC overhead (roundtrips) of a sequence of many requests. - */ - callAtomic(calls: VimValue[]): Promise<[any[], boolean]>; - /** - * Executes an ex-command. - * - * On execution error: fails with VimL error, does not update v:errmsg. - * - * @param {String} arg Ex-command string - */ - command(arg: string): Promise; - /** - * Executes an ex-command and returns its (non-error) output. - * Shell |:!| output is not captured. - * - * On execution error: fails with VimL error, does not update v:errmsg. - */ - commandOutput(arg: string): Promise; - /** - * Gets a v: variable - * - * @param {String} name Variable name - * @return {VimValue} Variable value - */ - getVvar(name: string): Promise; - /** - * Sets a v: variable, if it is not readonly. - * - * @param {String} name Variable name - * @param {VimValue} value Variable value - */ - setVvar(name: string, value: VimValue): Promise; - /** - * Sends input-keys to Nvim, subject to various quirks controlled - * by `mode` flags. This is a blocking call, unlike |nvim_input()|. - * - * On execution error: does not fail, but updates v:errmsg. - * - * @param {String} keys To be typed - * @param {String} mode Behavior flags, see |feedkeys()| - * @param {Boolean} escapeCsi If true, escape K_SPECIAL/CSI bytes in `keys` - */ - feedKeys(keys: string, mode: string, escapeCsi: boolean): Promise; - /** - * Queues raw user-input. Unlike |nvim_feedkeys()|, this uses a - * low-level input buffer and the call is non-blocking (input is - * processed asynchronously by the eventloop). - * - * On execution error: does not fail, but updates v:errmsg. - * - * Note: - * |keycodes| like are translated, so "<" is special. To - * input a literal "<", send . - * - * Note: - * For mouse events use |nvim_input_mouse()|. The pseudokey - * form "" is deprecated since - * |api-level| 6. - * - * @param {String} keys To be typed - */ - input(keys: string): Promise; - /** - * Send mouse event from GUI. - * - * The call is non-blocking. It doesn't wait on any resulting - * action, but queues the event to be processed soon by the event - * loop. - * - * Note: - * Currently this doesn't support "scripting" multiple mouse - * events by calling it multiple times in a loop: the - * intermediate mouse positions will be ignored. It should be - * used to implement real-time mouse input in a GUI. The - * deprecated pseudokey form ("") of - * |nvim_input()| has the same limitiation. - * - * @param {String} button Mouse button: one of "left", "right", "middle", "wheel". - * @param {String} action For ordinary buttons, one of "press", "drag", "release". - * For the wheel, one of "up", "down", "left", "right". - * @param {String} modifier String of modifiers each represented by a - * single char. The same specifiers are used as - * for a key press, except that the "-" separator - * is optional, so "C-A-", "c-a" and "CA" can all - * be used to specify Ctrl+Alt+click. - * @param {Number} grid Grid number if the client uses |ui-multigrid|, else 0. - * @param {Number} row Mouse row-position (zero-based, like redraw events) - * @param {Number} col Mouse column-position (zero-based, like redraw events) - */ - inputMouse(button: string, action: string, modifier: string, grid: number, row: number, col: number): Promise; - /** - * Parse a VimL Expression - * - * TODO: return type, see :help - */ - parseExpression(expr: string, flags: string, highlight: boolean): Promise; - /** - * Gets info describing process `pid`. - * - * @param {Number} pid pid - * @return {Proc} Map of process properties, or null if process not found - */ - getProc(pid: number): Promise; - /** - * Gets the immediate children of process `pid` - * - * @return {Proc[]} Array of child process ids, empty if process not found - */ - getProcChildren(pid: number): Promise; - /** - * Replaces terminal codes and |keycodes| (, , ...) in a - * string with the internal representation. - * - * @param {String} str String to be converted. - * @param {Boolean} fromPart Legacy Vim parameter. Usually true. - * @param {Boolean} doIt Also translate . Ignored if `special` is false. - * @param {Boolean} special Replace |keycodes|, e.g. becomes a "\n" char. - */ - replaceTermcodes(str: string, fromPart: boolean, doIt: boolean, special: boolean): Promise; - /** - * Calculates the number of display cells occupied by `text`. - * counts as one cell. - * - * @param {String} str Some text - * @return {Number} Number of cells - */ - strWidth(str: string): Promise; - /** Write to output buffer */ - outWrite(str: string): Promise; - outWriteLine(str: string): Promise; - /** Write to error buffer */ - errWrite(str: string): Promise; - /** Write to error buffer */ - errWriteLine(str: string): Promise; - /** - * Gets a list of dictionaries representing attached UIs. - * - * @return {Ui[]} Array of UI dictionaries - * Each dictionary has the following keys: - * "height" requested height of the UI - * "width" requested width of the UI - * "rgb" whether the UI uses rgb colors (false implies cterm colors) - * "ext_..." Requested UI extensions, see |ui-options| - * "chan" Channel id of remote UI (not present for TUI) - */ - get uis(): Promise; - uiAttach(width: number, height: number, options: UiAttachOptions): Promise; - uiDetach(): Promise; - /** - * TODO: Documentation - * - * @param {Number} width The new requested width - * @param {Number} height The new requested height - */ - uiTryResize(width: number, height: number): Promise; - /** - * Tell Nvim to resize a grid. Triggers a grid_resize event with - * the requested grid size or the maximum size if it exceeds size - * limits. - * - * On invalid grid handle, fails with error. - * - * @param {Number} grid The handle of the grid to be changed - * @param {Number} width The new requested width - * @param {Number} height The new requested height - */ - uiTryResizeGrid(grid: number, width: number, height: number): Promise; - /** - * Set UI Option - */ - uiSetOption(name: string, value: any): Promise; - /** - * Subscribe to nvim event broadcasts - * - * @param {String} event Event type string - */ - subscribe(event: string): Promise; - /** - * Unsubscribe to nvim event broadcasts - * - * @param {String} event Event type string - */ - unsubscribe(event: string): Promise; - /** - * Identify the client for nvim. Can be called more than once, - * but subsequent calls will remove earlier info, which should be - * resent if it is still valid. (This could happen if a library - * first identifies the channel, and a plugin using that library - * later overrides that info) - * - */ - setClientInfo(name: string, version: object, type: string, methods: object, attributes: object): void; - /** - * Creates a new namespace, or gets an existing one. - * - * Namespaces are used for buffer highlights and virtual text, - * see |nvim_buf_add_highlight()| and |nvim_buf_set_virtual_text()|. - * - * Namespaces can be named or anonymous. If `name` matches an - * existing namespace, the associated id is returned. If `name` - * is an empty string a new, anonymous namespace is created. - * - * @param {String} name Namespace name or empty string - * @return {Number} Namespace id - */ - createNamespace(name?: string): Promise; - /** - * Alias for `getNamespaces()` - */ - get namespaces(): Promise<{ - [name: string]: number; - }>; - /** - * Gets existing, non-anonymous namespaces. - * - * @return {Object} dict that maps from names to namespace ids. - */ - getNamespaces(): Promise<{ - [name: string]: number; - }>; - /** - * Selects an item in the completion popupmenu. - * - * If |ins-completion| is not active this API call is silently - * ignored. Useful for an external UI using |ui-popupmenu| to - * control the popupmenu with the mouse. Can also be used in a - * mapping; use |:map-cmd| to ensure the mapping doesn't - * end completion mode. - * - * @param {Number} item Index (zero-based) of the item to select. - * Value of -1 selects nothing and restores the original text. - * @param {Boolean} insert Whether the selection should be inserted in the buffer. - * @param {Boolean} finish Finish the completion and dismiss the popupmenu. - * Implies `insert`. - * @param {Object} opts Optional parameters. Reserved for future use. - */ - selectPopupmenuItem(item: number, insert: boolean, finish: boolean, opts?: object): Promise; - /** - * Creates a new, empty, unnamed buffer. - * - * @param {Boolean} listed Controls 'buflisted' - * @param {Boolean} scratch Creates a "throwaway" |scratch-buffer| for temporary work (always 'nomodified') - * @return {Buffer|Number} Buffer handle, or 0 on error - */ - private createBuf; - /** - * Public alias for `createBuf` - */ - createBuffer(listed: boolean, scratch: boolean): Promise; - /** - * Open a new window. - * Currently this is used to open floating and external windows. - * Floats are windows that are drawn above the split layout, at - * some anchor position in some other window. Floats can be draw - * internally or by external GUI with the |ui-multigrid| - * extension. External windows are only supported with multigrid - * GUIs, and are displayed as separate top-level windows. - * - * Exactly one of `external` and `relative` must be specified. - * - * @param {Buffer} buffer Handle of buffer to be displayed in the window - * @param {Boolean} enter Whether the window should be entered (made the current window) - * @Param {Object} options Options object - * @return {Window|Number} The Window handle or 0 when error - */ - private openWin; - /** - * Public alias for `openWin` - */ - openWindow(buffer: Buffer, enter: boolean, options: OpenWindowOptions): Promise; - /** - * Configure window position. Currently this is only used to - * configure floating and external windows (including changing a - * split window to these types). - * - * See documentation at |nvim_open_win()|, for the meaning of - * parameters. Pass in -1 for 'witdh' and 'height' to keep - * exiting size. - * - * When reconfiguring a floating window, absent option keys will - * not be changed. The following restriction apply: `row`, `col` - * and `relative` must be reconfigured together. Only changing a - * subset of these is an error. - * - * @param {Window} window Window handle - * @param {Number} width Width of window (in character cells) - * @param {Number} height Height of window (in character cells) - * @Param {Object} options Options object - */ - private winConfig; - /** - * Public Alias for `winConfig` - */ - windowConfig(window: Window, options?: object): Promise; - /** - * Closes window - * - * @param {Boolean} force Force close window - */ - private winClose; - /** - * Public alias for `winClose` - */ - windowClose(window: Window, force: boolean): Promise; - /** - * Quit nvim - */ - quit(): void; -} diff --git a/general/nvim/node_modules/neovim/lib/api/Neovim.js b/general/nvim/node_modules/neovim/lib/api/Neovim.js deleted file mode 100644 index 5dea9d3..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Neovim.js +++ /dev/null @@ -1,753 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Neovim = void 0; -const Base_1 = require("./Base"); -const createChainableApi_1 = require("./helpers/createChainableApi"); -const Buffer_1 = require("./Buffer"); -const Tabpage_1 = require("./Tabpage"); -const Window_1 = require("./Window"); -/** - * Neovim API - */ -class Neovim extends Base_1.BaseApi { - constructor() { - super(...arguments); - this.prefix = 'nvim_'; - this.Buffer = Buffer_1.Buffer; - this.Window = Window_1.Window; - this.Tabpage = Tabpage_1.Tabpage; - } - /** - * Retrieves nvim API information - */ - get apiInfo() { - return this.request(`${this.prefix}get_api_info`); - } - /** - * Gets the current list of buffer handles - * - * Includes unlisted (unloaded/deleted) buffers, like `ls!`. Use `buffer.loaded` - * to check if a buffer is loaded - * - * @return {Buffer[]} List of buffer handles - */ - get buffers() { - return this.request(`${this.prefix}list_bufs`); - } - /** - * Gets the current buffer - * - * @return {Buffer} Buffer handle - */ - get buffer() { - return createChainableApi_1.createChainableApi.call(this, 'Buffer', Buffer_1.Buffer, () => this.request(`${this.prefix}get_current_buf`)); - } - /** - * Sets the current buffer - */ - set buffer(buffer) { - this.request(`${this.prefix}set_current_buf`, [buffer]); - } - /** - * Get information about all open channels - * - * @return {Channel[]} Array of channels - */ - get chans() { - return this.request(`${this.prefix}list_chans`); - } - /** - * Gets information about a channel - * - * @param {Number} chan The channel number - * @return {Channel} A channel - */ - getChanInfo(chan) { - return this.request(`${this.prefix}get_chan_info`, [chan]); - } - /** - * Gets a map of buffer-local |user-commands|. - */ - get commands() { - return this.getCommands(); - } - /** - * Gets a map of buffer-local |user-commands|. - * - * @param {Object} options Optional parameters (currently not used) - * @return {Object} Map of maps describing commands - */ - getCommands(options = {}) { - return this.request(`${this.prefix}get_commands`, [options]); - } - /** - * Gets the current list of tabpage handles - * - * @return {Tabpage[]} List of tagpage handles - */ - get tabpages() { - return this.request(`${this.prefix}list_tabpages`); - } - /** - * Gets the window tabpage - * - * @return {Tabpage} Tagpage that contains the window - */ - get tabpage() { - return createChainableApi_1.createChainableApi.call(this, 'Tabpage', Tabpage_1.Tabpage, () => this.request(`${this.prefix}get_current_tabpage`)); - } - /** - * Sets the current tabpage - */ - set tabpage(tabpage) { - this.request(`${this.prefix}set_current_tabpage`, [tabpage]); - } - /** - * Gets the current list of window handles - * - * @return {Window[]} List of window handles - */ - get windows() { - return this.getWindows(); - } - /** - * Gets the current window - * - * @return {Window} Window handle - */ - get window() { - return this.getWindow(); - } - /** - * Sets the current window - * - * @param {Window} Window handle - */ - set window(win) { - this.setWindow(win); - } - /** - * Gets the current list of window handles - * - * @return {Window[]} List of window handles - */ - getWindows() { - return this.request(`${this.prefix}list_wins`); - } - /** - * Gets the current window - * - * @return {Window} Window handle - */ - getWindow() { - return createChainableApi_1.createChainableApi.call(this, 'Window', Window_1.Window, () => this.request(`${this.prefix}get_current_win`)); - } - /** - * Sets the current window - * - * @param {Window} Window handle - */ - setWindow(win) { - // Throw error if win is not instance of Window? - return this.request(`${this.prefix}set_current_win`, [win]); - } - /** - * Gets the paths contained in "runtimepath" - * - * @return {String[]} List of paths - */ - get runtimePaths() { - return this.request(`${this.prefix}list_runtime_paths`); - } - /** - * Changes the global working directory - * - * @param {String} Directory path - * - */ - set dir(dir) { - this.request(`${this.prefix}set_current_dir`, [dir]); - } - /** - * Gets the current line - * - * @return {String} Current line string - */ - get line() { - return this.getLine(); - } - /** - * Sets current line - * - * @param {String} line Line contents - */ - set line(line) { - // Doing this to satisfy TS requirement that get/setters have to be same type - if (typeof line === 'string') { - this.setLine(line); - } - } - /** - * Gets the current line - * - * @return {String} Current line string - */ - getLine() { - return this.request(`${this.prefix}get_current_line`); - } - /** - * Sets current line - * - * @param {String} line Line contents - */ - setLine(line) { - return this.request(`${this.prefix}set_current_line`, [line]); - } - /** - * Gets a list of global (non-buffer-local) |mapping| definitions. - * - * @param {String} mode Mode short-name ("n", "i", "v", ...) - * @return {Object[]} Array of maparg()-like dictionaries describing mappings. The "buffer" key is always zero. - */ - getKeymap(mode) { - return this.request(`${this.prefix}get_keymap`, [mode]); - } - /** - * Gets the current mode. |mode()| "blocking" is true if Nvim is waiting for input. - * - * @return {Object} Dictionary { "mode": String, "blocking": Boolean } - */ - get mode() { - return this.request(`${this.prefix}get_mode`); - } - /** - * Gets map of defined colors - * - * @return {Object} Color map - */ - get colorMap() { - return this.request(`${this.prefix}get_color_map`); - } - /** - * Get color by name - * - * @param {String} name Color name - * @return {Number} Color value - */ - getColorByName(name) { - return this.request(`${this.prefix}get_color_by_name`, [name]); - } - /** - * Get highlight by name or id - * - * @param {String|Number} nameOrId Name or ID - * @param {Boolean} isRgb Should export RGB colors - * @return {Object} Highlight definition map - */ - getHighlight(nameOrId, isRgb = true) { - const functionName = typeof nameOrId === 'string' ? 'by_name' : 'by_id'; - return this.request(`${this.prefix}get_hl_${functionName}`, [ - nameOrId, - isRgb, - ]); - } - /** - * Get highlight definition by name - * - * @param {String} name Highlight group name - * @param {Boolean} isRgb Should export RGB colors - * @return {Object} Highlight definition map - */ - getHighlightByName(name, isRgb = true) { - return this.request(`${this.prefix}get_hl_by_name`, [name, isRgb]); - } - /** - * Get highlight definition by id |hlID()| - * - * @param {Number} id Highlight id as returned by |hlID()| - * @param {Boolean} isRgb Should export RGB colors - * @return {Object} Highlight definition map - */ - getHighlightById(id, isRgb = true) { - return this.request(`${this.prefix}get_hl_by_id`, [id, isRgb]); - } - /** - * Deletes the current line - */ - deleteCurrentLine() { - return this.request(`${this.prefix}del_current_line`); - } - /** - * Evaluates a VimL expression (:help expression). Dictionaries - * and Lists are recursively expanded. On VimL error: Returns a - * generic error; v:errmsg is not updated. - * - */ - eval(expr) { - return this.request(`${this.prefix}eval`, [expr]); - } - /** - * Executes lua, it's possible neovim client does not support this - */ - lua(code, args = []) { - const _args = Array.isArray(args) ? args : [args]; - return this.request(`${this.prefix}execute_lua`, [code, _args]); - } - /** - * Alias for `lua()` to be consistent with neovim API - */ - executeLua(code, args = []) { - return this.lua(code, args); - } - /** - * Calls a VimL |Dictionary-function| with the given arguments. - * - * On execution error: fails with VimL error, does not update v:errmsg. - */ - callDictFunction(dict, fname, args = []) { - const _args = Array.isArray(args) ? args : [args]; - return this.request(`${this.prefix}call_dict_function`, [ - dict, - fname, - _args, - ]); - } - /** - * Calls a VimL function with the given arguments. - * - * On execution error: fails with VimL error, does not update v:errmsg. - */ - call(fname, args = []) { - const _args = Array.isArray(args) ? args : [args]; - return this.request(`${this.prefix}call_function`, [fname, _args]); - } - /** - * Alias for `call` - */ - callFunction(fname, args = []) { - return this.call(fname, args); - } - /** - * Calls many API methods atomically. - * - * This has two main usages: - * - To perform several requests from an async context atomically, i.e. without - * interleaving redraws, RPC requests from other clients, or user interactions - * (however API methods may trigger autocommands or event processing which have - * such side-effects, e.g. |:sleep| may wake timers) - * - * - To minimize RPC overhead (roundtrips) of a sequence of many requests. - */ - callAtomic(calls) { - return this.request(`${this.prefix}call_atomic`, [calls]); - } - /** - * Executes an ex-command. - * - * On execution error: fails with VimL error, does not update v:errmsg. - * - * @param {String} arg Ex-command string - */ - command(arg) { - return this.request(`${this.prefix}command`, [arg]); - } - /** - * Executes an ex-command and returns its (non-error) output. - * Shell |:!| output is not captured. - * - * On execution error: fails with VimL error, does not update v:errmsg. - */ - commandOutput(arg) { - return this.request(`${this.prefix}command_output`, [arg]); - } - /** - * Gets a v: variable - * - * @param {String} name Variable name - * @return {VimValue} Variable value - */ - getVvar(name) { - return this.request(`${this.prefix}get_vvar`, [name]); - } - /** - * Sets a v: variable, if it is not readonly. - * - * @param {String} name Variable name - * @param {VimValue} value Variable value - */ - setVvar(name, value) { - return this.request(`${this.prefix}set_vvar`, [name, value]); - } - /** - * Sends input-keys to Nvim, subject to various quirks controlled - * by `mode` flags. This is a blocking call, unlike |nvim_input()|. - * - * On execution error: does not fail, but updates v:errmsg. - * - * @param {String} keys To be typed - * @param {String} mode Behavior flags, see |feedkeys()| - * @param {Boolean} escapeCsi If true, escape K_SPECIAL/CSI bytes in `keys` - */ - feedKeys(keys, mode, escapeCsi) { - return this.request(`${this.prefix}feedkeys`, [keys, mode, escapeCsi]); - } - /** - * Queues raw user-input. Unlike |nvim_feedkeys()|, this uses a - * low-level input buffer and the call is non-blocking (input is - * processed asynchronously by the eventloop). - * - * On execution error: does not fail, but updates v:errmsg. - * - * Note: - * |keycodes| like are translated, so "<" is special. To - * input a literal "<", send . - * - * Note: - * For mouse events use |nvim_input_mouse()|. The pseudokey - * form "" is deprecated since - * |api-level| 6. - * - * @param {String} keys To be typed - */ - input(keys) { - return this.request(`${this.prefix}input`, [keys]); - } - /** - * Send mouse event from GUI. - * - * The call is non-blocking. It doesn't wait on any resulting - * action, but queues the event to be processed soon by the event - * loop. - * - * Note: - * Currently this doesn't support "scripting" multiple mouse - * events by calling it multiple times in a loop: the - * intermediate mouse positions will be ignored. It should be - * used to implement real-time mouse input in a GUI. The - * deprecated pseudokey form ("") of - * |nvim_input()| has the same limitiation. - * - * @param {String} button Mouse button: one of "left", "right", "middle", "wheel". - * @param {String} action For ordinary buttons, one of "press", "drag", "release". - * For the wheel, one of "up", "down", "left", "right". - * @param {String} modifier String of modifiers each represented by a - * single char. The same specifiers are used as - * for a key press, except that the "-" separator - * is optional, so "C-A-", "c-a" and "CA" can all - * be used to specify Ctrl+Alt+click. - * @param {Number} grid Grid number if the client uses |ui-multigrid|, else 0. - * @param {Number} row Mouse row-position (zero-based, like redraw events) - * @param {Number} col Mouse column-position (zero-based, like redraw events) - */ - inputMouse(button, action, modifier, grid, row, col) { - return this.request(`${this.prefix}input_mouse`, [ - button, - action, - modifier, - grid, - row, - col, - ]); - } - /** - * Parse a VimL Expression - * - * TODO: return type, see :help - */ - parseExpression(expr, flags, highlight) { - return this.request(`${this.prefix}parse_expression`, [ - expr, - flags, - highlight, - ]); - } - /** - * Gets info describing process `pid`. - * - * @param {Number} pid pid - * @return {Proc} Map of process properties, or null if process not found - */ - getProc(pid) { - return this.request(`${this.prefix}get_proc`, [pid]); - } - /** - * Gets the immediate children of process `pid` - * - * @return {Proc[]} Array of child process ids, empty if process not found - */ - getProcChildren(pid) { - return this.request(`${this.prefix}get_proc_children`, [pid]); - } - /** - * Replaces terminal codes and |keycodes| (, , ...) in a - * string with the internal representation. - * - * @param {String} str String to be converted. - * @param {Boolean} fromPart Legacy Vim parameter. Usually true. - * @param {Boolean} doIt Also translate . Ignored if `special` is false. - * @param {Boolean} special Replace |keycodes|, e.g. becomes a "\n" char. - */ - replaceTermcodes(str, fromPart, doIt, special) { - return this.request(`${this.prefix}replace_termcodes`, [ - str, - fromPart, - doIt, - special, - ]); - } - /** - * Calculates the number of display cells occupied by `text`. - * counts as one cell. - * - * @param {String} str Some text - * @return {Number} Number of cells - */ - strWidth(str) { - return this.request(`${this.prefix}strwidth`, [str]); - } - /** Write to output buffer */ - outWrite(str) { - return this.request(`${this.prefix}out_write`, [str]); - } - outWriteLine(str) { - return this.outWrite(`${str}\n`); - } - /** Write to error buffer */ - errWrite(str) { - return this.request(`${this.prefix}err_write`, [str]); - } - /** Write to error buffer */ - errWriteLine(str) { - return this.request(`${this.prefix}err_writeln`, [str]); - } - /** - * Gets a list of dictionaries representing attached UIs. - * - * @return {Ui[]} Array of UI dictionaries - * Each dictionary has the following keys: - * "height" requested height of the UI - * "width" requested width of the UI - * "rgb" whether the UI uses rgb colors (false implies cterm colors) - * "ext_..." Requested UI extensions, see |ui-options| - * "chan" Channel id of remote UI (not present for TUI) - */ - get uis() { - return this.request(`${this.prefix}list_uis`); - } - uiAttach(width, height, options) { - return this.request(`${this.prefix}ui_attach`, [width, height, options]); - } - uiDetach() { - return this.request(`${this.prefix}ui_detach`, []); - } - /** - * TODO: Documentation - * - * @param {Number} width The new requested width - * @param {Number} height The new requested height - */ - uiTryResize(width, height) { - return this.request(`${this.prefix}ui_try_resize`, [width, height]); - } - /** - * Tell Nvim to resize a grid. Triggers a grid_resize event with - * the requested grid size or the maximum size if it exceeds size - * limits. - * - * On invalid grid handle, fails with error. - * - * @param {Number} grid The handle of the grid to be changed - * @param {Number} width The new requested width - * @param {Number} height The new requested height - */ - uiTryResizeGrid(grid, width, height) { - return this.request(`${this.prefix}ui_try_resize_grid`, [ - grid, - width, - height, - ]); - } - /** - * Set UI Option - */ - uiSetOption(name, value) { - return this.request(`${this.prefix}ui_set_option`, [name, value]); - } - /** - * Subscribe to nvim event broadcasts - * - * @param {String} event Event type string - */ - subscribe(event) { - return this.request(`${this.prefix}subscribe`, [event]); - } - /** - * Unsubscribe to nvim event broadcasts - * - * @param {String} event Event type string - */ - unsubscribe(event) { - return this.request(`${this.prefix}unsubscribe`, [event]); - } - /** - * Identify the client for nvim. Can be called more than once, - * but subsequent calls will remove earlier info, which should be - * resent if it is still valid. (This could happen if a library - * first identifies the channel, and a plugin using that library - * later overrides that info) - * - */ - setClientInfo(name, version, type, methods, attributes) { - this.request(`${this.prefix}set_client_info`, [ - name, - version, - type, - methods, - attributes, - ]); - } - /** - * Creates a new namespace, or gets an existing one. - * - * Namespaces are used for buffer highlights and virtual text, - * see |nvim_buf_add_highlight()| and |nvim_buf_set_virtual_text()|. - * - * Namespaces can be named or anonymous. If `name` matches an - * existing namespace, the associated id is returned. If `name` - * is an empty string a new, anonymous namespace is created. - * - * @param {String} name Namespace name or empty string - * @return {Number} Namespace id - */ - createNamespace(name = '') { - return this.request(`${this.prefix}create_namespace`, [name]); - } - /** - * Alias for `getNamespaces()` - */ - get namespaces() { - return this.getNamespaces(); - } - /** - * Gets existing, non-anonymous namespaces. - * - * @return {Object} dict that maps from names to namespace ids. - */ - getNamespaces() { - return this.request(`${this.prefix}get_namespaces`); - } - /** - * Selects an item in the completion popupmenu. - * - * If |ins-completion| is not active this API call is silently - * ignored. Useful for an external UI using |ui-popupmenu| to - * control the popupmenu with the mouse. Can also be used in a - * mapping; use |:map-cmd| to ensure the mapping doesn't - * end completion mode. - * - * @param {Number} item Index (zero-based) of the item to select. - * Value of -1 selects nothing and restores the original text. - * @param {Boolean} insert Whether the selection should be inserted in the buffer. - * @param {Boolean} finish Finish the completion and dismiss the popupmenu. - * Implies `insert`. - * @param {Object} opts Optional parameters. Reserved for future use. - */ - selectPopupmenuItem(item, insert, finish, opts = {}) { - return this.request(`${this.prefix}select_popupmenu_item`, [ - item, - insert, - finish, - opts, - ]); - } - /** - * Creates a new, empty, unnamed buffer. - * - * @param {Boolean} listed Controls 'buflisted' - * @param {Boolean} scratch Creates a "throwaway" |scratch-buffer| for temporary work (always 'nomodified') - * @return {Buffer|Number} Buffer handle, or 0 on error - */ - createBuf(listed, scratch) { - return this.request(`${this.prefix}create_buf`, [listed, scratch]); - } - /** - * Public alias for `createBuf` - */ - createBuffer(listed, scratch) { - return this.createBuf(listed, scratch); - } - /** - * Open a new window. - * Currently this is used to open floating and external windows. - * Floats are windows that are drawn above the split layout, at - * some anchor position in some other window. Floats can be draw - * internally or by external GUI with the |ui-multigrid| - * extension. External windows are only supported with multigrid - * GUIs, and are displayed as separate top-level windows. - * - * Exactly one of `external` and `relative` must be specified. - * - * @param {Buffer} buffer Handle of buffer to be displayed in the window - * @param {Boolean} enter Whether the window should be entered (made the current window) - * @Param {Object} options Options object - * @return {Window|Number} The Window handle or 0 when error - */ - openWin(buffer, enter, options) { - return this.request(`${this.prefix}open_win`, [buffer, enter, options]); - } - /** - * Public alias for `openWin` - */ - openWindow(buffer, enter, options) { - return this.openWin(buffer, enter, options); - } - /** - * Configure window position. Currently this is only used to - * configure floating and external windows (including changing a - * split window to these types). - * - * See documentation at |nvim_open_win()|, for the meaning of - * parameters. Pass in -1 for 'witdh' and 'height' to keep - * exiting size. - * - * When reconfiguring a floating window, absent option keys will - * not be changed. The following restriction apply: `row`, `col` - * and `relative` must be reconfigured together. Only changing a - * subset of these is an error. - * - * @param {Window} window Window handle - * @param {Number} width Width of window (in character cells) - * @param {Number} height Height of window (in character cells) - * @Param {Object} options Options object - */ - winConfig(window, options = {}) { - return window.config(options); - } - /** - * Public Alias for `winConfig` - */ - windowConfig(window, options = {}) { - return this.winConfig(window, options); - } - /** - * Closes window - * - * @param {Boolean} force Force close window - */ - winClose(window, force) { - return window.close(force); - } - /** - * Public alias for `winClose` - */ - windowClose(window, force) { - return this.winClose(window, force); - } - /** - * Quit nvim - */ - quit() { - this.command('qa!'); - } -} -exports.Neovim = Neovim; diff --git a/general/nvim/node_modules/neovim/lib/api/Tabpage.d.ts b/general/nvim/node_modules/neovim/lib/api/Tabpage.d.ts deleted file mode 100644 index f6b7167..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Tabpage.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { BaseApi } from './Base'; -import { Window, AsyncWindow } from './Window'; -export declare class Tabpage extends BaseApi { - prefix: string; - /** Returns all windows of tabpage */ - get windows(): Promise; - /** Gets the current window of tabpage */ - get window(): AsyncWindow; - /** Is current tabpage valid */ - get valid(): Promise; - /** Tabpage number */ - get number(): Promise; - /** Invalid */ - getOption(): void; - /** Invalid */ - setOption(): void; -} -export interface AsyncTabpage extends Tabpage, Promise { -} diff --git a/general/nvim/node_modules/neovim/lib/api/Tabpage.js b/general/nvim/node_modules/neovim/lib/api/Tabpage.js deleted file mode 100644 index fb13bb6..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Tabpage.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tabpage = void 0; -const Base_1 = require("./Base"); -const types_1 = require("./types"); -const createChainableApi_1 = require("./helpers/createChainableApi"); -const Window_1 = require("./Window"); -class Tabpage extends Base_1.BaseApi { - constructor() { - super(...arguments); - this.prefix = types_1.Metadata[types_1.ExtType.Tabpage].prefix; - } - /** Returns all windows of tabpage */ - get windows() { - return this.request(`${this.prefix}list_wins`, [this]); - } - /** Gets the current window of tabpage */ - get window() { - // Require is here otherwise we get circular refs - return createChainableApi_1.createChainableApi.call(this, 'Window', Window_1.Window, () => this.request(`${this.prefix}get_win`, [this])); - } - /** Is current tabpage valid */ - get valid() { - return this.request(`${this.prefix}is_valid`, [this]); - } - /** Tabpage number */ - get number() { - return this.request(`${this.prefix}get_number`, [this]); - } - /** Invalid */ - getOption() { - this.logger.error('Tabpage does not have `getOption`'); - } - /** Invalid */ - setOption() { - this.logger.error('Tabpage does not have `setOption`'); - } -} -exports.Tabpage = Tabpage; diff --git a/general/nvim/node_modules/neovim/lib/api/Window.d.ts b/general/nvim/node_modules/neovim/lib/api/Window.d.ts deleted file mode 100644 index c6db679..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Window.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { BaseApi } from './Base'; -import { AsyncTabpage } from './Tabpage'; -import { AsyncBuffer } from './Buffer'; -export declare class Window extends BaseApi { - prefix: string; - /** - * The windowid that not change within a Vim session - */ - get id(): number; - /** Get current buffer of window */ - get buffer(): AsyncBuffer; - /** Get the Tabpage that contains the window */ - get tabpage(): AsyncTabpage; - /** Get cursor position */ - get cursor(): [number, number] | Promise<[number, number]>; - /** Set cursor position */ - set cursor(pos: [number, number] | Promise<[number, number]>); - /** Get window height by number of rows */ - get height(): number | Promise; - /** Set window height by number of rows */ - set height(height: number | Promise); - /** Get window width by number of columns */ - get width(): number | Promise; - /** Set window width by number of columns */ - set width(width: number | Promise); - /** Get window position */ - get position(): Promise<[number, number]>; - /** 0-indexed, on-screen window position(row) in display cells. */ - get row(): Promise; - /** 0-indexed, on-screen window position(col) in display cells. */ - get col(): Promise; - /** Is window valid */ - get valid(): Promise; - /** Get window number */ - get number(): Promise; - /** - * Closes window - * - * @param {Boolean} force Force close window - */ - close(force?: boolean): Promise; - /** - * Configure window position. Currently this is only used to - * configure floating and external windows (including changing a - * split window to these types). - * - * See documentation at |nvim_open_win()|, for the meaning of - * parameters. Pass in -1 for 'witdh' and 'height' to keep - * exiting size. - * - * When reconfiguring a floating window, absent option keys will - * not be changed. The following restriction apply: `row`, `col` - * and `relative` must be reconfigured together. Only changing a - * subset of these is an error. - * - * @param {Window} window Window handle - * @Param {Object} options Options object - */ - config(options?: object): Promise; -} -export interface AsyncWindow extends Window, Promise { -} diff --git a/general/nvim/node_modules/neovim/lib/api/Window.js b/general/nvim/node_modules/neovim/lib/api/Window.js deleted file mode 100644 index 6769193..0000000 --- a/general/nvim/node_modules/neovim/lib/api/Window.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Window = void 0; -const Base_1 = require("./Base"); -const types_1 = require("./types"); -const createChainableApi_1 = require("./helpers/createChainableApi"); -const Tabpage_1 = require("./Tabpage"); -const Buffer_1 = require("./Buffer"); -class Window extends Base_1.BaseApi { - constructor() { - super(...arguments); - this.prefix = types_1.Metadata[types_1.ExtType.Window].prefix; - } - /** - * The windowid that not change within a Vim session - */ - get id() { - return this.data; - } - /** Get current buffer of window */ - get buffer() { - return createChainableApi_1.createChainableApi.call(this, 'Buffer', Buffer_1.Buffer, () => this.request(`${this.prefix}get_buf`, [this])); - } - /** Get the Tabpage that contains the window */ - get tabpage() { - return createChainableApi_1.createChainableApi.call(this, 'Tabpage', Tabpage_1.Tabpage, () => this.request(`${this.prefix}get_tabpage`, [this])); - } - /** Get cursor position */ - get cursor() { - return this.request(`${this.prefix}get_cursor`, [this]); - } - /** Set cursor position */ - set cursor(pos) { - this.request(`${this.prefix}set_cursor`, [this, pos]); - } - /** Get window height by number of rows */ - get height() { - return this.request(`${this.prefix}get_height`, [this]); - } - /** Set window height by number of rows */ - set height(height) { - this.request(`${this.prefix}set_height`, [this, height]); - } - /** Get window width by number of columns */ - get width() { - return this.request(`${this.prefix}get_width`, [this]); - } - /** Set window width by number of columns */ - set width(width) { - this.request(`${this.prefix}set_width`, [this, width]); - } - /** Get window position */ - get position() { - return this.request(`${this.prefix}get_position`, [this]); - } - /** 0-indexed, on-screen window position(row) in display cells. */ - get row() { - return this.request(`${this.prefix}get_position`, [this]).then(position => position[0]); - } - /** 0-indexed, on-screen window position(col) in display cells. */ - get col() { - return this.request(`${this.prefix}get_position`, [this]).then(position => position[1]); - } - /** Is window valid */ - get valid() { - return this.request(`${this.prefix}is_valid`, [this]); - } - /** Get window number */ - get number() { - return this.request(`${this.prefix}get_number`, [this]); - } - /** - * Closes window - * - * @param {Boolean} force Force close window - */ - close(force = false) { - return this.request(`${this.prefix}close`, [this, force]); - } - /** - * Configure window position. Currently this is only used to - * configure floating and external windows (including changing a - * split window to these types). - * - * See documentation at |nvim_open_win()|, for the meaning of - * parameters. Pass in -1 for 'witdh' and 'height' to keep - * exiting size. - * - * When reconfiguring a floating window, absent option keys will - * not be changed. The following restriction apply: `row`, `col` - * and `relative` must be reconfigured together. Only changing a - * subset of these is an error. - * - * @param {Window} window Window handle - * @Param {Object} options Options object - */ - config(options = {}) { - return this.request(`${this.prefix}set_config`, [this, options]); - } -} -exports.Window = Window; diff --git a/general/nvim/node_modules/neovim/lib/api/client.d.ts b/general/nvim/node_modules/neovim/lib/api/client.d.ts deleted file mode 100644 index 03fdb72..0000000 --- a/general/nvim/node_modules/neovim/lib/api/client.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/// -/** - * Handles attaching transport - */ -import { logger } from '../utils/logger'; -import { Transport } from '../utils/transport'; -import { VimValue } from '../types/VimValue'; -import { Neovim } from './Neovim'; -import { Buffer } from './Buffer'; -export declare class NeovimClient extends Neovim { - protected requestQueue: any[]; - private transportAttached; - private _channelId; - private attachedBuffers; - constructor(options?: { - transport?: Transport; - logger?: typeof logger; - }); - /** Attaches msgpack to read/write streams * */ - attach({ reader, writer, }: { - reader: NodeJS.ReadableStream; - writer: NodeJS.WritableStream; - }): void; - get isApiReady(): boolean; - get channelId(): Promise; - isAttached(buffer: Buffer): boolean; - handleRequest(method: string, args: VimValue[], resp: any, ...restArgs: any[]): void; - emitNotification(method: string, args: any[]): void; - handleNotification(method: string, args: VimValue[], ...restArgs: any[]): void; - setupTransport(): void; - requestApi(): Promise; - generateApi(): Promise; - attachBuffer(buffer: Buffer, eventName: string, cb: Function): Function; - /** - * Returns `true` if buffer should be detached - */ - detachBuffer(buffer: Buffer, eventName: string, cb: Function): boolean; -} diff --git a/general/nvim/node_modules/neovim/lib/api/client.js b/general/nvim/node_modules/neovim/lib/api/client.js deleted file mode 100644 index b458457..0000000 --- a/general/nvim/node_modules/neovim/lib/api/client.js +++ /dev/null @@ -1,218 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NeovimClient = void 0; -const transport_1 = require("../utils/transport"); -const Neovim_1 = require("./Neovim"); -class NeovimClient extends Neovim_1.Neovim { - constructor(options = {}) { - // Neovim has no `data` or `metadata` - super({ - logger: options.logger, - }); - this.attachedBuffers = new Map(); - const transport = options.transport || new transport_1.Transport(); - this.setTransport(transport); - this.requestQueue = []; - this.transportAttached = false; - this.handleRequest = this.handleRequest.bind(this); - this.handleNotification = this.handleNotification.bind(this); - } - /** Attaches msgpack to read/write streams * */ - attach({ reader, writer, }) { - this.transport.attach(writer, reader, this); - this.transportAttached = true; - this.setupTransport(); - } - get isApiReady() { - return this.transportAttached && typeof this._channelId !== 'undefined'; - } - get channelId() { - return (() => __awaiter(this, void 0, void 0, function* () { - yield this._isReady; - return this._channelId; - }))(); - } - isAttached(buffer) { - const key = `${buffer.data}`; - return this.attachedBuffers.has(key); - } - handleRequest(method, args, resp, ...restArgs) { - this.logger.info('handleRequest: ', method); - // If neovim API is not generated yet and we are not handle a 'specs' request - // then queue up requests - // - // Otherwise emit as normal - if (!this.isApiReady && method !== 'specs') { - this.requestQueue.push({ - type: 'request', - args: [method, args, resp, ...restArgs], - }); - } - else { - this.emit('request', method, args, resp); - } - } - emitNotification(method, args) { - if (method.endsWith('_event')) { - if (!method.startsWith('nvim_buf_')) { - this.logger.error('Unhandled event: ', method); - return; - } - const shortName = method.replace(/nvim_buf_(.*)_event/, '$1'); - const [buffer] = args; - const bufferKey = `${buffer.data}`; - if (!this.attachedBuffers.has(bufferKey)) { - // this is a problem - return; - } - const bufferMap = this.attachedBuffers.get(bufferKey); - const cbs = bufferMap.get(shortName) || []; - cbs.forEach(cb => cb(...args)); - // Handle `nvim_buf_detach_event` - // clean `attachedBuffers` since it will no longer be attached - if (shortName === 'detach') { - this.attachedBuffers.delete(bufferKey); - } - } - else { - this.emit('notification', method, args); - } - } - handleNotification(method, args, ...restArgs) { - this.logger.info('handleNotification: ', method); - // If neovim API is not generated yet then queue up requests - // - // Otherwise emit as normal - if (!this.isApiReady) { - this.requestQueue.push({ - type: 'notification', - args: [method, args, ...restArgs], - }); - } - else { - this.emitNotification(method, args); - } - } - // Listen and setup handlers for transport - setupTransport() { - if (!this.transportAttached) { - throw new Error('Not attached to input/output'); - } - this.transport.on('request', this.handleRequest); - this.transport.on('notification', this.handleNotification); - this.transport.on('detach', () => { - this.emit('disconnect'); - this.transport.removeAllListeners('request'); - this.transport.removeAllListeners('notification'); - this.transport.removeAllListeners('detach'); - }); - this._isReady = this.generateApi(); - } - requestApi() { - return new Promise((resolve, reject) => { - this.transport.request('nvim_get_api_info', [], (err, res) => { - if (err) { - reject(err); - } - else { - resolve(res); - } - }); - }); - } - // Request API from neovim and augment this current class to add these APIs - generateApi() { - return __awaiter(this, void 0, void 0, function* () { - let results; - try { - results = yield this.requestApi(); - } - catch (err) { - this.logger.error('Could not get vim api results'); - this.logger.error(err); - } - if (results) { - try { - const [channelId /* , encodedMetadata */] = results; - // const metadata = encodedMetadata; - // this.logger.debug(`$$$: ${metadata}`); - // Perform sanity check for metadata types - // Object.keys(metadata.types).forEach((name: string) => { - // const metaDataForType = metadata.types[name]; // eslint-disable-line @typescript-eslint/no-unused-vars - // TODO: check `prefix` and `id` - // }); - this._channelId = channelId; - // register the non-queueing handlers - // dequeue any pending RPCs - this.requestQueue.forEach(pending => { - if (pending.type === 'notification') { - this.emitNotification(pending.args[0], pending.args[1]); - } - else { - this.emit(pending.type, ...pending.args); - } - }); - this.requestQueue = []; - return true; - } - catch (err) { - this.logger.error(`Could not dynamically generate neovim API: ${err}`, { - error: err, - }); - this.logger.error(err.stack); - return null; - } - } - return null; - }); - } - attachBuffer(buffer, eventName, cb) { - const bufferKey = `${buffer.data}`; - if (!this.attachedBuffers.has(bufferKey)) { - this.attachedBuffers.set(bufferKey, new Map()); - } - const bufferMap = this.attachedBuffers.get(bufferKey); - if (!bufferMap.get(eventName)) { - bufferMap.set(eventName, []); - } - const cbs = bufferMap.get(eventName); - if (cbs.indexOf(cb) !== -1) - return cb; - cbs.push(cb); - bufferMap.set(eventName, cbs); - this.attachedBuffers.set(bufferKey, bufferMap); - return cb; - } - /** - * Returns `true` if buffer should be detached - */ - detachBuffer(buffer, eventName, cb) { - const bufferKey = `${buffer.data}`; - const bufferMap = this.attachedBuffers.get(bufferKey); - if (!bufferMap) - return false; - const handlers = (bufferMap.get(eventName) || []).filter(handler => handler !== cb); - // Remove eventName listener from bufferMap if no more handlers - if (!handlers.length) { - bufferMap.delete(eventName); - } - else { - bufferMap.set(eventName, handlers); - } - if (!bufferMap.size) { - this.attachedBuffers.delete(bufferKey); - return true; - } - return false; - } -} -exports.NeovimClient = NeovimClient; diff --git a/general/nvim/node_modules/neovim/lib/api/helpers/createChainableApi.d.ts b/general/nvim/node_modules/neovim/lib/api/helpers/createChainableApi.d.ts deleted file mode 100644 index b756640..0000000 --- a/general/nvim/node_modules/neovim/lib/api/helpers/createChainableApi.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function createChainableApi(name: string, Type: any, requestPromise: () => Promise, chainCallPromise: () => Promise): any; diff --git a/general/nvim/node_modules/neovim/lib/api/helpers/createChainableApi.js b/general/nvim/node_modules/neovim/lib/api/helpers/createChainableApi.js deleted file mode 100644 index 3aa906d..0000000 --- a/general/nvim/node_modules/neovim/lib/api/helpers/createChainableApi.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createChainableApi = void 0; -const Base_1 = require("../Base"); -const baseProperties = Object.getOwnPropertyNames(Base_1.BaseApi.prototype); -function createChainableApi(name, Type, requestPromise, chainCallPromise) { - // re-use current promise if not resolved yet - if (this[`${name}Promise`] && - this[`${name}Promise`].status === 0 && - this[`${name}Proxy`]) { - return this[`${name}Proxy`]; - } - this[`${name}Promise`] = requestPromise(); - // TODO: Optimize this - // Define properties on the promise for devtools - [...baseProperties, ...Object.getOwnPropertyNames(Type.prototype)].forEach(key => { - Object.defineProperty(this[`${name}Promise`], key, { - enumerable: true, - writable: true, - configurable: true, - }); - }); - const proxyHandler = { - get: (target, prop) => { - // XXX which takes priority? - // Check if property is property of an API object (Window, Buffer, Tabpage, etc) - // If it is, then we return a promise of results of the call on that API object - // i.e. await this.buffer.name will return a promise of buffer name - const isOnPrototype = Object.prototype.hasOwnProperty.call(Type.prototype, prop) || - Object.prototype.hasOwnProperty.call(Base_1.BaseApi.prototype, prop); - // Inspect the property descriptor to see if it is a getter or setter - // Otherwise when we check if property is a method, it will call the getter - const descriptor = Object.getOwnPropertyDescriptor(Type.prototype, prop) || - Object.getOwnPropertyDescriptor(Base_1.BaseApi.prototype, prop); - const isGetter = descriptor && - (typeof descriptor.get !== 'undefined' || - typeof descriptor.set !== 'undefined'); - // XXX: the promise can potentially be stale - // Check if resolved, else do a refresh request for current buffer? - if (Type && isOnPrototype) { - if (isOnPrototype && - !isGetter && - ((prop in Type.prototype && - typeof Type.prototype[prop] === 'function') || - (prop in Base_1.BaseApi.prototype && - typeof Base_1.BaseApi.prototype[prop] === 'function'))) { - // If property is a method on Type, we need to invoke it with captured args - return (...args) => this[`${name}Promise`].then((res) => res[prop].call(res, ...args)); - } - // Otherwise return the property requested after promise is resolved - return ((chainCallPromise && chainCallPromise()) || - this[`${name}Promise`].then((res) => res[prop])); - } - if (prop in target) { - // Forward rest of requests to Promise - if (typeof target[prop] === 'function') { - return target[prop].bind(target); - } - return target[prop]; - } - return null; - }, - set: (target, prop, value, receiver) => { - // eslint-disable-next-line no-param-reassign - if (receiver && - (receiver instanceof Promise || ('then' in receiver))) { - receiver.then(obj => { - if (prop in obj) { - // eslint-disable-next-line no-param-reassign - obj[prop] = value; - } - }); - } - else { - // eslint-disable-next-line no-param-reassign - target[prop] = value; - } - // Maintain default assignment behavior - return true; - }, - }; - // Proxy the promise so that we can check for chained API calls - this[`${name}Proxy`] = new Proxy(this[`${name}Promise`], proxyHandler); - return this[`${name}Proxy`]; -} -exports.createChainableApi = createChainableApi; diff --git a/general/nvim/node_modules/neovim/lib/api/helpers/types.d.ts b/general/nvim/node_modules/neovim/lib/api/helpers/types.d.ts deleted file mode 100644 index 96b8bb2..0000000 --- a/general/nvim/node_modules/neovim/lib/api/helpers/types.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const TYPES: { - [key: string]: any; -}; diff --git a/general/nvim/node_modules/neovim/lib/api/helpers/types.js b/general/nvim/node_modules/neovim/lib/api/helpers/types.js deleted file mode 100644 index 4ead126..0000000 --- a/general/nvim/node_modules/neovim/lib/api/helpers/types.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TYPES = void 0; -const Buffer_1 = require("../Buffer"); -const Window_1 = require("../Window"); -const Tabpage_1 = require("../Tabpage"); -exports.TYPES = { - Buffer: Buffer_1.Buffer, - Window: Window_1.Window, - Tabpage: Tabpage_1.Tabpage, -}; diff --git a/general/nvim/node_modules/neovim/lib/api/index.d.ts b/general/nvim/node_modules/neovim/lib/api/index.d.ts deleted file mode 100644 index b74f4fd..0000000 --- a/general/nvim/node_modules/neovim/lib/api/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { Neovim } from './Neovim'; -export { NeovimClient } from './client'; -export { Buffer } from './Buffer'; -export { Window } from './Window'; -export { Tabpage } from './Tabpage'; diff --git a/general/nvim/node_modules/neovim/lib/api/index.js b/general/nvim/node_modules/neovim/lib/api/index.js deleted file mode 100644 index b462b5e..0000000 --- a/general/nvim/node_modules/neovim/lib/api/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tabpage = exports.Window = exports.Buffer = exports.NeovimClient = exports.Neovim = void 0; -var Neovim_1 = require("./Neovim"); -Object.defineProperty(exports, "Neovim", { enumerable: true, get: function () { return Neovim_1.Neovim; } }); -var client_1 = require("./client"); -Object.defineProperty(exports, "NeovimClient", { enumerable: true, get: function () { return client_1.NeovimClient; } }); -var Buffer_1 = require("./Buffer"); -Object.defineProperty(exports, "Buffer", { enumerable: true, get: function () { return Buffer_1.Buffer; } }); -var Window_1 = require("./Window"); -Object.defineProperty(exports, "Window", { enumerable: true, get: function () { return Window_1.Window; } }); -var Tabpage_1 = require("./Tabpage"); -Object.defineProperty(exports, "Tabpage", { enumerable: true, get: function () { return Tabpage_1.Tabpage; } }); diff --git a/general/nvim/node_modules/neovim/lib/api/types.d.ts b/general/nvim/node_modules/neovim/lib/api/types.d.ts deleted file mode 100644 index e630917..0000000 --- a/general/nvim/node_modules/neovim/lib/api/types.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Buffer } from './Buffer'; -import { Window } from './Window'; -import { Tabpage } from './Tabpage'; -export declare enum ExtType { - Buffer = 0, - Window = 1, - Tabpage = 2 -} -export interface ExtTypeConstructor { - new (...args: any[]): T; -} -export interface MetadataType { - constructor: ExtTypeConstructor; - name: string; - prefix: string; -} -export declare const Metadata: MetadataType[]; diff --git a/general/nvim/node_modules/neovim/lib/api/types.js b/general/nvim/node_modules/neovim/lib/api/types.js deleted file mode 100644 index 46a8ae9..0000000 --- a/general/nvim/node_modules/neovim/lib/api/types.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Metadata = exports.ExtType = void 0; -const Buffer_1 = require("./Buffer"); -const Window_1 = require("./Window"); -const Tabpage_1 = require("./Tabpage"); -var ExtType; -(function (ExtType) { - ExtType[ExtType["Buffer"] = 0] = "Buffer"; - ExtType[ExtType["Window"] = 1] = "Window"; - ExtType[ExtType["Tabpage"] = 2] = "Tabpage"; -})(ExtType = exports.ExtType || (exports.ExtType = {})); -exports.Metadata = [ - { - constructor: Buffer_1.Buffer, - name: 'Buffer', - prefix: 'nvim_buf_', - }, - { - constructor: Window_1.Window, - name: 'Window', - prefix: 'nvim_win_', - }, - { - constructor: Tabpage_1.Tabpage, - name: 'Tabpage', - prefix: 'nvim_tabpage_', - }, -]; diff --git a/general/nvim/node_modules/neovim/lib/attach.d.ts b/general/nvim/node_modules/neovim/lib/attach.d.ts deleted file mode 100644 index 742f4bc..0000000 --- a/general/nvim/node_modules/neovim/lib/attach.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { attach } from './attach/attach'; diff --git a/general/nvim/node_modules/neovim/lib/attach.js b/general/nvim/node_modules/neovim/lib/attach.js deleted file mode 100644 index 25c6049..0000000 --- a/general/nvim/node_modules/neovim/lib/attach.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.attach = void 0; -var attach_1 = require("./attach/attach"); -Object.defineProperty(exports, "attach", { enumerable: true, get: function () { return attach_1.attach; } }); diff --git a/general/nvim/node_modules/neovim/lib/attach/attach.d.ts b/general/nvim/node_modules/neovim/lib/attach/attach.d.ts deleted file mode 100644 index e58401f..0000000 --- a/general/nvim/node_modules/neovim/lib/attach/attach.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import * as child from 'child_process'; -import { NeovimClient } from '../api/client'; -import { Logger } from '../utils/logger'; -export interface Attach { - reader?: NodeJS.ReadableStream; - writer?: NodeJS.WritableStream; - proc?: NodeJS.Process | child.ChildProcess; - socket?: string; - options?: { - logger?: Logger; - }; -} -export declare function attach({ reader: _reader, writer: _writer, proc, socket, options, }: Attach): NeovimClient; diff --git a/general/nvim/node_modules/neovim/lib/attach/attach.js b/general/nvim/node_modules/neovim/lib/attach/attach.js deleted file mode 100644 index e55c87b..0000000 --- a/general/nvim/node_modules/neovim/lib/attach/attach.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.attach = void 0; -const net_1 = require("net"); -const client_1 = require("../api/client"); -function attach({ reader: _reader, writer: _writer, proc, socket, options = {}, }) { - let writer; - let reader; - if (socket) { - const client = (0, net_1.createConnection)(socket); - writer = client; - reader = client; - } - else if (_reader && _writer) { - writer = _writer; - reader = _reader; - } - else if (proc) { - writer = proc.stdin; - reader = proc.stdout; - } - if (writer && reader) { - // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires - const loggerInstance = options.logger || require('../utils/logger').logger; // lazy load to winston only if needed - const neovim = new client_1.NeovimClient({ logger: loggerInstance }); - neovim.attach({ - writer, - reader, - }); - return neovim; - } - throw new Error('Invalid arguments, could not attach'); -} -exports.attach = attach; diff --git a/general/nvim/node_modules/neovim/lib/host/NvimPlugin.d.ts b/general/nvim/node_modules/neovim/lib/host/NvimPlugin.d.ts deleted file mode 100644 index 1586330..0000000 --- a/general/nvim/node_modules/neovim/lib/host/NvimPlugin.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Neovim } from '../api/Neovim'; -import { Spec } from '../types/Spec'; -export interface NvimPluginOptions { - dev?: boolean; - alwaysInit?: boolean; -} -export interface AutocmdOptions { - pattern: string; - eval?: string; - sync?: boolean; -} -export interface CommandOptions { - sync?: boolean; - range?: string; - nargs?: string; - complete?: string; -} -export interface NvimFunctionOptions { - sync?: boolean; - range?: string; - eval?: string; -} -export interface Handler { - fn: Function; - spec: Spec; -} -export declare function callable(fn: Function): Function; -export declare function callable(fn: [any, Function]): Function; -export declare class NvimPlugin { - filename: string; - nvim: Neovim; - instance: any; - dev: boolean; - alwaysInit: boolean; - autocmds: { - [index: string]: Handler; - }; - commands: { - [index: string]: Handler; - }; - functions: { - [index: string]: Handler; - }; - constructor(filename: string, plugin: any, nvim: Neovim); - setOptions(options: NvimPluginOptions): void; - get shouldCacheModule(): boolean; - registerAutocmd(name: string, fn: Function, options: AutocmdOptions): void; - registerAutocmd(name: string, fn: [any, Function], options: AutocmdOptions): void; - registerCommand(name: string, fn: Function, options?: CommandOptions): void; - registerCommand(name: string, fn: [any, Function], options?: CommandOptions): void; - registerFunction(name: string, fn: Function, options?: NvimFunctionOptions): void; - registerFunction(name: string, fn: [any, Function], options?: NvimFunctionOptions): void; - get specs(): Spec[]; - handleRequest(name: string, type: string, args: any[]): Promise; -} diff --git a/general/nvim/node_modules/neovim/lib/host/NvimPlugin.js b/general/nvim/node_modules/neovim/lib/host/NvimPlugin.js deleted file mode 100644 index 1658dc3..0000000 --- a/general/nvim/node_modules/neovim/lib/host/NvimPlugin.js +++ /dev/null @@ -1,172 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NvimPlugin = exports.callable = void 0; -const logger_1 = require("../utils/logger"); -function callable(fn) { - if (typeof fn === 'function') { - return fn; - } - if (Array.isArray(fn) && fn.length === 2) { - return function (...args) { - return fn[1].apply(fn[0], args); - }; - } - throw new Error(); -} -exports.callable = callable; -class NvimPlugin { - constructor(filename, plugin, nvim) { - this.filename = filename; - this.nvim = nvim; - this.dev = false; - this.alwaysInit = false; - this.autocmds = {}; - this.commands = {}; - this.functions = {}; - // Simplifies class and decorator style plugins - try { - // eslint-disable-next-line new-cap - this.instance = new plugin(this); - } - catch (err) { - if (err instanceof TypeError) { - this.instance = plugin(this); - } - else { - throw err; - } - } - } - setOptions(options) { - this.dev = options.dev === undefined ? this.dev : options.dev; - this.alwaysInit = options.alwaysInit; - } - // Cache module (in dev mode will clear the require module cache) - get shouldCacheModule() { - return !this.dev; - } - registerAutocmd(name, fn, options) { - if (!options.pattern) { - logger_1.logger.error(`registerAutocmd expected pattern option for ${name}`); - return; - } - const spec = { - type: 'autocmd', - name, - sync: options && !!options.sync, - opts: {}, - }; - ['pattern', 'eval'].forEach((option) => { - if (options && typeof options[option] !== 'undefined') { - spec.opts[option] = options[option]; - } - }); - try { - this.autocmds[`${name} ${options.pattern}`] = { - fn: callable(fn), - spec, - }; - } - catch (err) { - logger_1.logger.error(`registerAutocmd expected callable argument for ${name}`); - } - } - registerCommand(name, fn, options) { - const spec = { - type: 'command', - name, - sync: options && !!options.sync, - opts: {}, - }; - ['range', 'nargs', 'complete'].forEach((option) => { - if (options && typeof options[option] !== 'undefined') { - spec.opts[option] = options[option]; - } - }); - try { - this.commands[name] = { - fn: callable(fn), - spec, - }; - } - catch (err) { - logger_1.logger.error(`registerCommand expected callable argument for ${name}`); - } - } - registerFunction(name, fn, options) { - const spec = { - type: 'function', - name, - sync: options && !!options.sync, - opts: {}, - }; - ['range', 'eval'].forEach((option) => { - if (options && typeof options[option] !== 'undefined') { - spec.opts[option] = options[option]; - } - }); - try { - this.functions[name] = { - fn: callable(fn), - spec, - }; - } - catch (err) { - logger_1.logger.error(`registerFunction expected callable argument for ${name}`); - } - } - get specs() { - const autocmds = Object.keys(this.autocmds).map(key => this.autocmds[key].spec); - const commands = Object.keys(this.commands).map(key => this.commands[key].spec); - const functions = Object.keys(this.functions).map(key => this.functions[key].spec); - return autocmds.concat(commands).concat(functions); - } - handleRequest(name, type, args) { - return __awaiter(this, void 0, void 0, function* () { - let handlers; - switch (type) { - case 'autocmd': - handlers = this.autocmds; - break; - case 'command': - handlers = this.commands; - break; - case 'function': - handlers = this.functions; - break; - default: - const errMsg = `No handler for unknown type ${type}: "${name}" in ${this.filename}`; - logger_1.logger.error(errMsg); - throw new Error(errMsg); - } - if (handlers.hasOwnProperty(name)) { - const handler = handlers[name]; - try { - return handler.spec.sync - ? handler.fn(...args) - : yield handler.fn(...args); - } - catch (err) { - const msg = `Error in plugin for ${type}:${name}: ${err.message}`; - logger_1.logger.error(`${msg} (file: ${this.filename}, stack: ${err.stack})`); - throw new Error(err); - } - } - else { - const errMsg = `Missing handler for ${type}: "${name}" in ${this.filename}`; - logger_1.logger.error(errMsg); - throw new Error(errMsg); - } - }); - } -} -exports.NvimPlugin = NvimPlugin; diff --git a/general/nvim/node_modules/neovim/lib/host/factory.d.ts b/general/nvim/node_modules/neovim/lib/host/factory.d.ts deleted file mode 100644 index 3213e13..0000000 --- a/general/nvim/node_modules/neovim/lib/host/factory.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Neovim } from '../api/Neovim'; -import { NvimPlugin } from './NvimPlugin'; -export interface LoadPluginOptions { - cache?: boolean; -} -export declare function loadPlugin(filename: string, nvim: Neovim, options?: LoadPluginOptions): NvimPlugin | null; diff --git a/general/nvim/node_modules/neovim/lib/host/factory.js b/general/nvim/node_modules/neovim/lib/host/factory.js deleted file mode 100644 index 00fb8a0..0000000 --- a/general/nvim/node_modules/neovim/lib/host/factory.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadPlugin = void 0; -const path = __importStar(require("path")); -const Module = require("module"); -const logger_1 = require("../utils/logger"); -const NvimPlugin_1 = require("./NvimPlugin"); -// inspiration drawn from Module -function createPlugin(filename, nvim, options = {}) { - try { - logger_1.logger.debug(`createPlugin.${filename}.clearCache: ${options && !options.cache}`); - // Clear module from cache - if (options && !options.cache) { - try { - // `as any` to access hidden API - delete Module._cache[require.resolve(filename)]; - } - catch (err) { - // possible this doesn't exist in cache, ignore - } - } - // attempt to import plugin - // Require plugin to export a class - // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires, import/no-dynamic-require - const defaultImport = require(filename); - const plugin = (defaultImport && defaultImport.default) || defaultImport; - if (typeof plugin === 'function') { - return new NvimPlugin_1.NvimPlugin(filename, plugin, nvim); - } - } - catch (err) { - const file = path.basename(filename); - logger_1.logger.error(`[${file}] ${err.stack}`); - logger_1.logger.error(`[${file}] Error loading child ChildPlugin ${filename}`); - } - // There may have been an error, but maybe not - return null; -} -function loadPlugin(filename, nvim, options = {}) { - try { - return createPlugin(filename, nvim, options); - } - catch (err) { - // logger.error(`Could not load plugin "${filename}":`, err, err.stack); - return null; - } -} -exports.loadPlugin = loadPlugin; diff --git a/general/nvim/node_modules/neovim/lib/host/index.d.ts b/general/nvim/node_modules/neovim/lib/host/index.d.ts deleted file mode 100644 index d8ac8a6..0000000 --- a/general/nvim/node_modules/neovim/lib/host/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/// -import { LoadPluginOptions } from './factory'; -import { NvimPlugin } from './NvimPlugin'; -export interface Response { - send(resp: any, isError?: boolean): void; -} -export declare class Host { - loaded: { - [index: string]: NvimPlugin; - }; - nvim: any; - constructor(); - getPlugin(filename: string, options?: LoadPluginOptions): NvimPlugin; - handlePlugin(method: string, args: any[]): Promise; - handleRequestSpecs(method: string, args: any[], res: Response): void; - handler(method: string, args: any[], res: Response): Promise; - start({ proc }: { - proc: NodeJS.Process; - }): Promise; -} diff --git a/general/nvim/node_modules/neovim/lib/host/index.js b/general/nvim/node_modules/neovim/lib/host/index.js deleted file mode 100644 index 2a233ac..0000000 --- a/general/nvim/node_modules/neovim/lib/host/index.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Host = void 0; -const util = __importStar(require("util")); -const attach_1 = require("../attach"); -const logger_1 = require("../utils/logger"); -const factory_1 = require("./factory"); -class Host { - constructor() { - // Map for loaded plugins - this.loaded = {}; - this.handler = this.handler.bind(this); - this.handlePlugin = this.handlePlugin.bind(this); - } - getPlugin(filename, options = {}) { - let plugin = this.loaded[filename]; - const shouldUseCachedPlugin = plugin && plugin.shouldCacheModule && !plugin.alwaysInit; - if (shouldUseCachedPlugin) { - logger_1.logger.debug('getPlugin.useCachedPlugin'); - return plugin; - } - plugin = (0, factory_1.loadPlugin)(filename, this.nvim, Object.assign(Object.assign({}, options), { cache: plugin && plugin.shouldCacheModule })); - logger_1.logger.debug('getPlugin.alwaysInit', plugin && !plugin.alwaysInit); - this.loaded[filename] = plugin; - return plugin; - } - // Route incoming request to a plugin - handlePlugin(method, args) { - return __awaiter(this, void 0, void 0, function* () { - // ignore methods that start with nvim_ prefix (e.g. when attaching to buffer and listening for notifications) - if (method.startsWith('nvim_')) - return null; - logger_1.logger.debug('host.handlePlugin: ', method); - // Parse method name - const procInfo = method.split(':'); - if (process.platform === 'win32') { - // Windows-style absolute paths is formatted as [A-Z]:\path\to\file. - // Forward slash as path separator is ok - // so Neovim uses it to avoid escaping backslashes. - // - // For absolute path of cmd.exe with forward slash as path separator, - // method.split(':') returns ['C', '/Windows/System32/cmd.exe', ...]. - // procInfo should be ['C:/Windows/System32/cmd.exe', ...]. - const networkDrive = procInfo.shift(); - procInfo[0] = `${networkDrive}:${procInfo[0]}`; - } - const filename = procInfo[0]; - const type = procInfo[1]; - const procName = `${procInfo.slice(2).join(' ')}`; - const plugin = this.getPlugin(filename); - if (!plugin) { - const msg = `Could not load plugin: ${filename}`; - logger_1.logger.error(msg); - throw new Error(msg); - } - return plugin.handleRequest(procName, type, args); - }); - } - handleRequestSpecs(method, args, res) { - const filename = args[0]; - logger_1.logger.debug(`requested specs for ${filename}`); - // Can return null if there is nothing defined in plugin - const plugin = this.getPlugin(filename); - const specs = (plugin && plugin.specs) || []; - logger_1.logger.debug(JSON.stringify(specs)); - res.send(specs); - logger_1.logger.debug(`specs: ${util.inspect(specs)}`); - } - handler(method, args, res) { - return __awaiter(this, void 0, void 0, function* () { - logger_1.logger.debug('request received: ', method); - // 'poll' and 'specs' are requests by neovim, - // otherwise it will - if (method === 'poll') { - // Handshake for neovim - res.send('ok'); - } - else if (method === 'specs') { - // Return plugin specs - this.handleRequestSpecs(method, args, res); - } - else { - try { - const plugResult = yield this.handlePlugin(method, args); - res.send(!plugResult || typeof plugResult === 'undefined' ? null : plugResult); - } - catch (err) { - res.send(err.toString(), true); - } - } - }); - } - start({ proc }) { - return __awaiter(this, void 0, void 0, function* () { - logger_1.logger.debug('host.start'); - // stdio is reversed since it's from the perspective of Neovim - const nvim = (0, attach_1.attach)({ reader: proc.stdin, writer: proc.stdout }); - this.nvim = nvim; - if (nvim) { - nvim.on('request', this.handler); - nvim.on('notification', this.handlePlugin); - nvim.on('disconnect', () => { - logger_1.logger.debug('host.disconnected'); - }); - } - }); - } -} -exports.Host = Host; diff --git a/general/nvim/node_modules/neovim/lib/index.d.ts b/general/nvim/node_modules/neovim/lib/index.d.ts deleted file mode 100644 index 725f731..0000000 --- a/general/nvim/node_modules/neovim/lib/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { attach } from './attach'; -export { Neovim, NeovimClient, Buffer, Tabpage, Window } from './api/index'; -export { Plugin, Function, Autocmd, Command } from './plugin'; -export { NvimPlugin } from './host/NvimPlugin'; -export { loadPlugin } from './host/factory'; diff --git a/general/nvim/node_modules/neovim/lib/index.js b/general/nvim/node_modules/neovim/lib/index.js deleted file mode 100644 index c5f7bcf..0000000 --- a/general/nvim/node_modules/neovim/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadPlugin = exports.NvimPlugin = exports.Command = exports.Autocmd = exports.Function = exports.Plugin = exports.Window = exports.Tabpage = exports.Buffer = exports.NeovimClient = exports.Neovim = exports.attach = void 0; -var attach_1 = require("./attach"); -Object.defineProperty(exports, "attach", { enumerable: true, get: function () { return attach_1.attach; } }); -var index_1 = require("./api/index"); -Object.defineProperty(exports, "Neovim", { enumerable: true, get: function () { return index_1.Neovim; } }); -Object.defineProperty(exports, "NeovimClient", { enumerable: true, get: function () { return index_1.NeovimClient; } }); -Object.defineProperty(exports, "Buffer", { enumerable: true, get: function () { return index_1.Buffer; } }); -Object.defineProperty(exports, "Tabpage", { enumerable: true, get: function () { return index_1.Tabpage; } }); -Object.defineProperty(exports, "Window", { enumerable: true, get: function () { return index_1.Window; } }); -var plugin_1 = require("./plugin"); -Object.defineProperty(exports, "Plugin", { enumerable: true, get: function () { return plugin_1.Plugin; } }); -Object.defineProperty(exports, "Function", { enumerable: true, get: function () { return plugin_1.Function; } }); -Object.defineProperty(exports, "Autocmd", { enumerable: true, get: function () { return plugin_1.Autocmd; } }); -Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return plugin_1.Command; } }); -var NvimPlugin_1 = require("./host/NvimPlugin"); -Object.defineProperty(exports, "NvimPlugin", { enumerable: true, get: function () { return NvimPlugin_1.NvimPlugin; } }); -var factory_1 = require("./host/factory"); -Object.defineProperty(exports, "loadPlugin", { enumerable: true, get: function () { return factory_1.loadPlugin; } }); diff --git a/general/nvim/node_modules/neovim/lib/plugin.d.ts b/general/nvim/node_modules/neovim/lib/plugin.d.ts deleted file mode 100644 index d14a9af..0000000 --- a/general/nvim/node_modules/neovim/lib/plugin.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { Plugin, Function, Autocmd, Command } from './plugin/index'; diff --git a/general/nvim/node_modules/neovim/lib/plugin.js b/general/nvim/node_modules/neovim/lib/plugin.js deleted file mode 100644 index 3a31f27..0000000 --- a/general/nvim/node_modules/neovim/lib/plugin.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Command = exports.Autocmd = exports.Function = exports.Plugin = void 0; -var index_1 = require("./plugin/index"); -Object.defineProperty(exports, "Plugin", { enumerable: true, get: function () { return index_1.Plugin; } }); -Object.defineProperty(exports, "Function", { enumerable: true, get: function () { return index_1.Function; } }); -Object.defineProperty(exports, "Autocmd", { enumerable: true, get: function () { return index_1.Autocmd; } }); -Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return index_1.Command; } }); diff --git a/general/nvim/node_modules/neovim/lib/types/ApiInfo.d.ts b/general/nvim/node_modules/neovim/lib/types/ApiInfo.d.ts deleted file mode 100644 index 93eaada..0000000 --- a/general/nvim/node_modules/neovim/lib/types/ApiInfo.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export declare type Parameters = [string, string]; -export interface FunctionInfo { - parameters: Parameters[]; - method: boolean; - return_type: string; - name: string; - since: number; -} -export interface UiEventInfo { - parameters: Parameters[]; - name: string; - since: number; -} -export interface ApiInfo { - version: { - major: number; - minor: number; - patch: number; - api_level: number; - api_compatible: number; - api_prerelease: number; - }; - functions: FunctionInfo[]; - ui_events: UiEventInfo[]; - ui_options: string[]; - error_types: object; - types: object; -} diff --git a/general/nvim/node_modules/neovim/lib/types/ApiInfo.js b/general/nvim/node_modules/neovim/lib/types/ApiInfo.js deleted file mode 100644 index c8ad2e5..0000000 --- a/general/nvim/node_modules/neovim/lib/types/ApiInfo.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/general/nvim/node_modules/neovim/lib/types/Spec.d.ts b/general/nvim/node_modules/neovim/lib/types/Spec.d.ts deleted file mode 100644 index f06492c..0000000 --- a/general/nvim/node_modules/neovim/lib/types/Spec.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface Spec { - type: 'function' | 'autocmd' | 'command'; - name: string; - sync: boolean; - opts: { - range?: string; - nargs?: string; - eval?: string; - pattern?: string; - complete?: string; - }; -} diff --git a/general/nvim/node_modules/neovim/lib/types/Spec.js b/general/nvim/node_modules/neovim/lib/types/Spec.js deleted file mode 100644 index c8ad2e5..0000000 --- a/general/nvim/node_modules/neovim/lib/types/Spec.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/general/nvim/node_modules/neovim/lib/types/VimValue.d.ts b/general/nvim/node_modules/neovim/lib/types/VimValue.d.ts deleted file mode 100644 index 692ee18..0000000 --- a/general/nvim/node_modules/neovim/lib/types/VimValue.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare type VimValue = number | boolean | string | number[] | { - [key: string]: any; -}; diff --git a/general/nvim/node_modules/neovim/lib/types/VimValue.js b/general/nvim/node_modules/neovim/lib/types/VimValue.js deleted file mode 100644 index c8ad2e5..0000000 --- a/general/nvim/node_modules/neovim/lib/types/VimValue.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/general/nvim/node_modules/neovim/lib/utils/buffered.d.ts b/general/nvim/node_modules/neovim/lib/utils/buffered.d.ts deleted file mode 100644 index b2672c4..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/buffered.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -import { Transform } from 'stream'; -export default class Buffered extends Transform { - private chunks; - private timer; - constructor(); - sendData(): void; - _transform(chunk: Buffer, encoding: any, callback: any): void; - _flush(callback: any): void; -} diff --git a/general/nvim/node_modules/neovim/lib/utils/buffered.js b/general/nvim/node_modules/neovim/lib/utils/buffered.js deleted file mode 100644 index 783b7bb..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/buffered.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = require("stream"); -const MIN_SIZE = 8 * 1024; -class Buffered extends stream_1.Transform { - constructor() { - super({ - readableHighWaterMark: 10 * 1024 * 1024, - writableHighWaterMark: 10 * 1024 * 1024, - }); - this.chunks = null; - this.timer = null; - } - sendData() { - const { chunks } = this; - if (chunks) { - this.chunks = null; - const buf = Buffer.concat(chunks); - this.push(buf); - } - } - // eslint-disable-next-line consistent-return - _transform(chunk, encoding, callback) { - const { chunks, timer } = this; - if (timer) - clearTimeout(timer); - if (chunk.length < MIN_SIZE) { - if (!chunks) - return callback(null, chunk); - chunks.push(chunk); - this.sendData(); - callback(); - } - else { - if (!chunks) { - this.chunks = [chunk]; - } - else { - chunks.push(chunk); - } - this.timer = setTimeout(this.sendData.bind(this), 20); - callback(); - } - } - _flush(callback) { - const { chunks } = this; - if (chunks) { - this.chunks = null; - const buf = Buffer.concat(chunks); - callback(null, buf); - } - else { - callback(); - } - } -} -exports.default = Buffered; diff --git a/general/nvim/node_modules/neovim/lib/utils/devnull.d.ts b/general/nvim/node_modules/neovim/lib/utils/devnull.d.ts deleted file mode 100644 index 75c8886..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/devnull.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import { Duplex } from 'stream'; -export declare class DevNull extends Duplex { - _read(): void; - _write(chunk: any, enc: any, cb: Function): void; -} diff --git a/general/nvim/node_modules/neovim/lib/utils/devnull.js b/general/nvim/node_modules/neovim/lib/utils/devnull.js deleted file mode 100644 index c060560..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/devnull.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = require("stream"); -class DevNull extends stream_1.Duplex { - _read() { } - _write(chunk, enc, cb) { - cb(); - } -} -exports.DevNull = DevNull; diff --git a/general/nvim/node_modules/neovim/lib/utils/logger.d.ts b/general/nvim/node_modules/neovim/lib/utils/logger.d.ts deleted file mode 100644 index ab4c7c5..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/logger.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as winston from 'winston'; -export declare type Logger = Pick; -export declare const logger: Logger; diff --git a/general/nvim/node_modules/neovim/lib/utils/logger.js b/general/nvim/node_modules/neovim/lib/utils/logger.js deleted file mode 100644 index 87904f0..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/logger.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.logger = void 0; -const winston = __importStar(require("winston")); -const level = process.env.NVIM_NODE_LOG_LEVEL || 'debug'; -function setupWinstonLogger() { - const logger = winston.createLogger({ - level, - }); - if (process.env.NVIM_NODE_LOG_FILE) { - logger.add(new winston.transports.File({ - filename: process.env.NVIM_NODE_LOG_FILE, - level, - })); - } - if (process.env.ALLOW_CONSOLE) { - logger.add(new winston.transports.Console({ - format: winston.format.simple(), - })); - } - if (!process.env.NVIM_NODE_LOG_FILE && !process.env.ALLOW_CONSOLE) { - // Silent logger is necessary to avoid 'Attempt to write logs with no transports' error - logger.add(new winston.transports.Console({ silent: true })); - } - return logger; -} -exports.logger = setupWinstonLogger(); diff --git a/general/nvim/node_modules/neovim/lib/utils/transport.d.ts b/general/nvim/node_modules/neovim/lib/utils/transport.d.ts deleted file mode 100644 index c46b15b..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/transport.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Some code borrowed from https://github.com/tarruda/node-msgpack5rpc - */ -/// -import { EventEmitter } from 'events'; -declare class Transport extends EventEmitter { - private pending; - private nextRequestId; - private reader; - private writer; - private readonly extensionCodec; - private client; - private initializeExtensionCodec; - private encodeToBuffer; - attach(writer: NodeJS.WritableStream, reader: NodeJS.ReadableStream, client: any): void; - request(method: string, args: any[], cb: Function): void; - notify(method: string, args: any[]): void; - parseMessage(msg: any[]): void; -} -export { Transport }; diff --git a/general/nvim/node_modules/neovim/lib/utils/transport.js b/general/nvim/node_modules/neovim/lib/utils/transport.js deleted file mode 100644 index e9be0f2..0000000 --- a/general/nvim/node_modules/neovim/lib/utils/transport.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -/** - * Some code borrowed from https://github.com/tarruda/node-msgpack5rpc - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Transport = void 0; -const events_1 = require("events"); -const msgpack_1 = require("@msgpack/msgpack"); -const types_1 = require("../api/types"); -class Response { - constructor(encoder, requestId) { - this.encoder = encoder; - this.requestId = requestId; - } - send(resp, isError) { - if (this.sent) { - throw new Error(`Response to id ${this.requestId} already sent`); - } - const encoded = (0, msgpack_1.encode)([ - 1, - this.requestId, - isError ? resp : null, - !isError ? resp : null, - ]); - this.encoder.write(Buffer.from(encoded.buffer, encoded.byteOffset, encoded.byteLength)); - this.sent = true; - } -} -class Transport extends events_1.EventEmitter { - constructor() { - super(...arguments); - this.pending = new Map(); - this.nextRequestId = 1; - this.extensionCodec = this.initializeExtensionCodec(); - } - initializeExtensionCodec() { - const codec = new msgpack_1.ExtensionCodec(); - types_1.Metadata.forEach(({ constructor }, id) => { - codec.register({ - type: id, - encode: (input) => { - if (input instanceof constructor) { - return (0, msgpack_1.encode)(input.data); - } - return null; - }, - decode: data => new constructor({ - transport: this, - client: this.client, - data: (0, msgpack_1.decode)(data), - }), - }); - }); - return codec; - } - encodeToBuffer(value) { - const encoded = (0, msgpack_1.encode)(value, { extensionCodec: this.extensionCodec }); - return Buffer.from(encoded.buffer, encoded.byteOffset, encoded.byteLength); - } - attach(writer, reader, client) { - this.writer = writer; - this.reader = reader; - this.client = client; - this.reader.on('end', () => { - this.emit('detach'); - }); - const asyncDecodeGenerator = (0, msgpack_1.decodeMultiStream)(this.reader, { - extensionCodec: this.extensionCodec, - }); - // naively iterate async generator created via decodeMultiStream. - // when runtime / polyfill allows replace to `for await (const val of asyncDecodeGenerator)` - // syntax instead. - const resolveGeneratorRecursively = (iter) => { - iter.next().then(resolved => { - if (!resolved.done) { - this.parseMessage(resolved.value); - return resolveGeneratorRecursively(iter); - } - return Promise.resolve(); - }); - }; - resolveGeneratorRecursively(asyncDecodeGenerator); - } - request(method, args, cb) { - this.nextRequestId = this.nextRequestId + 1; - this.writer.write(this.encodeToBuffer([0, this.nextRequestId, method, args])); - this.pending.set(this.nextRequestId, cb); - } - notify(method, args) { - this.writer.write(this.encodeToBuffer([2, method, args])); - } - parseMessage(msg) { - const msgType = msg[0]; - if (msgType === 0) { - // request - // - msg[1]: id - // - msg[2]: method name - // - msg[3]: arguments - this.emit('request', msg[2].toString(), msg[3], new Response(this.writer, msg[1])); - } - else if (msgType === 1) { - // response to a previous request: - // - msg[1]: the id - // - msg[2]: error(if any) - // - msg[3]: result(if not errored) - const id = msg[1]; - const handler = this.pending.get(id); - this.pending.delete(id); - handler(msg[2], msg[3]); - } - else if (msgType === 2) { - // notification/event - // - msg[1]: event name - // - msg[2]: arguments - this.emit('notification', msg[1].toString(), msg[2]); - } - else { - this.writer.write(this.encodeToBuffer([1, 0, 'Invalid message type', null])); - } - } -} -exports.Transport = Transport; diff --git a/general/nvim/node_modules/neovim/package.json b/general/nvim/node_modules/neovim/package.json deleted file mode 100644 index 9bacaf6..0000000 --- a/general/nvim/node_modules/neovim/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "name": "neovim", - "description": "Neovim client API and neovim remote plugin provider", - "version": "4.10.1", - "homepage": "https://github.com/neovim/node-client", - "authors": [ - { - "name": "Billy Vong", - "email": "github@mmo.me" - }, - { - "name": "rhysd", - "email": "lin90162@yahoo.co.jp" - }, - { - "name": "Thiago de Arruda", - "email": "tpadilha84@gmail.com" - }, - { - "name": "Mike Hartington", - "email": "" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/neovim/node-client" - }, - "bugs": { - "url": "https://github.com/neovim/node-client/issues" - }, - "license": "MIT", - "bin": { - "neovim-node-host": "./bin/cli.js" - }, - "files": [ - "scripts/nvim.js", - "scripts/api.js", - "bin/", - "lib/" - ], - "main": "./lib/index", - "typings": "./lib/index", - "engines": { - "node": ">=10" - }, - "dependencies": { - "@msgpack/msgpack": "^2.7.1", - "semver": "^7.3.5", - "winston": "3.3.3" - }, - "devDependencies": { - "@babel/core": "^7.15.5", - "@babel/plugin-proposal-class-properties": "^7.14.5", - "@babel/preset-env": "^7.15.6", - "@babel/preset-typescript": "^7.15.0", - "@types/jest": "^27.0.1", - "@types/node": "16.9.x", - "@types/which": "^2.0.1", - "babel-jest": "^27.2.0", - "jest": "^27.2.0", - "jest-haste-map": "^27.2.0", - "jest-resolve": "^27.2.0", - "typedoc": "^0.22.4", - "typescript": "^4.4.3", - "which": "^2.0.2" - }, - "scripts": { - "doc": "typedoc --out doc --exclude '**/*.test.ts' src", - "prepublishOnly": "yarn build", - "test": "yarn jest", - "test-build": "yarn test --runInBand --coverage", - "test-staged": "yarn test --bail --no-cache --findRelatedTests", - "test-missing-apis": "yarn build && node scripts/findMissingApi", - "precommit": "lint-staged", - "build": "tsc --pretty", - "dev": "yarn build --watch true" - }, - "jest": { - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ], - "testEnvironment": "node", - "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.ts$", - "coverageDirectory": "./coverage/", - "testURL": "http://localhost" - }, - "volta": { - "node": "10.18.0", - "yarn": "1.21.1" - }, - "keywords": [ - "neovim", - "neovim-client", - "node-host", - "node-client", - "nvim", - "nvim-client", - "vim" - ], - "gitHead": "4b088eeb8c34fef77e7704ca80c0d514b40f57e1" -} diff --git a/general/nvim/node_modules/neovim/scripts/api.js b/general/nvim/node_modules/neovim/scripts/api.js deleted file mode 100644 index bb415cf..0000000 --- a/general/nvim/node_modules/neovim/scripts/api.js +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint no-console:0 global-require:0 */ -const search = process.argv[2] || ''; - -async function main() { - const nvim = await require('./nvim'); - const results = await nvim.requestApi(); - const { functions } = results[1]; - const lines = functions.filter(({ name }) => name.indexOf(search) > -1); - lines - .filter(metadata => typeof metadata.deprecated_since === 'undefined') - .forEach(metadata => { - const params = metadata.parameters.map(p => p[1]); - const paramTypes = metadata.parameters.map(p => p[0]); - console.log( - `${metadata.name}(${params - .map((p, i) => `${p}: ${paramTypes[i]}`) - .join(', ')}): ${metadata.return_type}` - ); - console.log(` method: ${metadata.method}`); - console.log(` since: ${metadata.since}`); - console.log(''); - }); - process.exit(0); -} - -try { - main(); -} catch (err) { - console.error(err); - process.exit(1); -} diff --git a/general/nvim/node_modules/neovim/scripts/nvim.js b/general/nvim/node_modules/neovim/scripts/nvim.js deleted file mode 100644 index 915e637..0000000 --- a/general/nvim/node_modules/neovim/scripts/nvim.js +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint no-console:0 */ - -/** - * Spawns an embedded neovim instance and returns Neovim API - */ - -const cp = require('child_process'); -const { attach } = require('../'); -// const inspect = require('util').inspect; - -module.exports = (async function () { - let proc; - let socket; - - if (process.env.NVIM_LISTEN_ADDRESS) { - socket = process.env.NVIM_LISTEN_ADDRESS; - } else { - proc = cp.spawn('nvim', ['-u', 'NONE', '--embed', '-n'], { - cwd: __dirname, - }); - } - - const nvim = await attach({ proc, socket }); - return nvim; -})(); diff --git a/general/nvim/node_modules/one-time/LICENSE b/general/nvim/node_modules/one-time/LICENSE deleted file mode 100644 index 6dc9316..0000000 --- a/general/nvim/node_modules/one-time/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/general/nvim/node_modules/one-time/README.md b/general/nvim/node_modules/one-time/README.md deleted file mode 100644 index 75143ad..0000000 --- a/general/nvim/node_modules/one-time/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# one-time - -Call the supplied function exactly one time. This prevents double callback -execution. This module can be used on both Node.js, React-Native, or browsers -using Browserify. No magical ES5/6 methods used unlike the `once` module does -(except for the async version). - -## Installation - -This module is published to the public npm registry and can be installed -by running: - -```sh -npm install --save one-time -``` - -## Usage (normal) - -Simply supply the function with the function that should only be called one -time: - -```js -var one = require('one-time'); - -function load(file, fn) { - fn = one(fn); - - eventemitter.once('load', fn); - eventemitter.once('error', fn); - - // do stuff - eventemitter.emit('error', new Error('Failed to load, but still finished')); - eventemitter.emit('load'); -} - -function example(fn) { - fn = one(fn); - - fn(); - fn('also receives all arguments'); - fn('it returns the same value') === 'bar'; - fn('never'); - fn('gonna'); - fn('give'); - fn('you'); - fn('up'); -} - -example(function () { - return 'bar' -}); -``` - -## Usage (async) - -The same pattern is available for **async** functions as well, for that you -should import that `one-time/async` version instead. This one is optimized -for **async** and **await** support. It following exactly the same as the -normal version but assumes it's an `async function () {}` that it's wrapping -instead of a regular function, and it will return an `async function() {}` -instead of a regular function. - -```js -import one from 'one-time/async'; - -const fn = one(async function () { - return await example(); -}); - -await fn(); -await fn(); -await fn(); -``` - -### Why not `once`? - -The main reason is that `once` cannot be used in a browser environment unless -it's ES5 compatible. For a module as simple as this I find that unacceptable. In -addition to that it super heavy on the dependency side. So it's totally not -suitable to be used in client side applications. - -In addition to that we make sure that your code stays easy to debug as returned -functions are named in the same way as your supplied functions. Making heap -inspection and stack traces easier to understand. - -## License - -[MIT](LICENSE) diff --git a/general/nvim/node_modules/one-time/async.js b/general/nvim/node_modules/one-time/async.js deleted file mode 100644 index 7370ae3..0000000 --- a/general/nvim/node_modules/one-time/async.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var name = require('fn.name'); - -/** - * Wrap callbacks to prevent double execution. - * - * @param {Function} fn Function that should only be called once. - * @returns {Function} A async wrapped callback which prevents multiple executions. - * @public - */ -module.exports = function one(fn) { - var called = 0 - , value; - - /** - * The function that prevents double execution. - * - * @async - * @public - */ - async function onetime() { - if (called) return value; - - called = 1; - value = await fn.apply(this, arguments); - fn = null; - - return value; - } - - // - // To make debugging more easy we want to use the name of the supplied - // function. So when you look at the functions that are assigned to event - // listeners you don't see a load of `onetime` functions but actually the - // names of the functions that this module will call. - // - // NOTE: We cannot override the `name` property, as that is `readOnly` - // property, so displayName will have to do. - // - onetime.displayName = name(fn); - return onetime; -}; diff --git a/general/nvim/node_modules/one-time/index.js b/general/nvim/node_modules/one-time/index.js deleted file mode 100644 index 96b2f3d..0000000 --- a/general/nvim/node_modules/one-time/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var name = require('fn.name'); - -/** - * Wrap callbacks to prevent double execution. - * - * @param {Function} fn Function that should only be called once. - * @returns {Function} A wrapped callback which prevents multiple executions. - * @public - */ -module.exports = function one(fn) { - var called = 0 - , value; - - /** - * The function that prevents double execution. - * - * @private - */ - function onetime() { - if (called) return value; - - called = 1; - value = fn.apply(this, arguments); - fn = null; - - return value; - } - - // - // To make debugging more easy we want to use the name of the supplied - // function. So when you look at the functions that are assigned to event - // listeners you don't see a load of `onetime` functions but actually the - // names of the functions that this module will call. - // - // NOTE: We cannot override the `name` property, as that is `readOnly` - // property, so displayName will have to do. - // - onetime.displayName = name(fn); - return onetime; -}; diff --git a/general/nvim/node_modules/one-time/package.json b/general/nvim/node_modules/one-time/package.json deleted file mode 100644 index bc32a02..0000000 --- a/general/nvim/node_modules/one-time/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "one-time", - "version": "1.0.0", - "description": "Run the supplied function exactly one time (once)", - "main": "index.js", - "scripts": { - "test:runner": "mocha test.js", - "test:watch": "npm run test:runner -- --watch", - "test": "nyc --reporter=text --reporter=json-summary npm run test:runner" - }, - "repository": { - "type": "git", - "url": "https://github.com/3rd-Eden/one-time.git" - }, - "keywords": [ - "once", - "function", - "single", - "one", - "one-time", - "execution", - "nope" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "devDependencies": { - "assume": "^2.2.0", - "mocha": "^6.1.4", - "nyc": "^14.1.0" - }, - "dependencies": { - "fn.name": "1.x.x" - } -} diff --git a/general/nvim/node_modules/readable-stream/CONTRIBUTING.md b/general/nvim/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58..0000000 --- a/general/nvim/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/general/nvim/node_modules/readable-stream/GOVERNANCE.md b/general/nvim/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93..0000000 --- a/general/nvim/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/general/nvim/node_modules/readable-stream/LICENSE b/general/nvim/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b..0000000 --- a/general/nvim/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/general/nvim/node_modules/readable-stream/README.md b/general/nvim/node_modules/readable-stream/README.md deleted file mode 100644 index 6f035ab..0000000 --- a/general/nvim/node_modules/readable-stream/README.md +++ /dev/null @@ -1,106 +0,0 @@ -# readable-stream - -***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream) - -```bash -npm install --save readable-stream -``` - -This package is a mirror of the streams implementations in Node.js. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -## Version 3.x.x - -v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: - -1. Error codes: https://github.com/nodejs/node/pull/13310, - https://github.com/nodejs/node/pull/13291, - https://github.com/nodejs/node/pull/16589, - https://github.com/nodejs/node/pull/15042, - https://github.com/nodejs/node/pull/15665, - https://github.com/nodejs/readable-stream/pull/344 -2. 'readable' have precedence over flowing - https://github.com/nodejs/node/pull/18994 -3. make virtual methods errors consistent - https://github.com/nodejs/node/pull/18813 -4. updated streams error handling - https://github.com/nodejs/node/pull/18438 -5. writable.end should return this. - https://github.com/nodejs/node/pull/18780 -6. readable continues to read when push('') - https://github.com/nodejs/node/pull/18211 -7. add custom inspect to BufferList - https://github.com/nodejs/node/pull/17907 -8. always defer 'readable' with nextTick - https://github.com/nodejs/node/pull/17979 - -## Version 2.x.x -v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11. - -### Big Thanks - -Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce] - -# Usage - -You can swap your `require('stream')` with `require('readable-stream')` -without any changes, if you are just using one of the main classes and -functions. - -```js -const { - Readable, - Writable, - Transform, - Duplex, - pipeline, - finished -} = require('readable-stream') -```` - -Note that `require('stream')` will return `Stream`, while -`require('readable-stream')` will return `Readable`. We discourage using -whatever is exported directly, but rather use one of the properties as -shown in the example above. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> -* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com> - -[sauce]: https://saucelabs.com diff --git a/general/nvim/node_modules/readable-stream/errors-browser.js b/general/nvim/node_modules/readable-stream/errors-browser.js deleted file mode 100644 index fb8e73e..0000000 --- a/general/nvim/node_modules/readable-stream/errors-browser.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict'; - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } - -var codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error; - } - - function getMessage(arg1, arg2, arg3) { - if (typeof message === 'string') { - return message; - } else { - return message(arg1, arg2, arg3); - } - } - - var NodeError = - /*#__PURE__*/ - function (_Base) { - _inheritsLoose(NodeError, _Base); - - function NodeError(arg1, arg2, arg3) { - return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; - } - - return NodeError; - }(Base); - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - codes[code] = NodeError; -} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js - - -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - var len = expected.length; - expected = expected.map(function (i) { - return String(i); - }); - - if (len > 2) { - return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; - } else if (len === 2) { - return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); - } else { - return "of ".concat(thing, " ").concat(expected[0]); - } - } else { - return "of ".concat(thing, " ").concat(String(expected)); - } -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith - - -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith - - -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - - return str.substring(this_len - search.length, this_len) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes - - -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"'; -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - var determiner; - - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - var msg; - - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } else { - var type = includes(name, '.') ? 'property' : 'argument'; - msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } - - msg += ". Received type ".concat(typeof actual); - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented'; -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg; -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); -module.exports.codes = codes; diff --git a/general/nvim/node_modules/readable-stream/errors.js b/general/nvim/node_modules/readable-stream/errors.js deleted file mode 100644 index 8471526..0000000 --- a/general/nvim/node_modules/readable-stream/errors.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -const codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error - } - - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) - } - } - - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } - } - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - - codes[code] = NodeError; -} - -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; - } - } else { - return `of ${thing} ${String(expected)}`; - } -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; - } - - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); - -module.exports.codes = codes; diff --git a/general/nvim/node_modules/readable-stream/experimentalWarning.js b/general/nvim/node_modules/readable-stream/experimentalWarning.js deleted file mode 100644 index 78e8414..0000000 --- a/general/nvim/node_modules/readable-stream/experimentalWarning.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -var experimentalWarnings = new Set(); - -function emitExperimentalWarning(feature) { - if (experimentalWarnings.has(feature)) return; - var msg = feature + ' is an experimental feature. This feature could ' + - 'change at any time'; - experimentalWarnings.add(feature); - process.emitWarning(msg, 'ExperimentalWarning'); -} - -function noop() {} - -module.exports.emitExperimentalWarning = process.emitWarning - ? emitExperimentalWarning - : noop; diff --git a/general/nvim/node_modules/readable-stream/lib/_stream_duplex.js b/general/nvim/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 6752519..0000000 --- a/general/nvim/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. -'use strict'; -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - - for (var key in obj) { - keys.push(key); - } - - return keys; -}; -/**/ - - -module.exports = Duplex; - -var Readable = require('./_stream_readable'); - -var Writable = require('./_stream_writable'); - -require('inherits')(Duplex, Readable); - -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } - } -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); // the no-half-open enforcer - -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; // no more data can be written. - // But allow more writes to happen in this tick. - - process.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/_stream_passthrough.js b/general/nvim/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 32e7414..0000000 --- a/general/nvim/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -require('inherits')(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/_stream_readable.js b/general/nvim/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 192d451..0000000 --- a/general/nvim/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1124 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -'use strict'; - -module.exports = Readable; -/**/ - -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; -/**/ - -var EE = require('events').EventEmitter; - -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ - - -var Stream = require('./internal/streams/stream'); -/**/ - - -var Buffer = require('buffer').Buffer; - -var OurUint8Array = global.Uint8Array || function () {}; - -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} - -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -/**/ - - -var debugUtil = require('util'); - -var debug; - -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ - - -var BufferList = require('./internal/streams/buffer_list'); - -var destroyImpl = require('./internal/streams/destroy'); - -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; - -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance. - - -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; - -require('inherits')(Readable, Stream); - -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - - this.sync = true; // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; // Should close be emitted on destroy. Defaults to true. - - this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish') - - this.autoDestroy = !!options.autoDestroy; // has it been destroyed - - this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - - this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s - - this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled - - this.readingMore = false; - this.decoder = null; - this.encoding = null; - - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); // legacy - - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; - -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; // Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. - - -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; // Unshift should *always* be something directly out of read() - - -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); - } - } // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - - - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); - } - - return er; -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; // backwards compatibility. - - -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8 - - this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers: - - var p = this._readableState.buffer.head; - var content = ''; - - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - - this._readableState.buffer.clear(); - - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; // Don't raise the hwm > 1GB - - -var MAX_HWM = 0x40000000; - -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - - return n; -} // This function is designed to be inlinable, so please take care when making -// changes to the function body. - - -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } // If we're asking for more than the current hwm, then raise the hwm. - - - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; // Don't have enough - - if (!state.ended) { - state.needReadable = true; - return 0; - } - - return state.length; -} // you can override either this method, or the async _read(n) below. - - -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up. - - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - // if we need a readable event, then we need to do some reading. - - - var doRead = state.needReadable; - debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some - - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - - - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; // if the length is currently zero, then we *need* a readable event. - - if (state.length === 0) state.needReadable = true; // call internal read method - - this._read(state.highWaterMark); - - state.sync = false; // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. - - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - return ret; -}; - -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; - - if (state.decoder) { - var chunk = state.decoder.end(); - - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - - state.ended = true; - - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); - } - } -} // Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. - - -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} - -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - - - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} // at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. - - -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) // didn't get any data, stop spinning. - break; - } - - state.readingMore = false; -} // abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. - - -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - - case 1: - state.pipes = [state.pipes, dest]; - break; - - default: - state.pipes.push(dest); - break; - } - - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - - - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - - function cleanup() { - debug('cleanup'); // cleanup event handlers once the pipe is broken - - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - - src.pause(); - } - } // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - - - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } // Make sure our error handler is attached before userland ones. - - - prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. - - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - - dest.once('close', onclose); - - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } // tell the dest that it's being piped to - - - dest.emit('pipe', src); // start the flow if it hasn't been started already. - - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; // if we're not piping anywhere, then do nothing. - - if (state.pipesCount === 0) return this; // just one destination. most common case. - - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; // got a match. - - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } // slow case. multiple pipe destinations. - - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - } - - return this; - } // try to find the right one. - - - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; // set up data events if they are asked for -// Ensure readable listeners eventually get something - - -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused - - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } - } - } - - return res; -}; - -Readable.prototype.addListener = Readable.prototype.on; - -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} // pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. - - -Readable.prototype.resume = function () { - var state = this._readableState; - - if (!state.flowing) { - debug('resume'); // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - - state.flowing = !state.readableListening; - resume(this, state); - } - - state.paused = false; - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - debug('resume', state.reading); - - if (!state.reading) { - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - - this._readableState.paused = true; - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - - while (state.flowing && stream.read() !== null) { - ; - } -} // wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. - - -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode - - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - - if (!ret) { - paused = true; - stream.pause(); - } - }); // proxy all the other methods. - // important when wrapping filters and duplexes. - - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } // proxy certain important events. - - - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } // when we try to consume some more bytes, simply unpause the - // underlying stream. - - - this._read = function (n) { - debug('wrapped _read', n); - - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); - } - - return createReadableStreamAsyncIterator(this); - }; -} - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } -}); // exposed for testing purposes only. - -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } -}); // Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. - -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift. - - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } - } - } -} - -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = require('./internal/streams/from'); - } - - return from(Readable, iterable, opts); - }; -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - - return -1; -} \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/_stream_transform.js b/general/nvim/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 41a738c..0000000 --- a/general/nvim/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. -'use strict'; - -module.exports = Transform; - -var _require$codes = require('../errors').codes, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; - -var Duplex = require('./_stream_duplex'); - -require('inherits')(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); - } - - ts.writechunk = null; - ts.writecb = null; - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; // start out asking for a readable event once data is transformed. - - this._readableState.needReadable = true; // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; - } // When the writable side finishes, then flush out anything remaining. - - - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; // This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. - - -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; // Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. - - -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); -} \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/_stream_writable.js b/general/nvim/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index a2634d7..0000000 --- a/general/nvim/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. -'use strict'; - -module.exports = Writable; -/* */ - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} // It seems a linked list but it is not -// there will be only 2 of these for each stream - - -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ - - -var Duplex; -/**/ - -Writable.WritableState = WritableState; -/**/ - -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ - -var Stream = require('./internal/streams/stream'); -/**/ - - -var Buffer = require('buffer').Buffer; - -var OurUint8Array = global.Uint8Array || function () {}; - -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} - -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -var destroyImpl = require('./internal/streams/destroy'); - -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; - -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; - -var errorOrDestroy = destroyImpl.errorOrDestroy; - -require('inherits')(Writable, Stream); - -function nop() {} - -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream - // contains buffers or objects. - - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called - - this.finalCalled = false; // drain event flag. - - this.needDrain = false; // at the start of calling end() - - this.ending = false; // when end() has been called, and returned - - this.ended = false; // when 'finish' is emitted - - this.finished = false; // has it been destroyed - - this.destroyed = false; // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - - this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - - this.length = 0; // a flag to see when we're in the middle of a write. - - this.writing = false; // when true all writes will be buffered until .uncork() call - - this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - - this.sync = true; // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - - this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) - - this.onwrite = function (er) { - onwrite(stream, er); - }; // the callback that the user supplies to write(chunk,encoding,cb) - - - this.writecb = null; // the amount that is being written when _write is called. - - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - - this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - - this.prefinished = false; // True if the error was already emitted and should not be thrown again - - this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. - - this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end') - - this.autoDestroy = !!options.autoDestroy; // count buffered requests - - this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - - while (current) { - out.push(current); - current = current.next; - } - - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); // Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. - - -var realHasInstance; - -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); // legacy. - - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} // Otherwise people can pipe Writable streams, which is just wrong. - - -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; - -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb - - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} // Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. - - -function validChunk(stream, state, chunk, cb) { - var er; - - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - - return true; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; - -Writable.prototype.cork = function () { - this._writableState.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); // if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. - -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. - - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); // this can emit finish, and it will always happen - // after error - - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); // this can emit finish, but finish must - // always follow error - - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} // Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. - - -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} // if there's something in the buffer waiting, then process it - - -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - - state.pendingcb++; - state.lastBufferedRequest = null; - - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks - - if (state.corked) { - state.corked = 1; - this.uncork(); - } // ignore unnecessary end() calls. - - - if (!state.ending) endWritable(this, state, cb); - return this; -}; - -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - - if (err) { - errorOrDestroy(stream, err); - } - - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} - -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - - if (need) { - prefinish(stream, state); - - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; - - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } - } - - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); - } - - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } // reuse the free corkReq. - - - state.corkedRequestsFree.next = corkReq; -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._writableState.destroyed = value; - } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; - -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/async_iterator.js deleted file mode 100644 index 9fb615a..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/async_iterator.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict'; - -var _Object$setPrototypeO; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var finished = require('./end-of-stream'); - -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); - -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} - -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - - if (resolve !== null) { - var data = iter[kStream].read(); // we defer if data is null - // we can be expecting either 'end' or - // 'error' - - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } -} - -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} - -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} - -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - - next: function next() { - var _this = this; - - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - - if (error !== null) { - return Promise.reject(error); - } - - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } - - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - - - var lastPromise = this[kLastPromise]; - var promise; - - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - - promise = new Promise(this[kHandlePromise]); - } - - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); - -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise - // returned by next() and store the error - - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - - iterator[kError] = err; - return; - } - - var resolve = iterator[kLastResolve]; - - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; - -module.exports = createReadableStreamAsyncIterator; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/buffer_list.js deleted file mode 100644 index cdea425..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/buffer_list.js +++ /dev/null @@ -1,210 +0,0 @@ -'use strict'; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var _require = require('buffer'), - Buffer = _require.Buffer; - -var _require2 = require('util'), - inspect = _require2.inspect; - -var custom = inspect && inspect.custom || 'inspect'; - -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} - -module.exports = -/*#__PURE__*/ -function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - } - }, { - key: "clear", - value: function clear() { - this.head = this.tail = null; - this.length = 0; - } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - - while (p = p.next) { - ret += s + p.data; - } - - return ret; - } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - - return ret; - } // Consumes a specified amount of bytes or characters from the buffered data. - - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret; - - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); - } - - return ret; - } - }, { - key: "first", - value: function first() { - return this.head.data; - } // Consumes a specified amount of characters from the buffered data. - - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - - break; - } - - ++c; - } - - this.length -= c; - return ret; - } // Consumes a specified amount of bytes from the buffered data. - - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - - break; - } - - ++c; - } - - this.length -= c; - return ret; - } // Make sure the linked list only shows the minimal necessary information. - - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread({}, options, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); - } - }]); - - return BufferList; -}(); \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/destroy.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 3268a16..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; // undocumented cb() API, needed for core, not for public API - -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); - } - } - - return this; - } // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - - if (this._readableState) { - this._readableState.destroyed = true; - } // if this is a duplex stream mark the writable part as destroyed as well - - - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); - } else { - process.nextTick(emitCloseNT, _this); - } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - - return this; -} - -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} - -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/end-of-stream.js deleted file mode 100644 index 831f286..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +++ /dev/null @@ -1,104 +0,0 @@ -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). -'use strict'; - -var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - callback.apply(this, args); - }; -} - -function noop() {} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - - var writableEnded = stream._writableState && stream._writableState.finished; - - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - - var readableEnded = stream._readableState && stream._readableState.endEmitted; - - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - - var onerror = function onerror(err) { - callback.call(stream, err); - }; - - var onclose = function onclose() { - var err; - - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -} - -module.exports = eos; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/from-browser.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/from-browser.js deleted file mode 100644 index a4ce56f..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/from-browser.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function () { - throw new Error('Readable.from is not available in the browser') -}; diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/from.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/from.js deleted file mode 100644 index 6c41284..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/from.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE; - -function from(Readable, iterable, opts) { - var iterator; - - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); // Reading boolean to protect against _read - // being called before last iteration completion. - - var reading = false; - - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - - function next() { - return _next2.apply(this, arguments); - } - - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _ref = yield iterator.next(), - value = _ref.value, - done = _ref.done; - - if (done) { - readable.push(null); - } else if (readable.push((yield value))) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); - } - - return readable; -} - -module.exports = from; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/pipeline.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/pipeline.js deleted file mode 100644 index 6589909..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/pipeline.js +++ /dev/null @@ -1,97 +0,0 @@ -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). -'use strict'; - -var eos; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} - -var _require$codes = require('../../../errors').codes, - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; - -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = require('./end-of-stream'); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; // request.destroy just do .end - .abort is what we want - - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} - -function call(fn) { - fn(); -} - -function pipe(from, to) { - return from.pipe(to); -} - -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} - -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); - } - - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); -} - -module.exports = pipeline; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/state.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/state.js deleted file mode 100644 index 19887eb..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/state.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; - -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -} - -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); - } - - return Math.floor(hwm); - } // Default value - - - return state.objectMode ? 16 : 16 * 1024; -} - -module.exports = { - getHighWaterMark: getHighWaterMark -}; \ No newline at end of file diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3f..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/general/nvim/node_modules/readable-stream/lib/internal/streams/stream.js b/general/nvim/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b..0000000 --- a/general/nvim/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/general/nvim/node_modules/readable-stream/package.json b/general/nvim/node_modules/readable-stream/package.json deleted file mode 100644 index 0b0c4bd..0000000 --- a/general/nvim/node_modules/readable-stream/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "readable-stream", - "version": "3.6.0", - "description": "Streams3, a user-land copy of the stream library from Node.js", - "main": "readable.js", - "engines": { - "node": ">= 6" - }, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "devDependencies": { - "@babel/cli": "^7.2.0", - "@babel/core": "^7.2.0", - "@babel/polyfill": "^7.0.0", - "@babel/preset-env": "^7.2.0", - "airtap": "0.0.9", - "assert": "^1.4.0", - "bl": "^2.0.0", - "deep-strict-equal": "^0.2.0", - "events.once": "^2.0.2", - "glob": "^7.1.2", - "gunzip-maybe": "^1.4.1", - "hyperquest": "^2.1.3", - "lolex": "^2.6.0", - "nyc": "^11.0.0", - "pump": "^3.0.0", - "rimraf": "^2.6.2", - "tap": "^12.0.0", - "tape": "^4.9.0", - "tar-fs": "^1.16.2", - "util-promisify": "^2.1.0" - }, - "scripts": { - "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", - "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", - "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", - "test-browser-local": "airtap --open --local -- test/browser.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "update-browser-errors": "babel -o errors-browser.js errors.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false, - "worker_threads": false, - "./errors": "./errors-browser.js", - "./readable.js": "./readable-browser.js", - "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "license": "MIT" -} diff --git a/general/nvim/node_modules/readable-stream/readable-browser.js b/general/nvim/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index adbf60d..0000000 --- a/general/nvim/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,9 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -exports.finished = require('./lib/internal/streams/end-of-stream.js'); -exports.pipeline = require('./lib/internal/streams/pipeline.js'); diff --git a/general/nvim/node_modules/readable-stream/readable.js b/general/nvim/node_modules/readable-stream/readable.js deleted file mode 100644 index 9e0ca12..0000000 --- a/general/nvim/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,16 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); - exports.finished = require('./lib/internal/streams/end-of-stream.js'); - exports.pipeline = require('./lib/internal/streams/pipeline.js'); -} diff --git a/general/nvim/node_modules/safe-buffer/LICENSE b/general/nvim/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/general/nvim/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/general/nvim/node_modules/safe-buffer/README.md b/general/nvim/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81af..0000000 --- a/general/nvim/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/general/nvim/node_modules/safe-buffer/index.d.ts b/general/nvim/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed80..0000000 --- a/general/nvim/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/general/nvim/node_modules/safe-buffer/index.js b/general/nvim/node_modules/safe-buffer/index.js deleted file mode 100644 index f8d3ec9..0000000 --- a/general/nvim/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/general/nvim/node_modules/safe-buffer/package.json b/general/nvim/node_modules/safe-buffer/package.json deleted file mode 100644 index f2869e2..0000000 --- a/general/nvim/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.2.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "devDependencies": { - "standard": "*", - "tape": "^5.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/general/nvim/node_modules/safe-stable-stringify/CHANGELOG.md b/general/nvim/node_modules/safe-stable-stringify/CHANGELOG.md deleted file mode 100644 index 0e8f088..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/CHANGELOG.md +++ /dev/null @@ -1,75 +0,0 @@ -# Changelog - -## v2.3.1 - -- Fix `invalid regexp group` error in browsers or environments that do not support the negative lookbehind regular expression assertion. - -## v2.3.0 - -- Accept the `Error` constructor as `circularValue` option to throw on circular references as the regular JSON.stringify would: - -```js -import { configure } from 'safe-stable-stringify' - -const object = {} -object.circular = object; - -const stringify = configure({ circularValue: TypeError }) - -stringify(object) -// TypeError: Converting circular structure to JSON -``` - -- Fixed escaping wrong surrogates. Only lone surrogates are now escaped. - -## v2.2.0 - -- Reduce module size by removing the test and benchmark files from the published package -- Accept `undefined` as `circularValue` option to remove circular properties from the serialized output: - -```js -import { configure } from 'safe-stable-stringify' - -const object = { array: [] } -object.circular = object; -object.array.push(object) - -configure({ circularValue: undefined })(object) -// '{"array":[null]}' -``` - -## v2.1.0 - -- Added `maximumBreadth` option to limit stringification at a specific object or array "width" (number of properties / values) -- Added `maximumDepth` option to limit stringification at a specific nesting depth -- Implemented the [well formed stringify proposal](https://github.com/tc39/proposal-well-formed-stringify) that is now part of the spec -- Fixed maximum spacer length (10) -- Fixed TypeScript definition -- Fixed duplicated array replacer values serialized more than once - -## v2.0.0 - -- __[BREAKING]__ Convert BigInt to number by default instead of ignoring these values - If you wish to ignore these values similar to earlier versions, just use the new `bigint` option and set it to `false`. -- __[BREAKING]__ Support ESM -- __[BREAKING]__ Requires ES6 -- Optional BigInt support -- Deterministic behavior is now optional -- The value to indicate a circular structure is now adjustable -- Significantly faster TypedArray stringification -- Smaller Codebase -- Removed stateful indentation to guarantee side-effect freeness - -## v1.1.1 - -- Fixed an indentation issue in combination with empty arrays and objects -- Updated dev dependencies - -## v1.1.0 - -- Add support for IE11 (https://github.com/BridgeAR/safe-stable-stringify/commit/917b6128de135a950ec178d66d86b4d772c7656d) -- Fix issue with undefined values (https://github.com/BridgeAR/safe-stable-stringify/commit/4196f87, https://github.com/BridgeAR/safe-stable-stringify/commit/4eab558) -- Fix typescript definition (https://github.com/BridgeAR/safe-stable-stringify/commit/7a87478) -- Improve code coverage (https://github.com/BridgeAR/safe-stable-stringify/commit/ed8cadc, https://github.com/BridgeAR/safe-stable-stringify/commit/b58c494) -- Update dev dependencies (https://github.com/BridgeAR/safe-stable-stringify/commit/b857ea8) -- Improve docs \ No newline at end of file diff --git a/general/nvim/node_modules/safe-stable-stringify/LICENSE b/general/nvim/node_modules/safe-stable-stringify/LICENSE deleted file mode 100644 index 99c65e2..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ruben Bridgewater - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/general/nvim/node_modules/safe-stable-stringify/esm/package.json b/general/nvim/node_modules/safe-stable-stringify/esm/package.json deleted file mode 100644 index 4393479..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/esm/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "module", - "main": "wrapper.js" -} diff --git a/general/nvim/node_modules/safe-stable-stringify/esm/wrapper.js b/general/nvim/node_modules/safe-stable-stringify/esm/wrapper.js deleted file mode 100644 index 0cf01f0..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/esm/wrapper.js +++ /dev/null @@ -1,6 +0,0 @@ -import cjsModule from '../index.js' - -export const configure = cjsModule.configure - -export const stringify = cjsModule -export default cjsModule diff --git a/general/nvim/node_modules/safe-stable-stringify/index.d.ts b/general/nvim/node_modules/safe-stable-stringify/index.d.ts deleted file mode 100644 index 2478715..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export function stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; -export function stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; - -export interface StringifyOptions { - bigint?: boolean, - circularValue?: string | null | TypeErrorConstructor | ErrorConstructor, - deterministic?: boolean, - maximumBreadth?: number, - maximumDepth?: number, -} - -export namespace stringify { - export function configure(options: StringifyOptions): typeof stringify; -} - -export function configure(options: StringifyOptions): typeof stringify; - -export default stringify; diff --git a/general/nvim/node_modules/safe-stable-stringify/index.js b/general/nvim/node_modules/safe-stable-stringify/index.js deleted file mode 100644 index 7b3b1fb..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/index.js +++ /dev/null @@ -1,618 +0,0 @@ -'use strict' - -const stringify = configure() - -// @ts-expect-error -stringify.configure = configure -// @ts-expect-error -stringify.stringify = stringify - -// @ts-expect-error -stringify.default = stringify - -// @ts-expect-error used for named export -exports.stringify = stringify -// @ts-expect-error used for named export -exports.configure = configure - -module.exports = stringify - -// eslint-disable-next-line -const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/ -// eslint-disable-next-line -const strEscapeSequencesReplacer = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g - -// Escaped special characters. Use empty strings to fill up unused entries. -const meta = [ - '\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', - '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', - '\\n', '\\u000b', '\\f', '\\r', '\\u000e', - '\\u000f', '\\u0010', '\\u0011', '\\u0012', '\\u0013', - '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', - '\\u0019', '\\u001a', '\\u001b', '\\u001c', '\\u001d', - '\\u001e', '\\u001f', '', '', '\\"', - '', '', '', '', '', '', '', '', '', '', - '', '', '', '', '', '', '', '', '', '', - '', '', '', '', '', '', '', '', '', '', - '', '', '', '', '', '', '', '', '', '', - '', '', '', '', '', '', '', '', '', '', - '', '', '', '', '', '', '', '\\\\' -] - -function escapeFn (str) { - if (str.length === 2) { - const charCode = str.charCodeAt(1) - return `${str[0]}\\u${charCode.toString(16)}` - } - const charCode = str.charCodeAt(0) - return meta.length > charCode - ? meta[charCode] - : `\\u${charCode.toString(16)}` -} - -// Escape C0 control characters, double quotes, the backslash and every code -// unit with a numeric value in the inclusive range 0xD800 to 0xDFFF. -function strEscape (str) { - // Some magic numbers that worked out fine while benchmarking with v8 8.0 - if (str.length < 5000 && !strEscapeSequencesRegExp.test(str)) { - return str - } - if (str.length > 100) { - return str.replace(strEscapeSequencesReplacer, escapeFn) - } - let result = '' - let last = 0 - for (let i = 0; i < str.length; i++) { - const point = str.charCodeAt(i) - if (point === 34 || point === 92 || point < 32) { - result += `${str.slice(last, i)}${meta[point]}` - last = i + 1 - } else if (point >= 0xd800 && point <= 0xdfff) { - if (point <= 0xdbff && i + 1 < str.length) { - const point = str.charCodeAt(i + 1) - if (point >= 0xdc00 && point <= 0xdfff) { - i++ - continue - } - } - result += `${str.slice(last, i)}${`\\u${point.toString(16)}`}` - last = i + 1 - } - } - result += str.slice(last) - return result -} - -function insertSort (array) { - // Insertion sort is very efficient for small input sizes but it has a bad - // worst case complexity. Thus, use native array sort for bigger values. - if (array.length > 2e2) { - return array.sort() - } - for (let i = 1; i < array.length; i++) { - const currentValue = array[i] - let position = i - while (position !== 0 && array[position - 1] > currentValue) { - array[position] = array[position - 1] - position-- - } - array[position] = currentValue - } - return array -} - -const typedArrayPrototypeGetSymbolToStringTag = - Object.getOwnPropertyDescriptor( - Object.getPrototypeOf( - Object.getPrototypeOf( - new Uint8Array() - ) - ), - Symbol.toStringTag - ).get - -function isTypedArrayWithEntries (value) { - return typedArrayPrototypeGetSymbolToStringTag.call(value) !== undefined && value.length !== 0 -} - -function stringifyTypedArray (array, separator, maximumBreadth) { - if (array.length < maximumBreadth) { - maximumBreadth = array.length - } - const whitespace = separator === ',' ? '' : ' ' - let res = `"0":${whitespace}${array[0]}` - for (let i = 1; i < maximumBreadth; i++) { - res += `${separator}"${i}":${whitespace}${array[i]}` - } - return res -} - -function getCircularValueOption (options) { - if (options && Object.prototype.hasOwnProperty.call(options, 'circularValue')) { - var circularValue = options.circularValue - if (typeof circularValue === 'string') { - return `"${circularValue}"` - } - if (circularValue == null) { - return circularValue - } - if (circularValue === Error || circularValue === TypeError) { - return { - toString () { - throw new TypeError('Converting circular structure to JSON') - } - } - } - throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined') - } - return '"[Circular]"' -} - -function getBooleanOption (options, key) { - if (options && Object.prototype.hasOwnProperty.call(options, key)) { - var value = options[key] - if (typeof value !== 'boolean') { - throw new TypeError(`The "${key}" argument must be of type boolean`) - } - } - return value === undefined ? true : value -} - -function getPositiveIntegerOption (options, key) { - if (options && Object.prototype.hasOwnProperty.call(options, key)) { - var value = options[key] - if (typeof value !== 'number') { - throw new TypeError(`The "${key}" argument must be of type number`) - } - if (!Number.isInteger(value)) { - throw new TypeError(`The "${key}" argument must be an integer`) - } - if (value < 1) { - throw new RangeError(`The "${key}" argument must be >= 1`) - } - } - return value === undefined ? Infinity : value -} - -function getItemCount (number) { - if (number === 1) { - return '1 item' - } - return `${number} items` -} - -function getUniqueReplacerSet (replacerArray) { - const replacerSet = new Set() - for (const value of replacerArray) { - if (typeof value === 'string') { - replacerSet.add(value) - } else if (typeof value === 'number') { - replacerSet.add(String(value)) - } - } - return replacerSet -} - -function configure (options) { - const circularValue = getCircularValueOption(options) - const bigint = getBooleanOption(options, 'bigint') - const deterministic = getBooleanOption(options, 'deterministic') - const maximumDepth = getPositiveIntegerOption(options, 'maximumDepth') - const maximumBreadth = getPositiveIntegerOption(options, 'maximumBreadth') - - function stringifyFnReplacer (key, parent, stack, replacer, spacer, indentation) { - let value = parent[key] - - if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - value = replacer.call(parent, key, value) - - switch (typeof value) { - case 'string': - return `"${strEscape(value)}"` - case 'object': { - if (value === null) { - return 'null' - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - let res = '' - let join = ',' - const originalIndentation = indentation - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - if (spacer !== '') { - indentation += spacer - res += `\n${indentation}` - join = `,\n${indentation}` - } - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - if (spacer !== '') { - res += `\n${originalIndentation}` - } - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - let whitespace = '' - let separator = '' - if (spacer !== '') { - indentation += spacer - join = `,\n${indentation}` - whitespace = ' ' - } - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (isTypedArrayWithEntries(value)) { - res += stringifyTypedArray(value, join, maximumBreadth) - keys = keys.slice(value.length) - maximumPropertiesToStringify -= value.length - separator = join - } - if (deterministic) { - keys = insertSort(keys) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifyFnReplacer(key, value, stack, replacer, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}"${strEscape(key)}":${whitespace}${tmp}` - separator = join - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"` - separator = join - } - if (spacer !== '' && separator.length > 1) { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'bigint': - return bigint ? String(value) : undefined - } - } - - function stringifyArrayReplacer (key, value, stack, replacer, spacer, indentation) { - if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - - switch (typeof value) { - case 'string': - return `"${strEscape(value)}"` - case 'object': { - if (value === null) { - return 'null' - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - const originalIndentation = indentation - let res = '' - let join = ',' - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - if (spacer !== '') { - indentation += spacer - res += `\n${indentation}` - join = `,\n${indentation}` - } - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - if (spacer !== '') { - res += `\n${originalIndentation}` - } - stack.pop() - return `[${res}]` - } - if (replacer.size === 0) { - return '{}' - } - stack.push(value) - let whitespace = '' - if (spacer !== '') { - indentation += spacer - join = `,\n${indentation}` - whitespace = ' ' - } - let separator = '' - for (const key of replacer) { - const tmp = stringifyArrayReplacer(key, value[key], stack, replacer, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}"${strEscape(key)}":${whitespace}${tmp}` - separator = join - } - } - if (spacer !== '' && separator.length > 1) { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'bigint': - return bigint ? String(value) : undefined - } - } - - function stringifyIndent (key, value, stack, spacer, indentation) { - switch (typeof value) { - case 'string': - return `"${strEscape(value)}"` - case 'object': { - if (value === null) { - return 'null' - } - if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - // Prevent calling `toJSON` again. - if (typeof value !== 'object') { - return stringifyIndent(key, value, stack, spacer, indentation) - } - if (value === null) { - return 'null' - } - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - const originalIndentation = indentation - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - indentation += spacer - let res = `\n${indentation}` - const join = `,\n${indentation}` - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyIndent(i, value[i], stack, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyIndent(i, value[i], stack, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - res += `\n${originalIndentation}` - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - indentation += spacer - const join = `,\n${indentation}` - let res = '' - let separator = '' - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (isTypedArrayWithEntries(value)) { - res += stringifyTypedArray(value, join, maximumBreadth) - keys = keys.slice(value.length) - maximumPropertiesToStringify -= value.length - separator = join - } - if (deterministic) { - keys = insertSort(keys) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifyIndent(key, value[key], stack, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}"${strEscape(key)}": ${tmp}` - separator = join - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"` - separator = join - } - if (separator !== '') { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'bigint': - return bigint ? String(value) : undefined - } - } - - function stringifySimple (key, value, stack) { - switch (typeof value) { - case 'string': - return `"${strEscape(value)}"` - case 'object': { - if (value === null) { - return 'null' - } - if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - // Prevent calling `toJSON` again - if (typeof value !== 'object') { - return stringifySimple(key, value, stack) - } - if (value === null) { - return 'null' - } - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - let res = '' - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifySimple(i, value[i], stack) - res += tmp !== undefined ? tmp : 'null' - res += ',' - } - const tmp = stringifySimple(i, value[i], stack) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `,"... ${getItemCount(removedKeys)} not stringified"` - } - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - let separator = '' - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (isTypedArrayWithEntries(value)) { - res += stringifyTypedArray(value, ',', maximumBreadth) - keys = keys.slice(value.length) - maximumPropertiesToStringify -= value.length - separator = ',' - } - if (deterministic) { - keys = insertSort(keys) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifySimple(key, value[key], stack) - if (tmp !== undefined) { - res += `${separator}"${strEscape(key)}":${tmp}` - separator = ',' - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'bigint': - return bigint ? String(value) : undefined - } - } - - function stringify (value, replacer, space) { - if (arguments.length > 1) { - let spacer = '' - if (typeof space === 'number') { - spacer = ' '.repeat(Math.min(space, 10)) - } else if (typeof space === 'string') { - spacer = space.slice(0, 10) - } - if (replacer != null) { - if (typeof replacer === 'function') { - return stringifyFnReplacer('', { '': value }, [], replacer, spacer, '') - } - if (Array.isArray(replacer)) { - return stringifyArrayReplacer('', value, [], getUniqueReplacerSet(replacer), spacer, '') - } - } - if (spacer.length !== 0) { - return stringifyIndent('', value, [], spacer, '') - } - } - return stringifySimple('', value, []) - } - - return stringify -} diff --git a/general/nvim/node_modules/safe-stable-stringify/package.json b/general/nvim/node_modules/safe-stable-stringify/package.json deleted file mode 100644 index 814dfa6..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "safe-stable-stringify", - "version": "2.3.1", - "description": "Deterministic and safely JSON.stringify to quickly serialize JavaScript objects", - "exports": { - "require": "./index.js", - "import": "./esm/wrapper.js" - }, - "keywords": [ - "stable", - "stringify", - "JSON", - "JSON.stringify", - "safe", - "serialize", - "deterministic", - "circular", - "object", - "predicable", - "repeatable", - "fast", - "bigint" - ], - "main": "index.js", - "scripts": { - "test": "standard && tap test.js", - "tap": "tap test.js", - "tap:only": "tap test.js --watch --only", - "benchmark": "node benchmark.js", - "compare": "node compare.js", - "lint": "standard --fix", - "tsc": "tsc --project tsconfig.json" - }, - "engines": { - "node": ">=10" - }, - "author": "Ruben Bridgewater", - "license": "MIT", - "typings": "index.d.ts", - "devDependencies": { - "@types/json-stable-stringify": "^1.0.32", - "@types/node": "^16.11.1", - "benchmark": "^2.1.4", - "clone": "^2.1.2", - "fast-json-stable-stringify": "^2.1.0", - "fast-safe-stringify": "^2.0.7", - "fast-stable-stringify": "^1.0.0", - "faster-stable-stringify": "^1.0.0", - "fastest-stable-stringify": "^2.0.2", - "json-stable-stringify": "^1.0.1", - "json-stringify-deterministic": "^1.0.1", - "json-stringify-safe": "^5.0.1", - "standard": "^15.0.0", - "tap": "^15.0.9", - "typescript": "^4.4.3" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/BridgeAR/safe-stable-stringify.git" - }, - "bugs": { - "url": "https://github.com/BridgeAR/safe-stable-stringify/issues" - }, - "homepage": "https://github.com/BridgeAR/safe-stable-stringify#readme" -} diff --git a/general/nvim/node_modules/safe-stable-stringify/readme.md b/general/nvim/node_modules/safe-stable-stringify/readme.md deleted file mode 100644 index 69ed2b2..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/readme.md +++ /dev/null @@ -1,170 +0,0 @@ -# safe-stable-stringify - -Safe, deterministic and fast serialization alternative to [JSON.stringify][]. Zero dependencies. ESM and CJS. 100% coverage. - -Gracefully handles circular structures and bigint instead of throwing. - -Optional custom circular values and deterministic behavior. - -## stringify(value[, replacer[, space]]) - -The same as [JSON.stringify][]. - -* `value` {any} -* `replacer` {string[]|function|null} -* `space` {number|string} -* Returns: {string} - -```js -const stringify = require('safe-stable-stringify') - -const bigint = { a: 0, c: 2n, b: 1 } - -stringify(bigint) -// '{"a":0,"b":1,"c":2}' -JSON.stringify(bigint) -// TypeError: Do not know how to serialize a BigInt - -const circular = { b: 1, a: 0 } -circular.circular = circular - -stringify(circular) -// '{"a":0,"b":1,"circular":"[Circular]"}' -JSON.stringify(circular) -// TypeError: Converting circular structure to JSON - -stringify(circular, ['a', 'b'], 2) -// { -// "a": 0, -// "b": 1 -// } -``` - -## stringify.configure(options) - -* `bigint` {boolean} If `true`, bigint values are converted to a number. Otherwise - they are ignored. **Default:** `true`. -* `circularValue` {string|null|undefined|ErrorConstructor} Defines the value for - circular references. Set to `undefined`, circular properties are not - serialized (array entries are replaced with `null`). Set to `Error`, to throw - on circular references. **Default:** `[Circular]`. -* `deterministic` {boolean} If `true`, guarantee a deterministic key order - instead of relying on the insertion order. **Default:** `true`. -* `maximumBreadth` {number} Maximum number of entries to serialize per object - (at least one). The serialized output contains information about how many - entries have not been serialized. Ignored properties are counted as well - (e.g., properties with symbol values). Using the array replacer overrules this - option. **Default:** `Infinity` -* `maximumDepth` {number} Maximum number of object nesting levels (at least 1) - that will be serialized. Objects at the maximum level are serialized as - `'[Object]'` and arrays as `'[Array]'`. **Default:** `Infinity` -* Returns: {function} A stringify function with the options applied. - -```js -import { configure } from 'safe-stable-stringify' - -const stringify = configure({ - bigint: true, - circularValue: 'Magic circle!', - deterministic: false, - maximumDepth: 1, - maximumBreadth: 4 -}) - -const circular = { - bigint: 999_999_999_999_999_999n, - typed: new Uint8Array(3), - deterministic: "I don't think so", -} -circular.circular = circular -circular.ignored = true -circular.alsoIgnored = 'Yes!' - -const stringified = stringify(circular, null, 4) - -console.log(stringified) -// { -// "bigint": 999999999999999999, -// "typed": "[Object]", -// "deterministic": "I don't think so", -// "circular": "Magic circle!", -// "...": "2 items not stringified" -// } - -const throwOnCircular = configure({ - circularValue: Error -}) - -throwOnCircular(circular); -// TypeError: Converting circular structure to JSON -``` - -## Differences to JSON.stringify - -1. _Circular values_ are replaced with the string `[Circular]` (the value may be changed). -1. _Object keys_ are sorted instead of using the insertion order (it is possible to deactivate this). -1. _BigInt_ values are stringified as regular number instead of throwing a TypeError. -1. _Boxed primitives_ (e.g., `Number(5)`) are not unboxed and are handled as - regular object. - -Those are the only differences to `JSON.stringify()`. This is a side effect free -variant and [`toJSON`][], [`replacer`][] and the [`spacer`][] work the same as -with `JSON.stringify()`. - -## Performance / Benchmarks - -Currently this is by far the fastest known stable (deterministic) stringify -implementation. This is especially important for big objects and TypedArrays. - -(Dell Precision 5540, i7-9850H CPU @ 2.60GHz, Node.js 16.11.1) - -```md -simple: simple object x 3,463,894 ops/sec ±0.44% (98 runs sampled) -simple: circular x 1,236,007 ops/sec ±0.46% (99 runs sampled) -simple: deep x 18,942 ops/sec ±0.41% (93 runs sampled) -simple: deep circular x 18,690 ops/sec ±0.72% (96 runs sampled) - -replacer: simple object x 2,664,940 ops/sec ±0.31% (98 runs sampled) -replacer: circular x 1,015,981 ops/sec ±0.09% (99 runs sampled) -replacer: deep x 17,328 ops/sec ±0.38% (97 runs sampled) -replacer: deep circular x 17,071 ops/sec ±0.21% (98 runs sampled) - -array: simple object x 3,869,608 ops/sec ±0.22% (98 runs sampled) -array: circular x 3,853,943 ops/sec ±0.45% (96 runs sampled) -array: deep x 3,563,227 ops/sec ±0.20% (100 runs sampled) -array: deep circular x 3,286,475 ops/sec ±0.07% (100 runs sampled) - -indentation: simple object x 2,183,162 ops/sec ±0.66% (97 runs sampled) -indentation: circular x 872,538 ops/sec ±0.57% (98 runs sampled) -indentation: deep x 16,795 ops/sec ±0.48% (93 runs sampled) -indentation: deep circular x 16,443 ops/sec ±0.40% (97 runs sampled) -``` - -Comparing `safe-stable-stringify` with known alternatives: - -```md -fast-json-stable-stringify x 18,765 ops/sec ±0.71% (94 runs sampled) -json-stable-stringify x 13,870 ops/sec ±0.72% (94 runs sampled) -fast-stable-stringify x 21,343 ops/sec ±0.33% (95 runs sampled) -faster-stable-stringify x 17,707 ops/sec ±0.44% (97 runs sampled) -json-stringify-deterministic x 11,208 ops/sec ±0.57% (98 runs sampled) -fast-safe-stringify x 21,460 ops/sec ±0.75% (99 runs sampled) -this x 30,367 ops/sec ±0.39% (96 runs sampled) - -The fastest is this -``` - -The `fast-safe-stringify` comparison uses the modules stable implementation. - -## Acknowledgements - -Sponsored by [MaibornWolff](https://www.maibornwolff.de/) and [nearForm](http://nearform.com) - -## License - -MIT - -[`replacer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20replacer%20parameter -[`spacer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20space%20argument -[`toJSON`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior -[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify diff --git a/general/nvim/node_modules/safe-stable-stringify/tsconfig.json b/general/nvim/node_modules/safe-stable-stringify/tsconfig.json deleted file mode 100644 index 403127a..0000000 --- a/general/nvim/node_modules/safe-stable-stringify/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": "./", - "allowJs": true, - "checkJs": true, - "sourceMap": false, - "declaration": false, - "noEmit": true, - "downlevelIteration": false, - "experimentalDecorators": false, - "moduleResolution": "node", - "importHelpers": false, - "target": "esnext", - "module": "CommonJS", - "lib": [ - "esnext", - "dom" - ] - }, - "include": ["**/*.js", "**/*.ts"], - "exclude": ["compare.js", "benchmark.js", "./coverage"] -} diff --git a/general/nvim/node_modules/semver/LICENSE b/general/nvim/node_modules/semver/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/general/nvim/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/general/nvim/node_modules/semver/README.md b/general/nvim/node_modules/semver/README.md deleted file mode 100644 index df54e7a..0000000 --- a/general/nvim/node_modules/semver/README.md +++ /dev/null @@ -1,568 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -You can also just load the module for the function that you care about, if -you'd like to minimize your footprint. - -```js -// load the whole API at once in a single object -const semver = require('semver') - -// or just load the bits you need -// all of them listed here, just pick and choose what you want - -// classes -const SemVer = require('semver/classes/semver') -const Comparator = require('semver/classes/comparator') -const Range = require('semver/classes/range') - -// functions for working with versions -const semverParse = require('semver/functions/parse') -const semverValid = require('semver/functions/valid') -const semverClean = require('semver/functions/clean') -const semverInc = require('semver/functions/inc') -const semverDiff = require('semver/functions/diff') -const semverMajor = require('semver/functions/major') -const semverMinor = require('semver/functions/minor') -const semverPatch = require('semver/functions/patch') -const semverPrerelease = require('semver/functions/prerelease') -const semverCompare = require('semver/functions/compare') -const semverRcompare = require('semver/functions/rcompare') -const semverCompareLoose = require('semver/functions/compare-loose') -const semverCompareBuild = require('semver/functions/compare-build') -const semverSort = require('semver/functions/sort') -const semverRsort = require('semver/functions/rsort') - -// low-level comparators between versions -const semverGt = require('semver/functions/gt') -const semverLt = require('semver/functions/lt') -const semverEq = require('semver/functions/eq') -const semverNeq = require('semver/functions/neq') -const semverGte = require('semver/functions/gte') -const semverLte = require('semver/functions/lte') -const semverCmp = require('semver/functions/cmp') -const semverCoerce = require('semver/functions/coerce') - -// working with ranges -const semverSatisfies = require('semver/functions/satisfies') -const semverMaxSatisfying = require('semver/ranges/max-satisfying') -const semverMinSatisfying = require('semver/ranges/min-satisfying') -const semverToComparators = require('semver/ranges/to-comparators') -const semverMinVersion = require('semver/ranges/min-version') -const semverValidRange = require('semver/ranges/valid') -const semverOutside = require('semver/ranges/outside') -const semverGtr = require('semver/ranges/gtr') -const semverLtr = require('semver/ranges/ltr') -const semverIntersects = require('semver/ranges/intersects') -const simplifyRange = require('semver/ranges/simplify') -const rangeSubset = require('semver/ranges/subset') -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless - `includePrerelease` is specified, in which case any version at all - satisfies) -* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero element in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0-0` -* `^0.2.3` := `>=0.2.3 <0.3.0-0` -* `^0.0.3` := `>=0.0.3 <0.0.4-0` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0-0` -* `^0.0.x` := `>=0.0.0 <0.1.0-0` -* `^0.0` := `>=0.0.0 <0.1.0-0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0-0` -* `^0.x` := `>=0.0.0 <1.0.0-0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions - are equal. Sorts in ascending order if passed to `Array.sort()`. - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect -* `simplifyRange(versions, range)`: Return a "simplified" range that - matches the same items in `versions` list as the range specified. Note - that it does *not* guarantee that it would match the same versions in all - cases, only for the set of versions provided. This is useful when - generating ranges by joining together multiple versions with `||` - programmatically, to provide the user with something a bit more - ergonomic. If the provided range is shorter in string-length than the - generated range, then that is returned. -* `subset(subRange, superRange)`: Return `true` if the `subRange` range is - entirely contained by the `superRange` range. - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version, options)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). - -If the `options.rtl` flag is set, then `coerce` will return the right-most -coercible tuple that does not share an ending index with a longer coercible -tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not -`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of -any other overlapping SemVer tuple. - -### Clean - -* `clean(version)`: Clean a string to be a valid semver if possible - -This will return a cleaned and trimmed semver version. If the provided -version is not valid a null will be returned. This does not work for -ranges. - -ex. -* `s.clean(' = v 2.1.5foo')`: `null` -* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean(' = v 2.1.5-foo')`: `null` -* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean('=v2.1.5')`: `'2.1.5'` -* `s.clean(' =v2.1.5')`: `2.1.5` -* `s.clean(' 2.1.5 ')`: `'2.1.5'` -* `s.clean('~1.0.0')`: `null` - -## Exported Modules - - - -You may pull in just the part of this semver utility that you need, if you -are sensitive to packing and tree-shaking concerns. The main -`require('semver')` export uses getter functions to lazily load the parts -of the API that are used. - -The following modules are available: - -* `require('semver')` -* `require('semver/classes')` -* `require('semver/classes/comparator')` -* `require('semver/classes/range')` -* `require('semver/classes/semver')` -* `require('semver/functions/clean')` -* `require('semver/functions/cmp')` -* `require('semver/functions/coerce')` -* `require('semver/functions/compare')` -* `require('semver/functions/compare-build')` -* `require('semver/functions/compare-loose')` -* `require('semver/functions/diff')` -* `require('semver/functions/eq')` -* `require('semver/functions/gt')` -* `require('semver/functions/gte')` -* `require('semver/functions/inc')` -* `require('semver/functions/lt')` -* `require('semver/functions/lte')` -* `require('semver/functions/major')` -* `require('semver/functions/minor')` -* `require('semver/functions/neq')` -* `require('semver/functions/parse')` -* `require('semver/functions/patch')` -* `require('semver/functions/prerelease')` -* `require('semver/functions/rcompare')` -* `require('semver/functions/rsort')` -* `require('semver/functions/satisfies')` -* `require('semver/functions/sort')` -* `require('semver/functions/valid')` -* `require('semver/ranges/gtr')` -* `require('semver/ranges/intersects')` -* `require('semver/ranges/ltr')` -* `require('semver/ranges/max-satisfying')` -* `require('semver/ranges/min-satisfying')` -* `require('semver/ranges/min-version')` -* `require('semver/ranges/outside')` -* `require('semver/ranges/to-comparators')` -* `require('semver/ranges/valid')` diff --git a/general/nvim/node_modules/semver/bin/semver.js b/general/nvim/node_modules/semver/bin/semver.js deleted file mode 100755 index 8d1b557..0000000 --- a/general/nvim/node_modules/semver/bin/semver.js +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -const argv = process.argv.slice(2) - -let versions = [] - -const range = [] - -let inc = null - -const version = require('../package.json').version - -let loose = false - -let includePrerelease = false - -let coerce = false - -let rtl = false - -let identifier - -const semver = require('../') - -let reverse = false - -let options = {} - -const main = () => { - if (!argv.length) { - return help() - } - while (argv.length) { - let a = argv.shift() - const indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - const value = a.slice(indexOfEqualSign + 1) - a = a.slice(0, indexOfEqualSign) - argv.unshift(value) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '--rtl': - rtl = true - break - case '--ltr': - rtl = false - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } - - versions = versions.map((v) => { - return coerce ? (semver.coerce(v, options) || { version: v }).version : v - }).filter((v) => { - return semver.valid(v) - }) - if (!versions.length) { - return fail() - } - if (inc && (versions.length !== 1 || range.length)) { - return failInc() - } - - for (let i = 0, l = range.length; i < l; i++) { - versions = versions.filter((v) => { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) { - return fail() - } - } - return success(versions) -} - -const failInc = () => { - console.error('--inc can only be used on a single version with no range') - fail() -} - -const fail = () => process.exit(1) - -const success = () => { - const compare = reverse ? 'rcompare' : 'compare' - versions.sort((a, b) => { - return semver[compare](a, b, options) - }).map((v) => { - return semver.clean(v, options) - }).map((v) => { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach((v, i, _) => { - console.log(v) - }) -} - -const help = () => console.log( -`SemVer ${version} - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them.`) - -main() diff --git a/general/nvim/node_modules/semver/classes/comparator.js b/general/nvim/node_modules/semver/classes/comparator.js deleted file mode 100644 index 62cd204..0000000 --- a/general/nvim/node_modules/semver/classes/comparator.js +++ /dev/null @@ -1,136 +0,0 @@ -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false, - } - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - const sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - const sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - const sameSemVer = this.semver.version === comp.semver.version - const differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - const oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<') - const oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>') - - return ( - sameDirectionIncreasing || - sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || - oppositeDirectionsGreaterThan - ) - } -} - -module.exports = Comparator - -const parseOptions = require('../internal/parse-options') -const { re, t } = require('../internal/re') -const cmp = require('../functions/cmp') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const Range = require('./range') diff --git a/general/nvim/node_modules/semver/classes/index.js b/general/nvim/node_modules/semver/classes/index.js deleted file mode 100644 index 5e3f5c9..0000000 --- a/general/nvim/node_modules/semver/classes/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - SemVer: require('./semver.js'), - Range: require('./range.js'), - Comparator: require('./comparator.js'), -} diff --git a/general/nvim/node_modules/semver/classes/range.js b/general/nvim/node_modules/semver/classes/range.js deleted file mode 100644 index 7dc24bc..0000000 --- a/general/nvim/node_modules/semver/classes/range.js +++ /dev/null @@ -1,519 +0,0 @@ -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.format() - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${range}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.format() - } - - format () { - this.range = this.set - .map((comps) => { - return comps.join(' ').trim() - }) - .join('||') - .trim() - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - range = range.trim() - - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = Object.keys(this.options).join(',') - const memoKey = `parseRange:${memoOpts}:${range}` - const cached = cache.get(memoKey) - if (cached) { - return cached - } - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) - } - debug('range list', rangeList) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') - } - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} -module.exports = Range - -const LRU = require('lru-cache') -const cache = new LRU({ max: 1000 }) - -const parseOptions = require('../internal/parse-options') -const Comparator = require('./comparator') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const { - re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = require('../internal/re') - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -const replaceTildes = (comp, options) => - comp.trim().split(/\s+/).map((c) => { - return replaceTilde(c, options) - }).join(' ') - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -const replaceCarets = (comp, options) => - comp.trim().split(/\s+/).map((c) => { - return replaceCaret(c, options) - }).join(' ') - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map((c) => { - return replaceXRange(c, options) - }).join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') { - pr = '-0' - } - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp.trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return (`${from} ${to}`).trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} diff --git a/general/nvim/node_modules/semver/classes/semver.js b/general/nvim/node_modules/semver/classes/semver.js deleted file mode 100644 index af62955..0000000 --- a/general/nvim/node_modules/semver/classes/semver.js +++ /dev/null @@ -1,287 +0,0 @@ -const debug = require('../internal/debug') -const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') -const { re, t } = require('../internal/re') - -const parseOptions = require('../internal/parse-options') -const { compareIdentifiers } = require('../internal/identifiers') -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid Version: ${version}`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.format() - this.raw = this.version - return this - } -} - -module.exports = SemVer diff --git a/general/nvim/node_modules/semver/functions/clean.js b/general/nvim/node_modules/semver/functions/clean.js deleted file mode 100644 index 811fe6b..0000000 --- a/general/nvim/node_modules/semver/functions/clean.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean diff --git a/general/nvim/node_modules/semver/functions/cmp.js b/general/nvim/node_modules/semver/functions/cmp.js deleted file mode 100644 index 4011909..0000000 --- a/general/nvim/node_modules/semver/functions/cmp.js +++ /dev/null @@ -1,52 +0,0 @@ -const eq = require('./eq') -const neq = require('./neq') -const gt = require('./gt') -const gte = require('./gte') -const lt = require('./lt') -const lte = require('./lte') - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a === b - - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp diff --git a/general/nvim/node_modules/semver/functions/coerce.js b/general/nvim/node_modules/semver/functions/coerce.js deleted file mode 100644 index 2e01452..0000000 --- a/general/nvim/node_modules/semver/functions/coerce.js +++ /dev/null @@ -1,52 +0,0 @@ -const SemVer = require('../classes/semver') -const parse = require('./parse') -const { re, t } = require('../internal/re') - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - let next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - - if (match === null) { - return null - } - - return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) -} -module.exports = coerce diff --git a/general/nvim/node_modules/semver/functions/compare-build.js b/general/nvim/node_modules/semver/functions/compare-build.js deleted file mode 100644 index 9eb881b..0000000 --- a/general/nvim/node_modules/semver/functions/compare-build.js +++ /dev/null @@ -1,7 +0,0 @@ -const SemVer = require('../classes/semver') -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild diff --git a/general/nvim/node_modules/semver/functions/compare-loose.js b/general/nvim/node_modules/semver/functions/compare-loose.js deleted file mode 100644 index 4881fbe..0000000 --- a/general/nvim/node_modules/semver/functions/compare-loose.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose diff --git a/general/nvim/node_modules/semver/functions/compare.js b/general/nvim/node_modules/semver/functions/compare.js deleted file mode 100644 index 748b7af..0000000 --- a/general/nvim/node_modules/semver/functions/compare.js +++ /dev/null @@ -1,5 +0,0 @@ -const SemVer = require('../classes/semver') -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare diff --git a/general/nvim/node_modules/semver/functions/diff.js b/general/nvim/node_modules/semver/functions/diff.js deleted file mode 100644 index 87200ef..0000000 --- a/general/nvim/node_modules/semver/functions/diff.js +++ /dev/null @@ -1,23 +0,0 @@ -const parse = require('./parse') -const eq = require('./eq') - -const diff = (version1, version2) => { - if (eq(version1, version2)) { - return null - } else { - const v1 = parse(version1) - const v2 = parse(version2) - const hasPre = v1.prerelease.length || v2.prerelease.length - const prefix = hasPre ? 'pre' : '' - const defaultResult = hasPre ? 'prerelease' : '' - for (const key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} -module.exports = diff diff --git a/general/nvim/node_modules/semver/functions/eq.js b/general/nvim/node_modules/semver/functions/eq.js deleted file mode 100644 index 271fed9..0000000 --- a/general/nvim/node_modules/semver/functions/eq.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq diff --git a/general/nvim/node_modules/semver/functions/gt.js b/general/nvim/node_modules/semver/functions/gt.js deleted file mode 100644 index d9b2156..0000000 --- a/general/nvim/node_modules/semver/functions/gt.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt diff --git a/general/nvim/node_modules/semver/functions/gte.js b/general/nvim/node_modules/semver/functions/gte.js deleted file mode 100644 index 5aeaa63..0000000 --- a/general/nvim/node_modules/semver/functions/gte.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte diff --git a/general/nvim/node_modules/semver/functions/inc.js b/general/nvim/node_modules/semver/functions/inc.js deleted file mode 100644 index 62d1da2..0000000 --- a/general/nvim/node_modules/semver/functions/inc.js +++ /dev/null @@ -1,18 +0,0 @@ -const SemVer = require('../classes/semver') - -const inc = (version, release, options, identifier) => { - if (typeof (options) === 'string') { - identifier = options - options = undefined - } - - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier).version - } catch (er) { - return null - } -} -module.exports = inc diff --git a/general/nvim/node_modules/semver/functions/lt.js b/general/nvim/node_modules/semver/functions/lt.js deleted file mode 100644 index b440ab7..0000000 --- a/general/nvim/node_modules/semver/functions/lt.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt diff --git a/general/nvim/node_modules/semver/functions/lte.js b/general/nvim/node_modules/semver/functions/lte.js deleted file mode 100644 index 6dcc956..0000000 --- a/general/nvim/node_modules/semver/functions/lte.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte diff --git a/general/nvim/node_modules/semver/functions/major.js b/general/nvim/node_modules/semver/functions/major.js deleted file mode 100644 index 4283165..0000000 --- a/general/nvim/node_modules/semver/functions/major.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major diff --git a/general/nvim/node_modules/semver/functions/minor.js b/general/nvim/node_modules/semver/functions/minor.js deleted file mode 100644 index 57b3455..0000000 --- a/general/nvim/node_modules/semver/functions/minor.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor diff --git a/general/nvim/node_modules/semver/functions/neq.js b/general/nvim/node_modules/semver/functions/neq.js deleted file mode 100644 index f944c01..0000000 --- a/general/nvim/node_modules/semver/functions/neq.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq diff --git a/general/nvim/node_modules/semver/functions/parse.js b/general/nvim/node_modules/semver/functions/parse.js deleted file mode 100644 index a66663a..0000000 --- a/general/nvim/node_modules/semver/functions/parse.js +++ /dev/null @@ -1,33 +0,0 @@ -const { MAX_LENGTH } = require('../internal/constants') -const { re, t } = require('../internal/re') -const SemVer = require('../classes/semver') - -const parseOptions = require('../internal/parse-options') -const parse = (version, options) => { - options = parseOptions(options) - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - const r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -module.exports = parse diff --git a/general/nvim/node_modules/semver/functions/patch.js b/general/nvim/node_modules/semver/functions/patch.js deleted file mode 100644 index 63afca2..0000000 --- a/general/nvim/node_modules/semver/functions/patch.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch diff --git a/general/nvim/node_modules/semver/functions/prerelease.js b/general/nvim/node_modules/semver/functions/prerelease.js deleted file mode 100644 index 06aa132..0000000 --- a/general/nvim/node_modules/semver/functions/prerelease.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease diff --git a/general/nvim/node_modules/semver/functions/rcompare.js b/general/nvim/node_modules/semver/functions/rcompare.js deleted file mode 100644 index 0ac509e..0000000 --- a/general/nvim/node_modules/semver/functions/rcompare.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare diff --git a/general/nvim/node_modules/semver/functions/rsort.js b/general/nvim/node_modules/semver/functions/rsort.js deleted file mode 100644 index 82404c5..0000000 --- a/general/nvim/node_modules/semver/functions/rsort.js +++ /dev/null @@ -1,3 +0,0 @@ -const compareBuild = require('./compare-build') -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort diff --git a/general/nvim/node_modules/semver/functions/satisfies.js b/general/nvim/node_modules/semver/functions/satisfies.js deleted file mode 100644 index 50af1c1..0000000 --- a/general/nvim/node_modules/semver/functions/satisfies.js +++ /dev/null @@ -1,10 +0,0 @@ -const Range = require('../classes/range') -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies diff --git a/general/nvim/node_modules/semver/functions/sort.js b/general/nvim/node_modules/semver/functions/sort.js deleted file mode 100644 index 4d10917..0000000 --- a/general/nvim/node_modules/semver/functions/sort.js +++ /dev/null @@ -1,3 +0,0 @@ -const compareBuild = require('./compare-build') -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort diff --git a/general/nvim/node_modules/semver/functions/valid.js b/general/nvim/node_modules/semver/functions/valid.js deleted file mode 100644 index f27bae1..0000000 --- a/general/nvim/node_modules/semver/functions/valid.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid diff --git a/general/nvim/node_modules/semver/index.js b/general/nvim/node_modules/semver/index.js deleted file mode 100644 index 57e2ae6..0000000 --- a/general/nvim/node_modules/semver/index.js +++ /dev/null @@ -1,48 +0,0 @@ -// just pre-load all the stuff that index.js lazily exports -const internalRe = require('./internal/re') -module.exports = { - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION, - SemVer: require('./classes/semver'), - compareIdentifiers: require('./internal/identifiers').compareIdentifiers, - rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers, - parse: require('./functions/parse'), - valid: require('./functions/valid'), - clean: require('./functions/clean'), - inc: require('./functions/inc'), - diff: require('./functions/diff'), - major: require('./functions/major'), - minor: require('./functions/minor'), - patch: require('./functions/patch'), - prerelease: require('./functions/prerelease'), - compare: require('./functions/compare'), - rcompare: require('./functions/rcompare'), - compareLoose: require('./functions/compare-loose'), - compareBuild: require('./functions/compare-build'), - sort: require('./functions/sort'), - rsort: require('./functions/rsort'), - gt: require('./functions/gt'), - lt: require('./functions/lt'), - eq: require('./functions/eq'), - neq: require('./functions/neq'), - gte: require('./functions/gte'), - lte: require('./functions/lte'), - cmp: require('./functions/cmp'), - coerce: require('./functions/coerce'), - Comparator: require('./classes/comparator'), - Range: require('./classes/range'), - satisfies: require('./functions/satisfies'), - toComparators: require('./ranges/to-comparators'), - maxSatisfying: require('./ranges/max-satisfying'), - minSatisfying: require('./ranges/min-satisfying'), - minVersion: require('./ranges/min-version'), - validRange: require('./ranges/valid'), - outside: require('./ranges/outside'), - gtr: require('./ranges/gtr'), - ltr: require('./ranges/ltr'), - intersects: require('./ranges/intersects'), - simplifyRange: require('./ranges/simplify'), - subset: require('./ranges/subset'), -} diff --git a/general/nvim/node_modules/semver/internal/constants.js b/general/nvim/node_modules/semver/internal/constants.js deleted file mode 100644 index 4f0de59..0000000 --- a/general/nvim/node_modules/semver/internal/constants.js +++ /dev/null @@ -1,17 +0,0 @@ -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -module.exports = { - SEMVER_SPEC_VERSION, - MAX_LENGTH, - MAX_SAFE_INTEGER, - MAX_SAFE_COMPONENT_LENGTH, -} diff --git a/general/nvim/node_modules/semver/internal/debug.js b/general/nvim/node_modules/semver/internal/debug.js deleted file mode 100644 index 1c00e13..0000000 --- a/general/nvim/node_modules/semver/internal/debug.js +++ /dev/null @@ -1,9 +0,0 @@ -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug diff --git a/general/nvim/node_modules/semver/internal/identifiers.js b/general/nvim/node_modules/semver/internal/identifiers.js deleted file mode 100644 index e612d0a..0000000 --- a/general/nvim/node_modules/semver/internal/identifiers.js +++ /dev/null @@ -1,23 +0,0 @@ -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} diff --git a/general/nvim/node_modules/semver/internal/parse-options.js b/general/nvim/node_modules/semver/internal/parse-options.js deleted file mode 100644 index bbd9ec7..0000000 --- a/general/nvim/node_modules/semver/internal/parse-options.js +++ /dev/null @@ -1,11 +0,0 @@ -// parse out just the options we care about so we always get a consistent -// obj with keys in a consistent order. -const opts = ['includePrerelease', 'loose', 'rtl'] -const parseOptions = options => - !options ? {} - : typeof options !== 'object' ? { loose: true } - : opts.filter(k => options[k]).reduce((o, k) => { - o[k] = true - return o - }, {}) -module.exports = parseOptions diff --git a/general/nvim/node_modules/semver/internal/re.js b/general/nvim/node_modules/semver/internal/re.js deleted file mode 100644 index ed88398..0000000 --- a/general/nvim/node_modules/semver/internal/re.js +++ /dev/null @@ -1,182 +0,0 @@ -const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants') -const debug = require('./debug') -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 - -const createToken = (name, value, isGlobal) => { - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCE', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') diff --git a/general/nvim/node_modules/semver/package.json b/general/nvim/node_modules/semver/package.json deleted file mode 100644 index 7898f59..0000000 --- a/general/nvim/node_modules/semver/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "semver", - "version": "7.3.7", - "description": "The semantic version parser used by npm.", - "main": "index.js", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.3.2", - "tap": "^16.0.0" - }, - "license": "ISC", - "repository": { - "type": "git", - "url": "https://github.com/npm/node-semver.git" - }, - "bin": { - "semver": "bin/semver.js" - }, - "files": [ - "bin/", - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ], - "tap": { - "check-coverage": true, - "coverage-map": "map.js" - }, - "engines": { - "node": ">=10" - }, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.3.2", - "engines": ">=10", - "ciVersions": [ - "10.0.0", - "10.x", - "12.x", - "14.x", - "16.x" - ], - "distPaths": [ - "bin/", - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ] - } -} diff --git a/general/nvim/node_modules/semver/preload.js b/general/nvim/node_modules/semver/preload.js deleted file mode 100644 index 947cd4f..0000000 --- a/general/nvim/node_modules/semver/preload.js +++ /dev/null @@ -1,2 +0,0 @@ -// XXX remove in v8 or beyond -module.exports = require('./index.js') diff --git a/general/nvim/node_modules/semver/range.bnf b/general/nvim/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0..0000000 --- a/general/nvim/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/general/nvim/node_modules/semver/ranges/gtr.js b/general/nvim/node_modules/semver/ranges/gtr.js deleted file mode 100644 index db7e355..0000000 --- a/general/nvim/node_modules/semver/ranges/gtr.js +++ /dev/null @@ -1,4 +0,0 @@ -// Determine if version is greater than all the versions possible in the range. -const outside = require('./outside') -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr diff --git a/general/nvim/node_modules/semver/ranges/intersects.js b/general/nvim/node_modules/semver/ranges/intersects.js deleted file mode 100644 index 3d1a6f3..0000000 --- a/general/nvim/node_modules/semver/ranges/intersects.js +++ /dev/null @@ -1,7 +0,0 @@ -const Range = require('../classes/range') -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} -module.exports = intersects diff --git a/general/nvim/node_modules/semver/ranges/ltr.js b/general/nvim/node_modules/semver/ranges/ltr.js deleted file mode 100644 index 528a885..0000000 --- a/general/nvim/node_modules/semver/ranges/ltr.js +++ /dev/null @@ -1,4 +0,0 @@ -const outside = require('./outside') -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr diff --git a/general/nvim/node_modules/semver/ranges/max-satisfying.js b/general/nvim/node_modules/semver/ranges/max-satisfying.js deleted file mode 100644 index 6e3d993..0000000 --- a/general/nvim/node_modules/semver/ranges/max-satisfying.js +++ /dev/null @@ -1,25 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying diff --git a/general/nvim/node_modules/semver/ranges/min-satisfying.js b/general/nvim/node_modules/semver/ranges/min-satisfying.js deleted file mode 100644 index 9b60974..0000000 --- a/general/nvim/node_modules/semver/ranges/min-satisfying.js +++ /dev/null @@ -1,24 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying diff --git a/general/nvim/node_modules/semver/ranges/min-version.js b/general/nvim/node_modules/semver/ranges/min-version.js deleted file mode 100644 index 350e1f7..0000000 --- a/general/nvim/node_modules/semver/ranges/min-version.js +++ /dev/null @@ -1,61 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const gt = require('../functions/gt') - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin - } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion diff --git a/general/nvim/node_modules/semver/ranges/outside.js b/general/nvim/node_modules/semver/ranges/outside.js deleted file mode 100644 index ae99b10..0000000 --- a/general/nvim/node_modules/semver/ranges/outside.js +++ /dev/null @@ -1,80 +0,0 @@ -const SemVer = require('../classes/semver') -const Comparator = require('../classes/comparator') -const { ANY } = Comparator -const Range = require('../classes/range') -const satisfies = require('../functions/satisfies') -const gt = require('../functions/gt') -const lt = require('../functions/lt') -const lte = require('../functions/lte') -const gte = require('../functions/gte') - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside diff --git a/general/nvim/node_modules/semver/ranges/simplify.js b/general/nvim/node_modules/semver/ranges/simplify.js deleted file mode 100644 index 618d5b6..0000000 --- a/general/nvim/node_modules/semver/ranges/simplify.js +++ /dev/null @@ -1,47 +0,0 @@ -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null - } - } - if (first) { - set.push([first, null]) - } - - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} diff --git a/general/nvim/node_modules/semver/ranges/subset.js b/general/nvim/node_modules/semver/ranges/subset.js deleted file mode 100644 index e0dea43..0000000 --- a/general/nvim/node_modules/semver/ranges/subset.js +++ /dev/null @@ -1,244 +0,0 @@ -const Range = require('../classes/range.js') -const Comparator = require('../classes/comparator.js') -const { ANY } = Comparator -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER - } - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = [new Comparator('>=0.0.0-0')] - } else { - sub = [new Comparator('>=0.0.0')] - } - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = [new Comparator('>=0.0.0')] - } - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } - } - - if (eqSet.size > 1) { - return null - } - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null - } - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } - - if (lt && !satisfies(eq, String(lt), options)) { - return null - } - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false - } - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset diff --git a/general/nvim/node_modules/semver/ranges/to-comparators.js b/general/nvim/node_modules/semver/ranges/to-comparators.js deleted file mode 100644 index 6c8bc7e..0000000 --- a/general/nvim/node_modules/semver/ranges/to-comparators.js +++ /dev/null @@ -1,8 +0,0 @@ -const Range = require('../classes/range') - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators diff --git a/general/nvim/node_modules/semver/ranges/valid.js b/general/nvim/node_modules/semver/ranges/valid.js deleted file mode 100644 index 365f356..0000000 --- a/general/nvim/node_modules/semver/ranges/valid.js +++ /dev/null @@ -1,11 +0,0 @@ -const Range = require('../classes/range') -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange diff --git a/general/nvim/node_modules/simple-swizzle/LICENSE b/general/nvim/node_modules/simple-swizzle/LICENSE deleted file mode 100644 index 1b77e5b..0000000 --- a/general/nvim/node_modules/simple-swizzle/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/general/nvim/node_modules/simple-swizzle/README.md b/general/nvim/node_modules/simple-swizzle/README.md deleted file mode 100644 index 7624577..0000000 --- a/general/nvim/node_modules/simple-swizzle/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# simple-swizzle [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-simple-swizzle.svg?style=flat-square)](https://travis-ci.org/Qix-/node-simple-swizzle) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-simple-swizzle.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-simple-swizzle) - -> [Swizzle](https://en.wikipedia.org/wiki/Swizzling_(computer_graphics)) your function arguments; pass in mixed arrays/values and get a clean array - -## Usage - -```js -var swizzle = require('simple-swizzle'); - -function myFunc() { - var args = swizzle(arguments); - // ... - return args; -} - -myFunc(1, [2, 3], 4); // [1, 2, 3, 4] -myFunc(1, 2, 3, 4); // [1, 2, 3, 4] -myFunc([1, 2, 3, 4]); // [1, 2, 3, 4] -``` - -Functions can also be wrapped to automatically swizzle arguments and be passed -the resulting array. - -```js -var swizzle = require('simple-swizzle'); - -var swizzledFn = swizzle.wrap(function (args) { - // ... - return args; -}); - -swizzledFn(1, [2, 3], 4); // [1, 2, 3, 4] -swizzledFn(1, 2, 3, 4); // [1, 2, 3, 4] -swizzledFn([1, 2, 3, 4]); // [1, 2, 3, 4] -``` - -## License -Licensed under the [MIT License](http://opensource.org/licenses/MIT). -You can find a copy of it in [LICENSE](LICENSE). diff --git a/general/nvim/node_modules/simple-swizzle/index.js b/general/nvim/node_modules/simple-swizzle/index.js deleted file mode 100644 index 4d6b8ff..0000000 --- a/general/nvim/node_modules/simple-swizzle/index.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var isArrayish = require('is-arrayish'); - -var concat = Array.prototype.concat; -var slice = Array.prototype.slice; - -var swizzle = module.exports = function swizzle(args) { - var results = []; - - for (var i = 0, len = args.length; i < len; i++) { - var arg = args[i]; - - if (isArrayish(arg)) { - // http://jsperf.com/javascript-array-concat-vs-push/98 - results = concat.call(results, slice.call(arg)); - } else { - results.push(arg); - } - } - - return results; -}; - -swizzle.wrap = function (fn) { - return function () { - return fn(swizzle(arguments)); - }; -}; diff --git a/general/nvim/node_modules/simple-swizzle/package.json b/general/nvim/node_modules/simple-swizzle/package.json deleted file mode 100644 index 795ae4c..0000000 --- a/general/nvim/node_modules/simple-swizzle/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "simple-swizzle", - "description": "Simply swizzle your arguments", - "version": "0.2.2", - "author": "Qix (http://github.com/qix-)", - "keywords": [ - "argument", - "arguments", - "swizzle", - "swizzling", - "parameter", - "parameters", - "mixed", - "array" - ], - "license": "MIT", - "scripts": { - "pretest": "xo", - "test": "mocha --compilers coffee:coffee-script/register" - }, - "files": [ - "index.js" - ], - "repository": "qix-/node-simple-swizzle", - "devDependencies": { - "coffee-script": "^1.9.3", - "coveralls": "^2.11.2", - "istanbul": "^0.3.17", - "mocha": "^2.2.5", - "should": "^7.0.1", - "xo": "^0.7.1" - }, - "dependencies": { - "is-arrayish": "^0.3.1" - } -} diff --git a/general/nvim/node_modules/stack-trace/.npmignore b/general/nvim/node_modules/stack-trace/.npmignore deleted file mode 100644 index b59f7e3..0000000 --- a/general/nvim/node_modules/stack-trace/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ \ No newline at end of file diff --git a/general/nvim/node_modules/stack-trace/License b/general/nvim/node_modules/stack-trace/License deleted file mode 100644 index 11ec094..0000000 --- a/general/nvim/node_modules/stack-trace/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. diff --git a/general/nvim/node_modules/stack-trace/Makefile b/general/nvim/node_modules/stack-trace/Makefile deleted file mode 100644 index a7ce31d..0000000 --- a/general/nvim/node_modules/stack-trace/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -release: - git push - git push --tags - npm publish . - -.PHONY: test diff --git a/general/nvim/node_modules/stack-trace/Readme.md b/general/nvim/node_modules/stack-trace/Readme.md deleted file mode 100644 index fcd1b97..0000000 --- a/general/nvim/node_modules/stack-trace/Readme.md +++ /dev/null @@ -1,98 +0,0 @@ -# stack-trace - -Get v8 stack traces as an array of CallSite objects. - -## Install - -``` bash -npm install stack-trace -``` - -## Usage - -The stack-trace module makes it easy for you to capture the current stack: - -``` javascript -var stackTrace = require('stack-trace'); -var trace = stackTrace.get(); - -require('assert').strictEqual(trace[0].getFileName(), __filename); -``` - -However, sometimes you have already popped the stack you are interested in, -and all you have left is an `Error` object. This module can help: - -``` javascript -var stackTrace = require('stack-trace'); -var err = new Error('something went wrong'); -var trace = stackTrace.parse(err); - -require('assert').strictEqual(trace[0].getFileName(), __filename); -``` - -Please note that parsing the `Error#stack` property is not perfect, only -certain properties can be retrieved with it as noted in the API docs below. - -## Long stack traces - -stack-trace works great with [long-stack-traces][], when parsing an `err.stack` -that has crossed the event loop boundary, a `CallSite` object returning -`'----------------------------------------'` for `getFileName()` is created. -All other methods of the event loop boundary call site return `null`. - -[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces - -## API - -### stackTrace.get([belowFn]) - -Returns an array of `CallSite` objects, where element `0` is the current call -site. - -When passing a function on the current stack as the `belowFn` parameter, the -returned array will only include `CallSite` objects below this function. - -### stackTrace.parse(err) - -Parses the `err.stack` property of an `Error` object into an array compatible -with those returned by `stackTrace.get()`. However, only the following methods -are implemented on the returned `CallSite` objects. - -* getTypeName -* getFunctionName -* getMethodName -* getFileName -* getLineNumber -* getColumnNumber -* isNative - -Note: Except `getFunctionName()`, all of the above methods return exactly the -same values as you would get from `stackTrace.get()`. `getFunctionName()` -is sometimes a little different, but still useful. - -### CallSite - -The official v8 CallSite object API can be found [here][v8stackapi]. A quick -excerpt: - -> A CallSite object defines the following methods: -> -> * **getThis**: returns the value of this -> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property. -> * **getFunction**: returns the current function -> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context. -> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function -> * **getFileName**: if this function was defined in a script returns the name of the script -> * **getLineNumber**: if this function was defined in a script returns the current line number -> * **getColumnNumber**: if this function was defined in a script returns the current column number -> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called -> * **isToplevel**: is this a toplevel invocation, that is, is this the global object? -> * **isEval**: does this call take place in code defined by a call to eval? -> * **isNative**: is this call in native V8 code? -> * **isConstructor**: is this a constructor call? - -[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - -## License - -stack-trace is licensed under the MIT license. diff --git a/general/nvim/node_modules/stack-trace/lib/stack-trace.js b/general/nvim/node_modules/stack-trace/lib/stack-trace.js deleted file mode 100644 index cbadd58..0000000 --- a/general/nvim/node_modules/stack-trace/lib/stack-trace.js +++ /dev/null @@ -1,136 +0,0 @@ -exports.get = function(belowFn) { - var oldLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Infinity; - - var dummyObject = {}; - - var v8Handler = Error.prepareStackTrace; - Error.prepareStackTrace = function(dummyObject, v8StackTrace) { - return v8StackTrace; - }; - Error.captureStackTrace(dummyObject, belowFn || exports.get); - - var v8StackTrace = dummyObject.stack; - Error.prepareStackTrace = v8Handler; - Error.stackTraceLimit = oldLimit; - - return v8StackTrace; -}; - -exports.parse = function(err) { - if (!err.stack) { - return []; - } - - var self = this; - var lines = err.stack.split('\n').slice(1); - - return lines - .map(function(line) { - if (line.match(/^\s*[-]{4,}$/)) { - return self._createParsedCallSite({ - fileName: line, - lineNumber: null, - functionName: null, - typeName: null, - methodName: null, - columnNumber: null, - 'native': null, - }); - } - - var lineMatch = line.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); - if (!lineMatch) { - return; - } - - var object = null; - var method = null; - var functionName = null; - var typeName = null; - var methodName = null; - var isNative = (lineMatch[5] === 'native'); - - if (lineMatch[1]) { - functionName = lineMatch[1]; - var methodStart = functionName.lastIndexOf('.'); - if (functionName[methodStart-1] == '.') - methodStart--; - if (methodStart > 0) { - object = functionName.substr(0, methodStart); - method = functionName.substr(methodStart + 1); - var objectEnd = object.indexOf('.Module'); - if (objectEnd > 0) { - functionName = functionName.substr(objectEnd + 1); - object = object.substr(0, objectEnd); - } - } - typeName = null; - } - - if (method) { - typeName = object; - methodName = method; - } - - if (method === '') { - methodName = null; - functionName = null; - } - - var properties = { - fileName: lineMatch[2] || null, - lineNumber: parseInt(lineMatch[3], 10) || null, - functionName: functionName, - typeName: typeName, - methodName: methodName, - columnNumber: parseInt(lineMatch[4], 10) || null, - 'native': isNative, - }; - - return self._createParsedCallSite(properties); - }) - .filter(function(callSite) { - return !!callSite; - }); -}; - -function CallSite(properties) { - for (var property in properties) { - this[property] = properties[property]; - } -} - -var strProperties = [ - 'this', - 'typeName', - 'functionName', - 'methodName', - 'fileName', - 'lineNumber', - 'columnNumber', - 'function', - 'evalOrigin' -]; -var boolProperties = [ - 'topLevel', - 'eval', - 'native', - 'constructor' -]; -strProperties.forEach(function (property) { - CallSite.prototype[property] = null; - CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () { - return this[property]; - } -}); -boolProperties.forEach(function (property) { - CallSite.prototype[property] = false; - CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () { - return this[property]; - } -}); - -exports._createParsedCallSite = function(properties) { - return new CallSite(properties); -}; diff --git a/general/nvim/node_modules/stack-trace/package.json b/general/nvim/node_modules/stack-trace/package.json deleted file mode 100644 index 9cd0d07..0000000 --- a/general/nvim/node_modules/stack-trace/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "author": "Felix Geisendörfer (http://debuggable.com/)", - "name": "stack-trace", - "description": "Get v8 stack traces as an array of CallSite objects.", - "version": "0.0.10", - "homepage": "https://github.com/felixge/node-stack-trace", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-stack-trace.git" - }, - "main": "./lib/stack-trace", - "engines": { - "node": "*" - }, - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "far": "0.0.3", - "long-stack-traces": "0.1.2" - } -} diff --git a/general/nvim/node_modules/string_decoder/LICENSE b/general/nvim/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb2..0000000 --- a/general/nvim/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/general/nvim/node_modules/string_decoder/README.md b/general/nvim/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd5831..0000000 --- a/general/nvim/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/general/nvim/node_modules/string_decoder/lib/string_decoder.js b/general/nvim/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63..0000000 --- a/general/nvim/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/general/nvim/node_modules/string_decoder/package.json b/general/nvim/node_modules/string_decoder/package.json deleted file mode 100644 index b2bb141..0000000 --- a/general/nvim/node_modules/string_decoder/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "string_decoder", - "version": "1.3.0", - "description": "The string_decoder module from Node core", - "main": "lib/string_decoder.js", - "files": [ - "lib" - ], - "dependencies": { - "safe-buffer": "~5.2.0" - }, - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/parallel/*.js && node test/verify-dependencies", - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT" -} diff --git a/general/nvim/node_modules/text-hex/LICENSE b/general/nvim/node_modules/text-hex/LICENSE deleted file mode 100644 index bfb9d77..0000000 --- a/general/nvim/node_modules/text-hex/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 Arnout Kazemier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/general/nvim/node_modules/text-hex/README.md b/general/nvim/node_modules/text-hex/README.md deleted file mode 100644 index bb86705..0000000 --- a/general/nvim/node_modules/text-hex/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# text-hex - -Transforms a given piece of text to a hex color. - -## Install - -``` -npm install text-hex -``` - -## Usage - -```js -var hex = require('text-hex'); -console.log(hex('foo')); -``` - -## License - -MIT diff --git a/general/nvim/node_modules/text-hex/index.js b/general/nvim/node_modules/text-hex/index.js deleted file mode 100644 index 5bec54d..0000000 --- a/general/nvim/node_modules/text-hex/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -/*** - * Convert string to hex color. - * - * @param {String} str Text to hash and convert to hex. - * @returns {String} - * @api public - */ -module.exports = function hex(str) { - for ( - var i = 0, hash = 0; - i < str.length; - hash = str.charCodeAt(i++) + ((hash << 5) - hash) - ); - - var color = Math.floor( - Math.abs( - (Math.sin(hash) * 10000) % 1 * 16777216 - ) - ).toString(16); - - return '#' + Array(6 - color.length + 1).join('0') + color; -}; diff --git a/general/nvim/node_modules/text-hex/package.json b/general/nvim/node_modules/text-hex/package.json deleted file mode 100644 index cbbcfce..0000000 --- a/general/nvim/node_modules/text-hex/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "text-hex", - "version": "1.0.0", - "description": "Generate a hex color from the given text", - "main": "index.js", - "scripts": { - "test": "mocha --reporter spec --ui bdd test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/3rd-Eden/text-hex" - }, - "keywords": [ - "css", - "color", - "hex", - "text" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "bugs": { - "url": "https://github.com/3rd-Eden/text-hex/issues" - }, - "homepage": "https://github.com/3rd-Eden/text-hex", - "devDependencies": { - "assume": "2.1.x", - "mocha": "5.2.x", - "pre-commit": "1.2.x" - } -} diff --git a/general/nvim/node_modules/text-hex/test.js b/general/nvim/node_modules/text-hex/test.js deleted file mode 100644 index 2adbbd1..0000000 --- a/general/nvim/node_modules/text-hex/test.js +++ /dev/null @@ -1,11 +0,0 @@ -describe('text-hex', function () { - 'use strict'; - - var assume = require('assume') - , hex = require('./'); - - it('is a 6 digit hex', function () { - assume(hex('a')).to.have.length(7); // including a # - assume(hex('a244fdafadfa4 adfau8fa a u adf8a0')).to.have.length(7); - }); -}); diff --git a/general/nvim/node_modules/triple-beam/.eslintrc b/general/nvim/node_modules/triple-beam/.eslintrc deleted file mode 100644 index 9dafa5a..0000000 --- a/general/nvim/node_modules/triple-beam/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "populist", - "rules": { - "one-var": ["error", { var: "never", let: "never", const: "never" }], - "strict": 0 - } -} diff --git a/general/nvim/node_modules/triple-beam/.gitattributes b/general/nvim/node_modules/triple-beam/.gitattributes deleted file mode 100644 index 1a6bd45..0000000 --- a/general/nvim/node_modules/triple-beam/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -package-lock.json binary diff --git a/general/nvim/node_modules/triple-beam/.travis.yml b/general/nvim/node_modules/triple-beam/.travis.yml deleted file mode 100644 index eccd47c..0000000 --- a/general/nvim/node_modules/triple-beam/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false -language: node_js -node_js: - - "6" - - "8" - - "10" - -before_install: - - travis_retry npm install - -script: - - npm test - -notifications: - email: - - travis@nodejitsu.com - irc: "irc.freenode.org#nodejitsu" diff --git a/general/nvim/node_modules/triple-beam/CHANGELOG.md b/general/nvim/node_modules/triple-beam/CHANGELOG.md deleted file mode 100644 index 9c5e54a..0000000 --- a/general/nvim/node_modules/triple-beam/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# CHANGELOG - -### 1.3.0 - -- [#4] Add `SPLAT` symbol. -- [#3] Add linting & TravisCI. - -### 1.2.0 - -- [#2] Move configs from `winston.config.{npm,syslog,npm}` into `triple-beam`. - -### 1.1.0 - -- Expose a `MESSAGE` Symbol, nothing more. - -### 1.0.1 - -- Use `Symbol.for` because that is how they work apparently. - -### 1.0.0 - -- Initial version. Defines a `LEVEL` Symbol, nothing more. diff --git a/general/nvim/node_modules/triple-beam/LICENSE b/general/nvim/node_modules/triple-beam/LICENSE deleted file mode 100644 index 1a1238a..0000000 --- a/general/nvim/node_modules/triple-beam/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 winstonjs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/general/nvim/node_modules/triple-beam/README.md b/general/nvim/node_modules/triple-beam/README.md deleted file mode 100644 index 1954316..0000000 --- a/general/nvim/node_modules/triple-beam/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# triple-beam - -Definitions of levels for logging purposes & shareable Symbol constants. - -## Usage - -``` js -const { LEVEL } = require('triple-beam'); -const colors = require('colors/safe'); - -const info = { - [LEVEL]: 'error', - level: 'error', - message: 'hey a logging message!' -}; - -// Colorize your log level! -info.level = colors.green(info.level); - -// And still have an unmutated copy of your level! -console.log(info.level === 'error'); // false -console.log(info[LEVEL] === 'error'); // true -``` - -## Tests - -Tests are written with `mocha`, `assume`, and `nyc`. They can be run with `npm`: - -``` -npm test -``` - -##### LICENSE: MIT -##### AUTHOR: [Charlie Robbins](https://github.com/indexzero) diff --git a/general/nvim/node_modules/triple-beam/config/cli.js b/general/nvim/node_modules/triple-beam/config/cli.js deleted file mode 100644 index 028c117..0000000 --- a/general/nvim/node_modules/triple-beam/config/cli.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * cli.js: Config that conform to commonly used CLI logging levels. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -/** - * Default levels for the CLI configuration. - * @type {Object} - */ -exports.levels = { - error: 0, - warn: 1, - help: 2, - data: 3, - info: 4, - debug: 5, - prompt: 6, - verbose: 7, - input: 8, - silly: 9 -}; - -/** - * Default colors for the CLI configuration. - * @type {Object} - */ -exports.colors = { - error: 'red', - warn: 'yellow', - help: 'cyan', - data: 'grey', - info: 'green', - debug: 'blue', - prompt: 'grey', - verbose: 'cyan', - input: 'grey', - silly: 'magenta' -}; diff --git a/general/nvim/node_modules/triple-beam/config/index.js b/general/nvim/node_modules/triple-beam/config/index.js deleted file mode 100644 index 96b6566..0000000 --- a/general/nvim/node_modules/triple-beam/config/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * index.js: Default settings for all levels that winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -/** - * Export config set for the CLI. - * @type {Object} - */ -Object.defineProperty(exports, 'cli', { - value: require('./cli') -}); - -/** - * Export config set for npm. - * @type {Object} - */ -Object.defineProperty(exports, 'npm', { - value: require('./npm') -}); - -/** - * Export config set for the syslog. - * @type {Object} - */ -Object.defineProperty(exports, 'syslog', { - value: require('./syslog') -}); diff --git a/general/nvim/node_modules/triple-beam/config/npm.js b/general/nvim/node_modules/triple-beam/config/npm.js deleted file mode 100644 index 01f88ab..0000000 --- a/general/nvim/node_modules/triple-beam/config/npm.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * npm.js: Config that conform to npm logging levels. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -/** - * Default levels for the npm configuration. - * @type {Object} - */ -exports.levels = { - error: 0, - warn: 1, - info: 2, - http: 3, - verbose: 4, - debug: 5, - silly: 6 -}; - -/** - * Default levels for the npm configuration. - * @type {Object} - */ -exports.colors = { - error: 'red', - warn: 'yellow', - info: 'green', - http: 'green', - verbose: 'cyan', - debug: 'blue', - silly: 'magenta' -}; diff --git a/general/nvim/node_modules/triple-beam/config/syslog.js b/general/nvim/node_modules/triple-beam/config/syslog.js deleted file mode 100644 index 9c7b82f..0000000 --- a/general/nvim/node_modules/triple-beam/config/syslog.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * syslog.js: Config that conform to syslog logging levels. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -/** - * Default levels for the syslog configuration. - * @type {Object} - */ -exports.levels = { - emerg: 0, - alert: 1, - crit: 2, - error: 3, - warning: 4, - notice: 5, - info: 6, - debug: 7 -}; - -/** - * Default levels for the syslog configuration. - * @type {Object} - */ -exports.colors = { - emerg: 'red', - alert: 'yellow', - crit: 'red', - error: 'red', - warning: 'red', - notice: 'yellow', - info: 'green', - debug: 'blue' -}; diff --git a/general/nvim/node_modules/triple-beam/index.js b/general/nvim/node_modules/triple-beam/index.js deleted file mode 100644 index cf89cf0..0000000 --- a/general/nvim/node_modules/triple-beam/index.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -/** - * A shareable symbol constant that can be used - * as a non-enumerable / semi-hidden level identifier - * to allow the readable level property to be mutable for - * operations like colorization - * - * @type {Symbol} - */ -Object.defineProperty(exports, 'LEVEL', { - value: Symbol.for('level') -}); - -/** - * A shareable symbol constant that can be used - * as a non-enumerable / semi-hidden message identifier - * to allow the final message property to not have - * side effects on another. - * - * @type {Symbol} - */ -Object.defineProperty(exports, 'MESSAGE', { - value: Symbol.for('message') -}); - -/** - * A shareable symbol constant that can be used - * as a non-enumerable / semi-hidden message identifier - * to allow the extracted splat property be hidden - * - * @type {Symbol} - */ -Object.defineProperty(exports, 'SPLAT', { - value: Symbol.for('splat') -}); - -/** - * A shareable object constant that can be used - * as a standard configuration for winston@3. - * - * @type {Object} - */ -Object.defineProperty(exports, 'configs', { - value: require('./config') -}); diff --git a/general/nvim/node_modules/triple-beam/package.json b/general/nvim/node_modules/triple-beam/package.json deleted file mode 100644 index adf9529..0000000 --- a/general/nvim/node_modules/triple-beam/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "triple-beam", - "version": "1.3.0", - "description": "Definitions of levels for logging purposes & shareable Symbol constants.", - "main": "index.js", - "scripts": { - "lint": "populist config/*.js index.js", - "pretest": "npm run lint", - "test": "nyc mocha test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/winstonjs/triple-beam.git" - }, - "keywords": [ - "winstonjs", - "winston", - "logging", - "logform", - "symbols", - "logs", - "levels" - ], - "author": "Charlie Robbins ", - "license": "MIT", - "bugs": { - "url": "https://github.com/winstonjs/triple-beam/issues" - }, - "homepage": "https://github.com/winstonjs/triple-beam#readme", - "devDependencies": { - "assume": "^2.0.1", - "eslint-config-populist": "^4.1.0", - "mocha": "^5.1.1", - "nyc": "^11.7.1" - } -} diff --git a/general/nvim/node_modules/triple-beam/test.js b/general/nvim/node_modules/triple-beam/test.js deleted file mode 100644 index e13d4fe..0000000 --- a/general/nvim/node_modules/triple-beam/test.js +++ /dev/null @@ -1,98 +0,0 @@ -const assume = require('assume'); -const tripleBeam = require('./'); - -describe('triple-beam', function () { - describe('LEVEL constant', function () { - it('is exposed', function () { - assume(tripleBeam.LEVEL); - }); - - it('is a Symbol', function () { - assume(tripleBeam.LEVEL).is.a('symbol'); - }); - - it('is not mutable', function () { - // - // Assert that the symbol does not change - // even though the operation does not throw. - // - const OVERWRITE = Symbol('overwrite'); - const LEVEL = tripleBeam.LEVEL; - - assume(LEVEL).not.equals(OVERWRITE); - tripleBeam.LEVEL = OVERWRITE; - assume(tripleBeam.LEVEL).equals(LEVEL); - }); - }); - - describe('MESSAGE constant', function () { - it('is exposed', function () { - assume(tripleBeam.MESSAGE); - }); - - it('is a Symbol', function () { - assume(tripleBeam.MESSAGE).is.a('symbol'); - }); - - it('is not mutable', function () { - // - // Assert that the symbol does not change - // even though the operation does not throw. - // - const OVERWRITE = Symbol('overwrite'); - const MESSAGE = tripleBeam.MESSAGE; - - assume(MESSAGE).not.equals(OVERWRITE); - tripleBeam.MESSAGE = OVERWRITE; - assume(tripleBeam.MESSAGE).equals(MESSAGE); - }); - }); - - describe('SPLAT constant', function () { - it('is exposed', function () { - assume(tripleBeam.SPLAT); - }); - - it('is a Symbol', function () { - assume(tripleBeam.SPLAT).is.a('symbol'); - }); - - it('is not mutable', function () { - // - // Assert that the symbol does not change - // even though the operation does not throw. - // - const OVERWRITE = Symbol('overwrite'); - const SPLAT = tripleBeam.SPLAT; - - assume(SPLAT).not.equals(OVERWRITE); - tripleBeam.SPLAT = OVERWRITE; - assume(tripleBeam.SPLAT).equals(SPLAT); - }); - }); - - describe('configs constant', function () { - it('is exposed', function () { - assume(tripleBeam.configs); - }); - - it('is a Symbol', function () { - assume(tripleBeam.configs).is.an('Object'); - }); - - it('is not mutable', function () { - // - // Assert that the object does not change - // even though the operation does not throw. - // - const overwrite = { - overwrite: 'overwrite' - }; - const configs = tripleBeam.configs; - - assume(configs).not.equals(overwrite); - tripleBeam.configs = overwrite; - assume(tripleBeam.configs).equals(configs); - }); - }); -}); diff --git a/general/nvim/node_modules/util-deprecate/History.md b/general/nvim/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675..0000000 --- a/general/nvim/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/general/nvim/node_modules/util-deprecate/LICENSE b/general/nvim/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c..0000000 --- a/general/nvim/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/general/nvim/node_modules/util-deprecate/README.md b/general/nvim/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa..0000000 --- a/general/nvim/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/general/nvim/node_modules/util-deprecate/browser.js b/general/nvim/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f..0000000 --- a/general/nvim/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/general/nvim/node_modules/util-deprecate/node.js b/general/nvim/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff..0000000 --- a/general/nvim/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/general/nvim/node_modules/util-deprecate/package.json b/general/nvim/node_modules/util-deprecate/package.json deleted file mode 100644 index 2e79f89..0000000 --- a/general/nvim/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "util-deprecate", - "version": "1.0.2", - "description": "The Node.js `util.deprecate()` function with browser support", - "main": "node.js", - "browser": "browser.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "homepage": "https://github.com/TooTallNate/util-deprecate" -} diff --git a/general/nvim/node_modules/winston-transport/.babelrc b/general/nvim/node_modules/winston-transport/.babelrc deleted file mode 100644 index 002b4aa..0000000 --- a/general/nvim/node_modules/winston-transport/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["env"] -} diff --git a/general/nvim/node_modules/winston-transport/.eslintrc b/general/nvim/node_modules/winston-transport/.eslintrc deleted file mode 100644 index a73255e..0000000 --- a/general/nvim/node_modules/winston-transport/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "@dabh/eslint-config-populist", - "rules": { - "one-var": ["error", { var: "never", let: "never", const: "never" }], - "strict": 0 - } -} diff --git a/general/nvim/node_modules/winston-transport/.gitattributes b/general/nvim/node_modules/winston-transport/.gitattributes deleted file mode 100644 index 1a6bd45..0000000 --- a/general/nvim/node_modules/winston-transport/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -package-lock.json binary diff --git a/general/nvim/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json b/general/nvim/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json deleted file mode 100644 index 6e552cb..0000000 --- a/general/nvim/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +++ /dev/null @@ -1 +0,0 @@ -{"/Users/David/winston-transport/index.js":{"path":"/Users/David/winston-transport/index.js","statementMap":{"0":{"start":{"line":3,"column":13},"end":{"line":3,"column":28}},"1":{"start":{"line":4,"column":17},"end":{"line":4,"column":67}},"2":{"start":{"line":5,"column":18},"end":{"line":5,"column":40}},"3":{"start":{"line":18,"column":24},"end":{"line":54,"column":1}},"4":{"start":{"line":19,"column":2},"end":{"line":19,"column":82}},"5":{"start":{"line":21,"column":2},"end":{"line":21,"column":31}},"6":{"start":{"line":22,"column":2},"end":{"line":22,"column":29}},"7":{"start":{"line":23,"column":2},"end":{"line":23,"column":51}},"8":{"start":{"line":24,"column":2},"end":{"line":24,"column":51}},"9":{"start":{"line":25,"column":2},"end":{"line":25,"column":31}},"10":{"start":{"line":27,"column":2},"end":{"line":27,"column":42}},"11":{"start":{"line":27,"column":19},"end":{"line":27,"column":42}},"12":{"start":{"line":28,"column":2},"end":{"line":28,"column":45}},"13":{"start":{"line":28,"column":20},"end":{"line":28,"column":45}},"14":{"start":{"line":29,"column":2},"end":{"line":29,"column":48}},"15":{"start":{"line":29,"column":21},"end":{"line":29,"column":48}},"16":{"start":{"line":32,"column":2},"end":{"line":39,"column":5}},"17":{"start":{"line":37,"column":4},"end":{"line":37,"column":32}},"18":{"start":{"line":38,"column":4},"end":{"line":38,"column":25}},"19":{"start":{"line":42,"column":2},"end":{"line":53,"column":5}},"20":{"start":{"line":47,"column":4},"end":{"line":52,"column":5}},"21":{"start":{"line":48,"column":6},"end":{"line":48,"column":25}},"22":{"start":{"line":49,"column":6},"end":{"line":51,"column":7}},"23":{"start":{"line":50,"column":8},"end":{"line":50,"column":21}},"24":{"start":{"line":59,"column":0},"end":{"line":59,"column":41}},"25":{"start":{"line":69,"column":0},"end":{"line":107,"column":2}},"26":{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},"27":{"start":{"line":71,"column":4},"end":{"line":71,"column":26}},"28":{"start":{"line":78,"column":16},"end":{"line":78,"column":64}},"29":{"start":{"line":80,"column":2},"end":{"line":104,"column":3}},"30":{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},"31":{"start":{"line":82,"column":6},"end":{"line":82,"column":38}},"32":{"start":{"line":90,"column":4},"end":{"line":94,"column":5}},"33":{"start":{"line":91,"column":6},"end":{"line":91,"column":88}},"34":{"start":{"line":93,"column":6},"end":{"line":93,"column":21}},"35":{"start":{"line":96,"column":4},"end":{"line":101,"column":5}},"36":{"start":{"line":98,"column":6},"end":{"line":98,"column":17}},"37":{"start":{"line":99,"column":6},"end":{"line":99,"column":35}},"38":{"start":{"line":99,"column":20},"end":{"line":99,"column":35}},"39":{"start":{"line":100,"column":6},"end":{"line":100,"column":13}},"40":{"start":{"line":103,"column":4},"end":{"line":103,"column":43}},"41":{"start":{"line":105,"column":2},"end":{"line":105,"column":35}},"42":{"start":{"line":106,"column":2},"end":{"line":106,"column":24}},"43":{"start":{"line":117,"column":0},"end":{"line":166,"column":2}},"44":{"start":{"line":118,"column":2},"end":{"line":128,"column":3}},"45":{"start":{"line":119,"column":18},"end":{"line":119,"column":51}},"46":{"start":{"line":120,"column":4},"end":{"line":122,"column":5}},"47":{"start":{"line":121,"column":6},"end":{"line":121,"column":28}},"48":{"start":{"line":127,"column":4},"end":{"line":127,"column":38}},"49":{"start":{"line":130,"column":2},"end":{"line":163,"column":3}},"50":{"start":{"line":130,"column":15},"end":{"line":130,"column":16}},"51":{"start":{"line":131,"column":4},"end":{"line":131,"column":43}},"52":{"start":{"line":131,"column":34},"end":{"line":131,"column":43}},"53":{"start":{"line":133,"column":4},"end":{"line":136,"column":5}},"54":{"start":{"line":134,"column":6},"end":{"line":134,"column":52}},"55":{"start":{"line":135,"column":6},"end":{"line":135,"column":15}},"56":{"start":{"line":143,"column":4},"end":{"line":150,"column":5}},"57":{"start":{"line":144,"column":6},"end":{"line":147,"column":8}},"58":{"start":{"line":149,"column":6},"end":{"line":149,"column":21}},"59":{"start":{"line":152,"column":4},"end":{"line":162,"column":5}},"60":{"start":{"line":154,"column":6},"end":{"line":154,"column":27}},"61":{"start":{"line":155,"column":6},"end":{"line":159,"column":7}},"62":{"start":{"line":157,"column":8},"end":{"line":157,"column":23}},"63":{"start":{"line":158,"column":8},"end":{"line":158,"column":23}},"64":{"start":{"line":161,"column":6},"end":{"line":161,"column":48}},"65":{"start":{"line":165,"column":2},"end":{"line":165,"column":24}},"66":{"start":{"line":177,"column":0},"end":{"line":202,"column":2}},"67":{"start":{"line":178,"column":15},"end":{"line":178,"column":26}},"68":{"start":{"line":179,"column":2},"end":{"line":181,"column":3}},"69":{"start":{"line":180,"column":4},"end":{"line":180,"column":17}},"70":{"start":{"line":185,"column":16},"end":{"line":185,"column":64}},"71":{"start":{"line":188,"column":2},"end":{"line":199,"column":3}},"72":{"start":{"line":196,"column":4},"end":{"line":198,"column":5}},"73":{"start":{"line":197,"column":6},"end":{"line":197,"column":18}},"74":{"start":{"line":201,"column":2},"end":{"line":201,"column":15}},"75":{"start":{"line":208,"column":0},"end":{"line":211,"column":2}},"76":{"start":{"line":210,"column":2},"end":{"line":210,"column":24}},"77":{"start":{"line":215,"column":0},"end":{"line":215,"column":59}}},"fnMap":{"0":{"name":"TransportStream","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":65}},"loc":{"start":{"line":18,"column":80},"end":{"line":54,"column":1}},"line":18},"1":{"name":"(anonymous_1)","decl":{"start":{"line":32,"column":20},"end":{"line":32,"column":21}},"loc":{"start":{"line":32,"column":30},"end":{"line":39,"column":3}},"line":32},"2":{"name":"(anonymous_2)","decl":{"start":{"line":42,"column":22},"end":{"line":42,"column":23}},"loc":{"start":{"line":42,"column":29},"end":{"line":53,"column":3}},"line":42},"3":{"name":"_write","decl":{"start":{"line":69,"column":44},"end":{"line":69,"column":50}},"loc":{"start":{"line":69,"column":72},"end":{"line":107,"column":1}},"line":69},"4":{"name":"_writev","decl":{"start":{"line":117,"column":45},"end":{"line":117,"column":52}},"loc":{"start":{"line":117,"column":71},"end":{"line":166,"column":1}},"line":117},"5":{"name":"_accept","decl":{"start":{"line":177,"column":45},"end":{"line":177,"column":52}},"loc":{"start":{"line":177,"column":60},"end":{"line":202,"column":1}},"line":177},"6":{"name":"_nop","decl":{"start":{"line":208,"column":42},"end":{"line":208,"column":46}},"loc":{"start":{"line":208,"column":49},"end":{"line":211,"column":1}},"line":208}},"branchMap":{"0":{"loc":{"start":{"line":18,"column":66},"end":{"line":18,"column":78}},"type":"default-arg","locations":[{"start":{"line":18,"column":76},"end":{"line":18,"column":78}}],"line":18},"1":{"loc":{"start":{"line":27,"column":2},"end":{"line":27,"column":42}},"type":"if","locations":[{"start":{"line":27,"column":2},"end":{"line":27,"column":42}},{"start":{"line":27,"column":2},"end":{"line":27,"column":42}}],"line":27},"2":{"loc":{"start":{"line":28,"column":2},"end":{"line":28,"column":45}},"type":"if","locations":[{"start":{"line":28,"column":2},"end":{"line":28,"column":45}},{"start":{"line":28,"column":2},"end":{"line":28,"column":45}}],"line":28},"3":{"loc":{"start":{"line":29,"column":2},"end":{"line":29,"column":48}},"type":"if","locations":[{"start":{"line":29,"column":2},"end":{"line":29,"column":48}},{"start":{"line":29,"column":2},"end":{"line":29,"column":48}}],"line":29},"4":{"loc":{"start":{"line":47,"column":4},"end":{"line":52,"column":5}},"type":"if","locations":[{"start":{"line":47,"column":4},"end":{"line":52,"column":5}},{"start":{"line":47,"column":4},"end":{"line":52,"column":5}}],"line":47},"5":{"loc":{"start":{"line":49,"column":6},"end":{"line":51,"column":7}},"type":"if","locations":[{"start":{"line":49,"column":6},"end":{"line":51,"column":7}},{"start":{"line":49,"column":6},"end":{"line":51,"column":7}}],"line":49},"6":{"loc":{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},"type":"if","locations":[{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},{"start":{"line":70,"column":2},"end":{"line":72,"column":3}}],"line":70},"7":{"loc":{"start":{"line":70,"column":6},"end":{"line":70,"column":72}},"type":"binary-expr","locations":[{"start":{"line":70,"column":6},"end":{"line":70,"column":17}},{"start":{"line":70,"column":22},"end":{"line":70,"column":45}},{"start":{"line":70,"column":49},"end":{"line":70,"column":71}}],"line":70},"8":{"loc":{"start":{"line":78,"column":16},"end":{"line":78,"column":64}},"type":"binary-expr","locations":[{"start":{"line":78,"column":16},"end":{"line":78,"column":26}},{"start":{"line":78,"column":31},"end":{"line":78,"column":42}},{"start":{"line":78,"column":46},"end":{"line":78,"column":63}}],"line":78},"9":{"loc":{"start":{"line":80,"column":2},"end":{"line":104,"column":3}},"type":"if","locations":[{"start":{"line":80,"column":2},"end":{"line":104,"column":3}},{"start":{"line":80,"column":2},"end":{"line":104,"column":3}}],"line":80},"10":{"loc":{"start":{"line":80,"column":6},"end":{"line":80,"column":62}},"type":"binary-expr","locations":[{"start":{"line":80,"column":6},"end":{"line":80,"column":12}},{"start":{"line":80,"column":16},"end":{"line":80,"column":62}}],"line":80},"11":{"loc":{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},"type":"if","locations":[{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},{"start":{"line":81,"column":4},"end":{"line":83,"column":5}}],"line":81},"12":{"loc":{"start":{"line":81,"column":8},"end":{"line":81,"column":28}},"type":"binary-expr","locations":[{"start":{"line":81,"column":8},"end":{"line":81,"column":12}},{"start":{"line":81,"column":16},"end":{"line":81,"column":28}}],"line":81},"13":{"loc":{"start":{"line":96,"column":4},"end":{"line":101,"column":5}},"type":"if","locations":[{"start":{"line":96,"column":4},"end":{"line":101,"column":5}},{"start":{"line":96,"column":4},"end":{"line":101,"column":5}}],"line":96},"14":{"loc":{"start":{"line":96,"column":8},"end":{"line":96,"column":32}},"type":"binary-expr","locations":[{"start":{"line":96,"column":8},"end":{"line":96,"column":16}},{"start":{"line":96,"column":20},"end":{"line":96,"column":32}}],"line":96},"15":{"loc":{"start":{"line":99,"column":6},"end":{"line":99,"column":35}},"type":"if","locations":[{"start":{"line":99,"column":6},"end":{"line":99,"column":35}},{"start":{"line":99,"column":6},"end":{"line":99,"column":35}}],"line":99},"16":{"loc":{"start":{"line":118,"column":2},"end":{"line":128,"column":3}},"type":"if","locations":[{"start":{"line":118,"column":2},"end":{"line":128,"column":3}},{"start":{"line":118,"column":2},"end":{"line":128,"column":3}}],"line":118},"17":{"loc":{"start":{"line":120,"column":4},"end":{"line":122,"column":5}},"type":"if","locations":[{"start":{"line":120,"column":4},"end":{"line":122,"column":5}},{"start":{"line":120,"column":4},"end":{"line":122,"column":5}}],"line":120},"18":{"loc":{"start":{"line":131,"column":4},"end":{"line":131,"column":43}},"type":"if","locations":[{"start":{"line":131,"column":4},"end":{"line":131,"column":43}},{"start":{"line":131,"column":4},"end":{"line":131,"column":43}}],"line":131},"19":{"loc":{"start":{"line":133,"column":4},"end":{"line":136,"column":5}},"type":"if","locations":[{"start":{"line":133,"column":4},"end":{"line":136,"column":5}},{"start":{"line":133,"column":4},"end":{"line":136,"column":5}}],"line":133},"20":{"loc":{"start":{"line":133,"column":8},"end":{"line":133,"column":39}},"type":"binary-expr","locations":[{"start":{"line":133,"column":8},"end":{"line":133,"column":23}},{"start":{"line":133,"column":27},"end":{"line":133,"column":39}}],"line":133},"21":{"loc":{"start":{"line":152,"column":4},"end":{"line":162,"column":5}},"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":162,"column":5}},{"start":{"line":152,"column":4},"end":{"line":162,"column":5}}],"line":152},"22":{"loc":{"start":{"line":152,"column":8},"end":{"line":152,"column":32}},"type":"binary-expr","locations":[{"start":{"line":152,"column":8},"end":{"line":152,"column":16}},{"start":{"line":152,"column":20},"end":{"line":152,"column":32}}],"line":152},"23":{"loc":{"start":{"line":155,"column":6},"end":{"line":159,"column":7}},"type":"if","locations":[{"start":{"line":155,"column":6},"end":{"line":159,"column":7}},{"start":{"line":155,"column":6},"end":{"line":159,"column":7}}],"line":155},"24":{"loc":{"start":{"line":179,"column":2},"end":{"line":181,"column":3}},"type":"if","locations":[{"start":{"line":179,"column":2},"end":{"line":181,"column":3}},{"start":{"line":179,"column":2},"end":{"line":181,"column":3}}],"line":179},"25":{"loc":{"start":{"line":185,"column":16},"end":{"line":185,"column":64}},"type":"binary-expr","locations":[{"start":{"line":185,"column":16},"end":{"line":185,"column":26}},{"start":{"line":185,"column":31},"end":{"line":185,"column":42}},{"start":{"line":185,"column":46},"end":{"line":185,"column":63}}],"line":185},"26":{"loc":{"start":{"line":188,"column":2},"end":{"line":199,"column":3}},"type":"if","locations":[{"start":{"line":188,"column":2},"end":{"line":199,"column":3}},{"start":{"line":188,"column":2},"end":{"line":199,"column":3}}],"line":188},"27":{"loc":{"start":{"line":189,"column":4},"end":{"line":191,"column":50}},"type":"binary-expr","locations":[{"start":{"line":189,"column":4},"end":{"line":189,"column":27}},{"start":{"line":190,"column":4},"end":{"line":190,"column":10}},{"start":{"line":191,"column":4},"end":{"line":191,"column":50}}],"line":189},"28":{"loc":{"start":{"line":196,"column":4},"end":{"line":198,"column":5}},"type":"if","locations":[{"start":{"line":196,"column":4},"end":{"line":198,"column":5}},{"start":{"line":196,"column":4},"end":{"line":198,"column":5}}],"line":196},"29":{"loc":{"start":{"line":196,"column":8},"end":{"line":196,"column":56}},"type":"binary-expr","locations":[{"start":{"line":196,"column":8},"end":{"line":196,"column":29}},{"start":{"line":196,"column":33},"end":{"line":196,"column":56}}],"line":196}},"s":{"0":1,"1":1,"2":1,"3":1,"4":51,"5":51,"6":51,"7":51,"8":51,"9":51,"10":51,"11":22,"12":51,"13":1,"14":51,"15":0,"16":51,"17":5,"18":5,"19":51,"20":2,"21":2,"22":2,"23":1,"24":1,"25":1,"26":49,"27":10,"28":39,"29":39,"30":33,"31":20,"32":13,"33":13,"34":1,"35":13,"36":8,"37":8,"38":1,"39":7,"40":5,"41":6,"42":6,"43":1,"44":6,"45":1,"46":1,"47":0,"48":1,"49":5,"50":5,"51":584,"52":15,"53":569,"54":400,"55":400,"56":169,"57":169,"58":1,"59":169,"60":8,"61":8,"62":1,"63":1,"64":161,"65":4,"66":1,"67":1425,"68":1425,"69":32,"70":1393,"71":1393,"72":1240,"73":1232,"74":161,"75":1,"76":416,"77":1},"f":{"0":51,"1":5,"2":2,"3":49,"4":6,"5":1425,"6":416},"b":{"0":[1],"1":[22,29],"2":[1,50],"3":[0,51],"4":[2,0],"5":[1,1],"6":[10,39],"7":[49,48,10],"8":[39,29,4],"9":[33,6],"10":[39,14],"11":[20,13],"12":[33,33],"13":[8,5],"14":[13,12],"15":[1,7],"16":[1,5],"17":[0,1],"18":[15,569],"19":[400,169],"20":[569,569],"21":[8,161],"22":[169,168],"23":[1,7],"24":[32,1393],"25":[1393,969,0],"26":[1240,153],"27":[1393,1377,408],"28":[1232,8],"29":[1240,1232]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"651a16831e5e6c4d31e28a9c86a4c5ea5a975e43","contentHash":"dc285c71c38b7cfbfbd3cffe4137191f1ab818e457e1535aab143981ef4af66d"},"/Users/David/winston-transport/legacy.js":{"path":"/Users/David/winston-transport/legacy.js","statementMap":{"0":{"start":{"line":3,"column":13},"end":{"line":3,"column":28}},"1":{"start":{"line":4,"column":18},"end":{"line":4,"column":40}},"2":{"start":{"line":5,"column":24},"end":{"line":5,"column":37}},"3":{"start":{"line":15,"column":30},"end":{"line":39,"column":1}},"4":{"start":{"line":16,"column":2},"end":{"line":16,"column":38}},"5":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"6":{"start":{"line":18,"column":4},"end":{"line":18,"column":79}},"7":{"start":{"line":21,"column":2},"end":{"line":21,"column":37}},"8":{"start":{"line":22,"column":2},"end":{"line":22,"column":53}},"9":{"start":{"line":23,"column":2},"end":{"line":23,"column":86}},"10":{"start":{"line":26,"column":2},"end":{"line":26,"column":21}},"11":{"start":{"line":32,"column":4},"end":{"line":32,"column":44}},"12":{"start":{"line":35,"column":2},"end":{"line":38,"column":3}},"13":{"start":{"line":36,"column":4},"end":{"line":36,"column":62}},"14":{"start":{"line":37,"column":4},"end":{"line":37,"column":62}},"15":{"start":{"line":44,"column":0},"end":{"line":44,"column":54}},"16":{"start":{"line":54,"column":0},"end":{"line":66,"column":2}},"17":{"start":{"line":55,"column":2},"end":{"line":57,"column":3}},"18":{"start":{"line":56,"column":4},"end":{"line":56,"column":26}},"19":{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},"20":{"start":{"line":62,"column":4},"end":{"line":62,"column":67}},"21":{"start":{"line":65,"column":2},"end":{"line":65,"column":17}},"22":{"start":{"line":76,"column":0},"end":{"line":90,"column":2}},"23":{"start":{"line":77,"column":2},"end":{"line":87,"column":3}},"24":{"start":{"line":77,"column":15},"end":{"line":77,"column":16}},"25":{"start":{"line":78,"column":4},"end":{"line":86,"column":5}},"26":{"start":{"line":79,"column":6},"end":{"line":84,"column":8}},"27":{"start":{"line":85,"column":6},"end":{"line":85,"column":27}},"28":{"start":{"line":89,"column":2},"end":{"line":89,"column":24}},"29":{"start":{"line":97,"column":0},"end":{"line":103,"column":2}},"30":{"start":{"line":99,"column":2},"end":{"line":102,"column":16}},"31":{"start":{"line":110,"column":0},"end":{"line":119,"column":2}},"32":{"start":{"line":111,"column":2},"end":{"line":113,"column":3}},"33":{"start":{"line":112,"column":4},"end":{"line":112,"column":27}},"34":{"start":{"line":115,"column":2},"end":{"line":118,"column":3}},"35":{"start":{"line":116,"column":4},"end":{"line":116,"column":74}},"36":{"start":{"line":117,"column":4},"end":{"line":117,"column":41}}},"fnMap":{"0":{"name":"LegacyTransportStream","decl":{"start":{"line":15,"column":56},"end":{"line":15,"column":77}},"loc":{"start":{"line":15,"column":92},"end":{"line":39,"column":1}},"line":15},"1":{"name":"transportError","decl":{"start":{"line":31,"column":11},"end":{"line":31,"column":25}},"loc":{"start":{"line":31,"column":31},"end":{"line":33,"column":3}},"line":31},"2":{"name":"_write","decl":{"start":{"line":54,"column":50},"end":{"line":54,"column":56}},"loc":{"start":{"line":54,"column":78},"end":{"line":66,"column":1}},"line":54},"3":{"name":"_writev","decl":{"start":{"line":76,"column":51},"end":{"line":76,"column":58}},"loc":{"start":{"line":76,"column":77},"end":{"line":90,"column":1}},"line":76},"4":{"name":"_deprecated","decl":{"start":{"line":97,"column":55},"end":{"line":97,"column":66}},"loc":{"start":{"line":97,"column":69},"end":{"line":103,"column":1}},"line":97},"5":{"name":"close","decl":{"start":{"line":110,"column":49},"end":{"line":110,"column":54}},"loc":{"start":{"line":110,"column":57},"end":{"line":119,"column":1}},"line":110}},"branchMap":{"0":{"loc":{"start":{"line":15,"column":78},"end":{"line":15,"column":90}},"type":"default-arg","locations":[{"start":{"line":15,"column":88},"end":{"line":15,"column":90}}],"line":15},"1":{"loc":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},{"start":{"line":17,"column":2},"end":{"line":19,"column":3}}],"line":17},"2":{"loc":{"start":{"line":17,"column":6},"end":{"line":17,"column":71}},"type":"binary-expr","locations":[{"start":{"line":17,"column":6},"end":{"line":17,"column":24}},{"start":{"line":17,"column":28},"end":{"line":17,"column":71}}],"line":17},"3":{"loc":{"start":{"line":22,"column":15},"end":{"line":22,"column":52}},"type":"binary-expr","locations":[{"start":{"line":22,"column":15},"end":{"line":22,"column":25}},{"start":{"line":22,"column":29},"end":{"line":22,"column":52}}],"line":22},"4":{"loc":{"start":{"line":23,"column":26},"end":{"line":23,"column":85}},"type":"binary-expr","locations":[{"start":{"line":23,"column":26},"end":{"line":23,"column":47}},{"start":{"line":23,"column":51},"end":{"line":23,"column":85}}],"line":23},"5":{"loc":{"start":{"line":35,"column":2},"end":{"line":38,"column":3}},"type":"if","locations":[{"start":{"line":35,"column":2},"end":{"line":38,"column":3}},{"start":{"line":35,"column":2},"end":{"line":38,"column":3}}],"line":35},"6":{"loc":{"start":{"line":55,"column":2},"end":{"line":57,"column":3}},"type":"if","locations":[{"start":{"line":55,"column":2},"end":{"line":57,"column":3}},{"start":{"line":55,"column":2},"end":{"line":57,"column":3}}],"line":55},"7":{"loc":{"start":{"line":55,"column":6},"end":{"line":55,"column":72}},"type":"binary-expr","locations":[{"start":{"line":55,"column":6},"end":{"line":55,"column":17}},{"start":{"line":55,"column":22},"end":{"line":55,"column":45}},{"start":{"line":55,"column":49},"end":{"line":55,"column":71}}],"line":55},"8":{"loc":{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},"type":"if","locations":[{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},{"start":{"line":61,"column":2},"end":{"line":63,"column":3}}],"line":61},"9":{"loc":{"start":{"line":61,"column":6},"end":{"line":61,"column":72}},"type":"binary-expr","locations":[{"start":{"line":61,"column":6},"end":{"line":61,"column":17}},{"start":{"line":61,"column":21},"end":{"line":61,"column":72}}],"line":61},"10":{"loc":{"start":{"line":78,"column":4},"end":{"line":86,"column":5}},"type":"if","locations":[{"start":{"line":78,"column":4},"end":{"line":86,"column":5}},{"start":{"line":78,"column":4},"end":{"line":86,"column":5}}],"line":78},"11":{"loc":{"start":{"line":111,"column":2},"end":{"line":113,"column":3}},"type":"if","locations":[{"start":{"line":111,"column":2},"end":{"line":113,"column":3}},{"start":{"line":111,"column":2},"end":{"line":113,"column":3}}],"line":111},"12":{"loc":{"start":{"line":115,"column":2},"end":{"line":118,"column":3}},"type":"if","locations":[{"start":{"line":115,"column":2},"end":{"line":118,"column":3}},{"start":{"line":115,"column":2},"end":{"line":118,"column":3}}],"line":115}},"s":{"0":1,"1":1,"2":1,"3":1,"4":23,"5":23,"6":2,"7":21,"8":21,"9":21,"10":21,"11":1,"12":21,"13":18,"14":18,"15":1,"16":1,"17":29,"18":10,"19":19,"20":16,"21":19,"22":1,"23":2,"24":2,"25":415,"26":400,"27":400,"28":2,"29":1,"30":1,"31":1,"32":2,"33":2,"34":2,"35":2,"36":2},"f":{"0":23,"1":1,"2":29,"3":2,"4":1,"5":2},"b":{"0":[2],"1":[2,21],"2":[23,21],"3":[21,19],"4":[21,20],"5":[18,3],"6":[10,19],"7":[29,28,10],"8":[16,3],"9":[19,8],"10":[400,15],"11":[2,0],"12":[2,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ce7431f15ef86d6976e87183f7beb8d8b32939e7","contentHash":"32244661b8dd61e30b4a7ccd7f94fd11686d435135c266a933c6cd3b296b958f"}} \ No newline at end of file diff --git a/general/nvim/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json b/general/nvim/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json deleted file mode 100644 index 60a1323..0000000 --- a/general/nvim/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":70672,"argv":["/Users/David/.nvm/versions/node/v14.19.0/bin/node","/Users/David/winston-transport/node_modules/.bin/mocha","test/index.test.js","test/inheritance.test.js","test/legacy.test.js"],"execArgv":[],"cwd":"/Users/David/winston-transport","time":1644088125255,"ppid":70671,"coverageFilename":"/Users/David/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json","externalId":"","uuid":"c3d7ddb9-cc26-466b-a4f6-993ad69e86f6","files":["/Users/David/winston-transport/index.js","/Users/David/winston-transport/legacy.js"]} \ No newline at end of file diff --git a/general/nvim/node_modules/winston-transport/.nyc_output/processinfo/index.json b/general/nvim/node_modules/winston-transport/.nyc_output/processinfo/index.json deleted file mode 100644 index c2cd5cd..0000000 --- a/general/nvim/node_modules/winston-transport/.nyc_output/processinfo/index.json +++ /dev/null @@ -1 +0,0 @@ -{"processes":{"c3d7ddb9-cc26-466b-a4f6-993ad69e86f6":{"parent":null,"children":[]}},"files":{"/Users/David/winston-transport/index.js":["c3d7ddb9-cc26-466b-a4f6-993ad69e86f6"],"/Users/David/winston-transport/legacy.js":["c3d7ddb9-cc26-466b-a4f6-993ad69e86f6"]},"externalIds":{}} \ No newline at end of file diff --git a/general/nvim/node_modules/winston-transport/CHANGELOG.md b/general/nvim/node_modules/winston-transport/CHANGELOG.md deleted file mode 100644 index a6ef4de..0000000 --- a/general/nvim/node_modules/winston-transport/CHANGELOG.md +++ /dev/null @@ -1,126 +0,0 @@ -# CHANGELOG - -### 4.5.0 (2022/02/05) - -- [#81] Memory leak fix: do not wait for `process.nextTick` to clear callbacks -- [#87, #82, #67] Update dependencies, CI config, and linter config - -### 4.4.1 (2021/12/14) - -- [#44] Add handleRejections to types. -- [#60] Exclude unnecessary files from npm package -- [#45] [#58] Update dependencies. - -### 4.4.0 (2018/12/23) - -- [#41] Support handleRejections option. -- [#42] Expose LegacyTransportStream from the base module. -- Update dependencies. - -### 4.3.0 (2018/12/23) - -- [#30] Precompile before publishing to `npm`. -- [#32] Add new option to increase default `highWaterMark` value. - -### 4.2.0 (2018/06/11) - -- [#26] Do not use copy-by-value for `this.level`. -- [#25] Wrap calls to `format.transform` with try / catch. -- [#24] Use `readable-stream` package to get the _final semantics across all versions of Node. - -### 4.1.0 (2018/05/31) - -- [#23] Revert to prototypal-based syntax for backwards compatibility. - -### 4.0.0 (2018/05/24) - -- **BREAKING** Update transports to use ES6 classes. Creation of -`TransportStream` and `LegacyTransportStream` now requires the `new` keyword. - -**No longer works** -``` js -const Transport = require('winston-transport'); -const transport = Transport({ - log: (info, callback) => { /* log something */ } -}); -``` - -**Do this instead** -``` js -const Transport = require('winston-transport'); -const transport = new Transport({ - log: (info, callback) => { /* log something */ } -}); -``` - -### 3.3.0 (2018/05/24) -**Unpublished:** overlooked that 26f816e introduced a breaking change. - -- [#21] Do not log when there is no info object. -- [#20] Add silent options to typings. -- [#19] Refactor test fixtures to use es6-classes. -- [#18] Use triple-beam for info object constants. -- [#17] Add linting and Node v10 to the travis build of the project. - -### 3.2.1 (2018/04/25) - -- [#16] Reorder in TS defs: namespace must come after class in order for delcaration merging to work as expected. - -### 3.2.0 (2018/04/22) - -- [#13] Add silent support to LegacyTransportStream. Fixes [#8]. -- [#14] Ensure that if a Transport-specific format is provided it is invoked on each chunk before passing it to `.log`. Fixes [#12]. -- [#11] Revice `d.ts` -- Add `.travis.yml`. -- Documentation updates: - - [#5] Update deprecated link. - - [#7] Correct `this` reference in `README.md` by using an arrow function. - -### 3.1.0 (2018/04/06) - -- [#10] Add `silent` option to `TransportStream`. Still needs to be implemented - for `LegacyTransportStream`. -- Bump `mocha` to `^5.0.5`. -- Bump `nyc` to `^11.6.0`. - -### 3.0.1 (2017/10/01) - -- [#4] Use ES6-class for defining Transport in `README.md`. -- [#4] Do not overwrite prototypal methods unless they are provided in the options. - -### 3.0.0 (2017/09/29) - -- Use `Symbol.for('level')` to lookup immutable `level` on `info` objects. - -### 2.1.1 (2017/09/29) - -- Properly interact with the `{ format }`, if provided. - -### 2.1.0 (2017/09/27) - -- If a format is defined use it to mutate the info. - -### 2.0.0 (2017/04/11) - -- [#2] Final semantics for `winston-transport` base implementations: - - `TransportStream`: the new `objectMode` Writable stream which should be the base for all future Transports after `winston >= 3`. - - `LegacyTransportStream`: the backwards compatible wrap to Transports written for `winston < 3`. There isn't all that much different for those implementors except that `log(level, message, meta, callback)` is now `log(info, callback)` where `info` is the object being plumbed along the objectMode pipe-chain. This was absolutely critical to not "break the ecosystem" and give [the over 500 Transport package authors](https://www.npmjs.com/search?q=winston) an upgrade path. - - Along with all the code coverage & `WritableStream` goodies: - - 100% code coverage for `TransportStream` - - 100% code coverage for `LegacyTransportStream` - - Implementation of `_writev` for `TransportStream` - - Implementation of `_writev` for `LegacyTransportStream` - -### 1.0.2 (2015/11/30) - -- Pass the write stream callback so that we can communicate backpressure up the chain of streams. - -### 1.0.1 (2015/11/22) - -- First `require`-able version. - -### 1.0.0 (2015/11/22) - -- Initial version. - -[#2]: https://github.com/winstonjs/winston-transport/pull/2 diff --git a/general/nvim/node_modules/winston-transport/LICENSE b/general/nvim/node_modules/winston-transport/LICENSE deleted file mode 100644 index 64e5d87..0000000 --- a/general/nvim/node_modules/winston-transport/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Charlie Robbins & the contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/general/nvim/node_modules/winston-transport/README.md b/general/nvim/node_modules/winston-transport/README.md deleted file mode 100644 index 1b7591e..0000000 --- a/general/nvim/node_modules/winston-transport/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# winston-transport - -The base `TransportStream` implementation for `winston >= 3`. Use these to -write ecosystem Transports for `winston`. - -## Usage - -``` js -const Transport = require('winston-transport'); -const util = require('util'); - -// -// Inherit from `winston-transport` so you can take advantage -// of the base functionality and `.exceptions.handle()`. -// -module.exports = class CustomTransport extends Transport { - constructor(opts) { - super(opts); - - // - // Consume any custom options here. e.g.: - // - Connection information for databases - // - Authentication information for APIs (e.g. loggly, papertrail, - // logentries, etc.). - // - } - - log(info, callback) { - setImmediate(() => { - this.emit('logged', info); - }); - - // Perform the writing to the remote service - - callback(); - } -}; -``` - -## Tests - -Tests are written with `mocha`, `nyc`, `assume`, and -`abstract-winston-transport`. They can be run with `npm`: - -``` bash -npm test -``` - -##### Author: [Charlie Robbins](https://github.com/indexzero) -##### LICENSE: MIT diff --git a/general/nvim/node_modules/winston-transport/dist/index.js b/general/nvim/node_modules/winston-transport/dist/index.js deleted file mode 100644 index fb2ff60..0000000 --- a/general/nvim/node_modules/winston-transport/dist/index.js +++ /dev/null @@ -1,215 +0,0 @@ -'use strict'; - -var util = require('util'); -var Writable = require('readable-stream/lib/_stream_writable.js'); - -var _require = require('triple-beam'), - LEVEL = _require.LEVEL; - -/** - * Constructor function for the TransportStream. This is the base prototype - * that all `winston >= 3` transports should inherit from. - * @param {Object} options - Options for this TransportStream instance - * @param {String} options.level - Highest level according to RFC5424. - * @param {Boolean} options.handleExceptions - If true, info with - * { exception: true } will be written. - * @param {Function} options.log - Custom log function for simple Transport - * creation - * @param {Function} options.close - Called on "unpipe" from parent. - */ - - -var TransportStream = module.exports = function TransportStream() { - var _this = this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - Writable.call(this, { objectMode: true, highWaterMark: options.highWaterMark }); - - this.format = options.format; - this.level = options.level; - this.handleExceptions = options.handleExceptions; - this.handleRejections = options.handleRejections; - this.silent = options.silent; - - if (options.log) this.log = options.log; - if (options.logv) this.logv = options.logv; - if (options.close) this.close = options.close; - - // Get the levels from the source we are piped from. - this.once('pipe', function (logger) { - // Remark (indexzero): this bookkeeping can only support multiple - // Logger parents with the same `levels`. This comes into play in - // the `winston.Container` code in which `container.add` takes - // a fully realized set of options with pre-constructed TransportStreams. - _this.levels = logger.levels; - _this.parent = logger; - }); - - // If and/or when the transport is removed from this instance - this.once('unpipe', function (src) { - // Remark (indexzero): this bookkeeping can only support multiple - // Logger parents with the same `levels`. This comes into play in - // the `winston.Container` code in which `container.add` takes - // a fully realized set of options with pre-constructed TransportStreams. - if (src === _this.parent) { - _this.parent = null; - if (_this.close) { - _this.close(); - } - } - }); -}; - -/* - * Inherit from Writeable using Node.js built-ins - */ -util.inherits(TransportStream, Writable); - -/** - * Writes the info object to our transport instance. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - * @private - */ -TransportStream.prototype._write = function _write(info, enc, callback) { - if (this.silent || info.exception === true && !this.handleExceptions) { - return callback(null); - } - - // Remark: This has to be handled in the base transport now because we - // cannot conditionally write to our pipe targets as stream. We always - // prefer any explicit level set on the Transport itself falling back to - // any level set on the parent. - var level = this.level || this.parent && this.parent.level; - - if (!level || this.levels[level] >= this.levels[info[LEVEL]]) { - if (info && !this.format) { - return this.log(info, callback); - } - - var errState = void 0; - var transformed = void 0; - - // We trap(and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - transformed = this.format.transform(Object.assign({}, info), this.format.options); - } catch (err) { - errState = err; - } - - if (errState || !transformed) { - // eslint-disable-next-line callback-return - callback(); - if (errState) throw errState; - return; - } - - return this.log(transformed, callback); - } - this._writableState.sync = false; - return callback(null); -}; - -/** - * Writes the batch of info objects (i.e. "object chunks") to our transport - * instance after performing any necessary filtering. - * @param {mixed} chunks - TODO: add params description. - * @param {function} callback - TODO: add params description. - * @returns {mixed} - TODO: add returns description. - * @private - */ -TransportStream.prototype._writev = function _writev(chunks, callback) { - if (this.logv) { - var infos = chunks.filter(this._accept, this); - if (!infos.length) { - return callback(null); - } - - // Remark (indexzero): from a performance perspective if Transport - // implementers do choose to implement logv should we make it their - // responsibility to invoke their format? - return this.logv(infos, callback); - } - - for (var i = 0; i < chunks.length; i++) { - if (!this._accept(chunks[i])) continue; - - if (chunks[i].chunk && !this.format) { - this.log(chunks[i].chunk, chunks[i].callback); - continue; - } - - var errState = void 0; - var transformed = void 0; - - // We trap(and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - transformed = this.format.transform(Object.assign({}, chunks[i].chunk), this.format.options); - } catch (err) { - errState = err; - } - - if (errState || !transformed) { - // eslint-disable-next-line callback-return - chunks[i].callback(); - if (errState) { - // eslint-disable-next-line callback-return - callback(null); - throw errState; - } - } else { - this.log(transformed, chunks[i].callback); - } - } - - return callback(null); -}; - -/** - * Predicate function that returns true if the specfied `info` on the - * WriteReq, `write`, should be passed down into the derived - * TransportStream's I/O via `.log(info, callback)`. - * @param {WriteReq} write - winston@3 Node.js WriteReq for the `info` object - * representing the log message. - * @returns {Boolean} - Value indicating if the `write` should be accepted & - * logged. - */ -TransportStream.prototype._accept = function _accept(write) { - var info = write.chunk; - if (this.silent) { - return false; - } - - // We always prefer any explicit level set on the Transport itself - // falling back to any level set on the parent. - var level = this.level || this.parent && this.parent.level; - - // Immediately check the average case: log level filtering. - if (info.exception === true || !level || this.levels[level] >= this.levels[info[LEVEL]]) { - // Ensure the info object is valid based on `{ exception }`: - // 1. { handleExceptions: true }: all `info` objects are valid - // 2. { exception: false }: accepted by all transports. - if (this.handleExceptions || info.exception !== true) { - return true; - } - } - - return false; -}; - -/** - * _nop is short for "No operation" - * @returns {Boolean} Intentionally false. - */ -TransportStream.prototype._nop = function _nop() { - // eslint-disable-next-line no-undefined - return void undefined; -}; - -// Expose legacy stream -module.exports.LegacyTransportStream = require('./legacy'); \ No newline at end of file diff --git a/general/nvim/node_modules/winston-transport/dist/legacy.js b/general/nvim/node_modules/winston-transport/dist/legacy.js deleted file mode 100644 index 347d6e3..0000000 --- a/general/nvim/node_modules/winston-transport/dist/legacy.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -var util = require('util'); - -var _require = require('triple-beam'), - LEVEL = _require.LEVEL; - -var TransportStream = require('./'); - -/** - * Constructor function for the LegacyTransportStream. This is an internal - * wrapper `winston >= 3` uses to wrap older transports implementing - * log(level, message, meta). - * @param {Object} options - Options for this TransportStream instance. - * @param {Transpot} options.transport - winston@2 or older Transport to wrap. - */ - -var LegacyTransportStream = module.exports = function LegacyTransportStream() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - TransportStream.call(this, options); - if (!options.transport || typeof options.transport.log !== 'function') { - throw new Error('Invalid transport, must be an object with a log method.'); - } - - this.transport = options.transport; - this.level = this.level || options.transport.level; - this.handleExceptions = this.handleExceptions || options.transport.handleExceptions; - - // Display our deprecation notice. - this._deprecated(); - - // Properly bubble up errors from the transport to the - // LegacyTransportStream instance, but only once no matter how many times - // this transport is shared. - function transportError(err) { - this.emit('error', err, this.transport); - } - - if (!this.transport.__winstonError) { - this.transport.__winstonError = transportError.bind(this); - this.transport.on('error', this.transport.__winstonError); - } -}; - -/* - * Inherit from TransportStream using Node.js built-ins - */ -util.inherits(LegacyTransportStream, TransportStream); - -/** - * Writes the info object to our transport instance. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - * @private - */ -LegacyTransportStream.prototype._write = function _write(info, enc, callback) { - if (this.silent || info.exception === true && !this.handleExceptions) { - return callback(null); - } - - // Remark: This has to be handled in the base transport now because we - // cannot conditionally write to our pipe targets as stream. - if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) { - this.transport.log(info[LEVEL], info.message, info, this._nop); - } - - callback(null); -}; - -/** - * Writes the batch of info objects (i.e. "object chunks") to our transport - * instance after performing any necessary filtering. - * @param {mixed} chunks - TODO: add params description. - * @param {function} callback - TODO: add params description. - * @returns {mixed} - TODO: add returns description. - * @private - */ -LegacyTransportStream.prototype._writev = function _writev(chunks, callback) { - for (var i = 0; i < chunks.length; i++) { - if (this._accept(chunks[i])) { - this.transport.log(chunks[i].chunk[LEVEL], chunks[i].chunk.message, chunks[i].chunk, this._nop); - chunks[i].callback(); - } - } - - return callback(null); -}; - -/** - * Displays a deprecation notice. Defined as a function so it can be - * overriden in tests. - * @returns {undefined} - */ -LegacyTransportStream.prototype._deprecated = function _deprecated() { - // eslint-disable-next-line no-console - console.error([this.transport.name + ' is a legacy winston transport. Consider upgrading: ', '- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md'].join('\n')); -}; - -/** - * Clean up error handling state on the legacy transport associated - * with this instance. - * @returns {undefined} - */ -LegacyTransportStream.prototype.close = function close() { - if (this.transport.close) { - this.transport.close(); - } - - if (this.transport.__winstonError) { - this.transport.removeListener('error', this.transport.__winstonError); - this.transport.__winstonError = null; - } -}; \ No newline at end of file diff --git a/general/nvim/node_modules/winston-transport/index.d.ts b/general/nvim/node_modules/winston-transport/index.d.ts deleted file mode 100644 index 2d84468..0000000 --- a/general/nvim/node_modules/winston-transport/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Type definitions for winston-transport 3.0 -// Project: https://github.com/winstonjs/winston-transport -// Definitions by: DABH -// Definitions: https://github.com/winstonjs/winston-transport - -/// - -import * as stream from 'stream'; -import * as logform from 'logform'; - -declare class TransportStream extends stream.Writable { - public format?: logform.Format; - public level?: string; - public silent?: boolean; - public handleExceptions?: boolean; - public handleRejections?: boolean; - - constructor(opts?: TransportStream.TransportStreamOptions); - - public log?(info: any, next: () => void): any; - public logv?(info: any, next: () => void): any; - public close?(): void; -} - -declare namespace TransportStream { - interface TransportStreamOptions { - format?: logform.Format; - level?: string; - silent?: boolean; - handleExceptions?: boolean; - handleRejections?: boolean; - - log?(info: any, next: () => void): any; - logv?(info: any, next: () => void): any; - close?(): void; - } -} - -export = TransportStream; diff --git a/general/nvim/node_modules/winston-transport/index.js b/general/nvim/node_modules/winston-transport/index.js deleted file mode 100644 index 59e8421..0000000 --- a/general/nvim/node_modules/winston-transport/index.js +++ /dev/null @@ -1,215 +0,0 @@ -'use strict'; - -const util = require('util'); -const Writable = require('readable-stream/lib/_stream_writable.js'); -const { LEVEL } = require('triple-beam'); - -/** - * Constructor function for the TransportStream. This is the base prototype - * that all `winston >= 3` transports should inherit from. - * @param {Object} options - Options for this TransportStream instance - * @param {String} options.level - Highest level according to RFC5424. - * @param {Boolean} options.handleExceptions - If true, info with - * { exception: true } will be written. - * @param {Function} options.log - Custom log function for simple Transport - * creation - * @param {Function} options.close - Called on "unpipe" from parent. - */ -const TransportStream = module.exports = function TransportStream(options = {}) { - Writable.call(this, { objectMode: true, highWaterMark: options.highWaterMark }); - - this.format = options.format; - this.level = options.level; - this.handleExceptions = options.handleExceptions; - this.handleRejections = options.handleRejections; - this.silent = options.silent; - - if (options.log) this.log = options.log; - if (options.logv) this.logv = options.logv; - if (options.close) this.close = options.close; - - // Get the levels from the source we are piped from. - this.once('pipe', logger => { - // Remark (indexzero): this bookkeeping can only support multiple - // Logger parents with the same `levels`. This comes into play in - // the `winston.Container` code in which `container.add` takes - // a fully realized set of options with pre-constructed TransportStreams. - this.levels = logger.levels; - this.parent = logger; - }); - - // If and/or when the transport is removed from this instance - this.once('unpipe', src => { - // Remark (indexzero): this bookkeeping can only support multiple - // Logger parents with the same `levels`. This comes into play in - // the `winston.Container` code in which `container.add` takes - // a fully realized set of options with pre-constructed TransportStreams. - if (src === this.parent) { - this.parent = null; - if (this.close) { - this.close(); - } - } - }); -}; - -/* - * Inherit from Writeable using Node.js built-ins - */ -util.inherits(TransportStream, Writable); - -/** - * Writes the info object to our transport instance. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - * @private - */ -TransportStream.prototype._write = function _write(info, enc, callback) { - if (this.silent || (info.exception === true && !this.handleExceptions)) { - return callback(null); - } - - // Remark: This has to be handled in the base transport now because we - // cannot conditionally write to our pipe targets as stream. We always - // prefer any explicit level set on the Transport itself falling back to - // any level set on the parent. - const level = this.level || (this.parent && this.parent.level); - - if (!level || this.levels[level] >= this.levels[info[LEVEL]]) { - if (info && !this.format) { - return this.log(info, callback); - } - - let errState; - let transformed; - - // We trap(and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - transformed = this.format.transform(Object.assign({}, info), this.format.options); - } catch (err) { - errState = err; - } - - if (errState || !transformed) { - // eslint-disable-next-line callback-return - callback(); - if (errState) throw errState; - return; - } - - return this.log(transformed, callback); - } - this._writableState.sync = false; - return callback(null); -}; - -/** - * Writes the batch of info objects (i.e. "object chunks") to our transport - * instance after performing any necessary filtering. - * @param {mixed} chunks - TODO: add params description. - * @param {function} callback - TODO: add params description. - * @returns {mixed} - TODO: add returns description. - * @private - */ -TransportStream.prototype._writev = function _writev(chunks, callback) { - if (this.logv) { - const infos = chunks.filter(this._accept, this); - if (!infos.length) { - return callback(null); - } - - // Remark (indexzero): from a performance perspective if Transport - // implementers do choose to implement logv should we make it their - // responsibility to invoke their format? - return this.logv(infos, callback); - } - - for (let i = 0; i < chunks.length; i++) { - if (!this._accept(chunks[i])) continue; - - if (chunks[i].chunk && !this.format) { - this.log(chunks[i].chunk, chunks[i].callback); - continue; - } - - let errState; - let transformed; - - // We trap(and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - transformed = this.format.transform( - Object.assign({}, chunks[i].chunk), - this.format.options - ); - } catch (err) { - errState = err; - } - - if (errState || !transformed) { - // eslint-disable-next-line callback-return - chunks[i].callback(); - if (errState) { - // eslint-disable-next-line callback-return - callback(null); - throw errState; - } - } else { - this.log(transformed, chunks[i].callback); - } - } - - return callback(null); -}; - -/** - * Predicate function that returns true if the specfied `info` on the - * WriteReq, `write`, should be passed down into the derived - * TransportStream's I/O via `.log(info, callback)`. - * @param {WriteReq} write - winston@3 Node.js WriteReq for the `info` object - * representing the log message. - * @returns {Boolean} - Value indicating if the `write` should be accepted & - * logged. - */ -TransportStream.prototype._accept = function _accept(write) { - const info = write.chunk; - if (this.silent) { - return false; - } - - // We always prefer any explicit level set on the Transport itself - // falling back to any level set on the parent. - const level = this.level || (this.parent && this.parent.level); - - // Immediately check the average case: log level filtering. - if ( - info.exception === true || - !level || - this.levels[level] >= this.levels[info[LEVEL]] - ) { - // Ensure the info object is valid based on `{ exception }`: - // 1. { handleExceptions: true }: all `info` objects are valid - // 2. { exception: false }: accepted by all transports. - if (this.handleExceptions || info.exception !== true) { - return true; - } - } - - return false; -}; - -/** - * _nop is short for "No operation" - * @returns {Boolean} Intentionally false. - */ -TransportStream.prototype._nop = function _nop() { - // eslint-disable-next-line no-undefined - return void undefined; -}; - - -// Expose legacy stream -module.exports.LegacyTransportStream = require('./legacy'); diff --git a/general/nvim/node_modules/winston-transport/legacy.js b/general/nvim/node_modules/winston-transport/legacy.js deleted file mode 100644 index 8025bc9..0000000 --- a/general/nvim/node_modules/winston-transport/legacy.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -const util = require('util'); -const { LEVEL } = require('triple-beam'); -const TransportStream = require('./'); - -/** - * Constructor function for the LegacyTransportStream. This is an internal - * wrapper `winston >= 3` uses to wrap older transports implementing - * log(level, message, meta). - * @param {Object} options - Options for this TransportStream instance. - * @param {Transpot} options.transport - winston@2 or older Transport to wrap. - */ - -const LegacyTransportStream = module.exports = function LegacyTransportStream(options = {}) { - TransportStream.call(this, options); - if (!options.transport || typeof options.transport.log !== 'function') { - throw new Error('Invalid transport, must be an object with a log method.'); - } - - this.transport = options.transport; - this.level = this.level || options.transport.level; - this.handleExceptions = this.handleExceptions || options.transport.handleExceptions; - - // Display our deprecation notice. - this._deprecated(); - - // Properly bubble up errors from the transport to the - // LegacyTransportStream instance, but only once no matter how many times - // this transport is shared. - function transportError(err) { - this.emit('error', err, this.transport); - } - - if (!this.transport.__winstonError) { - this.transport.__winstonError = transportError.bind(this); - this.transport.on('error', this.transport.__winstonError); - } -}; - -/* - * Inherit from TransportStream using Node.js built-ins - */ -util.inherits(LegacyTransportStream, TransportStream); - -/** - * Writes the info object to our transport instance. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - * @private - */ -LegacyTransportStream.prototype._write = function _write(info, enc, callback) { - if (this.silent || (info.exception === true && !this.handleExceptions)) { - return callback(null); - } - - // Remark: This has to be handled in the base transport now because we - // cannot conditionally write to our pipe targets as stream. - if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) { - this.transport.log(info[LEVEL], info.message, info, this._nop); - } - - callback(null); -}; - -/** - * Writes the batch of info objects (i.e. "object chunks") to our transport - * instance after performing any necessary filtering. - * @param {mixed} chunks - TODO: add params description. - * @param {function} callback - TODO: add params description. - * @returns {mixed} - TODO: add returns description. - * @private - */ -LegacyTransportStream.prototype._writev = function _writev(chunks, callback) { - for (let i = 0; i < chunks.length; i++) { - if (this._accept(chunks[i])) { - this.transport.log( - chunks[i].chunk[LEVEL], - chunks[i].chunk.message, - chunks[i].chunk, - this._nop - ); - chunks[i].callback(); - } - } - - return callback(null); -}; - -/** - * Displays a deprecation notice. Defined as a function so it can be - * overriden in tests. - * @returns {undefined} - */ -LegacyTransportStream.prototype._deprecated = function _deprecated() { - // eslint-disable-next-line no-console - console.error([ - `${this.transport.name} is a legacy winston transport. Consider upgrading: `, - '- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md' - ].join('\n')); -}; - -/** - * Clean up error handling state on the legacy transport associated - * with this instance. - * @returns {undefined} - */ -LegacyTransportStream.prototype.close = function close() { - if (this.transport.close) { - this.transport.close(); - } - - if (this.transport.__winstonError) { - this.transport.removeListener('error', this.transport.__winstonError); - this.transport.__winstonError = null; - } -}; diff --git a/general/nvim/node_modules/winston-transport/package.json b/general/nvim/node_modules/winston-transport/package.json deleted file mode 100644 index 96e5766..0000000 --- a/general/nvim/node_modules/winston-transport/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "winston-transport", - "description": "Base stream implementations for winston@3 and up.", - "version": "4.5.0", - "main": "index.js", - "browser": "dist/index.js", - "scripts": { - "lint": "eslint test/*.js index.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist", - "pretest": "npm run lint && npm run build", - "test": "nyc mocha test/*.test.js", - "report": "nyc report --reporter=lcov", - "build": "rimraf dist && babel *.js -d ./dist", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git@github.com:winstonjs/winston-transport.git" - }, - "keywords": [ - "winston", - "transport", - "winston3" - ], - "author": "Charlie Robbins ", - "license": "MIT", - "bugs": { - "url": "https://github.com/winstonjs/winston-transport/issues" - }, - "homepage": "https://github.com/winstonjs/winston-transport#readme", - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "devDependencies": { - "@types/node": "^17.0.15", - "abstract-winston-transport": ">=0.5.1", - "assume": "^2.3.0", - "babel-cli": "^6.26.0", - "babel-preset-env": "^1.7.0", - "deep-equal": "^2.0.5", - "eslint": "^8.8.0", - "@dabh/eslint-config-populist": "^5.0.0", - "mocha": "^9.2.0", - "nyc": "^15.1.0", - "rimraf": "^3.0.2", - "winston-compat": "^0.1.5" - }, - "engines": { - "node": ">= 6.4.0" - } -} diff --git a/general/nvim/node_modules/winston/CHANGELOG.md b/general/nvim/node_modules/winston/CHANGELOG.md deleted file mode 100644 index 828e0c7..0000000 --- a/general/nvim/node_modules/winston/CHANGELOG.md +++ /dev/null @@ -1,560 +0,0 @@ -# CHANGELOG - -## v3.3.3 / 2020-06-23 - -- [#1820] Revert [#1807] to resolve breaking changes for Typescript users. - -## v3.3.2 / 2020-06-22 - -- [#1814] Use a fork of `diagnostics` published to NPM to avoid git dependency. - -## v3.3.1 / 2020-06-21 - -- [#1803], [#1807] Fix TypeScript bugs. -- [#1740] Add space between `info.message` and `meta.message`. -- [#1813] Avoid indirect storage-engine dependency. -- [#1810] README updates. - -## v3.3.0 / 2020-06-21 - -- [#1779] Fix property name in rejection handler. -- [#1768] Exclude extraneous files from NPM package. -- [#1364], [#1714] Don't remove transport from logger when transport error - occurs. -- [#1603] Expose `child` property on default logger. -- [#1777] Allow HTTP transport to pass options to request. -- [#1662] Add bearer auth capabilities to HTTP transport. -- [#1612] Remove no-op in file transport. -- [#1622], [#1623], [#1625] Typescript fixes. -- (Minor) [#1647], [#1793] Update CI settings. -- (Minor) [#1600], [#1605], [#1593], [#1610], [#1654], [#1656], [#1661], - [#1651], [#1652], [#1677], [#1683], [#1684], [#1700], [#1697], [#1650], - [#1705], [#1723], [#1737], [#1733], [#1743], [#1750], [#1754], [#1780], - [#1778] README, Transports.md, other docs changes. -- [#1672], [#1686], [#1772] Update dependencies. - -## v3.2.1 / 2019-01-29 -### UNBOUND PROTOTYPE AD INFINITUM EDITION - -- #[1579], (@indexzero) Fallback to the "root" instance **always** created by - `createLogger` for level convenience methods (e.g. `.info()`, `.silly()`). - (Fixes [#1577]). -- [#1539], (@indexzero) Assume message is the empty string when level-helper - methods are invoked with no arguments (Fixed [#1501]). -- [#1583], (@kibertoad) Add typings for defaultMeta (Fixes [#1582]) -- [#1586], (@kibertoad) Update dependencies. - -## v3.2.0 / 2019-01-26 -### SORRY IT TOO SO LONG EDITION - -> **NOTE:** this was our first release using Github Projects. See the -> [3.2.0 Release Project](https://github.com/orgs/winstonjs/projects/3). - -### New Features! - -- [#1471], (@kibertoad) Implement child loggers. -- [#1462], (@drazisil) Add handleRejection support. - - [#1555], (@DABH) Add fixes from [#1355] to unhandled rejection handler. -- [#1418], (@mfrisbey) Precompile ES6 syntax before publishing to npm. - - [#1533], (@kibertoad) Update to Babel 7. -- [#1562], (@indexzero) [fix] Better handling of `new Error(string)` - throughout the pipeline(s). (Fixes [#1338], [#1486]). - -### Bug Fixes - -- [#1355], (@DABH) Fix issues with ExceptionHandler (Fixes [#1289]). -- [#1463], (@SerayaEryn) Bubble transport `warn` events up to logger in - addition to `error`s. -- [#1480], [#1503], (@SerayaEryn) File tailrolling fix. -- [#1483], (@soldair) Assign log levels to un-bound functions. -- [#1513], (@TilaTheHun0) Set maxListeners for Console transport. -- [#1521], (@jamesbechet) Fix Transform from `readable-stream` using CRA. -- [#1434], (@Kouzukii) Fixes logger.query function (regression from `3.0.0`) -- [#1526], (@pixtron) Log file without .gz for tailable (Fixes [#1525]). -- [#1559], (@eubnara) Fix typo related to `exitOnError`. -- [#1556], (@adoyle-h) Support to create log directory if it doesn't exist - for FileTransport. - -#### New `splat` behavior - -- [#1552], (@indexzero) Consistent handling of meta with (and without) - interpolation in `winston` and `logform`. -- [#1499], (@DABH) Provide all of `SPLAT` to formats (Fixes [#1485]). -- [#1485], (@mpabst) Fixing off-by-one when using both meta and splat. - -Previously `splat` would have added a `meta` property for any additional -`info[SPLAT]` beyond the expected number of tokens. - -**As of `logform@2.0.0`,** `format.splat` assumes additional splat paramters -(aka "metas") are objects and merges enumerable properties into the `info`. -e.g. **BE ADVISED** previous "metas" that _were not objects_ will very likely -lead to odd behavior. e.g. - -``` js -const { createLogger, format, transports } = require('winston'); -const { splat } = format; -const { MESSAGE, LEVEL, SPLAT } = require('triple-beam'); - -const logger = createLogger({ - format: format.combine( - format.splat(), - format.json() - ), - transports: [new transports.Console()] -}); - -// Expects two tokens, but four splat parameters provided. -logger.info( - 'Let us %s for %j', // message - 'objects', // used for %s - { label: 'sure' }, // used for %j - 'lol', ['ok', 'why'] // Multiple additional meta values -); - -// winston < 3.2.0 && logform@1.x behavior: -// Added "meta" property. -// -// { level: 'info', -// message: 'Let us objects for {"label":"sure"}', -// meta: ['lol', ['ok', 'why']], -// [Symbol(level)]: 'info', -// [Symbol(message)]: 'Let us %s for %j', -// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] } - -// winston >= 3.2.0 && logform@2.x behavior: Enumerable properties -// assigned into `info`. Since **strings and Arrays only have NUMERIC -// enumerable properties we get this behavior!** -// -// { '0': 'ok', -// '1': 'why', -// '2': 'l', -// level: 'info', -// message: 'Let us objects for {"label":"sure"}', -// [Symbol(level)]: 'info', -// [Symbol(message)]: 'Let us %s for %j', -// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] } -``` - -## Maintenance & Documentation - -- Documentation Updates - - [#1410], (@hakanostrom) Add docs reference to transport for Cloudant. - - [#1467], (@SeryaEryn) Add fast-file-rotate transport to transport.md. - - [#1488], (@adamcohen) Fix multi logger documentation. - - [#1531], (@mapleeit) Add links to transports. - - [#1548], (@ejmartin504) Fix `README.md` for awaiting logs. - - [#1554], (@indexzero) Document the solution to [#1486] as by design. - - Other small improvements: [#1509]. -- Improved TypeScript support - - [#1470], (@jd-carroll) Export all transport options (Fixes [#1469]). - - [#1474], (@jd-carroll) Correct import to avoid conflict (Fixed [#1472]). - - [#1546], (@alewiahmed) Add consoleWarnLevels field to the - `ConsoleTransportOptions` interface type definition. - - [#1557], (@negezor) Add missing `child()` method. -- Dependency management - - [#1560], (@kibertoad) Update dependencies. - - [#1512], (@SerayaEryn) Add node@11 and disallow failures on node@10. - - [#1516], (@SerayaEryn) Update `readable-stream` to `v3.0.6`. - - [#1534], (@kibertoad) Update `@types/node`, `nyc`, and `through2`. - -## v3.1.0 / 2018-08-22 -### RELEASES ON A PLANE EDITION - -- Minor TypeScript fixes [#1362], [#1395], [#1440] -- Fix minor typos [#1359], [#1363], [#1372], [#1378], [#1390] -- [#1373], (@revik): Add `consoleWarnLevels` property to console transport options for `console.warn` browser support. -- [#1394], (@bzoz): Fix tests on Windows. -- [#1447], (@dboshardy): Support transport name option to override default names for built-in transports. -- [#1420], (@ledbit): Fix file rotation with `tailing: true` (Fixes [#1450], [#1194]). -- [#1352], (@lutovich): Add `isLevelEnabled(string)` & `isXXXEnabled()` to `Logger` class. -- Dependency management - - Regenerate `package-lock.json`. - - Upgrade to `colors@^1.3.2` (Fixes [#1439]). - - Upgrade to `logform@^1.9.1`. - - Upgrade to `diagnostics@^1.1.1`. - - Upgrade to `@types/node@^10.9.3`. - - Upgrade to `assume@^2.1.0`. - - Upgrade to `hock@^1.3.3`. - - Upgrade to `mocha@^5.2.0`. - - Upgrade to `nyc@^13.0.1`. - - Upgrade to `split2@^3.0.0`. - -## v3.0.0 / 2018-06-12 -### GET IN THE CHOPPA EDITION - -- [#1332], (@DABH): logger.debug is sent to stderr (Fixed [#1024]) -- [#1328], (@ChrisAlderson): Logger level doesn't update transports level (Fixes [#1191]). -- [#1356], (@indexzero) Move splat functionality into logform. (Fixes [#1298]). -- [#1340], (@indexzero): Check log.length when evaluating "legacyness" of transports (Fixes [#1280]). -- [#1346], (@indexzero): Implement `_final` from Node.js streams. (Related to winston-transport#24, Fixes [#1250]). -- [#1347], (@indexzero): Wrap calls to `format.transform` with try / catch (Fixes [#1261]). -- [#1357], (@indexzero): Remove paddings as we have no use for it in the current API. -- [TODO]: REMAINS OPEN, NO PR (Fixes [#1289]) -- Documentation - - [#1301], (@westonpace) Cleaned up some of the documentation on `colorize` - to address concerns in [#1095]. - - First pass at a heavy refactor of `docs/transports.md`. -- Dependency management - - Regenerate `package-lock.json`. - - Upgrade to `logform@^1.9.0`. - -## v3.0.0-rc6 / 2018-05-30 -### T-MINUS 6-DAY TO WINSTON@3 EDITION - -- **Document that we are pushing for a June 5th, 2018 release of `winston@3.0.0`** -- [#1287], (@DABH) Added types for Typescript. - - [#1335] Typescript: silent is boolean. - - [#1323] Add level method to default logger. -- [#1286], (@ChrisAlderson) Migrate codebase to ES6 - - [#1324], (@ChrisAlderson) Fix regression introduced by ES6 migration for - exception handling. - - [#1333], (@ChrisAlderson) Fix removing all loggers from a container. -- [#1291], [#1294], [#1318], (@indexzero, @ChrisAlderson, @mempf) Improvements - to `File` transport core functionality. Fixes [#1194]. -- [#1311], (@ChrisAlderson) Add `eol` option to `Stream` transport. -- [#1297], (@ChrisAlderson) Move `winston.config` to `triple-beam`. Expose - for backwards compatibility. -- [#1320], (@ChrisAlderson) Enhance tests to run on Windows. -- Internal project maintenance - - Bump to `winston-transport@4.0.0` which may cause incompatibilities if - your custom transport does not explicitly require `winston-transport` - itself. - - [#1292], (@ChrisAlderson) Add node v10 to TravisCI build matrix. - - [#1296], (@indexzero) Improve `UPGRADE-3.0.md`. Add Github Issue Template. - - Remove "npm run report" in favor of reports being automatically generate. - - Update `logform`, `triple-beam`, and `winston-transport` to latest. - -> Special thanks to our newest `winston` core team member – @ChrisAlderson for -> helping make `winston@3.0.0` a reality next week! - -## v3.0.0-rc5 / 2018-04-20 -### UNOFFICIAL NATIONAL HOLIDAY EDITION - -- [#1281] Use `Buffer.alloc` and `Buffer.from` instead of `new Buffer`. -- Better browser support - - [#1142] Move common tailFile to a separate file - - [#1279] Use feature detection to be safer for browser usage. -- MOAR Docs! - - **Document that we are pushing for a May 29th, 2018 release of `winston@3.0.0`** - - **Add David Hyde as official contributor.** - - [#1278] Final Draft of Upgrade Guide in `UPGRADE-3.0.md` - - Merge Roadmap from `3.0.0.md` into `CONTRIBUTING.md` and other - improvements to `CONTRIBUTING.md` -- Improve & expand examples - - [#1175] Add more copy about printf formats based on issue feedback. - - [#1134] Add sampleto document timestamps more clearly as an example. - - [#1273] Add example using multiple formats. - - [#1250] Add an example illustrating the "finish" event for AWS Lambda scenarios. - - Use simple format to better show that `humanReadableUnhandledException` is now the default message format. - - Add example to illustrate that example code from winston-transport - `README.md` is correct. -- Update `devDependencies` - - Bump `assume` to `^2.0.1`. - - Bump `winston-compat` to `^0.1.1`. - -## v3.0.0-rc4 / 2018-04-06 -### IF A TREE FALLS IN THE FORREST DOES IT MAKE A LOG EDITION - -- (@indexzero, @dabh) Add support for `{ silent }` option to -``` js -require('winston').Logger; -require('winston-transport').TransportStream; -``` -- Better browser support - - [#1145], (@Jasu) Replace `isstream` with `is-stream` to make stream detection work in browser. - - [#1146], (@Jasu) Rename query to different than function name, to support Babel 6.26. -- Better Typescript support in all supporting libraries - - `logform@1.4.1` -- Update documentation - - (@indexzero) Correct link to upgrade guide. Fixes #1255. - - [#1258], (@morenoh149) Document how to colorize levels. Fixes #1135. - - [#1246], (@KlemenPlazar) Update colors argument when adding custom colors - - Update `CONTRIBUTING.md` - - [#1239], (@dabh) Add changelog entries for `v3.0.0-rc3` - - Add example showing that `{ level }` can be deleted from info objects because `Symbol.for('level')` is what `winston` uses internally. Fixes #1184. - -## v3.0.0-rc3 / 2018-03-16 -### I GOT NOTHING EDITION - -- [#1195], (@Nilegfx) Fix type error when creating `new stream.Stream()` -- [#1109], (@vsetka) Fix file transprot bug where `self.filename` was not being updated on `ENOENT` -- [#1153], (@wizardnet972) Make prototype methods return like the original method -- [#1234], (@guiguan, @indexzero) Add tests for properly handling logging of `undefined`, `null` and `Error` values -- [#1235], (@indexzero) Add example demonstrating how `meta` objects BECOME the `info` object -- Minor fixes to docs & examples: [#1232], [#1185] - -## v3.0.0-rc2 / 2018-03-09 -### MAINTENANCE RESUMES EDITION - -- [#1209], (@dabh) Use new version of colors, solving a number of issues. -- [#1197], (@indexzero) Roadmap & guidelines for contributors. -- [#1100] Require the package.json by its full name. -- [#1149] Updates `async` to latest (`2.6.0`) -- [#1228], (@mcollina) Always pass a function to `fs.close`. -- Minor fixes to docs & examples: [#1177], [#1182], [#1208], [#1198], [#1165], [#1110], [#1117], [#1097], [#1155], [#1084], [#1141], [#1210], [#1223]. - -## v3.0.0-rc1 / 2017-10-19 -### OMG THEY FORGOT TO NAME IT EDITION - - - Fix file transport improper binding of `_onDrain` and `_onError` [#1104](https://github.com/winstonjs/winston/pull/1104) - -## v3.0.0-rc0 / 2017-10-02 -### IT'S-DONE.GIF EDITION - -**See [UPGRADE-3.0.md](UPGRADE-3.0.md) for a complete & living upgrade guide.** - -**See [3.0.0.md](3.0.0.md) for a list of remaining RC tasks.** - -- **Rewrite of core logging internals:** `Logger` & `Transport` are now implemented using Node.js `objectMode` streams. -- **Your transports _should_ not break:** Special attention has been given to ensure backwards compatibility with existing transports. You will likely see this: -``` -YourTransport is a legacy winston transport. Consider upgrading to winston@3: -- Upgrade docs: https://github.com/winstonjs/winston/tree/master/UPGRADE.md -``` -- **`filters`, `rewriters`, and `common.log` are now _formats_:** `winston.format` offers a simple mechanism for user-land formatting & style features. The organic & frankly messy growth of `common.log` is of the past; these feature requests can be implemented entirely outside of `winston` itself. -``` js -const { createLogger, format, transports } = require('winston'); -const { combine, timestamp, label, printf } = format; - -const myFormat = printf(info => { - return `${info.timestamp} [${info.label}] ${info.level}: ${info.message}`; -}); - -const logger = createLogger({ - combine( - label({ label: 'right meow!' }), - timestamp(), - myFormat - ), - transports: [new transports.Console()] -}); -``` -- **Increased modularity:** several subsystems are now stand-alone packages: - - [logform] exposed as `winston.format` - - [winston-transport] exposed as `winston.Transport` - - [abstract-winston-transport] used for reusable unit test suites for transport authors. -- **`2.x` branch will get little to no maintenance:** no feature requests will be accepted – only a limited number of open PRs will be merged. Hoping the [significant performance benefits][perf-bench] incentivizes folks to upgrade quickly. Don't agree? Say something! -- **No guaranteed support for `node@4` or below:** all code will be migrated to ES6 over time. This release was started when ES5 was still a hard requirement due to the current LTS needs. - -## v2.4.0 / 2017-10-01 -### ZOMFG WINSTON@3.0.0-RC0 EDITION - -- [#1036] Container.add() 'filters' and 'rewriters' option passing to logger. -- [#1066] Fixed working of "humanReadableUnhandledException" parameter when additional data is added in meta. -- [#1040] Added filtering by log level -- [#1042] Fix regressions brought by `2.3.1`. - - Fix regression on array printing. - - Fix regression on falsy value. -- [#977] Always decycle objects before cloning. - - Fixes [#862] - - Fixes [#474] - - Fixes [#914] -- [57af38a] Missing context in `.lazyDrain` of `File` transport. -- [178935f] Suppress excessive Node warning from `fs.unlink`. -- [fcf04e1] Add `label` option to `File` transport docs. -- [7e736b4], [24300e2] Added more info about undocumented `winston.startTimer()` method. -- [#1076], [#1082], [#1029], [#989], [e1e7188] Minor grammatical & style updates to `README.md`. - -## v2.3.1 / 2017-01-20 -### WELCOME TO THE APOCALYPSE EDITION - -- [#868](https://github.com/winstonjs/winston/pull/868), Fix 'Maximum call stack size exceeded' error with custom formatter. - -## v2.3.0 / 2016-11-02 -### ZOMG WHY WOULD YOU ASK EDITION - -- Full `CHANGELOG.md` entry forthcoming. See [the `git` diff for `2.3.0`](https://github.com/winstonjs/winston/compare/2.2.0...2.3.0) for now. - -## v2.2.0 / 2016-02-25 -### LEAVING CALIFORNIA EDITION - -- Full `CHANGELOG.md` entry forthcoming. See [the `git` diff for `2.2.0`](https://github.com/winstonjs/winston/compare/2.1.1...2.2.0) for now. - -## v2.1.1 / 2015-11-18 -### COLOR ME IMPRESSED EDITION - -- [#751](https://github.com/winstonjs/winston/pull/751), Fix colors not appearing in non-tty environments. Fixes [#609](https://github.com/winstonjs/winston/issues/609), [#616](https://github.com/winstonjs/winston/issues/616), [#669](https://github.com/winstonjs/winston/issues/669), [#648](https://github.com/winstonjs/winston/issues/648) (`fiznool`). -- [#752](https://github.com/winstonjs/winston/pull/752) Correct syslog RFC number. 5424 instead of 524. (`jbenoit2011`) - -## v2.1.0 / 2015-11-03 -### TEST ALL THE ECOSYSTEM EDITION - -- [#742](https://github.com/winstonjs/winston/pull/742), [32d52b7](https://github.com/winstonjs/winston/commit/32d52b7) Distribute common test files used by transports in the `winston` ecosystem. - -## v2.0.1 / 2015-11-02 -### BUGS ALWAYS HAPPEN OK EDITION - -- [#739](https://github.com/winstonjs/winston/issues/739), [1f16861](https://github.com/winstonjs/winston/commit/1f16861) Ensure that `logger.log("info", undefined)` does not throw. - -## v2.0.0 / 2015-10-29 -### OMG IT'S MY SISTER'S BIRTHDAY EDITION - -#### Breaking changes - -**Most important** -- **[0f82204](https://github.com/winstonjs/winston/commit/0f82204) Move `winston.transports.DailyRotateFile` [into a separate module](https://github.com/winstonjs/winston-daily-rotate-file)**: `require('winston-daily-rotate-file');` -- **[fb9eec0](https://github.com/winstonjs/winston/commit/fb9eec0) Reverse log levels in `npm` and `cli` configs to conform to [RFC524](https://tools.ietf.org/html/rfc5424). Fixes [#424](https://github.com/winstonjs/winston/pull/424) [#406](https://github.com/winstonjs/winston/pull/406) [#290](https://github.com/winstonjs/winston/pull/290)** -- **[8cd8368](https://github.com/winstonjs/winston/commit/8cd8368) Change the method signature to a `filter` function to be consistent with `rewriter` and log functions:** -``` js -function filter (level, msg, meta, inst) { - // Filter logic goes here... -} -``` - -**Other breaking changes** -- [e0c9dde](https://github.com/winstonjs/winston/commit/e0c9dde) Remove `winston.transports.Webhook`. Use `winston.transports.Http` instead. -- [f71e638](https://github.com/winstonjs/winston/commit/f71e638) Remove `Logger.prototype.addRewriter` and `Logger.prototype.addFilter` since they just push to an Array of functions. Use `logger.filters.push` or `logger.rewriters.push` explicitly instead. -- [a470ab5](https://github.com/winstonjs/winston/commit/a470ab5) No longer respect the `handleExceptions` option to `new winston.Logger`. Instead just pass in the `exceptionHandlers` option itself. -- [8cb7048](https://github.com/winstonjs/winston/commit/8cb7048) Removed `Logger.prototype.extend` functionality - -#### New features -- [3aa990c](https://github.com/winstonjs/winston/commit/3aa990c) Added `Logger.prototype.configure` which now contains all logic previously in the `winston.Logger` constructor function. (`indexzero`) -- [#726](https://github.com/winstonjs/winston/pull/726) Update .npmignore (`coreybutler`) -- [#700](https://github.com/winstonjs/winston/pull/700) Add an `eol` option to the `Console` transport. (`aquavitae`) -- [#731](https://github.com/winstonjs/winston/pull/731) Update `lib/transports.js` for better static analysis. (`indexzero`) - -#### Fixes, refactoring, and optimizations. OH MY! -- [#632](https://github.com/winstonjs/winston/pull/632) Allow `File` transport to be an `objectMode` writable stream. (`stambata`) -- [#527](https://github.com/winstonjs/winston/issues/527), [163f4f9](https://github.com/winstonjs/winston/commit/163f4f9), [3747ccf](https://github.com/winstonjs/winston/commit/3747ccf) Performance optimizations and string interpolation edge cases (`indexzero`) -- [f0edafd](https://github.com/winstonjs/winston/commit/f0edafd) Code cleanup for reability, ad-hoc styleguide enforcement (`indexzero`) - -## v1.1.1 - v1.1.2 / 2015-10 -### MINOR FIXES EDITION - -#### Notable changes - * [727](https://github.com/winstonjs/winston/pull/727) Fix "raw" mode (`jcrugzz`) - * [703](https://github.com/winstonjs/winston/pull/703) Do not modify Error or Date objects when logging. Fixes #610 (`harriha`). - -## v1.1.0 / 2015-10-09 -### GREETINGS FROM CARTAGENA EDITION - -#### Notable Changes - * [#721](https://github.com/winstonjs/winston/pull/721) Fixed octal literal to work with node 4 strict mode (`wesleyeff`) - * [#630](https://github.com/winstonjs/winston/pull/630) Add stderrLevels option to Console Transport and update docs (`paulhroth`) - * [#626](https://github.com/winstonjs/winston/pull/626) Add the logger (this) in the fourth argument in the rewriters and filters functions (`christophehurpeau `) - * [#623](https://github.com/winstonjs/winston/pull/623) Fix Console Transport's align option tests (`paulhroth`, `kikobeats`) - * [#692](https://github.com/winstonjs/winston/pull/692) Adding winston-aws-cloudwatch to transport docs (`timdp`) - -## v1.0.2 2015-09-25 -### LET'S TALK ON GITTER EDITION - -#### Notable Changes - * [de80160](https://github.com/winstonjs/winston/commit/de80160) Add Gitter badge (`The Gitter Badger`) - * [44564de](https://github.com/winstonjs/winston/commit/44564de) [fix] Correct listeners in `logException`. Fixes [#218](https://github.com/winstonjs/winston/issues/218) [#213](https://github.com/winstonjs/winston/issues/213) [#327](https://github.com/winstonjs/winston/issues/327). (`indexzero`) - * [45b1eeb](https://github.com/winstonjs/winston/commit/45b1eeb) [fix] Get `tailFile` function working on latest/all node versions (`Christopher Jeffrey`) - * [c6d45f9](https://github.com/winstonjs/winston/commit/c6d45f9) Fixed event subscription on close (`Roman Stetsyshin`) - -#### Other changes - * TravisCI updates & best practices [87b97cc](https://github.com/winstonjs/winston/commit/87b97cc) [91a5bc4](https://github.com/winstonjs/winston/commit/91a5bc4), [cf24e6a](https://github.com/winstonjs/winston/commit/cf24e6a) (`indexzero`) - * [d5397e7](https://github.com/winstonjs/winston/commit/d5397e7) Bump async version (`Roderick Hsiao`) - * Documentation updates & fixes [86d7527](https://github.com/winstonjs/winston/commit/86d7527), [38254c1](https://github.com/winstonjs/winston/commit/38254c1), [04e2928](https://github.com/winstonjs/winston/commit/04e2928), [61c8a89](https://github.com/winstonjs/winston/commit/61c8a89), [c42a783](https://github.com/winstonjs/winston/commit/c42a783), [0688a22](https://github.com/winstonjs/winston/commit/0688a22), [eabc113](https://github.com/winstonjs/winston/commit/eabc113) [c9506b7](https://github.com/winstonjs/winston/commit/c9506b7), [17534d2](https://github.com/winstonjs/winston/commit/17534d2), [b575e7b](https://github.com/winstonjs/winston/commit/b575e7b) (`Stefan Thies`, `charukiewicz`, `unLucio`, `Adam Cohen`, `Denis Gorbachev`, `Frederik Ring`, `Luigi Pinca`, `jeffreypriebe`) - * Documentation refactor & cleanup [a19607e](https://github.com/winstonjs/winston/commit/a19607e), [d1932b4](https://github.com/winstonjs/winston/commit/d1932b4), [7a13132](https://github.com/winstonjs/winston/commit/7a13132) (`indexzero`) - - -## v1.0.1 / 2015-06-26 -### YAY DOCS EDITION - - * [#639](https://github.com/winstonjs/winston/pull/639) Fix for [#213](https://github.com/winstonjs/winston/issues/213): More than 10 containers triggers EventEmitter memory leak warning (`marcus`) - * Documentation and `package.json` updates [cec892c](https://github.com/winstonjs/winston/commit/cec892c), [2f13b4f](https://github.com/winstonjs/winston/commit/2f13b4f), [b246efd](https://github.com/winstonjs/winston/commit/b246efd), [22a5f5a](https://github.com/winstonjs/winston/commit/22a5f5a), [5868b78](https://github.com/winstonjs/winston/commit/5868b78), [99b6b44](https://github.com/winstonjs/winston/commit/99b6b44), [447a813](https://github.com/winstonjs/winston/commit/447a813), [7f75b48](https://github.com/winstonjs/winston/commit/7f75b48) (`peteward44`, `Gilad Peleg`, `Anton Ian Sipos`, `nimrod-becker`, `LarsTi`, `indexzero`) - -## v1.0.0 / 2015-04-07 -### OMG 1.0.0 FINALLY EDITION - -#### Breaking Changes - * [#587](https://github.com/winstonjs/winston/pull/587) Do not extend `String` prototypes as a side effect of using `colors`. (`kenperkins`) - * [#581](https://github.com/winstonjs/winston/pull/581) File transports now emit `error` on error of the underlying streams after `maxRetries` attempts. (`ambbell`). - * [#583](https://github.com/winstonjs/winston/pull/583), [92729a](https://github.com/winstonjs/winston/commit/92729a68d71d07715501c35d94d2ac06ac03ca08) Use `os.EOL` for all file writing by default. (`Mik13`, `indexzero`) - * [#532](https://github.com/winstonjs/winston/pull/532) Delete logger instance from `Container` when `close` event is emitted. (`snater`) - * [#380](https://github.com/winstonjs/winston/pull/380) Rename `duration` to `durationMs`, which is now a number a not a string ending in `ms`. (`neoziro`) - * [#253](https://github.com/winstonjs/winston/pull/253) Do not set a default level. When `level` is falsey on any `Transport` instance, any `Logger` instance uses the configured level (instead of the Transport level) (`jstamerj`). - -#### Other changes - - * [b83de62](https://github.com/winstonjs/winston/commit/b83de62) Fix rendering of stack traces. - * [c899cc](https://github.com/winstonjs/winston/commit/c899cc1f0719e49b26ec933e0fa263578168ea3b) Update documentation (Fixes [#549](https://github.com/winstonjs/winston/issues/549)) - * [#551](https://github.com/winstonjs/winston/pull/551) Filter metadata along with messages - * [#578](https://github.com/winstonjs/winston/pull/578) Fixes minor issue with `maxFiles` in `File` transport (Fixes [#556](https://github.com/winstonjs/winston/issues/556)). - * [#560](https://github.com/winstonjs/winston/pull/560) Added `showLevel` support to `File` transport. - * [#558](https://github.com/winstonjs/winston/pull/558) Added `showLevel` support to `Console` transport. - -## v0.9.0 / 2015-02-03 - - * [#496](https://github.com/flatiron/winston/pull/496) Updated default option handling for CLI (`oojacoboo`). - * [f37634b](https://github.com/flatiron/winston/commit/f37634b) [dist] Only support `node >= 0.8.0`. (`indexzero`) - * [91a1e90](https://github.com/flatiron/winston/commit/91a1e90), [50163a0](https://github.com/flatiron/winston/commit/50163a0) Fix #84 [Enable a better unhandled exception experience](https://github.com/flatiron/winston/issues/84) (`samz`) - * [8b5fbcd](https://github.com/flatiron/winston/commit/8b5fbcd) #448 Added tailable option to file transport which rolls files backwards instead of creating incrementing appends. Implements #268 (`neouser99`) - * [a34f7d2](https://github.com/flatiron/winston/commit/a34f7d2) Custom log formatter functionality were added. (`Melnyk Andii`) - * [4c08191](https://github.com/flatiron/winston/commit/4c08191) Added showLevel flag to common.js, file*, memory and console transports. (`Tony Germaneri`) - * [64ed8e0](https://github.com/flatiron/winston/commit/64ed8e0) Adding custom pretty print function test. (`Alberto Pose`) - * [3872dfb](https://github.com/flatiron/winston/commit/3872dfb) Adding prettyPrint parameter as function example. (`Alberto Pose`) - * [2b96eee](https://github.com/flatiron/winston/commit/2b96eee) implemented filters #526 (`Chris Oloff`) - * [72273b1](https://github.com/flatiron/winston/commit/72273b1) Added the options to colorize only the level, only the message or all. Default behavior is kept. Using true will only colorize the level and false will not colorize anything. (`Michiel De Mey`) - * [178e8a6](https://github.com/flatiron/winston/commit/178e8a6) Prevent message from meta input being overwritten (`Leonard Martin`) - * [270be86](https://github.com/flatiron/winston/commit/270be86) [api] Allow for transports to be removed by their string name [test fix] Add test coverage for multiple transports of the same type added in #187. [doc] Document using multiple transports of the same type (`indexzero`) - * [0a848fa](https://github.com/flatiron/winston/commit/0a848fa) Add depth options for meta pretty print (`Loïc Mahieu`) - * [106b670](https://github.com/flatiron/winston/commit/106b670) Allow debug messages to be sent to stdout (`John Frizelle`) - * [ad2d5e1](https://github.com/flatiron/winston/commit/ad2d5e1) [fix] Handle Error instances in a sane way since their properties are non-enumerable __by default.__ Fixes #280. (`indexzero`) - * [5109dd0](https://github.com/flatiron/winston/commit/5109dd0) [fix] Have a default `until` before a default `from`. Fixes #478. (`indexzero`) - * [d761960](https://github.com/flatiron/winston/commit/d761960) Fix logging regular expression objects (`Chasen Le Hara`) - * [2632eb8](https://github.com/flatiron/winston/commit/2632eb8) Add option for EOL chars on FileTransport (`José F. Romaniello`) - * [bdecce7](https://github.com/flatiron/winston/commit/bdecce7) Remove duplicate logstash option (`José F. Romaniello`) - * [7a01f9a](https://github.com/flatiron/winston/commit/7a01f9a) Update declaration block according to project's style guide (`Ricardo Torres`) - * [ae27a19](https://github.com/flatiron/winston/commit/ae27a19) Fixes #306: Can't set customlevels to my loggers (RangeError: Maximum call stack size exceeded) (`Alberto Pose`) - * [1ba4f51](https://github.com/flatiron/winston/commit/1ba4f51) [fix] Call `res.resume()` in HttpTransport to get around known issues in streams2. (`indexzero`) - * [39e0258](https://github.com/flatiron/winston/commit/39e0258) Updated default option handling for CLI (`Jacob Thomason`) - * [8252801](https://github.com/flatiron/winston/commit/8252801) Added logstash support to console transport (`Ramon Snir`) - * [18aa301](https://github.com/flatiron/winston/commit/18aa301) Module isStream should be isstream (`Michael Neil`) - * [2f5f296](https://github.com/flatiron/winston/commit/2f5f296) options.prettyPrint can now be a function (`Matt Zukowski`) - * [a87a876](https://github.com/flatiron/winston/commit/a87a876) Adding rotationFormat prop to file.js (`orcaman`) - * [ff187f4](https://github.com/flatiron/winston/commit/ff187f4) Allow custom exception level (`jupiter`) - -## 0.8.3 / 2014-11-04 - -* [fix lowercase issue (`jcrugzz`)](https://github.com/flatiron/winston/commit/b3ffaa10b5fe9d2a510af5348cf4fb3870534123) - -## 0.8.2 / 2014-11-04 - -* [Full fix for #296 with proper streams2 detection with `isstream` for file transport (`jcrugzz`)](https://github.com/flatiron/winston/commit/5c4bd4191468570e46805ed399cad63cfb1856cc) -* [Add isstream module (`jcrugzz`)](https://github.com/flatiron/winston/commit/498b216d0199aebaef72ee4d8659a00fb737b9ae) -* [Partially fix #296 with streams2 detection for file transport (`indexzero`)](https://github.com/flatiron/winston/commit/b0227b6c27cf651ffa8b8192ef79ab24296362e3) -* [add stress test for issue #288 (`indexzero`)](https://github.com/flatiron/winston/commit/e08e504b5b3a00f0acaade75c5ba69e6439c84a6) -* [lessen timeouts to check test sanity (`indexzero`)](https://github.com/flatiron/winston/commit/e925f5bc398a88464f3e796545ff88912aff7568) -* [update winston-graylog2 documentation (`unlucio`)](https://github.com/flatiron/winston/commit/49fa86c31baf12c8ac3adced3bdba6deeea2e363) -* [fix test formatting (`indexzero`)](https://github.com/flatiron/winston/commit/8e2225799520a4598044cdf93006d216812a27f9) -* [fix so options are not redefined (`indexzero`)](https://github.com/flatiron/winston/commit/d1d146e8a5bb73dcb01579ad433f6d4f70b668ea) -* [fix self/this issue that broke `http` transport (`indexzero`)](https://github.com/flatiron/winston/commit/d10cbc07755c853b60729ab0cd14aa665da2a63b) - - -## 0.8.1 / 2014-10-06 - -* [Add label option for DailyRotateFile transport (`francoisTemasys`)](https://github.com/flatiron/winston/pull/459) -* [fix Logger#transports length check upon Logger#log (`adriano-di-giovanni`, `indexzero`)](https://github.com/flatiron/winston/pull/404) -* [err can be a string. (`gdw2`, `indexzero`)](https://github.com/flatiron/winston/pull/396) -* [Added color for pre-defined cli set. (`danilo1105`, `indexzero`)](https://github.com/flatiron/winston/pull/365) -* [Fix dates on transport test (`revington`)](https://github.com/flatiron/winston/pull/346) -* [Included the label from options to the output in JSON mode. (`arxony`)](https://github.com/flatiron/winston/pull/326) -* [Allow using logstash option with the File transport (`gmajoulet`)](https://github.com/flatiron/winston/pull/299) -* [Be more defensive when working with `query` methods from Transports. Fixes #356. (indexzero)](https://github.com/flatiron/winston/commit/b80638974057f74b521dbe6f43fef2105110afa2) -* [Catch exceptions for file transport unlinkSync (`calvinfo`)](https://github.com/flatiron/winston/pull/266) -* [Adding the 'addRewriter' to winston (`machadogj`)](https://github.com/flatiron/winston/pull/258) -* [Updates to transport documentation (`pose`)](https://github.com/flatiron/winston/pull/262) -* [fix typo in "Extending another object with Logging" section.](https://github.com/flatiron/winston/pull/281) -* [Updated README.md - Replaced properties with those listed in winston-mongodb module](https://github.com/flatiron/winston/pull/264) - -## 0.8.0 / 2014-09-15 - * [Fixes for HTTP Transport](https://github.com/flatiron/winston/commit/a876a012641f8eba1a976eada15b6687d4a03f82) - * Removing [jsonquest](https://github.com/flatiron/winston/commit/4f088382aeda28012b7a0498829ceb243ed74ac1) and [request](https://github.com/flatiron/winston/commit/a5676313b4e9744802cc3b8e1468e4af48830876) dependencies. - * Configuration is now [shalow cloned](https://github.com/flatiron/winston/commit/08fccc81d18536d33050496102d98bde648853f2). - * [Added logstash support](https://github.com/flatiron/winston/pull/445/files) - * Fix for ["flush" event should always fire after "flush" call bug](https://github.com/flatiron/winston/pull/446/files) - * Added tests for file: [open and stress](https://github.com/flatiron/winston/commit/47d885797a2dd0d3cd879305ca813a0bd951c378). - * [Test fixes](https://github.com/flatiron/winston/commit/9e39150e0018f43d198ca4c160acef2af9860bf4) - * [Fix ")" on string interpolation](https://github.com/flatiron/winston/pull/394/files) - -## 0.6.2 / 2012-07-08 - - * Added prettyPrint option for console logging - * Multi-line values for conditional returns are not allowed - * Added acceptance of `stringify` option - * Fixed padding for log levels - diff --git a/general/nvim/node_modules/winston/LICENSE b/general/nvim/node_modules/winston/LICENSE deleted file mode 100644 index 948d80d..0000000 --- a/general/nvim/node_modules/winston/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Charlie Robbins - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/general/nvim/node_modules/winston/README.md b/general/nvim/node_modules/winston/README.md deleted file mode 100644 index 91ae12a..0000000 --- a/general/nvim/node_modules/winston/README.md +++ /dev/null @@ -1,1230 +0,0 @@ -# winston - -A logger for just about everything. - -[![Version npm](https://img.shields.io/npm/v/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)[![npm Downloads](https://img.shields.io/npm/dm/winston.svg?style=flat-square)](https://npmcharts.com/compare/winston?minimal=true)[![Build Status](https://img.shields.io/travis/winstonjs/winston/master.svg?style=flat-square)](https://travis-ci.org/winstonjs/winston)[![Dependencies](https://img.shields.io/david/winstonjs/winston.svg?style=flat-square)](https://david-dm.org/winstonjs/winston) - -[![NPM](https://nodei.co/npm/winston.png?downloads=true&downloadRank=true)](https://nodei.co/npm/winston/) - -[![Join the chat at https://gitter.im/winstonjs/winston](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/winstonjs/winston?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -## winston@3 - -See the [Upgrade Guide](UPGRADE-3.0.md) for more information. Bug reports and -PRs welcome! - -## Looking for `winston@2.x` documentation? - -Please note that the documentation below is for `winston@3`. -[Read the `winston@2.x` documentation]. - -## Motivation - -`winston` is designed to be a simple and universal logging library with -support for multiple transports. A transport is essentially a storage device -for your logs. Each `winston` logger can have multiple transports (see: -[Transports]) configured at different levels (see: [Logging levels]). For -example, one may want error logs to be stored in a persistent remote location -(like a database), but all logs output to the console or a local file. - -`winston` aims to decouple parts of the logging process to make it more -flexible and extensible. Attention is given to supporting flexibility in log -formatting (see: [Formats]) & levels (see: [Using custom logging levels]), and -ensuring those APIs decoupled from the implementation of transport logging -(i.e. how the logs are stored / indexed, see: [Adding Custom Transports]) to -the API that they exposed to the programmer. - -## Quick Start - -TL;DR? Check out the [quick start example][quick-example] in `./examples/`. -There are a number of other examples in [`./examples/*.js`][examples]. -Don't see an example you think should be there? Submit a pull request -to add it! - -## Usage - -The recommended way to use `winston` is to create your own logger. The -simplest way to do this is using `winston.createLogger`: - -``` js -const winston = require('winston'); - -const logger = winston.createLogger({ - level: 'info', - format: winston.format.json(), - defaultMeta: { service: 'user-service' }, - transports: [ - // - // - Write all logs with level `error` and below to `error.log` - // - Write all logs with level `info` and below to `combined.log` - // - new winston.transports.File({ filename: 'error.log', level: 'error' }), - new winston.transports.File({ filename: 'combined.log' }), - ], -}); - -// -// If we're not in production then log to the `console` with the format: -// `${info.level}: ${info.message} JSON.stringify({ ...rest }) ` -// -if (process.env.NODE_ENV !== 'production') { - logger.add(new winston.transports.Console({ - format: winston.format.simple(), - })); -} -``` - -You may also log directly via the default logger exposed by -`require('winston')`, but this merely intended to be a convenient shared -logger to use throughout your application if you so choose. - -## Table of contents - -* [Motivation](#motivation) -* [Quick Start](#quick-start) -* [Usage](#usage) -* [Table of Contents](#table-of-contents) -* [Logging](#logging) - * [Creating your logger](#creating-your-own-logger) - * [Streams, `objectMode`, and `info` objects](#streams-objectmode-and-info-objects) -* [Formats] - * [Combining formats](#combining-formats) - * [String interpolation](#string-interpolation) - * [Filtering `info` Objects](#filtering-info-objects) - * [Creating custom formats](#creating-custom-formats) -* [Logging levels] - * [Using logging levels](#using-logging-levels) - * [Using custom logging levels](#using-custom-logging-levels) -* [Transports] - * [Multiple transports of the same type](#multiple-transports-of-the-same-type) - * [Adding Custom Transports](#adding-custom-transports) - * [Common Transport options](#common-transport-options) -* [Exceptions](#exceptions) - * [Handling Uncaught Exceptions with winston](#handling-uncaught-exceptions-with-winston) - * [To Exit or Not to Exit](#to-exit-or-not-to-exit) -* [Rejections](#rejections) - * [Handling Uncaught Promise Rejections with winston](#handling-uncaught-promise-rejections-with-winston) -* [Profiling](#profiling) -* [Streaming Logs](#streaming-logs) -* [Querying Logs](#querying-logs) -* [Further Reading](#further-reading) - * [Using the default logger](#using-the-default-logger) - * [Awaiting logs to be written in `winston`](#awaiting-logs-to-be-written-in-winston) - * [Working with multiple Loggers in `winston`](#working-with-multiple-loggers-in-winston) -* [Installation](#installation) -* [Run Tests](#run-tests) - -## Logging - -Logging levels in `winston` conform to the severity ordering specified by -[RFC5424]: _severity of all levels is assumed to be numerically **ascending** -from most important to least important._ - -``` js -const levels = { - error: 0, - warn: 1, - info: 2, - http: 3, - verbose: 4, - debug: 5, - silly: 6 -}; -``` - -### Creating your own Logger -You get started by creating a logger using `winston.createLogger`: - -``` js -const logger = winston.createLogger({ - transports: [ - new winston.transports.Console(), - new winston.transports.File({ filename: 'combined.log' }) - ] -}); -``` - -A logger accepts the following parameters: - -| Name | Default | Description | -| ------------- | --------------------------- | --------------- | -| `level` | `'info'` | Log only if [`info.level`](#streams-objectmode-and-info-objects) less than or equal to this level | -| `levels` | `winston.config.npm.levels` | Levels (and colors) representing log priorities | -| `format` | `winston.format.json` | Formatting for `info` messages (see: [Formats]) | -| `transports` | `[]` _(No transports)_ | Set of logging targets for `info` messages | -| `exitOnError` | `true` | If false, handled exceptions will not cause `process.exit` | -| `silent` | `false` | If true, all logs are suppressed | - -The levels provided to `createLogger` will be defined as convenience methods -on the `logger` returned. - -``` js -// -// Logging -// -logger.log({ - level: 'info', - message: 'Hello distributed log files!' -}); - -logger.info('Hello again distributed logs'); -``` - -You can add or remove transports from the `logger` once it has been provided -to you from `winston.createLogger`: - -``` js -const files = new winston.transports.File({ filename: 'combined.log' }); -const console = new winston.transports.Console(); - -logger - .clear() // Remove all transports - .add(console) // Add console transport - .add(files) // Add file transport - .remove(console); // Remove console transport -``` - -You can also wholesale reconfigure a `winston.Logger` instance using the -`configure` method: - -``` js -const logger = winston.createLogger({ - level: 'info', - transports: [ - new winston.transports.Console(), - new winston.transports.File({ filename: 'combined.log' }) - ] -}); - -// -// Replaces the previous transports with those in the -// new configuration wholesale. -// -const DailyRotateFile = require('winston-daily-rotate-file'); -logger.configure({ - level: 'verbose', - transports: [ - new DailyRotateFile(opts) - ] -}); -``` - -### Creating child loggers - -You can create child loggers from existing loggers to pass metadata overrides: - -``` js -const logger = winston.createLogger({ - transports: [ - new winston.transports.Console(), - ] -}); - -const childLogger = logger.child({ requestId: '451' }); -``` - -### Streams, `objectMode`, and `info` objects - -In `winston`, both `Logger` and `Transport` instances are treated as -[`objectMode`](https://nodejs.org/api/stream.html#stream_object_mode) -streams that accept an `info` object. - -The `info` parameter provided to a given format represents a single log -message. The object itself is mutable. Every `info` must have at least the -`level` and `message` properties: - -``` js -const info = { - level: 'info', // Level of the logging message - message: 'Hey! Log something?' // Descriptive message being logged. -}; -``` - -Properties **besides level and message** are considered as "`meta`". i.e.: - -``` js -const { level, message, ...meta } = info; -``` - -Several of the formats in `logform` itself add additional properties: - -| Property | Format added by | Description | -| ----------- | --------------- | ----------- | -| `splat` | `splat()` | String interpolation splat for `%d %s`-style messages. | -| `timestamp` | `timestamp()` | timestamp the message was received. | -| `label` | `label()` | Custom label associated with each message. | -| `ms` | `ms()` | Number of milliseconds since the previous log message. | - -As a consumer you may add whatever properties you wish – _internal state is -maintained by `Symbol` properties:_ - -- `Symbol.for('level')` _**(READ-ONLY)**:_ equal to `level` property. - **Is treated as immutable by all code.** -- `Symbol.for('message'):` complete string message set by "finalizing formats": - - `json` - - `logstash` - - `printf` - - `prettyPrint` - - `simple` -- `Symbol.for('splat')`: additional string interpolation arguments. _Used - exclusively by `splat()` format._ - -These Symbols are stored in another package: `triple-beam` so that all -consumers of `logform` can have the same Symbol reference. i.e.: - -``` js -const { LEVEL, MESSAGE, SPLAT } = require('triple-beam'); - -console.log(LEVEL === Symbol.for('level')); -// true - -console.log(MESSAGE === Symbol.for('message')); -// true - -console.log(SPLAT === Symbol.for('splat')); -// true -``` - -> **NOTE:** any `{ message }` property in a `meta` object provided will -> automatically be concatenated to any `msg` already provided: For -> example the below will concatenate 'world' onto 'hello': -> -> ``` js -> logger.log('error', 'hello', { message: 'world' }); -> logger.info('hello', { message: 'world' }); -> ``` - -## Formats - -Formats in `winston` can be accessed from `winston.format`. They are -implemented in [`logform`](https://github.com/winstonjs/logform), a separate -module from `winston`. This allows flexibility when writing your own transports -in case you wish to include a default format with your transport. - -In modern versions of `node` template strings are very performant and are the -recommended way for doing most end-user formatting. If you want to bespoke -format your logs, `winston.format.printf` is for you: - -``` js -const { createLogger, format, transports } = require('winston'); -const { combine, timestamp, label, printf } = format; - -const myFormat = printf(({ level, message, label, timestamp }) => { - return `${timestamp} [${label}] ${level}: ${message}`; -}); - -const logger = createLogger({ - format: combine( - label({ label: 'right meow!' }), - timestamp(), - myFormat - ), - transports: [new transports.Console()] -}); -``` - -To see what built-in formats are available and learn more about creating your -own custom logging formats, see [`logform`][logform]. - -### Combining formats - -Any number of formats may be combined into a single format using -`format.combine`. Since `format.combine` takes no `opts`, as a convenience it -returns pre-created instance of the combined format. - -``` js -const { createLogger, format, transports } = require('winston'); -const { combine, timestamp, label, prettyPrint } = format; - -const logger = createLogger({ - format: combine( - label({ label: 'right meow!' }), - timestamp(), - prettyPrint() - ), - transports: [new transports.Console()] -}) - -logger.log({ - level: 'info', - message: 'What time is the testing at?' -}); -// Outputs: -// { level: 'info', -// message: 'What time is the testing at?', -// label: 'right meow!', -// timestamp: '2017-09-30T03:57:26.875Z' } -``` - -### String interpolation - -The `log` method provides the string interpolation using [util.format]. **It -must be enabled using `format.splat()`.** - -Below is an example that defines a format with string interpolation of -messages using `format.splat` and then serializes the entire `info` message -using `format.simple`. - -``` js -const { createLogger, format, transports } = require('winston'); -const logger = createLogger({ - format: format.combine( - format.splat(), - format.simple() - ), - transports: [new transports.Console()] -}); - -// info: test message my string {} -logger.log('info', 'test message %s', 'my string'); - -// info: test message 123 {} -logger.log('info', 'test message %d', 123); - -// info: test message first second {number: 123} -logger.log('info', 'test message %s, %s', 'first', 'second', { number: 123 }); -``` - -### Filtering `info` Objects - -If you wish to filter out a given `info` Object completely when logging then -simply return a falsey value. - -``` js -const { createLogger, format, transports } = require('winston'); - -// Ignore log messages if they have { private: true } -const ignorePrivate = format((info, opts) => { - if (info.private) { return false; } - return info; -}); - -const logger = createLogger({ - format: format.combine( - ignorePrivate(), - format.json() - ), - transports: [new transports.Console()] -}); - -// Outputs: {"level":"error","message":"Public error to share"} -logger.log({ - level: 'error', - message: 'Public error to share' -}); - -// Messages with { private: true } will not be written when logged. -logger.log({ - private: true, - level: 'error', - message: 'This is super secret - hide it.' -}); -``` - -Use of `format.combine` will respect any falsey values return and stop -evaluation of later formats in the series. For example: - -``` js -const { format } = require('winston'); -const { combine, timestamp, label } = format; - -const willNeverThrow = format.combine( - format(info => { return false })(), // Ignores everything - format(info => { throw new Error('Never reached') })() -); -``` - -### Creating custom formats - -Formats are prototypal objects (i.e. class instances) that define a single -method: `transform(info, opts)` and return the mutated `info`: - -- `info`: an object representing the log message. -- `opts`: setting specific to the current instance of the format. - -They are expected to return one of two things: - -- **An `info` Object** representing the modified `info` argument. Object -references need not be preserved if immutability is preferred. All current -built-in formats consider `info` mutable, but [immutablejs] is being -considered for future releases. -- **A falsey value** indicating that the `info` argument should be ignored by the -caller. (See: [Filtering `info` Objects](#filtering-info-objects)) below. - -`winston.format` is designed to be as simple as possible. To define a new -format simple pass it a `transform(info, opts)` function to get a new -`Format`. - -The named `Format` returned can be used to create as many copies of the given -`Format` as desired: - -``` js -const { format } = require('winston'); - -const volume = format((info, opts) => { - if (opts.yell) { - info.message = info.message.toUpperCase(); - } else if (opts.whisper) { - info.message = info.message.toLowerCase(); - } - - return info; -}); - -// `volume` is now a function that returns instances of the format. -const scream = volume({ yell: true }); -console.dir(scream.transform({ - level: 'info', - message: `sorry for making you YELL in your head!` -}, scream.options)); -// { -// level: 'info' -// message: 'SORRY FOR MAKING YOU YELL IN YOUR HEAD!' -// } - -// `volume` can be used multiple times to create different formats. -const whisper = volume({ whisper: true }); -console.dir(whisper.transform({ - level: 'info', - message: `WHY ARE THEY MAKING US YELL SO MUCH!` -}, whisper.options)); -// { -// level: 'info' -// message: 'why are they making us yell so much!' -// } -``` - -## Logging Levels - -Logging levels in `winston` conform to the severity ordering specified by -[RFC5424]: _severity of all levels is assumed to be numerically **ascending** -from most important to least important._ - -Each `level` is given a specific integer priority. The higher the priority the -more important the message is considered to be, and the lower the -corresponding integer priority. For example, as specified exactly in RFC5424 -the `syslog` levels are prioritized from 0 to 7 (highest to lowest). - -```js -{ - emerg: 0, - alert: 1, - crit: 2, - error: 3, - warning: 4, - notice: 5, - info: 6, - debug: 7 -} -``` - -Similarly, `npm` logging levels are prioritized from 0 to 6 (highest to -lowest): - -``` js -{ - error: 0, - warn: 1, - info: 2, - http: 3, - verbose: 4, - debug: 5, - silly: 6 -} -``` - -If you do not explicitly define the levels that `winston` should use, the -`npm` levels above will be used. - -### Using Logging Levels - -Setting the level for your logging message can be accomplished in one of two -ways. You can pass a string representing the logging level to the log() method -or use the level specified methods defined on every winston Logger. - -``` js -// -// Any logger instance -// -logger.log('silly', "127.0.0.1 - there's no place like home"); -logger.log('debug', "127.0.0.1 - there's no place like home"); -logger.log('verbose', "127.0.0.1 - there's no place like home"); -logger.log('info', "127.0.0.1 - there's no place like home"); -logger.log('warn', "127.0.0.1 - there's no place like home"); -logger.log('error', "127.0.0.1 - there's no place like home"); -logger.info("127.0.0.1 - there's no place like home"); -logger.warn("127.0.0.1 - there's no place like home"); -logger.error("127.0.0.1 - there's no place like home"); - -// -// Default logger -// -winston.log('info', "127.0.0.1 - there's no place like home"); -winston.info("127.0.0.1 - there's no place like home"); -``` - -`winston` allows you to define a `level` property on each transport which -specifies the **maximum** level of messages that a transport should log. For -example, using the `syslog` levels you could log only `error` messages to the -console and everything `info` and below to a file (which includes `error` -messages): - -``` js -const logger = winston.createLogger({ - levels: winston.config.syslog.levels, - transports: [ - new winston.transports.Console({ level: 'error' }), - new winston.transports.File({ - filename: 'combined.log', - level: 'info' - }) - ] -}); -``` - -You may also dynamically change the log level of a transport: - -``` js -const transports = { - console: new winston.transports.Console({ level: 'warn' }), - file: new winston.transports.File({ filename: 'combined.log', level: 'error' }) -}; - -const logger = winston.createLogger({ - transports: [ - transports.console, - transports.file - ] -}); - -logger.info('Will not be logged in either transport!'); -transports.console.level = 'info'; -transports.file.level = 'info'; -logger.info('Will be logged in both transports!'); -``` - -`winston` supports customizable logging levels, defaulting to npm style -logging levels. Levels must be specified at the time of creating your logger. - -### Using Custom Logging Levels - -In addition to the predefined `npm`, `syslog`, and `cli` levels available in -`winston`, you can also choose to define your own: - -``` js -const myCustomLevels = { - levels: { - foo: 0, - bar: 1, - baz: 2, - foobar: 3 - }, - colors: { - foo: 'blue', - bar: 'green', - baz: 'yellow', - foobar: 'red' - } -}; - -const customLevelLogger = winston.createLogger({ - levels: myCustomLevels.levels -}); - -customLevelLogger.foobar('some foobar level-ed message'); -``` - -Although there is slight repetition in this data structure, it enables simple -encapsulation if you do not want to have colors. If you do wish to have -colors, in addition to passing the levels to the Logger itself, you must make -winston aware of them: - -``` js -winston.addColors(myCustomLevels.colors); -``` - -This enables loggers using the `colorize` formatter to appropriately color and style -the output of custom levels. - -Additionally, you can also change background color and font style. -For example, -``` js -baz: 'italic yellow', -foobar: 'bold red cyanBG' -``` - -Possible options are below. - -* Font styles: `bold`, `dim`, `italic`, `underline`, `inverse`, `hidden`, - `strikethrough`. - -* Font foreground colors: `black`, `red`, `green`, `yellow`, `blue`, `magenta`, - `cyan`, `white`, `gray`, `grey`. - -* Background colors: `blackBG`, `redBG`, `greenBG`, `yellowBG`, `blueBG` - `magentaBG`, `cyanBG`, `whiteBG` - -### Colorizing Standard logging levels - -To colorize the standard logging level add -```js -winston.format.combine( - winston.format.colorize(), - winston.format.json() -); -``` -where `winston.format.json()` is whatever other formatter you want to use. The `colorize` formatter must come before any formatters adding text you wish to color. - -## Transports - -There are several [core transports] included in `winston`, which leverage the -built-in networking and file I/O offered by Node.js core. In addition, there -are [additional transports] written by members of the community. - -## Multiple transports of the same type - -It is possible to use multiple transports of the same type e.g. -`winston.transports.File` when you construct the transport. - -``` js -const logger = winston.createLogger({ - transports: [ - new winston.transports.File({ - filename: 'combined.log', - level: 'info' - }), - new winston.transports.File({ - filename: 'errors.log', - level: 'error' - }) - ] -}); -``` - -If you later want to remove one of these transports you can do so by using the -transport itself. e.g.: - -``` js -const combinedLogs = logger.transports.find(transport => { - return transport.filename === 'combined.log' -}); - -logger.remove(combinedLogs); -``` - -## Adding Custom Transports - -Adding a custom transport is easy. All you need to do is accept any options -you need, implement a log() method, and consume it with `winston`. - -``` js -const Transport = require('winston-transport'); -const util = require('util'); - -// -// Inherit from `winston-transport` so you can take advantage -// of the base functionality and `.exceptions.handle()`. -// -module.exports = class YourCustomTransport extends Transport { - constructor(opts) { - super(opts); - // - // Consume any custom options here. e.g.: - // - Connection information for databases - // - Authentication information for APIs (e.g. loggly, papertrail, - // logentries, etc.). - // - } - - log(info, callback) { - setImmediate(() => { - this.emit('logged', info); - }); - - // Perform the writing to the remote service - callback(); - } -}; -``` - -## Common Transport options - -As every transport inherits from [winston-transport], it's possible to set -a custom format and a custom log level on each transport separately: - -``` js -const logger = winston.createLogger({ - transports: [ - new winston.transports.File({ - filename: 'error.log', - level: 'error', - format: winston.format.json() - }), - new transports.Http({ - level: 'warn', - format: winston.format.json() - }), - new transports.Console({ - level: 'info', - format: winston.format.combine( - winston.format.colorize(), - winston.format.simple() - ) - }) - ] -}); -``` - -## Exceptions - -### Handling Uncaught Exceptions with winston - -With `winston`, it is possible to catch and log `uncaughtException` events -from your process. With your own logger instance you can enable this behavior -when it's created or later on in your applications lifecycle: - -``` js -const { createLogger, transports } = require('winston'); - -// Enable exception handling when you create your logger. -const logger = createLogger({ - transports: [ - new transports.File({ filename: 'combined.log' }) - ], - exceptionHandlers: [ - new transports.File({ filename: 'exceptions.log' }) - ] -}); - -// Or enable it later on by adding a transport or using `.exceptions.handle` -const logger = createLogger({ - transports: [ - new transports.File({ filename: 'combined.log' }) - ] -}); - -// Call exceptions.handle with a transport to handle exceptions -logger.exceptions.handle( - new transports.File({ filename: 'exceptions.log' }) -); -``` - -If you want to use this feature with the default logger, simply call -`.exceptions.handle()` with a transport instance. - -``` js -// -// You can add a separate exception logger by passing it to `.exceptions.handle` -// -winston.exceptions.handle( - new winston.transports.File({ filename: 'path/to/exceptions.log' }) -); - -// -// Alternatively you can set `handleExceptions` to true when adding transports -// to winston. -// -winston.add(new winston.transports.File({ - filename: 'path/to/combined.log', - handleExceptions: true -})); -``` - -### To Exit or Not to Exit - -By default, winston will exit after logging an uncaughtException. If this is -not the behavior you want, set `exitOnError = false` - -``` js -const logger = winston.createLogger({ exitOnError: false }); - -// -// or, like this: -// -logger.exitOnError = false; -``` - -When working with custom logger instances, you can pass in separate transports -to the `exceptionHandlers` property or set `handleExceptions` on any -transport. - -##### Example 1 - -``` js -const logger = winston.createLogger({ - transports: [ - new winston.transports.File({ filename: 'path/to/combined.log' }) - ], - exceptionHandlers: [ - new winston.transports.File({ filename: 'path/to/exceptions.log' }) - ] -}); -``` - -##### Example 2 - -``` js -const logger = winston.createLogger({ - transports: [ - new winston.transports.Console({ - handleExceptions: true - }) - ], - exitOnError: false -}); -``` - -The `exitOnError` option can also be a function to prevent exit on only -certain types of errors: - -``` js -function ignoreEpipe(err) { - return err.code !== 'EPIPE'; -} - -const logger = winston.createLogger({ exitOnError: ignoreEpipe }); - -// -// or, like this: -// -logger.exitOnError = ignoreEpipe; -``` - -## Rejections - -### Handling Uncaught Promise Rejections with winston - -With `winston`, it is possible to catch and log `uncaughtRejection` events -from your process. With your own logger instance you can enable this behavior -when it's created or later on in your applications lifecycle: - -``` js -const { createLogger, transports } = require('winston'); - -// Enable rejection handling when you create your logger. -const logger = createLogger({ - transports: [ - new transports.File({ filename: 'combined.log' }) - ], - rejectionHandlers: [ - new transports.File({ filename: 'rejections.log' }) - ] -}); - -// Or enable it later on by adding a transport or using `.rejections.handle` -const logger = createLogger({ - transports: [ - new transports.File({ filename: 'combined.log' }) - ] -}); - -// Call rejections.handle with a transport to handle rejections -logger.rejections.handle( - new transports.File({ filename: 'rejections.log' }) -); -``` - -If you want to use this feature with the default logger, simply call -`.rejections.handle()` with a transport instance. - -``` js -// -// You can add a separate rejection logger by passing it to `.rejections.handle` -// -winston.rejections.handle( - new winston.transports.File({ filename: 'path/to/rejections.log' }) -); - -// -// Alternatively you can set `handleRejections` to true when adding transports -// to winston. -// -winston.add(new winston.transports.File({ - filename: 'path/to/combined.log', - handleRejections: true -})); -``` - -## Profiling - -In addition to logging messages and metadata, `winston` also has a simple -profiling mechanism implemented for any logger: - -``` js -// -// Start profile of 'test' -// -logger.profile('test'); - -setTimeout(function () { - // - // Stop profile of 'test'. Logging will now take place: - // '17 Jan 21:00:00 - info: test duration=1000ms' - // - logger.profile('test'); -}, 1000); -``` - -Also you can start a timer and keep a reference that you can call `.done()`` -on: - -``` js - // Returns an object corresponding to a specific timing. When done - // is called the timer will finish and log the duration. e.g.: - // - const profiler = logger.startTimer(); - setTimeout(function () { - profiler.done({ message: 'Logging message' }); - }, 1000); -``` - -All profile messages are set to 'info' level by default, and both message and -metadata are optional. For individual profile messages, you can override the default log level by supplying a metadata object with a `level` property: - -```js -logger.profile('test', { level: 'debug' }); -``` - -## Querying Logs - -`winston` supports querying of logs with Loggly-like options. [See Loggly -Search API](https://www.loggly.com/docs/api-retrieving-data/). Specifically: -`File`, `Couchdb`, `Redis`, `Loggly`, `Nssocket`, and `Http`. - -``` js -const options = { - from: new Date() - (24 * 60 * 60 * 1000), - until: new Date(), - limit: 10, - start: 0, - order: 'desc', - fields: ['message'] -}; - -// -// Find items logged between today and yesterday. -// -logger.query(options, function (err, results) { - if (err) { - /* TODO: handle me */ - throw err; - } - - console.log(results); -}); -``` - -## Streaming Logs -Streaming allows you to stream your logs back from your chosen transport. - -``` js -// -// Start at the end. -// -winston.stream({ start: -1 }).on('log', function(log) { - console.log(log); -}); -``` - -## Further Reading - -### Using the Default Logger - -The default logger is accessible through the `winston` module directly. Any -method that you could call on an instance of a logger is available on the -default logger: - -``` js -const winston = require('winston'); - -winston.log('info', 'Hello distributed log files!'); -winston.info('Hello again distributed logs'); - -winston.level = 'debug'; -winston.log('debug', 'Now my debug messages are written to console!'); -``` - -By default, no transports are set on the default logger. You must -add or remove transports via the `add()` and `remove()` methods: - -``` js -const files = new winston.transports.File({ filename: 'combined.log' }); -const console = new winston.transports.Console(); - -winston.add(console); -winston.add(files); -winston.remove(console); -``` - -Or do it with one call to configure(): - -``` js -winston.configure({ - transports: [ - new winston.transports.File({ filename: 'somefile.log' }) - ] -}); -``` - -For more documentation about working with each individual transport supported -by `winston` see the [`winston` Transports](docs/transports.md) document. - -### Awaiting logs to be written in `winston` - -Often it is useful to wait for your logs to be written before exiting the -process. Each instance of `winston.Logger` is also a [Node.js stream]. A -`finish` event will be raised when all logs have flushed to all transports -after the stream has been ended. - -``` js -const transport = new winston.transports.Console(); -const logger = winston.createLogger({ - transports: [transport] -}); - -logger.on('finish', function (info) { - // All `info` log messages has now been logged -}); - -logger.info('CHILL WINSTON!', { seriously: true }); -logger.end(); -``` - -It is also worth mentioning that the logger also emits an 'error' event which -you should handle or suppress if you don't want unhandled exceptions: - -``` js -// -// Handle errors -// -logger.on('error', function (err) { /* Do Something */ }); -``` - -### Working with multiple Loggers in winston - -Often in larger, more complex, applications it is necessary to have multiple -logger instances with different settings. Each logger is responsible for a -different feature area (or category). This is exposed in `winston` in two -ways: through `winston.loggers` and instances of `winston.Container`. In fact, -`winston.loggers` is just a predefined instance of `winston.Container`: - -``` js -const winston = require('winston'); -const { format } = winston; -const { combine, label, json } = format; - -// -// Configure the logger for `category1` -// -winston.loggers.add('category1', { - format: combine( - label({ label: 'category one' }), - json() - ), - transports: [ - new winston.transports.Console({ level: 'silly' }), - new winston.transports.File({ filename: 'somefile.log' }) - ] -}); - -// -// Configure the logger for `category2` -// -winston.loggers.add('category2', { - format: combine( - label({ label: 'category two' }), - json() - ), - transports: [ - new winston.transports.Http({ host: 'localhost', port:8080 }) - ] -}); -``` - -Now that your loggers are setup, you can require winston _in any file in your -application_ and access these pre-configured loggers: - -``` js -const winston = require('winston'); - -// -// Grab your preconfigured loggers -// -const category1 = winston.loggers.get('category1'); -const category2 = winston.loggers.get('category2'); - -category1.info('logging to file and console transports'); -category2.info('logging to http transport'); -``` - -If you prefer to manage the `Container` yourself, you can simply instantiate one: - -``` js -const winston = require('winston'); -const { format } = winston; -const { combine, label, json } = format; - -const container = new winston.Container(); - -container.add('category1', { - format: combine( - label({ label: 'category one' }), - json() - ), - transports: [ - new winston.transports.Console({ level: 'silly' }), - new winston.transports.File({ filename: 'somefile.log' }) - ] -}); - -const category1 = container.get('category1'); -category1.info('logging to file and console transports'); -``` - -## Installation - -``` bash -npm install winston -``` - -``` bash -yarn add winston -``` - -## Run Tests - -All of the winston tests are written with [`mocha`][mocha], [`nyc`][nyc], and -[`assume`][assume]. They can be run with `npm`. - -``` bash -npm test -``` - -#### Author: [Charlie Robbins] -#### Contributors: [Jarrett Cruger], [David Hyde], [Chris Alderson] - -[Transports]: #transports -[Logging levels]: #logging-levels -[Formats]: #formats -[Using custom logging levels]: #using-custom-logging-levels -[Adding Custom Transports]: #adding-custom-transports -[core transports]: docs/transports.md#winston-core -[additional transports]: docs/transports.md#additional-transports - -[RFC5424]: https://tools.ietf.org/html/rfc5424 -[util.format]: https://nodejs.org/dist/latest/docs/api/util.html#util_util_format_format_args -[mocha]: https://mochajs.org -[nyc]: https://github.com/istanbuljs/nyc -[assume]: https://github.com/bigpipe/assume -[logform]: https://github.com/winstonjs/logform#readme -[winston-transport]: https://github.com/winstonjs/winston-transport - -[Read the `winston@2.x` documentation]: https://github.com/winstonjs/winston/tree/2.x - -[quick-example]: https://github.com/winstonjs/winston/blob/master/examples/quick-start.js -[examples]: https://github.com/winstonjs/winston/tree/master/examples - -[Charlie Robbins]: http://github.com/indexzero -[Jarrett Cruger]: https://github.com/jcrugzz -[David Hyde]: https://github.com/dabh -[Chris Alderson]: https://github.com/chrisalderson diff --git a/general/nvim/node_modules/winston/dist/winston.js b/general/nvim/node_modules/winston/dist/winston.js deleted file mode 100644 index f037f59..0000000 --- a/general/nvim/node_modules/winston/dist/winston.js +++ /dev/null @@ -1,172 +0,0 @@ -/** - * winston.js: Top-level include defining Winston. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -var logform = require('logform'); - -var _require = require('./winston/common'), - warn = _require.warn; -/** - * Setup to expose. - * @type {Object} - */ - - -var winston = exports; -/** - * Expose version. Use `require` method for `webpack` support. - * @type {string} - */ - -winston.version = require('../package.json').version; -/** - * Include transports defined by default by winston - * @type {Array} - */ - -winston.transports = require('./winston/transports'); -/** - * Expose utility methods - * @type {Object} - */ - -winston.config = require('./winston/config'); -/** - * Hoist format-related functionality from logform. - * @type {Object} - */ - -winston.addColors = logform.levels; -/** - * Hoist format-related functionality from logform. - * @type {Object} - */ - -winston.format = logform.format; -/** - * Expose core Logging-related prototypes. - * @type {function} - */ - -winston.createLogger = require('./winston/create-logger'); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ - -winston.ExceptionHandler = require('./winston/exception-handler'); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ - -winston.RejectionHandler = require('./winston/rejection-handler'); -/** - * Expose core Logging-related prototypes. - * @type {Container} - */ - -winston.Container = require('./winston/container'); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ - -winston.Transport = require('winston-transport'); -/** - * We create and expose a default `Container` to `winston.loggers` so that the - * programmer may manage multiple `winston.Logger` instances without any - * additional overhead. - * @example - * // some-file1.js - * const logger = require('winston').loggers.get('something'); - * - * // some-file2.js - * const logger = require('winston').loggers.get('something'); - */ - -winston.loggers = new winston.Container(); -/** - * We create and expose a 'defaultLogger' so that the programmer may do the - * following without the need to create an instance of winston.Logger directly: - * @example - * const winston = require('winston'); - * winston.log('info', 'some message'); - * winston.error('some error'); - */ - -var defaultLogger = winston.createLogger(); // Pass through the target methods onto `winston. - -Object.keys(winston.config.npm.levels).concat(['log', 'query', 'stream', 'add', 'remove', 'clear', 'profile', 'startTimer', 'handleExceptions', 'unhandleExceptions', 'handleRejections', 'unhandleRejections', 'configure', 'child']).forEach(function (method) { - return winston[method] = function () { - return defaultLogger[method].apply(defaultLogger, arguments); - }; -}); -/** - * Define getter / setter for the default logger level which need to be exposed - * by winston. - * @type {string} - */ - -Object.defineProperty(winston, 'level', { - get: function get() { - return defaultLogger.level; - }, - set: function set(val) { - defaultLogger.level = val; - } -}); -/** - * Define getter for `exceptions` which replaces `handleExceptions` and - * `unhandleExceptions`. - * @type {Object} - */ - -Object.defineProperty(winston, 'exceptions', { - get: function get() { - return defaultLogger.exceptions; - } -}); -/** - * Define getters / setters for appropriate properties of the default logger - * which need to be exposed by winston. - * @type {Logger} - */ - -['exitOnError'].forEach(function (prop) { - Object.defineProperty(winston, prop, { - get: function get() { - return defaultLogger[prop]; - }, - set: function set(val) { - defaultLogger[prop] = val; - } - }); -}); -/** - * The default transports and exceptionHandlers for the default winston logger. - * @type {Object} - */ - -Object.defineProperty(winston, 'default', { - get: function get() { - return { - exceptionHandlers: defaultLogger.exceptionHandlers, - rejectionHandlers: defaultLogger.rejectionHandlers, - transports: defaultLogger.transports - }; - } -}); // Have friendlier breakage notices for properties that were exposed by default -// on winston < 3.0. - -warn.deprecated(winston, 'setLevels'); -warn.forFunctions(winston, 'useFormat', ['cli']); -warn.forProperties(winston, 'useFormat', ['padLevels', 'stripColors']); -warn.forFunctions(winston, 'deprecated', ['addRewriter', 'addFilter', 'clone', 'extend']); -warn.forProperties(winston, 'deprecated', ['emitErrs', 'levelLength']); // Throw a useful error when users attempt to run `new winston.Logger`. - -warn.moved(winston, 'createLogger', 'Logger'); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/common.js b/general/nvim/node_modules/winston/dist/winston/common.js deleted file mode 100644 index 31aa711..0000000 --- a/general/nvim/node_modules/winston/dist/winston/common.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * common.js: Internal helper and utility functions for winston. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -var _require = require('util'), - format = _require.format; -/** - * Set of simple deprecation notices and a way to expose them for a set of - * properties. - * @type {Object} - * @private - */ - - -exports.warn = { - deprecated: function deprecated(prop) { - return function () { - throw new Error(format('{ %s } was removed in winston@3.0.0.', prop)); - }; - }, - useFormat: function useFormat(prop) { - return function () { - throw new Error([format('{ %s } was removed in winston@3.0.0.', prop), 'Use a custom winston.format = winston.format(function) instead.'].join('\n')); - }; - }, - forFunctions: function forFunctions(obj, type, props) { - props.forEach(function (prop) { - obj[prop] = exports.warn[type](prop); - }); - }, - moved: function moved(obj, movedTo, prop) { - function movedNotice() { - return function () { - throw new Error([format('winston.%s was moved in winston@3.0.0.', prop), format('Use a winston.%s instead.', movedTo)].join('\n')); - }; - } - - Object.defineProperty(obj, prop, { - get: movedNotice, - set: movedNotice - }); - }, - forProperties: function forProperties(obj, type, props) { - props.forEach(function (prop) { - var notice = exports.warn[type](prop); - Object.defineProperty(obj, prop, { - get: notice, - set: notice - }); - }); - } -}; \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/config/index.js b/general/nvim/node_modules/winston/dist/winston/config/index.js deleted file mode 100644 index 0eb13f3..0000000 --- a/general/nvim/node_modules/winston/dist/winston/config/index.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * index.js: Default settings for all levels that winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -var logform = require('logform'); - -var _require = require('triple-beam'), - configs = _require.configs; -/** - * Export config set for the CLI. - * @type {Object} - */ - - -exports.cli = logform.levels(configs.cli); -/** - * Export config set for npm. - * @type {Object} - */ - -exports.npm = logform.levels(configs.npm); -/** - * Export config set for the syslog. - * @type {Object} - */ - -exports.syslog = logform.levels(configs.syslog); -/** - * Hoist addColors from logform where it was refactored into in winston@3. - * @type {Object} - */ - -exports.addColors = logform.levels; \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/container.js b/general/nvim/node_modules/winston/dist/winston/container.js deleted file mode 100644 index a1d329b..0000000 --- a/general/nvim/node_modules/winston/dist/winston/container.js +++ /dev/null @@ -1,147 +0,0 @@ -/** - * container.js: Inversion of control container for winston logger instances. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var createLogger = require('./create-logger'); -/** - * Inversion of control container for winston logger instances. - * @type {Container} - */ - - -module.exports = /*#__PURE__*/function () { - /** - * Constructor function for the Container object responsible for managing a - * set of `winston.Logger` instances based on string ids. - * @param {!Object} [options={}] - Default pass-thru options for Loggers. - */ - function Container() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Container); - - this.loggers = new Map(); - this.options = options; - } - /** - * Retreives a `winston.Logger` instance for the specified `id`. If an - * instance does not exist, one is created. - * @param {!string} id - The id of the Logger to get. - * @param {?Object} [options] - Options for the Logger instance. - * @returns {Logger} - A configured Logger instance with a specified id. - */ - - - _createClass(Container, [{ - key: "add", - value: function add(id, options) { - var _this = this; - - if (!this.loggers.has(id)) { - // Remark: Simple shallow clone for configuration options in case we pass - // in instantiated protoypal objects - options = Object.assign({}, options || this.options); - var existing = options.transports || this.options.transports; // Remark: Make sure if we have an array of transports we slice it to - // make copies of those references. - - options.transports = existing ? existing.slice() : []; - var logger = createLogger(options); - logger.on('close', function () { - return _this._delete(id); - }); - this.loggers.set(id, logger); - } - - return this.loggers.get(id); - } - /** - * Retreives a `winston.Logger` instance for the specified `id`. If - * an instance does not exist, one is created. - * @param {!string} id - The id of the Logger to get. - * @param {?Object} [options] - Options for the Logger instance. - * @returns {Logger} - A configured Logger instance with a specified id. - */ - - }, { - key: "get", - value: function get(id, options) { - return this.add(id, options); - } - /** - * Check if the container has a logger with the id. - * @param {?string} id - The id of the Logger instance to find. - * @returns {boolean} - Boolean value indicating if this instance has a - * logger with the specified `id`. - */ - - }, { - key: "has", - value: function has(id) { - return !!this.loggers.has(id); - } - /** - * Closes a `Logger` instance with the specified `id` if it exists. - * If no `id` is supplied then all Loggers are closed. - * @param {?string} id - The id of the Logger instance to close. - * @returns {undefined} - */ - - }, { - key: "close", - value: function close(id) { - var _this2 = this; - - if (id) { - return this._removeLogger(id); - } - - this.loggers.forEach(function (val, key) { - return _this2._removeLogger(key); - }); - } - /** - * Remove a logger based on the id. - * @param {!string} id - The id of the logger to remove. - * @returns {undefined} - * @private - */ - - }, { - key: "_removeLogger", - value: function _removeLogger(id) { - if (!this.loggers.has(id)) { - return; - } - - var logger = this.loggers.get(id); - logger.close(); - - this._delete(id); - } - /** - * Deletes a `Logger` instance with the specified `id`. - * @param {!string} id - The id of the Logger instance to delete from - * container. - * @returns {undefined} - * @private - */ - - }, { - key: "_delete", - value: function _delete(id) { - this.loggers["delete"](id); - } - }]); - - return Container; -}(); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/create-logger.js b/general/nvim/node_modules/winston/dist/winston/create-logger.js deleted file mode 100644 index 8ba07bc..0000000 --- a/general/nvim/node_modules/winston/dist/winston/create-logger.js +++ /dev/null @@ -1,141 +0,0 @@ -/** - * create-logger.js: Logger factory for winston logger instances. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var _require = require('triple-beam'), - LEVEL = _require.LEVEL; - -var config = require('./config'); - -var Logger = require('./logger'); - -var debug = require('@dabh/diagnostics')('winston:create-logger'); - -function isLevelEnabledFunctionName(level) { - return 'is' + level.charAt(0).toUpperCase() + level.slice(1) + 'Enabled'; -} -/** - * Create a new instance of a winston Logger. Creates a new - * prototype for each instance. - * @param {!Object} opts - Options for the created logger. - * @returns {Logger} - A newly created logger instance. - */ - - -module.exports = function () { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - // - // Default levels: npm - // - opts.levels = opts.levels || config.npm.levels; - /** - * DerivedLogger to attach the logs level methods. - * @type {DerivedLogger} - * @extends {Logger} - */ - - var DerivedLogger = /*#__PURE__*/function (_Logger) { - _inherits(DerivedLogger, _Logger); - - var _super = _createSuper(DerivedLogger); - - /** - * Create a new class derived logger for which the levels can be attached to - * the prototype of. This is a V8 optimization that is well know to increase - * performance of prototype functions. - * @param {!Object} options - Options for the created logger. - */ - function DerivedLogger(options) { - _classCallCheck(this, DerivedLogger); - - return _super.call(this, options); - } - - return DerivedLogger; - }(Logger); - - var logger = new DerivedLogger(opts); // - // Create the log level methods for the derived logger. - // - - Object.keys(opts.levels).forEach(function (level) { - debug('Define prototype method for "%s"', level); - - if (level === 'log') { - // eslint-disable-next-line no-console - console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.'); - return; - } // - // Define prototype methods for each log level e.g.: - // logger.log('info', msg) implies these methods are defined: - // - logger.info(msg) - // - logger.isInfoEnabled() - // - // Remark: to support logger.child this **MUST** be a function - // so it'll always be called on the instance instead of a fixed - // place in the prototype chain. - // - - - DerivedLogger.prototype[level] = function () { - // Prefer any instance scope, but default to "root" logger - var self = this || logger; // Optimize the hot-path which is the single object. - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - if (args.length === 1) { - var msg = args[0]; - var info = msg && msg.message && msg || { - message: msg - }; - info.level = info[LEVEL] = level; - - self._addDefaultMeta(info); - - self.write(info); - return this || logger; - } // When provided nothing assume the empty string - - - if (args.length === 0) { - self.log(level, ''); - return self; - } // Otherwise build argument list which could potentially conform to - // either: - // . v3 API: log(obj) - // 2. v1/v2 API: log(level, msg, ... [string interpolate], [{metadata}], [callback]) - - - return self.log.apply(self, [level].concat(args)); - }; - - DerivedLogger.prototype[isLevelEnabledFunctionName(level)] = function () { - return (this || logger).isLevelEnabled(level); - }; - }); - return logger; -}; \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/exception-handler.js b/general/nvim/node_modules/winston/dist/winston/exception-handler.js deleted file mode 100644 index e275e40..0000000 --- a/general/nvim/node_modules/winston/dist/winston/exception-handler.js +++ /dev/null @@ -1,288 +0,0 @@ -/** - * exception-handler.js: Object for handling uncaughtException events. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var os = require('os'); - -var asyncForEach = require('async/forEach'); - -var debug = require('@dabh/diagnostics')('winston:exception'); - -var once = require('one-time'); - -var stackTrace = require('stack-trace'); - -var ExceptionStream = require('./exception-stream'); -/** - * Object for handling uncaughtException events. - * @type {ExceptionHandler} - */ - - -module.exports = /*#__PURE__*/function () { - /** - * TODO: add contructor description - * @param {!Logger} logger - TODO: add param description - */ - function ExceptionHandler(logger) { - _classCallCheck(this, ExceptionHandler); - - if (!logger) { - throw new Error('Logger is required to handle exceptions'); - } - - this.logger = logger; - this.handlers = new Map(); - } - /** - * Handles `uncaughtException` events for the current process by adding any - * handlers passed in. - * @returns {undefined} - */ - - - _createClass(ExceptionHandler, [{ - key: "handle", - value: function handle() { - var _this = this; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - args.forEach(function (arg) { - if (Array.isArray(arg)) { - return arg.forEach(function (handler) { - return _this._addHandler(handler); - }); - } - - _this._addHandler(arg); - }); - - if (!this.catcher) { - this.catcher = this._uncaughtException.bind(this); - process.on('uncaughtException', this.catcher); - } - } - /** - * Removes any handlers to `uncaughtException` events for the current - * process. This does not modify the state of the `this.handlers` set. - * @returns {undefined} - */ - - }, { - key: "unhandle", - value: function unhandle() { - var _this2 = this; - - if (this.catcher) { - process.removeListener('uncaughtException', this.catcher); - this.catcher = false; - Array.from(this.handlers.values()).forEach(function (wrapper) { - return _this2.logger.unpipe(wrapper); - }); - } - } - /** - * TODO: add method description - * @param {Error} err - Error to get information about. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getAllInfo", - value: function getAllInfo(err) { - var message = err.message; - - if (!message && typeof err === 'string') { - message = err; - } - - return { - error: err, - // TODO (indexzero): how do we configure this? - level: 'error', - message: ["uncaughtException: ".concat(message || '(no error message)'), err.stack || ' No stack trace'].join('\n'), - stack: err.stack, - exception: true, - date: new Date().toString(), - process: this.getProcessInfo(), - os: this.getOsInfo(), - trace: this.getTrace(err) - }; - } - /** - * Gets all relevant process information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getProcessInfo", - value: function getProcessInfo() { - return { - pid: process.pid, - uid: process.getuid ? process.getuid() : null, - gid: process.getgid ? process.getgid() : null, - cwd: process.cwd(), - execPath: process.execPath, - version: process.version, - argv: process.argv, - memoryUsage: process.memoryUsage() - }; - } - /** - * Gets all relevant OS information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getOsInfo", - value: function getOsInfo() { - return { - loadavg: os.loadavg(), - uptime: os.uptime() - }; - } - /** - * Gets a stack trace for the specified error. - * @param {mixed} err - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getTrace", - value: function getTrace(err) { - var trace = err ? stackTrace.parse(err) : stackTrace.get(); - return trace.map(function (site) { - return { - column: site.getColumnNumber(), - file: site.getFileName(), - "function": site.getFunctionName(), - line: site.getLineNumber(), - method: site.getMethodName(), - "native": site.isNative() - }; - }); - } - /** - * Helper method to add a transport as an exception handler. - * @param {Transport} handler - The transport to add as an exception handler. - * @returns {void} - */ - - }, { - key: "_addHandler", - value: function _addHandler(handler) { - if (!this.handlers.has(handler)) { - handler.handleExceptions = true; - var wrapper = new ExceptionStream(handler); - this.handlers.set(handler, wrapper); - this.logger.pipe(wrapper); - } - } - /** - * Logs all relevant information around the `err` and exits the current - * process. - * @param {Error} err - Error to handle - * @returns {mixed} - TODO: add return description. - * @private - */ - - }, { - key: "_uncaughtException", - value: function _uncaughtException(err) { - var info = this.getAllInfo(err); - - var handlers = this._getExceptionHandlers(); // Calculate if we should exit on this error - - - var doExit = typeof this.logger.exitOnError === 'function' ? this.logger.exitOnError(err) : this.logger.exitOnError; - var timeout; - - if (!handlers.length && doExit) { - // eslint-disable-next-line no-console - console.warn('winston: exitOnError cannot be true with no exception handlers.'); // eslint-disable-next-line no-console - - console.warn('winston: not exiting process.'); - doExit = false; - } - - function gracefulExit() { - debug('doExit', doExit); - debug('process._exiting', process._exiting); - - if (doExit && !process._exiting) { - // Remark: Currently ignoring any exceptions from transports when - // catching uncaught exceptions. - if (timeout) { - clearTimeout(timeout); - } // eslint-disable-next-line no-process-exit - - - process.exit(1); - } - } - - if (!handlers || handlers.length === 0) { - return process.nextTick(gracefulExit); - } // Log to all transports attempting to listen for when they are completed. - - - asyncForEach(handlers, function (handler, next) { - var done = once(next); - var transport = handler.transport || handler; // Debug wrapping so that we can inspect what's going on under the covers. - - function onDone(event) { - return function () { - debug(event); - done(); - }; - } - - transport._ending = true; - transport.once('finish', onDone('finished')); - transport.once('error', onDone('error')); - }, function () { - return doExit && gracefulExit(); - }); - this.logger.log(info); // If exitOnError is true, then only allow the logging of exceptions to - // take up to `3000ms`. - - if (doExit) { - timeout = setTimeout(gracefulExit, 3000); - } - } - /** - * Returns the list of transports and exceptionHandlers for this instance. - * @returns {Array} - List of transports and exceptionHandlers for this - * instance. - * @private - */ - - }, { - key: "_getExceptionHandlers", - value: function _getExceptionHandlers() { - // Remark (indexzero): since `logger.transports` returns all of the pipes - // from the _readableState of the stream we actually get the join of the - // explicit handlers and the implicit transports with - // `handleExceptions: true` - return this.logger.transports.filter(function (wrap) { - var transport = wrap.transport || wrap; - return transport.handleExceptions; - }); - } - }]); - - return ExceptionHandler; -}(); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/exception-stream.js b/general/nvim/node_modules/winston/dist/winston/exception-stream.js deleted file mode 100644 index 6e097dc..0000000 --- a/general/nvim/node_modules/winston/dist/winston/exception-stream.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * exception-stream.js: TODO: add file header handler. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var _require = require('readable-stream'), - Writable = _require.Writable; -/** - * TODO: add class description. - * @type {ExceptionStream} - * @extends {Writable} - */ - - -module.exports = /*#__PURE__*/function (_Writable) { - _inherits(ExceptionStream, _Writable); - - var _super = _createSuper(ExceptionStream); - - /** - * Constructor function for the ExceptionStream responsible for wrapping a - * TransportStream; only allowing writes of `info` objects with - * `info.exception` set to true. - * @param {!TransportStream} transport - Stream to filter to exceptions - */ - function ExceptionStream(transport) { - var _this; - - _classCallCheck(this, ExceptionStream); - - _this = _super.call(this, { - objectMode: true - }); - - if (!transport) { - throw new Error('ExceptionStream requires a TransportStream instance.'); - } // Remark (indexzero): we set `handleExceptions` here because it's the - // predicate checked in ExceptionHandler.prototype.__getExceptionHandlers - - - _this.handleExceptions = true; - _this.transport = transport; - return _this; - } - /** - * Writes the info object to our transport instance if (and only if) the - * `exception` property is set on the info. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {mixed} - TODO: add return description. - * @private - */ - - - _createClass(ExceptionStream, [{ - key: "_write", - value: function _write(info, enc, callback) { - if (info.exception) { - return this.transport.log(info, callback); - } - - callback(); - return true; - } - }]); - - return ExceptionStream; -}(Writable); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/logger.js b/general/nvim/node_modules/winston/dist/winston/logger.js deleted file mode 100644 index 7741799..0000000 --- a/general/nvim/node_modules/winston/dist/winston/logger.js +++ /dev/null @@ -1,752 +0,0 @@ -/** - * logger.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var _require = require('readable-stream'), - Stream = _require.Stream, - Transform = _require.Transform; - -var asyncForEach = require('async/forEach'); - -var _require2 = require('triple-beam'), - LEVEL = _require2.LEVEL, - SPLAT = _require2.SPLAT; - -var isStream = require('is-stream'); - -var ExceptionHandler = require('./exception-handler'); - -var RejectionHandler = require('./rejection-handler'); - -var LegacyTransportStream = require('winston-transport/legacy'); - -var Profiler = require('./profiler'); - -var _require3 = require('./common'), - warn = _require3.warn; - -var config = require('./config'); -/** - * Captures the number of format (i.e. %s strings) in a given string. - * Based on `util.format`, see Node.js source: - * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230 - * @type {RegExp} - */ - - -var formatRegExp = /%[scdjifoO%]/g; -/** - * TODO: add class description. - * @type {Logger} - * @extends {Transform} - */ - -var Logger = /*#__PURE__*/function (_Transform) { - _inherits(Logger, _Transform); - - var _super = _createSuper(Logger); - - /** - * Constructor function for the Logger object responsible for persisting log - * messages and metadata to one or more transports. - * @param {!Object} options - foo - */ - function Logger(options) { - var _this; - - _classCallCheck(this, Logger); - - _this = _super.call(this, { - objectMode: true - }); - - _this.configure(options); - - return _this; - } - - _createClass(Logger, [{ - key: "child", - value: function child(defaultRequestMetadata) { - var logger = this; - return Object.create(logger, { - write: { - value: function value(info) { - var infoClone = Object.assign({}, defaultRequestMetadata, info); // Object.assign doesn't copy inherited Error - // properties so we have to do that explicitly - // - // Remark (indexzero): we should remove this - // since the errors format will handle this case. - // - - if (info instanceof Error) { - infoClone.stack = info.stack; - infoClone.message = info.message; - } - - logger.write(infoClone); - } - } - }); - } - /** - * This will wholesale reconfigure this instance by: - * 1. Resetting all transports. Older transports will be removed implicitly. - * 2. Set all other options including levels, colors, rewriters, filters, - * exceptionHandlers, etc. - * @param {!Object} options - TODO: add param description. - * @returns {undefined} - */ - - }, { - key: "configure", - value: function configure() { - var _this2 = this; - - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - silent = _ref.silent, - format = _ref.format, - defaultMeta = _ref.defaultMeta, - levels = _ref.levels, - _ref$level = _ref.level, - level = _ref$level === void 0 ? 'info' : _ref$level, - _ref$exitOnError = _ref.exitOnError, - exitOnError = _ref$exitOnError === void 0 ? true : _ref$exitOnError, - transports = _ref.transports, - colors = _ref.colors, - emitErrs = _ref.emitErrs, - formatters = _ref.formatters, - padLevels = _ref.padLevels, - rewriters = _ref.rewriters, - stripColors = _ref.stripColors, - exceptionHandlers = _ref.exceptionHandlers, - rejectionHandlers = _ref.rejectionHandlers; - - // Reset transports if we already have them - if (this.transports.length) { - this.clear(); - } - - this.silent = silent; - this.format = format || this.format || require('logform/json')(); - this.defaultMeta = defaultMeta || null; // Hoist other options onto this instance. - - this.levels = levels || this.levels || config.npm.levels; - this.level = level; - this.exceptions = new ExceptionHandler(this); - this.rejections = new RejectionHandler(this); - this.profilers = {}; - this.exitOnError = exitOnError; // Add all transports we have been provided. - - if (transports) { - transports = Array.isArray(transports) ? transports : [transports]; - transports.forEach(function (transport) { - return _this2.add(transport); - }); - } - - if (colors || emitErrs || formatters || padLevels || rewriters || stripColors) { - throw new Error(['{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.', 'Use a custom winston.format(function) instead.', 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'].join('\n')); - } - - if (exceptionHandlers) { - this.exceptions.handle(exceptionHandlers); - } - - if (rejectionHandlers) { - this.rejections.handle(rejectionHandlers); - } - } - }, { - key: "isLevelEnabled", - value: function isLevelEnabled(level) { - var _this3 = this; - - var givenLevelValue = getLevelValue(this.levels, level); - - if (givenLevelValue === null) { - return false; - } - - var configuredLevelValue = getLevelValue(this.levels, this.level); - - if (configuredLevelValue === null) { - return false; - } - - if (!this.transports || this.transports.length === 0) { - return configuredLevelValue >= givenLevelValue; - } - - var index = this.transports.findIndex(function (transport) { - var transportLevelValue = getLevelValue(_this3.levels, transport.level); - - if (transportLevelValue === null) { - transportLevelValue = configuredLevelValue; - } - - return transportLevelValue >= givenLevelValue; - }); - return index !== -1; - } - /* eslint-disable valid-jsdoc */ - - /** - * Ensure backwards compatibility with a `log` method - * @param {mixed} level - Level the log message is written at. - * @param {mixed} msg - TODO: add param description. - * @param {mixed} meta - TODO: add param description. - * @returns {Logger} - TODO: add return description. - * - * @example - * // Supports the existing API: - * logger.log('info', 'Hello world', { custom: true }); - * logger.log('info', new Error('Yo, it\'s on fire')); - * - * // Requires winston.format.splat() - * logger.log('info', '%s %d%%', 'A string', 50, { thisIsMeta: true }); - * - * // And the new API with a single JSON literal: - * logger.log({ level: 'info', message: 'Hello world', custom: true }); - * logger.log({ level: 'info', message: new Error('Yo, it\'s on fire') }); - * - * // Also requires winston.format.splat() - * logger.log({ - * level: 'info', - * message: '%s %d%%', - * [SPLAT]: ['A string', 50], - * meta: { thisIsMeta: true } - * }); - * - */ - - /* eslint-enable valid-jsdoc */ - - }, { - key: "log", - value: function log(level, msg) { - var _Object$assign2; - - for (var _len = arguments.length, splat = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - splat[_key - 2] = arguments[_key]; - } - - // eslint-disable-line max-params - // Optimize for the hotpath of logging JSON literals - if (arguments.length === 1) { - // Yo dawg, I heard you like levels ... seriously ... - // In this context the LHS `level` here is actually the `info` so read - // this as: info[LEVEL] = info.level; - level[LEVEL] = level.level; - - this._addDefaultMeta(level); - - this.write(level); - return this; - } // Slightly less hotpath, but worth optimizing for. - - - if (arguments.length === 2) { - var _this$write; - - if (msg && _typeof(msg) === 'object') { - msg[LEVEL] = msg.level = level; - - this._addDefaultMeta(msg); - - this.write(msg); - return this; - } - - this.write((_this$write = {}, _defineProperty(_this$write, LEVEL, level), _defineProperty(_this$write, "level", level), _defineProperty(_this$write, "message", msg), _this$write)); - return this; - } - - var meta = splat[0]; - - if (_typeof(meta) === 'object' && meta !== null) { - // Extract tokens, if none available default to empty array to - // ensure consistancy in expected results - var tokens = msg && msg.match && msg.match(formatRegExp); - - if (!tokens) { - var _Object$assign; - - var info = Object.assign({}, this.defaultMeta, meta, (_Object$assign = {}, _defineProperty(_Object$assign, LEVEL, level), _defineProperty(_Object$assign, SPLAT, splat), _defineProperty(_Object$assign, "level", level), _defineProperty(_Object$assign, "message", msg), _Object$assign)); - if (meta.message) info.message = "".concat(info.message, " ").concat(meta.message); - if (meta.stack) info.stack = meta.stack; - this.write(info); - return this; - } - } - - this.write(Object.assign({}, this.defaultMeta, (_Object$assign2 = {}, _defineProperty(_Object$assign2, LEVEL, level), _defineProperty(_Object$assign2, SPLAT, splat), _defineProperty(_Object$assign2, "level", level), _defineProperty(_Object$assign2, "message", msg), _Object$assign2))); - return this; - } - /** - * Pushes data so that it can be picked up by all of our pipe targets. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {mixed} callback - Continues stream processing. - * @returns {undefined} - * @private - */ - - }, { - key: "_transform", - value: function _transform(info, enc, callback) { - if (this.silent) { - return callback(); - } // [LEVEL] is only soft guaranteed to be set here since we are a proper - // stream. It is likely that `info` came in through `.log(info)` or - // `.info(info)`. If it is not defined, however, define it. - // This LEVEL symbol is provided by `triple-beam` and also used in: - // - logform - // - winston-transport - // - abstract-winston-transport - - - if (!info[LEVEL]) { - info[LEVEL] = info.level; - } // Remark: really not sure what to do here, but this has been reported as - // very confusing by pre winston@2.0.0 users as quite confusing when using - // custom levels. - - - if (!this.levels[info[LEVEL]] && this.levels[info[LEVEL]] !== 0) { - // eslint-disable-next-line no-console - console.error('[winston] Unknown logger level: %s', info[LEVEL]); - } // Remark: not sure if we should simply error here. - - - if (!this._readableState.pipes) { - // eslint-disable-next-line no-console - console.error('[winston] Attempt to write logs with no transports %j', info); - } // Here we write to the `format` pipe-chain, which on `readable` above will - // push the formatted `info` Object onto the buffer for this instance. We trap - // (and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - - - try { - this.push(this.format.transform(info, this.format.options)); - } catch (ex) { - throw ex; - } finally { - // eslint-disable-next-line callback-return - callback(); - } - } - /** - * Delays the 'finish' event until all transport pipe targets have - * also emitted 'finish' or are already finished. - * @param {mixed} callback - Continues stream processing. - */ - - }, { - key: "_final", - value: function _final(callback) { - var transports = this.transports.slice(); - asyncForEach(transports, function (transport, next) { - if (!transport || transport.finished) return setImmediate(next); - transport.once('finish', next); - transport.end(); - }, callback); - } - /** - * Adds the transport to this logger instance by piping to it. - * @param {mixed} transport - TODO: add param description. - * @returns {Logger} - TODO: add return description. - */ - - }, { - key: "add", - value: function add(transport) { - // Support backwards compatibility with all existing `winston < 3.x.x` - // transports which meet one of two criteria: - // 1. They inherit from winston.Transport in < 3.x.x which is NOT a stream. - // 2. They expose a log method which has a length greater than 2 (i.e. more then - // just `log(info, callback)`. - var target = !isStream(transport) || transport.log.length > 2 ? new LegacyTransportStream({ - transport: transport - }) : transport; - - if (!target._writableState || !target._writableState.objectMode) { - throw new Error('Transports must WritableStreams in objectMode. Set { objectMode: true }.'); - } // Listen for the `error` event and the `warn` event on the new Transport. - - - this._onEvent('error', target); - - this._onEvent('warn', target); - - this.pipe(target); - - if (transport.handleExceptions) { - this.exceptions.handle(); - } - - if (transport.handleRejections) { - this.rejections.handle(); - } - - return this; - } - /** - * Removes the transport from this logger instance by unpiping from it. - * @param {mixed} transport - TODO: add param description. - * @returns {Logger} - TODO: add return description. - */ - - }, { - key: "remove", - value: function remove(transport) { - if (!transport) return this; - var target = transport; - - if (!isStream(transport) || transport.log.length > 2) { - target = this.transports.filter(function (match) { - return match.transport === transport; - })[0]; - } - - if (target) { - this.unpipe(target); - } - - return this; - } - /** - * Removes all transports from this logger instance. - * @returns {Logger} - TODO: add return description. - */ - - }, { - key: "clear", - value: function clear() { - this.unpipe(); - return this; - } - /** - * Cleans up resources (streams, event listeners) for all transports - * associated with this instance (if necessary). - * @returns {Logger} - TODO: add return description. - */ - - }, { - key: "close", - value: function close() { - this.clear(); - this.emit('close'); - return this; - } - /** - * Sets the `target` levels specified on this instance. - * @param {Object} Target levels to use on this instance. - */ - - }, { - key: "setLevels", - value: function setLevels() { - warn.deprecated('setLevels'); - } - /** - * Queries the all transports for this instance with the specified `options`. - * This will aggregate each transport's results into one object containing - * a property per transport. - * @param {Object} options - Query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - */ - - }, { - key: "query", - value: function query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = options || {}; - var results = {}; - var queryObject = Object.assign({}, options.query || {}); // Helper function to query a single transport - - function queryTransport(transport, next) { - if (options.query && typeof transport.formatQuery === 'function') { - options.query = transport.formatQuery(queryObject); - } - - transport.query(options, function (err, res) { - if (err) { - return next(err); - } - - if (typeof transport.formatResults === 'function') { - res = transport.formatResults(res, options.format); - } - - next(null, res); - }); - } // Helper function to accumulate the results from `queryTransport` into - // the `results`. - - - function addResults(transport, next) { - queryTransport(transport, function (err, result) { - // queryTransport could potentially invoke the callback multiple times - // since Transport code can be unpredictable. - if (next) { - result = err || result; - - if (result) { - results[transport.name] = result; - } // eslint-disable-next-line callback-return - - - next(); - } - - next = null; - }); - } // Iterate over the transports in parallel setting the appropriate key in - // the `results`. - - - asyncForEach(this.transports.filter(function (transport) { - return !!transport.query; - }), addResults, function () { - return callback(null, results); - }); - } - /** - * Returns a log stream for all transports. Options object is optional. - * @param{Object} options={} - Stream options for this instance. - * @returns {Stream} - TODO: add return description. - */ - - }, { - key: "stream", - value: function stream() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var out = new Stream(); - var streams = []; - out._streams = streams; - - out.destroy = function () { - var i = streams.length; - - while (i--) { - streams[i].destroy(); - } - }; // Create a list of all transports for this instance. - - - this.transports.filter(function (transport) { - return !!transport.stream; - }).forEach(function (transport) { - var str = transport.stream(options); - - if (!str) { - return; - } - - streams.push(str); - str.on('log', function (log) { - log.transport = log.transport || []; - log.transport.push(transport.name); - out.emit('log', log); - }); - str.on('error', function (err) { - err.transport = err.transport || []; - err.transport.push(transport.name); - out.emit('error', err); - }); - }); - return out; - } - /** - * Returns an object corresponding to a specific timing. When done is called - * the timer will finish and log the duration. e.g.: - * @returns {Profile} - TODO: add return description. - * @example - * const timer = winston.startTimer() - * setTimeout(() => { - * timer.done({ - * message: 'Logging message' - * }); - * }, 1000); - */ - - }, { - key: "startTimer", - value: function startTimer() { - return new Profiler(this); - } - /** - * Tracks the time inbetween subsequent calls to this method with the same - * `id` parameter. The second call to this method will log the difference in - * milliseconds along with the message. - * @param {string} id Unique id of the profiler - * @returns {Logger} - TODO: add return description. - */ - - }, { - key: "profile", - value: function profile(id) { - var time = Date.now(); - - if (this.profilers[id]) { - var timeEnd = this.profilers[id]; - delete this.profilers[id]; // Attempt to be kind to users if they are still using older APIs. - - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - if (typeof args[args.length - 2] === 'function') { - // eslint-disable-next-line no-console - console.warn('Callback function no longer supported as of winston@3.0.0'); - args.pop(); - } // Set the duration property of the metadata - - - var info = _typeof(args[args.length - 1]) === 'object' ? args.pop() : {}; - info.level = info.level || 'info'; - info.durationMs = time - timeEnd; - info.message = info.message || id; - return this.write(info); - } - - this.profilers[id] = time; - return this; - } - /** - * Backwards compatibility to `exceptions.handle` in winston < 3.0.0. - * @returns {undefined} - * @deprecated - */ - - }, { - key: "handleExceptions", - value: function handleExceptions() { - var _this$exceptions; - - // eslint-disable-next-line no-console - console.warn('Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()'); - - (_this$exceptions = this.exceptions).handle.apply(_this$exceptions, arguments); - } - /** - * Backwards compatibility to `exceptions.handle` in winston < 3.0.0. - * @returns {undefined} - * @deprecated - */ - - }, { - key: "unhandleExceptions", - value: function unhandleExceptions() { - var _this$exceptions2; - - // eslint-disable-next-line no-console - console.warn('Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()'); - - (_this$exceptions2 = this.exceptions).unhandle.apply(_this$exceptions2, arguments); - } - /** - * Throw a more meaningful deprecation notice - * @throws {Error} - TODO: add throws description. - */ - - }, { - key: "cli", - value: function cli() { - throw new Error(['Logger.cli() was removed in winston@3.0.0', 'Use a custom winston.formats.cli() instead.', 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'].join('\n')); - } - /** - * Bubbles the `event` that occured on the specified `transport` up - * from this instance. - * @param {string} event - The event that occured - * @param {Object} transport - Transport on which the event occured - * @private - */ - - }, { - key: "_onEvent", - value: function _onEvent(event, transport) { - function transportEvent(err) { - // https://github.com/winstonjs/winston/issues/1364 - if (event === 'error' && !this.transports.includes(transport)) { - this.add(transport); - } - - this.emit(event, err, transport); - } - - if (!transport['__winston' + event]) { - transport['__winston' + event] = transportEvent.bind(this); - transport.on(event, transport['__winston' + event]); - } - } - }, { - key: "_addDefaultMeta", - value: function _addDefaultMeta(msg) { - if (this.defaultMeta) { - Object.assign(msg, this.defaultMeta); - } - } - }]); - - return Logger; -}(Transform); - -function getLevelValue(levels, level) { - var value = levels[level]; - - if (!value && value !== 0) { - return null; - } - - return value; -} -/** - * Represents the current readableState pipe targets for this Logger instance. - * @type {Array|Object} - */ - - -Object.defineProperty(Logger.prototype, 'transports', { - configurable: false, - enumerable: true, - get: function get() { - var pipes = this._readableState.pipes; - return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes; - } -}); -module.exports = Logger; \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/profiler.js b/general/nvim/node_modules/winston/dist/winston/profiler.js deleted file mode 100644 index 236f6e4..0000000 --- a/general/nvim/node_modules/winston/dist/winston/profiler.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * profiler.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; -/** - * TODO: add class description. - * @type {Profiler} - * @private - */ - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -module.exports = /*#__PURE__*/function () { - /** - * Constructor function for the Profiler instance used by - * `Logger.prototype.startTimer`. When done is called the timer will finish - * and log the duration. - * @param {!Logger} logger - TODO: add param description. - * @private - */ - function Profiler(logger) { - _classCallCheck(this, Profiler); - - if (!logger) { - throw new Error('Logger is required for profiling.'); - } - - this.logger = logger; - this.start = Date.now(); - } - /** - * Ends the current timer (i.e. Profiler) instance and logs the `msg` along - * with the duration since creation. - * @returns {mixed} - TODO: add return description. - * @private - */ - - - _createClass(Profiler, [{ - key: "done", - value: function done() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - if (typeof args[args.length - 1] === 'function') { - // eslint-disable-next-line no-console - console.warn('Callback function no longer supported as of winston@3.0.0'); - args.pop(); - } - - var info = _typeof(args[args.length - 1]) === 'object' ? args.pop() : {}; - info.level = info.level || 'info'; - info.durationMs = Date.now() - this.start; - return this.logger.write(info); - } - }]); - - return Profiler; -}(); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/rejection-handler.js b/general/nvim/node_modules/winston/dist/winston/rejection-handler.js deleted file mode 100644 index 36cd3d8..0000000 --- a/general/nvim/node_modules/winston/dist/winston/rejection-handler.js +++ /dev/null @@ -1,288 +0,0 @@ -/** - * exception-handler.js: Object for handling uncaughtException events. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var os = require('os'); - -var asyncForEach = require('async/forEach'); - -var debug = require('@dabh/diagnostics')('winston:rejection'); - -var once = require('one-time'); - -var stackTrace = require('stack-trace'); - -var ExceptionStream = require('./exception-stream'); -/** - * Object for handling unhandledRejection events. - * @type {RejectionHandler} - */ - - -module.exports = /*#__PURE__*/function () { - /** - * TODO: add contructor description - * @param {!Logger} logger - TODO: add param description - */ - function RejectionHandler(logger) { - _classCallCheck(this, RejectionHandler); - - if (!logger) { - throw new Error('Logger is required to handle rejections'); - } - - this.logger = logger; - this.handlers = new Map(); - } - /** - * Handles `unhandledRejection` events for the current process by adding any - * handlers passed in. - * @returns {undefined} - */ - - - _createClass(RejectionHandler, [{ - key: "handle", - value: function handle() { - var _this = this; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - args.forEach(function (arg) { - if (Array.isArray(arg)) { - return arg.forEach(function (handler) { - return _this._addHandler(handler); - }); - } - - _this._addHandler(arg); - }); - - if (!this.catcher) { - this.catcher = this._unhandledRejection.bind(this); - process.on('unhandledRejection', this.catcher); - } - } - /** - * Removes any handlers to `unhandledRejection` events for the current - * process. This does not modify the state of the `this.handlers` set. - * @returns {undefined} - */ - - }, { - key: "unhandle", - value: function unhandle() { - var _this2 = this; - - if (this.catcher) { - process.removeListener('unhandledRejection', this.catcher); - this.catcher = false; - Array.from(this.handlers.values()).forEach(function (wrapper) { - return _this2.logger.unpipe(wrapper); - }); - } - } - /** - * TODO: add method description - * @param {Error} err - Error to get information about. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getAllInfo", - value: function getAllInfo(err) { - var message = err.message; - - if (!message && typeof err === 'string') { - message = err; - } - - return { - error: err, - // TODO (indexzero): how do we configure this? - level: 'error', - message: ["unhandledRejection: ".concat(message || '(no error message)'), err.stack || ' No stack trace'].join('\n'), - stack: err.stack, - exception: true, - date: new Date().toString(), - process: this.getProcessInfo(), - os: this.getOsInfo(), - trace: this.getTrace(err) - }; - } - /** - * Gets all relevant process information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getProcessInfo", - value: function getProcessInfo() { - return { - pid: process.pid, - uid: process.getuid ? process.getuid() : null, - gid: process.getgid ? process.getgid() : null, - cwd: process.cwd(), - execPath: process.execPath, - version: process.version, - argv: process.argv, - memoryUsage: process.memoryUsage() - }; - } - /** - * Gets all relevant OS information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getOsInfo", - value: function getOsInfo() { - return { - loadavg: os.loadavg(), - uptime: os.uptime() - }; - } - /** - * Gets a stack trace for the specified error. - * @param {mixed} err - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "getTrace", - value: function getTrace(err) { - var trace = err ? stackTrace.parse(err) : stackTrace.get(); - return trace.map(function (site) { - return { - column: site.getColumnNumber(), - file: site.getFileName(), - "function": site.getFunctionName(), - line: site.getLineNumber(), - method: site.getMethodName(), - "native": site.isNative() - }; - }); - } - /** - * Helper method to add a transport as an exception handler. - * @param {Transport} handler - The transport to add as an exception handler. - * @returns {void} - */ - - }, { - key: "_addHandler", - value: function _addHandler(handler) { - if (!this.handlers.has(handler)) { - handler.handleRejections = true; - var wrapper = new ExceptionStream(handler); - this.handlers.set(handler, wrapper); - this.logger.pipe(wrapper); - } - } - /** - * Logs all relevant information around the `err` and exits the current - * process. - * @param {Error} err - Error to handle - * @returns {mixed} - TODO: add return description. - * @private - */ - - }, { - key: "_unhandledRejection", - value: function _unhandledRejection(err) { - var info = this.getAllInfo(err); - - var handlers = this._getRejectionHandlers(); // Calculate if we should exit on this error - - - var doExit = typeof this.logger.exitOnError === 'function' ? this.logger.exitOnError(err) : this.logger.exitOnError; - var timeout; - - if (!handlers.length && doExit) { - // eslint-disable-next-line no-console - console.warn('winston: exitOnError cannot be true with no rejection handlers.'); // eslint-disable-next-line no-console - - console.warn('winston: not exiting process.'); - doExit = false; - } - - function gracefulExit() { - debug('doExit', doExit); - debug('process._exiting', process._exiting); - - if (doExit && !process._exiting) { - // Remark: Currently ignoring any rejections from transports when - // catching unhandled rejections. - if (timeout) { - clearTimeout(timeout); - } // eslint-disable-next-line no-process-exit - - - process.exit(1); - } - } - - if (!handlers || handlers.length === 0) { - return process.nextTick(gracefulExit); - } // Log to all transports attempting to listen for when they are completed. - - - asyncForEach(handlers, function (handler, next) { - var done = once(next); - var transport = handler.transport || handler; // Debug wrapping so that we can inspect what's going on under the covers. - - function onDone(event) { - return function () { - debug(event); - done(); - }; - } - - transport._ending = true; - transport.once('finish', onDone('finished')); - transport.once('error', onDone('error')); - }, function () { - return doExit && gracefulExit(); - }); - this.logger.log(info); // If exitOnError is true, then only allow the logging of exceptions to - // take up to `3000ms`. - - if (doExit) { - timeout = setTimeout(gracefulExit, 3000); - } - } - /** - * Returns the list of transports and exceptionHandlers for this instance. - * @returns {Array} - List of transports and exceptionHandlers for this - * instance. - * @private - */ - - }, { - key: "_getRejectionHandlers", - value: function _getRejectionHandlers() { - // Remark (indexzero): since `logger.transports` returns all of the pipes - // from the _readableState of the stream we actually get the join of the - // explicit handlers and the implicit transports with - // `handleRejections: true` - return this.logger.transports.filter(function (wrap) { - var transport = wrap.transport || wrap; - return transport.handleRejections; - }); - } - }]); - - return RejectionHandler; -}(); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/tail-file.js b/general/nvim/node_modules/winston/dist/winston/tail-file.js deleted file mode 100644 index 5a6b9fc..0000000 --- a/general/nvim/node_modules/winston/dist/winston/tail-file.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * tail-file.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -var fs = require('fs'); - -var _require = require('string_decoder'), - StringDecoder = _require.StringDecoder; - -var _require2 = require('readable-stream'), - Stream = _require2.Stream; -/** - * Simple no-op function. - * @returns {undefined} - */ - - -function noop() {} -/** - * TODO: add function description. - * @param {Object} options - Options for tail. - * @param {function} iter - Iterator function to execute on every line. -* `tail -f` a file. Options must include file. - * @returns {mixed} - TODO: add return description. - */ - - -module.exports = function (options, iter) { - var buffer = Buffer.alloc(64 * 1024); - var decode = new StringDecoder('utf8'); - var stream = new Stream(); - var buff = ''; - var pos = 0; - var row = 0; - - if (options.start === -1) { - delete options.start; - } - - stream.readable = true; - - stream.destroy = function () { - stream.destroyed = true; - stream.emit('end'); - stream.emit('close'); - }; - - fs.open(options.file, 'a+', '0644', function (err, fd) { - if (err) { - if (!iter) { - stream.emit('error', err); - } else { - iter(err); - } - - stream.destroy(); - return; - } - - (function read() { - if (stream.destroyed) { - fs.close(fd, noop); - return; - } - - return fs.read(fd, buffer, 0, buffer.length, pos, function (error, bytes) { - if (error) { - if (!iter) { - stream.emit('error', error); - } else { - iter(error); - } - - stream.destroy(); - return; - } - - if (!bytes) { - if (buff) { - // eslint-disable-next-line eqeqeq - if (options.start == null || row > options.start) { - if (!iter) { - stream.emit('line', buff); - } else { - iter(null, buff); - } - } - - row++; - buff = ''; - } - - return setTimeout(read, 1000); - } - - var data = decode.write(buffer.slice(0, bytes)); - - if (!iter) { - stream.emit('data', data); - } - - data = (buff + data).split(/\n+/); - var l = data.length - 1; - var i = 0; - - for (; i < l; i++) { - // eslint-disable-next-line eqeqeq - if (options.start == null || row > options.start) { - if (!iter) { - stream.emit('line', data[i]); - } else { - iter(null, data[i]); - } - } - - row++; - } - - buff = data[l]; - pos += bytes; - return read(); - }); - })(); - }); - - if (!iter) { - return stream; - } - - return stream.destroy; -}; \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/transports/console.js b/general/nvim/node_modules/winston/dist/winston/transports/console.js deleted file mode 100644 index c58394a..0000000 --- a/general/nvim/node_modules/winston/dist/winston/transports/console.js +++ /dev/null @@ -1,166 +0,0 @@ -/* eslint-disable no-console */ - -/* - * console.js: Transport for outputting to the console. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var os = require('os'); - -var _require = require('triple-beam'), - LEVEL = _require.LEVEL, - MESSAGE = _require.MESSAGE; - -var TransportStream = require('winston-transport'); -/** - * Transport for outputting to the console. - * @type {Console} - * @extends {TransportStream} - */ - - -module.exports = /*#__PURE__*/function (_TransportStream) { - _inherits(Console, _TransportStream); - - var _super = _createSuper(Console); - - /** - * Constructor function for the Console transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - function Console() { - var _this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Console); - - _this = _super.call(this, options); // Expose the name of this Transport on the prototype - - _this.name = options.name || 'console'; - _this.stderrLevels = _this._stringArrayToSet(options.stderrLevels); - _this.consoleWarnLevels = _this._stringArrayToSet(options.consoleWarnLevels); - _this.eol = options.eol || os.EOL; - - _this.setMaxListeners(30); - - return _this; - } - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - - - _createClass(Console, [{ - key: "log", - value: function log(info, callback) { - var _this2 = this; - - setImmediate(function () { - return _this2.emit('logged', info); - }); // Remark: what if there is no raw...? - - if (this.stderrLevels[info[LEVEL]]) { - if (console._stderr) { - // Node.js maps `process.stderr` to `console._stderr`. - console._stderr.write("".concat(info[MESSAGE]).concat(this.eol)); - } else { - // console.error adds a newline - console.error(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - - return; - } else if (this.consoleWarnLevels[info[LEVEL]]) { - if (console._stderr) { - // Node.js maps `process.stderr` to `console._stderr`. - // in Node.js console.warn is an alias for console.error - console._stderr.write("".concat(info[MESSAGE]).concat(this.eol)); - } else { - // console.warn adds a newline - console.warn(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - - return; - } - - if (console._stdout) { - // Node.js maps `process.stdout` to `console._stdout`. - console._stdout.write("".concat(info[MESSAGE]).concat(this.eol)); - } else { - // console.log adds a newline. - console.log(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - } - /** - * Returns a Set-like object with strArray's elements as keys (each with the - * value true). - * @param {Array} strArray - Array of Set-elements as strings. - * @param {?string} [errMsg] - Custom error message thrown on invalid input. - * @returns {Object} - TODO: add return description. - * @private - */ - - }, { - key: "_stringArrayToSet", - value: function _stringArrayToSet(strArray, errMsg) { - if (!strArray) return {}; - errMsg = errMsg || 'Cannot make set from type other than Array of string elements'; - - if (!Array.isArray(strArray)) { - throw new Error(errMsg); - } - - return strArray.reduce(function (set, el) { - if (typeof el !== 'string') { - throw new Error(errMsg); - } - - set[el] = true; - return set; - }, {}); - } - }]); - - return Console; -}(TransportStream); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/transports/file.js b/general/nvim/node_modules/winston/dist/winston/transports/file.js deleted file mode 100644 index ddeacd0..0000000 --- a/general/nvim/node_modules/winston/dist/winston/transports/file.js +++ /dev/null @@ -1,817 +0,0 @@ -/* eslint-disable complexity,max-statements */ - -/** - * file.js: Transport for outputting to a local log file. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var fs = require('fs'); - -var path = require('path'); - -var asyncSeries = require('async/series'); - -var zlib = require('zlib'); - -var _require = require('triple-beam'), - MESSAGE = _require.MESSAGE; - -var _require2 = require('readable-stream'), - Stream = _require2.Stream, - PassThrough = _require2.PassThrough; - -var TransportStream = require('winston-transport'); - -var debug = require('@dabh/diagnostics')('winston:file'); - -var os = require('os'); - -var tailFile = require('../tail-file'); -/** - * Transport for outputting to a local log file. - * @type {File} - * @extends {TransportStream} - */ - - -module.exports = /*#__PURE__*/function (_TransportStream) { - _inherits(File, _TransportStream); - - var _super = _createSuper(File); - - /** - * Constructor function for the File transport object responsible for - * persisting log messages and metadata to one or more files. - * @param {Object} options - Options for this instance. - */ - function File() { - var _this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, File); - - _this = _super.call(this, options); // Expose the name of this Transport on the prototype. - - _this.name = options.name || 'file'; // Helper function which throws an `Error` in the event that any of the - // rest of the arguments is present in `options`. - - function throwIf(target) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - args.slice(1).forEach(function (name) { - if (options[name]) { - throw new Error("Cannot set ".concat(name, " and ").concat(target, " together")); - } - }); - } // Setup the base stream that always gets piped to to handle buffering. - - - _this._stream = new PassThrough(); - - _this._stream.setMaxListeners(30); // Bind this context for listener methods. - - - _this._onError = _this._onError.bind(_assertThisInitialized(_this)); - - if (options.filename || options.dirname) { - throwIf('filename or dirname', 'stream'); - _this._basename = _this.filename = options.filename ? path.basename(options.filename) : 'winston.log'; - _this.dirname = options.dirname || path.dirname(options.filename); - _this.options = options.options || { - flags: 'a' - }; - } else if (options.stream) { - // eslint-disable-next-line no-console - console.warn('options.stream will be removed in winston@4. Use winston.transports.Stream'); - throwIf('stream', 'filename', 'maxsize'); - _this._dest = _this._stream.pipe(_this._setupStream(options.stream)); - _this.dirname = path.dirname(_this._dest.path); // We need to listen for drain events when write() returns false. This - // can make node mad at times. - } else { - throw new Error('Cannot log to file without filename or stream.'); - } - - _this.maxsize = options.maxsize || null; - _this.rotationFormat = options.rotationFormat || false; - _this.zippedArchive = options.zippedArchive || false; - _this.maxFiles = options.maxFiles || null; - _this.eol = options.eol || os.EOL; - _this.tailable = options.tailable || false; // Internal state variables representing the number of files this instance - // has created and the current size (in bytes) of the current logfile. - - _this._size = 0; - _this._pendingSize = 0; - _this._created = 0; - _this._drain = false; - _this._opening = false; - _this._ending = false; - if (_this.dirname) _this._createLogDirIfNotExist(_this.dirname); - - _this.open(); - - return _this; - } - - _createClass(File, [{ - key: "finishIfEnding", - value: function finishIfEnding() { - var _this2 = this; - - if (this._ending) { - if (this._opening) { - this.once('open', function () { - _this2._stream.once('finish', function () { - return _this2.emit('finish'); - }); - - setImmediate(function () { - return _this2._stream.end(); - }); - }); - } else { - this._stream.once('finish', function () { - return _this2.emit('finish'); - }); - - setImmediate(function () { - return _this2._stream.end(); - }); - } - } - } - /** - * Core logging method exposed to Winston. Metadata is optional. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - - }, { - key: "log", - value: function log(info) { - var _this3 = this; - - var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; - - // Remark: (jcrugzz) What is necessary about this callback(null, true) now - // when thinking about 3.x? Should silent be handled in the base - // TransportStream _write method? - if (this.silent) { - callback(); - return true; - } // Output stream buffer is full and has asked us to wait for the drain event - - - if (this._drain) { - this._stream.once('drain', function () { - _this3._drain = false; - - _this3.log(info, callback); - }); - - return; - } - - if (this._rotate) { - this._stream.once('rotate', function () { - _this3._rotate = false; - - _this3.log(info, callback); - }); - - return; - } // Grab the raw string and append the expected EOL. - - - var output = "".concat(info[MESSAGE]).concat(this.eol); - var bytes = Buffer.byteLength(output); // After we have written to the PassThrough check to see if we need - // to rotate to the next file. - // - // Remark: This gets called too early and does not depict when data - // has been actually flushed to disk. - - function logged() { - var _this4 = this; - - this._size += bytes; - this._pendingSize -= bytes; - debug('logged %s %s', this._size, output); - this.emit('logged', info); // Do not attempt to rotate files while opening - - if (this._opening) { - return; - } // Check to see if we need to end the stream and create a new one. - - - if (!this._needsNewFile()) { - return; - } // End the current stream, ensure it flushes and create a new one. - // This could potentially be optimized to not run a stat call but its - // the safest way since we are supporting `maxFiles`. - - - this._rotate = true; - - this._endStream(function () { - return _this4._rotateFile(); - }); - } // Keep track of the pending bytes being written while files are opening - // in order to properly rotate the PassThrough this._stream when the file - // eventually does open. - - - this._pendingSize += bytes; - - if (this._opening && !this.rotatedWhileOpening && this._needsNewFile(this._size + this._pendingSize)) { - this.rotatedWhileOpening = true; - } - - var written = this._stream.write(output, logged.bind(this)); - - if (!written) { - this._drain = true; - - this._stream.once('drain', function () { - _this3._drain = false; - callback(); - }); - } else { - callback(); // eslint-disable-line callback-return - } - - debug('written', written, this._drain); - this.finishIfEnding(); - return written; - } - /** - * Query the transport. Options object is optional. - * @param {Object} options - Loggly-like query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - * TODO: Refactor me. - */ - - }, { - key: "query", - value: function query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = normalizeQuery(options); - var file = path.join(this.dirname, this.filename); - var buff = ''; - var results = []; - var row = 0; - var stream = fs.createReadStream(file, { - encoding: 'utf8' - }); - stream.on('error', function (err) { - if (stream.readable) { - stream.destroy(); - } - - if (!callback) { - return; - } - - return err.code !== 'ENOENT' ? callback(err) : callback(null, results); - }); - stream.on('data', function (data) { - data = (buff + data).split(/\n+/); - var l = data.length - 1; - var i = 0; - - for (; i < l; i++) { - if (!options.start || row >= options.start) { - add(data[i]); - } - - row++; - } - - buff = data[l]; - }); - stream.on('close', function () { - if (buff) { - add(buff, true); - } - - if (options.order === 'desc') { - results = results.reverse(); - } // eslint-disable-next-line callback-return - - - if (callback) callback(null, results); - }); - - function add(buff, attempt) { - try { - var log = JSON.parse(buff); - - if (check(log)) { - push(log); - } - } catch (e) { - if (!attempt) { - stream.emit('error', e); - } - } - } - - function push(log) { - if (options.rows && results.length >= options.rows && options.order !== 'desc') { - if (stream.readable) { - stream.destroy(); - } - - return; - } - - if (options.fields) { - log = options.fields.reduce(function (obj, key) { - obj[key] = log[key]; - return obj; - }, {}); - } - - if (options.order === 'desc') { - if (results.length >= options.rows) { - results.shift(); - } - } - - results.push(log); - } - - function check(log) { - if (!log) { - return; - } - - if (_typeof(log) !== 'object') { - return; - } - - var time = new Date(log.timestamp); - - if (options.from && time < options.from || options.until && time > options.until || options.level && options.level !== log.level) { - return; - } - - return true; - } - - function normalizeQuery(options) { - options = options || {}; // limit - - options.rows = options.rows || options.limit || 10; // starting row offset - - options.start = options.start || 0; // now - - options.until = options.until || new Date(); - - if (_typeof(options.until) !== 'object') { - options.until = new Date(options.until); - } // now - 24 - - - options.from = options.from || options.until - 24 * 60 * 60 * 1000; - - if (_typeof(options.from) !== 'object') { - options.from = new Date(options.from); - } // 'asc' or 'desc' - - - options.order = options.order || 'desc'; - return options; - } - } - /** - * Returns a log stream for this transport. Options object is optional. - * @param {Object} options - Stream options for this instance. - * @returns {Stream} - TODO: add return description. - * TODO: Refactor me. - */ - - }, { - key: "stream", - value: function stream() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var file = path.join(this.dirname, this.filename); - var stream = new Stream(); - var tail = { - file: file, - start: options.start - }; - stream.destroy = tailFile(tail, function (err, line) { - if (err) { - return stream.emit('error', err); - } - - try { - stream.emit('data', line); - line = JSON.parse(line); - stream.emit('log', line); - } catch (e) { - stream.emit('error', e); - } - }); - return stream; - } - /** - * Checks to see the filesize of. - * @returns {undefined} - */ - - }, { - key: "open", - value: function open() { - var _this5 = this; - - // If we do not have a filename then we were passed a stream and - // don't need to keep track of size. - if (!this.filename) return; - if (this._opening) return; - this._opening = true; // Stat the target file to get the size and create the stream. - - this.stat(function (err, size) { - if (err) { - return _this5.emit('error', err); - } - - debug('stat done: %s { size: %s }', _this5.filename, size); - _this5._size = size; - _this5._dest = _this5._createStream(_this5._stream); - _this5._opening = false; - - _this5.once('open', function () { - if (_this5._stream.eventNames().includes('rotate')) { - _this5._stream.emit('rotate'); - } else { - _this5._rotate = false; - } - }); - }); - } - /** - * Stat the file and assess information in order to create the proper stream. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - - }, { - key: "stat", - value: function stat(callback) { - var _this6 = this; - - var target = this._getFile(); - - var fullpath = path.join(this.dirname, target); - fs.stat(fullpath, function (err, stat) { - if (err && err.code === 'ENOENT') { - debug('ENOENT ok', fullpath); // Update internally tracked filename with the new target name. - - _this6.filename = target; - return callback(null, 0); - } - - if (err) { - debug("err ".concat(err.code, " ").concat(fullpath)); - return callback(err); - } - - if (!stat || _this6._needsNewFile(stat.size)) { - // If `stats.size` is greater than the `maxsize` for this - // instance then try again. - return _this6._incFile(function () { - return _this6.stat(callback); - }); - } // Once we have figured out what the filename is, set it - // and return the size. - - - _this6.filename = target; - callback(null, stat.size); - }); - } - /** - * Closes the stream associated with this instance. - * @param {function} cb - TODO: add param description. - * @returns {undefined} - */ - - }, { - key: "close", - value: function close(cb) { - var _this7 = this; - - if (!this._stream) { - return; - } - - this._stream.end(function () { - if (cb) { - cb(); // eslint-disable-line callback-return - } - - _this7.emit('flush'); - - _this7.emit('closed'); - }); - } - /** - * TODO: add method description. - * @param {number} size - TODO: add param description. - * @returns {undefined} - */ - - }, { - key: "_needsNewFile", - value: function _needsNewFile(size) { - size = size || this._size; - return this.maxsize && size >= this.maxsize; - } - /** - * TODO: add method description. - * @param {Error} err - TODO: add param description. - * @returns {undefined} - */ - - }, { - key: "_onError", - value: function _onError(err) { - this.emit('error', err); - } - /** - * TODO: add method description. - * @param {Stream} stream - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "_setupStream", - value: function _setupStream(stream) { - stream.on('error', this._onError); - return stream; - } - /** - * TODO: add method description. - * @param {Stream} stream - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - - }, { - key: "_cleanupStream", - value: function _cleanupStream(stream) { - stream.removeListener('error', this._onError); - return stream; - } - /** - * TODO: add method description. - */ - - }, { - key: "_rotateFile", - value: function _rotateFile() { - var _this8 = this; - - this._incFile(function () { - return _this8.open(); - }); - } - /** - * Unpipe from the stream that has been marked as full and end it so it - * flushes to disk. - * - * @param {function} callback - Callback for when the current file has closed. - * @private - */ - - }, { - key: "_endStream", - value: function _endStream() { - var _this9 = this; - - var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; - - if (this._dest) { - this._stream.unpipe(this._dest); - - this._dest.end(function () { - _this9._cleanupStream(_this9._dest); - - callback(); - }); - } else { - callback(); // eslint-disable-line callback-return - } - } - /** - * Returns the WritableStream for the active file on this instance. If we - * should gzip the file then a zlib stream is returned. - * - * @param {ReadableStream} source – PassThrough to pipe to the file when open. - * @returns {WritableStream} Stream that writes to disk for the active file. - */ - - }, { - key: "_createStream", - value: function _createStream(source) { - var _this10 = this; - - var fullpath = path.join(this.dirname, this.filename); - debug('create stream start', fullpath, this.options); - var dest = fs.createWriteStream(fullpath, this.options) // TODO: What should we do with errors here? - .on('error', function (err) { - return debug(err); - }).on('close', function () { - return debug('close', dest.path, dest.bytesWritten); - }).on('open', function () { - debug('file open ok', fullpath); - - _this10.emit('open', fullpath); - - source.pipe(dest); // If rotation occured during the open operation then we immediately - // start writing to a new PassThrough, begin opening the next file - // and cleanup the previous source and dest once the source has drained. - - if (_this10.rotatedWhileOpening) { - _this10._stream = new PassThrough(); - - _this10._stream.setMaxListeners(30); - - _this10._rotateFile(); - - _this10.rotatedWhileOpening = false; - - _this10._cleanupStream(dest); - - source.end(); - } - }); - debug('create stream ok', fullpath); - - if (this.zippedArchive) { - var gzip = zlib.createGzip(); - gzip.pipe(dest); - return gzip; - } - - return dest; - } - /** - * TODO: add method description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - - }, { - key: "_incFile", - value: function _incFile(callback) { - debug('_incFile', this.filename); - var ext = path.extname(this._basename); - var basename = path.basename(this._basename, ext); - - if (!this.tailable) { - this._created += 1; - - this._checkMaxFilesIncrementing(ext, basename, callback); - } else { - this._checkMaxFilesTailable(ext, basename, callback); - } - } - /** - * Gets the next filename to use for this instance in the case that log - * filesizes are being capped. - * @returns {string} - TODO: add return description. - * @private - */ - - }, { - key: "_getFile", - value: function _getFile() { - var ext = path.extname(this._basename); - var basename = path.basename(this._basename, ext); - var isRotation = this.rotationFormat ? this.rotationFormat() : this._created; // Caveat emptor (indexzero): rotationFormat() was broken by design When - // combined with max files because the set of files to unlink is never - // stored. - - var target = !this.tailable && this._created ? "".concat(basename).concat(isRotation).concat(ext) : "".concat(basename).concat(ext); - return this.zippedArchive && !this.tailable ? "".concat(target, ".gz") : target; - } - /** - * Increment the number of files created or checked by this instance. - * @param {mixed} ext - TODO: add param description. - * @param {mixed} basename - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {undefined} - * @private - */ - - }, { - key: "_checkMaxFilesIncrementing", - value: function _checkMaxFilesIncrementing(ext, basename, callback) { - // Check for maxFiles option and delete file. - if (!this.maxFiles || this._created < this.maxFiles) { - return setImmediate(callback); - } - - var oldest = this._created - this.maxFiles; - var isOldest = oldest !== 0 ? oldest : ''; - var isZipped = this.zippedArchive ? '.gz' : ''; - var filePath = "".concat(basename).concat(isOldest).concat(ext).concat(isZipped); - var target = path.join(this.dirname, filePath); - fs.unlink(target, callback); - } - /** - * Roll files forward based on integer, up to maxFiles. e.g. if base if - * file.log and it becomes oversized, roll to file1.log, and allow file.log - * to be re-used. If file is oversized again, roll file1.log to file2.log, - * roll file.log to file1.log, and so on. - * @param {mixed} ext - TODO: add param description. - * @param {mixed} basename - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {undefined} - * @private - */ - - }, { - key: "_checkMaxFilesTailable", - value: function _checkMaxFilesTailable(ext, basename, callback) { - var _this12 = this; - - var tasks = []; - - if (!this.maxFiles) { - return; - } // const isZipped = this.zippedArchive ? '.gz' : ''; - - - var isZipped = this.zippedArchive ? '.gz' : ''; - - for (var x = this.maxFiles - 1; x > 1; x--) { - tasks.push(function (i, cb) { - var _this11 = this; - - var fileName = "".concat(basename).concat(i - 1).concat(ext).concat(isZipped); - var tmppath = path.join(this.dirname, fileName); - fs.exists(tmppath, function (exists) { - if (!exists) { - return cb(null); - } - - fileName = "".concat(basename).concat(i).concat(ext).concat(isZipped); - fs.rename(tmppath, path.join(_this11.dirname, fileName), cb); - }); - }.bind(this, x)); - } - - asyncSeries(tasks, function () { - fs.rename(path.join(_this12.dirname, "".concat(basename).concat(ext)), path.join(_this12.dirname, "".concat(basename, "1").concat(ext).concat(isZipped)), callback); - }); - } - }, { - key: "_createLogDirIfNotExist", - value: function _createLogDirIfNotExist(dirPath) { - /* eslint-disable no-sync */ - if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { - recursive: true - }); - } - /* eslint-enable no-sync */ - - } - }]); - - return File; -}(TransportStream); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/transports/http.js b/general/nvim/node_modules/winston/dist/winston/transports/http.js deleted file mode 100644 index b9a4135..0000000 --- a/general/nvim/node_modules/winston/dist/winston/transports/http.js +++ /dev/null @@ -1,264 +0,0 @@ -/** - * http.js: Transport for outputting to a json-rpcserver. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var http = require('http'); - -var https = require('https'); - -var _require = require('readable-stream'), - Stream = _require.Stream; - -var TransportStream = require('winston-transport'); -/** - * Transport for outputting to a json-rpc server. - * @type {Stream} - * @extends {TransportStream} - */ - - -module.exports = /*#__PURE__*/function (_TransportStream) { - _inherits(Http, _TransportStream); - - var _super = _createSuper(Http); - - /** - * Constructor function for the Http transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - function Http() { - var _this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Http); - - _this = _super.call(this, options); - _this.options = options; - _this.name = options.name || 'http'; - _this.ssl = !!options.ssl; - _this.host = options.host || 'localhost'; - _this.port = options.port; - _this.auth = options.auth; - _this.path = options.path || ''; - _this.agent = options.agent; - _this.headers = options.headers || {}; - _this.headers['content-type'] = 'application/json'; - - if (!_this.port) { - _this.port = _this.ssl ? 443 : 80; - } - - return _this; - } - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - - - _createClass(Http, [{ - key: "log", - value: function log(info, callback) { - var _this2 = this; - - this._request(info, function (err, res) { - if (res && res.statusCode !== 200) { - err = new Error("Invalid HTTP Status Code: ".concat(res.statusCode)); - } - - if (err) { - _this2.emit('warn', err); - } else { - _this2.emit('logged', info); - } - }); // Remark: (jcrugzz) Fire and forget here so requests dont cause buffering - // and block more requests from happening? - - - if (callback) { - setImmediate(callback); - } - } - /** - * Query the transport. Options object is optional. - * @param {Object} options - Loggly-like query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - * @returns {undefined} - */ - - }, { - key: "query", - value: function query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = { - method: 'query', - params: this.normalizeQuery(options) - }; - - if (options.params.path) { - options.path = options.params.path; - delete options.params.path; - } - - if (options.params.auth) { - options.auth = options.params.auth; - delete options.params.auth; - } - - this._request(options, function (err, res, body) { - if (res && res.statusCode !== 200) { - err = new Error("Invalid HTTP Status Code: ".concat(res.statusCode)); - } - - if (err) { - return callback(err); - } - - if (typeof body === 'string') { - try { - body = JSON.parse(body); - } catch (e) { - return callback(e); - } - } - - callback(null, body); - }); - } - /** - * Returns a log stream for this transport. Options object is optional. - * @param {Object} options - Stream options for this instance. - * @returns {Stream} - TODO: add return description - */ - - }, { - key: "stream", - value: function stream() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var stream = new Stream(); - options = { - method: 'stream', - params: options - }; - - if (options.params.path) { - options.path = options.params.path; - delete options.params.path; - } - - if (options.params.auth) { - options.auth = options.params.auth; - delete options.params.auth; - } - - var buff = ''; - - var req = this._request(options); - - stream.destroy = function () { - return req.destroy(); - }; - - req.on('data', function (data) { - data = (buff + data).split(/\n+/); - var l = data.length - 1; - var i = 0; - - for (; i < l; i++) { - try { - stream.emit('log', JSON.parse(data[i])); - } catch (e) { - stream.emit('error', e); - } - } - - buff = data[l]; - }); - req.on('error', function (err) { - return stream.emit('error', err); - }); - return stream; - } - /** - * Make a request to a winstond server or any http server which can - * handle json-rpc. - * @param {function} options - Options to sent the request. - * @param {function} callback - Continuation to respond to when complete. - */ - - }, { - key: "_request", - value: function _request(options, callback) { - options = options || {}; - var auth = options.auth || this.auth; - var path = options.path || this.path || ''; - delete options.auth; - delete options.path; // Prepare options for outgoing HTTP request - - var headers = Object.assign({}, this.headers); - - if (auth && auth.bearer) { - headers.Authorization = "Bearer ".concat(auth.bearer); - } - - var req = (this.ssl ? https : http).request(_objectSpread(_objectSpread({}, this.options), {}, { - method: 'POST', - host: this.host, - port: this.port, - path: "/".concat(path.replace(/^\//, '')), - headers: headers, - auth: auth && auth.username && auth.password ? "".concat(auth.username, ":").concat(auth.password) : '', - agent: this.agent - })); - req.on('error', callback); - req.on('response', function (res) { - return res.on('end', function () { - return callback(null, res); - }).resume(); - }); - req.end(Buffer.from(JSON.stringify(options), 'utf8')); - } - }]); - - return Http; -}(TransportStream); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/transports/index.js b/general/nvim/node_modules/winston/dist/winston/transports/index.js deleted file mode 100644 index d8b8aa7..0000000 --- a/general/nvim/node_modules/winston/dist/winston/transports/index.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * transports.js: Set of all transports Winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; -/** - * TODO: add property description. - * @type {Console} - */ - -Object.defineProperty(exports, 'Console', { - configurable: true, - enumerable: true, - get: function get() { - return require('./console'); - } -}); -/** - * TODO: add property description. - * @type {File} - */ - -Object.defineProperty(exports, 'File', { - configurable: true, - enumerable: true, - get: function get() { - return require('./file'); - } -}); -/** - * TODO: add property description. - * @type {Http} - */ - -Object.defineProperty(exports, 'Http', { - configurable: true, - enumerable: true, - get: function get() { - return require('./http'); - } -}); -/** - * TODO: add property description. - * @type {Stream} - */ - -Object.defineProperty(exports, 'Stream', { - configurable: true, - enumerable: true, - get: function get() { - return require('./stream'); - } -}); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/dist/winston/transports/stream.js b/general/nvim/node_modules/winston/dist/winston/transports/stream.js deleted file mode 100644 index 57fc019..0000000 --- a/general/nvim/node_modules/winston/dist/winston/transports/stream.js +++ /dev/null @@ -1,117 +0,0 @@ -/** - * stream.js: Transport for outputting to any arbitrary stream. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ -'use strict'; - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -var isStream = require('is-stream'); - -var _require = require('triple-beam'), - MESSAGE = _require.MESSAGE; - -var os = require('os'); - -var TransportStream = require('winston-transport'); -/** - * Transport for outputting to any arbitrary stream. - * @type {Stream} - * @extends {TransportStream} - */ - - -module.exports = /*#__PURE__*/function (_TransportStream) { - _inherits(Stream, _TransportStream); - - var _super = _createSuper(Stream); - - /** - * Constructor function for the Console transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - function Stream() { - var _this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Stream); - - _this = _super.call(this, options); - - if (!options.stream || !isStream(options.stream)) { - throw new Error('options.stream is required.'); - } // We need to listen for drain events when write() returns false. This can - // make node mad at times. - - - _this._stream = options.stream; - - _this._stream.setMaxListeners(Infinity); - - _this.isObjectMode = options.stream._writableState.objectMode; - _this.eol = options.eol || os.EOL; - return _this; - } - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - - - _createClass(Stream, [{ - key: "log", - value: function log(info, callback) { - var _this2 = this; - - setImmediate(function () { - return _this2.emit('logged', info); - }); - - if (this.isObjectMode) { - this._stream.write(info); - - if (callback) { - callback(); // eslint-disable-line callback-return - } - - return; - } - - this._stream.write("".concat(info[MESSAGE]).concat(this.eol)); - - if (callback) { - callback(); // eslint-disable-line callback-return - } - - return; - } - }]); - - return Stream; -}(TransportStream); \ No newline at end of file diff --git a/general/nvim/node_modules/winston/index.d.ts b/general/nvim/node_modules/winston/index.d.ts deleted file mode 100644 index 027379c..0000000 --- a/general/nvim/node_modules/winston/index.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -// Type definitions for winston 3.0 -// Project: https://github.com/winstonjs/winston - -/// - -import * as NodeJSStream from "stream"; - -import * as logform from 'logform'; -import * as Transport from 'winston-transport'; - -import * as Config from './lib/winston/config/index'; -import * as Transports from './lib/winston/transports/index'; - -declare namespace winston { - // Hoisted namespaces from other modules - export import format = logform.format; - export import Logform = logform; - export import config = Config; - export import transports = Transports; - export import transport = Transport; - - interface ExceptionHandler { - logger: Logger; - handlers: Map; - catcher: Function | boolean; - - handle(...transports: Transport[]): void; - unhandle(...transports: Transport[]): void; - getAllInfo(err: string | Error): object; - getProcessInfo(): object; - getOsInfo(): object; - getTrace(err: Error): object; - - new(logger: Logger): ExceptionHandler; - } - - interface QueryOptions { - rows?: number; - limit?: number; - start?: number; - from?: Date; - until?: Date; - order?: "asc" | "desc"; - fields: any; - } - - interface Profiler { - logger: Logger; - start: Number; - done(info?: any): boolean; - } - - type LogCallback = (error?: any, level?: string, message?: string, meta?: any) => void; - - interface LogEntry { - level: string; - message: string; - [optionName: string]: any; - } - - interface LogMethod { - (level: string, message: string, callback: LogCallback): Logger; - (level: string, message: string, meta: any, callback: LogCallback): Logger; - (level: string, message: string, ...meta: any[]): Logger; - (entry: LogEntry): Logger; - (level: string, message: any): Logger; - } - - interface LeveledLogMethod { - (message: string, callback: LogCallback): Logger; - (message: string, meta: any, callback: LogCallback): Logger; - (message: string, ...meta: any[]): Logger; - (message: any): Logger; - (infoObject: object): Logger; - } - - interface LoggerOptions { - levels?: Config.AbstractConfigSetLevels; - silent?: boolean; - format?: logform.Format; - level?: string; - exitOnError?: Function | boolean; - defaultMeta?: any; - transports?: Transport[] | Transport; - handleExceptions?: boolean; - exceptionHandlers?: any; - } - - interface Logger extends NodeJSStream.Transform { - silent: boolean; - format: logform.Format; - levels: Config.AbstractConfigSetLevels; - level: string; - transports: Transport[]; - exceptions: ExceptionHandler; - profilers: object; - exitOnError: Function | boolean; - defaultMeta?: any; - - log: LogMethod; - add(transport: Transport): Logger; - remove(transport: Transport): Logger; - clear(): Logger; - close(): Logger; - - // for cli and npm levels - error: LeveledLogMethod; - warn: LeveledLogMethod; - help: LeveledLogMethod; - data: LeveledLogMethod; - info: LeveledLogMethod; - debug: LeveledLogMethod; - prompt: LeveledLogMethod; - http: LeveledLogMethod; - verbose: LeveledLogMethod; - input: LeveledLogMethod; - silly: LeveledLogMethod; - - // for syslog levels only - emerg: LeveledLogMethod; - alert: LeveledLogMethod; - crit: LeveledLogMethod; - warning: LeveledLogMethod; - notice: LeveledLogMethod; - - query(options?: QueryOptions, callback?: (err: Error, results: any) => void): any; - stream(options?: any): NodeJS.ReadableStream; - - startTimer(): Profiler; - profile(id: string | number, meta?: LogEntry): Logger; - - configure(options: LoggerOptions): void; - - child(options: Object): Logger; - - isLevelEnabled(level: string): boolean; - isErrorEnabled(): boolean; - isWarnEnabled(): boolean; - isInfoEnabled(): boolean; - isVerboseEnabled(): boolean; - isDebugEnabled(): boolean; - isSillyEnabled(): boolean; - - new(options?: LoggerOptions): Logger; - } - - interface Container { - loggers: Map; - options: LoggerOptions; - - add(id: string, options?: LoggerOptions): Logger; - get(id: string, options?: LoggerOptions): Logger; - has(id: string): boolean; - close(id?: string): void; - - new(options?: LoggerOptions): Container; - } - - let version: string; - let ExceptionHandler: ExceptionHandler; - let Container: Container; - let loggers: Container; - - let addColors: (target: Config.AbstractConfigSetColors) => any; - let createLogger: (options?: LoggerOptions) => Logger; - - // Pass-through npm level methods routed to the default logger. - let error: LeveledLogMethod; - let warn: LeveledLogMethod; - let info: LeveledLogMethod; - let http: LeveledLogMethod; - let verbose: LeveledLogMethod; - let debug: LeveledLogMethod; - let silly: LeveledLogMethod; - - // Other pass-through methods routed to the default logger. - let log: LogMethod; - let query: (options?: QueryOptions, callback?: (err: Error, results: any) => void) => any; - let stream: (options?: any) => NodeJS.ReadableStream; - let add: (transport: Transport) => Logger; - let remove: (transport: Transport) => Logger; - let clear: () => Logger; - let startTimer: () => Profiler; - let profile: (id: string | number) => Logger; - let configure: (options: LoggerOptions) => void; - let child: (options: Object) => Logger; - let level: string; - let exceptions: ExceptionHandler; - let exitOnError: Function | boolean; - // let default: object; -} - -export = winston; diff --git a/general/nvim/node_modules/winston/lib/winston.js b/general/nvim/node_modules/winston/lib/winston.js deleted file mode 100644 index e0c4e3c..0000000 --- a/general/nvim/node_modules/winston/lib/winston.js +++ /dev/null @@ -1,182 +0,0 @@ -/** - * winston.js: Top-level include defining Winston. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const logform = require('logform'); -const { warn } = require('./winston/common'); - -/** - * Setup to expose. - * @type {Object} - */ -const winston = exports; - -/** - * Expose version. Use `require` method for `webpack` support. - * @type {string} - */ -winston.version = require('../package.json').version; -/** - * Include transports defined by default by winston - * @type {Array} - */ -winston.transports = require('./winston/transports'); -/** - * Expose utility methods - * @type {Object} - */ -winston.config = require('./winston/config'); -/** - * Hoist format-related functionality from logform. - * @type {Object} - */ -winston.addColors = logform.levels; -/** - * Hoist format-related functionality from logform. - * @type {Object} - */ -winston.format = logform.format; -/** - * Expose core Logging-related prototypes. - * @type {function} - */ -winston.createLogger = require('./winston/create-logger'); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ -winston.ExceptionHandler = require('./winston/exception-handler'); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ -winston.RejectionHandler = require('./winston/rejection-handler'); -/** - * Expose core Logging-related prototypes. - * @type {Container} - */ -winston.Container = require('./winston/container'); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ -winston.Transport = require('winston-transport'); -/** - * We create and expose a default `Container` to `winston.loggers` so that the - * programmer may manage multiple `winston.Logger` instances without any - * additional overhead. - * @example - * // some-file1.js - * const logger = require('winston').loggers.get('something'); - * - * // some-file2.js - * const logger = require('winston').loggers.get('something'); - */ -winston.loggers = new winston.Container(); - -/** - * We create and expose a 'defaultLogger' so that the programmer may do the - * following without the need to create an instance of winston.Logger directly: - * @example - * const winston = require('winston'); - * winston.log('info', 'some message'); - * winston.error('some error'); - */ -const defaultLogger = winston.createLogger(); - -// Pass through the target methods onto `winston. -Object.keys(winston.config.npm.levels) - .concat([ - 'log', - 'query', - 'stream', - 'add', - 'remove', - 'clear', - 'profile', - 'startTimer', - 'handleExceptions', - 'unhandleExceptions', - 'handleRejections', - 'unhandleRejections', - 'configure', - 'child' - ]) - .forEach( - method => (winston[method] = (...args) => defaultLogger[method](...args)) - ); - -/** - * Define getter / setter for the default logger level which need to be exposed - * by winston. - * @type {string} - */ -Object.defineProperty(winston, 'level', { - get() { - return defaultLogger.level; - }, - set(val) { - defaultLogger.level = val; - } -}); - -/** - * Define getter for `exceptions` which replaces `handleExceptions` and - * `unhandleExceptions`. - * @type {Object} - */ -Object.defineProperty(winston, 'exceptions', { - get() { - return defaultLogger.exceptions; - } -}); - -/** - * Define getters / setters for appropriate properties of the default logger - * which need to be exposed by winston. - * @type {Logger} - */ -['exitOnError'].forEach(prop => { - Object.defineProperty(winston, prop, { - get() { - return defaultLogger[prop]; - }, - set(val) { - defaultLogger[prop] = val; - } - }); -}); - -/** - * The default transports and exceptionHandlers for the default winston logger. - * @type {Object} - */ -Object.defineProperty(winston, 'default', { - get() { - return { - exceptionHandlers: defaultLogger.exceptionHandlers, - rejectionHandlers: defaultLogger.rejectionHandlers, - transports: defaultLogger.transports - }; - } -}); - -// Have friendlier breakage notices for properties that were exposed by default -// on winston < 3.0. -warn.deprecated(winston, 'setLevels'); -warn.forFunctions(winston, 'useFormat', ['cli']); -warn.forProperties(winston, 'useFormat', ['padLevels', 'stripColors']); -warn.forFunctions(winston, 'deprecated', [ - 'addRewriter', - 'addFilter', - 'clone', - 'extend' -]); -warn.forProperties(winston, 'deprecated', ['emitErrs', 'levelLength']); -// Throw a useful error when users attempt to run `new winston.Logger`. -warn.moved(winston, 'createLogger', 'Logger'); diff --git a/general/nvim/node_modules/winston/lib/winston/common.js b/general/nvim/node_modules/winston/lib/winston/common.js deleted file mode 100644 index 1516510..0000000 --- a/general/nvim/node_modules/winston/lib/winston/common.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * common.js: Internal helper and utility functions for winston. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const { format } = require('util'); - -/** - * Set of simple deprecation notices and a way to expose them for a set of - * properties. - * @type {Object} - * @private - */ -exports.warn = { - deprecated(prop) { - return () => { - throw new Error(format('{ %s } was removed in winston@3.0.0.', prop)); - }; - }, - useFormat(prop) { - return () => { - throw new Error([ - format('{ %s } was removed in winston@3.0.0.', prop), - 'Use a custom winston.format = winston.format(function) instead.' - ].join('\n')); - }; - }, - forFunctions(obj, type, props) { - props.forEach(prop => { - obj[prop] = exports.warn[type](prop); - }); - }, - moved(obj, movedTo, prop) { - function movedNotice() { - return () => { - throw new Error([ - format('winston.%s was moved in winston@3.0.0.', prop), - format('Use a winston.%s instead.', movedTo) - ].join('\n')); - }; - } - - Object.defineProperty(obj, prop, { - get: movedNotice, - set: movedNotice - }); - }, - forProperties(obj, type, props) { - props.forEach(prop => { - const notice = exports.warn[type](prop); - Object.defineProperty(obj, prop, { - get: notice, - set: notice - }); - }); - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/config/index.d.ts b/general/nvim/node_modules/winston/lib/winston/config/index.d.ts deleted file mode 100644 index 053129d..0000000 --- a/general/nvim/node_modules/winston/lib/winston/config/index.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -// Type definitions for winston 3.0 -// Project: https://github.com/winstonjs/winston - -/// - -declare namespace winston { - interface AbstractConfigSetLevels { - [key: string]: number; - } - - interface AbstractConfigSetColors { - [key: string]: string | string[]; - } - - interface AbstractConfigSet { - levels: AbstractConfigSetLevels; - colors: AbstractConfigSetColors; - } - - interface CliConfigSetLevels extends AbstractConfigSetLevels { - error: number; - warn: number; - help: number; - data: number; - info: number; - debug: number; - prompt: number; - verbose: number; - input: number; - silly: number; - } - - interface CliConfigSetColors extends AbstractConfigSetColors { - error: string | string[]; - warn: string | string[]; - help: string | string[]; - data: string | string[]; - info: string | string[]; - debug: string | string[]; - prompt: string | string[]; - verbose: string | string[]; - input: string | string[]; - silly: string | string[]; - } - - interface NpmConfigSetLevels extends AbstractConfigSetLevels { - error: number; - warn: number; - info: number; - http: number; - verbose: number; - debug: number; - silly: number; - } - - interface NpmConfigSetColors extends AbstractConfigSetColors { - error: string | string[]; - warn: string | string[]; - info: string | string[]; - verbose: string | string[]; - debug: string | string[]; - silly: string | string[]; - } - - interface SyslogConfigSetLevels extends AbstractConfigSetLevels { - emerg: number; - alert: number; - crit: number; - error: number; - warning: number; - notice: number; - info: number; - debug: number; - } - - interface SyslogConfigSetColors extends AbstractConfigSetColors { - emerg: string | string[]; - alert: string | string[]; - crit: string | string[]; - error: string | string[]; - warning: string | string[]; - notice: string | string[]; - info: string | string[]; - debug: string | string[]; - } - - interface Config { - allColors: AbstractConfigSetColors; - cli: { levels: CliConfigSetLevels, colors: CliConfigSetColors }; - npm: { levels: NpmConfigSetLevels, colors: NpmConfigSetColors }; - syslog: { levels: SyslogConfigSetLevels, colors: SyslogConfigSetColors }; - - addColors(colors: AbstractConfigSetColors): void; - } -} - -declare const winston: winston.Config; -export = winston; diff --git a/general/nvim/node_modules/winston/lib/winston/config/index.js b/general/nvim/node_modules/winston/lib/winston/config/index.js deleted file mode 100644 index 6eb79de..0000000 --- a/general/nvim/node_modules/winston/lib/winston/config/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * index.js: Default settings for all levels that winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const logform = require('logform'); -const { configs } = require('triple-beam'); - -/** - * Export config set for the CLI. - * @type {Object} - */ -exports.cli = logform.levels(configs.cli); - -/** - * Export config set for npm. - * @type {Object} - */ -exports.npm = logform.levels(configs.npm); - -/** - * Export config set for the syslog. - * @type {Object} - */ -exports.syslog = logform.levels(configs.syslog); - -/** - * Hoist addColors from logform where it was refactored into in winston@3. - * @type {Object} - */ -exports.addColors = logform.levels; diff --git a/general/nvim/node_modules/winston/lib/winston/container.js b/general/nvim/node_modules/winston/lib/winston/container.js deleted file mode 100644 index d1fa681..0000000 --- a/general/nvim/node_modules/winston/lib/winston/container.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * container.js: Inversion of control container for winston logger instances. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const createLogger = require('./create-logger'); - -/** - * Inversion of control container for winston logger instances. - * @type {Container} - */ -module.exports = class Container { - /** - * Constructor function for the Container object responsible for managing a - * set of `winston.Logger` instances based on string ids. - * @param {!Object} [options={}] - Default pass-thru options for Loggers. - */ - constructor(options = {}) { - this.loggers = new Map(); - this.options = options; - } - - /** - * Retreives a `winston.Logger` instance for the specified `id`. If an - * instance does not exist, one is created. - * @param {!string} id - The id of the Logger to get. - * @param {?Object} [options] - Options for the Logger instance. - * @returns {Logger} - A configured Logger instance with a specified id. - */ - add(id, options) { - if (!this.loggers.has(id)) { - // Remark: Simple shallow clone for configuration options in case we pass - // in instantiated protoypal objects - options = Object.assign({}, options || this.options); - const existing = options.transports || this.options.transports; - - // Remark: Make sure if we have an array of transports we slice it to - // make copies of those references. - options.transports = existing ? existing.slice() : []; - - const logger = createLogger(options); - logger.on('close', () => this._delete(id)); - this.loggers.set(id, logger); - } - - return this.loggers.get(id); - } - - /** - * Retreives a `winston.Logger` instance for the specified `id`. If - * an instance does not exist, one is created. - * @param {!string} id - The id of the Logger to get. - * @param {?Object} [options] - Options for the Logger instance. - * @returns {Logger} - A configured Logger instance with a specified id. - */ - get(id, options) { - return this.add(id, options); - } - - /** - * Check if the container has a logger with the id. - * @param {?string} id - The id of the Logger instance to find. - * @returns {boolean} - Boolean value indicating if this instance has a - * logger with the specified `id`. - */ - has(id) { - return !!this.loggers.has(id); - } - - /** - * Closes a `Logger` instance with the specified `id` if it exists. - * If no `id` is supplied then all Loggers are closed. - * @param {?string} id - The id of the Logger instance to close. - * @returns {undefined} - */ - close(id) { - if (id) { - return this._removeLogger(id); - } - - this.loggers.forEach((val, key) => this._removeLogger(key)); - } - - /** - * Remove a logger based on the id. - * @param {!string} id - The id of the logger to remove. - * @returns {undefined} - * @private - */ - _removeLogger(id) { - if (!this.loggers.has(id)) { - return; - } - - const logger = this.loggers.get(id); - logger.close(); - this._delete(id); - } - - /** - * Deletes a `Logger` instance with the specified `id`. - * @param {!string} id - The id of the Logger instance to delete from - * container. - * @returns {undefined} - * @private - */ - _delete(id) { - this.loggers.delete(id); - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/create-logger.js b/general/nvim/node_modules/winston/lib/winston/create-logger.js deleted file mode 100644 index e868aea..0000000 --- a/general/nvim/node_modules/winston/lib/winston/create-logger.js +++ /dev/null @@ -1,104 +0,0 @@ -/** - * create-logger.js: Logger factory for winston logger instances. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const { LEVEL } = require('triple-beam'); -const config = require('./config'); -const Logger = require('./logger'); -const debug = require('@dabh/diagnostics')('winston:create-logger'); - -function isLevelEnabledFunctionName(level) { - return 'is' + level.charAt(0).toUpperCase() + level.slice(1) + 'Enabled'; -} - -/** - * Create a new instance of a winston Logger. Creates a new - * prototype for each instance. - * @param {!Object} opts - Options for the created logger. - * @returns {Logger} - A newly created logger instance. - */ -module.exports = function (opts = {}) { - // - // Default levels: npm - // - opts.levels = opts.levels || config.npm.levels; - - /** - * DerivedLogger to attach the logs level methods. - * @type {DerivedLogger} - * @extends {Logger} - */ - class DerivedLogger extends Logger { - /** - * Create a new class derived logger for which the levels can be attached to - * the prototype of. This is a V8 optimization that is well know to increase - * performance of prototype functions. - * @param {!Object} options - Options for the created logger. - */ - constructor(options) { - super(options); - } - } - - const logger = new DerivedLogger(opts); - - // - // Create the log level methods for the derived logger. - // - Object.keys(opts.levels).forEach(function (level) { - debug('Define prototype method for "%s"', level); - if (level === 'log') { - // eslint-disable-next-line no-console - console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.'); - return; - } - - // - // Define prototype methods for each log level e.g.: - // logger.log('info', msg) implies these methods are defined: - // - logger.info(msg) - // - logger.isInfoEnabled() - // - // Remark: to support logger.child this **MUST** be a function - // so it'll always be called on the instance instead of a fixed - // place in the prototype chain. - // - DerivedLogger.prototype[level] = function (...args) { - // Prefer any instance scope, but default to "root" logger - const self = this || logger; - - // Optimize the hot-path which is the single object. - if (args.length === 1) { - const [msg] = args; - const info = msg && msg.message && msg || { message: msg }; - info.level = info[LEVEL] = level; - self._addDefaultMeta(info); - self.write(info); - return (this || logger); - } - - // When provided nothing assume the empty string - if (args.length === 0) { - self.log(level, ''); - return self; - } - - // Otherwise build argument list which could potentially conform to - // either: - // . v3 API: log(obj) - // 2. v1/v2 API: log(level, msg, ... [string interpolate], [{metadata}], [callback]) - return self.log(level, ...args); - }; - - DerivedLogger.prototype[isLevelEnabledFunctionName(level)] = function () { - return (this || logger).isLevelEnabled(level); - }; - }); - - return logger; -}; diff --git a/general/nvim/node_modules/winston/lib/winston/exception-handler.js b/general/nvim/node_modules/winston/lib/winston/exception-handler.js deleted file mode 100644 index 682c530..0000000 --- a/general/nvim/node_modules/winston/lib/winston/exception-handler.js +++ /dev/null @@ -1,245 +0,0 @@ -/** - * exception-handler.js: Object for handling uncaughtException events. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const os = require('os'); -const asyncForEach = require('async/forEach'); -const debug = require('@dabh/diagnostics')('winston:exception'); -const once = require('one-time'); -const stackTrace = require('stack-trace'); -const ExceptionStream = require('./exception-stream'); - -/** - * Object for handling uncaughtException events. - * @type {ExceptionHandler} - */ -module.exports = class ExceptionHandler { - /** - * TODO: add contructor description - * @param {!Logger} logger - TODO: add param description - */ - constructor(logger) { - if (!logger) { - throw new Error('Logger is required to handle exceptions'); - } - - this.logger = logger; - this.handlers = new Map(); - } - - /** - * Handles `uncaughtException` events for the current process by adding any - * handlers passed in. - * @returns {undefined} - */ - handle(...args) { - args.forEach(arg => { - if (Array.isArray(arg)) { - return arg.forEach(handler => this._addHandler(handler)); - } - - this._addHandler(arg); - }); - - if (!this.catcher) { - this.catcher = this._uncaughtException.bind(this); - process.on('uncaughtException', this.catcher); - } - } - - /** - * Removes any handlers to `uncaughtException` events for the current - * process. This does not modify the state of the `this.handlers` set. - * @returns {undefined} - */ - unhandle() { - if (this.catcher) { - process.removeListener('uncaughtException', this.catcher); - this.catcher = false; - - Array.from(this.handlers.values()) - .forEach(wrapper => this.logger.unpipe(wrapper)); - } - } - - /** - * TODO: add method description - * @param {Error} err - Error to get information about. - * @returns {mixed} - TODO: add return description. - */ - getAllInfo(err) { - let { message } = err; - if (!message && typeof err === 'string') { - message = err; - } - - return { - error: err, - // TODO (indexzero): how do we configure this? - level: 'error', - message: [ - `uncaughtException: ${(message || '(no error message)')}`, - err.stack || ' No stack trace' - ].join('\n'), - stack: err.stack, - exception: true, - date: new Date().toString(), - process: this.getProcessInfo(), - os: this.getOsInfo(), - trace: this.getTrace(err) - }; - } - - /** - * Gets all relevant process information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getProcessInfo() { - return { - pid: process.pid, - uid: process.getuid ? process.getuid() : null, - gid: process.getgid ? process.getgid() : null, - cwd: process.cwd(), - execPath: process.execPath, - version: process.version, - argv: process.argv, - memoryUsage: process.memoryUsage() - }; - } - - /** - * Gets all relevant OS information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getOsInfo() { - return { - loadavg: os.loadavg(), - uptime: os.uptime() - }; - } - - /** - * Gets a stack trace for the specified error. - * @param {mixed} err - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - getTrace(err) { - const trace = err ? stackTrace.parse(err) : stackTrace.get(); - return trace.map(site => { - return { - column: site.getColumnNumber(), - file: site.getFileName(), - function: site.getFunctionName(), - line: site.getLineNumber(), - method: site.getMethodName(), - native: site.isNative() - }; - }); - } - - /** - * Helper method to add a transport as an exception handler. - * @param {Transport} handler - The transport to add as an exception handler. - * @returns {void} - */ - _addHandler(handler) { - if (!this.handlers.has(handler)) { - handler.handleExceptions = true; - const wrapper = new ExceptionStream(handler); - this.handlers.set(handler, wrapper); - this.logger.pipe(wrapper); - } - } - - /** - * Logs all relevant information around the `err` and exits the current - * process. - * @param {Error} err - Error to handle - * @returns {mixed} - TODO: add return description. - * @private - */ - _uncaughtException(err) { - const info = this.getAllInfo(err); - const handlers = this._getExceptionHandlers(); - // Calculate if we should exit on this error - let doExit = typeof this.logger.exitOnError === 'function' - ? this.logger.exitOnError(err) - : this.logger.exitOnError; - let timeout; - - if (!handlers.length && doExit) { - // eslint-disable-next-line no-console - console.warn('winston: exitOnError cannot be true with no exception handlers.'); - // eslint-disable-next-line no-console - console.warn('winston: not exiting process.'); - doExit = false; - } - - function gracefulExit() { - debug('doExit', doExit); - debug('process._exiting', process._exiting); - - if (doExit && !process._exiting) { - // Remark: Currently ignoring any exceptions from transports when - // catching uncaught exceptions. - if (timeout) { - clearTimeout(timeout); - } - // eslint-disable-next-line no-process-exit - process.exit(1); - } - } - - if (!handlers || handlers.length === 0) { - return process.nextTick(gracefulExit); - } - - // Log to all transports attempting to listen for when they are completed. - asyncForEach(handlers, (handler, next) => { - const done = once(next); - const transport = handler.transport || handler; - - // Debug wrapping so that we can inspect what's going on under the covers. - function onDone(event) { - return () => { - debug(event); - done(); - }; - } - - transport._ending = true; - transport.once('finish', onDone('finished')); - transport.once('error', onDone('error')); - }, () => doExit && gracefulExit()); - - this.logger.log(info); - - // If exitOnError is true, then only allow the logging of exceptions to - // take up to `3000ms`. - if (doExit) { - timeout = setTimeout(gracefulExit, 3000); - } - } - - /** - * Returns the list of transports and exceptionHandlers for this instance. - * @returns {Array} - List of transports and exceptionHandlers for this - * instance. - * @private - */ - _getExceptionHandlers() { - // Remark (indexzero): since `logger.transports` returns all of the pipes - // from the _readableState of the stream we actually get the join of the - // explicit handlers and the implicit transports with - // `handleExceptions: true` - return this.logger.transports.filter(wrap => { - const transport = wrap.transport || wrap; - return transport.handleExceptions; - }); - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/exception-stream.js b/general/nvim/node_modules/winston/lib/winston/exception-stream.js deleted file mode 100644 index 477eba0..0000000 --- a/general/nvim/node_modules/winston/lib/winston/exception-stream.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * exception-stream.js: TODO: add file header handler. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const { Writable } = require('readable-stream'); - -/** - * TODO: add class description. - * @type {ExceptionStream} - * @extends {Writable} - */ -module.exports = class ExceptionStream extends Writable { - /** - * Constructor function for the ExceptionStream responsible for wrapping a - * TransportStream; only allowing writes of `info` objects with - * `info.exception` set to true. - * @param {!TransportStream} transport - Stream to filter to exceptions - */ - constructor(transport) { - super({ objectMode: true }); - - if (!transport) { - throw new Error('ExceptionStream requires a TransportStream instance.'); - } - - // Remark (indexzero): we set `handleExceptions` here because it's the - // predicate checked in ExceptionHandler.prototype.__getExceptionHandlers - this.handleExceptions = true; - this.transport = transport; - } - - /** - * Writes the info object to our transport instance if (and only if) the - * `exception` property is set on the info. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {mixed} - TODO: add return description. - * @private - */ - _write(info, enc, callback) { - if (info.exception) { - return this.transport.log(info, callback); - } - - callback(); - return true; - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/logger.js b/general/nvim/node_modules/winston/lib/winston/logger.js deleted file mode 100644 index 89dd4ac..0000000 --- a/general/nvim/node_modules/winston/lib/winston/logger.js +++ /dev/null @@ -1,667 +0,0 @@ -/** - * logger.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const { Stream, Transform } = require('readable-stream'); -const asyncForEach = require('async/forEach'); -const { LEVEL, SPLAT } = require('triple-beam'); -const isStream = require('is-stream'); -const ExceptionHandler = require('./exception-handler'); -const RejectionHandler = require('./rejection-handler'); -const LegacyTransportStream = require('winston-transport/legacy'); -const Profiler = require('./profiler'); -const { warn } = require('./common'); -const config = require('./config'); - -/** - * Captures the number of format (i.e. %s strings) in a given string. - * Based on `util.format`, see Node.js source: - * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230 - * @type {RegExp} - */ -const formatRegExp = /%[scdjifoO%]/g; - -/** - * TODO: add class description. - * @type {Logger} - * @extends {Transform} - */ -class Logger extends Transform { - /** - * Constructor function for the Logger object responsible for persisting log - * messages and metadata to one or more transports. - * @param {!Object} options - foo - */ - constructor(options) { - super({ objectMode: true }); - this.configure(options); - } - - child(defaultRequestMetadata) { - const logger = this; - return Object.create(logger, { - write: { - value: function (info) { - const infoClone = Object.assign( - {}, - defaultRequestMetadata, - info - ); - - // Object.assign doesn't copy inherited Error - // properties so we have to do that explicitly - // - // Remark (indexzero): we should remove this - // since the errors format will handle this case. - // - if (info instanceof Error) { - infoClone.stack = info.stack; - infoClone.message = info.message; - } - - logger.write(infoClone); - } - } - }); - } - - /** - * This will wholesale reconfigure this instance by: - * 1. Resetting all transports. Older transports will be removed implicitly. - * 2. Set all other options including levels, colors, rewriters, filters, - * exceptionHandlers, etc. - * @param {!Object} options - TODO: add param description. - * @returns {undefined} - */ - configure({ - silent, - format, - defaultMeta, - levels, - level = 'info', - exitOnError = true, - transports, - colors, - emitErrs, - formatters, - padLevels, - rewriters, - stripColors, - exceptionHandlers, - rejectionHandlers - } = {}) { - // Reset transports if we already have them - if (this.transports.length) { - this.clear(); - } - - this.silent = silent; - this.format = format || this.format || require('logform/json')(); - - this.defaultMeta = defaultMeta || null; - // Hoist other options onto this instance. - this.levels = levels || this.levels || config.npm.levels; - this.level = level; - this.exceptions = new ExceptionHandler(this); - this.rejections = new RejectionHandler(this); - this.profilers = {}; - this.exitOnError = exitOnError; - - // Add all transports we have been provided. - if (transports) { - transports = Array.isArray(transports) ? transports : [transports]; - transports.forEach(transport => this.add(transport)); - } - - if ( - colors || - emitErrs || - formatters || - padLevels || - rewriters || - stripColors - ) { - throw new Error( - [ - '{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.', - 'Use a custom winston.format(function) instead.', - 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md' - ].join('\n') - ); - } - - if (exceptionHandlers) { - this.exceptions.handle(exceptionHandlers); - } - if (rejectionHandlers) { - this.rejections.handle(rejectionHandlers); - } - } - - isLevelEnabled(level) { - const givenLevelValue = getLevelValue(this.levels, level); - if (givenLevelValue === null) { - return false; - } - - const configuredLevelValue = getLevelValue(this.levels, this.level); - if (configuredLevelValue === null) { - return false; - } - - if (!this.transports || this.transports.length === 0) { - return configuredLevelValue >= givenLevelValue; - } - - const index = this.transports.findIndex(transport => { - let transportLevelValue = getLevelValue(this.levels, transport.level); - if (transportLevelValue === null) { - transportLevelValue = configuredLevelValue; - } - return transportLevelValue >= givenLevelValue; - }); - return index !== -1; - } - - /* eslint-disable valid-jsdoc */ - /** - * Ensure backwards compatibility with a `log` method - * @param {mixed} level - Level the log message is written at. - * @param {mixed} msg - TODO: add param description. - * @param {mixed} meta - TODO: add param description. - * @returns {Logger} - TODO: add return description. - * - * @example - * // Supports the existing API: - * logger.log('info', 'Hello world', { custom: true }); - * logger.log('info', new Error('Yo, it\'s on fire')); - * - * // Requires winston.format.splat() - * logger.log('info', '%s %d%%', 'A string', 50, { thisIsMeta: true }); - * - * // And the new API with a single JSON literal: - * logger.log({ level: 'info', message: 'Hello world', custom: true }); - * logger.log({ level: 'info', message: new Error('Yo, it\'s on fire') }); - * - * // Also requires winston.format.splat() - * logger.log({ - * level: 'info', - * message: '%s %d%%', - * [SPLAT]: ['A string', 50], - * meta: { thisIsMeta: true } - * }); - * - */ - /* eslint-enable valid-jsdoc */ - log(level, msg, ...splat) { - // eslint-disable-line max-params - // Optimize for the hotpath of logging JSON literals - if (arguments.length === 1) { - // Yo dawg, I heard you like levels ... seriously ... - // In this context the LHS `level` here is actually the `info` so read - // this as: info[LEVEL] = info.level; - level[LEVEL] = level.level; - this._addDefaultMeta(level); - this.write(level); - return this; - } - - // Slightly less hotpath, but worth optimizing for. - if (arguments.length === 2) { - if (msg && typeof msg === 'object') { - msg[LEVEL] = msg.level = level; - this._addDefaultMeta(msg); - this.write(msg); - return this; - } - - this.write({ [LEVEL]: level, level, message: msg }); - return this; - } - - const [meta] = splat; - if (typeof meta === 'object' && meta !== null) { - // Extract tokens, if none available default to empty array to - // ensure consistancy in expected results - const tokens = msg && msg.match && msg.match(formatRegExp); - - if (!tokens) { - const info = Object.assign({}, this.defaultMeta, meta, { - [LEVEL]: level, - [SPLAT]: splat, - level, - message: msg - }); - - if (meta.message) info.message = `${info.message} ${meta.message}`; - if (meta.stack) info.stack = meta.stack; - - this.write(info); - return this; - } - } - - this.write(Object.assign({}, this.defaultMeta, { - [LEVEL]: level, - [SPLAT]: splat, - level, - message: msg - })); - - return this; - } - - /** - * Pushes data so that it can be picked up by all of our pipe targets. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {mixed} callback - Continues stream processing. - * @returns {undefined} - * @private - */ - _transform(info, enc, callback) { - if (this.silent) { - return callback(); - } - - // [LEVEL] is only soft guaranteed to be set here since we are a proper - // stream. It is likely that `info` came in through `.log(info)` or - // `.info(info)`. If it is not defined, however, define it. - // This LEVEL symbol is provided by `triple-beam` and also used in: - // - logform - // - winston-transport - // - abstract-winston-transport - if (!info[LEVEL]) { - info[LEVEL] = info.level; - } - - // Remark: really not sure what to do here, but this has been reported as - // very confusing by pre winston@2.0.0 users as quite confusing when using - // custom levels. - if (!this.levels[info[LEVEL]] && this.levels[info[LEVEL]] !== 0) { - // eslint-disable-next-line no-console - console.error('[winston] Unknown logger level: %s', info[LEVEL]); - } - - // Remark: not sure if we should simply error here. - if (!this._readableState.pipes) { - // eslint-disable-next-line no-console - console.error( - '[winston] Attempt to write logs with no transports %j', - info - ); - } - - // Here we write to the `format` pipe-chain, which on `readable` above will - // push the formatted `info` Object onto the buffer for this instance. We trap - // (and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - this.push(this.format.transform(info, this.format.options)); - } catch (ex) { - throw ex; - } finally { - // eslint-disable-next-line callback-return - callback(); - } - } - - /** - * Delays the 'finish' event until all transport pipe targets have - * also emitted 'finish' or are already finished. - * @param {mixed} callback - Continues stream processing. - */ - _final(callback) { - const transports = this.transports.slice(); - asyncForEach( - transports, - (transport, next) => { - if (!transport || transport.finished) return setImmediate(next); - transport.once('finish', next); - transport.end(); - }, - callback - ); - } - - /** - * Adds the transport to this logger instance by piping to it. - * @param {mixed} transport - TODO: add param description. - * @returns {Logger} - TODO: add return description. - */ - add(transport) { - // Support backwards compatibility with all existing `winston < 3.x.x` - // transports which meet one of two criteria: - // 1. They inherit from winston.Transport in < 3.x.x which is NOT a stream. - // 2. They expose a log method which has a length greater than 2 (i.e. more then - // just `log(info, callback)`. - const target = - !isStream(transport) || transport.log.length > 2 - ? new LegacyTransportStream({ transport }) - : transport; - - if (!target._writableState || !target._writableState.objectMode) { - throw new Error( - 'Transports must WritableStreams in objectMode. Set { objectMode: true }.' - ); - } - - // Listen for the `error` event and the `warn` event on the new Transport. - this._onEvent('error', target); - this._onEvent('warn', target); - this.pipe(target); - - if (transport.handleExceptions) { - this.exceptions.handle(); - } - - if (transport.handleRejections) { - this.rejections.handle(); - } - - return this; - } - - /** - * Removes the transport from this logger instance by unpiping from it. - * @param {mixed} transport - TODO: add param description. - * @returns {Logger} - TODO: add return description. - */ - remove(transport) { - if (!transport) return this; - let target = transport; - if (!isStream(transport) || transport.log.length > 2) { - target = this.transports.filter( - match => match.transport === transport - )[0]; - } - - if (target) { - this.unpipe(target); - } - return this; - } - - /** - * Removes all transports from this logger instance. - * @returns {Logger} - TODO: add return description. - */ - clear() { - this.unpipe(); - return this; - } - - /** - * Cleans up resources (streams, event listeners) for all transports - * associated with this instance (if necessary). - * @returns {Logger} - TODO: add return description. - */ - close() { - this.clear(); - this.emit('close'); - return this; - } - - /** - * Sets the `target` levels specified on this instance. - * @param {Object} Target levels to use on this instance. - */ - setLevels() { - warn.deprecated('setLevels'); - } - - /** - * Queries the all transports for this instance with the specified `options`. - * This will aggregate each transport's results into one object containing - * a property per transport. - * @param {Object} options - Query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - */ - query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = options || {}; - const results = {}; - const queryObject = Object.assign({}, options.query || {}); - - // Helper function to query a single transport - function queryTransport(transport, next) { - if (options.query && typeof transport.formatQuery === 'function') { - options.query = transport.formatQuery(queryObject); - } - - transport.query(options, (err, res) => { - if (err) { - return next(err); - } - - if (typeof transport.formatResults === 'function') { - res = transport.formatResults(res, options.format); - } - - next(null, res); - }); - } - - // Helper function to accumulate the results from `queryTransport` into - // the `results`. - function addResults(transport, next) { - queryTransport(transport, (err, result) => { - // queryTransport could potentially invoke the callback multiple times - // since Transport code can be unpredictable. - if (next) { - result = err || result; - if (result) { - results[transport.name] = result; - } - - // eslint-disable-next-line callback-return - next(); - } - - next = null; - }); - } - - // Iterate over the transports in parallel setting the appropriate key in - // the `results`. - asyncForEach( - this.transports.filter(transport => !!transport.query), - addResults, - () => callback(null, results) - ); - } - - /** - * Returns a log stream for all transports. Options object is optional. - * @param{Object} options={} - Stream options for this instance. - * @returns {Stream} - TODO: add return description. - */ - stream(options = {}) { - const out = new Stream(); - const streams = []; - - out._streams = streams; - out.destroy = () => { - let i = streams.length; - while (i--) { - streams[i].destroy(); - } - }; - - // Create a list of all transports for this instance. - this.transports - .filter(transport => !!transport.stream) - .forEach(transport => { - const str = transport.stream(options); - if (!str) { - return; - } - - streams.push(str); - - str.on('log', log => { - log.transport = log.transport || []; - log.transport.push(transport.name); - out.emit('log', log); - }); - - str.on('error', err => { - err.transport = err.transport || []; - err.transport.push(transport.name); - out.emit('error', err); - }); - }); - - return out; - } - - /** - * Returns an object corresponding to a specific timing. When done is called - * the timer will finish and log the duration. e.g.: - * @returns {Profile} - TODO: add return description. - * @example - * const timer = winston.startTimer() - * setTimeout(() => { - * timer.done({ - * message: 'Logging message' - * }); - * }, 1000); - */ - startTimer() { - return new Profiler(this); - } - - /** - * Tracks the time inbetween subsequent calls to this method with the same - * `id` parameter. The second call to this method will log the difference in - * milliseconds along with the message. - * @param {string} id Unique id of the profiler - * @returns {Logger} - TODO: add return description. - */ - profile(id, ...args) { - const time = Date.now(); - if (this.profilers[id]) { - const timeEnd = this.profilers[id]; - delete this.profilers[id]; - - // Attempt to be kind to users if they are still using older APIs. - if (typeof args[args.length - 2] === 'function') { - // eslint-disable-next-line no-console - console.warn( - 'Callback function no longer supported as of winston@3.0.0' - ); - args.pop(); - } - - // Set the duration property of the metadata - const info = typeof args[args.length - 1] === 'object' ? args.pop() : {}; - info.level = info.level || 'info'; - info.durationMs = time - timeEnd; - info.message = info.message || id; - return this.write(info); - } - - this.profilers[id] = time; - return this; - } - - /** - * Backwards compatibility to `exceptions.handle` in winston < 3.0.0. - * @returns {undefined} - * @deprecated - */ - handleExceptions(...args) { - // eslint-disable-next-line no-console - console.warn( - 'Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()' - ); - this.exceptions.handle(...args); - } - - /** - * Backwards compatibility to `exceptions.handle` in winston < 3.0.0. - * @returns {undefined} - * @deprecated - */ - unhandleExceptions(...args) { - // eslint-disable-next-line no-console - console.warn( - 'Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()' - ); - this.exceptions.unhandle(...args); - } - - /** - * Throw a more meaningful deprecation notice - * @throws {Error} - TODO: add throws description. - */ - cli() { - throw new Error( - [ - 'Logger.cli() was removed in winston@3.0.0', - 'Use a custom winston.formats.cli() instead.', - 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md' - ].join('\n') - ); - } - - /** - * Bubbles the `event` that occured on the specified `transport` up - * from this instance. - * @param {string} event - The event that occured - * @param {Object} transport - Transport on which the event occured - * @private - */ - _onEvent(event, transport) { - function transportEvent(err) { - // https://github.com/winstonjs/winston/issues/1364 - if (event === 'error' && !this.transports.includes(transport)) { - this.add(transport); - } - this.emit(event, err, transport); - } - - if (!transport['__winston' + event]) { - transport['__winston' + event] = transportEvent.bind(this); - transport.on(event, transport['__winston' + event]); - } - } - - _addDefaultMeta(msg) { - if (this.defaultMeta) { - Object.assign(msg, this.defaultMeta); - } - } -} - -function getLevelValue(levels, level) { - const value = levels[level]; - if (!value && value !== 0) { - return null; - } - return value; -} - -/** - * Represents the current readableState pipe targets for this Logger instance. - * @type {Array|Object} - */ -Object.defineProperty(Logger.prototype, 'transports', { - configurable: false, - enumerable: true, - get() { - const { pipes } = this._readableState; - return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes; - } -}); - -module.exports = Logger; diff --git a/general/nvim/node_modules/winston/lib/winston/profiler.js b/general/nvim/node_modules/winston/lib/winston/profiler.js deleted file mode 100644 index edcc5a6..0000000 --- a/general/nvim/node_modules/winston/lib/winston/profiler.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * profiler.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -/** - * TODO: add class description. - * @type {Profiler} - * @private - */ -module.exports = class Profiler { - /** - * Constructor function for the Profiler instance used by - * `Logger.prototype.startTimer`. When done is called the timer will finish - * and log the duration. - * @param {!Logger} logger - TODO: add param description. - * @private - */ - constructor(logger) { - if (!logger) { - throw new Error('Logger is required for profiling.'); - } - - this.logger = logger; - this.start = Date.now(); - } - - /** - * Ends the current timer (i.e. Profiler) instance and logs the `msg` along - * with the duration since creation. - * @returns {mixed} - TODO: add return description. - * @private - */ - done(...args) { - if (typeof args[args.length - 1] === 'function') { - // eslint-disable-next-line no-console - console.warn('Callback function no longer supported as of winston@3.0.0'); - args.pop(); - } - - const info = typeof args[args.length - 1] === 'object' ? args.pop() : {}; - info.level = info.level || 'info'; - info.durationMs = (Date.now()) - this.start; - - return this.logger.write(info); - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/rejection-handler.js b/general/nvim/node_modules/winston/lib/winston/rejection-handler.js deleted file mode 100644 index 7d8f65e..0000000 --- a/general/nvim/node_modules/winston/lib/winston/rejection-handler.js +++ /dev/null @@ -1,251 +0,0 @@ -/** - * exception-handler.js: Object for handling uncaughtException events. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const os = require('os'); -const asyncForEach = require('async/forEach'); -const debug = require('@dabh/diagnostics')('winston:rejection'); -const once = require('one-time'); -const stackTrace = require('stack-trace'); -const ExceptionStream = require('./exception-stream'); - -/** - * Object for handling unhandledRejection events. - * @type {RejectionHandler} - */ -module.exports = class RejectionHandler { - /** - * TODO: add contructor description - * @param {!Logger} logger - TODO: add param description - */ - constructor(logger) { - if (!logger) { - throw new Error('Logger is required to handle rejections'); - } - - this.logger = logger; - this.handlers = new Map(); - } - - /** - * Handles `unhandledRejection` events for the current process by adding any - * handlers passed in. - * @returns {undefined} - */ - handle(...args) { - args.forEach(arg => { - if (Array.isArray(arg)) { - return arg.forEach(handler => this._addHandler(handler)); - } - - this._addHandler(arg); - }); - - if (!this.catcher) { - this.catcher = this._unhandledRejection.bind(this); - process.on('unhandledRejection', this.catcher); - } - } - - /** - * Removes any handlers to `unhandledRejection` events for the current - * process. This does not modify the state of the `this.handlers` set. - * @returns {undefined} - */ - unhandle() { - if (this.catcher) { - process.removeListener('unhandledRejection', this.catcher); - this.catcher = false; - - Array.from(this.handlers.values()).forEach(wrapper => - this.logger.unpipe(wrapper) - ); - } - } - - /** - * TODO: add method description - * @param {Error} err - Error to get information about. - * @returns {mixed} - TODO: add return description. - */ - getAllInfo(err) { - let { message } = err; - if (!message && typeof err === 'string') { - message = err; - } - - return { - error: err, - // TODO (indexzero): how do we configure this? - level: 'error', - message: [ - `unhandledRejection: ${message || '(no error message)'}`, - err.stack || ' No stack trace' - ].join('\n'), - stack: err.stack, - exception: true, - date: new Date().toString(), - process: this.getProcessInfo(), - os: this.getOsInfo(), - trace: this.getTrace(err) - }; - } - - /** - * Gets all relevant process information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getProcessInfo() { - return { - pid: process.pid, - uid: process.getuid ? process.getuid() : null, - gid: process.getgid ? process.getgid() : null, - cwd: process.cwd(), - execPath: process.execPath, - version: process.version, - argv: process.argv, - memoryUsage: process.memoryUsage() - }; - } - - /** - * Gets all relevant OS information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getOsInfo() { - return { - loadavg: os.loadavg(), - uptime: os.uptime() - }; - } - - /** - * Gets a stack trace for the specified error. - * @param {mixed} err - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - getTrace(err) { - const trace = err ? stackTrace.parse(err) : stackTrace.get(); - return trace.map(site => { - return { - column: site.getColumnNumber(), - file: site.getFileName(), - function: site.getFunctionName(), - line: site.getLineNumber(), - method: site.getMethodName(), - native: site.isNative() - }; - }); - } - - /** - * Helper method to add a transport as an exception handler. - * @param {Transport} handler - The transport to add as an exception handler. - * @returns {void} - */ - _addHandler(handler) { - if (!this.handlers.has(handler)) { - handler.handleRejections = true; - const wrapper = new ExceptionStream(handler); - this.handlers.set(handler, wrapper); - this.logger.pipe(wrapper); - } - } - - /** - * Logs all relevant information around the `err` and exits the current - * process. - * @param {Error} err - Error to handle - * @returns {mixed} - TODO: add return description. - * @private - */ - _unhandledRejection(err) { - const info = this.getAllInfo(err); - const handlers = this._getRejectionHandlers(); - // Calculate if we should exit on this error - let doExit = - typeof this.logger.exitOnError === 'function' - ? this.logger.exitOnError(err) - : this.logger.exitOnError; - let timeout; - - if (!handlers.length && doExit) { - // eslint-disable-next-line no-console - console.warn('winston: exitOnError cannot be true with no rejection handlers.'); - // eslint-disable-next-line no-console - console.warn('winston: not exiting process.'); - doExit = false; - } - - function gracefulExit() { - debug('doExit', doExit); - debug('process._exiting', process._exiting); - - if (doExit && !process._exiting) { - // Remark: Currently ignoring any rejections from transports when - // catching unhandled rejections. - if (timeout) { - clearTimeout(timeout); - } - // eslint-disable-next-line no-process-exit - process.exit(1); - } - } - - if (!handlers || handlers.length === 0) { - return process.nextTick(gracefulExit); - } - - // Log to all transports attempting to listen for when they are completed. - asyncForEach( - handlers, - (handler, next) => { - const done = once(next); - const transport = handler.transport || handler; - - // Debug wrapping so that we can inspect what's going on under the covers. - function onDone(event) { - return () => { - debug(event); - done(); - }; - } - - transport._ending = true; - transport.once('finish', onDone('finished')); - transport.once('error', onDone('error')); - }, - () => doExit && gracefulExit() - ); - - this.logger.log(info); - - // If exitOnError is true, then only allow the logging of exceptions to - // take up to `3000ms`. - if (doExit) { - timeout = setTimeout(gracefulExit, 3000); - } - } - - /** - * Returns the list of transports and exceptionHandlers for this instance. - * @returns {Array} - List of transports and exceptionHandlers for this - * instance. - * @private - */ - _getRejectionHandlers() { - // Remark (indexzero): since `logger.transports` returns all of the pipes - // from the _readableState of the stream we actually get the join of the - // explicit handlers and the implicit transports with - // `handleRejections: true` - return this.logger.transports.filter(wrap => { - const transport = wrap.transport || wrap; - return transport.handleRejections; - }); - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/tail-file.js b/general/nvim/node_modules/winston/lib/winston/tail-file.js deleted file mode 100644 index 86ea904..0000000 --- a/general/nvim/node_modules/winston/lib/winston/tail-file.js +++ /dev/null @@ -1,124 +0,0 @@ -/** - * tail-file.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const fs = require('fs'); -const { StringDecoder } = require('string_decoder'); -const { Stream } = require('readable-stream'); - -/** - * Simple no-op function. - * @returns {undefined} - */ -function noop() {} - -/** - * TODO: add function description. - * @param {Object} options - Options for tail. - * @param {function} iter - Iterator function to execute on every line. -* `tail -f` a file. Options must include file. - * @returns {mixed} - TODO: add return description. - */ -module.exports = (options, iter) => { - const buffer = Buffer.alloc(64 * 1024); - const decode = new StringDecoder('utf8'); - const stream = new Stream(); - let buff = ''; - let pos = 0; - let row = 0; - - if (options.start === -1) { - delete options.start; - } - - stream.readable = true; - stream.destroy = () => { - stream.destroyed = true; - stream.emit('end'); - stream.emit('close'); - }; - - fs.open(options.file, 'a+', '0644', (err, fd) => { - if (err) { - if (!iter) { - stream.emit('error', err); - } else { - iter(err); - } - stream.destroy(); - return; - } - - (function read() { - if (stream.destroyed) { - fs.close(fd, noop); - return; - } - - return fs.read(fd, buffer, 0, buffer.length, pos, (error, bytes) => { - if (error) { - if (!iter) { - stream.emit('error', error); - } else { - iter(error); - } - stream.destroy(); - return; - } - - if (!bytes) { - if (buff) { - // eslint-disable-next-line eqeqeq - if (options.start == null || row > options.start) { - if (!iter) { - stream.emit('line', buff); - } else { - iter(null, buff); - } - } - row++; - buff = ''; - } - return setTimeout(read, 1000); - } - - let data = decode.write(buffer.slice(0, bytes)); - if (!iter) { - stream.emit('data', data); - } - - data = (buff + data).split(/\n+/); - - const l = data.length - 1; - let i = 0; - - for (; i < l; i++) { - // eslint-disable-next-line eqeqeq - if (options.start == null || row > options.start) { - if (!iter) { - stream.emit('line', data[i]); - } else { - iter(null, data[i]); - } - } - row++; - } - - buff = data[l]; - pos += bytes; - return read(); - }); - }()); - }); - - if (!iter) { - return stream; - } - - return stream.destroy; -}; diff --git a/general/nvim/node_modules/winston/lib/winston/transports/console.js b/general/nvim/node_modules/winston/lib/winston/transports/console.js deleted file mode 100644 index 1bb0897..0000000 --- a/general/nvim/node_modules/winston/lib/winston/transports/console.js +++ /dev/null @@ -1,117 +0,0 @@ -/* eslint-disable no-console */ -/* - * console.js: Transport for outputting to the console. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const os = require('os'); -const { LEVEL, MESSAGE } = require('triple-beam'); -const TransportStream = require('winston-transport'); - -/** - * Transport for outputting to the console. - * @type {Console} - * @extends {TransportStream} - */ -module.exports = class Console extends TransportStream { - /** - * Constructor function for the Console transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - constructor(options = {}) { - super(options); - - // Expose the name of this Transport on the prototype - this.name = options.name || 'console'; - this.stderrLevels = this._stringArrayToSet(options.stderrLevels); - this.consoleWarnLevels = this._stringArrayToSet(options.consoleWarnLevels); - this.eol = options.eol || os.EOL; - - this.setMaxListeners(30); - } - - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback) { - setImmediate(() => this.emit('logged', info)); - - // Remark: what if there is no raw...? - if (this.stderrLevels[info[LEVEL]]) { - if (console._stderr) { - // Node.js maps `process.stderr` to `console._stderr`. - console._stderr.write(`${info[MESSAGE]}${this.eol}`); - } else { - // console.error adds a newline - console.error(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } else if (this.consoleWarnLevels[info[LEVEL]]) { - if (console._stderr) { - // Node.js maps `process.stderr` to `console._stderr`. - // in Node.js console.warn is an alias for console.error - console._stderr.write(`${info[MESSAGE]}${this.eol}`); - } else { - // console.warn adds a newline - console.warn(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } - - if (console._stdout) { - // Node.js maps `process.stdout` to `console._stdout`. - console._stdout.write(`${info[MESSAGE]}${this.eol}`); - } else { - // console.log adds a newline. - console.log(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - } - - /** - * Returns a Set-like object with strArray's elements as keys (each with the - * value true). - * @param {Array} strArray - Array of Set-elements as strings. - * @param {?string} [errMsg] - Custom error message thrown on invalid input. - * @returns {Object} - TODO: add return description. - * @private - */ - _stringArrayToSet(strArray, errMsg) { - if (!strArray) - return {}; - - errMsg = errMsg || 'Cannot make set from type other than Array of string elements'; - - if (!Array.isArray(strArray)) { - throw new Error(errMsg); - } - - return strArray.reduce((set, el) => { - if (typeof el !== 'string') { - throw new Error(errMsg); - } - set[el] = true; - - return set; - }, {}); - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/transports/file.js b/general/nvim/node_modules/winston/lib/winston/transports/file.js deleted file mode 100644 index d0314be..0000000 --- a/general/nvim/node_modules/winston/lib/winston/transports/file.js +++ /dev/null @@ -1,695 +0,0 @@ -/* eslint-disable complexity,max-statements */ -/** - * file.js: Transport for outputting to a local log file. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const asyncSeries = require('async/series'); -const zlib = require('zlib'); -const { MESSAGE } = require('triple-beam'); -const { Stream, PassThrough } = require('readable-stream'); -const TransportStream = require('winston-transport'); -const debug = require('@dabh/diagnostics')('winston:file'); -const os = require('os'); -const tailFile = require('../tail-file'); - -/** - * Transport for outputting to a local log file. - * @type {File} - * @extends {TransportStream} - */ -module.exports = class File extends TransportStream { - /** - * Constructor function for the File transport object responsible for - * persisting log messages and metadata to one or more files. - * @param {Object} options - Options for this instance. - */ - constructor(options = {}) { - super(options); - - // Expose the name of this Transport on the prototype. - this.name = options.name || 'file'; - - // Helper function which throws an `Error` in the event that any of the - // rest of the arguments is present in `options`. - function throwIf(target, ...args) { - args.slice(1).forEach(name => { - if (options[name]) { - throw new Error(`Cannot set ${name} and ${target} together`); - } - }); - } - - // Setup the base stream that always gets piped to to handle buffering. - this._stream = new PassThrough(); - this._stream.setMaxListeners(30); - - // Bind this context for listener methods. - this._onError = this._onError.bind(this); - - if (options.filename || options.dirname) { - throwIf('filename or dirname', 'stream'); - this._basename = this.filename = options.filename - ? path.basename(options.filename) - : 'winston.log'; - - this.dirname = options.dirname || path.dirname(options.filename); - this.options = options.options || { flags: 'a' }; - } else if (options.stream) { - // eslint-disable-next-line no-console - console.warn('options.stream will be removed in winston@4. Use winston.transports.Stream'); - throwIf('stream', 'filename', 'maxsize'); - this._dest = this._stream.pipe(this._setupStream(options.stream)); - this.dirname = path.dirname(this._dest.path); - // We need to listen for drain events when write() returns false. This - // can make node mad at times. - } else { - throw new Error('Cannot log to file without filename or stream.'); - } - - this.maxsize = options.maxsize || null; - this.rotationFormat = options.rotationFormat || false; - this.zippedArchive = options.zippedArchive || false; - this.maxFiles = options.maxFiles || null; - this.eol = options.eol || os.EOL; - this.tailable = options.tailable || false; - - // Internal state variables representing the number of files this instance - // has created and the current size (in bytes) of the current logfile. - this._size = 0; - this._pendingSize = 0; - this._created = 0; - this._drain = false; - this._opening = false; - this._ending = false; - - if (this.dirname) this._createLogDirIfNotExist(this.dirname); - this.open(); - } - - finishIfEnding() { - if (this._ending) { - if (this._opening) { - this.once('open', () => { - this._stream.once('finish', () => this.emit('finish')); - setImmediate(() => this._stream.end()); - }); - } else { - this._stream.once('finish', () => this.emit('finish')); - setImmediate(() => this._stream.end()); - } - } - } - - - /** - * Core logging method exposed to Winston. Metadata is optional. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback = () => {}) { - // Remark: (jcrugzz) What is necessary about this callback(null, true) now - // when thinking about 3.x? Should silent be handled in the base - // TransportStream _write method? - if (this.silent) { - callback(); - return true; - } - - // Output stream buffer is full and has asked us to wait for the drain event - if (this._drain) { - this._stream.once('drain', () => { - this._drain = false; - this.log(info, callback); - }); - return; - } - if (this._rotate) { - this._stream.once('rotate', () => { - this._rotate = false; - this.log(info, callback); - }); - return; - } - - // Grab the raw string and append the expected EOL. - const output = `${info[MESSAGE]}${this.eol}`; - const bytes = Buffer.byteLength(output); - - // After we have written to the PassThrough check to see if we need - // to rotate to the next file. - // - // Remark: This gets called too early and does not depict when data - // has been actually flushed to disk. - function logged() { - this._size += bytes; - this._pendingSize -= bytes; - - debug('logged %s %s', this._size, output); - this.emit('logged', info); - - // Do not attempt to rotate files while opening - if (this._opening) { - return; - } - - // Check to see if we need to end the stream and create a new one. - if (!this._needsNewFile()) { - return; - } - - // End the current stream, ensure it flushes and create a new one. - // This could potentially be optimized to not run a stat call but its - // the safest way since we are supporting `maxFiles`. - this._rotate = true; - this._endStream(() => this._rotateFile()); - } - - // Keep track of the pending bytes being written while files are opening - // in order to properly rotate the PassThrough this._stream when the file - // eventually does open. - this._pendingSize += bytes; - if (this._opening - && !this.rotatedWhileOpening - && this._needsNewFile(this._size + this._pendingSize)) { - this.rotatedWhileOpening = true; - } - - const written = this._stream.write(output, logged.bind(this)); - if (!written) { - this._drain = true; - this._stream.once('drain', () => { - this._drain = false; - callback(); - }); - } else { - callback(); // eslint-disable-line callback-return - } - - debug('written', written, this._drain); - - this.finishIfEnding(); - - return written; - } - - /** - * Query the transport. Options object is optional. - * @param {Object} options - Loggly-like query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - * TODO: Refactor me. - */ - query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = normalizeQuery(options); - const file = path.join(this.dirname, this.filename); - let buff = ''; - let results = []; - let row = 0; - - const stream = fs.createReadStream(file, { - encoding: 'utf8' - }); - - stream.on('error', err => { - if (stream.readable) { - stream.destroy(); - } - if (!callback) { - return; - } - - return err.code !== 'ENOENT' ? callback(err) : callback(null, results); - }); - - stream.on('data', data => { - data = (buff + data).split(/\n+/); - const l = data.length - 1; - let i = 0; - - for (; i < l; i++) { - if (!options.start || row >= options.start) { - add(data[i]); - } - row++; - } - - buff = data[l]; - }); - - stream.on('close', () => { - if (buff) { - add(buff, true); - } - if (options.order === 'desc') { - results = results.reverse(); - } - - // eslint-disable-next-line callback-return - if (callback) callback(null, results); - }); - - function add(buff, attempt) { - try { - const log = JSON.parse(buff); - if (check(log)) { - push(log); - } - } catch (e) { - if (!attempt) { - stream.emit('error', e); - } - } - } - - function push(log) { - if ( - options.rows && - results.length >= options.rows && - options.order !== 'desc' - ) { - if (stream.readable) { - stream.destroy(); - } - return; - } - - if (options.fields) { - log = options.fields.reduce((obj, key) => { - obj[key] = log[key]; - return obj; - }, {}); - } - - if (options.order === 'desc') { - if (results.length >= options.rows) { - results.shift(); - } - } - results.push(log); - } - - function check(log) { - if (!log) { - return; - } - - if (typeof log !== 'object') { - return; - } - - const time = new Date(log.timestamp); - if ( - (options.from && time < options.from) || - (options.until && time > options.until) || - (options.level && options.level !== log.level) - ) { - return; - } - - return true; - } - - function normalizeQuery(options) { - options = options || {}; - - // limit - options.rows = options.rows || options.limit || 10; - - // starting row offset - options.start = options.start || 0; - - // now - options.until = options.until || new Date(); - if (typeof options.until !== 'object') { - options.until = new Date(options.until); - } - - // now - 24 - options.from = options.from || (options.until - (24 * 60 * 60 * 1000)); - if (typeof options.from !== 'object') { - options.from = new Date(options.from); - } - - // 'asc' or 'desc' - options.order = options.order || 'desc'; - - return options; - } - } - - /** - * Returns a log stream for this transport. Options object is optional. - * @param {Object} options - Stream options for this instance. - * @returns {Stream} - TODO: add return description. - * TODO: Refactor me. - */ - stream(options = {}) { - const file = path.join(this.dirname, this.filename); - const stream = new Stream(); - const tail = { - file, - start: options.start - }; - - stream.destroy = tailFile(tail, (err, line) => { - if (err) { - return stream.emit('error', err); - } - - try { - stream.emit('data', line); - line = JSON.parse(line); - stream.emit('log', line); - } catch (e) { - stream.emit('error', e); - } - }); - - return stream; - } - - /** - * Checks to see the filesize of. - * @returns {undefined} - */ - open() { - // If we do not have a filename then we were passed a stream and - // don't need to keep track of size. - if (!this.filename) return; - if (this._opening) return; - - this._opening = true; - - // Stat the target file to get the size and create the stream. - this.stat((err, size) => { - if (err) { - return this.emit('error', err); - } - debug('stat done: %s { size: %s }', this.filename, size); - this._size = size; - this._dest = this._createStream(this._stream); - this._opening = false; - this.once('open', () => { - if (this._stream.eventNames().includes('rotate')) { - this._stream.emit('rotate'); - } else { - this._rotate = false; - } - }); - }); - } - - /** - * Stat the file and assess information in order to create the proper stream. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - stat(callback) { - const target = this._getFile(); - const fullpath = path.join(this.dirname, target); - - fs.stat(fullpath, (err, stat) => { - if (err && err.code === 'ENOENT') { - debug('ENOENT ok', fullpath); - // Update internally tracked filename with the new target name. - this.filename = target; - return callback(null, 0); - } - - if (err) { - debug(`err ${err.code} ${fullpath}`); - return callback(err); - } - - if (!stat || this._needsNewFile(stat.size)) { - // If `stats.size` is greater than the `maxsize` for this - // instance then try again. - return this._incFile(() => this.stat(callback)); - } - - // Once we have figured out what the filename is, set it - // and return the size. - this.filename = target; - callback(null, stat.size); - }); - } - - /** - * Closes the stream associated with this instance. - * @param {function} cb - TODO: add param description. - * @returns {undefined} - */ - close(cb) { - if (!this._stream) { - return; - } - - this._stream.end(() => { - if (cb) { - cb(); // eslint-disable-line callback-return - } - this.emit('flush'); - this.emit('closed'); - }); - } - - /** - * TODO: add method description. - * @param {number} size - TODO: add param description. - * @returns {undefined} - */ - _needsNewFile(size) { - size = size || this._size; - return this.maxsize && size >= this.maxsize; - } - - /** - * TODO: add method description. - * @param {Error} err - TODO: add param description. - * @returns {undefined} - */ - _onError(err) { - this.emit('error', err); - } - - /** - * TODO: add method description. - * @param {Stream} stream - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - _setupStream(stream) { - stream.on('error', this._onError); - - return stream; - } - - /** - * TODO: add method description. - * @param {Stream} stream - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - _cleanupStream(stream) { - stream.removeListener('error', this._onError); - - return stream; - } - - /** - * TODO: add method description. - */ - _rotateFile() { - this._incFile(() => this.open()); - } - - /** - * Unpipe from the stream that has been marked as full and end it so it - * flushes to disk. - * - * @param {function} callback - Callback for when the current file has closed. - * @private - */ - _endStream(callback = () => {}) { - if (this._dest) { - this._stream.unpipe(this._dest); - this._dest.end(() => { - this._cleanupStream(this._dest); - callback(); - }); - } else { - callback(); // eslint-disable-line callback-return - } - } - - /** - * Returns the WritableStream for the active file on this instance. If we - * should gzip the file then a zlib stream is returned. - * - * @param {ReadableStream} source – PassThrough to pipe to the file when open. - * @returns {WritableStream} Stream that writes to disk for the active file. - */ - _createStream(source) { - const fullpath = path.join(this.dirname, this.filename); - - debug('create stream start', fullpath, this.options); - const dest = fs.createWriteStream(fullpath, this.options) - // TODO: What should we do with errors here? - .on('error', err => debug(err)) - .on('close', () => debug('close', dest.path, dest.bytesWritten)) - .on('open', () => { - debug('file open ok', fullpath); - this.emit('open', fullpath); - source.pipe(dest); - - // If rotation occured during the open operation then we immediately - // start writing to a new PassThrough, begin opening the next file - // and cleanup the previous source and dest once the source has drained. - if (this.rotatedWhileOpening) { - this._stream = new PassThrough(); - this._stream.setMaxListeners(30); - this._rotateFile(); - this.rotatedWhileOpening = false; - this._cleanupStream(dest); - source.end(); - } - }); - - debug('create stream ok', fullpath); - if (this.zippedArchive) { - const gzip = zlib.createGzip(); - gzip.pipe(dest); - return gzip; - } - - return dest; - } - - /** - * TODO: add method description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - _incFile(callback) { - debug('_incFile', this.filename); - const ext = path.extname(this._basename); - const basename = path.basename(this._basename, ext); - - if (!this.tailable) { - this._created += 1; - this._checkMaxFilesIncrementing(ext, basename, callback); - } else { - this._checkMaxFilesTailable(ext, basename, callback); - } - } - - /** - * Gets the next filename to use for this instance in the case that log - * filesizes are being capped. - * @returns {string} - TODO: add return description. - * @private - */ - _getFile() { - const ext = path.extname(this._basename); - const basename = path.basename(this._basename, ext); - const isRotation = this.rotationFormat - ? this.rotationFormat() - : this._created; - - // Caveat emptor (indexzero): rotationFormat() was broken by design When - // combined with max files because the set of files to unlink is never - // stored. - const target = !this.tailable && this._created - ? `${basename}${isRotation}${ext}` - : `${basename}${ext}`; - - return this.zippedArchive && !this.tailable - ? `${target}.gz` - : target; - } - - /** - * Increment the number of files created or checked by this instance. - * @param {mixed} ext - TODO: add param description. - * @param {mixed} basename - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {undefined} - * @private - */ - _checkMaxFilesIncrementing(ext, basename, callback) { - // Check for maxFiles option and delete file. - if (!this.maxFiles || this._created < this.maxFiles) { - return setImmediate(callback); - } - - const oldest = this._created - this.maxFiles; - const isOldest = oldest !== 0 ? oldest : ''; - const isZipped = this.zippedArchive ? '.gz' : ''; - const filePath = `${basename}${isOldest}${ext}${isZipped}`; - const target = path.join(this.dirname, filePath); - - fs.unlink(target, callback); - } - - /** - * Roll files forward based on integer, up to maxFiles. e.g. if base if - * file.log and it becomes oversized, roll to file1.log, and allow file.log - * to be re-used. If file is oversized again, roll file1.log to file2.log, - * roll file.log to file1.log, and so on. - * @param {mixed} ext - TODO: add param description. - * @param {mixed} basename - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {undefined} - * @private - */ - _checkMaxFilesTailable(ext, basename, callback) { - const tasks = []; - if (!this.maxFiles) { - return; - } - - // const isZipped = this.zippedArchive ? '.gz' : ''; - const isZipped = this.zippedArchive ? '.gz' : ''; - for (let x = this.maxFiles - 1; x > 1; x--) { - tasks.push(function (i, cb) { - let fileName = `${basename}${(i - 1)}${ext}${isZipped}`; - const tmppath = path.join(this.dirname, fileName); - - fs.exists(tmppath, exists => { - if (!exists) { - return cb(null); - } - - fileName = `${basename}${i}${ext}${isZipped}`; - fs.rename(tmppath, path.join(this.dirname, fileName), cb); - }); - }.bind(this, x)); - } - - asyncSeries(tasks, () => { - fs.rename( - path.join(this.dirname, `${basename}${ext}`), - path.join(this.dirname, `${basename}1${ext}${isZipped}`), - callback - ); - }); - } - - _createLogDirIfNotExist(dirPath) { - /* eslint-disable no-sync */ - if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { recursive: true }); - } - /* eslint-enable no-sync */ - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/transports/http.js b/general/nvim/node_modules/winston/lib/winston/transports/http.js deleted file mode 100644 index ad29ef6..0000000 --- a/general/nvim/node_modules/winston/lib/winston/transports/http.js +++ /dev/null @@ -1,202 +0,0 @@ -/** - * http.js: Transport for outputting to a json-rpcserver. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const http = require('http'); -const https = require('https'); -const { Stream } = require('readable-stream'); -const TransportStream = require('winston-transport'); - -/** - * Transport for outputting to a json-rpc server. - * @type {Stream} - * @extends {TransportStream} - */ -module.exports = class Http extends TransportStream { - /** - * Constructor function for the Http transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - constructor(options = {}) { - super(options); - - this.options = options; - this.name = options.name || 'http'; - this.ssl = !!options.ssl; - this.host = options.host || 'localhost'; - this.port = options.port; - this.auth = options.auth; - this.path = options.path || ''; - this.agent = options.agent; - this.headers = options.headers || {}; - this.headers['content-type'] = 'application/json'; - - if (!this.port) { - this.port = this.ssl ? 443 : 80; - } - } - - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback) { - this._request(info, (err, res) => { - if (res && res.statusCode !== 200) { - err = new Error(`Invalid HTTP Status Code: ${res.statusCode}`); - } - - if (err) { - this.emit('warn', err); - } else { - this.emit('logged', info); - } - }); - - // Remark: (jcrugzz) Fire and forget here so requests dont cause buffering - // and block more requests from happening? - if (callback) { - setImmediate(callback); - } - } - - /** - * Query the transport. Options object is optional. - * @param {Object} options - Loggly-like query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - * @returns {undefined} - */ - query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = { - method: 'query', - params: this.normalizeQuery(options) - }; - - if (options.params.path) { - options.path = options.params.path; - delete options.params.path; - } - - if (options.params.auth) { - options.auth = options.params.auth; - delete options.params.auth; - } - - this._request(options, (err, res, body) => { - if (res && res.statusCode !== 200) { - err = new Error(`Invalid HTTP Status Code: ${res.statusCode}`); - } - - if (err) { - return callback(err); - } - - if (typeof body === 'string') { - try { - body = JSON.parse(body); - } catch (e) { - return callback(e); - } - } - - callback(null, body); - }); - } - - /** - * Returns a log stream for this transport. Options object is optional. - * @param {Object} options - Stream options for this instance. - * @returns {Stream} - TODO: add return description - */ - stream(options = {}) { - const stream = new Stream(); - options = { - method: 'stream', - params: options - }; - - if (options.params.path) { - options.path = options.params.path; - delete options.params.path; - } - - if (options.params.auth) { - options.auth = options.params.auth; - delete options.params.auth; - } - - let buff = ''; - const req = this._request(options); - - stream.destroy = () => req.destroy(); - req.on('data', data => { - data = (buff + data).split(/\n+/); - const l = data.length - 1; - - let i = 0; - for (; i < l; i++) { - try { - stream.emit('log', JSON.parse(data[i])); - } catch (e) { - stream.emit('error', e); - } - } - - buff = data[l]; - }); - req.on('error', err => stream.emit('error', err)); - - return stream; - } - - /** - * Make a request to a winstond server or any http server which can - * handle json-rpc. - * @param {function} options - Options to sent the request. - * @param {function} callback - Continuation to respond to when complete. - */ - _request(options, callback) { - options = options || {}; - - const auth = options.auth || this.auth; - const path = options.path || this.path || ''; - - delete options.auth; - delete options.path; - - // Prepare options for outgoing HTTP request - const headers = Object.assign({}, this.headers); - if (auth && auth.bearer) { - headers.Authorization = `Bearer ${auth.bearer}`; - } - const req = (this.ssl ? https : http).request({ - ...this.options, - method: 'POST', - host: this.host, - port: this.port, - path: `/${path.replace(/^\//, '')}`, - headers: headers, - auth: (auth && auth.username && auth.password) ? (`${auth.username}:${auth.password}`) : '', - agent: this.agent - }); - - req.on('error', callback); - req.on('response', res => ( - res.on('end', () => callback(null, res)).resume() - )); - req.end(Buffer.from(JSON.stringify(options), 'utf8')); - } -}; diff --git a/general/nvim/node_modules/winston/lib/winston/transports/index.d.ts b/general/nvim/node_modules/winston/lib/winston/transports/index.d.ts deleted file mode 100644 index ae0633c..0000000 --- a/general/nvim/node_modules/winston/lib/winston/transports/index.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Type definitions for winston 3.0 -// Project: https://github.com/winstonjs/winston - -/// - -import {Agent} from "http"; - -import * as Transport from 'winston-transport'; - -declare namespace winston { - interface ConsoleTransportOptions extends Transport.TransportStreamOptions { - consoleWarnLevels?: string[], - stderrLevels?: string[]; - debugStdout?: boolean; - eol?: string; - } - - interface ConsoleTransportInstance extends Transport { - name: string; - stderrLevels: string[]; - eol: string; - - new(options?: ConsoleTransportOptions): ConsoleTransportInstance; - } - - interface FileTransportOptions extends Transport.TransportStreamOptions { - filename?: string; - dirname?: string; - options?: object; - maxsize?: number; - stream?: NodeJS.WritableStream; - rotationFormat?: Function; - zippedArchive?: boolean; - maxFiles?: number; - eol?: string; - tailable?: boolean; - } - - interface FileTransportInstance extends Transport { - name: string; - filename: string; - dirname: string; - options: object; - maxsize: number | null; - rotationFormat: Function | boolean; - zippedArchive: boolean; - maxFiles: number | null; - eol: string; - tailable: boolean; - - new(options?: FileTransportOptions): FileTransportInstance; - } - - interface HttpTransportOptions extends Transport.TransportStreamOptions { - ssl?: any; - host?: string; - port?: number; - auth?: { username?: string | undefined, password?: string | undefined, bearer?: string | undefined }; - path?: string; - agent?: Agent; - headers?: object; - } - - interface HttpTransportInstance extends Transport { - name: string; - ssl: boolean; - host: string; - port: number; - auth?: { username?: string | undefined, password?: string | undefined, bearer?: string | undefined }; - path: string; - agent?: Agent | null; - - new(options?: HttpTransportOptions): HttpTransportInstance; - } - - interface StreamTransportOptions extends Transport.TransportStreamOptions { - stream: NodeJS.WritableStream; - eol?: string; - } - - interface StreamTransportInstance extends Transport { - eol: string; - - new(options?: StreamTransportOptions): StreamTransportInstance; - } - - interface Transports { - FileTransportOptions: FileTransportOptions; - File: FileTransportInstance; - ConsoleTransportOptions: ConsoleTransportOptions; - Console: ConsoleTransportInstance; - HttpTransportOptions: HttpTransportOptions; - Http: HttpTransportInstance; - StreamTransportOptions: StreamTransportOptions; - Stream: StreamTransportInstance; - } -} - -declare const winston: winston.Transports; -export = winston; diff --git a/general/nvim/node_modules/winston/lib/winston/transports/index.js b/general/nvim/node_modules/winston/lib/winston/transports/index.js deleted file mode 100644 index f2f7cc3..0000000 --- a/general/nvim/node_modules/winston/lib/winston/transports/index.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * transports.js: Set of all transports Winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -/** - * TODO: add property description. - * @type {Console} - */ -Object.defineProperty(exports, 'Console', { - configurable: true, - enumerable: true, - get() { - return require('./console'); - } -}); - -/** - * TODO: add property description. - * @type {File} - */ -Object.defineProperty(exports, 'File', { - configurable: true, - enumerable: true, - get() { - return require('./file'); - } -}); - -/** - * TODO: add property description. - * @type {Http} - */ -Object.defineProperty(exports, 'Http', { - configurable: true, - enumerable: true, - get() { - return require('./http'); - } -}); - -/** - * TODO: add property description. - * @type {Stream} - */ -Object.defineProperty(exports, 'Stream', { - configurable: true, - enumerable: true, - get() { - return require('./stream'); - } -}); diff --git a/general/nvim/node_modules/winston/lib/winston/transports/stream.js b/general/nvim/node_modules/winston/lib/winston/transports/stream.js deleted file mode 100644 index 378520a..0000000 --- a/general/nvim/node_modules/winston/lib/winston/transports/stream.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * stream.js: Transport for outputting to any arbitrary stream. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - -'use strict'; - -const isStream = require('is-stream'); -const { MESSAGE } = require('triple-beam'); -const os = require('os'); -const TransportStream = require('winston-transport'); - -/** - * Transport for outputting to any arbitrary stream. - * @type {Stream} - * @extends {TransportStream} - */ -module.exports = class Stream extends TransportStream { - /** - * Constructor function for the Console transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - constructor(options = {}) { - super(options); - - if (!options.stream || !isStream(options.stream)) { - throw new Error('options.stream is required.'); - } - - // We need to listen for drain events when write() returns false. This can - // make node mad at times. - this._stream = options.stream; - this._stream.setMaxListeners(Infinity); - this.isObjectMode = options.stream._writableState.objectMode; - this.eol = options.eol || os.EOL; - } - - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback) { - setImmediate(() => this.emit('logged', info)); - if (this.isObjectMode) { - this._stream.write(info); - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } - - this._stream.write(`${info[MESSAGE]}${this.eol}`); - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } -}; diff --git a/general/nvim/node_modules/winston/package.json b/general/nvim/node_modules/winston/package.json deleted file mode 100644 index 28a9bf1..0000000 --- a/general/nvim/node_modules/winston/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "winston", - "description": "A logger for just about everything.", - "version": "3.3.3", - "author": "Charlie Robbins ", - "maintainers": [ - "Jarrett Cruger ", - "Chris Alderson ", - "David Hyde " - ], - "repository": { - "type": "git", - "url": "https://github.com/winstonjs/winston.git" - }, - "keywords": [ - "winston", - "logger", - "logging", - "logs", - "sysadmin", - "bunyan", - "pino", - "loglevel", - "tools", - "json", - "stream" - ], - "dependencies": { - "async": "^3.1.0", - "@dabh/diagnostics": "^2.0.2", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - }, - "devDependencies": { - "@babel/cli": "^7.10.3", - "@babel/core": "^7.10.3", - "@babel/preset-env": "^7.10.3", - "@types/node": "^14.0.13", - "abstract-winston-transport": "^0.5.1", - "assume": "^2.2.0", - "colors": "^1.4.0", - "cross-spawn-async": "^2.2.5", - "eslint-config-populist": "^4.2.0", - "hock": "^1.4.1", - "mocha": "^8.0.1", - "nyc": "^15.1.0", - "rimraf": "^3.0.2", - "split2": "^3.1.1", - "std-mocks": "^1.0.1", - "through2": "^3.0.1", - "winston-compat": "^0.1.5" - }, - "main": "./lib/winston", - "browser": "./dist/winston", - "types": "./index.d.ts", - "scripts": { - "lint": "populist lib/*.js lib/winston/*.js lib/winston/**/*.js", - "pretest": "npm run lint", - "test": "nyc --reporter=text --reporter lcov npm run test:mocha", - "test:mocha": "mocha test/*.test.js test/**/*.test.js --exit", - "build": "./node_modules/.bin/rimraf dist && babel lib -d dist", - "prepublishOnly": "npm run build" - }, - "engines": { - "node": ">= 6.4.0" - }, - "license": "MIT" -} diff --git a/general/nvim/node_modules/yallist/LICENSE b/general/nvim/node_modules/yallist/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/general/nvim/node_modules/yallist/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/general/nvim/node_modules/yallist/README.md b/general/nvim/node_modules/yallist/README.md deleted file mode 100644 index f586101..0000000 --- a/general/nvim/node_modules/yallist/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# yallist - -Yet Another Linked List - -There are many doubly-linked list implementations like it, but this -one is mine. - -For when an array would be too big, and a Map can't be iterated in -reverse order. - - -[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) - -## basic usage - -```javascript -var yallist = require('yallist') -var myList = yallist.create([1, 2, 3]) -myList.push('foo') -myList.unshift('bar') -// of course pop() and shift() are there, too -console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] -myList.forEach(function (k) { - // walk the list head to tail -}) -myList.forEachReverse(function (k, index, list) { - // walk the list tail to head -}) -var myDoubledList = myList.map(function (k) { - return k + k -}) -// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] -// mapReverse is also a thing -var myDoubledListReverse = myList.mapReverse(function (k) { - return k + k -}) // ['foofoo', 6, 4, 2, 'barbar'] - -var reduced = myList.reduce(function (set, entry) { - set += entry - return set -}, 'start') -console.log(reduced) // 'startfoo123bar' -``` - -## api - -The whole API is considered "public". - -Functions with the same name as an Array method work more or less the -same way. - -There's reverse versions of most things because that's the point. - -### Yallist - -Default export, the class that holds and manages a list. - -Call it with either a forEach-able (like an array) or a set of -arguments, to initialize the list. - -The Array-ish methods all act like you'd expect. No magic length, -though, so if you change that it won't automatically prune or add -empty spots. - -### Yallist.create(..) - -Alias for Yallist function. Some people like factories. - -#### yallist.head - -The first node in the list - -#### yallist.tail - -The last node in the list - -#### yallist.length - -The number of nodes in the list. (Change this at your peril. It is -not magic like Array length.) - -#### yallist.toArray() - -Convert the list to an array. - -#### yallist.forEach(fn, [thisp]) - -Call a function on each item in the list. - -#### yallist.forEachReverse(fn, [thisp]) - -Call a function on each item in the list, in reverse order. - -#### yallist.get(n) - -Get the data at position `n` in the list. If you use this a lot, -probably better off just using an Array. - -#### yallist.getReverse(n) - -Get the data at position `n`, counting from the tail. - -#### yallist.map(fn, thisp) - -Create a new Yallist with the result of calling the function on each -item. - -#### yallist.mapReverse(fn, thisp) - -Same as `map`, but in reverse. - -#### yallist.pop() - -Get the data from the list tail, and remove the tail from the list. - -#### yallist.push(item, ...) - -Insert one or more items to the tail of the list. - -#### yallist.reduce(fn, initialValue) - -Like Array.reduce. - -#### yallist.reduceReverse - -Like Array.reduce, but in reverse. - -#### yallist.reverse - -Reverse the list in place. - -#### yallist.shift() - -Get the data from the list head, and remove the head from the list. - -#### yallist.slice([from], [to]) - -Just like Array.slice, but returns a new Yallist. - -#### yallist.sliceReverse([from], [to]) - -Just like yallist.slice, but the result is returned in reverse. - -#### yallist.toArray() - -Create an array representation of the list. - -#### yallist.toArrayReverse() - -Create a reversed array representation of the list. - -#### yallist.unshift(item, ...) - -Insert one or more items to the head of the list. - -#### yallist.unshiftNode(node) - -Move a Node object to the front of the list. (That is, pull it out of -wherever it lives, and make it the new head.) - -If the node belongs to a different list, then that list will remove it -first. - -#### yallist.pushNode(node) - -Move a Node object to the end of the list. (That is, pull it out of -wherever it lives, and make it the new tail.) - -If the node belongs to a list already, then that list will remove it -first. - -#### yallist.removeNode(node) - -Remove a node from the list, preserving referential integrity of head -and tail and other nodes. - -Will throw an error if you try to have a list remove a node that -doesn't belong to it. - -### Yallist.Node - -The class that holds the data and is actually the list. - -Call with `var n = new Node(value, previousNode, nextNode)` - -Note that if you do direct operations on Nodes themselves, it's very -easy to get into weird states where the list is broken. Be careful :) - -#### node.next - -The next node in the list. - -#### node.prev - -The previous node in the list. - -#### node.value - -The data the node contains. - -#### node.list - -The list to which this node belongs. (Null if it does not belong to -any list.) diff --git a/general/nvim/node_modules/yallist/iterator.js b/general/nvim/node_modules/yallist/iterator.js deleted file mode 100644 index d41c97a..0000000 --- a/general/nvim/node_modules/yallist/iterator.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } - } -} diff --git a/general/nvim/node_modules/yallist/package.json b/general/nvim/node_modules/yallist/package.json deleted file mode 100644 index 8a08386..0000000 --- a/general/nvim/node_modules/yallist/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "yallist", - "version": "4.0.0", - "description": "Yet Another Linked List", - "main": "yallist.js", - "directories": { - "test": "test" - }, - "files": [ - "yallist.js", - "iterator.js" - ], - "dependencies": {}, - "devDependencies": { - "tap": "^12.1.0" - }, - "scripts": { - "test": "tap test/*.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/yallist.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" -} diff --git a/general/nvim/node_modules/yallist/yallist.js b/general/nvim/node_modules/yallist/yallist.js deleted file mode 100644 index 4e83ab1..0000000 --- a/general/nvim/node_modules/yallist/yallist.js +++ /dev/null @@ -1,426 +0,0 @@ -'use strict' -module.exports = Yallist - -Yallist.Node = Node -Yallist.create = Yallist - -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() - } - - self.tail = null - self.head = null - self.length = 0 - - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) - } - } - - return self -} - -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') - } - - var next = node.next - var prev = node.prev - - if (next) { - next.prev = prev - } - - if (prev) { - prev.next = next - } - - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev - } - - node.list.length-- - node.next = null - node.prev = null - node.list = null - - return next -} - -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node - } - - this.head = node - if (!this.tail) { - this.tail = node - } - this.length++ -} - -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node - } - - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} - -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } - - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res -} - -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } - - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null - } - this.length-- - return res -} - -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } -} - -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } -} - -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next - } - return res -} - -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res -} - -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } - - return acc -} - -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } - - return acc -} - -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} - -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} - -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.splice = function (start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1 - } - if (start < 0) { - start = this.length + start; - } - - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next - } - - var ret = [] - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value) - walker = this.removeNode(walker) - } - if (walker === null) { - walker = this.tail - } - - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev - } - - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]) - } - return ret; -} - -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p - } - this.head = tail - this.tail = head - return this -} - -function insert (self, node, value) { - var inserted = node === self.head ? - new Node(value, null, node, self) : - new Node(value, node, node.next, self) - - if (inserted.next === null) { - self.tail = inserted - } - if (inserted.prev === null) { - self.head = inserted - } - - self.length++ - - return inserted -} - -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail - } - self.length++ -} - -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} - -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) - } - - this.list = list - this.value = value - - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null - } - - if (next) { - next.prev = this - this.next = next - } else { - this.next = null - } -} - -try { - // add if support for Symbol.iterator is present - require('./iterator.js')(Yallist) -} catch (er) {} diff --git a/general/nvim/package-lock.json b/general/nvim/package-lock.json deleted file mode 100644 index 04c68ff..0000000 --- a/general/nvim/package-lock.json +++ /dev/null @@ -1,546 +0,0 @@ -{ - "name": "nvim", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "neovim": "^4.10.1" - } - }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", - "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "node_modules/@msgpack/msgpack": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-2.7.2.tgz", - "integrity": "sha512-rYEi46+gIzufyYUAoHDnRzkWGxajpD9vVXFQ3g1vbjrBm6P7MBmm+s/fqPa46sxa+8FOUdEuRQKaugo5a4JWpw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/async": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", - "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" - }, - "node_modules/color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/colorspace": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", - "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "node_modules/enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" - }, - "node_modules/fecha": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" - }, - "node_modules/fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" - }, - "node_modules/logform": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.0.tgz", - "integrity": "sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw==", - "dependencies": { - "@colors/colors": "1.5.0", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/neovim": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/neovim/-/neovim-4.10.1.tgz", - "integrity": "sha512-H46Jl2bh/LAFJsitv2MiIK3oCxvQnEK9t3efNMUUkKzsTYlLIikVxGWVk/vJnHzvxoHYBIRB/KHwPAOm+9UStg==", - "dependencies": { - "@msgpack/msgpack": "^2.7.1", - "semver": "^7.3.5", - "winston": "3.3.3" - }, - "bin": { - "neovim-node-host": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "dependencies": { - "fn.name": "1.x.x" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-stable-stringify": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz", - "integrity": "sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==", - "engines": { - "node": ">=10" - } - }, - "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "engines": { - "node": "*" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, - "node_modules/triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "node_modules/winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", - "dependencies": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - }, - "engines": { - "node": ">= 6.4.0" - } - }, - "node_modules/winston-transport": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", - "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 6.4.0" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - }, - "dependencies": { - "@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==" - }, - "@dabh/diagnostics": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", - "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "requires": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "@msgpack/msgpack": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-2.7.2.tgz", - "integrity": "sha512-rYEi46+gIzufyYUAoHDnRzkWGxajpD9vVXFQ3g1vbjrBm6P7MBmm+s/fqPa46sxa+8FOUdEuRQKaugo5a4JWpw==" - }, - "async": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", - "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" - }, - "color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "requires": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colorspace": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", - "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "requires": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" - }, - "fecha": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" - }, - "fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" - }, - "kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" - }, - "logform": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.0.tgz", - "integrity": "sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw==", - "requires": { - "@colors/colors": "1.5.0", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "neovim": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/neovim/-/neovim-4.10.1.tgz", - "integrity": "sha512-H46Jl2bh/LAFJsitv2MiIK3oCxvQnEK9t3efNMUUkKzsTYlLIikVxGWVk/vJnHzvxoHYBIRB/KHwPAOm+9UStg==", - "requires": { - "@msgpack/msgpack": "^2.7.1", - "semver": "^7.3.5", - "winston": "3.3.3" - } - }, - "one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "requires": { - "fn.name": "1.x.x" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safe-stable-stringify": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz", - "integrity": "sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==" - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "requires": { - "is-arrayish": "^0.3.1" - } - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, - "triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", - "requires": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - } - }, - "winston-transport": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", - "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", - "requires": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } -} diff --git a/general/nvim/package.json b/general/nvim/package.json deleted file mode 100644 index e5dc24a..0000000 --- a/general/nvim/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "neovim": "^4.10.1" - } -} diff --git a/general/nvim/plugin/packer_compiled.lua b/general/nvim/plugin/packer_compiled.lua deleted file mode 100644 index a883fda..0000000 --- a/general/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,615 +0,0 @@ --- Automatically generated packer.nvim plugin loader code - -if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then - vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') - return -end - -vim.api.nvim_command('packadd packer.nvim') - -local no_errors, error_msg = pcall(function() - - local time - local profile_info - local should_profile = false - if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end - end - else - time = function(chunk, start) end - end - -local function save_profiles(threshold) - local sorted_times = {} - for chunk_name, time_taken in pairs(profile_info) do - sorted_times[#sorted_times + 1] = {chunk_name, time_taken} - end - table.sort(sorted_times, function(a, b) return a[2] > b[2] end) - local results = {} - for i, elem in ipairs(sorted_times) do - if not threshold or threshold and elem[2] > threshold then - results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' - end - end - - _G._packer = _G._packer or {} - _G._packer.profile_output = results -end - -time([[Luarocks path setup]], true) -local package_path_str = "/Users/mikeunge/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/mikeunge/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/mikeunge/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/mikeunge/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/Users/mikeunge/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" -if not string.find(package.path, package_path_str, 1, true) then - package.path = package.path .. ';' .. package_path_str -end - -if not string.find(package.cpath, install_cpath_pattern, 1, true) then - package.cpath = package.cpath .. ';' .. install_cpath_pattern -end - -time([[Luarocks path setup]], false) -time([[try_loadstring definition]], true) -local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) - if not success then - vim.schedule(function() - vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) - end) - end - return result -end - -time([[try_loadstring definition]], false) -time([[Defining packer_plugins]], true) -_G.packer_plugins = { - ["FixCursorHold.nvim"] = { - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/FixCursorHold.nvim", - url = "https://github.com/antoinemadec/FixCursorHold.nvim" - }, - LuaSnip = { - after = { "nvim-cmp", "cmp_luasnip" }, - config = { "\27LJ\2\n\1\0\0\3\0\5\0\v6\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\0016\0\0\0'\2\3\0B\0\2\0029\0\4\0B\0\1\1K\0\1\0\14lazy_load\"luasnip.loaders.from_snipmate\tload luasnip.loaders.from_vscode\frequire\0" }, - load_after = { - ["friendly-snippets"] = true - }, - loaded = false, - needs_bufread = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/LuaSnip", - url = "https://github.com/L3MON4D3/LuaSnip" - }, - ["TrueZen.nvim"] = { - commands = { "TZFocus", "TZAtaraxis", "TZMinimalist" }, - config = { "\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/true-zen\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/TrueZen.nvim", - url = "https://github.com/Pocco81/TrueZen.nvim" - }, - ["alpha-nvim"] = { - commands = { "Alpha" }, - config = { "\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18plugins.alpha\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/alpha-nvim", - url = "https://github.com/goolord/alpha-nvim" - }, - ["bufferline.nvim"] = { - config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/bufferline\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/bufferline.nvim", - url = "https://github.com/akinsho/bufferline.nvim" - }, - catppuccin = { - config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/catppuccin\frequire\0" }, - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/catppuccin", - url = "https://github.com/catppuccin/nvim" - }, - ["cmp-buffer"] = { - after_files = { "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-buffer/after/plugin/cmp_buffer.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-buffer", - url = "https://github.com/hrsh7th/cmp-buffer" - }, - ["cmp-nvim-lsp"] = { - after_files = { "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp/after/plugin/cmp_nvim_lsp.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["cmp-nvim-lua"] = { - after_files = { "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua/after/plugin/cmp_nvim_lua.lua" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua", - url = "https://github.com/hrsh7th/cmp-nvim-lua" - }, - ["cmp-path"] = { - after_files = { "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-path/after/plugin/cmp_path.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp-path", - url = "https://github.com/hrsh7th/cmp-path" - }, - cmp_luasnip = { - after_files = { "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp_luasnip/after/plugin/cmp_luasnip.lua" }, - load_after = { - LuaSnip = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/cmp_luasnip", - url = "https://github.com/saadparwaiz1/cmp_luasnip" - }, - ["friendly-snippets"] = { - after = { "LuaSnip" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/friendly-snippets", - url = "https://github.com/rafamadriz/friendly-snippets" - }, - ["gitsigns.nvim"] = { - config = { "\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/gitsigns\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim", - url = "https://github.com/lewis6991/gitsigns.nvim" - }, - ["impatient.nvim"] = { - config = { "\27LJ\2\n)\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\14impatient\frequire\0" }, - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/impatient.nvim", - url = "https://github.com/lewis6991/impatient.nvim" - }, - ["indent-blankline.nvim"] = { - config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins/indent-blankline\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim", - url = "https://github.com/lukas-reineke/indent-blankline.nvim" - }, - kommentary = { - config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins.kommentary\frequire\0" }, - keys = { { "", "kommentary_line_default" }, { "", "kommentary_visual_default" } }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/kommentary", - url = "https://github.com/b3nj5m1n/kommentary" - }, - ["lsp_signature.nvim"] = { - config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18lsp_signature\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/lsp_signature.nvim", - url = "https://github.com/ray-x/lsp_signature.nvim" - }, - ["lspsaga.nvim"] = { - commands = { "Lspsaga" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/lspsaga.nvim", - url = "https://github.com/tami5/lspsaga.nvim" - }, - ["lualine.nvim"] = { - config = { "\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins/lualine/lualine\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/lualine.nvim", - url = "https://github.com/nvim-lualine/lualine.nvim" - }, - ["mkdir.nvim"] = { - config = { "\27LJ\2\n%\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\nmkdir\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/mkdir.nvim", - url = "https://github.com/jghauser/mkdir.nvim" - }, - ["neoscroll.nvim"] = { - config = { "\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins.neoscroll\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/neoscroll.nvim", - url = "https://github.com/karb94/neoscroll.nvim" - }, - ["nord.nvim"] = { - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/nord.nvim", - url = "https://github.com/shaunsingh/nord.nvim" - }, - ["null-ls.nvim"] = { - after = { "nvim-lspconfig" }, - config = { "\27LJ\2\nI\0\0\3\0\3\0\t6\0\0\0'\2\1\0B\0\2\0029\1\2\0\n\1\0\0X\1\29\1\2\0B\1\1\1K\0\1\0\fnull_ls\18user_settings\frequire\0" }, - load_after = { - ["nvim-lsp-installer"] = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/null-ls.nvim", - url = "https://github.com/jose-elias-alvarez/null-ls.nvim" - }, - ["nvim-autopairs"] = { - config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" }, - keys = { { "i", "(" }, { "i", "[" }, { "i", "{" }, { "i", "'" }, { "i", '"' }, { "i", "" } }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-autopairs", - url = "https://github.com/windwp/nvim-autopairs" - }, - ["nvim-cmp"] = { - after = { "cmp-buffer", "cmp-nvim-lsp", "cmp-path" }, - config = { "\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16plugins/cmp\frequire\0" }, - load_after = { - LuaSnip = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-colorizer.lua"] = { - config = { "\27LJ\2\na\0\0\3\0\5\0\b6\0\0\0'\2\1\0B\0\2\0016\0\2\0009\0\3\0'\2\4\0B\0\2\1K\0\1\0\28ColorizerAttachToBuffer\bcmd\bvim\22plugins/colorizer\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-colorizer.lua", - url = "https://github.com/norcalli/nvim-colorizer.lua" - }, - ["nvim-enfocado"] = { - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/nvim-enfocado", - url = "https://github.com/artart222/nvim-enfocado" - }, - ["nvim-lsp-installer"] = { - after = { "null-ls.nvim" }, - commands = { "LspInstall", "LspInstallInfo", "LspPrintInstalled", "LspRestart", "LspStart", "LspStop", "LspUninstall", "LspUninstallAll" }, - loaded = false, - needs_bufread = true, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-lsp-installer", - url = "https://github.com/williamboman/nvim-lsp-installer" - }, - ["nvim-lspconfig"] = { - config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins.lsp.lsp\frequire\0" }, - load_after = { - ["null-ls.nvim"] = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig" - }, - ["nvim-scrollview"] = { - config = { "\27LJ\2\n3\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\24plugins/nvim-scroll\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-scrollview", - url = "https://github.com/dstein64/nvim-scrollview" - }, - ["nvim-tree.lua"] = { - commands = { "NvimTreeOpen", "NvimTreeFocus", "NvimTreeToggle" }, - config = { "\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins.nvim-tree\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-tree.lua", - url = "https://github.com/kyazdani42/nvim-tree.lua" - }, - ["nvim-treesitter"] = { - after = { "nvim-ts-context-commentstring" }, - commands = { "TSInstall", "TSInstallInfo", "TSInstallSync", "TSUninstall", "TSUpdate", "TSUpdateSync", "TSDisableAll", "TSEnableAll" }, - config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/treesitter\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["nvim-ts-autotag"] = { - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-ts-autotag", - url = "https://github.com/windwp/nvim-ts-autotag" - }, - ["nvim-ts-context-commentstring"] = { - load_after = { - ["nvim-treesitter"] = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-ts-context-commentstring", - url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring" - }, - ["nvim-web-devicons"] = { - config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.nvim_web_devicons\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", - url = "https://github.com/kyazdani42/nvim-web-devicons" - }, - ["onedark.nvim"] = { - config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins/onedark\frequire\0" }, - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/onedark.nvim", - url = "https://github.com/navarasu/onedark.nvim" - }, - ["packer.nvim"] = { - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["symbols-outline.nvim"] = { - commands = { "SymbolsOutline", "SymbolsOutlineOpen", "SymbolsOutlineClose" }, - config = { "\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins.symbols-outline\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/symbols-outline.nvim", - url = "https://github.com/simrat39/symbols-outline.nvim" - }, - ["telescope-fzf-native.nvim"] = { - after = { "telescope_find_directories" }, - commands = { "Telescope" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/telescope-fzf-native.nvim", - url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" - }, - ["telescope.nvim"] = { - config = { "\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0" }, - load_after = { - telescope_find_directories = true - }, - loaded = false, - needs_bufread = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - telescope_find_directories = { - after = { "telescope.nvim" }, - load_after = { - ["telescope-fzf-native.nvim"] = true - }, - loaded = false, - needs_bufread = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/telescope_find_directories", - url = "https://github.com/artart222/telescope_find_directories" - }, - ["todo-comments.nvim"] = { - config = { "\27LJ\2\n5\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\26plugins/todo-comments\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/todo-comments.nvim", - url = "https://github.com/folke/todo-comments.nvim" - }, - ["toggleterm.nvim"] = { - commands = { "ToggleTerm" }, - config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/toggleterm\frequire\0" }, - keys = { { "", "" } }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/toggleterm.nvim", - url = "https://github.com/akinsho/toggleterm.nvim" - }, - ["tokyonight.nvim"] = { - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", - url = "https://github.com/folke/tokyonight.nvim" - }, - undotree = { - config = { "\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/undotree\frequire\0" }, - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/undotree", - url = "https://github.com/mbbill/undotree" - }, - ["vim-fugitive"] = { - commands = { "Git" }, - loaded = false, - needs_bufread = true, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/vim-fugitive", - url = "https://github.com/tpope/vim-fugitive" - }, - ["vim-matchup"] = { - after_files = { "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/vim-matchup/after/plugin/matchit.vim" }, - config = { "\27LJ\2\n>\0\0\2\0\3\0\0056\0\0\0009\0\1\0004\1\0\0=\1\2\0K\0\1\0!matchup_matchparen_offscreen\6g\bvim\0" }, - loaded = false, - needs_bufread = true, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/vim-matchup", - url = "https://github.com/andymass/vim-matchup" - }, - ["vim-moonfly-colors"] = { - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/vim-moonfly-colors", - url = "https://github.com/bluz71/vim-moonfly-colors" - }, - ["vim-nightfly-guicolors"] = { - loaded = true, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/start/vim-nightfly-guicolors", - url = "https://github.com/bluz71/vim-nightfly-guicolors" - }, - ["vim-resize"] = { - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/vim-resize", - url = "https://github.com/artart222/vim-resize" - }, - ["which-key.nvim"] = { - config = { "\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/which_key\frequire\0" }, - keys = { { "", "" }, { "", "g" }, { "", "d" }, { "", "y" }, { "", "!" }, { "", "z" }, { "", ">" }, { "", "<" }, { "", "]" }, { "", "[" }, { "", "v" }, { "", "c" } }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/mikeunge/.local/share/nvim/site/pack/packer/opt/which-key.nvim", - url = "https://github.com/folke/which-key.nvim" - } -} - -time([[Defining packer_plugins]], false) --- Config for: catppuccin -time([[Config for catppuccin]], true) -try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/catppuccin\frequire\0", "config", "catppuccin") -time([[Config for catppuccin]], false) --- Config for: impatient.nvim -time([[Config for impatient.nvim]], true) -try_loadstring("\27LJ\2\n)\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\14impatient\frequire\0", "config", "impatient.nvim") -time([[Config for impatient.nvim]], false) --- Config for: undotree -time([[Config for undotree]], true) -try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/undotree\frequire\0", "config", "undotree") -time([[Config for undotree]], false) --- Config for: onedark.nvim -time([[Config for onedark.nvim]], true) -try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins/onedark\frequire\0", "config", "onedark.nvim") -time([[Config for onedark.nvim]], false) - --- Command lazy-loads -time([[Defining lazy-load commands]], true) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspStart lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspStart", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspStop lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspStop", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspUninstall lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspUninstall", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspUninstallAll lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspUninstallAll", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Alpha lua require("packer.load")({'alpha-nvim'}, { cmd = "Alpha", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSUninstall lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSUninstall", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSUpdate lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSUpdate", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSUpdateSync lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSUpdateSync", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSDisableAll lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSDisableAll", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSEnableAll lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSEnableAll", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TZMinimalist lua require("packer.load")({'TrueZen.nvim'}, { cmd = "TZMinimalist", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TZAtaraxis lua require("packer.load")({'TrueZen.nvim'}, { cmd = "TZAtaraxis", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Lspsaga lua require("packer.load")({'lspsaga.nvim'}, { cmd = "Lspsaga", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TZFocus lua require("packer.load")({'TrueZen.nvim'}, { cmd = "TZFocus", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSInstallSync lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSInstallSync", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file SymbolsOutline lua require("packer.load")({'symbols-outline.nvim'}, { cmd = "SymbolsOutline", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file SymbolsOutlineOpen lua require("packer.load")({'symbols-outline.nvim'}, { cmd = "SymbolsOutlineOpen", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeToggle lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeToggle", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSInstallInfo lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSInstallInfo", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSInstall lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSInstall", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file ToggleTerm lua require("packer.load")({'toggleterm.nvim'}, { cmd = "ToggleTerm", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Git lua require("packer.load")({'vim-fugitive'}, { cmd = "Git", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file SymbolsOutlineClose lua require("packer.load")({'symbols-outline.nvim'}, { cmd = "SymbolsOutlineClose", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Telescope lua require("packer.load")({'telescope-fzf-native.nvim'}, { cmd = "Telescope", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeFocus lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeFocus", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeOpen lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeOpen", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspInstall lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspInstall", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspInstallInfo lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspInstallInfo", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspPrintInstalled lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspPrintInstalled", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file LspRestart lua require("packer.load")({'nvim-lsp-installer'}, { cmd = "LspRestart", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) -time([[Defining lazy-load commands]], false) - --- Keymap lazy-loads -time([[Defining lazy-load keymaps]], true) -vim.cmd [[inoremap ' lua require("packer.load")({'nvim-autopairs'}, { keys = "'" }, _G.packer_plugins)]] -vim.cmd [[noremap c lua require("packer.load")({'which-key.nvim'}, { keys = "c", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap v lua require("packer.load")({'which-key.nvim'}, { keys = "v", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap [ lua require("packer.load")({'which-key.nvim'}, { keys = "[", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap > lua require("packer.load")({'which-key.nvim'}, { keys = ">", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap ] lua require("packer.load")({'which-key.nvim'}, { keys = "]", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap < lua require("packer.load")({'which-key.nvim'}, { keys = "", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap kommentary_line_default lua require("packer.load")({'kommentary'}, { keys = "Plug>kommentary_line_default", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[inoremap lua require("packer.load")({'nvim-autopairs'}, { keys = "BS>" }, _G.packer_plugins)]] -vim.cmd [[inoremap " lua require("packer.load")({'nvim-autopairs'}, { keys = "\"" }, _G.packer_plugins)]] -vim.cmd [[inoremap [ lua require("packer.load")({'nvim-autopairs'}, { keys = "[" }, _G.packer_plugins)]] -vim.cmd [[inoremap ( lua require("packer.load")({'nvim-autopairs'}, { keys = "(" }, _G.packer_plugins)]] -vim.cmd [[noremap lua require("packer.load")({'toggleterm.nvim'}, { keys = "C-t>", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[inoremap { lua require("packer.load")({'nvim-autopairs'}, { keys = "{" }, _G.packer_plugins)]] -vim.cmd [[noremap kommentary_visual_default lua require("packer.load")({'kommentary'}, { keys = "Plug>kommentary_visual_default", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap lua require("packer.load")({'which-key.nvim'}, { keys = "leader>", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap g lua require("packer.load")({'which-key.nvim'}, { keys = "g", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap d lua require("packer.load")({'which-key.nvim'}, { keys = "d", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap y lua require("packer.load")({'which-key.nvim'}, { keys = "y", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap z lua require("packer.load")({'which-key.nvim'}, { keys = "z", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap ! lua require("packer.load")({'which-key.nvim'}, { keys = "!", prefix = "" }, _G.packer_plugins)]] -time([[Defining lazy-load keymaps]], false) - -vim.cmd [[augroup packer_load_aucmds]] -vim.cmd [[au!]] - -- Filetype lazy-loads -time([[Defining lazy-load filetype autocommands]], true) -vim.cmd [[au FileType html ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "html" }, _G.packer_plugins)]] -vim.cmd [[au FileType javascript ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "javascript" }, _G.packer_plugins)]] -vim.cmd [[au FileType typescript ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "typescript" }, _G.packer_plugins)]] -vim.cmd [[au FileType javascriptreact ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "javascriptreact" }, _G.packer_plugins)]] -vim.cmd [[au FileType typescriptreact ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "typescriptreact" }, _G.packer_plugins)]] -vim.cmd [[au FileType svelte ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "svelte" }, _G.packer_plugins)]] -vim.cmd [[au FileType vue ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "vue" }, _G.packer_plugins)]] -vim.cmd [[au FileType tsx ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "tsx" }, _G.packer_plugins)]] -vim.cmd [[au FileType lua ++once lua require("packer.load")({'cmp-nvim-lua'}, { ft = "lua" }, _G.packer_plugins)]] -vim.cmd [[au FileType rescript ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "rescript" }, _G.packer_plugins)]] -vim.cmd [[au FileType xml ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "xml" }, _G.packer_plugins)]] -vim.cmd [[au FileType php ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "php" }, _G.packer_plugins)]] -vim.cmd [[au FileType markdown ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "markdown" }, _G.packer_plugins)]] -vim.cmd [[au FileType glimmer ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "glimmer" }, _G.packer_plugins)]] -vim.cmd [[au FileType handlebars ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "handlebars" }, _G.packer_plugins)]] -vim.cmd [[au FileType hbs ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "hbs" }, _G.packer_plugins)]] -vim.cmd [[au FileType jsx ++once lua require("packer.load")({'nvim-ts-autotag'}, { ft = "jsx" }, _G.packer_plugins)]] -time([[Defining lazy-load filetype autocommands]], false) - -- Event lazy-loads -time([[Defining lazy-load event autocommands]], true) -vim.cmd [[au FuncUndefined ResizeLeft ++once lua require("packer.load")({'vim-resize'}, { event = "FuncUndefined ResizeLeft" }, _G.packer_plugins)]] -vim.cmd [[au FuncUndefined ResizeRight ++once lua require("packer.load")({'vim-resize'}, { event = "FuncUndefined ResizeRight" }, _G.packer_plugins)]] -vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'friendly-snippets', 'lsp_signature.nvim'}, { event = "InsertEnter *" }, _G.packer_plugins)]] -vim.cmd [[au BufRead * ++once lua require("packer.load")({'nvim-colorizer.lua', 'nvim-lsp-installer', 'nvim-scrollview', 'lualine.nvim', 'FixCursorHold.nvim', 'nvim-web-devicons', 'gitsigns.nvim', 'indent-blankline.nvim', 'neoscroll.nvim', 'vim-matchup', 'nvim-treesitter', 'bufferline.nvim', 'todo-comments.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]] -vim.cmd [[au FileWritePre * ++once lua require("packer.load")({'mkdir.nvim'}, { event = "FileWritePre *" }, _G.packer_plugins)]] -vim.cmd [[au BufNewFile * ++once lua require("packer.load")({'nvim-colorizer.lua', 'nvim-lsp-installer', 'nvim-scrollview', 'lualine.nvim', 'FixCursorHold.nvim', 'nvim-web-devicons', 'gitsigns.nvim', 'indent-blankline.nvim', 'neoscroll.nvim', 'vim-matchup', 'nvim-treesitter', 'bufferline.nvim', 'todo-comments.nvim'}, { event = "BufNewFile *" }, _G.packer_plugins)]] -vim.cmd [[au BufWritePre * ++once lua require("packer.load")({'mkdir.nvim'}, { event = "BufWritePre *" }, _G.packer_plugins)]] -vim.cmd [[au FuncUndefined ResizeDown ++once lua require("packer.load")({'vim-resize'}, { event = "FuncUndefined ResizeDown" }, _G.packer_plugins)]] -vim.cmd [[au FuncUndefined ResizeUp ++once lua require("packer.load")({'vim-resize'}, { event = "FuncUndefined ResizeUp" }, _G.packer_plugins)]] -time([[Defining lazy-load event autocommands]], false) -vim.cmd("augroup END") -if should_profile then save_profiles() end - -end) - -if not no_errors then - error_msg = error_msg:gsub('"', '\\"') - vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') -end diff --git a/general/nvim/stylua.toml b/general/nvim/stylua.toml deleted file mode 100644 index 12736f5..0000000 --- a/general/nvim/stylua.toml +++ /dev/null @@ -1,4 +0,0 @@ -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -no_call_parentheses = false diff --git a/linux/alacritty/alacritty.yml b/linux/alacritty/alacritty.yml deleted file mode 100644 index 021ddff..0000000 --- a/linux/alacritty/alacritty.yml +++ /dev/null @@ -1,169 +0,0 @@ -# Import additional configuration files -# -# All imports must either be absolute paths starting with `/`, or paths relative -# to the user's home directory starting with `~/`. -import: - # import config from the themes directory - - ~/.config/alacritty/themes/ayu.yml - -env: - TERM: xterm-256color - -window: - # Window dimensions (changes require restart) - dimensions: - columns: 100 - lines: 34 - - # Window padding (changes require restart) - padding: - x: 8 - y: 8 - # Spread additional padding evenly around the terminal content. - dynamic_padding: true - - # Window decorations - # - # Values for `decorations`: - # - full: Borders and title bar - # - none: Neither borders nor title bar - # - decorations: full - - # Startup Mode (changes require restart) - # - # Values for `startup_mode`: - # - Windowed - # - Maximized - # - Fullscreen - # - startup_mode: Windowed - - # Allow terminal applications to change Alacritty's window title. - dynamic_title: true - - # Window class (Linux/BSD only): - class: - # Application instance name - instance: Alacritty - # General application class - general: Alacritty - -scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - history: 10000 - # Scrolling distance multiplier. - multiplier: 3 - -# Font configuration -font: - # Normal (roman) font face - normal: - family: Fira Code Nerd Font - style: Regular - - # Bold font face - bold: - family: Fira Code Nerd Font - style: Bold - - # Italic font face - # italic: - # Font family - # - # If the italic family is not specified, it will fall back to the - # value specified for the normal font. - # family: FiraCode Nerd Font - - # The `style` can be specified to pick a specific face. - # style: Italic - - # Bold italic font face - # bold_italic: - # Font family - # - # If the bold italic family is not specified, it will fall back to the - # value specified for the normal font. - # family: FiraCode Nerd Font - - # The `style` can be specified to pick a specific face. - # style: Bold Italic - - # Point size - size: 9.5 - -# If `true`, bold text is drawn using the bright color variants. -draw_bold_text_with_bright_colors: true - -# Colors/Themes are imported from the /themes/* directory. -colors: - # Cursor colors - # - # Colors which should be used to draw the terminal cursor. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - cursor: - text: CellBackground - cursor: CellForeground - - # Vi mode cursor colors - # - # Colors for the cursor when the vi mode is active. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - vi_mode_cursor: - text: CellBackground - cursor: CellForeground - -cursor: - # Cursor style - style: - # Cursor shape - # - # Values for `shape`: - # - ▇ Block - # - _ Underline - # - | Beam - shape: Block - - # Cursor blinking state - # - # Values for `blinking`: - # - Never: Prevent the cursor from ever blinking - # - Off: Disable blinking by default - # - On: Enable blinking by default - # - Always: Force the cursor to always blink - blinking: On - -# Live config reload (changes require restart) -live_config_reload: true - -# enable ctrl+v to paste and ctrl+shift+c to copy. -# ctrl+shift+c for copy because ctrl+c is SIGKILL. -key_bindings: - - { key: V, mods: Control, action: Paste } - - { key: C, mods: Control|Shift, action: Copy } - -#debug: - # Display the time it takes to redraw each frame. - #render_timer: false - - # Keep the log file after quitting Alacritty. - #persistent_logging: false - - # Log level - # - # Values for `log_level`: - # - Off - # - Error - # - Warn - # - Info - # - Debug - # - Trace - #log_level: Warn - - # Print all received window events. - #print_events: false diff --git a/linux/aliasrc b/linux/aliasrc deleted file mode 100644 index f57a90a..0000000 --- a/linux/aliasrc +++ /dev/null @@ -1,52 +0,0 @@ -# !CATUION! !CAUTION! -# -# Some aliases require programs/scripts to work proparly. -# -# -# -------------------------- functions ------------------------------- - -cur_date() { - dt="$(date +'%d.%m.%Y %T')" -} - -# ----------------------------- dirs --------------------------------- - -alias ls="exa --icons --long --git" -alias ll="ls -lhg" -alias lt="ls --tree --level=2" -alias la="ls -lahg" -alias ld="ls -lDhg" -alias lsd="ls -snew" -alias rmf="rm -rf" -alias del="mvtobin() { mv $1 ~/.Trash/ };mvtobin" -alias cp="cp -ir" -alias mkdir="mkdir -p" -alias fnd='f() { find *$1* -maxdepth 0 };f' -alias prnt="lp" -alias open="xdg-open" - -# ---------------------------- terminal ----------------------------- - -alias cl="clear" -alias cll="cl && ll" -alias cla="cl && la" -alias fetch="pfetch" -alias reload=". ~/.zshrc" # reload (source) the profile - -# ----------------------- editor & filemanager ----------------------- - -alias vim="/usr/bin/nvim" -alias nvim="/usr/bin/nvim" - -# ---------------------------- utils -------------------------------- - -alias ranger="TERM=xterm-kitty ranger" -alias icat="kitty +kitten icat" -alias aliases="nvim ~/.config/aliasrc" -alias zshrc="nvim ~/.zshrc" -alias theme="nvim ~/.oh-my-zsh/custom/themes/chronos.zsh-theme" -alias tmuxconf="nvim ~/.tmux.conf" -alias shrug="echo '\n¯\_(ツ)_/¯'" -# connect_box => makes it easier to connect to my bluetooth speaker at work -alias connect_box="bluetoothctl connect B8:D5:0B:94:90:03" - diff --git a/linux/dunst/dunstrc b/linux/dunst/dunstrc deleted file mode 100644 index c10bbff..0000000 --- a/linux/dunst/dunstrc +++ /dev/null @@ -1,224 +0,0 @@ -# vim: ft=cfg -[global] - ### Display ### - - # Which monitor should the notifications be displayed on. - monitor = 1 - follow = none - - geometry = "400x15-15+65" - - indicate_hidden = yes - - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = no - transparency = 0 - notification_height = 0 - - # Set to 0 to disable. - separator_height = 1 - - # Padding between text and separator. - padding = 15 - - # Horizontal padding. - horizontal_padding = 8 - - # Set to 0 to disable. - frame_width = 1 - - # Defines color of the frame around the notification window. - frame_color = "#252525" - separator_color = frame - - # Sort messages by urgency. - sort = yes - - idle_threshold = 5 - - ### Text ### - - - font = Fira Code Nerd Font 9 - - # The spacing between lines. If the height is smaller than the - # font height, it will get raised to the font height. - line_height = 0 - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed - format = "%s\n%b" - - # Alignment of message text. - # Possible values are "left", "center" and "right". - alignment = left - - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = -1 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # When word_wrap is set to no, specify where to make an ellipsis in long lines. - # Possible values are "start", "middle" and "end". - ellipsize = middle - - # Ignore newlines '\n' in notifications. - ignore_newline = no - - # Merge multiple notifications with the same content - stack_duplicates = true - - # Hide the count of merged notifications with the same content - hide_duplicate_count = false - - # Display indicators for URLs (U) and actions (A). - show_indicators = yes - - ### Icons ### - - # Align icons left/right/off - icon_position = right - - # Scale larger icons down to this size, set to 0 to disable - max_icon_size = 70 - - ### History ### - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. - sticky_history = yes - - # Maximum amount of notifications kept in history - history_length = 200 - - ### Misc/Advanced ### - - # Browser for opening urls in context menu. - browser = /usr/bin/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - # Define the title of the windows spawned by dunst - title = Dunst - - # Define the class of the windows spawned by dunst - class = Dunst - - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # Manage dunst's desire for talking - # Can be one of the following values: - # crit: Critical features. Dunst aborts - # warn: Only non-fatal warnings - # mesg: Important Messages - # info: all unimportant stuff - # debug: all less than unimportant stuff - verbosity = mesg - - # Define the corner radius of the notification window - # in pixel size. If the radius is 0, you have no rounded - # corners. - # The radius will be automatically lowered if it exceeds half of the - # notification height to avoid clipping text and/or icons. - corner_radius = 0 - - ### Legacy - - # Use the Xinerama extension instead of RandR for multi-monitor support. - # This setting is provided for compatibility with older nVidia drivers that - # do not support RandR and using it on systems that support RandR is highly - # discouraged. - # - # By enabling this setting dunst will not be able to detect when a monitor - # is connected or disconnected which might break follow mode if the screen - # layout changes. - force_xinerama = false - - ### mouse - - # Defines action of mouse event - # Possible values are: - # * none: Don't do anything. - # * do_action: If the notification has exactly one action, or one is marked as default, - # invoke it. If there are multiple and no default, open the context menu. - # * close_current: Close current notification. - # * close_all: Close all notifications. - mouse_left_click = close_current - mouse_middle_click = close_all - mouse_right_click = do_action - -# Experimental features that may or may not work correctly. Do not expect them -# to have a consistent behaviour across releases. -[experimental] - # Calculate the dpi to use on a per-monitor basis. - # If this setting is enabled the Xft.dpi value will be ignored and instead - # dunst will attempt to calculate an appropriate dpi value for each monitor - # using the resolution and physical size. This might be useful in setups - # where there are multiple screens with very different dpi values. - #per_monitor_dpi = 161 - -[shortcuts] - - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. - - # Close notification. - close = ctrl+alt+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". Make sure this key actually exists on your keyboard layout, - # e.g. check output of 'xmodmap -pke' - history = ctrl+grave - - # Context menu. - context = ctrl+shift+period - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#252525" - foreground = "#c0c0c0" - timeout = 10 - # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon - -[urgency_normal] - background = "#252525" - foreground = "#c0c0c0" - timeout = 5 - # Icon for notifications with normal urgency, uncomment to enable - #icon = /path/to/icon - -[urgency_critical] - background = "#252525" - foreground = "#c0c0c0" - frame_color = "#c0c0c07" - timeout = 0 - # Icon for notifications with critical urgency, uncomment to enable - #icon = /path/to/icon - - diff --git a/linux/dunst/dunstrc_old b/linux/dunst/dunstrc_old deleted file mode 100644 index babf830..0000000 --- a/linux/dunst/dunstrc_old +++ /dev/null @@ -1,227 +0,0 @@ -# vim:ft=cfg -[global] - font = Fira Code Nerd Font 9 - - # allow a small subset of html markup: - # bold - # italic - # strikethrough - # underline - # - # for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html - # If markup is not allowed, those tags will be stripped out of the message. - allow_markup = yes - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # Markup is allowed - #format = "%p %s %b " - format = "%I %s\n%b" - # format = "%I %s\n%b " - - # Sort messages by urgency - sort = yes - - # Show how many messages are currently hidden (because of geometry) - indicate_hidden = yes - - # alignment of message text. - # Possible values are "left", "center" and "right" - alignment = center - - # The frequency with wich text that is longer than the notification - # window allows bounces back and forth. - # This option conflicts with 'word_wrap'. - # Set to 0 to disable - bounce_freq = 0 - - # show age of message if message is older than show_age_threshold seconds. - # set to -1 to disable - show_age_threshold = 60 - - # split notifications into multiple lines if they don't fit into geometry - word_wrap = yes - - # ignore newlines '\n' in notifications - ignore_newline = no - - - # the geometry of the window - # geometry [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else in pixels. If the width - # is omitted but the height is given ("-geometry x2"), the message window - # expands over the whole screen (dmenu-like). If width is 0, - # the window expands to the longest message displayed. - # A positive x is measured from the left, a negative from the - # right side of the screen. Y is measured from the top and down respectevly. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "500x15-8+65" - - # Shrink window if it's smaller than the width. Will be ignored if width is 0. - shrink = yes - - # The transparency of the window. range: [0; 100] - # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..) - transparency = 0 - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - idle_threshold = 20 - - # Which monitor should the notifications be displayed on. - monitor = 0 - - # Display notification on focused monitor. Possible modes are: - # mouse: follow mouse pointer - # keyboard: follow window with keyboard focus - # none: don't follow anything - # - # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property. - # This should be the case for almost all modern windowmanagers. - # - # If this option is set to mouse or keyboard, the monitor option will be - # ignored. - follow = mouse - - # should a notification popped up from history be sticky or - # timeout as if it would normally do. - sticky_history = yes - - # Display indicators for URLs (U) and actions (A) - show_indicators = yes - - # The height of a single line. If the height is smaller than the font height, - # it will get raised to the font height. - # This adds empty space above and under the text. - line_height = 0 - - # Draw a line of 'separatpr_height' pixel height between two notifications. - # Set to 0 to disable - separator_height = 1 - - # padding between text and separator - padding = 4 - - # horizontal padding - horizontal_padding = 4 - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background - # * foreground: use the same color as the foreground - # * frame: use the same color as the frame. - # * anything else will be interpreted as a X color - separator_color = auto - - # print a notification on startup - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # dmenu path - dmenu = /usr/bin/dmenu -p dunst: - - # browser for opening urls in context menu - browser = /usr/bin/firefox -new-tab - -[frame] - width = 2 - color = "#6272A4" - -[shortcuts] - # shortcuts are specified as [modifier+][modifier+]...key - # available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3' - # and 'mod4' (windows-key) - # xev might be helpful to find names for keys - - # close notification - #close = ctrl+space - - # close all notifications - #close_all = ctrl+shift+space - - # redisplay last message(s) - # On the US keyboard layout 'grave' is normally above TAB and left of '1'. - history = mod4+plus - - # context menu - context = mod4+shift+plus - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the '#' and following would be interpreted as a comment. - background = "#F8F8F2" - foreground = "#6272A4" - timeout = 10 - -[urgency_normal] - background = "#F8F8F2" - foreground = "#6272A4" - timeout = 10 - -[urgency_critical] - background = "#F8F8F2" - foreground = "#6272A4" - timeout = 0 - - -# Every section that isn't one of the above is interpreted as a rules -# to override settings for certain messages. -# Messages can be matched by 'appname', 'summary', 'body' or 'icon' -# and you can override the 'timeout', 'urgency', 'foreground', 'background' -# and 'format'. -# Shell-like globbing will get expanded. -# -# SCRIPTING -# you can specify a script that gets run when the rule matches by setting -# the 'script' option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format to "" -# NOTE: It might be helpful to run dunst -print in a terminal in order to find -# fitting options for rules. - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -## This notification will not be displayed -# summary = "foobar" -# format = "" - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# - diff --git a/linux/i3/config b/linux/i3/config deleted file mode 100644 index d92f39e..0000000 --- a/linux/i3/config +++ /dev/null @@ -1,184 +0,0 @@ -#================================================== -# -# -# ██╗██████╗ ██╗ ██╗███╗ ███╗ -# ██║╚════██╗ ██║ ██║████╗ ████║ -# ██║ █████╔╝█████╗██║ █╗ ██║██╔████╔██║ -# ██║ ╚═══██╗╚════╝██║███╗██║██║╚██╔╝██║ -# ██║██████╔╝ ╚███╔███╔╝██║ ╚═╝ ██║ -# ╚═╝╚═════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ -# -# -#================================================== - -# set desired modifiers -set $mod Mod4 -set $ALT Mod1 - -# set the font -font pango:Fira Code Nerd Font 10 - -# startup apps and window decs -default_orientation horizontal -workspace_layout default - -# set the border size and radius -for_window [class="^.*"] border pixel 0 -# border_radius 6 - -# define the gap size -gaps inner 30 -gaps outer 10 - - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $ALT -floating_minimum_size 150 x 150 -floating_maximum_size 1928 x 1080 - - -# kill focused window -bindsym $ALT+q kill - - -# Change Window behaviour -for_window [class="Firefox"] border -for_window [class="Thunderbird"] border -for_window [class="Telegram"] floating enable -for_window [class="Spotify"] floating enable -for_window [class="Gnome-calculator"] floating enable -for_window [class="Discord"] floating enable -for_window [class="Teamviewer"] floating enable -for_window [class="Remmina"] floating enable -for_window [class="gio"] floating enable -for_window [class="Nautilus"] floating enable - - -# --Cahange modi on the fly -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle -# change focus between tiling / floating windows -bindsym $ALT+space focus mode_toggle -# split in horizontal orientation -bindsym $mod+Shift+v split h -# split in vertical orientation -bindsym $mod+v split v - - -# reload the configuration file -bindsym $mod+Shift+C reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+q restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+Q exit - - -# switch to workspace -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 - -# move focused container to workspace -bindsym $mod+$ALT+1 move container to workspace 1 -bindsym $mod+$ALT+2 move container to workspace 2 -bindsym $mod+$ALT+3 move container to workspace 3 -bindsym $mod+$ALT+4 move container to workspace 4 -bindsym $mod+$ALT+5 move container to workspace 5 -bindsym $mod+$ALT+6 move container to workspace 6 -bindsym $mod+$ALT+7 move container to workspace 7 -bindsym $mod+$ALT+8 move container to workspace 8 -bindsym $mod+$ALT+9 move container to workspace 9 -bindsym $mod+$ALT+0 move container to workspace 10 - - -# --Focus and resizing -# -# Modeled the behaviour after vim key bindings. -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -mode "resize" { - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym $mod+h resize shrink width 10 px or 10 ppt - bindsym $mod+j resize grow height 10 px or 10 ppt - bindsym $mod+k resize shrink height 10 px or 10 ppt - bindsym $mod+l resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# Press $mod+shift+r to enter resize mode. -# After you finished resizing your panels, leave with esc or ret key. -bindsym $mod+Shift+r mode "resize" - - -# --Border design -# -# client.focused #7B1FA2 #7B1FA2 #F8F8F2 #7B1FA2 #7B1FA2 -# client.focused_inactive #4A148C #4A148C #F8F8F2 #4A148C #4A148C -# client.unfocused #4A148C #4A148C #F8F8F2 #4A148C #4A148C -# client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 -# client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 -# client.background #F8F8F2 - - -# --Execute programs -# -# start a terminal -# bindsym $mod+Return exec i3-sensible-terminal -bindsym $mod+Return exec kitty -# launch screenlock -bindsym $ALT+l exec $HOME/Script/i3lock/lock.sh -# run -> start a program -bindsym $mod+space exec rofi -show run -# window -> switch to window -bindsym $ALT+Tab exec --no-startup-id rofi -modi combi -combi-modi window -show combi -bindsym $mod+F6 exec firefox -bindsym $mod+F10 exec thunderbird -# spotify bindings (uses playerctl) -bindsym F5 exec playerctl -p spotify previous -bindsym F6 exec playerctl -p spotify next -bindsym F7 exec playerctl -p spotify play-pause -# audio controls -bindsym $ALT+F9 exec audic toggle -bindsym $ALT+F10 exec audic volume --decrease 10 -bindsym $ALT+F11 exec audic volume --increase 10 -# re-launch polybar -bindsym $mod+$ALT+p exec --no-startup-id ~/.config/polybar/launch.sh & -# take a screenshot -bindsym $ALT+s exec --no-startup-id flameshot full -p $HOME/Pictures/Screenshot/ - - -# --Startup commands -# -# set the wallpaper (with feh) -exec_always --no-startup-id /home/mikeunge/Script/WallpaperEngine/wpe.py -# start i3-auto-layout (so it behaves like bspwm) -exec_always --no-startup-id i3-auto-layout -# launch polybar -exec_always --no-startup-id ~/.config/polybar/launch.sh & -# picom makes windows transparent, adds shadow, rounden corners and a bunch of other cool stuff -exec_always --no-startup-id picom & diff --git a/linux/i3/statusbar b/linux/i3/statusbar deleted file mode 100644 index 262636e..0000000 --- a/linux/i3/statusbar +++ /dev/null @@ -1,33 +0,0 @@ -# i3status configuration file. -# see "man i3status" for documentation. - -# It is important that this file is edited as UTF-8. -# The following line should contain a sharp s: -# ß -# If the above line is not correctly displayed, fix your editor first! - -general { - colors = true - interval = 2 -} - -order += "disk /" -order += "run_watch Docker" -order += "load" -order += "tztime local" - -run_watch Docker { - pidfile = "/run/docker.pid" -} - -tztime local { - format = "%Y-%m-%d %H:%M:%S" -} - -load { - format = "%1min" -} - -disk "/" { - format = "/: %avail" -} diff --git a/linux/kitty/kitty.conf b/linux/kitty/kitty.conf deleted file mode 100644 index bfcc2b2..0000000 --- a/linux/kitty/kitty.conf +++ /dev/null @@ -1,31 +0,0 @@ -# vim:fileencoding=utf-8:ft=conf -# -# import theme -include themes/uwu.conf -# include themes/github.conf - -# font and ligatures -font_size 9.5 -font_family Fira Code Nerd Font -bold_font Fira Code Bold Nerd Font -italic_font Fira Code Italic Nerd Font -disable_ligatures never - -# cursor -cursor_shape block -cursor_blink_interval -1 - - -# window (floating) sizes -remember_window_size no -initial_window_width 100c -initial_window_height 34c -# set padding in terminal -window_padding_width 10 - - -# map copy and paste behaviour -strip_trailing_spaces always -copy_on_select yes -map ctrl+shift+c copy_to_clipboard -map ctrl+v paste_from_clipboard diff --git a/linux/picom/picom.conf b/linux/picom/picom.conf deleted file mode 100644 index f9f2437..0000000 --- a/linux/picom/picom.conf +++ /dev/null @@ -1,222 +0,0 @@ -# Thank you code_nomad: http://9m.no/ꪯ鵞 -# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton - -################################# -# -# Backend -# -################################# - -# Backend to use: "xrender" or "glx". -# GLX backend is typically much faster but depends on a sane driver. -backend = "glx"; -#backend = "xrender" - -################################# -# -# GLX backend -# -################################# - -glx-no-stencil = true; - -# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all. -# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified, -# but a 20% increase when only 1/4 is. -# My tests on nouveau show terrible slowdown. -glx-copy-from-front = false; - -# GLX backend: Use MESA_copy_sub_buffer to do partial screen update. -# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated. -# May break VSync and is not available on some drivers. -# Overrides --glx-copy-from-front. -# glx-use-copysubbuffermesa = true; - -# GLX backend: Avoid rebinding pixmap on window damage. -# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe). -# Recommended if it works. -# glx-no-rebind-pixmap = true; - -# GLX backend: GLX buffer swap method we assume. -# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1). -# undefined is the slowest and the safest, and the default value. -# copy is fastest, but may fail on some drivers, -# 2-6 are gradually slower but safer (6 is still faster than 0). -# Usually, double buffer means 2, triple buffer means 3. -# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers. -# Useless with --glx-use-copysubbuffermesa. -# Partially breaks --resize-damage. -# Defaults to undefined. -#glx-swap-method = "undefined"; - -################################# -# -# Shadows -# -################################# - -# Enabled client-side shadows on windows. -shadow = true; -# The blur radius for shadows. (default 12) -shadow-radius = 10; -# The left offset for shadows. (default -15) -shadow-offset-x = -5; -# The top offset for shadows. (default -15) -shadow-offset-y = -5; -# The translucency for shadows. (default .75) -shadow-opacity = 0.5; - -log-level = "warn"; -#change your username here -#log-file = "/home/erik/.config/compton.log"; - -# Set if you want different colour shadows -# shadow-red = 0.0; -# shadow-green = 0.0; -# shadow-blue = 0.0; - -# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches -# (most applications are fine, only apps that do weird things with xshapes or argb are affected). -# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher. -shadow-exclude = [ - "name = 'Notification'", - "name = 'xfce4-notifyd'", - "name *= 'picom'", - # "class_g = 'Firefox' && argb", - # "class_g ?= 'Notify-osd'", - "class_g ?= 'Xfce4-notifyd'", - "class_g ?= 'Xfce4-power-manager'", - "_GTK_FRAME_EXTENTS@:c", - "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" -]; -# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) -shadow-ignore-shaped = false; -corner-radius = 18 - -################################# -# -# Opacity -# -################################# - -inactive-opacity = 0.95; -active-opacity = 1.0; -frame-opacity = 1.0; -inactive-opacity-override = false; -# set specifc rules for apllications -opacity_rule = [ - "85:name ?= 'kitty'" - "85:name ?= 'alacritty'" -]; - -# Dim inactive windows. (0.0 - 1.0) -inactive-dim = 0.2; -# Do not let dimness adjust based on window opacity. -inactive-dim-fixed = true; -# Blur background of transparent windows. Bad performance with X Render backend. GLX backend s preferred. -blur-background = true; -# Blur background of opaque windows with transparent frames as well. -# blur-background-frame = true; -# Do not let blur radius adjust based on window opacity. -blur-background-fixed = false; -blur-background-exclude = [ - "window_type = 'dock'", - "window_type = 'desktop'", - "_GTK_FRAME_EXTENTS@:c" -]; - -################################# -# -# Fading -# -################################# - -# Fade windows during opacity changes. -fading = true; -# The time between steps in a fade in milliseconds. (default 10). -fade-delta = 4; -# Opacity change between steps while fading in. (default 0.028). -fade-in-step = 0.03; -# Opacity change between steps while fading out. (default 0.03). -fade-out-step = 0.03; -# Fade windows in/out when opening/closing -# no-fading-openclose = true; - -# Specify a list of conditions of windows that should not be faded. -fade-exclude = [ ]; - -################################# -# -# Other -# -################################# - -# Try to detect WM windows and mark them as active. -mark-wmwin-focused = true; -# Mark all non-WM but override-redirect windows active (e.g. menus). -mark-ovredir-focused = true; -# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events. -# Usually more reliable but depends on a EWMH-compliant WM. -use-ewmh-active-win = true; -# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on. -detect-rounded-corners = true; - -# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows. -# This prevents opacity being ignored for some apps. -# For example without this enabled my xfce4-notifyd is 100% opacity no matter what. -detect-client-opacity = true; - -# Specify refresh rate of the screen. -# If not specified or 0, picom will try detecting this with X RandR extension. -refresh-rate = 0; - -# Vertical synchronization: match the refresh rate of the monitor -# this breaks transparency in virtualbox - put a "#" before next line to fix that -vsync = true; - -# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. -# Reported to have no effect, though. -dbe = false; - -# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance. -# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already, -# unless you wish to specify a lower refresh rate than the actual value. -#sw-opti = true; - -# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games. -# Known to cause flickering when redirecting/unredirecting windows. -unredir-if-possible = false; - -# Specify a list of conditions of windows that should always be considered focused. -focus-exclude = [ ]; - -# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time. -detect-transient = true; -# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time. -# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too. -detect-client-leader = true; - -################################# -# -# Window type settings -# -################################# - -wintypes: -{ - tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true;}; - dock = { shadow = false; } - dnd = { shadow = false; } - popup_menu = { opacity = 0.9; } - dropdown_menu = { opacity = 0.9; } -}; - -###################### -# -# XSync -# See: https://github.com/yshui/compton/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d -# -###################### - -# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users. -xrender-sync-fence = true; diff --git a/linux/polybar/bars.ini b/linux/polybar/bars.ini deleted file mode 100644 index 738e9da..0000000 --- a/linux/polybar/bars.ini +++ /dev/null @@ -1,522 +0,0 @@ -;; ┌────────────────────────────────────────────────────┐ -;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│ -;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│ -;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│ -;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│ -;; └────────────────────────────────────────────────────┘ - -;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ - -[bar] -fill = 絛 -empty = 絛 -indicator = 雷 -; Nerd font :   ,  ⏽,  樂 籠 錄 , 雷 絛 - -;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ - -[module/volume] -type = internal/alsa - -; Soundcard to be used -; Usually in the format hw:# where # is the card number -; You can find the different card numbers in `/proc/asound/cards` -master-soundcard = default -speaker-soundcard = default -headphone-soundcard = default - -; Name of the master, speaker and headphone mixers -; Use the following command to list available mixer controls: -; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" -; If master, speaker or headphone-soundcard isn't the default, -; use `amixer -c # scontrols` instead where # is the number -; of the master, speaker or headphone soundcard respectively -; -; Default: Master -master-mixer = Master - -; Optionally define speaker and headphone mixers -; Default: none -;;speaker-mixer = Speaker -; Default: none -;;headphone-mixer = Headphone - -; NOTE: This is required if headphone_mixer is defined -; Use the following command to list available device controls -; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort -; You may also need to use `amixer -c # controls` as above for the mixer names -; Default: none -;;headphone-id = 9 - -; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear -; Default: false -;;mapped = true - -; Interval for volume increase/decrease (in percent points) -; Default: 5 -interval = 5 - -; Available tags: -; (default) -; -; -format-volume = -format-volume-background = ${color.shade6} -format-volume-padding = 2 - -; Available tags: -; (default) -; -; -format-muted = -format-muted-prefix = 婢 -format-muted-background = ${color.shade6} -format-muted-padding = 2 - -; Available tokens: -; %percentage% (default) -label-volume = %percentage%% - -; Available tokens: -; %percentage% (default -label-muted = " Muted" -label-muted-foreground = ${color.foreground} - -; Only applies if is used -ramp-volume-0 = 奄 -ramp-volume-1 = 奔 -ramp-volume-2 = 墳 - -; Only applies if is used -bar-volume-width = 10 -bar-volume-gradient = false - -bar-volume-indicator = ${bar.indicator} -bar-volume-indicator-foreground = ${color.foreground} - -bar-volume-fill = ${bar.fill} -bar-volume-foreground-0 = ${color.foreground} -bar-volume-foreground-1 = ${color.foreground} -bar-volume-foreground-2 = ${color.foreground} - -bar-volume-empty = ${bar.empty} -bar-volume-empty-foreground = ${color.foreground} - -; If defined, it will replace when -; headphones are plugged in to `headphone_control_numid` -; If undefined, will be used for both -; Only applies if is used -ramp-headphones-0 =  - -;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ - -[module/brightness] -;type = internal/xbacklight -type = internal/backlight - -; Use the following command to list available cards: -; $ ls -1 /sys/class/backlight/ -;card = intel_backlight -card = amdgpu_bl0 - -; Available tags: -;