@shopify/cli 3.72.2 → 3.73.1

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 (149) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +814 -0
  2. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +1 -1
  3. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +3 -4
  4. package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +113 -44
  5. package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +8 -3
  6. package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +6 -5
  7. package/dist/assets/hydrogen/starter/app/lib/variants.ts +3 -3
  8. package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +1 -1
  9. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +9 -16
  10. package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +1 -10
  11. package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +1 -10
  12. package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +50 -119
  13. package/dist/assets/hydrogen/starter/app/routes/search.tsx +42 -38
  14. package/dist/assets/hydrogen/starter/app/styles/app.css +25 -1
  15. package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +23 -20
  16. package/dist/assets/hydrogen/starter/guides/search/search.md +27 -25
  17. package/dist/assets/hydrogen/starter/package.json +3 -3
  18. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +177 -194
  19. package/dist/assets/hydrogen/tailwind/tailwind.css +1 -1
  20. package/dist/{chokidar-OESTCX4H.js → chokidar-5LLC6S6D.js} +47 -90
  21. package/dist/{chunk-VSLR7ET4.js → chunk-25IMI7TH.js} +8 -46
  22. package/dist/{chunk-NCKQIOV4.js → chunk-3HBRMIPY.js} +28 -50
  23. package/dist/{chunk-NXHZX3WR.js → chunk-3UQTWISO.js} +9 -9
  24. package/dist/{chunk-GVNIHXMX.js → chunk-4SP4IRCQ.js} +38 -60
  25. package/dist/{chunk-QDPQB6WU.js → chunk-4UAFBJXJ.js} +5 -5
  26. package/dist/{chunk-L2J5VM7R.js → chunk-5YYJVU2L.js} +41 -68
  27. package/dist/{chunk-I6R52HNI.js → chunk-6NZVGPSV.js} +39 -68
  28. package/dist/{chunk-XVNW332R.js → chunk-75LV6AQS.js} +6 -10
  29. package/dist/{chunk-N2V4IFX3.js → chunk-7JQIHXLD.js} +3 -3
  30. package/dist/{chunk-2HGYYNE5.js → chunk-B5EXYCV3.js} +5 -9
  31. package/dist/{chunk-NB4NLOEJ.js → chunk-BUFIEXZ5.js} +11 -20
  32. package/dist/{chunk-522OB3EU.js → chunk-CFIKVUNW.js} +2 -2
  33. package/dist/{chunk-KYB6A4PE.js → chunk-CRHXI6PS.js} +13 -23
  34. package/dist/{chunk-SO2RZ6TZ.js → chunk-CXHISGHD.js} +5 -5
  35. package/dist/{chunk-2YCRDHPC.js → chunk-DZHO64DX.js} +4 -4
  36. package/dist/{chunk-KGKTCQ7H.js → chunk-EKIVYQZC.js} +5 -5
  37. package/dist/{chunk-NUP5TATA.js → chunk-EZQWZ57B.js} +2 -2
  38. package/dist/{chunk-UBB7JKND.js → chunk-G2ZZKGSV.js} +2 -2
  39. package/dist/{chunk-CBBS4CV7.js → chunk-G5R6YD27.js} +8 -13
  40. package/dist/{chunk-ECWFBV2F.js → chunk-GLYEBL66.js} +5 -5
  41. package/dist/{chunk-E37RRDIH.js → chunk-HIQDOFZI.js} +4 -4
  42. package/dist/{chunk-HYGCZ6GV.js → chunk-HYVCBINV.js} +68 -49
  43. package/dist/{chunk-ZESD7DR7.js → chunk-I72O5WWR.js} +67 -104
  44. package/dist/{chunk-OXKHBIW7.js → chunk-IG5SOACB.js} +29 -34
  45. package/dist/{chunk-OWLPHMUA.js → chunk-J673ZU5S.js} +4 -4
  46. package/dist/{chunk-K6Y4FYT5.js → chunk-K7HGDAI4.js} +17 -20
  47. package/dist/{chunk-UIRMJZRW.js → chunk-KD7WMX4J.js} +4 -4
  48. package/dist/{chunk-BYPQXSAL.js → chunk-KUM3DVPF.js} +17 -13
  49. package/dist/{chunk-6IUL3QZW.js → chunk-LPBV67AA.js} +4 -4
  50. package/dist/{chunk-WNDN5FAY.js → chunk-MHUINF7I.js} +3 -3
  51. package/dist/{chunk-JDM5VOXB.js → chunk-MJWFXPPX.js} +3 -3
  52. package/dist/{chunk-NE43V3EI.js → chunk-MLL3JKVY.js} +6 -7
  53. package/dist/{chunk-QXIIXX7G.js → chunk-NHV2E73I.js} +16518 -24140
  54. package/dist/{chunk-HMUOOT55.js → chunk-NQZUE7SY.js} +6 -6
  55. package/dist/{chunk-PQQTBTYM.js → chunk-O72ZUVEA.js} +4 -5
  56. package/dist/{chunk-SNOECVP4.js → chunk-OAZFIMJ3.js} +2 -2
  57. package/dist/{chunk-UIAIRQSP.js → chunk-OFYEMT6X.js} +3 -3
  58. package/dist/{chunk-4HTVLK2H.js → chunk-OXS42VB7.js} +1402 -1989
  59. package/dist/{chunk-TAKO7LSJ.js → chunk-P63UVLRS.js} +7 -7
  60. package/dist/{chunk-GKEFW755.js → chunk-PBDGN4T2.js} +6 -6
  61. package/dist/{chunk-POZ5MGPT.js → chunk-PKR7KJ6P.js} +2 -3
  62. package/dist/{chunk-PKJLXLTR.js → chunk-PVMQM44E.js} +5 -5
  63. package/dist/{chunk-KCI6QCAV.js → chunk-PWMEMGZN.js} +4 -4
  64. package/dist/{chunk-KMZ5JSGS.js → chunk-QIM24FVT.js} +3 -3
  65. package/dist/{chunk-VJ7TIVX7.js → chunk-RBLSG22M.js} +6 -7
  66. package/dist/{chunk-K7B4JJLF.js → chunk-RDZJQNFU.js} +4 -4
  67. package/dist/{chunk-YKUYPSCY.js → chunk-RZOW7U2N.js} +3 -3
  68. package/dist/{chunk-OJOHMVV7.js → chunk-SBPFWO4S.js} +294 -448
  69. package/dist/{chunk-O5K4AU7Q.js → chunk-SHWOPMLQ.js} +3 -4
  70. package/dist/{chunk-KWLJTNRE.js → chunk-SNXQ36U2.js} +4 -4
  71. package/dist/{chunk-KVEY52WG.js → chunk-TIXENOYB.js} +4 -4
  72. package/dist/{chunk-RCRRAFH7.js → chunk-X4N2QZOS.js} +3 -3
  73. package/dist/{chunk-VWNWE4HG.js → chunk-X5WKMCE4.js} +111 -84
  74. package/dist/{chunk-PMUQTGZJ.js → chunk-X7YTIMNN.js} +4 -6
  75. package/dist/{chunk-7Q3MMWAC.js → chunk-XE5EOEBL.js} +2 -2
  76. package/dist/{chunk-YXJHYEP7.js → chunk-YVXC5Q6R.js} +4 -4
  77. package/dist/{chunk-HSTSRNLJ.js → chunk-ZX3L2JKV.js} +64 -86
  78. package/dist/cli/commands/auth/logout.js +28 -28
  79. package/dist/cli/commands/auth/logout.test.js +30 -30
  80. package/dist/cli/commands/cache/clear.js +27 -27
  81. package/dist/cli/commands/debug/command-flags.js +27 -27
  82. package/dist/cli/commands/docs/generate.js +27 -27
  83. package/dist/cli/commands/docs/generate.test.js +28 -28
  84. package/dist/cli/commands/help.js +27 -27
  85. package/dist/cli/commands/kitchen-sink/async.js +28 -28
  86. package/dist/cli/commands/kitchen-sink/async.test.js +29 -29
  87. package/dist/cli/commands/kitchen-sink/index.js +30 -30
  88. package/dist/cli/commands/kitchen-sink/index.test.js +31 -31
  89. package/dist/cli/commands/kitchen-sink/prompts.js +28 -28
  90. package/dist/cli/commands/kitchen-sink/prompts.test.js +29 -29
  91. package/dist/cli/commands/kitchen-sink/static.js +28 -28
  92. package/dist/cli/commands/kitchen-sink/static.test.js +29 -29
  93. package/dist/cli/commands/notifications/generate.js +28 -28
  94. package/dist/cli/commands/notifications/list.js +28 -28
  95. package/dist/cli/commands/search.js +28 -28
  96. package/dist/cli/commands/upgrade.js +28 -28
  97. package/dist/cli/commands/upgrade.test.js +3 -3
  98. package/dist/cli/commands/version.js +28 -28
  99. package/dist/cli/commands/version.test.js +29 -29
  100. package/dist/cli/services/commands/notifications.js +21 -21
  101. package/dist/cli/services/commands/search.js +15 -15
  102. package/dist/cli/services/commands/search.test.js +16 -16
  103. package/dist/cli/services/commands/version.js +16 -16
  104. package/dist/cli/services/commands/version.test.js +18 -18
  105. package/dist/cli/services/kitchen-sink/async.js +15 -15
  106. package/dist/cli/services/kitchen-sink/prompts.js +15 -15
  107. package/dist/cli/services/kitchen-sink/static.js +15 -15
  108. package/dist/cli/services/upgrade.js +17 -17
  109. package/dist/cli/services/upgrade.test.js +20 -20
  110. package/dist/configs/all.yml +12 -0
  111. package/dist/configs/recommended.yml +15 -0
  112. package/dist/configs/theme-app-extension.yml +3 -0
  113. package/dist/{custom-oclif-loader-G2DAJL7B.js → custom-oclif-loader-L4JT3EUD.js} +15 -15
  114. package/dist/data/latest.json +1 -1
  115. package/dist/data/manifest_theme.json +1 -0
  116. package/dist/data/preset.json +66 -0
  117. package/dist/data/preset_blocks.json +20 -13
  118. package/dist/data/section.json +1 -15
  119. package/dist/data/setting.json +1 -1
  120. package/dist/data/theme_block.json +1 -15
  121. package/dist/{del-K5ZJEWTD.js → del-P2RS6GN2.js} +9 -9
  122. package/dist/{devtools-KYKGATNX.js → devtools-K7FXBBFZ.js} +3 -3
  123. package/dist/error-handler-4CU3ZOV7.js +38 -0
  124. package/dist/hooks/postrun.js +22 -22
  125. package/dist/hooks/prerun.js +22 -22
  126. package/dist/{http-proxy-GGTVQ6CU.js → http-proxy-FXWKYHZ3.js} +14 -24
  127. package/dist/index.js +7234 -7320
  128. package/dist/lib-JVEIEXYB.js +6 -0
  129. package/dist/lib-QZGSY5YB.js +13 -0
  130. package/dist/{local-Q5ZG2NHX.js → local-2K66O4X2.js} +15 -15
  131. package/dist/{magic-string.es-3RXPUXZF.js → magic-string.es-PJMYOE6F.js} +49 -96
  132. package/dist/{morph-SEECJQ2W.js → morph-OSHCID2F.js} +261 -347
  133. package/dist/{multipart-parser-QKUAJJP5.js → multipart-parser-WSNBP656.js} +8 -7
  134. package/dist/{node-S6CM3NTX.js → node-342GUJIM.js} +31 -31
  135. package/dist/{node-package-manager-GUY5IO3W.js → node-package-manager-RJSBCFD7.js} +19 -17
  136. package/dist/{npa-RLWNZ3BM.js → npa-TM76BGG3.js} +10 -16
  137. package/dist/{open-MZGVNFZO.js → open-BHIF7E3E.js} +3 -3
  138. package/dist/out-JR4DWQ2G.js +7 -0
  139. package/dist/{path-NDLRQPLA.js → path-2HZUSAGR.js} +3 -3
  140. package/dist/{source-map-7AAPWPHZ.js → source-map-QCVC46UY.js} +2 -2
  141. package/dist/tsconfig.tsbuildinfo +1 -1
  142. package/dist/{ui-AWSBLSD4.js → ui-YBLW4B72.js} +15 -15
  143. package/dist/{workerd-3HGLHQET.js → workerd-5KR5CP5F.js} +30 -30
  144. package/oclif.manifest.json +81 -1
  145. package/package.json +8 -8
  146. package/dist/error-handler-6HCFKLTC.js +0 -38
  147. package/dist/lib-PPXZBVZX.js +0 -6
  148. package/dist/lib-XYCLX35G.js +0 -13
  149. package/dist/out-MHEKZJWS.js +0 -7
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  platformAndArch
3
- } from "./chunk-UIAIRQSP.js";
3
+ } from "./chunk-OFYEMT6X.js";
4
4
  import {
5
5
  ClientError,
6
6
  GraphQLClient,
@@ -20,7 +20,7 @@ import {
20
20
  sanitizedHeadersOutput,
21
21
  shopifyFetch,
22
22
  z
23
- } from "./chunk-VWNWE4HG.js";
23
+ } from "./chunk-X5WKMCE4.js";
24
24
  import {
25
25
  cacheRetrieveOrRepopulate,
26
26
  getCachedPartnerAccountStatus,
@@ -30,7 +30,7 @@ import {
30
30
  removeSession,
31
31
  setCachedPartnerAccountStatus,
32
32
  setSession
33
- } from "./chunk-ZESD7DR7.js";
33
+ } from "./chunk-I72O5WWR.js";
34
34
  import {
35
35
  AbortError,
36
36
  BugError,
@@ -63,16 +63,16 @@ import {
63
63
  stringifyMessage,
64
64
  themeKitAccessDomain,
65
65
  themeToken
66
- } from "./chunk-4HTVLK2H.js";
66
+ } from "./chunk-OXS42VB7.js";
67
67
  import {
68
68
  cwd
69
- } from "./chunk-K6Y4FYT5.js";
69
+ } from "./chunk-K7HGDAI4.js";
70
70
  import {
71
71
  __commonJS,
72
72
  __require,
73
73
  __toESM,
74
74
  init_cjs_shims
75
- } from "./chunk-POZ5MGPT.js";
75
+ } from "./chunk-PKR7KJ6P.js";
76
76
 
77
77
  // ../../node_modules/.pnpm/network-interfaces@1.1.0/node_modules/network-interfaces/index.js
78
78
  var require_network_interfaces = __commonJS({
@@ -1535,15 +1535,13 @@ var require_IORedisConnection = __commonJS({
1535
1535
  try {
1536
1536
  !_n && _i.return != null && _i.return();
1537
1537
  } finally {
1538
- if (_d)
1539
- throw _e;
1538
+ if (_d) throw _e;
1540
1539
  }
1541
1540
  }
1542
1541
  return _arr;
1543
1542
  }
1544
1543
  function _arrayWithHoles(arr) {
1545
- if (Array.isArray(arr))
1546
- return arr;
1544
+ if (Array.isArray(arr)) return arr;
1547
1545
  }
1548
1546
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1549
1547
  try {
@@ -1666,15 +1664,13 @@ var require_RedisDatastore = __commonJS({
1666
1664
  try {
1667
1665
  !_n && _i.return != null && _i.return();
1668
1666
  } finally {
1669
- if (_d)
1670
- throw _e;
1667
+ if (_d) throw _e;
1671
1668
  }
1672
1669
  }
1673
1670
  return _arr;
1674
1671
  }
1675
1672
  function _arrayWithHoles2(arr) {
1676
- if (Array.isArray(arr))
1677
- return arr;
1673
+ if (Array.isArray(arr)) return arr;
1678
1674
  }
1679
1675
  function asyncGeneratorStep2(gen, resolve, reject, _next, _throw, key, arg) {
1680
1676
  try {
@@ -2036,15 +2032,13 @@ var require_Group = __commonJS({
2036
2032
  try {
2037
2033
  !_n && _i.return != null && _i.return();
2038
2034
  } finally {
2039
- if (_d)
2040
- throw _e;
2035
+ if (_d) throw _e;
2041
2036
  }
2042
2037
  }
2043
2038
  return _arr;
2044
2039
  }
2045
2040
  function _arrayWithHoles2(arr) {
2046
- if (Array.isArray(arr))
2047
- return arr;
2041
+ if (Array.isArray(arr)) return arr;
2048
2042
  }
2049
2043
  function asyncGeneratorStep2(gen, resolve, reject, _next, _throw, key, arg) {
2050
2044
  try {
@@ -2223,8 +2217,7 @@ var require_Bottleneck = __commonJS({
2223
2217
  try {
2224
2218
  !_n && _i.return != null && _i.return();
2225
2219
  } finally {
2226
- if (_d)
2227
- throw _e;
2220
+ if (_d) throw _e;
2228
2221
  }
2229
2222
  }
2230
2223
  return _arr;
@@ -2236,12 +2229,10 @@ var require_Bottleneck = __commonJS({
2236
2229
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
2237
2230
  }
2238
2231
  function _iterableToArray(iter) {
2239
- if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]")
2240
- return Array.from(iter);
2232
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
2241
2233
  }
2242
2234
  function _arrayWithHoles2(arr) {
2243
- if (Array.isArray(arr))
2244
- return arr;
2235
+ if (Array.isArray(arr)) return arr;
2245
2236
  }
2246
2237
  function asyncGeneratorStep2(gen, resolve, reject, _next, _throw, key, arg) {
2247
2238
  try {
@@ -2753,8 +2744,7 @@ var DevServer = class {
2753
2744
  throw new Error(`DevServer for '${this.name}' not present in this spin environment`);
2754
2745
  let match = new RegExp(`^(.+)${this.name}$`).exec(services[0]), organization = match ? match[1] : "";
2755
2746
  return `${organization !== "shopify--" ? `${organization}` : ""}${this.name}.${process.env.SPIN_FQDN}`;
2756
- } else
2757
- return DevServerUtils.inferenceModeAndProjectIsEdition2016(this.name) ? (this.assertRunningLocally2016(), `${prefix}.myshopify.io`) : (this.assertRunningLocally2024(), `${prefix}.shop.dev`);
2747
+ } else return DevServerUtils.inferenceModeAndProjectIsEdition2016(this.name) ? (this.assertRunningLocally2016(), `${prefix}.myshopify.io`) : (this.assertRunningLocally2024(), `${prefix}.shop.dev`);
2758
2748
  }
2759
2749
  assertRunningLocally2024() {
2760
2750
  let [addr, port] = DevServerUtils.getAddrPort2024(this.name);
@@ -2776,8 +2766,7 @@ var DevServer = class {
2776
2766
  if (!fs.readdirSync("/run/ports2").find((file) => file.endsWith(`--${this.name}`)))
2777
2767
  throw new Error(`DevServer for '${this.name}' not present in this spin environment`);
2778
2768
  return `${prefix}.${this.name}.${process.env.SPIN_FQDN}`;
2779
- } else
2780
- return DevServerUtils.inferenceModeAndProjectIsEdition2016("shopify") ? (this.assertRunningLocally2016(), `${prefix}.myshopify.io`) : (this.assertRunningLocally2024(), `${prefix}.my.shop.dev`);
2769
+ } else return DevServerUtils.inferenceModeAndProjectIsEdition2016("shopify") ? (this.assertRunningLocally2016(), `${prefix}.myshopify.io`) : (this.assertRunningLocally2024(), `${prefix}.my.shop.dev`);
2781
2770
  }
2782
2771
  assertRunningLocally2024() {
2783
2772
  let [addr, port] = DevServerUtils.getAddrPort2024("shopify");
@@ -3144,14 +3133,6 @@ var JWTInvalid = class extends JOSEError {
3144
3133
  }
3145
3134
  code = "ERR_JWT_INVALID";
3146
3135
  };
3147
- var JWKSMultipleMatchingKeys = class extends JOSEError {
3148
- [Symbol.asyncIterator];
3149
- static get code() {
3150
- return "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
3151
- }
3152
- code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
3153
- message = "multiple matching keys found in the JSON Web Key Set";
3154
- };
3155
3136
 
3156
3137
  // ../../node_modules/.pnpm/jose@5.8.0/node_modules/jose/dist/node/esm/lib/is_object.js
3157
3138
  init_cjs_shims();
@@ -3441,6 +3422,36 @@ Request ID: ${requestId}
3441
3422
  };
3442
3423
  }
3443
3424
 
3425
+ // ../cli-kit/dist/private/node/request-ids.js
3426
+ init_cjs_shims();
3427
+ var RequestIDCollection = class _RequestIDCollection {
3428
+ constructor() {
3429
+ this.requestIds = [];
3430
+ }
3431
+ static getInstance() {
3432
+ return _RequestIDCollection.instance || (_RequestIDCollection.instance = new _RequestIDCollection()), _RequestIDCollection.instance;
3433
+ }
3434
+ /**
3435
+ * Add a request ID to the collection
3436
+ * We only report the first MAX_REQUEST_IDS request IDs.
3437
+ */
3438
+ addRequestId(requestId) {
3439
+ requestId && this.requestIds.length < 100 && this.requestIds.push(requestId);
3440
+ }
3441
+ /**
3442
+ * Get all collected request IDs
3443
+ */
3444
+ getRequestIds() {
3445
+ return this.requestIds;
3446
+ }
3447
+ /**
3448
+ * Clear all stored request IDs
3449
+ */
3450
+ clear() {
3451
+ this.requestIds = [];
3452
+ }
3453
+ }, requestIdsCollection = RequestIDCollection.getInstance();
3454
+
3444
3455
  // ../cli-kit/dist/public/node/api/graphql.js
3445
3456
  async function performGraphQLRequest(options2) {
3446
3457
  let { token, addedHeaders, queryAsString, variables, api, url, responseOptions, unauthorizedHandler } = options2, headers = {
@@ -3448,20 +3459,28 @@ async function performGraphQLRequest(options2) {
3448
3459
  ...buildHeaders(token)
3449
3460
  };
3450
3461
  debugLogRequestInfo(api, queryAsString, url, variables, headers);
3451
- let clientOptions = { agent: await httpsAgent(), headers }, client = new GraphQLClient(url, clientOptions);
3452
- return runWithTimer("cmd_all_timing_network_ms")(async () => {
3453
- let response = await retryAwareRequest({ request: () => client.rawRequest(queryAsString, variables), url }, responseOptions?.handleErrors === !1 ? void 0 : errorHandler(api), unauthorizedHandler);
3454
- responseOptions?.onResponse && responseOptions.onResponse(response);
3462
+ let clientOptions = { agent: await httpsAgent(), headers }, client = new GraphQLClient(url, clientOptions), performRequest = async () => {
3463
+ let fullResponse;
3455
3464
  try {
3456
- let requestId = response.headers.get("x-request-id");
3457
- await addPublicMetadata(async () => ({
3458
- cmd_all_last_graphql_request_id: requestId ?? void 0
3459
- }));
3460
- } catch {
3465
+ return fullResponse = await client.rawRequest(queryAsString, variables), await logLastRequestIdFromResponse(fullResponse), fullResponse;
3466
+ } catch (error) {
3467
+ throw error instanceof ClientError && await logLastRequestIdFromResponse(error.response), error;
3461
3468
  }
3462
- return response.data;
3469
+ };
3470
+ return runWithTimer("cmd_all_timing_network_ms")(async () => {
3471
+ let response = await retryAwareRequest({ request: performRequest, url }, responseOptions?.handleErrors === !1 ? void 0 : errorHandler(api), unauthorizedHandler);
3472
+ return responseOptions?.onResponse && responseOptions.onResponse(response), response.data;
3463
3473
  });
3464
3474
  }
3475
+ async function logLastRequestIdFromResponse(response) {
3476
+ try {
3477
+ let requestId = response.headers.get("x-request-id");
3478
+ requestIdsCollection.addRequestId(requestId), await addPublicMetadata(() => ({
3479
+ cmd_all_last_graphql_request_id: requestId ?? void 0
3480
+ }));
3481
+ } catch {
3482
+ }
3483
+ }
3465
3484
  async function graphqlRequest(options2) {
3466
3485
  return performGraphQLRequest({
3467
3486
  ...options2,
@@ -3594,8 +3613,7 @@ The CLI is currently unable to prompt for reauthentication.`, "Restart the CLI p
3594
3613
  } catch (error) {
3595
3614
  if (error instanceof InvalidGrantError)
3596
3615
  throwOnNoPrompt(), newSession = await executeCompleteFlow(applications, fqdn);
3597
- else
3598
- throw error instanceof InvalidRequestError ? (await remove(), new AbortError(`
3616
+ else throw error instanceof InvalidRequestError ? (await remove(), new AbortError(`
3599
3617
  Error validating auth session`, "We've cleared the current session, please try again")) : error;
3600
3618
  }
3601
3619
  }
@@ -3773,6 +3791,7 @@ export {
3773
3791
  restRequestUrl,
3774
3792
  restRequestHeaders,
3775
3793
  isThemeAccessSession,
3794
+ requestIdsCollection,
3776
3795
  graphqlRequest,
3777
3796
  graphqlRequestDoc,
3778
3797
  getNextDeprecationDate,
@@ -3789,4 +3808,4 @@ export {
3789
3808
  getEnvironmentData,
3790
3809
  getSensitiveEnvironmentData
3791
3810
  };
3792
- //# sourceMappingURL=chunk-HYGCZ6GV.js.map
3811
+ //# sourceMappingURL=chunk-HYVCBINV.js.map