tricache 1.0.2 → 2.0.0

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.
Files changed (101) hide show
  1. package/README.md +78 -90
  2. package/dashboards/tricache-alerts.yaml +80 -4
  3. package/dashboards/tricache-grafana.json +54 -1
  4. package/dashboards/tricache-inventory.rules.yml +21 -0
  5. package/dist/{cache-service-CWI4jkS7.d.cts → cache-service-BV5T8-20.d.cts} +122 -21
  6. package/dist/cache-service-UZXOQGEY.js +14 -0
  7. package/dist/{cache-service-B108FzER.d.ts → cache-service-tpyrXvlH.d.ts} +122 -21
  8. package/dist/{chunk-UBWLPKTI.js → chunk-EJXG7WO6.js} +152 -32
  9. package/dist/{chunk-H4GFLQ26.js → chunk-KV7KISK2.js} +47 -1
  10. package/dist/{chunk-WYF7NOAT.js → chunk-MB3DMVWN.js} +2111 -543
  11. package/dist/{chunk-OYDU3SMI.js → chunk-RBJRTGFK.js} +5 -0
  12. package/dist/chunk-S5N65I45.js +17 -0
  13. package/dist/cli.cjs +2454 -572
  14. package/dist/cli.js +186 -11
  15. package/dist/dashboard/index.d.cts +2 -2
  16. package/dist/dashboard/index.d.ts +2 -2
  17. package/dist/drizzle/index.cjs +2335 -571
  18. package/dist/drizzle/index.d.cts +2 -2
  19. package/dist/drizzle/index.d.ts +2 -2
  20. package/dist/drizzle/index.js +6 -2
  21. package/dist/edge/index.cjs +145 -43
  22. package/dist/edge/index.d.cts +11 -4
  23. package/dist/edge/index.d.ts +11 -4
  24. package/dist/edge/index.js +118 -43
  25. package/dist/hono/index.cjs +2322 -569
  26. package/dist/hono/index.d.cts +2 -2
  27. package/dist/hono/index.d.ts +2 -2
  28. package/dist/hono/index.js +2 -2
  29. package/dist/{hono-C886ok3X.d.cts → hono-CMv2VdQ6.d.cts} +18 -5
  30. package/dist/{hono-3rDMYVtY.d.ts → hono-Dvq04kX9.d.ts} +18 -5
  31. package/dist/http/index.cjs +2323 -570
  32. package/dist/http/index.d.cts +3 -3
  33. package/dist/http/index.d.ts +3 -3
  34. package/dist/http/index.js +4 -4
  35. package/dist/index.cjs +2554 -620
  36. package/dist/index.d.cts +88 -23
  37. package/dist/index.d.ts +88 -23
  38. package/dist/index.js +873 -16
  39. package/dist/{murmur3-CMGw9PbV.d.cts → murmur3-DF8BFRnu.d.cts} +1 -0
  40. package/dist/{murmur3-CMGw9PbV.d.ts → murmur3-DF8BFRnu.d.ts} +1 -0
  41. package/dist/nestjs/index.cjs +2292 -574
  42. package/dist/nestjs/index.d.cts +19 -5
  43. package/dist/nestjs/index.d.ts +19 -5
  44. package/dist/nestjs/index.js +25 -19
  45. package/dist/next/index.cjs +2306 -571
  46. package/dist/next/index.d.cts +8 -2
  47. package/dist/next/index.d.ts +8 -2
  48. package/dist/next/index.js +36 -9
  49. package/dist/prisma/index.cjs +26 -25
  50. package/dist/prisma/index.d.cts +2 -2
  51. package/dist/prisma/index.d.ts +2 -2
  52. package/dist/prisma/index.js +14 -25
  53. package/dist/serialize-worker.cjs +162 -39
  54. package/dist/serialize-worker.js +9 -7
  55. package/dist/{types-BA4pz1A0.d.cts → types-F8vRWMrE.d.cts} +162 -45
  56. package/dist/{types-BA4pz1A0.d.ts → types-F8vRWMrE.d.ts} +162 -45
  57. package/package.json +21 -2
  58. package/src/adapters/auto-pipeliner.ts +52 -11
  59. package/src/cache-service.ts +1537 -415
  60. package/src/cli.ts +2 -9
  61. package/src/codec.ts +3 -3
  62. package/src/compression.ts +39 -16
  63. package/src/cross-region.ts +1 -1
  64. package/src/disk-tier.ts +283 -43
  65. package/src/drizzle/index.ts +2 -1
  66. package/src/edge/adapters/cloudflare-do.ts +25 -10
  67. package/src/edge/adapters/cloudflare-kv.ts +12 -9
  68. package/src/edge/adapters/upstash.ts +27 -11
  69. package/src/edge/cache.ts +59 -17
  70. package/src/edge/types.ts +15 -5
  71. package/src/encryption.ts +50 -18
  72. package/src/env.d.ts +1 -1
  73. package/src/errors.ts +12 -0
  74. package/src/http/utils.ts +6 -0
  75. package/src/index.ts +6 -0
  76. package/src/latency-watchdog.ts +5 -1
  77. package/src/nestjs/decorators.ts +11 -6
  78. package/src/nestjs/tricache.module.ts +2 -1
  79. package/src/nestjs/tricache.store.ts +21 -9
  80. package/src/nestjs/types.ts +1 -1
  81. package/src/next/cache-handler.ts +24 -4
  82. package/src/next/types.ts +4 -0
  83. package/src/origin-capacity.ts +134 -0
  84. package/src/prisma/index.ts +14 -32
  85. package/src/remote-snapshot.ts +37 -27
  86. package/src/serialize-worker.ts +8 -5
  87. package/src/sigv4-snapshot-adapter.ts +37 -27
  88. package/src/smart-memory-cache.ts +62 -22
  89. package/src/types.ts +92 -35
  90. package/src/utils/config-comparison.ts +29 -0
  91. package/src/utils/lz4-size.ts +74 -0
  92. package/src/utils/namespace-key.ts +48 -0
  93. package/src/utils/query-key.ts +13 -0
  94. package/src/utils/snapshot-transfer.ts +83 -0
  95. package/src/utils/work-limits.ts +73 -0
  96. package/src/utils/write-revision.ts +4 -0
  97. package/src/wasm/bloom-filter-wasm.ts +16 -1
  98. package/src/worker-pool.ts +28 -8
  99. package/src/wtiny-lfu.ts +62 -14
  100. package/dist/cache-service-GYPZFB7O.js +0 -12
  101. package/dist/chunk-VNRDL5RA.js +0 -666
@@ -1,5 +1,5 @@
1
- import { C as CacheService } from '../cache-service-CWI4jkS7.cjs';
2
- import { C as CacheOptions, i as ILogger } from '../types-BA4pz1A0.cjs';
1
+ import { C as CacheService } from '../cache-service-BV5T8-20.cjs';
2
+ import { C as CacheOptions, i as ILogger } from '../types-F8vRWMrE.cjs';
3
3
  import 'crypto';
4
4
 
5
5
  /**
@@ -89,6 +89,10 @@ interface NextCacheHandlerOptions extends CacheOptions {
89
89
  isBuildPhase?: boolean;
90
90
  /** Maximum buffered RSC stream size. Default: 16 MiB. */
91
91
  maxStreamBytes?: number;
92
+ /** Aggregate buffered input stream bytes per shared cache instance. Default: 64 MiB. Excludes encoded copies and caller-owned streams. */
93
+ maxPendingStreamBytes?: number;
94
+ /** Concurrent stream materializations per shared cache instance. Default: 16. Overflow skips caching and cancels that input stream. */
95
+ maxConcurrentStreams?: number;
92
96
  }
93
97
  /**
94
98
  * Legacy Next.js IncrementalCache value shape.
@@ -156,6 +160,8 @@ declare class TriCacheHandler {
156
160
  protected readonly cache: CacheService;
157
161
  protected readonly logger: ILogger;
158
162
  private readonly maxStreamBytes;
163
+ private readonly streamBudget;
164
+ private static readonly streamBudgets;
159
165
  private readonly pendingSets;
160
166
  private readonly observedTags;
161
167
  constructor(options?: NextCacheHandlerOptions);
@@ -1,5 +1,5 @@
1
- import { C as CacheService } from '../cache-service-B108FzER.js';
2
- import { C as CacheOptions, i as ILogger } from '../types-BA4pz1A0.js';
1
+ import { C as CacheService } from '../cache-service-tpyrXvlH.js';
2
+ import { C as CacheOptions, i as ILogger } from '../types-F8vRWMrE.js';
3
3
  import 'crypto';
4
4
 
5
5
  /**
@@ -89,6 +89,10 @@ interface NextCacheHandlerOptions extends CacheOptions {
89
89
  isBuildPhase?: boolean;
90
90
  /** Maximum buffered RSC stream size. Default: 16 MiB. */
91
91
  maxStreamBytes?: number;
92
+ /** Aggregate buffered input stream bytes per shared cache instance. Default: 64 MiB. Excludes encoded copies and caller-owned streams. */
93
+ maxPendingStreamBytes?: number;
94
+ /** Concurrent stream materializations per shared cache instance. Default: 16. Overflow skips caching and cancels that input stream. */
95
+ maxConcurrentStreams?: number;
92
96
  }
93
97
  /**
94
98
  * Legacy Next.js IncrementalCache value shape.
@@ -156,6 +160,8 @@ declare class TriCacheHandler {
156
160
  protected readonly cache: CacheService;
157
161
  protected readonly logger: ILogger;
158
162
  private readonly maxStreamBytes;
163
+ private readonly streamBudget;
164
+ private static readonly streamBudgets;
159
165
  private readonly pendingSets;
160
166
  private readonly observedTags;
161
167
  constructor(options?: NextCacheHandlerOptions);
@@ -1,10 +1,12 @@
1
1
  import {
2
- CacheService
3
- } from "../chunk-WYF7NOAT.js";
2
+ CacheService,
3
+ WorkLimit,
4
+ positiveLimit
5
+ } from "../chunk-MB3DMVWN.js";
4
6
  import {
5
7
  consoleLogger
6
- } from "../chunk-UBWLPKTI.js";
7
- import "../chunk-H4GFLQ26.js";
8
+ } from "../chunk-EJXG7WO6.js";
9
+ import "../chunk-KV7KISK2.js";
8
10
 
9
11
  // src/next/cache-handler.ts
10
12
  var PRESET_CACHE_LIFE_PROFILES = {
@@ -38,7 +40,7 @@ function resolveCacheLife(profileOrName) {
38
40
  }
39
41
  return null;
40
42
  }
41
- async function drainStream(stream, maxBytes) {
43
+ async function drainStream(stream, maxBytes, reserveBytes) {
42
44
  const reader = stream.getReader();
43
45
  const chunks = [];
44
46
  let size = 0;
@@ -49,6 +51,7 @@ async function drainStream(stream, maxBytes) {
49
51
  if (value) {
50
52
  size += value.byteLength;
51
53
  if (size > maxBytes) throw new Error("RSC stream exceeds maxStreamBytes");
54
+ if (value.byteLength > 0) reserveBytes(value.byteLength);
52
55
  chunks.push(Uint8Array.from(value));
53
56
  }
54
57
  }
@@ -70,16 +73,19 @@ function createReadableStream(buffer) {
70
73
  }
71
74
  });
72
75
  }
73
- var TriCacheHandler = class {
76
+ var TriCacheHandler = class _TriCacheHandler {
74
77
  cache;
75
78
  logger;
76
79
  maxStreamBytes;
80
+ streamBudget;
81
+ static streamBudgets = /* @__PURE__ */ new WeakMap();
77
82
  pendingSets = /* @__PURE__ */ new Map();
78
83
  observedTags = /* @__PURE__ */ new Map();
79
84
  constructor(options = {}) {
80
85
  this.logger = options.logger ?? consoleLogger;
81
- this.maxStreamBytes = options.maxStreamBytes ?? 16 * 1024 * 1024;
82
- if (!Number.isFinite(this.maxStreamBytes) || this.maxStreamBytes <= 0) throw new Error("maxStreamBytes must be finite and positive");
86
+ this.maxStreamBytes = positiveLimit(options.maxStreamBytes, 16 * 1024 * 1024, "maxStreamBytes");
87
+ const maxPendingStreamBytes = positiveLimit(options.maxPendingStreamBytes, 64 * 1024 * 1024, "maxPendingStreamBytes");
88
+ const maxConcurrentStreams = positiveLimit(options.maxConcurrentStreams, 16, "maxConcurrentStreams");
83
89
  if (options.tagStrategy && options.tagStrategy !== "generational") throw new Error("Next.js cache handlers require tagStrategy: generational");
84
90
  const isBuildPhase = options.isBuildPhase ?? (typeof process !== "undefined" && (process.env.NEXT_PHASE === "phase-production-build" || process.env.NEXT_PHASE === "phase-export"));
85
91
  this.cache = CacheService.create({
@@ -89,6 +95,15 @@ var TriCacheHandler = class {
89
95
  cloneStrategy: options.cloneStrategy ?? "none",
90
96
  disableRedis: isBuildPhase ? true : options.disableRedis
91
97
  });
98
+ const existing = _TriCacheHandler.streamBudgets.get(this.cache);
99
+ if (existing && (existing.bytes.maximum !== maxPendingStreamBytes || existing.streams.maximum !== maxConcurrentStreams)) {
100
+ throw new Error("Next handlers sharing one cache must use the same stream admission limits");
101
+ }
102
+ this.streamBudget = existing ?? {
103
+ bytes: new WorkLimit(maxPendingStreamBytes, "Next buffered stream bytes"),
104
+ streams: new WorkLimit(maxConcurrentStreams, "Next concurrent streams")
105
+ };
106
+ _TriCacheHandler.streamBudgets.set(this.cache, this.streamBudget);
92
107
  }
93
108
  async get(cacheKey, context) {
94
109
  let pending = this.pendingSets.get(cacheKey);
@@ -159,6 +174,8 @@ var TriCacheHandler = class {
159
174
  finish = resolve;
160
175
  });
161
176
  this.pendingSets.set(cacheKey, { token, completion });
177
+ const byteReservation = this.streamBudget.bytes.reservation();
178
+ let releaseStream;
162
179
  try {
163
180
  const canCommit = this.cache.captureMutationFence(cacheKey);
164
181
  const entry = await pendingEntry;
@@ -172,8 +189,16 @@ var TriCacheHandler = class {
172
189
  );
173
190
  if (isStream) {
174
191
  try {
175
- dataToStore = (await drainStream(dataToStore, this.maxStreamBytes)).toString("base64");
192
+ releaseStream = this.streamBudget.streams.acquire();
193
+ dataToStore = (await drainStream(
194
+ dataToStore,
195
+ this.maxStreamBytes,
196
+ (bytes) => byteReservation.grow(bytes)
197
+ )).toString("base64");
176
198
  } catch (streamErr) {
199
+ const stream = entry.value;
200
+ if (!stream.locked) void stream.cancel(streamErr).catch(() => {
201
+ });
177
202
  this.logger.debug("Next.js cacheHandler: stream drain failed mid-flight, skipping cache", {
178
203
  cacheKey,
179
204
  error: streamErr.message
@@ -231,6 +256,8 @@ var TriCacheHandler = class {
231
256
  if (!canCommit() || this.pendingSets.get(cacheKey)?.token !== token) return;
232
257
  await this.cache.set(cacheKey, stored, remaining / 1e3, void 0, { tags: [] });
233
258
  } finally {
259
+ byteReservation.release();
260
+ releaseStream?.();
234
261
  finish();
235
262
  if (this.pendingSets.get(cacheKey)?.token === token) this.pendingSets.delete(cacheKey);
236
263
  }
@@ -35,6 +35,22 @@ __export(prisma_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(prisma_exports);
37
37
  var import_crypto = __toESM(require("crypto"), 1);
38
+
39
+ // src/utils/query-key.ts
40
+ function deterministicStringify(val) {
41
+ if (val instanceof Date) return `date:${JSON.stringify(val.toISOString())}`;
42
+ if (typeof val === "bigint") return `bigint:${val}`;
43
+ if (val instanceof Uint8Array) return `binary:${Buffer.from(val.buffer, val.byteOffset, val.byteLength).toString("base64")}`;
44
+ if (val && typeof val === "object" && typeof val.toJSON === "function") {
45
+ return deterministicStringify(val.toJSON());
46
+ }
47
+ if (val === null || typeof val !== "object") return JSON.stringify(val) ?? "undefined";
48
+ if (Array.isArray(val)) return `[${val.map(deterministicStringify).join(",")}]`;
49
+ const obj = val;
50
+ return `{${Object.keys(obj).sort().map((key) => `${JSON.stringify(key)}:${deterministicStringify(obj[key])}`).join(",")}}`;
51
+ }
52
+
53
+ // src/prisma/index.ts
38
54
  var READ_OPERATIONS = /* @__PURE__ */ new Set([
39
55
  "findUnique",
40
56
  "findUniqueOrThrow",
@@ -56,23 +72,6 @@ var MUTATION_OPERATIONS = /* @__PURE__ */ new Set([
56
72
  "delete",
57
73
  "deleteMany"
58
74
  ]);
59
- function deterministicStringify(val) {
60
- if (val instanceof Date) return `date:${JSON.stringify(val.toISOString())}`;
61
- if (typeof val === "bigint") return `bigint:${val}`;
62
- if (val instanceof Uint8Array) return `binary:${Buffer.from(val.buffer, val.byteOffset, val.byteLength).toString("base64")}`;
63
- if (val && typeof val === "object" && typeof val.toJSON === "function") {
64
- return deterministicStringify(val.toJSON());
65
- }
66
- if (val === null || typeof val !== "object") {
67
- return JSON.stringify(val) ?? "undefined";
68
- }
69
- if (Array.isArray(val)) {
70
- return `[${val.map(deterministicStringify).join(",")}]`;
71
- }
72
- const obj = val;
73
- const keys = Object.keys(obj).sort();
74
- return `{${keys.map((k) => `${JSON.stringify(k)}:${deterministicStringify(obj[k])}`).join(",")}}`;
75
- }
76
75
  function generatePrismaCacheKey(model, operation, args) {
77
76
  const normalized = deterministicStringify({ model, operation, args });
78
77
  const hash = import_crypto.default.createHash("sha256").update(normalized, "utf8").digest("hex").slice(0, 32);
@@ -86,23 +85,25 @@ function withTriCache(options) {
86
85
  $allModels: {
87
86
  async $allOperations({ model, operation, args, query }) {
88
87
  const modelTag = model.toLowerCase();
88
+ const queryArgs = args ?? {};
89
+ const cacheConfig = queryArgs.cache;
90
+ let cleanArgs = args;
91
+ if (args && Object.prototype.hasOwnProperty.call(args, "cache")) {
92
+ const { cache: _cacheOpt, ...rest } = args;
93
+ cleanArgs = rest;
94
+ }
89
95
  if (autoInvalidate && MUTATION_OPERATIONS.has(operation)) {
90
- const { cache: _cacheOpt, ...cleanMutationArgs } = args ?? {};
91
- const result = await query(cleanMutationArgs);
96
+ const result = await query(cleanArgs);
92
97
  await cache.invalidateTag(modelTag);
93
98
  return result;
94
99
  }
95
100
  if (READ_OPERATIONS.has(operation)) {
96
- const queryArgs = args ?? {};
97
- const cacheConfig = queryArgs.cache;
98
101
  if (cacheConfig === false) {
99
- const { cache: _c, ...cleanArgs } = queryArgs;
100
102
  return query(cleanArgs);
101
103
  }
102
104
  if (cacheConfig !== void 0 || autoCache) {
103
105
  const opts = typeof cacheConfig === "object" && cacheConfig !== null ? cacheConfig : {};
104
- const { cache: _c, ...cleanArgs } = queryArgs;
105
- const key = opts.key ?? generatePrismaCacheKey(model, operation, cleanArgs);
106
+ const key = opts.key ?? generatePrismaCacheKey(model, operation, cleanArgs ?? {});
106
107
  const tags = [.../* @__PURE__ */ new Set([modelTag, ...opts.tags ?? []])];
107
108
  return cache.wrap(
108
109
  key,
@@ -120,7 +121,7 @@ function withTriCache(options) {
120
121
  );
121
122
  }
122
123
  }
123
- return query(args);
124
+ return query(cleanArgs);
124
125
  }
125
126
  }
126
127
  }
@@ -1,5 +1,5 @@
1
- import { C as CacheService } from '../cache-service-CWI4jkS7.cjs';
2
- import { W as WrapOptions } from '../types-BA4pz1A0.cjs';
1
+ import { C as CacheService } from '../cache-service-BV5T8-20.cjs';
2
+ import { W as WrapOptions } from '../types-F8vRWMrE.cjs';
3
3
  import 'crypto';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { C as CacheService } from '../cache-service-B108FzER.js';
2
- import { W as WrapOptions } from '../types-BA4pz1A0.js';
1
+ import { C as CacheService } from '../cache-service-tpyrXvlH.js';
2
+ import { W as WrapOptions } from '../types-F8vRWMrE.js';
3
3
  import 'crypto';
4
4
 
5
5
  /**
@@ -1,3 +1,7 @@
1
+ import {
2
+ deterministicStringify
3
+ } from "../chunk-S5N65I45.js";
4
+
1
5
  // src/prisma/index.ts
2
6
  import crypto from "crypto";
3
7
  var READ_OPERATIONS = /* @__PURE__ */ new Set([
@@ -21,23 +25,6 @@ var MUTATION_OPERATIONS = /* @__PURE__ */ new Set([
21
25
  "delete",
22
26
  "deleteMany"
23
27
  ]);
24
- function deterministicStringify(val) {
25
- if (val instanceof Date) return `date:${JSON.stringify(val.toISOString())}`;
26
- if (typeof val === "bigint") return `bigint:${val}`;
27
- if (val instanceof Uint8Array) return `binary:${Buffer.from(val.buffer, val.byteOffset, val.byteLength).toString("base64")}`;
28
- if (val && typeof val === "object" && typeof val.toJSON === "function") {
29
- return deterministicStringify(val.toJSON());
30
- }
31
- if (val === null || typeof val !== "object") {
32
- return JSON.stringify(val) ?? "undefined";
33
- }
34
- if (Array.isArray(val)) {
35
- return `[${val.map(deterministicStringify).join(",")}]`;
36
- }
37
- const obj = val;
38
- const keys = Object.keys(obj).sort();
39
- return `{${keys.map((k) => `${JSON.stringify(k)}:${deterministicStringify(obj[k])}`).join(",")}}`;
40
- }
41
28
  function generatePrismaCacheKey(model, operation, args) {
42
29
  const normalized = deterministicStringify({ model, operation, args });
43
30
  const hash = crypto.createHash("sha256").update(normalized, "utf8").digest("hex").slice(0, 32);
@@ -51,23 +38,25 @@ function withTriCache(options) {
51
38
  $allModels: {
52
39
  async $allOperations({ model, operation, args, query }) {
53
40
  const modelTag = model.toLowerCase();
41
+ const queryArgs = args ?? {};
42
+ const cacheConfig = queryArgs.cache;
43
+ let cleanArgs = args;
44
+ if (args && Object.prototype.hasOwnProperty.call(args, "cache")) {
45
+ const { cache: _cacheOpt, ...rest } = args;
46
+ cleanArgs = rest;
47
+ }
54
48
  if (autoInvalidate && MUTATION_OPERATIONS.has(operation)) {
55
- const { cache: _cacheOpt, ...cleanMutationArgs } = args ?? {};
56
- const result = await query(cleanMutationArgs);
49
+ const result = await query(cleanArgs);
57
50
  await cache.invalidateTag(modelTag);
58
51
  return result;
59
52
  }
60
53
  if (READ_OPERATIONS.has(operation)) {
61
- const queryArgs = args ?? {};
62
- const cacheConfig = queryArgs.cache;
63
54
  if (cacheConfig === false) {
64
- const { cache: _c, ...cleanArgs } = queryArgs;
65
55
  return query(cleanArgs);
66
56
  }
67
57
  if (cacheConfig !== void 0 || autoCache) {
68
58
  const opts = typeof cacheConfig === "object" && cacheConfig !== null ? cacheConfig : {};
69
- const { cache: _c, ...cleanArgs } = queryArgs;
70
- const key = opts.key ?? generatePrismaCacheKey(model, operation, cleanArgs);
59
+ const key = opts.key ?? generatePrismaCacheKey(model, operation, cleanArgs ?? {});
71
60
  const tags = [.../* @__PURE__ */ new Set([modelTag, ...opts.tags ?? []])];
72
61
  return cache.wrap(
73
62
  key,
@@ -85,7 +74,7 @@ function withTriCache(options) {
85
74
  );
86
75
  }
87
76
  }
88
- return query(args);
77
+ return query(cleanArgs);
89
78
  }
90
79
  }
91
80
  }