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.
- package/dist/graphql/client.cjs.js +1 -4
- package/dist/graphql/client.esm.js +1 -4
- package/dist/graphql/index.cjs.js +16 -18
- package/dist/graphql/index.esm.js +16 -18
- package/dist/graphql/utils.cjs.js +16 -18
- package/dist/graphql/utils.esm.js +16 -18
- package/package.json +1 -1
|
@@ -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 (
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
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 (
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
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
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
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
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
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 (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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 (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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(
|