@shopify/cli 3.64.0 → 3.65.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 (98) hide show
  1. package/dist/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +1 -1
  2. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +2 -3
  3. package/dist/assets/hydrogen/starter/.graphqlrc.ts +27 -0
  4. package/dist/assets/hydrogen/starter/CHANGELOG.md +16 -7
  5. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +2 -2
  6. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +3 -3
  7. package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
  8. package/dist/assets/hydrogen/starter/app/components/Search.tsx +0 -1
  9. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +1 -1
  10. package/dist/assets/hydrogen/starter/package.json +6 -6
  11. package/dist/{chunk-WIG6CPGR.js → chunk-2VMOCSNT.js} +39 -11
  12. package/dist/{chunk-6LPAIJ4Y.js → chunk-4JHXAPVK.js} +2 -2
  13. package/dist/{chunk-UTXBNNRZ.js → chunk-4MMUX74C.js} +4 -4
  14. package/dist/{chunk-W26344X5.js → chunk-5ASKHNQG.js} +2 -2
  15. package/dist/{chunk-VPPZXHAK.js → chunk-5E7BOMYA.js} +2 -2
  16. package/dist/{chunk-CLBFKLWA.js → chunk-6727OHPN.js} +4 -4
  17. package/dist/{chunk-PWYMBX34.js → chunk-AEPMFZLL.js} +7 -7
  18. package/dist/{chunk-5A6QTLMF.js → chunk-AGEDJDVG.js} +5 -5
  19. package/dist/{chunk-H66NIXGL.js → chunk-CAFAFMYK.js} +10 -6
  20. package/dist/{chunk-LP2H26NY.js → chunk-CAITHPIX.js} +3 -3
  21. package/dist/{chunk-GUB3OCYR.js → chunk-CYWZMOXQ.js} +4 -4
  22. package/dist/{chunk-X34BQYQP.js → chunk-EIDHNONS.js} +2 -2
  23. package/dist/{chunk-LVLKZYIC.js → chunk-GNEXBICT.js} +2 -2
  24. package/dist/{chunk-T7DHXEC7.js → chunk-HL74OSDI.js} +2 -2
  25. package/dist/{chunk-I6HNYSMO.js → chunk-HVRGX6N6.js} +4 -4
  26. package/dist/{chunk-YLPSXWEZ.js → chunk-KGLWCSFT.js} +2 -2
  27. package/dist/{chunk-7GYETEC3.js → chunk-KX6NLKOX.js} +3 -3
  28. package/dist/{chunk-6TPBPH6V.js → chunk-KYAUWGQO.js} +14 -10
  29. package/dist/{chunk-TSZPIP7J.js → chunk-M6KGRVDD.js} +3 -3
  30. package/dist/{chunk-PIJQNKK6.js → chunk-MJT3HLPT.js} +5 -5
  31. package/dist/{chunk-2TZRSXDZ.js → chunk-MO56ATXB.js} +2 -2
  32. package/dist/{chunk-G4TC4KHZ.js → chunk-O5CFSRZQ.js} +3 -3
  33. package/dist/{chunk-L5WUZYLP.js → chunk-O6H7FQHP.js} +5 -5
  34. package/dist/{chunk-GEAZ65AU.js → chunk-OGVVZ2S7.js} +147 -207
  35. package/dist/{chunk-B7RN7IRD.js → chunk-QNY4RVJ6.js} +6 -1
  36. package/dist/{chunk-KDK32T2A.js → chunk-QY432MUX.js} +5 -5
  37. package/dist/{chunk-LHP5F5LY.js → chunk-SQBVLHAC.js} +4 -4
  38. package/dist/{chunk-QI5O2CU6.js → chunk-SXEJ7K5S.js} +5 -5
  39. package/dist/{chunk-NO7MYZEO.js → chunk-UMWKJFTM.js} +2 -2
  40. package/dist/{chunk-RX7VCI62.js → chunk-UOQXKH3J.js} +4 -4
  41. package/dist/{chunk-C2AKAEMR.js → chunk-VJLIWDQA.js} +7 -7
  42. package/dist/{chunk-LQX3GDBO.js → chunk-VZO77ESC.js} +2 -2
  43. package/dist/{chunk-QCK4QLB3.js → chunk-WEDQJLHL.js} +4 -4
  44. package/dist/{chunk-BKBHZTOE.js → chunk-X3GS3FMA.js} +3 -3
  45. package/dist/{chunk-TCQUNDAY.js → chunk-XPX5D55U.js} +3 -3
  46. package/dist/{chunk-JSLLI5MY.js → chunk-ZRXUHYJO.js} +3 -3
  47. package/dist/cli/commands/auth/logout.js +12 -12
  48. package/dist/cli/commands/auth/logout.test.js +13 -13
  49. package/dist/cli/commands/debug/command-flags.js +11 -11
  50. package/dist/cli/commands/demo/catalog.js +12 -12
  51. package/dist/cli/commands/demo/generate-file.js +12 -12
  52. package/dist/cli/commands/demo/index.js +12 -12
  53. package/dist/cli/commands/demo/print-ai-prompt.js +12 -12
  54. package/dist/cli/commands/docs/generate.js +11 -11
  55. package/dist/cli/commands/docs/generate.test.js +11 -11
  56. package/dist/cli/commands/help.js +11 -11
  57. package/dist/cli/commands/kitchen-sink/async.js +12 -12
  58. package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
  59. package/dist/cli/commands/kitchen-sink/index.js +14 -14
  60. package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
  61. package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
  62. package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
  63. package/dist/cli/commands/kitchen-sink/static.js +12 -12
  64. package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
  65. package/dist/cli/commands/search.js +12 -12
  66. package/dist/cli/commands/upgrade.js +11 -11
  67. package/dist/cli/commands/version.js +12 -12
  68. package/dist/cli/commands/version.test.js +12 -12
  69. package/dist/cli/services/commands/search.js +4 -4
  70. package/dist/cli/services/commands/search.test.js +4 -4
  71. package/dist/cli/services/commands/version.js +6 -6
  72. package/dist/cli/services/commands/version.test.js +7 -7
  73. package/dist/cli/services/demo.js +4 -4
  74. package/dist/cli/services/demo.test.js +4 -4
  75. package/dist/cli/services/kitchen-sink/async.js +4 -4
  76. package/dist/cli/services/kitchen-sink/prompts.js +4 -4
  77. package/dist/cli/services/kitchen-sink/static.js +4 -4
  78. package/dist/cli/services/upgrade.js +5 -5
  79. package/dist/cli/services/upgrade.test.js +7 -7
  80. package/dist/{constants-EVER32LA.js → constants-Y4XF72NG.js} +3 -3
  81. package/dist/{custom-oclif-loader-F5UKFNJS.js → custom-oclif-loader-PNWG2W6I.js} +4 -4
  82. package/dist/{error-handler-GCSQB44R.js → error-handler-Z5RKZIZJ.js} +10 -10
  83. package/dist/hooks/postrun.js +8 -8
  84. package/dist/hooks/prerun.js +6 -6
  85. package/dist/index.js +5075 -3023
  86. package/dist/{local-VDSO2Y52.js → local-DQQ4M6FZ.js} +4 -4
  87. package/dist/{morph-DQWX4LPS.js → morph-DN4AZJZW.js} +9 -9
  88. package/dist/{node-3B62KLPY.js → node-VYVGZGMI.js} +15 -15
  89. package/dist/{node-package-manager-QLAS6UPG.js → node-package-manager-GWVEMST6.js} +5 -5
  90. package/dist/{path-KUSF6CYC.js → path-ZCRJKM4K.js} +4 -2
  91. package/dist/{system-CPU6ZDBW.js → system-ACW6VUAL.js} +4 -4
  92. package/dist/templates/ui-extensions/projects/web_pixel_extension/package.json.liquid +1 -1
  93. package/dist/tsconfig.tsbuildinfo +1 -1
  94. package/dist/{ui-Y4GW3DUK.js → ui-R5XNTORG.js} +4 -4
  95. package/dist/{workerd-LSXMDY5M.js → workerd-DIO7G5QX.js} +14 -14
  96. package/oclif.manifest.json +150 -13
  97. package/package.json +7 -7
  98. package/dist/assets/hydrogen/starter/.graphqlrc.yml +0 -12
@@ -16,7 +16,7 @@ module Extension
16
16
  SUPPORTED_BUCKETS = %w(assets blocks snippets locales)
17
17
  BUNDLE_SIZE_LIMIT = 10 * 1024 * 1024 # 10MB
18
18
  LIQUID_SIZE_LIMIT = 100 * 1024 # 100kb
19
- SUPPORTED_ASSET_EXTS = %w(.jpg .jpeg .js .json .css .png .svg)
19
+ SUPPORTED_ASSET_EXTS = %w(.jpg .jpeg .js .json .css .png .svg .wasm)
20
20
  SUPPORTED_LOCALE_EXTS = %w(.json)
21
21
 
22
22
  def create(directory_name, context, getting_started: false)
@@ -242,9 +242,8 @@ module ShopifyCLI
242
242
 
243
243
  new_session_id = extract_shopify_essential_from_response_headers(response_headers)
244
244
  if new_session_id
245
- @ctx.debug("New _shopify_essential cookie from response")
246
- @secure_session_id = new_session_id
247
- @last_session_cookie_refresh = Time.now
245
+ @ctx.debug("Renew _shopify_essential cookie by the response")
246
+ @secure_session_id = secure_session_id
248
247
  end
249
248
 
250
249
  response_headers
@@ -0,0 +1,27 @@
1
+ import type {IGraphQLConfig} from 'graphql-config';
2
+ import {getSchema} from '@shopify/hydrogen-codegen';
3
+
4
+ /**
5
+ * GraphQL Config
6
+ * @see https://the-guild.dev/graphql/config/docs/user/usage
7
+ * @type {IGraphQLConfig}
8
+ */
9
+ export default {
10
+ projects: {
11
+ default: {
12
+ schema: getSchema('storefront'),
13
+ documents: [
14
+ './*.{ts,tsx,js,jsx}',
15
+ './app/**/*.{ts,tsx,js,jsx}',
16
+ '!./app/graphql/**/*.{ts,tsx,js,jsx}',
17
+ ],
18
+ },
19
+
20
+ customer: {
21
+ schema: getSchema('customer-account'),
22
+ documents: ['./app/graphql/customer-account/*.{ts,tsx,js,jsx}'],
23
+ },
24
+
25
+ // Add your own GraphQL projects here for CMS, Shopify Admin API, etc.
26
+ },
27
+ } as IGraphQLConfig;
@@ -1,6 +1,15 @@
1
1
  # skeleton
2
2
 
3
- ## 0.0.0-next-18e76ba-20240708092928
3
+ ## 2024.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Changed the GraphQL config file format to be TS/JS instead of YAML. ([#2311](https://github.com/Shopify/hydrogen/pull/2311)) by [@frandiox](https://github.com/frandiox)
8
+
9
+ - Updated dependencies [[`18ea233c`](https://github.com/Shopify/hydrogen/commit/18ea233cd327bf3001ec9b107ad66b05c9c78584), [`8b2322d7`](https://github.com/Shopify/hydrogen/commit/8b2322d783078298cd5d20ec5f3b1faf99b7895b)]:
10
+ - @shopify/cli-hydrogen@8.3.0
11
+
12
+ ## 2024.7.1
4
13
 
5
14
  ### Patch Changes
6
15
 
@@ -64,7 +73,7 @@
64
73
  +}
65
74
 
66
75
  export function ErrorBoundary() {
67
- const rootData = useLoaderData<typeof loader>();
76
+ - const rootData = useLoaderData<typeof loader>();
68
77
 
69
78
  return (
70
79
  - <html>
@@ -151,7 +160,7 @@
151
160
  }
152
161
  ```
153
162
 
154
- - Trigger changeset for all packages for next release
163
+ - Moved `@shopify/cli` from `dependencies` to `devDependencies`. ([#2312](https://github.com/Shopify/hydrogen/pull/2312)) by [@frandiox](https://github.com/frandiox)
155
164
 
156
165
  - The `@shopify/cli` package now bundles the `@shopify/cli-hydrogen` plugin. Therefore, you can now remove the latter from your local dependencies: ([#2306](https://github.com/Shopify/hydrogen/pull/2306)) by [@frandiox](https://github.com/frandiox)
157
166
 
@@ -161,10 +170,10 @@
161
170
  "@shopify/hydrogen": "2024.7.0",
162
171
  ```
163
172
 
164
- - Updated dependencies [[`a0e84d76`](https://github.com/Shopify/hydrogen/commit/a0e84d76b67d4c57c4defee06185949c41782eab), [`426bb390`](https://github.com/Shopify/hydrogen/commit/426bb390b25f51e57499ff6673aef70ded935e87), [`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`710625c7`](https://github.com/Shopify/hydrogen/commit/710625c740a6656488d4b419e2d2451bef9d076f), [`8b9c726d`](https://github.com/Shopify/hydrogen/commit/8b9c726d34f3482b5b5a0da4c7c0c2f20e2c9caa), [`10a419bf`](https://github.com/Shopify/hydrogen/commit/10a419bf1db79cdfd8c41c0223ce695959f60da9), [`6a6278bb`](https://github.com/Shopify/hydrogen/commit/6a6278bb9187b3b5a98cd98ec9dd278882d03c0d), [`dcbd0bbf`](https://github.com/Shopify/hydrogen/commit/dcbd0bbf4073a3e35e96f3cce257f7b19b2b2aea), [`a5e03e2a`](https://github.com/Shopify/hydrogen/commit/a5e03e2a1e99fcd83ee5a2be7bf6f5f6b47984b3), [`c2690653`](https://github.com/Shopify/hydrogen/commit/c2690653b6b24f7318e9088551a37195255a2247), [`54c2f7ad`](https://github.com/Shopify/hydrogen/commit/54c2f7ad3d0d52e6be10b2a54a1a4fd0cc107a35), [`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`e96b332b`](https://github.com/Shopify/hydrogen/commit/e96b332ba1aba79aa3d5c2ce18001292070faf49), [`f3065371`](https://github.com/Shopify/hydrogen/commit/f3065371c1dda222c6e40bd8c20528dc9fdea9a5), [`6cd5554b`](https://github.com/Shopify/hydrogen/commit/6cd5554b160d314d35964a5ee8976ed60972bf17), [`9eb60d73`](https://github.com/Shopify/hydrogen/commit/9eb60d73e552c3d22b9325ecbcd5878810893ad3), [`e432533e`](https://github.com/Shopify/hydrogen/commit/e432533e7391ec3fe16a4a24f2b3363206842580), [`de3f70be`](https://github.com/Shopify/hydrogen/commit/de3f70be1a838eda746903cbb38cc25cf0e09fa3), [`83cb96f4`](https://github.com/Shopify/hydrogen/commit/83cb96f42078bf79b20a153d8a8461f75d573ab1)]:
165
- - @shopify/remix-oxygen@0.0.0-next-18e76ba-20240708092928
166
- - @shopify/cli-hydrogen@0.0.0-next-18e76ba-20240708092928
167
- - @shopify/hydrogen@0.0.0-next-18e76ba-20240708092928
173
+ - Updated dependencies [[`a0e84d76`](https://github.com/Shopify/hydrogen/commit/a0e84d76b67d4c57c4defee06185949c41782eab), [`426bb390`](https://github.com/Shopify/hydrogen/commit/426bb390b25f51e57499ff6673aef70ded935e87), [`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`710625c7`](https://github.com/Shopify/hydrogen/commit/710625c740a6656488d4b419e2d2451bef9d076f), [`8b9c726d`](https://github.com/Shopify/hydrogen/commit/8b9c726d34f3482b5b5a0da4c7c0c2f20e2c9caa), [`10a419bf`](https://github.com/Shopify/hydrogen/commit/10a419bf1db79cdfd8c41c0223ce695959f60da9), [`6a6278bb`](https://github.com/Shopify/hydrogen/commit/6a6278bb9187b3b5a98cd98ec9dd278882d03c0d), [`66236ca6`](https://github.com/Shopify/hydrogen/commit/66236ca65ddefac99eaa553c7877c85863d84cc2), [`dcbd0bbf`](https://github.com/Shopify/hydrogen/commit/dcbd0bbf4073a3e35e96f3cce257f7b19b2b2aea), [`a5e03e2a`](https://github.com/Shopify/hydrogen/commit/a5e03e2a1e99fcd83ee5a2be7bf6f5f6b47984b3), [`c2690653`](https://github.com/Shopify/hydrogen/commit/c2690653b6b24f7318e9088551a37195255a2247), [`54c2f7ad`](https://github.com/Shopify/hydrogen/commit/54c2f7ad3d0d52e6be10b2a54a1a4fd0cc107a35), [`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`e96b332b`](https://github.com/Shopify/hydrogen/commit/e96b332ba1aba79aa3d5c2ce18001292070faf49), [`f3065371`](https://github.com/Shopify/hydrogen/commit/f3065371c1dda222c6e40bd8c20528dc9fdea9a5), [`6cd5554b`](https://github.com/Shopify/hydrogen/commit/6cd5554b160d314d35964a5ee8976ed60972bf17), [`9eb60d73`](https://github.com/Shopify/hydrogen/commit/9eb60d73e552c3d22b9325ecbcd5878810893ad3), [`e432533e`](https://github.com/Shopify/hydrogen/commit/e432533e7391ec3fe16a4a24f2b3363206842580), [`de3f70be`](https://github.com/Shopify/hydrogen/commit/de3f70be1a838eda746903cbb38cc25cf0e09fa3), [`83cb96f4`](https://github.com/Shopify/hydrogen/commit/83cb96f42078bf79b20a153d8a8461f75d573ab1)]:
174
+ - @shopify/remix-oxygen@2.0.5
175
+ - @shopify/cli-hydrogen@8.2.0
176
+ - @shopify/hydrogen@2024.7.1
168
177
 
169
178
  ## 2024.4.5
170
179
 
@@ -8,7 +8,7 @@ import {CartSummary} from './CartSummary';
8
8
  export type CartLayout = 'page' | 'aside';
9
9
 
10
10
  export type CartMainProps = {
11
- cart: CartApiQueryFragment;
11
+ cart: CartApiQueryFragment | null;
12
12
  layout: CartLayout;
13
13
  };
14
14
 
@@ -26,7 +26,7 @@ export function CartMain({layout, cart: originalCart}: CartMainProps) {
26
26
  cart &&
27
27
  Boolean(cart?.discountCodes?.filter((code) => code.applicable)?.length);
28
28
  const className = `cart-main ${withDiscount ? 'with-discount' : ''}`;
29
- const cartHasItems = !!cart && cart.totalQuantity > 0;
29
+ const cartHasItems = cart?.totalQuantity! > 0;
30
30
 
31
31
  return (
32
32
  <div className={className}>
@@ -3,7 +3,7 @@ import type {CartLayout} from '~/components/CartMain';
3
3
  import {CartForm, Money, type OptimisticCart} from '@shopify/hydrogen';
4
4
 
5
5
  type CartSummaryProps = {
6
- cart: OptimisticCart<CartApiQueryFragment>;
6
+ cart: OptimisticCart<CartApiQueryFragment | null>;
7
7
  layout: CartLayout;
8
8
  };
9
9
 
@@ -29,7 +29,7 @@ export function CartSummary({cart, layout}: CartSummaryProps) {
29
29
  </div>
30
30
  );
31
31
  }
32
- function CartCheckoutActions({checkoutUrl}: {checkoutUrl: string}) {
32
+ function CartCheckoutActions({checkoutUrl}: {checkoutUrl?: string}) {
33
33
  if (!checkoutUrl) return null;
34
34
 
35
35
  return (
@@ -45,7 +45,7 @@ function CartCheckoutActions({checkoutUrl}: {checkoutUrl: string}) {
45
45
  function CartDiscounts({
46
46
  discountCodes,
47
47
  }: {
48
- discountCodes: CartApiQueryFragment['discountCodes'];
48
+ discountCodes?: CartApiQueryFragment['discountCodes'];
49
49
  }) {
50
50
  const codes: string[] =
51
51
  discountCodes
@@ -60,7 +60,7 @@ function CartAside({cart}: {cart: PageLayoutProps['cart']}) {
60
60
  <Suspense fallback={<p>Loading cart ...</p>}>
61
61
  <Await resolve={cart}>
62
62
  {(cart) => {
63
- return <CartMain cart={cart!} layout="aside" />;
63
+ return <CartMain cart={cart} layout="aside" />;
64
64
  }}
65
65
  </Await>
66
66
  </Suspense>
@@ -309,7 +309,6 @@ export function PredictiveSearchForm({
309
309
  {...props}
310
310
  className={className}
311
311
  onSubmit={(event) => {
312
- debugger;
313
312
  event.preventDefault();
314
313
  event.stopPropagation();
315
314
  if (!inputRef?.current || inputRef.current.value === '') {
@@ -93,7 +93,7 @@ export default function Cart() {
93
93
  errorElement={<div>An error occurred</div>}
94
94
  >
95
95
  {(cart) => {
96
- return <CartMain layout="page" cart={cart!} />;
96
+ return <CartMain layout="page" cart={cart} />;
97
97
  }}
98
98
  </Await>
99
99
  </Suspense>
@@ -2,7 +2,7 @@
2
2
  "name": "skeleton",
3
3
  "private": true,
4
4
  "sideEffects": false,
5
- "version": "0.0.0-next-18e76ba-20240708092928",
5
+ "version": "2024.7.2",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "shopify hydrogen build --codegen",
@@ -16,9 +16,8 @@
16
16
  "dependencies": {
17
17
  "@remix-run/react": "^2.10.1",
18
18
  "@remix-run/server-runtime": "^2.10.1",
19
- "@shopify/cli": "^3.63.2",
20
- "@shopify/hydrogen": "0.0.0-next-18e76ba-20240708092928",
21
- "@shopify/remix-oxygen": "0.0.0-next-18e76ba-20240708092928",
19
+ "@shopify/hydrogen": "2024.7.1",
20
+ "@shopify/remix-oxygen": "^2.0.5",
22
21
  "graphql": "^16.6.0",
23
22
  "graphql-tag": "^2.12.6",
24
23
  "isbot": "^3.8.0",
@@ -29,8 +28,9 @@
29
28
  "@graphql-codegen/cli": "5.0.2",
30
29
  "@remix-run/dev": "^2.10.1",
31
30
  "@remix-run/eslint-config": "^2.10.1",
32
- "@shopify/hydrogen-codegen": "0.0.0-next-18e76ba-20240708092928",
33
- "@shopify/mini-oxygen": "0.0.0-next-18e76ba-20240708092928",
31
+ "@shopify/cli": "^3.64.0",
32
+ "@shopify/hydrogen-codegen": "^0.3.1",
33
+ "@shopify/mini-oxygen": "^3.0.4",
34
34
  "@shopify/oxygen-workers-types": "^4.1.2",
35
35
  "@shopify/prettier-config": "^1.1.2",
36
36
  "@total-typescript/ts-reset": "^0.4.2",
@@ -19,19 +19,19 @@ import {
19
19
  resolveRequestDocument,
20
20
  sanitizedHeadersOutput,
21
21
  shopifyFetch
22
- } from "./chunk-C2AKAEMR.js";
22
+ } from "./chunk-VJLIWDQA.js";
23
23
  import {
24
24
  base64URLEncode,
25
25
  randomBytes,
26
26
  randomHex,
27
27
  sha256
28
- } from "./chunk-H66NIXGL.js";
28
+ } from "./chunk-CAFAFMYK.js";
29
29
  import {
30
30
  cacheRetrieveOrRepopulate,
31
31
  getSession,
32
32
  removeSession,
33
33
  setSession
34
- } from "./chunk-QCK4QLB3.js";
34
+ } from "./chunk-WEDQJLHL.js";
35
35
  import {
36
36
  AbortError,
37
37
  BugError,
@@ -41,8 +41,10 @@ import {
41
41
  findPathUp,
42
42
  firstPartyDev,
43
43
  import_ts_error,
44
+ isCloudEnvironment,
44
45
  isSpin,
45
46
  isSpinEnvironment,
47
+ isTTY,
46
48
  isTruthy,
47
49
  keypress,
48
50
  openURL,
@@ -59,13 +61,13 @@ import {
59
61
  spinFqdn,
60
62
  stringifyMessage,
61
63
  useDeviceAuth
62
- } from "./chunk-6TPBPH6V.js";
64
+ } from "./chunk-KYAUWGQO.js";
63
65
  import {
64
66
  sessionConstants
65
- } from "./chunk-NO7MYZEO.js";
67
+ } from "./chunk-UMWKJFTM.js";
66
68
  import {
67
69
  moduleDirectory
68
- } from "./chunk-B7RN7IRD.js";
70
+ } from "./chunk-QNY4RVJ6.js";
69
71
  import {
70
72
  __commonJS,
71
73
  __require,
@@ -3573,7 +3575,7 @@ async function partnersFqdn() {
3573
3575
  }
3574
3576
  async function appManagementFqdn() {
3575
3577
  const environment = serviceEnvironment();
3576
- const productionFqdn = "shopify.com";
3578
+ const productionFqdn = "app.shopify.com";
3577
3579
  switch (environment) {
3578
3580
  case "local":
3579
3581
  return "app.shopify.myshopify.io";
@@ -3583,6 +3585,18 @@ async function appManagementFqdn() {
3583
3585
  return productionFqdn;
3584
3586
  }
3585
3587
  }
3588
+ async function developerDashboardFqdn() {
3589
+ const environment = serviceEnvironment();
3590
+ const productionFqdn = "dev.shopify.com";
3591
+ switch (environment) {
3592
+ case "local":
3593
+ return "dev.shopify.myshopify.io";
3594
+ case "spin":
3595
+ return `dev.shopify.${await spinFqdn()}`;
3596
+ default:
3597
+ return productionFqdn;
3598
+ }
3599
+ }
3586
3600
  async function businessPlatformFqdn() {
3587
3601
  const environment = serviceEnvironment();
3588
3602
  const productionFqdn = "destinations.shopifysvc.com";
@@ -4127,7 +4141,7 @@ function defaultApiScopes(api, systemEnvironment = process.env) {
4127
4141
  case "partners":
4128
4142
  return ["cli"];
4129
4143
  case "business-platform":
4130
- return ["destinations"];
4144
+ return isTruthy(systemEnvironment.USE_APP_MANAGEMENT_API) ? ["destinations", "store-management"] : ["destinations"];
4131
4145
  case "app-management":
4132
4146
  return isTruthy(systemEnvironment.USE_APP_MANAGEMENT_API) ? ["app-management"] : [];
4133
4147
  default:
@@ -4148,6 +4162,8 @@ function scopeTransform(scope) {
4148
4162
  return "https://api.shopify.com/auth/shop.storefront-renderer.devtools";
4149
4163
  case "destinations":
4150
4164
  return "https://api.shopify.com/auth/destinations.readonly";
4165
+ case "store-management":
4166
+ return "https://api.shopify.com/auth/organization.store-management";
4151
4167
  case "app-management":
4152
4168
  return "https://api.shopify.com/auth/organization.apps.manage";
4153
4169
  default:
@@ -4520,7 +4536,7 @@ async function terminateBlockingPortProcessPrompt(port, stepDescription) {
4520
4536
  init_cjs_shims();
4521
4537
  async function requestDeviceAuthorization(scopes) {
4522
4538
  const fqdn = await identityFqdn();
4523
- const identityClientId = await clientId();
4539
+ const identityClientId = clientId();
4524
4540
  const queryParams = { client_id: identityClientId, scope: scopes.join(" ") };
4525
4541
  const url2 = `https://${fqdn}/oauth/device_authorization`;
4526
4542
  const response = await shopifyFetch(url2, {
@@ -4534,8 +4550,19 @@ async function requestDeviceAuthorization(scopes) {
4534
4550
  throw new BugError("Failed to start authorization process");
4535
4551
  }
4536
4552
  outputInfo("\nTo run this command, log in to Shopify.");
4553
+ if (!isTTY()) {
4554
+ throw new AbortError("Authorization is required to continue, but the current environment does not support interactive prompts.", "To resolve this, specify credentials in your environment, or run the command in an interactive environment such as your local terminal.");
4555
+ }
4537
4556
  outputInfo(outputContent`User verification code: ${jsonResult.user_code}`);
4538
- outputInfo(outputContent`👉 Open this link to start the auth process: ${outputToken.green(jsonResult.verification_uri_complete)}`);
4557
+ const linkToken = outputToken.link(jsonResult.verification_uri_complete);
4558
+ if (isCloudEnvironment()) {
4559
+ outputInfo(outputContent`👉 Open this link to start the auth process: ${linkToken}`);
4560
+ } else {
4561
+ outputInfo("\u{1F449} Press any key to open the login page on your browser");
4562
+ await keypress();
4563
+ await openURL(jsonResult.verification_uri_complete);
4564
+ outputInfo(outputContent`Opened link to start the auth process: ${linkToken}`);
4565
+ }
4539
4566
  return {
4540
4567
  deviceCode: jsonResult.device_code,
4541
4568
  userCode: jsonResult.user_code,
@@ -5003,6 +5030,7 @@ function logout() {
5003
5030
  export {
5004
5031
  partnersFqdn,
5005
5032
  appManagementFqdn,
5033
+ developerDashboardFqdn,
5006
5034
  businessPlatformFqdn,
5007
5035
  normalizeStoreFqdn,
5008
5036
  ok,
@@ -5024,4 +5052,4 @@ export {
5024
5052
  ensureAuthenticatedBusinessPlatform,
5025
5053
  logout
5026
5054
  };
5027
- //# sourceMappingURL=chunk-WIG6CPGR.js.map
5055
+ //# sourceMappingURL=chunk-2VMOCSNT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  openURL
3
- } from "./chunk-6TPBPH6V.js";
3
+ } from "./chunk-KYAUWGQO.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-ZPL24Y2D.js";
@@ -16,4 +16,4 @@ async function searchService(query) {
16
16
  export {
17
17
  searchService
18
18
  };
19
- //# sourceMappingURL=chunk-6LPAIJ4Y.js.map
19
+ //# sourceMappingURL=chunk-4JHXAPVK.js.map
@@ -4,7 +4,7 @@ import {
4
4
  findUpAndReadPackageJson,
5
5
  getPackageManager,
6
6
  usesWorkspaces
7
- } from "./chunk-QCK4QLB3.js";
7
+ } from "./chunk-WEDQJLHL.js";
8
8
  import {
9
9
  AbortError,
10
10
  exec,
@@ -15,12 +15,12 @@ import {
15
15
  outputSuccess,
16
16
  outputToken,
17
17
  outputWarn
18
- } from "./chunk-6TPBPH6V.js";
18
+ } from "./chunk-KYAUWGQO.js";
19
19
  import {
20
20
  dirname,
21
21
  joinPath,
22
22
  moduleDirectory
23
- } from "./chunk-B7RN7IRD.js";
23
+ } from "./chunk-QNY4RVJ6.js";
24
24
  import {
25
25
  init_cjs_shims
26
26
  } from "./chunk-ZPL24Y2D.js";
@@ -167,4 +167,4 @@ function usingPackageManager({ env } = { env: process.env }) {
167
167
  export {
168
168
  upgrade
169
169
  };
170
- //# sourceMappingURL=chunk-UTXBNNRZ.js.map
170
+ //# sourceMappingURL=chunk-4MMUX74C.js.map
@@ -2,7 +2,7 @@ import {
2
2
  execa,
3
3
  outputContent,
4
4
  outputDebug
5
- } from "./chunk-6TPBPH6V.js";
5
+ } from "./chunk-KYAUWGQO.js";
6
6
  import {
7
7
  init_cjs_shims
8
8
  } from "./chunk-ZPL24Y2D.js";
@@ -70,4 +70,4 @@ export {
70
70
  username,
71
71
  platformAndArch
72
72
  };
73
- //# sourceMappingURL=chunk-W26344X5.js.map
73
+ //# sourceMappingURL=chunk-5ASKHNQG.js.map
@@ -7,7 +7,7 @@ import {
7
7
  renderSuccess,
8
8
  renderTable,
9
9
  renderWarning
10
- } from "./chunk-6TPBPH6V.js";
10
+ } from "./chunk-KYAUWGQO.js";
11
11
  import {
12
12
  init_cjs_shims
13
13
  } from "./chunk-ZPL24Y2D.js";
@@ -194,4 +194,4 @@ async function staticService() {
194
194
  export {
195
195
  staticService
196
196
  };
197
- //# sourceMappingURL=chunk-VPPZXHAK.js.map
197
+ //# sourceMappingURL=chunk-5E7BOMYA.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-5A6QTLMF.js";
3
+ } from "./chunk-AGEDJDVG.js";
4
4
  import {
5
5
  packageManagerFromUserAgent
6
- } from "./chunk-QCK4QLB3.js";
6
+ } from "./chunk-WEDQJLHL.js";
7
7
  import {
8
8
  currentProcessIsGlobal,
9
9
  inferPackageManagerForGlobalCLI,
10
10
  renderInfo
11
- } from "./chunk-6TPBPH6V.js";
11
+ } from "./chunk-KYAUWGQO.js";
12
12
  import {
13
13
  init_cjs_shims
14
14
  } from "./chunk-ZPL24Y2D.js";
@@ -44,4 +44,4 @@ var Upgrade = class extends base_command_default {
44
44
  export {
45
45
  Upgrade
46
46
  };
47
- //# sourceMappingURL=chunk-CLBFKLWA.js.map
47
+ //# sourceMappingURL=chunk-6727OHPN.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  fanoutHooks,
3
3
  reportAnalyticsEvent
4
- } from "./chunk-C2AKAEMR.js";
4
+ } from "./chunk-VJLIWDQA.js";
5
5
  import {
6
6
  getEnvironmentData
7
- } from "./chunk-H66NIXGL.js";
7
+ } from "./chunk-CAFAFMYK.js";
8
8
  import {
9
9
  require_once
10
10
  } from "./chunk-FMKVOTQK.js";
11
11
  import {
12
12
  CLI_KIT_VERSION
13
- } from "./chunk-YLPSXWEZ.js";
13
+ } from "./chunk-KGLWCSFT.js";
14
14
  import {
15
15
  AbortSilentError,
16
16
  CancelExecution,
@@ -24,10 +24,10 @@ import {
24
24
  printEventsJson,
25
25
  require_stacktracey,
26
26
  shouldReportError
27
- } from "./chunk-6TPBPH6V.js";
27
+ } from "./chunk-KYAUWGQO.js";
28
28
  import {
29
29
  bugsnagApiKey
30
- } from "./chunk-NO7MYZEO.js";
30
+ } from "./chunk-UMWKJFTM.js";
31
31
  import {
32
32
  require_lib
33
33
  } from "./chunk-GEN4RXTD.js";
@@ -37,7 +37,7 @@ import {
37
37
  joinPath,
38
38
  normalizePath,
39
39
  relativePath
40
- } from "./chunk-B7RN7IRD.js";
40
+ } from "./chunk-QNY4RVJ6.js";
41
41
  import {
42
42
  __commonJS,
43
43
  __require,
@@ -3180,4 +3180,4 @@ export {
3180
3180
  registerCleanBugsnagErrorsFromWithinPlugins,
3181
3181
  addBugsnagMetadata
3182
3182
  };
3183
- //# sourceMappingURL=chunk-PWYMBX34.js.map
3183
+ //# sourceMappingURL=chunk-AEPMFZLL.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  errorHandler,
3
3
  registerCleanBugsnagErrorsFromWithinPlugins
4
- } from "./chunk-PWYMBX34.js";
4
+ } from "./chunk-AEPMFZLL.js";
5
5
  import {
6
6
  hashString
7
- } from "./chunk-H66NIXGL.js";
7
+ } from "./chunk-CAFAFMYK.js";
8
8
  import {
9
9
  AbortError,
10
10
  addPublicMetadata,
@@ -20,13 +20,13 @@ import {
20
20
  renderWarning,
21
21
  terminalSupportsRawMode,
22
22
  underscore
23
- } from "./chunk-6TPBPH6V.js";
23
+ } from "./chunk-KYAUWGQO.js";
24
24
  import {
25
25
  require_lib
26
26
  } from "./chunk-GEN4RXTD.js";
27
27
  import {
28
28
  cwd
29
- } from "./chunk-B7RN7IRD.js";
29
+ } from "./chunk-QNY4RVJ6.js";
30
30
  import {
31
31
  __commonJS,
32
32
  __require,
@@ -2297,4 +2297,4 @@ export {
2297
2297
  encodeToml,
2298
2298
  base_command_default
2299
2299
  };
2300
- //# sourceMappingURL=chunk-5A6QTLMF.js.map
2300
+ //# sourceMappingURL=chunk-AGEDJDVG.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  platformAndArch
3
- } from "./chunk-W26344X5.js";
3
+ } from "./chunk-5ASKHNQG.js";
4
4
  import {
5
5
  getPackageManager,
6
6
  packageManagerFromUserAgent
7
- } from "./chunk-QCK4QLB3.js";
7
+ } from "./chunk-WEDQJLHL.js";
8
8
  import {
9
9
  addPublicMetadata,
10
10
  addSensitiveMetadata,
@@ -12,10 +12,10 @@ import {
12
12
  cloudEnvironment,
13
13
  currentProcessIsGlobal,
14
14
  macAddress
15
- } from "./chunk-6TPBPH6V.js";
15
+ } from "./chunk-KYAUWGQO.js";
16
16
  import {
17
17
  cwd
18
- } from "./chunk-B7RN7IRD.js";
18
+ } from "./chunk-QNY4RVJ6.js";
19
19
  import {
20
20
  init_cjs_shims
21
21
  } from "./chunk-ZPL24Y2D.js";
@@ -54,6 +54,10 @@ async function startAnalytics({ commandContent, args, currentTime = (/* @__PURE_
54
54
  if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsNameOverride")) {
55
55
  startCommand = commandClass.analyticsNameOverride() ?? commandContent.command;
56
56
  }
57
+ let pluginName = commandClass?.plugin?.name;
58
+ if (commandClass && "customPluginName" in commandClass) {
59
+ pluginName = commandClass.customPluginName;
60
+ }
57
61
  await addSensitiveMetadata(() => ({
58
62
  commandStartOptions: {
59
63
  startTime: currentTime,
@@ -65,7 +69,7 @@ async function startAnalytics({ commandContent, args, currentTime = (/* @__PURE_
65
69
  cmd_all_launcher: packageManagerFromUserAgent(),
66
70
  cmd_all_alias_used: commandContent.alias,
67
71
  cmd_all_topic: commandContent.topic,
68
- cmd_all_plugin: commandClass?.plugin?.name,
72
+ cmd_all_plugin: pluginName,
69
73
  cmd_all_force: flagIncluded("force", commandClass) ? args.includes("--force") : void 0
70
74
  }));
71
75
  }
@@ -116,4 +120,4 @@ export {
116
120
  getEnvironmentData,
117
121
  getSensitiveEnvironmentData
118
122
  };
119
- //# sourceMappingURL=chunk-H66NIXGL.js.map
123
+ //# sourceMappingURL=chunk-CAFAFMYK.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  searchService
3
- } from "./chunk-6LPAIJ4Y.js";
3
+ } from "./chunk-4JHXAPVK.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-5A6QTLMF.js";
6
+ } from "./chunk-AGEDJDVG.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-LP2H26NY.js.map
49
+ //# sourceMappingURL=chunk-CAITHPIX.js.map
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-DLK3F3DC.js";
4
4
  import {
5
5
  demoStepsSchema
6
- } from "./chunk-LVLKZYIC.js";
6
+ } from "./chunk-GNEXBICT.js";
7
7
  import {
8
8
  base_command_default
9
- } from "./chunk-5A6QTLMF.js";
9
+ } from "./chunk-AGEDJDVG.js";
10
10
  import {
11
11
  outputInfo,
12
12
  renderInfo
13
- } from "./chunk-6TPBPH6V.js";
13
+ } from "./chunk-KYAUWGQO.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-GUB3OCYR.js.map
62
+ //# sourceMappingURL=chunk-CYWZMOXQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-5A6QTLMF.js";
3
+ } from "./chunk-AGEDJDVG.js";
4
4
  import {
5
5
  require_lib
6
6
  } from "./chunk-GEN4RXTD.js";
@@ -45,4 +45,4 @@ var HelpCommand = class _HelpCommand extends base_command_default {
45
45
  export {
46
46
  HelpCommand
47
47
  };
48
- //# sourceMappingURL=chunk-X34BQYQP.js.map
48
+ //# sourceMappingURL=chunk-EIDHNONS.js.map
@@ -17,7 +17,7 @@ import {
17
17
  renderTextPrompt,
18
18
  renderWarning,
19
19
  sleep
20
- } from "./chunk-6TPBPH6V.js";
20
+ } from "./chunk-KYAUWGQO.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-LVLKZYIC.js.map
354
+ //# sourceMappingURL=chunk-GNEXBICT.js.map