refactor/imports (#217)

* refactored core and core/utils imports

* refactored core and core/utils imports

* refactored media imports

* refactored auth imports

* refactored data imports

* updated package json exports, fixed mm config

* fix tests
This commit is contained in:
dswbx
2025-07-22 20:17:11 +02:00
committed by GitHub
parent 1ec3ba0e92
commit ca55503e66
214 changed files with 680 additions and 791 deletions
+7 -5
View File
@@ -1,9 +1,11 @@
import { type AppAuth, AuthPermissions, type SafeUser, type Strategy } from "auth";
import { transformObject } from "core/utils";
import { DataPermissions } from "data";
import type { SafeUser } from "bknd";
import type { AuthStrategy } from "auth/authenticate/strategies/Strategy";
import type { AppAuth } from "auth/AppAuth";
import * as AuthPermissions from "auth/auth-permissions";
import * as DataPermissions from "data/permissions";
import type { Hono } from "hono";
import { Controller, type ServerEnv } from "modules/Controller";
import { describeRoute, jsc, s, parse, InvalidSchemaError } from "bknd/core";
import { describeRoute, jsc, s, parse, InvalidSchemaError, transformObject } from "bknd/utils";
export type AuthActionResponse = {
success: boolean;
@@ -30,7 +32,7 @@ export class AuthController extends Controller {
return this.em.repo(entity_name as "users");
}
private registerStrategyActions(strategy: Strategy, mainHono: Hono<ServerEnv>) {
private registerStrategyActions(strategy: AuthStrategy, mainHono: Hono<ServerEnv>) {
if (!this.auth.isStrategyEnabled(strategy)) {
return;
}