@getstrata/core 0.5.18 → 0.5.20

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.
@@ -0,0 +1,3 @@
1
+ declare function cacheTagsForModelWrite(tableName: string, action: string): string[];
2
+ declare function discoverModelTableNames(): string[];
3
+ export { cacheTagsForModelWrite, discoverModelTableNames };
@@ -1,4 +1,5 @@
1
1
  import type { AppModule } from "./contracts";
2
- declare const appModules: AppModule[];
2
+ declare let appModules: AppModule[];
3
+ declare function ensureModulesLoaded(): Promise<AppModule[]>;
3
4
  declare function discoverModules(): AppModule[];
4
- export { appModules, discoverModules };
5
+ export { appModules, discoverModules, ensureModulesLoaded };
@@ -1,4 +1,4 @@
1
- import type { ServiceContainer } from "../../bootstrap/contracts";
1
+ import type { ServiceContainerLike } from "../contracts/serviceContainer";
2
2
  import type { AuthUser } from "./authContext";
3
3
  interface AuthGuard {
4
4
  resolve(request: Request): AuthUser | null | Promise<AuthUser | null>;
@@ -16,7 +16,7 @@ declare class ApiTokenGuard implements AuthGuard {
16
16
  }
17
17
  declare class DatabaseTokenGuard implements AuthGuard {
18
18
  private readonly container;
19
- constructor(container: ServiceContainer);
19
+ constructor(container: ServiceContainerLike);
20
20
  resolve(request: Request): Promise<AuthUser | null>;
21
21
  }
22
22
  declare class CompositeGuard implements AuthGuard {
@@ -1,9 +1,9 @@
1
- import type { ServiceContainer } from "../../bootstrap/contracts";
1
+ import type { ServiceContainerLike } from "../contracts/serviceContainer";
2
2
  import type { AuthUser } from "./authContext";
3
3
  import type { AuthGuard } from "./guard";
4
4
  declare class SessionGuard implements AuthGuard {
5
5
  private readonly container;
6
- constructor(container: ServiceContainer);
6
+ constructor(container: ServiceContainerLike);
7
7
  resolve(request: Request): Promise<AuthUser | null>;
8
8
  }
9
9
  export { SessionGuard };
@@ -1,3 +1 @@
1
- declare function cacheTagsForModelWrite(tableName: string, action: string): string[];
2
- declare function discoverModelTableNames(): string[];
3
- export { cacheTagsForModelWrite, discoverModelTableNames };
1
+ export { cacheTagsForModelWrite, discoverModelTableNames, } from "../../bootstrap/cache/modelCacheTags.ts";
@@ -0,0 +1,5 @@
1
+ interface ServiceContainerLike {
2
+ has(key: string): boolean;
3
+ resolve<T>(key: string): T;
4
+ }
5
+ export type { ServiceContainerLike };
@@ -1,4 +1,4 @@
1
- import type { RegisteredRoute } from "../../bootstrap/routeRegistry";
1
+ import type { RegisteredRoute } from "../openapi/registeredRoute";
2
2
  interface OpenApiSpec {
3
3
  openapi: string;
4
4
  info: {
@@ -0,0 +1,6 @@
1
+ interface RegisteredRoute {
2
+ method: string;
3
+ path: string;
4
+ middleware: string[];
5
+ }
6
+ export type { RegisteredRoute };
@@ -1,4 +1,4 @@
1
- import type { ServiceContainer } from "../../bootstrap/contracts";
1
+ import type { ServiceContainerLike } from "../contracts/serviceContainer";
2
2
  interface WebLayoutAuthUser {
3
3
  id: number;
4
4
  email: string;
@@ -12,6 +12,6 @@ interface WebLayoutData {
12
12
  message: string;
13
13
  } | null;
14
14
  }
15
- declare function resolveWebLayoutData(container: ServiceContainer, request?: Request): Promise<Record<string, unknown>>;
15
+ declare function resolveWebLayoutData(container: ServiceContainerLike, request?: Request): Promise<Record<string, unknown>>;
16
16
  export type { WebLayoutAuthUser, WebLayoutData };
17
17
  export { resolveWebLayoutData };
@@ -2123,7 +2123,6 @@ var db = new Proxy(function database() {}, {
2123
2123
  return typeof value === "function" ? value.bind(connection) : value;
2124
2124
  }
2125
2125
  });
2126
- var connection_default = db;
2127
2126
 
2128
2127
  // ../../src/modules/user/apiTokenTable.ts
2129
2128
  var apiTokenTable = defineTable({