@zuplo/cli 6.70.28 → 6.70.30

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 (179) hide show
  1. package/node_modules/@protobufjs/fetch/CHANGELOG.md +8 -0
  2. package/node_modules/@protobufjs/fetch/index.d.ts +7 -7
  3. package/node_modules/@protobufjs/fetch/index.js +4 -7
  4. package/node_modules/@protobufjs/fetch/package.json +7 -5
  5. package/node_modules/@protobufjs/fetch/tests/data/file.txt +1 -0
  6. package/node_modules/@protobufjs/fetch/tests/index.js +150 -8
  7. package/node_modules/@protobufjs/fetch/util/fs.js +11 -0
  8. package/node_modules/@protobufjs/inquire/CHANGELOG.md +8 -0
  9. package/node_modules/@protobufjs/inquire/index.d.ts +1 -0
  10. package/node_modules/@protobufjs/inquire/index.js +1 -0
  11. package/node_modules/@protobufjs/inquire/package.json +1 -1
  12. package/node_modules/@zuplo/core/package.json +1 -1
  13. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +21 -17
  14. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
  15. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.js +65 -35
  16. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
  17. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
  18. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +3 -3
  19. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -1
  20. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.js +1 -2
  21. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -1
  22. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.d.ts +21 -17
  23. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  24. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.js +65 -35
  25. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  26. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  27. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.min.js.map +3 -3
  28. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.d.ts +21 -17
  29. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
  30. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.js +65 -35
  31. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
  32. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
  33. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +3 -3
  34. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -1
  35. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.js +1 -2
  36. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -1
  37. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -1
  38. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.js +1 -2
  39. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -1
  40. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.d.ts +21 -17
  41. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  42. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.js +65 -35
  43. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  44. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  45. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.min.js.map +3 -3
  46. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -1
  47. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.js +1 -2
  48. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -1
  49. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.d.ts +21 -17
  50. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  51. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.js +65 -35
  52. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  53. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  54. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.min.js.map +3 -3
  55. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.d.ts +21 -17
  56. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  57. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.js +65 -35
  58. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  59. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  60. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.min.js.map +3 -3
  61. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -1
  62. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.js +1 -2
  63. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -1
  64. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -1
  65. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.js +1 -2
  66. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.js.map +1 -1
  67. package/node_modules/@zuplo/editor/node_modules/lru-cache/package.json +8 -8
  68. package/node_modules/@zuplo/graphql/package.json +1 -1
  69. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  70. package/node_modules/@zuplo/otel/package.json +1 -1
  71. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  72. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  73. package/node_modules/@zuplo/runtime/package.json +1 -1
  74. package/node_modules/hono/dist/adapter/bun/serve-static.js +1 -1
  75. package/node_modules/hono/dist/adapter/cloudflare-workers/serve-static.js +1 -1
  76. package/node_modules/hono/dist/adapter/deno/serve-static.js +1 -1
  77. package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
  78. package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/serve-static.js +1 -1
  79. package/node_modules/hono/dist/cjs/adapter/deno/serve-static.js +1 -1
  80. package/node_modules/hono/dist/cjs/middleware/cache/index.js +30 -25
  81. package/node_modules/hono/dist/cjs/request.js +15 -0
  82. package/node_modules/hono/dist/cjs/utils/cookie.js +3 -3
  83. package/node_modules/hono/dist/cjs/utils/stream.js +4 -2
  84. package/node_modules/hono/dist/middleware/cache/index.js +30 -25
  85. package/node_modules/hono/dist/request.js +15 -0
  86. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
  87. package/node_modules/hono/dist/types/adapter/bun/serve-static.d.ts +1 -1
  88. package/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts +2 -2
  89. package/node_modules/hono/dist/types/adapter/deno/serve-static.d.ts +1 -1
  90. package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +6 -5
  91. package/node_modules/hono/dist/types/middleware/cache/index.d.ts +1 -1
  92. package/node_modules/hono/dist/types/request.d.ts +13 -0
  93. package/node_modules/hono/dist/utils/cookie.js +3 -3
  94. package/node_modules/hono/dist/utils/stream.js +4 -2
  95. package/node_modules/hono/package.json +2 -2
  96. package/node_modules/protobufjs/dist/light/protobuf.js +187 -153
  97. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  98. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  99. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  100. package/node_modules/protobufjs/dist/minimal/protobuf.js +14 -5
  101. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  102. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  103. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  104. package/node_modules/protobufjs/dist/protobuf.js +207 -173
  105. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  106. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  107. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  108. package/node_modules/protobufjs/package.json +6 -3
  109. package/node_modules/protobufjs/src/util/fs.js +11 -0
  110. package/node_modules/protobufjs/src/util/minimal.js +10 -2
  111. package/node_modules/protobufjs/src/util.js +1 -1
  112. package/node_modules/qs/CHANGELOG.md +10 -0
  113. package/node_modules/qs/README.md +1 -1
  114. package/node_modules/qs/dist/qs.js +15 -15
  115. package/node_modules/qs/eslint.config.mjs +1 -0
  116. package/node_modules/qs/lib/parse.js +52 -22
  117. package/node_modules/qs/lib/stringify.js +11 -4
  118. package/node_modules/qs/package.json +2 -2
  119. package/node_modules/qs/test/parse.js +49 -0
  120. package/node_modules/qs/test/stringify.js +129 -0
  121. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +21 -17
  122. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
  123. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.js +65 -35
  124. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
  125. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
  126. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +3 -3
  127. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -1
  128. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.js +1 -2
  129. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -1
  130. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts +21 -17
  131. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  132. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js +65 -35
  133. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  134. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  135. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js.map +3 -3
  136. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.d.ts +21 -17
  137. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
  138. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.js +65 -35
  139. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
  140. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
  141. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +3 -3
  142. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -1
  143. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.js +1 -2
  144. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -1
  145. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -1
  146. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.js +1 -2
  147. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -1
  148. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.d.ts +21 -17
  149. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  150. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.js +65 -35
  151. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  152. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  153. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.min.js.map +3 -3
  154. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -1
  155. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.js +1 -2
  156. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -1
  157. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts +21 -17
  158. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  159. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js +65 -35
  160. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  161. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  162. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js.map +3 -3
  163. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.d.ts +21 -17
  164. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  165. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.js +65 -35
  166. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  167. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  168. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.min.js.map +3 -3
  169. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -1
  170. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.js +1 -2
  171. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -1
  172. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -1
  173. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.js +1 -2
  174. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.js.map +1 -1
  175. package/node_modules/rimraf/node_modules/lru-cache/package.json +8 -8
  176. package/node_modules/toad-cache/dist/toad-cache.cjs +185 -185
  177. package/node_modules/toad-cache/dist/toad-cache.mjs +181 -181
  178. package/node_modules/toad-cache/package.json +33 -31
  179. package/package.json +6 -6
@@ -880,6 +880,7 @@ class LRUCache {
880
880
  status.key = k;
881
881
  if (v !== undefined)
882
882
  status.value = v;
883
+ status.cache = this;
883
884
  }
884
885
  const result = this.#set(k, v, setOptions);
885
886
  if (status && diagnostics_channel_js_1.metrics.hasSubscribers) {
@@ -887,7 +888,7 @@ class LRUCache {
887
888
  }
888
889
  return result;
889
890
  }
890
- #set(k, v, setOptions = {}) {
891
+ #set(k, v, setOptions, bf) {
891
892
  const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
892
893
  if (v === undefined) {
893
894
  if (status)
@@ -896,7 +897,8 @@ class LRUCache {
896
897
  return this;
897
898
  }
898
899
  let { noUpdateTTL = this.noUpdateTTL } = setOptions;
899
- if (status && !this.#isBackgroundFetch(v))
900
+ const isBF = this.#isBackgroundFetch(v);
901
+ if (status && !isBF)
900
902
  status.value = v;
901
903
  const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation, status);
902
904
  // if the item doesn't fit, don't do anything
@@ -928,52 +930,68 @@ class LRUCache {
928
930
  if (status)
929
931
  status.set = 'add';
930
932
  noUpdateTTL = false;
931
- if (this.#hasOnInsert) {
933
+ if (this.#hasOnInsert && !isBF) {
932
934
  this.#onInsert?.(v, k, 'add');
933
935
  }
934
936
  }
935
937
  else {
936
938
  // update
939
+ // might be updating a background fetch!
937
940
  this.#moveToTail(index);
938
941
  const oldVal = this.#valList[index];
939
942
  if (v !== oldVal) {
940
- if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
941
- oldVal.__abortController.abort(new Error('replaced'));
942
- const { __staleWhileFetching: s } = oldVal;
943
- if (s !== undefined && !noDisposeOnSet) {
943
+ if (!noDisposeOnSet) {
944
+ if (this.#isBackgroundFetch(oldVal)) {
945
+ if (oldVal !== bf) {
946
+ // setting over a background fetch, not merely resolving it.
947
+ oldVal.__abortController.abort(new Error('replaced'));
948
+ }
949
+ const { __staleWhileFetching: s } = oldVal;
950
+ if (s !== undefined && s !== v) {
951
+ if (this.#hasDispose) {
952
+ this.#dispose?.(s, k, 'set');
953
+ }
954
+ if (this.#hasDisposeAfter) {
955
+ this.#disposed?.push([s, k, 'set']);
956
+ }
957
+ }
958
+ }
959
+ else {
944
960
  if (this.#hasDispose) {
945
- this.#dispose?.(s, k, 'set');
961
+ this.#dispose?.(oldVal, k, 'set');
946
962
  }
947
963
  if (this.#hasDisposeAfter) {
948
- this.#disposed?.push([s, k, 'set']);
964
+ this.#disposed?.push([oldVal, k, 'set']);
949
965
  }
950
966
  }
951
967
  }
952
- else if (!noDisposeOnSet) {
953
- if (this.#hasDispose) {
954
- this.#dispose?.(oldVal, k, 'set');
955
- }
956
- if (this.#hasDisposeAfter) {
957
- this.#disposed?.push([oldVal, k, 'set']);
958
- }
959
- }
960
968
  this.#removeItemSize(index);
961
969
  this.#addItemSize(index, size, status);
962
970
  this.#valList[index] = v;
963
- if (status) {
964
- status.set = 'replace';
971
+ if (!isBF) {
965
972
  const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ?
966
973
  oldVal.__staleWhileFetching
967
974
  : oldVal;
968
- if (oldValue !== undefined)
969
- status.oldValue = oldValue;
975
+ const setType = oldValue === undefined ? 'add'
976
+ : v !== oldValue ? 'replace'
977
+ : 'update';
978
+ if (status) {
979
+ status.set = setType;
980
+ if (oldValue !== undefined)
981
+ status.oldValue = oldValue;
982
+ }
983
+ if (this.#hasOnInsert) {
984
+ this.onInsert?.(v, k, setType);
985
+ }
970
986
  }
971
987
  }
972
- else if (status) {
973
- status.set = 'update';
974
- }
975
- if (this.#hasOnInsert) {
976
- this.onInsert?.(v, k, v === oldVal ? 'update' : 'replace');
988
+ else if (!isBF) {
989
+ if (status) {
990
+ status.set = 'update';
991
+ }
992
+ if (this.#hasOnInsert) {
993
+ this.onInsert?.(v, k, 'update');
994
+ }
977
995
  }
978
996
  }
979
997
  if (ttl !== 0 && !this.#ttls) {
@@ -1028,15 +1046,18 @@ class LRUCache {
1028
1046
  const head = this.#head;
1029
1047
  const k = this.#keyList[head];
1030
1048
  const v = this.#valList[head];
1031
- if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
1049
+ const isBF = this.#isBackgroundFetch(v);
1050
+ if (isBF) {
1032
1051
  v.__abortController.abort(new Error('evicted'));
1033
1052
  }
1034
- else if (this.#hasDispose || this.#hasDisposeAfter) {
1053
+ const oldValue = isBF ? v.__staleWhileFetching : v;
1054
+ if ((this.#hasDispose || this.#hasDisposeAfter) &&
1055
+ oldValue !== undefined) {
1035
1056
  if (this.#hasDispose) {
1036
- this.#dispose?.(v, k, 'evict');
1057
+ this.#dispose?.(oldValue, k, 'evict');
1037
1058
  }
1038
1059
  if (this.#hasDisposeAfter) {
1039
- this.#disposed?.push([v, k, 'evict']);
1060
+ this.#disposed?.push([oldValue, k, 'evict']);
1040
1061
  }
1041
1062
  }
1042
1063
  this.#removeItemSize(head);
@@ -1083,6 +1104,7 @@ class LRUCache {
1083
1104
  if (status) {
1084
1105
  status.op = 'has';
1085
1106
  status.key = k;
1107
+ status.cache = this;
1086
1108
  }
1087
1109
  const result = this.#has(k, hasOptions);
1088
1110
  if (diagnostics_channel_js_1.metrics.hasSubscribers)
@@ -1130,6 +1152,7 @@ class LRUCache {
1130
1152
  if (status) {
1131
1153
  status.op = 'peek';
1132
1154
  status.key = k;
1155
+ status.cache = this;
1133
1156
  }
1134
1157
  peekOptions.status = status;
1135
1158
  const result = this.#peek(k, peekOptions);
@@ -1212,7 +1235,7 @@ class LRUCache {
1212
1235
  else {
1213
1236
  if (options.status)
1214
1237
  options.status.fetchUpdated = true;
1215
- this.#set(k, v, fetchOpts.options);
1238
+ this.#set(k, v, fetchOpts.options, bf);
1216
1239
  }
1217
1240
  }
1218
1241
  return v;
@@ -1258,9 +1281,6 @@ class LRUCache {
1258
1281
  };
1259
1282
  const pcall = (res, rej) => {
1260
1283
  const fmp = this.#fetchMethod?.(k, v, fetchOpts);
1261
- if (fmp && fmp instanceof Promise) {
1262
- fmp.then(v => res(v === undefined ? undefined : v), rej);
1263
- }
1264
1284
  // ignored, we go until we finish, regardless.
1265
1285
  // defer check until we are actually aborting,
1266
1286
  // so fetchMethod can override.
@@ -1273,6 +1293,12 @@ class LRUCache {
1273
1293
  }
1274
1294
  }
1275
1295
  });
1296
+ if (fmp && fmp instanceof Promise) {
1297
+ fmp.then(v => res(v === undefined ? undefined : v), rej);
1298
+ }
1299
+ else if (fmp !== undefined) {
1300
+ res(fmp);
1301
+ }
1276
1302
  };
1277
1303
  if (options.status)
1278
1304
  options.status.fetchDispatched = true;
@@ -1328,6 +1354,7 @@ class LRUCache {
1328
1354
  status.key = k;
1329
1355
  if (forceRefresh)
1330
1356
  status.forceRefresh = true;
1357
+ status.cache = this;
1331
1358
  }
1332
1359
  if (!this.#hasFetchMethod) {
1333
1360
  if (status)
@@ -1430,6 +1457,7 @@ class LRUCache {
1430
1457
  if (memoOptions.context) {
1431
1458
  status.context = memoOptions.context;
1432
1459
  }
1460
+ status.cache = this;
1433
1461
  }
1434
1462
  const result = this.#memo(k, memoOptions);
1435
1463
  if (status)
@@ -1476,6 +1504,7 @@ class LRUCache {
1476
1504
  if (status) {
1477
1505
  status.op = 'get';
1478
1506
  status.key = k;
1507
+ status.cache = this;
1479
1508
  }
1480
1509
  const result = this.#get(k, getOptions);
1481
1510
  if (status) {
@@ -1574,6 +1603,7 @@ class LRUCache {
1574
1603
  op: 'delete',
1575
1604
  delete: reason,
1576
1605
  key: k,
1606
+ cache: this,
1577
1607
  });
1578
1608
  }
1579
1609
  let deleted = false;
@@ -1654,7 +1684,7 @@ class LRUCache {
1654
1684
  }
1655
1685
  }
1656
1686
  this.#keyMap.clear();
1657
- this.#valList.fill(undefined);
1687
+ void this.#valList.fill(undefined);
1658
1688
  this.#keyList.fill(undefined);
1659
1689
  if (this.#ttls && this.#starts) {
1660
1690
  this.#ttls.fill(0);