Skip to content

Commit 24d8b82

Browse files
Copilothotlong
andcommitted
Export ObjectQL storage classes and fix imports
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 488b05c commit 24d8b82

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/permissions/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export {
8888
// Export storage
8989
export {
9090
InMemoryPermissionStorage,
91+
ObjectQLPermissionStorage,
9192
} from './storage.js';
9293
export type {
9394
PermissionStorage,

packages/permissions/src/objectql-storage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
*/
66

77
import type { PluginContext } from '@objectstack/runtime';
8-
import type { PermissionStorage, PermissionSet } from './types.js';
8+
import type { PermissionSet } from './types.js';
9+
import type { PermissionStorage } from './storage.js';
910

1011
export class ObjectQLPermissionStorage implements PermissionStorage {
1112
private context: PluginContext;

packages/permissions/src/storage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,6 @@ export class InMemoryPermissionStorage implements PermissionStorage {
8888
this.objectIndex.clear();
8989
}
9090
}
91+
92+
// Re-export ObjectQL storage
93+
export { ObjectQLPermissionStorage } from './objectql-storage.js';

packages/permissions/src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ export interface PermissionPluginConfig {
382382
permissionsDir?: string;
383383
/** Cache permission sets */
384384
cachePermissions?: boolean;
385+
/** Custom storage implementation */
386+
storage?: any; // PermissionStorage
385387
}
386388

387389
// ─── Kernel Compliance Types (from @objectstack/spec) ──────────────────────────

0 commit comments

Comments
 (0)