@shopify/cli 3.69.3 → 3.70.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 (550) hide show
  1. package/{dist/assets/cli-ruby/LICENSE → LICENSE} +0 -2
  2. package/dist/assets/hydrogen/starter/CHANGELOG.md +147 -0
  3. package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +1 -1
  4. package/dist/assets/hydrogen/starter/app/root.tsx +1 -1
  5. package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +6 -166
  6. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -1
  7. package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +3 -1
  8. package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +24 -0
  9. package/dist/assets/hydrogen/starter/package.json +10 -10
  10. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +11 -37
  11. package/dist/chunk-2PUMVRDO.js +131 -0
  12. package/dist/{chunk-WJCZFW37.js → chunk-335KXO4I.js} +12 -8
  13. package/dist/{chunk-MLSNFFTR.js → chunk-43YGIE7Y.js} +2 -2
  14. package/dist/chunk-47OJGAFT.js +28 -0
  15. package/dist/chunk-5OP2SA7G.js +3634 -0
  16. package/dist/{chunk-BZO3BX6M.js → chunk-5QQTRGJ7.js} +4 -4
  17. package/dist/{chunk-V5DOEDF4.js → chunk-7GNQ7YY4.js} +7 -7
  18. package/dist/{chunk-RTXVY32Y.js → chunk-AT4IG4GJ.js} +32 -216
  19. package/dist/{chunk-T65TTGOS.js → chunk-BMNDAI5O.js} +4 -4
  20. package/dist/{chunk-6XKWVDB6.js → chunk-CBBS4CV7.js} +3 -3
  21. package/dist/{chunk-27ILOE3X.js → chunk-CBD6UXLA.js} +8 -8
  22. package/dist/chunk-DVTWERMH.js +105 -0
  23. package/dist/{chunk-KNW6BL2Q.js → chunk-E2SYFYJU.js} +4 -4
  24. package/dist/{chunk-7D77RINN.js → chunk-FDJVVEGH.js} +17 -7
  25. package/dist/{chunk-65CKWSWQ.js → chunk-GDYKHT64.js} +2610 -6199
  26. package/dist/{chunk-NIFSDRC3.js → chunk-I3IIDOBX.js} +3 -3
  27. package/dist/{chunk-ZCYPTS6V.js → chunk-JLK5OMFF.js} +2 -2
  28. package/dist/{chunk-WHHRKJDE.js → chunk-KYBCPKPL.js} +3 -3
  29. package/dist/{chunk-AKHBZYBW.js → chunk-LN444KRM.js} +2 -2
  30. package/dist/chunk-MH5JSAVK.js +28 -0
  31. package/dist/{chunk-7GWY3FA4.js → chunk-MMQOVZDR.js} +6 -4
  32. package/dist/{chunk-RHX2I4MG.js → chunk-MQXHFQM3.js} +4 -4
  33. package/dist/{chunk-PO7KPJGR.js → chunk-MRDDDATQ.js} +3 -3
  34. package/dist/{chunk-UL6L7ZS3.js → chunk-N2DEYZD6.js} +3 -3
  35. package/dist/{chunk-WITDBDKW.js → chunk-N4X7XQWN.js} +2 -2
  36. package/dist/{chunk-AN5WQN4K.js → chunk-ND6AGPC6.js} +3 -3
  37. package/dist/{chunk-A3JXD7N7.js → chunk-NEOIQ6PN.js} +3 -3
  38. package/dist/{chunk-KGLQ4JD4.js → chunk-NH4U4X67.js} +3 -3
  39. package/dist/{chunk-AZKJLRVK.js → chunk-NYFXBTWK.js} +3 -3
  40. package/dist/{chunk-ERVB6ERU.js → chunk-OWLPHMUA.js} +3 -3
  41. package/dist/{chunk-Y54K4MPH.js → chunk-P6ABWRKD.js} +7 -7
  42. package/dist/{chunk-B6RI3XO4.js → chunk-PJKCWDDX.js} +117 -117
  43. package/dist/{chunk-2Q5IM74H.js → chunk-PKE54TAY.js} +5 -5
  44. package/dist/{chunk-JGXT3WUR.js → chunk-RUK73IAH.js} +2 -2
  45. package/dist/{chunk-IUHYP3QG.js → chunk-SYRHCENA.js} +2 -2
  46. package/dist/{chunk-XROTFVTO.js → chunk-TCTXUAZT.js} +3 -3
  47. package/dist/chunk-UOZCMFCN.js +160 -0
  48. package/dist/{chunk-VEEUPLAO.js → chunk-VFQMUAHB.js} +4 -4
  49. package/dist/{chunk-I66GPBMO.js → chunk-VHAXHYTL.js} +3 -3
  50. package/dist/{chunk-F2NOZSYG.js → chunk-VT3VJHZ7.js} +4 -4
  51. package/dist/{chunk-ACM5TZH6.js → chunk-WI6MEN7U.js} +2 -2
  52. package/dist/{chunk-OWPU7LGF.js → chunk-WN3FKMKB.js} +14 -14
  53. package/dist/{chunk-FRDQIYC3.js → chunk-X6F3DHKX.js} +2 -2
  54. package/dist/{chunk-P7JUHQKL.js → chunk-XEDHKQZA.js} +4 -3
  55. package/dist/{chunk-5O3Y6TSZ.js → chunk-XSMWYZDC.js} +86 -106
  56. package/dist/cli/commands/auth/logout.js +20 -18
  57. package/dist/cli/commands/auth/logout.test.js +25 -23
  58. package/dist/cli/commands/cache/clear.d.ts +6 -0
  59. package/dist/cli/commands/cache/clear.js +35 -0
  60. package/dist/cli/commands/debug/command-flags.js +19 -17
  61. package/dist/cli/commands/demo/catalog.js +20 -18
  62. package/dist/cli/commands/demo/generate-file.js +20 -18
  63. package/dist/cli/commands/demo/index.js +20 -18
  64. package/dist/cli/commands/demo/print-ai-prompt.js +20 -18
  65. package/dist/cli/commands/docs/generate.js +19 -17
  66. package/dist/cli/commands/docs/generate.test.js +19 -17
  67. package/dist/cli/commands/help.js +19 -17
  68. package/dist/cli/commands/kitchen-sink/async.js +20 -18
  69. package/dist/cli/commands/kitchen-sink/async.test.js +20 -18
  70. package/dist/cli/commands/kitchen-sink/index.js +22 -20
  71. package/dist/cli/commands/kitchen-sink/index.test.js +22 -20
  72. package/dist/cli/commands/kitchen-sink/prompts.js +20 -18
  73. package/dist/cli/commands/kitchen-sink/prompts.test.js +20 -18
  74. package/dist/cli/commands/kitchen-sink/static.js +20 -18
  75. package/dist/cli/commands/kitchen-sink/static.test.js +20 -18
  76. package/dist/cli/commands/notifications/generate.d.ts +6 -0
  77. package/dist/cli/commands/notifications/generate.js +36 -0
  78. package/dist/cli/commands/notifications/list.d.ts +6 -0
  79. package/dist/cli/commands/notifications/list.js +36 -0
  80. package/dist/cli/commands/search.js +20 -18
  81. package/dist/cli/commands/upgrade.js +20 -18
  82. package/dist/cli/commands/version.js +20 -18
  83. package/dist/cli/commands/version.test.js +20 -18
  84. package/dist/cli/services/commands/notifications.d.ts +2 -0
  85. package/dist/cli/services/commands/notifications.js +31 -0
  86. package/dist/cli/services/commands/search.js +9 -9
  87. package/dist/cli/services/commands/search.test.js +9 -9
  88. package/dist/cli/services/commands/version.js +10 -10
  89. package/dist/cli/services/commands/version.test.js +11 -11
  90. package/dist/cli/services/demo.js +9 -9
  91. package/dist/cli/services/demo.test.js +11 -11
  92. package/dist/cli/services/kitchen-sink/async.js +9 -9
  93. package/dist/cli/services/kitchen-sink/prompts.js +9 -9
  94. package/dist/cli/services/kitchen-sink/static.js +9 -9
  95. package/dist/cli/services/upgrade.js +10 -10
  96. package/dist/cli/services/upgrade.test.js +12 -12
  97. package/dist/{constants-T7JXE5K7.js → constants-QFFDI47A.js} +6 -4
  98. package/dist/{custom-oclif-loader-YBMJNE6U.js → custom-oclif-loader-IZLFCRGJ.js} +11 -11
  99. package/dist/data/filters.json +39 -16
  100. package/dist/data/latest.json +1 -1
  101. package/dist/data/objects.json +164 -6
  102. package/dist/data/shopify_system_translations.json +32 -3
  103. package/dist/{del-7ZS2Z64N.js → del-FEQWOMIX.js} +2 -2
  104. package/dist/{error-handler-A4P3264C.js → error-handler-DAI5HMQW.js} +17 -16
  105. package/dist/hooks/postrun.js +14 -13
  106. package/dist/hooks/prerun.js +14 -13
  107. package/dist/index.js +13542 -10915
  108. package/dist/{lib-JHUCJTHS.js → lib-JJXX7GH6.js} +5 -5
  109. package/dist/{local-ZKVS3PQJ.js → local-QD6GDUUE.js} +9 -9
  110. package/dist/{morph-QZYXTRWT.js → morph-FN23MJ2S.js} +10 -10
  111. package/dist/{node-UHHST6UJ.js → node-4XKDIIJ7.js} +23 -21
  112. package/dist/{node-package-manager-EU3ZOEFD.js → node-package-manager-IEZ6F5VN.js} +10 -10
  113. package/dist/{system-L7HP2PAP.js → system-KSIGUX64.js} +9 -9
  114. package/dist/tsconfig.tsbuildinfo +1 -1
  115. package/dist/{ui-HXNDVEEG.js → ui-BUB4OWO7.js} +9 -9
  116. package/dist/{workerd-7CGH4YHE.js → workerd-DIIGDIHZ.js} +22 -20
  117. package/oclif.manifest.json +61 -104
  118. package/package.json +7 -7
  119. package/dist/assets/cli-ruby/.devcontainer.json +0 -5
  120. package/dist/assets/cli-ruby/.rubocop.yml +0 -102
  121. package/dist/assets/cli-ruby/.rubocop_todo.yml +0 -24
  122. package/dist/assets/cli-ruby/CHANGELOG.md +0 -634
  123. package/dist/assets/cli-ruby/CONTRIBUTING.md +0 -3
  124. package/dist/assets/cli-ruby/Codespace.dockerfile +0 -35
  125. package/dist/assets/cli-ruby/Gemfile +0 -32
  126. package/dist/assets/cli-ruby/README.md +0 -30
  127. package/dist/assets/cli-ruby/Rakefile +0 -167
  128. package/dist/assets/cli-ruby/SECURITY.md +0 -59
  129. package/dist/assets/cli-ruby/Tests.dockerfile +0 -35
  130. package/dist/assets/cli-ruby/assets/logo.png +0 -0
  131. package/dist/assets/cli-ruby/bin/console +0 -11
  132. package/dist/assets/cli-ruby/bin/load_shopify.rb +0 -22
  133. package/dist/assets/cli-ruby/bin/shopify +0 -67
  134. package/dist/assets/cli-ruby/bin/shopify.bat +0 -3
  135. package/dist/assets/cli-ruby/bin/update-deps +0 -97
  136. package/dist/assets/cli-ruby/dev.yml +0 -29
  137. package/dist/assets/cli-ruby/docs/README.md +0 -13
  138. package/dist/assets/cli-ruby/docs/contributors/testing.md +0 -27
  139. package/dist/assets/cli-ruby/docs/users/installation.md +0 -3
  140. package/dist/assets/cli-ruby/docs/users/migrate-from-themekit.md +0 -18
  141. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256 +0 -1
  142. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256 +0 -1
  143. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256 +0 -1
  144. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.3.0.gz.sha256 +0 -1
  145. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256 +0 -1
  146. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256 +0 -1
  147. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256 +0 -1
  148. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.3.0.gz.sha256 +0 -1
  149. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256 +0 -1
  150. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256 +0 -1
  151. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256 +0 -1
  152. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.3.0.gz.sha256 +0 -1
  153. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256 +0 -1
  154. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256 +0 -1
  155. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256 +0 -1
  156. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.3.0.gz.sha256 +0 -1
  157. package/dist/assets/cli-ruby/ext/javy/javy.rb +0 -204
  158. package/dist/assets/cli-ruby/ext/javy/version +0 -1
  159. package/dist/assets/cli-ruby/ext/shopify-extensions/extconf.rb +0 -21
  160. package/dist/assets/cli-ruby/ext/shopify-extensions/shopify_extensions.rb +0 -152
  161. package/dist/assets/cli-ruby/ext/shopify-extensions/version +0 -1
  162. package/dist/assets/cli-ruby/features/support/assertions.rb +0 -17
  163. package/dist/assets/cli-ruby/features/support/cli.rb +0 -7
  164. package/dist/assets/cli-ruby/features/support/process.rb +0 -27
  165. package/dist/assets/cli-ruby/features/support/requires.rb +0 -3
  166. package/dist/assets/cli-ruby/lib/docgen/class_template.md.erb +0 -81
  167. package/dist/assets/cli-ruby/lib/docgen/index_template.md.erb +0 -5
  168. package/dist/assets/cli-ruby/lib/docgen/markdown.rb +0 -101
  169. package/dist/assets/cli-ruby/lib/graphql/admin_introspection.graphql +0 -87
  170. package/dist/assets/cli-ruby/lib/graphql/all_organizations.graphql +0 -19
  171. package/dist/assets/cli-ruby/lib/graphql/all_orgs_with_apps.graphql +0 -30
  172. package/dist/assets/cli-ruby/lib/graphql/api_versions.graphql +0 -6
  173. package/dist/assets/cli-ruby/lib/graphql/convert_dev_to_test_store.graphql +0 -10
  174. package/dist/assets/cli-ruby/lib/graphql/create_app.graphql +0 -20
  175. package/dist/assets/cli-ruby/lib/graphql/create_customer.graphql +0 -9
  176. package/dist/assets/cli-ruby/lib/graphql/create_draft_order.graphql +0 -8
  177. package/dist/assets/cli-ruby/lib/graphql/create_product.graphql +0 -9
  178. package/dist/assets/cli-ruby/lib/graphql/extension_create.graphql +0 -37
  179. package/dist/assets/cli-ruby/lib/graphql/extension_update_draft.graphql +0 -19
  180. package/dist/assets/cli-ruby/lib/graphql/fetch_specifications.graphql +0 -14
  181. package/dist/assets/cli-ruby/lib/graphql/find_organization.graphql +0 -18
  182. package/dist/assets/cli-ruby/lib/graphql/find_organization_with_apps.graphql +0 -20
  183. package/dist/assets/cli-ruby/lib/graphql/get_app_by_api_key.graphql +0 -9
  184. package/dist/assets/cli-ruby/lib/graphql/get_app_urls.graphql +0 -6
  185. package/dist/assets/cli-ruby/lib/graphql/get_extension_registrations.graphql +0 -28
  186. package/dist/assets/cli-ruby/lib/graphql/get_variant_id.graphql +0 -16
  187. package/dist/assets/cli-ruby/lib/graphql/update_dashboard_urls.graphql +0 -8
  188. package/dist/assets/cli-ruby/lib/project_types/extension/cli.rb +0 -75
  189. package/dist/assets/cli-ruby/lib/project_types/extension/commands/extension_command.rb +0 -29
  190. package/dist/assets/cli-ruby/lib/project_types/extension/commands/serve.rb +0 -164
  191. package/dist/assets/cli-ruby/lib/project_types/extension/errors.rb +0 -9
  192. package/dist/assets/cli-ruby/lib/project_types/extension/extension_project.rb +0 -151
  193. package/dist/assets/cli-ruby/lib/project_types/extension/extension_project_keys.rb +0 -12
  194. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo.rb +0 -50
  195. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_config.rb +0 -59
  196. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_dependencies.rb +0 -28
  197. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_runtime.rb +0 -15
  198. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_serve.rb +0 -115
  199. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup.rb +0 -54
  200. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup_step.rb +0 -31
  201. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup_steps.rb +0 -51
  202. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/admin.rb +0 -29
  203. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/base.rb +0 -19
  204. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_post_purchase.rb +0 -23
  205. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_ui_extension.rb +0 -29
  206. package/dist/assets/cli-ruby/lib/project_types/extension/loaders/project.rb +0 -50
  207. package/dist/assets/cli-ruby/lib/project_types/extension/loaders/specification_handler.rb +0 -22
  208. package/dist/assets/cli-ruby/lib/project_types/extension/messages/message_loading.rb +0 -34
  209. package/dist/assets/cli-ruby/lib/project_types/extension/messages/messages.rb +0 -320
  210. package/dist/assets/cli-ruby/lib/project_types/extension/models/app.rb +0 -14
  211. package/dist/assets/cli-ruby/lib/project_types/extension/models/lazy_specification_handler.rb +0 -12
  212. package/dist/assets/cli-ruby/lib/project_types/extension/models/specification.rb +0 -41
  213. package/dist/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/default.rb +0 -145
  214. package/dist/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +0 -134
  215. package/dist/assets/cli-ruby/lib/project_types/extension/models/specifications.rb +0 -91
  216. package/dist/assets/cli-ruby/lib/project_types/extension/models/validation_error.rb +0 -17
  217. package/dist/assets/cli-ruby/lib/project_types/extension/models/version.rb +0 -15
  218. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/configure_features.rb +0 -73
  219. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/configure_options.rb +0 -21
  220. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/converters/validation_error_converter.rb +0 -25
  221. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/converters/version_converter.rb +0 -28
  222. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/fetch_specifications.rb +0 -21
  223. package/dist/assets/cli-ruby/lib/project_types/node/cli.rb +0 -12
  224. package/dist/assets/cli-ruby/lib/project_types/node/forms/create.rb +0 -45
  225. package/dist/assets/cli-ruby/lib/project_types/node/messages/messages.rb +0 -33
  226. package/dist/assets/cli-ruby/lib/project_types/php/cli.rb +0 -16
  227. package/dist/assets/cli-ruby/lib/project_types/php/forms/create.rb +0 -44
  228. package/dist/assets/cli-ruby/lib/project_types/php/messages/messages.rb +0 -29
  229. package/dist/assets/cli-ruby/lib/project_types/rails/cli.rb +0 -15
  230. package/dist/assets/cli-ruby/lib/project_types/rails/forms/create.rb +0 -75
  231. package/dist/assets/cli-ruby/lib/project_types/rails/gem.rb +0 -110
  232. package/dist/assets/cli-ruby/lib/project_types/rails/messages/messages.rb +0 -101
  233. package/dist/assets/cli-ruby/lib/project_types/script/cli.rb +0 -27
  234. package/dist/assets/cli-ruby/lib/project_types/script/commands/connect.rb +0 -16
  235. package/dist/assets/cli-ruby/lib/project_types/script/commands/create.rb +0 -24
  236. package/dist/assets/cli-ruby/lib/project_types/script/commands/javy.rb +0 -24
  237. package/dist/assets/cli-ruby/lib/project_types/script/commands/push.rb +0 -26
  238. package/dist/assets/cli-ruby/lib/project_types/script/loaders/project.rb +0 -46
  239. package/dist/assets/cli-ruby/lib/project_types/script/loaders/specification_handler.rb +0 -22
  240. package/dist/assets/cli-ruby/lib/project_types/script/messages/messages.rb +0 -11
  241. package/dist/assets/cli-ruby/lib/project_types/theme/cli.rb +0 -33
  242. package/dist/assets/cli-ruby/lib/project_types/theme/commands/common/root_helper.rb +0 -94
  243. package/dist/assets/cli-ruby/lib/project_types/theme/commands/common/shop_helper.rb +0 -13
  244. package/dist/assets/cli-ruby/lib/project_types/theme/commands/console.rb +0 -23
  245. package/dist/assets/cli-ruby/lib/project_types/theme/commands/delete.rb +0 -70
  246. package/dist/assets/cli-ruby/lib/project_types/theme/commands/init.rb +0 -46
  247. package/dist/assets/cli-ruby/lib/project_types/theme/commands/list.rb +0 -33
  248. package/dist/assets/cli-ruby/lib/project_types/theme/commands/open.rb +0 -73
  249. package/dist/assets/cli-ruby/lib/project_types/theme/commands/package.rb +0 -73
  250. package/dist/assets/cli-ruby/lib/project_types/theme/commands/publish.rb +0 -49
  251. package/dist/assets/cli-ruby/lib/project_types/theme/commands/pull.rb +0 -118
  252. package/dist/assets/cli-ruby/lib/project_types/theme/commands/push.rb +0 -160
  253. package/dist/assets/cli-ruby/lib/project_types/theme/commands/serve.rb +0 -91
  254. package/dist/assets/cli-ruby/lib/project_types/theme/commands/share.rb +0 -62
  255. package/dist/assets/cli-ruby/lib/project_types/theme/commands/token.rb +0 -22
  256. package/dist/assets/cli-ruby/lib/project_types/theme/conversions/base_glob.rb +0 -65
  257. package/dist/assets/cli-ruby/lib/project_types/theme/conversions/ignore_glob.rb +0 -15
  258. package/dist/assets/cli-ruby/lib/project_types/theme/conversions/include_glob.rb +0 -15
  259. package/dist/assets/cli-ruby/lib/project_types/theme/forms/confirm_store.rb +0 -15
  260. package/dist/assets/cli-ruby/lib/project_types/theme/forms/select.rb +0 -34
  261. package/dist/assets/cli-ruby/lib/project_types/theme/messages/messages.rb +0 -429
  262. package/dist/assets/cli-ruby/lib/project_types/theme/models/specification_handlers/theme.rb +0 -19
  263. package/dist/assets/cli-ruby/lib/project_types/theme/presenters/theme_presenter.rb +0 -48
  264. package/dist/assets/cli-ruby/lib/project_types/theme/presenters/themes_presenter.rb +0 -29
  265. package/dist/assets/cli-ruby/lib/project_types/theme/ui/sync_progress_bar.rb +0 -20
  266. package/dist/assets/cli-ruby/lib/rubygems_plugin.rb +0 -26
  267. package/dist/assets/cli-ruby/lib/shopify_cli/admin_api.rb +0 -160
  268. package/dist/assets/cli-ruby/lib/shopify_cli/api.rb +0 -130
  269. package/dist/assets/cli-ruby/lib/shopify_cli/command/project_command.rb +0 -31
  270. package/dist/assets/cli-ruby/lib/shopify_cli/command/sub_command.rb +0 -20
  271. package/dist/assets/cli-ruby/lib/shopify_cli/command.rb +0 -166
  272. package/dist/assets/cli-ruby/lib/shopify_cli/commands.rb +0 -21
  273. package/dist/assets/cli-ruby/lib/shopify_cli/constants.rb +0 -101
  274. package/dist/assets/cli-ruby/lib/shopify_cli/context.rb +0 -709
  275. package/dist/assets/cli-ruby/lib/shopify_cli/core/cli_version.rb +0 -20
  276. package/dist/assets/cli-ruby/lib/shopify_cli/core/entry_point.rb +0 -64
  277. package/dist/assets/cli-ruby/lib/shopify_cli/core/executor.rb +0 -23
  278. package/dist/assets/cli-ruby/lib/shopify_cli/core/finalize.rb +0 -13
  279. package/dist/assets/cli-ruby/lib/shopify_cli/core/monorail.rb +0 -122
  280. package/dist/assets/cli-ruby/lib/shopify_cli/core.rb +0 -8
  281. package/dist/assets/cli-ruby/lib/shopify_cli/db.rb +0 -114
  282. package/dist/assets/cli-ruby/lib/shopify_cli/environment.rb +0 -217
  283. package/dist/assets/cli-ruby/lib/shopify_cli/exception_reporter.rb +0 -80
  284. package/dist/assets/cli-ruby/lib/shopify_cli/feature.rb +0 -95
  285. package/dist/assets/cli-ruby/lib/shopify_cli/file_system_listener.rb +0 -30
  286. package/dist/assets/cli-ruby/lib/shopify_cli/form.rb +0 -42
  287. package/dist/assets/cli-ruby/lib/shopify_cli/git.rb +0 -320
  288. package/dist/assets/cli-ruby/lib/shopify_cli/github/issue_url_generator.rb +0 -30
  289. package/dist/assets/cli-ruby/lib/shopify_cli/github.rb +0 -5
  290. package/dist/assets/cli-ruby/lib/shopify_cli/helpers/haikunator.rb +0 -92
  291. package/dist/assets/cli-ruby/lib/shopify_cli/helpers.rb +0 -5
  292. package/dist/assets/cli-ruby/lib/shopify_cli/http_request.rb +0 -43
  293. package/dist/assets/cli-ruby/lib/shopify_cli/identity_auth/env_auth_token.rb +0 -34
  294. package/dist/assets/cli-ruby/lib/shopify_cli/identity_auth.rb +0 -332
  295. package/dist/assets/cli-ruby/lib/shopify_cli/js_system.rb +0 -115
  296. package/dist/assets/cli-ruby/lib/shopify_cli/lazy_delegator.rb +0 -55
  297. package/dist/assets/cli-ruby/lib/shopify_cli/messages/messages.rb +0 -863
  298. package/dist/assets/cli-ruby/lib/shopify_cli/method_object.rb +0 -123
  299. package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migration.rb +0 -27
  300. package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +0 -13
  301. package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1633691650_merge_reporting_configuration.rb +0 -41
  302. package/dist/assets/cli-ruby/lib/shopify_cli/migrator.rb +0 -46
  303. package/dist/assets/cli-ruby/lib/shopify_cli/options.rb +0 -40
  304. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions/job.rb +0 -36
  305. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions.rb +0 -46
  306. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/organizations.rb +0 -45
  307. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api.rb +0 -91
  308. package/dist/assets/cli-ruby/lib/shopify_cli/project.rb +0 -199
  309. package/dist/assets/cli-ruby/lib/shopify_cli/project_type.rb +0 -66
  310. package/dist/assets/cli-ruby/lib/shopify_cli/reporting_configuration_controller.rb +0 -29
  311. package/dist/assets/cli-ruby/lib/shopify_cli/resolve_constant.rb +0 -25
  312. package/dist/assets/cli-ruby/lib/shopify_cli/resources/env_file.rb +0 -108
  313. package/dist/assets/cli-ruby/lib/shopify_cli/resources.rb +0 -5
  314. package/dist/assets/cli-ruby/lib/shopify_cli/result.rb +0 -448
  315. package/dist/assets/cli-ruby/lib/shopify_cli/shopifolk.rb +0 -82
  316. package/dist/assets/cli-ruby/lib/shopify_cli/task.rb +0 -20
  317. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/confirm_store.rb +0 -18
  318. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/create_api_client.rb +0 -40
  319. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_authenticated.rb +0 -19
  320. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_dev_store.rb +0 -41
  321. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_env.rb +0 -90
  322. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_git_dependency.rb +0 -14
  323. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_loopback_url.rb +0 -20
  324. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_project_type.rb +0 -14
  325. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/select_org_and_shop.rb +0 -81
  326. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/update_dashboard_urls.rb +0 -57
  327. package/dist/assets/cli-ruby/lib/shopify_cli/tasks.rb +0 -44
  328. package/dist/assets/cli-ruby/lib/shopify_cli/theme/backoff_helper.rb +0 -47
  329. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/cdn_fonts.rb +0 -82
  330. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/certificate_manager.rb +0 -79
  331. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/errors.rb +0 -9
  332. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/header_hash.rb +0 -98
  333. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hooks/file_change_hook.rb +0 -77
  334. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_deleter.rb +0 -62
  335. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_reloader.rb +0 -63
  336. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot-reload-no-script.html +0 -27
  337. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot_reload.js +0 -48
  338. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/sse_client.js +0 -43
  339. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme.js +0 -114
  340. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme_extension.js +0 -121
  341. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/script_injector.rb +0 -57
  342. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/sections_index.rb +0 -50
  343. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload.rb +0 -75
  344. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/local_assets.rb +0 -101
  345. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +0 -313
  346. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy_param_builder.rb +0 -84
  347. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/reload_mode.rb +0 -34
  348. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb +0 -35
  349. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher.rb +0 -44
  350. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/sse.rb +0 -75
  351. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/watcher.rb +0 -64
  352. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/web_server.rb +0 -140
  353. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server.rb +0 -332
  354. package/dist/assets/cli-ruby/lib/shopify_cli/theme/development_theme.rb +0 -101
  355. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/app_extension.rb +0 -40
  356. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hooks/file_change_hook.rb +0 -76
  357. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload/script_injector.rb +0 -30
  358. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload.rb +0 -13
  359. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/local_assets.rb +0 -31
  360. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/proxy_param_builder.rb +0 -94
  361. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/watcher.rb +0 -49
  362. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server.rb +0 -175
  363. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/host_theme.rb +0 -109
  364. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ignore_helper.rb +0 -35
  365. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/extension_serve_job.rb +0 -120
  366. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/operation.rb +0 -25
  367. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer.rb +0 -100
  368. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_progress_bar.rb +0 -35
  369. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_raw_progress_bar.rb +0 -40
  370. package/dist/assets/cli-ruby/lib/shopify_cli/theme/file.rb +0 -133
  371. package/dist/assets/cli-ruby/lib/shopify_cli/theme/filter/path_matcher.rb +0 -38
  372. package/dist/assets/cli-ruby/lib/shopify_cli/theme/ignore_filter.rb +0 -112
  373. package/dist/assets/cli-ruby/lib/shopify_cli/theme/ignore_helper.rb +0 -37
  374. package/dist/assets/cli-ruby/lib/shopify_cli/theme/include_filter.rb +0 -67
  375. package/dist/assets/cli-ruby/lib/shopify_cli/theme/mime_type.rb +0 -34
  376. package/dist/assets/cli-ruby/lib/shopify_cli/theme/notifier.rb +0 -52
  377. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/api.rb +0 -109
  378. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_dev_server.rb +0 -93
  379. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_middleware.rb +0 -97
  380. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/remote_evaluator.rb +0 -166
  381. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/success.html +0 -78
  382. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/template.liquid +0 -15
  383. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/snippet.rb +0 -81
  384. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl.rb +0 -88
  385. package/dist/assets/cli-ruby/lib/shopify_cli/theme/root.rb +0 -62
  386. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/checksums.rb +0 -66
  387. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/downloader.rb +0 -63
  388. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/error_reporter.rb +0 -45
  389. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/merger.rb +0 -53
  390. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/operation.rb +0 -49
  391. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/standard_reporter.rb +0 -32
  392. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/unsupported_script_warning.rb +0 -90
  393. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk.rb +0 -133
  394. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_item.rb +0 -64
  395. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_job.rb +0 -139
  396. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_request.rb +0 -30
  397. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb +0 -41
  398. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all_form.rb +0 -37
  399. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb +0 -64
  400. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_delete_strategy.rb +0 -29
  401. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_update_strategy.rb +0 -30
  402. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_delete_handler.rb +0 -49
  403. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_update_handler.rb +0 -71
  404. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader.rb +0 -231
  405. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb +0 -391
  406. package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme.rb +0 -212
  407. package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme_access_api.rb +0 -89
  408. package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme_admin_api.rb +0 -101
  409. package/dist/assets/cli-ruby/lib/shopify_cli/thread_pool/job.rb +0 -35
  410. package/dist/assets/cli-ruby/lib/shopify_cli/thread_pool.rb +0 -49
  411. package/dist/assets/cli-ruby/lib/shopify_cli/transform_data_structure.rb +0 -87
  412. package/dist/assets/cli-ruby/lib/shopify_cli/utilities.rb +0 -21
  413. package/dist/assets/cli-ruby/lib/shopify_cli/version.rb +0 -3
  414. package/dist/assets/cli-ruby/lib/shopify_cli.rb +0 -182
  415. package/dist/assets/cli-ruby/shipit.rubygems.yml +0 -3
  416. package/dist/assets/cli-ruby/shopify-cli.gemspec +0 -46
  417. package/dist/assets/cli-ruby/shopify-dev +0 -16
  418. package/dist/assets/cli-ruby/test/minitest_ext.rb +0 -115
  419. package/dist/assets/cli-ruby/test/project_types/extension/extension_test_helpers.rb +0 -70
  420. package/dist/assets/cli-ruby/test/shopify-cli/migrator/migrations/migration_helper.rb +0 -20
  421. package/dist/assets/cli-ruby/test/test_helpers.rb +0 -16
  422. package/dist/assets/cli-ruby/utilities/constants.rb +0 -7
  423. package/dist/assets/cli-ruby/utilities/docker/container.rb +0 -104
  424. package/dist/assets/cli-ruby/utilities/docker.rb +0 -89
  425. package/dist/assets/cli-ruby/utilities/utilities.rb +0 -6
  426. package/dist/assets/cli-ruby/vendor/deps/cli-kit/REVISION +0 -1
  427. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +0 -21
  428. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +0 -49
  429. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +0 -94
  430. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/config.rb +0 -133
  431. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +0 -123
  432. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/executor.rb +0 -79
  433. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ini.rb +0 -102
  434. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +0 -82
  435. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/logger.rb +0 -82
  436. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +0 -60
  437. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ruby_backports/enumerable.rb +0 -6
  438. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +0 -244
  439. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support.rb +0 -9
  440. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/system.rb +0 -243
  441. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/util.rb +0 -193
  442. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/version.rb +0 -5
  443. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit.rb +0 -60
  444. package/dist/assets/cli-ruby/vendor/deps/cli-ui/REVISION +0 -1
  445. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +0 -157
  446. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/color.rb +0 -84
  447. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +0 -193
  448. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +0 -98
  449. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +0 -166
  450. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +0 -139
  451. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +0 -120
  452. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame.rb +0 -269
  453. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +0 -84
  454. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/os.rb +0 -73
  455. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/printer.rb +0 -59
  456. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress.rb +0 -90
  457. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress_plain.rb +0 -50
  458. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +0 -484
  459. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +0 -29
  460. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +0 -282
  461. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +0 -40
  462. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +0 -263
  463. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +0 -66
  464. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +0 -232
  465. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +0 -46
  466. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +0 -102
  467. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/version.rb +0 -5
  468. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +0 -27
  469. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +0 -61
  470. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +0 -77
  471. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +0 -56
  472. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui.rb +0 -234
  473. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/LICENSE +0 -22
  474. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/README.md +0 -67
  475. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/Rakefile +0 -54
  476. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/lib/ruby2_keywords.rb +0 -57
  477. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/ruby2_keywords.gemspec +0 -18
  478. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/test/test_keyword.rb +0 -41
  479. package/dist/assets/cli-ruby/vendor/deps/smart_properties/REVISION +0 -1
  480. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/errors.rb +0 -114
  481. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property.rb +0 -168
  482. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property_collection.rb +0 -83
  483. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations/ancestor.rb +0 -27
  484. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations.rb +0 -8
  485. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/version.rb +0 -3
  486. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties.rb +0 -174
  487. package/dist/assets/cli-ruby/vendor/deps/webrick/Gemfile +0 -3
  488. package/dist/assets/cli-ruby/vendor/deps/webrick/LICENSE.txt +0 -22
  489. package/dist/assets/cli-ruby/vendor/deps/webrick/README.md +0 -61
  490. package/dist/assets/cli-ruby/vendor/deps/webrick/Rakefile +0 -10
  491. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/accesslog.rb +0 -157
  492. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cgi.rb +0 -313
  493. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/compat.rb +0 -36
  494. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/config.rb +0 -158
  495. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cookie.rb +0 -172
  496. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/htmlutils.rb +0 -30
  497. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +0 -117
  498. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +0 -116
  499. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +0 -395
  500. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +0 -132
  501. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +0 -97
  502. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +0 -158
  503. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +0 -53
  504. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth.rb +0 -96
  505. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpproxy.rb +0 -354
  506. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httprequest.rb +0 -636
  507. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpresponse.rb +0 -564
  508. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/https.rb +0 -152
  509. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpserver.rb +0 -294
  510. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +0 -152
  511. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +0 -47
  512. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +0 -126
  513. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +0 -88
  514. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +0 -552
  515. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +0 -47
  516. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet.rb +0 -23
  517. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpstatus.rb +0 -194
  518. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httputils.rb +0 -512
  519. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpversion.rb +0 -76
  520. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/log.rb +0 -156
  521. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/server.rb +0 -381
  522. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/ssl.rb +0 -215
  523. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/utils.rb +0 -265
  524. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/version.rb +0 -18
  525. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick.rb +0 -232
  526. package/dist/assets/cli-ruby/vendor/deps/webrick/webrick.gemspec +0 -74
  527. package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands/help.rb +0 -20
  528. package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands/new.rb +0 -21
  529. package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands.rb +0 -18
  530. package/dist/assets/cli-ruby/vendor/gen/lib/gen/entry_point.rb +0 -10
  531. package/dist/assets/cli-ruby/vendor/gen/lib/gen/generator.rb +0 -165
  532. package/dist/assets/cli-ruby/vendor/gen/lib/gen.rb +0 -39
  533. package/dist/assets/cli-ruby/vendor/gen/template/Gemfile +0 -10
  534. package/dist/assets/cli-ruby/vendor/gen/template/README.md +0 -1
  535. package/dist/assets/cli-ruby/vendor/gen/template/bin/testunit +0 -23
  536. package/dist/assets/cli-ruby/vendor/gen/template/bin/update-deps +0 -97
  537. package/dist/assets/cli-ruby/vendor/gen/template/dev-gems.yml +0 -3
  538. package/dist/assets/cli-ruby/vendor/gen/template/dev-vendor.yml +0 -4
  539. package/dist/assets/cli-ruby/vendor/gen/template/exe/__app__-gems +0 -17
  540. package/dist/assets/cli-ruby/vendor/gen/template/exe/__app__-vendor +0 -18
  541. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/example.rb +0 -19
  542. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/help.rb +0 -21
  543. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands.rb +0 -18
  544. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/entry_point.rb +0 -10
  545. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__.rb +0 -33
  546. package/dist/assets/cli-ruby/vendor/gen/template/test/example_test.rb +0 -17
  547. package/dist/assets/cli-ruby/vendor/gen/template/test/test_helper.rb +0 -22
  548. package/dist/assets/cli-ruby/vendor/lib/semantic/LICENSE +0 -20
  549. package/dist/assets/cli-ruby/vendor/lib/semantic/semantic.rb +0 -4
  550. package/dist/assets/cli-ruby/vendor/lib/semantic/version.rb +0 -179
@@ -1,709 +0,0 @@
1
- # frozen_string_literal: true
2
- require "shopify_cli"
3
- require "fileutils"
4
- require "rbconfig"
5
- require "net/http"
6
- require "json"
7
- require "bundler"
8
-
9
- module ShopifyCLI
10
- ##
11
- # Context captures a lot about the current running command. It captures the
12
- # environment, output, system and file operations. It is useful to have the
13
- # context especially in tests so that you have a single access point to these
14
- # resoures.
15
- #
16
- class Context
17
- GEM_LATEST_URI = URI.parse("https://rubygems.org/api/v1/versions/shopify-cli/latest.json")
18
- VERSION_CHECK_SECTION = "versioncheck"
19
- LAST_CHECKED_AT_FIELD = "last_checked_at"
20
- LATEST_VERSION_FIELD = "latest_version"
21
- VERSION_CHECK_INTERVAL = 86400
22
-
23
- class << self
24
- attr_reader :messages
25
-
26
- # adds a new set of messages to be used by the CLI. The messages are expected to be a hash of symbols, and
27
- # multiple levels are allowed. When fetching messages a dot notation is used to separate different levels. See
28
- # Context::message for more information.
29
- #
30
- # #### Parameters
31
- # * `messages` - Hash containing the new keys to register
32
- def load_messages(messages)
33
- @messages ||= {}
34
- @messages = @messages.merge(messages) do |key|
35
- Context.new.abort("Message key '#{key}' already exists and cannot be registered") if @messages.key?(key)
36
- end
37
- end
38
-
39
- # returns the user-facing messages for the given key. Returns the key if no message is available.
40
- #
41
- # #### Parameters
42
- # * `key` - a symbol representing the message
43
- # * `params` - the parameters to format the string with
44
- def message(key, *params)
45
- key_parts = key.split(".").map(&:to_sym)
46
- str = Context.messages.dig(*key_parts)
47
- str ? str % params : key
48
- end
49
-
50
- # a wrapper around $stdout.puts to allow for easy formatting
51
- #
52
- # #### Parameters
53
- # * `text` - a string message to output
54
- def puts(*args)
55
- $stdout.puts(CLI::UI.fmt(*args)).tap do
56
- $stdout.flush
57
- end
58
- end
59
-
60
- # aborts the current running command and outputs an error message:
61
- # - when the `help_message` is not provided, the error message appears in
62
- # a red frame, prefixed by an ✗ icon
63
- # - when the `help_message` is provided, the error message appears in a
64
- # red frame, and the help message appears in a green frame
65
- #
66
- # #### Parameters
67
- # * `error_message` - an error message to output
68
- # * `help_message` - an optional help message
69
- #
70
- # #### Example
71
- #
72
- # ShopifyCLI::Context.abort("Execution error")
73
- # # Output:
74
- # # ┏━━ Error ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
75
- # # ┃ ✗ Execution error
76
- # # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
- #
78
- # ShopifyCLI::Context.abort("Execution error", "export EXECUTION=1")
79
- # # Output:
80
- # # ┏━━ Error ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
81
- # # ┃ Execution error
82
- # # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
- # # ┏━━ Try this ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
84
- # # ┃ export EXECUTION=1
85
- # # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
86
- #
87
- def abort(error_message, help_message = nil)
88
- raise ShopifyCLI::Abort, "{{x}} #{error_message}" if help_message.nil?
89
-
90
- frame(message("core.error"), color: :red) { self.puts(error_message) }
91
- frame(message("core.try_this"), color: :green) { self.puts(help_message) }
92
-
93
- raise ShopifyCLI::AbortSilent
94
- end
95
-
96
- private
97
-
98
- def frame(title, color:, &block)
99
- CLI::UI::Frame.open(title, color: CLI::UI.resolve_color(color), timing: false, &block)
100
- end
101
- end
102
-
103
- # is the directory root that the current command is running in. If you want to
104
- # simulate a `cd` for the file operations, you can change this variable.
105
- attr_accessor :root
106
- # is an accessor for environment variables. These variables are also added to
107
- # any command run by the context.
108
- attr_accessor :env
109
-
110
- def initialize(root: Dir.pwd, env: ($original_env || ENV).to_h) # :nodoc:
111
- self.root = root
112
- self.env = env
113
- end
114
-
115
- # will return which operating system that the cli is running on [:mac, :linux]
116
- def os
117
- host = uname
118
- return :mac_m1 if /arm64.*darwin/i.match(host)
119
- return :mac if /darwin/i.match(host)
120
- return :windows if /mswin|mingw|cygwin/i.match(host)
121
- return :linux if /linux|bsd/i.match(host)
122
- :unknown
123
- end
124
-
125
- # will return true if the cli is running on an ARM Apple computer.
126
- def mac_m1?
127
- os == :mac_m1
128
- end
129
-
130
- # will return true if the cli is running on a Intel x86 Apple computer.
131
- def mac?
132
- os == :mac
133
- end
134
-
135
- # will return true if the cli is running on a linux distro
136
- def linux?
137
- os == :linux
138
- end
139
-
140
- # will return true if the cli is running on Windows
141
- def windows?
142
- os == :windows
143
- end
144
-
145
- # will return true if the os is unknown
146
- def unknown_os?
147
- os == :unknown
148
- end
149
-
150
- # will return true if being launched from a tty
151
- def tty?
152
- $stdin.tty?
153
- end
154
-
155
- # will return true if the cli is being run from an installation, and not a
156
- # development instance. The gem installation will not have a 'test' directory.
157
- # See `#development?` for checking for development environment.
158
- #
159
- def system?
160
- !Dir.exist?(File.join(ShopifyCLI::ROOT, "test"))
161
- end
162
-
163
- # will return true if the cli is running on your development instance.
164
- #
165
- def development?
166
- !system? && !testing?
167
- end
168
-
169
- # will return true while tests are running, either locally or on CI
170
- def testing?
171
- ci? || ENV["SHOPIFY_CLI_TEST"]
172
- end
173
-
174
- ##
175
- # will return true if the cli is being tested on CI
176
- def ci?
177
- ENV["CI"]
178
- end
179
-
180
- ##
181
- # will return true if the cli is running with the DEBUG flag
182
- def debug?
183
- getenv("DEBUG")
184
- end
185
-
186
- # get a environment variable value by name.
187
- #
188
- # #### Parameters
189
- # * `name` - the name of the environment variable that you want to fetch
190
- #
191
- # #### Returns
192
- # * `value` - will return the value, or nil if the variable does not exist
193
- #
194
- def getenv(name)
195
- v = @env[name]
196
- v == "" ? nil : v
197
- end
198
-
199
- # set a environment variable value by name.
200
- #
201
- # #### Parameters
202
- # * `key` - the name of the environment variable that you want to set
203
- # * `value` - the value of the variable
204
- #
205
- def setenv(key, value)
206
- @env[key] = value
207
- end
208
-
209
- # will write/overwrite a file with the provided contents, relative to the context root
210
- # unless the file path is absolute.
211
- #
212
- # #### Parameters
213
- # * `fname` - filename of the file that you are writing, relative to root unless it is absolute.
214
- # * `content` - the body contents of the file that you are writing
215
- #
216
- # #### Example
217
- #
218
- # @ctx.write('new.txt', 'hello world')
219
- #
220
- def write(fname, content)
221
- File.write(ctx_path(fname), content)
222
- end
223
-
224
- # will read a file relative to the context root unless the file path is absolute.
225
- #
226
- # #### Parameters
227
- # * `fname` - filename of the file that you are reading, relative to root unless it is absolute.
228
- #
229
- # #### Example
230
- #
231
- # @ctx.read('file.txt')
232
- #
233
- def read(fname)
234
- File.read(ctx_path(fname))
235
- end
236
-
237
- # will read a binary file relative to the context root unless the file path is absolute.
238
- #
239
- # #### Parameters
240
- # * `fname` - filename of the file that you are reading, relative to root unless it is absolute.
241
- #
242
- # #### Example
243
- #
244
- # @ctx.read('binary.out')
245
- #
246
- def binread(fname)
247
- File.binread(ctx_path(fname))
248
- end
249
-
250
- # will write/overwrite a binary file with the provided contents, relative to the context root
251
- # unless the file path is absolute.
252
- #
253
- # #### Parameters
254
- # * `fname` - filename of the file that you are writing, relative to root unless it is absolute.
255
- # * `content` - the body contents of the file that you are writing
256
- #
257
- # #### Example
258
- #
259
- # @ctx.binwrite('binary.out', 'ASCII-8BIT encoded binary')
260
- #
261
- def binwrite(fname, content)
262
- File.binwrite(ctx_path(fname), content)
263
- end
264
-
265
- # will update the Access and Modified times of a file, relative to the context root
266
- # unless the file path is absolute.
267
- #
268
- # #### Parameters
269
- # * `atime` - the access time
270
- # * `mtime` - the modified time
271
- # * `fname` - filename of the file that you are writing, relative to root unless it is absolute.
272
- #
273
- # #### Example
274
- #
275
- # @ctx.utime(Time.now, Time.now, '/tmp/file.txt')
276
- #
277
- def utime(atime, mtime, fname)
278
- File.utime(atime, mtime, ctx_path(fname))
279
- end
280
-
281
- # will change directories and update the root, the filepath is relative to the command root unless absolute
282
- #
283
- # #### Parameters
284
- # * `path` - the file path to a directory, relative to the context root to remove from the FS
285
- #
286
- def chdir(path)
287
- Dir.chdir(ctx_path(path))
288
- self.root = ctx_path(path)
289
- end
290
-
291
- # checks if a directory exists, the filepath is relative to the command root unless absolute
292
- #
293
- # #### Parameters
294
- # * `path` - the file path to a directory, relative to the context root to remove from the FS
295
- #
296
- def dir_exist?(path)
297
- Dir.exist?(ctx_path(path))
298
- end
299
-
300
- # checks if a file exists, the filepath is relative to the command root unless absolute
301
- #
302
- # #### Parameters
303
- # * `path` - the file path to a file, relative to the context root to remove from the FS
304
- #
305
- def file_exist?(path)
306
- File.exist?(ctx_path(path))
307
- end
308
-
309
- # will recursively copy a directory from the FS, the filepath is relative to the command
310
- # root unless absolute
311
- #
312
- # #### Parameters
313
- # * `from` - the path of the original file
314
- # * `to` - the destination path
315
- #
316
- def cp_r(from, to)
317
- FileUtils.cp_r(ctx_path(from), ctx_path(to))
318
- end
319
-
320
- # will copy a directory from the FS, the filepath is relative to the command
321
- # root unless absolute
322
- #
323
- # #### Parameters
324
- # * `from` - the path of the original file
325
- # * `to` - the destination path
326
- #
327
- def cp(from, to)
328
- FileUtils.cp(ctx_path(from), ctx_path(to))
329
- end
330
-
331
- # will rename a file from one place to another, relative to the command root
332
- # unless the path is absolute.
333
- #
334
- # #### Parameters
335
- # * `from` - the path of the original file
336
- # * `to` - the destination path
337
- #
338
- def rename(from, to)
339
- File.rename(ctx_path(from), ctx_path(to))
340
- end
341
-
342
- # will remove a plain file from the FS, the filepath is relative to the command
343
- # root unless absolute.
344
- #
345
- # #### Parameters
346
- # * `fname` - the file path relative to the context root to remove from the FS
347
- #
348
- def rm(fname)
349
- FileUtils.rm(ctx_path(fname))
350
- end
351
-
352
- # will remove a directory from the FS, the filepath is relative to the command
353
- # root unless absolute
354
- #
355
- # #### Parameters
356
- # * `fname` - the file path to a directory, relative to the context root to remove from the FS
357
- #
358
- def rm_r(fname)
359
- FileUtils.rm_r(ctx_path(fname))
360
- end
361
-
362
- # will force remove a directory from the FS, the filepath is relative to the command
363
- # root unless absolute
364
- #
365
- # #### Parameters
366
- # * `fname` - the file path to a directory, relative to the context root to remove from the FS
367
- #
368
- def rm_rf(fname)
369
- FileUtils.rm_rf(ctx_path(fname))
370
- end
371
-
372
- # will create a directory, recursively if it does not exist. So if you create
373
- # a directory `foo/bar/dun`, this will also create the directories `foo` and
374
- # `foo/bar` if they do not exist. The path will be made relative to the command
375
- # root unless absolute
376
- #
377
- # #### Parameters
378
- # * `path` - file path of the directory that you want to create
379
- #
380
- def mkdir_p(path)
381
- FileUtils.mkdir_p(path)
382
- end
383
-
384
- # will output to the console a link for the user to either copy/paste
385
- # or click on.
386
- #
387
- # #### Parameters
388
- # * `uri` - a http URI to open in a browser
389
- #
390
- def open_url!(uri)
391
- help = message("core.context.open_url", uri)
392
- puts(help)
393
- end
394
-
395
- # will output to the console a link for the user to either copy/paste
396
- # or click on.
397
- #
398
- # #### Parameters
399
- # * `uri` - a http URI to open in a browser
400
- #
401
- def open_browser_url!(uri)
402
- if tty?
403
- if linux? && which("xdg-open")
404
- system("xdg-open", uri.to_s)
405
- elsif windows?
406
- system("start \"\" \"#{uri}\"")
407
- elsif mac? || mac_m1?
408
- system("open", uri.to_s)
409
- else
410
- open_url!(uri)
411
- end
412
- else
413
- open_url!(uri)
414
- end
415
- end
416
-
417
- # will output a message, prefixed by a yellow star, indicating that task
418
- # started.
419
- #
420
- # #### Parameters
421
- # * `text` - a string message to output
422
- #
423
- def print_task(text)
424
- puts "{{yellow:*}} #{text}"
425
- end
426
-
427
- # proxy call to Context.puts.
428
- #
429
- # #### Parameters
430
- # * `text` - a string message to output
431
- #
432
- def puts(*args)
433
- Context.puts(*args)
434
- end
435
-
436
- # a wrapper around $stderr.puts to allow for easy formatting
437
- #
438
- # #### Parameters
439
- # * `text` - a string message to output
440
- #
441
- def error(text)
442
- $stderr.puts(CLI::UI.fmt(text))
443
- end
444
-
445
- # a wrapper around Kernel.warn to allow for easy formatting
446
- #
447
- # #### Parameters
448
- # * `text` - a string message to output
449
- #
450
- def warn(*args)
451
- Kernel.warn(CLI::UI.fmt(*args))
452
- end
453
-
454
- # outputs a message, prefixed by a checkmark indicating that something completed
455
- #
456
- # #### Parameters
457
- # * `text` - a string message to output
458
- #
459
- def done(text)
460
- puts("{{v}} #{text}")
461
- end
462
-
463
- # proxy call to Context.abort.
464
- #
465
- # #### Parameters
466
- # * `error_message` - an error message to output
467
- # * `help_message` - an optional help message
468
- def abort(error_message, help_message = nil)
469
- Context.abort(error_message, help_message)
470
- end
471
-
472
- # outputs a message, prefixed by a red `DEBUG` tag. This will only output to
473
- # the console if you have `DEBUG=1` set in your shell environment.
474
- #
475
- # #### Parameters
476
- # * `text` - a string message to output
477
- #
478
- def debug(text)
479
- puts("{{red:DEBUG}} #{text}") if debug?
480
- end
481
-
482
- # proxy call to Context.message.
483
- #
484
- # #### Parameters
485
- # * `key` - a symbol representing the message
486
- # * `params` - the parameters to format the string with
487
- def message(key, *params)
488
- Context.message(key, *params)
489
- end
490
-
491
- # will grab the host info of the computer running the cli. This indicates the
492
- # computer architecture and operating system
493
- def uname
494
- @uname ||= RbConfig::CONFIG["host"]
495
- end
496
-
497
- # Execute a command in the user's environment
498
- # Outputs result of the command without capturing it
499
- #
500
- # #### Parameters
501
- # - `*args`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
502
- # - `**kwargs`: additional keyword arguments to pass to Process.spawn
503
- #
504
- # #### Returns
505
- # - `status`: The `Process::Status` result of the command execution.
506
- #
507
- # #### Usage
508
- #
509
- # stat = @ctx.system('ls', 'a_folder')
510
- #
511
- def system(*args, **kwargs)
512
- process_status = CLI::Kit::System.system(*args, env: @env, **kwargs)
513
- unless process_status.success?
514
- abort("System call failed: #{args.join(" ")}")
515
- end
516
- process_status
517
- end
518
-
519
- # Execute a command in the user's environment
520
- # This is meant to be largely equivalent to backticks, only with the env passed in.
521
- # Captures the results of the command without output to the console
522
- #
523
- # #### Parameters
524
- # - `*args`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
525
- # - `**kwargs`: additional arguments to pass to Open3.capture2
526
- #
527
- # #### Returns
528
- # - `output`: output (STDOUT) of the command execution
529
- # - `status`: boolean success status of the command execution
530
- #
531
- # #### Usage
532
- #
533
- # out, stat = @ctx.capture2('ls', 'a_folder')
534
- #
535
- def capture2(*args, **kwargs)
536
- CLI::Kit::System.capture2(*args, env: @env, **kwargs)
537
- end
538
-
539
- # Execute a command in the user's environment
540
- # This is meant to be largely equivalent to backticks, only with the env passed in.
541
- # Captures the results of the command without output to the console
542
- #
543
- # #### Parameters
544
- # - `*args`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
545
- # - `**kwargs`: additional arguments to pass to Open3.capture2e
546
- #
547
- # #### Returns
548
- # - `output`: output (STDOUT merged with STDERR) of the command execution
549
- # - `status`: boolean success status of the command execution
550
- #
551
- # #### Usage
552
- #
553
- # out_and_err, stat = @ctx.capture2e('ls', 'a_folder')
554
- #
555
- def capture2e(*args, **kwargs)
556
- CLI::Kit::System.capture2e(*args, env: @env, **kwargs)
557
- end
558
-
559
- # Execute a command in the user's environment
560
- # This is meant to be largely equivalent to backticks, only with the env passed in.
561
- # Captures the results of the command without output to the console
562
- #
563
- # #### Parameters
564
- # - `*args`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
565
- # - `**kwargs`: additional arguments to pass to Open3.capture3
566
- #
567
- # #### Returns
568
- # - `output`: STDOUT of the command execution
569
- # - `error`: STDERR of the command execution
570
- # - `status`: boolean success status of the command execution
571
- #
572
- # #### Usage
573
- #
574
- # out, err, stat = @ctx.capture3('ls', 'a_folder')
575
- #
576
- def capture3(*args, **kwargs)
577
- CLI::Kit::System.capture3(*args, env: @env, **kwargs)
578
- end
579
-
580
- # captures the info signal (ctrl-T) and provide a handler to it.
581
- #
582
- # #### Example
583
- #
584
- # @ctx.on_siginfo do
585
- # @ctx.open_url!("http://google.com")
586
- # end
587
- #
588
- def on_siginfo
589
- # Reset any previous SIGINFO handling we had so the only action we take is the given block
590
- trap("INFO", "DEFAULT")
591
-
592
- fork do
593
- r, w = IO.pipe
594
- @signal = false
595
- trap("SIGINFO") do
596
- @signal = true
597
- w.write(0)
598
- end
599
- while r.read(1)
600
- next unless @signal
601
- @signal = false
602
- yield
603
- end
604
- rescue Interrupt
605
- exit(0)
606
- end
607
- end
608
-
609
- # Checks if the given command exists in the system
610
- #
611
- # #### Parameters
612
- # - `cmd`: The command to test
613
- #
614
- # #### Returns
615
- # The path of the executable if it is found
616
- #
617
- # @todo This is currently a duplicate of CLI::Kit::System.which() - we should make that method public when we make
618
- # Kit changes and make this a wrapper instead.
619
- def which(cmd)
620
- exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : [""]
621
- ENV["PATH"].split(File::PATH_SEPARATOR).each do |path|
622
- exts.each do |ext|
623
- exe = File.join(File.expand_path(path), "#{cmd}#{ext}")
624
- return exe if File.executable?(exe) && !File.directory?(exe)
625
- end
626
- end
627
-
628
- nil
629
- end
630
-
631
- # Checks if there's a newer version of the CLI available and returns version string if
632
- # this should be conveyed to the user (i.e., if it's been over 24 hours since last check)
633
- #
634
- # #### Parameters
635
- #
636
- # #### Returns
637
- # - `version`: string of newer version available, IFF new version is available AND it's time to inform user,
638
- # : nil otherwise
639
- #
640
- def new_version
641
- if (time_of_last_check + VERSION_CHECK_INTERVAL) < (Time.now.to_i)
642
- # Fork is not supported in Windows
643
- if Process.respond_to?(:fork)
644
- fork { retrieve_latest_gem_version }
645
- else
646
- thread = Thread.new { retrieve_latest_gem_version }
647
- at_exit { thread.join }
648
- end
649
- latest_version =
650
- ShopifyCLI::Config.get(VERSION_CHECK_SECTION, LATEST_VERSION_FIELD, default: ShopifyCLI::VERSION)
651
- latest_version if ::Semantic::Version.new(latest_version) > ::Semantic::Version.new(ShopifyCLI::VERSION)
652
- end
653
- end
654
-
655
- # Returns file extension depending on OS
656
- # since windows has multiple extensions, the default is .exe unless otherwise specified
657
- #
658
- # #### Parameters
659
- # - ext: optional extension for windows file
660
- #
661
- # #### Returns
662
- # - ext: string for file extension on windows
663
- # : empty string otherwise
664
- def executable_file_extension(ext = ".exe")
665
- if windows?
666
- ext
667
- else
668
- ""
669
- end
670
- end
671
-
672
- # Uses bundle to grab the version of a gem
673
- #
674
- # #### Parameters
675
- # - gem: the name of the gem to check
676
- #
677
- # #### Returns
678
- # - version: a Semantic::Version object with the gem version
679
- def ruby_gem_version(gem)
680
- version = Bundler.load.specs.find { |s| s.name == gem }.version
681
- ::Semantic::Version.new(version.to_s)
682
- end
683
-
684
- private
685
-
686
- def ctx_path(fname)
687
- require "pathname"
688
- if Pathname.new(fname).absolute?
689
- fname
690
- else
691
- File.join(root, fname)
692
- end
693
- end
694
-
695
- def retrieve_latest_gem_version
696
- response = Net::HTTP.get_response(GEM_LATEST_URI)
697
- latest = JSON.parse(response.body)
698
- ShopifyCLI::Config.set(VERSION_CHECK_SECTION, LATEST_VERSION_FIELD, latest["version"])
699
- rescue
700
- nil
701
- ensure
702
- ShopifyCLI::Config.set(VERSION_CHECK_SECTION, LAST_CHECKED_AT_FIELD, Time.now.to_i)
703
- end
704
-
705
- def time_of_last_check
706
- (val = ShopifyCLI::Config.get(VERSION_CHECK_SECTION, LAST_CHECKED_AT_FIELD)) ? val.to_i : 0
707
- end
708
- end
709
- end