zrb 0.7.2__py3-none-any.whl → 0.8.0__py3-none-any.whl
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.
- zrb/builtin/__init__.py +8 -6
- zrb/builtin/devtool/helix/install-language-server.sh +10 -0
- zrb/builtin/devtool/helix/install.sh +1 -11
- zrb/builtin/devtool/zsh/install.sh +1 -1
- zrb/builtin/devtool/zsh/resource/config.sh +14 -0
- zrb/builtin/docker.py +20 -0
- zrb/builtin/generator/plugin/template/project.sh +22 -1
- zrb/builtin/generator/project/template/project.sh +22 -1
- zrb/builtin/git.py +1 -1
- zrb/builtin/group.py +1 -0
- {zrb-0.7.2.dist-info → zrb-0.8.0.dist-info}/METADATA +3 -3
- {zrb-0.7.2.dist-info → zrb-0.8.0.dist-info}/RECORD +15 -14
- {zrb-0.7.2.dist-info → zrb-0.8.0.dist-info}/LICENSE +0 -0
- {zrb-0.7.2.dist-info → zrb-0.8.0.dist-info}/WHEEL +0 -0
- {zrb-0.7.2.dist-info → zrb-0.8.0.dist-info}/entry_points.txt +0 -0
zrb/builtin/__init__.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from zrb.builtin import (
|
2
2
|
base64,
|
3
3
|
devtool,
|
4
|
+
docker,
|
4
5
|
env,
|
5
6
|
eval,
|
6
7
|
explain,
|
@@ -18,18 +19,19 @@ from zrb.builtin import (
|
|
18
19
|
)
|
19
20
|
|
20
21
|
assert base64
|
22
|
+
assert devtool
|
23
|
+
assert docker
|
21
24
|
assert env
|
22
25
|
assert eval
|
26
|
+
assert explain
|
27
|
+
assert generator
|
23
28
|
assert git
|
24
29
|
assert md5
|
25
|
-
assert
|
30
|
+
assert process
|
26
31
|
assert project
|
27
32
|
assert ubuntu
|
28
33
|
assert update
|
29
|
-
assert version
|
30
|
-
assert devtool
|
31
|
-
assert generator
|
32
|
-
assert process
|
33
34
|
assert say
|
34
|
-
assert watch_changes
|
35
35
|
assert schedule
|
36
|
+
assert version
|
37
|
+
assert watch_changes
|
@@ -29,5 +29,15 @@ else
|
|
29
29
|
echo "Cannot install go language server, is go installed?"
|
30
30
|
fi
|
31
31
|
|
32
|
+
if command_exists hx
|
33
|
+
then
|
34
|
+
hx --grammar fetch
|
35
|
+
hx --grammar build
|
36
|
+
elif command_exists helix
|
37
|
+
then
|
38
|
+
helix --grammar fetch
|
39
|
+
helix --grammar build
|
40
|
+
fi
|
41
|
+
|
32
42
|
set -e
|
33
43
|
echo "Visit https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers for more information."
|
@@ -18,7 +18,7 @@ else
|
|
18
18
|
if command_exists pkg
|
19
19
|
then
|
20
20
|
try_sudo pkg update
|
21
|
-
try_sudo pkg install -y
|
21
|
+
try_sudo pkg install -y helix
|
22
22
|
elif command_exists apt
|
23
23
|
then
|
24
24
|
try_sudo add-apt-repository ppa:maveonair/helix-editor -y
|
@@ -46,13 +46,3 @@ else
|
|
46
46
|
exit 1
|
47
47
|
fi
|
48
48
|
fi
|
49
|
-
|
50
|
-
if command_exists hx
|
51
|
-
then
|
52
|
-
hx --grammar fetch
|
53
|
-
hx --grammar build
|
54
|
-
elif command_exists helix
|
55
|
-
then
|
56
|
-
helix --grammar fetch
|
57
|
-
helix --grammar build
|
58
|
-
fi
|
@@ -131,3 +131,17 @@ KUBE_PS1_CTX_COLOR=cyan
|
|
131
131
|
PROMPT='$(kube_ps1)'$PROMPT
|
132
132
|
|
133
133
|
export COLORTERM=truecolor
|
134
|
+
|
135
|
+
# Activate pyenv if exists
|
136
|
+
if [ -d "${HOME}/.pyenv" ]
|
137
|
+
then
|
138
|
+
export PYENV_ROOT="$HOME/.pyenv"
|
139
|
+
export PATH="$PYENV_ROOT/bin:$PATH"
|
140
|
+
eval "$(pyenv init --path)"
|
141
|
+
fi
|
142
|
+
|
143
|
+
# Activate local venv if exists
|
144
|
+
if [ -f "${HOME}/.local-venv/bin/activate" ]
|
145
|
+
then
|
146
|
+
source "${HOME}/.local-venv/bin/activate"
|
147
|
+
fi
|
zrb/builtin/docker.py
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
from zrb.builtin.group import docker_group
|
2
|
+
from zrb.runner import runner
|
3
|
+
from zrb.task.cmd_task import CmdTask
|
4
|
+
|
5
|
+
###############################################################################
|
6
|
+
# Task Definitions
|
7
|
+
###############################################################################
|
8
|
+
|
9
|
+
prune = CmdTask(
|
10
|
+
name="prune",
|
11
|
+
group=docker_group,
|
12
|
+
description="Prune unused images and volumes",
|
13
|
+
cmd=[
|
14
|
+
"docker system prune -af",
|
15
|
+
"docker image prune -af",
|
16
|
+
"docker system prune -af --volumes",
|
17
|
+
"docker system df",
|
18
|
+
],
|
19
|
+
)
|
20
|
+
runner.register(prune)
|
@@ -1,5 +1,13 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
+
if [ -n "$PREFIX" ] && [ "$PREFIX" = "/data/data/com.termux/files/usr" ]
|
4
|
+
then
|
5
|
+
IS_TERMUX=1
|
6
|
+
else
|
7
|
+
IS_TERMUX=0
|
8
|
+
fi
|
9
|
+
|
10
|
+
|
3
11
|
log_progress() {
|
4
12
|
echo -e "🤖 \e[0;33m${1}\e[0;0m"
|
5
13
|
}
|
@@ -17,7 +25,7 @@ init() {
|
|
17
25
|
then
|
18
26
|
log_progress 'Install poetry'
|
19
27
|
pip install --upgrade pip setuptools
|
20
|
-
pip install "poetry
|
28
|
+
pip install "poetry"
|
21
29
|
fi
|
22
30
|
if [ ! -d "${PROJECT_DIR}/.venv" ]
|
23
31
|
then
|
@@ -40,9 +48,22 @@ reload() {
|
|
40
48
|
log_progress 'Loading project configuration (.env)'
|
41
49
|
source "${PROJECT_DIR}/.env"
|
42
50
|
|
51
|
+
if [ "$IS_TERMUX" = "1" ]
|
52
|
+
then
|
53
|
+
log_progress 'Updating Build Flags'
|
54
|
+
_OLD_CFLAGS="$CFLAGS"
|
55
|
+
export CFLAGS="$_OLD_CFLAGS -Wno-incompatible-function-pointer-types" # ruamel.yaml need this.
|
56
|
+
fi
|
57
|
+
|
43
58
|
log_progress 'Install'
|
44
59
|
poetry install
|
45
60
|
|
61
|
+
if [ "$IS_TERMUX" = "1" ]
|
62
|
+
then
|
63
|
+
log_progress 'Restoring Build Flags'
|
64
|
+
export CFLAGS="$_OLD_CFLAGS"
|
65
|
+
fi
|
66
|
+
|
46
67
|
_CURRENT_SHELL=$(ps -p $$ | awk 'NR==2 {print $4}')
|
47
68
|
case "$_CURRENT_SHELL" in
|
48
69
|
*zsh)
|
@@ -1,5 +1,13 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
+
if [ -n "$PREFIX" ] && [ "$PREFIX" = "/data/data/com.termux/files/usr" ]
|
4
|
+
then
|
5
|
+
IS_TERMUX=1
|
6
|
+
else
|
7
|
+
IS_TERMUX=0
|
8
|
+
fi
|
9
|
+
|
10
|
+
|
3
11
|
log_progress() {
|
4
12
|
echo -e "🤖 \e[0;33m${1}\e[0;0m"
|
5
13
|
}
|
@@ -17,7 +25,7 @@ init() {
|
|
17
25
|
then
|
18
26
|
log_progress 'Install poetry'
|
19
27
|
pip install --upgrade pip setuptools
|
20
|
-
pip install "poetry
|
28
|
+
pip install "poetry"
|
21
29
|
fi
|
22
30
|
if [ ! -d "${PROJECT_DIR}/.venv" ]
|
23
31
|
then
|
@@ -40,9 +48,22 @@ reload() {
|
|
40
48
|
log_progress 'Loading project configuration (.env)'
|
41
49
|
source "${PROJECT_DIR}/.env"
|
42
50
|
|
51
|
+
if [ "$IS_TERMUX" = "1" ]
|
52
|
+
then
|
53
|
+
log_progress 'Updating Build Flags'
|
54
|
+
_OLD_CFLAGS="$CFLAGS"
|
55
|
+
export CFLAGS="$_OLD_CFLAGS -Wno-incompatible-function-pointer-types" # ruamel.yaml need this.
|
56
|
+
fi
|
57
|
+
|
43
58
|
log_progress 'Install'
|
44
59
|
poetry install
|
45
60
|
|
61
|
+
if [ "$IS_TERMUX" = "1" ]
|
62
|
+
then
|
63
|
+
log_progress 'Restoring Build Flags'
|
64
|
+
export CFLAGS="$_OLD_CFLAGS"
|
65
|
+
fi
|
66
|
+
|
46
67
|
_CURRENT_SHELL=$(ps -p $$ | awk 'NR==2 {print $4}')
|
47
68
|
case "$_CURRENT_SHELL" in
|
48
69
|
*zsh)
|
zrb/builtin/git.py
CHANGED
zrb/builtin/group.py
CHANGED
@@ -17,5 +17,6 @@ dev_tool_install_group = Group(
|
|
17
17
|
name="install", description="Install developer tools", parent=dev_tool_group
|
18
18
|
)
|
19
19
|
git_group = Group(name="git", description="Git related commands")
|
20
|
+
docker_group = Group(name="docker", description="Docker related commands")
|
20
21
|
process_group = Group(name="process", description="Process related commands")
|
21
22
|
plugin_group = Group(name="plugin", description="Plugin related command")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: zrb
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.0
|
4
4
|
Summary: A Framework to Enhance Your Workflow
|
5
5
|
Home-page: https://github.com/state-alchemists/zrb
|
6
6
|
License: AGPL-3.0-or-later
|
@@ -58,10 +58,10 @@ You can install Zrb as a pip package by invoking the following command:
|
|
58
58
|
pip install zrb
|
59
59
|
```
|
60
60
|
|
61
|
-
Alternatively, you can also use our installation script to install Zrb along with
|
61
|
+
Alternatively, you can also use our installation script to install Zrb along with some prerequisites:
|
62
62
|
|
63
63
|
```bash
|
64
|
-
curl https://raw.githubusercontent.com/state-alchemists/zrb/main/install.sh
|
64
|
+
source <(curl -s https://raw.githubusercontent.com/state-alchemists/zrb/main/install.sh)
|
65
65
|
```
|
66
66
|
|
67
67
|
Check our [installation guide](https://github.com/state-alchemists/zrb/blob/main/docs/installation.md) for more information about the installation methods, including installation as a docker container.
|
@@ -3,7 +3,7 @@ zrb/__main__.py,sha256=dL2dVMkIZVBTcPuztE-WAbgKYsRPDMBp-IZtdgGYYf0,412
|
|
3
3
|
zrb/action/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
zrb/action/runner.py,sha256=rjJvfcMwpcCIx6rrZLiXDwpnBi_yz6K0OKZ76SGqXSE,5092
|
5
5
|
zrb/advertisement.py,sha256=qL-2EauUG8B6wxvZDIBchBfogYtXLJvWt_iw_IbYeO4,548
|
6
|
-
zrb/builtin/__init__.py,sha256=
|
6
|
+
zrb/builtin/__init__.py,sha256=W6InzR85JLPkja-cCFqgsk93GXcvKYnYQnPhEKo-g0M,477
|
7
7
|
zrb/builtin/base64.py,sha256=LtKgDoZzrzf_yWpBU8Xic3az6qXEkgS50gIleSelrV4,1335
|
8
8
|
zrb/builtin/devtool/__init__.py,sha256=PNpOlo6DiaMYfOXXVG3z9T2UyBshbVYFrYJsufBWCZ8,613
|
9
9
|
zrb/builtin/devtool/aws/install.sh,sha256=K6VfNvTI5gfPfNA-oKqMqmP6uJ27WdLqASkDAkElYcA,1613
|
@@ -13,8 +13,8 @@ zrb/builtin/devtool/gcloud/install.sh,sha256=IWZ44ZS0XCYnPdclC77PBjsa2HDes7NNcQX
|
|
13
13
|
zrb/builtin/devtool/gvm/download.sh,sha256=nK8mQh3mm3QBIk7tBprBE10CmXDMRBkuz3S_uobLRm4,407
|
14
14
|
zrb/builtin/devtool/gvm/finalize.sh,sha256=ngKNpdA3P7Op3nTlHLMEK0U6k0di9pW_hX3Wd7MQ8AA,518
|
15
15
|
zrb/builtin/devtool/gvm/resource/config.sh,sha256=M_r6XjtoYZjx8rJaT3FIwVl3HUd7lJF5_KqUSEJQeo4,253
|
16
|
-
zrb/builtin/devtool/helix/install-language-server.sh,sha256=
|
17
|
-
zrb/builtin/devtool/helix/install.sh,sha256=
|
16
|
+
zrb/builtin/devtool/helix/install-language-server.sh,sha256=ZkV_ARwhTnLjjbAhJe8Pvp1hyRYVn176DYwg7ObkQ1w,1040
|
17
|
+
zrb/builtin/devtool/helix/install.sh,sha256=9LIsQaZ_Rdto0TC-vEUB3qFEu_70hEiUG0Le0EuKPKA,1355
|
18
18
|
zrb/builtin/devtool/helix/resource/config.toml,sha256=zEeA-oiVbCGs6dQNZAbeFfMJ3giClOkuhgJ6Pcel2ww,282
|
19
19
|
zrb/builtin/devtool/helix/resource/themes/gruvbox_transparent.toml,sha256=Kz6AhxXKVHrP5mpFI99uPFyfUOvB_0x2fapj0tUkIaA,56
|
20
20
|
zrb/builtin/devtool/helm/install.sh,sha256=IFls6qIgaP6AaGVVyhPcY24eUl30yRdvwdP0DdmfLgY,224
|
@@ -35,8 +35,9 @@ zrb/builtin/devtool/terraform/install.sh,sha256=HILxhcfvFPBhjqp4vk2bf9yoMC0nN7Hf
|
|
35
35
|
zrb/builtin/devtool/terraform/resource/config.sh,sha256=Ded5pE1u4ByzfI64mtJcxIfCCqpz6N0AmnJHRetYwME,84
|
36
36
|
zrb/builtin/devtool/tmux/install.sh,sha256=-H-VIipUKLJJGk55Ml0c642G60Iq1DtXj8EQUA0AzNk,1209
|
37
37
|
zrb/builtin/devtool/tmux/resource/config.sh,sha256=wQCb4Q-mNkxIPOcvpN84X9RUWkGY16u3Vd-pOhVidgg,416
|
38
|
-
zrb/builtin/devtool/zsh/install.sh,sha256=
|
39
|
-
zrb/builtin/devtool/zsh/resource/config.sh,sha256=
|
38
|
+
zrb/builtin/devtool/zsh/install.sh,sha256=O6LnYuNzRAi-gC856Hb1kwqv57JljCRCIVJFuCroC5c,1680
|
39
|
+
zrb/builtin/devtool/zsh/resource/config.sh,sha256=2ZEmmiu5KS-FSMlj48IDPh5dhx5fnbzri86CtzI5Np0,5068
|
40
|
+
zrb/builtin/docker.py,sha256=bn3vJrPJLQqO4WcoFgv7L-FB-PWYHeFOzySSkRjp4qM,586
|
40
41
|
zrb/builtin/env.py,sha256=LwSLSn4nM-r9IGgrQA6uyIbnf2hEC5KagAvW3UZ_ZSY,1134
|
41
42
|
zrb/builtin/eval.py,sha256=_y18fe28INT9ZA5OWHxAu8Jw3E0nm5fCv51UVFfkb9w,746
|
42
43
|
zrb/builtin/explain.py,sha256=akQfTCgFTiWutAAC6VMZFrjlyDVQ90IWFPDdM_IgUpw,5353
|
@@ -1037,7 +1038,7 @@ zrb/builtin/generator/plugin/template/_cmd/build.sh,sha256=BdrlubJq1b9kjtB06IIBx
|
|
1037
1038
|
zrb/builtin/generator/plugin/template/_cmd/install-symlink.sh,sha256=DntlTyRlfRyxier2byya2dUqW33T2g61yhZLKELVri8,37
|
1038
1039
|
zrb/builtin/generator/plugin/template/_cmd/prepare-venv.sh,sha256=rXg-BvwoWK2xgbZvl01xHko6TZkSkb-yc_LiW8iF2n4,38
|
1039
1040
|
zrb/builtin/generator/plugin/template/_cmd/publish.sh,sha256=kiF-8ngC9g-2OqDHH3Px5VLuP0q58JVh-EIPMYSLvr4,64
|
1040
|
-
zrb/builtin/generator/plugin/template/project.sh,sha256=
|
1041
|
+
zrb/builtin/generator/plugin/template/project.sh,sha256=JROKY8-KQF6OFDb9XhkesE8838kYDY8q5D2SuMuv1aU,1990
|
1041
1042
|
zrb/builtin/generator/plugin/template/pyproject.toml,sha256=xgCPcWXo3rwEvGEzH2nJG-dF9OSRcl7f_4vwnW8Y9U4,764
|
1042
1043
|
zrb/builtin/generator/plugin/template/src/snake_zrb_package_name/__init__.py,sha256=5Twm0lVcddWW1tnRKDkKSkwMeuTxZgZ-GyPcr2MeyZk,130
|
1043
1044
|
zrb/builtin/generator/plugin/template/src/snake_zrb_package_name/__main__.py,sha256=xniLN9eAYflMDjM9LOPlt7FATS1P6aZBkUTGa9cfv6w,121
|
@@ -1053,7 +1054,7 @@ zrb/builtin/generator/project/template/.gitignore,sha256=9Sy-cmSDOIawqlmervgoO1e
|
|
1053
1054
|
zrb/builtin/generator/project/template/.python-version,sha256=rGeoqWHOE1NzOu73didX8_OyjR9O8b-XNp87WjKbO0s,7
|
1054
1055
|
zrb/builtin/generator/project/template/README.md,sha256=jNnkBuWhfab1HlcOqi0NKaM1O1NtTjchFrvOtR4KQPg,2026
|
1055
1056
|
zrb/builtin/generator/project/template/_automate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1056
|
-
zrb/builtin/generator/project/template/project.sh,sha256=
|
1057
|
+
zrb/builtin/generator/project/template/project.sh,sha256=JROKY8-KQF6OFDb9XhkesE8838kYDY8q5D2SuMuv1aU,1990
|
1057
1058
|
zrb/builtin/generator/project/template/pyproject.toml,sha256=OZEOtje1M6wVBoCx4ChcNNPMUWVFHv33CVV_isGdLmI,466
|
1058
1059
|
zrb/builtin/generator/project/template/src/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1059
1060
|
zrb/builtin/generator/project/template/template.env,sha256=mO3-iPEHihFbkBSr2VBZ15vyleL1S5MMpUKzGo9qtuw,124
|
@@ -1100,8 +1101,8 @@ zrb/builtin/generator/simple_python_app/template/src/kebab-zrb-app-name/src/Dock
|
|
1100
1101
|
zrb/builtin/generator/simple_python_app/template/src/kebab-zrb-app-name/src/main.py,sha256=9oXlXs0J3d2fhm9flhVGA-H_XxCDsOj_dFRhyhWEjvc,511
|
1101
1102
|
zrb/builtin/generator/simple_python_app/template/src/kebab-zrb-app-name/src/pyproject.toml,sha256=c8Vz3Q2AmzZzayyAuAKlQk8YdwgaK4KLnzvpTHcEZLM,569
|
1102
1103
|
zrb/builtin/generator/simple_python_app/template/src/kebab-zrb-app-name/src/template.env,sha256=vtoZ0LV8OKAU1EUWBiB8PIKbf1FaNfm-49j7aXvKsgs,87
|
1103
|
-
zrb/builtin/git.py,sha256=
|
1104
|
-
zrb/builtin/group.py,sha256=
|
1104
|
+
zrb/builtin/git.py,sha256=Djz83w8_DiF1lZkWSl5HRgWlj7SArOpyQW5rQTjVUf0,3016
|
1105
|
+
zrb/builtin/group.py,sha256=LotriKtrebUzHgA4_0XzO4WPSG6Dkwb-E8_HsHPQlo8,1168
|
1105
1106
|
zrb/builtin/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1106
1107
|
zrb/builtin/helper/reccuring_action.py,sha256=_oApvOrn7K4NZa-vt-A-xvpUSPjPEG2gydPXzJEUzSo,1940
|
1107
1108
|
zrb/builtin/md5.py,sha256=MUPvqfqExW0Bj--6K7_WkQiDCdxf3tW6JZiNn4HJyIg,1235
|
@@ -1215,8 +1216,8 @@ zrb/task_input/int_input.py,sha256=NVXAToqgdmWVwDqnr3XGuvq_QMNvUiIdD-pW5L4uebk,4
|
|
1215
1216
|
zrb/task_input/password_input.py,sha256=5sS3XP7WtGow7r7Fid8J9SX0iNCidO6Bg7q40UpZDM0,4029
|
1216
1217
|
zrb/task_input/str_input.py,sha256=D2WBeB-CdmAuOSzT7jTXvie7X3EK_m_Oq8_SVwmNpWA,4042
|
1217
1218
|
zrb/task_input/task_input.py,sha256=L-U5dX-I2U5ci7GU226Q8pXcQe5SpGuOl5viFwlfiM0,2022
|
1218
|
-
zrb-0.
|
1219
|
-
zrb-0.
|
1220
|
-
zrb-0.
|
1221
|
-
zrb-0.
|
1222
|
-
zrb-0.
|
1219
|
+
zrb-0.8.0.dist-info/LICENSE,sha256=WfnGCl8G60EYOPAEkuc8C9m9pdXWDe08NsKj3TBbxsM,728
|
1220
|
+
zrb-0.8.0.dist-info/METADATA,sha256=9KMmw8WC5nnLhEEJOvEj5eo6PHw2mvZbtmYf1fM6dAk,16501
|
1221
|
+
zrb-0.8.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
1222
|
+
zrb-0.8.0.dist-info/entry_points.txt,sha256=xTgXc1kBKYhJHEujdaSPHUcJT3-hbyP1mLgwkv-5sSk,40
|
1223
|
+
zrb-0.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|