@shopify/cli 3.69.3 → 3.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/assets/cli-ruby/LICENSE → LICENSE} +0 -2
- package/dist/assets/hydrogen/starter/CHANGELOG.md +147 -0
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/root.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +6 -166
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -1
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +3 -1
- package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +24 -0
- package/dist/assets/hydrogen/starter/package.json +10 -10
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +11 -37
- package/dist/chunk-2PUMVRDO.js +131 -0
- package/dist/{chunk-WJCZFW37.js → chunk-335KXO4I.js} +12 -8
- package/dist/{chunk-MLSNFFTR.js → chunk-43YGIE7Y.js} +2 -2
- package/dist/chunk-47OJGAFT.js +28 -0
- package/dist/chunk-5OP2SA7G.js +3634 -0
- package/dist/{chunk-BZO3BX6M.js → chunk-5QQTRGJ7.js} +4 -4
- package/dist/{chunk-V5DOEDF4.js → chunk-7GNQ7YY4.js} +7 -7
- package/dist/{chunk-RTXVY32Y.js → chunk-AT4IG4GJ.js} +32 -216
- package/dist/{chunk-T65TTGOS.js → chunk-BMNDAI5O.js} +4 -4
- package/dist/{chunk-6XKWVDB6.js → chunk-CBBS4CV7.js} +3 -3
- package/dist/{chunk-27ILOE3X.js → chunk-CBD6UXLA.js} +8 -8
- package/dist/chunk-DVTWERMH.js +105 -0
- package/dist/{chunk-KNW6BL2Q.js → chunk-E2SYFYJU.js} +4 -4
- package/dist/{chunk-7D77RINN.js → chunk-FDJVVEGH.js} +17 -7
- package/dist/{chunk-65CKWSWQ.js → chunk-GDYKHT64.js} +2610 -6199
- package/dist/{chunk-NIFSDRC3.js → chunk-I3IIDOBX.js} +3 -3
- package/dist/{chunk-ZCYPTS6V.js → chunk-JLK5OMFF.js} +2 -2
- package/dist/{chunk-WHHRKJDE.js → chunk-KYBCPKPL.js} +3 -3
- package/dist/{chunk-AKHBZYBW.js → chunk-LN444KRM.js} +2 -2
- package/dist/chunk-MH5JSAVK.js +28 -0
- package/dist/{chunk-7GWY3FA4.js → chunk-MMQOVZDR.js} +6 -4
- package/dist/{chunk-RHX2I4MG.js → chunk-MQXHFQM3.js} +4 -4
- package/dist/{chunk-PO7KPJGR.js → chunk-MRDDDATQ.js} +3 -3
- package/dist/{chunk-UL6L7ZS3.js → chunk-N2DEYZD6.js} +3 -3
- package/dist/{chunk-WITDBDKW.js → chunk-N4X7XQWN.js} +2 -2
- package/dist/{chunk-AN5WQN4K.js → chunk-ND6AGPC6.js} +3 -3
- package/dist/{chunk-A3JXD7N7.js → chunk-NEOIQ6PN.js} +3 -3
- package/dist/{chunk-KGLQ4JD4.js → chunk-NH4U4X67.js} +3 -3
- package/dist/{chunk-AZKJLRVK.js → chunk-NYFXBTWK.js} +3 -3
- package/dist/{chunk-ERVB6ERU.js → chunk-OWLPHMUA.js} +3 -3
- package/dist/{chunk-Y54K4MPH.js → chunk-P6ABWRKD.js} +7 -7
- package/dist/{chunk-B6RI3XO4.js → chunk-PJKCWDDX.js} +117 -117
- package/dist/{chunk-2Q5IM74H.js → chunk-PKE54TAY.js} +5 -5
- package/dist/{chunk-JGXT3WUR.js → chunk-RUK73IAH.js} +2 -2
- package/dist/{chunk-IUHYP3QG.js → chunk-SYRHCENA.js} +2 -2
- package/dist/{chunk-XROTFVTO.js → chunk-TCTXUAZT.js} +3 -3
- package/dist/chunk-UOZCMFCN.js +160 -0
- package/dist/{chunk-VEEUPLAO.js → chunk-VFQMUAHB.js} +4 -4
- package/dist/{chunk-I66GPBMO.js → chunk-VHAXHYTL.js} +3 -3
- package/dist/{chunk-F2NOZSYG.js → chunk-VT3VJHZ7.js} +4 -4
- package/dist/{chunk-ACM5TZH6.js → chunk-WI6MEN7U.js} +2 -2
- package/dist/{chunk-OWPU7LGF.js → chunk-WN3FKMKB.js} +14 -14
- package/dist/{chunk-FRDQIYC3.js → chunk-X6F3DHKX.js} +2 -2
- package/dist/{chunk-P7JUHQKL.js → chunk-XEDHKQZA.js} +4 -3
- package/dist/{chunk-5O3Y6TSZ.js → chunk-XSMWYZDC.js} +86 -106
- package/dist/cli/commands/auth/logout.js +20 -18
- package/dist/cli/commands/auth/logout.test.js +25 -23
- package/dist/cli/commands/cache/clear.d.ts +6 -0
- package/dist/cli/commands/cache/clear.js +35 -0
- package/dist/cli/commands/debug/command-flags.js +19 -17
- package/dist/cli/commands/demo/catalog.js +20 -18
- package/dist/cli/commands/demo/generate-file.js +20 -18
- package/dist/cli/commands/demo/index.js +20 -18
- package/dist/cli/commands/demo/print-ai-prompt.js +20 -18
- package/dist/cli/commands/docs/generate.js +19 -17
- package/dist/cli/commands/docs/generate.test.js +19 -17
- package/dist/cli/commands/help.js +19 -17
- package/dist/cli/commands/kitchen-sink/async.js +20 -18
- package/dist/cli/commands/kitchen-sink/async.test.js +20 -18
- package/dist/cli/commands/kitchen-sink/index.js +22 -20
- package/dist/cli/commands/kitchen-sink/index.test.js +22 -20
- package/dist/cli/commands/kitchen-sink/prompts.js +20 -18
- package/dist/cli/commands/kitchen-sink/prompts.test.js +20 -18
- package/dist/cli/commands/kitchen-sink/static.js +20 -18
- package/dist/cli/commands/kitchen-sink/static.test.js +20 -18
- package/dist/cli/commands/notifications/generate.d.ts +6 -0
- package/dist/cli/commands/notifications/generate.js +36 -0
- package/dist/cli/commands/notifications/list.d.ts +6 -0
- package/dist/cli/commands/notifications/list.js +36 -0
- package/dist/cli/commands/search.js +20 -18
- package/dist/cli/commands/upgrade.js +20 -18
- package/dist/cli/commands/version.js +20 -18
- package/dist/cli/commands/version.test.js +20 -18
- package/dist/cli/services/commands/notifications.d.ts +2 -0
- package/dist/cli/services/commands/notifications.js +31 -0
- package/dist/cli/services/commands/search.js +9 -9
- package/dist/cli/services/commands/search.test.js +9 -9
- package/dist/cli/services/commands/version.js +10 -10
- package/dist/cli/services/commands/version.test.js +11 -11
- package/dist/cli/services/demo.js +9 -9
- package/dist/cli/services/demo.test.js +11 -11
- package/dist/cli/services/kitchen-sink/async.js +9 -9
- package/dist/cli/services/kitchen-sink/prompts.js +9 -9
- package/dist/cli/services/kitchen-sink/static.js +9 -9
- package/dist/cli/services/upgrade.js +10 -10
- package/dist/cli/services/upgrade.test.js +12 -12
- package/dist/{constants-T7JXE5K7.js → constants-QFFDI47A.js} +6 -4
- package/dist/{custom-oclif-loader-YBMJNE6U.js → custom-oclif-loader-IZLFCRGJ.js} +11 -11
- package/dist/data/filters.json +39 -16
- package/dist/data/latest.json +1 -1
- package/dist/data/objects.json +164 -6
- package/dist/data/shopify_system_translations.json +32 -3
- package/dist/{del-7ZS2Z64N.js → del-FEQWOMIX.js} +2 -2
- package/dist/{error-handler-A4P3264C.js → error-handler-DAI5HMQW.js} +17 -16
- package/dist/hooks/postrun.js +14 -13
- package/dist/hooks/prerun.js +14 -13
- package/dist/index.js +13542 -10915
- package/dist/{lib-JHUCJTHS.js → lib-JJXX7GH6.js} +5 -5
- package/dist/{local-ZKVS3PQJ.js → local-QD6GDUUE.js} +9 -9
- package/dist/{morph-QZYXTRWT.js → morph-FN23MJ2S.js} +10 -10
- package/dist/{node-UHHST6UJ.js → node-4XKDIIJ7.js} +23 -21
- package/dist/{node-package-manager-EU3ZOEFD.js → node-package-manager-IEZ6F5VN.js} +10 -10
- package/dist/{system-L7HP2PAP.js → system-KSIGUX64.js} +9 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-HXNDVEEG.js → ui-BUB4OWO7.js} +9 -9
- package/dist/{workerd-7CGH4YHE.js → workerd-DIIGDIHZ.js} +22 -20
- package/oclif.manifest.json +61 -104
- package/package.json +7 -7
- package/dist/assets/cli-ruby/.devcontainer.json +0 -5
- package/dist/assets/cli-ruby/.rubocop.yml +0 -102
- package/dist/assets/cli-ruby/.rubocop_todo.yml +0 -24
- package/dist/assets/cli-ruby/CHANGELOG.md +0 -634
- package/dist/assets/cli-ruby/CONTRIBUTING.md +0 -3
- package/dist/assets/cli-ruby/Codespace.dockerfile +0 -35
- package/dist/assets/cli-ruby/Gemfile +0 -32
- package/dist/assets/cli-ruby/README.md +0 -30
- package/dist/assets/cli-ruby/Rakefile +0 -167
- package/dist/assets/cli-ruby/SECURITY.md +0 -59
- package/dist/assets/cli-ruby/Tests.dockerfile +0 -35
- package/dist/assets/cli-ruby/assets/logo.png +0 -0
- package/dist/assets/cli-ruby/bin/console +0 -11
- package/dist/assets/cli-ruby/bin/load_shopify.rb +0 -22
- package/dist/assets/cli-ruby/bin/shopify +0 -67
- package/dist/assets/cli-ruby/bin/shopify.bat +0 -3
- package/dist/assets/cli-ruby/bin/update-deps +0 -97
- package/dist/assets/cli-ruby/dev.yml +0 -29
- package/dist/assets/cli-ruby/docs/README.md +0 -13
- package/dist/assets/cli-ruby/docs/contributors/testing.md +0 -27
- package/dist/assets/cli-ruby/docs/users/installation.md +0 -3
- package/dist/assets/cli-ruby/docs/users/migrate-from-themekit.md +0 -18
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-arm-macos-v0.3.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-linux-v0.3.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-macos-v0.3.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/hashes/javy-x86_64-windows-v0.3.0.gz.sha256 +0 -1
- package/dist/assets/cli-ruby/ext/javy/javy.rb +0 -204
- package/dist/assets/cli-ruby/ext/javy/version +0 -1
- package/dist/assets/cli-ruby/ext/shopify-extensions/extconf.rb +0 -21
- package/dist/assets/cli-ruby/ext/shopify-extensions/shopify_extensions.rb +0 -152
- package/dist/assets/cli-ruby/ext/shopify-extensions/version +0 -1
- package/dist/assets/cli-ruby/features/support/assertions.rb +0 -17
- package/dist/assets/cli-ruby/features/support/cli.rb +0 -7
- package/dist/assets/cli-ruby/features/support/process.rb +0 -27
- package/dist/assets/cli-ruby/features/support/requires.rb +0 -3
- package/dist/assets/cli-ruby/lib/docgen/class_template.md.erb +0 -81
- package/dist/assets/cli-ruby/lib/docgen/index_template.md.erb +0 -5
- package/dist/assets/cli-ruby/lib/docgen/markdown.rb +0 -101
- package/dist/assets/cli-ruby/lib/graphql/admin_introspection.graphql +0 -87
- package/dist/assets/cli-ruby/lib/graphql/all_organizations.graphql +0 -19
- package/dist/assets/cli-ruby/lib/graphql/all_orgs_with_apps.graphql +0 -30
- package/dist/assets/cli-ruby/lib/graphql/api_versions.graphql +0 -6
- package/dist/assets/cli-ruby/lib/graphql/convert_dev_to_test_store.graphql +0 -10
- package/dist/assets/cli-ruby/lib/graphql/create_app.graphql +0 -20
- package/dist/assets/cli-ruby/lib/graphql/create_customer.graphql +0 -9
- package/dist/assets/cli-ruby/lib/graphql/create_draft_order.graphql +0 -8
- package/dist/assets/cli-ruby/lib/graphql/create_product.graphql +0 -9
- package/dist/assets/cli-ruby/lib/graphql/extension_create.graphql +0 -37
- package/dist/assets/cli-ruby/lib/graphql/extension_update_draft.graphql +0 -19
- package/dist/assets/cli-ruby/lib/graphql/fetch_specifications.graphql +0 -14
- package/dist/assets/cli-ruby/lib/graphql/find_organization.graphql +0 -18
- package/dist/assets/cli-ruby/lib/graphql/find_organization_with_apps.graphql +0 -20
- package/dist/assets/cli-ruby/lib/graphql/get_app_by_api_key.graphql +0 -9
- package/dist/assets/cli-ruby/lib/graphql/get_app_urls.graphql +0 -6
- package/dist/assets/cli-ruby/lib/graphql/get_extension_registrations.graphql +0 -28
- package/dist/assets/cli-ruby/lib/graphql/get_variant_id.graphql +0 -16
- package/dist/assets/cli-ruby/lib/graphql/update_dashboard_urls.graphql +0 -8
- package/dist/assets/cli-ruby/lib/project_types/extension/cli.rb +0 -75
- package/dist/assets/cli-ruby/lib/project_types/extension/commands/extension_command.rb +0 -29
- package/dist/assets/cli-ruby/lib/project_types/extension/commands/serve.rb +0 -164
- package/dist/assets/cli-ruby/lib/project_types/extension/errors.rb +0 -9
- package/dist/assets/cli-ruby/lib/project_types/extension/extension_project.rb +0 -151
- package/dist/assets/cli-ruby/lib/project_types/extension/extension_project_keys.rb +0 -12
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo.rb +0 -50
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_config.rb +0 -59
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_dependencies.rb +0 -28
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_runtime.rb +0 -15
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_serve.rb +0 -115
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup.rb +0 -54
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup_step.rb +0 -31
- package/dist/assets/cli-ruby/lib/project_types/extension/features/argo_setup_steps.rb +0 -51
- package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/admin.rb +0 -29
- package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/base.rb +0 -19
- package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_post_purchase.rb +0 -23
- package/dist/assets/cli-ruby/lib/project_types/extension/features/runtimes/checkout_ui_extension.rb +0 -29
- package/dist/assets/cli-ruby/lib/project_types/extension/loaders/project.rb +0 -50
- package/dist/assets/cli-ruby/lib/project_types/extension/loaders/specification_handler.rb +0 -22
- package/dist/assets/cli-ruby/lib/project_types/extension/messages/message_loading.rb +0 -34
- package/dist/assets/cli-ruby/lib/project_types/extension/messages/messages.rb +0 -320
- package/dist/assets/cli-ruby/lib/project_types/extension/models/app.rb +0 -14
- package/dist/assets/cli-ruby/lib/project_types/extension/models/lazy_specification_handler.rb +0 -12
- package/dist/assets/cli-ruby/lib/project_types/extension/models/specification.rb +0 -41
- package/dist/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/default.rb +0 -145
- package/dist/assets/cli-ruby/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +0 -134
- package/dist/assets/cli-ruby/lib/project_types/extension/models/specifications.rb +0 -91
- package/dist/assets/cli-ruby/lib/project_types/extension/models/validation_error.rb +0 -17
- package/dist/assets/cli-ruby/lib/project_types/extension/models/version.rb +0 -15
- package/dist/assets/cli-ruby/lib/project_types/extension/tasks/configure_features.rb +0 -73
- package/dist/assets/cli-ruby/lib/project_types/extension/tasks/configure_options.rb +0 -21
- package/dist/assets/cli-ruby/lib/project_types/extension/tasks/converters/validation_error_converter.rb +0 -25
- package/dist/assets/cli-ruby/lib/project_types/extension/tasks/converters/version_converter.rb +0 -28
- package/dist/assets/cli-ruby/lib/project_types/extension/tasks/fetch_specifications.rb +0 -21
- package/dist/assets/cli-ruby/lib/project_types/node/cli.rb +0 -12
- package/dist/assets/cli-ruby/lib/project_types/node/forms/create.rb +0 -45
- package/dist/assets/cli-ruby/lib/project_types/node/messages/messages.rb +0 -33
- package/dist/assets/cli-ruby/lib/project_types/php/cli.rb +0 -16
- package/dist/assets/cli-ruby/lib/project_types/php/forms/create.rb +0 -44
- package/dist/assets/cli-ruby/lib/project_types/php/messages/messages.rb +0 -29
- package/dist/assets/cli-ruby/lib/project_types/rails/cli.rb +0 -15
- package/dist/assets/cli-ruby/lib/project_types/rails/forms/create.rb +0 -75
- package/dist/assets/cli-ruby/lib/project_types/rails/gem.rb +0 -110
- package/dist/assets/cli-ruby/lib/project_types/rails/messages/messages.rb +0 -101
- package/dist/assets/cli-ruby/lib/project_types/script/cli.rb +0 -27
- package/dist/assets/cli-ruby/lib/project_types/script/commands/connect.rb +0 -16
- package/dist/assets/cli-ruby/lib/project_types/script/commands/create.rb +0 -24
- package/dist/assets/cli-ruby/lib/project_types/script/commands/javy.rb +0 -24
- package/dist/assets/cli-ruby/lib/project_types/script/commands/push.rb +0 -26
- package/dist/assets/cli-ruby/lib/project_types/script/loaders/project.rb +0 -46
- package/dist/assets/cli-ruby/lib/project_types/script/loaders/specification_handler.rb +0 -22
- package/dist/assets/cli-ruby/lib/project_types/script/messages/messages.rb +0 -11
- package/dist/assets/cli-ruby/lib/project_types/theme/cli.rb +0 -33
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/common/root_helper.rb +0 -94
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/common/shop_helper.rb +0 -13
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/console.rb +0 -23
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/delete.rb +0 -70
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/init.rb +0 -46
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/list.rb +0 -33
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/open.rb +0 -73
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/package.rb +0 -73
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/publish.rb +0 -49
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/pull.rb +0 -118
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/push.rb +0 -160
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/serve.rb +0 -91
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/share.rb +0 -62
- package/dist/assets/cli-ruby/lib/project_types/theme/commands/token.rb +0 -22
- package/dist/assets/cli-ruby/lib/project_types/theme/conversions/base_glob.rb +0 -65
- package/dist/assets/cli-ruby/lib/project_types/theme/conversions/ignore_glob.rb +0 -15
- package/dist/assets/cli-ruby/lib/project_types/theme/conversions/include_glob.rb +0 -15
- package/dist/assets/cli-ruby/lib/project_types/theme/forms/confirm_store.rb +0 -15
- package/dist/assets/cli-ruby/lib/project_types/theme/forms/select.rb +0 -34
- package/dist/assets/cli-ruby/lib/project_types/theme/messages/messages.rb +0 -429
- package/dist/assets/cli-ruby/lib/project_types/theme/models/specification_handlers/theme.rb +0 -19
- package/dist/assets/cli-ruby/lib/project_types/theme/presenters/theme_presenter.rb +0 -48
- package/dist/assets/cli-ruby/lib/project_types/theme/presenters/themes_presenter.rb +0 -29
- package/dist/assets/cli-ruby/lib/project_types/theme/ui/sync_progress_bar.rb +0 -20
- package/dist/assets/cli-ruby/lib/rubygems_plugin.rb +0 -26
- package/dist/assets/cli-ruby/lib/shopify_cli/admin_api.rb +0 -160
- package/dist/assets/cli-ruby/lib/shopify_cli/api.rb +0 -130
- package/dist/assets/cli-ruby/lib/shopify_cli/command/project_command.rb +0 -31
- package/dist/assets/cli-ruby/lib/shopify_cli/command/sub_command.rb +0 -20
- package/dist/assets/cli-ruby/lib/shopify_cli/command.rb +0 -166
- package/dist/assets/cli-ruby/lib/shopify_cli/commands.rb +0 -21
- package/dist/assets/cli-ruby/lib/shopify_cli/constants.rb +0 -101
- package/dist/assets/cli-ruby/lib/shopify_cli/context.rb +0 -709
- package/dist/assets/cli-ruby/lib/shopify_cli/core/cli_version.rb +0 -20
- package/dist/assets/cli-ruby/lib/shopify_cli/core/entry_point.rb +0 -64
- package/dist/assets/cli-ruby/lib/shopify_cli/core/executor.rb +0 -23
- package/dist/assets/cli-ruby/lib/shopify_cli/core/finalize.rb +0 -13
- package/dist/assets/cli-ruby/lib/shopify_cli/core/monorail.rb +0 -122
- package/dist/assets/cli-ruby/lib/shopify_cli/core.rb +0 -8
- package/dist/assets/cli-ruby/lib/shopify_cli/db.rb +0 -114
- package/dist/assets/cli-ruby/lib/shopify_cli/environment.rb +0 -217
- package/dist/assets/cli-ruby/lib/shopify_cli/exception_reporter.rb +0 -80
- package/dist/assets/cli-ruby/lib/shopify_cli/feature.rb +0 -95
- package/dist/assets/cli-ruby/lib/shopify_cli/file_system_listener.rb +0 -30
- package/dist/assets/cli-ruby/lib/shopify_cli/form.rb +0 -42
- package/dist/assets/cli-ruby/lib/shopify_cli/git.rb +0 -320
- package/dist/assets/cli-ruby/lib/shopify_cli/github/issue_url_generator.rb +0 -30
- package/dist/assets/cli-ruby/lib/shopify_cli/github.rb +0 -5
- package/dist/assets/cli-ruby/lib/shopify_cli/helpers/haikunator.rb +0 -92
- package/dist/assets/cli-ruby/lib/shopify_cli/helpers.rb +0 -5
- package/dist/assets/cli-ruby/lib/shopify_cli/http_request.rb +0 -43
- package/dist/assets/cli-ruby/lib/shopify_cli/identity_auth/env_auth_token.rb +0 -34
- package/dist/assets/cli-ruby/lib/shopify_cli/identity_auth.rb +0 -332
- package/dist/assets/cli-ruby/lib/shopify_cli/js_system.rb +0 -115
- package/dist/assets/cli-ruby/lib/shopify_cli/lazy_delegator.rb +0 -55
- package/dist/assets/cli-ruby/lib/shopify_cli/messages/messages.rb +0 -863
- package/dist/assets/cli-ruby/lib/shopify_cli/method_object.rb +0 -123
- package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migration.rb +0 -27
- package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +0 -13
- package/dist/assets/cli-ruby/lib/shopify_cli/migrator/migrations/1633691650_merge_reporting_configuration.rb +0 -41
- package/dist/assets/cli-ruby/lib/shopify_cli/migrator.rb +0 -46
- package/dist/assets/cli-ruby/lib/shopify_cli/options.rb +0 -40
- package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions/job.rb +0 -36
- package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/app_extensions.rb +0 -46
- package/dist/assets/cli-ruby/lib/shopify_cli/partners_api/organizations.rb +0 -45
- package/dist/assets/cli-ruby/lib/shopify_cli/partners_api.rb +0 -91
- package/dist/assets/cli-ruby/lib/shopify_cli/project.rb +0 -199
- package/dist/assets/cli-ruby/lib/shopify_cli/project_type.rb +0 -66
- package/dist/assets/cli-ruby/lib/shopify_cli/reporting_configuration_controller.rb +0 -29
- package/dist/assets/cli-ruby/lib/shopify_cli/resolve_constant.rb +0 -25
- package/dist/assets/cli-ruby/lib/shopify_cli/resources/env_file.rb +0 -108
- package/dist/assets/cli-ruby/lib/shopify_cli/resources.rb +0 -5
- package/dist/assets/cli-ruby/lib/shopify_cli/result.rb +0 -448
- package/dist/assets/cli-ruby/lib/shopify_cli/shopifolk.rb +0 -82
- package/dist/assets/cli-ruby/lib/shopify_cli/task.rb +0 -20
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/confirm_store.rb +0 -18
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/create_api_client.rb +0 -40
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_authenticated.rb +0 -19
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_dev_store.rb +0 -41
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_env.rb +0 -90
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_git_dependency.rb +0 -14
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_loopback_url.rb +0 -20
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/ensure_project_type.rb +0 -14
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/select_org_and_shop.rb +0 -81
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks/update_dashboard_urls.rb +0 -57
- package/dist/assets/cli-ruby/lib/shopify_cli/tasks.rb +0 -44
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/backoff_helper.rb +0 -47
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/cdn_fonts.rb +0 -82
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/certificate_manager.rb +0 -79
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/errors.rb +0 -9
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/header_hash.rb +0 -98
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hooks/file_change_hook.rb +0 -77
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_deleter.rb +0 -62
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_reloader.rb +0 -63
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot-reload-no-script.html +0 -27
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/hot_reload.js +0 -48
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/sse_client.js +0 -43
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme.js +0 -114
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/resources/theme_extension.js +0 -121
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/script_injector.rb +0 -57
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload/sections_index.rb +0 -50
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/hot_reload.rb +0 -75
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/local_assets.rb +0 -101
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +0 -313
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy_param_builder.rb +0 -84
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/reload_mode.rb +0 -34
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb +0 -35
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/remote_watcher.rb +0 -44
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/sse.rb +0 -75
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/watcher.rb +0 -64
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/web_server.rb +0 -140
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server.rb +0 -332
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/development_theme.rb +0 -101
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/app_extension.rb +0 -40
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hooks/file_change_hook.rb +0 -76
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload/script_injector.rb +0 -30
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/hot_reload.rb +0 -13
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/local_assets.rb +0 -31
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/proxy_param_builder.rb +0 -94
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server/watcher.rb +0 -49
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/dev_server.rb +0 -175
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/host_theme.rb +0 -109
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ignore_helper.rb +0 -35
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/extension_serve_job.rb +0 -120
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer/operation.rb +0 -25
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/syncer.rb +0 -100
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_progress_bar.rb +0 -35
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/extension/ui/host_theme_raw_progress_bar.rb +0 -40
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/file.rb +0 -133
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/filter/path_matcher.rb +0 -38
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/ignore_filter.rb +0 -112
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/ignore_helper.rb +0 -37
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/include_filter.rb +0 -67
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/mime_type.rb +0 -34
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/notifier.rb +0 -52
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/api.rb +0 -109
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_dev_server.rb +0 -93
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_middleware.rb +0 -97
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/remote_evaluator.rb +0 -166
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/success.html +0 -78
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/resources/template.liquid +0 -15
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl/snippet.rb +0 -81
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/repl.rb +0 -88
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/root.rb +0 -62
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/checksums.rb +0 -66
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/downloader.rb +0 -63
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/error_reporter.rb +0 -45
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/merger.rb +0 -53
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/operation.rb +0 -49
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/standard_reporter.rb +0 -32
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/unsupported_script_warning.rb +0 -90
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk.rb +0 -133
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_item.rb +0 -64
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_job.rb +0 -139
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/bulk_request.rb +0 -30
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb +0 -41
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all_form.rb +0 -37
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb +0 -64
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_delete_strategy.rb +0 -29
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/forms/select_update_strategy.rb +0 -30
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_delete_handler.rb +0 -49
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader/json_update_handler.rb +0 -71
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer/uploader.rb +0 -231
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb +0 -391
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme.rb +0 -212
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme_access_api.rb +0 -89
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/theme_admin_api.rb +0 -101
- package/dist/assets/cli-ruby/lib/shopify_cli/thread_pool/job.rb +0 -35
- package/dist/assets/cli-ruby/lib/shopify_cli/thread_pool.rb +0 -49
- package/dist/assets/cli-ruby/lib/shopify_cli/transform_data_structure.rb +0 -87
- package/dist/assets/cli-ruby/lib/shopify_cli/utilities.rb +0 -21
- package/dist/assets/cli-ruby/lib/shopify_cli/version.rb +0 -3
- package/dist/assets/cli-ruby/lib/shopify_cli.rb +0 -182
- package/dist/assets/cli-ruby/shipit.rubygems.yml +0 -3
- package/dist/assets/cli-ruby/shopify-cli.gemspec +0 -46
- package/dist/assets/cli-ruby/shopify-dev +0 -16
- package/dist/assets/cli-ruby/test/minitest_ext.rb +0 -115
- package/dist/assets/cli-ruby/test/project_types/extension/extension_test_helpers.rb +0 -70
- package/dist/assets/cli-ruby/test/shopify-cli/migrator/migrations/migration_helper.rb +0 -20
- package/dist/assets/cli-ruby/test/test_helpers.rb +0 -16
- package/dist/assets/cli-ruby/utilities/constants.rb +0 -7
- package/dist/assets/cli-ruby/utilities/docker/container.rb +0 -104
- package/dist/assets/cli-ruby/utilities/docker.rb +0 -89
- package/dist/assets/cli-ruby/utilities/utilities.rb +0 -6
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/REVISION +0 -1
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +0 -21
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +0 -49
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +0 -94
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/config.rb +0 -133
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +0 -123
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/executor.rb +0 -79
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ini.rb +0 -102
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +0 -82
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/logger.rb +0 -82
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +0 -60
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/ruby_backports/enumerable.rb +0 -6
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +0 -244
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/support.rb +0 -9
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/system.rb +0 -243
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/util.rb +0 -193
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit/version.rb +0 -5
- package/dist/assets/cli-ruby/vendor/deps/cli-kit/lib/cli/kit.rb +0 -60
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/REVISION +0 -1
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +0 -157
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/color.rb +0 -84
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +0 -193
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +0 -98
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +0 -166
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +0 -139
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +0 -120
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/frame.rb +0 -269
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +0 -84
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/os.rb +0 -73
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/printer.rb +0 -59
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress.rb +0 -90
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/progress_plain.rb +0 -50
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +0 -484
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +0 -29
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +0 -282
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +0 -40
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +0 -263
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +0 -66
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +0 -232
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +0 -46
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +0 -102
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/version.rb +0 -5
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +0 -27
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +0 -61
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +0 -77
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +0 -56
- package/dist/assets/cli-ruby/vendor/deps/cli-ui/lib/cli/ui.rb +0 -234
- package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/LICENSE +0 -22
- package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/README.md +0 -67
- package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/Rakefile +0 -54
- package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/lib/ruby2_keywords.rb +0 -57
- package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/ruby2_keywords.gemspec +0 -18
- package/dist/assets/cli-ruby/vendor/deps/ruby2_keywords/test/test_keyword.rb +0 -41
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/REVISION +0 -1
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/errors.rb +0 -114
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property.rb +0 -168
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/property_collection.rb +0 -83
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations/ancestor.rb +0 -27
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/validations.rb +0 -8
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties/version.rb +0 -3
- package/dist/assets/cli-ruby/vendor/deps/smart_properties/lib/smart_properties.rb +0 -174
- package/dist/assets/cli-ruby/vendor/deps/webrick/Gemfile +0 -3
- package/dist/assets/cli-ruby/vendor/deps/webrick/LICENSE.txt +0 -22
- package/dist/assets/cli-ruby/vendor/deps/webrick/README.md +0 -61
- package/dist/assets/cli-ruby/vendor/deps/webrick/Rakefile +0 -10
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/accesslog.rb +0 -157
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cgi.rb +0 -313
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/compat.rb +0 -36
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/config.rb +0 -158
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/cookie.rb +0 -172
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/htmlutils.rb +0 -30
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +0 -117
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +0 -116
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +0 -395
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +0 -132
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +0 -97
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +0 -158
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +0 -53
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpauth.rb +0 -96
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpproxy.rb +0 -354
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httprequest.rb +0 -636
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpresponse.rb +0 -564
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/https.rb +0 -152
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpserver.rb +0 -294
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +0 -152
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +0 -47
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +0 -126
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +0 -88
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +0 -552
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +0 -47
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpservlet.rb +0 -23
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpstatus.rb +0 -194
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httputils.rb +0 -512
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/httpversion.rb +0 -76
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/log.rb +0 -156
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/server.rb +0 -381
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/ssl.rb +0 -215
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/utils.rb +0 -265
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick/version.rb +0 -18
- package/dist/assets/cli-ruby/vendor/deps/webrick/lib/webrick.rb +0 -232
- package/dist/assets/cli-ruby/vendor/deps/webrick/webrick.gemspec +0 -74
- package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands/help.rb +0 -20
- package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands/new.rb +0 -21
- package/dist/assets/cli-ruby/vendor/gen/lib/gen/commands.rb +0 -18
- package/dist/assets/cli-ruby/vendor/gen/lib/gen/entry_point.rb +0 -10
- package/dist/assets/cli-ruby/vendor/gen/lib/gen/generator.rb +0 -165
- package/dist/assets/cli-ruby/vendor/gen/lib/gen.rb +0 -39
- package/dist/assets/cli-ruby/vendor/gen/template/Gemfile +0 -10
- package/dist/assets/cli-ruby/vendor/gen/template/README.md +0 -1
- package/dist/assets/cli-ruby/vendor/gen/template/bin/testunit +0 -23
- package/dist/assets/cli-ruby/vendor/gen/template/bin/update-deps +0 -97
- package/dist/assets/cli-ruby/vendor/gen/template/dev-gems.yml +0 -3
- package/dist/assets/cli-ruby/vendor/gen/template/dev-vendor.yml +0 -4
- package/dist/assets/cli-ruby/vendor/gen/template/exe/__app__-gems +0 -17
- package/dist/assets/cli-ruby/vendor/gen/template/exe/__app__-vendor +0 -18
- package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/example.rb +0 -19
- package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands/help.rb +0 -21
- package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/commands.rb +0 -18
- package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__/entry_point.rb +0 -10
- package/dist/assets/cli-ruby/vendor/gen/template/lib/__app__.rb +0 -33
- package/dist/assets/cli-ruby/vendor/gen/template/test/example_test.rb +0 -17
- package/dist/assets/cli-ruby/vendor/gen/template/test/test_helper.rb +0 -22
- package/dist/assets/cli-ruby/vendor/lib/semantic/LICENSE +0 -20
- package/dist/assets/cli-ruby/vendor/lib/semantic/semantic.rb +0 -4
- package/dist/assets/cli-ruby/vendor/lib/semantic/version.rb +0 -179
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
module CLI
|
|
2
|
-
module Kit
|
|
3
|
-
module Util
|
|
4
|
-
class << self
|
|
5
|
-
def snake_case(camel_case, seperator = "_")
|
|
6
|
-
camel_case.to_s # MyCoolThing::MyAPIModule
|
|
7
|
-
.gsub(/::/, '/') # MyCoolThing/MyAPIModule
|
|
8
|
-
.gsub(/([A-Z]+)([A-Z][a-z])/, "\\1#{seperator}\\2") # MyCoolThing::MyAPI_Module
|
|
9
|
-
.gsub(/([a-z\d])([A-Z])/, "\\1#{seperator}\\2") # My_Cool_Thing::My_API_Module
|
|
10
|
-
.downcase # my_cool_thing/my_api_module
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def dash_case(camel_case)
|
|
14
|
-
snake_case(camel_case, '-')
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# The following methods is taken from activesupport
|
|
18
|
-
# All credit for this method goes to the original authors.
|
|
19
|
-
# https://github.com/rails/rails/blob/d66e7835bea9505f7003e5038aa19b6ea95ceea1/activesupport/lib/active_support/core_ext/string/strip.rb
|
|
20
|
-
#
|
|
21
|
-
# Copyright (c) 2005-2018 David Heinemeier Hansson
|
|
22
|
-
#
|
|
23
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
|
24
|
-
# a copy of this software and associated documentation files (the
|
|
25
|
-
# "Software"), to deal in the Software without restriction, including
|
|
26
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
|
27
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
28
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
|
29
|
-
# the following conditions:
|
|
30
|
-
#
|
|
31
|
-
# The above copyright notice and this permission notice shall be
|
|
32
|
-
# included in all copies or substantial portions of the Software.
|
|
33
|
-
#
|
|
34
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
35
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
36
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
37
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
38
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
39
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
40
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
41
|
-
#
|
|
42
|
-
# Strips indentation by removing the amount of leading whitespace in the least indented
|
|
43
|
-
# non-empty line in the whole string
|
|
44
|
-
#
|
|
45
|
-
def strip_heredoc(str)
|
|
46
|
-
str.gsub(/^#{str.scan(/^[ \t]*(?=\S)/).min}/, "".freeze)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# Joins an array with commas and "and", using the Oxford comma.
|
|
50
|
-
def english_join(array)
|
|
51
|
-
return "" if array.nil?
|
|
52
|
-
return array.join(" and ") if array.length < 3
|
|
53
|
-
|
|
54
|
-
"#{array[0..-2].join(', ')}, and #{array[-1]}"
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# Execute a block within the context of a variable enviroment
|
|
58
|
-
#
|
|
59
|
-
def with_environment(environment, value)
|
|
60
|
-
return yield unless environment
|
|
61
|
-
|
|
62
|
-
old_env = ENV[environment]
|
|
63
|
-
begin
|
|
64
|
-
ENV[environment] = value
|
|
65
|
-
yield
|
|
66
|
-
ensure
|
|
67
|
-
old_env ? ENV[environment] = old_env : ENV.delete(environment)
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Converts an integer representing bytes into a human readable format
|
|
72
|
-
#
|
|
73
|
-
def to_filesize(bytes, precision: 2, space: false)
|
|
74
|
-
to_si_scale(bytes, 'B', precision: precision, space: space, factor: 1024)
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# Converts a number to a human readable format on the SI scale
|
|
78
|
-
#
|
|
79
|
-
def to_si_scale(number, unit = '', factor: 1000, precision: 2, space: false)
|
|
80
|
-
raise ArgumentError, "factor should only be 1000 or 1024" unless [1000, 1024].include?(factor)
|
|
81
|
-
|
|
82
|
-
small_scale = %w(m µ n p f a z y)
|
|
83
|
-
big_scale = %w(k M G T P E Z Y)
|
|
84
|
-
negative = number < 0
|
|
85
|
-
number = number.abs.to_f
|
|
86
|
-
|
|
87
|
-
if number == 0 || number.between?(1, factor)
|
|
88
|
-
prefix = ""
|
|
89
|
-
scale = 0
|
|
90
|
-
else
|
|
91
|
-
scale = Math.log(number, factor).floor
|
|
92
|
-
if number < 1
|
|
93
|
-
index = [-scale - 1, small_scale.length].min
|
|
94
|
-
scale = -(index + 1)
|
|
95
|
-
prefix = small_scale[index]
|
|
96
|
-
else
|
|
97
|
-
index = [scale - 1, big_scale.length].min
|
|
98
|
-
scale = index + 1
|
|
99
|
-
prefix = big_scale[index]
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
divider = (factor**scale)
|
|
104
|
-
fnum = (number / divider).round(precision)
|
|
105
|
-
|
|
106
|
-
# Trim useless decimal
|
|
107
|
-
fnum = fnum.to_i if (fnum.to_i.to_f * divider) == number
|
|
108
|
-
|
|
109
|
-
fnum = -fnum if negative
|
|
110
|
-
prefix = " " + prefix if space
|
|
111
|
-
|
|
112
|
-
"#{fnum}#{prefix}#{unit}"
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
# Dir.chdir, when invoked in block form, complains when we call chdir
|
|
116
|
-
# again recursively. There's no apparent good reason for this, so we
|
|
117
|
-
# simply implement our own block form of Dir.chdir here.
|
|
118
|
-
def with_dir(dir)
|
|
119
|
-
prev = Dir.pwd
|
|
120
|
-
Dir.chdir(dir)
|
|
121
|
-
yield
|
|
122
|
-
ensure
|
|
123
|
-
Dir.chdir(prev)
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
def with_tmp_dir
|
|
127
|
-
require 'fileutils'
|
|
128
|
-
dir = Dir.mktmpdir
|
|
129
|
-
with_dir(dir) do
|
|
130
|
-
yield(dir)
|
|
131
|
-
end
|
|
132
|
-
ensure
|
|
133
|
-
FileUtils.remove_entry(dir)
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
# Standard way of checking for CI / Tests
|
|
137
|
-
def testing?
|
|
138
|
-
ci? || ENV['TEST']
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# Set only in IntegrationTest#session; indicates that the process was
|
|
142
|
-
# called by `session.execute` from an IntegrationTest subclass.
|
|
143
|
-
def integration_test_session?
|
|
144
|
-
ENV['INTEGRATION_TEST_SESSION']
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
# Standard way of checking for CI
|
|
148
|
-
def ci?
|
|
149
|
-
ENV['CI']
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
# Must call retry_after on the result in order to execute the block
|
|
153
|
-
#
|
|
154
|
-
# Example usage:
|
|
155
|
-
#
|
|
156
|
-
# CLI::Kit::Util.begin do
|
|
157
|
-
# might_raise_if_costly_prep_not_done()
|
|
158
|
-
# end.retry_after(ExpectedError) do
|
|
159
|
-
# costly_prep()
|
|
160
|
-
# end
|
|
161
|
-
def begin(&block_that_might_raise)
|
|
162
|
-
Retrier.new(block_that_might_raise)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
class Retrier
|
|
167
|
-
def initialize(block_that_might_raise)
|
|
168
|
-
@block_that_might_raise = block_that_might_raise
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
def retry_after(exception = StandardError, retries: 1, only: nil, &before_retry)
|
|
172
|
-
@block_that_might_raise.call
|
|
173
|
-
rescue exception => e
|
|
174
|
-
should_retry = only ? only.call : true
|
|
175
|
-
|
|
176
|
-
raise unless should_retry
|
|
177
|
-
|
|
178
|
-
raise if (retries -= 1) < 0
|
|
179
|
-
if before_retry
|
|
180
|
-
if before_retry.arity == 0
|
|
181
|
-
yield
|
|
182
|
-
else
|
|
183
|
-
yield e
|
|
184
|
-
end
|
|
185
|
-
end
|
|
186
|
-
retry
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
private_constant :Retrier
|
|
191
|
-
end
|
|
192
|
-
end
|
|
193
|
-
end
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
require 'cli/ui'
|
|
2
|
-
require 'cli/kit/ruby_backports/enumerable'
|
|
3
|
-
|
|
4
|
-
module CLI
|
|
5
|
-
module Kit
|
|
6
|
-
autoload :Autocall, 'cli/kit/autocall'
|
|
7
|
-
autoload :BaseCommand, 'cli/kit/base_command'
|
|
8
|
-
autoload :CommandRegistry, 'cli/kit/command_registry'
|
|
9
|
-
autoload :Config, 'cli/kit/config'
|
|
10
|
-
autoload :ErrorHandler, 'cli/kit/error_handler'
|
|
11
|
-
autoload :Executor, 'cli/kit/executor'
|
|
12
|
-
autoload :Ini, 'cli/kit/ini'
|
|
13
|
-
autoload :Levenshtein, 'cli/kit/levenshtein'
|
|
14
|
-
autoload :Logger, 'cli/kit/logger'
|
|
15
|
-
autoload :Resolver, 'cli/kit/resolver'
|
|
16
|
-
autoload :Support, 'cli/kit/support'
|
|
17
|
-
autoload :System, 'cli/kit/system'
|
|
18
|
-
autoload :Util, 'cli/kit/util'
|
|
19
|
-
|
|
20
|
-
EXIT_FAILURE_BUT_NOT_BUG = 30
|
|
21
|
-
EXIT_BUG = 1
|
|
22
|
-
EXIT_SUCCESS = 0
|
|
23
|
-
|
|
24
|
-
# Abort, Bug, AbortSilent, and BugSilent are four ways of immediately bailing
|
|
25
|
-
# on command-line execution when an unrecoverable error occurs.
|
|
26
|
-
#
|
|
27
|
-
# Note that these don't inherit from StandardError, and so are not caught by
|
|
28
|
-
# a bare `rescue => e`.
|
|
29
|
-
#
|
|
30
|
-
# * Abort prints its message in red and exits 1;
|
|
31
|
-
# * Bug additionally submits the exception to Bugsnag;
|
|
32
|
-
# * AbortSilent and BugSilent do the same as above, but do not print
|
|
33
|
-
# messages before exiting.
|
|
34
|
-
#
|
|
35
|
-
# Treat these like panic() in Go:
|
|
36
|
-
# * Don't rescue them. Use a different Exception class if you plan to recover;
|
|
37
|
-
# * Provide a useful message, since it will be presented in brief to the
|
|
38
|
-
# user, and will be useful for debugging.
|
|
39
|
-
# * Avoid using it if it does actually make sense to recover from an error.
|
|
40
|
-
#
|
|
41
|
-
# Additionally:
|
|
42
|
-
# * Do not subclass these.
|
|
43
|
-
# * Only use AbortSilent or BugSilent if you prefer to print a more
|
|
44
|
-
# contextualized error than Abort or Bug would present to the user.
|
|
45
|
-
# * In general, don't attach a message to AbortSilent or BugSilent.
|
|
46
|
-
# * Never raise GenericAbort directly.
|
|
47
|
-
# * Think carefully about whether Abort or Bug is more appropriate. Is this
|
|
48
|
-
# a bug in the tool? Or is it just user error, transient network
|
|
49
|
-
# failure, etc.?
|
|
50
|
-
# * One case where it's ok to rescue (cli-kit internals or tests aside):
|
|
51
|
-
# 1. rescue Abort or Bug
|
|
52
|
-
# 2. Print a contextualized error message
|
|
53
|
-
# 3. Re-raise AbortSilent or BugSilent respectively.
|
|
54
|
-
GenericAbort = Class.new(Exception) # rubocop:disable Lint/InheritException
|
|
55
|
-
Abort = Class.new(GenericAbort)
|
|
56
|
-
Bug = Class.new(GenericAbort)
|
|
57
|
-
BugSilent = Class.new(GenericAbort)
|
|
58
|
-
AbortSilent = Class.new(GenericAbort)
|
|
59
|
-
end
|
|
60
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
168ce68b31d8436b2b222d6f063e5c7225785bd4
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
require 'cli/ui'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module UI
|
|
5
|
-
module ANSI
|
|
6
|
-
ESC = "\x1b"
|
|
7
|
-
|
|
8
|
-
# ANSI escape sequences (like \x1b[31m) have zero width.
|
|
9
|
-
# when calculating the padding width, we must exclude them.
|
|
10
|
-
# This also implements a basic version of utf8 character width calculation like
|
|
11
|
-
# we could get for real from something like utf8proc.
|
|
12
|
-
#
|
|
13
|
-
def self.printing_width(str)
|
|
14
|
-
zwj = false
|
|
15
|
-
strip_codes(str).codepoints.reduce(0) do |acc, cp|
|
|
16
|
-
if zwj
|
|
17
|
-
zwj = false
|
|
18
|
-
next acc
|
|
19
|
-
end
|
|
20
|
-
case cp
|
|
21
|
-
when 0x200d # zero-width joiner
|
|
22
|
-
zwj = true
|
|
23
|
-
acc
|
|
24
|
-
when "\n"
|
|
25
|
-
acc
|
|
26
|
-
else
|
|
27
|
-
acc + 1
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Strips ANSI codes from a str
|
|
33
|
-
#
|
|
34
|
-
# ==== Attributes
|
|
35
|
-
#
|
|
36
|
-
# - +str+ - The string from which to strip codes
|
|
37
|
-
#
|
|
38
|
-
def self.strip_codes(str)
|
|
39
|
-
str.gsub(/\x1b\[[\d;]+[A-z]|\r/, '')
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Returns an ANSI control sequence
|
|
43
|
-
#
|
|
44
|
-
# ==== Attributes
|
|
45
|
-
#
|
|
46
|
-
# - +args+ - Argument to pass to the ANSI control sequence
|
|
47
|
-
# - +cmd+ - ANSI control sequence Command
|
|
48
|
-
#
|
|
49
|
-
def self.control(args, cmd)
|
|
50
|
-
ESC + "[" + args + cmd
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# https://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
|
54
|
-
def self.sgr(params)
|
|
55
|
-
control(params.to_s, 'm')
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Cursor Movement
|
|
59
|
-
|
|
60
|
-
# Move the cursor up n lines
|
|
61
|
-
#
|
|
62
|
-
# ==== Attributes
|
|
63
|
-
#
|
|
64
|
-
# * +n+ - number of lines by which to move the cursor up
|
|
65
|
-
#
|
|
66
|
-
def self.cursor_up(n = 1)
|
|
67
|
-
return '' if n.zero?
|
|
68
|
-
control(n.to_s, 'A')
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Move the cursor down n lines
|
|
72
|
-
#
|
|
73
|
-
# ==== Attributes
|
|
74
|
-
#
|
|
75
|
-
# * +n+ - number of lines by which to move the cursor down
|
|
76
|
-
#
|
|
77
|
-
def self.cursor_down(n = 1)
|
|
78
|
-
return '' if n.zero?
|
|
79
|
-
control(n.to_s, 'B')
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
# Move the cursor forward n columns
|
|
83
|
-
#
|
|
84
|
-
# ==== Attributes
|
|
85
|
-
#
|
|
86
|
-
# * +n+ - number of columns by which to move the cursor forward
|
|
87
|
-
#
|
|
88
|
-
def self.cursor_forward(n = 1)
|
|
89
|
-
return '' if n.zero?
|
|
90
|
-
control(n.to_s, 'C')
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
# Move the cursor back n columns
|
|
94
|
-
#
|
|
95
|
-
# ==== Attributes
|
|
96
|
-
#
|
|
97
|
-
# * +n+ - number of columns by which to move the cursor back
|
|
98
|
-
#
|
|
99
|
-
def self.cursor_back(n = 1)
|
|
100
|
-
return '' if n.zero?
|
|
101
|
-
control(n.to_s, 'D')
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Move the cursor to a specific column
|
|
105
|
-
#
|
|
106
|
-
# ==== Attributes
|
|
107
|
-
#
|
|
108
|
-
# * +n+ - The column to move to
|
|
109
|
-
#
|
|
110
|
-
def self.cursor_horizontal_absolute(n = 1)
|
|
111
|
-
cmd = control(n.to_s, 'G')
|
|
112
|
-
cmd += control('1', 'D') if CLI::UI::OS.current.shift_cursor_on_line_reset?
|
|
113
|
-
cmd
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
# Show the cursor
|
|
117
|
-
#
|
|
118
|
-
def self.show_cursor
|
|
119
|
-
control('', "?25h")
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
# Hide the cursor
|
|
123
|
-
#
|
|
124
|
-
def self.hide_cursor
|
|
125
|
-
control('', "?25l")
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
# Save the cursor position
|
|
129
|
-
#
|
|
130
|
-
def self.cursor_save
|
|
131
|
-
control('', 's')
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
# Restore the saved cursor position
|
|
135
|
-
#
|
|
136
|
-
def self.cursor_restore
|
|
137
|
-
control('', 'u')
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# Move to the next line
|
|
141
|
-
#
|
|
142
|
-
def self.next_line
|
|
143
|
-
cursor_down + cursor_horizontal_absolute
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# Move to the previous line
|
|
147
|
-
#
|
|
148
|
-
def self.previous_line
|
|
149
|
-
cursor_up + cursor_horizontal_absolute
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def self.clear_to_end_of_line
|
|
153
|
-
control('', 'K')
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
end
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
require 'cli/ui'
|
|
2
|
-
|
|
3
|
-
module CLI
|
|
4
|
-
module UI
|
|
5
|
-
class Color
|
|
6
|
-
attr_reader :sgr, :name, :code
|
|
7
|
-
|
|
8
|
-
# Creates a new color mapping
|
|
9
|
-
# Signatures can be found here:
|
|
10
|
-
# https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
|
|
11
|
-
#
|
|
12
|
-
# ==== Attributes
|
|
13
|
-
#
|
|
14
|
-
# * +sgr+ - The color signature
|
|
15
|
-
# * +name+ - The name of the color
|
|
16
|
-
#
|
|
17
|
-
def initialize(sgr, name)
|
|
18
|
-
@sgr = sgr
|
|
19
|
-
@code = CLI::UI::ANSI.sgr(sgr)
|
|
20
|
-
@name = name
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
RED = new('31', :red)
|
|
24
|
-
GREEN = new('32', :green)
|
|
25
|
-
YELLOW = new('33', :yellow)
|
|
26
|
-
# default blue is low-contrast against black in some default terminal color scheme
|
|
27
|
-
BLUE = new('94', :blue) # 9x = high-intensity fg color x
|
|
28
|
-
MAGENTA = new('35', :magenta)
|
|
29
|
-
CYAN = new('36', :cyan)
|
|
30
|
-
RESET = new('0', :reset)
|
|
31
|
-
BOLD = new('1', :bold)
|
|
32
|
-
WHITE = new('97', :white)
|
|
33
|
-
|
|
34
|
-
# 240 is very dark gray; 255 is very light gray. 244 is somewhat dark.
|
|
35
|
-
GRAY = new('38;5;244', :gray)
|
|
36
|
-
|
|
37
|
-
MAP = {
|
|
38
|
-
red: RED,
|
|
39
|
-
green: GREEN,
|
|
40
|
-
yellow: YELLOW,
|
|
41
|
-
blue: BLUE,
|
|
42
|
-
magenta: MAGENTA,
|
|
43
|
-
cyan: CYAN,
|
|
44
|
-
reset: RESET,
|
|
45
|
-
bold: BOLD,
|
|
46
|
-
gray: GRAY,
|
|
47
|
-
}.freeze
|
|
48
|
-
|
|
49
|
-
class InvalidColorName < ArgumentError
|
|
50
|
-
def initialize(name)
|
|
51
|
-
super
|
|
52
|
-
@name = name
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def message
|
|
56
|
-
keys = Color.available.map(&:inspect).join(',')
|
|
57
|
-
"invalid color: #{@name.inspect} " \
|
|
58
|
-
"-- must be one of CLI::UI::Color.available (#{keys})"
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Looks up a color code by name
|
|
63
|
-
#
|
|
64
|
-
# ==== Raises
|
|
65
|
-
# Raises a InvalidColorName if the color is not available
|
|
66
|
-
# You likely need to add it to the +MAP+ or you made a typo
|
|
67
|
-
#
|
|
68
|
-
# ==== Returns
|
|
69
|
-
# Returns a color code
|
|
70
|
-
#
|
|
71
|
-
def self.lookup(name)
|
|
72
|
-
MAP.fetch(name)
|
|
73
|
-
rescue KeyError
|
|
74
|
-
raise InvalidColorName, name
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# All available colors by name
|
|
78
|
-
#
|
|
79
|
-
def self.available
|
|
80
|
-
MAP.keys
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require('cli/ui')
|
|
3
|
-
require('strscan')
|
|
4
|
-
|
|
5
|
-
module CLI
|
|
6
|
-
module UI
|
|
7
|
-
class Formatter
|
|
8
|
-
# Available mappings of formattings
|
|
9
|
-
# To use any of them, you can use {{<key>:<string>}}
|
|
10
|
-
# There are presentational (colours and formatters)
|
|
11
|
-
# and semantic (error, info, command) formatters available
|
|
12
|
-
#
|
|
13
|
-
SGR_MAP = {
|
|
14
|
-
# presentational
|
|
15
|
-
'red' => '31',
|
|
16
|
-
'green' => '32',
|
|
17
|
-
'yellow' => '33',
|
|
18
|
-
# default blue is low-contrast against black in some default terminal color scheme
|
|
19
|
-
'blue' => '94', # 9x = high-intensity fg color x
|
|
20
|
-
'magenta' => '35',
|
|
21
|
-
'cyan' => '36',
|
|
22
|
-
'gray' => '38;5;244',
|
|
23
|
-
'bold' => '1',
|
|
24
|
-
'italic' => '3',
|
|
25
|
-
'underline' => '4',
|
|
26
|
-
'reset' => '0',
|
|
27
|
-
|
|
28
|
-
# semantic
|
|
29
|
-
'error' => '31', # red
|
|
30
|
-
'success' => '32', # success
|
|
31
|
-
'warning' => '33', # yellow
|
|
32
|
-
'info' => '94', # bright blue
|
|
33
|
-
'command' => '36', # cyan
|
|
34
|
-
}.freeze
|
|
35
|
-
|
|
36
|
-
BEGIN_EXPR = '{{'
|
|
37
|
-
END_EXPR = '}}'
|
|
38
|
-
|
|
39
|
-
SCAN_WIDGET = %r[@widget/(?<handle>\w+):(?<args>.*?)}}]
|
|
40
|
-
SCAN_FUNCNAME = /\w+:/
|
|
41
|
-
SCAN_GLYPH = /.}}/
|
|
42
|
-
SCAN_BODY = %r{
|
|
43
|
-
.*?
|
|
44
|
-
(
|
|
45
|
-
#{BEGIN_EXPR} |
|
|
46
|
-
#{END_EXPR} |
|
|
47
|
-
\z
|
|
48
|
-
)
|
|
49
|
-
}mx
|
|
50
|
-
|
|
51
|
-
DISCARD_BRACES = 0..-3
|
|
52
|
-
|
|
53
|
-
LITERAL_BRACES = :__literal_braces__
|
|
54
|
-
|
|
55
|
-
class FormatError < StandardError
|
|
56
|
-
attr_accessor :input, :index
|
|
57
|
-
|
|
58
|
-
def initialize(message = nil, input = nil, index = nil)
|
|
59
|
-
super(message)
|
|
60
|
-
@input = input
|
|
61
|
-
@index = index
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# Initialize a formatter with text.
|
|
66
|
-
#
|
|
67
|
-
# ===== Attributes
|
|
68
|
-
#
|
|
69
|
-
# * +text+ - the text to format
|
|
70
|
-
#
|
|
71
|
-
def initialize(text)
|
|
72
|
-
@text = text
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# Format the text using a map.
|
|
76
|
-
#
|
|
77
|
-
# ===== Attributes
|
|
78
|
-
#
|
|
79
|
-
# * +sgr_map+ - the mapping of the formattings. Defaults to +SGR_MAP+
|
|
80
|
-
#
|
|
81
|
-
# ===== Options
|
|
82
|
-
#
|
|
83
|
-
# * +:enable_color+ - enable color output? Default is true unless output is redirected
|
|
84
|
-
#
|
|
85
|
-
def format(sgr_map = SGR_MAP, enable_color: CLI::UI.enable_color?)
|
|
86
|
-
@nodes = []
|
|
87
|
-
stack = parse_body(StringScanner.new(@text))
|
|
88
|
-
prev_fmt = nil
|
|
89
|
-
content = @nodes.each_with_object(+'') do |(text, fmt), str|
|
|
90
|
-
if prev_fmt != fmt && enable_color
|
|
91
|
-
text = apply_format(text, fmt, sgr_map)
|
|
92
|
-
end
|
|
93
|
-
str << text
|
|
94
|
-
prev_fmt = fmt
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
stack.reject! { |e| e == LITERAL_BRACES }
|
|
98
|
-
|
|
99
|
-
return content unless enable_color
|
|
100
|
-
return content if stack == prev_fmt
|
|
101
|
-
|
|
102
|
-
unless stack.empty? && (@nodes.size.zero? || @nodes.last[1].empty?)
|
|
103
|
-
content << apply_format('', stack, sgr_map)
|
|
104
|
-
end
|
|
105
|
-
content
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
private
|
|
109
|
-
|
|
110
|
-
def apply_format(text, fmt, sgr_map)
|
|
111
|
-
sgr = fmt.each_with_object(+'0') do |name, str|
|
|
112
|
-
next if name == LITERAL_BRACES
|
|
113
|
-
begin
|
|
114
|
-
str << ';' << sgr_map.fetch(name)
|
|
115
|
-
rescue KeyError
|
|
116
|
-
raise FormatError.new(
|
|
117
|
-
"invalid format specifier: #{name}",
|
|
118
|
-
@text,
|
|
119
|
-
-1
|
|
120
|
-
)
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
CLI::UI::ANSI.sgr(sgr) + text
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
def parse_expr(sc, stack)
|
|
127
|
-
if (match = sc.scan(SCAN_GLYPH))
|
|
128
|
-
glyph_handle = match[0]
|
|
129
|
-
begin
|
|
130
|
-
glyph = Glyph.lookup(glyph_handle)
|
|
131
|
-
emit(glyph.char, [glyph.color.name.to_s])
|
|
132
|
-
rescue Glyph::InvalidGlyphHandle
|
|
133
|
-
index = sc.pos - 2 # rewind past '}}'
|
|
134
|
-
raise FormatError.new(
|
|
135
|
-
"invalid glyph handle at index #{index}: '#{glyph_handle}'",
|
|
136
|
-
@text,
|
|
137
|
-
index
|
|
138
|
-
)
|
|
139
|
-
end
|
|
140
|
-
elsif (match = sc.scan(SCAN_WIDGET))
|
|
141
|
-
match_data = SCAN_WIDGET.match(match) # Regexp.last_match doesn't work here
|
|
142
|
-
widget_handle = match_data['handle']
|
|
143
|
-
begin
|
|
144
|
-
widget = Widgets.lookup(widget_handle)
|
|
145
|
-
emit(widget.call(match_data['args']), stack)
|
|
146
|
-
rescue Widgets::InvalidWidgetHandle
|
|
147
|
-
index = sc.pos - 2 # rewind past '}}'
|
|
148
|
-
raise(FormatError.new(
|
|
149
|
-
"invalid widget handle at index #{index}: '#{widget_handle}'",
|
|
150
|
-
@text, index,
|
|
151
|
-
))
|
|
152
|
-
end
|
|
153
|
-
elsif (match = sc.scan(SCAN_FUNCNAME))
|
|
154
|
-
funcname = match.chop
|
|
155
|
-
stack.push(funcname)
|
|
156
|
-
else
|
|
157
|
-
# We read a {{ but it's not apparently Formatter syntax.
|
|
158
|
-
# We could error, but it's nicer to just pass through as text.
|
|
159
|
-
# We do kind of assume that the text will probably have balanced
|
|
160
|
-
# pairs of {{ }} at least.
|
|
161
|
-
emit('{{', stack)
|
|
162
|
-
stack.push(LITERAL_BRACES)
|
|
163
|
-
end
|
|
164
|
-
parse_body(sc, stack)
|
|
165
|
-
stack
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
def parse_body(sc, stack = [])
|
|
169
|
-
match = sc.scan(SCAN_BODY)
|
|
170
|
-
if match&.end_with?(BEGIN_EXPR)
|
|
171
|
-
emit(match[DISCARD_BRACES], stack)
|
|
172
|
-
parse_expr(sc, stack)
|
|
173
|
-
elsif match&.end_with?(END_EXPR)
|
|
174
|
-
emit(match[DISCARD_BRACES], stack)
|
|
175
|
-
if stack.pop == LITERAL_BRACES
|
|
176
|
-
emit('}}', stack)
|
|
177
|
-
end
|
|
178
|
-
parse_body(sc, stack)
|
|
179
|
-
elsif match
|
|
180
|
-
emit(match, stack)
|
|
181
|
-
else
|
|
182
|
-
emit(sc.rest, stack)
|
|
183
|
-
end
|
|
184
|
-
stack
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
def emit(text, stack)
|
|
188
|
-
return if text.nil? || text.empty?
|
|
189
|
-
@nodes << [text, stack.reject { |n| n == LITERAL_BRACES }]
|
|
190
|
-
end
|
|
191
|
-
end
|
|
192
|
-
end
|
|
193
|
-
end
|