@shopify/cli 3.69.4 → 3.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/assets/cli-ruby/LICENSE → LICENSE} +0 -2
- package/dist/{lib-CPSRXLFM.js → chunk-2HGYYNE5.js} +5 -2
- package/dist/chunk-3AOK7V27.js +3792 -0
- package/dist/{chunk-PNN7RS7Y.js → chunk-3NSN5Z4N.js} +100 -11
- package/dist/{chunk-EJGKAHVK.js → chunk-455HYBGX.js} +3 -3
- package/dist/{chunk-BMTELIUS.js → chunk-4G7SL7SU.js} +4 -4
- package/dist/{chunk-OWCYMR5Y.js → chunk-5F2WGMCL.js} +4 -4
- package/dist/{chunk-2NCWYVM4.js → chunk-5JZ5AGAQ.js} +652 -654
- package/dist/chunk-5OHM64KO.js +104 -0
- package/dist/{chunk-F54UWMGQ.js → chunk-675SL4FV.js} +3 -3
- package/dist/{chunk-WHP4CEBJ.js → chunk-AXNBVGJC.js} +20 -25
- package/dist/{chunk-KM4TMAQ2.js → chunk-BEVHUPQZ.js} +13 -9
- package/dist/{chunk-6XKWVDB6.js → chunk-CBBS4CV7.js} +3 -3
- package/dist/{chunk-YNL4XNMX.js → chunk-GJ7EWRH4.js} +4 -4
- package/dist/{chunk-N3U3EHOE.js → chunk-GV72NRZZ.js} +3 -3
- package/dist/{chunk-ZGHNMRBX.js → chunk-HSTSRNLJ.js} +121 -66
- package/dist/{chunk-ISDSND4L.js → chunk-IGH7XTG6.js} +2 -2
- package/dist/chunk-IJG6JLEF.js +28 -0
- package/dist/chunk-IJSEKDUR.js +28 -0
- package/dist/{chunk-VQ3R5DHS.js → chunk-JTWM7VKM.js} +4 -4
- package/dist/{chunk-VHEJRU4K.js → chunk-K6UZ5NEO.js} +7 -7
- package/dist/{chunk-JHVVETTP.js → chunk-KBDH6IDK.js} +19 -11
- package/dist/{chunk-7B5FNNVB.js → chunk-KJJGDUT2.js} +4 -4
- package/dist/{chunk-334DJQUN.js → chunk-KOHDI3KN.js} +7 -3
- package/dist/{chunk-MX4RJDBM.js → chunk-KYB6A4PE.js} +1 -2
- package/dist/{chunk-ORDEDRCZ.js → chunk-LMK5VFZE.js} +3 -3
- package/dist/{chunk-2JRUKBKX.js → chunk-LSQU4XJZ.js} +32 -218
- package/dist/{chunk-YPWRQ5AU.js → chunk-MG6EVKFQ.js} +3 -3
- package/dist/{chunk-K3GASX6Y.js → chunk-MHLSPYVQ.js} +3 -3
- package/dist/{chunk-27ILOE3X.js → chunk-OJOHMVV7.js} +6 -6
- package/dist/{chunk-7NPDPZ22.js → chunk-PDNTPE4N.js} +4355 -5172
- package/dist/{chunk-Y3MSANL5.js → chunk-RQJF2YRM.js} +2 -2
- package/dist/{chunk-S2IXL3EU.js → chunk-RXYE2GI3.js} +2 -2
- package/dist/chunk-SVWWKVUI.js +165 -0
- package/dist/{chunk-BRO6DC7D.js → chunk-T2BV6JEL.js} +18 -24
- package/dist/{chunk-6IATSQ3X.js → chunk-UDRKRTS4.js} +3 -3
- package/dist/{chunk-RYTZQSHH.js → chunk-VNZQKLLO.js} +2 -2
- package/dist/{chunk-UQUVQV3X.js → chunk-WLNYFGYY.js} +4 -4
- package/dist/{chunk-A3JXD7N7.js → chunk-WNDN5FAY.js} +4 -4
- package/dist/chunk-WZW6P6AO.js +105 -0
- package/dist/{chunk-TLZ4ZBH3.js → chunk-XOSZOZ3F.js} +7 -5
- package/dist/{chunk-TV5WOUSX.js → chunk-YNXUXQFM.js} +2 -2
- package/dist/{chunk-HV364V3E.js → chunk-YZA6BRN3.js} +2 -2
- package/dist/cli/commands/auth/logout.js +20 -20
- package/dist/cli/commands/auth/logout.test.js +22 -22
- package/dist/cli/commands/{demo/print-ai-prompt.d.ts → cache/clear.d.ts} +1 -1
- package/dist/cli/commands/cache/clear.js +33 -0
- package/dist/cli/commands/debug/command-flags.js +19 -19
- package/dist/cli/commands/docs/generate.js +19 -19
- package/dist/cli/commands/docs/generate.test.js +20 -20
- package/dist/cli/commands/help.js +19 -19
- package/dist/cli/commands/kitchen-sink/async.js +20 -20
- package/dist/cli/commands/kitchen-sink/async.test.js +21 -21
- package/dist/cli/commands/kitchen-sink/index.js +22 -22
- package/dist/cli/commands/kitchen-sink/index.test.js +25 -25
- package/dist/cli/commands/kitchen-sink/prompts.js +20 -20
- package/dist/cli/commands/kitchen-sink/prompts.test.js +21 -21
- package/dist/cli/commands/kitchen-sink/static.js +20 -20
- package/dist/cli/commands/kitchen-sink/static.test.js +21 -21
- package/dist/cli/commands/notifications/generate.d.ts +6 -0
- package/dist/cli/commands/notifications/generate.js +34 -0
- package/dist/cli/commands/{demo/catalog.d.ts → notifications/list.d.ts} +1 -1
- package/dist/cli/commands/notifications/list.js +34 -0
- package/dist/cli/commands/search.js +20 -20
- package/dist/cli/commands/upgrade.js +20 -20
- package/dist/cli/commands/upgrade.test.js +1 -2
- package/dist/cli/commands/version.js +20 -20
- package/dist/cli/commands/version.test.js +21 -21
- package/dist/cli/services/commands/notifications.d.ts +2 -0
- package/dist/cli/services/commands/notifications.js +29 -0
- package/dist/cli/services/commands/search.js +9 -10
- package/dist/cli/services/commands/search.test.js +10 -11
- package/dist/cli/services/commands/version.js +10 -11
- package/dist/cli/services/commands/version.test.js +12 -13
- package/dist/cli/services/kitchen-sink/async.js +9 -10
- package/dist/cli/services/kitchen-sink/prompts.js +9 -10
- package/dist/cli/services/kitchen-sink/static.js +9 -10
- package/dist/cli/services/upgrade.js +10 -11
- package/dist/cli/services/upgrade.test.js +15 -16
- package/dist/configs/all.yml +15 -0
- package/dist/configs/recommended.yml +9 -0
- package/dist/{custom-oclif-loader-TBU3GENB.js → custom-oclif-loader-U43F5H7M.js} +13 -14
- package/dist/data/filters.json +137 -19
- package/dist/data/latest.json +1 -1
- package/dist/data/manifest_theme.json +1 -0
- package/dist/data/objects.json +203 -1625
- package/dist/data/preset_blocks.json +78 -0
- package/dist/data/section.json +1 -42
- package/dist/data/shopify_system_translations.json +58 -2
- package/dist/data/tags.json +10 -0
- package/dist/data/theme_block.json +1 -19
- package/dist/{del-7ZS2Z64N.js → del-K5ZJEWTD.js} +3 -3
- package/dist/{error-handler-IL72ACEX.js → error-handler-GSXEX5NX.js} +17 -18
- package/dist/hooks/postrun.js +14 -15
- package/dist/hooks/prerun.js +16 -19
- package/dist/index.js +34605 -31345
- package/dist/lib-PPXZBVZX.js +6 -0
- package/dist/{lib-JHUCJTHS.js → lib-XYCLX35G.js} +5 -5
- package/dist/{local-OE2I46PA.js → local-STC6NEOC.js} +11 -10
- package/dist/{morph-UIXWG2S7.js → morph-SEECJQ2W.js} +3 -3
- package/dist/{node-SDBKEHIV.js → node-I54BR73K.js} +21 -21
- package/dist/{node-package-manager-LPDV6HZY.js → node-package-manager-DUWCXRNZ.js} +10 -11
- package/dist/{out-ZDSLKX4N.js → out-MHEKZJWS.js} +2 -2
- package/dist/{path-T2RCZTRE.js → path-5SZGULBR.js} +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-WB42ZV4M.js → ui-GZXRHEXO.js} +9 -10
- package/dist/{workerd-YWTPL4SF.js → workerd-WQ2CUXFS.js} +23 -23
- package/oclif.manifest.json +393 -223
- package/package.json +7 -8
- package/assets/demo-catalog.json +0 -655
- 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
- package/dist/assets/demo-catalog.json +0 -655
- package/dist/chunk-CPEFXM7T.js +0 -45
- package/dist/chunk-FVUAIT37.js +0 -312
- package/dist/chunk-FWX3KCDM.js +0 -116
- package/dist/chunk-FX2HB3CJ.js +0 -58
- package/dist/chunk-GYP4MV72.js +0 -59
- package/dist/chunk-NLUGD7PZ.js +0 -2731
- package/dist/chunk-P7JUHQKL.js +0 -115
- package/dist/chunk-QSUS3GJF.js +0 -3838
- package/dist/chunk-T2GATXSP.js +0 -112
- package/dist/cli/commands/demo/catalog.js +0 -34
- package/dist/cli/commands/demo/generate-file.d.ts +0 -11
- package/dist/cli/commands/demo/generate-file.js +0 -35
- package/dist/cli/commands/demo/index.d.ts +0 -10
- package/dist/cli/commands/demo/index.js +0 -34
- package/dist/cli/commands/demo/print-ai-prompt.js +0 -35
- package/dist/cli/services/demo.d.ts +0 -26440
- package/dist/cli/services/demo.js +0 -25
- package/dist/cli/services/demo.test.js +0 -42
- package/dist/constants-T7JXE5K7.js +0 -24
- package/dist/system-SGABHAU2.js +0 -29
|
@@ -1,564 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
#
|
|
3
|
-
# httpresponse.rb -- HTTPResponse Class
|
|
4
|
-
#
|
|
5
|
-
# Author: IPR -- Internet Programming with Ruby -- writers
|
|
6
|
-
# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
|
|
7
|
-
# Copyright (c) 2002 Internet Programming with Ruby writers. All rights
|
|
8
|
-
# reserved.
|
|
9
|
-
#
|
|
10
|
-
# $IPR: httpresponse.rb,v 1.45 2003/07/11 11:02:25 gotoyuzo Exp $
|
|
11
|
-
|
|
12
|
-
require 'time'
|
|
13
|
-
require 'uri'
|
|
14
|
-
require_relative 'httpversion'
|
|
15
|
-
require_relative 'htmlutils'
|
|
16
|
-
require_relative 'httputils'
|
|
17
|
-
require_relative 'httpstatus'
|
|
18
|
-
|
|
19
|
-
module WEBrick
|
|
20
|
-
##
|
|
21
|
-
# An HTTP response. This is filled in by the service or do_* methods of a
|
|
22
|
-
# WEBrick HTTP Servlet.
|
|
23
|
-
|
|
24
|
-
class HTTPResponse
|
|
25
|
-
class InvalidHeader < StandardError
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
# HTTP Response version
|
|
30
|
-
|
|
31
|
-
attr_reader :http_version
|
|
32
|
-
|
|
33
|
-
##
|
|
34
|
-
# Response status code (200)
|
|
35
|
-
|
|
36
|
-
attr_reader :status
|
|
37
|
-
|
|
38
|
-
##
|
|
39
|
-
# Response header
|
|
40
|
-
|
|
41
|
-
attr_reader :header
|
|
42
|
-
|
|
43
|
-
##
|
|
44
|
-
# Response cookies
|
|
45
|
-
|
|
46
|
-
attr_reader :cookies
|
|
47
|
-
|
|
48
|
-
##
|
|
49
|
-
# Response reason phrase ("OK")
|
|
50
|
-
|
|
51
|
-
attr_accessor :reason_phrase
|
|
52
|
-
|
|
53
|
-
##
|
|
54
|
-
# Body may be:
|
|
55
|
-
# * a String;
|
|
56
|
-
# * an IO-like object that responds to +#read+ and +#readpartial+;
|
|
57
|
-
# * a Proc-like object that responds to +#call+.
|
|
58
|
-
#
|
|
59
|
-
# In the latter case, either #chunked= should be set to +true+,
|
|
60
|
-
# or <code>header['content-length']</code> explicitly provided.
|
|
61
|
-
# Example:
|
|
62
|
-
#
|
|
63
|
-
# server.mount_proc '/' do |req, res|
|
|
64
|
-
# res.chunked = true
|
|
65
|
-
# # or
|
|
66
|
-
# # res.header['content-length'] = 10
|
|
67
|
-
# res.body = proc { |out| out.write(Time.now.to_s) }
|
|
68
|
-
# end
|
|
69
|
-
|
|
70
|
-
attr_accessor :body
|
|
71
|
-
|
|
72
|
-
##
|
|
73
|
-
# Request method for this response
|
|
74
|
-
|
|
75
|
-
attr_accessor :request_method
|
|
76
|
-
|
|
77
|
-
##
|
|
78
|
-
# Request URI for this response
|
|
79
|
-
|
|
80
|
-
attr_accessor :request_uri
|
|
81
|
-
|
|
82
|
-
##
|
|
83
|
-
# Request HTTP version for this response
|
|
84
|
-
|
|
85
|
-
attr_accessor :request_http_version
|
|
86
|
-
|
|
87
|
-
##
|
|
88
|
-
# Filename of the static file in this response. Only used by the
|
|
89
|
-
# FileHandler servlet.
|
|
90
|
-
|
|
91
|
-
attr_accessor :filename
|
|
92
|
-
|
|
93
|
-
##
|
|
94
|
-
# Is this a keep-alive response?
|
|
95
|
-
|
|
96
|
-
attr_accessor :keep_alive
|
|
97
|
-
|
|
98
|
-
##
|
|
99
|
-
# Configuration for this response
|
|
100
|
-
|
|
101
|
-
attr_reader :config
|
|
102
|
-
|
|
103
|
-
##
|
|
104
|
-
# Bytes sent in this response
|
|
105
|
-
|
|
106
|
-
attr_reader :sent_size
|
|
107
|
-
|
|
108
|
-
##
|
|
109
|
-
# Creates a new HTTP response object. WEBrick::Config::HTTP is the
|
|
110
|
-
# default configuration.
|
|
111
|
-
|
|
112
|
-
def initialize(config)
|
|
113
|
-
@config = config
|
|
114
|
-
@buffer_size = config[:OutputBufferSize]
|
|
115
|
-
@logger = config[:Logger]
|
|
116
|
-
@header = Hash.new
|
|
117
|
-
@status = HTTPStatus::RC_OK
|
|
118
|
-
@reason_phrase = nil
|
|
119
|
-
@http_version = HTTPVersion::convert(@config[:HTTPVersion])
|
|
120
|
-
@body = ''
|
|
121
|
-
@keep_alive = true
|
|
122
|
-
@cookies = []
|
|
123
|
-
@request_method = nil
|
|
124
|
-
@request_uri = nil
|
|
125
|
-
@request_http_version = @http_version # temporary
|
|
126
|
-
@chunked = false
|
|
127
|
-
@filename = nil
|
|
128
|
-
@sent_size = 0
|
|
129
|
-
@bodytempfile = nil
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
##
|
|
133
|
-
# The response's HTTP status line
|
|
134
|
-
|
|
135
|
-
def status_line
|
|
136
|
-
"HTTP/#@http_version #@status #@reason_phrase".rstrip << CRLF
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
##
|
|
140
|
-
# Sets the response's status to the +status+ code
|
|
141
|
-
|
|
142
|
-
def status=(status)
|
|
143
|
-
@status = status
|
|
144
|
-
@reason_phrase = HTTPStatus::reason_phrase(status)
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
##
|
|
148
|
-
# Retrieves the response header +field+
|
|
149
|
-
|
|
150
|
-
def [](field)
|
|
151
|
-
@header[field.downcase]
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
##
|
|
155
|
-
# Sets the response header +field+ to +value+
|
|
156
|
-
|
|
157
|
-
def []=(field, value)
|
|
158
|
-
@chunked = value.to_s.downcase == 'chunked' if field.downcase == 'transfer-encoding'
|
|
159
|
-
@header[field.downcase] = value.to_s
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
##
|
|
163
|
-
# The content-length header
|
|
164
|
-
|
|
165
|
-
def content_length
|
|
166
|
-
if len = self['content-length']
|
|
167
|
-
return Integer(len)
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
##
|
|
172
|
-
# Sets the content-length header to +len+
|
|
173
|
-
|
|
174
|
-
def content_length=(len)
|
|
175
|
-
self['content-length'] = len.to_s
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
##
|
|
179
|
-
# The content-type header
|
|
180
|
-
|
|
181
|
-
def content_type
|
|
182
|
-
self['content-type']
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
##
|
|
186
|
-
# Sets the content-type header to +type+
|
|
187
|
-
|
|
188
|
-
def content_type=(type)
|
|
189
|
-
self['content-type'] = type
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
##
|
|
193
|
-
# Iterates over each header in the response
|
|
194
|
-
|
|
195
|
-
def each
|
|
196
|
-
@header.each{|field, value| yield(field, value) }
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
##
|
|
200
|
-
# Will this response body be returned using chunked transfer-encoding?
|
|
201
|
-
|
|
202
|
-
def chunked?
|
|
203
|
-
@chunked
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
##
|
|
207
|
-
# Enables chunked transfer encoding.
|
|
208
|
-
|
|
209
|
-
def chunked=(val)
|
|
210
|
-
@chunked = val ? true : false
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
##
|
|
214
|
-
# Will this response's connection be kept alive?
|
|
215
|
-
|
|
216
|
-
def keep_alive?
|
|
217
|
-
@keep_alive
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
##
|
|
221
|
-
# Sends the response on +socket+
|
|
222
|
-
|
|
223
|
-
def send_response(socket) # :nodoc:
|
|
224
|
-
begin
|
|
225
|
-
setup_header()
|
|
226
|
-
send_header(socket)
|
|
227
|
-
send_body(socket)
|
|
228
|
-
rescue Errno::EPIPE, Errno::ECONNRESET, Errno::ENOTCONN => ex
|
|
229
|
-
@logger.debug(ex)
|
|
230
|
-
@keep_alive = false
|
|
231
|
-
rescue Exception => ex
|
|
232
|
-
@logger.error(ex)
|
|
233
|
-
@keep_alive = false
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
##
|
|
238
|
-
# Sets up the headers for sending
|
|
239
|
-
|
|
240
|
-
def setup_header() # :nodoc:
|
|
241
|
-
@reason_phrase ||= HTTPStatus::reason_phrase(@status)
|
|
242
|
-
@header['server'] ||= @config[:ServerSoftware]
|
|
243
|
-
@header['date'] ||= Time.now.httpdate
|
|
244
|
-
|
|
245
|
-
# HTTP/0.9 features
|
|
246
|
-
if @request_http_version < "1.0"
|
|
247
|
-
@http_version = HTTPVersion.new("0.9")
|
|
248
|
-
@keep_alive = false
|
|
249
|
-
end
|
|
250
|
-
|
|
251
|
-
# HTTP/1.0 features
|
|
252
|
-
if @request_http_version < "1.1"
|
|
253
|
-
if chunked?
|
|
254
|
-
@chunked = false
|
|
255
|
-
ver = @request_http_version.to_s
|
|
256
|
-
msg = "chunked is set for an HTTP/#{ver} request. (ignored)"
|
|
257
|
-
@logger.warn(msg)
|
|
258
|
-
end
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
# Determine the message length (RFC2616 -- 4.4 Message Length)
|
|
262
|
-
if @status == 304 || @status == 204 || HTTPStatus::info?(@status)
|
|
263
|
-
@header.delete('content-length')
|
|
264
|
-
@body = ""
|
|
265
|
-
elsif chunked?
|
|
266
|
-
@header["transfer-encoding"] = "chunked"
|
|
267
|
-
@header.delete('content-length')
|
|
268
|
-
elsif %r{^multipart/byteranges} =~ @header['content-type']
|
|
269
|
-
@header.delete('content-length')
|
|
270
|
-
elsif @header['content-length'].nil?
|
|
271
|
-
if @body.respond_to? :readpartial
|
|
272
|
-
elsif @body.respond_to? :call
|
|
273
|
-
make_body_tempfile
|
|
274
|
-
else
|
|
275
|
-
@header['content-length'] = (@body ? @body.bytesize : 0).to_s
|
|
276
|
-
end
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
# Keep-Alive connection.
|
|
280
|
-
if @header['connection'] == "close"
|
|
281
|
-
@keep_alive = false
|
|
282
|
-
elsif keep_alive?
|
|
283
|
-
if chunked? || @header['content-length'] || @status == 304 || @status == 204 || HTTPStatus.info?(@status)
|
|
284
|
-
@header['connection'] = "Keep-Alive"
|
|
285
|
-
else
|
|
286
|
-
msg = "Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true"
|
|
287
|
-
@logger.warn(msg)
|
|
288
|
-
@header['connection'] = "close"
|
|
289
|
-
@keep_alive = false
|
|
290
|
-
end
|
|
291
|
-
else
|
|
292
|
-
@header['connection'] = "close"
|
|
293
|
-
end
|
|
294
|
-
|
|
295
|
-
# Location is a single absoluteURI.
|
|
296
|
-
if location = @header['location']
|
|
297
|
-
if @request_uri
|
|
298
|
-
@header['location'] = @request_uri.merge(location).to_s
|
|
299
|
-
end
|
|
300
|
-
end
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
def make_body_tempfile # :nodoc:
|
|
304
|
-
return if @bodytempfile
|
|
305
|
-
bodytempfile = Tempfile.create("webrick")
|
|
306
|
-
if @body.nil?
|
|
307
|
-
# nothing
|
|
308
|
-
elsif @body.respond_to? :readpartial
|
|
309
|
-
IO.copy_stream(@body, bodytempfile)
|
|
310
|
-
@body.close
|
|
311
|
-
elsif @body.respond_to? :call
|
|
312
|
-
@body.call(bodytempfile)
|
|
313
|
-
else
|
|
314
|
-
bodytempfile.write @body
|
|
315
|
-
end
|
|
316
|
-
bodytempfile.rewind
|
|
317
|
-
@body = @bodytempfile = bodytempfile
|
|
318
|
-
@header['content-length'] = bodytempfile.stat.size.to_s
|
|
319
|
-
end
|
|
320
|
-
|
|
321
|
-
def remove_body_tempfile # :nodoc:
|
|
322
|
-
if @bodytempfile
|
|
323
|
-
@bodytempfile.close
|
|
324
|
-
File.unlink @bodytempfile.path
|
|
325
|
-
@bodytempfile = nil
|
|
326
|
-
end
|
|
327
|
-
end
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
##
|
|
331
|
-
# Sends the headers on +socket+
|
|
332
|
-
|
|
333
|
-
def send_header(socket) # :nodoc:
|
|
334
|
-
if @http_version.major > 0
|
|
335
|
-
data = status_line().dup
|
|
336
|
-
@header.each{|key, value|
|
|
337
|
-
tmp = key.gsub(/\bwww|^te$|\b\w/){ $&.upcase }
|
|
338
|
-
data << "#{tmp}: #{check_header(value)}" << CRLF
|
|
339
|
-
}
|
|
340
|
-
@cookies.each{|cookie|
|
|
341
|
-
data << "Set-Cookie: " << check_header(cookie.to_s) << CRLF
|
|
342
|
-
}
|
|
343
|
-
data << CRLF
|
|
344
|
-
socket.write(data)
|
|
345
|
-
end
|
|
346
|
-
rescue InvalidHeader => e
|
|
347
|
-
@header.clear
|
|
348
|
-
@cookies.clear
|
|
349
|
-
set_error e
|
|
350
|
-
retry
|
|
351
|
-
end
|
|
352
|
-
|
|
353
|
-
##
|
|
354
|
-
# Sends the body on +socket+
|
|
355
|
-
|
|
356
|
-
def send_body(socket) # :nodoc:
|
|
357
|
-
if @body.respond_to? :readpartial then
|
|
358
|
-
send_body_io(socket)
|
|
359
|
-
elsif @body.respond_to?(:call) then
|
|
360
|
-
send_body_proc(socket)
|
|
361
|
-
else
|
|
362
|
-
send_body_string(socket)
|
|
363
|
-
end
|
|
364
|
-
end
|
|
365
|
-
|
|
366
|
-
##
|
|
367
|
-
# Redirects to +url+ with a WEBrick::HTTPStatus::Redirect +status+.
|
|
368
|
-
#
|
|
369
|
-
# Example:
|
|
370
|
-
#
|
|
371
|
-
# res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect
|
|
372
|
-
|
|
373
|
-
def set_redirect(status, url)
|
|
374
|
-
url = URI(url).to_s
|
|
375
|
-
@body = "<HTML><A HREF=\"#{url}\">#{url}</A>.</HTML>\n"
|
|
376
|
-
@header['location'] = url
|
|
377
|
-
raise status
|
|
378
|
-
end
|
|
379
|
-
|
|
380
|
-
##
|
|
381
|
-
# Creates an error page for exception +ex+ with an optional +backtrace+
|
|
382
|
-
|
|
383
|
-
def set_error(ex, backtrace=false)
|
|
384
|
-
case ex
|
|
385
|
-
when HTTPStatus::Status
|
|
386
|
-
@keep_alive = false if HTTPStatus::error?(ex.code)
|
|
387
|
-
self.status = ex.code
|
|
388
|
-
else
|
|
389
|
-
@keep_alive = false
|
|
390
|
-
self.status = HTTPStatus::RC_INTERNAL_SERVER_ERROR
|
|
391
|
-
end
|
|
392
|
-
@header['content-type'] = "text/html; charset=ISO-8859-1"
|
|
393
|
-
|
|
394
|
-
if respond_to?(:create_error_page)
|
|
395
|
-
create_error_page()
|
|
396
|
-
return
|
|
397
|
-
end
|
|
398
|
-
|
|
399
|
-
if @request_uri
|
|
400
|
-
host, port = @request_uri.host, @request_uri.port
|
|
401
|
-
else
|
|
402
|
-
host, port = @config[:ServerName], @config[:Port]
|
|
403
|
-
end
|
|
404
|
-
|
|
405
|
-
error_body(backtrace, ex, host, port)
|
|
406
|
-
end
|
|
407
|
-
|
|
408
|
-
private
|
|
409
|
-
|
|
410
|
-
def check_header(header_value)
|
|
411
|
-
header_value = header_value.to_s
|
|
412
|
-
if /[\r\n]/ =~ header_value
|
|
413
|
-
raise InvalidHeader
|
|
414
|
-
else
|
|
415
|
-
header_value
|
|
416
|
-
end
|
|
417
|
-
end
|
|
418
|
-
|
|
419
|
-
# :stopdoc:
|
|
420
|
-
|
|
421
|
-
def error_body(backtrace, ex, host, port)
|
|
422
|
-
@body = +''
|
|
423
|
-
@body << <<-_end_of_html_
|
|
424
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
425
|
-
<HTML>
|
|
426
|
-
<HEAD><TITLE>#{HTMLUtils::escape(@reason_phrase)}</TITLE></HEAD>
|
|
427
|
-
<BODY>
|
|
428
|
-
<H1>#{HTMLUtils::escape(@reason_phrase)}</H1>
|
|
429
|
-
#{HTMLUtils::escape(ex.message)}
|
|
430
|
-
<HR>
|
|
431
|
-
_end_of_html_
|
|
432
|
-
|
|
433
|
-
if backtrace && $DEBUG
|
|
434
|
-
@body << "backtrace of `#{HTMLUtils::escape(ex.class.to_s)}' "
|
|
435
|
-
@body << "#{HTMLUtils::escape(ex.message)}"
|
|
436
|
-
@body << "<PRE>"
|
|
437
|
-
ex.backtrace.each{|line| @body << "\t#{line}\n"}
|
|
438
|
-
@body << "</PRE><HR>"
|
|
439
|
-
end
|
|
440
|
-
|
|
441
|
-
@body << <<-_end_of_html_
|
|
442
|
-
<ADDRESS>
|
|
443
|
-
#{HTMLUtils::escape(@config[:ServerSoftware])} at
|
|
444
|
-
#{host}:#{port}
|
|
445
|
-
</ADDRESS>
|
|
446
|
-
</BODY>
|
|
447
|
-
</HTML>
|
|
448
|
-
_end_of_html_
|
|
449
|
-
end
|
|
450
|
-
|
|
451
|
-
def send_body_io(socket)
|
|
452
|
-
begin
|
|
453
|
-
if @request_method == "HEAD"
|
|
454
|
-
# do nothing
|
|
455
|
-
elsif chunked?
|
|
456
|
-
buf = +''
|
|
457
|
-
begin
|
|
458
|
-
@body.readpartial(@buffer_size, buf)
|
|
459
|
-
size = buf.bytesize
|
|
460
|
-
data = +"#{size.to_s(16)}#{CRLF}#{buf}#{CRLF}"
|
|
461
|
-
socket.write(data)
|
|
462
|
-
data.clear
|
|
463
|
-
@sent_size += size
|
|
464
|
-
rescue EOFError
|
|
465
|
-
break
|
|
466
|
-
end while true
|
|
467
|
-
buf.clear
|
|
468
|
-
socket.write("0#{CRLF}#{CRLF}")
|
|
469
|
-
else
|
|
470
|
-
if %r{\Abytes (\d+)-(\d+)/\d+\z} =~ @header['content-range']
|
|
471
|
-
offset = $1.to_i
|
|
472
|
-
size = $2.to_i - offset + 1
|
|
473
|
-
else
|
|
474
|
-
offset = nil
|
|
475
|
-
size = @header['content-length']
|
|
476
|
-
size = size.to_i if size
|
|
477
|
-
end
|
|
478
|
-
begin
|
|
479
|
-
@sent_size = IO.copy_stream(@body, socket, size, offset)
|
|
480
|
-
rescue NotImplementedError
|
|
481
|
-
@body.seek(offset, IO::SEEK_SET)
|
|
482
|
-
@sent_size = IO.copy_stream(@body, socket, size)
|
|
483
|
-
end
|
|
484
|
-
end
|
|
485
|
-
ensure
|
|
486
|
-
@body.close
|
|
487
|
-
end
|
|
488
|
-
remove_body_tempfile
|
|
489
|
-
end
|
|
490
|
-
|
|
491
|
-
def send_body_string(socket)
|
|
492
|
-
if @request_method == "HEAD"
|
|
493
|
-
# do nothing
|
|
494
|
-
elsif chunked?
|
|
495
|
-
body ? @body.bytesize : 0
|
|
496
|
-
while buf = @body[@sent_size, @buffer_size]
|
|
497
|
-
break if buf.empty?
|
|
498
|
-
size = buf.bytesize
|
|
499
|
-
data = "#{size.to_s(16)}#{CRLF}#{buf}#{CRLF}"
|
|
500
|
-
buf.clear
|
|
501
|
-
socket.write(data)
|
|
502
|
-
@sent_size += size
|
|
503
|
-
end
|
|
504
|
-
socket.write("0#{CRLF}#{CRLF}")
|
|
505
|
-
else
|
|
506
|
-
if @body && @body.bytesize > 0
|
|
507
|
-
socket.write(@body)
|
|
508
|
-
@sent_size = @body.bytesize
|
|
509
|
-
end
|
|
510
|
-
end
|
|
511
|
-
end
|
|
512
|
-
|
|
513
|
-
def send_body_proc(socket)
|
|
514
|
-
if @request_method == "HEAD"
|
|
515
|
-
# do nothing
|
|
516
|
-
elsif chunked?
|
|
517
|
-
@body.call(ChunkedWrapper.new(socket, self))
|
|
518
|
-
socket.write("0#{CRLF}#{CRLF}")
|
|
519
|
-
else
|
|
520
|
-
size = @header['content-length'].to_i
|
|
521
|
-
if @bodytempfile
|
|
522
|
-
@bodytempfile.rewind
|
|
523
|
-
IO.copy_stream(@bodytempfile, socket)
|
|
524
|
-
else
|
|
525
|
-
@body.call(socket)
|
|
526
|
-
end
|
|
527
|
-
@sent_size = size
|
|
528
|
-
end
|
|
529
|
-
end
|
|
530
|
-
|
|
531
|
-
class ChunkedWrapper
|
|
532
|
-
def initialize(socket, resp)
|
|
533
|
-
@socket = socket
|
|
534
|
-
@resp = resp
|
|
535
|
-
end
|
|
536
|
-
|
|
537
|
-
def write(buf)
|
|
538
|
-
return 0 if buf.empty?
|
|
539
|
-
socket = @socket
|
|
540
|
-
@resp.instance_eval {
|
|
541
|
-
size = buf.bytesize
|
|
542
|
-
data = +"#{size.to_s(16)}#{CRLF}#{buf}#{CRLF}"
|
|
543
|
-
socket.write(data)
|
|
544
|
-
data.clear
|
|
545
|
-
@sent_size += size
|
|
546
|
-
size
|
|
547
|
-
}
|
|
548
|
-
end
|
|
549
|
-
|
|
550
|
-
def <<(*buf)
|
|
551
|
-
write(buf)
|
|
552
|
-
self
|
|
553
|
-
end
|
|
554
|
-
end
|
|
555
|
-
|
|
556
|
-
# preserved for compatibility with some 3rd-party handlers
|
|
557
|
-
def _write_data(socket, data)
|
|
558
|
-
socket << data
|
|
559
|
-
end
|
|
560
|
-
|
|
561
|
-
# :startdoc:
|
|
562
|
-
end
|
|
563
|
-
|
|
564
|
-
end
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
#
|
|
3
|
-
# https.rb -- SSL/TLS enhancement for HTTPServer
|
|
4
|
-
#
|
|
5
|
-
# Author: IPR -- Internet Programming with Ruby -- writers
|
|
6
|
-
# Copyright (c) 2001 GOTOU Yuuzou
|
|
7
|
-
# Copyright (c) 2002 Internet Programming with Ruby writers. All rights
|
|
8
|
-
# reserved.
|
|
9
|
-
#
|
|
10
|
-
# $IPR: https.rb,v 1.15 2003/07/22 19:20:42 gotoyuzo Exp $
|
|
11
|
-
|
|
12
|
-
require_relative 'ssl'
|
|
13
|
-
require_relative 'httpserver'
|
|
14
|
-
|
|
15
|
-
module WEBrick
|
|
16
|
-
module Config
|
|
17
|
-
HTTP.update(SSL)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
#--
|
|
22
|
-
# Adds SSL functionality to WEBrick::HTTPRequest
|
|
23
|
-
|
|
24
|
-
class HTTPRequest
|
|
25
|
-
|
|
26
|
-
##
|
|
27
|
-
# HTTP request SSL cipher
|
|
28
|
-
|
|
29
|
-
attr_reader :cipher
|
|
30
|
-
|
|
31
|
-
##
|
|
32
|
-
# HTTP request server certificate
|
|
33
|
-
|
|
34
|
-
attr_reader :server_cert
|
|
35
|
-
|
|
36
|
-
##
|
|
37
|
-
# HTTP request client certificate
|
|
38
|
-
|
|
39
|
-
attr_reader :client_cert
|
|
40
|
-
|
|
41
|
-
# :stopdoc:
|
|
42
|
-
|
|
43
|
-
alias orig_parse parse
|
|
44
|
-
|
|
45
|
-
def parse(socket=nil)
|
|
46
|
-
if socket.respond_to?(:cert)
|
|
47
|
-
@server_cert = socket.cert || @config[:SSLCertificate]
|
|
48
|
-
@client_cert = socket.peer_cert
|
|
49
|
-
@client_cert_chain = socket.peer_cert_chain
|
|
50
|
-
@cipher = socket.cipher
|
|
51
|
-
end
|
|
52
|
-
orig_parse(socket)
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
alias orig_parse_uri parse_uri
|
|
56
|
-
|
|
57
|
-
def parse_uri(str, scheme="https")
|
|
58
|
-
if server_cert
|
|
59
|
-
return orig_parse_uri(str, scheme)
|
|
60
|
-
end
|
|
61
|
-
return orig_parse_uri(str)
|
|
62
|
-
end
|
|
63
|
-
private :parse_uri
|
|
64
|
-
|
|
65
|
-
alias orig_meta_vars meta_vars
|
|
66
|
-
|
|
67
|
-
def meta_vars
|
|
68
|
-
meta = orig_meta_vars
|
|
69
|
-
if server_cert
|
|
70
|
-
meta["HTTPS"] = "on"
|
|
71
|
-
meta["SSL_SERVER_CERT"] = @server_cert.to_pem
|
|
72
|
-
meta["SSL_CLIENT_CERT"] = @client_cert ? @client_cert.to_pem : ""
|
|
73
|
-
if @client_cert_chain
|
|
74
|
-
@client_cert_chain.each_with_index{|cert, i|
|
|
75
|
-
meta["SSL_CLIENT_CERT_CHAIN_#{i}"] = cert.to_pem
|
|
76
|
-
}
|
|
77
|
-
end
|
|
78
|
-
meta["SSL_CIPHER"] = @cipher[0]
|
|
79
|
-
meta["SSL_PROTOCOL"] = @cipher[1]
|
|
80
|
-
meta["SSL_CIPHER_USEKEYSIZE"] = @cipher[2].to_s
|
|
81
|
-
meta["SSL_CIPHER_ALGKEYSIZE"] = @cipher[3].to_s
|
|
82
|
-
end
|
|
83
|
-
meta
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# :startdoc:
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
##
|
|
90
|
-
#--
|
|
91
|
-
# Fake WEBrick::HTTPRequest for lookup_server
|
|
92
|
-
|
|
93
|
-
class SNIRequest
|
|
94
|
-
|
|
95
|
-
##
|
|
96
|
-
# The SNI hostname
|
|
97
|
-
|
|
98
|
-
attr_reader :host
|
|
99
|
-
|
|
100
|
-
##
|
|
101
|
-
# The socket address of the server
|
|
102
|
-
|
|
103
|
-
attr_reader :addr
|
|
104
|
-
|
|
105
|
-
##
|
|
106
|
-
# The port this request is for
|
|
107
|
-
|
|
108
|
-
attr_reader :port
|
|
109
|
-
|
|
110
|
-
##
|
|
111
|
-
# Creates a new SNIRequest.
|
|
112
|
-
|
|
113
|
-
def initialize(sslsocket, hostname)
|
|
114
|
-
@host = hostname
|
|
115
|
-
@addr = sslsocket.addr
|
|
116
|
-
@port = @addr[1]
|
|
117
|
-
end
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
##
|
|
122
|
-
#--
|
|
123
|
-
# Adds SSL functionality to WEBrick::HTTPServer
|
|
124
|
-
|
|
125
|
-
class HTTPServer < ::WEBrick::GenericServer
|
|
126
|
-
##
|
|
127
|
-
# ServerNameIndication callback
|
|
128
|
-
|
|
129
|
-
def ssl_servername_callback(sslsocket, hostname = nil)
|
|
130
|
-
req = SNIRequest.new(sslsocket, hostname)
|
|
131
|
-
server = lookup_server(req)
|
|
132
|
-
server ? server.ssl_context : nil
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
# :stopdoc:
|
|
136
|
-
|
|
137
|
-
##
|
|
138
|
-
# Check whether +server+ is also SSL server.
|
|
139
|
-
# Also +server+'s SSL context will be created.
|
|
140
|
-
|
|
141
|
-
alias orig_virtual_host virtual_host
|
|
142
|
-
|
|
143
|
-
def virtual_host(server)
|
|
144
|
-
if @config[:SSLEnable] && !server.ssl_context
|
|
145
|
-
raise ArgumentError, "virtual host must set SSLEnable to true"
|
|
146
|
-
end
|
|
147
|
-
orig_virtual_host(server)
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
# :startdoc:
|
|
151
|
-
end
|
|
152
|
-
end
|