@shopify/cli 3.74.0 → 3.75.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 (102) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +99 -0
  2. package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +2 -1
  3. package/dist/assets/hydrogen/starter/app/root.tsx +12 -2
  4. package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +1 -0
  5. package/dist/assets/hydrogen/starter/package.json +10 -10
  6. package/dist/assets/hydrogen/starter/tsconfig.json +1 -1
  7. package/dist/assets/hydrogen/starter/vite.config.ts +1 -0
  8. package/dist/assets/hydrogen/tailwind/package.json +1 -1
  9. package/dist/assets/hydrogen/tailwind/tailwind.css +1 -1
  10. package/dist/assets/hydrogen/vite/package.json +1 -1
  11. package/dist/assets/hydrogen/vite/vite.config.js +1 -0
  12. package/dist/{chunk-FCWD4NEK.js → chunk-2B5C3QFS.js} +3 -3
  13. package/dist/{chunk-MDJOXUMQ.js → chunk-2FZJER24.js} +4 -4
  14. package/dist/{chunk-IYQNHNNP.js → chunk-57EEPGQZ.js} +3 -3
  15. package/dist/{chunk-R7RENZQC.js → chunk-5KSWCELC.js} +3 -3
  16. package/dist/{chunk-QRARFXIM.js → chunk-6HBKMQLD.js} +15 -14
  17. package/dist/{chunk-5JC3BUPR.js → chunk-6W5TMCT3.js} +3 -3
  18. package/dist/{chunk-MSBZRBI5.js → chunk-6XBYMBOQ.js} +4 -4
  19. package/dist/{chunk-UB7RN523.js → chunk-B7ABTOI4.js} +6 -6
  20. package/dist/{chunk-WKO4CJCL.js → chunk-BDLU7EEZ.js} +14 -10
  21. package/dist/{chunk-XJNTFQIK.js → chunk-BTMRJLQ7.js} +5 -5
  22. package/dist/{chunk-76NEANNG.js → chunk-DV2H7WDY.js} +430 -207
  23. package/dist/{chunk-FMXC2O6H.js → chunk-ESYWXFSK.js} +2 -2
  24. package/dist/{chunk-WBTJ7MQU.js → chunk-GMHA2S7O.js} +3 -3
  25. package/dist/{chunk-BWBSJLZN.js → chunk-GQIMWIIF.js} +9970 -9968
  26. package/dist/{chunk-WNUVUNTL.js → chunk-I3WJF5NM.js} +7 -7
  27. package/dist/{chunk-B27LGWRZ.js → chunk-IAM7IYO3.js} +3 -3
  28. package/dist/{chunk-5JWRABV2.js → chunk-ILXYHK4Q.js} +8 -8
  29. package/dist/{chunk-VI4NVMJH.js → chunk-IML7XVTM.js} +2 -2
  30. package/dist/{chunk-53WQGP7S.js → chunk-KMPW66LQ.js} +4 -4
  31. package/dist/{chunk-I6YWZKVU.js → chunk-L656JYPI.js} +2 -2
  32. package/dist/{chunk-7T4EKFVU.js → chunk-MN33EVV7.js} +2 -2
  33. package/dist/{chunk-LH6BHL6J.js → chunk-MOZOZ3LN.js} +3 -3
  34. package/dist/{chunk-5CLGH5PH.js → chunk-MP5RLDFN.js} +15 -8
  35. package/dist/{chunk-GVMUVIT5.js → chunk-OK2LJ3F3.js} +6 -6
  36. package/dist/{chunk-J673ZU5S.js → chunk-ORGKANED.js} +3 -3
  37. package/dist/{chunk-6JNRBEP6.js → chunk-QJQSCN3A.js} +5 -5
  38. package/dist/{chunk-NUW6LQU4.js → chunk-S4YW77H4.js} +4 -4
  39. package/dist/{chunk-ACIVN2Q4.js → chunk-S576QAPY.js} +2 -2
  40. package/dist/{chunk-JWRRKMF2.js → chunk-S6L5743K.js} +2 -2
  41. package/dist/{chunk-D5AR5HKB.js → chunk-SWQM7ICR.js} +2 -2
  42. package/dist/{chunk-XBIDXV7B.js → chunk-T35HYPVZ.js} +3 -3
  43. package/dist/{chunk-QEUQO265.js → chunk-T4WJXSDW.js} +4 -4
  44. package/dist/{chunk-4QRIOWN3.js → chunk-TJDZDZWG.js} +2 -2
  45. package/dist/{chunk-4W33LVQQ.js → chunk-VM4XPRZK.js} +3 -3
  46. package/dist/{chunk-CDQA3SST.js → chunk-VSKRQ3JT.js} +33 -29
  47. package/dist/{chunk-PMOQBQSE.js → chunk-W6IJP4MY.js} +3 -3
  48. package/dist/{chunk-L3FVJFIT.js → chunk-X3CFSDHA.js} +94 -17
  49. package/dist/{chunk-AKL7T64Q.js → chunk-Y53XECL6.js} +34 -34
  50. package/dist/{chunk-2GCE2GUM.js → chunk-YVTRJWYT.js} +3 -3
  51. package/dist/cli/commands/auth/logout.js +14 -15
  52. package/dist/cli/commands/auth/logout.test.js +16 -17
  53. package/dist/cli/commands/cache/clear.js +13 -14
  54. package/dist/cli/commands/debug/command-flags.js +13 -14
  55. package/dist/cli/commands/docs/generate.js +13 -14
  56. package/dist/cli/commands/docs/generate.test.js +14 -15
  57. package/dist/cli/commands/help.js +13 -14
  58. package/dist/cli/commands/kitchen-sink/async.js +14 -15
  59. package/dist/cli/commands/kitchen-sink/async.test.js +15 -16
  60. package/dist/cli/commands/kitchen-sink/index.js +16 -17
  61. package/dist/cli/commands/kitchen-sink/index.test.js +17 -18
  62. package/dist/cli/commands/kitchen-sink/prompts.js +14 -15
  63. package/dist/cli/commands/kitchen-sink/prompts.test.js +15 -16
  64. package/dist/cli/commands/kitchen-sink/static.js +14 -15
  65. package/dist/cli/commands/kitchen-sink/static.test.js +15 -16
  66. package/dist/cli/commands/notifications/generate.js +14 -15
  67. package/dist/cli/commands/notifications/list.js +14 -15
  68. package/dist/cli/commands/search.js +14 -15
  69. package/dist/cli/commands/upgrade.js +14 -15
  70. package/dist/cli/commands/upgrade.test.js +1 -2
  71. package/dist/cli/commands/version.js +14 -15
  72. package/dist/cli/commands/version.test.js +15 -16
  73. package/dist/cli/services/commands/notifications.js +8 -9
  74. package/dist/cli/services/commands/search.js +4 -5
  75. package/dist/cli/services/commands/search.test.js +5 -6
  76. package/dist/cli/services/commands/version.js +5 -6
  77. package/dist/cli/services/commands/version.test.js +7 -8
  78. package/dist/cli/services/kitchen-sink/async.js +4 -5
  79. package/dist/cli/services/kitchen-sink/prompts.js +4 -5
  80. package/dist/cli/services/kitchen-sink/static.js +4 -5
  81. package/dist/cli/services/upgrade.js +5 -6
  82. package/dist/cli/services/upgrade.test.js +8 -9
  83. package/dist/{custom-oclif-loader-ZY5GUSB3.js → custom-oclif-loader-MPQ33GKJ.js} +4 -5
  84. package/dist/{del-FBU5JYXS.js → del-2SYBVRHB.js} +2 -2
  85. package/dist/devtools-BA4WST2D.js +72 -0
  86. package/dist/{error-handler-YRN4E6SY.js → error-handler-ABXDEJNM.js} +11 -12
  87. package/dist/hooks/postrun.js +9 -10
  88. package/dist/hooks/prerun.js +9 -10
  89. package/dist/index.js +28943 -12546
  90. package/dist/{lib-E2DSNKUX.js → lib-SGEWXU7Z.js} +3 -3
  91. package/dist/{local-VTZT5Q4L.js → local-DGW3VZG7.js} +6 -5
  92. package/dist/{magic-string.es-PJMYOE6F.js → magic-string.es-BSVDQOZI.js} +32 -20
  93. package/dist/{morph-ACVSDUS7.js → morph-BTANDGVW.js} +9 -9
  94. package/dist/{node-ONVZF27D.js → node-GVOKD67H.js} +17 -18
  95. package/dist/{node-package-manager-BZNXJETD.js → node-package-manager-WEN6FJ7Z.js} +5 -6
  96. package/dist/{npa-JAX2F6CO.js → npa-E675GQOI.js} +123 -33
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/dist/{ui-3RKZNTJR.js → ui-TWIKWYG2.js} +4 -5
  99. package/dist/{workerd-PSNADDQA.js → workerd-SK47YSGA.js} +16 -17
  100. package/oclif.manifest.json +33 -62
  101. package/package.json +11 -10
  102. package/dist/chunk-CFIKVUNW.js +0 -45
@@ -10,9 +10,9 @@ import {
10
10
  init_cjs_shims
11
11
  } from "./chunk-PKR7KJ6P.js";
12
12
 
13
- // ../../node_modules/.pnpm/lru-cache@10.2.2/node_modules/lru-cache/dist/commonjs/index.js
13
+ // ../../node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/commonjs/index.js
14
14
  var require_commonjs = __commonJS({
15
- "../../node_modules/.pnpm/lru-cache@10.2.2/node_modules/lru-cache/dist/commonjs/index.js"(exports) {
15
+ "../../node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/commonjs/index.js"(exports) {
16
16
  "use strict";
17
17
  init_cjs_shims();
18
18
  Object.defineProperty(exports, "__esModule", { value: !0 });
@@ -76,14 +76,13 @@ var require_commonjs = __commonJS({
76
76
  return this.heap[--this.length];
77
77
  }
78
78
  }, LRUCache = class _LRUCache {
79
- // properties coming in from the options of these, only max and maxSize
80
- // really *need* to be protected. The rest can be modified, as they just
81
- // set defaults for various methods.
79
+ // options that cannot be changed without disaster
82
80
  #max;
83
81
  #maxSize;
84
82
  #dispose;
85
83
  #disposeAfter;
86
84
  #fetchMethod;
85
+ #memoMethod;
87
86
  /**
88
87
  * {@link LRUCache.OptionsBase.ttl}
89
88
  */
@@ -229,6 +228,9 @@ var require_commonjs = __commonJS({
229
228
  get fetchMethod() {
230
229
  return this.#fetchMethod;
231
230
  }
231
+ get memoMethod() {
232
+ return this.#memoMethod;
233
+ }
232
234
  /**
233
235
  * {@link LRUCache.OptionsBase.dispose} (read-only)
234
236
  */
@@ -242,7 +244,7 @@ var require_commonjs = __commonJS({
242
244
  return this.#disposeAfter;
243
245
  }
244
246
  constructor(options) {
245
- let { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
247
+ let { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
246
248
  if (max !== 0 && !isPosInt(max))
247
249
  throw new TypeError("max option must be a nonnegative integer");
248
250
  let UintArray = max ? getUintArray(max) : Array;
@@ -254,7 +256,9 @@ var require_commonjs = __commonJS({
254
256
  if (typeof this.sizeCalculation != "function")
255
257
  throw new TypeError("sizeCalculation set to non-function");
256
258
  }
257
- if (fetchMethod !== void 0 && typeof fetchMethod != "function")
259
+ if (memoMethod !== void 0 && typeof memoMethod != "function")
260
+ throw new TypeError("memoMethod must be a function if defined");
261
+ if (this.#memoMethod = memoMethod, fetchMethod !== void 0 && typeof fetchMethod != "function")
258
262
  throw new TypeError("fetchMethod must be a function if specified");
259
263
  if (this.#fetchMethod = fetchMethod, this.#hasFetchMethod = !!fetchMethod, this.#keyMap = /* @__PURE__ */ new Map(), this.#keyList = new Array(max).fill(void 0), this.#valList = new Array(max).fill(void 0), this.#next = new UintArray(max), this.#prev = new UintArray(max), this.#head = 0, this.#tail = 0, this.#free = Stack.create(max), this.#size = 0, this.#calculatedSize = 0, typeof dispose == "function" && (this.#dispose = dispose), typeof disposeAfter == "function" ? (this.#disposeAfter = disposeAfter, this.#disposed = []) : (this.#disposeAfter = void 0, this.#disposed = void 0), this.#hasDispose = !!this.#dispose, this.#hasDisposeAfter = !!this.#disposeAfter, this.noDisposeOnSet = !!noDisposeOnSet, this.noUpdateTTL = !!noUpdateTTL, this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection, this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection, this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort, this.ignoreFetchAbort = !!ignoreFetchAbort, this.maxEntrySize !== 0) {
260
264
  if (this.#maxSize !== 0 && !isPosInt(this.#maxSize))
@@ -276,7 +280,8 @@ var require_commonjs = __commonJS({
276
280
  }
277
281
  }
278
282
  /**
279
- * Return the remaining TTL time for a given entry key
283
+ * Return the number of ms left in the item's TTL. If item is not in cache,
284
+ * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
280
285
  */
281
286
  getRemainingTTL(key) {
282
287
  return this.#keyMap.has(key) ? 1 / 0 : 0;
@@ -286,7 +291,7 @@ var require_commonjs = __commonJS({
286
291
  this.#ttls = ttls, this.#starts = starts, this.#setItemTTL = (index, ttl, start = perf.now()) => {
287
292
  if (starts[index] = ttl !== 0 ? start : 0, ttls[index] = ttl, ttl !== 0 && this.ttlAutopurge) {
288
293
  let t = setTimeout(() => {
289
- this.#isStale(index) && this.delete(this.#keyList[index]);
294
+ this.#isStale(index) && this.#delete(this.#keyList[index], "expire");
290
295
  }, ttl + 1);
291
296
  t.unref && t.unref();
292
297
  }
@@ -447,13 +452,14 @@ var require_commonjs = __commonJS({
447
452
  return this.entries();
448
453
  }
449
454
  /**
450
- * A String value that is used in the creation of the default string description of an object.
451
- * Called by the built-in method Object.prototype.toString.
455
+ * A String value that is used in the creation of the default string
456
+ * description of an object. Called by the built-in method
457
+ * `Object.prototype.toString`.
452
458
  */
453
459
  [Symbol.toStringTag] = "LRUCache";
454
460
  /**
455
461
  * Find a value for which the supplied fn method returns a truthy value,
456
- * similar to Array.find(). fn is called as fn(value, key, cache).
462
+ * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
457
463
  */
458
464
  find(fn, getOptions = {}) {
459
465
  for (let i of this.#indexes()) {
@@ -463,10 +469,15 @@ var require_commonjs = __commonJS({
463
469
  }
464
470
  }
465
471
  /**
466
- * Call the supplied function on each item in the cache, in order from
467
- * most recently used to least recently used. fn is called as
468
- * fn(value, key, cache). Does not update age or recenty of use.
469
- * Does not iterate over stale values.
472
+ * Call the supplied function on each item in the cache, in order from most
473
+ * recently used to least recently used.
474
+ *
475
+ * `fn` is called as `fn(value, key, cache)`.
476
+ *
477
+ * If `thisp` is provided, function will be called in the `this`-context of
478
+ * the provided object, or the cache if no `thisp` object is provided.
479
+ *
480
+ * Does not update age or recenty of use, or iterate over stale values.
470
481
  */
471
482
  forEach(fn, thisp = this) {
472
483
  for (let i of this.#indexes()) {
@@ -491,14 +502,20 @@ var require_commonjs = __commonJS({
491
502
  purgeStale() {
492
503
  let deleted = !1;
493
504
  for (let i of this.#rindexes({ allowStale: !0 }))
494
- this.#isStale(i) && (this.delete(this.#keyList[i]), deleted = !0);
505
+ this.#isStale(i) && (this.#delete(this.#keyList[i], "expire"), deleted = !0);
495
506
  return deleted;
496
507
  }
497
508
  /**
498
509
  * Get the extended info about a given entry, to get its value, size, and
499
- * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a
500
- * single key. Always returns stale values, if their info is found in the
501
- * cache, so be sure to check for expired TTLs if relevant.
510
+ * TTL info simultaneously. Returns `undefined` if the key is not present.
511
+ *
512
+ * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
513
+ * serialization, the `start` value is always the current timestamp, and the
514
+ * `ttl` is a calculated remaining time to live (negative if expired).
515
+ *
516
+ * Always returns stale values, if their info is found in the cache, so be
517
+ * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
518
+ * if relevant.
502
519
  */
503
520
  info(key) {
504
521
  let i = this.#keyMap.get(key);
@@ -519,7 +536,16 @@ var require_commonjs = __commonJS({
519
536
  }
520
537
  /**
521
538
  * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
522
- * passed to cache.load()
539
+ * passed to {@link LRLUCache#load}.
540
+ *
541
+ * The `start` fields are calculated relative to a portable `Date.now()`
542
+ * timestamp, even if `performance.now()` is available.
543
+ *
544
+ * Stale entries are always included in the `dump`, even if
545
+ * {@link LRUCache.OptionsBase.allowStale} is false.
546
+ *
547
+ * Note: this returns an actual array, not a generator, so it can be more
548
+ * easily passed around.
523
549
  */
524
550
  dump() {
525
551
  let arr = [];
@@ -539,8 +565,12 @@ var require_commonjs = __commonJS({
539
565
  }
540
566
  /**
541
567
  * Reset the cache and load in the items in entries in the order listed.
542
- * Note that the shape of the resulting cache may be different if the
543
- * same options are not used in both caches.
568
+ *
569
+ * The shape of the resulting cache may be different if the same options are
570
+ * not used in both caches.
571
+ *
572
+ * The `start` fields are assumed to be calculated relative to a portable
573
+ * `Date.now()` timestamp, even if `performance.now()` is available.
544
574
  */
545
575
  load(arr) {
546
576
  this.clear();
@@ -557,13 +587,37 @@ var require_commonjs = __commonJS({
557
587
  *
558
588
  * Note: if `undefined` is specified as a value, this is an alias for
559
589
  * {@link LRUCache#delete}
590
+ *
591
+ * Fields on the {@link LRUCache.SetOptions} options param will override
592
+ * their corresponding values in the constructor options for the scope
593
+ * of this single `set()` operation.
594
+ *
595
+ * If `start` is provided, then that will set the effective start
596
+ * time for the TTL calculation. Note that this must be a previous
597
+ * value of `performance.now()` if supported, or a previous value of
598
+ * `Date.now()` if not.
599
+ *
600
+ * Options object may also include `size`, which will prevent
601
+ * calling the `sizeCalculation` function and just use the specified
602
+ * number if it is a positive integer, and `noDisposeOnSet` which
603
+ * will prevent calling a `dispose` function in the case of
604
+ * overwrites.
605
+ *
606
+ * If the `size` (or return value of `sizeCalculation`) for a given
607
+ * entry is greater than `maxEntrySize`, then the item will not be
608
+ * added to the cache.
609
+ *
610
+ * Will update the recency of the entry.
611
+ *
612
+ * If the value is `undefined`, then this is an alias for
613
+ * `cache.delete(key)`. `undefined` is never stored in the cache.
560
614
  */
561
615
  set(k, v, setOptions = {}) {
562
616
  if (v === void 0)
563
617
  return this.delete(k), this;
564
618
  let { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions, { noUpdateTTL = this.noUpdateTTL } = setOptions, size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
565
619
  if (this.maxEntrySize && size > this.maxEntrySize)
566
- return status && (status.set = "miss", status.maxEntrySizeExceeded = !0), this.delete(k), this;
620
+ return status && (status.set = "miss", status.maxEntrySizeExceeded = !0), this.#delete(k, "set"), this;
567
621
  let index = this.#size === 0 ? void 0 : this.#keyMap.get(k);
568
622
  if (index === void 0)
569
623
  index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(!1) : this.#size, this.#keyList[index] = k, this.#valList[index] = v, this.#keyMap.set(k, index), this.#next[this.#tail] = index, this.#prev[index] = this.#tail, this.#tail = index, this.#size++, this.#addItemSize(index, size, status), status && (status.set = "add"), noUpdateTTL = !1;
@@ -621,6 +675,14 @@ var require_commonjs = __commonJS({
621
675
  * Will return false if the item is stale, even though it is technically
622
676
  * in the cache.
623
677
  *
678
+ * Check if a key is in the cache, without updating the recency of
679
+ * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
680
+ * to `true` in either the options or the constructor.
681
+ *
682
+ * Will return `false` if the item is stale, even though it is technically in
683
+ * the cache. The difference can be determined (if it matters) by using a
684
+ * `status` argument, and inspecting the `has` field.
685
+ *
624
686
  * Will not update item age unless
625
687
  * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
626
688
  */
@@ -667,10 +729,10 @@ var require_commonjs = __commonJS({
667
729
  if (options.status && (aborted && !updateCache ? (options.status.fetchAborted = !0, options.status.fetchError = ac.signal.reason, ignoreAbort && (options.status.fetchAbortIgnored = !0)) : options.status.fetchResolved = !0), aborted && !ignoreAbort && !updateCache)
668
730
  return fetchFail(ac.signal.reason);
669
731
  let bf2 = p;
670
- return this.#valList[index] === p && (v2 === void 0 ? bf2.__staleWhileFetching ? this.#valList[index] = bf2.__staleWhileFetching : this.delete(k) : (options.status && (options.status.fetchUpdated = !0), this.set(k, v2, fetchOpts.options))), v2;
732
+ return this.#valList[index] === p && (v2 === void 0 ? bf2.__staleWhileFetching ? this.#valList[index] = bf2.__staleWhileFetching : this.#delete(k, "fetch") : (options.status && (options.status.fetchUpdated = !0), this.set(k, v2, fetchOpts.options))), v2;
671
733
  }, eb = (er) => (options.status && (options.status.fetchRejected = !0, options.status.fetchError = er), fetchFail(er)), fetchFail = (er) => {
672
734
  let { aborted } = ac.signal, allowStaleAborted = aborted && options.allowStaleOnFetchAbort, allowStale = allowStaleAborted || options.allowStaleOnFetchRejection, noDelete = allowStale || options.noDeleteOnFetchRejection, bf2 = p;
673
- if (this.#valList[index] === p && (!noDelete || bf2.__staleWhileFetching === void 0 ? this.delete(k) : allowStaleAborted || (this.#valList[index] = bf2.__staleWhileFetching)), allowStale)
735
+ if (this.#valList[index] === p && (!noDelete || bf2.__staleWhileFetching === void 0 ? this.#delete(k, "fetch") : allowStaleAborted || (this.#valList[index] = bf2.__staleWhileFetching)), allowStale)
674
736
  return options.status && bf2.__staleWhileFetching !== void 0 && (options.status.returnedStale = !0), bf2.__staleWhileFetching;
675
737
  if (bf2.__returned === bf2)
676
738
  throw er;
@@ -756,6 +818,25 @@ var require_commonjs = __commonJS({
756
818
  return status && (status.fetch = isStale ? "stale" : "refresh", staleVal && isStale && (status.returnedStale = !0)), staleVal ? p.__staleWhileFetching : p.__returned = p;
757
819
  }
758
820
  }
821
+ async forceFetch(k, fetchOptions = {}) {
822
+ let v = await this.fetch(k, fetchOptions);
823
+ if (v === void 0)
824
+ throw new Error("fetch() returned undefined");
825
+ return v;
826
+ }
827
+ memo(k, memoOptions = {}) {
828
+ let memoMethod = this.#memoMethod;
829
+ if (!memoMethod)
830
+ throw new Error("no memoMethod provided to constructor");
831
+ let { context, forceRefresh, ...options } = memoOptions, v = this.get(k, options);
832
+ if (!forceRefresh && v !== void 0)
833
+ return v;
834
+ let vv = memoMethod(k, v, {
835
+ options,
836
+ context
837
+ });
838
+ return this.set(k, vv, options), vv;
839
+ }
759
840
  /**
760
841
  * Return a value from the cache. Will update the recency of the cache
761
842
  * entry found.
@@ -766,7 +847,7 @@ var require_commonjs = __commonJS({
766
847
  let { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions, index = this.#keyMap.get(k);
767
848
  if (index !== void 0) {
768
849
  let value = this.#valList[index], fetching = this.#isBackgroundFetch(value);
769
- return status && this.#statusTTL(status, index), this.#isStale(index) ? (status && (status.get = "stale"), fetching ? (status && allowStale && value.__staleWhileFetching !== void 0 && (status.returnedStale = !0), allowStale ? value.__staleWhileFetching : void 0) : (noDeleteOnStaleGet || this.delete(k), status && allowStale && (status.returnedStale = !0), allowStale ? value : void 0)) : (status && (status.get = "hit"), fetching ? value.__staleWhileFetching : (this.#moveToTail(index), updateAgeOnGet && this.#updateItemAge(index), value));
850
+ return status && this.#statusTTL(status, index), this.#isStale(index) ? (status && (status.get = "stale"), fetching ? (status && allowStale && value.__staleWhileFetching !== void 0 && (status.returnedStale = !0), allowStale ? value.__staleWhileFetching : void 0) : (noDeleteOnStaleGet || this.#delete(k, "expire"), status && allowStale && (status.returnedStale = !0), allowStale ? value : void 0)) : (status && (status.get = "hit"), fetching ? value.__staleWhileFetching : (this.#moveToTail(index), updateAgeOnGet && this.#updateItemAge(index), value));
770
851
  } else status && (status.get = "miss");
771
852
  }
772
853
  #connect(p, n) {
@@ -777,19 +858,23 @@ var require_commonjs = __commonJS({
777
858
  }
778
859
  /**
779
860
  * Deletes a key out of the cache.
861
+ *
780
862
  * Returns true if the key was deleted, false otherwise.
781
863
  */
782
864
  delete(k) {
865
+ return this.#delete(k, "delete");
866
+ }
867
+ #delete(k, reason) {
783
868
  let deleted = !1;
784
869
  if (this.#size !== 0) {
785
870
  let index = this.#keyMap.get(k);
786
871
  if (index !== void 0)
787
872
  if (deleted = !0, this.#size === 1)
788
- this.clear();
873
+ this.#clear(reason);
789
874
  else {
790
875
  this.#removeItemSize(index);
791
876
  let v = this.#valList[index];
792
- if (this.#isBackgroundFetch(v) ? v.__abortController.abort(new Error("deleted")) : (this.#hasDispose || this.#hasDisposeAfter) && (this.#hasDispose && this.#dispose?.(v, k, "delete"), this.#hasDisposeAfter && this.#disposed?.push([v, k, "delete"])), this.#keyMap.delete(k), this.#keyList[index] = void 0, this.#valList[index] = void 0, index === this.#tail)
877
+ if (this.#isBackgroundFetch(v) ? v.__abortController.abort(new Error("deleted")) : (this.#hasDispose || this.#hasDisposeAfter) && (this.#hasDispose && this.#dispose?.(v, k, reason), this.#hasDisposeAfter && this.#disposed?.push([v, k, reason])), this.#keyMap.delete(k), this.#keyList[index] = void 0, this.#valList[index] = void 0, index === this.#tail)
793
878
  this.#tail = this.#prev[index];
794
879
  else if (index === this.#head)
795
880
  this.#head = this.#next[index];
@@ -813,13 +898,16 @@ var require_commonjs = __commonJS({
813
898
  * Clear the cache entirely, throwing away all values.
814
899
  */
815
900
  clear() {
901
+ return this.#clear("delete");
902
+ }
903
+ #clear(reason) {
816
904
  for (let index of this.#rindexes({ allowStale: !0 })) {
817
905
  let v = this.#valList[index];
818
906
  if (this.#isBackgroundFetch(v))
819
907
  v.__abortController.abort(new Error("deleted"));
820
908
  else {
821
909
  let k = this.#keyList[index];
822
- this.#hasDispose && this.#dispose?.(v, k, "delete"), this.#hasDisposeAfter && this.#disposed?.push([v, k, "delete"]);
910
+ this.#hasDispose && this.#dispose?.(v, k, reason), this.#hasDisposeAfter && this.#disposed?.push([v, k, reason]);
823
911
  }
824
912
  }
825
913
  if (this.#keyMap.clear(), this.#valList.fill(void 0), this.#keyList.fill(void 0), this.#ttls && this.#starts && (this.#ttls.fill(0), this.#starts.fill(0)), this.#sizes && this.#sizes.fill(0), this.#head = 0, this.#tail = 0, this.#free.length = 0, this.#calculatedSize = 0, this.#size = 0, this.#hasDisposeAfter && this.#disposed) {
@@ -1294,9 +1382,9 @@ var require_lib3 = __commonJS({
1294
1382
  }
1295
1383
  });
1296
1384
 
1297
- // ../../node_modules/.pnpm/npm-package-arg@11.0.2/node_modules/npm-package-arg/lib/npa.js
1385
+ // ../../node_modules/.pnpm/npm-package-arg@11.0.3/node_modules/npm-package-arg/lib/npa.js
1298
1386
  var require_npa = __commonJS({
1299
- "../../node_modules/.pnpm/npm-package-arg@11.0.2/node_modules/npm-package-arg/lib/npa.js"(exports, module) {
1387
+ "../../node_modules/.pnpm/npm-package-arg@11.0.3/node_modules/npm-package-arg/lib/npa.js"(exports, module) {
1300
1388
  init_cjs_shims();
1301
1389
  module.exports = npa;
1302
1390
  module.exports.resolve = resolve;
@@ -1464,6 +1552,8 @@ var require_npa = __commonJS({
1464
1552
  throw new Error("nested aliases not supported");
1465
1553
  if (!subSpec.registry)
1466
1554
  throw new Error("aliases only work for registry deps");
1555
+ if (!subSpec.name)
1556
+ throw new Error("aliases must have a name");
1467
1557
  return res.subSpec = subSpec, res.registry = !0, res.type = "alias", res.saveSpec = null, res.fetchSpec = null, res;
1468
1558
  }
1469
1559
  function fromRegistry(res) {
@@ -1485,4 +1575,4 @@ var require_npa = __commonJS({
1485
1575
  }
1486
1576
  });
1487
1577
  export default require_npa();
1488
- //# sourceMappingURL=npa-JAX2F6CO.js.map
1578
+ //# sourceMappingURL=npa-E675GQOI.js.map