@shopify/cli 3.85.4 → 3.86.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 (101) hide show
  1. package/dist/assets/dev-console/extensions/dev-console/assets/index-Cj8WCHlM.js +64 -0
  2. package/dist/assets/dev-console/index.html +1 -1
  3. package/dist/assets/hydrogen/starter/package.json +1 -1
  4. package/dist/{brotli-EDFLSXX4.js → brotli-2OKV26Y6.js} +3 -3
  5. package/dist/{chunk-5AUZG65U.js → chunk-2KZOUSPH.js} +5 -5
  6. package/dist/{chunk-BQ3PZIHZ.js → chunk-4MSYMXAX.js} +16 -16
  7. package/dist/{chunk-M6DL6PW7.js → chunk-4TSN5PHA.js} +3 -3
  8. package/dist/{chunk-CBUCMJTB.js → chunk-4YT3BY2B.js} +2 -2
  9. package/dist/{chunk-2H6AD4EL.js → chunk-5Q7CDSRK.js} +6 -6
  10. package/dist/{chunk-EPNYJUKL.js → chunk-5RBPM5MR.js} +205 -183
  11. package/dist/{chunk-UATXMR5F.js → chunk-6FH6AJI5.js} +3 -3
  12. package/dist/{chunk-75LV6AQS.js → chunk-6ONJEX7Y.js} +8 -8
  13. package/dist/{chunk-GMOJ4MM6.js → chunk-6UMZO4DD.js} +5 -5
  14. package/dist/{chunk-W7V5E5TL.js → chunk-7TE554OT.js} +17 -17
  15. package/dist/{chunk-ON22YJEB.js → chunk-7VKRIIXT.js} +7 -7
  16. package/dist/{chunk-QCCEM2W7.js → chunk-AA57B6YW.js} +3 -3
  17. package/dist/{chunk-BRYTLGQH.js → chunk-AQK2VHTY.js} +3 -3
  18. package/dist/{chunk-SJ6XHMPR.js → chunk-DKRTUP7T.js} +2 -2
  19. package/dist/{chunk-JXSJVKPK.js → chunk-E25JAFOX.js} +3 -3
  20. package/dist/{chunk-Y2JP6WFP.js → chunk-EG6MBBEN.js} +2 -2
  21. package/dist/{chunk-IG5SOACB.js → chunk-F2V6FX7R.js} +3 -3
  22. package/dist/{chunk-JDGRN7YI.js → chunk-G3RY2PNL.js} +4 -4
  23. package/dist/{chunk-QDQ64PMY.js → chunk-GAPPN3SH.js} +3 -3
  24. package/dist/{chunk-DBQFPT3U.js → chunk-GU76E24D.js} +7 -7
  25. package/dist/{chunk-Y2BC44O5.js → chunk-IZMUO44N.js} +5 -5
  26. package/dist/{chunk-2XTIBWBA.js → chunk-J5WELXX6.js} +3 -3
  27. package/dist/{chunk-34TWZ632.js → chunk-JMQJQNH7.js} +146 -125
  28. package/dist/{chunk-DEMUK3QR.js → chunk-KIMPXWRC.js} +7 -7
  29. package/dist/{chunk-XXIM3XSO.js → chunk-LDFPMZVN.js} +2 -2
  30. package/dist/{chunk-5JFU2PDH.js → chunk-LDJGMHXE.js} +4 -4
  31. package/dist/{chunk-XQMRWA2D.js → chunk-LOWKEYZ4.js} +2 -2
  32. package/dist/{chunk-3762O47V.js → chunk-LPSHXR57.js} +2 -2
  33. package/dist/{chunk-S5H4ZYTZ.js → chunk-NIZJP24I.js} +4 -4
  34. package/dist/{chunk-VOXGVQ4Y.js → chunk-NMH42STK.js} +28 -20
  35. package/dist/{chunk-NIJYJVQ7.js → chunk-O32LAXNO.js} +584 -586
  36. package/dist/{chunk-XEG67XNW.js → chunk-PFWYGIIB.js} +4 -4
  37. package/dist/{chunk-B5EXYCV3.js → chunk-Q2H6D2MH.js} +5 -5
  38. package/dist/{chunk-VVHZTHIS.js → chunk-TCTK5NQE.js} +8 -8
  39. package/dist/{chunk-UTGZE4KZ.js → chunk-UAYSVXRU.js} +82 -31
  40. package/dist/{chunk-OYGH5GC4.js → chunk-UKECTTQZ.js} +2 -2
  41. package/dist/{chunk-P24ZSULK.js → chunk-UXJEPFC3.js} +3 -3
  42. package/dist/{chunk-3JZIRVBB.js → chunk-WZTQS5NN.js} +47 -41
  43. package/dist/{chunk-F7F4BQYW.js → chunk-X2YIODUW.js} +56 -58
  44. package/dist/{chunk-25IMI7TH.js → chunk-XD3LXUGW.js} +5 -5
  45. package/dist/{chunk-2C6DJIBX.js → chunk-ZRLTG3SU.js} +4 -4
  46. package/dist/{chunk-QCVEBMJO.js → chunk-ZZGMPT2W.js} +3 -3
  47. package/dist/cli/commands/auth/login.js +16 -16
  48. package/dist/cli/commands/auth/login.test.js +18 -18
  49. package/dist/cli/commands/auth/logout.js +16 -16
  50. package/dist/cli/commands/auth/logout.test.js +18 -18
  51. package/dist/cli/commands/cache/clear.js +16 -16
  52. package/dist/cli/commands/debug/command-flags.js +16 -16
  53. package/dist/cli/commands/docs/generate.js +16 -16
  54. package/dist/cli/commands/docs/generate.test.js +17 -17
  55. package/dist/cli/commands/help.js +16 -16
  56. package/dist/cli/commands/kitchen-sink/async.js +17 -17
  57. package/dist/cli/commands/kitchen-sink/async.test.js +18 -18
  58. package/dist/cli/commands/kitchen-sink/index.js +19 -19
  59. package/dist/cli/commands/kitchen-sink/index.test.js +20 -20
  60. package/dist/cli/commands/kitchen-sink/prompts.js +17 -17
  61. package/dist/cli/commands/kitchen-sink/prompts.test.js +18 -18
  62. package/dist/cli/commands/kitchen-sink/static.js +17 -17
  63. package/dist/cli/commands/kitchen-sink/static.test.js +18 -18
  64. package/dist/cli/commands/notifications/generate.js +17 -17
  65. package/dist/cli/commands/notifications/list.js +17 -17
  66. package/dist/cli/commands/search.js +17 -17
  67. package/dist/cli/commands/upgrade.js +17 -17
  68. package/dist/cli/commands/upgrade.test.js +1 -1
  69. package/dist/cli/commands/version.js +17 -17
  70. package/dist/cli/commands/version.test.js +18 -18
  71. package/dist/cli/services/commands/notifications.js +12 -12
  72. package/dist/cli/services/commands/search.js +7 -7
  73. package/dist/cli/services/commands/search.test.js +8 -8
  74. package/dist/cli/services/commands/version.js +8 -8
  75. package/dist/cli/services/commands/version.test.js +10 -10
  76. package/dist/cli/services/kitchen-sink/async.js +7 -7
  77. package/dist/cli/services/kitchen-sink/prompts.js +7 -7
  78. package/dist/cli/services/kitchen-sink/static.js +7 -7
  79. package/dist/cli/services/upgrade.js +8 -8
  80. package/dist/cli/services/upgrade.test.js +10 -10
  81. package/dist/{custom-oclif-loader-OFIEXBNK.js → custom-oclif-loader-Y4GWKKAU.js} +7 -7
  82. package/dist/{del-DNZ7X2HW.js → del-DIPVIUR3.js} +3 -3
  83. package/dist/{error-handler-FHZMF7GS.js → error-handler-WPYX52XY.js} +14 -14
  84. package/dist/hooks/postrun.js +12 -12
  85. package/dist/hooks/prerun.js +13 -13
  86. package/dist/{http-proxy-node16-T623PGD4.js → http-proxy-node16-K5X7BUK5.js} +3 -3
  87. package/dist/index.js +1659 -2642
  88. package/dist/{lib-DEEC6IKU.js → lib-EMZRCLCJ.js} +3 -3
  89. package/dist/{lib-JVEIEXYB.js → lib-WHI5XOGD.js} +2 -2
  90. package/dist/{local-4MIY74VR.js → local-ZMOSXANE.js} +7 -7
  91. package/dist/{morph-D4BXY376.js → morph-EGK76SED.js} +17 -18
  92. package/dist/{multipart-parser-WSNBP656.js → multipart-parser-IYYNISJK.js} +2 -2
  93. package/dist/{node-package-manager-H6KF4PH6.js → node-package-manager-4KOKGFQG.js} +8 -8
  94. package/dist/{path-COZT77T2.js → path-GB4VIEM6.js} +2 -2
  95. package/dist/{source-map-QCVC46UY.js → source-map-UFUVQCYE.js} +5 -5
  96. package/dist/tsconfig.tsbuildinfo +1 -1
  97. package/dist/{ui-R3FDFL2U.js → ui-YYVT2VLD.js} +7 -7
  98. package/dist/{workerd-JVZ57YOV.js → workerd-35SAC4OI.js} +18 -18
  99. package/oclif.manifest.json +17 -104
  100. package/package.json +8 -12
  101. package/dist/assets/dev-console/extensions/dev-console/assets/index-ohOjvIJh.js +0 -64
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  cliInstallCommand
3
- } from "./chunk-QCVEBMJO.js";
3
+ } from "./chunk-ZZGMPT2W.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-ON22YJEB.js";
6
+ } from "./chunk-7VKRIIXT.js";
7
7
  import {
8
8
  renderInfo
9
- } from "./chunk-34TWZ632.js";
9
+ } from "./chunk-JMQJQNH7.js";
10
10
  import {
11
11
  init_cjs_shims
12
12
  } from "./chunk-PKR7KJ6P.js";
@@ -34,4 +34,4 @@ var Upgrade = class extends base_command_default {
34
34
  export {
35
35
  Upgrade
36
36
  };
37
- //# sourceMappingURL=chunk-XEG67XNW.js.map
37
+ //# sourceMappingURL=chunk-PFWYGIIB.js.map
@@ -104,17 +104,17 @@ var require_cjs = __commonJS({
104
104
  "../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js"(exports) {
105
105
  "use strict";
106
106
  init_cjs_shims();
107
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
107
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
108
108
  k2 === void 0 && (k2 = k);
109
109
  var desc = Object.getOwnPropertyDescriptor(m, k);
110
110
  (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
111
111
  return m[k];
112
112
  } }), Object.defineProperty(o, k2, desc);
113
- } : function(o, m, k, k2) {
113
+ }) : (function(o, m, k, k2) {
114
114
  k2 === void 0 && (k2 = k), o[k2] = m[k];
115
- }), __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
115
+ })), __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
116
116
  Object.defineProperty(o, "default", { enumerable: !0, value: v });
117
- } : function(o, v) {
117
+ }) : function(o, v) {
118
118
  o.default = v;
119
119
  }), __importStar = exports && exports.__importStar || function(mod) {
120
120
  if (mod && mod.__esModule) return mod;
@@ -205,4 +205,4 @@ var require_lib = __commonJS({
205
205
  export {
206
206
  require_lib
207
207
  };
208
- //# sourceMappingURL=chunk-B5EXYCV3.js.map
208
+ //# sourceMappingURL=chunk-Q2H6D2MH.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-ON22YJEB.js";
3
+ } from "./chunk-7VKRIIXT.js";
4
4
  import {
5
5
  cacheClear
6
- } from "./chunk-UTGZE4KZ.js";
6
+ } from "./chunk-UAYSVXRU.js";
7
7
  import {
8
8
  environmentVariables,
9
9
  isTruthy
10
- } from "./chunk-34TWZ632.js";
10
+ } from "./chunk-JMQJQNH7.js";
11
11
  import {
12
12
  require_lib
13
- } from "./chunk-F7F4BQYW.js";
13
+ } from "./chunk-X2YIODUW.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-FHZMF7GS.js"), { isDevelopment } = await import("./local-4MIY74VR.js"), oclif = await import("./lib-DEEC6IKU.js"), { ShopifyConfig } = await import("./custom-oclif-loader-OFIEXBNK.js");
29
+ let { errorHandler } = await import("./error-handler-WPYX52XY.js"), { isDevelopment } = await import("./local-ZMOSXANE.js"), oclif = await import("./lib-EMZRCLCJ.js"), { ShopifyConfig } = await import("./custom-oclif-loader-Y4GWKKAU.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-R3FDFL2U.js");
44
+ let { renderError } = await import("./ui-YYVT2VLD.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-H6KF4PH6.js"), { moduleDirectory } = await import("./path-COZT77T2.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
71
+ let { findUpAndReadPackageJson } = await import("./node-package-manager-4KOKGFQG.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-VVHZTHIS.js.map
120
+ //# sourceMappingURL=chunk-TCTK5NQE.js.map
@@ -6,6 +6,7 @@ import {
6
6
  envPaths,
7
7
  exec,
8
8
  fileExists,
9
+ fileHasWritePermissions,
9
10
  findPathUp,
10
11
  glob,
11
12
  inferPackageManagerForGlobalCLI,
@@ -17,15 +18,16 @@ import {
17
18
  readFile,
18
19
  require_get_stream,
19
20
  runWithTimer,
21
+ unixFileIsOwnedByCurrentUser,
20
22
  writeFile
21
- } from "./chunk-34TWZ632.js";
23
+ } from "./chunk-JMQJQNH7.js";
22
24
  import {
23
25
  require_semver
24
- } from "./chunk-F7F4BQYW.js";
26
+ } from "./chunk-X2YIODUW.js";
25
27
  import {
26
28
  dirname,
27
29
  joinPath
28
- } from "./chunk-Y2JP6WFP.js";
30
+ } from "./chunk-EG6MBBEN.js";
29
31
  import {
30
32
  __commonJS,
31
33
  __export,
@@ -7589,7 +7591,7 @@ var require_polyfills = __commonJS({
7589
7591
  }), fs3.chown && !fs3.lchown && (fs3.lchown = function(path4, uid, gid, cb) {
7590
7592
  cb && process.nextTick(cb);
7591
7593
  }, fs3.lchownSync = function() {
7592
- }), platform === "win32" && (fs3.rename = typeof fs3.rename != "function" ? fs3.rename : function(fs$rename) {
7594
+ }), platform === "win32" && (fs3.rename = typeof fs3.rename != "function" ? fs3.rename : (function(fs$rename) {
7593
7595
  function rename(from, to, cb) {
7594
7596
  var start = Date.now(), backoff = 0;
7595
7597
  fs$rename(from, to, function CB(er) {
@@ -7605,7 +7607,7 @@ var require_polyfills = __commonJS({
7605
7607
  });
7606
7608
  }
7607
7609
  return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
7608
- }(fs3.rename)), fs3.read = typeof fs3.read != "function" ? fs3.read : function(fs$read) {
7610
+ })(fs3.rename)), fs3.read = typeof fs3.read != "function" ? fs3.read : (function(fs$read) {
7609
7611
  function read(fd, buffer, offset, length, position, callback_) {
7610
7612
  var callback;
7611
7613
  if (callback_ && typeof callback_ == "function") {
@@ -7619,7 +7621,7 @@ var require_polyfills = __commonJS({
7619
7621
  return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
7620
7622
  }
7621
7623
  return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
7622
- }(fs3.read), fs3.readSync = typeof fs3.readSync != "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
7624
+ })(fs3.read), fs3.readSync = typeof fs3.readSync != "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
7623
7625
  return function(fd, buffer, offset, length, position) {
7624
7626
  for (var eagCounter = 0; ; )
7625
7627
  try {
@@ -7632,7 +7634,7 @@ var require_polyfills = __commonJS({
7632
7634
  throw er;
7633
7635
  }
7634
7636
  };
7635
- }(fs3.readSync);
7637
+ })(fs3.readSync);
7636
7638
  function patchLchmod(fs4) {
7637
7639
  fs4.lchmod = function(path4, mode, callback) {
7638
7640
  fs4.open(
@@ -7865,7 +7867,7 @@ var require_graceful_fs = __commonJS({
7865
7867
  m = "GFS4: " + m.split(/\n/).join(`
7866
7868
  GFS4: `), console.error(m);
7867
7869
  });
7868
- fs3[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs3, queue), fs3.close = function(fs$close) {
7870
+ fs3[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs3, queue), fs3.close = (function(fs$close) {
7869
7871
  function close(fd, cb) {
7870
7872
  return fs$close.call(fs3, fd, function(err) {
7871
7873
  err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
@@ -7874,14 +7876,14 @@ GFS4: `), console.error(m);
7874
7876
  return Object.defineProperty(close, previousSymbol, {
7875
7877
  value: fs$close
7876
7878
  }), close;
7877
- }(fs3.close), fs3.closeSync = function(fs$closeSync) {
7879
+ })(fs3.close), fs3.closeSync = (function(fs$closeSync) {
7878
7880
  function closeSync(fd) {
7879
7881
  fs$closeSync.apply(fs3, arguments), resetQueue();
7880
7882
  }
7881
7883
  return Object.defineProperty(closeSync, previousSymbol, {
7882
7884
  value: fs$closeSync
7883
7885
  }), closeSync;
7884
- }(fs3.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
7886
+ })(fs3.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
7885
7887
  debug(fs3[gracefulQueue]), __require("assert").equal(fs3[gracefulQueue].length, 0);
7886
7888
  }));
7887
7889
  var queue;
@@ -8105,15 +8107,15 @@ var require_dist2 = __commonJS({
8105
8107
  "../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/index.js"(exports) {
8106
8108
  "use strict";
8107
8109
  init_cjs_shims();
8108
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
8110
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
8109
8111
  k2 === void 0 && (k2 = k);
8110
8112
  var desc = Object.getOwnPropertyDescriptor(m, k);
8111
8113
  (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
8112
8114
  return m[k];
8113
8115
  } }), Object.defineProperty(o, k2, desc);
8114
- } : function(o, m, k, k2) {
8116
+ }) : (function(o, m, k, k2) {
8115
8117
  k2 === void 0 && (k2 = k), o[k2] = m[k];
8116
- }), __exportStar = exports && exports.__exportStar || function(m, exports2) {
8118
+ })), __exportStar = exports && exports.__exportStar || function(m, exports2) {
8117
8119
  for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p) && __createBinding(exports2, m, p);
8118
8120
  };
8119
8121
  Object.defineProperty(exports, "__esModule", { value: !0 });
@@ -8728,10 +8730,11 @@ var require_conf = __commonJS({
8728
8730
  };
8729
8731
  function deserializeEnvVal(envKey, envValue) {
8730
8732
  function deserializeList(envValue2) {
8731
- let npmConfigSep = `
8733
+ return envValue2.indexOf(`
8732
8734
 
8733
- `;
8734
- return envValue2.indexOf(npmConfigSep) ? envValue2.split(npmConfigSep) : envValue2.split(",");
8735
+ `) ? envValue2.split(`
8736
+
8737
+ `) : envValue2.split(",");
8735
8738
  }
8736
8739
  switch (envKey) {
8737
8740
  case "hoist-pattern":
@@ -8857,7 +8860,7 @@ var require_defaults2 = __commonJS({
8857
8860
  searchopts: "",
8858
8861
  searchexclude: null,
8859
8862
  searchlimit: 20,
8860
- searchstaleness: 15 * 60,
8863
+ searchstaleness: 900,
8861
8864
  "send-metrics": !1,
8862
8865
  shell: osenv.shell(),
8863
8866
  shrinkwrap: !0,
@@ -9825,32 +9828,80 @@ var LocalStorage = class {
9825
9828
  *
9826
9829
  * @param key - The key to get.
9827
9830
  * @returns The value.
9831
+ * @throws AbortError if a permission error occurs.
9832
+ * @throws BugError if an unexpected error occurs.
9828
9833
  */
9829
9834
  get(key) {
9830
- return this.config.get(key);
9835
+ try {
9836
+ return this.config.get(key);
9837
+ } catch (error) {
9838
+ this.handleError(error, "get");
9839
+ }
9831
9840
  }
9832
9841
  /**
9833
9842
  * Set a value in the local storage.
9834
9843
  *
9835
9844
  * @param key - The key to set.
9836
9845
  * @param value - The value to set.
9846
+ * @throws AbortError if a permission error occurs.
9847
+ * @throws BugError if an unexpected error occurs.
9837
9848
  */
9838
9849
  set(key, value) {
9839
- this.config.set(key, value);
9850
+ try {
9851
+ this.config.set(key, value);
9852
+ } catch (error) {
9853
+ this.handleError(error, "set");
9854
+ }
9840
9855
  }
9841
9856
  /**
9842
9857
  * Delete a value from the local storage.
9843
9858
  *
9844
9859
  * @param key - The key to delete.
9860
+ * @throws AbortError if a permission error occurs.
9861
+ * @throws BugError if an unexpected error occurs.
9845
9862
  */
9846
9863
  delete(key) {
9847
- this.config.delete(key);
9864
+ try {
9865
+ this.config.delete(key);
9866
+ } catch (error) {
9867
+ this.handleError(error, "delete");
9868
+ }
9848
9869
  }
9849
9870
  /**
9850
9871
  * Clear the local storage (delete all values).
9872
+ *
9873
+ * @throws AbortError if a permission error occurs.
9874
+ * @throws BugError if an unexpected error occurs.
9851
9875
  */
9852
9876
  clear() {
9853
- this.config.clear();
9877
+ try {
9878
+ this.config.clear();
9879
+ } catch (error) {
9880
+ this.handleError(error, "clear");
9881
+ }
9882
+ }
9883
+ /**
9884
+ * Handle errors from config operations.
9885
+ * If the error is permission-related, throw an AbortError with helpful hints.
9886
+ * Otherwise, throw a BugError.
9887
+ *
9888
+ * @param error - The error that occurred.
9889
+ * @param operation - The operation that failed.
9890
+ * @throws AbortError if the error is permission-related.
9891
+ * @throws BugError if the error is not permission-related.
9892
+ */
9893
+ handleError(error, operation) {
9894
+ throw this.isPermissionError() ? new AbortError(`Failed to access local storage (${operation}): ${error}`, this.tryMessage()) : new BugError(`Unexpected error while accessing local storage at ${this.config.path} (${operation}): ${error}`);
9895
+ }
9896
+ isPermissionError() {
9897
+ let canAccessFile = fileHasWritePermissions(this.config.path), canAccessFolder = fileHasWritePermissions(dirname(this.config.path)), ownsFile = unixFileIsOwnedByCurrentUser(this.config.path);
9898
+ return !canAccessFile || !canAccessFolder || ownsFile === !1;
9899
+ }
9900
+ tryMessage() {
9901
+ let ownsFile = unixFileIsOwnedByCurrentUser(this.config.path), ownsFolder = unixFileIsOwnedByCurrentUser(dirname(this.config.path)), message = ["Check that you have write permissions for", { filePath: this.config.path }];
9902
+ return (ownsFile === !1 || ownsFolder === !1) && message.push("- The file is owned by a different user. This typically happens when Shopify CLI was previously run with elevated permissions (e.g., sudo)."), message.push(`
9903
+
9904
+ To resolve this, remove the Shopify CLI preferences folder:`), message.push({ command: `rm -rf ${dirname(this.config.path)}` }), message;
9854
9905
  }
9855
9906
  };
9856
9907
 
@@ -13214,7 +13265,7 @@ var { buffer: getBuffer } = import_get_stream2.default, supportsBrotli = dist_de
13214
13265
  }
13215
13266
  _prepareCache(cache) {
13216
13267
  if (!cacheableStore.has(cache)) {
13217
- let cacheableRequest = new dist_default3((requestOptions, handler) => {
13268
+ let cacheableRequest = new dist_default3(((requestOptions, handler) => {
13218
13269
  let result = requestOptions._request(requestOptions, handler);
13219
13270
  return dist_default2.promise(result) && (result.once = (event, handler2) => {
13220
13271
  if (event === "error")
@@ -13236,7 +13287,7 @@ var { buffer: getBuffer } = import_get_stream2.default, supportsBrotli = dist_de
13236
13287
  throw new Error(`Unknown HTTP2 promise event: ${event}`);
13237
13288
  return result;
13238
13289
  }), result;
13239
- }, cache);
13290
+ }), cache);
13240
13291
  cacheableStore.set(cache, cacheableRequest.request());
13241
13292
  }
13242
13293
  }
@@ -13518,7 +13569,7 @@ var delay = async (ms) => new Promise((resolve) => {
13518
13569
  configurable: !1,
13519
13570
  writable: !1
13520
13571
  });
13521
- let got2 = (url, options, defaultOptions2 = defaults2.options) => {
13572
+ let got2 = ((url, options, defaultOptions2 = defaults2.options) => {
13522
13573
  let request = new Request(url, options, defaultOptions2), promise, lastHandler = (normalized) => (request.options = normalized, request._noPipe = !normalized.isStream, request.flush(), normalized.isStream ? request : (promise || (promise = asPromise(request)), promise)), iteration = 0, iterateHandlers = (newOptions) => {
13523
13574
  let result = (defaults2.handlers[iteration++] ?? lastHandler)(newOptions, iterateHandlers);
13524
13575
  if (dist_default2.promise(result) && !request.options.isStream && (promise || (promise = asPromise(request)), result !== promise)) {
@@ -13530,7 +13581,7 @@ var delay = async (ms) => new Promise((resolve) => {
13530
13581
  return result;
13531
13582
  };
13532
13583
  return iterateHandlers(request.options);
13533
- };
13584
+ });
13534
13585
  got2.extend = (...instancesOrOptions) => {
13535
13586
  let options = new Options(void 0, void 0, defaults2.options), handlers = [...defaults2.handlers], mutableDefaults;
13536
13587
  for (let value of instancesOrOptions)
@@ -13541,7 +13592,7 @@ var delay = async (ms) => new Promise((resolve) => {
13541
13592
  mutableDefaults: !!mutableDefaults
13542
13593
  });
13543
13594
  };
13544
- let paginateEach = async function* (url, options) {
13595
+ let paginateEach = (async function* (url, options) {
13545
13596
  let normalizedOptions = new Options(url, options, defaults2.options);
13546
13597
  normalizedOptions.resolveBodyOnly = !1;
13547
13598
  let { pagination } = normalizedOptions;
@@ -13563,15 +13614,15 @@ var delay = async (ms) => new Promise((resolve) => {
13563
13614
  return;
13564
13615
  optionsToMerge === response.request.options ? normalizedOptions = response.request.options : (normalizedOptions.merge(optionsToMerge), assert2.any([dist_default2.urlInstance, dist_default2.undefined], optionsToMerge.url), optionsToMerge.url !== void 0 && (normalizedOptions.prefixUrl = "", normalizedOptions.url = optionsToMerge.url)), numberOfRequests++;
13565
13616
  }
13566
- };
13567
- got2.paginate = paginateEach, got2.paginate.all = async (url, options) => {
13617
+ });
13618
+ got2.paginate = paginateEach, got2.paginate.all = (async (url, options) => {
13568
13619
  let results = [];
13569
13620
  for await (let item of paginateEach(url, options))
13570
13621
  results.push(item);
13571
13622
  return results;
13572
- }, got2.paginate.each = paginateEach, got2.stream = (url, options) => got2(url, { ...options, isStream: !0 });
13623
+ }), got2.paginate.each = paginateEach, got2.stream = ((url, options) => got2(url, { ...options, isStream: !0 }));
13573
13624
  for (let method of aliases)
13574
- got2[method] = (url, options) => got2(url, { ...options, method }), got2.stream[method] = (url, options) => got2(url, { ...options, method, isStream: !0 });
13625
+ got2[method] = ((url, options) => got2(url, { ...options, method })), got2.stream[method] = ((url, options) => got2(url, { ...options, method, isStream: !0 }));
13575
13626
  return defaults2.mutableDefaults || (Object.freeze(defaults2.handlers), defaults2.options.freeze()), Object.defineProperty(got2, "defaults", {
13576
13627
  value: defaults2,
13577
13628
  writable: !1,
@@ -13972,4 +14023,4 @@ deep-extend/lib/deep-extend.js:
13972
14023
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13973
14024
  *)
13974
14025
  */
13975
- //# sourceMappingURL=chunk-UTGZE4KZ.js.map
14026
+ //# sourceMappingURL=chunk-UAYSVXRU.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearCollectedLogs,
3
3
  collectedLogs
4
- } from "./chunk-34TWZ632.js";
4
+ } from "./chunk-JMQJQNH7.js";
5
5
  import {
6
6
  init_cjs_shims
7
7
  } from "./chunk-PKR7KJ6P.js";
@@ -33,4 +33,4 @@ function mockAndCaptureOutput() {
33
33
  export {
34
34
  mockAndCaptureOutput
35
35
  };
36
- //# sourceMappingURL=chunk-OYGH5GC4.js.map
36
+ //# sourceMappingURL=chunk-UKECTTQZ.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  staticService
3
- } from "./chunk-SJ6XHMPR.js";
3
+ } from "./chunk-DKRTUP7T.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-ON22YJEB.js";
6
+ } from "./chunk-7VKRIIXT.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-P24ZSULK.js.map
28
+ //# sourceMappingURL=chunk-UXJEPFC3.js.map
@@ -4,17 +4,18 @@ import {
4
4
  import {
5
5
  fanoutHooks,
6
6
  reportAnalyticsEvent
7
- } from "./chunk-EPNYJUKL.js";
7
+ } from "./chunk-5RBPM5MR.js";
8
8
  import {
9
9
  getEnvironmentData,
10
+ getLastSeenUserIdAfterAuth,
10
11
  isLocalEnvironment
11
- } from "./chunk-VOXGVQ4Y.js";
12
+ } from "./chunk-NMH42STK.js";
12
13
  import {
13
14
  runWithRateLimit
14
- } from "./chunk-UTGZE4KZ.js";
15
+ } from "./chunk-UAYSVXRU.js";
15
16
  import {
16
17
  CLI_KIT_VERSION
17
- } from "./chunk-XXIM3XSO.js";
18
+ } from "./chunk-LDFPMZVN.js";
18
19
  import {
19
20
  AbortSilentError,
20
21
  CancelExecution,
@@ -29,17 +30,17 @@ import {
29
30
  reportingRateLimit,
30
31
  require_stacktracey,
31
32
  shouldReportErrorAsUnexpected
32
- } from "./chunk-34TWZ632.js";
33
+ } from "./chunk-JMQJQNH7.js";
33
34
  import {
34
35
  require_lib
35
- } from "./chunk-F7F4BQYW.js";
36
+ } from "./chunk-X2YIODUW.js";
36
37
  import {
37
38
  cwd,
38
39
  isAbsolutePath,
39
40
  joinPath,
40
41
  normalizePath,
41
42
  relativePath
42
- } from "./chunk-Y2JP6WFP.js";
43
+ } from "./chunk-EG6MBBEN.js";
43
44
  import {
44
45
  __commonJS,
45
46
  __require,
@@ -110,25 +111,25 @@ var require_stackframe = __commonJS({
110
111
  });
111
112
  };
112
113
  for (var i = 0; i < booleanProps.length; i++)
113
- StackFrame.prototype["get" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]), StackFrame.prototype["set" + _capitalize(booleanProps[i])] = /* @__PURE__ */ function(p) {
114
+ StackFrame.prototype["get" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]), StackFrame.prototype["set" + _capitalize(booleanProps[i])] = /* @__PURE__ */ (function(p) {
114
115
  return function(v) {
115
116
  this[p] = !!v;
116
117
  };
117
- }(booleanProps[i]);
118
+ })(booleanProps[i]);
118
119
  for (var j = 0; j < numericProps.length; j++)
119
- StackFrame.prototype["get" + _capitalize(numericProps[j])] = _getter(numericProps[j]), StackFrame.prototype["set" + _capitalize(numericProps[j])] = /* @__PURE__ */ function(p) {
120
+ StackFrame.prototype["get" + _capitalize(numericProps[j])] = _getter(numericProps[j]), StackFrame.prototype["set" + _capitalize(numericProps[j])] = /* @__PURE__ */ (function(p) {
120
121
  return function(v) {
121
122
  if (!_isNumber(v))
122
123
  throw new TypeError(p + " must be a Number");
123
124
  this[p] = Number(v);
124
125
  };
125
- }(numericProps[j]);
126
+ })(numericProps[j]);
126
127
  for (var k = 0; k < stringProps.length; k++)
127
- StackFrame.prototype["get" + _capitalize(stringProps[k])] = _getter(stringProps[k]), StackFrame.prototype["set" + _capitalize(stringProps[k])] = /* @__PURE__ */ function(p) {
128
+ StackFrame.prototype["get" + _capitalize(stringProps[k])] = _getter(stringProps[k]), StackFrame.prototype["set" + _capitalize(stringProps[k])] = /* @__PURE__ */ (function(p) {
128
129
  return function(v) {
129
130
  this[p] = String(v);
130
131
  };
131
- }(stringProps[k]);
132
+ })(stringProps[k]);
132
133
  return StackFrame;
133
134
  });
134
135
  }
@@ -479,7 +480,7 @@ var require_bugsnag = __commonJS({
479
480
  typeof window < "u" ? g = window : typeof global < "u" ? g = global : typeof self < "u" ? g = self : g = this, g.bugsnag = f();
480
481
  }
481
482
  })(function() {
482
- var define2, module2, exports2, Breadcrumb = /* @__PURE__ */ function() {
483
+ var define2, module2, exports2, Breadcrumb = /* @__PURE__ */ (function() {
483
484
  function Breadcrumb2(message, metadata, type, timestamp) {
484
485
  timestamp === void 0 && (timestamp = /* @__PURE__ */ new Date()), this.type = type, this.message = message, this.metadata = metadata, this.timestamp = timestamp;
485
486
  }
@@ -492,7 +493,7 @@ var require_bugsnag = __commonJS({
492
493
  metaData: this.metadata
493
494
  };
494
495
  }, Breadcrumb2;
495
- }(), _$Breadcrumb_7 = Breadcrumb, _$breadcrumbTypes_12 = ["navigation", "request", "process", "log", "user", "state", "error", "manual"], _$reduce_22 = function(arr, fn, accum) {
496
+ })(), _$Breadcrumb_7 = Breadcrumb, _$breadcrumbTypes_12 = ["navigation", "request", "process", "log", "user", "state", "error", "manual"], _$reduce_22 = function(arr, fn, accum) {
496
497
  for (var val = accum, i = 0, len = arr.length; i < len; i++) val = fn(val, arr[i], i, arr);
497
498
  return val;
498
499
  }, _$filter_17 = function(arr, fn) {
@@ -945,7 +946,7 @@ var require_bugsnag = __commonJS({
945
946
  return n;
946
947
  }, _extends.apply(null, arguments);
947
948
  }
948
- var StackGenerator = require_stack_generator(), Event = /* @__PURE__ */ function() {
949
+ var StackGenerator = require_stack_generator(), Event = /* @__PURE__ */ (function() {
949
950
  function Event2(errorClass, errorMessage, stacktrace, handledState, originalError) {
950
951
  stacktrace === void 0 && (stacktrace = []), handledState === void 0 && (handledState = defaultHandledState()), this.apiKey = void 0, this.context = void 0, this.groupingHash = void 0, this.originalError = originalError, this._handledState = handledState, this.severity = this._handledState.severity, this.unhandled = this._handledState.unhandled, this.app = {}, this.device = {}, this.request = {}, this.breadcrumbs = [], this.threads = [], this._metadata = {}, this._features = [], this._featuresIndex = {}, this._user = {}, this._session = void 0, this._correlation = void 0, this._groupingDiscriminator = void 0, this.errors = [createBugsnagError(errorClass, errorMessage, Event2.__type, stacktrace)];
951
952
  }
@@ -1010,7 +1011,7 @@ var require_bugsnag = __commonJS({
1010
1011
  correlation: this._correlation
1011
1012
  };
1012
1013
  }, Event2;
1013
- }(), formatStackframe = function(frame) {
1014
+ })(), formatStackframe = function(frame) {
1014
1015
  var f = {
1015
1016
  file: frame.fileName,
1016
1017
  method: normaliseFunctionName(frame.functionName),
@@ -1204,7 +1205,7 @@ var require_bugsnag = __commonJS({
1204
1205
  return letter + timestamp + counter + print + random;
1205
1206
  }
1206
1207
  cuid.fingerprint = _$fingerprint_2, cuid.isCuid = _$isCuid_3;
1207
- var _$cuid_1 = cuid, Session = /* @__PURE__ */ function() {
1208
+ var _$cuid_1 = cuid, Session = /* @__PURE__ */ (function() {
1208
1209
  function Session2() {
1209
1210
  this.id = _$cuid_1(), this.startedAt = /* @__PURE__ */ new Date(), this._handled = 0, this._unhandled = 0, this._user = {}, this.app = {}, this.device = {};
1210
1211
  }
@@ -1229,8 +1230,8 @@ var require_bugsnag = __commonJS({
1229
1230
  }, _proto._track = function(event) {
1230
1231
  this[event._handledState.unhandled ? "_unhandled" : "_handled"] += 1;
1231
1232
  }, Session2;
1232
- }(), _$Session_34 = Session, __add_8 = _$featureFlagDelegate_23.add, __clear_8 = _$featureFlagDelegate_23.clear, __merge_8 = _$featureFlagDelegate_23.merge, HUB_PREFIX = "00000", HUB_NOTIFY = "https://notify.insighthub.smartbear.com", HUB_SESSION = "https://sessions.insighthub.smartbear.com", noop = function() {
1233
- }, Client = /* @__PURE__ */ function() {
1233
+ })(), _$Session_34 = Session, __add_8 = _$featureFlagDelegate_23.add, __clear_8 = _$featureFlagDelegate_23.clear, __merge_8 = _$featureFlagDelegate_23.merge, HUB_PREFIX = "00000", HUB_NOTIFY = "https://notify.insighthub.smartbear.com", HUB_SESSION = "https://sessions.insighthub.smartbear.com", noop = function() {
1234
+ }, Client = /* @__PURE__ */ (function() {
1234
1235
  function Client2(configuration, schema2, internalPlugins2, notifier) {
1235
1236
  var _this = this;
1236
1237
  schema2 === void 0 && (schema2 = _$config_9.schema), internalPlugins2 === void 0 && (internalPlugins2 = []), this._notifier = notifier, this._config = {}, this._schema = schema2, this._delivery = {
@@ -1392,7 +1393,7 @@ var require_bugsnag = __commonJS({
1392
1393
  });
1393
1394
  });
1394
1395
  }, Client2;
1395
- }(), generateConfigErrorMessage = function(errors, rawInput) {
1396
+ })(), generateConfigErrorMessage = function(errors, rawInput) {
1396
1397
  var er = new Error(`Invalid configuration
1397
1398
  ` + _$map_21(_$keys_20(errors), function(key) {
1398
1399
  return " - " + key + " " + errors[key] + ", got " + stringify(rawInput[key]);
@@ -1834,7 +1835,7 @@ metadata was removed`
1834
1835
  if (err && err.message !== "premature close") return cb(err);
1835
1836
  cb(null, slicer.getCode());
1836
1837
  });
1837
- }, CodeRange = /* @__PURE__ */ function(_Writable) {
1838
+ }, CodeRange = /* @__PURE__ */ (function(_Writable) {
1838
1839
  function CodeRange2(opts) {
1839
1840
  var _this;
1840
1841
  return _this = _Writable.call(this, ___extends_45({}, opts, {
@@ -1848,7 +1849,7 @@ metadata was removed`
1848
1849
  }, _proto.getCode = function() {
1849
1850
  return this._code;
1850
1851
  }, CodeRange2;
1851
- }(Writable), pMapSeries = function(ps) {
1852
+ })(Writable), pMapSeries = function(ps) {
1852
1853
  return new Promise(function(resolve2, reject) {
1853
1854
  var res = [];
1854
1855
  ps.reduce(function(accum, p) {
@@ -1927,7 +1928,7 @@ metadata was removed`
1927
1928
  return t2.__proto__ = e2, t2;
1928
1929
  }, ___setPrototypeOf_49(t, e);
1929
1930
  }
1930
- var DEFAULT_SUMMARY_INTERVAL = 10 * 1e3, Emitter = __require("events").EventEmitter, _$tracker_49 = /* @__PURE__ */ function(_Emitter) {
1931
+ var DEFAULT_SUMMARY_INTERVAL = 10 * 1e3, Emitter = __require("events").EventEmitter, _$tracker_49 = /* @__PURE__ */ (function(_Emitter) {
1931
1932
  function SessionTracker(intervalLength) {
1932
1933
  var _this;
1933
1934
  return _this = _Emitter.call(this) || this, _this._sessions = /* @__PURE__ */ new Map(), _this._interval = null, _this._intervalLength = intervalLength || DEFAULT_SUMMARY_INTERVAL, _this._summarize = _this._summarize.bind(_this), _this;
@@ -1950,7 +1951,7 @@ metadata was removed`
1950
1951
  }), _this2._sessions.delete(key);
1951
1952
  }), summary.length && this.emit("summary", summary);
1952
1953
  }, SessionTracker;
1953
- }(Emitter), dateToMsKey = function(d) {
1954
+ })(Emitter), dateToMsKey = function(d) {
1954
1955
  var dk = new Date(d);
1955
1956
  return dk.setSeconds(0), dk.setMilliseconds(0), dk.toISOString();
1956
1957
  }, _$session_48 = {
@@ -2135,26 +2136,31 @@ async function sendErrorToBugsnag(error, exitMode) {
2135
2136
  reportableError.stack = `Error: ${reportableError.message}
2136
2137
  ${formattedStacktrace}`;
2137
2138
  let withinRateLimit = !1;
2138
- return await runWithRateLimit({
2139
+ if (await runWithRateLimit({
2139
2140
  key: "send-error-to-bugsnag",
2140
2141
  ...reportingRateLimit,
2141
2142
  task: async () => {
2142
2143
  withinRateLimit = !0;
2143
2144
  }
2144
- }), withinRateLimit || (outputDebug("Skipping Bugsnag report due to rate limiting"), report = !1), report && (initializeBugsnag(), await new Promise((resolve, reject) => {
2145
- outputDebug(`Reporting ${unhandled ? "unhandled" : "handled"} error to Bugsnag: ${reportableError.message}`);
2146
- let eventHandler = (event) => {
2147
- event.severity = "error", event.unhandled = unhandled;
2148
- let { commandStartOptions } = getAllSensitiveMetadata(), { startCommand } = commandStartOptions ?? {};
2149
- if (startCommand) {
2150
- let firstWord = startCommand.trim().split(/\s+/)[0] ?? "cli", sliceName = ALLOWED_SLICE_NAMES.has(firstWord) ? firstWord : "cli";
2151
- event.addMetadata("custom", { slice_name: sliceName });
2152
- }
2153
- }, errorHandler2 = (error2) => {
2154
- error2 ? reject(error2) : resolve(reportableError);
2155
- };
2156
- import_js.default.notify(reportableError, eventHandler, errorHandler2);
2157
- })), { error: reportableError, reported: report, unhandled };
2145
+ }), withinRateLimit || (outputDebug("Skipping Bugsnag report due to rate limiting"), report = !1), report) {
2146
+ initializeBugsnag();
2147
+ let userId = await getLastSeenUserIdAfterAuth();
2148
+ await new Promise((resolve, reject) => {
2149
+ outputDebug(`Reporting ${unhandled ? "unhandled" : "handled"} error to Bugsnag: ${reportableError.message}`);
2150
+ let eventHandler = (event) => {
2151
+ event.severity = "error", event.unhandled = unhandled, event.setUser(userId);
2152
+ let { commandStartOptions } = getAllSensitiveMetadata(), { startCommand } = commandStartOptions ?? {};
2153
+ if (startCommand) {
2154
+ let firstWord = startCommand.trim().split(/\s+/)[0] ?? "cli", sliceName = ALLOWED_SLICE_NAMES.has(firstWord) ? firstWord : "cli";
2155
+ event.addMetadata("custom", { slice_name: sliceName });
2156
+ }
2157
+ }, errorHandler2 = (error2) => {
2158
+ error2 ? reject(error2) : resolve(reportableError);
2159
+ };
2160
+ import_js.default.notify(reportableError, eventHandler, errorHandler2);
2161
+ });
2162
+ }
2163
+ return { error: reportableError, reported: report, unhandled };
2158
2164
  } catch (err) {
2159
2165
  return outputDebug(`Error reporting to Bugsnag: ${err}`), { error, reported: !1, unhandled: void 0 };
2160
2166
  }
@@ -2231,4 +2237,4 @@ export {
2231
2237
  registerCleanBugsnagErrorsFromWithinPlugins,
2232
2238
  addBugsnagMetadata
2233
2239
  };
2234
- //# sourceMappingURL=chunk-3JZIRVBB.js.map
2240
+ //# sourceMappingURL=chunk-WZTQS5NN.js.map