@holo-js/core 0.1.5 → 0.1.6
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.
|
@@ -2460,7 +2460,14 @@ async function reconfigureOptionalHoloSubsystems(projectRoot, loadedConfig, opti
|
|
|
2460
2460
|
emailVerificationTokens: authStores.emailVerificationTokens,
|
|
2461
2461
|
passwordResetTokens: authStores.passwordResetTokens,
|
|
2462
2462
|
...notificationsModule && (mailModule || notificationsRuntimeBindings?.mailer) ? { delivery: createAuthNotificationsDeliveryHook(notificationsModule, loadedConfig.app.url, projectRoot) } : mailModule ? { delivery: createAuthMailDeliveryHook(mailModule, loadedConfig.app.url) } : {},
|
|
2463
|
-
context: authContext
|
|
2463
|
+
context: authContext,
|
|
2464
|
+
...authorizationModule ? {
|
|
2465
|
+
authorization: {
|
|
2466
|
+
can(user, action, target) {
|
|
2467
|
+
return authorizationModule.forUser(user).can(action, target);
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
} : {}
|
|
2464
2471
|
});
|
|
2465
2472
|
const authRuntime = authModule.getAuthRuntime();
|
|
2466
2473
|
if (authorizationModule) {
|
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolveGeneratedProjectRegistryPath,
|
|
18
18
|
resolveRuntimeConnectionManagerOptions,
|
|
19
19
|
resolveStorageKeyPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OAA4RKVE.mjs";
|
|
21
21
|
|
|
22
22
|
// src/adapter.ts
|
|
23
23
|
import { readdir, stat } from "node:fs/promises";
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -407,6 +407,23 @@ interface HoloAuthRuntimeBinding {
|
|
|
407
407
|
readonly passwordConfirmation: string;
|
|
408
408
|
}): Promise<HoloAuthResult<unknown>>;
|
|
409
409
|
}
|
|
410
|
+
interface HoloAuthAuthorizationTargetConstructor<TInstance = object> {
|
|
411
|
+
readonly prototype: TInstance;
|
|
412
|
+
}
|
|
413
|
+
interface HoloAuthAuthorizationTargetModelDefinition {
|
|
414
|
+
readonly name: string;
|
|
415
|
+
readonly table?: {
|
|
416
|
+
readonly tableName?: string;
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
interface HoloAuthAuthorizationTargetModel<TInstance extends object = object> {
|
|
420
|
+
readonly definition: HoloAuthAuthorizationTargetModelDefinition;
|
|
421
|
+
query(): {
|
|
422
|
+
first(): Promise<TInstance | undefined>;
|
|
423
|
+
firstOrFail(): Promise<TInstance>;
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
type HoloAuthAuthorizationSubject = object | HoloAuthAuthorizationTargetConstructor | HoloAuthAuthorizationTargetModel;
|
|
410
427
|
interface HoloQueueRuntimeBinding {
|
|
411
428
|
readonly config: LoadedHoloConfig['queue'];
|
|
412
429
|
readonly drivers: ReadonlyMap<string, HoloQueueDriverBinding>;
|
|
@@ -655,6 +672,9 @@ type MailModule = {
|
|
|
655
672
|
type AuthorizationModule = {
|
|
656
673
|
isAuthorizationPolicyDefinition(value: unknown): boolean;
|
|
657
674
|
isAuthorizationAbilityDefinition(value: unknown): boolean;
|
|
675
|
+
forUser(actor: object | null): {
|
|
676
|
+
can(action: string, target: HoloAuthAuthorizationSubject): Promise<boolean>;
|
|
677
|
+
};
|
|
658
678
|
authorizationInternals: {
|
|
659
679
|
getAuthorizationRuntimeState(): {
|
|
660
680
|
policiesByName: Map<string, unknown>;
|
package/dist/runtime/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holo-js/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Holo-JS Framework - Portable runtime core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,26 +28,26 @@
|
|
|
28
28
|
"test": "vitest --run"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@holo-js/config": "^0.1.
|
|
32
|
-
"@holo-js/db": "^0.1.
|
|
31
|
+
"@holo-js/config": "^0.1.6",
|
|
32
|
+
"@holo-js/db": "^0.1.6",
|
|
33
33
|
"esbuild": "^0.27.4"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@holo-js/auth": "^0.1.
|
|
37
|
-
"@holo-js/auth-clerk": "^0.1.
|
|
38
|
-
"@holo-js/auth-social": "^0.1.
|
|
39
|
-
"@holo-js/auth-workos": "^0.1.
|
|
40
|
-
"@holo-js/authorization": "^0.1.
|
|
41
|
-
"@holo-js/broadcast": "^0.1.
|
|
42
|
-
"@holo-js/cache": "^0.1.
|
|
43
|
-
"@holo-js/events": "^0.1.
|
|
44
|
-
"@holo-js/mail": "^0.1.
|
|
45
|
-
"@holo-js/notifications": "^0.1.
|
|
46
|
-
"@holo-js/queue": "^0.1.
|
|
47
|
-
"@holo-js/queue-db": "^0.1.
|
|
48
|
-
"@holo-js/security": "^0.1.
|
|
49
|
-
"@holo-js/session": "^0.1.
|
|
50
|
-
"@holo-js/storage": "^0.1.
|
|
36
|
+
"@holo-js/auth": "^0.1.6",
|
|
37
|
+
"@holo-js/auth-clerk": "^0.1.6",
|
|
38
|
+
"@holo-js/auth-social": "^0.1.6",
|
|
39
|
+
"@holo-js/auth-workos": "^0.1.6",
|
|
40
|
+
"@holo-js/authorization": "^0.1.6",
|
|
41
|
+
"@holo-js/broadcast": "^0.1.6",
|
|
42
|
+
"@holo-js/cache": "^0.1.6",
|
|
43
|
+
"@holo-js/events": "^0.1.6",
|
|
44
|
+
"@holo-js/mail": "^0.1.6",
|
|
45
|
+
"@holo-js/notifications": "^0.1.6",
|
|
46
|
+
"@holo-js/queue": "^0.1.6",
|
|
47
|
+
"@holo-js/queue-db": "^0.1.6",
|
|
48
|
+
"@holo-js/security": "^0.1.6",
|
|
49
|
+
"@holo-js/session": "^0.1.6",
|
|
50
|
+
"@holo-js/storage": "^0.1.6"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"@holo-js/auth": {
|
|
@@ -97,15 +97,15 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@holo-js/auth": "^0.1.
|
|
101
|
-
"@holo-js/auth-social-google": "^0.1.
|
|
102
|
-
"@holo-js/authorization": "^0.1.
|
|
103
|
-
"@holo-js/events": "^0.1.
|
|
104
|
-
"@holo-js/mail": "^0.1.
|
|
105
|
-
"@holo-js/notifications": "^0.1.
|
|
106
|
-
"@holo-js/queue-db": "^0.1.
|
|
107
|
-
"@holo-js/session": "^0.1.
|
|
108
|
-
"@holo-js/storage": "^0.1.
|
|
100
|
+
"@holo-js/auth": "^0.1.6",
|
|
101
|
+
"@holo-js/auth-social-google": "^0.1.6",
|
|
102
|
+
"@holo-js/authorization": "^0.1.6",
|
|
103
|
+
"@holo-js/events": "^0.1.6",
|
|
104
|
+
"@holo-js/mail": "^0.1.6",
|
|
105
|
+
"@holo-js/notifications": "^0.1.6",
|
|
106
|
+
"@holo-js/queue-db": "^0.1.6",
|
|
107
|
+
"@holo-js/session": "^0.1.6",
|
|
108
|
+
"@holo-js/storage": "^0.1.6",
|
|
109
109
|
"@types/node": "^22.10.2",
|
|
110
110
|
"tsup": "^8.3.5",
|
|
111
111
|
"typescript": "^5.7.2",
|