naystack 1.2.20 → 1.2.21

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.
@@ -21,7 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var client_exports = {};
22
22
  __export(client_exports, {
23
23
  TokenContext: () => TokenContext,
24
- getApolloWrapper: () => getApolloWrapper,
24
+ getAuthWrapper: () => getAuthWrapper,
25
25
  getEmailAuthUtils: () => getEmailAuthUtils,
26
26
  useSetToken: () => useSetToken,
27
27
  useToken: () => useToken
@@ -32,7 +32,7 @@ var TokenContext = (0, import_react.createContext)({
32
32
  token: null,
33
33
  setToken: () => null
34
34
  });
35
- var getApolloWrapper = (endpoint) => ({ children }) => {
35
+ var getAuthWrapper = (endpoint) => ({ children }) => {
36
36
  const [token, setToken] = (0, import_react.useState)(null);
37
37
  (0, import_react.useEffect)(() => {
38
38
  fetch(endpoint, {
@@ -111,7 +111,7 @@ function getEmailAuthUtils(endpoint) {
111
111
  // Annotate the CommonJS export names for ESM import in node:
112
112
  0 && (module.exports = {
113
113
  TokenContext,
114
- getApolloWrapper,
114
+ getAuthWrapper,
115
115
  getEmailAuthUtils,
116
116
  useSetToken,
117
117
  useToken
@@ -5,7 +5,7 @@ declare const TokenContext: react.Context<{
5
5
  token: string | null;
6
6
  setToken: Dispatch<SetStateAction<string | null>>;
7
7
  }>;
8
- declare const getApolloWrapper: (endpoint: string) => ({ children }: {
8
+ declare const getAuthWrapper: (endpoint: string) => ({ children }: {
9
9
  children: React.ReactNode;
10
10
  }) => react.JSX.Element;
11
11
  declare function useToken(): string | null;
@@ -16,4 +16,4 @@ declare function getEmailAuthUtils(endpoint: string): {
16
16
  useLogout: () => (data?: object) => Promise<void>;
17
17
  };
18
18
 
19
- export { TokenContext, getApolloWrapper, getEmailAuthUtils, useSetToken, useToken };
19
+ export { TokenContext, getAuthWrapper, getEmailAuthUtils, useSetToken, useToken };
@@ -5,7 +5,7 @@ declare const TokenContext: react.Context<{
5
5
  token: string | null;
6
6
  setToken: Dispatch<SetStateAction<string | null>>;
7
7
  }>;
8
- declare const getApolloWrapper: (endpoint: string) => ({ children }: {
8
+ declare const getAuthWrapper: (endpoint: string) => ({ children }: {
9
9
  children: React.ReactNode;
10
10
  }) => react.JSX.Element;
11
11
  declare function useToken(): string | null;
@@ -16,4 +16,4 @@ declare function getEmailAuthUtils(endpoint: string): {
16
16
  useLogout: () => (data?: object) => Promise<void>;
17
17
  };
18
18
 
19
- export { TokenContext, getApolloWrapper, getEmailAuthUtils, useSetToken, useToken };
19
+ export { TokenContext, getAuthWrapper, getEmailAuthUtils, useSetToken, useToken };
@@ -10,7 +10,7 @@ var TokenContext = createContext({
10
10
  token: null,
11
11
  setToken: () => null
12
12
  });
13
- var getApolloWrapper = (endpoint) => ({ children }) => {
13
+ var getAuthWrapper = (endpoint) => ({ children }) => {
14
14
  const [token, setToken] = useState(null);
15
15
  useEffect(() => {
16
16
  fetch(endpoint, {
@@ -88,7 +88,7 @@ function getEmailAuthUtils(endpoint) {
88
88
  }
89
89
  export {
90
90
  TokenContext,
91
- getApolloWrapper,
91
+ getAuthWrapper,
92
92
  getEmailAuthUtils,
93
93
  useSetToken,
94
94
  useToken
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.2.20",
3
+ "version": "1.2.21",
4
4
  "description": "A stack built with Next + GraphQL + S3 + Auth",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",