create-entity-server 0.4.3 → 0.5.0
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.
package/package.json
CHANGED
package/template/.env.example
CHANGED
|
@@ -18,7 +18,7 @@ JWT_SECRET=your-jwt-secret-here
|
|
|
18
18
|
# 비워두면 암호화 비활성화. 설정 시 충분한 길이의 랜덤 문자열 권장.
|
|
19
19
|
# BACKUP_ENCRYPT_KEY=your-backup-encryption-key-here
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# 개발 환경 DB 설정 (database.json의 ${ENV_VAR}와 매핑)
|
|
22
22
|
DB_HOST_DEVELOPMENT=127.0.0.1
|
|
23
23
|
DB_PORT_DEVELOPMENT=3306
|
|
24
24
|
DB_NAME_DEVELOPMENT=your-development-db-name
|
|
@@ -30,6 +30,35 @@ if [ -f .env ]; then
|
|
|
30
30
|
fi
|
|
31
31
|
LANGUAGE=${LANGUAGE:-ko}
|
|
32
32
|
|
|
33
|
+
warn_running_server_reload_needed() {
|
|
34
|
+
local run_pid_file="$PROJECT_ROOT/.run/entity-server.pid"
|
|
35
|
+
local server_pid=""
|
|
36
|
+
|
|
37
|
+
if [ -f "$run_pid_file" ]; then
|
|
38
|
+
server_pid=$(cat "$run_pid_file" 2>/dev/null || true)
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
if [ -n "$server_pid" ] && kill -0 "$server_pid" 2>/dev/null; then
|
|
42
|
+
echo ""
|
|
43
|
+
echo "=================================================="
|
|
44
|
+
if [ "$LANGUAGE" = "en" ]; then
|
|
45
|
+
echo "⚠️ Entity Server is still running with the previous in-memory API key map."
|
|
46
|
+
echo " CLI reset-all updates the DB only, so restart the server before using the new API key:"
|
|
47
|
+
echo ""
|
|
48
|
+
echo " ./scripts/run.sh stop"
|
|
49
|
+
echo " ./scripts/run.sh start"
|
|
50
|
+
else
|
|
51
|
+
echo "⚠️ Entity Server가 이전 메모리 API 키 맵으로 계속 실행 중입니다."
|
|
52
|
+
echo " CLI reset-all 은 DB만 갱신하므로, 새 API 키를 사용하기 전에 서버를 재시작해야 합니다:"
|
|
53
|
+
echo ""
|
|
54
|
+
echo " ./scripts/run.sh stop"
|
|
55
|
+
echo " ./scripts/run.sh start"
|
|
56
|
+
fi
|
|
57
|
+
echo "=================================================="
|
|
58
|
+
echo ""
|
|
59
|
+
fi
|
|
60
|
+
}
|
|
61
|
+
|
|
33
62
|
get_env_value() {
|
|
34
63
|
local key="$1"
|
|
35
64
|
local value="${!key}"
|
|
@@ -196,6 +225,8 @@ case "$1" in
|
|
|
196
225
|
NEW_HMAC=$(echo "$API_KEY_OUTPUT" | grep -E '^hmac_secret' | awk '{print $NF}' || true)
|
|
197
226
|
|
|
198
227
|
if [ -n "$NEW_API_KEY" ] && [ -n "$NEW_HMAC" ]; then
|
|
228
|
+
warn_running_server_reload_needed
|
|
229
|
+
|
|
199
230
|
# 게이트웨이 .env 자동 업데이트 (개발 환경: entity-app-server/ 폴더가 같은 레벨에 있을 때만)
|
|
200
231
|
GW_DIR="$(dirname "$PROJECT_ROOT")/entity-app-server"
|
|
201
232
|
GW_ENV="$GW_DIR/.env"
|