@shopify/cli 3.88.0 → 3.89.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 (96) hide show
  1. package/dist/acorn-45LE5Z2A.js +3016 -0
  2. package/dist/angular-Z5FPQPLR.js +2791 -0
  3. package/dist/babel-TRRZ6QQY.js +7173 -0
  4. package/dist/{chunk-J7U35MPX.js → chunk-2CNWYFWQ.js} +5 -5
  5. package/dist/{chunk-HM34WS7W.js → chunk-2OJBOBH2.js} +3 -3
  6. package/dist/{chunk-4ISFA2N3.js → chunk-2QVJ6J2X.js} +7 -6
  7. package/dist/{chunk-K5F7HNJN.js → chunk-36WMFQ3S.js} +3 -3
  8. package/dist/{chunk-VH47P2IR.js → chunk-5PAHFSKT.js} +3 -3
  9. package/dist/{chunk-6GKJAGTG.js → chunk-6KFJWCTP.js} +2 -2
  10. package/dist/{chunk-GZ3PD27A.js → chunk-6YASM3HI.js} +5 -5
  11. package/dist/{chunk-UBFTWR2L.js → chunk-B5Q2Q4B3.js} +3 -3
  12. package/dist/{chunk-QRIP3SU2.js → chunk-CUCT627W.js} +8 -8
  13. package/dist/{chunk-7U3KXZYU.js → chunk-EAEHP4CZ.js} +4 -4
  14. package/dist/{chunk-JO4W7S44.js → chunk-EQO4QA4E.js} +37 -16
  15. package/dist/{chunk-DGWEIWJA.js → chunk-EYUOBXKH.js} +3 -3
  16. package/dist/{chunk-GZARFYAY.js → chunk-GFYDB5LD.js} +2 -2
  17. package/dist/{chunk-5BHU3PRC.js → chunk-GSUL4KBP.js} +2086 -2216
  18. package/dist/{chunk-YBRRA3G2.js → chunk-GT7PA6E6.js} +2 -2
  19. package/dist/{chunk-LBA6IB72.js → chunk-JYBBGVIM.js} +3 -3
  20. package/dist/{chunk-6XQFNXU3.js → chunk-LJHVLE3R.js} +2 -2
  21. package/dist/{chunk-TQWSBJX3.js → chunk-NJR5IH3H.js} +4 -4
  22. package/dist/{chunk-IVWPL6RQ.js → chunk-P3SM4EEQ.js} +3 -3
  23. package/dist/{chunk-SATLZT2F.js → chunk-PYPPUTUV.js} +2 -2
  24. package/dist/{chunk-4NQZXGUR.js → chunk-R7OKLQB6.js} +4 -4
  25. package/dist/{chunk-TF4AQQB4.js → chunk-TLGBKEEX.js} +6 -6
  26. package/dist/{chunk-ZKOCRU7F.js → chunk-TPPRDIBF.js} +4 -4
  27. package/dist/{chunk-6O34ZV3A.js → chunk-TRR5QJRW.js} +4 -4
  28. package/dist/{chunk-OUR7YOZK.js → chunk-TWYT4DFD.js} +2 -2
  29. package/dist/{chunk-HQJPNVYR.js → chunk-V2ZY6OP3.js} +6 -6
  30. package/dist/{chunk-VLBE545G.js → chunk-WC5EDB4Z.js} +4 -4
  31. package/dist/{chunk-TZSBI4FY.js → chunk-WF5BWNFE.js} +6 -6
  32. package/dist/{chunk-TPVWZRBE.js → chunk-WSX6K4TT.js} +3 -3
  33. package/dist/{chunk-SMXARNZJ.js → chunk-XLMH6DBR.js} +3 -3
  34. package/dist/{chunk-KVDUU7LU.js → chunk-Y2BHJWKT.js} +2 -2
  35. package/dist/{chunk-CCYDP5TC.js → chunk-Y3HY6QD7.js} +5 -5
  36. package/dist/{chunk-5OVH24W5.js → chunk-YETFHMCK.js} +7 -7
  37. package/dist/{chunk-KF76XPVO.js → chunk-ZM543XCR.js} +3 -3
  38. package/dist/cli/commands/auth/login.js +10 -10
  39. package/dist/cli/commands/auth/login.test.js +11 -11
  40. package/dist/cli/commands/auth/logout.js +10 -10
  41. package/dist/cli/commands/auth/logout.test.js +11 -11
  42. package/dist/cli/commands/cache/clear.js +10 -10
  43. package/dist/cli/commands/debug/command-flags.js +10 -10
  44. package/dist/cli/commands/docs/generate.js +10 -10
  45. package/dist/cli/commands/docs/generate.test.js +10 -10
  46. package/dist/cli/commands/help.js +10 -10
  47. package/dist/cli/commands/kitchen-sink/async.js +11 -11
  48. package/dist/cli/commands/kitchen-sink/async.test.js +11 -11
  49. package/dist/cli/commands/kitchen-sink/index.js +13 -13
  50. package/dist/cli/commands/kitchen-sink/index.test.js +13 -13
  51. package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
  52. package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -11
  53. package/dist/cli/commands/kitchen-sink/static.js +11 -11
  54. package/dist/cli/commands/kitchen-sink/static.test.js +11 -11
  55. package/dist/cli/commands/notifications/generate.js +11 -11
  56. package/dist/cli/commands/notifications/list.js +11 -11
  57. package/dist/cli/commands/search.js +11 -11
  58. package/dist/cli/commands/upgrade.js +11 -11
  59. package/dist/cli/commands/version.js +11 -11
  60. package/dist/cli/commands/version.test.js +11 -11
  61. package/dist/cli/services/commands/notifications.js +8 -8
  62. package/dist/cli/services/commands/search.js +4 -4
  63. package/dist/cli/services/commands/search.test.js +4 -4
  64. package/dist/cli/services/commands/version.js +5 -5
  65. package/dist/cli/services/commands/version.test.js +6 -6
  66. package/dist/cli/services/kitchen-sink/async.js +4 -4
  67. package/dist/cli/services/kitchen-sink/prompts.js +4 -4
  68. package/dist/cli/services/kitchen-sink/static.js +4 -4
  69. package/dist/cli/services/upgrade.js +5 -5
  70. package/dist/cli/services/upgrade.test.js +6 -6
  71. package/dist/{custom-oclif-loader-EAWHI4I3.js → custom-oclif-loader-TLTSWHLS.js} +4 -4
  72. package/dist/{devtools-EVCDECOU.js → devtools-2SG3BFWJ.js} +4 -4
  73. package/dist/{devtools-LDCSRUXB.js → devtools-D47L6HIC.js} +7 -7
  74. package/dist/{error-handler-WZR7CPYT.js → error-handler-JWFNITM6.js} +8 -8
  75. package/dist/estree-PY6WKTNG.js +4490 -0
  76. package/dist/flow-YN54TSCB.js +27513 -0
  77. package/dist/glimmer-RMPUUUDS.js +2781 -0
  78. package/dist/graphql-PPLVYWBL.js +1225 -0
  79. package/dist/hooks/postrun.js +7 -7
  80. package/dist/hooks/prerun.js +8 -8
  81. package/dist/html-3U6QZZZ4.js +2768 -0
  82. package/dist/index.js +9196 -4200
  83. package/dist/{lib-G7Q5M6VX.js → lib-XGN4IWQ3.js} +3 -3
  84. package/dist/{local-P2SS6AIS.js → local-4NMXX5NP.js} +4 -4
  85. package/dist/markdown-RHRQTUMC.js +3269 -0
  86. package/dist/meriyah-7MIMHTWQ.js +2645 -0
  87. package/dist/{node-package-manager-FZWNOAYQ.js → node-package-manager-SHRILTY3.js} +5 -5
  88. package/dist/postcss-MSOPGY7M.js +4796 -0
  89. package/dist/prettier-2ITB6I34.js +13861 -0
  90. package/dist/tsconfig.tsbuildinfo +1 -1
  91. package/dist/typescript-ZSZVUJZX.js +13034 -0
  92. package/dist/{ui-5RSPUMJS.js → ui-MKDRI4FX.js} +4 -4
  93. package/dist/{workerd-K73DK5CH.js → workerd-BHG6KDEK.js} +11 -11
  94. package/dist/yaml-6GALFXQY.js +4077 -0
  95. package/oclif.manifest.json +404 -19
  96. package/package.json +6 -6
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  asyncTasks
3
- } from "./chunk-6XQFNXU3.js";
3
+ } from "./chunk-LJHVLE3R.js";
4
4
  import {
5
5
  prompts
6
- } from "./chunk-YBRRA3G2.js";
6
+ } from "./chunk-GT7PA6E6.js";
7
7
  import {
8
8
  staticService
9
- } from "./chunk-OUR7YOZK.js";
9
+ } from "./chunk-TWYT4DFD.js";
10
10
  import {
11
11
  base_command_default
12
- } from "./chunk-TF4AQQB4.js";
12
+ } from "./chunk-TLGBKEEX.js";
13
13
  import {
14
14
  init_cjs_shims
15
15
  } from "./chunk-PKR7KJ6P.js";
@@ -34,4 +34,4 @@ var KitchenSinkAll = class extends base_command_default {
34
34
  export {
35
35
  KitchenSinkAll
36
36
  };
37
- //# sourceMappingURL=chunk-J7U35MPX.js.map
37
+ //# sourceMappingURL=chunk-2CNWYFWQ.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  versionService
3
- } from "./chunk-IVWPL6RQ.js";
3
+ } from "./chunk-P3SM4EEQ.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-TF4AQQB4.js";
6
+ } from "./chunk-TLGBKEEX.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -22,4 +22,4 @@ var Version = class extends base_command_default {
22
22
  export {
23
23
  Version
24
24
  };
25
- //# sourceMappingURL=chunk-HM34WS7W.js.map
25
+ //# sourceMappingURL=chunk-2OJBOBH2.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-EFOOQV72.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-TF4AQQB4.js";
6
+ } from "./chunk-TLGBKEEX.js";
7
7
  import {
8
8
  businessPlatformRequest,
9
9
  ensureAuthenticatedAdmin,
@@ -12,7 +12,7 @@ import {
12
12
  graphqlRequest,
13
13
  logout,
14
14
  normalizeStoreFqdn
15
- } from "./chunk-JO4W7S44.js";
15
+ } from "./chunk-EQO4QA4E.js";
16
16
  import {
17
17
  findUpAndReadPackageJson,
18
18
  getPackageManager,
@@ -20,7 +20,7 @@ import {
20
20
  packageManagerFromUserAgent,
21
21
  readAndParsePackageJson,
22
22
  writePackageJSON
23
- } from "./chunk-GZARFYAY.js";
23
+ } from "./chunk-GFYDB5LD.js";
24
24
  import {
25
25
  AbortError,
26
26
  BugError,
@@ -60,7 +60,7 @@ import {
60
60
  runWithTimer,
61
61
  source_default,
62
62
  writeFile
63
- } from "./chunk-5BHU3PRC.js";
63
+ } from "./chunk-GSUL4KBP.js";
64
64
  import {
65
65
  require_ansi_escapes,
66
66
  require_ansi_styles,
@@ -77,7 +77,7 @@ import {
77
77
  require_widest_line,
78
78
  require_wordwrap,
79
79
  require_wrap_ansi
80
- } from "./chunk-VLBE545G.js";
80
+ } from "./chunk-WC5EDB4Z.js";
81
81
  import {
82
82
  require_src,
83
83
  require_supports_color
@@ -152937,6 +152937,7 @@ export {
152937
152937
  getStarterDir,
152938
152938
  getSkeletonSourceDir,
152939
152939
  SETUP_CSS_STRATEGIES,
152940
+ require_prettier,
152940
152941
  getCodeFormatOptions,
152941
152942
  formatCode,
152942
152943
  replaceFileContent,
@@ -153035,4 +153036,4 @@ export {
153035
153036
  getDebugBannerLine,
153036
153037
  getUtilityBannerlines
153037
153038
  };
153038
- //# sourceMappingURL=chunk-4ISFA2N3.js.map
153039
+ //# sourceMappingURL=chunk-2QVJ6J2X.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  packageManagerFromUserAgent
3
- } from "./chunk-GZARFYAY.js";
3
+ } from "./chunk-GFYDB5LD.js";
4
4
  import {
5
5
  currentProcessIsGlobal,
6
6
  inferPackageManagerForGlobalCLI,
7
7
  outputContent,
8
8
  outputToken
9
- } from "./chunk-5BHU3PRC.js";
9
+ } from "./chunk-GSUL4KBP.js";
10
10
  import {
11
11
  init_cjs_shims
12
12
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ export {
25
25
  cliInstallCommand,
26
26
  getOutputUpdateCLIReminder
27
27
  };
28
- //# sourceMappingURL=chunk-K5F7HNJN.js.map
28
+ //# sourceMappingURL=chunk-36WMFQ3S.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  staticService
3
- } from "./chunk-OUR7YOZK.js";
3
+ } from "./chunk-TWYT4DFD.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-TF4AQQB4.js";
6
+ } from "./chunk-TLGBKEEX.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var KitchenSinkStatic = class extends base_command_default {
25
25
  export {
26
26
  KitchenSinkStatic
27
27
  };
28
- //# sourceMappingURL=chunk-VH47P2IR.js.map
28
+ //# sourceMappingURL=chunk-5PAHFSKT.js.map
@@ -4,9 +4,9 @@ import {
4
4
 
5
5
  // ../cli-kit/dist/public/common/version.js
6
6
  init_cjs_shims();
7
- var CLI_KIT_VERSION = "3.88.0";
7
+ var CLI_KIT_VERSION = "3.89.0";
8
8
 
9
9
  export {
10
10
  CLI_KIT_VERSION
11
11
  };
12
- //# sourceMappingURL=chunk-6GKJAGTG.js.map
12
+ //# sourceMappingURL=chunk-6KFJWCTP.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  list
3
- } from "./chunk-CCYDP5TC.js";
3
+ } from "./chunk-Y3HY6QD7.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-TF4AQQB4.js";
6
+ } from "./chunk-TLGBKEEX.js";
7
7
  import {
8
8
  sendErrorToBugsnag
9
- } from "./chunk-TZSBI4FY.js";
9
+ } from "./chunk-WF5BWNFE.js";
10
10
  import {
11
11
  require_lib
12
- } from "./chunk-VLBE545G.js";
12
+ } from "./chunk-WC5EDB4Z.js";
13
13
  import {
14
14
  __toESM,
15
15
  init_cjs_shims
@@ -49,4 +49,4 @@ var List = class _List extends base_command_default {
49
49
  export {
50
50
  List
51
51
  };
52
- //# sourceMappingURL=chunk-GZ3PD27A.js.map
52
+ //# sourceMappingURL=chunk-6YASM3HI.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-TF4AQQB4.js";
3
+ } from "./chunk-TLGBKEEX.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-VLBE545G.js";
6
+ } from "./chunk-WC5EDB4Z.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims
@@ -46,4 +46,4 @@ var HelpCommand = class _HelpCommand extends base_command_default {
46
46
  export {
47
47
  HelpCommand
48
48
  };
49
- //# sourceMappingURL=chunk-UBFTWR2L.js.map
49
+ //# sourceMappingURL=chunk-B5Q2Q4B3.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-TF4AQQB4.js";
3
+ } from "./chunk-TLGBKEEX.js";
4
4
  import {
5
5
  cacheClear
6
- } from "./chunk-GZARFYAY.js";
6
+ } from "./chunk-GFYDB5LD.js";
7
7
  import {
8
8
  environmentVariables,
9
9
  isTruthy
10
- } from "./chunk-5BHU3PRC.js";
10
+ } from "./chunk-GSUL4KBP.js";
11
11
  import {
12
12
  require_lib
13
- } from "./chunk-VLBE545G.js";
13
+ } from "./chunk-WC5EDB4Z.js";
14
14
  import {
15
15
  __toESM,
16
16
  init_cjs_shims
@@ -26,7 +26,7 @@ init_cjs_shims();
26
26
  init_cjs_shims();
27
27
  import { fileURLToPath } from "node:url";
28
28
  async function launchCLI(options) {
29
- let { errorHandler } = await import("./error-handler-WZR7CPYT.js"), { isDevelopment } = await import("./local-P2SS6AIS.js"), oclif = await import("./lib-G7Q5M6VX.js"), { ShopifyConfig } = await import("./custom-oclif-loader-EAWHI4I3.js");
29
+ let { errorHandler } = await import("./error-handler-JWFNITM6.js"), { isDevelopment } = await import("./local-4NMXX5NP.js"), oclif = await import("./lib-XGN4IWQ3.js"), { ShopifyConfig } = await import("./custom-oclif-loader-TLTSWHLS.js");
30
30
  isDevelopment() && (oclif.default.settings.debug = !0);
31
31
  try {
32
32
  let config = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
@@ -41,7 +41,7 @@ var import_core = __toESM(require_lib());
41
41
  async function exitIfOldNodeVersion(versions = process.versions) {
42
42
  let nodeVersion = versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
43
43
  if (nodeMajorVersion < 18) {
44
- let { renderError } = await import("./ui-5RSPUMJS.js");
44
+ let { renderError } = await import("./ui-MKDRI4FX.js");
45
45
  renderError({
46
46
  headline: "Upgrade to a supported Node version now.",
47
47
  body: [
@@ -68,7 +68,7 @@ async function runCLI(options, launchCLI2 = launchCLI, argv = process.argv, env
68
68
  return setupEnvironmentVariables(options, argv, env), options.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions), launchCLI2({ moduleURL: options.moduleURL });
69
69
  }
70
70
  async function addInitToArgvWhenRunningCreateCLI(options, argv = process.argv) {
71
- let { findUpAndReadPackageJson } = await import("./node-package-manager-FZWNOAYQ.js"), { moduleDirectory } = await import("./path-GB4VIEM6.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
71
+ let { findUpAndReadPackageJson } = await import("./node-package-manager-SHRILTY3.js"), { moduleDirectory } = await import("./path-GB4VIEM6.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
72
72
  if (argv.findIndex((arg) => arg.includes("init")) === -1) {
73
73
  let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
74
74
  argv.splice(initIndex2, 0, "init");
@@ -117,4 +117,4 @@ export {
117
117
  jsonFlag,
118
118
  ClearCache
119
119
  };
120
- //# sourceMappingURL=chunk-QRIP3SU2.js.map
120
+ //# sourceMappingURL=chunk-CUCT627W.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-TF4AQQB4.js";
3
+ } from "./chunk-TLGBKEEX.js";
4
4
  import {
5
5
  mkdir,
6
6
  outputInfo,
7
7
  rmdir,
8
8
  writeFile
9
- } from "./chunk-5BHU3PRC.js";
9
+ } from "./chunk-GSUL4KBP.js";
10
10
  import {
11
11
  cwd,
12
12
  joinPath
@@ -79,7 +79,7 @@ const data: ReferenceEntityTemplateSchema = {
79
79
  ],
80
80
  }
81
81
 
82
- export default data`.replaceAll("<%= config.bin %>", "shopify");
82
+ export default data`.replace(/<%= config\.bin %>/g, "shopify");
83
83
  await writeFile(`${docsPath}/${fileName}.doc.ts`, updatedDocString), outputInfo(`Generated docs for ${commandName}`);
84
84
  }
85
85
  async function writeCommandFlagInterface(command, { fileName, interfaceName }) {
@@ -118,4 +118,4 @@ export {
118
118
  writeCommandFlagInterface,
119
119
  writeCommandUsageExampleFile
120
120
  };
121
- //# sourceMappingURL=chunk-7U3KXZYU.js.map
121
+ //# sourceMappingURL=chunk-EAEHP4CZ.js.map
@@ -15,10 +15,10 @@ import {
15
15
  setCurrentSessionId,
16
16
  setSessions,
17
17
  timeIntervalToMilliseconds
18
- } from "./chunk-GZARFYAY.js";
18
+ } from "./chunk-GFYDB5LD.js";
19
19
  import {
20
20
  CLI_KIT_VERSION
21
- } from "./chunk-6GKJAGTG.js";
21
+ } from "./chunk-6KFJWCTP.js";
22
22
  import {
23
23
  AbortError,
24
24
  BugError,
@@ -95,7 +95,7 @@ import {
95
95
  stringifyMessage,
96
96
  systemEnvironmentVariables,
97
97
  themeToken
98
- } from "./chunk-5BHU3PRC.js";
98
+ } from "./chunk-GSUL4KBP.js";
99
99
  import {
100
100
  cwd,
101
101
  sniffForJson
@@ -46087,7 +46087,7 @@ function jsonOutputEnabled(environment = getEnvironmentVariables()) {
46087
46087
  return sniffForJson() || isTruthy(environment[environmentVariables.json]);
46088
46088
  }
46089
46089
  function blockPartnersAccess() {
46090
- return isTruthy(getEnvironmentVariables()[environmentVariables.neverUsePartnersApi]) ? !0 : isTruthy(getEnvironmentVariables()[environmentVariables.usePartnersApi]) ? !1 : !isTruthy(getEnvironmentVariables()[environmentVariables.firstPartyDev]);
46090
+ return isTruthy(getEnvironmentVariables()[environmentVariables.neverUsePartnersApi]);
46091
46091
  }
46092
46092
  function skipNetworkLevelRetry(environment = getEnvironmentVariables()) {
46093
46093
  return isTruthy(environment[environmentVariables.skipNetworkLevelRetry]);
@@ -49695,8 +49695,6 @@ function inferenceModeAndProjectIsEdition2016(projectName) {
49695
49695
  // ../cli-kit/dist/public/node/context/fqdn.js
49696
49696
  var NotProvidedStoreFQDNError = new AbortError("Couldn't obtain the Shopify FQDN because the store FQDN was not provided.");
49697
49697
  async function partnersFqdn() {
49698
- if (blockPartnersAccess())
49699
- throw new BugError("Partners API is is no longer available.");
49700
49698
  let environment = serviceEnvironment(), productionFqdn = "partners.shopify.com";
49701
49699
  switch (environment) {
49702
49700
  case "local":
@@ -50698,6 +50696,7 @@ var RequestIDCollection = class _RequestIDCollection {
50698
50696
  }, requestIdsCollection = RequestIDCollection.getInstance();
50699
50697
 
50700
50698
  // ../cli-kit/dist/public/node/api/graphql.js
50699
+ var MAX_RATE_LIMIT_RESTORE_DELAY_SECONDS = 0.3;
50701
50700
  async function createGraphQLClient({ url: url4, addedHeaders, token }) {
50702
50701
  let headers = {
50703
50702
  ...addedHeaders,
@@ -50708,17 +50707,37 @@ async function createGraphQLClient({ url: url4, addedHeaders, token }) {
50708
50707
  headers
50709
50708
  };
50710
50709
  }
50710
+ async function waitForRateLimitRestore(fullResponse) {
50711
+ let cost = fullResponse.extensions?.cost, actualQueryCost = cost?.actualQueryCost, restoreRate = cost?.throttleStatus?.restoreRate;
50712
+ if (actualQueryCost && typeof actualQueryCost == "number" && restoreRate && typeof restoreRate == "number") {
50713
+ let secondsToRestoreRate = actualQueryCost / restoreRate;
50714
+ outputDebug(outputContent`Sleeping for ${secondsToRestoreRate.toString()} seconds to restore the rate limit.`), await sleep(Math.min(secondsToRestoreRate, MAX_RATE_LIMIT_RESTORE_DELAY_SECONDS));
50715
+ }
50716
+ }
50717
+ async function runSingleRawGraphQLRequest(options2) {
50718
+ let { client, behaviour, queryAsString, variables, autoRateLimitRestore } = options2, fullResponse;
50719
+ try {
50720
+ return client.setAbortSignal(abortSignalFromRequestBehaviour(behaviour)), fullResponse = await client.rawRequest(queryAsString, variables), await logLastRequestIdFromResponse(fullResponse), autoRateLimitRestore && await waitForRateLimitRestore(fullResponse), fullResponse;
50721
+ } catch (error) {
50722
+ throw error instanceof ClientError && await logLastRequestIdFromResponse(error.response), error;
50723
+ }
50724
+ }
50711
50725
  async function performGraphQLRequest(options2) {
50712
- let { token, addedHeaders, queryAsString, variables, api, url: url4, responseOptions, unauthorizedHandler, cacheOptions } = options2, behaviour = requestMode(options2.preferredBehaviour ?? "default"), { headers, client } = await createGraphQLClient({ url: url4, addedHeaders, token });
50726
+ let { token, addedHeaders, queryAsString, variables, api, url: url4, responseOptions, unauthorizedHandler, cacheOptions, autoRateLimitRestore } = options2, behaviour = requestMode(options2.preferredBehaviour ?? "default"), { headers, client } = await createGraphQLClient({ url: url4, addedHeaders, token });
50713
50727
  debugLogRequestInfo(api, queryAsString, url4, variables, headers);
50714
- let rawGraphQLRequest = async () => {
50715
- let fullResponse;
50716
- try {
50717
- return client.requestConfig.signal = abortSignalFromRequestBehaviour(behaviour), fullResponse = await client.rawRequest(queryAsString, variables), await logLastRequestIdFromResponse(fullResponse), fullResponse;
50718
- } catch (error) {
50719
- throw error instanceof ClientError && await logLastRequestIdFromResponse(error.response), error;
50720
- }
50721
- }, tokenRefreshHandler = unauthorizedHandler?.handler, tokenRefreshUnauthorizedHandlerFunction = tokenRefreshHandler ? async () => {
50728
+ let rawGraphQLRequest = async () => runSingleRawGraphQLRequest({
50729
+ client: {
50730
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
50731
+ setAbortSignal: (signal) => {
50732
+ client.requestConfig.signal = signal;
50733
+ },
50734
+ rawRequest: (query, variables2) => client.rawRequest(query, variables2)
50735
+ },
50736
+ behaviour,
50737
+ queryAsString,
50738
+ variables,
50739
+ autoRateLimitRestore: autoRateLimitRestore ?? !1
50740
+ }), tokenRefreshHandler = unauthorizedHandler?.handler, tokenRefreshUnauthorizedHandlerFunction = tokenRefreshHandler ? async () => {
50722
50741
  let refreshTokenResult = await tokenRefreshHandler();
50723
50742
  if (refreshTokenResult.token) {
50724
50743
  let { client: newClient, headers: newHeaders } = await createGraphQLClient({
@@ -50811,6 +50830,8 @@ var import_bottleneck = __toESM(require_lib3(), 1), limiter = new import_bottlen
50811
50830
  maxConcurrent: 10
50812
50831
  });
50813
50832
  async function setupRequest(token) {
50833
+ if (blockPartnersAccess())
50834
+ throw new BugError("Partners API is no longer available.");
50814
50835
  let api = "Partners", url4 = `https://${await partnersFqdn()}/api/cli/graphql`;
50815
50836
  return {
50816
50837
  token,
@@ -52888,4 +52909,4 @@ mime-types/index.js:
52888
52909
  * MIT Licensed
52889
52910
  *)
52890
52911
  */
52891
- //# sourceMappingURL=chunk-JO4W7S44.js.map
52912
+ //# sourceMappingURL=chunk-EQO4QA4E.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  getNextDeprecationDate,
3
3
  reportAnalyticsEvent
4
- } from "./chunk-JO4W7S44.js";
4
+ } from "./chunk-EQO4QA4E.js";
5
5
  import {
6
6
  addSensitiveMetadata,
7
7
  getAllSensitiveMetadata,
8
8
  outputDebug,
9
9
  renderWarning
10
- } from "./chunk-5BHU3PRC.js";
10
+ } from "./chunk-GSUL4KBP.js";
11
11
  import {
12
12
  init_cjs_shims
13
13
  } from "./chunk-PKR7KJ6P.js";
@@ -75,4 +75,4 @@ export {
75
75
  postRunHookHasCompleted,
76
76
  hook
77
77
  };
78
- //# sourceMappingURL=chunk-DGWEIWJA.js.map
78
+ //# sourceMappingURL=chunk-EYUOBXKH.js.map
@@ -20,7 +20,7 @@ import {
20
20
  runWithTimer,
21
21
  unixFileIsOwnedByCurrentUser,
22
22
  writeFile
23
- } from "./chunk-5BHU3PRC.js";
23
+ } from "./chunk-GSUL4KBP.js";
24
24
  import {
25
25
  require_semver
26
26
  } from "./chunk-HMDWNGIV.js";
@@ -14035,4 +14035,4 @@ deep-extend/lib/deep-extend.js:
14035
14035
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14036
14036
  *)
14037
14037
  */
14038
- //# sourceMappingURL=chunk-GZARFYAY.js.map
14038
+ //# sourceMappingURL=chunk-GFYDB5LD.js.map