@shopify/cli 3.75.3 → 3.76.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 (83) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +9 -0
  2. package/dist/assets/hydrogen/starter/package.json +3 -3
  3. package/dist/{chunk-YJQB4KNO.js → chunk-247SAMPG.js} +3 -3
  4. package/dist/{chunk-FNGSPBMI.js → chunk-2LCBNWGB.js} +11 -11
  5. package/dist/{chunk-BI6OG3SW.js → chunk-3HWN5QZP.js} +3 -3
  6. package/dist/{chunk-33Y36JTQ.js → chunk-7MKO46I5.js} +3 -3
  7. package/dist/{chunk-G4AWJOUT.js → chunk-AS4YOVZB.js} +3 -3
  8. package/dist/{chunk-PD5FJTJV.js → chunk-AW63CHBD.js} +3 -3
  9. package/dist/{chunk-MW2DSTSP.js → chunk-CUEBFCNF.js} +4 -4
  10. package/dist/{chunk-5R65XQBB.js → chunk-DSEDXHIL.js} +3 -3
  11. package/dist/{chunk-GXE74MLK.js → chunk-F5WG7YRC.js} +2 -2
  12. package/dist/{chunk-B5KBQUD7.js → chunk-FKVY6WNT.js} +4 -4
  13. package/dist/{chunk-WMN57UOI.js → chunk-FSL57OBM.js} +127 -87
  14. package/dist/{chunk-QODWZ6PQ.js → chunk-FVI46GAE.js} +3 -3
  15. package/dist/{chunk-EIDXBYRF.js → chunk-GDAGNYN6.js} +2 -2
  16. package/dist/{chunk-22VHHB6E.js → chunk-GSC3DSZN.js} +3 -2
  17. package/dist/{chunk-MAEFXTUW.js → chunk-IB2GR2NI.js} +4 -4
  18. package/dist/{chunk-3QMRSRBQ.js → chunk-IGXCBQCI.js} +2 -2
  19. package/dist/{chunk-LCLDLGWN.js → chunk-IV3Z7KW6.js} +5 -5
  20. package/dist/{chunk-IKLIMBXL.js → chunk-KRBTUAPG.js} +3 -3
  21. package/dist/{chunk-G4WKRFAA.js → chunk-LLYJXSNC.js} +3 -3
  22. package/dist/{chunk-QGVSI72K.js → chunk-LQLKKAEX.js} +3 -3
  23. package/dist/{chunk-A2VS5S6I.js → chunk-M7TO4P43.js} +2 -2
  24. package/dist/{chunk-5U5CBWN6.js → chunk-NGMTB27N.js} +36 -15
  25. package/dist/{chunk-YFC422QN.js → chunk-OAIHYIZM.js} +3 -3
  26. package/dist/{chunk-2NZ7C43W.js → chunk-OLVUPFMV.js} +6 -6
  27. package/dist/{chunk-USS26MJN.js → chunk-QFEXM6TL.js} +2 -2
  28. package/dist/{chunk-C33FHDOM.js → chunk-R3OLOJM7.js} +74 -11
  29. package/dist/{chunk-VJRNACS6.js → chunk-SPTKJZLQ.js} +3 -3
  30. package/dist/{chunk-K4H4V3DT.js → chunk-VCFDSABQ.js} +6 -6
  31. package/dist/{chunk-OV2HTJBT.js → chunk-WF3LQ6VY.js} +3 -3
  32. package/dist/{chunk-KD3XBFOR.js → chunk-WJRSLVVW.js} +2 -2
  33. package/dist/{chunk-LZMNVVKL.js → chunk-WRB46MIH.js} +10 -9
  34. package/dist/{chunk-RR6KDBGU.js → chunk-WXEVFXY4.js} +93 -163
  35. package/dist/{chunk-KTZUTNES.js → chunk-Y5V7ZNMS.js} +3 -3
  36. package/dist/{chunk-JTBKPH2T.js → chunk-YJUMZEX7.js} +2 -2
  37. package/dist/{chunk-WZLRLCYA.js → chunk-YWGDPGEE.js} +7 -6
  38. package/dist/cli/commands/auth/logout.js +11 -12
  39. package/dist/cli/commands/auth/logout.test.js +12 -13
  40. package/dist/cli/commands/cache/clear.js +10 -11
  41. package/dist/cli/commands/debug/command-flags.js +10 -11
  42. package/dist/cli/commands/docs/generate.js +10 -11
  43. package/dist/cli/commands/docs/generate.test.js +10 -11
  44. package/dist/cli/commands/help.js +10 -11
  45. package/dist/cli/commands/kitchen-sink/async.js +11 -12
  46. package/dist/cli/commands/kitchen-sink/async.test.js +11 -12
  47. package/dist/cli/commands/kitchen-sink/index.js +13 -14
  48. package/dist/cli/commands/kitchen-sink/index.test.js +13 -14
  49. package/dist/cli/commands/kitchen-sink/prompts.js +11 -12
  50. package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -12
  51. package/dist/cli/commands/kitchen-sink/static.js +11 -12
  52. package/dist/cli/commands/kitchen-sink/static.test.js +11 -12
  53. package/dist/cli/commands/notifications/generate.js +11 -12
  54. package/dist/cli/commands/notifications/list.js +11 -12
  55. package/dist/cli/commands/search.js +11 -12
  56. package/dist/cli/commands/upgrade.js +11 -12
  57. package/dist/cli/commands/version.js +11 -12
  58. package/dist/cli/commands/version.test.js +11 -12
  59. package/dist/cli/services/commands/notifications.js +6 -6
  60. package/dist/cli/services/commands/search.js +2 -2
  61. package/dist/cli/services/commands/search.test.js +2 -2
  62. package/dist/cli/services/commands/version.js +3 -3
  63. package/dist/cli/services/commands/version.test.js +4 -4
  64. package/dist/cli/services/kitchen-sink/async.js +2 -2
  65. package/dist/cli/services/kitchen-sink/prompts.js +2 -2
  66. package/dist/cli/services/kitchen-sink/static.js +2 -2
  67. package/dist/cli/services/upgrade.js +3 -3
  68. package/dist/cli/services/upgrade.test.js +5 -7
  69. package/dist/{custom-oclif-loader-T46YXHAL.js → custom-oclif-loader-K3EL2OAR.js} +2 -2
  70. package/dist/{error-handler-CQQM6XL7.js → error-handler-BADTRHFV.js} +8 -9
  71. package/dist/hooks/postrun.js +8 -8
  72. package/dist/hooks/prerun.js +10 -8
  73. package/dist/index.js +7314 -6967
  74. package/dist/{local-UIVNM7TY.js → local-OPE3NHTK.js} +2 -2
  75. package/dist/{morph-K3QSNZNW.js → morph-WRZ7XCTF.js} +9 -9
  76. package/dist/{node-Y5CCPBME.js → node-KXPRSMZI.js} +14 -15
  77. package/dist/{node-package-manager-LYGJUDK2.js → node-package-manager-I364XLRB.js} +3 -3
  78. package/dist/tsconfig.tsbuildinfo +1 -1
  79. package/dist/{ui-6CY7AHOT.js → ui-OLBMRQ45.js} +2 -2
  80. package/dist/{workerd-S3A3XU2A.js → workerd-U7MSRKWK.js} +13 -14
  81. package/oclif.manifest.json +46 -22
  82. package/package.json +7 -7
  83. package/dist/chunk-CM7HYAXG.js +0 -63
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  errorHandler,
3
3
  registerCleanBugsnagErrorsFromWithinPlugins
4
- } from "./chunk-K4H4V3DT.js";
4
+ } from "./chunk-VCFDSABQ.js";
5
5
  import {
6
6
  setCurrentCommandId,
7
7
  showNotificationsIfNeeded
8
- } from "./chunk-5U5CBWN6.js";
8
+ } from "./chunk-NGMTB27N.js";
9
9
  import {
10
10
  AbortError,
11
11
  addPublicMetadata,
@@ -22,7 +22,7 @@ import {
22
22
  renderWarning,
23
23
  terminalSupportsPrompting,
24
24
  underscore
25
- } from "./chunk-C33FHDOM.js";
25
+ } from "./chunk-R3OLOJM7.js";
26
26
  import {
27
27
  cwd
28
28
  } from "./chunk-57Q6OQG4.js";
@@ -1552,7 +1552,7 @@ var import_core = __toESM(require_lib()), BaseCommand = class extends import_cor
1552
1552
  }
1553
1553
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1554
1554
  async init() {
1555
- return this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id || ""), isDevelopment() || await registerCleanBugsnagErrorsFromWithinPlugins(this.config), this.showNpmFlagWarning(), await showNotificationsIfNeeded(), super.init();
1555
+ return this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id ?? ""), isDevelopment() || await registerCleanBugsnagErrorsFromWithinPlugins(this.config), this.showNpmFlagWarning(), await showNotificationsIfNeeded(), super.init();
1556
1556
  }
1557
1557
  // NPM creates an environment variable for every flag passed to a script.
1558
1558
  // This function checks for the presence of any of the available CLI flags
@@ -1594,17 +1594,17 @@ This flag is required in non-interactive terminal environments, such as a CI env
1594
1594
  }
1595
1595
  async resultWithEnvironment(originalResult, options, argv) {
1596
1596
  let flags = originalResult.flags, environmentsFileName = this.environmentsFilename();
1597
- if (!flags.environment || !environmentsFileName)
1597
+ if (!flags.environment?.length || !environmentsFileName || flags.environment.length > 1)
1598
1598
  return originalResult;
1599
- let environment = await loadEnvironment(flags.environment, environmentsFileName, { from: flags.path });
1599
+ let environment = await loadEnvironment(flags.environment[0], environmentsFileName, { from: flags.path });
1600
1600
  if (!environment)
1601
1601
  return originalResult;
1602
1602
  let noDefaultsResult = await super.parse(noDefaultsOptions(options), argv), result = await super.parse(options, [
1603
1603
  // Need to specify argv default because we're merging with argsFromEnvironment.
1604
- ...argv || this.argv,
1604
+ ...argv ?? this.argv,
1605
1605
  ...argsFromEnvironment(environment, options, noDefaultsResult)
1606
1606
  ]);
1607
- return reportEnvironmentApplication(noDefaultsResult.flags, result.flags, flags.environment, environment), result;
1607
+ return reportEnvironmentApplication(noDefaultsResult.flags, result.flags, flags.environment[0], environment), result;
1608
1608
  }
1609
1609
  };
1610
1610
  BaseCommand.baseFlags = {};
@@ -1660,6 +1660,7 @@ var base_command_default = BaseCommand;
1660
1660
  export {
1661
1661
  decodeToml,
1662
1662
  encodeToml,
1663
+ loadEnvironment,
1663
1664
  base_command_default
1664
1665
  };
1665
- //# sourceMappingURL=chunk-LZMNVVKL.js.map
1666
+ //# sourceMappingURL=chunk-WRB46MIH.js.map
@@ -1,20 +1,15 @@
1
- import {
2
- platformAndArch
3
- } from "./chunk-CM7HYAXG.js";
4
1
  import {
5
2
  allAPIs,
6
- buildHeaders,
7
3
  shopifyFetch,
8
4
  z
9
- } from "./chunk-B5KBQUD7.js";
5
+ } from "./chunk-FKVY6WNT.js";
10
6
  import {
11
- cacheRetrieveOrRepopulate,
12
7
  getPackageManager,
13
8
  getSession,
14
9
  packageManagerFromUserAgent,
15
10
  removeSession,
16
11
  setSession
17
- } from "./chunk-22VHHB6E.js";
12
+ } from "./chunk-GSC3DSZN.js";
18
13
  import {
19
14
  AbortError,
20
15
  BugError,
@@ -44,12 +39,12 @@ import {
44
39
  outputDebug,
45
40
  outputInfo,
46
41
  outputToken,
42
+ platformAndArch,
47
43
  serviceEnvironment,
48
44
  sessionConstants,
49
45
  spinFqdn,
50
- themeKitAccessDomain,
51
46
  themeToken
52
- } from "./chunk-C33FHDOM.js";
47
+ } from "./chunk-R3OLOJM7.js";
53
48
  import {
54
49
  cwd
55
50
  } from "./chunk-57Q6OQG4.js";
@@ -180,7 +175,90 @@ function validateCachedIdentityTokenStructure(identityToken) {
180
175
  return IdentityTokenSchema.safeParse(identityToken).success;
181
176
  }
182
177
 
183
- // ../cli-kit/dist/private/node/session/identity-token-validation.js
178
+ // ../cli-kit/dist/private/node/session/validate.js
179
+ function validateScopes(requestedScopes, identity) {
180
+ let currentScopes = identity.scopes;
181
+ return firstPartyDev() !== currentScopes.includes("employee") ? !1 : requestedScopes.every((scope) => currentScopes.includes(scope));
182
+ }
183
+ async function validateSession(scopes, applications, session) {
184
+ if (!session || !validateScopes(scopes, session.identity))
185
+ return "needs_full_auth";
186
+ let tokensAreExpired = isTokenExpired(session.identity);
187
+ if (applications.partnersApi) {
188
+ let appId = applicationId("partners"), token = session.applications[appId];
189
+ tokensAreExpired = tokensAreExpired || isTokenExpired(token);
190
+ }
191
+ if (applications.appManagementApi) {
192
+ let appId = applicationId("app-management"), token = session.applications[appId];
193
+ tokensAreExpired = tokensAreExpired || isTokenExpired(token);
194
+ }
195
+ if (applications.storefrontRendererApi) {
196
+ let appId = applicationId("storefront-renderer"), token = session.applications[appId];
197
+ tokensAreExpired = tokensAreExpired || isTokenExpired(token);
198
+ }
199
+ if (applications.adminApi) {
200
+ let appId = applicationId("admin"), realAppId = `${applications.adminApi.storeFqdn}-${appId}`, token = session.applications[realAppId];
201
+ tokensAreExpired = tokensAreExpired || isTokenExpired(token);
202
+ }
203
+ return outputDebug(`- Token validation -> It's expired: ${tokensAreExpired}`), validateCachedIdentityTokenStructure(session.identity) ? tokensAreExpired ? "needs_refresh" : "ok" : "needs_full_auth";
204
+ }
205
+ function isTokenExpired(token) {
206
+ return token ? token.expiresAt < expireThreshold() : !0;
207
+ }
208
+ function expireThreshold() {
209
+ return new Date(Date.now() + sessionConstants.expirationTimeMarginInMinutes * 60 * 1e3);
210
+ }
211
+
212
+ // ../cli-kit/dist/private/node/session/scopes.js
213
+ init_cjs_shims();
214
+ function allDefaultScopes(extraScopes = []) {
215
+ let scopes = allAPIs.map((api) => defaultApiScopes(api)).flat();
216
+ return scopes = ["openid", ...scopes, ...extraScopes].map(scopeTransform), Array.from(new Set(scopes));
217
+ }
218
+ function apiScopes(api, extraScopes = []) {
219
+ let scopes = [...defaultApiScopes(api), ...extraScopes.map(scopeTransform)].map(scopeTransform);
220
+ return Array.from(new Set(scopes));
221
+ }
222
+ function defaultApiScopes(api) {
223
+ switch (api) {
224
+ case "admin":
225
+ return ["graphql", "themes", "collaborator"];
226
+ case "storefront-renderer":
227
+ return ["devtools"];
228
+ case "partners":
229
+ return ["cli"];
230
+ case "business-platform":
231
+ return ["destinations", "store-management"];
232
+ case "app-management":
233
+ return ["app-management"];
234
+ default:
235
+ throw new BugError(`Unknown API: ${api}`);
236
+ }
237
+ }
238
+ function scopeTransform(scope) {
239
+ switch (scope) {
240
+ case "graphql":
241
+ return "https://api.shopify.com/auth/shop.admin.graphql";
242
+ case "themes":
243
+ return "https://api.shopify.com/auth/shop.admin.themes";
244
+ case "collaborator":
245
+ return "https://api.shopify.com/auth/partners.collaborator-relationships.readonly";
246
+ case "cli":
247
+ return "https://api.shopify.com/auth/partners.app.cli.access";
248
+ case "devtools":
249
+ return "https://api.shopify.com/auth/shop.storefront-renderer.devtools";
250
+ case "destinations":
251
+ return "https://api.shopify.com/auth/destinations.readonly";
252
+ case "store-management":
253
+ return "https://api.shopify.com/auth/organization.store-management";
254
+ case "app-management":
255
+ return "https://api.shopify.com/auth/organization.apps.manage";
256
+ default:
257
+ return scope;
258
+ }
259
+ }
260
+
261
+ // ../cli-kit/dist/private/node/session/exchange.js
184
262
  init_cjs_shims();
185
263
 
186
264
  // ../cli-kit/dist/public/node/context/fqdn.js
@@ -505,139 +583,6 @@ var ok = (value) => new Ok(value), err = (err2) => new Err(err2), Ok = class {
505
583
  }
506
584
  };
507
585
 
508
- // ../cli-kit/dist/private/node/session/identity-token-validation.js
509
- async function validateIdentityToken(token) {
510
- if (isSpin() && firstPartyDev())
511
- return !0;
512
- try {
513
- return withIntrospectionURL(async (introspectionURL) => {
514
- let options = {
515
- method: "POST",
516
- headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
517
- body: JSON.stringify({ token })
518
- };
519
- outputDebug(`Sending Identity Introspection request to URL: ${introspectionURL}`);
520
- let response = await shopifyFetch(introspectionURL, options);
521
- if (response.ok && response.headers.get("content-type")?.includes("json")) {
522
- let json = await response.json();
523
- return outputDebug(`The identity token is valid: ${json.valid}`), ok(json.valid);
524
- } else {
525
- if (response.status === 404 || response.status > 500)
526
- return err(new AbortError(`The introspection endpoint returned a ${response.status}: ${introspectionURL}`));
527
- {
528
- let text = await response.text();
529
- return outputDebug(`The Introspection request failed with:
530
- - status: ${response.status}
531
- - www-authenticate header: ${JSON.stringify(response.headers.get("www-authenticate"))}
532
- - body: ${JSON.stringify(text)}`), ok(!1);
533
- }
534
- }
535
- });
536
- } catch (error) {
537
- return outputDebug(`The identity token is invalid: ${error}`), !1;
538
- }
539
- }
540
- async function withIntrospectionURL(fn) {
541
- let cacheKey = `identity-introspection-url-${await identityFqdn()}`, introspectionURL = await cacheRetrieveOrRepopulate(cacheKey, getIntrospectionURL, 6048e5), result = await fn(introspectionURL);
542
- if (result.isErr() && (introspectionURL = await cacheRetrieveOrRepopulate(cacheKey, getIntrospectionURL, 0), result = await fn(introspectionURL)), result.isErr())
543
- throw result.error;
544
- return result.value;
545
- }
546
- async function getIntrospectionURL() {
547
- return (await (await shopifyFetch(`https://${await identityFqdn()}/.well-known/openid-configuration.json`)).json()).introspection_endpoint;
548
- }
549
-
550
- // ../cli-kit/dist/private/node/session/validate.js
551
- function validateScopes(requestedScopes, identity) {
552
- let currentScopes = identity.scopes;
553
- return firstPartyDev() !== currentScopes.includes("employee") ? !1 : requestedScopes.every((scope) => currentScopes.includes(scope));
554
- }
555
- async function validateSession(scopes, applications, session) {
556
- if (!session || !validateScopes(scopes, session.identity))
557
- return "needs_full_auth";
558
- let tokensAreExpired = isTokenExpired(session.identity);
559
- if (applications.partnersApi) {
560
- let appId = applicationId("partners"), token = session.applications[appId];
561
- tokensAreExpired = tokensAreExpired || isTokenExpired(token);
562
- }
563
- if (applications.appManagementApi) {
564
- let appId = applicationId("app-management"), token = session.applications[appId];
565
- tokensAreExpired = tokensAreExpired || isTokenExpired(token);
566
- }
567
- if (applications.storefrontRendererApi) {
568
- let appId = applicationId("storefront-renderer"), token = session.applications[appId];
569
- tokensAreExpired = tokensAreExpired || isTokenExpired(token);
570
- }
571
- if (applications.adminApi) {
572
- let appId = applicationId("admin"), realAppId = `${applications.adminApi.storeFqdn}-${appId}`, token = session.applications[realAppId];
573
- tokensAreExpired = tokensAreExpired || isTokenExpired(token);
574
- }
575
- if (outputDebug(`- Token validation -> It's expired: ${tokensAreExpired}`), !validateCachedIdentityTokenStructure(session.identity))
576
- return "needs_full_auth";
577
- if (tokensAreExpired)
578
- return "needs_refresh";
579
- let identityIsValid = await validateIdentityToken(session.identity.accessToken);
580
- return outputDebug(`- Token validation -> It's invalid in identity: ${!identityIsValid}`), identityIsValid ? "ok" : "needs_full_auth";
581
- }
582
- function isTokenExpired(token) {
583
- return token ? token.expiresAt < expireThreshold() : !0;
584
- }
585
- function expireThreshold() {
586
- return new Date(Date.now() + sessionConstants.expirationTimeMarginInMinutes * 60 * 1e3);
587
- }
588
-
589
- // ../cli-kit/dist/private/node/session/scopes.js
590
- init_cjs_shims();
591
- function allDefaultScopes(extraScopes = []) {
592
- let scopes = allAPIs.map((api) => defaultApiScopes(api)).flat();
593
- return scopes = ["openid", ...scopes, ...extraScopes].map(scopeTransform), Array.from(new Set(scopes));
594
- }
595
- function apiScopes(api, extraScopes = []) {
596
- let scopes = [...defaultApiScopes(api), ...extraScopes.map(scopeTransform)].map(scopeTransform);
597
- return Array.from(new Set(scopes));
598
- }
599
- function defaultApiScopes(api) {
600
- switch (api) {
601
- case "admin":
602
- return ["graphql", "themes", "collaborator"];
603
- case "storefront-renderer":
604
- return ["devtools"];
605
- case "partners":
606
- return ["cli"];
607
- case "business-platform":
608
- return ["destinations", "store-management"];
609
- case "app-management":
610
- return ["app-management"];
611
- default:
612
- throw new BugError(`Unknown API: ${api}`);
613
- }
614
- }
615
- function scopeTransform(scope) {
616
- switch (scope) {
617
- case "graphql":
618
- return "https://api.shopify.com/auth/shop.admin.graphql";
619
- case "themes":
620
- return "https://api.shopify.com/auth/shop.admin.themes";
621
- case "collaborator":
622
- return "https://api.shopify.com/auth/partners.collaborator-relationships.readonly";
623
- case "cli":
624
- return "https://api.shopify.com/auth/partners.app.cli.access";
625
- case "devtools":
626
- return "https://api.shopify.com/auth/shop.storefront-renderer.devtools";
627
- case "destinations":
628
- return "https://api.shopify.com/auth/destinations.readonly";
629
- case "store-management":
630
- return "https://api.shopify.com/auth/organization.store-management";
631
- case "app-management":
632
- return "https://api.shopify.com/auth/organization.apps.manage";
633
- default:
634
- return scope;
635
- }
636
- }
637
-
638
- // ../cli-kit/dist/private/node/session/exchange.js
639
- init_cjs_shims();
640
-
641
586
  // ../../node_modules/.pnpm/jose@5.9.6/node_modules/jose/dist/node/esm/index.js
642
587
  init_cjs_shims();
643
588
 
@@ -851,8 +796,10 @@ async function requestDeviceAuthorization(scopes) {
851
796
  To run this command, log in to Shopify.`), !isTTY())
852
797
  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.");
853
798
  outputInfo(outputContent`User verification code: ${jsonResult.user_code}`);
854
- let linkToken = outputToken.link(jsonResult.verification_uri_complete);
855
- return isCloudEnvironment() ? outputInfo(outputContent`👉 Open this link to start the auth process: ${linkToken}`) : (outputInfo("\u{1F449} Press any key to open the login page on your browser"), await keypress(), await openURL(jsonResult.verification_uri_complete), outputInfo(outputContent`Opened link to start the auth process: ${linkToken}`)), {
799
+ let linkToken = outputToken.link(jsonResult.verification_uri_complete), cloudMessage = () => {
800
+ outputInfo(outputContent`👉 Open this link to start the auth process: ${linkToken}`);
801
+ };
802
+ return isCloudEnvironment() ? cloudMessage() : (outputInfo("\u{1F449} Press any key to open the login page on your browser"), await keypress(), await openURL(jsonResult.verification_uri_complete) ? outputInfo(outputContent`Opened link to start the auth process: ${linkToken}`) : cloudMessage()), {
856
803
  deviceCode: jsonResult.device_code,
857
804
  userCode: jsonResult.user_code,
858
805
  verificationUri: jsonResult.verification_uri,
@@ -899,20 +846,6 @@ function convertRequestToParams(queryParams) {
899
846
 
900
847
  // ../cli-kit/dist/private/node/api/rest.js
901
848
  init_cjs_shims();
902
- function restRequestBody(requestBody) {
903
- if (requestBody)
904
- return JSON.stringify(requestBody);
905
- }
906
- function restRequestUrl(session, apiVersion, path, searchParams = {}) {
907
- let url = new URL(isThemeAccessSession(session) ? `https://${themeKitAccessDomain}/cli/admin/api/${apiVersion}${path}.json` : `https://${session.storeFqdn}/admin/api/${apiVersion}${path}.json`);
908
- return Object.entries(searchParams).forEach(([name, value]) => {
909
- url.searchParams.set(name, value);
910
- }), url.toString();
911
- }
912
- function restRequestHeaders(session) {
913
- let store2 = session.storeFqdn, token = session.token, headers = buildHeaders(session.token);
914
- return isThemeAccessSession(session) && (headers["X-Shopify-Shop"] = store2, headers["X-Shopify-Access-Token"] = token), headers;
915
- }
916
849
  function isThemeAccessSession(session) {
917
850
  return session.token.startsWith("shptka_");
918
851
  }
@@ -1123,9 +1056,6 @@ export {
1123
1056
  err,
1124
1057
  exchangeCustomPartnerToken,
1125
1058
  remove,
1126
- restRequestBody,
1127
- restRequestUrl,
1128
- restRequestHeaders,
1129
1059
  isThemeAccessSession,
1130
1060
  getLastSeenUserIdAfterAuth,
1131
1061
  setLastSeenUserIdAfterAuth,
@@ -1135,4 +1065,4 @@ export {
1135
1065
  getEnvironmentData,
1136
1066
  getSensitiveEnvironmentData
1137
1067
  };
1138
- //# sourceMappingURL=chunk-RR6KDBGU.js.map
1068
+ //# sourceMappingURL=chunk-WXEVFXY4.js.map
@@ -4,7 +4,7 @@ import {
4
4
  findUpAndReadPackageJson,
5
5
  getPackageManager,
6
6
  usesWorkspaces
7
- } from "./chunk-22VHHB6E.js";
7
+ } from "./chunk-GSC3DSZN.js";
8
8
  import {
9
9
  AbortError,
10
10
  exec,
@@ -15,7 +15,7 @@ import {
15
15
  outputSuccess,
16
16
  outputToken,
17
17
  outputWarn
18
- } from "./chunk-C33FHDOM.js";
18
+ } from "./chunk-R3OLOJM7.js";
19
19
  import {
20
20
  dirname,
21
21
  joinPath,
@@ -139,4 +139,4 @@ function usingPackageManager({ env } = { env: process.env }) {
139
139
  export {
140
140
  upgrade
141
141
  };
142
- //# sourceMappingURL=chunk-KTZUTNES.js.map
142
+ //# sourceMappingURL=chunk-Y5V7ZNMS.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearCollectedLogs,
3
3
  collectedLogs
4
- } from "./chunk-C33FHDOM.js";
4
+ } from "./chunk-R3OLOJM7.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-JTBKPH2T.js.map
36
+ //# sourceMappingURL=chunk-YJUMZEX7.js.map
@@ -1,10 +1,11 @@
1
1
  import {
2
+ fetchNotifications,
2
3
  getNotifications,
3
4
  stringifyFilters
4
- } from "./chunk-5U5CBWN6.js";
5
+ } from "./chunk-NGMTB27N.js";
5
6
  import {
6
7
  CLI_KIT_VERSION
7
- } from "./chunk-GXE74MLK.js";
8
+ } from "./chunk-F5WG7YRC.js";
8
9
  import {
9
10
  outputInfo,
10
11
  randomUUID,
@@ -13,7 +14,7 @@ import {
13
14
  renderTable,
14
15
  renderTextPrompt,
15
16
  writeFile
16
- } from "./chunk-C33FHDOM.js";
17
+ } from "./chunk-R3OLOJM7.js";
17
18
  import {
18
19
  init_cjs_shims
19
20
  } from "./chunk-PKR7KJ6P.js";
@@ -81,14 +82,14 @@ async function generate() {
81
82
  notifications.notifications.push(notification), await writeFile("./notifications.json", JSON.stringify(notifications)), renderSuccess({ headline: "notifications.json file updated successfully." });
82
83
  }
83
84
  async function list() {
84
- let notifications = await getNotifications(), columns = {
85
+ let notifications = await fetchNotifications(), columns = {
85
86
  type: { header: "Type", color: "dim" },
86
87
  title: { header: "Title", color: "dim" },
87
88
  message: { header: "Message", color: "dim" },
88
89
  filters: { header: "Filters", color: "dim" }
89
90
  }, rows = notifications.notifications.map((notification) => ({
90
91
  type: notification.type,
91
- title: notification.title || "",
92
+ title: notification.title ?? "",
92
93
  message: notification.message,
93
94
  filters: stringifyFilters(notification)
94
95
  }));
@@ -100,4 +101,4 @@ export {
100
101
  generate,
101
102
  list
102
103
  };
103
- //# sourceMappingURL=chunk-WZLRLCYA.js.map
104
+ //# sourceMappingURL=chunk-YWGDPGEE.js.map
@@ -1,20 +1,19 @@
1
1
  import {
2
2
  Logout
3
- } from "../../../chunk-MW2DSTSP.js";
4
- import "../../../chunk-YJQB4KNO.js";
5
- import "../../../chunk-LZMNVVKL.js";
6
- import "../../../chunk-K4H4V3DT.js";
3
+ } from "../../../chunk-CUEBFCNF.js";
4
+ import "../../../chunk-247SAMPG.js";
5
+ import "../../../chunk-WRB46MIH.js";
6
+ import "../../../chunk-VCFDSABQ.js";
7
7
  import "../../../chunk-SHWOPMLQ.js";
8
- import "../../../chunk-2NZ7C43W.js";
9
- import "../../../chunk-RR6KDBGU.js";
10
- import "../../../chunk-CM7HYAXG.js";
11
- import "../../../chunk-5U5CBWN6.js";
12
- import "../../../chunk-B5KBQUD7.js";
8
+ import "../../../chunk-OLVUPFMV.js";
9
+ import "../../../chunk-WXEVFXY4.js";
10
+ import "../../../chunk-NGMTB27N.js";
11
+ import "../../../chunk-FKVY6WNT.js";
13
12
  import "../../../chunk-25IMI7TH.js";
14
- import "../../../chunk-GXE74MLK.js";
15
- import "../../../chunk-22VHHB6E.js";
13
+ import "../../../chunk-F5WG7YRC.js";
14
+ import "../../../chunk-GSC3DSZN.js";
16
15
  import "../../../chunk-HMDWNGIV.js";
17
- import "../../../chunk-C33FHDOM.js";
16
+ import "../../../chunk-R3OLOJM7.js";
18
17
  import "../../../chunk-B5EXYCV3.js";
19
18
  import "../../../chunk-75LV6AQS.js";
20
19
  import "../../../chunk-57Q6OQG4.js";
@@ -1,31 +1,30 @@
1
1
  import {
2
2
  mockAndCaptureOutput
3
- } from "../../../chunk-JTBKPH2T.js";
3
+ } from "../../../chunk-YJUMZEX7.js";
4
4
  import {
5
5
  Logout
6
- } from "../../../chunk-MW2DSTSP.js";
6
+ } from "../../../chunk-CUEBFCNF.js";
7
7
  import {
8
8
  logout
9
- } from "../../../chunk-YJQB4KNO.js";
9
+ } from "../../../chunk-247SAMPG.js";
10
10
  import {
11
11
  describe,
12
12
  globalExpect,
13
13
  test,
14
14
  vi
15
15
  } from "../../../chunk-Y53XECL6.js";
16
- import "../../../chunk-LZMNVVKL.js";
17
- import "../../../chunk-K4H4V3DT.js";
16
+ import "../../../chunk-WRB46MIH.js";
17
+ import "../../../chunk-VCFDSABQ.js";
18
18
  import "../../../chunk-SHWOPMLQ.js";
19
- import "../../../chunk-2NZ7C43W.js";
20
- import "../../../chunk-RR6KDBGU.js";
21
- import "../../../chunk-CM7HYAXG.js";
22
- import "../../../chunk-5U5CBWN6.js";
23
- import "../../../chunk-B5KBQUD7.js";
19
+ import "../../../chunk-OLVUPFMV.js";
20
+ import "../../../chunk-WXEVFXY4.js";
21
+ import "../../../chunk-NGMTB27N.js";
22
+ import "../../../chunk-FKVY6WNT.js";
24
23
  import "../../../chunk-25IMI7TH.js";
25
- import "../../../chunk-GXE74MLK.js";
26
- import "../../../chunk-22VHHB6E.js";
24
+ import "../../../chunk-F5WG7YRC.js";
25
+ import "../../../chunk-GSC3DSZN.js";
27
26
  import "../../../chunk-HMDWNGIV.js";
28
- import "../../../chunk-C33FHDOM.js";
27
+ import "../../../chunk-R3OLOJM7.js";
29
28
  import "../../../chunk-B5EXYCV3.js";
30
29
  import "../../../chunk-75LV6AQS.js";
31
30
  import "../../../chunk-57Q6OQG4.js";
@@ -1,19 +1,18 @@
1
1
  import {
2
2
  ClearCache
3
- } from "../../../chunk-FNGSPBMI.js";
4
- import "../../../chunk-LZMNVVKL.js";
5
- import "../../../chunk-K4H4V3DT.js";
3
+ } from "../../../chunk-2LCBNWGB.js";
4
+ import "../../../chunk-WRB46MIH.js";
5
+ import "../../../chunk-VCFDSABQ.js";
6
6
  import "../../../chunk-SHWOPMLQ.js";
7
- import "../../../chunk-2NZ7C43W.js";
8
- import "../../../chunk-RR6KDBGU.js";
9
- import "../../../chunk-CM7HYAXG.js";
10
- import "../../../chunk-5U5CBWN6.js";
11
- import "../../../chunk-B5KBQUD7.js";
7
+ import "../../../chunk-OLVUPFMV.js";
8
+ import "../../../chunk-WXEVFXY4.js";
9
+ import "../../../chunk-NGMTB27N.js";
10
+ import "../../../chunk-FKVY6WNT.js";
12
11
  import "../../../chunk-25IMI7TH.js";
13
- import "../../../chunk-GXE74MLK.js";
14
- import "../../../chunk-22VHHB6E.js";
12
+ import "../../../chunk-F5WG7YRC.js";
13
+ import "../../../chunk-GSC3DSZN.js";
15
14
  import "../../../chunk-HMDWNGIV.js";
16
- import "../../../chunk-C33FHDOM.js";
15
+ import "../../../chunk-R3OLOJM7.js";
17
16
  import "../../../chunk-B5EXYCV3.js";
18
17
  import "../../../chunk-75LV6AQS.js";
19
18
  import "../../../chunk-57Q6OQG4.js";
@@ -1,19 +1,18 @@
1
1
  import {
2
2
  CommandFlags
3
- } from "../../../chunk-33Y36JTQ.js";
4
- import "../../../chunk-LZMNVVKL.js";
5
- import "../../../chunk-K4H4V3DT.js";
3
+ } from "../../../chunk-7MKO46I5.js";
4
+ import "../../../chunk-WRB46MIH.js";
5
+ import "../../../chunk-VCFDSABQ.js";
6
6
  import "../../../chunk-SHWOPMLQ.js";
7
- import "../../../chunk-2NZ7C43W.js";
8
- import "../../../chunk-RR6KDBGU.js";
9
- import "../../../chunk-CM7HYAXG.js";
10
- import "../../../chunk-5U5CBWN6.js";
11
- import "../../../chunk-B5KBQUD7.js";
7
+ import "../../../chunk-OLVUPFMV.js";
8
+ import "../../../chunk-WXEVFXY4.js";
9
+ import "../../../chunk-NGMTB27N.js";
10
+ import "../../../chunk-FKVY6WNT.js";
12
11
  import "../../../chunk-25IMI7TH.js";
13
- import "../../../chunk-GXE74MLK.js";
14
- import "../../../chunk-22VHHB6E.js";
12
+ import "../../../chunk-F5WG7YRC.js";
13
+ import "../../../chunk-GSC3DSZN.js";
15
14
  import "../../../chunk-HMDWNGIV.js";
16
- import "../../../chunk-C33FHDOM.js";
15
+ import "../../../chunk-R3OLOJM7.js";
17
16
  import "../../../chunk-B5EXYCV3.js";
18
17
  import "../../../chunk-75LV6AQS.js";
19
18
  import "../../../chunk-57Q6OQG4.js";
@@ -4,20 +4,19 @@ import {
4
4
  writeCommandDocumentation,
5
5
  writeCommandFlagInterface,
6
6
  writeCommandUsageExampleFile
7
- } from "../../../chunk-YFC422QN.js";
8
- import "../../../chunk-LZMNVVKL.js";
9
- import "../../../chunk-K4H4V3DT.js";
7
+ } from "../../../chunk-OAIHYIZM.js";
8
+ import "../../../chunk-WRB46MIH.js";
9
+ import "../../../chunk-VCFDSABQ.js";
10
10
  import "../../../chunk-SHWOPMLQ.js";
11
- import "../../../chunk-2NZ7C43W.js";
12
- import "../../../chunk-RR6KDBGU.js";
13
- import "../../../chunk-CM7HYAXG.js";
14
- import "../../../chunk-5U5CBWN6.js";
15
- import "../../../chunk-B5KBQUD7.js";
11
+ import "../../../chunk-OLVUPFMV.js";
12
+ import "../../../chunk-WXEVFXY4.js";
13
+ import "../../../chunk-NGMTB27N.js";
14
+ import "../../../chunk-FKVY6WNT.js";
16
15
  import "../../../chunk-25IMI7TH.js";
17
- import "../../../chunk-GXE74MLK.js";
18
- import "../../../chunk-22VHHB6E.js";
16
+ import "../../../chunk-F5WG7YRC.js";
17
+ import "../../../chunk-GSC3DSZN.js";
19
18
  import "../../../chunk-HMDWNGIV.js";
20
- import "../../../chunk-C33FHDOM.js";
19
+ import "../../../chunk-R3OLOJM7.js";
21
20
  import "../../../chunk-B5EXYCV3.js";
22
21
  import "../../../chunk-75LV6AQS.js";
23
22
  import "../../../chunk-57Q6OQG4.js";