unoverse 0.1.38 → 0.1.39
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/operator/lib/db-setup.sh +6 -0
- package/operator/lib/init.sh +19 -0
- package/package.json +1 -1
package/operator/lib/db-setup.sh
CHANGED
|
@@ -34,11 +34,16 @@ cmd_db_setup() {
|
|
|
34
34
|
echo ""
|
|
35
35
|
echo " Running migrations (local dev)..."
|
|
36
36
|
|
|
37
|
+
# --no-check-order: databases from before the 2026-07-28 squash have
|
|
38
|
+
# 002-018 recorded in pgmigrations with no matching files (they live inside
|
|
39
|
+
# 001_baseline now), which trips the order check on ANY new migration.
|
|
40
|
+
# Ordering still holds by filename; applied names are never re-run.
|
|
37
41
|
NODE_TLS_REJECT_UNAUTHORIZED=0 DATABASE_URL="$db_url" \
|
|
38
42
|
npx node-pg-migrate up \
|
|
39
43
|
--migrations-dir "$ROOT/apps/unoverse/engine/migrations" \
|
|
40
44
|
--migration-file-language sql \
|
|
41
45
|
--no-lock \
|
|
46
|
+
--no-check-order \
|
|
42
47
|
2>&1 | sed 's/^/ /' || {
|
|
43
48
|
fail "Migrations failed"
|
|
44
49
|
exit 1
|
|
@@ -73,6 +78,7 @@ cmd_db_setup() {
|
|
|
73
78
|
--migrations-dir /app/apps/unoverse/engine/migrations \
|
|
74
79
|
--migration-file-language sql \
|
|
75
80
|
--no-lock \
|
|
81
|
+
--no-check-order \
|
|
76
82
|
2>&1 | sed 's/^/ /' || {
|
|
77
83
|
fail "Migrations failed"
|
|
78
84
|
exit 1
|
package/operator/lib/init.sh
CHANGED
|
@@ -350,6 +350,18 @@ cmd_init() {
|
|
|
350
350
|
read -p " SEARCHAPI_KEY (web-search nodes, blank to skip): " SEARCHAPI_KEY
|
|
351
351
|
fi
|
|
352
352
|
|
|
353
|
+
# Silent facts, not questions. The encryption key is GENERATED (a human never types
|
|
354
|
+
# one), kept on re-runs (a new key orphans every stored credential), and the pool
|
|
355
|
+
# sizes are present-but-empty purely so compose stops warning about them.
|
|
356
|
+
CREDENTIAL_ENCRYPTION_KEY=$(_env_cur CREDENTIAL_ENCRYPTION_KEY)
|
|
357
|
+
if [ -z "$CREDENTIAL_ENCRYPTION_KEY" ]; then
|
|
358
|
+
CREDENTIAL_ENCRYPTION_KEY=$(openssl rand -hex 32 2>/dev/null || head -c32 /dev/urandom | xxd -p -c64)
|
|
359
|
+
ok "Credential encryption key generated"
|
|
360
|
+
fi
|
|
361
|
+
DB_POOL_ENGINE=$(_env_cur DB_POOL_ENGINE)
|
|
362
|
+
DB_POOL_ENGINE_LEGACY=$(_env_cur DB_POOL_ENGINE_LEGACY)
|
|
363
|
+
DB_POOL_MEMORY=$(_env_cur DB_POOL_MEMORY)
|
|
364
|
+
|
|
353
365
|
# Write .env
|
|
354
366
|
cat > "$ROOT/.env" << ENVEOF
|
|
355
367
|
# Generated by unoverse init
|
|
@@ -367,6 +379,13 @@ AUTH_CLIENT_ID=${AUTH_CLIENT_ID}
|
|
|
367
379
|
AUTH_AUDIENCE=${AUTH_AUDIENCE}
|
|
368
380
|
API_URL=${API_URL}
|
|
369
381
|
OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
382
|
+
# Generated at setup: encrypts credentials stored by nodes. Losing it orphans them —
|
|
383
|
+
# back it up with the database. Kept on re-runs.
|
|
384
|
+
CREDENTIAL_ENCRYPTION_KEY=${CREDENTIAL_ENCRYPTION_KEY}
|
|
385
|
+
# Present-but-empty so compose does not warn; the platform applies its own defaults.
|
|
386
|
+
DB_POOL_ENGINE=${DB_POOL_ENGINE}
|
|
387
|
+
DB_POOL_ENGINE_LEGACY=${DB_POOL_ENGINE_LEGACY}
|
|
388
|
+
DB_POOL_MEMORY=${DB_POOL_MEMORY}
|
|
370
389
|
HYPERBROWSER_API_KEY=${HYPERBROWSER_API_KEY}
|
|
371
390
|
SEARCHAPI_KEY=${SEARCHAPI_KEY}
|
|
372
391
|
DOMAIN=
|
package/package.json
CHANGED