@monodog/backend 1.5.8 → 1.5.14
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/CHANGELOG.md +55 -0
- package/README.md +5 -4
- package/dist/config-loader.js +1 -1
- package/monodog-conf.json +17 -0
- package/package.json +5 -6
- package/src/config-loader.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @monodog/backend
|
|
2
2
|
|
|
3
|
+
## 1.5.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c7866d5`](https://github.com/manojkmfsi/monodog/commit/c7866d577d6e1327fa3133c1f631ac42838c6d51), [`98bad7b`](https://github.com/manojkmfsi/monodog/commit/98bad7b24241acf80f7fd685dd128c5417b9cb7c)]:
|
|
8
|
+
- @monodog/ci-status@1.1.10
|
|
9
|
+
- @monodog/utils@1.0.3
|
|
10
|
+
- @monodog/monorepo-scanner@1.0.12
|
|
11
|
+
|
|
12
|
+
## 1.5.13
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`4bcf2a3`](https://github.com/manojkmfsi/monodog/commit/4bcf2a34ee39020222e039cf8406c9a4d2f89e44)]:
|
|
17
|
+
- @monodog/ci-status@1.1.9
|
|
18
|
+
- @monodog/monorepo-scanner@1.0.11
|
|
19
|
+
|
|
20
|
+
## 1.5.12
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [[`2546521`](https://github.com/manojkmfsi/monodog/commit/2546521b07923a673b1d908d3524a46a0e608502)]:
|
|
25
|
+
- @monodog/ci-status@1.1.8
|
|
26
|
+
|
|
27
|
+
## 1.5.11
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`674e0ef`](https://github.com/manojkmfsi/monodog/commit/674e0ef9186c2e9c8019a01205865fcd9e6895cc)]:
|
|
32
|
+
- @monodog/ci-status@1.1.7
|
|
33
|
+
|
|
34
|
+
## 1.5.10
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- [#146](https://github.com/manojkmfsi/monodog/pull/146) [`2ad5445`](https://github.com/manojkmfsi/monodog/commit/2ad5445d3e1ee748b7de152475d5aa82296f9102) Thanks [@manojkmfsi](https://github.com/manojkmfsi)! - n,kkmkjkjlkjlkm,
|
|
39
|
+
|
|
40
|
+
## 1.5.9
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- [#144](https://github.com/manojkmfsi/monodog/pull/144) [`9371ba3`](https://github.com/manojkmfsi/monodog/commit/9371ba3ac32678c8b6cc9d33132fb99bec031492) Thanks [@manojkmfsi](https://github.com/manojkmfsi)! - nm n,m nm, m m
|
|
45
|
+
|
|
46
|
+
- [#144](https://github.com/manojkmfsi/monodog/pull/144) [`9371ba3`](https://github.com/manojkmfsi/monodog/commit/9371ba3ac32678c8b6cc9d33132fb99bec031492) Thanks [@manojkmfsi](https://github.com/manojkmfsi)! - vbbjbjnjnjn
|
|
47
|
+
|
|
48
|
+
- [#144](https://github.com/manojkmfsi/monodog/pull/144) [`9371ba3`](https://github.com/manojkmfsi/monodog/commit/9371ba3ac32678c8b6cc9d33132fb99bec031492) Thanks [@manojkmfsi](https://github.com/manojkmfsi)! - nmnmnmnmnmnnmm
|
|
49
|
+
|
|
50
|
+
- [#144](https://github.com/manojkmfsi/monodog/pull/144) [`9371ba3`](https://github.com/manojkmfsi/monodog/commit/9371ba3ac32678c8b6cc9d33132fb99bec031492) Thanks [@manojkmfsi](https://github.com/manojkmfsi)! - vgghgjk,mlkmlk
|
|
51
|
+
|
|
52
|
+
- [#144](https://github.com/manojkmfsi/monodog/pull/144) [`edfa6e2`](https://github.com/manojkmfsi/monodog/commit/edfa6e2ecdebfae5297f16941e7ae06f4f73ae01) Thanks [@manojkmfsi](https://github.com/manojkmfsi)! - dfdfdfdfdfdfd
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [[`338fbc1`](https://github.com/manojkmfsi/monodog/commit/338fbc1b1d3148c2c0f3fd170eb8f5c59ba26c10), [`f12be2f`](https://github.com/manojkmfsi/monodog/commit/f12be2f7957addf81a9e07e357910e743e9a32a5)]:
|
|
55
|
+
- @monodog/ci-status@1.1.6
|
|
56
|
+
- @monodog/monorepo-scanner@1.0.10
|
|
57
|
+
|
|
3
58
|
## 1.5.8
|
|
4
59
|
|
|
5
60
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This service is typically run locally or on a central server to power a dedicate
|
|
|
27
27
|
You must have the following installed to run the service:
|
|
28
28
|
|
|
29
29
|
- **Node.js:** Version 18+ recommended
|
|
30
|
-
- **Package Manager:** `pnpm`
|
|
30
|
+
- **Package Manager:** `pnpm`
|
|
31
31
|
- **Database:** A running instance of a database supported by Prisma (e.g., PostgreSQL, SQLite, MySQL)
|
|
32
32
|
|
|
33
33
|
---
|
|
@@ -63,10 +63,11 @@ pnpm monodog-cli --serve --root .
|
|
|
63
63
|
|
|
64
64
|
| Method | Route | Purpose | Persistence |
|
|
65
65
|
| ------- | --------------------------- | --------------------------------------------------------------------------------------- | ------------------- |
|
|
66
|
-
| **GET** | `/api/packages` | Retrieve all package metadata from the database. |
|
|
66
|
+
| **GET** | `/api/packages` | Retrieve all package metadata from the database. | Persistent |
|
|
67
67
|
| **GET** | `/api/packages/refresh` | Trigger a full file scan of the monorepo and update/sync the database. | Triggers write |
|
|
68
|
-
| **GET** | `/api/packages/:name` | Get detailed info,
|
|
68
|
+
| **GET** | `/api/packages/:name` | Get detailed info, commits`, and Health status for a package. | Persistent |
|
|
69
69
|
| **GET** | `/api/health/packages` | Fetch the latest health metrics (score, build status) for all packages. | Persistent |
|
|
70
70
|
| **GET** | `/api/health/refresh` | Recalculate all package health metrics (tests, lint, security) and update the database. | Triggers write |
|
|
71
|
-
| **GET** | `/api/commits/:packagePath` | Fetch Git commit history for a specific package directory. |
|
|
71
|
+
| **GET** | `/api/commits/:packagePath` | Fetch Git commit history for a specific package directory. | Persistent |
|
|
72
72
|
| **GET** | `/api/config/files` | Scan the monorepo for essential configuration files (e.g., `tsconfig`, `.eslintrc`). | Generated runtime |
|
|
73
|
+
|
package/dist/config-loader.js
CHANGED
|
@@ -50,7 +50,7 @@ function loadConfig() {
|
|
|
50
50
|
// 1. Determine the path to the config file
|
|
51
51
|
// We assume the backend package is running from the monorepo root (cwd is root)
|
|
52
52
|
// or that we can navigate up to the root from the current file's location.
|
|
53
|
-
const rootPath = path.resolve(process.cwd(), '
|
|
53
|
+
const rootPath = path.resolve(process.cwd(), '.'); // Adjust based on your workspace folder depth from root if needed
|
|
54
54
|
const configPath = path.resolve(rootPath, 'monodog-conf.json');
|
|
55
55
|
createConfigFileIfMissing(rootPath);
|
|
56
56
|
if (!fs.existsSync(configPath)) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"workspace": {
|
|
3
|
+
"root_dir": "./",
|
|
4
|
+
"install_path": "packages"
|
|
5
|
+
},
|
|
6
|
+
"database": {
|
|
7
|
+
"path": "file:./monodog.db"
|
|
8
|
+
},
|
|
9
|
+
"dashboard": {
|
|
10
|
+
"host": "0.0.0.0",
|
|
11
|
+
"port": "3010"
|
|
12
|
+
},
|
|
13
|
+
"server": {
|
|
14
|
+
"host": "0.0.0.0",
|
|
15
|
+
"port": 4000
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monodog/backend",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.14",
|
|
4
4
|
"description": "Backend API server for monodog monorepo dashboard",
|
|
5
|
+
"private": false,
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"bin": {
|
|
7
8
|
"monodog-cli": "dist/cli.js"
|
|
8
9
|
},
|
|
9
10
|
"dependencies": {
|
|
10
|
-
"@monodog/ci-status": "1.1.
|
|
11
|
-
"@monodog/monorepo-scanner": "1.0.
|
|
12
|
-
"@monodog/utils": "1.0.
|
|
11
|
+
"@monodog/ci-status": "1.1.10",
|
|
12
|
+
"@monodog/monorepo-scanner": "1.0.12",
|
|
13
|
+
"@monodog/utils": "1.0.3",
|
|
13
14
|
"@prisma/client": "^5.7.0",
|
|
14
15
|
"body-parser": "^1.20.2",
|
|
15
16
|
"cors": "^2.8.5",
|
|
@@ -20,7 +21,6 @@
|
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"@types/body-parser": "^1.19.5",
|
|
22
23
|
"@types/cors": "^2.8.17",
|
|
23
|
-
"@types/dotenv": "^8.2.0",
|
|
24
24
|
"@types/express": "^4.17.21",
|
|
25
25
|
"@types/node": "^20.10.0",
|
|
26
26
|
"cross-env": "^10.1.0",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"typescript": "^5.3.8"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"n": "tsx",
|
|
33
32
|
"dev": "tsx watch src/index.ts",
|
|
34
33
|
"start": "tsx index.ts",
|
|
35
34
|
"build": "rm -rf dist && tsc -p tsconfig.json",
|
package/src/config-loader.ts
CHANGED
|
@@ -40,7 +40,7 @@ export function loadConfig(): MonodogConfig {
|
|
|
40
40
|
// 1. Determine the path to the config file
|
|
41
41
|
// We assume the backend package is running from the monorepo root (cwd is root)
|
|
42
42
|
// or that we can navigate up to the root from the current file's location.
|
|
43
|
-
const rootPath = path.resolve(process.cwd(), '
|
|
43
|
+
const rootPath = path.resolve(process.cwd(), '.'); // Adjust based on your workspace folder depth from root if needed
|
|
44
44
|
const configPath = path.resolve(rootPath, 'monodog-conf.json');
|
|
45
45
|
createConfigFileIfMissing(rootPath);
|
|
46
46
|
|