@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,448 +0,0 @@
|
|
|
1
|
-
module ShopifyCLI
|
|
2
|
-
##
|
|
3
|
-
# This module defines two containers for wrapping the result of an action. One
|
|
4
|
-
# for signifying the successful execution of an action and one for signifying
|
|
5
|
-
# a failure. Both containers implement the same API, which has been designed
|
|
6
|
-
# to simplify transforming a result through a series of steps and centralize
|
|
7
|
-
# the error handling in one place. The implementation is heavily inspired by a
|
|
8
|
-
# concept known as result monads in other languages. Consider the following
|
|
9
|
-
# example that uses lambda expressions as stand-ins for more complex method
|
|
10
|
-
# objects:
|
|
11
|
-
#
|
|
12
|
-
# require 'open-uri'
|
|
13
|
-
# Todo = Struct.new(:title, :completed)
|
|
14
|
-
#
|
|
15
|
-
# fetch_data = ->(url) { open(url) }
|
|
16
|
-
# parse_data = ->(json) { JSON.parse(json) }
|
|
17
|
-
# build_todo = ->(attrs) do
|
|
18
|
-
# Todo.new(attrs.fetch(:title), attrs.fetch(:completed))
|
|
19
|
-
# end
|
|
20
|
-
#
|
|
21
|
-
# Result.wrap(&fetch_data)
|
|
22
|
-
# .call("https://jsonplaceholder.typicode.com/todos/1")
|
|
23
|
-
# .then(&parse_data)
|
|
24
|
-
# .then(&build_todo)
|
|
25
|
-
# .map(&:title)
|
|
26
|
-
# .unwrap(nil) # => String | nil
|
|
27
|
-
#
|
|
28
|
-
# If everything goes well, this code returns the title of the to do that is
|
|
29
|
-
# being fetched from `https://jsonplaceholder.typicode.com/todos/1`. However,
|
|
30
|
-
# there are several possible failure scenarios:
|
|
31
|
-
#
|
|
32
|
-
# * fetching the data could fail due to a network error,
|
|
33
|
-
# * the data returned from the server might not be valid JSON, or
|
|
34
|
-
# * the data is valid but does not have the right shape.
|
|
35
|
-
#
|
|
36
|
-
# If any of these scenarios arises, all subsequent `then` and `map` blocks are
|
|
37
|
-
# skipped until the result is either unwrapped or we manually recover from the
|
|
38
|
-
# failure by specifying a `rescue` clause:
|
|
39
|
-
#
|
|
40
|
-
# Result.wrap { raise "Boom!" }
|
|
41
|
-
# .rescue { |e| e.message.upcase }
|
|
42
|
-
# .unwrap(nil) # => "BOOM!"
|
|
43
|
-
#
|
|
44
|
-
# In the event of a failure that hasn't been rescued from,
|
|
45
|
-
# `unwrap` returns the fallback value specified by the caller:
|
|
46
|
-
#
|
|
47
|
-
# Result.wrap { raise "Boom!" }.unwrap(nil) # => nil
|
|
48
|
-
# Result.wrap { raise "Boom!" }.unwrap { |e| e.message } # => "Boom!"
|
|
49
|
-
#
|
|
50
|
-
module Result
|
|
51
|
-
class Error < RuntimeError; end
|
|
52
|
-
class UnexpectedSuccess < Error; end
|
|
53
|
-
class UnexpectedFailure < Error; end
|
|
54
|
-
|
|
55
|
-
##
|
|
56
|
-
# Implements a container for wrapping a success value. The main purpose of
|
|
57
|
-
# the container is to support further transformations of the result and
|
|
58
|
-
# centralize error handling should any of the subsequent transformations
|
|
59
|
-
# fail:
|
|
60
|
-
#
|
|
61
|
-
# result = Result
|
|
62
|
-
# .new("{}")
|
|
63
|
-
# .then { |json| JSON.parse(json) }
|
|
64
|
-
# .tap do |result|
|
|
65
|
-
# result.success? # => true
|
|
66
|
-
# result.value # => {}
|
|
67
|
-
# .then { |data| data.fetch(:firstname) }
|
|
68
|
-
# .tap do |result|
|
|
69
|
-
# result.failure? # => true
|
|
70
|
-
# result.error # => KeyError
|
|
71
|
-
# end
|
|
72
|
-
#
|
|
73
|
-
# `Success` implements two transformation functions: `then` and `map`. The
|
|
74
|
-
# former makes no assumption regarding the return value of the
|
|
75
|
-
# transformation. The latter on the other hand expects the transformation to
|
|
76
|
-
# be successful. If this assumption is violated, program execution is
|
|
77
|
-
# interrupted and an error is raised. As the purpose of result objects is to
|
|
78
|
-
# guard against exactly that. This is generally a flaw and requires the code
|
|
79
|
-
# to either be hardened or to substitute the call to `map` with a call to
|
|
80
|
-
# `then`. `map` should only be used for transformations that cannot fail and
|
|
81
|
-
# when the caller wants to state exactly that fact.
|
|
82
|
-
#
|
|
83
|
-
class Success
|
|
84
|
-
attr_reader :value
|
|
85
|
-
|
|
86
|
-
##
|
|
87
|
-
# initializes a new `Success` from an arbitrary value.
|
|
88
|
-
def initialize(value)
|
|
89
|
-
@value = value
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
##
|
|
93
|
-
# always returns true to indicate that this result represents a success.
|
|
94
|
-
#
|
|
95
|
-
def success?
|
|
96
|
-
true
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
##
|
|
100
|
-
# always returns false to indicate that this result represents a success.
|
|
101
|
-
#
|
|
102
|
-
def failure?
|
|
103
|
-
false
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
##
|
|
107
|
-
# raises an `UnexpectedSuccess` as a `Success` does not carry an error
|
|
108
|
-
# value.
|
|
109
|
-
#
|
|
110
|
-
def error
|
|
111
|
-
raise UnexpectedSuccess
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
##
|
|
115
|
-
# returns a new `Success` wrapping the result of the given block. The
|
|
116
|
-
# block is called with the current value. If the block raises an exception
|
|
117
|
-
# or returns a `Failure`, an exception is raised. `map` assumes any
|
|
118
|
-
# transformation to succeed. Transformations that are expected to fail under
|
|
119
|
-
# certain conditions should only be transformed using `then`:
|
|
120
|
-
#
|
|
121
|
-
# Success
|
|
122
|
-
# .new(nil)
|
|
123
|
-
# .map { |n| n + 1 } # => raises NoMethodError
|
|
124
|
-
#
|
|
125
|
-
# Therefore, map should only be used here if the previous success value is
|
|
126
|
-
# guaranteed to be a number or if the block handles nil cases properly:
|
|
127
|
-
#
|
|
128
|
-
# Success
|
|
129
|
-
# .new(nil)
|
|
130
|
-
# .map { |n| (n || 0) + 1 }
|
|
131
|
-
# .value # => 1
|
|
132
|
-
#
|
|
133
|
-
def map(&block)
|
|
134
|
-
self.then(&block).tap do |result|
|
|
135
|
-
return result if result.success?
|
|
136
|
-
|
|
137
|
-
result.unwrap { |error| error }.tap do |error|
|
|
138
|
-
case error
|
|
139
|
-
when Exception
|
|
140
|
-
raise error
|
|
141
|
-
else
|
|
142
|
-
raise UnexpectedFailure, error
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
end
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
##
|
|
149
|
-
# returns a new result by wrapping the return value of the block. The
|
|
150
|
-
# block is invoked with the current success value. The result can either
|
|
151
|
-
# be a `Success` or a `Failure`. The former is the default. The latter
|
|
152
|
-
# occurs when executing the block either
|
|
153
|
-
#
|
|
154
|
-
# - raised an exception,
|
|
155
|
-
# - returned an instance of a subclass of `Exception`, or
|
|
156
|
-
# - returned a `Failure`.
|
|
157
|
-
#
|
|
158
|
-
# The example below illustrates this behavior:
|
|
159
|
-
#
|
|
160
|
-
# result = Success
|
|
161
|
-
# .new(1)
|
|
162
|
-
# .then { |n| n + 1 }
|
|
163
|
-
# .tap do |result|
|
|
164
|
-
# result.success? # => true
|
|
165
|
-
# result.value # => 2
|
|
166
|
-
# end
|
|
167
|
-
#
|
|
168
|
-
# result.then { |n| n / 0 }.error # => ZeroDivisionError
|
|
169
|
-
# result.then { RuntimeError.new }.error # => RuntimeError
|
|
170
|
-
# result.then { Failure.new("Boom!") }.error # => "Boom!"
|
|
171
|
-
#
|
|
172
|
-
def then(&block)
|
|
173
|
-
Result.wrap(&block).call(@value)
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
##
|
|
177
|
-
# is a no-op and simply returns itself. Only a `Failure` can be
|
|
178
|
-
# transformed using `rescue`.
|
|
179
|
-
#
|
|
180
|
-
def rescue
|
|
181
|
-
self
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
##
|
|
185
|
-
# returns the value this success represents
|
|
186
|
-
#
|
|
187
|
-
def unwrap!
|
|
188
|
-
value
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
##
|
|
192
|
-
# returns the success value and ignores the fallback value that was either
|
|
193
|
-
# provided as a method argument or by passing a block. However, the caller
|
|
194
|
-
# is still required to specify a fallback value to ensure that in the
|
|
195
|
-
# event of a `Failure` program execution can continue in a controlled
|
|
196
|
-
# manner:
|
|
197
|
-
#
|
|
198
|
-
# Success.new(1).unwrap(0) => 1
|
|
199
|
-
#
|
|
200
|
-
def unwrap(*args, &block)
|
|
201
|
-
raise ArgumentError, "expected either a fallback value or a block" unless (args.length == 1) ^ block
|
|
202
|
-
@value
|
|
203
|
-
end
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
##
|
|
207
|
-
# Implements a container for wrapping an error value. In many cases, the
|
|
208
|
-
# error value is going to be an exception but other values are fully
|
|
209
|
-
# supported:
|
|
210
|
-
#
|
|
211
|
-
# Failure
|
|
212
|
-
# .new(RuntimeError.new("Something went wrong"))
|
|
213
|
-
# .error # => RuntimeError.new
|
|
214
|
-
#
|
|
215
|
-
# Failure
|
|
216
|
-
# .new("Something went wrong")
|
|
217
|
-
# .error # => "Something went wrong"
|
|
218
|
-
#
|
|
219
|
-
# `Failure` does not support transformations with `then` and `map`. When any
|
|
220
|
-
# of these two methods is invoked on a `Failure`, the `Failure` itself is
|
|
221
|
-
# returned unless it is rescued from or unwrapped. This enables the caller to
|
|
222
|
-
# build optimistic transformation chains and defer error handling:
|
|
223
|
-
#
|
|
224
|
-
# Failure
|
|
225
|
-
# .new(nil)
|
|
226
|
-
# .then { |json| JSON.parse(json) } # Ignored
|
|
227
|
-
# .then(&:with_indifferent_access) # Ignored
|
|
228
|
-
# .then { |data| data.values_at(:firstname, :lastname) } # Ignored
|
|
229
|
-
# .unwrap(Person.new("John", "Doe")) # => Person
|
|
230
|
-
#
|
|
231
|
-
# Alternatively, we could rescue from the error and then proceed with the
|
|
232
|
-
# remaining transformations:
|
|
233
|
-
#
|
|
234
|
-
# Person = Struct.new(:firstname, :lastname)
|
|
235
|
-
# Failure
|
|
236
|
-
# .new(nil)
|
|
237
|
-
# .then { |json| JSON.parse(json) } # Ignored
|
|
238
|
-
# .then(&:with_indifferent_access) # Ignored
|
|
239
|
-
# .rescue { {firstname: "John", lastname: "Doe" }}
|
|
240
|
-
# .then { |data| data.values_at(:firstname, :lastname) } # Executed
|
|
241
|
-
# .then { |members| Person.new(*members) } # Executed
|
|
242
|
-
# .unwrap(nil) # => Person
|
|
243
|
-
#
|
|
244
|
-
class Failure
|
|
245
|
-
attr_reader :error
|
|
246
|
-
|
|
247
|
-
##
|
|
248
|
-
# initializes a new `Failure` from an arbitrary value. In many cases, this
|
|
249
|
-
# value is going to be an instance of a subclass of `Exception` but any
|
|
250
|
-
# type is supported.
|
|
251
|
-
#
|
|
252
|
-
def initialize(error)
|
|
253
|
-
@error = error
|
|
254
|
-
end
|
|
255
|
-
|
|
256
|
-
##
|
|
257
|
-
# always returns `false` to indicate that this result represents a failure.
|
|
258
|
-
#
|
|
259
|
-
def success?
|
|
260
|
-
false
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
##
|
|
264
|
-
# Always returns `true` to indicate that this result represents a failure.
|
|
265
|
-
#
|
|
266
|
-
def failure?
|
|
267
|
-
true
|
|
268
|
-
end
|
|
269
|
-
|
|
270
|
-
##
|
|
271
|
-
# raises an `ShopifyCLI::Result::UnexpectedError` as a
|
|
272
|
-
# `ShopifyCLI::Result::Failure` does not carry a success value.
|
|
273
|
-
#
|
|
274
|
-
def value
|
|
275
|
-
raise UnexpectedFailure
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
##
|
|
279
|
-
# is a no-op and simply returns itself. This is essential to skip
|
|
280
|
-
# transformation steps in a chain once an error has occurred.
|
|
281
|
-
#
|
|
282
|
-
def map
|
|
283
|
-
self
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
##
|
|
287
|
-
# is a no-op and simply returns itself. This is essential to skip
|
|
288
|
-
# transformation steps in a chain once an error has occurred.
|
|
289
|
-
#
|
|
290
|
-
def then
|
|
291
|
-
self
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
##
|
|
295
|
-
# can be used to recover from a failure or produce a new failure with a
|
|
296
|
-
# different error.
|
|
297
|
-
#
|
|
298
|
-
# Failure
|
|
299
|
-
# .new("Something went wrong")
|
|
300
|
-
# .rescue { |msg| [msg, "but we fixed it!"].join(" "") }
|
|
301
|
-
# .tap do |result|
|
|
302
|
-
# result.success? # => true
|
|
303
|
-
# result.value # => "Something went wrong but we fixed it!"
|
|
304
|
-
# end
|
|
305
|
-
#
|
|
306
|
-
# `rescue` is opinionated when it comes to the return value of the block.
|
|
307
|
-
# If the return value is an `Exception` – either one that was raised or an
|
|
308
|
-
# instance of a subclass of `Exception` – a `Failure` is returned. Any
|
|
309
|
-
# other value results in a `Success` unless the value has been explicitly
|
|
310
|
-
# wrapped in a `Failure`:
|
|
311
|
-
#
|
|
312
|
-
# Failure
|
|
313
|
-
# .new(RuntimeError.new)
|
|
314
|
-
# .rescue { "All good! "}
|
|
315
|
-
# .success? # => true
|
|
316
|
-
#
|
|
317
|
-
# Failure
|
|
318
|
-
# .new(RuntimeError.new)
|
|
319
|
-
# .rescue { Failure.new("Still broken!") }
|
|
320
|
-
# .success? # => false
|
|
321
|
-
#
|
|
322
|
-
def rescue(&block)
|
|
323
|
-
Result.wrap(&block).call(@error)
|
|
324
|
-
end
|
|
325
|
-
|
|
326
|
-
##
|
|
327
|
-
# returns the fallback value specified by the caller. The fallback value
|
|
328
|
-
# can be provided as a method argument or as a block. If a block is given,
|
|
329
|
-
# it receives the error as its first and only argument:
|
|
330
|
-
#
|
|
331
|
-
# failure = Failure.new(RuntimeError.new("Something went wrong!"))
|
|
332
|
-
#
|
|
333
|
-
# failure.unwrap(nil) # => nil
|
|
334
|
-
# failure.unwrap { |e| e.message } # => "Something went wrong!"
|
|
335
|
-
#
|
|
336
|
-
# #### Parameters
|
|
337
|
-
#
|
|
338
|
-
# * `*args` should be an `Array` with zero or one element
|
|
339
|
-
# * `&block` should be a Proc that takes zero or one argument
|
|
340
|
-
#
|
|
341
|
-
# #### Raises
|
|
342
|
-
#
|
|
343
|
-
# * `ArgumentError` if both a fallback argument and a block is provided
|
|
344
|
-
#
|
|
345
|
-
def unwrap(*args, &block)
|
|
346
|
-
raise ArgumentError, "expected either a fallback value or a block" unless (args.length == 1) ^ block
|
|
347
|
-
block ? block.call(@error) : args.pop
|
|
348
|
-
end
|
|
349
|
-
|
|
350
|
-
##
|
|
351
|
-
# raises the error this failure represents
|
|
352
|
-
#
|
|
353
|
-
def unwrap!
|
|
354
|
-
raise error
|
|
355
|
-
end
|
|
356
|
-
end
|
|
357
|
-
|
|
358
|
-
##
|
|
359
|
-
# wraps the given value into a `ShopifyCLI::Result::Success` container
|
|
360
|
-
#
|
|
361
|
-
# #### Parameters
|
|
362
|
-
#
|
|
363
|
-
# * `value` a value of arbitrary type
|
|
364
|
-
#
|
|
365
|
-
def self.success(value)
|
|
366
|
-
Result::Success.new(value)
|
|
367
|
-
end
|
|
368
|
-
|
|
369
|
-
##
|
|
370
|
-
# wraps the given value into a `ShopifyCLI::Result::Failure` container
|
|
371
|
-
#
|
|
372
|
-
# #### Parameters
|
|
373
|
-
#
|
|
374
|
-
# * `error` a value of arbitrary type
|
|
375
|
-
#
|
|
376
|
-
def self.failure(error)
|
|
377
|
-
Result::Failure.new(error)
|
|
378
|
-
end
|
|
379
|
-
|
|
380
|
-
class << self
|
|
381
|
-
##
|
|
382
|
-
# takes either a value or a block and chooses the appropriate result
|
|
383
|
-
# container based on the type of the value or the type of the block's return
|
|
384
|
-
# value. If the type is an exception, it is wrapped in a
|
|
385
|
-
# `ShopifyCli::Result::Failure` and otherwise in a
|
|
386
|
-
# `ShopifyCli::Result::Success`. If a block was provided instead of value, a
|
|
387
|
-
# `Proc` is returned and the result wrapping doesn't occur until the block
|
|
388
|
-
# is invoked.
|
|
389
|
-
#
|
|
390
|
-
# #### Parameters
|
|
391
|
-
#
|
|
392
|
-
# * `*args` should be an `Array` with zero or one element
|
|
393
|
-
# * `&block` should be a `Proc` that takes zero or one argument
|
|
394
|
-
#
|
|
395
|
-
# #### Returns
|
|
396
|
-
#
|
|
397
|
-
# Returns either a `Result::Success`, `Result::Failure` or a `Proc` that
|
|
398
|
-
# produces one of the former when invoked.
|
|
399
|
-
#
|
|
400
|
-
# #### Examples
|
|
401
|
-
#
|
|
402
|
-
# Result.wrap(1) # => ShopifyCli::Result::Success
|
|
403
|
-
# Result.wrap(RuntimeError.new) # => ShopifyCli::Result::Failure
|
|
404
|
-
#
|
|
405
|
-
# Result.wrap { 1 } # => Proc
|
|
406
|
-
# Result.wrap { 1 }.call # => ShopifyCli::Result::Success
|
|
407
|
-
# Result.wrap { raise }.call # => ShopifyCli::Result::Failure
|
|
408
|
-
#
|
|
409
|
-
# Result.wrap { |s| s.upcase }.call("hello").tap do |result|
|
|
410
|
-
# result # => Result::Success
|
|
411
|
-
# result.value # => "HELLO"
|
|
412
|
-
# end
|
|
413
|
-
#
|
|
414
|
-
ruby2_keywords def wrap(*values, &block)
|
|
415
|
-
raise ArgumentError, "expected either a value or a block" unless (values.length == 1) ^ block
|
|
416
|
-
|
|
417
|
-
if values.length == 1
|
|
418
|
-
values.pop.yield_self do |value|
|
|
419
|
-
case value
|
|
420
|
-
when Result::Success, Result::Failure
|
|
421
|
-
value
|
|
422
|
-
when NilClass, Exception
|
|
423
|
-
Result.failure(value)
|
|
424
|
-
else
|
|
425
|
-
Result.success(value)
|
|
426
|
-
end
|
|
427
|
-
end
|
|
428
|
-
else
|
|
429
|
-
->(*args) do
|
|
430
|
-
begin
|
|
431
|
-
wrap(block.call(*args))
|
|
432
|
-
rescue Exception => error # rubocop:disable Lint/RescueException
|
|
433
|
-
wrap(error)
|
|
434
|
-
end
|
|
435
|
-
end.ruby2_keywords
|
|
436
|
-
end
|
|
437
|
-
end
|
|
438
|
-
|
|
439
|
-
##
|
|
440
|
-
# Wraps the given block and invokes it with the passed arguments.
|
|
441
|
-
#
|
|
442
|
-
ruby2_keywords def call(*args, &block)
|
|
443
|
-
raise ArgumentError, "expected a block" unless block
|
|
444
|
-
wrap(&block).call(*args)
|
|
445
|
-
end
|
|
446
|
-
end
|
|
447
|
-
end
|
|
448
|
-
end
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
module ShopifyCLI
|
|
2
|
-
##
|
|
3
|
-
# ShopifyCLI::Shopifolk contains the logic to determine if the user appears to be a Shopify staff
|
|
4
|
-
#
|
|
5
|
-
# The Shopifolk Feature flag will persist between runs so if the flag is enabled or disabled,
|
|
6
|
-
# it will still be in that same state until the next class invocation.
|
|
7
|
-
class Shopifolk
|
|
8
|
-
GCLOUD_CONFIG_FILE = File.expand_path("~/.config/gcloud/configurations/config_default")
|
|
9
|
-
DEV_PATH = "/opt/dev"
|
|
10
|
-
SECTION = "core"
|
|
11
|
-
FEATURE_NAME = "shopifolk"
|
|
12
|
-
|
|
13
|
-
class << self
|
|
14
|
-
##
|
|
15
|
-
# will return if the user appears to be a Shopify employee, based on several heuristics
|
|
16
|
-
#
|
|
17
|
-
# #### Returns
|
|
18
|
-
#
|
|
19
|
-
# * `is_shopifolk` - returns true if the user is a Shopify Employee
|
|
20
|
-
#
|
|
21
|
-
# #### Example
|
|
22
|
-
#
|
|
23
|
-
# ShopifyCLI::Shopifolk.check
|
|
24
|
-
#
|
|
25
|
-
def check
|
|
26
|
-
ShopifyCLI::Shopifolk.new.shopifolk?
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def act_as_shopify_organization
|
|
30
|
-
DB.set(acting_as_shopify_organization: true)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def acting_as_shopify_organization?
|
|
34
|
-
!!(DB.get(:acting_as_shopify_organization) ||
|
|
35
|
-
(Project.has_current? && Project.current.config["shopify_organization"])) ||
|
|
36
|
-
ENV.fetch("SHOPIFY_CLI_1P_DEV", "0") == "1"
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def reset
|
|
40
|
-
DB.del(:acting_as_shopify_organization)
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
##
|
|
45
|
-
# will return if the user is a Shopify employee
|
|
46
|
-
#
|
|
47
|
-
# #### Returns
|
|
48
|
-
#
|
|
49
|
-
# * `is_shopifolk` - returns true if the user has `dev` installed and
|
|
50
|
-
# a valid google cloud config file with email ending in "@shopify.com"
|
|
51
|
-
#
|
|
52
|
-
def shopifolk?
|
|
53
|
-
return true if Feature.enabled?(FEATURE_NAME)
|
|
54
|
-
|
|
55
|
-
if shopifolk_by_gcloud? && shopifolk_by_dev?
|
|
56
|
-
ShopifyCLI::Feature.enable(FEATURE_NAME)
|
|
57
|
-
true
|
|
58
|
-
else
|
|
59
|
-
ShopifyCLI::Feature.disable(FEATURE_NAME)
|
|
60
|
-
false
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
private
|
|
65
|
-
|
|
66
|
-
def shopifolk_by_gcloud?
|
|
67
|
-
ini&.dig("[#{SECTION}]", "account")&.match?(/@shopify.com\z/)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def shopifolk_by_dev?
|
|
71
|
-
File.exist?("#{DEV_PATH}/bin/dev") && File.exist?("#{DEV_PATH}/.shopify-build")
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def ini
|
|
75
|
-
@ini ||= if File.exist?(GCLOUD_CONFIG_FILE)
|
|
76
|
-
CLI::Kit::Ini
|
|
77
|
-
.new(GCLOUD_CONFIG_FILE, default_section: "[#{SECTION}]", convert_types: false)
|
|
78
|
-
.tap(&:parse).ini
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require "shopify_cli"
|
|
2
|
-
|
|
3
|
-
module ShopifyCLI
|
|
4
|
-
class Task
|
|
5
|
-
class << self
|
|
6
|
-
ruby2_keywords def call(*args)
|
|
7
|
-
task = new
|
|
8
|
-
task.call(*args)
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def wants_to_run_against_shopify_org?
|
|
15
|
-
@ctx.puts(@ctx.message("core.tasks.select_org_and_shop.identified_as_shopify"))
|
|
16
|
-
message = @ctx.message("core.tasks.select_org_and_shop.first_party")
|
|
17
|
-
CLI::UI::Prompt.confirm(message, default: false)
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
require "shopify_cli"
|
|
2
|
-
|
|
3
|
-
module ShopifyCLI
|
|
4
|
-
module Tasks
|
|
5
|
-
class ConfirmStore < ShopifyCLI::Task
|
|
6
|
-
def call(ctx)
|
|
7
|
-
@ctx = ctx
|
|
8
|
-
store = ShopifyCLI::AdminAPI.get_shop_or_abort(ctx)
|
|
9
|
-
if CLI::UI::Prompt.confirm(ctx.message("core.tasks.confirm_store.prompt", store), default: false)
|
|
10
|
-
ctx.puts(ctx.message("core.tasks.confirm_store.confirmation", store))
|
|
11
|
-
else
|
|
12
|
-
ctx.puts(ctx.message("core.tasks.confirm_store.cancelling"))
|
|
13
|
-
raise AbortSilent
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
require "shopify_cli"
|
|
2
|
-
|
|
3
|
-
module ShopifyCLI
|
|
4
|
-
module Tasks
|
|
5
|
-
class CreateApiClient < ShopifyCLI::Task
|
|
6
|
-
VALID_APP_TYPES = %w(public custom)
|
|
7
|
-
DEFAULT_APP_URL = "https://shopify.github.io/shopify-cli/help/start-app/"
|
|
8
|
-
|
|
9
|
-
def call(ctx, org_id:, title:, type:)
|
|
10
|
-
resp = ShopifyCLI::PartnersAPI.query(
|
|
11
|
-
ctx,
|
|
12
|
-
"create_app",
|
|
13
|
-
org: org_id.to_i,
|
|
14
|
-
title: title,
|
|
15
|
-
type: type,
|
|
16
|
-
app_url: DEFAULT_APP_URL,
|
|
17
|
-
redir: [IdentityAuth::REDIRECT_HOST]
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
unless resp
|
|
21
|
-
ctx.abort("Error - empty response")
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
errors = resp.dig("errors")
|
|
25
|
-
if !errors.nil? && errors.any?
|
|
26
|
-
ctx.abort(errors.map { |err| "#{err["field"]} #{err["message"]}" }.join(", "))
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
user_errors = resp.dig("data", "appCreate", "userErrors")
|
|
30
|
-
if !user_errors.nil? && user_errors.any?
|
|
31
|
-
ctx.abort(user_errors.map { |err| "#{err["field"]} #{err["message"]}" }.join(", "))
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
ShopifyCLI::Core::Monorail.metadata[:api_key] = resp.dig("data", "appCreate", "app", "apiKey")
|
|
35
|
-
|
|
36
|
-
resp.dig("data", "appCreate", "app")
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
require "shopify_cli"
|
|
2
|
-
|
|
3
|
-
module ShopifyCLI
|
|
4
|
-
module Tasks
|
|
5
|
-
class EnsureAuthenticated < ShopifyCLI::Task
|
|
6
|
-
def call(ctx)
|
|
7
|
-
return if ShopifyCLI::Environment.acceptance_test?
|
|
8
|
-
unless ShopifyCLI::IdentityAuth.authenticated?
|
|
9
|
-
raise ShopifyCLI::Abort,
|
|
10
|
-
ctx.message("core.identity_auth.login_prompt", ShopifyCLI::TOOL_NAME)
|
|
11
|
-
end
|
|
12
|
-
if ShopifyCLI::IdentityAuth.environment_auth_token?
|
|
13
|
-
ctx.puts(ctx.message("core.identity_auth.token_authentication",
|
|
14
|
-
ShopifyCLI::Constants::EnvironmentVariables::AUTH_TOKEN))
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
require "shopify_cli"
|
|
2
|
-
|
|
3
|
-
module ShopifyCLI
|
|
4
|
-
module Tasks
|
|
5
|
-
class EnsureDevStore < ShopifyCLI::Task
|
|
6
|
-
def call(ctx)
|
|
7
|
-
@ctx = ctx
|
|
8
|
-
return ctx.abort(ctx.message(
|
|
9
|
-
"core.tasks.ensure_dev_store.could_not_verify_store", project.env.shop
|
|
10
|
-
)) if shop.nil?
|
|
11
|
-
return if shop["transferDisabled"] == true
|
|
12
|
-
return unless CLI::UI::Prompt.confirm(
|
|
13
|
-
ctx.message("core.tasks.ensure_dev_store.convert_to_dev_store", project.env.shop)
|
|
14
|
-
)
|
|
15
|
-
ShopifyCLI::PartnersAPI.query(ctx, "convert_dev_to_test_store", input: {
|
|
16
|
-
organizationID: shop["orgID"].to_i,
|
|
17
|
-
shopId: shop["shopId"],
|
|
18
|
-
})
|
|
19
|
-
ctx.puts(ctx.message("core.tasks.ensure_dev_store.transfer_disabled", project.env.shop))
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
private
|
|
23
|
-
|
|
24
|
-
def project
|
|
25
|
-
@project ||= ShopifyCLI::Project.current
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def shop
|
|
29
|
-
@shop ||= begin
|
|
30
|
-
current_domain = project.env.shop
|
|
31
|
-
ShopifyCLI::PartnersAPI::Organizations.fetch_all(@ctx).map do |org|
|
|
32
|
-
org["stores"].find do |store|
|
|
33
|
-
store["orgID"] = org["id"]
|
|
34
|
-
store["shopDomain"] == current_domain
|
|
35
|
-
end
|
|
36
|
-
end.compact.first
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|