@shopify/cli 3.80.6 → 3.81.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 (156) hide show
  1. package/dist/assets/dev-console/extensions/dev-console/assets/index-ohOjvIJh.js +64 -0
  2. package/dist/assets/dev-console/index.html +1 -1
  3. package/dist/assets/hydrogen/starter/.cursor/rules/cookbook-recipe-subscriptions.mdc +921 -0
  4. package/dist/assets/hydrogen/starter/CHANGELOG.md +0 -35
  5. package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +1 -1
  6. package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +1 -1
  7. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
  8. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +1 -1
  9. package/dist/assets/hydrogen/starter/app/components/Footer.tsx +1 -1
  10. package/dist/assets/hydrogen/starter/app/components/Header.tsx +1 -1
  11. package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
  12. package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +1 -1
  13. package/dist/assets/hydrogen/starter/app/components/ProductItem.tsx +1 -1
  14. package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +1 -1
  15. package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +6 -1
  16. package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +1 -1
  17. package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +1 -1
  18. package/dist/assets/hydrogen/starter/app/entry.client.tsx +2 -2
  19. package/dist/assets/hydrogen/starter/app/entry.server.tsx +4 -9
  20. package/dist/assets/hydrogen/starter/app/lib/variants.ts +1 -1
  21. package/dist/assets/hydrogen/starter/app/root.tsx +1 -1
  22. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +1 -1
  23. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +1 -1
  24. package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +4 -4
  25. package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +1 -1
  26. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +7 -1
  27. package/dist/assets/hydrogen/starter/app/routes/account.tsx +1 -1
  28. package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +1 -1
  29. package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +1 -1
  30. package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +1 -1
  31. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -7
  32. package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +1 -1
  33. package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +1 -1
  34. package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +2 -2
  35. package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +1 -1
  36. package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +1 -1
  37. package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +1 -1
  38. package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +1 -1
  39. package/dist/assets/hydrogen/starter/app/routes/search.tsx +1 -1
  40. package/dist/assets/hydrogen/starter/app/routes.ts +2 -2
  41. package/dist/assets/hydrogen/starter/env.d.ts +2 -12
  42. package/dist/assets/hydrogen/starter/eslint.config.js +0 -2
  43. package/dist/assets/hydrogen/starter/package.json +12 -11
  44. package/dist/assets/hydrogen/starter/server.ts +5 -2
  45. package/dist/assets/hydrogen/starter/tsconfig.json +6 -18
  46. package/dist/assets/hydrogen/starter/vite.config.ts +24 -3
  47. package/dist/assets/hydrogen/tailwind/package.json +1 -4
  48. package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +1 -1
  49. package/dist/assets/hydrogen/virtual-routes/layout.jsx +7 -1
  50. package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +1 -1
  51. package/dist/assets/hydrogen/virtual-routes/routes/subrequest-profiler.jsx +1 -1
  52. package/dist/assets/hydrogen/virtual-routes/virtual-root-with-layout.jsx +1 -1
  53. package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +1 -1
  54. package/dist/assets/hydrogen/vite/vite.config.js +1 -1
  55. package/dist/{chunk-4VUXI7H6.js → chunk-2RTQR5PF.js} +4 -4
  56. package/dist/{chunk-65ZFQZTE.js → chunk-3TCAFLMI.js} +3 -3
  57. package/dist/{chunk-NL3YMB4U.js → chunk-4UU24IRW.js} +5 -5
  58. package/dist/{chunk-BSF6VAN5.js → chunk-66LU5RHQ.js} +3 -3
  59. package/dist/{chunk-AFDDJCYX.js → chunk-7KHSYC7Q.js} +4 -4
  60. package/dist/{chunk-3CBDZFEX.js → chunk-AFKRMMUK.js} +2 -2
  61. package/dist/{chunk-7WRUWTUK.js → chunk-BU5YHTR3.js} +242 -216
  62. package/dist/{chunk-ACIWWUHC.js → chunk-BWXOMTF4.js} +2 -2
  63. package/dist/{chunk-TJM3YBLQ.js → chunk-CTFDRWUN.js} +15 -12
  64. package/dist/{chunk-ACFJ6IFW.js → chunk-EVLVUZ4W.js} +17 -12
  65. package/dist/{chunk-HJNOSZIV.js → chunk-F65YW645.js} +2 -2
  66. package/dist/{chunk-OWRPRJTD.js → chunk-FAITFLRX.js} +2 -2
  67. package/dist/{chunk-EZ6BZ5PD.js → chunk-FBJAZPR7.js} +3 -3
  68. package/dist/{chunk-D6ZGKY37.js → chunk-FD2PC23V.js} +6 -6
  69. package/dist/{chunk-FDW7NWC7.js → chunk-GESAFNQ7.js} +276 -77
  70. package/dist/{chunk-UBFTFKE4.js → chunk-H4NXKYFX.js} +28 -28
  71. package/dist/{chunk-Z2BLJB2N.js → chunk-H7RFBD5F.js} +4 -4
  72. package/dist/{chunk-O6RFRW32.js → chunk-HL635BW4.js} +9 -8
  73. package/dist/{chunk-5RIR73IP.js → chunk-HVXOXFW7.js} +8 -6
  74. package/dist/{chunk-ICOMCQIW.js → chunk-I3MFQXUO.js} +5 -5
  75. package/dist/{chunk-23F56LJQ.js → chunk-I55SUBMN.js} +45 -23
  76. package/dist/{chunk-ZH34MCD3.js → chunk-J22RRMUV.js} +3 -3
  77. package/dist/{chunk-6OYFGNE2.js → chunk-JMLKYNLE.js} +3 -3
  78. package/dist/{chunk-2PS2UQAA.js → chunk-LJSDT5VD.js} +3 -3
  79. package/dist/{chunk-VUR3GWEO.js → chunk-LKFFDKQK.js} +3 -3
  80. package/dist/{chunk-5AFYDRV4.js → chunk-LPU2VGJR.js} +42 -507
  81. package/dist/{chunk-DBRMHJ74.js → chunk-NVXZREWB.js} +27 -30
  82. package/dist/{chunk-72FER6OH.js → chunk-OCEG2LVS.js} +2 -2
  83. package/dist/{chunk-RMON7GVP.js → chunk-PL4FBKID.js} +5 -5
  84. package/dist/{chunk-JCVVFO7I.js → chunk-PO4WPF5B.js} +2 -2
  85. package/dist/{chunk-MRTKI7HQ.js → chunk-PZ532W3Q.js} +8 -8
  86. package/dist/{chunk-ALOIYWSW.js → chunk-Q5VEQZWD.js} +5 -5
  87. package/dist/{chunk-AMSWTXT7.js → chunk-R3OIVMMP.js} +4 -4
  88. package/dist/{chunk-IN3MU7YC.js → chunk-RN6ES42P.js} +4 -4
  89. package/dist/{chunk-LQ2ZKVR6.js → chunk-UMUTXITN.js} +87 -4
  90. package/dist/chunk-V67D4V7T.js +107 -0
  91. package/dist/{chunk-DN2ZP5X3.js → chunk-VKZ4FDXJ.js} +2 -2
  92. package/dist/chunk-W5G2YPO2.js +11805 -0
  93. package/dist/{chunk-GQTBVMLV.js → chunk-XSJQXZOL.js} +4 -4
  94. package/dist/{chunk-CDBXAE2F.js → chunk-Y2JP6WFP.js} +99 -11
  95. package/dist/{chunk-QOJ7MYZZ.js → chunk-YQAKBVIP.js} +534 -336
  96. package/dist/cli/commands/auth/logout.js +16 -17
  97. package/dist/cli/commands/auth/logout.test.js +18 -19
  98. package/dist/cli/commands/cache/clear.js +15 -16
  99. package/dist/cli/commands/debug/command-flags.js +15 -16
  100. package/dist/cli/commands/docs/generate.js +15 -16
  101. package/dist/cli/commands/docs/generate.test.js +16 -17
  102. package/dist/cli/commands/help.js +15 -16
  103. package/dist/cli/commands/kitchen-sink/async.js +16 -17
  104. package/dist/cli/commands/kitchen-sink/async.test.js +17 -18
  105. package/dist/cli/commands/kitchen-sink/index.js +18 -19
  106. package/dist/cli/commands/kitchen-sink/index.test.js +19 -20
  107. package/dist/cli/commands/kitchen-sink/prompts.js +16 -17
  108. package/dist/cli/commands/kitchen-sink/prompts.test.js +17 -18
  109. package/dist/cli/commands/kitchen-sink/static.js +16 -17
  110. package/dist/cli/commands/kitchen-sink/static.test.js +17 -18
  111. package/dist/cli/commands/notifications/generate.js +16 -17
  112. package/dist/cli/commands/notifications/list.js +16 -17
  113. package/dist/cli/commands/search.js +16 -17
  114. package/dist/cli/commands/upgrade.js +16 -17
  115. package/dist/cli/commands/upgrade.test.js +1 -2
  116. package/dist/cli/commands/version.js +16 -17
  117. package/dist/cli/commands/version.test.js +17 -18
  118. package/dist/cli/services/commands/notifications.js +11 -12
  119. package/dist/cli/services/commands/search.js +7 -8
  120. package/dist/cli/services/commands/search.test.js +8 -9
  121. package/dist/cli/services/commands/version.js +8 -9
  122. package/dist/cli/services/commands/version.test.js +10 -11
  123. package/dist/cli/services/kitchen-sink/async.js +7 -8
  124. package/dist/cli/services/kitchen-sink/prompts.js +7 -8
  125. package/dist/cli/services/kitchen-sink/static.js +7 -8
  126. package/dist/cli/services/upgrade.js +8 -9
  127. package/dist/cli/services/upgrade.test.js +10 -11
  128. package/dist/{custom-oclif-loader-FBD5HO3U.js → custom-oclif-loader-OGNQPWLM.js} +7 -8
  129. package/dist/{del-YIU34DZ5.js → del-4JSTEFDW.js} +3 -3
  130. package/dist/{devtools-J4QAI6HR.js → devtools-LDCSRUXB.js} +4 -4
  131. package/dist/{error-handler-Y4QDEH3I.js → error-handler-7HDPJKMS.js} +13 -14
  132. package/dist/hooks/postrun.js +11 -12
  133. package/dist/hooks/prerun.js +12 -13
  134. package/dist/{http-proxy-KGLXPNEY.js → http-proxy-LHSVRGJ5.js} +14 -10
  135. package/dist/index.js +153248 -162660
  136. package/dist/{lib-MIBR2T7P.js → lib-2ZBT3UR2.js} +5 -5
  137. package/dist/{local-US2LLU7Y.js → local-5DGEQTKE.js} +9 -14
  138. package/dist/{magic-string.es-BSVDQOZI.js → magic-string.es-UZAAPNRE.js} +42 -36
  139. package/dist/{morph-3VOLMA55.js → morph-DFRO3NRL.js} +10 -10
  140. package/dist/node-OJGXX6YN.js +164 -0
  141. package/dist/{node-package-manager-ZUD6DL6H.js → node-package-manager-QX5ULXMO.js} +8 -9
  142. package/dist/{out-5KP5WGIK.js → out-NKJPLKLB.js} +2 -2
  143. package/dist/{path-GWAZZN2N.js → path-COZT77T2.js} +2 -3
  144. package/dist/tsconfig.tsbuildinfo +1 -1
  145. package/dist/{ui-LKBRSHMZ.js → ui-ZOXO5UFK.js} +7 -10
  146. package/dist/{workerd-LF2ZHPL2.js → workerd-BW3TVO32.js} +18 -20
  147. package/oclif.manifest.json +29 -9
  148. package/package.json +10 -11
  149. package/dist/assets/dev-console/extensions/dev-console/assets/index-CqNhY1h-.js +0 -64
  150. package/dist/assets/hydrogen/starter/.cursor/rules/hydrogen-react-router.mdc +0 -52
  151. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
  152. package/dist/assets/hydrogen/starter/react-router.config.ts +0 -7
  153. package/dist/chunk-3I3GQNEW.js +0 -95
  154. package/dist/chunk-ZEM3T4UY.js +0 -10590
  155. package/dist/chunk-ZUCWDIGE.js +0 -111
  156. package/dist/toml-patch-wasm-J5VGG6WG.js +0 -140
@@ -18,14 +18,14 @@ import {
18
18
  require_get_stream,
19
19
  runWithTimer,
20
20
  writeFile
21
- } from "./chunk-7WRUWTUK.js";
21
+ } from "./chunk-BU5YHTR3.js";
22
22
  import {
23
23
  require_semver
24
24
  } from "./chunk-HMDWNGIV.js";
25
25
  import {
26
26
  dirname,
27
27
  joinPath
28
- } from "./chunk-ZUCWDIGE.js";
28
+ } from "./chunk-Y2JP6WFP.js";
29
29
  import {
30
30
  __commonJS,
31
31
  __export,
@@ -2400,9 +2400,9 @@ var require_data = __commonJS({
2400
2400
  }
2401
2401
  });
2402
2402
 
2403
- // ../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/lib/scopedChars.js
2403
+ // ../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/lib/scopedChars.js
2404
2404
  var require_scopedChars = __commonJS({
2405
- "../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/lib/scopedChars.js"(exports, module) {
2405
+ "../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/lib/scopedChars.js"(exports, module) {
2406
2406
  "use strict";
2407
2407
  init_cjs_shims();
2408
2408
  var HEX = {
@@ -2435,9 +2435,9 @@ var require_scopedChars = __commonJS({
2435
2435
  }
2436
2436
  });
2437
2437
 
2438
- // ../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/lib/utils.js
2438
+ // ../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/lib/utils.js
2439
2439
  var require_utils = __commonJS({
2440
- "../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/lib/utils.js"(exports, module) {
2440
+ "../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/lib/utils.js"(exports, module) {
2441
2441
  "use strict";
2442
2442
  init_cjs_shims();
2443
2443
  var { HEX } = require_scopedChars(), IPV4_REG = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;
@@ -2569,12 +2569,12 @@ var require_utils = __commonJS({
2569
2569
  }
2570
2570
  });
2571
2571
 
2572
- // ../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/lib/schemes.js
2572
+ // ../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/lib/schemes.js
2573
2573
  var require_schemes = __commonJS({
2574
- "../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/lib/schemes.js"(exports, module) {
2574
+ "../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/lib/schemes.js"(exports, module) {
2575
2575
  "use strict";
2576
2576
  init_cjs_shims();
2577
- var UUID_REG = /^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu, URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
2577
+ var UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu, URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
2578
2578
  function isSecure(wsComponents) {
2579
2579
  return typeof wsComponents.secure == "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
2580
2580
  }
@@ -2664,9 +2664,9 @@ var require_schemes = __commonJS({
2664
2664
  }
2665
2665
  });
2666
2666
 
2667
- // ../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/index.js
2667
+ // ../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/index.js
2668
2668
  var require_fast_uri = __commonJS({
2669
- "../../node_modules/.pnpm/fast-uri@3.0.5/node_modules/fast-uri/index.js"(exports, module) {
2669
+ "../../node_modules/.pnpm/fast-uri@3.0.6/node_modules/fast-uri/index.js"(exports, module) {
2670
2670
  "use strict";
2671
2671
  init_cjs_shims();
2672
2672
  var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils(), SCHEMES = require_schemes();
@@ -2739,7 +2739,7 @@ var require_fast_uri = __commonJS({
2739
2739
  } else
2740
2740
  parsed.host = ipv4result.host, isIP = !0;
2741
2741
  }
2742
- parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && !parsed.path && parsed.query === void 0 ? parsed.reference = "same-document" : parsed.scheme === void 0 ? parsed.reference = "relative" : parsed.fragment === void 0 ? parsed.reference = "absolute" : parsed.reference = "uri", options.reference && options.reference !== "suffix" && options.reference !== parsed.reference && (parsed.error = parsed.error || "URI is not a " + options.reference + " reference.");
2742
+ parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path ? parsed.reference = "same-document" : parsed.scheme === void 0 ? parsed.reference = "relative" : parsed.fragment === void 0 ? parsed.reference = "absolute" : parsed.reference = "uri", options.reference && options.reference !== "suffix" && options.reference !== parsed.reference && (parsed.error = parsed.error || "URI is not a " + options.reference + " reference.");
2743
2743
  let schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
2744
2744
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === !1 && nonSimpleDomain(parsed.host))
2745
2745
  try {
@@ -2747,7 +2747,7 @@ var require_fast_uri = __commonJS({
2747
2747
  } catch (e) {
2748
2748
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
2749
2749
  }
2750
- (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) && (gotEncoding && parsed.scheme !== void 0 && (parsed.scheme = unescape(parsed.scheme)), gotEncoding && parsed.host !== void 0 && (parsed.host = unescape(parsed.host)), parsed.path && parsed.path.length && (parsed.path = escape(unescape(parsed.path))), parsed.fragment && parsed.fragment.length && (parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment)))), schemeHandler && schemeHandler.parse && schemeHandler.parse(parsed, options);
2750
+ (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) && (gotEncoding && parsed.scheme !== void 0 && (parsed.scheme = unescape(parsed.scheme)), gotEncoding && parsed.host !== void 0 && (parsed.host = unescape(parsed.host)), parsed.path && (parsed.path = escape(unescape(parsed.path))), parsed.fragment && (parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment)))), schemeHandler && schemeHandler.parse && schemeHandler.parse(parsed, options);
2751
2751
  } else
2752
2752
  parsed.error = parsed.error || "URI can not be parsed.";
2753
2753
  return parsed;
@@ -5109,9 +5109,9 @@ var require_source = __commonJS({
5109
5109
  }
5110
5110
  });
5111
5111
 
5112
- // ../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js
5112
+ // ../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js
5113
5113
  var require_http_cache_semantics = __commonJS({
5114
- "../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js"(exports, module) {
5114
+ "../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js"(exports, module) {
5115
5115
  "use strict";
5116
5116
  init_cjs_shims();
5117
5117
  var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([
@@ -5192,6 +5192,17 @@ var require_http_cache_semantics = __commonJS({
5192
5192
  return parts.join(", ");
5193
5193
  }
5194
5194
  module.exports = class {
5195
+ /**
5196
+ * Creates a new CachePolicy instance.
5197
+ * @param {HttpRequest} req - Incoming client request.
5198
+ * @param {HttpResponse} res - Received server response.
5199
+ * @param {Object} [options={}] - Configuration options.
5200
+ * @param {boolean} [options.shared=true] - Is the cache shared (a public proxy)? `false` for personal browser caches.
5201
+ * @param {number} [options.cacheHeuristic=0.1] - Fallback heuristic (age fraction) for cache duration.
5202
+ * @param {number} [options.immutableMinTimeToLive=86400000] - Minimum TTL for immutable responses in milliseconds.
5203
+ * @param {boolean} [options.ignoreCargoCult=false] - Detect nonsense cache headers, and override them.
5204
+ * @param {any} [options._fromObject] - Internal parameter for deserialization. Do not use.
5205
+ */
5195
5206
  constructor(req, res, {
5196
5207
  shared,
5197
5208
  cacheHeuristic,
@@ -5205,13 +5216,21 @@ var require_http_cache_semantics = __commonJS({
5205
5216
  }
5206
5217
  if (!res || !res.headers)
5207
5218
  throw Error("Response headers missing");
5208
- this._assertRequestHasHeaders(req), this._responseTime = this.now(), this._isShared = shared !== !1, this._cacheHeuristic = cacheHeuristic !== void 0 ? cacheHeuristic : 0.1, this._immutableMinTtl = immutableMinTimeToLive !== void 0 ? immutableMinTimeToLive : 24 * 3600 * 1e3, this._status = "status" in res ? res.status : 200, this._resHeaders = res.headers, this._rescc = parseCacheControl(res.headers["cache-control"]), this._method = "method" in req ? req.method : "GET", this._url = req.url, this._host = req.headers.host, this._noAuthorization = !req.headers.authorization, this._reqHeaders = res.headers.vary ? req.headers : null, this._reqcc = parseCacheControl(req.headers["cache-control"]), ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc && (delete this._rescc["pre-check"], delete this._rescc["post-check"], delete this._rescc["no-cache"], delete this._rescc["no-store"], delete this._rescc["must-revalidate"], this._resHeaders = Object.assign({}, this._resHeaders, {
5219
+ this._assertRequestHasHeaders(req), this._responseTime = this.now(), this._isShared = shared !== !1, this._ignoreCargoCult = !!ignoreCargoCult, this._cacheHeuristic = cacheHeuristic !== void 0 ? cacheHeuristic : 0.1, this._immutableMinTtl = immutableMinTimeToLive !== void 0 ? immutableMinTimeToLive : 24 * 3600 * 1e3, this._status = "status" in res ? res.status : 200, this._resHeaders = res.headers, this._rescc = parseCacheControl(res.headers["cache-control"]), this._method = "method" in req ? req.method : "GET", this._url = req.url, this._host = req.headers.host, this._noAuthorization = !req.headers.authorization, this._reqHeaders = res.headers.vary ? req.headers : null, this._reqcc = parseCacheControl(req.headers["cache-control"]), this._ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc && (delete this._rescc["pre-check"], delete this._rescc["post-check"], delete this._rescc["no-cache"], delete this._rescc["no-store"], delete this._rescc["must-revalidate"], this._resHeaders = Object.assign({}, this._resHeaders, {
5209
5220
  "cache-control": formatCacheControl(this._rescc)
5210
5221
  }), delete this._resHeaders.expires, delete this._resHeaders.pragma), res.headers["cache-control"] == null && /no-cache/.test(res.headers.pragma) && (this._rescc["no-cache"] = !0);
5211
5222
  }
5223
+ /**
5224
+ * You can monkey-patch it for testing.
5225
+ * @returns {number} Current time in milliseconds.
5226
+ */
5212
5227
  now() {
5213
5228
  return Date.now();
5214
5229
  }
5230
+ /**
5231
+ * Determines if the response is storable in a cache.
5232
+ * @returns {boolean} `false` if can never be cached.
5233
+ */
5215
5234
  storable() {
5216
5235
  return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
5217
5236
  // The request method is understood by the cache and defined as being cacheable, and
@@ -5227,26 +5246,118 @@ var require_http_cache_semantics = __commonJS({
5227
5246
  this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
5228
5247
  statusCodeCacheableByDefault.has(this._status)));
5229
5248
  }
5249
+ /**
5250
+ * @returns {boolean} true if expiration is explicitly defined.
5251
+ */
5230
5252
  _hasExplicitExpiration() {
5231
- return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
5253
+ return !!(this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires);
5232
5254
  }
5255
+ /**
5256
+ * @param {HttpRequest} req - a request
5257
+ * @throws {Error} if the headers are missing.
5258
+ */
5233
5259
  _assertRequestHasHeaders(req) {
5234
5260
  if (!req || !req.headers)
5235
5261
  throw Error("Request headers missing");
5236
5262
  }
5263
+ /**
5264
+ * Checks if the request matches the cache and can be satisfied from the cache immediately,
5265
+ * without having to make a request to the server.
5266
+ *
5267
+ * This doesn't support `stale-while-revalidate`. See `evaluateRequest()` for a more complete solution.
5268
+ *
5269
+ * @param {HttpRequest} req - The new incoming HTTP request.
5270
+ * @returns {boolean} `true`` if the cached response used to construct this cache policy satisfies the request without revalidation.
5271
+ */
5237
5272
  satisfiesWithoutRevalidation(req) {
5238
- this._assertRequestHasHeaders(req);
5273
+ return !this.evaluateRequest(req).revalidation;
5274
+ }
5275
+ /**
5276
+ * @param {{headers: Record<string, string>, synchronous: boolean}|undefined} revalidation - Revalidation information, if any.
5277
+ * @returns {{response: {headers: Record<string, string>}, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object with a cached response headers and revalidation info.
5278
+ */
5279
+ _evaluateRequestHitResult(revalidation) {
5280
+ return {
5281
+ response: {
5282
+ headers: this.responseHeaders()
5283
+ },
5284
+ revalidation
5285
+ };
5286
+ }
5287
+ /**
5288
+ * @param {HttpRequest} request - new incoming
5289
+ * @param {boolean} synchronous - whether revalidation must be synchronous (not s-w-r).
5290
+ * @returns {{headers: Record<string, string>, synchronous: boolean}} An object with revalidation headers and a synchronous flag.
5291
+ */
5292
+ _evaluateRequestRevalidation(request, synchronous) {
5293
+ return {
5294
+ synchronous,
5295
+ headers: this.revalidationHeaders(request)
5296
+ };
5297
+ }
5298
+ /**
5299
+ * @param {HttpRequest} request - new incoming
5300
+ * @returns {{response: undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}}} An object indicating no cached response and revalidation details.
5301
+ */
5302
+ _evaluateRequestMissResult(request) {
5303
+ return {
5304
+ response: void 0,
5305
+ revalidation: this._evaluateRequestRevalidation(request, !0)
5306
+ };
5307
+ }
5308
+ /**
5309
+ * Checks if the given request matches this cache entry, and how the cache can be used to satisfy it. Returns an object with:
5310
+ *
5311
+ * ```
5312
+ * {
5313
+ * // If defined, you must send a request to the server.
5314
+ * revalidation: {
5315
+ * headers: {}, // HTTP headers to use when sending the revalidation response
5316
+ * // If true, you MUST wait for a response from the server before using the cache
5317
+ * // If false, this is stale-while-revalidate. The cache is stale, but you can use it while you update it asynchronously.
5318
+ * synchronous: bool,
5319
+ * },
5320
+ * // If defined, you can use this cached response.
5321
+ * response: {
5322
+ * headers: {}, // Updated cached HTTP headers you must use when responding to the client
5323
+ * },
5324
+ * }
5325
+ * ```
5326
+ * @param {HttpRequest} req - new incoming HTTP request
5327
+ * @returns {{response: {headers: Record<string, string>}|undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object containing keys:
5328
+ * - revalidation: { headers: Record<string, string>, synchronous: boolean } Set if you should send this to the origin server
5329
+ * - response: { headers: Record<string, string> } Set if you can respond to the client with these cached headers
5330
+ */
5331
+ evaluateRequest(req) {
5332
+ if (this._assertRequestHasHeaders(req), this._rescc["must-revalidate"])
5333
+ return this._evaluateRequestMissResult(req);
5334
+ if (!this._requestMatches(req, !1))
5335
+ return this._evaluateRequestMissResult(req);
5239
5336
  let requestCC = parseCacheControl(req.headers["cache-control"]);
5240
- return requestCC["no-cache"] || /no-cache/.test(req.headers.pragma) || requestCC["max-age"] && this.age() > requestCC["max-age"] || requestCC["min-fresh"] && this.timeToLive() < 1e3 * requestCC["min-fresh"] || this.stale() && !(requestCC["max-stale"] && !this._rescc["must-revalidate"] && (requestCC["max-stale"] === !0 || requestCC["max-stale"] > this.age() - this.maxAge())) ? !1 : this._requestMatches(req, !1);
5337
+ return requestCC["no-cache"] || /no-cache/.test(req.headers.pragma) ? this._evaluateRequestMissResult(req) : requestCC["max-age"] && this.age() > toNumberOrZero(requestCC["max-age"]) ? this._evaluateRequestMissResult(req) : requestCC["min-fresh"] && this.maxAge() - this.age() < toNumberOrZero(requestCC["min-fresh"]) ? this._evaluateRequestMissResult(req) : this.stale() ? "max-stale" in requestCC && (requestCC["max-stale"] === !0 || requestCC["max-stale"] > this.age() - this.maxAge()) ? this._evaluateRequestHitResult(void 0) : this.useStaleWhileRevalidate() ? this._evaluateRequestHitResult(this._evaluateRequestRevalidation(req, !1)) : this._evaluateRequestMissResult(req) : this._evaluateRequestHitResult(void 0);
5241
5338
  }
5339
+ /**
5340
+ * @param {HttpRequest} req - check if this is for the same cache entry
5341
+ * @param {boolean} allowHeadMethod - allow a HEAD method to match.
5342
+ * @returns {boolean} `true` if the request matches.
5343
+ */
5242
5344
  _requestMatches(req, allowHeadMethod) {
5243
- return (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
5345
+ return !!((!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
5244
5346
  (!req.method || this._method === req.method || allowHeadMethod && req.method === "HEAD") && // selecting header fields nominated by the stored response (if any) match those presented, and
5245
- this._varyMatches(req);
5347
+ this._varyMatches(req));
5246
5348
  }
5349
+ /**
5350
+ * Determines whether storing authenticated responses is allowed.
5351
+ * @returns {boolean} `true` if allowed.
5352
+ */
5247
5353
  _allowsStoringAuthenticated() {
5248
- return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
5354
+ return !!(this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]);
5249
5355
  }
5356
+ /**
5357
+ * Checks whether the Vary header in the response matches the new request.
5358
+ * @param {HttpRequest} req - incoming HTTP request
5359
+ * @returns {boolean} `true` if the vary headers match.
5360
+ */
5250
5361
  _varyMatches(req) {
5251
5362
  if (!this._resHeaders.vary)
5252
5363
  return !0;
@@ -5257,6 +5368,11 @@ var require_http_cache_semantics = __commonJS({
5257
5368
  if (req.headers[name] !== this._reqHeaders[name]) return !1;
5258
5369
  return !0;
5259
5370
  }
5371
+ /**
5372
+ * Creates a copy of the given headers without any hop-by-hop headers.
5373
+ * @param {Record<string, string>} inHeaders - old headers from the cached response
5374
+ * @returns {Record<string, string>} A new headers object without hop-by-hop headers.
5375
+ */
5260
5376
  _copyWithoutHopByHopHeaders(inHeaders) {
5261
5377
  let headers = {};
5262
5378
  for (let name in inHeaders)
@@ -5272,13 +5388,18 @@ var require_http_cache_semantics = __commonJS({
5272
5388
  }
5273
5389
  return headers;
5274
5390
  }
5391
+ /**
5392
+ * Returns the response headers adjusted for serving the cached response.
5393
+ * Removes hop-by-hop headers and updates the Age and Date headers.
5394
+ * @returns {Record<string, string>} The adjusted response headers.
5395
+ */
5275
5396
  responseHeaders() {
5276
5397
  let headers = this._copyWithoutHopByHopHeaders(this._resHeaders), age = this.age();
5277
5398
  return age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24 && (headers.warning = (headers.warning ? `${headers.warning}, ` : "") + '113 - "rfc7234 5.5.4"'), headers.age = `${Math.round(age)}`, headers.date = new Date(this.now()).toUTCString(), headers;
5278
5399
  }
5279
5400
  /**
5280
- * Value of the Date response header or current time if Date was invalid
5281
- * @return timestamp
5401
+ * Returns the Date header value from the response or the current time if invalid.
5402
+ * @returns {number} Timestamp (in milliseconds) representing the Date header or response time.
5282
5403
  */
5283
5404
  date() {
5284
5405
  let serverDate = Date.parse(this._resHeaders.date);
@@ -5287,22 +5408,26 @@ var require_http_cache_semantics = __commonJS({
5287
5408
  /**
5288
5409
  * Value of the Age header, in seconds, updated for the current time.
5289
5410
  * May be fractional.
5290
- *
5291
- * @return Number
5411
+ * @returns {number} The age in seconds.
5292
5412
  */
5293
5413
  age() {
5294
5414
  let age = this._ageValue(), residentTime = (this.now() - this._responseTime) / 1e3;
5295
5415
  return age + residentTime;
5296
5416
  }
5417
+ /**
5418
+ * @returns {number} The Age header value as a number.
5419
+ */
5297
5420
  _ageValue() {
5298
5421
  return toNumberOrZero(this._resHeaders.age);
5299
5422
  }
5300
5423
  /**
5301
- * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
5424
+ * Possibly outdated value of applicable max-age (or heuristic equivalent) in seconds.
5425
+ * This counts since response's `Date`.
5302
5426
  *
5303
5427
  * For an up-to-date value, see `timeToLive()`.
5304
5428
  *
5305
- * @return Number
5429
+ * Returns the maximum age (freshness lifetime) of the response in seconds.
5430
+ * @returns {number} The max-age value in seconds.
5306
5431
  */
5307
5432
  maxAge() {
5308
5433
  if (!this.storable() || this._rescc["no-cache"] || this._isShared && this._resHeaders["set-cookie"] && !this._rescc.public && !this._rescc.immutable || this._resHeaders.vary === "*")
@@ -5330,27 +5455,59 @@ var require_http_cache_semantics = __commonJS({
5330
5455
  }
5331
5456
  return defaultMinTtl;
5332
5457
  }
5458
+ /**
5459
+ * Remaining time this cache entry may be useful for, in *milliseconds*.
5460
+ * You can use this as an expiration time for your cache storage.
5461
+ *
5462
+ * Prefer this method over `maxAge()`, because it includes other factors like `age` and `stale-while-revalidate`.
5463
+ * @returns {number} Time-to-live in milliseconds.
5464
+ */
5333
5465
  timeToLive() {
5334
5466
  let age = this.maxAge() - this.age(), staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]), staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]);
5335
- return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3;
5467
+ return Math.round(Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3);
5336
5468
  }
5469
+ /**
5470
+ * If true, this cache entry is past its expiration date.
5471
+ * Note that stale cache may be useful sometimes, see `evaluateRequest()`.
5472
+ * @returns {boolean} `false` doesn't mean it's fresh nor usable
5473
+ */
5337
5474
  stale() {
5338
5475
  return this.maxAge() <= this.age();
5339
5476
  }
5477
+ /**
5478
+ * @returns {boolean} `true` if `stale-if-error` condition allows use of a stale response.
5479
+ */
5340
5480
  _useStaleIfError() {
5341
5481
  return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age();
5342
5482
  }
5483
+ /** See `evaluateRequest()` for a more complete solution
5484
+ * @returns {boolean} `true` if `stale-while-revalidate` is currently allowed.
5485
+ */
5343
5486
  useStaleWhileRevalidate() {
5344
- return this.maxAge() + toNumberOrZero(this._rescc["stale-while-revalidate"]) > this.age();
5487
+ let swr = toNumberOrZero(this._rescc["stale-while-revalidate"]);
5488
+ return swr > 0 && this.maxAge() + swr > this.age();
5345
5489
  }
5490
+ /**
5491
+ * Creates a `CachePolicy` instance from a serialized object.
5492
+ * @param {Object} obj - The serialized object.
5493
+ * @returns {CachePolicy} A new CachePolicy instance.
5494
+ */
5346
5495
  static fromObject(obj) {
5347
5496
  return new this(void 0, void 0, { _fromObject: obj });
5348
5497
  }
5498
+ /**
5499
+ * @param {any} obj - The serialized object.
5500
+ * @throws {Error} If already initialized or if the object is invalid.
5501
+ */
5349
5502
  _fromObject(obj) {
5350
5503
  if (this._responseTime) throw Error("Reinitialized");
5351
5504
  if (!obj || obj.v !== 1) throw Error("Invalid serialization");
5352
- this._responseTime = obj.t, this._isShared = obj.sh, this._cacheHeuristic = obj.ch, this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3, this._status = obj.st, this._resHeaders = obj.resh, this._rescc = obj.rescc, this._method = obj.m, this._url = obj.u, this._host = obj.h, this._noAuthorization = obj.a, this._reqHeaders = obj.reqh, this._reqcc = obj.reqcc;
5505
+ this._responseTime = obj.t, this._isShared = obj.sh, this._cacheHeuristic = obj.ch, this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3, this._ignoreCargoCult = !!obj.icc, this._status = obj.st, this._resHeaders = obj.resh, this._rescc = obj.rescc, this._method = obj.m, this._url = obj.u, this._host = obj.h, this._noAuthorization = obj.a, this._reqHeaders = obj.reqh, this._reqcc = obj.reqcc;
5353
5506
  }
5507
+ /**
5508
+ * Serializes the `CachePolicy` instance into a JSON-serializable object.
5509
+ * @returns {Object} The serialized object.
5510
+ */
5354
5511
  toObject() {
5355
5512
  return {
5356
5513
  v: 1,
@@ -5358,6 +5515,7 @@ var require_http_cache_semantics = __commonJS({
5358
5515
  sh: this._isShared,
5359
5516
  ch: this._cacheHeuristic,
5360
5517
  imm: this._immutableMinTtl,
5518
+ icc: this._ignoreCargoCult,
5361
5519
  st: this._status,
5362
5520
  resh: this._resHeaders,
5363
5521
  rescc: this._rescc,
@@ -5375,6 +5533,8 @@ var require_http_cache_semantics = __commonJS({
5375
5533
  *
5376
5534
  * Hop by hop headers are always stripped.
5377
5535
  * Revalidation headers may be added or removed, depending on request.
5536
+ * @param {HttpRequest} incomingReq - The incoming HTTP request.
5537
+ * @returns {Record<string, string>} The headers for the revalidation request.
5378
5538
  */
5379
5539
  revalidationHeaders(incomingReq) {
5380
5540
  this._assertRequestHasHeaders(incomingReq);
@@ -5396,21 +5556,31 @@ var require_http_cache_semantics = __commonJS({
5396
5556
  * Returns {policy, modified} where modified is a boolean indicating
5397
5557
  * whether the response body has been modified, and old cached body can't be used.
5398
5558
  *
5399
- * @return {Object} {policy: CachePolicy, modified: Boolean}
5559
+ * @param {HttpRequest} request - The latest HTTP request asking for the cached entry.
5560
+ * @param {HttpResponse} response - The latest revalidation HTTP response from the origin server.
5561
+ * @returns {{policy: CachePolicy, modified: boolean, matches: boolean}} The updated policy and modification status.
5562
+ * @throws {Error} If the response headers are missing.
5400
5563
  */
5401
5564
  revalidatedPolicy(request, response) {
5402
5565
  if (this._assertRequestHasHeaders(request), this._useStaleIfError() && isErrorResponse(response))
5403
5566
  return {
5567
+ policy: this,
5404
5568
  modified: !1,
5405
- matches: !1,
5406
- policy: this
5569
+ matches: !0
5407
5570
  };
5408
5571
  if (!response || !response.headers)
5409
5572
  throw Error("Response headers missing");
5410
5573
  let matches = !1;
5411
- if (response.status !== void 0 && response.status != 304 ? matches = !1 : response.headers.etag && !/^\s*W\//.test(response.headers.etag) ? matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag : this._resHeaders.etag && response.headers.etag ? matches = this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag.replace(/^\s*W\//, "") : this._resHeaders["last-modified"] ? matches = this._resHeaders["last-modified"] === response.headers["last-modified"] : !this._resHeaders.etag && !this._resHeaders["last-modified"] && !response.headers.etag && !response.headers["last-modified"] && (matches = !0), !matches)
5574
+ response.status !== void 0 && response.status != 304 ? matches = !1 : response.headers.etag && !/^\s*W\//.test(response.headers.etag) ? matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag : this._resHeaders.etag && response.headers.etag ? matches = this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag.replace(/^\s*W\//, "") : this._resHeaders["last-modified"] ? matches = this._resHeaders["last-modified"] === response.headers["last-modified"] : !this._resHeaders.etag && !this._resHeaders["last-modified"] && !response.headers.etag && !response.headers["last-modified"] && (matches = !0);
5575
+ let optionsCopy = {
5576
+ shared: this._isShared,
5577
+ cacheHeuristic: this._cacheHeuristic,
5578
+ immutableMinTimeToLive: this._immutableMinTtl,
5579
+ ignoreCargoCult: this._ignoreCargoCult
5580
+ };
5581
+ if (!matches)
5412
5582
  return {
5413
- policy: new this.constructor(request, response),
5583
+ policy: new this.constructor(request, response, optionsCopy),
5414
5584
  // Client receiving 304 without body, even if it's invalid/mismatched has no option
5415
5585
  // but to reuse a cached body. We don't have a good way to tell clients to do
5416
5586
  // error recovery in such case.
@@ -5426,11 +5596,7 @@ var require_http_cache_semantics = __commonJS({
5426
5596
  headers
5427
5597
  });
5428
5598
  return {
5429
- policy: new this.constructor(request, newResponse, {
5430
- shared: this._isShared,
5431
- cacheHeuristic: this._cacheHeuristic,
5432
- immutableMinTimeToLive: this._immutableMinTtl
5433
- }),
5599
+ policy: new this.constructor(request, newResponse, optionsCopy),
5434
5600
  modified: !1,
5435
5601
  matches: !0
5436
5602
  };
@@ -8186,9 +8352,9 @@ var require_config_chain = __commonJS({
8186
8352
  }
8187
8353
  });
8188
8354
 
8189
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
8355
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
8190
8356
  var require_envKeyToSetting = __commonJS({
8191
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js"(exports, module) {
8357
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js"(exports, module) {
8192
8358
  init_cjs_shims();
8193
8359
  module.exports = function(x) {
8194
8360
  let colonIndex = x.indexOf(":");
@@ -8252,12 +8418,12 @@ var require_dist3 = __commonJS({
8252
8418
  }
8253
8419
  });
8254
8420
 
8255
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/util.js
8421
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js
8256
8422
  var require_util2 = __commonJS({
8257
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/util.js"(exports) {
8423
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js"(exports) {
8258
8424
  "use strict";
8259
8425
  init_cjs_shims();
8260
- var fs3 = __require("fs"), path4 = __require("path"), { envReplace } = require_dist3(), parseField = (types2, field, key) => {
8426
+ var fs3 = __require("fs"), path4 = __require("path"), { envReplace } = require_dist3(), parseKey = (key) => typeof key != "string" ? key : envReplace(key, process.env), parseField = (types2, field, key) => {
8261
8427
  if (typeof field != "string")
8262
8428
  return field;
8263
8429
  let typeList = [].concat(types2[key]), isPath = typeList.indexOf(path4) !== -1, isBool = typeList.indexOf(Boolean) !== -1, isString2 = typeList.indexOf(String) !== -1, isNumber = typeList.indexOf(Number) !== -1;
@@ -8312,12 +8478,13 @@ var require_util2 = __commonJS({
8312
8478
  exports.envReplace = envReplace;
8313
8479
  exports.findPrefix = findPrefix;
8314
8480
  exports.parseField = parseField;
8481
+ exports.parseKey = parseKey;
8315
8482
  }
8316
8483
  });
8317
8484
 
8318
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/types.js
8485
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js
8319
8486
  var require_types2 = __commonJS({
8320
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/types.js"(exports) {
8487
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js"(exports) {
8321
8488
  "use strict";
8322
8489
  init_cjs_shims();
8323
8490
  var path4 = __require("path"), Stream = __require("stream").Stream, url = __require("url"), Umask = () => {
@@ -8450,9 +8617,9 @@ var require_types2 = __commonJS({
8450
8617
  }
8451
8618
  });
8452
8619
 
8453
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/conf.js
8620
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js
8454
8621
  var require_conf = __commonJS({
8455
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/conf.js"(exports, module) {
8622
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js"(exports, module) {
8456
8623
  "use strict";
8457
8624
  init_cjs_shims();
8458
8625
  var { readCAFileSync } = require_dist2(), fs3 = __require("fs"), path4 = __require("path"), { ConfigChain } = require_config_chain(), envKeyToSetting = require_envKeyToSetting(), util = require_util2(), Conf2 = class extends ConfigChain {
@@ -8463,8 +8630,10 @@ var require_conf = __commonJS({
8463
8630
  // https://github.com/npm/cli/blob/latest/lib/config/core.js#L326-L338
8464
8631
  add(data, marker) {
8465
8632
  try {
8466
- for (let x of Object.keys(data))
8467
- data[x] = this._parseField(data[x], x);
8633
+ for (let [key, value] of Object.entries(data)) {
8634
+ let substKey = util.parseKey(key);
8635
+ substKey !== key && delete data[key], data[substKey] = this._parseField(value, substKey);
8636
+ }
8468
8637
  } catch (error) {
8469
8638
  throw error;
8470
8639
  }
@@ -8481,7 +8650,7 @@ var require_conf = __commonJS({
8481
8650
  } catch (error) {
8482
8651
  if (error.code === "ENOENT")
8483
8652
  this.add({}, marker);
8484
- else
8653
+ else if (error.code !== "EISDIR")
8485
8654
  return `Issue while reading "${file}". ${error.message}`;
8486
8655
  }
8487
8656
  }
@@ -8490,7 +8659,10 @@ var require_conf = __commonJS({
8490
8659
  env = env || process.env;
8491
8660
  let conf = {};
8492
8661
  return Object.keys(env).filter((x) => /^npm_config_/i.test(x)).forEach((x) => {
8493
- env[x] && (conf[envKeyToSetting(x.substr(11))] = env[x]);
8662
+ if (!env[x])
8663
+ return;
8664
+ let key = envKeyToSetting(x.substr(11)), rawVal = env[x];
8665
+ conf[key] = deserializeEnvVal(key, rawVal);
8494
8666
  }), super.addEnv("", conf, "env");
8495
8667
  }
8496
8668
  // https://github.com/npm/cli/blob/latest/lib/config/load-prefix.js
@@ -8554,13 +8726,27 @@ var require_conf = __commonJS({
8554
8726
  }
8555
8727
  }
8556
8728
  };
8729
+ function deserializeEnvVal(envKey, envValue) {
8730
+ function deserializeList(envValue2) {
8731
+ let npmConfigSep = `
8732
+
8733
+ `;
8734
+ return envValue2.indexOf(npmConfigSep) ? envValue2.split(npmConfigSep) : envValue2.split(",");
8735
+ }
8736
+ switch (envKey) {
8737
+ case "hoist-pattern":
8738
+ case "public-hoist-pattern":
8739
+ return deserializeList(envValue);
8740
+ }
8741
+ return envValue;
8742
+ }
8557
8743
  module.exports = Conf2;
8558
8744
  }
8559
8745
  });
8560
8746
 
8561
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/defaults.js
8747
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js
8562
8748
  var require_defaults2 = __commonJS({
8563
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports) {
8749
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports) {
8564
8750
  "use strict";
8565
8751
  init_cjs_shims();
8566
8752
  var os3 = __require("os"), path4 = __require("path"), temp = os3.tmpdir(), uidOrPid = process.getuid ? process.getuid() : process.pid, hasUnicode = () => !0, isWindows = process.platform === "win32", osenv = {
@@ -8699,9 +8885,9 @@ var require_defaults2 = __commonJS({
8699
8885
  }
8700
8886
  });
8701
8887
 
8702
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/index.js
8888
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js
8703
8889
  var require_npm_conf = __commonJS({
8704
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/index.js"(exports, module) {
8890
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js"(exports, module) {
8705
8891
  "use strict";
8706
8892
  init_cjs_shims();
8707
8893
  var path4 = __require("path"), Conf2 = require_conf(), _defaults = require_defaults2();
@@ -8745,11 +8931,11 @@ var require_npm_conf = __commonJS({
8745
8931
  }
8746
8932
  });
8747
8933
 
8748
- // ../../node_modules/.pnpm/registry-auth-token@5.0.2/node_modules/registry-auth-token/index.js
8934
+ // ../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js
8749
8935
  var require_registry_auth_token = __commonJS({
8750
- "../../node_modules/.pnpm/registry-auth-token@5.0.2/node_modules/registry-auth-token/index.js"(exports, module) {
8936
+ "../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js"(exports, module) {
8751
8937
  init_cjs_shims();
8752
- var url = __require("url"), npmConf = require_npm_conf(), tokenKey = ":_authToken", legacyTokenKey = ":_auth", userKey = ":username", passwordKey = ":_password";
8938
+ var npmConf = require_npm_conf(), tokenKey = ":_authToken", legacyTokenKey = ":_auth", userKey = ":username", passwordKey = ":_password";
8753
8939
  module.exports = function() {
8754
8940
  let checkUrl, options;
8755
8941
  arguments.length >= 2 ? (checkUrl = arguments[0], options = Object.assign({}, arguments[1])) : typeof arguments[0] == "string" ? checkUrl = arguments[0] : options = Object.assign({}, arguments[0]), options = options || {};
@@ -8760,16 +8946,24 @@ var require_registry_auth_token = __commonJS({
8760
8946
  }
8761
8947
  } : npmConf()).config, checkUrl = checkUrl || options.npmrc.get("registry") || npmConf.defaults.registry, getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc);
8762
8948
  };
8949
+ function urlResolve(from, to) {
8950
+ let resolvedUrl = new URL(to, new URL(from.startsWith("//") ? `./${from}` : from, "resolve://"));
8951
+ if (resolvedUrl.protocol === "resolve:") {
8952
+ let { pathname, search, hash } = resolvedUrl;
8953
+ return pathname + search + hash;
8954
+ }
8955
+ return resolvedUrl.toString();
8956
+ }
8763
8957
  function getRegistryAuthInfo(checkUrl, options) {
8764
- let parsed = url.parse(checkUrl, !1, !0), pathname;
8958
+ let parsed = checkUrl instanceof URL ? checkUrl : new URL(checkUrl.startsWith("//") ? `http:${checkUrl}` : checkUrl), pathname;
8765
8959
  for (; pathname !== "/" && parsed.pathname !== pathname; ) {
8766
8960
  pathname = parsed.pathname || "/";
8767
8961
  let regUrl = "//" + parsed.host + pathname.replace(/\/$/, ""), authInfo = getAuthInfoForUrl(regUrl, options.npmrc);
8768
8962
  if (authInfo)
8769
8963
  return authInfo;
8770
8964
  if (!options.recursive)
8771
- return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(url.resolve(checkUrl, "."), options);
8772
- parsed.pathname = url.resolve(normalizePath(pathname), "..") || "/";
8965
+ return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(new URL("./", parsed), options);
8966
+ parsed.pathname = urlResolve(normalizePath(pathname), "..") || "/";
8773
8967
  }
8774
8968
  }
8775
8969
  function getLegacyAuthInfo(npmrc) {
@@ -9194,26 +9388,26 @@ init_cjs_shims();
9194
9388
  init_cjs_shims();
9195
9389
  import path from "node:path";
9196
9390
 
9197
- // ../../node_modules/.pnpm/when-exit@2.1.2/node_modules/when-exit/dist/node/index.js
9391
+ // ../../node_modules/.pnpm/when-exit@2.1.4/node_modules/when-exit/dist/node/index.js
9198
9392
  init_cjs_shims();
9199
9393
 
9200
- // ../../node_modules/.pnpm/when-exit@2.1.2/node_modules/when-exit/dist/node/interceptor.js
9394
+ // ../../node_modules/.pnpm/when-exit@2.1.4/node_modules/when-exit/dist/node/interceptor.js
9201
9395
  init_cjs_shims();
9202
9396
  import process5 from "node:process";
9203
9397
 
9204
- // ../../node_modules/.pnpm/when-exit@2.1.2/node_modules/when-exit/dist/node/constants.js
9398
+ // ../../node_modules/.pnpm/when-exit@2.1.4/node_modules/when-exit/dist/node/constants.js
9205
9399
  init_cjs_shims();
9206
9400
  import process4 from "node:process";
9207
9401
  var IS_LINUX = process4.platform === "linux", IS_WINDOWS = process4.platform === "win32";
9208
9402
 
9209
- // ../../node_modules/.pnpm/when-exit@2.1.2/node_modules/when-exit/dist/node/signals.js
9403
+ // ../../node_modules/.pnpm/when-exit@2.1.4/node_modules/when-exit/dist/node/signals.js
9210
9404
  init_cjs_shims();
9211
9405
  var Signals = ["SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM"];
9212
9406
  IS_WINDOWS || Signals.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
9213
9407
  IS_LINUX && Signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
9214
9408
  var signals_default = Signals;
9215
9409
 
9216
- // ../../node_modules/.pnpm/when-exit@2.1.2/node_modules/when-exit/dist/node/interceptor.js
9410
+ // ../../node_modules/.pnpm/when-exit@2.1.4/node_modules/when-exit/dist/node/interceptor.js
9217
9411
  var Interceptor = class {
9218
9412
  /* CONSTRUCTOR */
9219
9413
  constructor() {
@@ -9227,14 +9421,17 @@ var Interceptor = class {
9227
9421
  }, this.hook = () => {
9228
9422
  process5.once("exit", () => this.exit());
9229
9423
  for (let signal of signals_default)
9230
- process5.once(signal, () => this.exit(signal));
9424
+ try {
9425
+ process5.once(signal, () => this.exit(signal));
9426
+ } catch {
9427
+ }
9231
9428
  }, this.register = (callback) => (this.callbacks.add(callback), () => {
9232
9429
  this.callbacks.delete(callback);
9233
9430
  }), this.hook();
9234
9431
  }
9235
9432
  }, interceptor_default = new Interceptor();
9236
9433
 
9237
- // ../../node_modules/.pnpm/when-exit@2.1.2/node_modules/when-exit/dist/node/index.js
9434
+ // ../../node_modules/.pnpm/when-exit@2.1.4/node_modules/when-exit/dist/node/index.js
9238
9435
  var whenExit = interceptor_default.register, node_default = whenExit;
9239
9436
 
9240
9437
  // ../../node_modules/.pnpm/atomically@2.0.3/node_modules/atomically/dist/utils/temp.js
@@ -13439,7 +13636,7 @@ async function latestVersion(packageName, options) {
13439
13636
  }
13440
13637
 
13441
13638
  // ../cli-kit/dist/public/node/node-package-manager.js
13442
- var import_semver3 = __toESM(require_semver()), yarnLockfile = "yarn.lock", npmLockfile = "package-lock.json", pnpmLockfile = "pnpm-lock.yaml", bunLockfile = "bun.lockb", pnpmWorkspaceFile = "pnpm-workspace.yaml", lockfiles = [yarnLockfile, pnpmLockfile, npmLockfile, bunLockfile], lockfilesByManager = {
13639
+ var import_semver3 = __toESM(require_semver(), 1), yarnLockfile = "yarn.lock", npmLockfile = "package-lock.json", pnpmLockfile = "pnpm-lock.yaml", bunLockfile = "bun.lockb", pnpmWorkspaceFile = "pnpm-workspace.yaml", lockfiles = [yarnLockfile, pnpmLockfile, npmLockfile, bunLockfile], lockfilesByManager = {
13443
13640
  yarn: yarnLockfile,
13444
13641
  npm: npmLockfile,
13445
13642
  pnpm: pnpmLockfile,
@@ -13462,10 +13659,12 @@ function packageManagerFromUserAgent(env = process.env) {
13462
13659
  return env.npm_config_user_agent?.includes("yarn") ? "yarn" : env.npm_config_user_agent?.includes("pnpm") ? "pnpm" : env.npm_config_user_agent?.includes("bun") ? "bun" : env.npm_config_user_agent?.includes("npm") ? "npm" : "unknown";
13463
13660
  }
13464
13661
  async function getPackageManager(fromDirectory) {
13465
- let directory = await captureOutput("npm", ["prefix"], { cwd: fromDirectory });
13466
- outputDebug(outputContent`Obtaining the dependency manager in directory ${outputToken.path(directory)}...`);
13467
- let packageJson2 = joinPath(directory, "package.json");
13468
- if (!await fileExists(packageJson2))
13662
+ let directory, packageJson2;
13663
+ try {
13664
+ directory = await captureOutput("npm", ["prefix"], { cwd: fromDirectory }), outputDebug(outputContent`Obtaining the dependency manager in directory ${outputToken.path(directory)}...`), packageJson2 = joinPath(directory, "package.json");
13665
+ } catch {
13666
+ }
13667
+ if (!directory || !packageJson2 || !await fileExists(packageJson2))
13469
13668
  return packageManagerFromUserAgent();
13470
13669
  let yarnLockPath = joinPath(directory, yarnLockfile), pnpmLockPath = joinPath(directory, pnpmLockfile), bunLockPath = joinPath(directory, bunLockfile);
13471
13670
  return await fileExists(yarnLockPath) ? "yarn" : await fileExists(pnpmLockPath) ? "pnpm" : await fileExists(bunLockPath) ? "bun" : "npm";
@@ -13749,4 +13948,4 @@ deep-extend/lib/deep-extend.js:
13749
13948
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13750
13949
  *)
13751
13950
  */
13752
- //# sourceMappingURL=chunk-FDW7NWC7.js.map
13951
+ //# sourceMappingURL=chunk-GESAFNQ7.js.map