@kaddo/cli 3.69.2 → 3.69.4
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/dist/admin-server/index.js +3 -1
- package/dist/index.js +2 -1
- package/package.json +7 -3
|
@@ -186,6 +186,8 @@ async function createAdminServer(opts) {
|
|
|
186
186
|
const sessionId = sessionManager.createSession();
|
|
187
187
|
app.addHook("onRequest", async (request, reply) => {
|
|
188
188
|
if (!request.url.startsWith("/api/")) return;
|
|
189
|
+
if (request.url.startsWith("/api/v1/admin/session")) return;
|
|
190
|
+
if (request.url.startsWith("/api/v1/admin/health")) return;
|
|
189
191
|
const cookieSession = request.cookies["kaddo-session"];
|
|
190
192
|
if (!sessionManager.validateSession(cookieSession)) {
|
|
191
193
|
reply.code(401).send({ error: { code: "SESSION_INVALID", message: "Invalid or expired session." } });
|
|
@@ -243,7 +245,7 @@ async function createAdminServer(opts) {
|
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
// src/storage/sqlite-storage.ts
|
|
246
|
-
import { DatabaseSync } from "sqlite";
|
|
248
|
+
import { DatabaseSync } from "node:sqlite";
|
|
247
249
|
var SQLiteAdminStorage = class {
|
|
248
250
|
constructor(dbPath) {
|
|
249
251
|
this.dbPath = dbPath;
|
package/dist/index.js
CHANGED
|
@@ -18559,7 +18559,8 @@ async function runAdmin(opts = {}) {
|
|
|
18559
18559
|
const __dirname = path8.dirname(fileURLToPath2(import.meta.url));
|
|
18560
18560
|
const bundled = path8.resolve(__dirname, "admin-server", "index.js");
|
|
18561
18561
|
if (exists(bundled)) {
|
|
18562
|
-
|
|
18562
|
+
const { pathToFileURL } = await import("url");
|
|
18563
|
+
adminServer = await import(pathToFileURL(bundled).href);
|
|
18563
18564
|
} else {
|
|
18564
18565
|
adminServer = await import("@kaddo/admin-server");
|
|
18565
18566
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaddo/cli",
|
|
3
|
-
"version": "3.69.
|
|
3
|
+
"version": "3.69.4",
|
|
4
4
|
"description": "Knowledge Driven Development toolkit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -50,7 +50,11 @@
|
|
|
50
50
|
"minimatch": "^10.2.5",
|
|
51
51
|
"yaml": "^2.4.2",
|
|
52
52
|
"zod": "^3.23.8",
|
|
53
|
-
"open": "^10.1.0"
|
|
53
|
+
"open": "^10.1.0",
|
|
54
|
+
"fastify": "^5.3.3",
|
|
55
|
+
"@fastify/cookie": "^11.1.0",
|
|
56
|
+
"@fastify/cors": "^11.0.0",
|
|
57
|
+
"@fastify/static": "^8.1.0"
|
|
54
58
|
},
|
|
55
59
|
"devDependencies": {
|
|
56
60
|
"@types/node": "^20.14.0",
|
|
@@ -58,6 +62,6 @@
|
|
|
58
62
|
"typescript": "^5.4.5"
|
|
59
63
|
},
|
|
60
64
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
65
|
+
"node": ">=22.5.0"
|
|
62
66
|
}
|
|
63
67
|
}
|