v0.10.2 build rules update

This commit is contained in:
2026-03-20 12:37:25 -04:00
parent 419f7320b2
commit f2e32dae92
4 changed files with 16 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "jama-backend", "name": "jama-backend",
"version": "0.10.1", "version": "0.10.2",
"description": "TeamChat backend server", "description": "TeamChat backend server",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {

View File

@@ -14,7 +14,18 @@ const fs = require('fs');
const path = require('path'); const path = require('path');
const bcrypt = require('bcryptjs'); const bcrypt = require('bcryptjs');
const APP_TYPE = process.env.APP_TYPE || 'selfhost'; // APP_TYPE validation — host mode requires HOST_DOMAIN and HOST_ADMIN_KEY.
// If either is missing, fall back to selfhost and warn rather than silently
// exposing a broken or insecure host control plane.
let APP_TYPE = (process.env.APP_TYPE || 'selfhost').toLowerCase().trim();
if (APP_TYPE === 'host') {
if (!process.env.HOST_DOMAIN || !process.env.HOST_ADMIN_KEY) {
console.warn('[DB] WARNING: APP_TYPE=host requires HOST_DOMAIN and HOST_ADMIN_KEY to be set.');
console.warn('[DB] WARNING: Falling back to APP_TYPE=selfhost for safety.');
APP_TYPE = 'selfhost';
}
}
if (APP_TYPE !== 'host') APP_TYPE = 'selfhost'; // only two valid values
// ── Connection pool ─────────────────────────────────────────────────────────── // ── Connection pool ───────────────────────────────────────────────────────────

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ───────────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────────
# jama — Docker build & release script... # jama — Docker build & release script
# #
# Usage: # Usage:
# ./build.sh # builds jama:latest # ./build.sh # builds jama:latest
@@ -13,7 +13,7 @@
# ───────────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────────
set -euo pipefail set -euo pipefail
VERSION="${1:-0.10.1}" VERSION="${1:-0.10.2}"
ACTION="${2:-}" ACTION="${2:-}"
REGISTRY="${REGISTRY:-}" REGISTRY="${REGISTRY:-}"
IMAGE_NAME="jama" IMAGE_NAME="jama"

View File

@@ -1,6 +1,6 @@
{ {
"name": "jama-frontend", "name": "jama-frontend",
"version": "0.10.1", "version": "0.10.2",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",