From 5324d9270e92cca67260b5ee14473f80a40ae035 Mon Sep 17 00:00:00 2001 From: Amine Ben hammou Date: Tue, 10 Sep 2024 11:50:46 +0200 Subject: [PATCH] Create a monorepo --- .github/workflows/publish.yml | 23 +- .github/workflows/tests.yaml | 20 +- .gitignore | 9 +- bin/setup.sh | 40 -- package-lock.json | 671 ------------------ package.json | 45 +- packages/hosty-action/index.js | 3 + packages/hosty-action/package.json | 16 + packages/hosty/.gitignore | 7 + .prettierrc => packages/hosty/.prettierrc | 0 README.md => packages/hosty/README.md | 0 files.txt => packages/hosty/files.txt | 0 packages/hosty/package.json | 42 ++ {src => packages/hosty/src}/ansible/index.ts | 0 .../hosty/src}/ansible/tasks/builtin.ts | 0 .../hosty/src}/ansible/tasks/crypto.ts | 0 .../hosty/src}/ansible/tasks/general.ts | 0 .../hosty/src}/ansible/tasks/index.ts | 0 {src => packages/hosty/src}/ansible/types.ts | 0 {src => packages/hosty/src}/blocks/assert.ts | 0 {src => packages/hosty/src}/blocks/block.ts | 0 .../hosty/src}/blocks/build_repo.ts | 0 .../hosty/src}/blocks/create_directory.ts | 0 .../hosty/src}/blocks/create_domain.ts | 0 .../hosty/src}/blocks/create_service.ts | 0 .../hosty/src}/blocks/delete_directory.ts | 0 .../hosty/src}/blocks/delete_docker_image.ts | 0 .../hosty/src}/blocks/delete_domain.ts | 0 .../hosty/src}/blocks/delete_service.ts | 0 .../hosty/src}/blocks/generate_ssh_key.ts | 0 {src => packages/hosty/src}/blocks/index.ts | 0 .../hosty/src}/blocks/install_caddy.ts | 0 .../hosty/src}/blocks/install_docker.ts | 0 .../hosty/src}/blocks/install_git.ts | 0 .../hosty/src}/blocks/install_nixpacks.ts | 0 .../hosty/src}/blocks/set_available_port.ts | 0 {src => packages/hosty/src}/compose.types.ts | 0 {src => packages/hosty/src}/index.ts | 0 {src => packages/hosty/src}/instance.ts | 0 {src => packages/hosty/src}/server.ts | 0 .../hosty/src}/services/app/git.ts | 0 .../hosty/src}/services/app/index.ts | 0 .../hosty/src}/services/command.ts | 0 .../hosty/src}/services/container.ts | 0 .../hosty/src}/services/database/index.ts | 0 .../hosty/src}/services/database/mysql.ts | 0 .../hosty/src}/services/database/postgres.ts | 0 .../hosty/src}/services/database/redis.ts | 0 {src => packages/hosty/src}/services/index.ts | 0 {src => packages/hosty/src}/services/tasks.ts | 0 {src => packages/hosty/src}/types.ts | 0 {src => packages/hosty/src}/utils.ts | 0 tasks.todo => packages/hosty/tasks.todo | 0 test.ts => packages/hosty/test.ts | 0 .../hosty/tests}/app-adonis-sqlite.test.ts | 0 .../app-laravel-mysql-custom-docker.test.ts | 0 .../tests}/app-monorepo-rust-next.test.ts | 0 .../hosty/tests}/app-node-postgres.test.ts | 0 .../hosty/tests}/command-cron-host.test.ts | 0 .../hosty/tests}/command-cron-service.test.ts | 0 .../hosty/tests}/container.test.ts | 0 {tests => packages/hosty/tests}/files/bar.txt | 0 {tests => packages/hosty/tests}/files/foo.txt | 0 {tests => packages/hosty/tests}/setup.test.ts | 0 .../hosty/tests}/utils/Dockerfile | 0 .../hosty/tests}/utils/index.ts | 0 .../hosty/tsconfig.build.json | 0 tsconfig.json => packages/hosty/tsconfig.json | 0 pnpm-lock.yaml | 381 ++++++++++ pnpm-workspace.yaml | 3 + 70 files changed, 482 insertions(+), 778 deletions(-) delete mode 100755 bin/setup.sh delete mode 100644 package-lock.json create mode 100644 packages/hosty-action/index.js create mode 100644 packages/hosty-action/package.json create mode 100644 packages/hosty/.gitignore rename .prettierrc => packages/hosty/.prettierrc (100%) rename README.md => packages/hosty/README.md (100%) rename files.txt => packages/hosty/files.txt (100%) create mode 100644 packages/hosty/package.json rename {src => packages/hosty/src}/ansible/index.ts (100%) rename {src => packages/hosty/src}/ansible/tasks/builtin.ts (100%) rename {src => packages/hosty/src}/ansible/tasks/crypto.ts (100%) rename {src => packages/hosty/src}/ansible/tasks/general.ts (100%) rename {src => packages/hosty/src}/ansible/tasks/index.ts (100%) rename {src => packages/hosty/src}/ansible/types.ts (100%) rename {src => packages/hosty/src}/blocks/assert.ts (100%) rename {src => packages/hosty/src}/blocks/block.ts (100%) rename {src => packages/hosty/src}/blocks/build_repo.ts (100%) rename {src => packages/hosty/src}/blocks/create_directory.ts (100%) rename {src => packages/hosty/src}/blocks/create_domain.ts (100%) rename {src => packages/hosty/src}/blocks/create_service.ts (100%) rename {src => packages/hosty/src}/blocks/delete_directory.ts (100%) rename {src => packages/hosty/src}/blocks/delete_docker_image.ts (100%) rename {src => packages/hosty/src}/blocks/delete_domain.ts (100%) rename {src => packages/hosty/src}/blocks/delete_service.ts (100%) rename {src => packages/hosty/src}/blocks/generate_ssh_key.ts (100%) rename {src => packages/hosty/src}/blocks/index.ts (100%) rename {src => packages/hosty/src}/blocks/install_caddy.ts (100%) rename {src => packages/hosty/src}/blocks/install_docker.ts (100%) rename {src => packages/hosty/src}/blocks/install_git.ts (100%) rename {src => packages/hosty/src}/blocks/install_nixpacks.ts (100%) rename {src => packages/hosty/src}/blocks/set_available_port.ts (100%) rename {src => packages/hosty/src}/compose.types.ts (100%) rename {src => packages/hosty/src}/index.ts (100%) rename {src => packages/hosty/src}/instance.ts (100%) rename {src => packages/hosty/src}/server.ts (100%) rename {src => packages/hosty/src}/services/app/git.ts (100%) rename {src => packages/hosty/src}/services/app/index.ts (100%) rename {src => packages/hosty/src}/services/command.ts (100%) rename {src => packages/hosty/src}/services/container.ts (100%) rename {src => packages/hosty/src}/services/database/index.ts (100%) rename {src => packages/hosty/src}/services/database/mysql.ts (100%) rename {src => packages/hosty/src}/services/database/postgres.ts (100%) rename {src => packages/hosty/src}/services/database/redis.ts (100%) rename {src => packages/hosty/src}/services/index.ts (100%) rename {src => packages/hosty/src}/services/tasks.ts (100%) rename {src => packages/hosty/src}/types.ts (100%) rename {src => packages/hosty/src}/utils.ts (100%) rename tasks.todo => packages/hosty/tasks.todo (100%) rename test.ts => packages/hosty/test.ts (100%) rename {tests => packages/hosty/tests}/app-adonis-sqlite.test.ts (100%) rename {tests => packages/hosty/tests}/app-laravel-mysql-custom-docker.test.ts (100%) rename {tests => packages/hosty/tests}/app-monorepo-rust-next.test.ts (100%) rename {tests => packages/hosty/tests}/app-node-postgres.test.ts (100%) rename {tests => packages/hosty/tests}/command-cron-host.test.ts (100%) rename {tests => packages/hosty/tests}/command-cron-service.test.ts (100%) rename {tests => packages/hosty/tests}/container.test.ts (100%) rename {tests => packages/hosty/tests}/files/bar.txt (100%) rename {tests => packages/hosty/tests}/files/foo.txt (100%) rename {tests => packages/hosty/tests}/setup.test.ts (100%) rename {tests => packages/hosty/tests}/utils/Dockerfile (100%) rename {tests => packages/hosty/tests}/utils/index.ts (100%) rename tsconfig.build.json => packages/hosty/tsconfig.build.json (100%) rename tsconfig.json => packages/hosty/tsconfig.json (100%) create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8d9abf4..34c4602 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,16 +6,19 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3.0.0 + - uses: actions/setup-node@v4 with: + cache: pnpm + check-latest: true node-version: 22 - - run: npm ci - - run: npm run build - - name: Publish to npm - uses: pascalgn/npm-publish-action@1.3.9 + - run: pnpm install --frozen-lockfile + - run: pnpm run -r build + - name: Publish + run: | + npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" + pnpm publish -r --access public --no-git-checks env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1d7edf9..beb1cd2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,17 +1,21 @@ name: Tests on: - pull_request: - branches: [main] push: branches: [main] + paths-ignore: ['docs/**', '**/README.md'] + pull_request: + paths-ignore: ['docs/**', '**/README.md'] jobs: - functional_tests: + test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3.0.0 + - uses: actions/setup-node@v4 with: + cache: pnpm + check-latest: true node-version: 22 - - run: npm i - - run: npm run build - - run: npm test \ No newline at end of file + - run: pnpm install --frozen-lockfile + - run: pnpm run -r build + - run: pnpm run -r test diff --git a/.gitignore b/.gitignore index aca43d1..b1f8b7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,2 @@ -*.log -.DS_Store -node_modules -dist -.tests -hvps -lab +archive +node_modules \ No newline at end of file diff --git a/bin/setup.sh b/bin/setup.sh deleted file mode 100755 index 61809d5..0000000 --- a/bin/setup.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# Variables -ip="xxx.xxx.xxx.xxx" -hostname="xxx" -username="xxx" -password="xxx" -local_public_key_path="$HOME/.ssh/id_rsa.pub" - -# Add the line '$ip $hostname' to /etc/hosts if not already exists -if ! grep -qxF "$ip $hostname" /etc/hosts; then - echo "$ip $hostname" | sudo tee -a /etc/hosts > /dev/null - echo "Added $hostname to /etc/hosts" -fi - -# SSH into the VPS and execute the following commands -ssh root@$hostname <> /home/$username/.ssh/authorized_keys" - su - $username -c "chmod 600 /home/$username/.ssh/authorized_keys" - echo "Local public key added to $username's authorized_keys" - - # Configure UFW to allow only SSH, HTTP, and HTTPS - ufw allow OpenSSH - ufw allow 80/tcp - ufw allow 443/tcp - ufw --force enable - echo "UFW configured to allow only SSH, HTTP, and HTTPS" -EOF - -echo "Server setup done." diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 090fc18..0000000 --- a/package-lock.json +++ /dev/null @@ -1,671 +0,0 @@ -{ - "name": "hosty", - "version": "0.0.1-alpha.5", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "hosty", - "version": "0.0.1-alpha.5", - "license": "MIT", - "dependencies": { - "prompts": "^2.4.2", - "yaml": "^2.4.5" - }, - "devDependencies": { - "@types/node": "^20.12.12", - "@types/prompts": "^2.4.9", - "@types/yaml": "^1.9.7", - "@types/yamljs": "^0.2.34", - "prettier": "^3.2.5", - "tsx": "^4.10.5", - "typescript": "^5.4.5", - "zx": "^8.1.4" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@types/fs-extra": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", - "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@types/jsonfile": "*", - "@types/node": "*" - } - }, - "node_modules/@types/jsonfile": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", - "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "20.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", - "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/prompts": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/@types/prompts/-/prompts-2.4.9.tgz", - "integrity": "sha512-qTxFi6Buiu8+50/+3DGIWLHM6QuWsEKugJnnP6iv2Mc4ncxE4A/OJkjuVOA+5X0X1S/nq5VJRa8Lu+nwcvbrKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "kleur": "^3.0.3" - } - }, - "node_modules/@types/yaml": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@types/yaml/-/yaml-1.9.7.tgz", - "integrity": "sha512-8WMXRDD1D+wCohjfslHDgICd2JtMATZU8CkhH8LVJqcJs6dyYj5TGptzP8wApbmEullGBSsCEzzap73DQ1HJaA==", - "deprecated": "This is a stub types definition. yaml provides its own type definitions, so you do not need this installed.", - "dev": true, - "license": "MIT", - "dependencies": { - "yaml": "*" - } - }, - "node_modules/@types/yamljs": { - "version": "0.2.34", - "resolved": "https://registry.npmjs.org/@types/yamljs/-/yamljs-0.2.34.tgz", - "integrity": "sha512-gJvfRlv9ErxdOv7ux7UsJVePtX54NAvQyd8ncoiFqK8G5aeHIfQfGH2fbruvjAQ9657HwAaO54waS+Dsk2QTUQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.2", - "@esbuild/android-arm": "0.20.2", - "@esbuild/android-arm64": "0.20.2", - "@esbuild/android-x64": "0.20.2", - "@esbuild/darwin-arm64": "0.20.2", - "@esbuild/darwin-x64": "0.20.2", - "@esbuild/freebsd-arm64": "0.20.2", - "@esbuild/freebsd-x64": "0.20.2", - "@esbuild/linux-arm": "0.20.2", - "@esbuild/linux-arm64": "0.20.2", - "@esbuild/linux-ia32": "0.20.2", - "@esbuild/linux-loong64": "0.20.2", - "@esbuild/linux-mips64el": "0.20.2", - "@esbuild/linux-ppc64": "0.20.2", - "@esbuild/linux-riscv64": "0.20.2", - "@esbuild/linux-s390x": "0.20.2", - "@esbuild/linux-x64": "0.20.2", - "@esbuild/netbsd-x64": "0.20.2", - "@esbuild/openbsd-x64": "0.20.2", - "@esbuild/sunos-x64": "0.20.2", - "@esbuild/win32-arm64": "0.20.2", - "@esbuild/win32-ia32": "0.20.2", - "@esbuild/win32-x64": "0.20.2" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-tsconfig": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", - "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "license": "MIT" - }, - "node_modules/tsx": { - "version": "4.10.5", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.10.5.tgz", - "integrity": "sha512-twDSbf7Gtea4I2copqovUiNTEDrT8XNFXsuHpfGbdpW/z9ZW4fTghzzhAG0WfrCuJmJiOEY1nLIjq4u3oujRWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.20.2", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, - "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true, - "license": "MIT" - }, - "node_modules/yaml": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", - "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/zx": { - "version": "8.1.4", - "resolved": "https://registry.npmjs.org/zx/-/zx-8.1.4.tgz", - "integrity": "sha512-QFDYYpnzdpRiJ3dL2102Cw26FpXpWshW4QLTGxiYfIcwdAqg084jRCkK/kuP/NOSkxOjydRwNFG81qzA5r1a6w==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "zx": "build/cli.js" - }, - "engines": { - "node": ">= 12.17.0" - }, - "optionalDependencies": { - "@types/fs-extra": ">=11", - "@types/node": ">=20" - } - } - } -} diff --git a/package.json b/package.json index 9734511..386d6b1 100644 --- a/package.json +++ b/package.json @@ -1,44 +1,5 @@ { - "name": "hosty", - "version": "0.0.1-alpha.9", - "description": "A code based opinionated way to self-host and manage web apps.", - "type": "module", - "main": "dist/index.js", - "files": [ - "dist" - ], - "scripts": { - "build": "tsc -p tsconfig.build.json", - "test": "node --import tsx test.ts" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/webNeat/hosty.git" - }, - "keywords": [ - "self-hosting", - "ansible", - "docker", - "caddy", - "containers", - "deployment" - ], - "author": "Amine Ben hammou (@webNeat)", - "license": "MIT", - "bugs": { - "url": "https://github.com/webNeat/hosty/issues" - }, - "homepage": "https://github.com/webNeat/hosty", - "devDependencies": { - "@types/node": "^20.12.12", - "@types/yaml": "^1.9.7", - "@types/yamljs": "^0.2.34", - "prettier": "^3.2.5", - "tsx": "^4.10.5", - "typescript": "^5.4.5", - "zx": "^8.1.4" - }, - "dependencies": { - "yaml": "^2.4.5" - } + "name": "@hosty/workspace", + "private": true, + "packageManager": "pnpm@9.10.0" } diff --git a/packages/hosty-action/index.js b/packages/hosty-action/index.js new file mode 100644 index 0000000..2ce6256 --- /dev/null +++ b/packages/hosty-action/index.js @@ -0,0 +1,3 @@ +module.exports = { + wip: true, +}; diff --git a/packages/hosty-action/package.json b/packages/hosty-action/package.json new file mode 100644 index 0000000..7f06f0f --- /dev/null +++ b/packages/hosty-action/package.json @@ -0,0 +1,16 @@ +{ + "name": "hosty-action", + "version": "0.0.1-alpha.1", + "description": "Github action to automate deployments with hosty", + "main": "index.js", + "scripts": { + "build": "echo 'Done'", + "test": "echo 'Done'" + }, + "keywords": [], + "author": "", + "license": "MIT", + "dependencies": { + "hosty": "workspace:*" + } +} diff --git a/packages/hosty/.gitignore b/packages/hosty/.gitignore new file mode 100644 index 0000000..aca43d1 --- /dev/null +++ b/packages/hosty/.gitignore @@ -0,0 +1,7 @@ +*.log +.DS_Store +node_modules +dist +.tests +hvps +lab diff --git a/.prettierrc b/packages/hosty/.prettierrc similarity index 100% rename from .prettierrc rename to packages/hosty/.prettierrc diff --git a/README.md b/packages/hosty/README.md similarity index 100% rename from README.md rename to packages/hosty/README.md diff --git a/files.txt b/packages/hosty/files.txt similarity index 100% rename from files.txt rename to packages/hosty/files.txt diff --git a/packages/hosty/package.json b/packages/hosty/package.json new file mode 100644 index 0000000..63bb86d --- /dev/null +++ b/packages/hosty/package.json @@ -0,0 +1,42 @@ +{ + "name": "hosty", + "version": "0.0.1-alpha.9", + "description": "A code based opinionated way to self-host and manage web apps.", + "type": "module", + "main": "dist/index.js", + "files": [ + "dist" + ], + "scripts": { + "build": "tsc -p tsconfig.build.json", + "test": "node --import tsx test.ts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/webNeat/hosty.git" + }, + "keywords": [ + "self-hosting", + "ansible", + "docker", + "caddy", + "containers", + "deployment" + ], + "author": "Amine Ben hammou (@webNeat)", + "license": "MIT", + "bugs": { + "url": "https://github.com/webNeat/hosty/issues" + }, + "homepage": "https://github.com/webNeat/hosty", + "devDependencies": { + "@types/node": "^20.12.12", + "prettier": "^3.2.5", + "tsx": "^4.10.5", + "typescript": "^5.4.5", + "zx": "^8.1.4" + }, + "dependencies": { + "yaml": "^2.4.5" + } +} diff --git a/src/ansible/index.ts b/packages/hosty/src/ansible/index.ts similarity index 100% rename from src/ansible/index.ts rename to packages/hosty/src/ansible/index.ts diff --git a/src/ansible/tasks/builtin.ts b/packages/hosty/src/ansible/tasks/builtin.ts similarity index 100% rename from src/ansible/tasks/builtin.ts rename to packages/hosty/src/ansible/tasks/builtin.ts diff --git a/src/ansible/tasks/crypto.ts b/packages/hosty/src/ansible/tasks/crypto.ts similarity index 100% rename from src/ansible/tasks/crypto.ts rename to packages/hosty/src/ansible/tasks/crypto.ts diff --git a/src/ansible/tasks/general.ts b/packages/hosty/src/ansible/tasks/general.ts similarity index 100% rename from src/ansible/tasks/general.ts rename to packages/hosty/src/ansible/tasks/general.ts diff --git a/src/ansible/tasks/index.ts b/packages/hosty/src/ansible/tasks/index.ts similarity index 100% rename from src/ansible/tasks/index.ts rename to packages/hosty/src/ansible/tasks/index.ts diff --git a/src/ansible/types.ts b/packages/hosty/src/ansible/types.ts similarity index 100% rename from src/ansible/types.ts rename to packages/hosty/src/ansible/types.ts diff --git a/src/blocks/assert.ts b/packages/hosty/src/blocks/assert.ts similarity index 100% rename from src/blocks/assert.ts rename to packages/hosty/src/blocks/assert.ts diff --git a/src/blocks/block.ts b/packages/hosty/src/blocks/block.ts similarity index 100% rename from src/blocks/block.ts rename to packages/hosty/src/blocks/block.ts diff --git a/src/blocks/build_repo.ts b/packages/hosty/src/blocks/build_repo.ts similarity index 100% rename from src/blocks/build_repo.ts rename to packages/hosty/src/blocks/build_repo.ts diff --git a/src/blocks/create_directory.ts b/packages/hosty/src/blocks/create_directory.ts similarity index 100% rename from src/blocks/create_directory.ts rename to packages/hosty/src/blocks/create_directory.ts diff --git a/src/blocks/create_domain.ts b/packages/hosty/src/blocks/create_domain.ts similarity index 100% rename from src/blocks/create_domain.ts rename to packages/hosty/src/blocks/create_domain.ts diff --git a/src/blocks/create_service.ts b/packages/hosty/src/blocks/create_service.ts similarity index 100% rename from src/blocks/create_service.ts rename to packages/hosty/src/blocks/create_service.ts diff --git a/src/blocks/delete_directory.ts b/packages/hosty/src/blocks/delete_directory.ts similarity index 100% rename from src/blocks/delete_directory.ts rename to packages/hosty/src/blocks/delete_directory.ts diff --git a/src/blocks/delete_docker_image.ts b/packages/hosty/src/blocks/delete_docker_image.ts similarity index 100% rename from src/blocks/delete_docker_image.ts rename to packages/hosty/src/blocks/delete_docker_image.ts diff --git a/src/blocks/delete_domain.ts b/packages/hosty/src/blocks/delete_domain.ts similarity index 100% rename from src/blocks/delete_domain.ts rename to packages/hosty/src/blocks/delete_domain.ts diff --git a/src/blocks/delete_service.ts b/packages/hosty/src/blocks/delete_service.ts similarity index 100% rename from src/blocks/delete_service.ts rename to packages/hosty/src/blocks/delete_service.ts diff --git a/src/blocks/generate_ssh_key.ts b/packages/hosty/src/blocks/generate_ssh_key.ts similarity index 100% rename from src/blocks/generate_ssh_key.ts rename to packages/hosty/src/blocks/generate_ssh_key.ts diff --git a/src/blocks/index.ts b/packages/hosty/src/blocks/index.ts similarity index 100% rename from src/blocks/index.ts rename to packages/hosty/src/blocks/index.ts diff --git a/src/blocks/install_caddy.ts b/packages/hosty/src/blocks/install_caddy.ts similarity index 100% rename from src/blocks/install_caddy.ts rename to packages/hosty/src/blocks/install_caddy.ts diff --git a/src/blocks/install_docker.ts b/packages/hosty/src/blocks/install_docker.ts similarity index 100% rename from src/blocks/install_docker.ts rename to packages/hosty/src/blocks/install_docker.ts diff --git a/src/blocks/install_git.ts b/packages/hosty/src/blocks/install_git.ts similarity index 100% rename from src/blocks/install_git.ts rename to packages/hosty/src/blocks/install_git.ts diff --git a/src/blocks/install_nixpacks.ts b/packages/hosty/src/blocks/install_nixpacks.ts similarity index 100% rename from src/blocks/install_nixpacks.ts rename to packages/hosty/src/blocks/install_nixpacks.ts diff --git a/src/blocks/set_available_port.ts b/packages/hosty/src/blocks/set_available_port.ts similarity index 100% rename from src/blocks/set_available_port.ts rename to packages/hosty/src/blocks/set_available_port.ts diff --git a/src/compose.types.ts b/packages/hosty/src/compose.types.ts similarity index 100% rename from src/compose.types.ts rename to packages/hosty/src/compose.types.ts diff --git a/src/index.ts b/packages/hosty/src/index.ts similarity index 100% rename from src/index.ts rename to packages/hosty/src/index.ts diff --git a/src/instance.ts b/packages/hosty/src/instance.ts similarity index 100% rename from src/instance.ts rename to packages/hosty/src/instance.ts diff --git a/src/server.ts b/packages/hosty/src/server.ts similarity index 100% rename from src/server.ts rename to packages/hosty/src/server.ts diff --git a/src/services/app/git.ts b/packages/hosty/src/services/app/git.ts similarity index 100% rename from src/services/app/git.ts rename to packages/hosty/src/services/app/git.ts diff --git a/src/services/app/index.ts b/packages/hosty/src/services/app/index.ts similarity index 100% rename from src/services/app/index.ts rename to packages/hosty/src/services/app/index.ts diff --git a/src/services/command.ts b/packages/hosty/src/services/command.ts similarity index 100% rename from src/services/command.ts rename to packages/hosty/src/services/command.ts diff --git a/src/services/container.ts b/packages/hosty/src/services/container.ts similarity index 100% rename from src/services/container.ts rename to packages/hosty/src/services/container.ts diff --git a/src/services/database/index.ts b/packages/hosty/src/services/database/index.ts similarity index 100% rename from src/services/database/index.ts rename to packages/hosty/src/services/database/index.ts diff --git a/src/services/database/mysql.ts b/packages/hosty/src/services/database/mysql.ts similarity index 100% rename from src/services/database/mysql.ts rename to packages/hosty/src/services/database/mysql.ts diff --git a/src/services/database/postgres.ts b/packages/hosty/src/services/database/postgres.ts similarity index 100% rename from src/services/database/postgres.ts rename to packages/hosty/src/services/database/postgres.ts diff --git a/src/services/database/redis.ts b/packages/hosty/src/services/database/redis.ts similarity index 100% rename from src/services/database/redis.ts rename to packages/hosty/src/services/database/redis.ts diff --git a/src/services/index.ts b/packages/hosty/src/services/index.ts similarity index 100% rename from src/services/index.ts rename to packages/hosty/src/services/index.ts diff --git a/src/services/tasks.ts b/packages/hosty/src/services/tasks.ts similarity index 100% rename from src/services/tasks.ts rename to packages/hosty/src/services/tasks.ts diff --git a/src/types.ts b/packages/hosty/src/types.ts similarity index 100% rename from src/types.ts rename to packages/hosty/src/types.ts diff --git a/src/utils.ts b/packages/hosty/src/utils.ts similarity index 100% rename from src/utils.ts rename to packages/hosty/src/utils.ts diff --git a/tasks.todo b/packages/hosty/tasks.todo similarity index 100% rename from tasks.todo rename to packages/hosty/tasks.todo diff --git a/test.ts b/packages/hosty/test.ts similarity index 100% rename from test.ts rename to packages/hosty/test.ts diff --git a/tests/app-adonis-sqlite.test.ts b/packages/hosty/tests/app-adonis-sqlite.test.ts similarity index 100% rename from tests/app-adonis-sqlite.test.ts rename to packages/hosty/tests/app-adonis-sqlite.test.ts diff --git a/tests/app-laravel-mysql-custom-docker.test.ts b/packages/hosty/tests/app-laravel-mysql-custom-docker.test.ts similarity index 100% rename from tests/app-laravel-mysql-custom-docker.test.ts rename to packages/hosty/tests/app-laravel-mysql-custom-docker.test.ts diff --git a/tests/app-monorepo-rust-next.test.ts b/packages/hosty/tests/app-monorepo-rust-next.test.ts similarity index 100% rename from tests/app-monorepo-rust-next.test.ts rename to packages/hosty/tests/app-monorepo-rust-next.test.ts diff --git a/tests/app-node-postgres.test.ts b/packages/hosty/tests/app-node-postgres.test.ts similarity index 100% rename from tests/app-node-postgres.test.ts rename to packages/hosty/tests/app-node-postgres.test.ts diff --git a/tests/command-cron-host.test.ts b/packages/hosty/tests/command-cron-host.test.ts similarity index 100% rename from tests/command-cron-host.test.ts rename to packages/hosty/tests/command-cron-host.test.ts diff --git a/tests/command-cron-service.test.ts b/packages/hosty/tests/command-cron-service.test.ts similarity index 100% rename from tests/command-cron-service.test.ts rename to packages/hosty/tests/command-cron-service.test.ts diff --git a/tests/container.test.ts b/packages/hosty/tests/container.test.ts similarity index 100% rename from tests/container.test.ts rename to packages/hosty/tests/container.test.ts diff --git a/tests/files/bar.txt b/packages/hosty/tests/files/bar.txt similarity index 100% rename from tests/files/bar.txt rename to packages/hosty/tests/files/bar.txt diff --git a/tests/files/foo.txt b/packages/hosty/tests/files/foo.txt similarity index 100% rename from tests/files/foo.txt rename to packages/hosty/tests/files/foo.txt diff --git a/tests/setup.test.ts b/packages/hosty/tests/setup.test.ts similarity index 100% rename from tests/setup.test.ts rename to packages/hosty/tests/setup.test.ts diff --git a/tests/utils/Dockerfile b/packages/hosty/tests/utils/Dockerfile similarity index 100% rename from tests/utils/Dockerfile rename to packages/hosty/tests/utils/Dockerfile diff --git a/tests/utils/index.ts b/packages/hosty/tests/utils/index.ts similarity index 100% rename from tests/utils/index.ts rename to packages/hosty/tests/utils/index.ts diff --git a/tsconfig.build.json b/packages/hosty/tsconfig.build.json similarity index 100% rename from tsconfig.build.json rename to packages/hosty/tsconfig.build.json diff --git a/tsconfig.json b/packages/hosty/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/hosty/tsconfig.json diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..acec260 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,381 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + packages/hosty: + dependencies: + yaml: + specifier: ^2.4.5 + version: 2.5.1 + devDependencies: + '@types/node': + specifier: ^20.12.12 + version: 20.16.5 + prettier: + specifier: ^3.2.5 + version: 3.3.3 + tsx: + specifier: ^4.10.5 + version: 4.19.0 + typescript: + specifier: ^5.4.5 + version: 5.6.2 + zx: + specifier: ^8.1.4 + version: 8.1.5 + + packages/hosty-action: + dependencies: + hosty: + specifier: workspace:* + version: link:../hosty + +packages: + + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@types/fs-extra@11.0.4': + resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} + + '@types/jsonfile@6.1.4': + resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} + + '@types/node@20.16.5': + resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} + + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + get-tsconfig@4.8.0: + resolution: {integrity: sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==} + + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + tsx@4.19.0: + resolution: {integrity: sha512-bV30kM7bsLZKZIOCHeMNVMJ32/LuJzLVajkQI/qf92J2Qr08ueLQvW00PUZGiuLPP760UINwupgUj8qrSCPUKg==} + engines: {node: '>=18.0.0'} + hasBin: true + + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + engines: {node: '>= 14'} + hasBin: true + + zx@8.1.5: + resolution: {integrity: sha512-gvmiYPvDDEz2Gcc37x7pJkipTKcFIE18q9QlSI1p5qoPDtoSn3jmGuWD0eEb7HuxEH5aDD7N/RVgH8BqSxbKzA==} + engines: {node: '>= 12.17.0'} + hasBin: true + +snapshots: + + '@esbuild/aix-ppc64@0.23.1': + optional: true + + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm@0.23.1': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.23.1': + optional: true + + '@esbuild/linux-ppc64@0.23.1': + optional: true + + '@esbuild/linux-riscv64@0.23.1': + optional: true + + '@esbuild/linux-s390x@0.23.1': + optional: true + + '@esbuild/linux-x64@0.23.1': + optional: true + + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + + '@esbuild/openbsd-x64@0.23.1': + optional: true + + '@esbuild/sunos-x64@0.23.1': + optional: true + + '@esbuild/win32-arm64@0.23.1': + optional: true + + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-x64@0.23.1': + optional: true + + '@types/fs-extra@11.0.4': + dependencies: + '@types/jsonfile': 6.1.4 + '@types/node': 20.16.5 + optional: true + + '@types/jsonfile@6.1.4': + dependencies: + '@types/node': 20.16.5 + optional: true + + '@types/node@20.16.5': + dependencies: + undici-types: 6.19.8 + + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + fsevents@2.3.3: + optional: true + + get-tsconfig@4.8.0: + dependencies: + resolve-pkg-maps: 1.0.0 + + prettier@3.3.3: {} + + resolve-pkg-maps@1.0.0: {} + + tsx@4.19.0: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.8.0 + optionalDependencies: + fsevents: 2.3.3 + + typescript@5.6.2: {} + + undici-types@6.19.8: {} + + yaml@2.5.1: {} + + zx@8.1.5: + optionalDependencies: + '@types/fs-extra': 11.0.4 + '@types/node': 20.16.5 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..e535fd3 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + - packages/* + - examples/*