@emeryld/rrroutes-client 2.4.2 → 2.4.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/index.cjs +16 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +16 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -277,7 +277,10 @@ function buildGetLeaf(leaf, rqOpts, env) {
|
|
|
277
277
|
const fetchEndpoint = async (tuple, options) => {
|
|
278
278
|
const a = extractArgs(tuple);
|
|
279
279
|
const params = a?.params;
|
|
280
|
-
const query =
|
|
280
|
+
const query = {
|
|
281
|
+
...a?.query ?? {},
|
|
282
|
+
...options?.queryOverride ?? {}
|
|
283
|
+
};
|
|
281
284
|
const { url, normalizedQuery, normalizedParams } = buildUrl(
|
|
282
285
|
{ ...leaf, cfg: leafCfg },
|
|
283
286
|
baseUrl,
|
|
@@ -299,7 +302,7 @@ function buildGetLeaf(leaf, rqOpts, env) {
|
|
|
299
302
|
throw new Error("Body is required when invoking a mutation fetch.");
|
|
300
303
|
}
|
|
301
304
|
const startedAt = Date.now();
|
|
302
|
-
const detail = isVerboseDebug ? { params
|
|
305
|
+
const detail = isVerboseDebug ? { params, normalizedParams, query, normalizedQuery, baseUrl } : void 0;
|
|
303
306
|
emit(
|
|
304
307
|
decorateDebugEvent(
|
|
305
308
|
{
|
|
@@ -537,7 +540,10 @@ function buildInfiniteGetLeaf(leaf, rqOpts, env) {
|
|
|
537
540
|
const fetchEndpoint = async (tuple, options) => {
|
|
538
541
|
const a = extractArgs(tuple);
|
|
539
542
|
const params = a?.params;
|
|
540
|
-
const query =
|
|
543
|
+
const query = {
|
|
544
|
+
...a?.query ?? {},
|
|
545
|
+
...options?.queryOverride ?? {}
|
|
546
|
+
};
|
|
541
547
|
const { url, normalizedQuery, normalizedParams } = buildUrl(
|
|
542
548
|
{ ...leaf, cfg: leafCfg },
|
|
543
549
|
baseUrl,
|
|
@@ -559,7 +565,7 @@ function buildInfiniteGetLeaf(leaf, rqOpts, env) {
|
|
|
559
565
|
throw new Error("Body is required when invoking a mutation fetch.");
|
|
560
566
|
}
|
|
561
567
|
const startedAt = Date.now();
|
|
562
|
-
const detail = isVerboseDebug ? { params
|
|
568
|
+
const detail = isVerboseDebug ? { params, normalizedParams, query, normalizedQuery, baseUrl } : void 0;
|
|
563
569
|
emit(
|
|
564
570
|
decorateDebugEvent(
|
|
565
571
|
{
|
|
@@ -832,7 +838,10 @@ function buildMutationLeaf(leaf, rqOpts, env) {
|
|
|
832
838
|
const fetchEndpoint = async (tuple, options) => {
|
|
833
839
|
const a = extractArgs(tuple);
|
|
834
840
|
const params = a?.params;
|
|
835
|
-
const query =
|
|
841
|
+
const query = {
|
|
842
|
+
...a?.query ?? {},
|
|
843
|
+
...options?.queryOverride ?? {}
|
|
844
|
+
};
|
|
836
845
|
const { url, normalizedQuery, normalizedParams } = buildUrl(
|
|
837
846
|
{ ...leaf, cfg: leafCfg },
|
|
838
847
|
baseUrl,
|
|
@@ -854,7 +863,7 @@ function buildMutationLeaf(leaf, rqOpts, env) {
|
|
|
854
863
|
throw new Error("Body is required when invoking a mutation fetch.");
|
|
855
864
|
}
|
|
856
865
|
const startedAt = Date.now();
|
|
857
|
-
const detail = isVerboseDebug ? { params
|
|
866
|
+
const detail = isVerboseDebug ? { params, normalizedParams, query, normalizedQuery, baseUrl } : void 0;
|
|
858
867
|
emit(
|
|
859
868
|
decorateDebugEvent(
|
|
860
869
|
{
|
|
@@ -1134,7 +1143,7 @@ function createRouteClient(opts) {
|
|
|
1134
1143
|
const url = `${baseUrl ?? ""}${compiledPath}${search}`;
|
|
1135
1144
|
const leafLabel = `${methodUpper} ${path}`;
|
|
1136
1145
|
const startedAt = Date.now();
|
|
1137
|
-
const detail = isVerboseDebug ? { params, query
|
|
1146
|
+
const detail = isVerboseDebug ? { params, flatQuery, query, baseUrl } : void 0;
|
|
1138
1147
|
emitDebug(
|
|
1139
1148
|
decorateDebugEvent(
|
|
1140
1149
|
{
|