@shopify/cli 3.63.2 → 3.64.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 (130) hide show
  1. package/dist/assets/cli-ruby/lib/shopify_cli/reporting_configuration_controller.rb +2 -37
  2. package/dist/assets/cli-ruby/lib/shopify_cli/theme/file.rb +5 -1
  3. package/dist/assets/dev-console/extensions/dev-console/assets/index-Cgb-oKsM.css +1 -0
  4. package/dist/assets/dev-console/extensions/dev-console/assets/{index-Dui3DO9f.js → index-D7F9wNys.js} +12 -12
  5. package/dist/assets/dev-console/index.html +2 -2
  6. package/dist/assets/hydrogen/starter/CHANGELOG.md +98 -5
  7. package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +37 -0
  8. package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +150 -0
  9. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +68 -0
  10. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +101 -0
  11. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  12. package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
  13. package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +80 -0
  14. package/dist/assets/hydrogen/starter/app/components/ProductImage.tsx +23 -0
  15. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +27 -0
  16. package/dist/assets/hydrogen/starter/app/components/Search.tsx +1 -0
  17. package/dist/assets/hydrogen/starter/app/root.tsx +11 -17
  18. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -2
  19. package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +51 -232
  20. package/dist/assets/hydrogen/starter/package.json +11 -11
  21. package/dist/assets/hydrogen/tailwind/package.json +1 -6
  22. package/dist/assets/hydrogen/tailwind/tailwind.css +6 -3
  23. package/dist/assets/hydrogen/vanilla-extract/package.json +2 -3
  24. package/dist/assets/hydrogen/virtual-routes/components/{Layout.jsx → PageLayout.jsx} +2 -2
  25. package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +8 -30
  26. package/dist/{chunk-K3CVGV3F.js → chunk-2TZRSXDZ.js} +3 -3
  27. package/dist/{chunk-EARPFFS7.js → chunk-5A6QTLMF.js} +241 -4
  28. package/dist/{chunk-3TGMDPDI.js → chunk-6LPAIJ4Y.js} +2 -2
  29. package/dist/{chunk-3MDI6LZT.js → chunk-6TPBPH6V.js} +905 -896
  30. package/dist/{chunk-PNFEODLY.js → chunk-7GYETEC3.js} +3 -3
  31. package/dist/{chunk-UNPXLODI.js → chunk-B7RN7IRD.js} +3 -4
  32. package/dist/{chunk-EQR6CWKL.js → chunk-BKBHZTOE.js} +3 -3
  33. package/dist/{chunk-A2UVOX6O.js → chunk-C2AKAEMR.js} +7066 -6051
  34. package/dist/{chunk-R5KML52V.js → chunk-CLBFKLWA.js} +4 -4
  35. package/dist/{chunk-6UDFXWNE.js → chunk-EJITPGUJ.js} +21 -4
  36. package/dist/{chunk-NPLAQVTF.js → chunk-G4TC4KHZ.js} +3 -3
  37. package/dist/{chunk-7OCUVNSF.js → chunk-GEAZ65AU.js} +1429 -2847
  38. package/dist/{chunk-23OKKZ5V.js → chunk-GUB3OCYR.js} +4 -4
  39. package/dist/{chunk-VQTHQBEC.js → chunk-H66NIXGL.js} +9 -14
  40. package/dist/chunk-I6HNYSMO.js +29 -0
  41. package/dist/{chunk-IRWSC76I.js → chunk-JSLLI5MY.js} +3 -3
  42. package/dist/{chunk-7AVKIH7O.js → chunk-KDK32T2A.js} +5 -5
  43. package/dist/{chunk-EZYMDZPN.js → chunk-L5WUZYLP.js} +5 -5
  44. package/dist/{chunk-MCT2524Y.js → chunk-LHP5F5LY.js} +4 -4
  45. package/dist/{chunk-GPMHDCWK.js → chunk-LP2H26NY.js} +3 -3
  46. package/dist/{chunk-T54B5GJP.js → chunk-LQX3GDBO.js} +2 -2
  47. package/dist/{chunk-VZUWS5IH.js → chunk-LVLKZYIC.js} +3 -3
  48. package/dist/{chunk-WADS2TV5.js → chunk-NO7MYZEO.js} +5 -4
  49. package/dist/{chunk-LH533WG4.js → chunk-NPH2SXRO.js} +2 -2
  50. package/dist/{chunk-UQUO22Q5.js → chunk-PIJQNKK6.js} +5 -5
  51. package/dist/{chunk-S4VBXFXP.js → chunk-PWYMBX34.js} +220 -16
  52. package/dist/{chunk-QEOBHRRQ.js → chunk-QCK4QLB3.js} +17912 -17444
  53. package/dist/{chunk-UJYIV6JP.js → chunk-QI5O2CU6.js} +5 -5
  54. package/dist/{chunk-DIZHFZTJ.js → chunk-RX7VCI62.js} +4 -4
  55. package/dist/{chunk-PQKGBYDC.js → chunk-T7DHXEC7.js} +3 -3
  56. package/dist/{chunk-YMPGWFWU.js → chunk-TCQUNDAY.js} +3 -3
  57. package/dist/{chunk-CM4H6QMH.js → chunk-TSZPIP7J.js} +3 -3
  58. package/dist/{chunk-5BLMIE7F.js → chunk-UTXBNNRZ.js} +4 -4
  59. package/dist/{chunk-XER2L725.js → chunk-VPPZXHAK.js} +2 -2
  60. package/dist/{chunk-YAYFJITA.js → chunk-W26344X5.js} +3 -3
  61. package/dist/{chunk-EQPYUHNM.js → chunk-WIG6CPGR.js} +1497 -112
  62. package/dist/{chunk-UZUD5DRI.js → chunk-X34BQYQP.js} +2 -2
  63. package/dist/chunk-YLPSXWEZ.js +12 -0
  64. package/dist/cli/commands/auth/logout.js +14 -19
  65. package/dist/cli/commands/auth/logout.test.js +17 -21
  66. package/dist/cli/commands/debug/command-flags.js +11 -15
  67. package/dist/cli/commands/demo/catalog.js +13 -18
  68. package/dist/cli/commands/demo/generate-file.js +13 -18
  69. package/dist/cli/commands/demo/index.js +13 -18
  70. package/dist/cli/commands/demo/print-ai-prompt.js +13 -18
  71. package/dist/cli/commands/docs/generate.js +11 -15
  72. package/dist/cli/commands/docs/generate.test.js +11 -15
  73. package/dist/cli/commands/help.js +11 -15
  74. package/dist/cli/commands/kitchen-sink/async.js +12 -16
  75. package/dist/cli/commands/kitchen-sink/async.test.js +12 -16
  76. package/dist/cli/commands/kitchen-sink/index.js +14 -18
  77. package/dist/cli/commands/kitchen-sink/index.test.js +14 -18
  78. package/dist/cli/commands/kitchen-sink/prompts.js +12 -16
  79. package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -16
  80. package/dist/cli/commands/kitchen-sink/static.js +12 -16
  81. package/dist/cli/commands/kitchen-sink/static.test.js +12 -16
  82. package/dist/cli/commands/search.js +12 -16
  83. package/dist/cli/commands/upgrade.js +11 -15
  84. package/dist/cli/commands/version.js +12 -16
  85. package/dist/cli/commands/version.test.js +12 -16
  86. package/dist/cli/services/commands/search.js +4 -4
  87. package/dist/cli/services/commands/search.test.js +4 -4
  88. package/dist/cli/services/commands/version.js +6 -7
  89. package/dist/cli/services/commands/version.test.js +7 -8
  90. package/dist/cli/services/demo.js +5 -6
  91. package/dist/cli/services/demo.test.js +5 -6
  92. package/dist/cli/services/kitchen-sink/async.js +4 -4
  93. package/dist/cli/services/kitchen-sink/prompts.js +4 -4
  94. package/dist/cli/services/kitchen-sink/static.js +4 -4
  95. package/dist/cli/services/upgrade.js +5 -6
  96. package/dist/cli/services/upgrade.test.js +7 -8
  97. package/dist/{constants-3CLHB4LQ.js → constants-EVER32LA.js} +3 -3
  98. package/dist/{custom-oclif-loader-D4H5EJW6.js → custom-oclif-loader-F5UKFNJS.js} +13 -6
  99. package/dist/{error-handler-HUI4HW3X.js → error-handler-GCSQB44R.js} +10 -8
  100. package/dist/hooks/postrun.js +12 -14
  101. package/dist/hooks/prerun.js +8 -11
  102. package/dist/index.js +7705 -7450
  103. package/dist/{local-7IRDZWLW.js → local-VDSO2Y52.js} +4 -4
  104. package/dist/{morph-6NYGHGNT.js → morph-DQWX4LPS.js} +9 -9
  105. package/dist/{node-UIH7JP3D.js → node-3B62KLPY.js} +21 -19
  106. package/dist/{node-package-manager-2LWT2MNN.js → node-package-manager-QLAS6UPG.js} +5 -6
  107. package/dist/{path-JVVXOELJ.js → path-KUSF6CYC.js} +2 -2
  108. package/dist/{system-4HHX42JS.js → system-CPU6ZDBW.js} +4 -4
  109. package/dist/templates/ui-extensions/projects/web_pixel_extension/package.json.liquid +1 -1
  110. package/dist/tsconfig.tsbuildinfo +1 -1
  111. package/dist/{ui-NFBKMC4P.js → ui-Y4GW3DUK.js} +4 -4
  112. package/dist/{workerd-4HFD3PS4.js → workerd-LSXMDY5M.js} +22 -19
  113. package/oclif.manifest.json +265 -4
  114. package/package.json +7 -10
  115. package/dist/assets/dev-console/extensions/dev-console/assets/index-Bi7y6lI5.css +0 -1
  116. package/dist/assets/hydrogen/css-modules/package.json +0 -6
  117. package/dist/assets/hydrogen/postcss/package.json +0 -10
  118. package/dist/assets/hydrogen/postcss/postcss.config.js +0 -8
  119. package/dist/assets/hydrogen/starter/app/components/Cart.tsx +0 -364
  120. package/dist/assets/hydrogen/tailwind/postcss.config.js +0 -10
  121. package/dist/assets/hydrogen/tailwind/tailwind.config.js +0 -8
  122. package/dist/chunk-4WBV3WP3.js +0 -221
  123. package/dist/chunk-OWICSMFV.js +0 -12
  124. package/dist/chunk-QCDYZY46.js +0 -1070
  125. package/dist/chunk-QEKTVN5A.js +0 -4385
  126. package/dist/chunk-QOUOFEGO.js +0 -35
  127. package/dist/chunk-WP234IUO.js +0 -265
  128. package/dist/chunk-XLPMGRR3.js +0 -496
  129. package/dist/chunk-XSKJYEAZ.js +0 -1453
  130. package/dist/error-handler-QDDLQDOJ.js +0 -43
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-DLK3F3DC.js";
4
4
  import {
5
5
  demoStepsSchema
6
- } from "./chunk-VZUWS5IH.js";
6
+ } from "./chunk-LVLKZYIC.js";
7
7
  import {
8
8
  base_command_default
9
- } from "./chunk-WP234IUO.js";
9
+ } from "./chunk-5A6QTLMF.js";
10
10
  import {
11
11
  outputInfo,
12
12
  renderInfo
13
- } from "./chunk-3MDI6LZT.js";
13
+ } from "./chunk-6TPBPH6V.js";
14
14
  import {
15
15
  __toESM,
16
16
  init_cjs_shims
@@ -59,4 +59,4 @@ The demo should perform the following steps:
59
59
  export {
60
60
  PrintAIPrompt
61
61
  };
62
- //# sourceMappingURL=chunk-23OKKZ5V.js.map
62
+ //# sourceMappingURL=chunk-GUB3OCYR.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  platformAndArch
3
- } from "./chunk-YAYFJITA.js";
3
+ } from "./chunk-W26344X5.js";
4
4
  import {
5
5
  getPackageManager,
6
6
  packageManagerFromUserAgent
7
- } from "./chunk-XLPMGRR3.js";
7
+ } from "./chunk-QCK4QLB3.js";
8
8
  import {
9
9
  addPublicMetadata,
10
10
  addSensitiveMetadata,
@@ -12,18 +12,18 @@ import {
12
12
  cloudEnvironment,
13
13
  currentProcessIsGlobal,
14
14
  macAddress
15
- } from "./chunk-3MDI6LZT.js";
15
+ } from "./chunk-6TPBPH6V.js";
16
16
  import {
17
17
  cwd
18
- } from "./chunk-UNPXLODI.js";
18
+ } from "./chunk-B7RN7IRD.js";
19
19
  import {
20
20
  init_cjs_shims
21
21
  } from "./chunk-ZPL24Y2D.js";
22
22
 
23
- // ../cli-kit/src/private/node/analytics.ts
23
+ // ../cli-kit/dist/private/node/analytics.js
24
24
  init_cjs_shims();
25
25
 
26
- // ../cli-kit/src/public/node/crypto.ts
26
+ // ../cli-kit/dist/public/node/crypto.js
27
27
  init_cjs_shims();
28
28
  import crypto from "crypto";
29
29
  function randomHex(size) {
@@ -48,13 +48,8 @@ function randomUUID() {
48
48
  return crypto.randomUUID();
49
49
  }
50
50
 
51
- // ../cli-kit/src/private/node/analytics.ts
52
- async function startAnalytics({
53
- commandContent,
54
- args,
55
- currentTime = (/* @__PURE__ */ new Date()).getTime(),
56
- commandClass
57
- }) {
51
+ // ../cli-kit/dist/private/node/analytics.js
52
+ async function startAnalytics({ commandContent, args, currentTime = (/* @__PURE__ */ new Date()).getTime(), commandClass }) {
58
53
  let startCommand = commandContent.command;
59
54
  if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsNameOverride")) {
60
55
  startCommand = commandClass.analyticsNameOverride() ?? commandContent.command;
@@ -121,4 +116,4 @@ export {
121
116
  getEnvironmentData,
122
117
  getSensitiveEnvironmentData
123
118
  };
124
- //# sourceMappingURL=chunk-VQTHQBEC.js.map
119
+ //# sourceMappingURL=chunk-H66NIXGL.js.map
@@ -0,0 +1,29 @@
1
+ import {
2
+ logout
3
+ } from "./chunk-WIG6CPGR.js";
4
+ import {
5
+ base_command_default
6
+ } from "./chunk-5A6QTLMF.js";
7
+ import {
8
+ outputSuccess
9
+ } from "./chunk-6TPBPH6V.js";
10
+ import {
11
+ init_cjs_shims
12
+ } from "./chunk-ZPL24Y2D.js";
13
+
14
+ // src/cli/commands/auth/logout.ts
15
+ init_cjs_shims();
16
+ var Logout = class extends base_command_default {
17
+ static {
18
+ this.description = "Logs you out of the Shopify account or Partner account and store.";
19
+ }
20
+ async run() {
21
+ await logout();
22
+ outputSuccess("Logged out from Shopify");
23
+ }
24
+ };
25
+
26
+ export {
27
+ Logout
28
+ };
29
+ //# sourceMappingURL=chunk-I6HNYSMO.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  versionService
3
- } from "./chunk-DIZHFZTJ.js";
3
+ } from "./chunk-RX7VCI62.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-WP234IUO.js";
6
+ } from "./chunk-5A6QTLMF.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-ZPL24Y2D.js";
@@ -22,4 +22,4 @@ var Version = class extends base_command_default {
22
22
  export {
23
23
  Version
24
24
  };
25
- //# sourceMappingURL=chunk-IRWSC76I.js.map
25
+ //# sourceMappingURL=chunk-JSLLI5MY.js.map
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-DLK3F3DC.js";
4
4
  import {
5
5
  demoStepsSchema
6
- } from "./chunk-VZUWS5IH.js";
6
+ } from "./chunk-LVLKZYIC.js";
7
7
  import {
8
8
  base_command_default
9
- } from "./chunk-WP234IUO.js";
9
+ } from "./chunk-5A6QTLMF.js";
10
10
  import {
11
11
  AbortError,
12
12
  fileExists,
@@ -17,7 +17,7 @@ import {
17
17
  readFile,
18
18
  renderAutocompletePrompt,
19
19
  writeFile
20
- } from "./chunk-3MDI6LZT.js";
20
+ } from "./chunk-6TPBPH6V.js";
21
21
  import {
22
22
  require_lib
23
23
  } from "./chunk-GEN4RXTD.js";
@@ -25,7 +25,7 @@ import {
25
25
  cwd,
26
26
  joinPath,
27
27
  resolvePath
28
- } from "./chunk-UNPXLODI.js";
28
+ } from "./chunk-B7RN7IRD.js";
29
29
  import {
30
30
  __toESM,
31
31
  init_cjs_shims
@@ -128,4 +128,4 @@ async function selectSteps() {
128
128
  export {
129
129
  GenerateFile
130
130
  };
131
- //# sourceMappingURL=chunk-7AVKIH7O.js.map
131
+ //# sourceMappingURL=chunk-KDK32T2A.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  demo
3
- } from "./chunk-VZUWS5IH.js";
3
+ } from "./chunk-LVLKZYIC.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-WP234IUO.js";
6
+ } from "./chunk-5A6QTLMF.js";
7
7
  import {
8
8
  readFile
9
- } from "./chunk-3MDI6LZT.js";
9
+ } from "./chunk-6TPBPH6V.js";
10
10
  import {
11
11
  require_lib
12
12
  } from "./chunk-GEN4RXTD.js";
13
13
  import {
14
14
  cwd,
15
15
  resolvePath
16
- } from "./chunk-UNPXLODI.js";
16
+ } from "./chunk-B7RN7IRD.js";
17
17
  import {
18
18
  __toESM,
19
19
  init_cjs_shims
@@ -58,4 +58,4 @@ var Demo = class _Demo extends base_command_default {
58
58
  export {
59
59
  Demo
60
60
  };
61
- //# sourceMappingURL=chunk-EZYMDZPN.js.map
61
+ //# sourceMappingURL=chunk-L5WUZYLP.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-WP234IUO.js";
3
+ } from "./chunk-5A6QTLMF.js";
4
4
  import {
5
5
  mkdir,
6
6
  outputInfo,
7
7
  rmdir,
8
8
  writeFile
9
- } from "./chunk-3MDI6LZT.js";
9
+ } from "./chunk-6TPBPH6V.js";
10
10
  import {
11
11
  cwd,
12
12
  joinPath
13
- } from "./chunk-UNPXLODI.js";
13
+ } from "./chunk-B7RN7IRD.js";
14
14
  import {
15
15
  init_cjs_shims
16
16
  } from "./chunk-ZPL24Y2D.js";
@@ -154,4 +154,4 @@ export {
154
154
  writeCommandFlagInterface,
155
155
  writeCommandUsageExampleFile
156
156
  };
157
- //# sourceMappingURL=chunk-MCT2524Y.js.map
157
+ //# sourceMappingURL=chunk-LHP5F5LY.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  searchService
3
- } from "./chunk-3TGMDPDI.js";
3
+ } from "./chunk-6LPAIJ4Y.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-WP234IUO.js";
6
+ } from "./chunk-5A6QTLMF.js";
7
7
  import {
8
8
  require_lib
9
9
  } from "./chunk-GEN4RXTD.js";
@@ -46,4 +46,4 @@ var Search = class _Search extends base_command_default {
46
46
  export {
47
47
  Search
48
48
  };
49
- //# sourceMappingURL=chunk-GPMHDCWK.js.map
49
+ //# sourceMappingURL=chunk-LP2H26NY.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  renderConcurrent,
3
3
  renderTasks
4
- } from "./chunk-3MDI6LZT.js";
4
+ } from "./chunk-6TPBPH6V.js";
5
5
  import {
6
6
  init_cjs_shims
7
7
  } from "./chunk-ZPL24Y2D.js";
@@ -59,4 +59,4 @@ async function asyncTasks() {
59
59
  export {
60
60
  asyncTasks
61
61
  };
62
- //# sourceMappingURL=chunk-T54B5GJP.js.map
62
+ //# sourceMappingURL=chunk-LQX3GDBO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  z
3
- } from "./chunk-6UDFXWNE.js";
3
+ } from "./chunk-EJITPGUJ.js";
4
4
  import {
5
5
  AbortError,
6
6
  BugError,
@@ -17,7 +17,7 @@ import {
17
17
  renderTextPrompt,
18
18
  renderWarning,
19
19
  sleep
20
- } from "./chunk-3MDI6LZT.js";
20
+ } from "./chunk-6TPBPH6V.js";
21
21
  import {
22
22
  init_cjs_shims
23
23
  } from "./chunk-ZPL24Y2D.js";
@@ -351,4 +351,4 @@ export {
351
351
  demoStepsSchema,
352
352
  demo
353
353
  };
354
- //# sourceMappingURL=chunk-VZUWS5IH.js.map
354
+ //# sourceMappingURL=chunk-LVLKZYIC.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  joinPath
3
- } from "./chunk-UNPXLODI.js";
3
+ } from "./chunk-B7RN7IRD.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-ZPL24Y2D.js";
7
7
 
8
- // ../cli-kit/src/private/node/constants.ts
8
+ // ../cli-kit/dist/private/node/constants.js
9
9
  init_cjs_shims();
10
10
 
11
11
  // ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
@@ -65,7 +65,7 @@ function envPaths(name, { suffix = "nodejs" } = {}) {
65
65
  return linux(name);
66
66
  }
67
67
 
68
- // ../cli-kit/src/private/node/constants.ts
68
+ // ../cli-kit/dist/private/node/constants.js
69
69
  var identifier = "shopify-cli";
70
70
  var cacheFolder = () => {
71
71
  if (process.env.XDG_CACHE_HOME)
@@ -79,6 +79,7 @@ var environmentVariables = {
79
79
  alwaysLogAnalytics: "SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",
80
80
  alwaysLogMetrics: "SHOPIFY_CLI_ALWAYS_LOG_METRICS",
81
81
  deviceAuth: "SHOPIFY_CLI_DEVICE_AUTH",
82
+ accessCodeAuth: "SHOPIFY_CLI_ACCESS_CODE_AUTH",
82
83
  enableCliRedirect: "SHOPIFY_CLI_ENABLE_CLI_REDIRECT",
83
84
  env: "SHOPIFY_CLI_ENV",
84
85
  firstPartyDev: "SHOPIFY_CLI_1P_DEV",
@@ -147,4 +148,4 @@ export {
147
148
  sessionConstants,
148
149
  bugsnagApiKey
149
150
  };
150
- //# sourceMappingURL=chunk-WADS2TV5.js.map
151
+ //# sourceMappingURL=chunk-NO7MYZEO.js.map
@@ -2,7 +2,7 @@ import {
2
2
  init_cjs_shims
3
3
  } from "./chunk-ZPL24Y2D.js";
4
4
 
5
- // ../cli-kit/src/private/node/context/deprecations-store.ts
5
+ // ../cli-kit/dist/private/node/context/deprecations-store.js
6
6
  init_cjs_shims();
7
7
  var globalWithDeprecationsStore = {
8
8
  ...globalThis,
@@ -33,4 +33,4 @@ export {
33
33
  getNextDeprecationDate,
34
34
  setNextDeprecationDate
35
35
  };
36
- //# sourceMappingURL=chunk-LH533WG4.js.map
36
+ //# sourceMappingURL=chunk-NPH2SXRO.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  demo
3
- } from "./chunk-VZUWS5IH.js";
3
+ } from "./chunk-LVLKZYIC.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-WP234IUO.js";
6
+ } from "./chunk-5A6QTLMF.js";
7
7
  import {
8
8
  outputInfo,
9
9
  readFile,
10
10
  renderAutocompletePrompt
11
- } from "./chunk-3MDI6LZT.js";
11
+ } from "./chunk-6TPBPH6V.js";
12
12
  import {
13
13
  joinPath
14
- } from "./chunk-UNPXLODI.js";
14
+ } from "./chunk-B7RN7IRD.js";
15
15
  import {
16
16
  init_cjs_shims
17
17
  } from "./chunk-ZPL24Y2D.js";
@@ -50,4 +50,4 @@ var Catalog = class extends base_command_default {
50
50
  export {
51
51
  Catalog
52
52
  };
53
- //# sourceMappingURL=chunk-UQUO22Q5.js.map
53
+ //# sourceMappingURL=chunk-PIJQNKK6.js.map
@@ -1,9 +1,47 @@
1
+ import {
2
+ fanoutHooks,
3
+ reportAnalyticsEvent
4
+ } from "./chunk-C2AKAEMR.js";
5
+ import {
6
+ getEnvironmentData
7
+ } from "./chunk-H66NIXGL.js";
1
8
  import {
2
9
  require_once
3
10
  } from "./chunk-FMKVOTQK.js";
11
+ import {
12
+ CLI_KIT_VERSION
13
+ } from "./chunk-YLPSXWEZ.js";
14
+ import {
15
+ AbortSilentError,
16
+ CancelExecution,
17
+ cleanSingleStackTracePath,
18
+ errorMapper,
19
+ getAllPublicMetadata,
20
+ getAllSensitiveMetadata,
21
+ handler,
22
+ outputDebug,
23
+ outputInfo,
24
+ printEventsJson,
25
+ require_stacktracey,
26
+ shouldReportError
27
+ } from "./chunk-6TPBPH6V.js";
28
+ import {
29
+ bugsnagApiKey
30
+ } from "./chunk-NO7MYZEO.js";
31
+ import {
32
+ require_lib
33
+ } from "./chunk-GEN4RXTD.js";
34
+ import {
35
+ cwd,
36
+ isAbsolutePath,
37
+ joinPath,
38
+ normalizePath,
39
+ relativePath
40
+ } from "./chunk-B7RN7IRD.js";
4
41
  import {
5
42
  __commonJS,
6
43
  __require,
44
+ __toESM,
7
45
  init_cjs_shims
8
46
  } from "./chunk-ZPL24Y2D.js";
9
47
 
@@ -2902,7 +2940,7 @@ var require_bugsnag = __commonJS({
2902
2940
  ;
2903
2941
  ;
2904
2942
  var internalPlugins = [_$app_37, _$surroundingCode_42, _$inProject_41, _$stripProjectRoot_49, _$session_46, _$device_40, _$uncaughtException_43, _$unhandledRejection_44, _$intercept_39, _$contextualize_38, _$pathNormaliser_48];
2905
- var Bugsnag = {
2943
+ var Bugsnag2 = {
2906
2944
  _client: null,
2907
2945
  createClient: function(opts) {
2908
2946
  if (typeof opts === "string")
@@ -2925,35 +2963,35 @@ var require_bugsnag = __commonJS({
2925
2963
  return bugsnag;
2926
2964
  },
2927
2965
  start: function(opts) {
2928
- if (Bugsnag._client) {
2929
- Bugsnag._client._logger.warn("Bugsnag.start() was called more than once. Ignoring.");
2930
- return Bugsnag._client;
2966
+ if (Bugsnag2._client) {
2967
+ Bugsnag2._client._logger.warn("Bugsnag.start() was called more than once. Ignoring.");
2968
+ return Bugsnag2._client;
2931
2969
  }
2932
- Bugsnag._client = Bugsnag.createClient(opts);
2933
- return Bugsnag._client;
2970
+ Bugsnag2._client = Bugsnag2.createClient(opts);
2971
+ return Bugsnag2._client;
2934
2972
  },
2935
2973
  isStarted: function() {
2936
- return Bugsnag._client != null;
2974
+ return Bugsnag2._client != null;
2937
2975
  }
2938
2976
  };
2939
2977
  Object.keys(_$Client_2.prototype).forEach(function(m) {
2940
2978
  if (/^_/.test(m))
2941
2979
  return;
2942
- Bugsnag[m] = function() {
2943
- if (!Bugsnag._client)
2980
+ Bugsnag2[m] = function() {
2981
+ if (!Bugsnag2._client)
2944
2982
  return console.error("Bugsnag." + m + "() was called before Bugsnag.start()");
2945
- Bugsnag._client._depth += 1;
2946
- var ret = Bugsnag._client[m].apply(Bugsnag._client, arguments);
2947
- Bugsnag._client._depth -= 1;
2983
+ Bugsnag2._client._depth += 1;
2984
+ var ret = Bugsnag2._client[m].apply(Bugsnag2._client, arguments);
2985
+ Bugsnag2._client._depth -= 1;
2948
2986
  return ret;
2949
2987
  };
2950
2988
  });
2951
- _$notifier_36 = Bugsnag;
2989
+ _$notifier_36 = Bugsnag2;
2952
2990
  _$notifier_36.Client = _$Client_2;
2953
2991
  _$notifier_36.Event = _$Event_4;
2954
2992
  _$notifier_36.Session = _$Session_32;
2955
2993
  _$notifier_36.Breadcrumb = _$Breadcrumb_1;
2956
- _$notifier_36["default"] = Bugsnag;
2994
+ _$notifier_36["default"] = Bugsnag2;
2957
2995
  return _$notifier_36;
2958
2996
  });
2959
2997
  }
@@ -2967,6 +3005,168 @@ var require_notifier = __commonJS({
2967
3005
  }
2968
3006
  });
2969
3007
 
3008
+ // ../cli-kit/dist/public/node/error-handler.js
3009
+ init_cjs_shims();
3010
+ var import_core = __toESM(require_lib(), 1);
3011
+ var import_stacktracey = __toESM(require_stacktracey(), 1);
3012
+ var import_js = __toESM(require_notifier(), 1);
3013
+ import { realpath } from "fs/promises";
3014
+ async function errorHandler(error, config) {
3015
+ if (error instanceof CancelExecution) {
3016
+ if (error.message && error.message !== "") {
3017
+ outputInfo(`\u2728 ${error.message}`);
3018
+ }
3019
+ } else if (error instanceof AbortSilentError) {
3020
+ printEventsJson();
3021
+ } else {
3022
+ return errorMapper(error).then((error2) => {
3023
+ return handler(error2);
3024
+ }).then((mappedError) => {
3025
+ printEventsJson();
3026
+ return reportError(mappedError, config);
3027
+ });
3028
+ }
3029
+ }
3030
+ var reportError = async (error, config) => {
3031
+ let exitMode = "expected_error";
3032
+ if (shouldReportError(error))
3033
+ exitMode = "unexpected_error";
3034
+ if (config !== void 0) {
3035
+ await reportAnalyticsEvent({ config, errorMessage: error instanceof Error ? error.message : void 0, exitMode });
3036
+ }
3037
+ await sendErrorToBugsnag(error, exitMode);
3038
+ };
3039
+ async function sendErrorToBugsnag(error, exitMode) {
3040
+ if (import_core.settings.debug) {
3041
+ outputDebug(`Skipping Bugsnag report`);
3042
+ return { reported: false, error, unhandled: void 0 };
3043
+ }
3044
+ const unhandled = exitMode === "unexpected_error";
3045
+ let reportableError;
3046
+ let stacktrace;
3047
+ let report = false;
3048
+ if (error instanceof Error) {
3049
+ report = true;
3050
+ reportableError = new Error(error.message);
3051
+ stacktrace = error.stack;
3052
+ } else if (typeof error === "string" && error.trim().length !== 0) {
3053
+ report = true;
3054
+ reportableError = new Error(error);
3055
+ stacktrace = reportableError.stack;
3056
+ } else {
3057
+ report = false;
3058
+ reportableError = new Error("Unknown error");
3059
+ }
3060
+ const formattedStacktrace = new import_stacktracey.default(stacktrace ?? "").clean().items.map((item) => {
3061
+ const filePath = cleanSingleStackTracePath(item.file);
3062
+ return ` at ${item.callee} (${filePath}:${item.line}:${item.column})`;
3063
+ }).join("\n");
3064
+ reportableError.stack = `Error: ${reportableError.message}
3065
+ ${formattedStacktrace}`;
3066
+ if (report) {
3067
+ initializeBugsnag();
3068
+ await new Promise((resolve, reject) => {
3069
+ outputDebug(`Reporting ${unhandled ? "unhandled" : "handled"} error to Bugsnag: ${reportableError.message}`);
3070
+ const eventHandler = (event) => {
3071
+ event.severity = "error";
3072
+ event.unhandled = unhandled;
3073
+ };
3074
+ const errorHandler2 = (error2) => {
3075
+ if (error2) {
3076
+ reject(error2);
3077
+ } else {
3078
+ resolve(reportableError);
3079
+ }
3080
+ };
3081
+ import_js.default.notify(reportableError, eventHandler, errorHandler2);
3082
+ });
3083
+ }
3084
+ return { error: reportableError, reported: report, unhandled };
3085
+ }
3086
+ function cleanStackFrameFilePath({ currentFilePath, projectRoot, pluginLocations }) {
3087
+ const fullLocation = isAbsolutePath(currentFilePath) ? currentFilePath : joinPath(projectRoot, currentFilePath);
3088
+ const matchingPluginPath = pluginLocations.filter(({ pluginPath }) => fullLocation.indexOf(pluginPath) === 0)[0];
3089
+ if (matchingPluginPath !== void 0) {
3090
+ return joinPath(matchingPluginPath.name, relativePath(matchingPluginPath.pluginPath, fullLocation));
3091
+ }
3092
+ return currentFilePath.replace(/.*node_modules\//, "");
3093
+ }
3094
+ async function registerCleanBugsnagErrorsFromWithinPlugins(config) {
3095
+ const bugsnagConfigProjectRoot = import_js.default?._client?._config?.projectRoot ?? cwd();
3096
+ const projectRoot = normalizePath(bugsnagConfigProjectRoot);
3097
+ const pluginLocations = await Promise.all([...config.plugins].map(async ([_, plugin]) => {
3098
+ const followSymlinks = await realpath(plugin.root);
3099
+ return { name: plugin.name, pluginPath: normalizePath(followSymlinks) };
3100
+ }));
3101
+ initializeBugsnag();
3102
+ import_js.default.addOnError(async (event) => {
3103
+ event.errors.forEach((error) => {
3104
+ error.stacktrace.forEach((stackFrame) => {
3105
+ stackFrame.file = cleanStackFrameFilePath({ currentFilePath: stackFrame.file, projectRoot, pluginLocations });
3106
+ });
3107
+ });
3108
+ try {
3109
+ await addBugsnagMetadata(event, config);
3110
+ } catch (metadataError) {
3111
+ outputDebug(`There was an error adding metadata to the Bugsnag report; Ignoring and carrying on ${metadataError}`);
3112
+ }
3113
+ });
3114
+ }
3115
+ async function addBugsnagMetadata(event, config) {
3116
+ const publicData = getAllPublicMetadata();
3117
+ const { commandStartOptions } = getAllSensitiveMetadata();
3118
+ const { startCommand } = commandStartOptions ?? {};
3119
+ const { "@shopify/app": appPublic, ...otherPluginsPublic } = await fanoutHooks(config, "public_command_metadata", {});
3120
+ const environment = await getEnvironmentData(config);
3121
+ const allMetadata = {
3122
+ command: startCommand,
3123
+ ...appPublic,
3124
+ ...publicData,
3125
+ ...environment,
3126
+ pluginData: otherPluginsPublic
3127
+ };
3128
+ const appData = {};
3129
+ const commandData = {};
3130
+ const environmentData = {};
3131
+ const miscData = {};
3132
+ const appKeys = ["api_key", "partner_id", "project_type"];
3133
+ const commandKeys = ["command"];
3134
+ const environmentKeys = ["cli_version", "node_version", "ruby_version", "uname"];
3135
+ Object.entries(allMetadata).forEach(([key, value]) => {
3136
+ if (key.startsWith("app_") || appKeys.includes(key)) {
3137
+ appData[key] = value;
3138
+ } else if (key.startsWith("cmd_") || commandKeys.includes(key)) {
3139
+ commandData[key] = value;
3140
+ } else if (key.startsWith("env_") || environmentKeys) {
3141
+ environmentData[key] = value;
3142
+ } else {
3143
+ miscData[key] = value;
3144
+ }
3145
+ });
3146
+ const bugsnagMetadata = {
3147
+ "Shopify App": appData,
3148
+ Command: commandData,
3149
+ Environment: environmentData,
3150
+ Misc: miscData
3151
+ };
3152
+ Object.entries(bugsnagMetadata).forEach(([section, values]) => {
3153
+ event.addMetadata(section, values);
3154
+ });
3155
+ }
3156
+ function initializeBugsnag() {
3157
+ if (import_js.default.isStarted()) {
3158
+ return;
3159
+ }
3160
+ import_js.default.start({
3161
+ appType: "node",
3162
+ apiKey: bugsnagApiKey,
3163
+ logger: null,
3164
+ appVersion: CLI_KIT_VERSION,
3165
+ autoTrackSessions: false,
3166
+ autoDetectErrors: false
3167
+ });
3168
+ }
3169
+
2970
3170
  export {
2971
3171
  require_error_stack_parser,
2972
3172
  require_iserror,
@@ -2974,6 +3174,10 @@ export {
2974
3174
  require_end_of_stream,
2975
3175
  require_pump,
2976
3176
  require_byline,
2977
- require_notifier
3177
+ errorHandler,
3178
+ sendErrorToBugsnag,
3179
+ cleanStackFrameFilePath,
3180
+ registerCleanBugsnagErrorsFromWithinPlugins,
3181
+ addBugsnagMetadata
2978
3182
  };
2979
- //# sourceMappingURL=chunk-S4VBXFXP.js.map
3183
+ //# sourceMappingURL=chunk-PWYMBX34.js.map