@dnax/core 0.18.4 → 0.18.5
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/app/hono.ts +10 -2
- package/package.json +1 -1
- package/types/index.ts +5 -1
package/app/hono.ts
CHANGED
|
@@ -251,6 +251,8 @@ function HonoInstance(): typeof app {
|
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
253
|
|
|
254
|
+
//
|
|
255
|
+
|
|
254
256
|
// API REST
|
|
255
257
|
app.post(cleanPath(API_PATH), async (c) => {
|
|
256
258
|
try {
|
|
@@ -262,7 +264,7 @@ function HonoInstance(): typeof app {
|
|
|
262
264
|
var response;
|
|
263
265
|
var parseBody;
|
|
264
266
|
var body;
|
|
265
|
-
var { action, collection, cleanDeep, useCache, name } =
|
|
267
|
+
var { action, collection, cleanDeep, useCache, name, toolkit } =
|
|
266
268
|
c.req.query() as Q;
|
|
267
269
|
if (
|
|
268
270
|
c.req.raw?.headers
|
|
@@ -297,8 +299,14 @@ function HonoInstance(): typeof app {
|
|
|
297
299
|
throw new contextError(`Action ${action} not found`, 400);
|
|
298
300
|
}
|
|
299
301
|
|
|
300
|
-
|
|
302
|
+
if (action == "execToolkit") {
|
|
303
|
+
let tookit = toolkit;
|
|
304
|
+
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
301
308
|
if (action == "execService") {
|
|
309
|
+
// Exec service
|
|
302
310
|
if (!service) return fn.error("Service not found", 404);
|
|
303
311
|
let fx = service?.exec || service?.fx;
|
|
304
312
|
if (fx) {
|
package/package.json
CHANGED
package/types/index.ts
CHANGED
|
@@ -428,7 +428,10 @@ export type Config = {
|
|
|
428
428
|
io?: any;
|
|
429
429
|
};
|
|
430
430
|
|
|
431
|
+
export type Toolkit = "database" | "activity" | "tasks" | "server";
|
|
432
|
+
|
|
431
433
|
export type Q = {
|
|
434
|
+
toolkit: Toolkit;
|
|
432
435
|
name: string;
|
|
433
436
|
useCache: boolean;
|
|
434
437
|
cleanDeep: boolean;
|
|
@@ -449,7 +452,8 @@ export type Q = {
|
|
|
449
452
|
| "upload"
|
|
450
453
|
| "execService"
|
|
451
454
|
| "batch"
|
|
452
|
-
| "count"
|
|
455
|
+
| "count"
|
|
456
|
+
| "execToolkit";
|
|
453
457
|
};
|
|
454
458
|
|
|
455
459
|
export type routeOption = {
|