metis-desk/scripts/prepare-local-env.py
David e3f92fa534 feat: initialize pnpm workspace and add configuration files
- Added pnpm-workspace.yaml to define package structure.
- Created prepare-local-env.py script for local environment setup.
- Introduced tsconfig.json for TypeScript configuration.
- Added turbo.json for task management with Turbo.
2026-10-03 12:36:03 +02:00

19 lines
634 B
Python

from pathlib import Path
import secrets
root = Path(__file__).resolve().parent.parent
target = root / ".env"
if target.exists():
print("La configuración local ya existe; no se modifica.")
else:
template = (root / ".env.example").read_text()
for placeholder in [
"replace-with-a-random-value",
"replace-with-another-random-value",
"replace-with-at-least-32-random-characters",
]:
template = template.replace(placeholder, secrets.token_urlsafe(48))
target.write_text(template)
target.chmod(0o600)
print("Configuración local creada. No se han generado cuentas de usuario.")