@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.
- package/{assets/cli-ruby/LICENSE → LICENSE} +0 -2
- package/dist/cli/api/graphql/admin/generated/get_theme_file_bodies.d.ts +41 -0
- package/dist/cli/api/graphql/admin/generated/get_theme_file_bodies.js +165 -0
- package/dist/cli/api/graphql/admin/generated/get_theme_file_bodies.js.map +1 -0
- package/dist/cli/api/graphql/admin/generated/get_theme_file_checksums.d.ts +29 -0
- package/dist/cli/api/graphql/admin/generated/get_theme_file_checksums.js +100 -0
- package/dist/cli/api/graphql/admin/generated/get_theme_file_checksums.js.map +1 -0
- package/dist/cli/api/graphql/admin/generated/theme_delete.d.ts +17 -0
- package/dist/cli/api/graphql/admin/generated/theme_delete.js +53 -0
- package/dist/cli/api/graphql/admin/generated/theme_delete.js.map +1 -0
- package/dist/cli/api/graphql/admin/generated/theme_files_upsert.d.ts +21 -0
- package/dist/cli/api/graphql/admin/generated/theme_files_upsert.js +82 -0
- package/dist/cli/api/graphql/admin/generated/theme_files_upsert.js.map +1 -0
- package/dist/cli/api/graphql/admin/generated/theme_publish.d.ts +21 -0
- package/dist/cli/api/graphql/admin/generated/theme_publish.js +65 -0
- package/dist/cli/api/graphql/admin/generated/theme_publish.js.map +1 -0
- package/dist/cli/api/graphql/admin/generated/theme_update.d.ts +23 -0
- package/dist/cli/api/graphql/admin/generated/theme_update.js +75 -0
- package/dist/cli/api/graphql/admin/generated/theme_update.js.map +1 -0
- package/dist/private/node/api/graphql.d.ts +2 -2
- package/dist/private/node/api/graphql.js +4 -4
- package/dist/private/node/api/graphql.js.map +1 -1
- package/dist/private/node/api/headers.js +1 -1
- package/dist/private/node/api/headers.js.map +1 -1
- package/dist/private/node/api/rest.d.ts +1 -2
- package/dist/private/node/api/rest.js +2 -3
- package/dist/private/node/api/rest.js.map +1 -1
- package/dist/private/node/api.d.ts +1 -1
- package/dist/private/node/api.js +41 -2
- package/dist/private/node/api.js.map +1 -1
- package/dist/private/node/conf-store.d.ts +9 -4
- package/dist/private/node/conf-store.js +8 -6
- package/dist/private/node/conf-store.js.map +1 -1
- package/dist/private/node/constants.d.ts +3 -0
- package/dist/private/node/constants.js +3 -0
- package/dist/private/node/constants.js.map +1 -1
- package/dist/private/node/session/exchange.js +2 -2
- package/dist/private/node/session/exchange.js.map +1 -1
- package/dist/private/node/session/schema.d.ts +40 -40
- package/dist/private/node/session/scopes.js +3 -5
- package/dist/private/node/session/scopes.js.map +1 -1
- package/dist/private/node/session.js +2 -3
- package/dist/private/node/session.js.map +1 -1
- package/dist/private/node/ui/alert.js +1 -3
- package/dist/private/node/ui/alert.js.map +1 -1
- package/dist/private/node/ui/components/ConcurrentOutput.d.ts +1 -0
- package/dist/private/node/ui/components/ConcurrentOutput.js +4 -4
- package/dist/private/node/ui/components/ConcurrentOutput.js.map +1 -1
- package/dist/private/node/ui/components/Link.js +3 -0
- package/dist/private/node/ui/components/Link.js.map +1 -1
- package/dist/private/node/ui/components/Link.test.js +23 -0
- package/dist/private/node/ui/components/Link.test.js.map +1 -1
- package/dist/private/node/ui.js +1 -1
- package/dist/private/node/ui.js.map +1 -1
- package/dist/public/common/version.d.ts +1 -1
- package/dist/public/common/version.js +1 -1
- package/dist/public/common/version.js.map +1 -1
- package/dist/public/node/analytics.js +1 -2
- package/dist/public/node/analytics.js.map +1 -1
- package/dist/public/node/api/admin.d.ts +2 -1
- package/dist/public/node/api/admin.js +36 -10
- package/dist/public/node/api/admin.js.map +1 -1
- package/dist/public/node/api/graphql.d.ts +2 -0
- package/dist/public/node/api/graphql.js +3 -3
- package/dist/public/node/api/graphql.js.map +1 -1
- package/dist/public/node/api/webhooks.d.ts +13 -0
- package/dist/public/node/api/webhooks.js +34 -0
- package/dist/public/node/api/webhooks.js.map +1 -0
- package/dist/public/node/base-command.js +4 -0
- package/dist/public/node/base-command.js.map +1 -1
- package/dist/public/node/cli-launcher.d.ts +12 -0
- package/dist/public/node/cli-launcher.js +29 -0
- package/dist/public/node/cli-launcher.js.map +1 -0
- package/dist/public/node/cli.d.ts +16 -10
- package/dist/public/node/cli.js +45 -101
- package/dist/public/node/cli.js.map +1 -1
- package/dist/public/node/context/fqdn.js +11 -7
- package/dist/public/node/context/fqdn.js.map +1 -1
- package/dist/public/node/context/local.d.ts +7 -0
- package/dist/public/node/context/local.js +16 -0
- package/dist/public/node/context/local.js.map +1 -1
- package/dist/public/node/environment.d.ts +7 -0
- package/dist/public/node/environment.js +11 -0
- package/dist/public/node/environment.js.map +1 -1
- package/dist/public/node/error-handler.js +2 -4
- package/dist/public/node/error-handler.js.map +1 -1
- package/dist/public/node/error.js +4 -13
- package/dist/public/node/error.js.map +1 -1
- package/dist/public/node/global-context.d.ts +15 -0
- package/dist/public/node/global-context.js +29 -0
- package/dist/public/node/global-context.js.map +1 -0
- package/dist/public/node/hooks/prerun.js +0 -2
- package/dist/public/node/hooks/prerun.js.map +1 -1
- package/dist/public/node/is-global.js +2 -1
- package/dist/public/node/is-global.js.map +1 -1
- package/dist/public/node/json-schema.d.ts +2 -1
- package/dist/public/node/json-schema.js +8 -3
- package/dist/public/node/json-schema.js.map +1 -1
- package/dist/public/node/node-package-manager.js +1 -1
- package/dist/public/node/node-package-manager.js.map +1 -1
- package/dist/public/node/notifications-system.d.ts +193 -0
- package/dist/public/node/notifications-system.js +242 -0
- package/dist/public/node/notifications-system.js.map +1 -0
- package/dist/public/node/output.d.ts +1 -6
- package/dist/public/node/output.js +1 -5
- package/dist/public/node/output.js.map +1 -1
- package/dist/public/node/path.d.ts +3 -3
- package/dist/public/node/path.js +4 -5
- package/dist/public/node/path.js.map +1 -1
- package/dist/public/node/system.js +14 -2
- package/dist/public/node/system.js.map +1 -1
- package/dist/public/node/themes/api.d.ts +4 -12
- package/dist/public/node/themes/api.js +225 -36
- package/dist/public/node/themes/api.js.map +1 -1
- package/dist/public/node/themes/factories.d.ts +1 -3
- package/dist/public/node/themes/factories.js +0 -16
- package/dist/public/node/themes/factories.js.map +1 -1
- package/dist/public/node/themes/types.d.ts +1 -0
- package/dist/public/node/themes/types.js.map +1 -1
- package/dist/public/node/themes/utils.d.ts +2 -0
- package/dist/public/node/themes/utils.js +11 -0
- package/dist/public/node/themes/utils.js.map +1 -1
- package/dist/public/node/tree-kill.js +0 -2
- package/dist/public/node/tree-kill.js.map +1 -1
- package/dist/public/node/ui.js +30 -80
- package/dist/public/node/ui.js.map +1 -1
- package/dist/public/node/vendor/dev_server/DevServer.d.ts +19 -0
- package/dist/public/node/vendor/dev_server/DevServer.js +170 -0
- package/dist/public/node/vendor/dev_server/DevServer.js.map +1 -0
- package/dist/public/node/version.d.ts +13 -0
- package/dist/public/node/version.js +38 -0
- package/dist/public/node/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -7
- package/assets/cli-ruby/.devcontainer.json +0 -5
- package/assets/cli-ruby/.rubocop.yml +0 -102
- package/assets/cli-ruby/.rubocop_todo.yml +0 -24
- package/assets/cli-ruby/CHANGELOG.md +0 -634
- package/assets/cli-ruby/CONTRIBUTING.md +0 -3
- package/assets/cli-ruby/Codespace.dockerfile +0 -35
- package/assets/cli-ruby/Gemfile +0 -32
- package/assets/cli-ruby/README.md +0 -30
- package/assets/cli-ruby/Rakefile +0 -167
- package/assets/cli-ruby/SECURITY.md +0 -59
- package/assets/cli-ruby/Tests.dockerfile +0 -35
- package/assets/cli-ruby/assets/logo.png +0 -0
- package/assets/cli-ruby/bin/console +0 -11
- package/assets/cli-ruby/bin/load_shopify.rb +0 -22
- package/assets/cli-ruby/bin/shopify +0 -67
- package/assets/cli-ruby/bin/shopify.bat +0 -3
- package/assets/cli-ruby/dev.yml +0 -29
- package/assets/cli-ruby/docs/README.md +0 -13
- package/assets/cli-ruby/docs/contributors/testing.md +0 -27
- package/assets/cli-ruby/docs/users/installation.md +0 -3
- package/assets/cli-ruby/docs/users/migrate-from-themekit.md +0 -18
- package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.3.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.3.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.3.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.3.0.gz.sha256 +0 -1
- package/assets/cli-ruby/ext/javy/javy.rb +0 -204
- package/assets/cli-ruby/ext/javy/version +0 -1
- package/assets/cli-ruby/ext/shopify-extensions/extconf.rb +0 -21
- package/assets/cli-ruby/ext/shopify-extensions/shopify_extensions.rb +0 -152
- package/assets/cli-ruby/ext/shopify-extensions/version +0 -1
- package/assets/cli-ruby/features/support/assertions.rb +0 -17
- package/assets/cli-ruby/features/support/cli.rb +0 -7
- package/assets/cli-ruby/features/support/process.rb +0 -27
- package/assets/cli-ruby/features/support/requires.rb +0 -3
- package/assets/cli-ruby/lib/docgen/class_template.md.erb +0 -81
- package/assets/cli-ruby/lib/docgen/index_template.md.erb +0 -5
- package/assets/cli-ruby/lib/docgen/markdown.rb +0 -101
- package/assets/cli-ruby/lib/graphql/admin_introspection.graphql +0 -87
- package/assets/cli-ruby/lib/graphql/all_organizations.graphql +0 -19
- package/assets/cli-ruby/lib/graphql/all_orgs_with_apps.graphql +0 -30
- package/assets/cli-ruby/lib/graphql/api_versions.graphql +0 -6
- package/assets/cli-ruby/lib/graphql/convert_dev_to_test_store.graphql +0 -10
- package/assets/cli-ruby/lib/graphql/create_app.graphql +0 -20
- package/assets/cli-ruby/lib/graphql/create_customer.graphql +0 -9
- package/assets/cli-ruby/lib/graphql/create_draft_order.graphql +0 -8
- package/assets/cli-ruby/lib/graphql/create_product.graphql +0 -9
- package/assets/cli-ruby/lib/graphql/extension_create.graphql +0 -37
- package/assets/cli-ruby/lib/graphql/extension_update_draft.graphql +0 -19
- package/assets/cli-ruby/lib/graphql/fetch_specifications.graphql +0 -14
- package/assets/cli-ruby/lib/graphql/find_organization.graphql +0 -18
- package/assets/cli-ruby/lib/graphql/find_organization_with_apps.graphql +0 -20
- package/assets/cli-ruby/lib/graphql/get_app_by_api_key.graphql +0 -9
- package/assets/cli-ruby/lib/graphql/get_app_urls.graphql +0 -6
- package/assets/cli-ruby/lib/graphql/get_extension_registrations.graphql +0 -28
- package/assets/cli-ruby/lib/graphql/get_variant_id.graphql +0 -16
- package/assets/cli-ruby/lib/graphql/update_dashboard_urls.graphql +0 -8
- package/assets/cli-ruby/lib/project_types/extension/cli.rb +0 -75
- package/assets/cli-ruby/lib/project_types/extension/commands/extension_command.rb +0 -29
- package/assets/cli-ruby/lib/project_types/extension/commands/serve.rb +0 -164
- package/assets/cli-ruby/lib/project_types/extension/errors.rb +0 -9
- package/assets/cli-ruby/lib/project_types/extension/extension_project.rb +0 -151
- package/assets/cli-ruby/lib/project_types/extension/extension_project_keys.rb +0 -12
- package/assets/cli-ruby/lib/project_types/extension/features/argo.rb +0 -50
- package/assets/cli-ruby/lib/project_types/extension/features/argo_config.rb +0 -59
- package/assets/cli-ruby/lib/project_types/extension/features/argo_dependencies.rb +0 -28
- package/assets/cli-ruby/lib/project_types/extension/features/argo_runtime.rb +0 -15
- package/assets/cli-ruby/lib/project_types/extension/features/argo_serve.rb +0 -115
- package/assets/cli-ruby/lib/project_types/extension/features/argo_setup.rb +0 -54
- package/assets/cli-ruby/lib/project_types/extension/features/argo_setup_step.rb +0 -31
- package/assets/cli-ruby/lib/project_types/extension/features/argo_setup_steps.rb +0 -51
- package/assets/cli-ruby/lib/project_types/extension/features/runtimes/admin.rb +0 -29
- package/assets/cli-ruby/lib/project_types/extension/features/runtimes/base.rb +0 -19
- package/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_post_purchase.rb +0 -23
- package/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_ui_extension.rb +0 -29
- package/assets/cli-ruby/lib/project_types/extension/loaders/project.rb +0 -50
- package/assets/cli-ruby/lib/project_types/extension/loaders/specification_handler.rb +0 -22
- package/assets/cli-ruby/lib/project_types/extension/messages/message_loading.rb +0 -34
- package/assets/cli-ruby/lib/project_types/extension/messages/messages.rb +0 -320
- package/assets/cli-ruby/lib/project_types/extension/models/app.rb +0 -14
- package/assets/cli-ruby/lib/project_types/extension/models/lazy_specification_handler.rb +0 -12
- package/assets/cli-ruby/lib/project_types/extension/models/specification.rb +0 -41
- package/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/default.rb +0 -145
- package/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +0 -134
- package/assets/cli-ruby/lib/project_types/extension/models/specifications.rb +0 -91
- package/assets/cli-ruby/lib/project_types/extension/models/validation_error.rb +0 -17
- package/assets/cli-ruby/lib/project_types/extension/models/version.rb +0 -15
- package/assets/cli-ruby/lib/project_types/extension/tasks/configure_features.rb +0 -73
- package/assets/cli-ruby/lib/project_types/extension/tasks/configure_options.rb +0 -21
- package/assets/cli-ruby/lib/project_types/extension/tasks/converters/validation_error_converter.rb +0 -25
- package/assets/cli-ruby/lib/project_types/extension/tasks/converters/version_converter.rb +0 -28
- package/assets/cli-ruby/lib/project_types/extension/tasks/fetch_specifications.rb +0 -21
- package/assets/cli-ruby/lib/project_types/node/cli.rb +0 -12
- package/assets/cli-ruby/lib/project_types/node/forms/create.rb +0 -45
- package/assets/cli-ruby/lib/project_types/node/messages/messages.rb +0 -33
- package/assets/cli-ruby/lib/project_types/php/cli.rb +0 -16
- package/assets/cli-ruby/lib/project_types/php/forms/create.rb +0 -44
- package/assets/cli-ruby/lib/project_types/php/messages/messages.rb +0 -29
- package/assets/cli-ruby/lib/project_types/rails/cli.rb +0 -15
- package/assets/cli-ruby/lib/project_types/rails/forms/create.rb +0 -75
- package/assets/cli-ruby/lib/project_types/rails/gem.rb +0 -110
- package/assets/cli-ruby/lib/project_types/rails/messages/messages.rb +0 -101
- package/assets/cli-ruby/lib/project_types/script/cli.rb +0 -27
- package/assets/cli-ruby/lib/project_types/script/commands/connect.rb +0 -16
- package/assets/cli-ruby/lib/project_types/script/commands/create.rb +0 -24
- package/assets/cli-ruby/lib/project_types/script/commands/javy.rb +0 -24
- package/assets/cli-ruby/lib/project_types/script/commands/push.rb +0 -26
- package/assets/cli-ruby/lib/project_types/script/loaders/project.rb +0 -46
- package/assets/cli-ruby/lib/project_types/script/loaders/specification_handler.rb +0 -22
- package/assets/cli-ruby/lib/project_types/script/messages/messages.rb +0 -11
- package/assets/cli-ruby/lib/project_types/theme/cli.rb +0 -33
- package/assets/cli-ruby/lib/project_types/theme/commands/common/root_helper.rb +0 -94
- package/assets/cli-ruby/lib/project_types/theme/commands/common/shop_helper.rb +0 -13
- package/assets/cli-ruby/lib/project_types/theme/commands/console.rb +0 -23
- package/assets/cli-ruby/lib/project_types/theme/commands/delete.rb +0 -70
- package/assets/cli-ruby/lib/project_types/theme/commands/init.rb +0 -46
- package/assets/cli-ruby/lib/project_types/theme/commands/list.rb +0 -33
- package/assets/cli-ruby/lib/project_types/theme/commands/open.rb +0 -73
- package/assets/cli-ruby/lib/project_types/theme/commands/package.rb +0 -73
- package/assets/cli-ruby/lib/project_types/theme/commands/publish.rb +0 -49
- package/assets/cli-ruby/lib/project_types/theme/commands/pull.rb +0 -118
- package/assets/cli-ruby/lib/project_types/theme/commands/push.rb +0 -160
- package/assets/cli-ruby/lib/project_types/theme/commands/serve.rb +0 -91
- package/assets/cli-ruby/lib/project_types/theme/commands/share.rb +0 -62
- package/assets/cli-ruby/lib/project_types/theme/commands/token.rb +0 -22
- package/assets/cli-ruby/lib/project_types/theme/conversions/base_glob.rb +0 -65
- package/assets/cli-ruby/lib/project_types/theme/conversions/ignore_glob.rb +0 -15
- package/assets/cli-ruby/lib/project_types/theme/conversions/include_glob.rb +0 -15
- package/assets/cli-ruby/lib/project_types/theme/forms/confirm_store.rb +0 -15
- package/assets/cli-ruby/lib/project_types/theme/forms/select.rb +0 -34
- package/assets/cli-ruby/lib/project_types/theme/messages/messages.rb +0 -429
- package/assets/cli-ruby/lib/project_types/theme/models/specification_handlers/theme.rb +0 -19
- package/assets/cli-ruby/lib/project_types/theme/presenters/theme_presenter.rb +0 -48
- package/assets/cli-ruby/lib/project_types/theme/presenters/themes_presenter.rb +0 -29
- package/assets/cli-ruby/lib/project_types/theme/ui/sync_progress_bar.rb +0 -20
- package/assets/cli-ruby/lib/rubygems_plugin.rb +0 -26
- package/assets/cli-ruby/lib/shopify_cli/admin_api.rb +0 -160
- package/assets/cli-ruby/lib/shopify_cli/api.rb +0 -130
- package/assets/cli-ruby/lib/shopify_cli/command/project_command.rb +0 -31
- package/assets/cli-ruby/lib/shopify_cli/command/sub_command.rb +0 -20
- package/assets/cli-ruby/lib/shopify_cli/command.rb +0 -166
- package/assets/cli-ruby/lib/shopify_cli/commands.rb +0 -21
- package/assets/cli-ruby/lib/shopify_cli/constants.rb +0 -101
- package/assets/cli-ruby/lib/shopify_cli/context.rb +0 -709
- package/assets/cli-ruby/lib/shopify_cli/core/cli_version.rb +0 -20
- package/assets/cli-ruby/lib/shopify_cli/core/entry_point.rb +0 -64
- package/assets/cli-ruby/lib/shopify_cli/core/executor.rb +0 -23
- package/assets/cli-ruby/lib/shopify_cli/core/finalize.rb +0 -13
- package/assets/cli-ruby/lib/shopify_cli/core/monorail.rb +0 -122
- package/assets/cli-ruby/lib/shopify_cli/core.rb +0 -8
- package/assets/cli-ruby/lib/shopify_cli/db.rb +0 -114
- package/assets/cli-ruby/lib/shopify_cli/environment.rb +0 -217
- package/assets/cli-ruby/lib/shopify_cli/exception_reporter.rb +0 -80
- package/assets/cli-ruby/lib/shopify_cli/feature.rb +0 -95
- package/assets/cli-ruby/lib/shopify_cli/file_system_listener.rb +0 -30
- package/assets/cli-ruby/lib/shopify_cli/form.rb +0 -42
- package/assets/cli-ruby/lib/shopify_cli/git.rb +0 -320
- package/assets/cli-ruby/lib/shopify_cli/github/issue_url_generator.rb +0 -30
- package/assets/cli-ruby/lib/shopify_cli/github.rb +0 -5
- package/assets/cli-ruby/lib/shopify_cli/helpers/haikunator.rb +0 -92
- package/assets/cli-ruby/lib/shopify_cli/helpers.rb +0 -5
- package/assets/cli-ruby/lib/shopify_cli/http_request.rb +0 -43
- package/assets/cli-ruby/lib/shopify_cli/identity_auth/env_auth_token.rb +0 -34
- package/assets/cli-ruby/lib/shopify_cli/identity_auth.rb +0 -332
- package/assets/cli-ruby/lib/shopify_cli/js_system.rb +0 -115
- package/assets/cli-ruby/lib/shopify_cli/lazy_delegator.rb +0 -55
- package/assets/cli-ruby/lib/shopify_cli/messages/messages.rb +0 -863
- package/assets/cli-ruby/lib/shopify_cli/method_object.rb +0 -123
- package/assets/cli-ruby/lib/shopify_cli/migrator/migration.rb +0 -27
- package/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +0 -13
- package/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1633691650_merge_reporting_configuration.rb +0 -41
- package/assets/cli-ruby/lib/shopify_cli/migrator.rb +0 -46
- package/assets/cli-ruby/lib/shopify_cli/options.rb +0 -40
- package/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions/job.rb +0 -36
- package/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions.rb +0 -46
- package/assets/cli-ruby/lib/shopify_cli/partners_api/organizations.rb +0 -45
- package/assets/cli-ruby/lib/shopify_cli/partners_api.rb +0 -91
- package/assets/cli-ruby/lib/shopify_cli/project.rb +0 -199
- package/assets/cli-ruby/lib/shopify_cli/project_type.rb +0 -66
- package/assets/cli-ruby/lib/shopify_cli/reporting_configuration_controller.rb +0 -29
- package/assets/cli-ruby/lib/shopify_cli/resolve_constant.rb +0 -25
- package/assets/cli-ruby/lib/shopify_cli/resources/env_file.rb +0 -108
- package/assets/cli-ruby/lib/shopify_cli/resources.rb +0 -5
- package/assets/cli-ruby/lib/shopify_cli/result.rb +0 -448
- package/assets/cli-ruby/lib/shopify_cli/shopifolk.rb +0 -82
- package/assets/cli-ruby/lib/shopify_cli/task.rb +0 -20
- package/assets/cli-ruby/lib/shopify_cli/tasks/confirm_store.rb +0 -18
- package/assets/cli-ruby/lib/shopify_cli/tasks/create_api_client.rb +0 -40
- package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_authenticated.rb +0 -19
- package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_dev_store.rb +0 -41
- package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_env.rb +0 -90
- package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_git_dependency.rb +0 -14
- package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_loopback_url.rb +0 -20
- package/assets/cli-ruby/lib/shopify_cli/tasks/ensure_project_type.rb +0 -14
- package/assets/cli-ruby/lib/shopify_cli/tasks/select_org_and_shop.rb +0 -81
- package/assets/cli-ruby/lib/shopify_cli/tasks/update_dashboard_urls.rb +0 -57
- package/assets/cli-ruby/lib/shopify_cli/tasks.rb +0 -44
- package/assets/cli-ruby/lib/shopify_cli/theme/backoff_helper.rb +0 -47
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/cdn_fonts.rb +0 -82
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/certificate_manager.rb +0 -79
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/errors.rb +0 -9
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/header_hash.rb +0 -98
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hooks/file_change_hook.rb +0 -77
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_deleter.rb +0 -62
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_reloader.rb +0 -63
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot-reload-no-script.html +0 -27
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot_reload.js +0 -48
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/sse_client.js +0 -43
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme.js +0 -114
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme_extension.js +0 -121
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/script_injector.rb +0 -57
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/sections_index.rb +0 -50
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload.rb +0 -75
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/local_assets.rb +0 -101
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +0 -313
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy_param_builder.rb +0 -84
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/reload_mode.rb +0 -34
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb +0 -35
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher.rb +0 -44
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/sse.rb +0 -75
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/watcher.rb +0 -64
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/web_server.rb +0 -140
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server.rb +0 -332
- package/assets/cli-ruby/lib/shopify_cli/theme/development_theme.rb +0 -101
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/app_extension.rb +0 -40
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hooks/file_change_hook.rb +0 -76
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload/script_injector.rb +0 -30
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload.rb +0 -13
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/local_assets.rb +0 -31
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/proxy_param_builder.rb +0 -94
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/watcher.rb +0 -49
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server.rb +0 -175
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/host_theme.rb +0 -109
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/ignore_helper.rb +0 -35
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/extension_serve_job.rb +0 -120
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/operation.rb +0 -25
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer.rb +0 -100
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_progress_bar.rb +0 -35
- package/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_raw_progress_bar.rb +0 -40
- package/assets/cli-ruby/lib/shopify_cli/theme/file.rb +0 -133
- package/assets/cli-ruby/lib/shopify_cli/theme/filter/path_matcher.rb +0 -38
- package/assets/cli-ruby/lib/shopify_cli/theme/ignore_filter.rb +0 -112
- package/assets/cli-ruby/lib/shopify_cli/theme/ignore_helper.rb +0 -37
- package/assets/cli-ruby/lib/shopify_cli/theme/include_filter.rb +0 -67
- package/assets/cli-ruby/lib/shopify_cli/theme/mime_type.rb +0 -34
- package/assets/cli-ruby/lib/shopify_cli/theme/notifier.rb +0 -52
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/api.rb +0 -109
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_dev_server.rb +0 -93
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_middleware.rb +0 -97
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/remote_evaluator.rb +0 -166
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/success.html +0 -78
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/template.liquid +0 -15
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/snippet.rb +0 -81
- package/assets/cli-ruby/lib/shopify_cli/theme/repl.rb +0 -88
- package/assets/cli-ruby/lib/shopify_cli/theme/root.rb +0 -62
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/checksums.rb +0 -66
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/downloader.rb +0 -63
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/error_reporter.rb +0 -45
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/merger.rb +0 -53
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/operation.rb +0 -49
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/standard_reporter.rb +0 -32
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/unsupported_script_warning.rb +0 -90
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk.rb +0 -133
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_item.rb +0 -64
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_job.rb +0 -139
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_request.rb +0 -30
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb +0 -41
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all_form.rb +0 -37
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb +0 -64
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_delete_strategy.rb +0 -29
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_update_strategy.rb +0 -30
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_delete_handler.rb +0 -49
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_update_handler.rb +0 -71
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader.rb +0 -231
- package/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb +0 -391
- package/assets/cli-ruby/lib/shopify_cli/theme/theme.rb +0 -212
- package/assets/cli-ruby/lib/shopify_cli/theme/theme_access_api.rb +0 -89
- package/assets/cli-ruby/lib/shopify_cli/theme/theme_admin_api.rb +0 -101
- package/assets/cli-ruby/lib/shopify_cli/thread_pool/job.rb +0 -35
- package/assets/cli-ruby/lib/shopify_cli/thread_pool.rb +0 -49
- package/assets/cli-ruby/lib/shopify_cli/transform_data_structure.rb +0 -87
- package/assets/cli-ruby/lib/shopify_cli/utilities.rb +0 -21
- package/assets/cli-ruby/lib/shopify_cli/version.rb +0 -3
- package/assets/cli-ruby/lib/shopify_cli.rb +0 -182
- package/assets/cli-ruby/shipit.rubygems.yml +0 -3
- package/assets/cli-ruby/shopify-cli.gemspec +0 -46
- package/assets/cli-ruby/shopify-dev +0 -16
- package/assets/cli-ruby/test/minitest_ext.rb +0 -115
- package/assets/cli-ruby/test/project_types/extension/extension_test_helpers.rb +0 -70
- package/assets/cli-ruby/test/shopify-cli/migrator/migrations/migration_helper.rb +0 -20
- package/assets/cli-ruby/test/test_helpers.rb +0 -16
- package/assets/cli-ruby/utilities/constants.rb +0 -7
- package/assets/cli-ruby/utilities/docker/container.rb +0 -104
- package/assets/cli-ruby/utilities/docker.rb +0 -89
- package/assets/cli-ruby/utilities/utilities.rb +0 -6
- package/assets/cli-ruby/vendor/deps/cli-kit/REVISION +0 -1
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +0 -21
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +0 -49
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +0 -94
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/config.rb +0 -133
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +0 -123
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/executor.rb +0 -79
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ini.rb +0 -102
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +0 -82
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/logger.rb +0 -82
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +0 -60
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ruby_backports/enumerable.rb +0 -6
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +0 -244
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support.rb +0 -9
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/system.rb +0 -243
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/util.rb +0 -193
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/version.rb +0 -5
- package/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit.rb +0 -60
- package/assets/cli-ruby/vendor/deps/cli-ui/REVISION +0 -1
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +0 -157
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/color.rb +0 -84
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +0 -193
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +0 -98
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +0 -166
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +0 -139
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +0 -120
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame.rb +0 -269
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +0 -84
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/os.rb +0 -73
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/printer.rb +0 -59
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress.rb +0 -90
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress_plain.rb +0 -50
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +0 -484
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +0 -29
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +0 -282
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +0 -40
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +0 -263
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +0 -66
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +0 -232
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +0 -46
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +0 -102
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/version.rb +0 -5
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +0 -27
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +0 -61
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +0 -77
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +0 -56
- package/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui.rb +0 -234
- package/assets/cli-ruby/vendor/deps/ruby2_keywords/LICENSE +0 -22
- package/assets/cli-ruby/vendor/deps/ruby2_keywords/README.md +0 -67
- package/assets/cli-ruby/vendor/deps/ruby2_keywords/Rakefile +0 -54
- package/assets/cli-ruby/vendor/deps/ruby2_keywords/lib/ruby2_keywords.rb +0 -57
- package/assets/cli-ruby/vendor/deps/ruby2_keywords/ruby2_keywords.gemspec +0 -18
- package/assets/cli-ruby/vendor/deps/ruby2_keywords/test/test_keyword.rb +0 -41
- package/assets/cli-ruby/vendor/deps/smart_properties/REVISION +0 -1
- package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/errors.rb +0 -114
- package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property.rb +0 -168
- package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property_collection.rb +0 -83
- package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations/ancestor.rb +0 -27
- package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations.rb +0 -8
- package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/version.rb +0 -3
- package/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties.rb +0 -174
- package/assets/cli-ruby/vendor/deps/webrick/Gemfile +0 -3
- package/assets/cli-ruby/vendor/deps/webrick/LICENSE.txt +0 -22
- package/assets/cli-ruby/vendor/deps/webrick/README.md +0 -61
- package/assets/cli-ruby/vendor/deps/webrick/Rakefile +0 -10
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/accesslog.rb +0 -157
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cgi.rb +0 -313
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/compat.rb +0 -36
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/config.rb +0 -158
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cookie.rb +0 -172
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/htmlutils.rb +0 -30
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +0 -117
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +0 -116
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +0 -395
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +0 -132
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +0 -97
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +0 -158
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +0 -53
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth.rb +0 -96
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpproxy.rb +0 -354
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httprequest.rb +0 -636
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpresponse.rb +0 -564
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/https.rb +0 -152
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpserver.rb +0 -294
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +0 -152
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +0 -47
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +0 -126
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +0 -88
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +0 -552
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +0 -47
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet.rb +0 -23
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpstatus.rb +0 -194
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httputils.rb +0 -512
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpversion.rb +0 -76
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/log.rb +0 -156
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/server.rb +0 -381
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/ssl.rb +0 -215
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/utils.rb +0 -265
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick/version.rb +0 -18
- package/assets/cli-ruby/vendor/deps/webrick/lib/webrick.rb +0 -232
- package/assets/cli-ruby/vendor/deps/webrick/webrick.gemspec +0 -74
- package/assets/cli-ruby/vendor/gen/lib/gen/commands/help.rb +0 -20
- package/assets/cli-ruby/vendor/gen/lib/gen/commands/new.rb +0 -21
- package/assets/cli-ruby/vendor/gen/lib/gen/commands.rb +0 -18
- package/assets/cli-ruby/vendor/gen/lib/gen/entry_point.rb +0 -10
- package/assets/cli-ruby/vendor/gen/lib/gen/generator.rb +0 -165
- package/assets/cli-ruby/vendor/gen/lib/gen.rb +0 -39
- package/assets/cli-ruby/vendor/gen/template/Gemfile +0 -10
- package/assets/cli-ruby/vendor/gen/template/README.md +0 -1
- package/assets/cli-ruby/vendor/gen/template/bin/testunit +0 -23
- package/assets/cli-ruby/vendor/gen/template/bin/update-deps +0 -97
- package/assets/cli-ruby/vendor/gen/template/dev-gems.yml +0 -3
- package/assets/cli-ruby/vendor/gen/template/dev-vendor.yml +0 -4
- package/assets/cli-ruby/vendor/gen/template/exe/__app__-gems +0 -17
- package/assets/cli-ruby/vendor/gen/template/exe/__app__-vendor +0 -18
- package/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/example.rb +0 -19
- package/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/help.rb +0 -21
- package/assets/cli-ruby/vendor/gen/template/lib/__app__/commands.rb +0 -18
- package/assets/cli-ruby/vendor/gen/template/lib/__app__/entry_point.rb +0 -10
- package/assets/cli-ruby/vendor/gen/template/lib/__app__.rb +0 -33
- package/assets/cli-ruby/vendor/gen/template/test/example_test.rb +0 -17
- package/assets/cli-ruby/vendor/gen/template/test/test_helper.rb +0 -22
- package/assets/cli-ruby/vendor/lib/semantic/LICENSE +0 -20
- package/assets/cli-ruby/vendor/lib/semantic/semantic.rb +0 -4
- package/assets/cli-ruby/vendor/lib/semantic/version.rb +0 -179
- package/dist/private/node/demo-recorder.d.ts +0 -17
- package/dist/private/node/demo-recorder.js +0 -121
- package/dist/private/node/demo-recorder.js.map +0 -1
- package/dist/public/node/ruby.d.ts +0 -38
- package/dist/public/node/ruby.js +0 -327
- package/dist/public/node/ruby.js.map +0 -1
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
require 'cli/ui'
|
|
3
|
-
require 'cli/ui/frame/frame_stack'
|
|
4
|
-
require 'cli/ui/frame/frame_style'
|
|
5
|
-
|
|
6
|
-
module CLI
|
|
7
|
-
module UI
|
|
8
|
-
module Frame
|
|
9
|
-
class UnnestedFrameException < StandardError; end
|
|
10
|
-
class << self
|
|
11
|
-
DEFAULT_FRAME_COLOR = CLI::UI.resolve_color(:cyan)
|
|
12
|
-
|
|
13
|
-
def frame_style
|
|
14
|
-
@frame_style ||= FrameStyle::Box
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# Set the default frame style.
|
|
18
|
-
#
|
|
19
|
-
# Raises ArgumentError if +frame_style+ is not valid
|
|
20
|
-
#
|
|
21
|
-
# ==== Attributes
|
|
22
|
-
#
|
|
23
|
-
# * +symbol+ or +FrameStyle+ - the default frame style to use for frames
|
|
24
|
-
#
|
|
25
|
-
def frame_style=(frame_style)
|
|
26
|
-
@frame_style = CLI::UI.resolve_style(frame_style)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Opens a new frame. Can be nested
|
|
30
|
-
# Can be invoked in two ways: block and blockless
|
|
31
|
-
# * In block form, the frame is closed automatically when the block returns
|
|
32
|
-
# * In blockless form, caller MUST call +Frame.close+ when the frame is logically done
|
|
33
|
-
# * Blockless form is strongly discouraged in cases where block form can be made to work
|
|
34
|
-
#
|
|
35
|
-
# https://user-images.githubusercontent.com/3074765/33799861-cb5dcb5c-dd01-11e7-977e-6fad38cee08c.png
|
|
36
|
-
#
|
|
37
|
-
# The return value of the block determines if the block is a "success" or a "failure"
|
|
38
|
-
#
|
|
39
|
-
# ==== Attributes
|
|
40
|
-
#
|
|
41
|
-
# * +text+ - (required) the text/title to output in the frame
|
|
42
|
-
#
|
|
43
|
-
# ==== Options
|
|
44
|
-
#
|
|
45
|
-
# * +:color+ - The color of the frame. Defaults to +DEFAULT_FRAME_COLOR+
|
|
46
|
-
# * +:failure_text+ - If the block failed, what do we output? Defaults to nil
|
|
47
|
-
# * +:success_text+ - If the block succeeds, what do we output? Defaults to nil
|
|
48
|
-
# * +:timing+ - How long did the frame content take? Invalid for blockless. Defaults to true for the block form
|
|
49
|
-
# * +frame_style+ - The frame style to use for this frame
|
|
50
|
-
#
|
|
51
|
-
# ==== Example
|
|
52
|
-
#
|
|
53
|
-
# ===== Block Form (Assumes +CLI::UI::StdoutRouter.enable+ has been called)
|
|
54
|
-
#
|
|
55
|
-
# CLI::UI::Frame.open('Open') { puts 'hi' }
|
|
56
|
-
#
|
|
57
|
-
# Default Output:
|
|
58
|
-
# ┏━━ Open ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
-
# ┃ hi
|
|
60
|
-
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (0.0s) ━━
|
|
61
|
-
#
|
|
62
|
-
# ===== Blockless Form
|
|
63
|
-
#
|
|
64
|
-
# CLI::UI::Frame.open('Open')
|
|
65
|
-
#
|
|
66
|
-
# Default Output:
|
|
67
|
-
# ┏━━ Open ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
def open(
|
|
71
|
-
text,
|
|
72
|
-
color: DEFAULT_FRAME_COLOR,
|
|
73
|
-
failure_text: nil,
|
|
74
|
-
success_text: nil,
|
|
75
|
-
timing: nil,
|
|
76
|
-
frame_style: self.frame_style
|
|
77
|
-
)
|
|
78
|
-
frame_style = CLI::UI.resolve_style(frame_style)
|
|
79
|
-
color = CLI::UI.resolve_color(color)
|
|
80
|
-
|
|
81
|
-
unless block_given?
|
|
82
|
-
if failure_text
|
|
83
|
-
raise ArgumentError, "failure_text is not compatible with blockless invocation"
|
|
84
|
-
elsif success_text
|
|
85
|
-
raise ArgumentError, "success_text is not compatible with blockless invocation"
|
|
86
|
-
elsif timing
|
|
87
|
-
raise ArgumentError, "timing is not compatible with blockless invocation"
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
t_start = Time.now
|
|
92
|
-
CLI::UI.raw do
|
|
93
|
-
print(prefix.chop)
|
|
94
|
-
puts frame_style.open(text, color: color)
|
|
95
|
-
end
|
|
96
|
-
FrameStack.push(color: color, style: frame_style)
|
|
97
|
-
|
|
98
|
-
return unless block_given?
|
|
99
|
-
|
|
100
|
-
closed = false
|
|
101
|
-
begin
|
|
102
|
-
success = false
|
|
103
|
-
success = yield
|
|
104
|
-
rescue
|
|
105
|
-
closed = true
|
|
106
|
-
t_diff = elasped(t_start, timing)
|
|
107
|
-
close(failure_text, color: :red, elapsed: t_diff)
|
|
108
|
-
raise
|
|
109
|
-
else
|
|
110
|
-
success
|
|
111
|
-
ensure
|
|
112
|
-
unless closed
|
|
113
|
-
t_diff = elasped(t_start, timing)
|
|
114
|
-
if success != false
|
|
115
|
-
close(success_text, color: color, elapsed: t_diff)
|
|
116
|
-
else
|
|
117
|
-
close(failure_text, color: :red, elapsed: t_diff)
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
# Adds a divider in a frame
|
|
124
|
-
# Used to separate information within a single frame
|
|
125
|
-
#
|
|
126
|
-
# ==== Attributes
|
|
127
|
-
#
|
|
128
|
-
# * +text+ - (required) the text/title to output in the frame
|
|
129
|
-
#
|
|
130
|
-
# ==== Options
|
|
131
|
-
#
|
|
132
|
-
# * +:color+ - The color of the frame. Defaults to +DEFAULT_FRAME_COLOR+
|
|
133
|
-
# * +frame_style+ - The frame style to use for this frame
|
|
134
|
-
#
|
|
135
|
-
# ==== Example
|
|
136
|
-
#
|
|
137
|
-
# CLI::UI::Frame.open('Open') { CLI::UI::Frame.divider('Divider') }
|
|
138
|
-
#
|
|
139
|
-
# Default Output:
|
|
140
|
-
# ┏━━ Open ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
141
|
-
# ┣━━ Divider ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
-
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
143
|
-
#
|
|
144
|
-
# ==== Raises
|
|
145
|
-
#
|
|
146
|
-
# MUST be inside an open frame or it raises a +UnnestedFrameException+
|
|
147
|
-
#
|
|
148
|
-
def divider(text, color: nil, frame_style: nil)
|
|
149
|
-
fs_item = FrameStack.pop
|
|
150
|
-
raise UnnestedFrameException, "No frame nesting to unnest" unless fs_item
|
|
151
|
-
|
|
152
|
-
color = CLI::UI.resolve_color(color) || fs_item.color
|
|
153
|
-
frame_style = CLI::UI.resolve_style(frame_style) || fs_item.frame_style
|
|
154
|
-
|
|
155
|
-
CLI::UI.raw do
|
|
156
|
-
print(prefix.chop)
|
|
157
|
-
puts frame_style.divider(text, color: color)
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
FrameStack.push(fs_item)
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# Closes a frame
|
|
164
|
-
# Automatically called for a block-form +open+
|
|
165
|
-
#
|
|
166
|
-
# ==== Attributes
|
|
167
|
-
#
|
|
168
|
-
# * +text+ - (required) the text/title to output in the frame
|
|
169
|
-
#
|
|
170
|
-
# ==== Options
|
|
171
|
-
#
|
|
172
|
-
# * +:color+ - The color of the frame. Defaults to nil
|
|
173
|
-
# * +:elapsed+ - How long did the frame take? Defaults to nil
|
|
174
|
-
# * +frame_style+ - The frame style to use for this frame. Defaults to nil
|
|
175
|
-
#
|
|
176
|
-
# ==== Example
|
|
177
|
-
#
|
|
178
|
-
# CLI::UI::Frame.close('Close')
|
|
179
|
-
#
|
|
180
|
-
# Default Output:
|
|
181
|
-
# ┗━━ Close ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
182
|
-
#
|
|
183
|
-
# ==== Raises
|
|
184
|
-
#
|
|
185
|
-
# MUST be inside an open frame or it raises a +UnnestedFrameException+
|
|
186
|
-
#
|
|
187
|
-
def close(text, color: nil, elapsed: nil, frame_style: nil)
|
|
188
|
-
fs_item = FrameStack.pop
|
|
189
|
-
raise UnnestedFrameException, "No frame nesting to unnest" unless fs_item
|
|
190
|
-
|
|
191
|
-
color = CLI::UI.resolve_color(color) || fs_item.color
|
|
192
|
-
frame_style = CLI::UI.resolve_style(frame_style) || fs_item.frame_style
|
|
193
|
-
|
|
194
|
-
kwargs = {}
|
|
195
|
-
if elapsed
|
|
196
|
-
kwargs[:right_text] = "(#{elapsed.round(2)}s)"
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
CLI::UI.raw do
|
|
200
|
-
print(prefix.chop)
|
|
201
|
-
puts frame_style.close(text, color: color, **kwargs)
|
|
202
|
-
end
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
# Determines the prefix of a frame entry taking multi-nested frames into account
|
|
206
|
-
#
|
|
207
|
-
# ==== Options
|
|
208
|
-
#
|
|
209
|
-
# * +:color+ - The color of the prefix. Defaults to +Thread.current[:cliui_frame_color_override]+
|
|
210
|
-
#
|
|
211
|
-
def prefix(color: Thread.current[:cliui_frame_color_override])
|
|
212
|
-
+''.tap do |output|
|
|
213
|
-
items = FrameStack.items
|
|
214
|
-
|
|
215
|
-
items[0..-2].each do |item|
|
|
216
|
-
output << item.color.code << item.frame_style.prefix
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
if (item = items.last)
|
|
220
|
-
final_color = color || item.color
|
|
221
|
-
output << CLI::UI.resolve_color(final_color).code \
|
|
222
|
-
<< item.frame_style.prefix \
|
|
223
|
-
<< ' ' \
|
|
224
|
-
<< CLI::UI::Color::RESET.code
|
|
225
|
-
end
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
# The width of a prefix given the number of Frames in the stack
|
|
230
|
-
def prefix_width
|
|
231
|
-
w = FrameStack.items.reduce(0) do |width, item|
|
|
232
|
-
width + item.frame_style.prefix_width
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
w.zero? ? w : w + 1
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
# Override a color for a given thread.
|
|
239
|
-
#
|
|
240
|
-
# ==== Attributes
|
|
241
|
-
#
|
|
242
|
-
# * +color+ - The color to override to
|
|
243
|
-
#
|
|
244
|
-
def with_frame_color_override(color)
|
|
245
|
-
prev = Thread.current[:cliui_frame_color_override]
|
|
246
|
-
Thread.current[:cliui_frame_color_override] = color
|
|
247
|
-
yield
|
|
248
|
-
ensure
|
|
249
|
-
Thread.current[:cliui_frame_color_override] = prev
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
private
|
|
253
|
-
|
|
254
|
-
# If timing is:
|
|
255
|
-
# Numeric: return it
|
|
256
|
-
# false: return nil
|
|
257
|
-
# true or nil: defaults to Time.new
|
|
258
|
-
# Time: return the difference with start
|
|
259
|
-
def elasped(start, timing)
|
|
260
|
-
return timing if timing.is_a?(Numeric)
|
|
261
|
-
return if timing.is_a?(FalseClass)
|
|
262
|
-
|
|
263
|
-
timing = Time.new if timing.is_a?(TrueClass) || timing.nil?
|
|
264
|
-
timing - start
|
|
265
|
-
end
|
|
266
|
-
end
|
|
267
|
-
end
|
|
268
|
-
end
|
|
269
|
-
end
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
require 'cli/ui'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module UI
|
|
5
|
-
class Glyph
|
|
6
|
-
class InvalidGlyphHandle < ArgumentError
|
|
7
|
-
def initialize(handle)
|
|
8
|
-
super
|
|
9
|
-
@handle = handle
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def message
|
|
13
|
-
keys = Glyph.available.join(',')
|
|
14
|
-
"invalid glyph handle: #{@handle} " \
|
|
15
|
-
"-- must be one of CLI::UI::Glyph.available (#{keys})"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
attr_reader :handle, :codepoint, :color, :to_s, :fmt
|
|
20
|
-
|
|
21
|
-
# Creates a new glyph
|
|
22
|
-
#
|
|
23
|
-
# ==== Attributes
|
|
24
|
-
#
|
|
25
|
-
# * +handle+ - The handle in the +MAP+ constant
|
|
26
|
-
# * +codepoint+ - The codepoint used to create the glyph (e.g. +0x2717+ for a ballot X)
|
|
27
|
-
# * +plain+ - A fallback plain string to be used in case glyphs are disabled
|
|
28
|
-
# * +color+ - What color to output the glyph. Check +CLI::UI::Color+ for options.
|
|
29
|
-
#
|
|
30
|
-
def initialize(handle, codepoint, plain, color)
|
|
31
|
-
@handle = handle
|
|
32
|
-
@codepoint = codepoint
|
|
33
|
-
@color = color
|
|
34
|
-
@plain = plain
|
|
35
|
-
@char = Array(codepoint).pack('U*')
|
|
36
|
-
@to_s = color.code + char + Color::RESET.code
|
|
37
|
-
@fmt = "{{#{color.name}:#{char}}}"
|
|
38
|
-
|
|
39
|
-
MAP[handle] = self
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Fetches the actual character(s) to be displayed for a glyph, based on the current OS support
|
|
43
|
-
#
|
|
44
|
-
# ==== Returns
|
|
45
|
-
# Returns the glyph string
|
|
46
|
-
def char
|
|
47
|
-
CLI::UI::OS.current.supports_emoji? ? @char : @plain
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Mapping of glyphs to terminal output
|
|
51
|
-
MAP = {}
|
|
52
|
-
STAR = new('*', 0x2b51, '*', Color::YELLOW) # YELLOW SMALL STAR (⭑)
|
|
53
|
-
INFO = new('i', 0x1d4be, 'i', Color::BLUE) # BLUE MATHEMATICAL SCRIPT SMALL i (𝒾)
|
|
54
|
-
QUESTION = new('?', 0x003f, '?', Color::BLUE) # BLUE QUESTION MARK (?)
|
|
55
|
-
CHECK = new('v', 0x2713, '√', Color::GREEN) # GREEN CHECK MARK (✓)
|
|
56
|
-
X = new('x', 0x2717, 'X', Color::RED) # RED BALLOT X (✗)
|
|
57
|
-
BUG = new('b', 0x1f41b, '!', Color::WHITE) # Bug emoji (🐛)
|
|
58
|
-
CHEVRON = new('>', 0xbb, '»', Color::GRAY) # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK (»)
|
|
59
|
-
HOURGLASS = new('H', [0x231b, 0xfe0e], 'H', Color::BLUE) # HOURGLASS + VARIATION SELECTOR 15 (⌛︎)
|
|
60
|
-
WARNING = new('!', [0x26a0, 0xfe0f], '!', Color::YELLOW) # WARNING SIGN + VARIATION SELECTOR 16 (⚠️ )
|
|
61
|
-
|
|
62
|
-
# Looks up a glyph by name
|
|
63
|
-
#
|
|
64
|
-
# ==== Raises
|
|
65
|
-
# Raises a InvalidGlyphHandle if the glyph is not available
|
|
66
|
-
# You likely need to create it with +.new+ or you made a typo
|
|
67
|
-
#
|
|
68
|
-
# ==== Returns
|
|
69
|
-
# Returns a terminal output-capable string
|
|
70
|
-
#
|
|
71
|
-
def self.lookup(name)
|
|
72
|
-
MAP.fetch(name.to_s)
|
|
73
|
-
rescue KeyError
|
|
74
|
-
raise InvalidGlyphHandle, name
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# All available glyphs by name
|
|
78
|
-
#
|
|
79
|
-
def self.available
|
|
80
|
-
MAP.keys
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
module CLI
|
|
2
|
-
module UI
|
|
3
|
-
module OS
|
|
4
|
-
# Determines which OS is currently running the UI, to make it easier to
|
|
5
|
-
# adapt its behaviour to the features of the OS.
|
|
6
|
-
def self.current
|
|
7
|
-
@current_os ||= case RbConfig::CONFIG['host_os']
|
|
8
|
-
when /darwin/
|
|
9
|
-
Mac
|
|
10
|
-
when /linux/
|
|
11
|
-
Linux
|
|
12
|
-
else
|
|
13
|
-
if RUBY_PLATFORM !~ /cygwin/ && ENV['OS'] == 'Windows_NT'
|
|
14
|
-
Windows
|
|
15
|
-
else
|
|
16
|
-
raise "Could not determine OS from host_os #{RbConfig::CONFIG["host_os"]}"
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
class Mac
|
|
22
|
-
class << self
|
|
23
|
-
def supports_emoji?
|
|
24
|
-
true
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def supports_color_prompt?
|
|
28
|
-
true
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def supports_arrow_keys?
|
|
32
|
-
true
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def shift_cursor_on_line_reset?
|
|
36
|
-
false
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def path_separator
|
|
40
|
-
":"
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
class Linux < Mac
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
class Windows
|
|
49
|
-
class << self
|
|
50
|
-
def supports_emoji?
|
|
51
|
-
false
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def supports_color_prompt?
|
|
55
|
-
false
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def supports_arrow_keys?
|
|
59
|
-
false
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def shift_cursor_on_line_reset?
|
|
63
|
-
true
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def path_separator
|
|
67
|
-
";"
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
end
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
require 'cli/ui'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module UI
|
|
5
|
-
class Printer
|
|
6
|
-
# Print a message to a stream with common utilities.
|
|
7
|
-
# Allows overriding the color, encoding, and target stream.
|
|
8
|
-
# By default, it formats the string using CLI:UI and rescues common stream errors.
|
|
9
|
-
#
|
|
10
|
-
# ==== Attributes
|
|
11
|
-
#
|
|
12
|
-
# * +msg+ - (required) the string to output. Can be frozen.
|
|
13
|
-
#
|
|
14
|
-
# ==== Options
|
|
15
|
-
#
|
|
16
|
-
# * +:frame_color+ - Override the frame color. Defaults to nil.
|
|
17
|
-
# * +:to+ - Target stream, like $stdout or $stderr. Can be anything with a puts method. Defaults to $stdout.
|
|
18
|
-
# * +:encoding+ - Force the output to be in a certain encoding. Defaults to UTF-8.
|
|
19
|
-
# * +:format+ - Whether to format the string using CLI::UI.fmt. Defaults to true.
|
|
20
|
-
# * +:graceful+ - Whether to gracefully ignore common I/O errors. Defaults to true.
|
|
21
|
-
# * +:wrap+ - Whether to wrap text at word boundaries to terminal width. Defaults to true.
|
|
22
|
-
#
|
|
23
|
-
# ==== Returns
|
|
24
|
-
# Returns whether the message was successfully printed,
|
|
25
|
-
# which can be useful if +:graceful+ is set to true.
|
|
26
|
-
#
|
|
27
|
-
# ==== Example
|
|
28
|
-
#
|
|
29
|
-
# CLI::UI::Printer.puts('{{x}} Ouch', to: $stderr)
|
|
30
|
-
#
|
|
31
|
-
def self.puts(
|
|
32
|
-
msg,
|
|
33
|
-
frame_color:
|
|
34
|
-
nil,
|
|
35
|
-
to:
|
|
36
|
-
$stdout,
|
|
37
|
-
encoding: Encoding::UTF_8,
|
|
38
|
-
format: true,
|
|
39
|
-
graceful: true,
|
|
40
|
-
wrap: true
|
|
41
|
-
)
|
|
42
|
-
msg = (+msg).force_encoding(encoding) if encoding
|
|
43
|
-
msg = CLI::UI.fmt(msg) if format
|
|
44
|
-
msg = CLI::UI.wrap(msg) if wrap
|
|
45
|
-
|
|
46
|
-
if frame_color
|
|
47
|
-
CLI::UI::Frame.with_frame_color_override(frame_color) { to.puts(msg) }
|
|
48
|
-
else
|
|
49
|
-
to.puts(msg)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
true
|
|
53
|
-
rescue Errno::EIO, Errno::EPIPE, IOError => e
|
|
54
|
-
raise(e) unless graceful
|
|
55
|
-
false
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
require 'cli/ui'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module UI
|
|
5
|
-
class Progress
|
|
6
|
-
# A Cyan filled block
|
|
7
|
-
FILLED_BAR = "\e[46m"
|
|
8
|
-
# A bright white block
|
|
9
|
-
UNFILLED_BAR = "\e[1;47m"
|
|
10
|
-
|
|
11
|
-
# Add a progress bar to the terminal output
|
|
12
|
-
#
|
|
13
|
-
# https://user-images.githubusercontent.com/3074765/33799794-cc4c940e-dd00-11e7-9bdc-90f77ec9167c.gif
|
|
14
|
-
#
|
|
15
|
-
# ==== Example Usage:
|
|
16
|
-
#
|
|
17
|
-
# Set the percent to X
|
|
18
|
-
# CLI::UI::Progress.progress do |bar|
|
|
19
|
-
# bar.tick(set_percent: percent)
|
|
20
|
-
# end
|
|
21
|
-
#
|
|
22
|
-
# Increase the percent by 1 percent
|
|
23
|
-
# CLI::UI::Progress.progress do |bar|
|
|
24
|
-
# bar.tick
|
|
25
|
-
# end
|
|
26
|
-
#
|
|
27
|
-
# Increase the percent by X
|
|
28
|
-
# CLI::UI::Progress.progress do |bar|
|
|
29
|
-
# bar.tick(percent: 0.05)
|
|
30
|
-
# end
|
|
31
|
-
def self.progress(width: Terminal.width)
|
|
32
|
-
bar = Progress.new(width: width)
|
|
33
|
-
print(CLI::UI::ANSI.hide_cursor)
|
|
34
|
-
yield(bar)
|
|
35
|
-
ensure
|
|
36
|
-
puts bar.to_s
|
|
37
|
-
CLI::UI.raw do
|
|
38
|
-
print(ANSI.show_cursor)
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Initialize a progress bar. Typically used in a +Progress.progress+ block
|
|
43
|
-
#
|
|
44
|
-
# ==== Options
|
|
45
|
-
# One of the follow can be used, but not both together
|
|
46
|
-
#
|
|
47
|
-
# * +:width+ - The width of the terminal
|
|
48
|
-
#
|
|
49
|
-
def initialize(width: Terminal.width)
|
|
50
|
-
@percent_done = 0
|
|
51
|
-
@max_width = width
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# Set the progress of the bar. Typically used in a +Progress.progress+ block
|
|
55
|
-
#
|
|
56
|
-
# ==== Options
|
|
57
|
-
# One of the follow can be used, but not both together
|
|
58
|
-
#
|
|
59
|
-
# * +:percent+ - Increment progress by a specific percent amount
|
|
60
|
-
# * +:set_percent+ - Set progress to a specific percent
|
|
61
|
-
#
|
|
62
|
-
# *Note:* The +:percent+ and +:set_percent must be between 0.00 and 1.0
|
|
63
|
-
#
|
|
64
|
-
def tick(percent: 0.01, set_percent: nil)
|
|
65
|
-
raise ArgumentError, 'percent and set_percent cannot both be specified' if percent != 0.01 && set_percent
|
|
66
|
-
@percent_done += percent
|
|
67
|
-
@percent_done = set_percent if set_percent
|
|
68
|
-
@percent_done = [@percent_done, 1.0].min # Make sure we can't go above 1.0
|
|
69
|
-
|
|
70
|
-
print(to_s)
|
|
71
|
-
print(CLI::UI::ANSI.previous_line + "\n")
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# Format the progress bar to be printed to terminal
|
|
75
|
-
#
|
|
76
|
-
def to_s
|
|
77
|
-
suffix = " #{(@percent_done * 100).floor}%".ljust(5)
|
|
78
|
-
workable_width = @max_width - Frame.prefix_width - suffix.size
|
|
79
|
-
filled = [(@percent_done * workable_width.to_f).ceil, 0].max
|
|
80
|
-
unfilled = [workable_width - filled, 0].max
|
|
81
|
-
|
|
82
|
-
CLI::UI.resolve_text([
|
|
83
|
-
FILLED_BAR + ' ' * filled,
|
|
84
|
-
UNFILLED_BAR + ' ' * unfilled,
|
|
85
|
-
CLI::UI::Color::RESET.code + suffix,
|
|
86
|
-
].join)
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
require 'cli/ui'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module UI
|
|
5
|
-
class ProgressPlain
|
|
6
|
-
# Add a plain progress bar to the terminal output
|
|
7
|
-
#
|
|
8
|
-
# ==== Example Usage:
|
|
9
|
-
#
|
|
10
|
-
# Set the percent to X
|
|
11
|
-
# CLI::UI::ProgressPlain.progress do |bar|
|
|
12
|
-
# bar.tick(set_percent: percent)
|
|
13
|
-
# end
|
|
14
|
-
def self.progress(prefix: "")
|
|
15
|
-
bar = ProgressPlain.new(prefix: prefix)
|
|
16
|
-
yield(bar)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# Initialize a plain progress bar. Typically used in a +ProgressPlain.progress+ block
|
|
20
|
-
#
|
|
21
|
-
def initialize(prefix: "")
|
|
22
|
-
@percent_done = 0
|
|
23
|
-
@prefix = prefix
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Set the progress of the bar. Typically used in a +ProgressPlain.progress+ block
|
|
27
|
-
#
|
|
28
|
-
# ==== Options
|
|
29
|
-
# * +:set_percent+ - Set progress to a specific percent
|
|
30
|
-
#
|
|
31
|
-
# *Note:* The +:set_percent must be between 0.00 and 1.0
|
|
32
|
-
#
|
|
33
|
-
def tick(set_percent: nil)
|
|
34
|
-
return if @percent_done >= 1.0 # Don't print if we're already done
|
|
35
|
-
# Print only if we've moved up a whole 10% (e.g. 10%, 20%, 30%)q
|
|
36
|
-
return if (@percent_done * 100).floor != 0 && ((@percent_done * 100).floor / 10 == (set_percent * 100).floor / 10)
|
|
37
|
-
@percent_done = set_percent
|
|
38
|
-
@percent_done = [@percent_done, 1.0].min # Make sure we can't go above 1.0
|
|
39
|
-
|
|
40
|
-
print("#{to_s}\n")
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Format the progress bar to be printed to terminal
|
|
44
|
-
#
|
|
45
|
-
def to_s
|
|
46
|
-
"#{@prefix} #{(@percent_done * 100).floor.to_s.rjust(5)}%"
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|