shopify-cli 1.4.1 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +2 -2
  3. data/.github/CONTRIBUTING.md +9 -1
  4. data/.github/PULL_REQUEST_TEMPLATE.md +3 -2
  5. data/.github/workflows/release.yml +0 -1
  6. data/.github/workflows/triage.yml +22 -0
  7. data/.rubocop.yml +21 -7
  8. data/.rubocop_todo.yml +2 -15
  9. data/.travis.yml +1 -1
  10. data/CHANGELOG.md +28 -0
  11. data/Gemfile +12 -11
  12. data/Gemfile.lock +17 -14
  13. data/README.md +39 -7
  14. data/RELEASING.md +5 -13
  15. data/Rakefile +32 -28
  16. data/bin/load_shopify.rb +6 -6
  17. data/bin/shopify +2 -2
  18. data/dev.yml +2 -2
  19. data/docs/_config.yml +1 -18
  20. data/docs/app/node/commands/index.md +2 -80
  21. data/docs/app/node/index.md +2 -33
  22. data/docs/app/rails/commands/index.md +2 -78
  23. data/docs/app/rails/index.md +2 -34
  24. data/docs/core/index.md +2 -84
  25. data/docs/getting-started/index.md +2 -25
  26. data/docs/getting-started/install/index.md +1 -118
  27. data/docs/getting-started/migrate/index.md +2 -94
  28. data/docs/getting-started/uninstall/index.md +2 -35
  29. data/docs/getting-started/upgrade/index.md +2 -39
  30. data/docs/help/start-app/index.md +2 -4
  31. data/docs/index.md +2 -24
  32. data/ext/shopify-cli/extconf.rb +7 -7
  33. data/install.sh +1 -1
  34. data/lib/docgen/markdown.rb +12 -12
  35. data/lib/graphql/fetch_specifications.graphql +14 -0
  36. data/lib/{project_types/extension/graphql → graphql}/get_app_by_api_key.graphql +0 -0
  37. data/lib/project_types/extension/cli.rb +54 -47
  38. data/lib/project_types/extension/commands/build.rb +3 -3
  39. data/lib/project_types/extension/commands/create.rb +17 -10
  40. data/lib/project_types/extension/commands/extension_command.rb +12 -5
  41. data/lib/project_types/extension/commands/push.rb +8 -8
  42. data/lib/project_types/extension/commands/register.rb +19 -30
  43. data/lib/project_types/extension/commands/serve.rb +31 -3
  44. data/lib/project_types/extension/commands/tunnel.rb +12 -12
  45. data/lib/project_types/extension/extension_project.rb +8 -4
  46. data/lib/project_types/extension/extension_project_keys.rb +4 -4
  47. data/lib/project_types/extension/features/argo.rb +117 -0
  48. data/lib/project_types/extension/features/argo_config.rb +5 -5
  49. data/lib/project_types/extension/features/argo_dependencies.rb +5 -5
  50. data/lib/project_types/extension/features/argo_setup.rb +2 -2
  51. data/lib/project_types/extension/features/argo_setup_steps.rb +4 -4
  52. data/lib/project_types/extension/forms/create.rb +28 -34
  53. data/lib/project_types/extension/forms/questions/ask_app.rb +53 -0
  54. data/lib/project_types/extension/forms/questions/ask_name.rb +40 -0
  55. data/lib/project_types/extension/forms/questions/ask_type.rb +47 -0
  56. data/lib/project_types/extension/messages/messages.rb +55 -52
  57. data/lib/project_types/extension/models/lazy_specification_handler.rb +12 -0
  58. data/lib/project_types/extension/models/specification.rb +37 -0
  59. data/lib/project_types/extension/models/specification_handlers/checkout_post_purchase.rb +19 -0
  60. data/lib/project_types/extension/models/specification_handlers/default.rb +67 -0
  61. data/lib/project_types/extension/models/specifications.rb +88 -0
  62. data/lib/project_types/extension/tasks/configure_features.rb +52 -0
  63. data/lib/project_types/extension/tasks/converters/app_converter.rb +6 -6
  64. data/lib/project_types/extension/tasks/converters/registration_converter.rb +6 -6
  65. data/lib/project_types/extension/tasks/converters/validation_error_converter.rb +4 -4
  66. data/lib/project_types/extension/tasks/converters/version_converter.rb +7 -7
  67. data/lib/project_types/extension/tasks/create_extension.rb +4 -4
  68. data/lib/project_types/extension/tasks/fetch_specifications.rb +18 -0
  69. data/lib/project_types/extension/tasks/get_app.rb +4 -4
  70. data/lib/project_types/extension/tasks/get_apps.rb +3 -3
  71. data/lib/project_types/extension/tasks/update_draft.rb +4 -4
  72. data/lib/project_types/extension/tasks/user_errors.rb +4 -4
  73. data/lib/project_types/node/cli.rb +19 -16
  74. data/lib/project_types/node/commands/connect.rb +15 -0
  75. data/lib/project_types/node/commands/create.rb +44 -41
  76. data/lib/project_types/node/commands/deploy.rb +4 -4
  77. data/lib/project_types/node/commands/deploy/heroku.rb +24 -24
  78. data/lib/project_types/node/commands/generate.rb +9 -18
  79. data/lib/project_types/node/commands/open.rb +2 -2
  80. data/lib/project_types/node/commands/populate.rb +6 -6
  81. data/lib/project_types/node/commands/populate/customer.rb +5 -5
  82. data/lib/project_types/node/commands/populate/draft_order.rb +5 -5
  83. data/lib/project_types/node/commands/populate/product.rb +5 -5
  84. data/lib/project_types/node/commands/serve.rb +9 -9
  85. data/lib/project_types/node/commands/tunnel.rb +7 -7
  86. data/lib/project_types/node/forms/create.rb +17 -8
  87. data/lib/project_types/node/messages/messages.rb +20 -53
  88. data/lib/project_types/rails/cli.rb +21 -18
  89. data/lib/project_types/rails/commands/connect.rb +15 -0
  90. data/lib/project_types/rails/commands/create.rb +58 -57
  91. data/lib/project_types/rails/commands/deploy.rb +4 -4
  92. data/lib/project_types/rails/commands/deploy/heroku.rb +30 -30
  93. data/lib/project_types/rails/commands/generate.rb +7 -7
  94. data/lib/project_types/rails/commands/generate/webhook.rb +6 -6
  95. data/lib/project_types/rails/commands/open.rb +2 -2
  96. data/lib/project_types/rails/commands/populate.rb +6 -6
  97. data/lib/project_types/rails/commands/populate/customer.rb +5 -5
  98. data/lib/project_types/rails/commands/populate/draft_order.rb +5 -5
  99. data/lib/project_types/rails/commands/populate/product.rb +5 -5
  100. data/lib/project_types/rails/commands/serve.rb +11 -11
  101. data/lib/project_types/rails/commands/tunnel.rb +7 -7
  102. data/lib/project_types/rails/forms/create.rb +35 -25
  103. data/lib/project_types/rails/gem.rb +24 -24
  104. data/lib/project_types/rails/messages/messages.rb +13 -9
  105. data/lib/project_types/rails/ruby.rb +2 -2
  106. data/lib/project_types/script/cli.rb +44 -38
  107. data/lib/project_types/script/commands/create.rb +15 -10
  108. data/lib/project_types/script/commands/disable.rb +3 -3
  109. data/lib/project_types/script/commands/enable.rb +19 -9
  110. data/lib/project_types/script/commands/push.rb +10 -17
  111. data/lib/project_types/script/config/extension_points.yml +30 -12
  112. data/lib/project_types/script/errors.rb +22 -0
  113. data/lib/project_types/script/forms/create.rb +29 -5
  114. data/lib/project_types/script/graphql/app_script_update_or_create.graphql +12 -1
  115. data/lib/project_types/script/layers/application/build_script.rb +19 -19
  116. data/lib/project_types/script/layers/application/create_script.rb +45 -12
  117. data/lib/project_types/script/layers/application/disable_script.rb +2 -2
  118. data/lib/project_types/script/layers/application/enable_script.rb +2 -2
  119. data/lib/project_types/script/layers/application/extension_points.rb +24 -0
  120. data/lib/project_types/script/layers/application/project_dependencies.rb +4 -4
  121. data/lib/project_types/script/layers/application/push_script.rb +15 -18
  122. data/lib/project_types/script/layers/domain/config_ui.rb +16 -0
  123. data/lib/project_types/script/layers/domain/errors.rb +23 -0
  124. data/lib/project_types/script/layers/domain/extension_point.rb +67 -7
  125. data/lib/project_types/script/layers/domain/metadata.rb +55 -0
  126. data/lib/project_types/script/layers/domain/push_package.rb +29 -6
  127. data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +45 -55
  128. data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +41 -45
  129. data/lib/project_types/script/layers/infrastructure/config_ui_repository.rb +46 -0
  130. data/lib/project_types/script/layers/infrastructure/errors.rb +32 -5
  131. data/lib/project_types/script/layers/infrastructure/extension_point_repository.rb +12 -6
  132. data/lib/project_types/script/layers/infrastructure/project_creator.rb +2 -1
  133. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +20 -13
  134. data/lib/project_types/script/layers/infrastructure/rust_project_creator.rb +72 -0
  135. data/lib/project_types/script/layers/infrastructure/rust_task_runner.rb +59 -0
  136. data/lib/project_types/script/layers/infrastructure/script_service.rb +39 -17
  137. data/lib/project_types/script/layers/infrastructure/task_runner.rb +4 -3
  138. data/lib/project_types/script/messages/messages.rb +76 -10
  139. data/lib/project_types/script/script_project.rb +26 -16
  140. data/lib/project_types/script/ui/error_handler.rb +135 -50
  141. data/lib/project_types/script/ui/printing_spinner.rb +1 -1
  142. data/lib/project_types/script/ui/strict_spinner.rb +1 -1
  143. data/lib/project_types/theme/cli.rb +40 -0
  144. data/lib/project_types/theme/commands/connect.rb +54 -0
  145. data/lib/project_types/theme/commands/create.rb +48 -0
  146. data/lib/project_types/theme/commands/deploy.rb +38 -0
  147. data/lib/project_types/theme/commands/generate.rb +20 -0
  148. data/lib/project_types/theme/commands/generate/env.rb +79 -0
  149. data/lib/project_types/theme/commands/push.rb +55 -0
  150. data/lib/project_types/theme/commands/serve.rb +31 -0
  151. data/lib/project_types/theme/forms/connect.rb +34 -0
  152. data/lib/project_types/theme/forms/create.rb +22 -0
  153. data/lib/project_types/theme/messages/messages.rb +147 -0
  154. data/lib/project_types/theme/tasks/ensure_themekit_installed.rb +78 -0
  155. data/lib/project_types/theme/themekit.rb +113 -0
  156. data/lib/rubygems_plugin.rb +3 -3
  157. data/lib/shopify-cli/admin_api.rb +52 -12
  158. data/lib/shopify-cli/admin_api/populate_resource_command.rb +17 -17
  159. data/lib/shopify-cli/admin_api/schema.rb +3 -3
  160. data/lib/shopify-cli/api.rb +36 -31
  161. data/lib/shopify-cli/command.rb +1 -1
  162. data/lib/shopify-cli/commands.rb +9 -9
  163. data/lib/shopify-cli/commands/config.rb +28 -28
  164. data/lib/shopify-cli/commands/connect.rb +35 -18
  165. data/lib/shopify-cli/commands/create.rb +5 -5
  166. data/lib/shopify-cli/commands/help.rb +6 -6
  167. data/lib/shopify-cli/commands/logout.rb +3 -3
  168. data/lib/shopify-cli/commands/system.rb +33 -33
  169. data/lib/shopify-cli/commands/version.rb +2 -2
  170. data/lib/shopify-cli/context.rb +43 -22
  171. data/lib/shopify-cli/core.rb +4 -4
  172. data/lib/shopify-cli/core/entry_point.rb +5 -5
  173. data/lib/shopify-cli/core/executor.rb +1 -1
  174. data/lib/shopify-cli/core/help_resolver.rb +2 -2
  175. data/lib/shopify-cli/core/monorail.rb +17 -16
  176. data/lib/shopify-cli/db.rb +2 -2
  177. data/lib/shopify-cli/feature.rb +1 -3
  178. data/lib/shopify-cli/form.rb +1 -1
  179. data/lib/shopify-cli/git.rb +17 -17
  180. data/lib/shopify-cli/helpers.rb +1 -1
  181. data/lib/shopify-cli/helpers/haikunator.rb +1 -1
  182. data/lib/shopify-cli/heroku.rb +28 -28
  183. data/lib/shopify-cli/http_request.rb +21 -9
  184. data/lib/shopify-cli/js_deps.rb +13 -13
  185. data/lib/shopify-cli/js_system.rb +5 -5
  186. data/lib/shopify-cli/lazy_delegator.rb +55 -0
  187. data/lib/shopify-cli/messages/messages.rb +21 -10
  188. data/lib/shopify-cli/method_object.rb +104 -0
  189. data/lib/shopify-cli/oauth.rb +25 -25
  190. data/lib/shopify-cli/oauth/servlet.rb +9 -9
  191. data/lib/shopify-cli/options.rb +3 -3
  192. data/lib/shopify-cli/packager.rb +24 -24
  193. data/lib/shopify-cli/partners_api.rb +38 -16
  194. data/lib/shopify-cli/partners_api/organizations.rb +10 -10
  195. data/lib/shopify-cli/process_supervision.rb +8 -8
  196. data/lib/shopify-cli/project.rb +27 -23
  197. data/lib/shopify-cli/project_type.rb +21 -5
  198. data/lib/shopify-cli/resolve_constant.rb +25 -0
  199. data/lib/shopify-cli/resources.rb +1 -1
  200. data/lib/shopify-cli/resources/env_file.rb +9 -9
  201. data/lib/shopify-cli/result.rb +432 -0
  202. data/lib/shopify-cli/shopifolk.rb +35 -18
  203. data/lib/shopify-cli/sub_command.rb +1 -1
  204. data/lib/shopify-cli/task.rb +9 -1
  205. data/lib/shopify-cli/tasks.rb +7 -7
  206. data/lib/shopify-cli/tasks/create_api_client.rb +13 -4
  207. data/lib/shopify-cli/tasks/ensure_dev_store.rb +12 -12
  208. data/lib/shopify-cli/tasks/ensure_env.rb +18 -15
  209. data/lib/shopify-cli/tasks/ensure_loopback_url.rb +4 -4
  210. data/lib/shopify-cli/tasks/select_org_and_shop.rb +28 -24
  211. data/lib/shopify-cli/tasks/update_dashboard_urls.rb +10 -10
  212. data/lib/shopify-cli/transform_data_structure.rb +86 -0
  213. data/lib/shopify-cli/tunnel.rb +36 -30
  214. data/lib/shopify-cli/version.rb +1 -1
  215. data/lib/shopify_cli.rb +57 -52
  216. data/shopify-cli.gemspec +6 -6
  217. data/shopify.fish +1 -1
  218. data/shopify.sh +1 -1
  219. data/vendor/deps/cli-kit/REVISION +1 -1
  220. data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +2 -2
  221. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +3 -3
  222. data/vendor/deps/cli-ui/REVISION +1 -1
  223. data/vendor/deps/cli-ui/lib/cli/ui.rb +26 -22
  224. data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +4 -6
  225. data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +3 -3
  226. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +8 -9
  227. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +1 -1
  228. data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +1 -0
  229. data/vendor/deps/cli-ui/lib/cli/ui/printer.rb +15 -3
  230. data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +4 -11
  231. data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +3 -5
  232. data/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +10 -10
  233. data/vendor/deps/cli-ui/lib/cli/ui/version.rb +1 -1
  234. data/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +56 -0
  235. data/vendor/deps/webrick/.gitignore +9 -0
  236. data/vendor/deps/webrick/Gemfile +3 -0
  237. data/vendor/deps/webrick/LICENSE.txt +22 -0
  238. data/vendor/deps/webrick/README.md +61 -0
  239. data/vendor/deps/webrick/Rakefile +10 -0
  240. data/vendor/deps/webrick/lib/webrick.rb +232 -0
  241. data/vendor/deps/webrick/lib/webrick/accesslog.rb +157 -0
  242. data/vendor/deps/webrick/lib/webrick/cgi.rb +313 -0
  243. data/vendor/deps/webrick/lib/webrick/compat.rb +36 -0
  244. data/vendor/deps/webrick/lib/webrick/config.rb +158 -0
  245. data/vendor/deps/webrick/lib/webrick/cookie.rb +172 -0
  246. data/vendor/deps/webrick/lib/webrick/htmlutils.rb +30 -0
  247. data/vendor/deps/webrick/lib/webrick/httpauth.rb +96 -0
  248. data/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +117 -0
  249. data/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +116 -0
  250. data/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +395 -0
  251. data/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +132 -0
  252. data/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +97 -0
  253. data/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +158 -0
  254. data/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +53 -0
  255. data/vendor/deps/webrick/lib/webrick/httpproxy.rb +354 -0
  256. data/vendor/deps/webrick/lib/webrick/httprequest.rb +636 -0
  257. data/vendor/deps/webrick/lib/webrick/httpresponse.rb +564 -0
  258. data/vendor/deps/webrick/lib/webrick/https.rb +152 -0
  259. data/vendor/deps/webrick/lib/webrick/httpserver.rb +294 -0
  260. data/vendor/deps/webrick/lib/webrick/httpservlet.rb +23 -0
  261. data/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +152 -0
  262. data/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +47 -0
  263. data/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +126 -0
  264. data/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +88 -0
  265. data/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +552 -0
  266. data/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +47 -0
  267. data/vendor/deps/webrick/lib/webrick/httpstatus.rb +194 -0
  268. data/vendor/deps/webrick/lib/webrick/httputils.rb +512 -0
  269. data/vendor/deps/webrick/lib/webrick/httpversion.rb +76 -0
  270. data/vendor/deps/webrick/lib/webrick/log.rb +156 -0
  271. data/vendor/deps/webrick/lib/webrick/server.rb +381 -0
  272. data/vendor/deps/webrick/lib/webrick/ssl.rb +215 -0
  273. data/vendor/deps/webrick/lib/webrick/utils.rb +265 -0
  274. data/vendor/deps/webrick/lib/webrick/version.rb +18 -0
  275. data/vendor/deps/webrick/webrick.gemspec +74 -0
  276. data/vendor/gen/template/bin/update-deps +9 -9
  277. metadata +83 -29
  278. data/docs/Gemfile +0 -5
  279. data/docs/Gemfile.lock +0 -258
  280. data/docs/_data/nav.yml +0 -35
  281. data/docs/_includes/footer.html +0 -15
  282. data/docs/_includes/head.html +0 -19
  283. data/docs/_includes/sidebar_nav.html +0 -22
  284. data/docs/_includes/toc.html +0 -112
  285. data/docs/_layouts/default.html +0 -79
  286. data/docs/css/docs.css +0 -157
  287. data/docs/images/header.png +0 -0
  288. data/docs/installing-ruby.md +0 -28
  289. data/lib/project_types/extension/features/argo/admin.rb +0 -20
  290. data/lib/project_types/extension/features/argo/base.rb +0 -129
  291. data/lib/project_types/extension/features/argo/checkout.rb +0 -20
  292. data/lib/project_types/extension/forms/register.rb +0 -47
  293. data/lib/project_types/extension/models/type.rb +0 -81
  294. data/lib/project_types/extension/models/types/checkout_post_purchase.rb +0 -23
  295. data/lib/project_types/extension/models/types/product_subscription.rb +0 -24
  296. data/lib/project_types/node/commands/generate/billing.rb +0 -39
  297. data/lib/project_types/node/commands/generate/page.rb +0 -59
  298. data/lib/project_types/node/commands/generate/webhook.rb +0 -37
  299. data/lib/project_types/script/layers/domain/script.rb +0 -18
  300. data/lib/project_types/script/layers/infrastructure/assemblyscript_tsconfig.rb +0 -38
  301. data/lib/project_types/script/layers/infrastructure/script_repository.rb +0 -59
  302. data/lib/project_types/script/templates/ts/as-pect.config.js +0 -27
  303. data/lib/project_types/script/templates/ts/as-pect.d.ts +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b440a68e264b97888e3cb181eea5e2465522c3d67338851e08775cc743416a5
4
- data.tar.gz: a6f2acacf046ab9c6bd174d7bd077a0ea87312f844db05de015c9cacf5d972bf
3
+ metadata.gz: 30e766112b0e09d6de0e907ecf7e002377fe8a0ecb6776bf0975ec1677a5858a
4
+ data.tar.gz: 3fbcc004481a0b06c8ccfcd0fb5890d7ab4bf6ee778a6b4dc43c773508376a05
5
5
  SHA512:
6
- metadata.gz: dc49412e3aa3f7bc5dde8fa5943d2d52ae09138e92de3fcbd949353430a2ea5275dd157951dcf81770cdb36ccb5c023a570ddea3eb7756a357709360d51bb3b4
7
- data.tar.gz: 648a9df9b5647e869d92cc23241628fbe336efeeb8c9c6ade691d55b14cb075c419e87a2f97c5eddf851e99bba1da5e595cfcd13d2d78c6c5c0cafbaeaa85dc1
6
+ metadata.gz: d3b9f2da8984619e58cb73a5a066bd67b7b0e3f050a82f794b36079d3f0850d8c57e4e346e7f6ae0c0ea01601d07e26d54359cced3e132d23246ad88bbed314f
7
+ data.tar.gz: 1ec7d262e39e6b112cf25a35b85788faeb77fce56febdeb46e0f8630608ca19ec0eb032b668302515e23fbfa0831ad25492439cc8cb35e5fb376c6e2277e4596
data/.github/CODEOWNERS CHANGED
@@ -1,4 +1,4 @@
1
1
  * @shopify/platform-dev-tools-education
2
2
 
3
- /lib/project_types/script/ @shopify/scripts
4
- /test/project_types/script/ @shopify/scripts
3
+ /lib/project_types/script/ @shopify/scripts-experience
4
+ /test/project_types/script/ @shopify/scripts-experience
@@ -19,6 +19,14 @@ When contributing to the Shopify App CLI, there are a set of [design guidelines]
19
19
 
20
20
  We track all of our issues in GitHub and [bugs](https://github.com/Shopify/shopify-app-cli/labels/Bug) are labeled accordingly. If you are planning to work on an issue, avoid ones which already have an assignee, where someone has commented within the last two weeks they are working on it, or the issue is labeled with [fix in progress](https://github.com/Shopify/shopify-app-cli/labels/fix%20in%20progress). We will do our best to communicate when an issue is being worked on internally.
21
21
 
22
+ ### Running against a local environment
23
+
24
+ This section only applies to Shopify staff:
25
+
26
+ To run against a local Partners or Identity instance, you can use:
27
+
28
+ `SHOPIFY_APP_CLI_LOCAL_PARTNERS=1 shopify`
29
+
22
30
  ### Reporting new issues
23
31
 
24
32
  To reduce duplicates, look through open issues before filing one. When [opening an issue](https://github.com/Shopify/shopify-app-cli/issues/new?template=ISSUE.md), complete as much of the template as possible.
@@ -48,4 +56,4 @@ Each contributor is required to [sign a CLA](https://cla.shopify.com/). This pro
48
56
 
49
57
  If you are changing the CLI version, please make sure to update all the places that use it:
50
58
  * ShopifyCLI::VERSION
51
- * Debian package version under `packaging/debian`
59
+ * Debian package version under `packaging/debian`
@@ -3,7 +3,7 @@
3
3
  - Prefix it with [Feature] (if applicable)
4
4
  - Start with a verb, for example: Add, Delete, Improve, Fix…
5
5
  - Give as much context as necessary and as little as possible
6
- - Prefix it with [WIP] while it’s a work in progress
6
+ - Use a draft PR while it’s a work in progress
7
7
  -->
8
8
 
9
9
  ### WHY are these changes introduced?
@@ -27,4 +27,5 @@ Fixes #0000 <!-- link to issue if one exists -->
27
27
  `* [#PR](PR URL): Message`. You should consider adding your PR
28
28
  and then making the CHANGELOG update once you know the PR number.
29
29
  -->
30
- - [ ] I've added a CHANGELOG entry for this PR
30
+ - [ ] I've added a CHANGELOG entry for this PR (if the change is public-facing)
31
+ - [ ] I've considered possible cross-platform impacts (Mac, Linux, Windows).
@@ -46,7 +46,6 @@ jobs:
46
46
  tap: shopify/shopify
47
47
  formula: shopify-cli
48
48
  tag: ${{ steps.folder.outputs.name }}
49
- message: "Version bump, created by github actions"
50
49
 
51
50
  - name: Create Release # https://hub.github.com/hub-release.1.html
52
51
  env:
@@ -0,0 +1,22 @@
1
+ name: Triage new issues to DTE oncall project board ("Needs triage" column)
2
+
3
+ on:
4
+ issues:
5
+ types: [opened, reopened]
6
+
7
+ jobs:
8
+ triage-issue:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Extract issue id
12
+ id: issue
13
+ run: echo "::set-output name=id::$(jq -r '.issue.id' < "$GITHUB_EVENT_PATH")"
14
+
15
+ - name: Create card
16
+ env:
17
+ TOKEN: ${{ secrets.ACTIONS_TOKEN }}
18
+ run: |
19
+ curl -s -X POST -u "$GITHUB_ACTOR:$TOKEN" --retry 3 \
20
+ -H 'Accept: application/vnd.github.inertia-preview+json' \
21
+ -d "{\"content_type\": \"Issue\", \"content_id\": ${{ steps.issue.outputs.id }}}" \
22
+ "https://api.github.com/projects/columns/10507989/cards"
data/.rubocop.yml CHANGED
@@ -51,6 +51,9 @@ Layout/EmptyLines:
51
51
  # Need extra line so comment at top isnt registered to the Dev namespace
52
52
  - 'lib/dev/helpers/chruby_reset.rb'
53
53
 
54
+ Layout/EmptyLineBetweenDefs:
55
+ AllowAdjacentOneLineDefs: true
56
+
54
57
  # Changing this could effect the way the content is rendered.
55
58
  Layout/HeredocIndentation:
56
59
  Exclude:
@@ -74,13 +77,24 @@ Style/RegexpLiteral:
74
77
 
75
78
  Style/MethodCallWithArgsParentheses:
76
79
  IgnoredMethods:
80
+ - assert
81
+ - assert_equal
82
+ - assert_includes
83
+ - assert_nil
84
+ - assert_raises
85
+ - assert_requested # from Webmock
86
+ - puts
87
+ - raise
88
+ - refute
89
+ - refute_empty
90
+ - refute_nil
77
91
  - require
78
- - require_relative
79
92
  - require_dependency
93
+ - require_relative
80
94
  - yield
81
- - raise
82
- - puts
83
- - assert_equal
84
- - assert
85
- - refute
86
- - assert_requested # from Webmock
95
+
96
+ Layout/TrailingWhitespace:
97
+ Exclude:
98
+ - 'ext/shopify-cli/extconf.rb' # unsure if safe to remove
99
+ - 'lib/project_types/extension/messages/messages.rb' # unsure if safe to remove
100
+ - 'test/project_types/extension/extension_test_helpers/stubs/argo_script.rb' # unsure if save to remove
data/.rubocop_todo.yml CHANGED
@@ -1,24 +1,11 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-10-24 22:13:10 UTC using RuboCop version 0.93.1.
3
+ # on 2020-12-01 16:33:09 UTC using RuboCop version 1.4.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 29
9
+ # Offense count: 30
10
10
  Minitest/MultipleAssertions:
11
11
  Max: 9
12
-
13
- # Offense count: 74
14
- # Cop supports --auto-correct.
15
- # Configuration parameters: IgnoreMacros, IgnoredMethods, IgnoredPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, EnforcedStyle.
16
- # SupportedStyles: require_parentheses, omit_parentheses
17
- Style/MethodCallWithArgsParentheses:
18
- Enabled: false
19
-
20
- # Offense count: 1
21
- # Cop supports --auto-correct.
22
- Style/RedundantBegin:
23
- Exclude:
24
- - 'test/test_helper.rb'
data/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 3.0.0
3
4
  - 2.5.8
4
5
  - 2.6.6
5
6
  - 2.7.1
@@ -11,4 +12,3 @@ install:
11
12
  - bundle install
12
13
  script:
13
14
  - bundle exec rake
14
- - if [ -f "~/.config/shopify/config" ]; then echo "Found a config file in home directory. This means the tests would modify a developer's local config. Consider using FakeFS"; exit 1; fi
data/CHANGELOG.md CHANGED
@@ -1,6 +1,34 @@
1
1
  Unreleased
2
2
  ------
3
3
 
4
+ Version 1.8.0
5
+ -------------
6
+
7
+ * [1119](https://github.com/Shopify/shopify-app-cli/pull/1119): Enable guest serialization for scripts
8
+
9
+ Version 1.7.1
10
+ ------
11
+ * Updating internal features in development
12
+
13
+ Version 1.7.0
14
+ -----
15
+ * [#1109](https://github.com/Shopify/shopify-app-cli/pull/1109): Abort app generation if name contains disallowed text.
16
+ * [#1075](https://github.com/Shopify/shopify-app-cli/pull/1075): Add support for kebab-case flags
17
+
18
+ Version 1.6.0
19
+ -----
20
+ * [#1049](https://github.com/Shopify/shopify-app-cli/pull/1049): Add schema versioning support to the script project type
21
+ * [#1059](https://github.com/Shopify/shopify-app-cli/pull/1059): Remove the functionality of the `generate` command for node apps, since it will no longer be feasible with the new node library
22
+ * [#1046](https://github.com/Shopify/shopify-app-cli/pull/1046): Include a vendored copy of Webrick, as it's no longer included in Ruby 3.
23
+ * [#1041](https://github.com/Shopify/shopify-app-cli/pull/1041): Remove unnecessary shell call to `spring stop`. We already pass `--skip-spring` when creating the app so running `spring stop` would have no effect.
24
+ * [#1034](https://github.com/Shopify/shopify-app-cli/pull/1034): Abort if a system call fails.
25
+
26
+ Version 1.5.0
27
+ -----
28
+ * [#965](https://github.com/Shopify/shopify-app-cli/pull/965): Remove --no-optional when using npm to create new project
29
+ * [#958](https://github.com/Shopify/shopify-app-cli/pull/958): Split `connect` command into project-specific functionality
30
+ * [#992](https://github.com/Shopify/shopify-app-cli/pull/992): Add Theme Kit functionality to CLI
31
+
4
32
  Version 1.4.1
5
33
  ------
6
34
  * [#917](https://github.com/Shopify/shopify-app-cli/pull/917): Ensure analytics for create action includes the same fields as other commands
data/Gemfile CHANGED
@@ -5,18 +5,19 @@ source "https://rubygems.org"
5
5
  # They are all for CI and tests
6
6
  # `dev` uses no gems
7
7
  group :development, :test do
8
- gem 'rake'
9
- gem 'pry-byebug'
10
- gem 'byebug'
11
- gem 'rubocop-shopify', require: false
12
- gem 'rubocop-minitest', require: false
8
+ gem "rake"
9
+ gem "pry-byebug"
10
+ gem "byebug"
11
+ gem "rubocop-shopify", require: false
12
+ gem "rubocop-minitest", require: false
13
13
  end
14
14
 
15
15
  group :test do
16
- gem 'mocha', require: false
17
- gem 'minitest', '>= 5.0.0', require: false
18
- gem 'minitest-reporters', require: false
19
- gem 'fakefs', '>= 1.0', require: false
20
- gem 'webmock', require: false
21
- gem 'timecop', require: false
16
+ gem "mocha", require: false
17
+ gem "minitest", ">= 5.0.0", require: false
18
+ gem "minitest-reporters", require: false
19
+ gem "minitest-fail-fast", require: false
20
+ gem "fakefs", ">= 1.0", require: false
21
+ gem "webmock", require: false
22
+ gem "timecop", require: false
22
23
  end
data/Gemfile.lock CHANGED
@@ -4,7 +4,7 @@ GEM
4
4
  addressable (2.7.0)
5
5
  public_suffix (>= 2.0.2, < 5.0)
6
6
  ansi (1.5.0)
7
- ast (2.4.1)
7
+ ast (2.4.2)
8
8
  builder (3.2.4)
9
9
  byebug (11.1.3)
10
10
  coderay (1.1.3)
@@ -13,14 +13,16 @@ GEM
13
13
  hashdiff (1.0.1)
14
14
  method_source (1.0.0)
15
15
  minitest (5.14.2)
16
+ minitest-fail-fast (0.1.0)
17
+ minitest (~> 5)
16
18
  minitest-reporters (1.4.2)
17
19
  ansi
18
20
  builder
19
21
  minitest (>= 5.0)
20
22
  ruby-progressbar
21
23
  mocha (1.11.2)
22
- parallel (1.19.2)
23
- parser (2.7.2.0)
24
+ parallel (1.20.1)
25
+ parser (3.0.0.0)
24
26
  ast (~> 2.4.1)
25
27
  pry (0.13.1)
26
28
  coderay (~> 1.1)
@@ -31,26 +33,26 @@ GEM
31
33
  public_suffix (4.0.6)
32
34
  rainbow (3.0.0)
33
35
  rake (13.0.1)
34
- regexp_parser (1.8.2)
36
+ regexp_parser (2.1.1)
35
37
  rexml (3.2.4)
36
- rubocop (0.93.1)
38
+ rubocop (1.11.0)
37
39
  parallel (~> 1.10)
38
- parser (>= 2.7.1.5)
40
+ parser (>= 3.0.0.0)
39
41
  rainbow (>= 2.2.2, < 4.0)
40
- regexp_parser (>= 1.8)
42
+ regexp_parser (>= 1.8, < 3.0)
41
43
  rexml
42
- rubocop-ast (>= 0.6.0)
44
+ rubocop-ast (>= 1.2.0, < 2.0)
43
45
  ruby-progressbar (~> 1.7)
44
- unicode-display_width (>= 1.4.0, < 2.0)
45
- rubocop-ast (1.1.0)
46
+ unicode-display_width (>= 1.4.0, < 3.0)
47
+ rubocop-ast (1.4.1)
46
48
  parser (>= 2.7.1.5)
47
49
  rubocop-minitest (0.10.1)
48
50
  rubocop (>= 0.87)
49
- rubocop-shopify (1.0.6)
50
- rubocop (>= 0.92, < 0.94)
51
- ruby-progressbar (1.10.1)
51
+ rubocop-shopify (2.0.1)
52
+ rubocop (~> 1.11)
53
+ ruby-progressbar (1.11.0)
52
54
  timecop (0.9.2)
53
- unicode-display_width (1.7.0)
55
+ unicode-display_width (2.0.0)
54
56
  webmock (3.9.3)
55
57
  addressable (>= 2.3.6)
56
58
  crack (>= 0.3.2)
@@ -63,6 +65,7 @@ DEPENDENCIES
63
65
  byebug
64
66
  fakefs (>= 1.0)
65
67
  minitest (>= 5.0.0)
68
+ minitest-fail-fast
66
69
  minitest-reporters
67
70
  mocha
68
71
  pry-byebug
data/README.md CHANGED
@@ -1,13 +1,45 @@
1
- # Shopify App CLI
1
+ # [Shopify App CLI](https://shopify.dev/tools/cli)
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md)[![Build Status](https://travis-ci.com/Shopify/shopify-app-cli.svg?token=qtPazgjyosjEEgxgq7VZ&branch=master)](https://travis-ci.com/Shopify/shopify-app-cli)
4
4
 
5
- Shopify App CLI helps you build Shopify apps faster. It automates many common tasks in the development process and lets you quickly add popular features, such as billing and webhooks.
5
+ Shopify App CLI helps you build Shopify apps faster. It quickly generates Node.js and Ruby on Rails apps and automates many common development tasks.
6
6
 
7
- ## Using the CLI
8
- Consult the [Shopify App CLI documentation](https://shopify.github.io/shopify-app-cli) to get started.
7
+ ## Features
9
8
 
10
- ## Developing the CLI
11
- This is an [open-source](https://github.com/Shopify/shopify-app-cli/blob/master/.github/LICENSE.md) tool and developers are [invited to contribute](https://github.com/Shopify/shopify-app-cli/blob/master/.github/CONTRIBUTING.md) to it. Please check the [code of conduct](https://github.com/Shopify/shopify-app-cli/blob/master/.github/CODE_OF_CONDUCT.md) before you begin.
9
+ Shopify App CLI helps your app development process in the following ways:
12
10
 
13
- [Read the development guide](https://github.com/Shopify/shopify-app-cli/wiki) to learn more.
11
+ - Creates an app in the [Partner dashboard](https://partners.shopify.com/current/resources)
12
+ - Populates test data for your app, including products, customers, and draft orders
13
+ - Generates new [webhooks](https://shopify.dev/tutorials/manage-webhooks) for your app
14
+ - Deploys your app to an external platform, such as [Heroku](https://www.heroku.com/)
15
+
16
+ ## Installation
17
+
18
+ Refer to [*Install Shopify App CLI*](https://shopify.dev/tools/cli/installation) to learn how to install Shopify App CLI on Windows, macOS, or Linux.
19
+
20
+ ## Getting started
21
+
22
+ Refer to [*Getting started with Shopify App CLI*](https://shopify.dev/tools/cli/getting-started) to learn how to create and manage different types of projects with Shopify App CLI.
23
+
24
+ ## References
25
+
26
+ - **[Shopify App CLI core commands](https://shopify.dev/tools/cli/reference)** - A complete reference of core commands for Shopify App CLI.
27
+ - **[Node.js app commands](https://shopify.dev/tools/cli/reference/node-app)** - A complete Shopify App CLI command reference for Node.js apps.
28
+ - **[Ruby on Rails app commands](https://shopify.dev/tools/cli/reference/ruby-on-rails-app)** - A complete Shopify App CLI command reference for Ruby on Rails apps.
29
+
30
+ ## Troubleshooting
31
+
32
+ Refer to [*Troubleshooting Shopify App CLI*](https://shopify.dev/tools/cli/troubleshooting) to learn how to upgrade, migrate from a legacy version, and uninstall Shopify App CLI.
33
+
34
+ ## Contributing to Shopify App CLI
35
+
36
+ Shopify App CLI is an [open source](https://github.com/Shopify/shopify-app-cli/blob/master/.github/LICENSE.md) tool and you can [help contribute to the GitHub repository](https://github.com/Shopify/shopify-app-cli/blob/master/.github/CONTRIBUTING.md).
37
+
38
+ ## Developing Shopify App CLI
39
+
40
+ Read the [development guide](https://github.com/Shopify/shopify-app-cli/wiki).
41
+
42
+ ## Where to get help
43
+
44
+ - **[Open a GitHub issue](https://github.com/Shopify/shopify-app-cli/issues)** - To report bugs or request new features, open an issue in the Shopify App CLI repository.
45
+ - **[Shopify Community Forums](https://community.shopify.com/)** - Visit our forums to connect with the community and learn more about Shopify App CLI development.
data/RELEASING.md CHANGED
@@ -31,19 +31,11 @@
31
31
 
32
32
  1. Deploy using Shipit
33
33
 
34
- 1. Update your `master` branch to the latest version
35
- ```
36
- $ git checkout master
37
- $ git pull
38
- ```
34
+ 1. Check the "Actions" tab to see if the _Create Release_ workflow is successful.
35
+ The workflow will automatically create a [release](https://github.com/Shopify/shopify-app-cli/releases) with the latest tag and `.deb`, `.rpm` assets attached.
39
36
 
40
- 1. On local machine and _AFTER_ gem has been published to https://rubygems.org, run
41
- ```
42
- $ rake package
43
- ```
44
- This will generate the `.deb`, `.rpm` and brew formula files, which will be located in `packaging/builds/X.Y.Z/`.
37
+ 2. Check the `Shopify/homebrew-shopify` repository for new PR `shopify-cli {version}`
38
+ * rename PR to `Packaging for release of v{version} of shopify-cli`
39
+ * when PR is approved, merge into main branch
45
40
 
46
- 1. Check the "Actions" tab to see if the _Create Release_ workflow is successful.
47
- The workflow will automatically create a release with the latest tag and the `.deb`, `.rpm` assets attached.
48
41
 
49
- 1. Check the `Shopify/homebrew-shopify` repository for new branch `bump-shopify-cli-{version}` and create PR.
data/Rakefile CHANGED
@@ -1,11 +1,11 @@
1
- require_relative 'bin/load_shopify'
2
- require 'rake/testtask'
3
- require 'rubocop/rake_task'
4
- require 'bundler/gem_tasks'
1
+ require_relative "bin/load_shopify"
2
+ require "rake/testtask"
3
+ require "rubocop/rake_task"
4
+ require "bundler/gem_tasks"
5
5
 
6
6
  Rake::TestTask.new do |t|
7
7
  t.libs += %w(test)
8
- t.test_files = FileList['test/**/*_test.rb']
8
+ t.test_files = FileList["test/**/*_test.rb"]
9
9
  t.verbose = false
10
10
  t.warning = false
11
11
  end
@@ -16,33 +16,37 @@ task(default: [:test, :rubocop])
16
16
 
17
17
  desc("Start up irb with cli loaded")
18
18
  task :console do
19
- exec('irb', '-r', './bin/load_shopify.rb', '-r', 'byebug')
19
+ exec("irb", "-r", "./bin/load_shopify.rb", "-r", "byebug")
20
20
  end
21
21
 
22
22
  namespace :rdoc do
23
- repo = 'https://github.com/Shopify/shopify-app-cli.wiki.git'
24
- intermediate = 'markdown_intermediate'
23
+ repo = "https://github.com/Shopify/shopify-app-cli.wiki.git"
24
+ intermediate = "markdown_intermediate"
25
25
  file_to_doc = [
26
- 'lib/shopify-cli/admin_api.rb',
27
- 'lib/shopify-cli/context.rb',
28
- 'lib/shopify-cli/db.rb',
29
- 'lib/shopify-cli/git.rb',
30
- 'lib/shopify-cli/heroku.rb',
31
- 'lib/shopify-cli/js_deps.rb',
32
- 'lib/shopify-cli/partners_api.rb',
33
- 'lib/shopify-cli/process_supervision.rb',
34
- 'lib/shopify-cli/project.rb',
35
- 'lib/shopify-cli/tunnel.rb',
26
+ "lib/shopify-cli/admin_api.rb",
27
+ "lib/shopify-cli/context.rb",
28
+ "lib/shopify-cli/db.rb",
29
+ "lib/shopify-cli/git.rb",
30
+ "lib/shopify-cli/heroku.rb",
31
+ "lib/shopify-cli/js_deps.rb",
32
+ "lib/shopify-cli/method_object.rb",
33
+ "lib/shopify-cli/partners_api.rb",
34
+ "lib/shopify-cli/process_supervision.rb",
35
+ "lib/shopify-cli/project.rb",
36
+ "lib/shopify-cli/result.rb",
37
+ "lib/shopify-cli/transform_data_structure.rb",
38
+ "lib/shopify-cli/tunnel.rb",
39
+ "lib/shopify-cli/lazy_delegator.rb",
36
40
  ]
37
41
 
38
42
  task all: [:markdown, :wiki, :cleanup]
39
43
 
40
44
  desc("Generate markdown files from rdoc comments")
41
45
  task :markdown do
42
- require 'rdoc/rdoc'
43
- require 'docgen/markdown'
46
+ require "rdoc/rdoc"
47
+ require "docgen/markdown"
44
48
  options = RDoc::Options.new
45
- options.setup_generator('markdown')
49
+ options.setup_generator("markdown")
46
50
  options.op_dir = intermediate
47
51
  options.files = file_to_doc
48
52
  RDoc::RDoc.new.document(options)
@@ -50,14 +54,14 @@ namespace :rdoc do
50
54
 
51
55
  desc("Copy markdown documentation to the wiki and commit them")
52
56
  task :wiki do
53
- require 'tmpdir'
57
+ require "tmpdir"
54
58
  Dir.mktmpdir do |temp_dir|
55
59
  system("git clone --depth=1 #{repo} #{temp_dir}")
56
- FileUtils.cp(Dir[File.join(intermediate, '*.md')], temp_dir)
60
+ FileUtils.cp(Dir[File.join(intermediate, "*.md")], temp_dir)
57
61
  Dir.chdir(temp_dir) do
58
- system('git add --all')
62
+ system("git add --all")
59
63
  system('git commit -am "auto doc update"')
60
- system('git push')
64
+ system("git push")
61
65
  end
62
66
  end
63
67
  end
@@ -69,10 +73,10 @@ namespace :rdoc do
69
73
  end
70
74
 
71
75
  desc("Generate markdown documentation and update the wiki")
72
- task(rdoc: 'rdoc:all')
76
+ task(rdoc: "rdoc:all")
73
77
 
74
78
  namespace :package do
75
- require 'shopify-cli/packager'
79
+ require "shopify-cli/packager"
76
80
 
77
81
  task all: [:debian, :rpm, :homebrew]
78
82
 
@@ -93,4 +97,4 @@ namespace :package do
93
97
  end
94
98
 
95
99
  desc("Builds all distribution packages of the CLI")
96
- task(package: 'package:all')
100
+ task(package: "package:all")