@shopify/cli 3.84.1 → 3.85.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 (105) hide show
  1. package/README.md +1 -1
  2. package/dist/{chokidar-KCZH6DIC.js → chokidar-TTCYG5AA.js} +5 -5
  3. package/dist/{chokidar-XPSJ2FUJ.js → chokidar-XUA2BN3J.js} +5 -5
  4. package/dist/{chunk-TW3OHW6H.js → chunk-2IA24ROR.js} +10 -9
  5. package/dist/{chunk-R3FZ7BFA.js → chunk-2IEQZDJI.js} +3 -3
  6. package/dist/{chunk-77NCO4UD.js → chunk-47CMAYQE.js} +3 -3
  7. package/dist/{chunk-MCEP4L5M.js → chunk-4JN3JAPL.js} +3 -3
  8. package/dist/{chunk-JNDSQA4U.js → chunk-5FNCRAPA.js} +3 -3
  9. package/dist/{chunk-KS7CKFXX.js → chunk-76S5M67J.js} +7 -7
  10. package/dist/{chunk-PQCWFPSI.js → chunk-A26YXFMX.js} +8 -8
  11. package/dist/{chunk-JJH27HLJ.js → chunk-AJOVRT5K.js} +3 -3
  12. package/dist/{chunk-57KJCVB5.js → chunk-AJYT5DKD.js} +2 -2
  13. package/dist/{chunk-HMDWNGIV.js → chunk-AM4QB5OM.js} +206 -100
  14. package/dist/{chunk-SKEV2KRG.js → chunk-B36FYNEM.js} +664 -587
  15. package/dist/{chunk-JB4IBM6F.js → chunk-BB4VAGLH.js} +2 -2
  16. package/dist/{chunk-W5G2YPO2.js → chunk-BQ3PZIHZ.js} +7 -7
  17. package/dist/{chunk-GWETXJR2.js → chunk-C4XAKIGB.js} +8 -8
  18. package/dist/{chunk-2HA6WHOK.js → chunk-DJVJNSKZ.js} +2 -2
  19. package/dist/{chunk-IM2PF4V5.js → chunk-DKG2TMNN.js} +2 -2
  20. package/dist/{del-SAZHGAZZ.js → chunk-EFOOQV72.js} +17 -378
  21. package/dist/{chunk-3FBDJEGD.js → chunk-F7F4BQYW.js} +1824 -762
  22. package/dist/{chunk-66VZYBID.js → chunk-F7J5CUMZ.js} +4 -4
  23. package/dist/{chunk-IRF44N7J.js → chunk-G2VTHDI5.js} +42 -18
  24. package/dist/{chunk-2M63OZ6L.js → chunk-HNHQAN5R.js} +3 -3
  25. package/dist/chunk-IWFYXDPH.js +109 -0
  26. package/dist/{chunk-NBOUUR2C.js → chunk-JF6OJWJV.js} +3 -3
  27. package/dist/{chunk-Y4JV2C2F.js → chunk-JR35C77F.js} +3 -3
  28. package/dist/{chunk-K5XXB73S.js → chunk-K2VBTQSL.js} +187 -43
  29. package/dist/chunk-KU6FTMKN.js +87 -0
  30. package/dist/{chunk-MQQ5ZTSK.js → chunk-NYUWDGSK.js} +7 -7
  31. package/dist/{chunk-DVZ22YSP.js → chunk-PUO72IWW.js} +16 -20
  32. package/dist/{chunk-42TDSAFO.js → chunk-T3FBGLW4.js} +4 -4
  33. package/dist/{chunk-G5R6YD27.js → chunk-UATXMR5F.js} +2 -103
  34. package/dist/{chunk-4JIM2QT7.js → chunk-UGBL65P2.js} +4 -4
  35. package/dist/{chunk-QO4ILPU2.js → chunk-VELVK2EZ.js} +4 -4
  36. package/dist/{chunk-5G56F2K6.js → chunk-VLSFD7SJ.js} +19 -18
  37. package/dist/{chunk-FYGQPHYH.js → chunk-WRIQTRQE.js} +2 -2
  38. package/dist/{chunk-7AEOEVGT.js → chunk-XO7GQ2WG.js} +3 -3
  39. package/dist/{chunk-FUWTEDP2.js → chunk-XTCT7ABH.js} +16379 -5792
  40. package/dist/{chunk-N2463ZYG.js → chunk-Y4DWHLHN.js} +3 -3
  41. package/dist/{chunk-ES5N6OQW.js → chunk-Y7JIZJYE.js} +5 -5
  42. package/dist/{chunk-DNXNKHZO.js → chunk-Z7TXQNKI.js} +2 -2
  43. package/dist/chunk-ZAVXS5HH.js +4654 -0
  44. package/dist/{chunk-DSKW7GLZ.js → chunk-ZXKNRG53.js} +5 -5
  45. package/dist/cli/commands/auth/login.d.ts +8 -0
  46. package/dist/cli/commands/auth/login.js +28 -0
  47. package/dist/cli/commands/auth/login.test.js +53 -0
  48. package/dist/cli/commands/auth/logout.js +15 -17
  49. package/dist/cli/commands/auth/logout.test.js +20 -22
  50. package/dist/cli/commands/cache/clear.js +15 -16
  51. package/dist/cli/commands/debug/command-flags.js +15 -16
  52. package/dist/cli/commands/docs/generate.js +15 -16
  53. package/dist/cli/commands/docs/generate.test.js +21 -22
  54. package/dist/cli/commands/help.js +15 -16
  55. package/dist/cli/commands/kitchen-sink/async.js +16 -17
  56. package/dist/cli/commands/kitchen-sink/async.test.js +17 -18
  57. package/dist/cli/commands/kitchen-sink/index.js +18 -19
  58. package/dist/cli/commands/kitchen-sink/index.test.js +21 -22
  59. package/dist/cli/commands/kitchen-sink/prompts.js +16 -17
  60. package/dist/cli/commands/kitchen-sink/prompts.test.js +17 -18
  61. package/dist/cli/commands/kitchen-sink/static.js +16 -17
  62. package/dist/cli/commands/kitchen-sink/static.test.js +17 -18
  63. package/dist/cli/commands/notifications/generate.js +16 -17
  64. package/dist/cli/commands/notifications/list.js +16 -17
  65. package/dist/cli/commands/search.js +16 -17
  66. package/dist/cli/commands/upgrade.js +16 -17
  67. package/dist/cli/commands/upgrade.test.js +1 -1
  68. package/dist/cli/commands/version.js +16 -17
  69. package/dist/cli/commands/version.test.js +17 -18
  70. package/dist/cli/services/commands/notifications.js +11 -12
  71. package/dist/cli/services/commands/search.js +7 -8
  72. package/dist/cli/services/commands/search.test.js +8 -9
  73. package/dist/cli/services/commands/version.js +8 -9
  74. package/dist/cli/services/commands/version.test.js +10 -11
  75. package/dist/cli/services/kitchen-sink/async.js +7 -8
  76. package/dist/cli/services/kitchen-sink/prompts.js +7 -8
  77. package/dist/cli/services/kitchen-sink/static.js +7 -8
  78. package/dist/cli/services/upgrade.js +8 -9
  79. package/dist/cli/services/upgrade.test.js +12 -13
  80. package/dist/configs/all.yml +3 -0
  81. package/dist/configs/recommended.yml +3 -0
  82. package/dist/{custom-oclif-loader-LOMFS5PB.js → custom-oclif-loader-J2DN7UTY.js} +11 -12
  83. package/dist/data/objects.json +2 -2
  84. package/dist/data/shopify_system_translations.json +69 -22
  85. package/dist/data/tags.json +10 -10
  86. package/dist/del-DNZ7X2HW.js +377 -0
  87. package/dist/{error-handler-TQKQ3EAE.js → error-handler-JJ76ZQMC.js} +13 -14
  88. package/dist/hooks/postrun.js +13 -15
  89. package/dist/hooks/prerun.js +14 -15
  90. package/dist/index.d.ts +1 -1
  91. package/dist/index.js +7477 -5649
  92. package/dist/{lib-OSXFX3I2.js → lib-DEEC6IKU.js} +3 -4
  93. package/dist/{local-76WZCPFM.js → local-2JWTG2IJ.js} +7 -8
  94. package/dist/{morph-TYIH255V.js → morph-5D7H6MU2.js} +13 -11
  95. package/dist/{node-package-manager-OCGFQDFC.js → node-package-manager-YCQL3774.js} +8 -9
  96. package/dist/{npa-E675GQOI.js → npa-LHT53SWR.js} +3 -5
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/dist/{ui-A52PK2HZ.js → ui-HITLA3H3.js} +9 -8
  99. package/dist/{workerd-PHNPZMMV.js → workerd-KHWXFNPK.js} +22 -22
  100. package/oclif.manifest.json +79 -9
  101. package/package.json +10 -10
  102. package/dist/chunk-CP3BRHWK.js +0 -33
  103. package/dist/chunk-EZQWZ57B.js +0 -53
  104. package/dist/chunk-T4K4LRMO.js +0 -1216
  105. package/dist/chunk-YQVYH3XF.js +0 -119
@@ -1,119 +0,0 @@
1
- import {
2
- ensureAuthenticated,
3
- exchangeCliTokenForAppManagementAccessToken,
4
- exchangeCliTokenForBusinessPlatformAccessToken,
5
- exchangeCustomPartnerToken,
6
- isThemeAccessSession,
7
- normalizeStoreFqdn,
8
- remove,
9
- setLastSeenAuthMethod,
10
- setLastSeenUserIdAfterAuth
11
- } from "./chunk-T4K4LRMO.js";
12
- import {
13
- getPartnersToken,
14
- nonRandomUUID
15
- } from "./chunk-DVZ22YSP.js";
16
- import {
17
- BugError,
18
- outputContent,
19
- outputDebug,
20
- outputToken
21
- } from "./chunk-SKEV2KRG.js";
22
- import {
23
- init_cjs_shims
24
- } from "./chunk-PKR7KJ6P.js";
25
-
26
- // ../cli-kit/dist/public/node/session.js
27
- init_cjs_shims();
28
- async function ensureAuthenticatedPartners(scopes = [], env = process.env, options = {}) {
29
- outputDebug(outputContent`Ensuring that the user is authenticated with the Partners API with the following scopes:
30
- ${outputToken.json(scopes)}
31
- `);
32
- let envToken = getPartnersToken();
33
- if (envToken) {
34
- let result = await exchangeCustomPartnerToken(envToken);
35
- return { token: result.accessToken, userId: result.userId };
36
- }
37
- let tokens = await ensureAuthenticated({ partnersApi: { scopes } }, env, options);
38
- if (!tokens.partners)
39
- throw new BugError("No partners token found after ensuring authenticated");
40
- return { token: tokens.partners, userId: tokens.userId };
41
- }
42
- async function ensureAuthenticatedAppManagementAndBusinessPlatform(options = {}, appManagementScopes = [], businessPlatformScopes = [], env = process.env) {
43
- outputDebug(outputContent`Ensuring that the user is authenticated with the App Management API with the following scopes:
44
- ${outputToken.json(appManagementScopes)}
45
- `);
46
- let envToken = getPartnersToken();
47
- if (envToken) {
48
- let appManagmentToken = await exchangeCliTokenForAppManagementAccessToken(envToken), businessPlatformToken = await exchangeCliTokenForBusinessPlatformAccessToken(envToken);
49
- return {
50
- appManagementToken: appManagmentToken.accessToken,
51
- userId: appManagmentToken.userId,
52
- businessPlatformToken: businessPlatformToken.accessToken
53
- };
54
- }
55
- let tokens = await ensureAuthenticated({ appManagementApi: { scopes: appManagementScopes }, businessPlatformApi: { scopes: businessPlatformScopes } }, env, options);
56
- if (!tokens.appManagement || !tokens.businessPlatform)
57
- throw new BugError("No App Management or Business Platform token found after ensuring authenticated");
58
- return {
59
- appManagementToken: tokens.appManagement,
60
- userId: tokens.userId,
61
- businessPlatformToken: tokens.businessPlatform
62
- };
63
- }
64
- async function ensureAuthenticatedStorefront(scopes = [], password = void 0, options = {}) {
65
- if (password) {
66
- let authMethod = isThemeAccessSession({ token: password, storeFqdn: "" }) ? "theme_access_token" : "custom_app_token";
67
- return setLastSeenAuthMethod(authMethod), setLastSeenUserIdAfterAuth(nonRandomUUID(password)), password;
68
- }
69
- outputDebug(outputContent`Ensuring that the user is authenticated with the Storefront API with the following scopes:
70
- ${outputToken.json(scopes)}
71
- `);
72
- let tokens = await ensureAuthenticated({ storefrontRendererApi: { scopes } }, process.env, options);
73
- if (!tokens.storefront)
74
- throw new BugError("No storefront token found after ensuring authenticated");
75
- return tokens.storefront;
76
- }
77
- async function ensureAuthenticatedAdmin(store, scopes = [], options = {}) {
78
- outputDebug(outputContent`Ensuring that the user is authenticated with the Admin API with the following scopes for the store ${outputToken.raw(store)}:
79
- ${outputToken.json(scopes)}
80
- `);
81
- let tokens = await ensureAuthenticated({ adminApi: { scopes, storeFqdn: store } }, process.env, {
82
- ...options
83
- });
84
- if (!tokens.admin)
85
- throw new BugError("No admin token found after ensuring authenticated");
86
- return tokens.admin;
87
- }
88
- async function ensureAuthenticatedThemes(store, password, scopes = [], options = {}) {
89
- if (outputDebug(outputContent`Ensuring that the user is authenticated with the Theme API with the following scopes:
90
- ${outputToken.json(scopes)}
91
- `), password) {
92
- let session = { token: password, storeFqdn: await normalizeStoreFqdn(store) }, authMethod = isThemeAccessSession(session) ? "theme_access_token" : "custom_app_token";
93
- return setLastSeenAuthMethod(authMethod), setLastSeenUserIdAfterAuth(nonRandomUUID(password)), session;
94
- }
95
- return ensureAuthenticatedAdmin(store, scopes, options);
96
- }
97
- async function ensureAuthenticatedBusinessPlatform(scopes = []) {
98
- outputDebug(outputContent`Ensuring that the user is authenticated with the Business Platform API with the following scopes:
99
- ${outputToken.json(scopes)}
100
- `);
101
- let tokens = await ensureAuthenticated({ businessPlatformApi: { scopes } }, process.env);
102
- if (!tokens.businessPlatform)
103
- throw new BugError("No business-platform token found after ensuring authenticated");
104
- return tokens.businessPlatform;
105
- }
106
- function logout() {
107
- return remove();
108
- }
109
-
110
- export {
111
- ensureAuthenticatedPartners,
112
- ensureAuthenticatedAppManagementAndBusinessPlatform,
113
- ensureAuthenticatedStorefront,
114
- ensureAuthenticatedAdmin,
115
- ensureAuthenticatedThemes,
116
- ensureAuthenticatedBusinessPlatform,
117
- logout
118
- };
119
- //# sourceMappingURL=chunk-YQVYH3XF.js.map