@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,231 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "forwardable"
|
|
4
|
-
|
|
5
|
-
require_relative "uploader/bulk_item"
|
|
6
|
-
require_relative "uploader/bulk"
|
|
7
|
-
require_relative "uploader/json_delete_handler"
|
|
8
|
-
require_relative "uploader/json_update_handler"
|
|
9
|
-
|
|
10
|
-
module ShopifyCLI
|
|
11
|
-
module Theme
|
|
12
|
-
class Syncer
|
|
13
|
-
class Uploader
|
|
14
|
-
extend Forwardable
|
|
15
|
-
|
|
16
|
-
include JsonDeleteHandler
|
|
17
|
-
include JsonUpdateHandler
|
|
18
|
-
|
|
19
|
-
attr_reader :syncer
|
|
20
|
-
|
|
21
|
-
def_delegators :syncer,
|
|
22
|
-
# helpers
|
|
23
|
-
:ctx,
|
|
24
|
-
:api_client,
|
|
25
|
-
:theme,
|
|
26
|
-
:ignore_file?,
|
|
27
|
-
:overwrite_json?,
|
|
28
|
-
:bulk_updates_activated?,
|
|
29
|
-
# enqueue
|
|
30
|
-
:enqueue_deletes,
|
|
31
|
-
:enqueue_get,
|
|
32
|
-
:enqueue_union_merges,
|
|
33
|
-
:enqueue_updates,
|
|
34
|
-
# checksums
|
|
35
|
-
:checksums,
|
|
36
|
-
:update_checksums,
|
|
37
|
-
:fetch_checksums!,
|
|
38
|
-
:wait!
|
|
39
|
-
|
|
40
|
-
def initialize(syncer, delete, delay_low_priority_files, &update_progress_bar_block)
|
|
41
|
-
@syncer = syncer
|
|
42
|
-
@delete = delete
|
|
43
|
-
@delay_low_priority_files = delay_low_priority_files
|
|
44
|
-
@update_progress_bar_block = update_progress_bar_block
|
|
45
|
-
@progress_bar_mutex = Mutex.new
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def upload!
|
|
49
|
-
fetch_checksums!
|
|
50
|
-
delete_files!
|
|
51
|
-
|
|
52
|
-
if bulk_updates_activated? && overwrite_json?
|
|
53
|
-
bulk_upload!
|
|
54
|
-
else
|
|
55
|
-
async_upload!
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def delete_files!
|
|
60
|
-
return unless delete?
|
|
61
|
-
|
|
62
|
-
files_present_remotely = checksums.keys
|
|
63
|
-
files_present_locally = theme.theme_files.map(&:relative_path)
|
|
64
|
-
|
|
65
|
-
json_files, other_files = (files_present_remotely - files_present_locally)
|
|
66
|
-
.map { |file| theme[file] }
|
|
67
|
-
.reject { |file| ignore_file?(file) }
|
|
68
|
-
.partition(&:json?)
|
|
69
|
-
|
|
70
|
-
enqueue_deletes(other_files)
|
|
71
|
-
enqueue_json_deletes(json_files)
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
private
|
|
75
|
-
|
|
76
|
-
def bulk_upload!
|
|
77
|
-
update_progress_bar!
|
|
78
|
-
|
|
79
|
-
enqueue_bulk_updates(liquid_files)
|
|
80
|
-
enqueue_bulk_updates(json_files)
|
|
81
|
-
enqueue_bulk_updates(config_files)
|
|
82
|
-
|
|
83
|
-
if delay_low_priority_files?
|
|
84
|
-
# Process lower-priority files (assets) in the background, as they
|
|
85
|
-
# are served locally
|
|
86
|
-
enqueue_updates(static_asset_files)
|
|
87
|
-
else
|
|
88
|
-
enqueue_bulk_updates(static_asset_files)
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
wait!(&@update_progress_bar_block) unless delay_low_priority_files?
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
def async_upload!
|
|
95
|
-
enqueue_updates(liquid_files)
|
|
96
|
-
enqueue_json_updates(json_files)
|
|
97
|
-
enqueue_updates(config_files)
|
|
98
|
-
|
|
99
|
-
# Wait upload of Liquid & JSON files, as they are rendered remotely
|
|
100
|
-
wait!(&@update_progress_bar_block) if delay_low_priority_files?
|
|
101
|
-
|
|
102
|
-
# Process lower-priority files (assets) in the background, as they
|
|
103
|
-
# are served locally
|
|
104
|
-
enqueue_updates(static_asset_files)
|
|
105
|
-
|
|
106
|
-
wait!(&@update_progress_bar_block) unless delay_low_priority_files?
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
def enqueue_bulk_updates(files)
|
|
110
|
-
retries = 0
|
|
111
|
-
pending_items = files.map { |file| bulk_item(file) }
|
|
112
|
-
|
|
113
|
-
while pending_items.any? && retries < 2
|
|
114
|
-
bulk = Bulk.new(ctx, theme, api_client)
|
|
115
|
-
|
|
116
|
-
files
|
|
117
|
-
.map { |file| bulk_item(file) }
|
|
118
|
-
.each { |request| bulk.enqueue(request) }
|
|
119
|
-
|
|
120
|
-
bulk.shutdown
|
|
121
|
-
|
|
122
|
-
retries += 1
|
|
123
|
-
pending_items = bulk.remaining_items
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
return unless pending_items.any?
|
|
127
|
-
|
|
128
|
-
# Remaining items are handled in the background when the bulk timeout
|
|
129
|
-
# is exceeded
|
|
130
|
-
pending_items.size.times { update_progress_bar! }
|
|
131
|
-
|
|
132
|
-
syncer.enqueue_updates(pending_items.map(&:file))
|
|
133
|
-
syncer.wait!
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
def bulk_item(file)
|
|
137
|
-
BulkItem.new(file) do |_s, body, response|
|
|
138
|
-
if response.is_a?(StandardError)
|
|
139
|
-
report(file, response)
|
|
140
|
-
else
|
|
141
|
-
update_checksums(body)
|
|
142
|
-
end
|
|
143
|
-
ensure
|
|
144
|
-
update_progress_bar!
|
|
145
|
-
end
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
def delete?
|
|
149
|
-
@delete
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def delay_low_priority_files?
|
|
153
|
-
@delay_low_priority_files
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
# Files
|
|
157
|
-
|
|
158
|
-
def number_of_bulk_items
|
|
159
|
-
@number_of_files ||= [
|
|
160
|
-
json_files.size,
|
|
161
|
-
liquid_files.size,
|
|
162
|
-
config_files.size,
|
|
163
|
-
delay_low_priority_files? ? 0 : static_asset_files.size,
|
|
164
|
-
].reduce(:+)
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
def json_files
|
|
168
|
-
@json_files ||= uploadable(theme.json_files) - config_files
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
def liquid_files
|
|
172
|
-
@liquid_files ||= uploadable(theme.liquid_files)
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
def static_asset_files
|
|
176
|
-
@static_asset_files ||= uploadable(theme.static_asset_files)
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
def config_files
|
|
180
|
-
@config_files ||= uploadable(
|
|
181
|
-
[
|
|
182
|
-
theme["config/settings_schema.json"],
|
|
183
|
-
theme["config/settings_data.json"],
|
|
184
|
-
],
|
|
185
|
-
)
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
def uploadable(files)
|
|
189
|
-
files.select { |file| uploadable?(file) }
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
def uploadable?(file)
|
|
193
|
-
return false unless file.exist?
|
|
194
|
-
return false if ignore_file?(file)
|
|
195
|
-
|
|
196
|
-
checksums.file_has_changed?(file)
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
# Handle prorgress bar
|
|
200
|
-
|
|
201
|
-
def update_progress_bar!
|
|
202
|
-
@pending_files ||= number_of_bulk_items
|
|
203
|
-
@pending_files -= 1
|
|
204
|
-
|
|
205
|
-
# Avoid abrupt updates in the progress bar
|
|
206
|
-
@progress_bar_mutex.synchronize do
|
|
207
|
-
sleep(0.02)
|
|
208
|
-
update_progress_bar(@pending_files, number_of_bulk_items)
|
|
209
|
-
end
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
def update_progress_bar(size, total)
|
|
213
|
-
@update_progress_bar_block&.call(size, total)
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
# Handler errors
|
|
217
|
-
|
|
218
|
-
def report(file, error)
|
|
219
|
-
file_path = file.relative_path
|
|
220
|
-
|
|
221
|
-
error_message = syncer
|
|
222
|
-
.parse_api_errors(file, error)
|
|
223
|
-
.map { |msg| "#{file_path}: #{msg}" }
|
|
224
|
-
.join("\n")
|
|
225
|
-
|
|
226
|
-
syncer.report_file_error(file, error_message)
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
end
|
|
230
|
-
end
|
|
231
|
-
end
|
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "thread"
|
|
4
|
-
require "json"
|
|
5
|
-
require "base64"
|
|
6
|
-
require "forwardable"
|
|
7
|
-
|
|
8
|
-
require_relative "backoff_helper"
|
|
9
|
-
require_relative "ignore_helper"
|
|
10
|
-
require_relative "theme_admin_api"
|
|
11
|
-
|
|
12
|
-
require_relative "syncer/checksums"
|
|
13
|
-
require_relative "syncer/downloader"
|
|
14
|
-
require_relative "syncer/error_reporter"
|
|
15
|
-
require_relative "syncer/merger"
|
|
16
|
-
require_relative "syncer/operation"
|
|
17
|
-
require_relative "syncer/standard_reporter"
|
|
18
|
-
require_relative "syncer/unsupported_script_warning"
|
|
19
|
-
require_relative "syncer/uploader"
|
|
20
|
-
require_relative "notifier"
|
|
21
|
-
|
|
22
|
-
module ShopifyCLI
|
|
23
|
-
module Theme
|
|
24
|
-
class Syncer
|
|
25
|
-
extend Forwardable
|
|
26
|
-
|
|
27
|
-
include ShopifyCLI::Theme::IgnoreHelper
|
|
28
|
-
include ShopifyCLI::Theme::BackoffHelper
|
|
29
|
-
|
|
30
|
-
QUEUEABLE_METHODS = [
|
|
31
|
-
:get, # - Updates the local file with the remote file content
|
|
32
|
-
:update, # - Updates the remote file with the local file content
|
|
33
|
-
:delete, # - Deletes the remote file
|
|
34
|
-
:union_merge, # - Union merges the local file content with the remote file content
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
attr_reader :ctx, :theme, :checksums, :error_checksums, :api_client, :pending, :standard_reporter
|
|
38
|
-
attr_accessor :include_filter, :ignore_filter
|
|
39
|
-
|
|
40
|
-
def_delegators :@error_reporter, :has_any_error?
|
|
41
|
-
|
|
42
|
-
def initialize(ctx, theme:, include_filter: nil, ignore_filter: nil, overwrite_json: true, stable: false,
|
|
43
|
-
notify: nil)
|
|
44
|
-
@ctx = ctx
|
|
45
|
-
@theme = theme
|
|
46
|
-
@include_filter = include_filter
|
|
47
|
-
@ignore_filter = ignore_filter
|
|
48
|
-
@overwrite_json = overwrite_json
|
|
49
|
-
@error_reporter = ErrorReporter.new(ctx)
|
|
50
|
-
@standard_reporter = StandardReporter.new(ctx)
|
|
51
|
-
@notifier = Notifier.new(ctx, path: notify)
|
|
52
|
-
@reporters = [@error_reporter, @standard_reporter]
|
|
53
|
-
|
|
54
|
-
# Queue of `Operation`s waiting to be picked up from a thread for processing.
|
|
55
|
-
@queue = Queue.new
|
|
56
|
-
|
|
57
|
-
# `Operation`s will be removed from this Array completed.
|
|
58
|
-
@pending = []
|
|
59
|
-
|
|
60
|
-
# Thread making the API requests.
|
|
61
|
-
@threads = []
|
|
62
|
-
|
|
63
|
-
# Latest theme assets checksums. Updated on each upload.
|
|
64
|
-
@checksums = Checksums.new(theme)
|
|
65
|
-
|
|
66
|
-
# Checksums of assets with errors.
|
|
67
|
-
@error_checksums = []
|
|
68
|
-
|
|
69
|
-
# Do not use the throttler when --stable is passed or a Theme Access password is set
|
|
70
|
-
# (Theme Access API is not compatible yet with bulks)
|
|
71
|
-
@bulk_updates_activated = !stable && !Environment.theme_access_password?
|
|
72
|
-
|
|
73
|
-
# Initialize `api_client` on main thread
|
|
74
|
-
@api_client = ThemeAdminAPI.new(ctx, theme.shop)
|
|
75
|
-
|
|
76
|
-
# Initialize backoff helper on main thread to pause all threads when the
|
|
77
|
-
# requests are reaching API rate limits.
|
|
78
|
-
initialize_backoff_helper!
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def lock_io!
|
|
82
|
-
@reporters.each(&:disable!)
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
def unlock_io!
|
|
86
|
-
@reporters.each(&:enable!)
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def enqueue_updates(files)
|
|
90
|
-
files.each { |file| enqueue(:update, file) }
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
def enqueue_get(files)
|
|
94
|
-
files.each { |file| enqueue(:get, file) }
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def enqueue_deletes(files)
|
|
98
|
-
files.each { |file| enqueue(:delete, file) }
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
def enqueue_union_merges(files)
|
|
102
|
-
files.each { |file| enqueue(:union_merge, file) }
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
def size
|
|
106
|
-
@pending.size
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
def empty?
|
|
110
|
-
@pending.empty?
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
def pending_updates
|
|
114
|
-
@pending.select { |op| op.method == :update }.map(&:file)
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
def remote_file?(file)
|
|
118
|
-
checksums.has?(file)
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
def broken_file?(file)
|
|
122
|
-
error_checksums.include?(checksums[file.relative_path])
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
def wait!
|
|
126
|
-
raise ThreadError, "No syncer threads" if @threads.empty?
|
|
127
|
-
|
|
128
|
-
total = size
|
|
129
|
-
last_size = size
|
|
130
|
-
until empty? || @queue.closed?
|
|
131
|
-
if block_given? && last_size != size
|
|
132
|
-
yield size, total
|
|
133
|
-
last_size = size
|
|
134
|
-
end
|
|
135
|
-
Thread.pass
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
def fetch_checksums!
|
|
140
|
-
_status, response = api_client.get(
|
|
141
|
-
path: "themes/#{@theme.id}/assets.json",
|
|
142
|
-
)
|
|
143
|
-
update_checksums(response)
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
def shutdown
|
|
147
|
-
@queue.close unless @queue.closed?
|
|
148
|
-
ensure
|
|
149
|
-
@threads.each { |thread| thread.join if thread.alive? }
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def start_threads(count = 2)
|
|
153
|
-
count.times do
|
|
154
|
-
@threads << Thread.new do
|
|
155
|
-
loop do
|
|
156
|
-
operation = @queue.pop
|
|
157
|
-
break if operation.nil? # shutdown was called
|
|
158
|
-
|
|
159
|
-
perform(operation)
|
|
160
|
-
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
161
|
-
error_suffix = ": #{e}"
|
|
162
|
-
error_suffix += + "\n\t#{e.backtrace.join("\n\t")}" if @ctx.debug?
|
|
163
|
-
report_error(operation, error_suffix)
|
|
164
|
-
end
|
|
165
|
-
end
|
|
166
|
-
end
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
def upload_theme!(delay_low_priority_files: false, delete: true, &block)
|
|
170
|
-
uploader = Uploader.new(self, delete, delay_low_priority_files, &block)
|
|
171
|
-
uploader.upload!
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
def download_theme!(delete: true, &block)
|
|
175
|
-
downloader = Downloader.new(self, delete, &block)
|
|
176
|
-
downloader.download!
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
def bulk_updates_activated?
|
|
180
|
-
@bulk_updates_activated
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
def enqueueable?(operation)
|
|
184
|
-
file = operation.file
|
|
185
|
-
method = operation.method
|
|
186
|
-
|
|
187
|
-
# Already enqueued or ignored
|
|
188
|
-
return false if @pending.include?(operation) || ignore_operation?(operation)
|
|
189
|
-
|
|
190
|
-
if [:update, :get].include?(method) && file.exist?
|
|
191
|
-
# File is fixed (and it has been never updated)
|
|
192
|
-
if !!@error_checksums.delete(file.checksum)
|
|
193
|
-
@standard_reporter.report(operation.as_fix_message)
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
return checksums.file_has_changed?(file)
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
true
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
def handle_operation_error(operation, error)
|
|
203
|
-
error_suffix = ":\n " + parse_api_errors(operation.file, error).join("\n ")
|
|
204
|
-
report_error(operation, error_suffix)
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
def overwrite_json?
|
|
208
|
-
theme_created_at_runtime? || @overwrite_json
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
def update_checksums(api_response)
|
|
212
|
-
api_response.values.flatten.each do |asset|
|
|
213
|
-
next unless asset["key"]
|
|
214
|
-
|
|
215
|
-
checksums[asset["key"]] = asset["checksum"]
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
checksums.reject_duplicated_checksums!
|
|
219
|
-
end
|
|
220
|
-
|
|
221
|
-
def report_file_error(file, error_message = "")
|
|
222
|
-
path = file.relative_path
|
|
223
|
-
|
|
224
|
-
@error_checksums << checksums[path]
|
|
225
|
-
@error_reporter.report(error_message)
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
def parse_api_errors(file, exception)
|
|
229
|
-
parsed_body = {}
|
|
230
|
-
|
|
231
|
-
if exception.respond_to?(:response)
|
|
232
|
-
response = exception.response
|
|
233
|
-
|
|
234
|
-
parsed_body = if response&.is_a?(Hash)
|
|
235
|
-
response&.[](:body)
|
|
236
|
-
else
|
|
237
|
-
JSON.parse(response&.body)
|
|
238
|
-
end
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
errors = parsed_body.dig("errors") # either nil or another type
|
|
242
|
-
errors = errors.dig("asset") if errors&.is_a?(Hash)
|
|
243
|
-
|
|
244
|
-
message = errors || parsed_body["message"] || exception.message
|
|
245
|
-
# Truncate to first lines
|
|
246
|
-
[message].flatten.map { |m| m.split("\n", 2).first }
|
|
247
|
-
rescue JSON::ParserError
|
|
248
|
-
[exception.message]
|
|
249
|
-
rescue StandardError => e
|
|
250
|
-
cause = "(cause: #{e.message})"
|
|
251
|
-
backtrace = e.backtrace.join("\n")
|
|
252
|
-
["The asset #{file} could not be synced #{cause} #{backtrace}"]
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
private
|
|
256
|
-
|
|
257
|
-
def report_error(operation, error_suffix = "")
|
|
258
|
-
file = operation.file
|
|
259
|
-
error_message = "#{operation.as_error_message}#{error_suffix}"
|
|
260
|
-
|
|
261
|
-
report_file_error(file, error_message)
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
def enqueue(method, file)
|
|
265
|
-
raise ArgumentError, "file required" unless file
|
|
266
|
-
raise ArgumentError, "method '#{method}' cannot be queued" unless QUEUEABLE_METHODS.include?(method)
|
|
267
|
-
|
|
268
|
-
operation = Operation.new(@ctx, method, @theme[file])
|
|
269
|
-
|
|
270
|
-
return unless enqueueable?(operation)
|
|
271
|
-
|
|
272
|
-
@pending << operation
|
|
273
|
-
@queue << operation unless @queue.closed?
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
def report_performed_operation(operation)
|
|
277
|
-
file = operation.file
|
|
278
|
-
|
|
279
|
-
if file.warnings.any?
|
|
280
|
-
warning_message =
|
|
281
|
-
operation.as_synced_message +
|
|
282
|
-
UnsupportedScriptWarning.new(@ctx, file).to_s
|
|
283
|
-
|
|
284
|
-
return @error_reporter.report(warning_message)
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
@standard_reporter.report(operation.as_synced_message)
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
def perform(operation)
|
|
291
|
-
return if @queue.closed?
|
|
292
|
-
|
|
293
|
-
wait_for_backoff!
|
|
294
|
-
@ctx.debug(operation.to_s)
|
|
295
|
-
|
|
296
|
-
response = send(operation.method, operation.file)
|
|
297
|
-
|
|
298
|
-
report_performed_operation(operation)
|
|
299
|
-
backoff_if_near_limit!(response)
|
|
300
|
-
rescue StandardError => error
|
|
301
|
-
handle_operation_error(operation, error)
|
|
302
|
-
ensure
|
|
303
|
-
@pending.delete(operation)
|
|
304
|
-
# Notify changes after the operation performs
|
|
305
|
-
@notifier.notify_updates([operation.file_path])
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
def update(file)
|
|
309
|
-
asset = { key: file.relative_path }
|
|
310
|
-
|
|
311
|
-
if file.text?
|
|
312
|
-
asset[:value] = file.read
|
|
313
|
-
else
|
|
314
|
-
asset[:attachment] = Base64.encode64(file.read)
|
|
315
|
-
end
|
|
316
|
-
|
|
317
|
-
path = "themes/#{@theme.id}/assets.json"
|
|
318
|
-
|
|
319
|
-
_status, body, response = api_client.put(
|
|
320
|
-
path: path,
|
|
321
|
-
body: JSON.generate(asset: asset),
|
|
322
|
-
)
|
|
323
|
-
file.warnings = body.dig("asset", "warnings")
|
|
324
|
-
|
|
325
|
-
update_checksums(body)
|
|
326
|
-
|
|
327
|
-
response
|
|
328
|
-
end
|
|
329
|
-
|
|
330
|
-
def get(file)
|
|
331
|
-
_status, body, response = api_client.get(
|
|
332
|
-
path: "themes/#{@theme.id}/assets.json",
|
|
333
|
-
query: URI.encode_www_form("asset[key]" => file.relative_path),
|
|
334
|
-
)
|
|
335
|
-
|
|
336
|
-
update_checksums(body)
|
|
337
|
-
|
|
338
|
-
attachment = body.dig("asset", "attachment")
|
|
339
|
-
if attachment
|
|
340
|
-
file.write(Base64.decode64(attachment))
|
|
341
|
-
else
|
|
342
|
-
file.write(body.dig("asset", "value"))
|
|
343
|
-
end
|
|
344
|
-
|
|
345
|
-
response
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
def delete(file)
|
|
349
|
-
_status, _body, response = api_client.delete(
|
|
350
|
-
path: "themes/#{@theme.id}/assets.json",
|
|
351
|
-
body: JSON.generate(asset: {
|
|
352
|
-
key: file.relative_path,
|
|
353
|
-
}),
|
|
354
|
-
)
|
|
355
|
-
|
|
356
|
-
checksums.delete(file) if checksums.has?(file)
|
|
357
|
-
|
|
358
|
-
response
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
def union_merge(file)
|
|
362
|
-
_status, body, response = api_client.get(
|
|
363
|
-
path: "themes/#{@theme.id}/assets.json",
|
|
364
|
-
query: URI.encode_www_form("asset[key]" => file.relative_path),
|
|
365
|
-
)
|
|
366
|
-
|
|
367
|
-
return response unless file.text?
|
|
368
|
-
|
|
369
|
-
remote_content = body.dig("asset", "value")
|
|
370
|
-
|
|
371
|
-
return response if remote_content.nil?
|
|
372
|
-
|
|
373
|
-
content = Merger.union_merge(file, remote_content)
|
|
374
|
-
|
|
375
|
-
file.write(content)
|
|
376
|
-
|
|
377
|
-
enqueue(:update, file)
|
|
378
|
-
|
|
379
|
-
response
|
|
380
|
-
end
|
|
381
|
-
|
|
382
|
-
def theme_created_at_runtime?
|
|
383
|
-
@theme.created_at_runtime?
|
|
384
|
-
end
|
|
385
|
-
|
|
386
|
-
def wait(duration)
|
|
387
|
-
sleep(duration)
|
|
388
|
-
end
|
|
389
|
-
end
|
|
390
|
-
end
|
|
391
|
-
end
|