chore: doc updates [skip ci]

This commit is contained in:
4NK Dev 2025-10-02 15:31:54 +00:00
parent 6ffe3e49cc
commit 43aead6284
5 changed files with 123 additions and 16 deletions

View File

@ -42,10 +42,18 @@ certs/
**/*.docker*
# Cache et build
**/*.node_modules/
**/*.dist/
**/*build/
**/*target/
**/node_modules/
**/dist/
**/build/
**/target/
**/.next/
**/.turbo/
**/coverage/
**/.pytest_cache/
**/.cache/
**/.pnpm-store/
**/.venv/
**/vendor/
**/*.*.o
**/*.so
**/*.dylib
@ -68,6 +76,8 @@ certs/
# Backup des projets existants
**/*backup*
**/backups/
**/*backups*
**/*wallet*
@ -76,4 +86,10 @@ certs/
**/*node_modules*
**/*cursor*
**/*pid*
**/*next*
**/*next*
# Dossiers de logs communs
log/
logs/
**/log/
**/logs/

View File

@ -42,10 +42,18 @@ certs/
**/*.docker*
# Cache et build
**/*.node_modules/
**/*.dist/
**/*build/
**/*target/
**/node_modules/
**/dist/
**/build/
**/target/
**/.next/
**/.turbo/
**/coverage/
**/.pytest_cache/
**/.cache/
**/.pnpm-store/
**/.venv/
**/vendor/
**/*.*.o
**/*.so
**/*.dylib
@ -68,6 +76,8 @@ certs/
# Backup des projets existants
**/*backup*
**/backups/
**/*backups*
**/*wallet*
@ -76,4 +86,10 @@ certs/
**/*node_modules*
**/*cursor*
**/*pid*
**/*next*
**/*next*
# Dossiers de logs communs
log/
logs/
**/log/
**/logs/

26
.gitignore vendored
View File

@ -42,10 +42,18 @@ certs/
**/*.docker*
# Cache et build
**/*.node_modules/
**/*.dist/
**/*build/
**/*target/
**/node_modules/
**/dist/
**/build/
**/target/
**/.next/
**/.turbo/
**/coverage/
**/.pytest_cache/
**/.cache/
**/.pnpm-store/
**/.venv/
**/vendor/
**/*.*.o
**/*.so
**/*.dylib
@ -68,6 +76,8 @@ certs/
# Backup des projets existants
**/*backup*
**/backups/
**/*backups*
**/*wallet*
@ -76,4 +86,10 @@ certs/
**/*node_modules*
**/*cursor*
**/*pid*
**/*next*
**/*next*
# Dossiers de logs communs
log/
logs/
**/log/
**/logs/

46
scripts/sync-ignore-files.sh Executable file
View File

@ -0,0 +1,46 @@
#!/usr/bin/env sh
set -euo pipefail
# Synchronise .gitignore, .cursorignore, .dockerignore du root 4NK_env
# vers tous les 4NK_modules/ (sauf 4NK_vault) et les sous-projets sous projects/
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
SRC_GITIGNORE="$ROOT_DIR/.gitignore"
SRC_CURSORIGNORE="$ROOT_DIR/.cursorignore"
SRC_DOCKERIGNORE="$ROOT_DIR/.dockerignore"
copy_files() {
TARGET_DIR="$1"
[ -d "$TARGET_DIR" ] || return 0
echo "[sync] $TARGET_DIR"
[ -f "$SRC_GITIGNORE" ] && cp -f "$SRC_GITIGNORE" "$TARGET_DIR/.gitignore" || true
[ -f "$SRC_CURSORIGNORE" ] && cp -f "$SRC_CURSORIGNORE" "$TARGET_DIR/.cursorignore" || true
[ -f "$SRC_DOCKERIGNORE" ] && cp -f "$SRC_DOCKERIGNORE" "$TARGET_DIR/.dockerignore" || true
}
echo "[info] Root: $ROOT_DIR"
echo "[info] Sources: $SRC_GITIGNORE, $SRC_CURSORIGNORE, $SRC_DOCKERIGNORE"
# 1) 4NK_modules/* sauf 4NK_vault
for d in "$ROOT_DIR"/4NK_modules/*; do
[ -d "$d" ] || continue
base="$(basename "$d")"
if [ "$base" = "4NK_vault" ]; then
echo "[skip] $d (excluded)"
continue
fi
copy_files "$d"
done
# 2) Sous-projets sous projects/*/* (ex: projects/lecoffre/lecoffre_node, lecoffre-front, ...)
for p in "$ROOT_DIR"/projects/*; do
[ -d "$p" ] || continue
for sub in "$p"/*; do
[ -d "$sub" ] || continue
copy_files "$sub"
done
done
echo "[done] Ignore files synchronised."

View File

@ -69,6 +69,13 @@ else
else
echo "[WARN] Script de sync SDK introuvable: $SYNC_JS"
fi
# Si le SDK a synchronisé dans vault/confs2, propager vers CONFS_DIR
if [ -d "$VAULT_ROOT/confs2" ]; then
echo "[copy] Synchronisation fallback $VAULT_ROOT/confs2 -> $CONFS_DIR"
rm -rf "$CONFS_DIR"
mkdir -p "$CONFS_DIR"
cp -a "$VAULT_ROOT/confs2/." "$CONFS_DIR/"
fi
fi
# 4bis) Répliquer les fichiers synchronisés dans le dossier du projet lecoffre_node si requis
@ -76,6 +83,12 @@ LECOFFRE_NODE_CONFS_DIR="$ROOT_DIR/projects/lecoffre/lecoffre_node/confs"
echo "[copy] Réplication vers $LECOFFRE_NODE_CONFS_DIR"
rm -rf "$LECOFFRE_NODE_CONFS_DIR"
mkdir -p "$LECOFFRE_NODE_CONFS_DIR"
cp -a "$CONFS_DIR/." "$LECOFFRE_NODE_CONFS_DIR/"
# Si le dossier fallback existe, répliquer directement depuis celui-ci pour éviter les permissions sur $CONFS_DIR
if [ -d "$VAULT_ROOT/confs2" ]; then
cp -a "$VAULT_ROOT/confs2/." "$LECOFFRE_NODE_CONFS_DIR/"
else
cp -a "$CONFS_DIR/." "$LECOFFRE_NODE_CONFS_DIR/"
fi
echo "[OK] Sync Vault terminée vers $CONFS_DIR et répliquée vers $LECOFFRE_NODE_CONFS_DIR"