@zenofolio/hyper-decor 1.0.42 → 1.0.43
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/.mocharc.js +2 -2
- package/README.md +1 -1
- package/dist/decorators/HyperApp.js +1 -0
- package/dist/decorators/types.d.ts +3 -1
- package/dist/decorators/types.js +1 -0
- package/dist/extension.js +5 -2
- package/hyper-express-decorators.d.ts +1 -0
- package/package.json +1 -1
package/.mocharc.js
CHANGED
package/README.md
CHANGED
|
@@ -21,7 +21,9 @@ export interface HyperAppMetadata {
|
|
|
21
21
|
imports?: Constructor[];
|
|
22
22
|
options?: ServerConstructorOptions;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export interface HyperAppDecorator {
|
|
25
|
+
(options?: HyperAppMetadata): (target: Constructor) => Constructor;
|
|
26
|
+
}
|
|
25
27
|
export type HyperModuleMetadata = {
|
|
26
28
|
path: string;
|
|
27
29
|
name?: string;
|
package/dist/decorators/types.js
CHANGED
package/dist/extension.js
CHANGED
|
@@ -18,6 +18,9 @@ const requestMethods = {
|
|
|
18
18
|
setScopes(scopes) {
|
|
19
19
|
(0, helpers_1.setScopes)(this, scopes);
|
|
20
20
|
},
|
|
21
|
+
setFullScopes() {
|
|
22
|
+
(0, helpers_1.setScopes)(this, ["*"]);
|
|
23
|
+
},
|
|
21
24
|
hasScopes(scopes) {
|
|
22
25
|
return (0, helpers_1.hasScopes)(this, scopes);
|
|
23
26
|
},
|
|
@@ -25,8 +28,8 @@ const requestMethods = {
|
|
|
25
28
|
return (0, helpers_1.getScopes)(this);
|
|
26
29
|
},
|
|
27
30
|
setRoleScopes(role, scopes) {
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
(0, helpers_1.setRole)(this, role);
|
|
32
|
+
(0, helpers_1.setScopes)(this, scopes);
|
|
30
33
|
},
|
|
31
34
|
};
|
|
32
35
|
/////////////////////////////
|