@hienlh/ppm 0.8.58 → 0.8.59

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/web/assets/{chat-tab-cawT08fh.js → chat-tab-CM6zFolq.js} +1 -1
  3. package/dist/web/assets/{code-editor-u6bm6bdq.js → code-editor-DgTfBijB.js} +1 -1
  4. package/dist/web/assets/{database-viewer-BgPBW1bJ.js → database-viewer-DSlQhR7c.js} +1 -1
  5. package/dist/web/assets/{diff-viewer-Cho-kjse.js → diff-viewer-C5A-ZnrC.js} +1 -1
  6. package/dist/web/assets/{git-graph-CktRdFwt.js → git-graph-B5QR_Cf-.js} +1 -1
  7. package/dist/web/assets/{index-CpOYx0qg.js → index-frRaTxEm.js} +13 -7
  8. package/dist/web/assets/keybindings-store-Bjy78BoD.js +1 -0
  9. package/dist/web/assets/{markdown-renderer-3_CTktzg.js → markdown-renderer-DK-YZN0m.js} +1 -1
  10. package/dist/web/assets/{postgres-viewer-CH0JfEQ9.js → postgres-viewer-CV0kVl2C.js} +1 -1
  11. package/dist/web/assets/{settings-tab-BI0n39LJ.js → settings-tab-DofusrxH.js} +1 -1
  12. package/dist/web/assets/{sqlite-viewer-DJyT7YZg.js → sqlite-viewer-D5L6DIMB.js} +1 -1
  13. package/dist/web/assets/{terminal-tab-OqCohyF0.js → terminal-tab-lu-7WWOT.js} +1 -1
  14. package/dist/web/index.html +1 -1
  15. package/dist/web/sw.js +1 -1
  16. package/package.json +1 -1
  17. package/snapshot-state.md +1526 -0
  18. package/src/index.ts +0 -0
  19. package/src/server/index.ts +3 -15
  20. package/src/server/routes/proxy.ts +46 -53
  21. package/src/services/account-selector.service.ts +8 -6
  22. package/src/services/account.service.ts +1 -0
  23. package/src/services/claude-usage.service.ts +10 -4
  24. package/src/services/proxy.service.ts +4 -19
  25. package/src/web/components/settings/proxy-settings-section.tsx +40 -42
  26. package/test-tokens.mjs +212 -0
  27. package/.claude.bak/agent-memory/tester/MEMORY.md +0 -3
  28. package/.claude.bak/agent-memory/tester/project-ppm-test-conventions.md +0 -32
  29. package/dist/web/assets/keybindings-store-vOnSm10D.js +0 -1
@@ -1,32 +0,0 @@
1
- ---
2
- name: PPM test conventions and gotchas
3
- description: Key patterns, pitfalls, and setup details for writing tests in the PPM project
4
- type: project
5
- ---
6
-
7
- ## Test runner: `bun test` (Jest-compatible API from `bun:test`)
8
-
9
- ## Test structure
10
- - `tests/setup.ts` — shared helpers: `createTempDir`, `cleanupDir`, `createTempGitRepo`, `buildTestApp`
11
- - `tests/unit/services/` — unit tests for ConfigService, ProjectService, FileService, GitService
12
- - `tests/integration/api/` — integration tests using `app.request()` (no real server needed)
13
-
14
- ## Critical gotchas
15
-
16
- ### ppm.yaml in CWD
17
- The project root has a real `ppm.yaml` with `port: 5555`. `ConfigService.load(missingPath)` falls through to `LOCAL_CONFIG = "ppm.yaml"` in CWD when the given path doesn't exist. Always write an actual file before calling `load()` to avoid picking up this real config.
18
-
19
- ### Global configService in git routes
20
- `src/server/routes/git.ts` imports and uses the global `configService` singleton (not injected). Integration tests for git API must mutate `configService.config.projects` directly to register the test repo. Restore to `[]` in `afterEach`.
21
-
22
- ### ConfigService.load() fallback behavior
23
- Candidates checked in order: explicit path → PPM_CONFIG env → LOCAL_CONFIG (ppm.yaml) → HOME_CONFIG (~/.ppm/config.yaml). A missing explicit path does NOT stop the fallback chain.
24
-
25
- ### buildTestApp in setup.ts
26
- Overrides `configService.save = () => {}` (no-op) to prevent tests writing to disk. Injects config directly by mutating private fields via `as unknown as`.
27
-
28
- ### Real git repos for git tests
29
- `createTempGitRepo()` uses `Bun.spawn` with git env vars (author name/email) to create a real repo with an initial commit. No mocks for git operations.
30
-
31
- **Why:** Tests must use real implementations — no fakes/mocks that diverge from production behavior.
32
- **How to apply:** Always use `createTempGitRepo` for anything touching GitService or git API routes.
@@ -1 +0,0 @@
1
- import"./react-nm2Ru1Pt.js";import"./api-client-DpGMOZNf.js";import{T as e}from"./index-CpOYx0qg.js";export{e as useKeybindingsStore};