@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,21 +0,0 @@
|
|
|
1
|
-
require 'cli/kit'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module Kit
|
|
5
|
-
module Autocall
|
|
6
|
-
def autocall(const, &block)
|
|
7
|
-
@autocalls ||= {}
|
|
8
|
-
@autocalls[const] = block
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def const_missing(const)
|
|
12
|
-
block = begin
|
|
13
|
-
@autocalls.fetch(const)
|
|
14
|
-
rescue KeyError
|
|
15
|
-
return super
|
|
16
|
-
end
|
|
17
|
-
const_set(const, block.call)
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
require 'cli/kit'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module Kit
|
|
5
|
-
class BaseCommand
|
|
6
|
-
def self.defined?
|
|
7
|
-
true
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.statsd_increment(_metric, **_kwargs)
|
|
11
|
-
nil
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def self.statsd_time(_metric, **_kwargs)
|
|
15
|
-
yield
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def self.call(args, command_name)
|
|
19
|
-
cmd = new
|
|
20
|
-
stats_tags = cmd.stats_tags(args, command_name)
|
|
21
|
-
begin
|
|
22
|
-
statsd_increment("cli.command.invoked", tags: stats_tags)
|
|
23
|
-
statsd_time("cli.command.time", tags: stats_tags) do
|
|
24
|
-
cmd.call(args, command_name)
|
|
25
|
-
end
|
|
26
|
-
statsd_increment("cli.command.success", tags: stats_tags)
|
|
27
|
-
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
28
|
-
statsd_increment("cli.command.exception", tags: stats_tags + ["exception:#{e.class}"])
|
|
29
|
-
raise e
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def stats_tags(args, command_name)
|
|
34
|
-
tags = ["task:#{self.class}"]
|
|
35
|
-
tags << "command:#{command_name}" if command_name
|
|
36
|
-
tags << "subcommand:#{args.first}" if args&.first && has_subcommands?
|
|
37
|
-
tags
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def call(_args, _command_name)
|
|
41
|
-
raise NotImplementedError
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def has_subcommands?
|
|
45
|
-
false
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
require 'cli/kit'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module Kit
|
|
5
|
-
class CommandRegistry
|
|
6
|
-
attr_reader :commands, :aliases
|
|
7
|
-
|
|
8
|
-
module NullContextualResolver
|
|
9
|
-
def self.command_names
|
|
10
|
-
[]
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def self.aliases
|
|
14
|
-
{}
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def self.command_class(_name)
|
|
18
|
-
nil
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def initialize(default:, contextual_resolver: nil)
|
|
23
|
-
@commands = {}
|
|
24
|
-
@aliases = {}
|
|
25
|
-
@default = default
|
|
26
|
-
@contextual_resolver = contextual_resolver || NullContextualResolver
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def resolved_commands
|
|
30
|
-
@commands.each_with_object({}) do |(k, v), a|
|
|
31
|
-
a[k] = resolve_class(v)
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def add(const, name)
|
|
36
|
-
commands[name] = const
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def lookup_command(name)
|
|
40
|
-
name = @default if name.to_s.empty?
|
|
41
|
-
resolve_command(name)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def add_alias(from, to)
|
|
45
|
-
aliases[from] = to unless aliases[from]
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def command_names
|
|
49
|
-
@contextual_resolver.command_names + commands.keys
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def exist?(name)
|
|
53
|
-
!resolve_command(name).first.nil?
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
private
|
|
57
|
-
|
|
58
|
-
def resolve_alias(name)
|
|
59
|
-
aliases[name] || @contextual_resolver.aliases.fetch(name, name)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def resolve_command(name)
|
|
63
|
-
name = resolve_alias(name)
|
|
64
|
-
resolve_global_command(name) || \
|
|
65
|
-
resolve_contextual_command(name) || \
|
|
66
|
-
[nil, name]
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def resolve_global_command(name)
|
|
70
|
-
klass = resolve_class(commands.fetch(name, nil))
|
|
71
|
-
return nil unless klass&.defined?
|
|
72
|
-
[klass, name]
|
|
73
|
-
rescue NameError
|
|
74
|
-
nil
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def resolve_contextual_command(name)
|
|
78
|
-
found = @contextual_resolver.command_names.include?(name)
|
|
79
|
-
return nil unless found
|
|
80
|
-
[@contextual_resolver.command_class(name), name]
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
def resolve_class(class_or_proc)
|
|
84
|
-
if class_or_proc.is_a?(Class)
|
|
85
|
-
class_or_proc
|
|
86
|
-
elsif class_or_proc.respond_to?(:call)
|
|
87
|
-
class_or_proc.call
|
|
88
|
-
else
|
|
89
|
-
class_or_proc
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
end
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
require 'cli/kit'
|
|
2
|
-
require 'fileutils'
|
|
3
|
-
|
|
4
|
-
module CLI
|
|
5
|
-
module Kit
|
|
6
|
-
class Config
|
|
7
|
-
XDG_CONFIG_HOME = 'XDG_CONFIG_HOME'
|
|
8
|
-
|
|
9
|
-
def initialize(tool_name:)
|
|
10
|
-
@tool_name = tool_name
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
# Returns the config corresponding to `name` from the config file
|
|
14
|
-
# `false` is returned if it doesn't exist
|
|
15
|
-
#
|
|
16
|
-
# #### Parameters
|
|
17
|
-
# `section` : the section of the config value you are looking for
|
|
18
|
-
# `name` : the name of the config value you are looking for
|
|
19
|
-
#
|
|
20
|
-
# #### Returns
|
|
21
|
-
# `value` : the value of the config variable (false if none)
|
|
22
|
-
#
|
|
23
|
-
# #### Example Usage
|
|
24
|
-
# `config.get('name.of.config')`
|
|
25
|
-
#
|
|
26
|
-
def get(section, name, default: false)
|
|
27
|
-
all_configs.dig("[#{section}]", name) || default
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Coalesce and enforce the value of a config to a boolean
|
|
31
|
-
def get_bool(section, name, default: false)
|
|
32
|
-
case get(section, name, default: default).to_s
|
|
33
|
-
when "true"
|
|
34
|
-
true
|
|
35
|
-
when "false"
|
|
36
|
-
false
|
|
37
|
-
else
|
|
38
|
-
raise CLI::Kit::Abort, "Invalid config: #{section}.#{name} is expected to be true or false"
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Sets the config value in the config file
|
|
43
|
-
#
|
|
44
|
-
# #### Parameters
|
|
45
|
-
# `section` : the section of the config you are setting
|
|
46
|
-
# `name` : the name of the config you are setting
|
|
47
|
-
# `value` : the value of the config you are setting
|
|
48
|
-
#
|
|
49
|
-
# #### Example Usage
|
|
50
|
-
# `config.set('section', 'name.of.config', 'value')`
|
|
51
|
-
#
|
|
52
|
-
def set(section, name, value)
|
|
53
|
-
all_configs["[#{section}]"] ||= {}
|
|
54
|
-
all_configs["[#{section}]"][name] = value.nil? ? nil : value.to_s
|
|
55
|
-
write_config
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Unsets a config value in the config file
|
|
59
|
-
#
|
|
60
|
-
# #### Parameters
|
|
61
|
-
# `section` : the section of the config you are deleting
|
|
62
|
-
# `name` : the name of the config you are deleting
|
|
63
|
-
#
|
|
64
|
-
# #### Example Usage
|
|
65
|
-
# `config.unset('section', 'name.of.config')`
|
|
66
|
-
#
|
|
67
|
-
def unset(section, name)
|
|
68
|
-
set(section, name, nil)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Gets the hash for the entire section
|
|
72
|
-
#
|
|
73
|
-
# #### Parameters
|
|
74
|
-
# `section` : the section of the config you are getting
|
|
75
|
-
#
|
|
76
|
-
# #### Example Usage
|
|
77
|
-
# `config.get_section('section')`
|
|
78
|
-
#
|
|
79
|
-
def get_section(section)
|
|
80
|
-
(all_configs["[#{section}]"] || {}).dup
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Returns a path from config in expanded form
|
|
84
|
-
# e.g. shopify corresponds to ~/src/shopify, but is expanded to /Users/name/src/shopify
|
|
85
|
-
#
|
|
86
|
-
# #### Example Usage
|
|
87
|
-
# `config.get_path('srcpath', 'shopify')`
|
|
88
|
-
#
|
|
89
|
-
# #### Returns
|
|
90
|
-
# `path` : the expanded path to the corrsponding value
|
|
91
|
-
#
|
|
92
|
-
def get_path(section, name = nil)
|
|
93
|
-
v = get(section, name)
|
|
94
|
-
false == v ? v : File.expand_path(v)
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def to_s
|
|
98
|
-
ini.to_s
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# The path on disk at which the configuration is stored:
|
|
102
|
-
# `$XDG_CONFIG_HOME/<toolname>/config`
|
|
103
|
-
# if ENV['XDG_CONFIG_HOME'] is not set, we default to ~/.config, e.g.:
|
|
104
|
-
# ~/.config/tool/config
|
|
105
|
-
#
|
|
106
|
-
def file
|
|
107
|
-
config_home = ENV.fetch(XDG_CONFIG_HOME, '~/.config')
|
|
108
|
-
File.expand_path(File.join(@tool_name, 'config'), config_home)
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
private
|
|
112
|
-
|
|
113
|
-
def all_configs
|
|
114
|
-
ini.ini
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
def ini
|
|
118
|
-
@ini ||= CLI::Kit::Ini
|
|
119
|
-
.new(file, default_section: "[global]", convert_types: false)
|
|
120
|
-
.tap(&:parse)
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
def write_config
|
|
124
|
-
all_configs.each do |section, sub_config|
|
|
125
|
-
all_configs[section] = sub_config.reject { |_, value| value.nil? }
|
|
126
|
-
all_configs.delete(section) if all_configs[section].empty?
|
|
127
|
-
end
|
|
128
|
-
FileUtils.mkdir_p(File.dirname(file))
|
|
129
|
-
File.write(file, to_s)
|
|
130
|
-
end
|
|
131
|
-
end
|
|
132
|
-
end
|
|
133
|
-
end
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
require 'cli/kit'
|
|
2
|
-
require 'English'
|
|
3
|
-
|
|
4
|
-
module CLI
|
|
5
|
-
module Kit
|
|
6
|
-
class ErrorHandler
|
|
7
|
-
def initialize(log_file:, exception_reporter:, tool_name: nil)
|
|
8
|
-
@log_file = log_file
|
|
9
|
-
@exception_reporter_or_proc = exception_reporter || NullExceptionReporter
|
|
10
|
-
@tool_name = tool_name
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
module NullExceptionReporter
|
|
14
|
-
def self.report(_exception, _logs)
|
|
15
|
-
nil
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def call(&block)
|
|
20
|
-
install!
|
|
21
|
-
handle_abort(&block)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def handle_exception(error)
|
|
25
|
-
if (notify_with = exception_for_submission(error))
|
|
26
|
-
logs = begin
|
|
27
|
-
File.read(@log_file)
|
|
28
|
-
rescue => e
|
|
29
|
-
"(#{e.class}: #{e.message})"
|
|
30
|
-
end
|
|
31
|
-
exception_reporter.report(notify_with, logs)
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# maybe we can get rid of this.
|
|
36
|
-
attr_writer :exception
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
|
|
40
|
-
def exception_for_submission(error)
|
|
41
|
-
case error
|
|
42
|
-
when nil # normal, non-error termination
|
|
43
|
-
nil
|
|
44
|
-
when Interrupt # ctrl-c
|
|
45
|
-
nil
|
|
46
|
-
when CLI::Kit::Abort, CLI::Kit::AbortSilent # Not a bug
|
|
47
|
-
nil
|
|
48
|
-
when SignalException
|
|
49
|
-
skip = %w(SIGTERM SIGHUP SIGINT)
|
|
50
|
-
skip.include?(error.message) ? nil : error
|
|
51
|
-
when SystemExit # "exit N" called
|
|
52
|
-
case error.status
|
|
53
|
-
when CLI::Kit::EXIT_SUCCESS # submit nothing if it was `exit 0`
|
|
54
|
-
nil
|
|
55
|
-
when CLI::Kit::EXIT_FAILURE_BUT_NOT_BUG
|
|
56
|
-
# if it was `exit 30`, translate the exit code to 1, and submit nothing.
|
|
57
|
-
# 30 is used to signal normal failures that are not indicative of bugs.
|
|
58
|
-
# However, users should see it presented as 1.
|
|
59
|
-
exit(1)
|
|
60
|
-
else
|
|
61
|
-
# A weird termination status happened. `error.exception "message"` will maintain backtrace
|
|
62
|
-
# but allow us to set a message
|
|
63
|
-
error.exception("abnormal termination status: #{error.status}")
|
|
64
|
-
end
|
|
65
|
-
else
|
|
66
|
-
error
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def install!
|
|
71
|
-
at_exit { handle_exception(@exception || $ERROR_INFO) }
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def handle_abort
|
|
75
|
-
yield
|
|
76
|
-
CLI::Kit::EXIT_SUCCESS
|
|
77
|
-
rescue CLI::Kit::GenericAbort => e
|
|
78
|
-
is_bug = e.is_a?(CLI::Kit::Bug) || e.is_a?(CLI::Kit::BugSilent)
|
|
79
|
-
is_silent = e.is_a?(CLI::Kit::AbortSilent) || e.is_a?(CLI::Kit::BugSilent)
|
|
80
|
-
|
|
81
|
-
print_error_message(e) unless is_silent
|
|
82
|
-
(@exception = e) if is_bug
|
|
83
|
-
|
|
84
|
-
CLI::Kit::EXIT_FAILURE_BUT_NOT_BUG
|
|
85
|
-
rescue Interrupt
|
|
86
|
-
stderr_puts_message('Interrupt')
|
|
87
|
-
CLI::Kit::EXIT_FAILURE_BUT_NOT_BUG
|
|
88
|
-
rescue Errno::ENOSPC
|
|
89
|
-
message = if @tool_name
|
|
90
|
-
"Your disk is full - {{command:#{@tool_name}}} requires free space to operate"
|
|
91
|
-
else
|
|
92
|
-
"Your disk is full - free space is required to operate"
|
|
93
|
-
end
|
|
94
|
-
stderr_puts_message(message)
|
|
95
|
-
CLI::Kit::EXIT_FAILURE_BUT_NOT_BUG
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
def stderr_puts_message(message)
|
|
99
|
-
$stderr.puts(format_error_message(message))
|
|
100
|
-
rescue Errno::EPIPE
|
|
101
|
-
nil
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
def exception_reporter
|
|
105
|
-
if @exception_reporter_or_proc.respond_to?(:report)
|
|
106
|
-
@exception_reporter_or_proc
|
|
107
|
-
else
|
|
108
|
-
@exception_reporter_or_proc.call
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
def format_error_message(msg)
|
|
113
|
-
CLI::UI.fmt("{{red:#{msg}}}")
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
def print_error_message(e)
|
|
117
|
-
CLI::UI::Frame.open("Error", color: :red, timing: false) do
|
|
118
|
-
$stderr.puts(format_error_message(e.message))
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
end
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
require 'cli/kit'
|
|
2
|
-
require 'English'
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
|
|
5
|
-
module CLI
|
|
6
|
-
module Kit
|
|
7
|
-
class Executor
|
|
8
|
-
def initialize(log_file:)
|
|
9
|
-
FileUtils.mkpath(File.dirname(log_file))
|
|
10
|
-
@log_file = log_file
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def call(command, command_name, args)
|
|
14
|
-
with_traps do
|
|
15
|
-
with_logging do |id|
|
|
16
|
-
command.call(args, command_name)
|
|
17
|
-
rescue => e
|
|
18
|
-
begin
|
|
19
|
-
$stderr.puts "This command ran with ID: #{id}"
|
|
20
|
-
$stderr.puts "Please include this information in any issues/report along with relevant logs"
|
|
21
|
-
rescue SystemCallError
|
|
22
|
-
# Outputting to stderr is best-effort. Avoid raising another error when outputting debug info so that
|
|
23
|
-
# we can detect and log the original error, which may even be the source of this error.
|
|
24
|
-
nil
|
|
25
|
-
end
|
|
26
|
-
raise e
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
private
|
|
32
|
-
|
|
33
|
-
def with_logging(&block)
|
|
34
|
-
return yield unless @log_file
|
|
35
|
-
CLI::UI.log_output_to(@log_file) do
|
|
36
|
-
CLI::UI::StdoutRouter.with_id(on_streams: [CLI::UI::StdoutRouter.duplicate_output_to]) do |id|
|
|
37
|
-
block.call(id)
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def with_traps
|
|
43
|
-
twrap('QUIT', method(:quit_handler)) do
|
|
44
|
-
twrap('INFO', method(:info_handler)) do
|
|
45
|
-
yield
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def twrap(signal, handler)
|
|
51
|
-
return yield unless Signal.list.key?(signal)
|
|
52
|
-
|
|
53
|
-
begin
|
|
54
|
-
prev_handler = trap(signal, handler)
|
|
55
|
-
yield
|
|
56
|
-
ensure
|
|
57
|
-
trap(signal, prev_handler)
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def quit_handler(_sig)
|
|
62
|
-
z = caller
|
|
63
|
-
CLI::UI.raw do
|
|
64
|
-
$stderr.puts('SIGQUIT: quit')
|
|
65
|
-
$stderr.puts(z)
|
|
66
|
-
end
|
|
67
|
-
exit(CLI::Kit::EXIT_FAILURE_BUT_NOT_BUG)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def info_handler(_sig)
|
|
71
|
-
z = caller
|
|
72
|
-
CLI::UI.raw do
|
|
73
|
-
$stderr.puts('SIGINFO:')
|
|
74
|
-
$stderr.puts(z)
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
end
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
module CLI
|
|
2
|
-
module Kit
|
|
3
|
-
# INI is a language similar to JSON or YAML, but simplied
|
|
4
|
-
# The spec is here: https://en.wikipedia.org/wiki/INI_file
|
|
5
|
-
# This parser includes supports for 2 very basic uses
|
|
6
|
-
# - Sections
|
|
7
|
-
# - Key Value Pairs (within and outside of the sections)
|
|
8
|
-
#
|
|
9
|
-
# [global]
|
|
10
|
-
# key = val
|
|
11
|
-
#
|
|
12
|
-
# Nothing else is supported right now
|
|
13
|
-
# See the ini_test.rb file for more examples
|
|
14
|
-
#
|
|
15
|
-
class Ini
|
|
16
|
-
attr_accessor :ini
|
|
17
|
-
|
|
18
|
-
def initialize(path = nil, config: nil, default_section: nil, convert_types: true)
|
|
19
|
-
@config = if path && File.exist?(path)
|
|
20
|
-
File.readlines(path)
|
|
21
|
-
elsif config
|
|
22
|
-
config.lines
|
|
23
|
-
end
|
|
24
|
-
@ini = {}
|
|
25
|
-
@current_key = nil
|
|
26
|
-
@default_section = default_section
|
|
27
|
-
@convert_types = convert_types
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def parse
|
|
31
|
-
return @ini if @config.nil?
|
|
32
|
-
|
|
33
|
-
@config.each do |l|
|
|
34
|
-
l.strip!
|
|
35
|
-
|
|
36
|
-
# If section, then set current key, this will nest the setting
|
|
37
|
-
if section_designator?(l)
|
|
38
|
-
@current_key = l
|
|
39
|
-
|
|
40
|
-
# A new line will reset the current key
|
|
41
|
-
elsif l.strip.empty?
|
|
42
|
-
@current_key = nil
|
|
43
|
-
|
|
44
|
-
# Otherwise set the values
|
|
45
|
-
else
|
|
46
|
-
k, v = l.split('=', 2).map(&:strip)
|
|
47
|
-
set_val(k, v)
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
@ini
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def git_format
|
|
54
|
-
to_ini(@ini, git_format: true).flatten.join("\n")
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def to_s
|
|
58
|
-
to_ini(@ini).flatten.join("\n")
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
private
|
|
62
|
-
|
|
63
|
-
def to_ini(h, git_format: false)
|
|
64
|
-
optional_tab = git_format ? "\t" : ""
|
|
65
|
-
str = []
|
|
66
|
-
h.each do |k, v|
|
|
67
|
-
if section_designator?(k)
|
|
68
|
-
str << "" unless str.empty? || git_format
|
|
69
|
-
str << k
|
|
70
|
-
str << to_ini(v, git_format: git_format)
|
|
71
|
-
else
|
|
72
|
-
str << "#{optional_tab}#{k} = #{v}"
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
str
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def set_val(key, val)
|
|
79
|
-
return if key.nil? && val.nil?
|
|
80
|
-
|
|
81
|
-
current_key = @current_key || @default_section
|
|
82
|
-
if current_key
|
|
83
|
-
@ini[current_key] ||= {}
|
|
84
|
-
@ini[current_key][key] = typed_val(val)
|
|
85
|
-
else
|
|
86
|
-
@ini[key] = typed_val(val)
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
def typed_val(val)
|
|
91
|
-
return val.to_s unless @convert_types
|
|
92
|
-
return val.to_i if val =~ /^-?[0-9]+$/
|
|
93
|
-
return val.to_f if val =~ /^-?[0-9]+\.[0-9]*$/
|
|
94
|
-
val.to_s
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def section_designator?(k)
|
|
98
|
-
k.start_with?('[') && k.end_with?(']')
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2014-2016 Yuki Nishijima
|
|
2
|
-
|
|
3
|
-
# MIT License
|
|
4
|
-
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
# a copy of this software and associated documentation files (the
|
|
7
|
-
# "Software"), to deal in the Software without restriction, including
|
|
8
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
# the following conditions:
|
|
12
|
-
|
|
13
|
-
# The above copyright notice and this permission notice shall be
|
|
14
|
-
# included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
24
|
-
module CLI
|
|
25
|
-
module Kit
|
|
26
|
-
module Levenshtein
|
|
27
|
-
# This code is based directly on the Text gem implementation
|
|
28
|
-
# Copyright (c) 2006-2013 Paul Battley, Michael Neumann, Tim Fletcher.
|
|
29
|
-
#
|
|
30
|
-
# Returns a value representing the "cost" of transforming str1 into str2
|
|
31
|
-
def distance(str1, str2)
|
|
32
|
-
n = str1.length
|
|
33
|
-
m = str2.length
|
|
34
|
-
return m if n.zero?
|
|
35
|
-
return n if m.zero?
|
|
36
|
-
|
|
37
|
-
d = (0..m).to_a
|
|
38
|
-
x = nil
|
|
39
|
-
|
|
40
|
-
# to avoid duplicating an enumerable object, create it outside of the loop
|
|
41
|
-
str2_codepoints = str2.codepoints
|
|
42
|
-
|
|
43
|
-
str1.each_codepoint.with_index(1) do |char1, i|
|
|
44
|
-
j = 0
|
|
45
|
-
while j < m
|
|
46
|
-
cost = char1 == str2_codepoints[j] ? 0 : 1
|
|
47
|
-
x = min3(
|
|
48
|
-
d[j + 1] + 1, # insertion
|
|
49
|
-
i + 1, # deletion
|
|
50
|
-
d[j] + cost # substitution
|
|
51
|
-
)
|
|
52
|
-
d[j] = i
|
|
53
|
-
i = x
|
|
54
|
-
|
|
55
|
-
j += 1
|
|
56
|
-
end
|
|
57
|
-
d[m] = x
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
x
|
|
61
|
-
end
|
|
62
|
-
module_function :distance
|
|
63
|
-
|
|
64
|
-
private
|
|
65
|
-
|
|
66
|
-
# detects the minimum value out of three arguments. This method is
|
|
67
|
-
# faster than `[a, b, c].min` and puts less GC pressure.
|
|
68
|
-
# See https://github.com/yuki24/did_you_mean/pull/1 for a performance
|
|
69
|
-
# benchmark.
|
|
70
|
-
def min3(a, b, c)
|
|
71
|
-
if a < b && a < c
|
|
72
|
-
a
|
|
73
|
-
elsif b < c
|
|
74
|
-
b
|
|
75
|
-
else
|
|
76
|
-
c
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
module_function :min3
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
end
|