@webiny/app-security 5.22.0-beta.0 → 5.22.0

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.
@@ -1,9 +1,9 @@
1
1
  import React, { Dispatch, SetStateAction } from "react";
2
2
  import { SecurityIdentity, SecurityPermission } from "../types";
3
- export declare const SecurityContext: React.Context<SecurityContextValue>;
4
- export interface SecurityContextValue {
3
+ export interface SecurityContext {
5
4
  identity: SecurityIdentity | null;
6
5
  setIdentity: Dispatch<SetStateAction<SecurityIdentity>>;
7
6
  getPermission<T extends SecurityPermission = SecurityPermission>(name: string): T;
8
7
  }
8
+ export declare const SecurityContext: React.Context<SecurityContext>;
9
9
  export declare const SecurityProvider: (props: any) => JSX.Element;
@@ -1,2 +1,2 @@
1
- export declare type UseSecurity = ReturnType<typeof useSecurity>;
2
- export declare function useSecurity(): import("../contexts/Security").SecurityContextValue;
1
+ import { SecurityContext } from "../contexts/Security";
2
+ export declare function useSecurity(): SecurityContext;
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./components";
2
2
  export * from "./contexts/Security";
3
+ export { SecurityContext } from "./contexts/Security";
3
4
  export * from "./hooks/useSecurity";
4
5
  export * from "./hooks/usePermission";
5
6
  export * from "./Security";
package/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./components";
2
2
  export * from "./contexts/Security";
3
+ export { SecurityContext } from "./contexts/Security";
3
4
  export * from "./hooks/useSecurity";
4
5
  export * from "./hooks/usePermission";
5
6
  export * from "./Security";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-security",
3
- "version": "5.22.0-beta.0",
3
+ "version": "5.22.0",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,9 +13,9 @@
13
13
  ],
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@webiny/app": "5.22.0-beta.0",
17
- "@webiny/app-admin-core": "5.22.0-beta.0",
18
- "@webiny/plugins": "5.22.0-beta.0",
16
+ "@webiny/app": "5.22.0",
17
+ "@webiny/app-admin-core": "5.22.0",
18
+ "@webiny/plugins": "5.22.0",
19
19
  "minimatch": "3.0.4",
20
20
  "react": "16.14.0",
21
21
  "react-dom": "16.14.0"
@@ -27,8 +27,8 @@
27
27
  "@babel/preset-env": "^7.16.4",
28
28
  "@babel/preset-react": "^7.16.0",
29
29
  "@babel/preset-typescript": "^7.16.0",
30
- "@webiny/cli": "^5.22.0-beta.0",
31
- "@webiny/project-utils": "^5.22.0-beta.0",
30
+ "@webiny/cli": "^5.22.0",
31
+ "@webiny/project-utils": "^5.22.0",
32
32
  "babel-plugin-emotion": "^9.2.8",
33
33
  "babel-plugin-lodash": "^3.3.4",
34
34
  "rimraf": "^3.0.2",
@@ -50,5 +50,5 @@
50
50
  ]
51
51
  }
52
52
  },
53
- "gitHead": "487330472a07000c4845340f3b3dfa6b3ae98944"
53
+ "gitHead": "ab2ca1af058fdec3aa1bed3f30afd51f4592dbb6"
54
54
  }