@shopify/cli 3.72.2 → 3.73.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 (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-4HTVLK2H.js → chunk-3OXCI3HX.js} +1402 -1989
  24. package/dist/{chunk-2YCRDHPC.js → chunk-5OFJTURZ.js} +4 -4
  25. package/dist/{chunk-TAKO7LSJ.js → chunk-65GSOZHL.js} +7 -7
  26. package/dist/{chunk-6IUL3QZW.js → chunk-66HLUVKV.js} +4 -4
  27. package/dist/{chunk-N2V4IFX3.js → chunk-6PEBJVBW.js} +3 -3
  28. package/dist/{chunk-XVNW332R.js → chunk-75LV6AQS.js} +6 -10
  29. package/dist/{chunk-QXIIXX7G.js → chunk-7RKRCUFA.js} +16518 -24140
  30. package/dist/{chunk-ZESD7DR7.js → chunk-AFPOP3K5.js} +67 -104
  31. package/dist/{chunk-2HGYYNE5.js → chunk-B5EXYCV3.js} +5 -9
  32. package/dist/{chunk-NB4NLOEJ.js → chunk-BUFIEXZ5.js} +11 -20
  33. package/dist/{chunk-YXJHYEP7.js → chunk-CEIZT2W3.js} +4 -4
  34. package/dist/{chunk-522OB3EU.js → chunk-CFIKVUNW.js} +2 -2
  35. package/dist/{chunk-KYB6A4PE.js → chunk-CRHXI6PS.js} +13 -23
  36. package/dist/{chunk-PQQTBTYM.js → chunk-ELTOJBOJ.js} +4 -5
  37. package/dist/{chunk-NUP5TATA.js → chunk-EZQWZ57B.js} +2 -2
  38. package/dist/{chunk-YKUYPSCY.js → chunk-F7D333WQ.js} +3 -3
  39. package/dist/{chunk-UBB7JKND.js → chunk-G2ZZKGSV.js} +2 -2
  40. package/dist/{chunk-CBBS4CV7.js → chunk-G5R6YD27.js} +8 -13
  41. package/dist/{chunk-RCRRAFH7.js → chunk-GDLROW57.js} +3 -3
  42. package/dist/{chunk-KMZ5JSGS.js → chunk-I25PGLBO.js} +3 -3
  43. package/dist/{chunk-OXKHBIW7.js → chunk-IG5SOACB.js} +29 -34
  44. package/dist/{chunk-UIRMJZRW.js → chunk-IRHYYIN7.js} +4 -4
  45. package/dist/{chunk-OWLPHMUA.js → chunk-J673ZU5S.js} +4 -4
  46. package/dist/{chunk-HYGCZ6GV.js → chunk-JORKLY7M.js} +68 -49
  47. package/dist/{chunk-K6Y4FYT5.js → chunk-K7HGDAI4.js} +17 -20
  48. package/dist/{chunk-I6R52HNI.js → chunk-KF2D6QHZ.js} +39 -68
  49. package/dist/{chunk-KGKTCQ7H.js → chunk-KMWARALD.js} +5 -5
  50. package/dist/{chunk-VWNWE4HG.js → chunk-KTNFE44J.js} +110 -83
  51. package/dist/{chunk-BYPQXSAL.js → chunk-KUM3DVPF.js} +17 -13
  52. package/dist/{chunk-K7B4JJLF.js → chunk-KZBL6BQ7.js} +4 -4
  53. package/dist/{chunk-WNDN5FAY.js → chunk-MHUINF7I.js} +3 -3
  54. package/dist/{chunk-L2J5VM7R.js → chunk-NFQLKURK.js} +41 -68
  55. package/dist/{chunk-KCI6QCAV.js → chunk-O77L7CCL.js} +4 -4
  56. package/dist/{chunk-SNOECVP4.js → chunk-OAZFIMJ3.js} +2 -2
  57. package/dist/{chunk-GVNIHXMX.js → chunk-OE3IXTC5.js} +38 -60
  58. package/dist/{chunk-ECWFBV2F.js → chunk-ONOLOXLM.js} +5 -5
  59. package/dist/{chunk-POZ5MGPT.js → chunk-PKR7KJ6P.js} +2 -3
  60. package/dist/{chunk-JDM5VOXB.js → chunk-PRWEHR2C.js} +3 -3
  61. package/dist/{chunk-SO2RZ6TZ.js → chunk-QNK2EAZ3.js} +5 -5
  62. package/dist/{chunk-E37RRDIH.js → chunk-RCA7PFH4.js} +4 -4
  63. package/dist/{chunk-GKEFW755.js → chunk-RK7JAMCI.js} +6 -6
  64. package/dist/{chunk-HMUOOT55.js → chunk-SANP6FPA.js} +6 -6
  65. package/dist/{chunk-OJOHMVV7.js → chunk-SBPFWO4S.js} +294 -448
  66. package/dist/{chunk-O5K4AU7Q.js → chunk-SHWOPMLQ.js} +3 -4
  67. package/dist/{chunk-NE43V3EI.js → chunk-SUUVDRTQ.js} +6 -7
  68. package/dist/{chunk-VJ7TIVX7.js → chunk-TEHNKBLD.js} +6 -7
  69. package/dist/{chunk-KVEY52WG.js → chunk-VPNXQGG6.js} +4 -4
  70. package/dist/{chunk-NXHZX3WR.js → chunk-X5FJXK25.js} +9 -9
  71. package/dist/{chunk-PMUQTGZJ.js → chunk-X7YTIMNN.js} +4 -6
  72. package/dist/{chunk-UIAIRQSP.js → chunk-XAGT2UNE.js} +3 -3
  73. package/dist/{chunk-7Q3MMWAC.js → chunk-XE5EOEBL.js} +2 -2
  74. package/dist/{chunk-PKJLXLTR.js → chunk-YP7WU5EU.js} +5 -5
  75. package/dist/{chunk-QDPQB6WU.js → chunk-YPTEMDFR.js} +5 -5
  76. package/dist/{chunk-KWLJTNRE.js → chunk-ZENVITME.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-V3IB4SYZ.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-WK3AZ7A2.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 +7228 -7320
  128. package/dist/lib-JVEIEXYB.js +6 -0
  129. package/dist/lib-QZGSY5YB.js +13 -0
  130. package/dist/{local-Q5ZG2NHX.js → local-3ERK45M5.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-2KLEBSMO.js} +31 -31
  135. package/dist/{node-package-manager-GUY5IO3W.js → node-package-manager-QIM24GB3.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-5AHG256I.js} +15 -15
  143. package/dist/{workerd-3HGLHQET.js → workerd-MSNALKI2.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-XAGT2UNE.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-KTNFE44J.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-AFPOP3K5.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-3OXCI3HX.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-JORKLY7M.js.map
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  init_cjs_shims
6
- } from "./chunk-POZ5MGPT.js";
6
+ } from "./chunk-PKR7KJ6P.js";
7
7
 
8
8
  // ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
9
9
  var require_commondir = __commonJS({
@@ -20,8 +20,7 @@ var require_commondir = __commonJS({
20
20
  var res = files.slice(1).reduce(function(ps, file) {
21
21
  if (!file.match(/^([A-Za-z]:)?\/|\\/))
22
22
  throw new Error("relative path without a basedir");
23
- for (var xs = file.split(/\/+|\\+/), i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++)
24
- ;
23
+ for (var xs = file.split(/\/+|\\+/), i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++) ;
25
24
  return ps.slice(0, i);
26
25
  }, files[0].split(/\/+|\\+/));
27
26
  return res.length > 1 ? res.join("/") : "/";
@@ -79,24 +78,22 @@ function normalizeString(path2, allowAboveRoot) {
79
78
  char = "/";
80
79
  }
81
80
  if (char === "/") {
82
- if (!(lastSlash === index - 1 || dots === 1))
83
- if (dots === 2) {
84
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
85
- if (res.length > 2) {
86
- let lastSlashIndex = res.lastIndexOf("/");
87
- lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
88
- continue;
89
- } else if (res.length > 0) {
90
- res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
91
- continue;
92
- }
81
+ if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
82
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
83
+ if (res.length > 2) {
84
+ let lastSlashIndex = res.lastIndexOf("/");
85
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
86
+ continue;
87
+ } else if (res.length > 0) {
88
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
89
+ continue;
93
90
  }
94
- allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
95
- } else
96
- res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
91
+ }
92
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
93
+ } else
94
+ res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
97
95
  lastSlash = index, dots = 0;
98
- } else
99
- char === "." && dots !== -1 ? ++dots : dots = -1;
96
+ } else char === "." && dots !== -1 ? ++dots : dots = -1;
100
97
  }
101
98
  return res;
102
99
  }
@@ -192,4 +189,4 @@ export {
192
189
  sniffForPath,
193
190
  sniffForJson
194
191
  };
195
- //# sourceMappingURL=chunk-K6Y4FYT5.js.map
192
+ //# sourceMappingURL=chunk-K7HGDAI4.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  require_once
3
- } from "./chunk-O5K4AU7Q.js";
3
+ } from "./chunk-SHWOPMLQ.js";
4
4
  import {
5
5
  fanoutHooks,
6
6
  reportAnalyticsEvent
7
- } from "./chunk-L2J5VM7R.js";
7
+ } from "./chunk-NFQLKURK.js";
8
8
  import {
9
9
  getEnvironmentData
10
- } from "./chunk-HYGCZ6GV.js";
10
+ } from "./chunk-JORKLY7M.js";
11
11
  import {
12
12
  CLI_KIT_VERSION
13
- } from "./chunk-KMZ5JSGS.js";
13
+ } from "./chunk-I25PGLBO.js";
14
14
  import {
15
15
  runWithRateLimit
16
- } from "./chunk-ZESD7DR7.js";
16
+ } from "./chunk-AFPOP3K5.js";
17
17
  import {
18
18
  AbortSilentError,
19
19
  CancelExecution,
@@ -28,23 +28,23 @@ import {
28
28
  reportingRateLimit,
29
29
  require_stacktracey,
30
30
  shouldReportErrorAsUnexpected
31
- } from "./chunk-4HTVLK2H.js";
31
+ } from "./chunk-3OXCI3HX.js";
32
32
  import {
33
33
  cwd,
34
34
  isAbsolutePath,
35
35
  joinPath,
36
36
  normalizePath,
37
37
  relativePath
38
- } from "./chunk-K6Y4FYT5.js";
38
+ } from "./chunk-K7HGDAI4.js";
39
39
  import {
40
40
  require_lib
41
- } from "./chunk-OJOHMVV7.js";
41
+ } from "./chunk-SBPFWO4S.js";
42
42
  import {
43
43
  __commonJS,
44
44
  __require,
45
45
  __toESM,
46
46
  init_cjs_shims
47
- } from "./chunk-POZ5MGPT.js";
47
+ } from "./chunk-PKR7KJ6P.js";
48
48
 
49
49
  // ../../node_modules/.pnpm/stackframe@1.3.4/node_modules/stackframe/stackframe.js
50
50
  var require_stackframe = __commonJS({
@@ -322,8 +322,7 @@ var require_end_of_stream = __commonJS({
322
322
  }, isChildProcess = function(stream) {
323
323
  return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3;
324
324
  }, eos = function(stream, opts, callback) {
325
- if (typeof opts == "function")
326
- return eos(stream, null, opts);
325
+ if (typeof opts == "function") return eos(stream, null, opts);
327
326
  opts || (opts = {}), callback = once(callback || noop);
328
327
  var ws = stream._writableState, rs = stream._readableState, readable = opts.readable || opts.readable !== !1 && stream.readable, writable = opts.writable || opts.writable !== !1 && stream.writable, cancelled = !1, onlegacyfinish = function() {
329
328
  stream.writable || onfinish();
@@ -339,10 +338,8 @@ var require_end_of_stream = __commonJS({
339
338
  process.nextTick(onclosenexttick);
340
339
  }, onclosenexttick = function() {
341
340
  if (!cancelled) {
342
- if (readable && !(rs && rs.ended && !rs.destroyed))
343
- return callback.call(stream, new Error("premature close"));
344
- if (writable && !(ws && ws.ended && !ws.destroyed))
345
- return callback.call(stream, new Error("premature close"));
341
+ if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream, new Error("premature close"));
342
+ if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream, new Error("premature close"));
346
343
  }
347
344
  }, onrequest = function() {
348
345
  stream.req.on("finish", onfinish);
@@ -372,19 +369,15 @@ var require_pump = __commonJS({
372
369
  stream.on("close", function() {
373
370
  closed = !0;
374
371
  }), eos(stream, { readable: reading, writable: writing }, function(err) {
375
- if (err)
376
- return callback(err);
372
+ if (err) return callback(err);
377
373
  closed = !0, callback();
378
374
  });
379
375
  var destroyed = !1;
380
376
  return function(err) {
381
377
  if (!closed && !destroyed) {
382
- if (destroyed = !0, isFS(stream))
383
- return stream.close(noop);
384
- if (isRequest(stream))
385
- return stream.abort();
386
- if (isFn(stream.destroy))
387
- return stream.destroy();
378
+ if (destroyed = !0, isFS(stream)) return stream.close(noop);
379
+ if (isRequest(stream)) return stream.abort();
380
+ if (isFn(stream.destroy)) return stream.destroy();
388
381
  callback(err || new Error("stream was destroyed"));
389
382
  }
390
383
  };
@@ -394,8 +387,7 @@ var require_pump = __commonJS({
394
387
  return from.pipe(to);
395
388
  }, pump = function() {
396
389
  var streams = Array.prototype.slice.call(arguments), callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop;
397
- if (Array.isArray(streams[0]) && (streams = streams[0]), streams.length < 2)
398
- throw new Error("pump requires two streams per minimum");
390
+ if (Array.isArray(streams[0]) && (streams = streams[0]), streams.length < 2) throw new Error("pump requires two streams per minimum");
399
391
  var error, destroys = streams.map(function(stream, i) {
400
392
  var reading = i < streams.length - 1, writing = i > 0;
401
393
  return destroyer(stream, reading, writing, function(err) {
@@ -495,8 +487,7 @@ var require_bugsnag = __commonJS({
495
487
  };
496
488
  }, Breadcrumb2;
497
489
  }(), _$Breadcrumb_1 = Breadcrumb, _$breadcrumbTypes_6 = ["navigation", "request", "process", "log", "user", "state", "error", "manual"], _$reduce_16 = function(arr, fn, accum) {
498
- for (var val = accum, i = 0, len = arr.length; i < len; i++)
499
- val = fn(val, arr[i], i, arr);
490
+ for (var val = accum, i = 0, len = arr.length; i < len; i++) val = fn(val, arr[i], i, arr);
500
491
  return val;
501
492
  }, _$filter_11 = function(arr, fn) {
502
493
  return _$reduce_16(arr, function(accum, item, i, arr2) {
@@ -514,8 +505,7 @@ var require_bugsnag = __commonJS({
514
505
  var result = [], prop;
515
506
  for (prop in obj)
516
507
  Object.prototype.hasOwnProperty.call(obj, prop) && result.push(prop);
517
- if (!_hasDontEnumBug)
518
- return result;
508
+ if (!_hasDontEnumBug) return result;
519
509
  for (var i = 0, len = _dontEnums.length; i < len; i++)
520
510
  Object.prototype.hasOwnProperty.call(obj, _dontEnums[i]) && result.push(_dontEnums[i]);
521
511
  return result;
@@ -575,8 +565,7 @@ var require_bugsnag = __commonJS({
575
565
  message: "should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",
576
566
  allowPartialObject: !0,
577
567
  validate: function(value) {
578
- if (typeof value != "object" || !value)
579
- return !1;
568
+ if (typeof value != "object" || !value) return !1;
580
569
  var providedKeys = _$keys_14(value), defaultKeys = _$keys_14(defaultErrorTypes());
581
570
  return !(_$filter_11(providedKeys, function(k) {
582
571
  return _$includes_12(defaultKeys, k);
@@ -769,20 +758,17 @@ var require_bugsnag = __commonJS({
769
758
  }
770
759
  function find(haystack, needle) {
771
760
  for (var i = 0, len = haystack.length; i < len; i++)
772
- if (haystack[i] === needle)
773
- return !0;
761
+ if (haystack[i] === needle) return !0;
774
762
  return !1;
775
763
  }
776
764
  function isDescendent(paths, path2) {
777
765
  for (var i = 0, len = paths.length; i < len; i++)
778
- if (path2.indexOf(paths[i]) === 0)
779
- return !0;
766
+ if (path2.indexOf(paths[i]) === 0) return !0;
780
767
  return !1;
781
768
  }
782
769
  function shouldRedact(patterns, key) {
783
770
  for (var i = 0, len = patterns.length; i < len; i++)
784
- if (typeof patterns[i] == "string" && patterns[i].toLowerCase() === key.toLowerCase() || patterns[i] && typeof patterns[i].test == "function" && patterns[i].test(key))
785
- return !0;
771
+ if (typeof patterns[i] == "string" && patterns[i].toLowerCase() === key.toLowerCase() || patterns[i] && typeof patterns[i].test == "function" && patterns[i].test(key)) return !0;
786
772
  return !1;
787
773
  }
788
774
  function __isArray_31(obj) {
@@ -801,12 +787,9 @@ var require_bugsnag = __commonJS({
801
787
  function edgesExceeded() {
802
788
  return path2.length > MIN_PRESERVED_DEPTH && edges > MAX_EDGES;
803
789
  }
804
- if (edges++, path2.length > MAX_DEPTH || edgesExceeded())
805
- return REPLACEMENT_NODE;
806
- if (obj2 === null || typeof obj2 != "object")
807
- return obj2;
808
- if (find(seen, obj2))
809
- return "[Circular]";
790
+ if (edges++, path2.length > MAX_DEPTH || edgesExceeded()) return REPLACEMENT_NODE;
791
+ if (obj2 === null || typeof obj2 != "object") return obj2;
792
+ if (find(seen, obj2)) return "[Circular]";
810
793
  if (seen.push(obj2), typeof obj2.toJSON == "function")
811
794
  try {
812
795
  edges--;
@@ -903,8 +886,7 @@ var require_bugsnag = __commonJS({
903
886
  var _updates;
904
887
  if (section) {
905
888
  var updates;
906
- if (keyOrObj === null)
907
- return __clear_21(state, section);
889
+ if (keyOrObj === null) return __clear_21(state, section);
908
890
  typeof keyOrObj == "object" && (updates = keyOrObj), typeof keyOrObj == "string" && (updates = (_updates = {}, _updates[keyOrObj] = maybeVal, _updates)), updates && (section === "__proto__" || section === "constructor" || section === "prototype" || (state[section] || (state[section] = {}), state[section] = _$assign_10({}, state[section], updates)));
909
891
  }
910
892
  }, get = function(state, section, key) {
@@ -1020,8 +1002,7 @@ var require_bugsnag = __commonJS({
1020
1002
  return error.cause ? [error].concat(getCauseStack(error.cause)) : [error];
1021
1003
  }
1022
1004
  Event.getStacktrace = function(error, errorFramesToSkip, backtraceFramesToSkip) {
1023
- if (_$hasStack_18(error))
1024
- return _$errorStackParser_9.parse(error).slice(errorFramesToSkip);
1005
+ if (_$hasStack_18(error)) return _$errorStackParser_9.parse(error).slice(errorFramesToSkip);
1025
1006
  try {
1026
1007
  return _$filter_11(StackGenerator.backtrace(), function(frame) {
1027
1008
  return (frame.functionName || "").indexOf("StackGenerator$$") === -1;
@@ -1097,21 +1078,17 @@ var require_bugsnag = __commonJS({
1097
1078
  return (typeof error.name == "string" || typeof error.errorClass == "string") && (typeof error.message == "string" || typeof error.errorMessage == "string");
1098
1079
  }, _$Event_4 = Event, _$asyncEvery_5 = function(arr, fn, cb) {
1099
1080
  var index = 0, next = function() {
1100
- if (index >= arr.length)
1101
- return cb(null, !0);
1081
+ if (index >= arr.length) return cb(null, !0);
1102
1082
  fn(arr[index], function(err, result) {
1103
- if (err)
1104
- return cb(err);
1105
- if (result === !1)
1106
- return cb(null, !1);
1083
+ if (err) return cb(err);
1084
+ if (result === !1) return cb(null, !1);
1107
1085
  index++, next();
1108
1086
  });
1109
1087
  };
1110
1088
  next();
1111
1089
  }, _$callbackRunner_7 = function(callbacks, event, onCallbackError, cb) {
1112
1090
  var runMaybeAsyncCallback = function(fn, cb2) {
1113
- if (typeof fn != "function")
1114
- return cb2(null);
1091
+ if (typeof fn != "function") return cb2(null);
1115
1092
  try {
1116
1093
  if (fn.length !== 2) {
1117
1094
  var ret = fn(event);
@@ -1252,8 +1229,7 @@ var require_bugsnag = __commonJS({
1252
1229
  config: {}
1253
1230
  }), errors = _reduce.errors, config = _reduce.config;
1254
1231
  if (schema2.apiKey) {
1255
- if (!config.apiKey)
1256
- throw new Error("No Bugsnag API Key set");
1232
+ if (!config.apiKey) throw new Error("No Bugsnag API Key set");
1257
1233
  /^[0-9a-f]{32}$/i.test(config.apiKey) || (errors.apiKey = "should be a string of 32 hexadecimal characters");
1258
1234
  }
1259
1235
  return this._metadata = _$assign_10({}, config.metadata), __merge_2(this._features, config.featureFlags, this._featuresIndex), this._user = _$assign_10({}, config.user), this._context = config.context, config.logger && (this._logger = config.logger), config.onError && (this._cbs.e = this._cbs.e.concat(config.onError)), config.onBreadcrumb && (this._cbs.b = this._cbs.b.concat(config.onBreadcrumb)), config.onSession && (this._cbs.s = this._cbs.s.concat(config.onSession)), _$keys_14(errors).length && this._logger.warn(generateConfigErrorMessage(errors, opts)), config;
@@ -1394,8 +1370,7 @@ metadata was removed`
1394
1370
  });
1395
1371
  req.on("error", onError), req.on("response", function(res) {
1396
1372
  bufferResponse(res, function(err, body2) {
1397
- if (err)
1398
- return onError(err);
1373
+ if (err) return onError(err);
1399
1374
  if (res.statusCode < 200 || res.statusCode >= 300)
1400
1375
  return onError(new Error("Bad statusCode from API: " + res.statusCode + `
1401
1376
  ` + body2));
@@ -1698,8 +1673,7 @@ metadata was removed`
1698
1673
  var loadSurroundingCode = function(stackframe, cache) {
1699
1674
  return new Promise(function(resolve2, reject) {
1700
1675
  try {
1701
- if (!stackframe.lineNumber || !stackframe.file)
1702
- return resolve2(stackframe);
1676
+ if (!stackframe.lineNumber || !stackframe.file) return resolve2(stackframe);
1703
1677
  var file = path.resolve(client._config.projectRoot, stackframe.file), cacheKey = file + "@" + stackframe.lineNumber;
1704
1678
  if (cacheKey in cache)
1705
1679
  return stackframe.code = cache[cacheKey], resolve2(stackframe);
@@ -1748,8 +1722,7 @@ metadata was removed`
1748
1722
  slicer.on("done", function() {
1749
1723
  return reader.destroy();
1750
1724
  }), pump(reader, splitter, slicer, function(err) {
1751
- if (err && err.message !== "premature close")
1752
- return cb(err);
1725
+ if (err && err.message !== "premature close") return cb(err);
1753
1726
  cb(null, slicer.getCode());
1754
1727
  });
1755
1728
  }, CodeRange = /* @__PURE__ */ function(_Writable) {
@@ -1918,8 +1891,7 @@ metadata was removed`
1918
1891
  client._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration");
1919
1892
  return;
1920
1893
  }
1921
- if (!sessionCounts.length)
1922
- return;
1894
+ if (!sessionCounts.length) return;
1923
1895
  var backoff = new _$Backoff_45({
1924
1896
  min: 1e3,
1925
1897
  max: 1e4
@@ -2019,8 +1991,7 @@ metadata was removed`
2019
1991
  };
2020
1992
  return Object.keys(_$Client_2.prototype).forEach(function(m) {
2021
1993
  /^_/.test(m) || (Bugsnag2[m] = function() {
2022
- if (!Bugsnag2._client)
2023
- return console.error("Bugsnag." + m + "() was called before Bugsnag.start()");
1994
+ if (!Bugsnag2._client) return console.error("Bugsnag." + m + "() was called before Bugsnag.start()");
2024
1995
  Bugsnag2._client._depth += 1;
2025
1996
  var ret = Bugsnag2._client[m].apply(Bugsnag2._client, arguments);
2026
1997
  return Bugsnag2._client._depth -= 1, ret;
@@ -2147,4 +2118,4 @@ export {
2147
2118
  registerCleanBugsnagErrorsFromWithinPlugins,
2148
2119
  addBugsnagMetadata
2149
2120
  };
2150
- //# sourceMappingURL=chunk-I6R52HNI.js.map
2121
+ //# sourceMappingURL=chunk-KF2D6QHZ.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  logout
3
- } from "./chunk-SO2RZ6TZ.js";
3
+ } from "./chunk-QNK2EAZ3.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-GVNIHXMX.js";
6
+ } from "./chunk-OE3IXTC5.js";
7
7
  import {
8
8
  outputSuccess
9
- } from "./chunk-4HTVLK2H.js";
9
+ } from "./chunk-3OXCI3HX.js";
10
10
  import {
11
11
  init_cjs_shims
12
- } from "./chunk-POZ5MGPT.js";
12
+ } from "./chunk-PKR7KJ6P.js";
13
13
 
14
14
  // src/cli/commands/auth/logout.ts
15
15
  init_cjs_shims();
@@ -25,4 +25,4 @@ var Logout = class extends base_command_default {
25
25
  export {
26
26
  Logout
27
27
  };
28
- //# sourceMappingURL=chunk-KGKTCQ7H.js.map
28
+ //# sourceMappingURL=chunk-KMWARALD.js.map