@shopify/cli-kit 3.69.4 → 3.71.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 (571) hide show
  1. package/{assets/cli-ruby/LICENSE → LICENSE} +0 -2
  2. package/dist/cli/api/graphql/admin/generated/get_theme_file_bodies.d.ts +41 -0
  3. package/dist/cli/api/graphql/admin/generated/get_theme_file_bodies.js +165 -0
  4. package/dist/cli/api/graphql/admin/generated/get_theme_file_bodies.js.map +1 -0
  5. package/dist/cli/api/graphql/admin/generated/get_theme_file_checksums.d.ts +29 -0
  6. package/dist/cli/api/graphql/admin/generated/get_theme_file_checksums.js +100 -0
  7. package/dist/cli/api/graphql/admin/generated/get_theme_file_checksums.js.map +1 -0
  8. package/dist/cli/api/graphql/admin/generated/theme_delete.d.ts +17 -0
  9. package/dist/cli/api/graphql/admin/generated/theme_delete.js +53 -0
  10. package/dist/cli/api/graphql/admin/generated/theme_delete.js.map +1 -0
  11. package/dist/cli/api/graphql/admin/generated/theme_files_upsert.d.ts +21 -0
  12. package/dist/cli/api/graphql/admin/generated/theme_files_upsert.js +82 -0
  13. package/dist/cli/api/graphql/admin/generated/theme_files_upsert.js.map +1 -0
  14. package/dist/cli/api/graphql/admin/generated/theme_publish.d.ts +21 -0
  15. package/dist/cli/api/graphql/admin/generated/theme_publish.js +65 -0
  16. package/dist/cli/api/graphql/admin/generated/theme_publish.js.map +1 -0
  17. package/dist/cli/api/graphql/admin/generated/theme_update.d.ts +23 -0
  18. package/dist/cli/api/graphql/admin/generated/theme_update.js +75 -0
  19. package/dist/cli/api/graphql/admin/generated/theme_update.js.map +1 -0
  20. package/dist/private/node/api/graphql.d.ts +2 -2
  21. package/dist/private/node/api/graphql.js +4 -4
  22. package/dist/private/node/api/graphql.js.map +1 -1
  23. package/dist/private/node/api/headers.js +1 -1
  24. package/dist/private/node/api/headers.js.map +1 -1
  25. package/dist/private/node/api/rest.d.ts +1 -2
  26. package/dist/private/node/api/rest.js +2 -3
  27. package/dist/private/node/api/rest.js.map +1 -1
  28. package/dist/private/node/api.d.ts +1 -1
  29. package/dist/private/node/api.js +41 -2
  30. package/dist/private/node/api.js.map +1 -1
  31. package/dist/private/node/conf-store.d.ts +9 -4
  32. package/dist/private/node/conf-store.js +8 -6
  33. package/dist/private/node/conf-store.js.map +1 -1
  34. package/dist/private/node/constants.d.ts +3 -0
  35. package/dist/private/node/constants.js +3 -0
  36. package/dist/private/node/constants.js.map +1 -1
  37. package/dist/private/node/session/exchange.js +2 -2
  38. package/dist/private/node/session/exchange.js.map +1 -1
  39. package/dist/private/node/session/schema.d.ts +40 -40
  40. package/dist/private/node/session/scopes.js +3 -5
  41. package/dist/private/node/session/scopes.js.map +1 -1
  42. package/dist/private/node/session.js +2 -3
  43. package/dist/private/node/session.js.map +1 -1
  44. package/dist/private/node/ui/alert.js +1 -3
  45. package/dist/private/node/ui/alert.js.map +1 -1
  46. package/dist/private/node/ui/components/ConcurrentOutput.d.ts +1 -0
  47. package/dist/private/node/ui/components/ConcurrentOutput.js +4 -4
  48. package/dist/private/node/ui/components/ConcurrentOutput.js.map +1 -1
  49. package/dist/private/node/ui/components/Link.js +3 -0
  50. package/dist/private/node/ui/components/Link.js.map +1 -1
  51. package/dist/private/node/ui/components/Link.test.js +23 -0
  52. package/dist/private/node/ui/components/Link.test.js.map +1 -1
  53. package/dist/private/node/ui.js +1 -1
  54. package/dist/private/node/ui.js.map +1 -1
  55. package/dist/public/common/version.d.ts +1 -1
  56. package/dist/public/common/version.js +1 -1
  57. package/dist/public/common/version.js.map +1 -1
  58. package/dist/public/node/analytics.js +1 -2
  59. package/dist/public/node/analytics.js.map +1 -1
  60. package/dist/public/node/api/admin.d.ts +2 -1
  61. package/dist/public/node/api/admin.js +36 -10
  62. package/dist/public/node/api/admin.js.map +1 -1
  63. package/dist/public/node/api/graphql.d.ts +2 -0
  64. package/dist/public/node/api/graphql.js +3 -3
  65. package/dist/public/node/api/graphql.js.map +1 -1
  66. package/dist/public/node/api/webhooks.d.ts +13 -0
  67. package/dist/public/node/api/webhooks.js +34 -0
  68. package/dist/public/node/api/webhooks.js.map +1 -0
  69. package/dist/public/node/base-command.js +4 -0
  70. package/dist/public/node/base-command.js.map +1 -1
  71. package/dist/public/node/cli-launcher.d.ts +12 -0
  72. package/dist/public/node/cli-launcher.js +29 -0
  73. package/dist/public/node/cli-launcher.js.map +1 -0
  74. package/dist/public/node/cli.d.ts +16 -10
  75. package/dist/public/node/cli.js +45 -101
  76. package/dist/public/node/cli.js.map +1 -1
  77. package/dist/public/node/context/fqdn.js +11 -7
  78. package/dist/public/node/context/fqdn.js.map +1 -1
  79. package/dist/public/node/context/local.d.ts +7 -0
  80. package/dist/public/node/context/local.js +16 -0
  81. package/dist/public/node/context/local.js.map +1 -1
  82. package/dist/public/node/environment.d.ts +7 -0
  83. package/dist/public/node/environment.js +11 -0
  84. package/dist/public/node/environment.js.map +1 -1
  85. package/dist/public/node/error-handler.js +2 -4
  86. package/dist/public/node/error-handler.js.map +1 -1
  87. package/dist/public/node/error.js +4 -13
  88. package/dist/public/node/error.js.map +1 -1
  89. package/dist/public/node/global-context.d.ts +15 -0
  90. package/dist/public/node/global-context.js +29 -0
  91. package/dist/public/node/global-context.js.map +1 -0
  92. package/dist/public/node/hooks/prerun.js +0 -2
  93. package/dist/public/node/hooks/prerun.js.map +1 -1
  94. package/dist/public/node/is-global.js +2 -1
  95. package/dist/public/node/is-global.js.map +1 -1
  96. package/dist/public/node/json-schema.d.ts +2 -1
  97. package/dist/public/node/json-schema.js +8 -3
  98. package/dist/public/node/json-schema.js.map +1 -1
  99. package/dist/public/node/node-package-manager.js +1 -1
  100. package/dist/public/node/node-package-manager.js.map +1 -1
  101. package/dist/public/node/notifications-system.d.ts +193 -0
  102. package/dist/public/node/notifications-system.js +242 -0
  103. package/dist/public/node/notifications-system.js.map +1 -0
  104. package/dist/public/node/output.d.ts +1 -6
  105. package/dist/public/node/output.js +1 -5
  106. package/dist/public/node/output.js.map +1 -1
  107. package/dist/public/node/path.d.ts +3 -3
  108. package/dist/public/node/path.js +4 -5
  109. package/dist/public/node/path.js.map +1 -1
  110. package/dist/public/node/system.js +14 -2
  111. package/dist/public/node/system.js.map +1 -1
  112. package/dist/public/node/themes/api.d.ts +4 -12
  113. package/dist/public/node/themes/api.js +225 -36
  114. package/dist/public/node/themes/api.js.map +1 -1
  115. package/dist/public/node/themes/factories.d.ts +1 -3
  116. package/dist/public/node/themes/factories.js +0 -16
  117. package/dist/public/node/themes/factories.js.map +1 -1
  118. package/dist/public/node/themes/types.d.ts +1 -0
  119. package/dist/public/node/themes/types.js.map +1 -1
  120. package/dist/public/node/themes/utils.d.ts +2 -0
  121. package/dist/public/node/themes/utils.js +11 -0
  122. package/dist/public/node/themes/utils.js.map +1 -1
  123. package/dist/public/node/tree-kill.js +0 -2
  124. package/dist/public/node/tree-kill.js.map +1 -1
  125. package/dist/public/node/ui.js +30 -80
  126. package/dist/public/node/ui.js.map +1 -1
  127. package/dist/public/node/vendor/dev_server/DevServer.d.ts +19 -0
  128. package/dist/public/node/vendor/dev_server/DevServer.js +170 -0
  129. package/dist/public/node/vendor/dev_server/DevServer.js.map +1 -0
  130. package/dist/public/node/version.d.ts +13 -0
  131. package/dist/public/node/version.js +38 -0
  132. package/dist/public/node/version.js.map +1 -0
  133. package/dist/tsconfig.tsbuildinfo +1 -1
  134. package/package.json +9 -7
  135. package/assets/cli-ruby/.devcontainer.json +0 -5
  136. package/assets/cli-ruby/.rubocop.yml +0 -102
  137. package/assets/cli-ruby/.rubocop_todo.yml +0 -24
  138. package/assets/cli-ruby/CHANGELOG.md +0 -634
  139. package/assets/cli-ruby/CONTRIBUTING.md +0 -3
  140. package/assets/cli-ruby/Codespace.dockerfile +0 -35
  141. package/assets/cli-ruby/Gemfile +0 -32
  142. package/assets/cli-ruby/README.md +0 -30
  143. package/assets/cli-ruby/Rakefile +0 -167
  144. package/assets/cli-ruby/SECURITY.md +0 -59
  145. package/assets/cli-ruby/Tests.dockerfile +0 -35
  146. package/assets/cli-ruby/assets/logo.png +0 -0
  147. package/assets/cli-ruby/bin/console +0 -11
  148. package/assets/cli-ruby/bin/load_shopify.rb +0 -22
  149. package/assets/cli-ruby/bin/shopify +0 -67
  150. package/assets/cli-ruby/bin/shopify.bat +0 -3
  151. package/assets/cli-ruby/dev.yml +0 -29
  152. package/assets/cli-ruby/docs/README.md +0 -13
  153. package/assets/cli-ruby/docs/contributors/testing.md +0 -27
  154. package/assets/cli-ruby/docs/users/installation.md +0 -3
  155. package/assets/cli-ruby/docs/users/migrate-from-themekit.md +0 -18
  156. package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256 +0 -1
  157. package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256 +0 -1
  158. package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256 +0 -1
  159. package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.3.0.gz.sha256 +0 -1
  160. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256 +0 -1
  161. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256 +0 -1
  162. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256 +0 -1
  163. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.3.0.gz.sha256 +0 -1
  164. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256 +0 -1
  165. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256 +0 -1
  166. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256 +0 -1
  167. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.3.0.gz.sha256 +0 -1
  168. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256 +0 -1
  169. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256 +0 -1
  170. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256 +0 -1
  171. package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.3.0.gz.sha256 +0 -1
  172. package/assets/cli-ruby/ext/javy/javy.rb +0 -204
  173. package/assets/cli-ruby/ext/javy/version +0 -1
  174. package/assets/cli-ruby/ext/shopify-extensions/extconf.rb +0 -21
  175. package/assets/cli-ruby/ext/shopify-extensions/shopify_extensions.rb +0 -152
  176. package/assets/cli-ruby/ext/shopify-extensions/version +0 -1
  177. package/assets/cli-ruby/features/support/assertions.rb +0 -17
  178. package/assets/cli-ruby/features/support/cli.rb +0 -7
  179. package/assets/cli-ruby/features/support/process.rb +0 -27
  180. package/assets/cli-ruby/features/support/requires.rb +0 -3
  181. package/assets/cli-ruby/lib/docgen/class_template.md.erb +0 -81
  182. package/assets/cli-ruby/lib/docgen/index_template.md.erb +0 -5
  183. package/assets/cli-ruby/lib/docgen/markdown.rb +0 -101
  184. package/assets/cli-ruby/lib/graphql/admin_introspection.graphql +0 -87
  185. package/assets/cli-ruby/lib/graphql/all_organizations.graphql +0 -19
  186. package/assets/cli-ruby/lib/graphql/all_orgs_with_apps.graphql +0 -30
  187. package/assets/cli-ruby/lib/graphql/api_versions.graphql +0 -6
  188. package/assets/cli-ruby/lib/graphql/convert_dev_to_test_store.graphql +0 -10
  189. package/assets/cli-ruby/lib/graphql/create_app.graphql +0 -20
  190. package/assets/cli-ruby/lib/graphql/create_customer.graphql +0 -9
  191. package/assets/cli-ruby/lib/graphql/create_draft_order.graphql +0 -8
  192. package/assets/cli-ruby/lib/graphql/create_product.graphql +0 -9
  193. package/assets/cli-ruby/lib/graphql/extension_create.graphql +0 -37
  194. package/assets/cli-ruby/lib/graphql/extension_update_draft.graphql +0 -19
  195. package/assets/cli-ruby/lib/graphql/fetch_specifications.graphql +0 -14
  196. package/assets/cli-ruby/lib/graphql/find_organization.graphql +0 -18
  197. package/assets/cli-ruby/lib/graphql/find_organization_with_apps.graphql +0 -20
  198. package/assets/cli-ruby/lib/graphql/get_app_by_api_key.graphql +0 -9
  199. package/assets/cli-ruby/lib/graphql/get_app_urls.graphql +0 -6
  200. package/assets/cli-ruby/lib/graphql/get_extension_registrations.graphql +0 -28
  201. package/assets/cli-ruby/lib/graphql/get_variant_id.graphql +0 -16
  202. package/assets/cli-ruby/lib/graphql/update_dashboard_urls.graphql +0 -8
  203. package/assets/cli-ruby/lib/project_types/extension/cli.rb +0 -75
  204. package/assets/cli-ruby/lib/project_types/extension/commands/extension_command.rb +0 -29
  205. package/assets/cli-ruby/lib/project_types/extension/commands/serve.rb +0 -164
  206. package/assets/cli-ruby/lib/project_types/extension/errors.rb +0 -9
  207. package/assets/cli-ruby/lib/project_types/extension/extension_project.rb +0 -151
  208. package/assets/cli-ruby/lib/project_types/extension/extension_project_keys.rb +0 -12
  209. package/assets/cli-ruby/lib/project_types/extension/features/argo.rb +0 -50
  210. package/assets/cli-ruby/lib/project_types/extension/features/argo_config.rb +0 -59
  211. package/assets/cli-ruby/lib/project_types/extension/features/argo_dependencies.rb +0 -28
  212. package/assets/cli-ruby/lib/project_types/extension/features/argo_runtime.rb +0 -15
  213. package/assets/cli-ruby/lib/project_types/extension/features/argo_serve.rb +0 -115
  214. package/assets/cli-ruby/lib/project_types/extension/features/argo_setup.rb +0 -54
  215. package/assets/cli-ruby/lib/project_types/extension/features/argo_setup_step.rb +0 -31
  216. package/assets/cli-ruby/lib/project_types/extension/features/argo_setup_steps.rb +0 -51
  217. package/assets/cli-ruby/lib/project_types/extension/features/runtimes/admin.rb +0 -29
  218. package/assets/cli-ruby/lib/project_types/extension/features/runtimes/base.rb +0 -19
  219. package/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_post_purchase.rb +0 -23
  220. package/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_ui_extension.rb +0 -29
  221. package/assets/cli-ruby/lib/project_types/extension/loaders/project.rb +0 -50
  222. package/assets/cli-ruby/lib/project_types/extension/loaders/specification_handler.rb +0 -22
  223. package/assets/cli-ruby/lib/project_types/extension/messages/message_loading.rb +0 -34
  224. package/assets/cli-ruby/lib/project_types/extension/messages/messages.rb +0 -320
  225. package/assets/cli-ruby/lib/project_types/extension/models/app.rb +0 -14
  226. package/assets/cli-ruby/lib/project_types/extension/models/lazy_specification_handler.rb +0 -12
  227. package/assets/cli-ruby/lib/project_types/extension/models/specification.rb +0 -41
  228. package/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/default.rb +0 -145
  229. package/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +0 -134
  230. package/assets/cli-ruby/lib/project_types/extension/models/specifications.rb +0 -91
  231. package/assets/cli-ruby/lib/project_types/extension/models/validation_error.rb +0 -17
  232. package/assets/cli-ruby/lib/project_types/extension/models/version.rb +0 -15
  233. package/assets/cli-ruby/lib/project_types/extension/tasks/configure_features.rb +0 -73
  234. package/assets/cli-ruby/lib/project_types/extension/tasks/configure_options.rb +0 -21
  235. package/assets/cli-ruby/lib/project_types/extension/tasks/converters/validation_error_converter.rb +0 -25
  236. package/assets/cli-ruby/lib/project_types/extension/tasks/converters/version_converter.rb +0 -28
  237. package/assets/cli-ruby/lib/project_types/extension/tasks/fetch_specifications.rb +0 -21
  238. package/assets/cli-ruby/lib/project_types/node/cli.rb +0 -12
  239. package/assets/cli-ruby/lib/project_types/node/forms/create.rb +0 -45
  240. package/assets/cli-ruby/lib/project_types/node/messages/messages.rb +0 -33
  241. package/assets/cli-ruby/lib/project_types/php/cli.rb +0 -16
  242. package/assets/cli-ruby/lib/project_types/php/forms/create.rb +0 -44
  243. package/assets/cli-ruby/lib/project_types/php/messages/messages.rb +0 -29
  244. package/assets/cli-ruby/lib/project_types/rails/cli.rb +0 -15
  245. package/assets/cli-ruby/lib/project_types/rails/forms/create.rb +0 -75
  246. package/assets/cli-ruby/lib/project_types/rails/gem.rb +0 -110
  247. package/assets/cli-ruby/lib/project_types/rails/messages/messages.rb +0 -101
  248. package/assets/cli-ruby/lib/project_types/script/cli.rb +0 -27
  249. package/assets/cli-ruby/lib/project_types/script/commands/connect.rb +0 -16
  250. package/assets/cli-ruby/lib/project_types/script/commands/create.rb +0 -24
  251. package/assets/cli-ruby/lib/project_types/script/commands/javy.rb +0 -24
  252. package/assets/cli-ruby/lib/project_types/script/commands/push.rb +0 -26
  253. package/assets/cli-ruby/lib/project_types/script/loaders/project.rb +0 -46
  254. package/assets/cli-ruby/lib/project_types/script/loaders/specification_handler.rb +0 -22
  255. package/assets/cli-ruby/lib/project_types/script/messages/messages.rb +0 -11
  256. package/assets/cli-ruby/lib/project_types/theme/cli.rb +0 -33
  257. package/assets/cli-ruby/lib/project_types/theme/commands/common/root_helper.rb +0 -94
  258. package/assets/cli-ruby/lib/project_types/theme/commands/common/shop_helper.rb +0 -13
  259. package/assets/cli-ruby/lib/project_types/theme/commands/console.rb +0 -23
  260. package/assets/cli-ruby/lib/project_types/theme/commands/delete.rb +0 -70
  261. package/assets/cli-ruby/lib/project_types/theme/commands/init.rb +0 -46
  262. package/assets/cli-ruby/lib/project_types/theme/commands/list.rb +0 -33
  263. package/assets/cli-ruby/lib/project_types/theme/commands/open.rb +0 -73
  264. package/assets/cli-ruby/lib/project_types/theme/commands/package.rb +0 -73
  265. package/assets/cli-ruby/lib/project_types/theme/commands/publish.rb +0 -49
  266. package/assets/cli-ruby/lib/project_types/theme/commands/pull.rb +0 -118
  267. package/assets/cli-ruby/lib/project_types/theme/commands/push.rb +0 -160
  268. package/assets/cli-ruby/lib/project_types/theme/commands/serve.rb +0 -91
  269. package/assets/cli-ruby/lib/project_types/theme/commands/share.rb +0 -62
  270. package/assets/cli-ruby/lib/project_types/theme/commands/token.rb +0 -22
  271. package/assets/cli-ruby/lib/project_types/theme/conversions/base_glob.rb +0 -65
  272. package/assets/cli-ruby/lib/project_types/theme/conversions/ignore_glob.rb +0 -15
  273. package/assets/cli-ruby/lib/project_types/theme/conversions/include_glob.rb +0 -15
  274. package/assets/cli-ruby/lib/project_types/theme/forms/confirm_store.rb +0 -15
  275. package/assets/cli-ruby/lib/project_types/theme/forms/select.rb +0 -34
  276. package/assets/cli-ruby/lib/project_types/theme/messages/messages.rb +0 -429
  277. package/assets/cli-ruby/lib/project_types/theme/models/specification_handlers/theme.rb +0 -19
  278. package/assets/cli-ruby/lib/project_types/theme/presenters/theme_presenter.rb +0 -48
  279. package/assets/cli-ruby/lib/project_types/theme/presenters/themes_presenter.rb +0 -29
  280. package/assets/cli-ruby/lib/project_types/theme/ui/sync_progress_bar.rb +0 -20
  281. package/assets/cli-ruby/lib/rubygems_plugin.rb +0 -26
  282. package/assets/cli-ruby/lib/shopify_cli/admin_api.rb +0 -160
  283. package/assets/cli-ruby/lib/shopify_cli/api.rb +0 -130
  284. package/assets/cli-ruby/lib/shopify_cli/command/project_command.rb +0 -31
  285. package/assets/cli-ruby/lib/shopify_cli/command/sub_command.rb +0 -20
  286. package/assets/cli-ruby/lib/shopify_cli/command.rb +0 -166
  287. package/assets/cli-ruby/lib/shopify_cli/commands.rb +0 -21
  288. package/assets/cli-ruby/lib/shopify_cli/constants.rb +0 -101
  289. package/assets/cli-ruby/lib/shopify_cli/context.rb +0 -709
  290. package/assets/cli-ruby/lib/shopify_cli/core/cli_version.rb +0 -20
  291. package/assets/cli-ruby/lib/shopify_cli/core/entry_point.rb +0 -64
  292. package/assets/cli-ruby/lib/shopify_cli/core/executor.rb +0 -23
  293. package/assets/cli-ruby/lib/shopify_cli/core/finalize.rb +0 -13
  294. package/assets/cli-ruby/lib/shopify_cli/core/monorail.rb +0 -122
  295. package/assets/cli-ruby/lib/shopify_cli/core.rb +0 -8
  296. package/assets/cli-ruby/lib/shopify_cli/db.rb +0 -114
  297. package/assets/cli-ruby/lib/shopify_cli/environment.rb +0 -217
  298. package/assets/cli-ruby/lib/shopify_cli/exception_reporter.rb +0 -80
  299. package/assets/cli-ruby/lib/shopify_cli/feature.rb +0 -95
  300. package/assets/cli-ruby/lib/shopify_cli/file_system_listener.rb +0 -30
  301. package/assets/cli-ruby/lib/shopify_cli/form.rb +0 -42
  302. package/assets/cli-ruby/lib/shopify_cli/git.rb +0 -320
  303. package/assets/cli-ruby/lib/shopify_cli/github/issue_url_generator.rb +0 -30
  304. package/assets/cli-ruby/lib/shopify_cli/github.rb +0 -5
  305. package/assets/cli-ruby/lib/shopify_cli/helpers/haikunator.rb +0 -92
  306. package/assets/cli-ruby/lib/shopify_cli/helpers.rb +0 -5
  307. package/assets/cli-ruby/lib/shopify_cli/http_request.rb +0 -43
  308. package/assets/cli-ruby/lib/shopify_cli/identity_auth/env_auth_token.rb +0 -34
  309. package/assets/cli-ruby/lib/shopify_cli/identity_auth.rb +0 -332
  310. package/assets/cli-ruby/lib/shopify_cli/js_system.rb +0 -115
  311. package/assets/cli-ruby/lib/shopify_cli/lazy_delegator.rb +0 -55
  312. package/assets/cli-ruby/lib/shopify_cli/messages/messages.rb +0 -863
  313. package/assets/cli-ruby/lib/shopify_cli/method_object.rb +0 -123
  314. package/assets/cli-ruby/lib/shopify_cli/migrator/migration.rb +0 -27
  315. package/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +0 -13
  316. package/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1633691650_merge_reporting_configuration.rb +0 -41
  317. package/assets/cli-ruby/lib/shopify_cli/migrator.rb +0 -46
  318. package/assets/cli-ruby/lib/shopify_cli/options.rb +0 -40
  319. package/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions/job.rb +0 -36
  320. package/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions.rb +0 -46
  321. package/assets/cli-ruby/lib/shopify_cli/partners_api/organizations.rb +0 -45
  322. package/assets/cli-ruby/lib/shopify_cli/partners_api.rb +0 -91
  323. package/assets/cli-ruby/lib/shopify_cli/project.rb +0 -199
  324. package/assets/cli-ruby/lib/shopify_cli/project_type.rb +0 -66
  325. package/assets/cli-ruby/lib/shopify_cli/reporting_configuration_controller.rb +0 -29
  326. package/assets/cli-ruby/lib/shopify_cli/resolve_constant.rb +0 -25
  327. package/assets/cli-ruby/lib/shopify_cli/resources/env_file.rb +0 -108
  328. package/assets/cli-ruby/lib/shopify_cli/resources.rb +0 -5
  329. package/assets/cli-ruby/lib/shopify_cli/result.rb +0 -448
  330. package/assets/cli-ruby/lib/shopify_cli/shopifolk.rb +0 -82
  331. package/assets/cli-ruby/lib/shopify_cli/task.rb +0 -20
  332. package/assets/cli-ruby/lib/shopify_cli/tasks/confirm_store.rb +0 -18
  333. package/assets/cli-ruby/lib/shopify_cli/tasks/create_api_client.rb +0 -40
  334. package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_authenticated.rb +0 -19
  335. package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_dev_store.rb +0 -41
  336. package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_env.rb +0 -90
  337. package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_git_dependency.rb +0 -14
  338. package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_loopback_url.rb +0 -20
  339. package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_project_type.rb +0 -14
  340. package/assets/cli-ruby/lib/shopify_cli/tasks/select_org_and_shop.rb +0 -81
  341. package/assets/cli-ruby/lib/shopify_cli/tasks/update_dashboard_urls.rb +0 -57
  342. package/assets/cli-ruby/lib/shopify_cli/tasks.rb +0 -44
  343. package/assets/cli-ruby/lib/shopify_cli/theme/backoff_helper.rb +0 -47
  344. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/cdn_fonts.rb +0 -82
  345. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/certificate_manager.rb +0 -79
  346. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/errors.rb +0 -9
  347. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/header_hash.rb +0 -98
  348. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hooks/file_change_hook.rb +0 -77
  349. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_deleter.rb +0 -62
  350. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_reloader.rb +0 -63
  351. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot-reload-no-script.html +0 -27
  352. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot_reload.js +0 -48
  353. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/sse_client.js +0 -43
  354. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme.js +0 -114
  355. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme_extension.js +0 -121
  356. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/script_injector.rb +0 -57
  357. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/sections_index.rb +0 -50
  358. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload.rb +0 -75
  359. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/local_assets.rb +0 -101
  360. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +0 -313
  361. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy_param_builder.rb +0 -84
  362. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/reload_mode.rb +0 -34
  363. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb +0 -35
  364. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher.rb +0 -44
  365. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/sse.rb +0 -75
  366. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/watcher.rb +0 -64
  367. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/web_server.rb +0 -140
  368. package/assets/cli-ruby/lib/shopify_cli/theme/dev_server.rb +0 -332
  369. package/assets/cli-ruby/lib/shopify_cli/theme/development_theme.rb +0 -101
  370. package/assets/cli-ruby/lib/shopify_cli/theme/extension/app_extension.rb +0 -40
  371. package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hooks/file_change_hook.rb +0 -76
  372. package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload/script_injector.rb +0 -30
  373. package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload.rb +0 -13
  374. package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/local_assets.rb +0 -31
  375. package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/proxy_param_builder.rb +0 -94
  376. package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/watcher.rb +0 -49
  377. package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server.rb +0 -175
  378. package/assets/cli-ruby/lib/shopify_cli/theme/extension/host_theme.rb +0 -109
  379. package/assets/cli-ruby/lib/shopify_cli/theme/extension/ignore_helper.rb +0 -35
  380. package/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/extension_serve_job.rb +0 -120
  381. package/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/operation.rb +0 -25
  382. package/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer.rb +0 -100
  383. package/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_progress_bar.rb +0 -35
  384. package/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_raw_progress_bar.rb +0 -40
  385. package/assets/cli-ruby/lib/shopify_cli/theme/file.rb +0 -133
  386. package/assets/cli-ruby/lib/shopify_cli/theme/filter/path_matcher.rb +0 -38
  387. package/assets/cli-ruby/lib/shopify_cli/theme/ignore_filter.rb +0 -112
  388. package/assets/cli-ruby/lib/shopify_cli/theme/ignore_helper.rb +0 -37
  389. package/assets/cli-ruby/lib/shopify_cli/theme/include_filter.rb +0 -67
  390. package/assets/cli-ruby/lib/shopify_cli/theme/mime_type.rb +0 -34
  391. package/assets/cli-ruby/lib/shopify_cli/theme/notifier.rb +0 -52
  392. package/assets/cli-ruby/lib/shopify_cli/theme/repl/api.rb +0 -109
  393. package/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_dev_server.rb +0 -93
  394. package/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_middleware.rb +0 -97
  395. package/assets/cli-ruby/lib/shopify_cli/theme/repl/remote_evaluator.rb +0 -166
  396. package/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/success.html +0 -78
  397. package/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/template.liquid +0 -15
  398. package/assets/cli-ruby/lib/shopify_cli/theme/repl/snippet.rb +0 -81
  399. package/assets/cli-ruby/lib/shopify_cli/theme/repl.rb +0 -88
  400. package/assets/cli-ruby/lib/shopify_cli/theme/root.rb +0 -62
  401. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/checksums.rb +0 -66
  402. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/downloader.rb +0 -63
  403. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/error_reporter.rb +0 -45
  404. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/merger.rb +0 -53
  405. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/operation.rb +0 -49
  406. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/standard_reporter.rb +0 -32
  407. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/unsupported_script_warning.rb +0 -90
  408. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk.rb +0 -133
  409. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_item.rb +0 -64
  410. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_job.rb +0 -139
  411. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_request.rb +0 -30
  412. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb +0 -41
  413. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all_form.rb +0 -37
  414. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb +0 -64
  415. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_delete_strategy.rb +0 -29
  416. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_update_strategy.rb +0 -30
  417. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_delete_handler.rb +0 -49
  418. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_update_handler.rb +0 -71
  419. package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader.rb +0 -231
  420. package/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb +0 -391
  421. package/assets/cli-ruby/lib/shopify_cli/theme/theme.rb +0 -212
  422. package/assets/cli-ruby/lib/shopify_cli/theme/theme_access_api.rb +0 -89
  423. package/assets/cli-ruby/lib/shopify_cli/theme/theme_admin_api.rb +0 -101
  424. package/assets/cli-ruby/lib/shopify_cli/thread_pool/job.rb +0 -35
  425. package/assets/cli-ruby/lib/shopify_cli/thread_pool.rb +0 -49
  426. package/assets/cli-ruby/lib/shopify_cli/transform_data_structure.rb +0 -87
  427. package/assets/cli-ruby/lib/shopify_cli/utilities.rb +0 -21
  428. package/assets/cli-ruby/lib/shopify_cli/version.rb +0 -3
  429. package/assets/cli-ruby/lib/shopify_cli.rb +0 -182
  430. package/assets/cli-ruby/shipit.rubygems.yml +0 -3
  431. package/assets/cli-ruby/shopify-cli.gemspec +0 -46
  432. package/assets/cli-ruby/shopify-dev +0 -16
  433. package/assets/cli-ruby/test/minitest_ext.rb +0 -115
  434. package/assets/cli-ruby/test/project_types/extension/extension_test_helpers.rb +0 -70
  435. package/assets/cli-ruby/test/shopify-cli/migrator/migrations/migration_helper.rb +0 -20
  436. package/assets/cli-ruby/test/test_helpers.rb +0 -16
  437. package/assets/cli-ruby/utilities/constants.rb +0 -7
  438. package/assets/cli-ruby/utilities/docker/container.rb +0 -104
  439. package/assets/cli-ruby/utilities/docker.rb +0 -89
  440. package/assets/cli-ruby/utilities/utilities.rb +0 -6
  441. package/assets/cli-ruby/vendor/deps/cli-kit/REVISION +0 -1
  442. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +0 -21
  443. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +0 -49
  444. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +0 -94
  445. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/config.rb +0 -133
  446. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +0 -123
  447. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/executor.rb +0 -79
  448. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ini.rb +0 -102
  449. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +0 -82
  450. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/logger.rb +0 -82
  451. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +0 -60
  452. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ruby_backports/enumerable.rb +0 -6
  453. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +0 -244
  454. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support.rb +0 -9
  455. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/system.rb +0 -243
  456. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/util.rb +0 -193
  457. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/version.rb +0 -5
  458. package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit.rb +0 -60
  459. package/assets/cli-ruby/vendor/deps/cli-ui/REVISION +0 -1
  460. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +0 -157
  461. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/color.rb +0 -84
  462. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +0 -193
  463. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +0 -98
  464. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +0 -166
  465. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +0 -139
  466. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +0 -120
  467. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame.rb +0 -269
  468. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +0 -84
  469. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/os.rb +0 -73
  470. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/printer.rb +0 -59
  471. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress.rb +0 -90
  472. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress_plain.rb +0 -50
  473. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +0 -484
  474. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +0 -29
  475. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +0 -282
  476. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +0 -40
  477. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +0 -263
  478. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +0 -66
  479. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +0 -232
  480. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +0 -46
  481. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +0 -102
  482. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/version.rb +0 -5
  483. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +0 -27
  484. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +0 -61
  485. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +0 -77
  486. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +0 -56
  487. package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui.rb +0 -234
  488. package/assets/cli-ruby/vendor/deps/ruby2_keywords/LICENSE +0 -22
  489. package/assets/cli-ruby/vendor/deps/ruby2_keywords/README.md +0 -67
  490. package/assets/cli-ruby/vendor/deps/ruby2_keywords/Rakefile +0 -54
  491. package/assets/cli-ruby/vendor/deps/ruby2_keywords/lib/ruby2_keywords.rb +0 -57
  492. package/assets/cli-ruby/vendor/deps/ruby2_keywords/ruby2_keywords.gemspec +0 -18
  493. package/assets/cli-ruby/vendor/deps/ruby2_keywords/test/test_keyword.rb +0 -41
  494. package/assets/cli-ruby/vendor/deps/smart_properties/REVISION +0 -1
  495. package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/errors.rb +0 -114
  496. package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property.rb +0 -168
  497. package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property_collection.rb +0 -83
  498. package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations/ancestor.rb +0 -27
  499. package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations.rb +0 -8
  500. package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/version.rb +0 -3
  501. package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties.rb +0 -174
  502. package/assets/cli-ruby/vendor/deps/webrick/Gemfile +0 -3
  503. package/assets/cli-ruby/vendor/deps/webrick/LICENSE.txt +0 -22
  504. package/assets/cli-ruby/vendor/deps/webrick/README.md +0 -61
  505. package/assets/cli-ruby/vendor/deps/webrick/Rakefile +0 -10
  506. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/accesslog.rb +0 -157
  507. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cgi.rb +0 -313
  508. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/compat.rb +0 -36
  509. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/config.rb +0 -158
  510. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cookie.rb +0 -172
  511. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/htmlutils.rb +0 -30
  512. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +0 -117
  513. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +0 -116
  514. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +0 -395
  515. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +0 -132
  516. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +0 -97
  517. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +0 -158
  518. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +0 -53
  519. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth.rb +0 -96
  520. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpproxy.rb +0 -354
  521. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httprequest.rb +0 -636
  522. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpresponse.rb +0 -564
  523. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/https.rb +0 -152
  524. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpserver.rb +0 -294
  525. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +0 -152
  526. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +0 -47
  527. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +0 -126
  528. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +0 -88
  529. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +0 -552
  530. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +0 -47
  531. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet.rb +0 -23
  532. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpstatus.rb +0 -194
  533. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httputils.rb +0 -512
  534. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpversion.rb +0 -76
  535. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/log.rb +0 -156
  536. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/server.rb +0 -381
  537. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/ssl.rb +0 -215
  538. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/utils.rb +0 -265
  539. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/version.rb +0 -18
  540. package/assets/cli-ruby/vendor/deps/webrick/lib/webrick.rb +0 -232
  541. package/assets/cli-ruby/vendor/deps/webrick/webrick.gemspec +0 -74
  542. package/assets/cli-ruby/vendor/gen/lib/gen/commands/help.rb +0 -20
  543. package/assets/cli-ruby/vendor/gen/lib/gen/commands/new.rb +0 -21
  544. package/assets/cli-ruby/vendor/gen/lib/gen/commands.rb +0 -18
  545. package/assets/cli-ruby/vendor/gen/lib/gen/entry_point.rb +0 -10
  546. package/assets/cli-ruby/vendor/gen/lib/gen/generator.rb +0 -165
  547. package/assets/cli-ruby/vendor/gen/lib/gen.rb +0 -39
  548. package/assets/cli-ruby/vendor/gen/template/Gemfile +0 -10
  549. package/assets/cli-ruby/vendor/gen/template/README.md +0 -1
  550. package/assets/cli-ruby/vendor/gen/template/bin/testunit +0 -23
  551. package/assets/cli-ruby/vendor/gen/template/bin/update-deps +0 -97
  552. package/assets/cli-ruby/vendor/gen/template/dev-gems.yml +0 -3
  553. package/assets/cli-ruby/vendor/gen/template/dev-vendor.yml +0 -4
  554. package/assets/cli-ruby/vendor/gen/template/exe/__app__-gems +0 -17
  555. package/assets/cli-ruby/vendor/gen/template/exe/__app__-vendor +0 -18
  556. package/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/example.rb +0 -19
  557. package/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/help.rb +0 -21
  558. package/assets/cli-ruby/vendor/gen/template/lib/__app__/commands.rb +0 -18
  559. package/assets/cli-ruby/vendor/gen/template/lib/__app__/entry_point.rb +0 -10
  560. package/assets/cli-ruby/vendor/gen/template/lib/__app__.rb +0 -33
  561. package/assets/cli-ruby/vendor/gen/template/test/example_test.rb +0 -17
  562. package/assets/cli-ruby/vendor/gen/template/test/test_helper.rb +0 -22
  563. package/assets/cli-ruby/vendor/lib/semantic/LICENSE +0 -20
  564. package/assets/cli-ruby/vendor/lib/semantic/semantic.rb +0 -4
  565. package/assets/cli-ruby/vendor/lib/semantic/version.rb +0 -179
  566. package/dist/private/node/demo-recorder.d.ts +0 -17
  567. package/dist/private/node/demo-recorder.js +0 -121
  568. package/dist/private/node/demo-recorder.js.map +0 -1
  569. package/dist/public/node/ruby.d.ts +0 -38
  570. package/dist/public/node/ruby.js +0 -327
  571. package/dist/public/node/ruby.js.map +0 -1
@@ -1,82 +0,0 @@
1
- require 'logger'
2
- require 'fileutils'
3
-
4
- module CLI
5
- module Kit
6
- class Logger
7
- MAX_LOG_SIZE = 5 * 1024 * 1000 # 5MB
8
- MAX_NUM_LOGS = 10
9
-
10
- # Constructor for CLI::Kit::Logger
11
- #
12
- # @param debug_log_file [String] path to the file where debug logs should be stored
13
- def initialize(debug_log_file:, env_debug_name: 'DEBUG')
14
- FileUtils.mkpath(File.dirname(debug_log_file))
15
- @debug_logger = ::Logger.new(debug_log_file, MAX_NUM_LOGS, MAX_LOG_SIZE)
16
- @env_debug_name = env_debug_name
17
- end
18
-
19
- # Functionally equivalent to Logger#info
20
- # Also logs to the debug file, taking into account CLI::UI::StdoutRouter.current_id
21
- #
22
- # @param msg [String] the message to log
23
- # @param debug [Boolean] determines if the debug logger will receive the log (default true)
24
- def info(msg, debug: true)
25
- $stdout.puts CLI::UI.fmt(msg)
26
- @debug_logger.info(format_debug(msg)) if debug
27
- end
28
-
29
- # Functionally equivalent to Logger#warn
30
- # Also logs to the debug file, taking into account CLI::UI::StdoutRouter.current_id
31
- #
32
- # @param msg [String] the message to log
33
- # @param debug [Boolean] determines if the debug logger will receive the log (default true)
34
- def warn(msg, debug: true)
35
- $stdout.puts CLI::UI.fmt("{{yellow:#{msg}}}")
36
- @debug_logger.warn(format_debug(msg)) if debug
37
- end
38
-
39
- # Functionally equivalent to Logger#error
40
- # Also logs to the debug file, taking into account CLI::UI::StdoutRouter.current_id
41
- #
42
- # @param msg [String] the message to log
43
- # @param debug [Boolean] determines if the debug logger will receive the log (default true)
44
- def error(msg, debug: true)
45
- $stderr.puts CLI::UI.fmt("{{red:#{msg}}}")
46
- @debug_logger.error(format_debug(msg)) if debug
47
- end
48
-
49
- # Functionally equivalent to Logger#fatal
50
- # Also logs to the debug file, taking into account CLI::UI::StdoutRouter.current_id
51
- #
52
- # @param msg [String] the message to log
53
- # @param debug [Boolean] determines if the debug logger will receive the log (default true)
54
- def fatal(msg, debug: true)
55
- $stderr.puts CLI::UI.fmt("{{red:{{bold:Fatal:}} #{msg}}}")
56
- @debug_logger.fatal(format_debug(msg)) if debug
57
- end
58
-
59
- # Similar to Logger#debug, however will not output to STDOUT unless DEBUG env var is set
60
- # Logs to the debug file, taking into account CLI::UI::StdoutRouter.current_id
61
- #
62
- # @param msg [String] the message to log
63
- def debug(msg)
64
- $stdout.puts CLI::UI.fmt(msg) if debug?
65
- @debug_logger.debug(format_debug(msg))
66
- end
67
-
68
- private
69
-
70
- def format_debug(msg)
71
- msg = CLI::UI.fmt(msg)
72
- return msg unless CLI::UI::StdoutRouter.current_id
73
- "[#{CLI::UI::StdoutRouter.current_id[:id]}] #{msg}"
74
- end
75
-
76
- def debug?
77
- val = ENV[@env_debug_name]
78
- val && val != '0' && val != ''
79
- end
80
- end
81
- end
82
- end
@@ -1,60 +0,0 @@
1
- require 'cli/kit'
2
-
3
- module CLI
4
- module Kit
5
- class Resolver
6
- def initialize(tool_name:, command_registry:)
7
- @tool_name = tool_name
8
- @command_registry = command_registry
9
- end
10
-
11
- def call(args)
12
- args = args.dup
13
- command_name = args.shift
14
-
15
- command, resolved_name = @command_registry.lookup_command(command_name)
16
-
17
- if command.nil?
18
- command_not_found(command_name)
19
- raise CLI::Kit::AbortSilent # Already output message
20
- end
21
-
22
- [command, resolved_name, args]
23
- end
24
-
25
- private
26
-
27
- def command_not_found(name)
28
- CLI::UI::Frame.open("Command not found", color: :red, timing: false) do
29
- $stderr.puts(CLI::UI.fmt("{{command:#{@tool_name} #{name}}} was not found"))
30
- end
31
-
32
- cmds = commands_and_aliases
33
- if cmds.all? { |cmd| cmd.is_a?(String) }
34
- possible_matches = cmds.min_by(2) do |cmd|
35
- CLI::Kit::Levenshtein.distance(cmd, name)
36
- end
37
-
38
- # We don't want to match against any possible command
39
- # so reject anything that is too far away
40
- possible_matches.reject! do |possible_match|
41
- CLI::Kit::Levenshtein.distance(possible_match, name) > 3
42
- end
43
-
44
- # If we have any matches left, tell the user
45
- if possible_matches.any?
46
- CLI::UI::Frame.open("{{bold:Did you mean?}}", timing: false, color: :blue) do
47
- possible_matches.each do |possible_match|
48
- $stderr.puts CLI::UI.fmt("{{command:#{@tool_name} #{possible_match}}}")
49
- end
50
- end
51
- end
52
- end
53
- end
54
-
55
- def commands_and_aliases
56
- @command_registry.command_names + @command_registry.aliases.keys
57
- end
58
- end
59
- end
60
- end
@@ -1,6 +0,0 @@
1
- module Enumerable
2
- def min_by(n = nil, &block)
3
- return sort_by(&block).first unless n
4
- sort_by(&block).first(n)
5
- end if instance_method(:min_by).arity == 0
6
- end
@@ -1,244 +0,0 @@
1
- module CLI
2
- module Kit
3
- module Support
4
- module TestHelper
5
- def setup
6
- super
7
- CLI::Kit::System.reset!
8
- end
9
-
10
- def assert_all_commands_run(should_raise: true)
11
- errors = CLI::Kit::System.error_message
12
- CLI::Kit::System.reset!
13
- assert(false, errors) if should_raise && !errors.nil?
14
- errors
15
- end
16
-
17
- def teardown
18
- super
19
- assert_all_commands_run
20
- end
21
-
22
- module FakeConfig
23
- require 'tmpdir'
24
- require 'fileutils'
25
-
26
- def setup
27
- super
28
- @tmpdir = Dir.mktmpdir
29
- @prev_xdg = ENV['XDG_CONFIG_HOME']
30
- ENV['XDG_CONFIG_HOME'] = @tmpdir
31
- end
32
-
33
- def teardown
34
- FileUtils.rm_rf(@tmpdir)
35
- ENV['XDG_CONFIG_HOME'] = @prev_xdg
36
- super
37
- end
38
- end
39
-
40
- class FakeSuccess
41
- def initialize(success)
42
- @success = success
43
- end
44
-
45
- def success?
46
- @success
47
- end
48
- end
49
-
50
- module ::CLI
51
- module Kit
52
- module System
53
- class << self
54
- alias_method :original_system, :system
55
- def system(*a, sudo: false, env: {}, **kwargs)
56
- expected_command = expected_command(*a, sudo: sudo, env: env)
57
-
58
- # In the case of an unexpected command, expected_command will be nil
59
- return FakeSuccess.new(false) if expected_command.nil?
60
-
61
- # Otherwise handle the command
62
- if expected_command[:allow]
63
- original_system(*a, sudo: sudo, env: env, **kwargs)
64
- else
65
- FakeSuccess.new(expected_command[:success])
66
- end
67
- end
68
-
69
- alias_method :original_capture2, :capture2
70
- def capture2(*a, sudo: false, env: {}, **kwargs)
71
- expected_command = expected_command(*a, sudo: sudo, env: env)
72
-
73
- # In the case of an unexpected command, expected_command will be nil
74
- return [nil, FakeSuccess.new(false)] if expected_command.nil?
75
-
76
- # Otherwise handle the command
77
- if expected_command[:allow]
78
- original_capture2(*a, sudo: sudo, env: env, **kwargs)
79
- else
80
- [
81
- expected_command[:stdout],
82
- FakeSuccess.new(expected_command[:success]),
83
- ]
84
- end
85
- end
86
-
87
- alias_method :original_capture2e, :capture2e
88
- def capture2e(*a, sudo: false, env: {}, **kwargs)
89
- expected_command = expected_command(*a, sudo: sudo, env: env)
90
-
91
- # In the case of an unexpected command, expected_command will be nil
92
- return [nil, FakeSuccess.new(false)] if expected_command.nil?
93
-
94
- # Otherwise handle the command
95
- if expected_command[:allow]
96
- original_capture2ecapture2e(*a, sudo: sudo, env: env, **kwargs)
97
- else
98
- [
99
- expected_command[:stdout],
100
- FakeSuccess.new(expected_command[:success]),
101
- ]
102
- end
103
- end
104
-
105
- alias_method :original_capture3, :capture3
106
- def capture3(*a, sudo: false, env: {}, **kwargs)
107
- expected_command = expected_command(*a, sudo: sudo, env: env)
108
-
109
- # In the case of an unexpected command, expected_command will be nil
110
- return [nil, nil, FakeSuccess.new(false)] if expected_command.nil?
111
-
112
- # Otherwise handle the command
113
- if expected_command[:allow]
114
- original_capture3(*a, sudo: sudo, env: env, **kwargs)
115
- else
116
- [
117
- expected_command[:stdout],
118
- expected_command[:stderr],
119
- FakeSuccess.new(expected_command[:success]),
120
- ]
121
- end
122
- end
123
-
124
- # Sets up an expectation for a command and stubs out the call (unless allow is true)
125
- #
126
- # #### Parameters
127
- # `*a` : the command, represented as a splat
128
- # `stdout` : stdout to stub the command with (defaults to empty string)
129
- # `stderr` : stderr to stub the command with (defaults to empty string)
130
- # `allow` : allow determines if the command will be actually run, or stubbed. Defaults to nil (stub)
131
- # `success` : success status to stub the command with (Defaults to nil)
132
- # `sudo` : expectation of sudo being set or not (defaults to false)
133
- # `env` : expectation of env being set or not (defaults to {})
134
- #
135
- # Note: Must set allow or success
136
- #
137
- def fake(*a, stdout: "", stderr: "", allow: nil, success: nil, sudo: false, env: {})
138
- raise ArgumentError, "success or allow must be set" if success.nil? && allow.nil?
139
-
140
- @delegate_open3 ||= {}
141
- @delegate_open3[a.join(' ')] = {
142
- expected: {
143
- sudo: sudo,
144
- env: env,
145
- },
146
- actual: {
147
- sudo: nil,
148
- env: nil,
149
- },
150
- stdout: stdout,
151
- stderr: stderr,
152
- allow: allow,
153
- success: success,
154
- run: false,
155
- }
156
- end
157
-
158
- # Resets the faked commands
159
- #
160
- def reset!
161
- @delegate_open3 = {}
162
- end
163
-
164
- # Returns the errors associated to a test run
165
- #
166
- # #### Returns
167
- # `errors` (String) a string representing errors found on this run, nil if none
168
- def error_message
169
- errors = {
170
- unexpected: [],
171
- not_run: [],
172
- other: {},
173
- }
174
-
175
- @delegate_open3.each do |cmd, opts|
176
- if opts[:unexpected]
177
- errors[:unexpected] << cmd
178
- elsif opts[:run]
179
- error = []
180
-
181
- if opts[:expected][:sudo] != opts[:actual][:sudo]
182
- error << "- sudo was supposed to be #{opts[:expected][:sudo]} but was #{opts[:actual][:sudo]}"
183
- end
184
-
185
- if opts[:expected][:env] != opts[:actual][:env]
186
- error << "- env was supposed to be #{opts[:expected][:env]} but was #{opts[:actual][:env]}"
187
- end
188
-
189
- errors[:other][cmd] = error.join("\n") unless error.empty?
190
- else
191
- errors[:not_run] << cmd
192
- end
193
- end
194
-
195
- final_error = []
196
-
197
- unless errors[:unexpected].empty?
198
- final_error << CLI::UI.fmt(<<~EOF)
199
- {{bold:Unexpected command invocations:}}
200
- {{command:#{errors[:unexpected].join("\n")}}}
201
- EOF
202
- end
203
-
204
- unless errors[:not_run].empty?
205
- final_error << CLI::UI.fmt(<<~EOF)
206
- {{bold:Expected commands were not run:}}
207
- {{command:#{errors[:not_run].join("\n")}}}
208
- EOF
209
- end
210
-
211
- unless errors[:other].empty?
212
- final_error << CLI::UI.fmt(<<~EOF)
213
- {{bold:Commands were not run as expected:}}
214
- #{errors[:other].map { |cmd, msg| "{{command:#{cmd}}}\n#{msg}" }.join("\n\n")}
215
- EOF
216
- end
217
-
218
- return nil if final_error.empty?
219
- "\n" + final_error.join("\n") # Initial new line for formatting reasons
220
- end
221
-
222
- private
223
-
224
- def expected_command(*a, sudo: raise, env: raise)
225
- expected_cmd = @delegate_open3[a.join(' ')]
226
-
227
- if expected_cmd.nil?
228
- @delegate_open3[a.join(' ')] = { unexpected: true }
229
- return nil
230
- end
231
-
232
- expected_cmd[:run] = true
233
- expected_cmd[:actual][:sudo] = sudo
234
- expected_cmd[:actual][:env] = env
235
- expected_cmd
236
- end
237
- end
238
- end
239
- end
240
- end
241
- end
242
- end
243
- end
244
- end
@@ -1,9 +0,0 @@
1
- require 'cli/kit'
2
-
3
- module CLI
4
- module Kit
5
- module Support
6
- autoload :TestHelper, 'cli/kit/support/test_helper'
7
- end
8
- end
9
- end
@@ -1,243 +0,0 @@
1
- require 'cli/kit'
2
-
3
- require 'open3'
4
- require 'English'
5
-
6
- module CLI
7
- module Kit
8
- module System
9
- SUDO_PROMPT = CLI::UI.fmt("{{info:(sudo)}} Password: ")
10
- class << self
11
- # Ask for sudo access with a message explaning the need for it
12
- # Will make subsequent commands capable of running with sudo for a period of time
13
- #
14
- # #### Parameters
15
- # - `msg`: A message telling the user why sudo is needed
16
- #
17
- # #### Usage
18
- # `ctx.sudo_reason("We need to do a thing")`
19
- #
20
- def sudo_reason(msg)
21
- # See if sudo has a cached password
22
- %x(env SUDO_ASKPASS=/usr/bin/false sudo -A true)
23
- return if $CHILD_STATUS.success?
24
- CLI::UI.with_frame_color(:blue) do
25
- puts(CLI::UI.fmt("{{i}} #{msg}"))
26
- end
27
- end
28
-
29
- # Execute a command in the user's environment
30
- # This is meant to be largely equivalent to backticks, only with the env passed in.
31
- # Captures the results of the command without output to the console
32
- #
33
- # #### Parameters
34
- # - `*a`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
35
- # - `sudo`: If truthy, run this command with sudo. If String, pass to `sudo_reason`
36
- # - `env`: process environment with which to execute this command
37
- # - `**kwargs`: additional arguments to pass to Open3.capture2
38
- #
39
- # #### Returns
40
- # - `output`: output (STDOUT) of the command execution
41
- # - `status`: boolean success status of the command execution
42
- #
43
- # #### Usage
44
- # `out, stat = CLI::Kit::System.capture2('ls', 'a_folder')`
45
- #
46
- def capture2(*a, sudo: false, env: ENV, **kwargs)
47
- delegate_open3(*a, sudo: sudo, env: env, method: :capture2, **kwargs)
48
- end
49
-
50
- # Execute a command in the user's environment
51
- # This is meant to be largely equivalent to backticks, only with the env passed in.
52
- # Captures the results of the command without output to the console
53
- #
54
- # #### Parameters
55
- # - `*a`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
56
- # - `sudo`: If truthy, run this command with sudo. If String, pass to `sudo_reason`
57
- # - `env`: process environment with which to execute this command
58
- # - `**kwargs`: additional arguments to pass to Open3.capture2e
59
- #
60
- # #### Returns
61
- # - `output`: output (STDOUT merged with STDERR) of the command execution
62
- # - `status`: boolean success status of the command execution
63
- #
64
- # #### Usage
65
- # `out_and_err, stat = CLI::Kit::System.capture2e('ls', 'a_folder')`
66
- #
67
- def capture2e(*a, sudo: false, env: ENV, **kwargs)
68
- delegate_open3(*a, sudo: sudo, env: env, method: :capture2e, **kwargs)
69
- end
70
-
71
- # Execute a command in the user's environment
72
- # This is meant to be largely equivalent to backticks, only with the env passed in.
73
- # Captures the results of the command without output to the console
74
- #
75
- # #### Parameters
76
- # - `*a`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
77
- # - `sudo`: If truthy, run this command with sudo. If String, pass to `sudo_reason`
78
- # - `env`: process environment with which to execute this command
79
- # - `**kwargs`: additional arguments to pass to Open3.capture3
80
- #
81
- # #### Returns
82
- # - `output`: STDOUT of the command execution
83
- # - `error`: STDERR of the command execution
84
- # - `status`: boolean success status of the command execution
85
- #
86
- # #### Usage
87
- # `out, err, stat = CLI::Kit::System.capture3('ls', 'a_folder')`
88
- #
89
- def capture3(*a, sudo: false, env: ENV, **kwargs)
90
- delegate_open3(*a, sudo: sudo, env: env, method: :capture3, **kwargs)
91
- end
92
-
93
- def popen2(*a, sudo: false, env: ENV, **kwargs, &block)
94
- delegate_open3(*a, sudo: sudo, env: env, method: :popen2, **kwargs, &block)
95
- end
96
-
97
- def popen2e(*a, sudo: false, env: ENV, **kwargs, &block)
98
- delegate_open3(*a, sudo: sudo, env: env, method: :popen2e, **kwargs, &block)
99
- end
100
-
101
- def popen3(*a, sudo: false, env: ENV, **kwargs, &block)
102
- delegate_open3(*a, sudo: sudo, env: env, method: :popen3, **kwargs, &block)
103
- end
104
-
105
- # Execute a command in the user's environment
106
- # Outputs result of the command without capturing it
107
- #
108
- # #### Parameters
109
- # - `*a`: A splat of arguments evaluated as a command. (e.g. `'rm', folder` is equivalent to `rm #{folder}`)
110
- # - `sudo`: If truthy, run this command with sudo. If String, pass to `sudo_reason`
111
- # - `env`: process environment with which to execute this command
112
- # - `**kwargs`: additional keyword arguments to pass to Process.spawn
113
- #
114
- # #### Returns
115
- # - `status`: The `Process:Status` result for the command execution
116
- #
117
- # #### Usage
118
- # `stat = CLI::Kit::System.system('ls', 'a_folder')`
119
- #
120
- def system(*a, sudo: false, env: ENV, **kwargs)
121
- a = apply_sudo(*a, sudo)
122
-
123
- out_r, out_w = IO.pipe
124
- err_r, err_w = IO.pipe
125
- in_stream = STDIN.closed? ? :close : STDIN
126
- pid = Process.spawn(env, *resolve_path(a, env), 0 => in_stream, :out => out_w, :err => err_w, **kwargs)
127
- out_w.close
128
- err_w.close
129
-
130
- handlers = if block_given?
131
- { out_r => ->(data) { yield(data.force_encoding(Encoding::UTF_8), '') },
132
- err_r => ->(data) { yield('', data.force_encoding(Encoding::UTF_8)) } }
133
- else
134
- { out_r => ->(data) { STDOUT.write(data) },
135
- err_r => ->(data) { STDOUT.write(data) } }
136
- end
137
-
138
- previous_trailing = Hash.new('')
139
- loop do
140
- ios = [err_r, out_r].reject(&:closed?)
141
- break if ios.empty?
142
-
143
- readers, = IO.select(ios)
144
- readers.each do |io|
145
- data, trailing = split_partial_characters(io.readpartial(4096))
146
- handlers[io].call(previous_trailing[io] + data)
147
- previous_trailing[io] = trailing
148
- rescue IOError
149
- io.close
150
- end
151
- end
152
-
153
- Process.wait(pid)
154
- $CHILD_STATUS
155
- end
156
-
157
- # Split off trailing partial UTF-8 Characters. UTF-8 Multibyte characters start with a 11xxxxxx byte that tells
158
- # how many following bytes are part of this character, followed by some number of 10xxxxxx bytes. This simple
159
- # algorithm will split off a whole trailing multi-byte character.
160
- def split_partial_characters(data)
161
- last_byte = data.getbyte(-1)
162
- return [data, ''] if (last_byte & 0b1000_0000).zero?
163
-
164
- # UTF-8 is up to 6 characters per rune, so we could never want to trim more than that, and we want to avoid
165
- # allocating an array for the whole of data with bytes
166
- min_bound = -[6, data.bytesize].min
167
- final_bytes = data.byteslice(min_bound..-1).bytes
168
- partial_character_sub_index = final_bytes.rindex { |byte| byte & 0b1100_0000 == 0b1100_0000 }
169
- # Bail out for non UTF-8
170
- return [data, ''] unless partial_character_sub_index
171
- partial_character_index = min_bound + partial_character_sub_index
172
-
173
- [data.byteslice(0...partial_character_index), data.byteslice(partial_character_index..-1)]
174
- end
175
-
176
- def os
177
- @current_os ||= case RbConfig::CONFIG['host_os']
178
- when /darwin/ then :mac
179
- when /linux/ then :linux
180
- else
181
- if RUBY_PLATFORM !~ /cygwin/ && ENV['OS'] == 'Windows_NT'
182
- :windows
183
- else
184
- raise "Could not determine OS from host_os #{RbConfig::CONFIG["host_os"]}"
185
- end
186
- end
187
- end
188
-
189
- private
190
-
191
- def apply_sudo(*a, sudo)
192
- a.unshift('sudo', '-S', '-p', SUDO_PROMPT, '--') if sudo
193
- sudo_reason(sudo) if sudo.is_a?(String)
194
- a
195
- end
196
-
197
- def delegate_open3(*a, sudo: raise, env: raise, method: raise, **kwargs, &block)
198
- a = apply_sudo(*a, sudo)
199
- Open3.send(method, env, *resolve_path(a, env), **kwargs, &block)
200
- rescue Errno::EINTR
201
- raise(Errno::EINTR, "command interrupted: #{a.join(' ')}")
202
- end
203
-
204
- # Ruby resolves the program to execute using its own PATH, but we want it to
205
- # use the provided one, so we ensure ruby chooses to spawn a shell, which will
206
- # parse our command and properly spawn our target using the provided environment.
207
- #
208
- # This is important because dev clobbers its own environment such that ruby
209
- # means /usr/bin/ruby, but we want it to select the ruby targeted by the active
210
- # project.
211
- #
212
- # See https://github.com/Shopify/dev/pull/625 for more details.
213
- def resolve_path(a, env)
214
- # If only one argument was provided, make sure it's interpreted by a shell.
215
- if a.size == 1
216
- if os == :windows
217
- return ["break && " + a[0]]
218
- else
219
- return ["true ; " + a[0]]
220
- end
221
- end
222
- return a if a.first.include?('/')
223
-
224
- item = which(a.first, env)
225
- a[0] = item if item
226
- a
227
- end
228
-
229
- def which(cmd, env)
230
- exts = (os == :windows && env['PATHEXT']&.split(';')) || ['']
231
- env.fetch('PATH', '').split(File::PATH_SEPARATOR).each do |path|
232
- exts.each do |ext|
233
- exe = File.join(path, "#{cmd}#{ext}")
234
- return exe if File.executable?(exe) && !File.directory?(exe)
235
- end
236
- end
237
-
238
- nil
239
- end
240
- end
241
- end
242
- end
243
- end