diff options
-rw-r--r-- | services/base-config | 5 | ||||
-rw-r--r-- | services/config.template | 1 | ||||
-rwxr-xr-x | services/manage | 21 | ||||
-rw-r--r-- | store/works/python/.gitignore (renamed from python/.gitignore) | 0 | ||||
-rw-r--r-- | store/works/python/.python-version (renamed from python/.python-version) | 0 | ||||
-rw-r--r-- | store/works/python/cru/__init__.py (renamed from python/cru/__init__.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_base.py (renamed from python/cru/_base.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_const.py (renamed from python/cru/_const.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_decorator.py (renamed from python/cru/_decorator.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_error.py (renamed from python/cru/_error.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_event.py (renamed from python/cru/_event.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_func.py (renamed from python/cru/_func.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_helper.py (renamed from python/cru/_helper.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_iter.py (renamed from python/cru/_iter.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/_type.py (renamed from python/cru/_type.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/attr.py (renamed from python/cru/attr.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/config.py (renamed from python/cru/config.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/list.py (renamed from python/cru/list.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/parsing.py (renamed from python/cru/parsing.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/service/__init__.py (renamed from python/cru/service/__init__.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/service/__main__.py (renamed from python/cru/service/__main__.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/service/_app.py (renamed from python/cru/service/_app.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/service/_base.py (renamed from python/cru/service/_base.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/service/_gen_cmd.py (renamed from python/cru/service/_gen_cmd.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/service/_nginx.py (renamed from python/cru/service/_nginx.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/service/_template.py (renamed from python/cru/service/_template.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/system.py (renamed from python/cru/system.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/template.py (renamed from python/cru/template.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/tool.py (renamed from python/cru/tool.py) | 0 | ||||
-rw-r--r-- | store/works/python/cru/value.py (renamed from python/cru/value.py) | 0 | ||||
-rw-r--r-- | store/works/python/poetry.lock (renamed from python/poetry.lock) | 0 | ||||
-rw-r--r-- | store/works/python/pyproject.toml (renamed from python/pyproject.toml) | 0 | ||||
-rw-r--r-- | www/content/notes/cheat-sheet.md | 8 |
33 files changed, 15 insertions, 20 deletions
diff --git a/services/base-config b/services/base-config deleted file mode 100644 index ccd1e1b..0000000 --- a/services/base-config +++ /dev/null @@ -1,5 +0,0 @@ -CRUPEST_DOMAIN=crupest.life -CRUPEST_EMAIL=crupest@crupest.life -CRUPEST_GITHUB=https://github.com/crupest -CRUPEST_SERVICES_DIR=services -CRUPEST_DATA_DIR=data diff --git a/services/config.template b/services/config.template index 6f69c6d..7ae39a7 100644 --- a/services/config.template +++ b/services/config.template @@ -1,4 +1,3 @@ -CRUPEST_GITHUB=https://github.com/crupest CRUPEST_SERVICES_DIR=services CRUPEST_DATA_DIR=data CRUPEST_ROOT_URL=https://@@CRUPEST_DOMAIN@@ diff --git a/services/manage b/services/manage index 4589475..c81e6dc 100755 --- a/services/manage +++ b/services/manage @@ -2,23 +2,16 @@ set -e -python3 --version >/dev/null 2>&1 || ( - echo Error: failed to run Python with python3 --version. +deno --version >/dev/null 2>&1 || ( + echo "Error: failed to run deno --version." + echo "If deno is not installed, install it with:" + echo " curl -fsSL https://deno.land/install.sh | sh" exit 1 ) -script_dir="$(dirname "$0")" - -# shellcheck disable=SC2046 -export $(xargs <"${script_dir:?}/base-config") - -CRUPEST_PROJECT_DIR="$(realpath "$script_dir/..")" +CRUPEST_PROJECT_DIR="$(realpath "$(dirname "$0")/..")" export CRUPEST_PROJECT_DIR -export PYTHONPATH="$CRUPEST_PROJECT_DIR/python:$PYTHONPATH" +echo "Project Dir: $CRUPEST_PROJECT_DIR" -if [[ "$#" != "0" ]] && [[ "$1" == "gen-tmpl" ]]; then - python3 -m cru.service template generate "${@:2}" -else - python3 -m cru.service "$@" -fi +exec deno run -A "$CRUPEST_PROJECT_DIR/deno/service-manager/main.ts" --project-dir "$CRUPEST_PROJECT_DIR" "$@" diff --git a/python/.gitignore b/store/works/python/.gitignore index f5833b1..f5833b1 100644 --- a/python/.gitignore +++ b/store/works/python/.gitignore diff --git a/python/.python-version b/store/works/python/.python-version index 2c07333..2c07333 100644 --- a/python/.python-version +++ b/store/works/python/.python-version diff --git a/python/cru/__init__.py b/store/works/python/cru/__init__.py index 17799a9..17799a9 100644 --- a/python/cru/__init__.py +++ b/store/works/python/cru/__init__.py diff --git a/python/cru/_base.py b/store/works/python/cru/_base.py index 2599d8f..2599d8f 100644 --- a/python/cru/_base.py +++ b/store/works/python/cru/_base.py diff --git a/python/cru/_const.py b/store/works/python/cru/_const.py index 8246b35..8246b35 100644 --- a/python/cru/_const.py +++ b/store/works/python/cru/_const.py diff --git a/python/cru/_decorator.py b/store/works/python/cru/_decorator.py index 137fc05..137fc05 100644 --- a/python/cru/_decorator.py +++ b/store/works/python/cru/_decorator.py diff --git a/python/cru/_error.py b/store/works/python/cru/_error.py index e53c787..e53c787 100644 --- a/python/cru/_error.py +++ b/store/works/python/cru/_error.py diff --git a/python/cru/_event.py b/store/works/python/cru/_event.py index 51a794c..51a794c 100644 --- a/python/cru/_event.py +++ b/store/works/python/cru/_event.py diff --git a/python/cru/_func.py b/store/works/python/cru/_func.py index fc57802..fc57802 100644 --- a/python/cru/_func.py +++ b/store/works/python/cru/_func.py diff --git a/python/cru/_helper.py b/store/works/python/cru/_helper.py index 43baf46..43baf46 100644 --- a/python/cru/_helper.py +++ b/store/works/python/cru/_helper.py diff --git a/python/cru/_iter.py b/store/works/python/cru/_iter.py index f9683ca..f9683ca 100644 --- a/python/cru/_iter.py +++ b/store/works/python/cru/_iter.py diff --git a/python/cru/_type.py b/store/works/python/cru/_type.py index 1f81da3..1f81da3 100644 --- a/python/cru/_type.py +++ b/store/works/python/cru/_type.py diff --git a/python/cru/attr.py b/store/works/python/cru/attr.py index d4cc86a..d4cc86a 100644 --- a/python/cru/attr.py +++ b/store/works/python/cru/attr.py diff --git a/python/cru/config.py b/store/works/python/cru/config.py index 0f6f0d0..0f6f0d0 100644 --- a/python/cru/config.py +++ b/store/works/python/cru/config.py diff --git a/python/cru/list.py b/store/works/python/cru/list.py index 216a561..216a561 100644 --- a/python/cru/list.py +++ b/store/works/python/cru/list.py diff --git a/python/cru/parsing.py b/store/works/python/cru/parsing.py index 0e9239d..0e9239d 100644 --- a/python/cru/parsing.py +++ b/store/works/python/cru/parsing.py diff --git a/python/cru/service/__init__.py b/store/works/python/cru/service/__init__.py index e69de29..e69de29 100644 --- a/python/cru/service/__init__.py +++ b/store/works/python/cru/service/__init__.py diff --git a/python/cru/service/__main__.py b/store/works/python/cru/service/__main__.py index 2a0268b..2a0268b 100644 --- a/python/cru/service/__main__.py +++ b/store/works/python/cru/service/__main__.py diff --git a/python/cru/service/_app.py b/store/works/python/cru/service/_app.py index b4c6271..b4c6271 100644 --- a/python/cru/service/_app.py +++ b/store/works/python/cru/service/_app.py diff --git a/python/cru/service/_base.py b/store/works/python/cru/service/_base.py index e1eee70..e1eee70 100644 --- a/python/cru/service/_base.py +++ b/store/works/python/cru/service/_base.py diff --git a/python/cru/service/_gen_cmd.py b/store/works/python/cru/service/_gen_cmd.py index f51d65f..f51d65f 100644 --- a/python/cru/service/_gen_cmd.py +++ b/store/works/python/cru/service/_gen_cmd.py diff --git a/python/cru/service/_nginx.py b/store/works/python/cru/service/_nginx.py index 87cff6d..87cff6d 100644 --- a/python/cru/service/_nginx.py +++ b/store/works/python/cru/service/_nginx.py diff --git a/python/cru/service/_template.py b/store/works/python/cru/service/_template.py index 22c1d21..22c1d21 100644 --- a/python/cru/service/_template.py +++ b/store/works/python/cru/service/_template.py diff --git a/python/cru/system.py b/store/works/python/cru/system.py index f321717..f321717 100644 --- a/python/cru/system.py +++ b/store/works/python/cru/system.py diff --git a/python/cru/template.py b/store/works/python/cru/template.py index 3a70337..3a70337 100644 --- a/python/cru/template.py +++ b/store/works/python/cru/template.py diff --git a/python/cru/tool.py b/store/works/python/cru/tool.py index 377f5d7..377f5d7 100644 --- a/python/cru/tool.py +++ b/store/works/python/cru/tool.py diff --git a/python/cru/value.py b/store/works/python/cru/value.py index 9c03219..9c03219 100644 --- a/python/cru/value.py +++ b/store/works/python/cru/value.py diff --git a/python/poetry.lock b/store/works/python/poetry.lock index 4338200..4338200 100644 --- a/python/poetry.lock +++ b/store/works/python/poetry.lock diff --git a/python/pyproject.toml b/store/works/python/pyproject.toml index 28c753e..28c753e 100644 --- a/python/pyproject.toml +++ b/store/works/python/pyproject.toml diff --git a/www/content/notes/cheat-sheet.md b/www/content/notes/cheat-sheet.md index d78759b..e525ddb 100644 --- a/www/content/notes/cheat-sheet.md +++ b/www/content/notes/cheat-sheet.md @@ -19,6 +19,14 @@ bootloader id in `--bootloader-id=GRUB`. All commands should be run at the project root path. +### Install Deno + +Script from <https://docs.deno.com/runtime/getting_started/installation/> + +```bash-session +$ curl -fsSL https://deno.land/install.sh | sh +``` + ### Rebuild Blog ```bash-session |