@team-internet/apiconnector 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/Dockerfile +66 -0
- package/.devcontainer/devcontainer.json +30 -0
- package/.devcontainer/docker-compose.yml +11 -0
- package/.devcontainer/supporting_files/configuration/.czrc +1 -0
- package/.devcontainer/supporting_files/configuration/.p10k.zsh +1735 -0
- package/.devcontainer/supporting_files/configuration/.zshrc +23 -0
- package/.devcontainer/supporting_files/configuration/p10k-instant-prompt-vscode.zsh +323 -0
- package/.devcontainer/supporting_files/scripts/post-create.sh +11 -0
- package/.nycrc +6 -0
- package/CHANGELOG.md +582 -0
- package/CONTRIBUTING.md +132 -0
- package/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/apiclient.d.ts +233 -0
- package/dist/apiclient.js +517 -0
- package/dist/column.d.ts +40 -0
- package/dist/column.js +52 -0
- package/dist/customlogger.d.ts +15 -0
- package/dist/customlogger.js +23 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +16 -0
- package/dist/logger.d.ts +14 -0
- package/dist/logger.js +21 -0
- package/dist/record.d.ts +31 -0
- package/dist/record.js +42 -0
- package/dist/response.d.ts +264 -0
- package/dist/response.js +512 -0
- package/dist/responseparser.d.ts +1 -0
- package/dist/responseparser.js +36 -0
- package/dist/responsetemplatemanager.d.ts +65 -0
- package/dist/responsetemplatemanager.js +111 -0
- package/dist/responsetranslator.d.ts +32 -0
- package/dist/responsetranslator.js +144 -0
- package/dist/socketconfig.d.ts +62 -0
- package/dist/socketconfig.js +107 -0
- package/package.json +86 -0
- package/src/apiclient.ts +579 -0
- package/src/column.ts +57 -0
- package/src/customlogger.ts +29 -0
- package/src/index.ts +18 -0
- package/src/logger.ts +23 -0
- package/src/record.ts +46 -0
- package/src/response.ts +562 -0
- package/src/responseparser.ts +35 -0
- package/src/responsetemplatemanager.ts +136 -0
- package/src/responsetranslator.ts +191 -0
- package/src/socketconfig.ts +116 -0
- package/tests/apiclient.spec.ts +610 -0
- package/tests/app.js +47 -0
- package/tests/column.spec.ts +23 -0
- package/tests/index.spec.ts +22 -0
- package/tests/record.spec.ts +31 -0
- package/tests/response.spec.ts +341 -0
- package/tests/responseparser.spec.ts +13 -0
- package/tests/responsetemplatemanager.spec.ts +52 -0
- package/tests/socketconfig.spec.ts +14 -0
- package/tsconfig.json +7 -0
- package/typedoc.json +7 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
|
2
|
+
# Initialization code that may require console input (password prompts, [y/n]
|
|
3
|
+
# confirmations, etc.) must go above this block; everything else may go below.
|
|
4
|
+
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
|
5
|
+
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
|
6
|
+
fi
|
|
7
|
+
|
|
8
|
+
#zsh-configurations
|
|
9
|
+
# Path to your oh-my-zsh installation.
|
|
10
|
+
export ZSH=$HOME/.oh-my-zsh
|
|
11
|
+
ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
12
|
+
|
|
13
|
+
plugins=(git zsh-autosuggestions)
|
|
14
|
+
source $ZSH/oh-my-zsh.sh
|
|
15
|
+
|
|
16
|
+
# Example aliases
|
|
17
|
+
# alias zshconfig="mate ~/.zshrc"
|
|
18
|
+
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
|
19
|
+
DISABLE_AUTO_UPDATE=true
|
|
20
|
+
DISABLE_UPDATE_PROMPT=true
|
|
21
|
+
|
|
22
|
+
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
23
|
+
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
[[ -t 0 && -t 1 && -t 2 && -o interactive && -o zle && -o no_xtrace ]] &&
|
|
2
|
+
! (( ${+__p9k_instant_prompt_disabled} || ZSH_SUBSHELL || ${+ZSH_SCRIPT} || ${+ZSH_EXECUTION_STRING} )) || return 0
|
|
3
|
+
() {
|
|
4
|
+
emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre
|
|
5
|
+
(( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }
|
|
6
|
+
local -a match reply mbegin mend
|
|
7
|
+
local -i MBEGIN MEND OPTIND
|
|
8
|
+
local MATCH REPLY OPTARG IFS=$' \t\n\0'
|
|
9
|
+
typeset -gi __p9k_instant_prompt_disabled=1
|
|
10
|
+
[[ $ZSH_VERSION == 5.9 && $ZSH_PATCHLEVEL == debian/5.9-4+b2 &&
|
|
11
|
+
-z ${(M)TERM:#(screen*|tmux*)} &&
|
|
12
|
+
${#${(M)VTE_VERSION:#(<1-4602>|4801)}} == 0 &&
|
|
13
|
+
$POWERLEVEL9K_DISABLE_INSTANT_PROMPT != 'true' &&
|
|
14
|
+
$POWERLEVEL9K_INSTANT_PROMPT != 'off' ]] || return
|
|
15
|
+
typeset -g __p9k_instant_prompt_param_sig=$'\'\'\C-A5.9\C-Adebian/5.9-4+b2\C-A\C-Avscode\C-A321\C-Avscode%\C-A\C-A\C-A\C-A\C-A\C-A\C-A1\C-A0\C-A0\C-A\C-A%B%S%#%s%b\C-A1\C-AUTF-8\C-A\C-A\C-A0\C-A1\C-A/home/vscode/.oh-my-zsh/custom/themes/powerlevel10k\C-A\C-A\C-A\C-A\C-A1\C-A256\C-A0\C-A${${${${CONDA_PROMPT_MODIFIER#\\(}% }%\\)}:-${CONDA_PREFIX:t}}\C-A37\C-A134\C-A129\C-A125\C-A38\C-A66\C-A37\C-A172\C-A32\C-A70\C-A32\C-A70\C-A67\C-A99\C-A31\C-Afalse\C-A37\C-A168\C-A37\C-A\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A*\C-BDEFAULT\C-A${P9K_AWS_PROFILE//\\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\\%/%%}}\C-A208\C-A70\C-Aeb\C-Aaws|awless|cdk|terraform|pulumi|terragrunt\C-A*\C-BOTHER\C-A32\C-Aaz|terraform|pulumi|terragrunt\C-A238\C-A37\C-Afalse\C-A≡\C-A70\C-A70\C-A178\C-A160\C-A20\C-A%K{232}▁\C-B%K{232}▂\C-B%K{232}▃\C-B%K{232}▄\C-B%K{232}▅\C-B%K{232}▆\C-B%K{232}▇\C-B%K{232}█\C-Afalse\C-A33\C-A248\C-Ad h m s\C-A0\C-A3\C-A\C-A/home/vscode/.p10k.zsh\C-A\C-A\C-A180\C-A180\C-A180\C-A%n@%m\C-A%n@%m\C-A178\C-A%B%n@%m\C-A\C-A\C-A%n@%m\C-A172\C-Atrue\C-A39\C-A\C-A178\C-A31\C-Afalse\C-A80\C-A40\C-A50\C-A103\C-Av3\C-Afalse\C-Atrue\C-A160\C-A95\C-A35\C-Afalse\C-A220\C-A90\C-A134\C-Atrue\C-A\C-A38\C-A${P9K_GCLOUD_PROJECT_NAME//\\%/%%}\C-A32\C-A${P9K_GCLOUD_PROJECT_ID//\\%/%%}\C-A60\C-Agcloud|gcs|gsutil\C-A37\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A*\C-BDEFAULT\C-A${P9K_GOOGLE_APP_CRED_PROJECT_ID//\\%/%%}\C-A32\C-Aterraform|pulumi|terragrunt\C-A37\C-Atrue\C-Atrue\C-A172\C-Ashell\C-Blocal\C-A\C-Anone\C-Averbose\C-A${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP\C-A38\C-A[ew].*\C-A32\C-Afalse\C-Atrue\C-A32\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A*\C-BDEFAULT\C-A${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}\C-A134\C-A○\C-Akubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl\C-A161\C-Adir\C-Bvcs\C-A\\uE0B2\C-A\\uE0B0\C-A\C-A%246F\\u2502\C-A72\C-A166\C-A66\C-A178\C-A5\C-A∅\C-A32\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A178\C-Apowerline\C-A\C-A \C-A%242F╭─\C-A%242F─╮\C-A%242F╰─\C-A%242F─╯\C-A\C-A%242F├─\C-A%242F─┤\C-A74\C-A72\C-A70\C-A\C-A\C-Afalse\C-A70\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A70\C-Atrue\C-A\C-A\C-A\C-A\C-A\C-A\C-A39\C-Anord\C-A70\C-Afalse\C-Atrue\C-A255\C-A117\C-A130\C-A135\C-A67\C-Atrue\C-Afalse\C-A99\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A99\C-Atrue\C-A67\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-Afalse\C-A\C-A❮\C-A196\C-A❯\C-A196\C-A▶\C-A196\C-AV\C-A196\C-A\C-A\C-A\C-A\C-A❮\C-A76\C-A❯\C-A76\C-A▶\C-A76\C-AV\C-A76\C-Atrue\C-A68\C-A94\C-A${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}\C-A37\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A66\C-A178\C-A▲\C-A168\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-Astatus\C-Bcommand_execution_time\C-Bbackground_jobs\C-Bdirenv\C-Basdf\C-Bvirtualenv\C-Banaconda\C-Bpyenv\C-Bgoenv\C-Bnodenv\C-Bnvm\C-Bnodeenv\C-Brbenv\C-Brvm\C-Bfvm\C-Bluaenv\C-Bjenv\C-Bplenv\C-Bperlbrew\C-Bphpenv\C-Bscalaenv\C-Bhaskell_stack\C-Bkubecontext\C-Bterraform\C-Baws\C-Baws_eb_env\C-Bazure\C-Bgcloud\C-Bgoogle_app_cred\C-Btoolbox\C-Bcontext\C-Bnordvpn\C-Branger\C-Byazi\C-Bnnn\C-Blf\C-Bxplr\C-Bvim_shell\C-Bmidnight_commander\C-Bnix_shell\C-Bchezmoi_shell\C-Bvi_mode\C-Btodo\C-Btimewarrior\C-Btaskwarrior\C-Bper_directory_history\C-Btime\C-A\\uE0B2\C-A\\uE0B0\C-A\C-A%246F\\u2502\C-A37\C-Atrue\C-A168\C-Afalse\C-Afalse\C-A160\C-Afalse\C-Atrue\C-Ashell\C-Blocal\C-Bglobal\C-A\C-A1\C-A(.bzr|.citc|.git|.hg|.node-version|.python-version|.go-version|.ruby-version|.lua-version|.java-version|.perl-version|.php-version|.tool-versions|.shorten_folder_marker|.svn|.terraform|CVS|Cargo.toml|composer.json|go.mod|package.json|stack.yaml)\C-Atruncate_to_unique\C-Atrue\C-A160\C-Atrue\C-A160\C-A✘\C-Atrue\C-A160\C-A✘\C-A✘\C-Atrue\C-Atrue\C-A70\C-Atrue\C-A70\C-A✔\C-A✔\C-Afalse\C-A96\C-A74\C-A*\C-BOTHER\C-A38\C-Afalse\C-A38\C-A66\C-A%D{%H:%M:%S}\C-Afalse\C-A\C-A${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}\C-A110\C-A110\C-Afalse\C-Atrue\C-A${P9K_TOOLBOX_NAME:#fedora-toolbox-*}\C-A178\C-Aoff\C-Agit\C-A\C-A76\C-A-1\C-A-1\C-A-1\C-A${$((my_git_formatter(1)))+${my_git_format}}\C-A~\C-Atrue\C-A${$((my_git_formatter(0)))+${my_git_format}}\C-A244\C-A-1\C-A178\C-A-1\C-A-1\C-A76\C-A?\C-A-1\C-A76\C-A\C-ANORMAL\C-A\C-A66\C-A106\C-A172\C-A68\C-A34\C-AOVERTYPE\C-A37\C-A\C-A\C-Afalse\C-Afalse\C-AVISUAL\C-A\C-A81\C-A(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)\C-Afalse\C-A68\C-A72\C-A178\C-A▲'
|
|
16
|
+
local gitstatus_dir=/home/vscode/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus
|
|
17
|
+
local gitstatus_header=\#\ 3
|
|
18
|
+
local -i ZLE_RPROMPT_INDENT=1
|
|
19
|
+
local PROMPT_EOL_MARK=%B%S%\#%s%b
|
|
20
|
+
[[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]] && local ssh=1 || local ssh=0
|
|
21
|
+
local cr=$'\r' lf=$'\n' esc=$'\e[' rs=$'\x1e' us=$'\x1f'
|
|
22
|
+
local -i height=1
|
|
23
|
+
local prompt_dir=/home/vscode/.cache/p10k-vscode
|
|
24
|
+
|
|
25
|
+
(( _z4h_can_save_restore_screen == 1 )) && height=0
|
|
26
|
+
|
|
27
|
+
local real_gitstatus_header
|
|
28
|
+
if [[ -r $gitstatus_dir/install.info ]]; then
|
|
29
|
+
IFS= read -r real_gitstatus_header <$gitstatus_dir/install.info || real_gitstatus_header=borked
|
|
30
|
+
fi
|
|
31
|
+
[[ $real_gitstatus_header == $gitstatus_header ]] || return
|
|
32
|
+
zmodload zsh/langinfo zsh/terminfo zsh/system || return
|
|
33
|
+
if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]]; then
|
|
34
|
+
local loc_cmd=$commands[locale]
|
|
35
|
+
[[ -z $loc_cmd ]] && loc_cmd=/usr/bin/locale
|
|
36
|
+
if [[ -x $loc_cmd ]]; then
|
|
37
|
+
local -a locs
|
|
38
|
+
if locs=(${(@M)$(locale -a 2>/dev/null):#*.(utf|UTF)(-|)8}) && (( $#locs )); then
|
|
39
|
+
local loc=${locs[(r)(#i)C.UTF(-|)8]:-${locs[(r)(#i)en_US.UTF(-|)8]:-$locs[1]}}
|
|
40
|
+
[[ -n $LC_ALL ]] && local LC_ALL=$loc || local LC_CTYPE=$loc
|
|
41
|
+
fi
|
|
42
|
+
fi
|
|
43
|
+
fi
|
|
44
|
+
(( terminfo[colors] == 256 )) || return
|
|
45
|
+
(( $+terminfo[cuu] && $+terminfo[cuf] && $+terminfo[ed] && $+terminfo[sc] && $+terminfo[rc] )) || return
|
|
46
|
+
local pwd=${(%):-%/}
|
|
47
|
+
[[ $pwd == /* ]] || return
|
|
48
|
+
local prompt_file=$prompt_dir/prompt-${#pwd}
|
|
49
|
+
local key=$pwd:$ssh:${(%):-%#}
|
|
50
|
+
local content
|
|
51
|
+
if [[ ! -e $prompt_file ]]; then
|
|
52
|
+
typeset -gi __p9k_instant_prompt_sourced=47
|
|
53
|
+
return 1
|
|
54
|
+
fi
|
|
55
|
+
{ content="$(<$prompt_file)" } 2>/dev/null || return
|
|
56
|
+
local tail=${content##*$rs$key$us}
|
|
57
|
+
if (( ${#tail} == ${#content} )); then
|
|
58
|
+
typeset -gi __p9k_instant_prompt_sourced=47
|
|
59
|
+
return 1
|
|
60
|
+
fi
|
|
61
|
+
local _p9k__ipe
|
|
62
|
+
local P9K_PROMPT=instant
|
|
63
|
+
if [[ -z $P9K_TTY || $P9K_TTY == old && -n ${_P9K_TTY:#$TTY} ]]; then
|
|
64
|
+
|
|
65
|
+
typeset -gx P9K_TTY=old
|
|
66
|
+
zmodload -F zsh/stat b:zstat || return
|
|
67
|
+
zmodload zsh/datetime || return
|
|
68
|
+
local -a stat
|
|
69
|
+
if zstat -A stat +ctime -- $TTY 2>/dev/null &&
|
|
70
|
+
(( EPOCHREALTIME - stat[1] < 5.0000000000 )); then
|
|
71
|
+
P9K_TTY=new
|
|
72
|
+
fi
|
|
73
|
+
fi
|
|
74
|
+
typeset -gx _P9K_TTY=$TTY
|
|
75
|
+
local -i _p9k__empty_line_i=3 _p9k__ruler_i=3
|
|
76
|
+
local -A _p9k_display_k=(1/right/scalaenv 61 -1/right/background_jobs 25 -1/right/terraform 67 -1/right/nodenv 39 1/right/plenv 55 1/right/nvm 41 1/right/background_jobs 25 -1/right/scalaenv 61 -1/right/plenv 55 1/right/direnv 27 1/right/timewarrior 107 1/right/midnight_commander 97 1/right/rvm 47 -1/right/aws_eb_env 71 -1/right 13 -1/right/chezmoi_shell 101 1/right/vim_shell 95 -1/right/google_app_cred 77 -1/right/per_directory_history 111 -1/right/midnight_commander 97 1/right/nnn 89 1/right/google_app_cred 77 -1/left/vcs 19 1/right/asdf 29 1/right/nordvpn 83 -1/right/asdf 29 -1/right/ranger 85 1/left/dir 17 1/right/rbenv 45 1/right/terraform 67 -1/right/rbenv 45 1/right/nodenv 39 -1/left 11 -1/right/vi_mode 103 1/right/virtualenv 31 1/right/yazi 87 -1/right/kubecontext 65 -1/right/yazi 87 1/right/perlbrew 57 1/right_frame 9 -1/right/toolbox 79 1/right 13 1/right/xplr 93 -1/right/fvm 49 1/right/pyenv 35 -1/right/xplr 93 1/right/nodeenv 43 1/right/goenv 37 -1/right/pyenv 35 -1/right/perlbrew 57 -1/right/goenv 37 1/right/haskell_stack 63 -1/right/taskwarrior 109 1/right/chezmoi_shell 101 -1/right/nix_shell 99 -1/right/lf 91 1/right/ranger 85 1/right/aws 69 1/right/jenv 53 -1/right/jenv 53 empty_line 1 1/right/todo 105 -1/right/nvm 41 -1/right/todo 105 1/right/context 81 -1 5 -1/right/rvm 47 1/left 11 1/right/azure 73 -1/right/nordvpn 83 -1/right/azure 73 -1/right_frame 9 -1/gap 15 1/right/aws_eb_env 71 1/left/vcs 19 1/right/lf 91 1/right/time 113 -1/right/nnn 89 -1/right/gcloud 75 -1/right/time 113 1/right/kubecontext 65 -1/right/status 21 1/right/anaconda 33 1/right/nix_shell 99 -1/right/luaenv 51 1 5 1/left_frame 7 ruler 3 -1/left_frame 7 -1/right/phpenv 59 1/right/toolbox 79 1/gap 15 -1/right/nodeenv 43 1/right/command_execution_time 23 1/right/taskwarrior 109 -1/right/timewarrior 107 1/right/per_directory_history 111 -1/left/dir 17 -1/right/virtualenv 31 1/right/gcloud 75 -1/right/aws 69 1/right/status 21 -1/right/command_execution_time 23 -1/right/direnv 27 -1/right/context 81 -1/right/haskell_stack 63 1/right/vi_mode 103 1/right/luaenv 51 -1/right/vim_shell 95 1/right/phpenv 59 1/right/fvm 49 -1/right/anaconda 33)
|
|
77
|
+
local -a _p9k__display_v=(empty_line hide ruler hide 1 show 1/left_frame show 1/right_frame show 1/left show 1/right show 1/gap show 1/left/dir show 1/left/vcs show 1/right/status show 1/right/command_execution_time show 1/right/background_jobs show 1/right/direnv show 1/right/asdf show 1/right/virtualenv show 1/right/anaconda show 1/right/pyenv show 1/right/goenv show 1/right/nodenv show 1/right/nvm show 1/right/nodeenv show 1/right/rbenv show 1/right/rvm show 1/right/fvm show 1/right/luaenv show 1/right/jenv show 1/right/plenv show 1/right/perlbrew show 1/right/phpenv show 1/right/scalaenv show 1/right/haskell_stack show 1/right/kubecontext show 1/right/terraform show 1/right/aws show 1/right/aws_eb_env show 1/right/azure show 1/right/gcloud show 1/right/google_app_cred show 1/right/toolbox show 1/right/context show 1/right/nordvpn show 1/right/ranger show 1/right/yazi show 1/right/nnn show 1/right/lf show 1/right/xplr show 1/right/vim_shell show 1/right/midnight_commander show 1/right/nix_shell show 1/right/chezmoi_shell show 1/right/vi_mode show 1/right/todo show 1/right/timewarrior show 1/right/taskwarrior show 1/right/per_directory_history show 1/right/time show)
|
|
78
|
+
function p10k() {
|
|
79
|
+
emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre
|
|
80
|
+
(( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }
|
|
81
|
+
local -a match reply mbegin mend
|
|
82
|
+
local -i MBEGIN MEND OPTIND
|
|
83
|
+
local MATCH REPLY OPTARG IFS=$' \t\n\0'; [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }
|
|
84
|
+
[[ $1 == display ]] || return
|
|
85
|
+
shift
|
|
86
|
+
local -i k dump
|
|
87
|
+
local opt prev new pair list name var
|
|
88
|
+
while getopts ":ha" opt; do
|
|
89
|
+
case $opt in
|
|
90
|
+
a) dump=1;;
|
|
91
|
+
h) return 0;;
|
|
92
|
+
?) return 1;;
|
|
93
|
+
esac
|
|
94
|
+
done
|
|
95
|
+
if (( dump )); then
|
|
96
|
+
reply=()
|
|
97
|
+
shift $((OPTIND-1))
|
|
98
|
+
(( ARGC )) || set -- "*"
|
|
99
|
+
for opt; do
|
|
100
|
+
for k in ${(u@)_p9k_display_k[(I)$opt]:/(#m)*/$_p9k_display_k[$MATCH]}; do
|
|
101
|
+
reply+=($_p9k__display_v[k,k+1])
|
|
102
|
+
done
|
|
103
|
+
done
|
|
104
|
+
return 0
|
|
105
|
+
fi
|
|
106
|
+
for opt in "${@:$OPTIND}"; do
|
|
107
|
+
pair=(${(s:=:)opt})
|
|
108
|
+
list=(${(s:,:)${pair[2]}})
|
|
109
|
+
if [[ ${(b)pair[1]} == $pair[1] ]]; then
|
|
110
|
+
local ks=($_p9k_display_k[$pair[1]])
|
|
111
|
+
else
|
|
112
|
+
local ks=(${(u@)_p9k_display_k[(I)$pair[1]]:/(#m)*/$_p9k_display_k[$MATCH]})
|
|
113
|
+
fi
|
|
114
|
+
for k in $ks; do
|
|
115
|
+
if (( $#list == 1 )); then
|
|
116
|
+
[[ $_p9k__display_v[k+1] == $list[1] ]] && continue
|
|
117
|
+
new=$list[1]
|
|
118
|
+
else
|
|
119
|
+
new=${list[list[(I)$_p9k__display_v[k+1]]+1]:-$list[1]}
|
|
120
|
+
[[ $_p9k__display_v[k+1] == $new ]] && continue
|
|
121
|
+
fi
|
|
122
|
+
_p9k__display_v[k+1]=$new
|
|
123
|
+
name=$_p9k__display_v[k]
|
|
124
|
+
if [[ $name == (empty_line|ruler) ]]; then
|
|
125
|
+
var=_p9k__${name}_i
|
|
126
|
+
[[ $new == hide ]] && typeset -gi $var=3 || unset $var
|
|
127
|
+
elif [[ $name == (#b)(<->)(*) ]]; then
|
|
128
|
+
var=_p9k__${match[1]}${${${${match[2]//\/}/#left/l}/#right/r}/#gap/g}
|
|
129
|
+
[[ $new == hide ]] && typeset -g $var= || unset $var
|
|
130
|
+
fi
|
|
131
|
+
done
|
|
132
|
+
done
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
local _p9k__1rkubecontext=
|
|
136
|
+
_p9k__display_v[66]=hide
|
|
137
|
+
|
|
138
|
+
local _p9k__1raws=
|
|
139
|
+
_p9k__display_v[70]=hide
|
|
140
|
+
|
|
141
|
+
local _p9k__1razure=
|
|
142
|
+
_p9k__display_v[74]=hide
|
|
143
|
+
|
|
144
|
+
local _p9k__1rgcloud=
|
|
145
|
+
_p9k__display_v[76]=hide
|
|
146
|
+
|
|
147
|
+
local _p9k__1rgoogle_app_cred=
|
|
148
|
+
_p9k__display_v[78]=hide
|
|
149
|
+
|
|
150
|
+
() {
|
|
151
|
+
[[ -z $P9K_TOOLBOX_NAME ]] || return 0
|
|
152
|
+
if [[ -f /run/.containerenv && -r /run/.containerenv ]]
|
|
153
|
+
then
|
|
154
|
+
local name=(${(Q)${${(@M)${(f)"$(</run/.containerenv)"}:#name=*}#name=}})
|
|
155
|
+
[[ ${#name} -eq 1 && -n ${name[1]} ]] || return 0
|
|
156
|
+
typeset -g P9K_TOOLBOX_NAME=${name[1]}
|
|
157
|
+
elif [[ -n $DISTROBOX_ENTER_PATH ]]
|
|
158
|
+
then
|
|
159
|
+
local name=${(%):-%m}
|
|
160
|
+
if [[ -n $name && $name == $NAME* ]]
|
|
161
|
+
then
|
|
162
|
+
typeset -g P9K_TOOLBOX_NAME=$name
|
|
163
|
+
fi
|
|
164
|
+
fi
|
|
165
|
+
}
|
|
166
|
+
trap "unset -m _p9k__\*; unfunction p10k" EXIT
|
|
167
|
+
local -a _p9k_t=("${(@ps:$us:)${tail%%$rs*}}")
|
|
168
|
+
if [[ $+VTE_VERSION == 1 || $TERM_PROGRAM == Hyper ]] && (( $+commands[stty] )); then
|
|
169
|
+
if [[ $TERM_PROGRAM == Hyper ]]; then
|
|
170
|
+
local bad_lines=40 bad_columns=100
|
|
171
|
+
else
|
|
172
|
+
local bad_lines=24 bad_columns=80
|
|
173
|
+
fi
|
|
174
|
+
if (( LINES == bad_lines && COLUMNS == bad_columns )); then
|
|
175
|
+
zmodload -F zsh/stat b:zstat || return
|
|
176
|
+
zmodload zsh/datetime || return
|
|
177
|
+
local -a tty_ctime
|
|
178
|
+
if ! zstat -A tty_ctime +ctime -- $TTY 2>/dev/null || (( tty_ctime[1] + 2 > EPOCHREALTIME )); then
|
|
179
|
+
local -F deadline=$((EPOCHREALTIME+0.025))
|
|
180
|
+
local tty_size
|
|
181
|
+
while true; do
|
|
182
|
+
if (( EPOCHREALTIME > deadline )) || ! tty_size="$(command stty size 2>/dev/null)" || [[ $tty_size != <->" "<-> ]]; then
|
|
183
|
+
(( $+_p9k__ruler_i )) || local -i _p9k__ruler_i=1
|
|
184
|
+
local _p9k__g= _p9k__1r= _p9k__1r_frame=
|
|
185
|
+
break
|
|
186
|
+
fi
|
|
187
|
+
if [[ $tty_size != "$bad_lines $bad_columns" ]]; then
|
|
188
|
+
local lines_columns=(${=tty_size})
|
|
189
|
+
local LINES=$lines_columns[1]
|
|
190
|
+
local COLUMNS=$lines_columns[2]
|
|
191
|
+
break
|
|
192
|
+
fi
|
|
193
|
+
done
|
|
194
|
+
fi
|
|
195
|
+
fi
|
|
196
|
+
fi
|
|
197
|
+
typeset -ga __p9k_used_instant_prompt=("${(@e)_p9k_t[-3,-1]}")
|
|
198
|
+
|
|
199
|
+
local -i prompt_height=${#${__p9k_used_instant_prompt[1]//[^$lf]}}
|
|
200
|
+
(( height += prompt_height ))
|
|
201
|
+
local _p9k__ret
|
|
202
|
+
function _p9k_prompt_length() {
|
|
203
|
+
local -i COLUMNS=1024
|
|
204
|
+
local -i x y=${#1} m
|
|
205
|
+
if (( y )); then
|
|
206
|
+
while (( ${${(%):-$1%$y(l.1.0)}[-1]} )); do
|
|
207
|
+
x=y
|
|
208
|
+
(( y *= 2 ))
|
|
209
|
+
done
|
|
210
|
+
while (( y > x + 1 )); do
|
|
211
|
+
(( m = x + (y - x) / 2 ))
|
|
212
|
+
(( ${${(%):-$1%$m(l.x.y)}[-1]} = m ))
|
|
213
|
+
done
|
|
214
|
+
fi
|
|
215
|
+
typeset -g _p9k__ret=$x
|
|
216
|
+
}
|
|
217
|
+
local out=${(%):-%b%k%f%s%u}
|
|
218
|
+
if [[ $P9K_TTY == old && ( $+VTE_VERSION == 0 && $TERM_PROGRAM != Hyper || $+_p9k__g == 0 ) ]]; then
|
|
219
|
+
local mark=${(e)PROMPT_EOL_MARK}
|
|
220
|
+
[[ $mark == "%B%S%#%s%b" ]] && _p9k__ret=1 || _p9k_prompt_length $mark
|
|
221
|
+
local -i fill=$((COLUMNS > _p9k__ret ? COLUMNS - _p9k__ret : 0))
|
|
222
|
+
out+="${(%):-$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
|
|
223
|
+
else
|
|
224
|
+
out+="${(%):-$cr%E}"
|
|
225
|
+
fi
|
|
226
|
+
if (( _z4h_can_save_restore_screen != 1 )); then
|
|
227
|
+
(( height )) && out+="${(pl.$height..$lf.)}$esc${height}A"
|
|
228
|
+
out+="$terminfo[sc]"
|
|
229
|
+
fi
|
|
230
|
+
out+=${(%):-"$__p9k_used_instant_prompt[1]$__p9k_used_instant_prompt[2]"}
|
|
231
|
+
if [[ -n $__p9k_used_instant_prompt[3] ]]; then
|
|
232
|
+
_p9k_prompt_length "$__p9k_used_instant_prompt[2]"
|
|
233
|
+
local -i left_len=_p9k__ret
|
|
234
|
+
_p9k_prompt_length "$__p9k_used_instant_prompt[3]"
|
|
235
|
+
if (( _p9k__ret )); then
|
|
236
|
+
local -i gap=$((COLUMNS - left_len - _p9k__ret - ZLE_RPROMPT_INDENT))
|
|
237
|
+
if (( gap >= 40 )); then
|
|
238
|
+
out+="${(pl.$gap.. .)}${(%):-${__p9k_used_instant_prompt[3]}%b%k%f%s%u}$cr$esc${left_len}C"
|
|
239
|
+
fi
|
|
240
|
+
fi
|
|
241
|
+
fi
|
|
242
|
+
if (( _z4h_can_save_restore_screen == 1 )); then
|
|
243
|
+
if (( height )); then
|
|
244
|
+
out+="$cr${(pl:$((height-prompt_height))::\n:)}$esc${height}A$terminfo[sc]$out"
|
|
245
|
+
else
|
|
246
|
+
out+="$cr${(pl:$((height-prompt_height))::\n:)}$terminfo[sc]$out"
|
|
247
|
+
fi
|
|
248
|
+
fi
|
|
249
|
+
if [[ -n "$TMPDIR" && ( ( -d "$TMPDIR" && -w "$TMPDIR" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then
|
|
250
|
+
local tmpdir=$TMPDIR
|
|
251
|
+
else
|
|
252
|
+
local tmpdir=/tmp
|
|
253
|
+
fi
|
|
254
|
+
typeset -g __p9k_instant_prompt_output=$tmpdir/p10k-instant-prompt-output-${(%):-%n}-$$
|
|
255
|
+
{ : > $__p9k_instant_prompt_output } || return
|
|
256
|
+
print -rn -- "${out}${esc}?2004h" || return
|
|
257
|
+
if (( $+commands[stty] )); then
|
|
258
|
+
command stty -icanon 2>/dev/null
|
|
259
|
+
fi
|
|
260
|
+
local fd_null
|
|
261
|
+
sysopen -ru fd_null /dev/null || return
|
|
262
|
+
exec {__p9k_fd_0}<&0 {__p9k_fd_1}>&1 {__p9k_fd_2}>&2 0<&$fd_null 1>$__p9k_instant_prompt_output
|
|
263
|
+
exec 2>&1 {fd_null}>&-
|
|
264
|
+
typeset -gi __p9k_instant_prompt_active=1
|
|
265
|
+
if (( _z4h_can_save_restore_screen == 1 )); then
|
|
266
|
+
typeset -g _z4h_saved_screen
|
|
267
|
+
-z4h-save-screen
|
|
268
|
+
fi
|
|
269
|
+
typeset -g __p9k_instant_prompt_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
|
|
270
|
+
if builtin source $__p9k_instant_prompt_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
|
|
271
|
+
_p9k_preinit
|
|
272
|
+
fi
|
|
273
|
+
function _p9k_instant_prompt_cleanup() {
|
|
274
|
+
(( ZSH_SUBSHELL == 0 && ${+__p9k_instant_prompt_active} )) || return 0
|
|
275
|
+
emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre
|
|
276
|
+
(( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }
|
|
277
|
+
local -a match reply mbegin mend
|
|
278
|
+
local -i MBEGIN MEND OPTIND
|
|
279
|
+
local MATCH REPLY OPTARG IFS=$' \t\n\0'
|
|
280
|
+
unset __p9k_instant_prompt_active
|
|
281
|
+
exec 0<&$__p9k_fd_0 1>&$__p9k_fd_1 2>&$__p9k_fd_2 {__p9k_fd_0}>&- {__p9k_fd_1}>&- {__p9k_fd_2}>&-
|
|
282
|
+
unset __p9k_fd_0 __p9k_fd_1 __p9k_fd_2
|
|
283
|
+
typeset -gi __p9k_instant_prompt_erased=1
|
|
284
|
+
if (( _z4h_can_save_restore_screen == 1 && __p9k_instant_prompt_sourced >= 35 )); then
|
|
285
|
+
-z4h-restore-screen
|
|
286
|
+
unset _z4h_saved_screen
|
|
287
|
+
fi
|
|
288
|
+
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
|
|
289
|
+
if [[ -s $__p9k_instant_prompt_output ]]; then
|
|
290
|
+
command cat $__p9k_instant_prompt_output 2>/dev/null
|
|
291
|
+
if (( $1 )); then
|
|
292
|
+
local _p9k__ret mark="${(e)${PROMPT_EOL_MARK-%B%S%#%s%b}}"
|
|
293
|
+
_p9k_prompt_length $mark
|
|
294
|
+
local -i fill=$((COLUMNS > _p9k__ret ? COLUMNS - _p9k__ret : 0))
|
|
295
|
+
echo -nE - "${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
|
|
296
|
+
fi
|
|
297
|
+
fi
|
|
298
|
+
zshexit_functions=(${zshexit_functions:#_p9k_instant_prompt_cleanup})
|
|
299
|
+
zmodload -F zsh/files b:zf_rm || return
|
|
300
|
+
local user=${(%):-%n}
|
|
301
|
+
local root_dir=${__p9k_instant_prompt_dump_file:h}
|
|
302
|
+
zf_rm -f -- $__p9k_instant_prompt_output $__p9k_instant_prompt_dump_file{,.zwc} $root_dir/p10k-instant-prompt-$user.zsh{,.zwc} $root_dir/p10k-$user/prompt-*(N) 2>/dev/null
|
|
303
|
+
}
|
|
304
|
+
function _p9k_instant_prompt_precmd_first() {
|
|
305
|
+
emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre
|
|
306
|
+
(( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }
|
|
307
|
+
local -a match reply mbegin mend
|
|
308
|
+
local -i MBEGIN MEND OPTIND
|
|
309
|
+
local MATCH REPLY OPTARG IFS=$' \t\n\0'; [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }
|
|
310
|
+
function _p9k_instant_prompt_sched_last() {
|
|
311
|
+
(( ${+__p9k_instant_prompt_active} )) || return 0
|
|
312
|
+
_p9k_instant_prompt_cleanup 1
|
|
313
|
+
setopt no_local_options prompt_cr prompt_sp
|
|
314
|
+
}
|
|
315
|
+
zmodload zsh/sched
|
|
316
|
+
sched +0 _p9k_instant_prompt_sched_last
|
|
317
|
+
precmd_functions=(${(@)precmd_functions:#_p9k_instant_prompt_precmd_first})
|
|
318
|
+
}
|
|
319
|
+
zshexit_functions=(_p9k_instant_prompt_cleanup $zshexit_functions)
|
|
320
|
+
precmd_functions=(_p9k_instant_prompt_precmd_first $precmd_functions)
|
|
321
|
+
DISABLE_UPDATE_PROMPT=true
|
|
322
|
+
} && unsetopt prompt_cr prompt_sp && typeset -gi __p9k_instant_prompt_sourced=47 ||
|
|
323
|
+
typeset -gi __p9k_instant_prompt_sourced=${__p9k_instant_prompt_sourced:-0}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# NOTE: This file will be executed as remoteUser (devcontainer.json)
|
|
3
|
+
echo "=> Script: post-create.sh Executed by: $(whoami)"
|
|
4
|
+
|
|
5
|
+
sudo npm i --progress=false --global commitizen@latest cz-conventional-changelog@latest semantic-release-cli@latest
|
|
6
|
+
|
|
7
|
+
# shellcheck source=/dev/null
|
|
8
|
+
source ~/.zshrc
|
|
9
|
+
|
|
10
|
+
# install node deps
|
|
11
|
+
npm ci
|