naystack 1.5.1 → 1.5.3

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.
@@ -101,10 +101,7 @@ var ApolloWrapper = ({
101
101
  cache: new import_client_integration_nextjs.InMemoryCache(cacheConfig),
102
102
  link: new import_client.HttpLink({
103
103
  uri: getEnv("NEXT_PUBLIC_GRAPHQL_ENDPOINT" /* NEXT_PUBLIC_GRAPHQL_ENDPOINT */)
104
- }),
105
- devtools: {
106
- enabled: true
107
- }
104
+ })
108
105
  });
109
106
  }
110
107
  return /* @__PURE__ */ import_react.default.createElement(import_client_integration_nextjs.ApolloNextAppProvider, { makeClient }, children);
@@ -77,10 +77,7 @@ var ApolloWrapper = ({
77
77
  cache: new InMemoryCache(cacheConfig),
78
78
  link: new HttpLink({
79
79
  uri: getEnv("NEXT_PUBLIC_GRAPHQL_ENDPOINT" /* NEXT_PUBLIC_GRAPHQL_ENDPOINT */)
80
- }),
81
- devtools: {
82
- enabled: true
83
- }
80
+ })
84
81
  });
85
82
  }
86
83
  return /* @__PURE__ */ React.createElement(ApolloNextAppProvider, { makeClient }, children);
@@ -733,26 +733,24 @@ var getUserId = async () => {
733
733
  return refresh ? getUserIdFromRefreshToken(refresh) : null;
734
734
  };
735
735
  function getAuthCaller(fn) {
736
- return (0, import_react.cache)(
737
- async (data) => {
738
- const ctx = {
739
- userId: await getUserId(),
740
- isRefreshID: true
741
- };
742
- return await fn(ctx, data);
743
- }
744
- );
736
+ return async (data) => {
737
+ "use server";
738
+ const ctx = {
739
+ userId: await getUserId(),
740
+ isRefreshID: true
741
+ };
742
+ return await fn(ctx, data);
743
+ };
745
744
  }
746
745
  function getCaller(fn) {
747
- return (0, import_react.cache)(
748
- async (data) => {
749
- const ctx = {
750
- userId: null,
751
- isRefreshID: true
752
- };
753
- return await fn(ctx, data);
754
- }
755
- );
746
+ return async (data) => {
747
+ "use server";
748
+ const ctx = {
749
+ userId: null,
750
+ isRefreshID: true
751
+ };
752
+ return await fn(ctx, data);
753
+ };
756
754
  }
757
755
  function getFieldAuthCaller(fn) {
758
756
  return (0, import_react.cache)(
@@ -729,26 +729,24 @@ var getUserId = async () => {
729
729
  return refresh ? getUserIdFromRefreshToken(refresh) : null;
730
730
  };
731
731
  function getAuthCaller(fn) {
732
- return cache(
733
- async (data) => {
734
- const ctx = {
735
- userId: await getUserId(),
736
- isRefreshID: true
737
- };
738
- return await fn(ctx, data);
739
- }
740
- );
732
+ return async (data) => {
733
+ "use server";
734
+ const ctx = {
735
+ userId: await getUserId(),
736
+ isRefreshID: true
737
+ };
738
+ return await fn(ctx, data);
739
+ };
741
740
  }
742
741
  function getCaller(fn) {
743
- return cache(
744
- async (data) => {
745
- const ctx = {
746
- userId: null,
747
- isRefreshID: true
748
- };
749
- return await fn(ctx, data);
750
- }
751
- );
742
+ return async (data) => {
743
+ "use server";
744
+ const ctx = {
745
+ userId: null,
746
+ isRefreshID: true
747
+ };
748
+ return await fn(ctx, data);
749
+ };
752
750
  }
753
751
  function getFieldAuthCaller(fn) {
754
752
  return cache(
@@ -126,26 +126,24 @@ var getUserId = async () => {
126
126
  return refresh ? getUserIdFromRefreshToken(refresh) : null;
127
127
  };
128
128
  function getAuthCaller(fn) {
129
- return (0, import_react.cache)(
130
- async (data) => {
131
- const ctx = {
132
- userId: await getUserId(),
133
- isRefreshID: true
134
- };
135
- return await fn(ctx, data);
136
- }
137
- );
129
+ return async (data) => {
130
+ "use server";
131
+ const ctx = {
132
+ userId: await getUserId(),
133
+ isRefreshID: true
134
+ };
135
+ return await fn(ctx, data);
136
+ };
138
137
  }
139
138
  function getCaller(fn) {
140
- return (0, import_react.cache)(
141
- async (data) => {
142
- const ctx = {
143
- userId: null,
144
- isRefreshID: true
145
- };
146
- return await fn(ctx, data);
147
- }
148
- );
139
+ return async (data) => {
140
+ "use server";
141
+ const ctx = {
142
+ userId: null,
143
+ isRefreshID: true
144
+ };
145
+ return await fn(ctx, data);
146
+ };
149
147
  }
150
148
  function getFieldAuthCaller(fn) {
151
149
  return (0, import_react.cache)(
@@ -111,26 +111,24 @@ var getUserId = async () => {
111
111
  return refresh ? getUserIdFromRefreshToken(refresh) : null;
112
112
  };
113
113
  function getAuthCaller(fn) {
114
- return cache(
115
- async (data) => {
116
- const ctx = {
117
- userId: await getUserId(),
118
- isRefreshID: true
119
- };
120
- return await fn(ctx, data);
121
- }
122
- );
114
+ return async (data) => {
115
+ "use server";
116
+ const ctx = {
117
+ userId: await getUserId(),
118
+ isRefreshID: true
119
+ };
120
+ return await fn(ctx, data);
121
+ };
123
122
  }
124
123
  function getCaller(fn) {
125
- return cache(
126
- async (data) => {
127
- const ctx = {
128
- userId: null,
129
- isRefreshID: true
130
- };
131
- return await fn(ctx, data);
132
- }
133
- );
124
+ return async (data) => {
125
+ "use server";
126
+ const ctx = {
127
+ userId: null,
128
+ isRefreshID: true
129
+ };
130
+ return await fn(ctx, data);
131
+ };
134
132
  }
135
133
  function getFieldAuthCaller(fn) {
136
134
  return cache(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
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",