@enonic-types/lib-context 8.0.0-B4 → 8.0.0-B5
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/context.d.ts +5 -5
- package/package.json +2 -2
package/context.d.ts
CHANGED
|
@@ -14,13 +14,13 @@ declare global {
|
|
|
14
14
|
import type { PrincipalKey, User } from '@enonic-types/core';
|
|
15
15
|
export type { PrincipalKey, UserKey, Principal, ScriptValue, User } from '@enonic-types/core';
|
|
16
16
|
export interface AuthInfo {
|
|
17
|
-
user?: User
|
|
18
|
-
principals?: PrincipalKey[]
|
|
17
|
+
user?: User;
|
|
18
|
+
principals?: PrincipalKey[];
|
|
19
19
|
}
|
|
20
20
|
export type ContextAttributes = Record<string, number | string | boolean | Record<string, unknown>>;
|
|
21
21
|
export interface Context {
|
|
22
|
-
branch
|
|
23
|
-
repository
|
|
22
|
+
branch?: string;
|
|
23
|
+
repository?: string;
|
|
24
24
|
authInfo?: AuthInfo;
|
|
25
25
|
attributes: ContextAttributes;
|
|
26
26
|
}
|
|
@@ -49,7 +49,7 @@ export interface ContextParams {
|
|
|
49
49
|
* @param {array} [context.principals] Additional principals to execute the callback with.
|
|
50
50
|
* @param {object} [context.attributes] Additional Context attributes.
|
|
51
51
|
* @param {function} callback Function to execute.
|
|
52
|
-
* @returns {
|
|
52
|
+
* @returns {*} Result of the function execution.
|
|
53
53
|
*/
|
|
54
54
|
export declare function run<T>(context: ContextParams, callback: () => T): T;
|
|
55
55
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic-types/lib-context",
|
|
3
|
-
"version": "8.0.0-
|
|
3
|
+
"version": "8.0.0-B5",
|
|
4
4
|
"description": "Type definitions for lib-context.",
|
|
5
5
|
"types": "context.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/enonic/xp/tree/master#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@enonic-types/core": "8.0.0-
|
|
30
|
+
"@enonic-types/core": "8.0.0-B5"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|