@shopify/cli 3.69.4 → 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 (540) hide show
  1. package/{dist/assets/cli-ruby/LICENSE → LICENSE} +0 -2
  2. package/dist/chunk-2PUMVRDO.js +131 -0
  3. package/dist/{chunk-KM4TMAQ2.js → chunk-335KXO4I.js} +12 -8
  4. package/dist/{chunk-HV364V3E.js → chunk-43YGIE7Y.js} +2 -2
  5. package/dist/chunk-47OJGAFT.js +28 -0
  6. package/dist/chunk-5OP2SA7G.js +3634 -0
  7. package/dist/{chunk-YNL4XNMX.js → chunk-5QQTRGJ7.js} +4 -4
  8. package/dist/{chunk-FWX3KCDM.js → chunk-7GNQ7YY4.js} +7 -7
  9. package/dist/{chunk-2JRUKBKX.js → chunk-AT4IG4GJ.js} +32 -216
  10. package/dist/{chunk-BMTELIUS.js → chunk-BMNDAI5O.js} +4 -4
  11. package/dist/{chunk-6XKWVDB6.js → chunk-CBBS4CV7.js} +3 -3
  12. package/dist/{chunk-27ILOE3X.js → chunk-CBD6UXLA.js} +8 -8
  13. package/dist/chunk-DVTWERMH.js +105 -0
  14. package/dist/{chunk-FX2HB3CJ.js → chunk-E2SYFYJU.js} +4 -4
  15. package/dist/{chunk-JHVVETTP.js → chunk-FDJVVEGH.js} +17 -7
  16. package/dist/{chunk-7NPDPZ22.js → chunk-GDYKHT64.js} +2610 -6199
  17. package/dist/{chunk-EJGKAHVK.js → chunk-I3IIDOBX.js} +3 -3
  18. package/dist/{chunk-ISDSND4L.js → chunk-JLK5OMFF.js} +2 -2
  19. package/dist/{chunk-N3U3EHOE.js → chunk-KYBCPKPL.js} +3 -3
  20. package/dist/{chunk-S2IXL3EU.js → chunk-LN444KRM.js} +2 -2
  21. package/dist/chunk-MH5JSAVK.js +28 -0
  22. package/dist/{chunk-TLZ4ZBH3.js → chunk-MMQOVZDR.js} +6 -4
  23. package/dist/{chunk-UQUVQV3X.js → chunk-MQXHFQM3.js} +4 -4
  24. package/dist/{chunk-F54UWMGQ.js → chunk-MRDDDATQ.js} +3 -3
  25. package/dist/{chunk-6IATSQ3X.js → chunk-N2DEYZD6.js} +3 -3
  26. package/dist/{chunk-334DJQUN.js → chunk-N4X7XQWN.js} +2 -2
  27. package/dist/{chunk-YPWRQ5AU.js → chunk-ND6AGPC6.js} +3 -3
  28. package/dist/{chunk-A3JXD7N7.js → chunk-NEOIQ6PN.js} +3 -3
  29. package/dist/{chunk-OWCYMR5Y.js → chunk-NH4U4X67.js} +3 -3
  30. package/dist/{chunk-VQ3R5DHS.js → chunk-NYFXBTWK.js} +3 -3
  31. package/dist/{chunk-GYP4MV72.js → chunk-P6ABWRKD.js} +7 -7
  32. package/dist/{chunk-2NCWYVM4.js → chunk-PJKCWDDX.js} +117 -117
  33. package/dist/{chunk-VHEJRU4K.js → chunk-PKE54TAY.js} +5 -5
  34. package/dist/{chunk-FVUAIT37.js → chunk-RUK73IAH.js} +2 -2
  35. package/dist/{chunk-RYTZQSHH.js → chunk-SYRHCENA.js} +2 -2
  36. package/dist/{chunk-K3GASX6Y.js → chunk-TCTXUAZT.js} +3 -3
  37. package/dist/chunk-UOZCMFCN.js +160 -0
  38. package/dist/{chunk-7B5FNNVB.js → chunk-VFQMUAHB.js} +4 -4
  39. package/dist/{chunk-ORDEDRCZ.js → chunk-VHAXHYTL.js} +3 -3
  40. package/dist/{chunk-CPEFXM7T.js → chunk-VT3VJHZ7.js} +4 -4
  41. package/dist/{chunk-TV5WOUSX.js → chunk-WI6MEN7U.js} +2 -2
  42. package/dist/{chunk-WHP4CEBJ.js → chunk-WN3FKMKB.js} +14 -14
  43. package/dist/{chunk-Y3MSANL5.js → chunk-X6F3DHKX.js} +2 -2
  44. package/dist/{chunk-P7JUHQKL.js → chunk-XEDHKQZA.js} +4 -3
  45. package/dist/{chunk-BRO6DC7D.js → chunk-XSMWYZDC.js} +17 -23
  46. package/dist/cli/commands/auth/logout.js +20 -18
  47. package/dist/cli/commands/auth/logout.test.js +25 -23
  48. package/dist/cli/commands/cache/clear.d.ts +6 -0
  49. package/dist/cli/commands/cache/clear.js +35 -0
  50. package/dist/cli/commands/debug/command-flags.js +19 -17
  51. package/dist/cli/commands/demo/catalog.js +20 -18
  52. package/dist/cli/commands/demo/generate-file.js +20 -18
  53. package/dist/cli/commands/demo/index.js +20 -18
  54. package/dist/cli/commands/demo/print-ai-prompt.js +20 -18
  55. package/dist/cli/commands/docs/generate.js +19 -17
  56. package/dist/cli/commands/docs/generate.test.js +19 -17
  57. package/dist/cli/commands/help.js +19 -17
  58. package/dist/cli/commands/kitchen-sink/async.js +20 -18
  59. package/dist/cli/commands/kitchen-sink/async.test.js +20 -18
  60. package/dist/cli/commands/kitchen-sink/index.js +22 -20
  61. package/dist/cli/commands/kitchen-sink/index.test.js +22 -20
  62. package/dist/cli/commands/kitchen-sink/prompts.js +20 -18
  63. package/dist/cli/commands/kitchen-sink/prompts.test.js +20 -18
  64. package/dist/cli/commands/kitchen-sink/static.js +20 -18
  65. package/dist/cli/commands/kitchen-sink/static.test.js +20 -18
  66. package/dist/cli/commands/notifications/generate.d.ts +6 -0
  67. package/dist/cli/commands/notifications/generate.js +36 -0
  68. package/dist/cli/commands/notifications/list.d.ts +6 -0
  69. package/dist/cli/commands/notifications/list.js +36 -0
  70. package/dist/cli/commands/search.js +20 -18
  71. package/dist/cli/commands/upgrade.js +20 -18
  72. package/dist/cli/commands/version.js +20 -18
  73. package/dist/cli/commands/version.test.js +20 -18
  74. package/dist/cli/services/commands/notifications.d.ts +2 -0
  75. package/dist/cli/services/commands/notifications.js +31 -0
  76. package/dist/cli/services/commands/search.js +9 -9
  77. package/dist/cli/services/commands/search.test.js +9 -9
  78. package/dist/cli/services/commands/version.js +10 -10
  79. package/dist/cli/services/commands/version.test.js +11 -11
  80. package/dist/cli/services/demo.js +9 -9
  81. package/dist/cli/services/demo.test.js +11 -11
  82. package/dist/cli/services/kitchen-sink/async.js +9 -9
  83. package/dist/cli/services/kitchen-sink/prompts.js +9 -9
  84. package/dist/cli/services/kitchen-sink/static.js +9 -9
  85. package/dist/cli/services/upgrade.js +10 -10
  86. package/dist/cli/services/upgrade.test.js +12 -12
  87. package/dist/{constants-T7JXE5K7.js → constants-QFFDI47A.js} +6 -4
  88. package/dist/{custom-oclif-loader-TBU3GENB.js → custom-oclif-loader-IZLFCRGJ.js} +11 -11
  89. package/dist/data/filters.json +39 -16
  90. package/dist/data/latest.json +1 -1
  91. package/dist/data/objects.json +164 -6
  92. package/dist/data/shopify_system_translations.json +32 -3
  93. package/dist/{del-7ZS2Z64N.js → del-FEQWOMIX.js} +2 -2
  94. package/dist/{error-handler-IL72ACEX.js → error-handler-DAI5HMQW.js} +17 -16
  95. package/dist/hooks/postrun.js +14 -13
  96. package/dist/hooks/prerun.js +14 -13
  97. package/dist/index.js +9901 -8692
  98. package/dist/{lib-JHUCJTHS.js → lib-JJXX7GH6.js} +5 -5
  99. package/dist/{local-OE2I46PA.js → local-QD6GDUUE.js} +9 -9
  100. package/dist/{morph-UIXWG2S7.js → morph-FN23MJ2S.js} +2 -2
  101. package/dist/{node-SDBKEHIV.js → node-4XKDIIJ7.js} +21 -19
  102. package/dist/{node-package-manager-LPDV6HZY.js → node-package-manager-IEZ6F5VN.js} +10 -10
  103. package/dist/{system-SGABHAU2.js → system-KSIGUX64.js} +9 -9
  104. package/dist/tsconfig.tsbuildinfo +1 -1
  105. package/dist/{ui-WB42ZV4M.js → ui-BUB4OWO7.js} +9 -9
  106. package/dist/{workerd-YWTPL4SF.js → workerd-DIIGDIHZ.js} +21 -19
  107. package/oclif.manifest.json +60 -93
  108. package/package.json +6 -6
  109. package/dist/assets/cli-ruby/.devcontainer.json +0 -5
  110. package/dist/assets/cli-ruby/.rubocop.yml +0 -102
  111. package/dist/assets/cli-ruby/.rubocop_todo.yml +0 -24
  112. package/dist/assets/cli-ruby/CHANGELOG.md +0 -634
  113. package/dist/assets/cli-ruby/CONTRIBUTING.md +0 -3
  114. package/dist/assets/cli-ruby/Codespace.dockerfile +0 -35
  115. package/dist/assets/cli-ruby/Gemfile +0 -32
  116. package/dist/assets/cli-ruby/README.md +0 -30
  117. package/dist/assets/cli-ruby/Rakefile +0 -167
  118. package/dist/assets/cli-ruby/SECURITY.md +0 -59
  119. package/dist/assets/cli-ruby/Tests.dockerfile +0 -35
  120. package/dist/assets/cli-ruby/assets/logo.png +0 -0
  121. package/dist/assets/cli-ruby/bin/console +0 -11
  122. package/dist/assets/cli-ruby/bin/load_shopify.rb +0 -22
  123. package/dist/assets/cli-ruby/bin/shopify +0 -67
  124. package/dist/assets/cli-ruby/bin/shopify.bat +0 -3
  125. package/dist/assets/cli-ruby/bin/update-deps +0 -97
  126. package/dist/assets/cli-ruby/dev.yml +0 -29
  127. package/dist/assets/cli-ruby/docs/README.md +0 -13
  128. package/dist/assets/cli-ruby/docs/contributors/testing.md +0 -27
  129. package/dist/assets/cli-ruby/docs/users/installation.md +0 -3
  130. package/dist/assets/cli-ruby/docs/users/migrate-from-themekit.md +0 -18
  131. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256 +0 -1
  132. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256 +0 -1
  133. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256 +0 -1
  134. package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.3.0.gz.sha256 +0 -1
  135. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256 +0 -1
  136. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256 +0 -1
  137. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256 +0 -1
  138. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.3.0.gz.sha256 +0 -1
  139. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256 +0 -1
  140. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256 +0 -1
  141. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256 +0 -1
  142. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.3.0.gz.sha256 +0 -1
  143. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256 +0 -1
  144. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256 +0 -1
  145. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256 +0 -1
  146. package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.3.0.gz.sha256 +0 -1
  147. package/dist/assets/cli-ruby/ext/javy/javy.rb +0 -204
  148. package/dist/assets/cli-ruby/ext/javy/version +0 -1
  149. package/dist/assets/cli-ruby/ext/shopify-extensions/extconf.rb +0 -21
  150. package/dist/assets/cli-ruby/ext/shopify-extensions/shopify_extensions.rb +0 -152
  151. package/dist/assets/cli-ruby/ext/shopify-extensions/version +0 -1
  152. package/dist/assets/cli-ruby/features/support/assertions.rb +0 -17
  153. package/dist/assets/cli-ruby/features/support/cli.rb +0 -7
  154. package/dist/assets/cli-ruby/features/support/process.rb +0 -27
  155. package/dist/assets/cli-ruby/features/support/requires.rb +0 -3
  156. package/dist/assets/cli-ruby/lib/docgen/class_template.md.erb +0 -81
  157. package/dist/assets/cli-ruby/lib/docgen/index_template.md.erb +0 -5
  158. package/dist/assets/cli-ruby/lib/docgen/markdown.rb +0 -101
  159. package/dist/assets/cli-ruby/lib/graphql/admin_introspection.graphql +0 -87
  160. package/dist/assets/cli-ruby/lib/graphql/all_organizations.graphql +0 -19
  161. package/dist/assets/cli-ruby/lib/graphql/all_orgs_with_apps.graphql +0 -30
  162. package/dist/assets/cli-ruby/lib/graphql/api_versions.graphql +0 -6
  163. package/dist/assets/cli-ruby/lib/graphql/convert_dev_to_test_store.graphql +0 -10
  164. package/dist/assets/cli-ruby/lib/graphql/create_app.graphql +0 -20
  165. package/dist/assets/cli-ruby/lib/graphql/create_customer.graphql +0 -9
  166. package/dist/assets/cli-ruby/lib/graphql/create_draft_order.graphql +0 -8
  167. package/dist/assets/cli-ruby/lib/graphql/create_product.graphql +0 -9
  168. package/dist/assets/cli-ruby/lib/graphql/extension_create.graphql +0 -37
  169. package/dist/assets/cli-ruby/lib/graphql/extension_update_draft.graphql +0 -19
  170. package/dist/assets/cli-ruby/lib/graphql/fetch_specifications.graphql +0 -14
  171. package/dist/assets/cli-ruby/lib/graphql/find_organization.graphql +0 -18
  172. package/dist/assets/cli-ruby/lib/graphql/find_organization_with_apps.graphql +0 -20
  173. package/dist/assets/cli-ruby/lib/graphql/get_app_by_api_key.graphql +0 -9
  174. package/dist/assets/cli-ruby/lib/graphql/get_app_urls.graphql +0 -6
  175. package/dist/assets/cli-ruby/lib/graphql/get_extension_registrations.graphql +0 -28
  176. package/dist/assets/cli-ruby/lib/graphql/get_variant_id.graphql +0 -16
  177. package/dist/assets/cli-ruby/lib/graphql/update_dashboard_urls.graphql +0 -8
  178. package/dist/assets/cli-ruby/lib/project_types/extension/cli.rb +0 -75
  179. package/dist/assets/cli-ruby/lib/project_types/extension/commands/extension_command.rb +0 -29
  180. package/dist/assets/cli-ruby/lib/project_types/extension/commands/serve.rb +0 -164
  181. package/dist/assets/cli-ruby/lib/project_types/extension/errors.rb +0 -9
  182. package/dist/assets/cli-ruby/lib/project_types/extension/extension_project.rb +0 -151
  183. package/dist/assets/cli-ruby/lib/project_types/extension/extension_project_keys.rb +0 -12
  184. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo.rb +0 -50
  185. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_config.rb +0 -59
  186. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_dependencies.rb +0 -28
  187. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_runtime.rb +0 -15
  188. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_serve.rb +0 -115
  189. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup.rb +0 -54
  190. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup_step.rb +0 -31
  191. package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup_steps.rb +0 -51
  192. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/admin.rb +0 -29
  193. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/base.rb +0 -19
  194. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_post_purchase.rb +0 -23
  195. package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_ui_extension.rb +0 -29
  196. package/dist/assets/cli-ruby/lib/project_types/extension/loaders/project.rb +0 -50
  197. package/dist/assets/cli-ruby/lib/project_types/extension/loaders/specification_handler.rb +0 -22
  198. package/dist/assets/cli-ruby/lib/project_types/extension/messages/message_loading.rb +0 -34
  199. package/dist/assets/cli-ruby/lib/project_types/extension/messages/messages.rb +0 -320
  200. package/dist/assets/cli-ruby/lib/project_types/extension/models/app.rb +0 -14
  201. package/dist/assets/cli-ruby/lib/project_types/extension/models/lazy_specification_handler.rb +0 -12
  202. package/dist/assets/cli-ruby/lib/project_types/extension/models/specification.rb +0 -41
  203. package/dist/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/default.rb +0 -145
  204. package/dist/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +0 -134
  205. package/dist/assets/cli-ruby/lib/project_types/extension/models/specifications.rb +0 -91
  206. package/dist/assets/cli-ruby/lib/project_types/extension/models/validation_error.rb +0 -17
  207. package/dist/assets/cli-ruby/lib/project_types/extension/models/version.rb +0 -15
  208. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/configure_features.rb +0 -73
  209. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/configure_options.rb +0 -21
  210. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/converters/validation_error_converter.rb +0 -25
  211. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/converters/version_converter.rb +0 -28
  212. package/dist/assets/cli-ruby/lib/project_types/extension/tasks/fetch_specifications.rb +0 -21
  213. package/dist/assets/cli-ruby/lib/project_types/node/cli.rb +0 -12
  214. package/dist/assets/cli-ruby/lib/project_types/node/forms/create.rb +0 -45
  215. package/dist/assets/cli-ruby/lib/project_types/node/messages/messages.rb +0 -33
  216. package/dist/assets/cli-ruby/lib/project_types/php/cli.rb +0 -16
  217. package/dist/assets/cli-ruby/lib/project_types/php/forms/create.rb +0 -44
  218. package/dist/assets/cli-ruby/lib/project_types/php/messages/messages.rb +0 -29
  219. package/dist/assets/cli-ruby/lib/project_types/rails/cli.rb +0 -15
  220. package/dist/assets/cli-ruby/lib/project_types/rails/forms/create.rb +0 -75
  221. package/dist/assets/cli-ruby/lib/project_types/rails/gem.rb +0 -110
  222. package/dist/assets/cli-ruby/lib/project_types/rails/messages/messages.rb +0 -101
  223. package/dist/assets/cli-ruby/lib/project_types/script/cli.rb +0 -27
  224. package/dist/assets/cli-ruby/lib/project_types/script/commands/connect.rb +0 -16
  225. package/dist/assets/cli-ruby/lib/project_types/script/commands/create.rb +0 -24
  226. package/dist/assets/cli-ruby/lib/project_types/script/commands/javy.rb +0 -24
  227. package/dist/assets/cli-ruby/lib/project_types/script/commands/push.rb +0 -26
  228. package/dist/assets/cli-ruby/lib/project_types/script/loaders/project.rb +0 -46
  229. package/dist/assets/cli-ruby/lib/project_types/script/loaders/specification_handler.rb +0 -22
  230. package/dist/assets/cli-ruby/lib/project_types/script/messages/messages.rb +0 -11
  231. package/dist/assets/cli-ruby/lib/project_types/theme/cli.rb +0 -33
  232. package/dist/assets/cli-ruby/lib/project_types/theme/commands/common/root_helper.rb +0 -94
  233. package/dist/assets/cli-ruby/lib/project_types/theme/commands/common/shop_helper.rb +0 -13
  234. package/dist/assets/cli-ruby/lib/project_types/theme/commands/console.rb +0 -23
  235. package/dist/assets/cli-ruby/lib/project_types/theme/commands/delete.rb +0 -70
  236. package/dist/assets/cli-ruby/lib/project_types/theme/commands/init.rb +0 -46
  237. package/dist/assets/cli-ruby/lib/project_types/theme/commands/list.rb +0 -33
  238. package/dist/assets/cli-ruby/lib/project_types/theme/commands/open.rb +0 -73
  239. package/dist/assets/cli-ruby/lib/project_types/theme/commands/package.rb +0 -73
  240. package/dist/assets/cli-ruby/lib/project_types/theme/commands/publish.rb +0 -49
  241. package/dist/assets/cli-ruby/lib/project_types/theme/commands/pull.rb +0 -118
  242. package/dist/assets/cli-ruby/lib/project_types/theme/commands/push.rb +0 -160
  243. package/dist/assets/cli-ruby/lib/project_types/theme/commands/serve.rb +0 -91
  244. package/dist/assets/cli-ruby/lib/project_types/theme/commands/share.rb +0 -62
  245. package/dist/assets/cli-ruby/lib/project_types/theme/commands/token.rb +0 -22
  246. package/dist/assets/cli-ruby/lib/project_types/theme/conversions/base_glob.rb +0 -65
  247. package/dist/assets/cli-ruby/lib/project_types/theme/conversions/ignore_glob.rb +0 -15
  248. package/dist/assets/cli-ruby/lib/project_types/theme/conversions/include_glob.rb +0 -15
  249. package/dist/assets/cli-ruby/lib/project_types/theme/forms/confirm_store.rb +0 -15
  250. package/dist/assets/cli-ruby/lib/project_types/theme/forms/select.rb +0 -34
  251. package/dist/assets/cli-ruby/lib/project_types/theme/messages/messages.rb +0 -429
  252. package/dist/assets/cli-ruby/lib/project_types/theme/models/specification_handlers/theme.rb +0 -19
  253. package/dist/assets/cli-ruby/lib/project_types/theme/presenters/theme_presenter.rb +0 -48
  254. package/dist/assets/cli-ruby/lib/project_types/theme/presenters/themes_presenter.rb +0 -29
  255. package/dist/assets/cli-ruby/lib/project_types/theme/ui/sync_progress_bar.rb +0 -20
  256. package/dist/assets/cli-ruby/lib/rubygems_plugin.rb +0 -26
  257. package/dist/assets/cli-ruby/lib/shopify_cli/admin_api.rb +0 -160
  258. package/dist/assets/cli-ruby/lib/shopify_cli/api.rb +0 -130
  259. package/dist/assets/cli-ruby/lib/shopify_cli/command/project_command.rb +0 -31
  260. package/dist/assets/cli-ruby/lib/shopify_cli/command/sub_command.rb +0 -20
  261. package/dist/assets/cli-ruby/lib/shopify_cli/command.rb +0 -166
  262. package/dist/assets/cli-ruby/lib/shopify_cli/commands.rb +0 -21
  263. package/dist/assets/cli-ruby/lib/shopify_cli/constants.rb +0 -101
  264. package/dist/assets/cli-ruby/lib/shopify_cli/context.rb +0 -709
  265. package/dist/assets/cli-ruby/lib/shopify_cli/core/cli_version.rb +0 -20
  266. package/dist/assets/cli-ruby/lib/shopify_cli/core/entry_point.rb +0 -64
  267. package/dist/assets/cli-ruby/lib/shopify_cli/core/executor.rb +0 -23
  268. package/dist/assets/cli-ruby/lib/shopify_cli/core/finalize.rb +0 -13
  269. package/dist/assets/cli-ruby/lib/shopify_cli/core/monorail.rb +0 -122
  270. package/dist/assets/cli-ruby/lib/shopify_cli/core.rb +0 -8
  271. package/dist/assets/cli-ruby/lib/shopify_cli/db.rb +0 -114
  272. package/dist/assets/cli-ruby/lib/shopify_cli/environment.rb +0 -217
  273. package/dist/assets/cli-ruby/lib/shopify_cli/exception_reporter.rb +0 -80
  274. package/dist/assets/cli-ruby/lib/shopify_cli/feature.rb +0 -95
  275. package/dist/assets/cli-ruby/lib/shopify_cli/file_system_listener.rb +0 -30
  276. package/dist/assets/cli-ruby/lib/shopify_cli/form.rb +0 -42
  277. package/dist/assets/cli-ruby/lib/shopify_cli/git.rb +0 -320
  278. package/dist/assets/cli-ruby/lib/shopify_cli/github/issue_url_generator.rb +0 -30
  279. package/dist/assets/cli-ruby/lib/shopify_cli/github.rb +0 -5
  280. package/dist/assets/cli-ruby/lib/shopify_cli/helpers/haikunator.rb +0 -92
  281. package/dist/assets/cli-ruby/lib/shopify_cli/helpers.rb +0 -5
  282. package/dist/assets/cli-ruby/lib/shopify_cli/http_request.rb +0 -43
  283. package/dist/assets/cli-ruby/lib/shopify_cli/identity_auth/env_auth_token.rb +0 -34
  284. package/dist/assets/cli-ruby/lib/shopify_cli/identity_auth.rb +0 -332
  285. package/dist/assets/cli-ruby/lib/shopify_cli/js_system.rb +0 -115
  286. package/dist/assets/cli-ruby/lib/shopify_cli/lazy_delegator.rb +0 -55
  287. package/dist/assets/cli-ruby/lib/shopify_cli/messages/messages.rb +0 -863
  288. package/dist/assets/cli-ruby/lib/shopify_cli/method_object.rb +0 -123
  289. package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migration.rb +0 -27
  290. package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +0 -13
  291. package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1633691650_merge_reporting_configuration.rb +0 -41
  292. package/dist/assets/cli-ruby/lib/shopify_cli/migrator.rb +0 -46
  293. package/dist/assets/cli-ruby/lib/shopify_cli/options.rb +0 -40
  294. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions/job.rb +0 -36
  295. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions.rb +0 -46
  296. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/organizations.rb +0 -45
  297. package/dist/assets/cli-ruby/lib/shopify_cli/partners_api.rb +0 -91
  298. package/dist/assets/cli-ruby/lib/shopify_cli/project.rb +0 -199
  299. package/dist/assets/cli-ruby/lib/shopify_cli/project_type.rb +0 -66
  300. package/dist/assets/cli-ruby/lib/shopify_cli/reporting_configuration_controller.rb +0 -29
  301. package/dist/assets/cli-ruby/lib/shopify_cli/resolve_constant.rb +0 -25
  302. package/dist/assets/cli-ruby/lib/shopify_cli/resources/env_file.rb +0 -108
  303. package/dist/assets/cli-ruby/lib/shopify_cli/resources.rb +0 -5
  304. package/dist/assets/cli-ruby/lib/shopify_cli/result.rb +0 -448
  305. package/dist/assets/cli-ruby/lib/shopify_cli/shopifolk.rb +0 -82
  306. package/dist/assets/cli-ruby/lib/shopify_cli/task.rb +0 -20
  307. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/confirm_store.rb +0 -18
  308. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/create_api_client.rb +0 -40
  309. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_authenticated.rb +0 -19
  310. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_dev_store.rb +0 -41
  311. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_env.rb +0 -90
  312. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_git_dependency.rb +0 -14
  313. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_loopback_url.rb +0 -20
  314. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_project_type.rb +0 -14
  315. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/select_org_and_shop.rb +0 -81
  316. package/dist/assets/cli-ruby/lib/shopify_cli/tasks/update_dashboard_urls.rb +0 -57
  317. package/dist/assets/cli-ruby/lib/shopify_cli/tasks.rb +0 -44
  318. package/dist/assets/cli-ruby/lib/shopify_cli/theme/backoff_helper.rb +0 -47
  319. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/cdn_fonts.rb +0 -82
  320. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/certificate_manager.rb +0 -79
  321. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/errors.rb +0 -9
  322. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/header_hash.rb +0 -98
  323. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hooks/file_change_hook.rb +0 -77
  324. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_deleter.rb +0 -62
  325. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_reloader.rb +0 -63
  326. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot-reload-no-script.html +0 -27
  327. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot_reload.js +0 -48
  328. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/sse_client.js +0 -43
  329. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme.js +0 -114
  330. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme_extension.js +0 -121
  331. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/script_injector.rb +0 -57
  332. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/sections_index.rb +0 -50
  333. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload.rb +0 -75
  334. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/local_assets.rb +0 -101
  335. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +0 -313
  336. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy_param_builder.rb +0 -84
  337. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/reload_mode.rb +0 -34
  338. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb +0 -35
  339. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher.rb +0 -44
  340. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/sse.rb +0 -75
  341. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/watcher.rb +0 -64
  342. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/web_server.rb +0 -140
  343. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server.rb +0 -332
  344. package/dist/assets/cli-ruby/lib/shopify_cli/theme/development_theme.rb +0 -101
  345. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/app_extension.rb +0 -40
  346. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hooks/file_change_hook.rb +0 -76
  347. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload/script_injector.rb +0 -30
  348. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload.rb +0 -13
  349. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/local_assets.rb +0 -31
  350. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/proxy_param_builder.rb +0 -94
  351. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/watcher.rb +0 -49
  352. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server.rb +0 -175
  353. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/host_theme.rb +0 -109
  354. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ignore_helper.rb +0 -35
  355. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/extension_serve_job.rb +0 -120
  356. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/operation.rb +0 -25
  357. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer.rb +0 -100
  358. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_progress_bar.rb +0 -35
  359. package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_raw_progress_bar.rb +0 -40
  360. package/dist/assets/cli-ruby/lib/shopify_cli/theme/file.rb +0 -133
  361. package/dist/assets/cli-ruby/lib/shopify_cli/theme/filter/path_matcher.rb +0 -38
  362. package/dist/assets/cli-ruby/lib/shopify_cli/theme/ignore_filter.rb +0 -112
  363. package/dist/assets/cli-ruby/lib/shopify_cli/theme/ignore_helper.rb +0 -37
  364. package/dist/assets/cli-ruby/lib/shopify_cli/theme/include_filter.rb +0 -67
  365. package/dist/assets/cli-ruby/lib/shopify_cli/theme/mime_type.rb +0 -34
  366. package/dist/assets/cli-ruby/lib/shopify_cli/theme/notifier.rb +0 -52
  367. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/api.rb +0 -109
  368. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_dev_server.rb +0 -93
  369. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_middleware.rb +0 -97
  370. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/remote_evaluator.rb +0 -166
  371. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/success.html +0 -78
  372. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/template.liquid +0 -15
  373. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/snippet.rb +0 -81
  374. package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl.rb +0 -88
  375. package/dist/assets/cli-ruby/lib/shopify_cli/theme/root.rb +0 -62
  376. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/checksums.rb +0 -66
  377. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/downloader.rb +0 -63
  378. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/error_reporter.rb +0 -45
  379. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/merger.rb +0 -53
  380. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/operation.rb +0 -49
  381. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/standard_reporter.rb +0 -32
  382. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/unsupported_script_warning.rb +0 -90
  383. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk.rb +0 -133
  384. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_item.rb +0 -64
  385. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_job.rb +0 -139
  386. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_request.rb +0 -30
  387. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb +0 -41
  388. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all_form.rb +0 -37
  389. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb +0 -64
  390. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_delete_strategy.rb +0 -29
  391. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_update_strategy.rb +0 -30
  392. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_delete_handler.rb +0 -49
  393. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_update_handler.rb +0 -71
  394. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader.rb +0 -231
  395. package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb +0 -391
  396. package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme.rb +0 -212
  397. package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme_access_api.rb +0 -89
  398. package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme_admin_api.rb +0 -101
  399. package/dist/assets/cli-ruby/lib/shopify_cli/thread_pool/job.rb +0 -35
  400. package/dist/assets/cli-ruby/lib/shopify_cli/thread_pool.rb +0 -49
  401. package/dist/assets/cli-ruby/lib/shopify_cli/transform_data_structure.rb +0 -87
  402. package/dist/assets/cli-ruby/lib/shopify_cli/utilities.rb +0 -21
  403. package/dist/assets/cli-ruby/lib/shopify_cli/version.rb +0 -3
  404. package/dist/assets/cli-ruby/lib/shopify_cli.rb +0 -182
  405. package/dist/assets/cli-ruby/shipit.rubygems.yml +0 -3
  406. package/dist/assets/cli-ruby/shopify-cli.gemspec +0 -46
  407. package/dist/assets/cli-ruby/shopify-dev +0 -16
  408. package/dist/assets/cli-ruby/test/minitest_ext.rb +0 -115
  409. package/dist/assets/cli-ruby/test/project_types/extension/extension_test_helpers.rb +0 -70
  410. package/dist/assets/cli-ruby/test/shopify-cli/migrator/migrations/migration_helper.rb +0 -20
  411. package/dist/assets/cli-ruby/test/test_helpers.rb +0 -16
  412. package/dist/assets/cli-ruby/utilities/constants.rb +0 -7
  413. package/dist/assets/cli-ruby/utilities/docker/container.rb +0 -104
  414. package/dist/assets/cli-ruby/utilities/docker.rb +0 -89
  415. package/dist/assets/cli-ruby/utilities/utilities.rb +0 -6
  416. package/dist/assets/cli-ruby/vendor/deps/cli-kit/REVISION +0 -1
  417. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +0 -21
  418. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +0 -49
  419. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +0 -94
  420. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/config.rb +0 -133
  421. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +0 -123
  422. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/executor.rb +0 -79
  423. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ini.rb +0 -102
  424. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +0 -82
  425. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/logger.rb +0 -82
  426. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +0 -60
  427. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ruby_backports/enumerable.rb +0 -6
  428. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +0 -244
  429. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support.rb +0 -9
  430. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/system.rb +0 -243
  431. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/util.rb +0 -193
  432. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/version.rb +0 -5
  433. package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit.rb +0 -60
  434. package/dist/assets/cli-ruby/vendor/deps/cli-ui/REVISION +0 -1
  435. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +0 -157
  436. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/color.rb +0 -84
  437. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +0 -193
  438. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +0 -98
  439. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +0 -166
  440. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +0 -139
  441. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +0 -120
  442. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame.rb +0 -269
  443. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +0 -84
  444. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/os.rb +0 -73
  445. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/printer.rb +0 -59
  446. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress.rb +0 -90
  447. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress_plain.rb +0 -50
  448. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +0 -484
  449. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +0 -29
  450. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +0 -282
  451. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +0 -40
  452. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +0 -263
  453. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +0 -66
  454. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +0 -232
  455. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +0 -46
  456. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +0 -102
  457. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/version.rb +0 -5
  458. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +0 -27
  459. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +0 -61
  460. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +0 -77
  461. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +0 -56
  462. package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui.rb +0 -234
  463. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/LICENSE +0 -22
  464. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/README.md +0 -67
  465. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/Rakefile +0 -54
  466. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/lib/ruby2_keywords.rb +0 -57
  467. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/ruby2_keywords.gemspec +0 -18
  468. package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/test/test_keyword.rb +0 -41
  469. package/dist/assets/cli-ruby/vendor/deps/smart_properties/REVISION +0 -1
  470. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/errors.rb +0 -114
  471. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property.rb +0 -168
  472. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property_collection.rb +0 -83
  473. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations/ancestor.rb +0 -27
  474. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations.rb +0 -8
  475. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/version.rb +0 -3
  476. package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties.rb +0 -174
  477. package/dist/assets/cli-ruby/vendor/deps/webrick/Gemfile +0 -3
  478. package/dist/assets/cli-ruby/vendor/deps/webrick/LICENSE.txt +0 -22
  479. package/dist/assets/cli-ruby/vendor/deps/webrick/README.md +0 -61
  480. package/dist/assets/cli-ruby/vendor/deps/webrick/Rakefile +0 -10
  481. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/accesslog.rb +0 -157
  482. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cgi.rb +0 -313
  483. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/compat.rb +0 -36
  484. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/config.rb +0 -158
  485. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cookie.rb +0 -172
  486. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/htmlutils.rb +0 -30
  487. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +0 -117
  488. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +0 -116
  489. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +0 -395
  490. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +0 -132
  491. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +0 -97
  492. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +0 -158
  493. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +0 -53
  494. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth.rb +0 -96
  495. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpproxy.rb +0 -354
  496. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httprequest.rb +0 -636
  497. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpresponse.rb +0 -564
  498. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/https.rb +0 -152
  499. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpserver.rb +0 -294
  500. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +0 -152
  501. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +0 -47
  502. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +0 -126
  503. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +0 -88
  504. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +0 -552
  505. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +0 -47
  506. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet.rb +0 -23
  507. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpstatus.rb +0 -194
  508. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httputils.rb +0 -512
  509. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpversion.rb +0 -76
  510. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/log.rb +0 -156
  511. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/server.rb +0 -381
  512. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/ssl.rb +0 -215
  513. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/utils.rb +0 -265
  514. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/version.rb +0 -18
  515. package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick.rb +0 -232
  516. package/dist/assets/cli-ruby/vendor/deps/webrick/webrick.gemspec +0 -74
  517. package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands/help.rb +0 -20
  518. package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands/new.rb +0 -21
  519. package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands.rb +0 -18
  520. package/dist/assets/cli-ruby/vendor/gen/lib/gen/entry_point.rb +0 -10
  521. package/dist/assets/cli-ruby/vendor/gen/lib/gen/generator.rb +0 -165
  522. package/dist/assets/cli-ruby/vendor/gen/lib/gen.rb +0 -39
  523. package/dist/assets/cli-ruby/vendor/gen/template/Gemfile +0 -10
  524. package/dist/assets/cli-ruby/vendor/gen/template/README.md +0 -1
  525. package/dist/assets/cli-ruby/vendor/gen/template/bin/testunit +0 -23
  526. package/dist/assets/cli-ruby/vendor/gen/template/bin/update-deps +0 -97
  527. package/dist/assets/cli-ruby/vendor/gen/template/dev-gems.yml +0 -3
  528. package/dist/assets/cli-ruby/vendor/gen/template/dev-vendor.yml +0 -4
  529. package/dist/assets/cli-ruby/vendor/gen/template/exe/__app__-gems +0 -17
  530. package/dist/assets/cli-ruby/vendor/gen/template/exe/__app__-vendor +0 -18
  531. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/example.rb +0 -19
  532. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/help.rb +0 -21
  533. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands.rb +0 -18
  534. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/entry_point.rb +0 -10
  535. package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__.rb +0 -33
  536. package/dist/assets/cli-ruby/vendor/gen/template/test/example_test.rb +0 -17
  537. package/dist/assets/cli-ruby/vendor/gen/template/test/test_helper.rb +0 -22
  538. package/dist/assets/cli-ruby/vendor/lib/semantic/LICENSE +0 -20
  539. package/dist/assets/cli-ruby/vendor/lib/semantic/semantic.rb +0 -4
  540. 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