@monodog/backend 1.1.9 → 1.1.11
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/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-lint.log +17 -0
- package/.turbo/turbo-test.log +6 -0
- package/LICENCE +21 -0
- package/dist/cli.js +0 -0
- package/dist/index.js +11 -11
- package/package.json +25 -29
- package/src/index.ts +1 -1
- package/packages/backend/index.js +0 -1
- package/packages/backend/package.json +0 -10
- package/packages/frontend/index.js +0 -1
- package/packages/frontend/package.json +0 -10
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
> @monodog/backend@1.0.0 lint /home/manoj/Documents/MonoDog/packages/backend
|
|
3
|
+
> eslint .
|
|
4
|
+
|
|
5
|
+
=============
|
|
6
|
+
|
|
7
|
+
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
|
|
8
|
+
|
|
9
|
+
You may find that it works just fine, or you may not.
|
|
10
|
+
|
|
11
|
+
SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0
|
|
12
|
+
|
|
13
|
+
YOUR TYPESCRIPT VERSION: 5.9.3
|
|
14
|
+
|
|
15
|
+
Please only submit bug reports when using the officially supported version.
|
|
16
|
+
|
|
17
|
+
=============
|
package/LICENCE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Lakin Mohapatra
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
10
10
|
const fs_1 = __importDefault(require("fs"));
|
|
11
11
|
// import { glob } from 'glob';
|
|
12
12
|
const body_parser_1 = require("body-parser");
|
|
13
|
-
const
|
|
13
|
+
const index_1 = require("@monodog/monorepo-scanner/src/index");
|
|
14
14
|
const ci_status_1 = require("@monodog/ci-status");
|
|
15
15
|
const helpers_1 = require("@monodog/utils/helpers");
|
|
16
16
|
const helpers_2 = require("./utils/helpers");
|
|
@@ -166,7 +166,7 @@ function startServer(rootPath) {
|
|
|
166
166
|
? JSON.parse(pkg.peerDependencies)
|
|
167
167
|
: [];
|
|
168
168
|
// Get additional package information
|
|
169
|
-
const reports = await (0,
|
|
169
|
+
const reports = await (0, index_1.generateReports)();
|
|
170
170
|
const packageReport = reports.find(r => r.package.name === name);
|
|
171
171
|
const result = {
|
|
172
172
|
...transformedPkg,
|
|
@@ -349,9 +349,9 @@ function startServer(rootPath) {
|
|
|
349
349
|
try {
|
|
350
350
|
const { force } = _req.body;
|
|
351
351
|
if (force) {
|
|
352
|
-
|
|
352
|
+
index_1.scanner.clearCache();
|
|
353
353
|
}
|
|
354
|
-
const result = await (0,
|
|
354
|
+
const result = await (0, index_1.quickScan)();
|
|
355
355
|
res.json({
|
|
356
356
|
success: true,
|
|
357
357
|
message: 'Scan completed successfully',
|
|
@@ -368,7 +368,7 @@ function startServer(rootPath) {
|
|
|
368
368
|
// Get scan results
|
|
369
369
|
app.get('/api/scan/results', async (_req, res) => {
|
|
370
370
|
try {
|
|
371
|
-
const result = await (0,
|
|
371
|
+
const result = await (0, index_1.quickScan)();
|
|
372
372
|
res.json(result);
|
|
373
373
|
}
|
|
374
374
|
catch (error) {
|
|
@@ -383,8 +383,8 @@ function startServer(rootPath) {
|
|
|
383
383
|
if (!['json', 'csv', 'html'].includes(format)) {
|
|
384
384
|
return res.status(400).json({ error: 'Invalid export format' });
|
|
385
385
|
}
|
|
386
|
-
const result = await (0,
|
|
387
|
-
const exportData =
|
|
386
|
+
const result = await (0, index_1.quickScan)();
|
|
387
|
+
const exportData = index_1.scanner.exportResults(result, format);
|
|
388
388
|
if (format === 'json') {
|
|
389
389
|
res.json(result);
|
|
390
390
|
}
|
|
@@ -534,10 +534,10 @@ function startServer(rootPath) {
|
|
|
534
534
|
const healthMetrics = await Promise.all(packages.map(async (pkg) => {
|
|
535
535
|
try {
|
|
536
536
|
// Await each health check function since they return promises
|
|
537
|
-
const buildStatus = await (0,
|
|
538
|
-
const testCoverage = await (0,
|
|
539
|
-
const lintStatus = await (0,
|
|
540
|
-
const securityAudit = await (0,
|
|
537
|
+
const buildStatus = await (0, index_1.funCheckBuildStatus)(pkg);
|
|
538
|
+
const testCoverage = await (0, index_1.funCheckTestCoverage)(pkg);
|
|
539
|
+
const lintStatus = await (0, index_1.funCheckLintStatus)(pkg);
|
|
540
|
+
const securityAudit = await (0, index_1.funCheckSecurityAudit)(pkg);
|
|
541
541
|
// Calculate overall health score
|
|
542
542
|
const overallScore = (0, helpers_1.calculatePackageHealth)(buildStatus, testCoverage, lintStatus, securityAudit);
|
|
543
543
|
const health = {
|
package/package.json
CHANGED
|
@@ -1,47 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monodog/backend",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "Backend API server for monodog monorepo dashboard",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"bin": {
|
|
9
|
-
"monodog-cli": "dist/cli.js"
|
|
10
|
-
"monodog-workspace": "dist/setup-workspace.js"
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev": "tsx watch src/index.ts",
|
|
15
|
-
"start": "tsx index.ts",
|
|
16
|
-
"prepublishOnly": "pnpm run build",
|
|
17
|
-
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
18
|
-
"prestart": "npm run build",
|
|
19
|
-
"cli": "pnpm run build && node dist/cli.js",
|
|
20
|
-
"test": "jest --coverage",
|
|
21
|
-
"clean": "rm -rf dist node_modules/.cache",
|
|
22
|
-
"test:coverage": "jest --coverage",
|
|
23
|
-
"lint": "eslint .",
|
|
24
|
-
"lint:fix": "eslint . --fix",
|
|
25
|
-
"postinstall": "pnpm run build && node dist/setup-workspace.js"
|
|
9
|
+
"monodog-cli": "dist/cli.js"
|
|
26
10
|
},
|
|
27
11
|
"dependencies": {
|
|
12
|
+
"@monodog/ci-status": "1.1.1",
|
|
13
|
+
"@monodog/monorepo-scanner": "1.0.1",
|
|
14
|
+
"@monodog/utils": "1.0.0",
|
|
28
15
|
"@prisma/client": "^5.7.0",
|
|
29
16
|
"body-parser": "^1.20.2",
|
|
30
17
|
"cors": "^2.8.5",
|
|
31
18
|
"express": "^4.18.2",
|
|
32
|
-
"
|
|
33
|
-
"@monodog/monorepo-scanner": "1.0.1",
|
|
34
|
-
"@monodog/utils": "1.0.0",
|
|
19
|
+
"init": "^0.1.2",
|
|
35
20
|
"prisma": "^5.22.0"
|
|
36
21
|
},
|
|
37
22
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^20.10.0",
|
|
39
|
-
"tsx": "^4.6.0",
|
|
40
|
-
"@types/express": "^4.17.21",
|
|
41
|
-
"@types/cors": "^2.8.17",
|
|
42
23
|
"@types/body-parser": "^1.19.5",
|
|
24
|
+
"@types/cors": "^2.8.17",
|
|
43
25
|
"@types/dotenv": "^8.2.0",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
26
|
+
"@types/express": "^4.17.21",
|
|
27
|
+
"@types/node": "^20.10.0",
|
|
28
|
+
"tsx": "^4.6.0",
|
|
29
|
+
"typescript": "^5.9.3"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"dev": "tsx watch src/index.ts",
|
|
33
|
+
"start": "tsx index.ts",
|
|
34
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
35
|
+
"prestart": "npm run build",
|
|
36
|
+
"cli": "pnpm run build && node dist/cli.js",
|
|
37
|
+
"test": "jest --coverage",
|
|
38
|
+
"clean": "rm -rf dist node_modules/.cache",
|
|
39
|
+
"test:coverage": "jest --coverage",
|
|
40
|
+
"lint": "eslint .",
|
|
41
|
+
"lint:fix": "eslint . --fix"
|
|
46
42
|
}
|
|
47
|
-
}
|
|
43
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
funCheckTestCoverage,
|
|
13
13
|
funCheckLintStatus,
|
|
14
14
|
funCheckSecurityAudit,
|
|
15
|
-
} from '@monodog/monorepo-scanner';
|
|
15
|
+
} from '@monodog/monorepo-scanner/src/index';
|
|
16
16
|
import { ciStatusManager, getMonorepoCIStatus } from '@monodog/ci-status';
|
|
17
17
|
import {
|
|
18
18
|
scanMonorepo,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log('Hello from the packages/backend workspace!');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log('Hello from the packages/frontend workspace!');
|