naystack 1.5.3 → 1.5.5
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/index.cjs.js +20 -16
- package/dist/graphql/index.esm.js +20 -16
- package/dist/graphql/utils.cjs.js +21 -16
- package/dist/graphql/utils.esm.js +21 -16
- package/package.json +1 -1
|
@@ -733,24 +733,28 @@ 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
|
-
|
|
736
|
+
return (0, import_react.cache)(
|
|
737
|
+
async (data) => {
|
|
738
|
+
"use server";
|
|
739
|
+
const ctx = {
|
|
740
|
+
userId: await getUserId(),
|
|
741
|
+
isRefreshID: true
|
|
742
|
+
};
|
|
743
|
+
return await fn(ctx, data);
|
|
744
|
+
}
|
|
745
|
+
);
|
|
744
746
|
}
|
|
745
747
|
function getCaller(fn) {
|
|
746
|
-
return
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
748
|
+
return (0, import_react.cache)(
|
|
749
|
+
async (data) => {
|
|
750
|
+
"use server";
|
|
751
|
+
const ctx = {
|
|
752
|
+
userId: null,
|
|
753
|
+
isRefreshID: true
|
|
754
|
+
};
|
|
755
|
+
return await fn(ctx, data);
|
|
756
|
+
}
|
|
757
|
+
);
|
|
754
758
|
}
|
|
755
759
|
function getFieldAuthCaller(fn) {
|
|
756
760
|
return (0, import_react.cache)(
|
|
@@ -729,24 +729,28 @@ 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
|
-
|
|
732
|
+
return cache(
|
|
733
|
+
async (data) => {
|
|
734
|
+
"use server";
|
|
735
|
+
const ctx = {
|
|
736
|
+
userId: await getUserId(),
|
|
737
|
+
isRefreshID: true
|
|
738
|
+
};
|
|
739
|
+
return await fn(ctx, data);
|
|
740
|
+
}
|
|
741
|
+
);
|
|
740
742
|
}
|
|
741
743
|
function getCaller(fn) {
|
|
742
|
-
return
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
744
|
+
return cache(
|
|
745
|
+
async (data) => {
|
|
746
|
+
"use server";
|
|
747
|
+
const ctx = {
|
|
748
|
+
userId: null,
|
|
749
|
+
isRefreshID: true
|
|
750
|
+
};
|
|
751
|
+
return await fn(ctx, data);
|
|
752
|
+
}
|
|
753
|
+
);
|
|
750
754
|
}
|
|
751
755
|
function getFieldAuthCaller(fn) {
|
|
752
756
|
return cache(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"server-only";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -126,24 +127,28 @@ var getUserId = async () => {
|
|
|
126
127
|
return refresh ? getUserIdFromRefreshToken(refresh) : null;
|
|
127
128
|
};
|
|
128
129
|
function getAuthCaller(fn) {
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
return (0, import_react.cache)(
|
|
131
|
+
async (data) => {
|
|
132
|
+
"use server";
|
|
133
|
+
const ctx = {
|
|
134
|
+
userId: await getUserId(),
|
|
135
|
+
isRefreshID: true
|
|
136
|
+
};
|
|
137
|
+
return await fn(ctx, data);
|
|
138
|
+
}
|
|
139
|
+
);
|
|
137
140
|
}
|
|
138
141
|
function getCaller(fn) {
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
return (0, import_react.cache)(
|
|
143
|
+
async (data) => {
|
|
144
|
+
"use server";
|
|
145
|
+
const ctx = {
|
|
146
|
+
userId: null,
|
|
147
|
+
isRefreshID: true
|
|
148
|
+
};
|
|
149
|
+
return await fn(ctx, data);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
147
152
|
}
|
|
148
153
|
function getFieldAuthCaller(fn) {
|
|
149
154
|
return (0, import_react.cache)(
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"server-only";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -111,24 +112,28 @@ var getUserId = async () => {
|
|
|
111
112
|
return refresh ? getUserIdFromRefreshToken(refresh) : null;
|
|
112
113
|
};
|
|
113
114
|
function getAuthCaller(fn) {
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
return cache(
|
|
116
|
+
async (data) => {
|
|
117
|
+
"use server";
|
|
118
|
+
const ctx = {
|
|
119
|
+
userId: await getUserId(),
|
|
120
|
+
isRefreshID: true
|
|
121
|
+
};
|
|
122
|
+
return await fn(ctx, data);
|
|
123
|
+
}
|
|
124
|
+
);
|
|
122
125
|
}
|
|
123
126
|
function getCaller(fn) {
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
return cache(
|
|
128
|
+
async (data) => {
|
|
129
|
+
"use server";
|
|
130
|
+
const ctx = {
|
|
131
|
+
userId: null,
|
|
132
|
+
isRefreshID: true
|
|
133
|
+
};
|
|
134
|
+
return await fn(ctx, data);
|
|
135
|
+
}
|
|
136
|
+
);
|
|
132
137
|
}
|
|
133
138
|
function getFieldAuthCaller(fn) {
|
|
134
139
|
return cache(
|