Skip to content

Commit 6b2ca6c

Browse files
committed
Auto-commit: Sync changes [2026-03-05]
1 parent 538cf8a commit 6b2ca6c

137 files changed

Lines changed: 9585 additions & 1186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "@wp-praxis/dashboard",
3+
"version": "0.1.0",
4+
"tasks": {
5+
"build": "deno run --node-modules-dir=auto -A npm:rescript",
6+
"dev": "deno run --node-modules-dir=auto -A npm:rescript -w",
7+
"clean": "deno run --node-modules-dir=auto -A npm:rescript clean"
8+
},
9+
"imports": {
10+
"rescript": "npm:rescript@^12.0.0",
11+
"@rescript/core": "npm:@rescript/core@^1.6.1",
12+
"@rescript/runtime/": "npm:/@rescript/runtime@12.2.0/",
13+
"elysia": "npm:elysia@latest",
14+
"@elysiajs/cors": "npm:@elysiajs/cors@latest"
15+
}
16+
}

praxis/SymbolicEngine/dashboard/deno.lock

Lines changed: 1054 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
6.28 KB
Binary file not shown.
219 Bytes
Binary file not shown.
45.6 KB
Binary file not shown.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
/**
3+
* Praxis API Routes — Central Routing Manifest
4+
* Fully ported to ReScript v12
5+
*/
6+
7+
open Types
8+
open AuditController
9+
open BaselineController
10+
open ExecutionController
11+
open SymbolController
12+
open WorkflowController
13+
14+
module Elysia = {
15+
type t
16+
type context<'q, 'p, 'b> = {
17+
query: 'q,
18+
params: 'p,
19+
body: 'b,
20+
}
21+
@send external get: (t, string, context<'q, 'p, 'b> => promise<'res>) => t = "get"
22+
@send external post: (t, string, context<'q, 'p, 'b> => promise<'res>) => t = "post"
23+
@send external patch: (t, string, context<'q, 'p, 'b> => promise<'res>) => t = "patch"
24+
@send external delete: (t, string, context<'q, 'p, 'b> => promise<'res>) => t = "delete"
25+
@send external group: (t, string, t => t) => t = "group"
26+
}
27+
28+
let setupAuditRoutes = (app: Elysia.t, controller: AuditController.t) => {
29+
app->Elysia.group("/audits", app => {
30+
app
31+
->Elysia.get("/", async _ctx => {
32+
let workflowId = %raw(`ctx.query.workflow_id`)
33+
await AuditController.list(controller, workflowId)
34+
})
35+
->Elysia.get("/stats", async _ => {
36+
await AuditController.getStats(controller)
37+
})
38+
})
39+
}
40+
41+
let setupBaselineRoutes = (app: Elysia.t, controller: BaselineController.t) => {
42+
app->Elysia.group("/baselines", app => {
43+
app
44+
->Elysia.get("/", async _ctx => {
45+
let workflowId = %raw(`ctx.query.workflow_id`)
46+
await BaselineController.list(controller, workflowId)
47+
})
48+
->Elysia.get("/normative/:workflow_id", async _ctx => {
49+
let workflowId = %raw(`ctx.params.workflow_id`)
50+
await BaselineController.getNormative(controller, workflowId)
51+
})
52+
})
53+
}
54+
55+
let setupExecutionRoutes = (app: Elysia.t, controller: ExecutionController.t) => {
56+
app->Elysia.group("/executions", app => {
57+
app
58+
->Elysia.get("/", async _ctx => {
59+
let status = %raw(`ctx.query.status`)
60+
await ExecutionController.list(controller, status)
61+
})
62+
->Elysia.get("/stats", async _ => {
63+
await ExecutionController.getStats(controller)
64+
})
65+
})
66+
}
67+
68+
let setupSymbolRoutes = (app: Elysia.t, controller: SymbolController.t) => {
69+
app->Elysia.group("/symbols", app => {
70+
app
71+
->Elysia.get("/", async _ => {
72+
await SymbolController.list(controller, None)
73+
})
74+
->Elysia.get("/search", async _ctx => {
75+
let q = %raw(`ctx.query.q`)
76+
let type_ = %raw(`ctx.query.type`)
77+
await SymbolController.search(controller, q, type_)
78+
})
79+
})
80+
}
81+
82+
let setupWorkflowRoutes = (app: Elysia.t, controller: WorkflowController.t) => {
83+
app->Elysia.group("/workflows", app => {
84+
app
85+
->Elysia.get("/", async _ctx => {
86+
let status = %raw(`ctx.query.status`)
87+
await WorkflowController.list(controller, status)
88+
})
89+
->Elysia.post("/", async _ctx => {
90+
let name = %raw(`ctx.body.name`)
91+
let path = %raw(`ctx.body.manifest_path`)
92+
await WorkflowController.create(controller, name, path)
93+
})
94+
->Elysia.get("/:id/symbols", async _ctx => {
95+
let id = %raw(`ctx.params.id`)
96+
await WorkflowController.getSymbols(controller, id)
97+
})
98+
})
99+
}
9.42 KB
Binary file not shown.
6.38 KB
Binary file not shown.
164 Bytes
Binary file not shown.
34.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)