diff --git a/README.md b/README.md index a33c441..db06e6c 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,9 @@ Pour tester en conditions réelles les mises à jour et nouveautés de PIERRE : – http://localhost:3000/?config=pierre-habitat.fr – http://localhost:3000/?config=pierre-habitat.fr&context=en_agence +> [!TIP] +> Pour vous assurer que `config.ts` est correctement paramétré, notamment lors des montées de version qui peuvent en modifier la structure, lancer `bun test:config`. + ### Modifier la personnalité du chatbot Si vous avez à ce stade personnalisé visuellement votre chatbot (_cf_. supra), et bien qu'il affiche des icônes et les salutations de votre organisme, **il ne se présente PAS encore comme le chatbot de votre organisme** (essayez en lui demandant qui il est !). diff --git a/bun.lockb b/bun.lockb index 8feea95..7cbe29d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 8b3c0f9..a4a5bf4 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,9 @@ "name": "pierre", "module": "app.ts", "scripts": { - "-------- BUILD --------": "", - "build:kb": "dotenvx run -f .env.production -- bun run utils/knowledge/4-build-knowledge.ts", + "-------- GENERATE KNOWLEDGE --------": "", + "generate": "dotenvx run -f .env.production -- bun run ./utils/knowledge/_run.ts", + "-------- BUILD CODEBASE --------": "", "build:cb": "bun run config/build.ts", "transpile": "bun build --entrypoints assets/pierre-ia.org/scripts/*.ts --outdir assets/pierre-ia.org/dist/js --minify --target browser --watch", "format": "bunx prettier '!**/*.js' '!assets/pierre-ia.org/dist' --write . --plugin=prettier-plugin-tailwindcss --single-quote --no-semi --trailing-comma none --print-width 100", @@ -17,6 +18,7 @@ "-------- TEST --------": "", "test:e2e": "bun test e2e --timeout 60000", "test:unit": "bun test unit", + "test:config": "bun test check-config", "-------- START --------": "", "dev": "bash config/telemetry.sh init_db && dotenvx run -f .env.production -- bun --watch run app.ts", "start": "bash config/telemetry.sh init_db && bun run app.ts", @@ -29,36 +31,41 @@ "production:shell": "dotenvx run -f .env.production -- kamal app exec -i bash" }, "dependencies": { - "@ai-sdk/anthropic": "^0.0.56", - "@ai-sdk/cohere": "^0.0.28", - "@ai-sdk/google": "^0.0.55", - "@ai-sdk/mistral": "^0.0.46", - "@ai-sdk/openai": "^0.0.72", - "ai": "^3.4.33", + "@ai-sdk/anthropic": "^1.0.2", + "@ai-sdk/cohere": "^1.0.3", + "@ai-sdk/google": "^1.0.4", + "@ai-sdk/mistral": "^1.0.3", + "@ai-sdk/openai": "^1.0.5", + "ai": "^4.0.9", "date-fns": "^4.1.0", - "hono": "^4.6.9", + "date-fns-tz": "^3.2.0", + "hono": "^4.6.12", "lodash": "^4.17.21", - "marked": "^15.0.0", + "mammoth": "^1.8.0", + "marked": "^15.0.3", "remove-markdown": "^0.5.5", - "sms-length": "^0.2.0", - "sqlite-vec": "^0.1.3", - "sqlite-vec-darwin-arm64": "^0.1.3", - "sqlite-vec-linux-x64": "^0.1.3", + "sqlite-vec": "^0.1.6", + "sqlite-vec-darwin-arm64": "^0.1.6", + "sqlite-vec-linux-x64": "^0.1.6", + "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz", "zod": "^3.23.8" }, "devDependencies": { - "@dotenvx/dotenvx": "^1.22.0", + "arg": "^5.0.2", + "chalk": "^5.3.0", + "@dotenvx/dotenvx": "^1.26.0", "@biomejs/biome": "^1.9.4", - "@types/bun": "^1.1.13", + "@types/bun": "^1.1.14", + "ora": "^8.1.1", "@types/lodash": "^4.17.13", "@types/turndown": "^5.0.5", - "llamaindex": "^0.8.8", + "llamaindex": "^0.8.24", "markdown-toc": "^1.2.0", - "puppeteer": "^23.8.0", - "prettier-plugin-tailwindcss": "^0.6.8", - "@tailwindcss/cli": "^4.0.0-alpha.31", - "tailwindcss": "^4.0.0-alpha.31", + "puppeteer": "^23.9.0", + "prettier-plugin-tailwindcss": "^0.6.9", + "@tailwindcss/cli": "^4.0.0-beta.4", + "tailwindcss": "^4.0.0-beta.4", "turndown": "^7.2.0", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/tests/unit/check-configs.test.ts b/tests/unit/check-configs.test.ts index 7bbb43c..2766e1f 100644 --- a/tests/unit/check-configs.test.ts +++ b/tests/unit/check-configs.test.ts @@ -1,5 +1,6 @@ import { expect, test } from 'bun:test' import { readdir } from 'node:fs/promises' +import chalk from 'chalk' import { Config } from '../../utils/_schema' test('check if configs parse successfully', async () => {