@manojkmfsi/monodog 1.1.43 → 1.1.44
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 +6 -0
- package/README.md +16 -2
- package/dist/config/swagger-config.js +9 -1050
- package/dist/config/swagger-paths-auth.js +236 -0
- package/dist/config/swagger-paths-packages.js +165 -0
- package/dist/config/swagger-paths-pipelines.js +78 -0
- package/dist/config/swagger-paths-publish.js +261 -0
- package/dist/config/swagger-paths-workflows.js +226 -0
- package/dist/config/swagger-paths.js +72 -0
- package/dist/config/swagger-schemas.js +630 -0
- package/dist/middleware/server-startup.js +4 -2
- package/dist/routes/pipeline-routes.js +22 -70
- package/dist/routes/workflow-routes.js +51 -0
- package/package.json +1 -1
|
@@ -1,76 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
6
|
/**
|
|
3
7
|
* GitHub Actions and Release Pipeline Routes
|
|
4
8
|
*/
|
|
5
|
-
|
|
6
|
-
exports.setupPipelineRoutes = setupPipelineRoutes;
|
|
9
|
+
const express_1 = __importDefault(require("express"));
|
|
7
10
|
const auth_middleware_1 = require("../middleware/auth-middleware");
|
|
8
11
|
const pipeline_controller_1 = require("../controllers/pipeline-controller");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* GET /api/workflows/:owner/:repo
|
|
27
|
-
* Get workflow runs for a repository
|
|
28
|
-
*/
|
|
29
|
-
router.get('/workflows/:owner/:repo', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getWorkflowRuns);
|
|
30
|
-
/**
|
|
31
|
-
* GET /api/workflows/:owner/:repo/runs/:runId
|
|
32
|
-
* Get specific workflow run with jobs
|
|
33
|
-
*/
|
|
34
|
-
router.get('/workflows/:owner/:repo/runs/:runId', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getWorkflowRunWithJobs);
|
|
35
|
-
/**
|
|
36
|
-
* GET /api/workflows/:owner/:repo/jobs/:jobId/logs
|
|
37
|
-
* Get logs for a job
|
|
38
|
-
*/
|
|
39
|
-
router.get('/workflows/:owner/:repo/jobs/:jobId/logs', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getJobLogs);
|
|
40
|
-
/**
|
|
41
|
-
* POST /api/workflows/:owner/:repo/trigger
|
|
42
|
-
* Trigger a workflow
|
|
43
|
-
*/
|
|
44
|
-
router.post('/workflows/:owner/:repo/trigger', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.triggerWorkflow);
|
|
45
|
-
/**
|
|
46
|
-
* POST /api/workflows/:owner/:repo/runs/:runId/cancel
|
|
47
|
-
* Cancel a workflow run
|
|
48
|
-
*/
|
|
49
|
-
router.post('/workflows/:owner/:repo/runs/:runId/cancel', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.cancelWorkflowRun);
|
|
50
|
-
/**
|
|
51
|
-
* POST /api/workflows/:owner/:repo/runs/:runId/rerun
|
|
52
|
-
* Re-run a workflow
|
|
53
|
-
*/
|
|
54
|
-
router.post('/workflows/:owner/:repo/runs/:runId/rerun', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.rerunWorkflow);
|
|
55
|
-
/**
|
|
56
|
-
* GET /api/pipelines/:pipelineId/audit-logs
|
|
57
|
-
* Get audit logs for a pipeline
|
|
58
|
-
*/
|
|
59
|
-
router.get('/pipelines/:pipelineId/audit-logs', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getPipelineAuditLogs);
|
|
60
|
-
/**
|
|
61
|
-
* GET /api/rate-limit
|
|
62
|
-
* Get GitHub API rate limit information
|
|
63
|
-
*/
|
|
64
|
-
// router.get('/rate-limit', authenticationMiddleware, async (req: Request, res: Response) => {
|
|
65
|
-
// try {
|
|
66
|
-
// if (!req.user || !req.accessToken) {
|
|
67
|
-
// return res.status(401).json({ error: 'Unauthorized' });
|
|
68
|
-
// }
|
|
69
|
-
// const rateLimit = await githubActionsService.getRateLimit(req.accessToken);
|
|
70
|
-
// res.json(rateLimit);
|
|
71
|
-
// } catch (error) {
|
|
72
|
-
// AppLogger.error(`Error getting rate limit: ${error}`);
|
|
73
|
-
// res.status(500).json({ error: 'Failed to get rate limit' });
|
|
74
|
-
// }
|
|
75
|
-
// });
|
|
76
|
-
}
|
|
12
|
+
const pipelineRouter = express_1.default.Router();
|
|
13
|
+
/**
|
|
14
|
+
* GET /api/pipelines
|
|
15
|
+
* Get recent pipelines for the dashboard
|
|
16
|
+
*/
|
|
17
|
+
pipelineRouter.get('/', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getRecentPipelines);
|
|
18
|
+
/**
|
|
19
|
+
* PUT /api/pipelines/:pipelineId/status
|
|
20
|
+
* Update pipeline status based on latest workflow run
|
|
21
|
+
*/
|
|
22
|
+
pipelineRouter.put('/:pipelineId/status', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.updatePipelineStatus);
|
|
23
|
+
/**
|
|
24
|
+
* GET /api/pipelines/:pipelineId/audit-logs
|
|
25
|
+
* Get audit logs for a pipeline
|
|
26
|
+
*/
|
|
27
|
+
pipelineRouter.get('/:pipelineId/audit-logs', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getPipelineAuditLogs);
|
|
28
|
+
exports.default = pipelineRouter;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/**
|
|
7
|
+
* Workflow Routes
|
|
8
|
+
*/
|
|
9
|
+
const express_1 = __importDefault(require("express"));
|
|
10
|
+
const auth_middleware_1 = require("../middleware/auth-middleware");
|
|
11
|
+
const pipeline_controller_1 = require("../controllers/pipeline-controller");
|
|
12
|
+
const workflowRouter = express_1.default.Router();
|
|
13
|
+
/**
|
|
14
|
+
* GET /api/workflows/:owner/:repo/available
|
|
15
|
+
* List available workflows in a repository
|
|
16
|
+
*/
|
|
17
|
+
workflowRouter.get('/:owner/:repo/available', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.listAvailableWorkflows);
|
|
18
|
+
/**
|
|
19
|
+
* GET /api/workflows/:owner/:repo
|
|
20
|
+
* Get workflow runs for a repository
|
|
21
|
+
*/
|
|
22
|
+
workflowRouter.get('/:owner/:repo', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getWorkflowRuns);
|
|
23
|
+
/**
|
|
24
|
+
* GET /api/workflows/:owner/:repo/runs/:runId
|
|
25
|
+
* Get specific workflow run with jobs
|
|
26
|
+
*/
|
|
27
|
+
workflowRouter.get('/:owner/:repo/runs/:runId', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getWorkflowRunWithJobs);
|
|
28
|
+
/**
|
|
29
|
+
* GET /api/workflows/:owner/:repo/jobs/:jobId/logs
|
|
30
|
+
* Get logs for a job
|
|
31
|
+
*/
|
|
32
|
+
workflowRouter.get('/:owner/:repo/jobs/:jobId/logs', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.getJobLogs);
|
|
33
|
+
/**
|
|
34
|
+
* POST /api/workflows/:owner/:repo/trigger
|
|
35
|
+
* Trigger a workflow
|
|
36
|
+
* Requires: maintain permission
|
|
37
|
+
*/
|
|
38
|
+
workflowRouter.post('/:owner/:repo/trigger', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.triggerWorkflow);
|
|
39
|
+
/**
|
|
40
|
+
* POST /api/workflows/:owner/:repo/runs/:runId/cancel
|
|
41
|
+
* Cancel a workflow run
|
|
42
|
+
* Requires: maintain permission
|
|
43
|
+
*/
|
|
44
|
+
workflowRouter.post('/:owner/:repo/runs/:runId/cancel', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.cancelWorkflowRun);
|
|
45
|
+
/**
|
|
46
|
+
* POST /api/workflows/:owner/:repo/runs/:runId/rerun
|
|
47
|
+
* Re-run a workflow
|
|
48
|
+
* Requires: maintain permission
|
|
49
|
+
*/
|
|
50
|
+
workflowRouter.post('/:owner/:repo/runs/:runId/rerun', auth_middleware_1.authenticationMiddleware, pipeline_controller_1.rerunWorkflow);
|
|
51
|
+
exports.default = workflowRouter;
|