diff --git a/ex b/ex index 3ee08e1..d4f2670 100755 --- a/ex +++ b/ex @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash ENV_NODE="$(which node)" ENV_PNPM="$(which pnpm)" @@ -125,6 +125,8 @@ if [ ! -d "./node_modules" ]; then echoRun "$ENV_PNPM" i + echoRun ./node_modules/.bin/ts-patch i + if [ ! -f "./.env" ]; then echoRun cp example.env .env fi @@ -134,7 +136,14 @@ if [ ! -d "./node_modules" ]; then printf "\033[32m✓\033[39m Looks like you're all set up! Run this command again to access the Extollo CLI.\n" else start_spinner "Building your app..." - "$ENV_PNPM" run build > /dev/null - stop_spinner 0 + BUILD_OUTPUT="$($ENV_PNPM run build 2>&1)" + BUILD_EC=$? + stop_spinner $BUILD_EC + if [ $BUILD_EC -ne 0 ]; then + printf "\033[31m✘\033[39m Uh, oh! Looks like your application failed to build. (exit: $BUILD_EC)" + echo "$BUILD_OUTPUT" + exit $BUILD_EC + fi "$ENV_NODE" --experimental-repl-await ./lib/cli.js $@ fi + diff --git a/example.env b/example.env index 1b6e92a..ca95f65 100644 --- a/example.env +++ b/example.env @@ -1,4 +1,6 @@ DEBUG_MODE=true -EXTOLLO_LOGGING_LEVEL=6 -DATABASE_PASSWORD=extollo -DATABASE_HOST=db01.platform.local +EXTOLLO_LOGGING_LEVEL=5 +DATABASE_USERNAME=postgres +DATABASE_PASSWORD=postgres +DATABASE_HOST=localhost +DATABASE_NAME=mathy diff --git a/package.json b/package.json index f7ee3dc..f53ca7f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "lib": "lib" }, "dependencies": { - "@extollo/lib": "^0.9.0", + "@extollo/lib": "^0.9.32", "copyfiles": "^2.4.1", "rimraf": "^3.0.2", "ts-expose-internals": "^4.5.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d0be490..91e0c90 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,7 +2,7 @@ lockfileVersion: 5.3 specifiers: '@extollo/cc': ^0.6.0 - '@extollo/lib': ^0.9.0 + '@extollo/lib': ^0.9.32 copyfiles: ^2.4.1 rimraf: ^3.0.2 ts-expose-internals: ^4.5.4 @@ -12,7 +12,7 @@ specifiers: zod: ^3.11.6 dependencies: - '@extollo/lib': 0.9.0 + '@extollo/lib': 0.9.32 copyfiles: 2.4.1 rimraf: 3.0.2 ts-expose-internals: 4.5.4 @@ -110,8 +110,8 @@ packages: - supports-color dev: true - /@extollo/lib/0.9.0: - resolution: {integrity: sha512-Gu9qwjwjDWPfXrp1ThyjFIROWXD8jXqwz4c7JxjWoWbGnY0dLGAZHv6MOF1tqNGU9zTW399jpGS/7lyazApMpQ==} + /@extollo/lib/0.9.32: + resolution: {integrity: sha512-3DuRrLFmYY6w0rK5QKSlNWbGZnel6Lj2vjSGwwbj1IEJXGcZSA+TMXLghAwPkKyUsyX0WwdXVn6S51jmRHyWJw==} dependencies: '@atao60/fse-cli': 0.1.7 '@extollo/ui': 0.1.0_@types+node@14.18.12 diff --git a/setup-dev.sh b/setup-dev.sh new file mode 100755 index 0000000..58a224e --- /dev/null +++ b/setup-dev.sh @@ -0,0 +1,10 @@ +#!/bin/bash -xe + +docker run -p 6379:6379 --name redis -d redis +docker run -p 5432:5432 --name postgres --env POSTGRES_PASSWORD=postgres -d postgres +sleep 5 +docker exec -it postgres su - postgres -c "psql -c 'create database mathy;'" +cp example.env .env +pnpm i +./ex migrate + diff --git a/tsconfig.json b/tsconfig.json index 637b913..ab85d31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,10 @@ "outDir": "./lib", "strict": true, "experimentalDecorators": true, - "emitDecoratorMetadata": true + "emitDecoratorMetadata": true, + "lib": ["ESNext"] }, "include": ["src"], - "exclude": ["node_modules"] + "exclude": ["node_modules", "src/app/resources", "../extollo/lib"] } +