@shopify/cli 3.69.4 → 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/chunk-2PUMVRDO.js +131 -0
- package/dist/{chunk-KM4TMAQ2.js → chunk-335KXO4I.js} +12 -8
- package/dist/{chunk-HV364V3E.js → chunk-43YGIE7Y.js} +2 -2
- package/dist/chunk-47OJGAFT.js +28 -0
- package/dist/chunk-5OP2SA7G.js +3634 -0
- package/dist/{chunk-YNL4XNMX.js → chunk-5QQTRGJ7.js} +4 -4
- package/dist/{chunk-FWX3KCDM.js → chunk-7GNQ7YY4.js} +7 -7
- package/dist/{chunk-2JRUKBKX.js → chunk-AT4IG4GJ.js} +32 -216
- package/dist/{chunk-BMTELIUS.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-FX2HB3CJ.js → chunk-E2SYFYJU.js} +4 -4
- package/dist/{chunk-JHVVETTP.js → chunk-FDJVVEGH.js} +17 -7
- package/dist/{chunk-7NPDPZ22.js → chunk-GDYKHT64.js} +2610 -6199
- package/dist/{chunk-EJGKAHVK.js → chunk-I3IIDOBX.js} +3 -3
- package/dist/{chunk-ISDSND4L.js → chunk-JLK5OMFF.js} +2 -2
- package/dist/{chunk-N3U3EHOE.js → chunk-KYBCPKPL.js} +3 -3
- package/dist/{chunk-S2IXL3EU.js → chunk-LN444KRM.js} +2 -2
- package/dist/chunk-MH5JSAVK.js +28 -0
- package/dist/{chunk-TLZ4ZBH3.js → chunk-MMQOVZDR.js} +6 -4
- package/dist/{chunk-UQUVQV3X.js → chunk-MQXHFQM3.js} +4 -4
- package/dist/{chunk-F54UWMGQ.js → chunk-MRDDDATQ.js} +3 -3
- package/dist/{chunk-6IATSQ3X.js → chunk-N2DEYZD6.js} +3 -3
- package/dist/{chunk-334DJQUN.js → chunk-N4X7XQWN.js} +2 -2
- package/dist/{chunk-YPWRQ5AU.js → chunk-ND6AGPC6.js} +3 -3
- package/dist/{chunk-A3JXD7N7.js → chunk-NEOIQ6PN.js} +3 -3
- package/dist/{chunk-OWCYMR5Y.js → chunk-NH4U4X67.js} +3 -3
- package/dist/{chunk-VQ3R5DHS.js → chunk-NYFXBTWK.js} +3 -3
- package/dist/{chunk-GYP4MV72.js → chunk-P6ABWRKD.js} +7 -7
- package/dist/{chunk-2NCWYVM4.js → chunk-PJKCWDDX.js} +117 -117
- package/dist/{chunk-VHEJRU4K.js → chunk-PKE54TAY.js} +5 -5
- package/dist/{chunk-FVUAIT37.js → chunk-RUK73IAH.js} +2 -2
- package/dist/{chunk-RYTZQSHH.js → chunk-SYRHCENA.js} +2 -2
- package/dist/{chunk-K3GASX6Y.js → chunk-TCTXUAZT.js} +3 -3
- package/dist/chunk-UOZCMFCN.js +160 -0
- package/dist/{chunk-7B5FNNVB.js → chunk-VFQMUAHB.js} +4 -4
- package/dist/{chunk-ORDEDRCZ.js → chunk-VHAXHYTL.js} +3 -3
- package/dist/{chunk-CPEFXM7T.js → chunk-VT3VJHZ7.js} +4 -4
- package/dist/{chunk-TV5WOUSX.js → chunk-WI6MEN7U.js} +2 -2
- package/dist/{chunk-WHP4CEBJ.js → chunk-WN3FKMKB.js} +14 -14
- package/dist/{chunk-Y3MSANL5.js → chunk-X6F3DHKX.js} +2 -2
- package/dist/{chunk-P7JUHQKL.js → chunk-XEDHKQZA.js} +4 -3
- package/dist/{chunk-BRO6DC7D.js → chunk-XSMWYZDC.js} +17 -23
- 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-TBU3GENB.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-IL72ACEX.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 +9901 -8692
- package/dist/{lib-JHUCJTHS.js → lib-JJXX7GH6.js} +5 -5
- package/dist/{local-OE2I46PA.js → local-QD6GDUUE.js} +9 -9
- package/dist/{morph-UIXWG2S7.js → morph-FN23MJ2S.js} +2 -2
- package/dist/{node-SDBKEHIV.js → node-4XKDIIJ7.js} +21 -19
- package/dist/{node-package-manager-LPDV6HZY.js → node-package-manager-IEZ6F5VN.js} +10 -10
- package/dist/{system-SGABHAU2.js → system-KSIGUX64.js} +9 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-WB42ZV4M.js → ui-BUB4OWO7.js} +9 -9
- package/dist/{workerd-YWTPL4SF.js → workerd-DIIGDIHZ.js} +21 -19
- package/oclif.manifest.json +60 -93
- package/package.json +6 -6
- 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,395 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
#
|
|
3
|
-
# httpauth/digestauth.rb -- HTTP digest access authentication
|
|
4
|
-
#
|
|
5
|
-
# Author: IPR -- Internet Programming with Ruby -- writers
|
|
6
|
-
# Copyright (c) 2003 Internet Programming with Ruby writers.
|
|
7
|
-
# Copyright (c) 2003 H.M.
|
|
8
|
-
#
|
|
9
|
-
# The original implementation is provided by H.M.
|
|
10
|
-
# URL: http://rwiki.jin.gr.jp/cgi-bin/rw-cgi.rb?cmd=view;name=
|
|
11
|
-
# %C7%A7%BE%DA%B5%A1%C7%BD%A4%F2%B2%FE%C2%A4%A4%B7%A4%C6%A4%DF%A4%EB
|
|
12
|
-
#
|
|
13
|
-
# $IPR: digestauth.rb,v 1.5 2003/02/20 07:15:47 gotoyuzo Exp $
|
|
14
|
-
|
|
15
|
-
require_relative '../config'
|
|
16
|
-
require_relative '../httpstatus'
|
|
17
|
-
require_relative 'authenticator'
|
|
18
|
-
require 'digest/md5'
|
|
19
|
-
require 'digest/sha1'
|
|
20
|
-
|
|
21
|
-
module WEBrick
|
|
22
|
-
module HTTPAuth
|
|
23
|
-
|
|
24
|
-
##
|
|
25
|
-
# RFC 2617 Digest Access Authentication for WEBrick
|
|
26
|
-
#
|
|
27
|
-
# Use this class to add digest authentication to a WEBrick servlet.
|
|
28
|
-
#
|
|
29
|
-
# Here is an example of how to set up DigestAuth:
|
|
30
|
-
#
|
|
31
|
-
# config = { :Realm => 'DigestAuth example realm' }
|
|
32
|
-
#
|
|
33
|
-
# htdigest = WEBrick::HTTPAuth::Htdigest.new 'my_password_file'
|
|
34
|
-
# htdigest.set_passwd config[:Realm], 'username', 'password'
|
|
35
|
-
# htdigest.flush
|
|
36
|
-
#
|
|
37
|
-
# config[:UserDB] = htdigest
|
|
38
|
-
#
|
|
39
|
-
# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config
|
|
40
|
-
#
|
|
41
|
-
# When using this as with a servlet be sure not to create a new DigestAuth
|
|
42
|
-
# object in the servlet's #initialize. By default WEBrick creates a new
|
|
43
|
-
# servlet instance for every request and the DigestAuth object must be
|
|
44
|
-
# used across requests.
|
|
45
|
-
|
|
46
|
-
class DigestAuth
|
|
47
|
-
include Authenticator
|
|
48
|
-
|
|
49
|
-
AuthScheme = "Digest" # :nodoc:
|
|
50
|
-
|
|
51
|
-
##
|
|
52
|
-
# Struct containing the opaque portion of the digest authentication
|
|
53
|
-
|
|
54
|
-
OpaqueInfo = Struct.new(:time, :nonce, :nc) # :nodoc:
|
|
55
|
-
|
|
56
|
-
##
|
|
57
|
-
# Digest authentication algorithm
|
|
58
|
-
|
|
59
|
-
attr_reader :algorithm
|
|
60
|
-
|
|
61
|
-
##
|
|
62
|
-
# Quality of protection. RFC 2617 defines "auth" and "auth-int"
|
|
63
|
-
|
|
64
|
-
attr_reader :qop
|
|
65
|
-
|
|
66
|
-
##
|
|
67
|
-
# Used by UserDB to create a digest password entry
|
|
68
|
-
|
|
69
|
-
def self.make_passwd(realm, user, pass)
|
|
70
|
-
pass ||= ""
|
|
71
|
-
Digest::MD5::hexdigest([user, realm, pass].join(":"))
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
##
|
|
75
|
-
# Creates a new DigestAuth instance. Be sure to use the same DigestAuth
|
|
76
|
-
# instance for multiple requests as it saves state between requests in
|
|
77
|
-
# order to perform authentication.
|
|
78
|
-
#
|
|
79
|
-
# See WEBrick::Config::DigestAuth for default configuration entries
|
|
80
|
-
#
|
|
81
|
-
# You must supply the following configuration entries:
|
|
82
|
-
#
|
|
83
|
-
# :Realm:: The name of the realm being protected.
|
|
84
|
-
# :UserDB:: A database of usernames and passwords.
|
|
85
|
-
# A WEBrick::HTTPAuth::Htdigest instance should be used.
|
|
86
|
-
|
|
87
|
-
def initialize(config, default=Config::DigestAuth)
|
|
88
|
-
check_init(config)
|
|
89
|
-
@config = default.dup.update(config)
|
|
90
|
-
@algorithm = @config[:Algorithm]
|
|
91
|
-
@domain = @config[:Domain]
|
|
92
|
-
@qop = @config[:Qop]
|
|
93
|
-
@use_opaque = @config[:UseOpaque]
|
|
94
|
-
@use_next_nonce = @config[:UseNextNonce]
|
|
95
|
-
@check_nc = @config[:CheckNc]
|
|
96
|
-
@use_auth_info_header = @config[:UseAuthenticationInfoHeader]
|
|
97
|
-
@nonce_expire_period = @config[:NonceExpirePeriod]
|
|
98
|
-
@nonce_expire_delta = @config[:NonceExpireDelta]
|
|
99
|
-
@internet_explorer_hack = @config[:InternetExplorerHack]
|
|
100
|
-
|
|
101
|
-
case @algorithm
|
|
102
|
-
when 'MD5','MD5-sess'
|
|
103
|
-
@h = Digest::MD5
|
|
104
|
-
when 'SHA1','SHA1-sess' # it is a bonus feature :-)
|
|
105
|
-
@h = Digest::SHA1
|
|
106
|
-
else
|
|
107
|
-
msg = format('Algorithm "%s" is not supported.', @algorithm)
|
|
108
|
-
raise ArgumentError.new(msg)
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
@instance_key = hexdigest(self.__id__, Time.now.to_i, Process.pid)
|
|
112
|
-
@opaques = {}
|
|
113
|
-
@last_nonce_expire = Time.now
|
|
114
|
-
@mutex = Thread::Mutex.new
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
##
|
|
118
|
-
# Authenticates a +req+ and returns a 401 Unauthorized using +res+ if
|
|
119
|
-
# the authentication was not correct.
|
|
120
|
-
|
|
121
|
-
def authenticate(req, res)
|
|
122
|
-
unless result = @mutex.synchronize{ _authenticate(req, res) }
|
|
123
|
-
challenge(req, res)
|
|
124
|
-
end
|
|
125
|
-
if result == :nonce_is_stale
|
|
126
|
-
challenge(req, res, true)
|
|
127
|
-
end
|
|
128
|
-
return true
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
##
|
|
132
|
-
# Returns a challenge response which asks for authentication information
|
|
133
|
-
|
|
134
|
-
def challenge(req, res, stale=false)
|
|
135
|
-
nonce = generate_next_nonce(req)
|
|
136
|
-
if @use_opaque
|
|
137
|
-
opaque = generate_opaque(req)
|
|
138
|
-
@opaques[opaque].nonce = nonce
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
param = Hash.new
|
|
142
|
-
param["realm"] = HTTPUtils::quote(@realm)
|
|
143
|
-
param["domain"] = HTTPUtils::quote(@domain.to_a.join(" ")) if @domain
|
|
144
|
-
param["nonce"] = HTTPUtils::quote(nonce)
|
|
145
|
-
param["opaque"] = HTTPUtils::quote(opaque) if opaque
|
|
146
|
-
param["stale"] = stale.to_s
|
|
147
|
-
param["algorithm"] = @algorithm
|
|
148
|
-
param["qop"] = HTTPUtils::quote(@qop.to_a.join(",")) if @qop
|
|
149
|
-
|
|
150
|
-
res[@response_field] =
|
|
151
|
-
"#{@auth_scheme} " + param.map{|k,v| "#{k}=#{v}" }.join(", ")
|
|
152
|
-
info("%s: %s", @response_field, res[@response_field]) if $DEBUG
|
|
153
|
-
raise @auth_exception
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
private
|
|
157
|
-
|
|
158
|
-
# :stopdoc:
|
|
159
|
-
|
|
160
|
-
MustParams = ['username','realm','nonce','uri','response']
|
|
161
|
-
MustParamsAuth = ['cnonce','nc']
|
|
162
|
-
|
|
163
|
-
def _authenticate(req, res)
|
|
164
|
-
unless digest_credentials = check_scheme(req)
|
|
165
|
-
return false
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
auth_req = split_param_value(digest_credentials)
|
|
169
|
-
if auth_req['qop'] == "auth" || auth_req['qop'] == "auth-int"
|
|
170
|
-
req_params = MustParams + MustParamsAuth
|
|
171
|
-
else
|
|
172
|
-
req_params = MustParams
|
|
173
|
-
end
|
|
174
|
-
req_params.each{|key|
|
|
175
|
-
unless auth_req.has_key?(key)
|
|
176
|
-
error('%s: parameter missing. "%s"', auth_req['username'], key)
|
|
177
|
-
raise HTTPStatus::BadRequest
|
|
178
|
-
end
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
if !check_uri(req, auth_req)
|
|
182
|
-
raise HTTPStatus::BadRequest
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
if auth_req['realm'] != @realm
|
|
186
|
-
error('%s: realm unmatch. "%s" for "%s"',
|
|
187
|
-
auth_req['username'], auth_req['realm'], @realm)
|
|
188
|
-
return false
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
auth_req['algorithm'] ||= 'MD5'
|
|
192
|
-
if auth_req['algorithm'].upcase != @algorithm.upcase
|
|
193
|
-
error('%s: algorithm unmatch. "%s" for "%s"',
|
|
194
|
-
auth_req['username'], auth_req['algorithm'], @algorithm)
|
|
195
|
-
return false
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
if (@qop.nil? && auth_req.has_key?('qop')) ||
|
|
199
|
-
(@qop && (! @qop.member?(auth_req['qop'])))
|
|
200
|
-
error('%s: the qop is not allowed. "%s"',
|
|
201
|
-
auth_req['username'], auth_req['qop'])
|
|
202
|
-
return false
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
password = @userdb.get_passwd(@realm, auth_req['username'], @reload_db)
|
|
206
|
-
unless password
|
|
207
|
-
error('%s: the user is not allowed.', auth_req['username'])
|
|
208
|
-
return false
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
nonce_is_invalid = false
|
|
212
|
-
if @use_opaque
|
|
213
|
-
info("@opaque = %s", @opaque.inspect) if $DEBUG
|
|
214
|
-
if !(opaque = auth_req['opaque'])
|
|
215
|
-
error('%s: opaque is not given.', auth_req['username'])
|
|
216
|
-
nonce_is_invalid = true
|
|
217
|
-
elsif !(opaque_struct = @opaques[opaque])
|
|
218
|
-
error('%s: invalid opaque is given.', auth_req['username'])
|
|
219
|
-
nonce_is_invalid = true
|
|
220
|
-
elsif !check_opaque(opaque_struct, req, auth_req)
|
|
221
|
-
@opaques.delete(auth_req['opaque'])
|
|
222
|
-
nonce_is_invalid = true
|
|
223
|
-
end
|
|
224
|
-
elsif !check_nonce(req, auth_req)
|
|
225
|
-
nonce_is_invalid = true
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
if /-sess$/i =~ auth_req['algorithm']
|
|
229
|
-
ha1 = hexdigest(password, auth_req['nonce'], auth_req['cnonce'])
|
|
230
|
-
else
|
|
231
|
-
ha1 = password
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
if auth_req['qop'] == "auth" || auth_req['qop'] == nil
|
|
235
|
-
ha2 = hexdigest(req.request_method, auth_req['uri'])
|
|
236
|
-
ha2_res = hexdigest("", auth_req['uri'])
|
|
237
|
-
elsif auth_req['qop'] == "auth-int"
|
|
238
|
-
body_digest = @h.new
|
|
239
|
-
req.body { |chunk| body_digest.update(chunk) }
|
|
240
|
-
body_digest = body_digest.hexdigest
|
|
241
|
-
ha2 = hexdigest(req.request_method, auth_req['uri'], body_digest)
|
|
242
|
-
ha2_res = hexdigest("", auth_req['uri'], body_digest)
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
if auth_req['qop'] == "auth" || auth_req['qop'] == "auth-int"
|
|
246
|
-
param2 = ['nonce', 'nc', 'cnonce', 'qop'].map{|key|
|
|
247
|
-
auth_req[key]
|
|
248
|
-
}.join(':')
|
|
249
|
-
digest = hexdigest(ha1, param2, ha2)
|
|
250
|
-
digest_res = hexdigest(ha1, param2, ha2_res)
|
|
251
|
-
else
|
|
252
|
-
digest = hexdigest(ha1, auth_req['nonce'], ha2)
|
|
253
|
-
digest_res = hexdigest(ha1, auth_req['nonce'], ha2_res)
|
|
254
|
-
end
|
|
255
|
-
|
|
256
|
-
if digest != auth_req['response']
|
|
257
|
-
error("%s: digest unmatch.", auth_req['username'])
|
|
258
|
-
return false
|
|
259
|
-
elsif nonce_is_invalid
|
|
260
|
-
error('%s: digest is valid, but nonce is not valid.',
|
|
261
|
-
auth_req['username'])
|
|
262
|
-
return :nonce_is_stale
|
|
263
|
-
elsif @use_auth_info_header
|
|
264
|
-
auth_info = {
|
|
265
|
-
'nextnonce' => generate_next_nonce(req),
|
|
266
|
-
'rspauth' => digest_res
|
|
267
|
-
}
|
|
268
|
-
if @use_opaque
|
|
269
|
-
opaque_struct.time = req.request_time
|
|
270
|
-
opaque_struct.nonce = auth_info['nextnonce']
|
|
271
|
-
opaque_struct.nc = "%08x" % (auth_req['nc'].hex + 1)
|
|
272
|
-
end
|
|
273
|
-
if auth_req['qop'] == "auth" || auth_req['qop'] == "auth-int"
|
|
274
|
-
['qop','cnonce','nc'].each{|key|
|
|
275
|
-
auth_info[key] = auth_req[key]
|
|
276
|
-
}
|
|
277
|
-
end
|
|
278
|
-
res[@resp_info_field] = auth_info.keys.map{|key|
|
|
279
|
-
if key == 'nc'
|
|
280
|
-
key + '=' + auth_info[key]
|
|
281
|
-
else
|
|
282
|
-
key + "=" + HTTPUtils::quote(auth_info[key])
|
|
283
|
-
end
|
|
284
|
-
}.join(', ')
|
|
285
|
-
end
|
|
286
|
-
info('%s: authentication succeeded.', auth_req['username'])
|
|
287
|
-
req.user = auth_req['username']
|
|
288
|
-
return true
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
def split_param_value(string)
|
|
292
|
-
ret = {}
|
|
293
|
-
string.scan(/\G\s*([\w\-.*%!]+)=\s*(?:\"((?>\\.|[^\"])*)\"|([^,\"]*))\s*,?/) do
|
|
294
|
-
ret[$1] = $3 || $2.gsub(/\\(.)/, "\\1")
|
|
295
|
-
end
|
|
296
|
-
ret
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
def generate_next_nonce(req)
|
|
300
|
-
now = "%012d" % req.request_time.to_i
|
|
301
|
-
pk = hexdigest(now, @instance_key)[0,32]
|
|
302
|
-
nonce = [now + ":" + pk].pack("m0") # it has 60 length of chars.
|
|
303
|
-
nonce
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
def check_nonce(req, auth_req)
|
|
307
|
-
username = auth_req['username']
|
|
308
|
-
nonce = auth_req['nonce']
|
|
309
|
-
|
|
310
|
-
pub_time, pk = nonce.unpack("m*")[0].split(":", 2)
|
|
311
|
-
if (!pub_time || !pk)
|
|
312
|
-
error("%s: empty nonce is given", username)
|
|
313
|
-
return false
|
|
314
|
-
elsif (hexdigest(pub_time, @instance_key)[0,32] != pk)
|
|
315
|
-
error("%s: invalid private-key: %s for %s",
|
|
316
|
-
username, hexdigest(pub_time, @instance_key)[0,32], pk)
|
|
317
|
-
return false
|
|
318
|
-
end
|
|
319
|
-
|
|
320
|
-
diff_time = req.request_time.to_i - pub_time.to_i
|
|
321
|
-
if (diff_time < 0)
|
|
322
|
-
error("%s: difference of time-stamp is negative.", username)
|
|
323
|
-
return false
|
|
324
|
-
elsif diff_time > @nonce_expire_period
|
|
325
|
-
error("%s: nonce is expired.", username)
|
|
326
|
-
return false
|
|
327
|
-
end
|
|
328
|
-
|
|
329
|
-
return true
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
def generate_opaque(req)
|
|
333
|
-
@mutex.synchronize{
|
|
334
|
-
now = req.request_time
|
|
335
|
-
if now - @last_nonce_expire > @nonce_expire_delta
|
|
336
|
-
@opaques.delete_if{|key,val|
|
|
337
|
-
(now - val.time) > @nonce_expire_period
|
|
338
|
-
}
|
|
339
|
-
@last_nonce_expire = now
|
|
340
|
-
end
|
|
341
|
-
begin
|
|
342
|
-
opaque = Utils::random_string(16)
|
|
343
|
-
end while @opaques[opaque]
|
|
344
|
-
@opaques[opaque] = OpaqueInfo.new(now, nil, '00000001')
|
|
345
|
-
opaque
|
|
346
|
-
}
|
|
347
|
-
end
|
|
348
|
-
|
|
349
|
-
def check_opaque(opaque_struct, req, auth_req)
|
|
350
|
-
if (@use_next_nonce && auth_req['nonce'] != opaque_struct.nonce)
|
|
351
|
-
error('%s: nonce unmatched. "%s" for "%s"',
|
|
352
|
-
auth_req['username'], auth_req['nonce'], opaque_struct.nonce)
|
|
353
|
-
return false
|
|
354
|
-
elsif !check_nonce(req, auth_req)
|
|
355
|
-
return false
|
|
356
|
-
end
|
|
357
|
-
if (@check_nc && auth_req['nc'] != opaque_struct.nc)
|
|
358
|
-
error('%s: nc unmatched."%s" for "%s"',
|
|
359
|
-
auth_req['username'], auth_req['nc'], opaque_struct.nc)
|
|
360
|
-
return false
|
|
361
|
-
end
|
|
362
|
-
true
|
|
363
|
-
end
|
|
364
|
-
|
|
365
|
-
def check_uri(req, auth_req)
|
|
366
|
-
uri = auth_req['uri']
|
|
367
|
-
if uri != req.request_uri.to_s && uri != req.unparsed_uri &&
|
|
368
|
-
(@internet_explorer_hack && uri != req.path)
|
|
369
|
-
error('%s: uri unmatch. "%s" for "%s"', auth_req['username'],
|
|
370
|
-
auth_req['uri'], req.request_uri.to_s)
|
|
371
|
-
return false
|
|
372
|
-
end
|
|
373
|
-
true
|
|
374
|
-
end
|
|
375
|
-
|
|
376
|
-
def hexdigest(*args)
|
|
377
|
-
@h.hexdigest(args.join(":"))
|
|
378
|
-
end
|
|
379
|
-
|
|
380
|
-
# :startdoc:
|
|
381
|
-
end
|
|
382
|
-
|
|
383
|
-
##
|
|
384
|
-
# Digest authentication for proxy servers. See DigestAuth for details.
|
|
385
|
-
|
|
386
|
-
class ProxyDigestAuth < DigestAuth
|
|
387
|
-
include ProxyAuthenticator
|
|
388
|
-
|
|
389
|
-
private
|
|
390
|
-
def check_uri(req, auth_req) # :nodoc:
|
|
391
|
-
return true
|
|
392
|
-
end
|
|
393
|
-
end
|
|
394
|
-
end
|
|
395
|
-
end
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
#
|
|
3
|
-
# httpauth/htdigest.rb -- Apache compatible htdigest file
|
|
4
|
-
#
|
|
5
|
-
# Author: IPR -- Internet Programming with Ruby -- writers
|
|
6
|
-
# Copyright (c) 2003 Internet Programming with Ruby writers. All rights
|
|
7
|
-
# reserved.
|
|
8
|
-
#
|
|
9
|
-
# $IPR: htdigest.rb,v 1.4 2003/07/22 19:20:45 gotoyuzo Exp $
|
|
10
|
-
|
|
11
|
-
require_relative 'userdb'
|
|
12
|
-
require_relative 'digestauth'
|
|
13
|
-
require 'tempfile'
|
|
14
|
-
|
|
15
|
-
module WEBrick
|
|
16
|
-
module HTTPAuth
|
|
17
|
-
|
|
18
|
-
##
|
|
19
|
-
# Htdigest accesses apache-compatible digest password files. Passwords are
|
|
20
|
-
# matched to a realm where they are valid. For security, the path for a
|
|
21
|
-
# digest password database should be stored outside of the paths available
|
|
22
|
-
# to the HTTP server.
|
|
23
|
-
#
|
|
24
|
-
# Htdigest is intended for use with WEBrick::HTTPAuth::DigestAuth and
|
|
25
|
-
# stores passwords using cryptographic hashes.
|
|
26
|
-
#
|
|
27
|
-
# htpasswd = WEBrick::HTTPAuth::Htdigest.new 'my_password_file'
|
|
28
|
-
# htpasswd.set_passwd 'my realm', 'username', 'password'
|
|
29
|
-
# htpasswd.flush
|
|
30
|
-
|
|
31
|
-
class Htdigest
|
|
32
|
-
include UserDB
|
|
33
|
-
|
|
34
|
-
##
|
|
35
|
-
# Open a digest password database at +path+
|
|
36
|
-
|
|
37
|
-
def initialize(path)
|
|
38
|
-
@path = path
|
|
39
|
-
@mtime = Time.at(0)
|
|
40
|
-
@digest = Hash.new
|
|
41
|
-
@mutex = Thread::Mutex::new
|
|
42
|
-
@auth_type = DigestAuth
|
|
43
|
-
File.open(@path,"a").close unless File.exist?(@path)
|
|
44
|
-
reload
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
##
|
|
48
|
-
# Reloads passwords from the database
|
|
49
|
-
|
|
50
|
-
def reload
|
|
51
|
-
mtime = File::mtime(@path)
|
|
52
|
-
if mtime > @mtime
|
|
53
|
-
@digest.clear
|
|
54
|
-
File.open(@path){|io|
|
|
55
|
-
while line = io.gets
|
|
56
|
-
line.chomp!
|
|
57
|
-
user, realm, pass = line.split(/:/, 3)
|
|
58
|
-
unless @digest[realm]
|
|
59
|
-
@digest[realm] = Hash.new
|
|
60
|
-
end
|
|
61
|
-
@digest[realm][user] = pass
|
|
62
|
-
end
|
|
63
|
-
}
|
|
64
|
-
@mtime = mtime
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
##
|
|
69
|
-
# Flush the password database. If +output+ is given the database will
|
|
70
|
-
# be written there instead of to the original path.
|
|
71
|
-
|
|
72
|
-
def flush(output=nil)
|
|
73
|
-
output ||= @path
|
|
74
|
-
tmp = Tempfile.create("htpasswd", File::dirname(output))
|
|
75
|
-
renamed = false
|
|
76
|
-
begin
|
|
77
|
-
each{|item| tmp.puts(item.join(":")) }
|
|
78
|
-
tmp.close
|
|
79
|
-
File::rename(tmp.path, output)
|
|
80
|
-
renamed = true
|
|
81
|
-
ensure
|
|
82
|
-
tmp.close
|
|
83
|
-
File.unlink(tmp.path) if !renamed
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
##
|
|
88
|
-
# Retrieves a password from the database for +user+ in +realm+. If
|
|
89
|
-
# +reload_db+ is true the database will be reloaded first.
|
|
90
|
-
|
|
91
|
-
def get_passwd(realm, user, reload_db)
|
|
92
|
-
reload() if reload_db
|
|
93
|
-
if hash = @digest[realm]
|
|
94
|
-
hash[user]
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
##
|
|
99
|
-
# Sets a password in the database for +user+ in +realm+ to +pass+.
|
|
100
|
-
|
|
101
|
-
def set_passwd(realm, user, pass)
|
|
102
|
-
@mutex.synchronize{
|
|
103
|
-
unless @digest[realm]
|
|
104
|
-
@digest[realm] = Hash.new
|
|
105
|
-
end
|
|
106
|
-
@digest[realm][user] = make_passwd(realm, user, pass)
|
|
107
|
-
}
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
##
|
|
111
|
-
# Removes a password from the database for +user+ in +realm+.
|
|
112
|
-
|
|
113
|
-
def delete_passwd(realm, user)
|
|
114
|
-
if hash = @digest[realm]
|
|
115
|
-
hash.delete(user)
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
##
|
|
120
|
-
# Iterate passwords in the database.
|
|
121
|
-
|
|
122
|
-
def each # :yields: [user, realm, password_hash]
|
|
123
|
-
@digest.keys.sort.each{|realm|
|
|
124
|
-
hash = @digest[realm]
|
|
125
|
-
hash.keys.sort.each{|user|
|
|
126
|
-
yield([user, realm, hash[user]])
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
end
|
|
132
|
-
end
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
#
|
|
3
|
-
# httpauth/htgroup.rb -- Apache compatible htgroup file
|
|
4
|
-
#
|
|
5
|
-
# Author: IPR -- Internet Programming with Ruby -- writers
|
|
6
|
-
# Copyright (c) 2003 Internet Programming with Ruby writers. All rights
|
|
7
|
-
# reserved.
|
|
8
|
-
#
|
|
9
|
-
# $IPR: htgroup.rb,v 1.1 2003/02/16 22:22:56 gotoyuzo Exp $
|
|
10
|
-
|
|
11
|
-
require 'tempfile'
|
|
12
|
-
|
|
13
|
-
module WEBrick
|
|
14
|
-
module HTTPAuth
|
|
15
|
-
|
|
16
|
-
##
|
|
17
|
-
# Htgroup accesses apache-compatible group files. Htgroup can be used to
|
|
18
|
-
# provide group-based authentication for users. Currently Htgroup is not
|
|
19
|
-
# directly integrated with any authenticators in WEBrick. For security,
|
|
20
|
-
# the path for a digest password database should be stored outside of the
|
|
21
|
-
# paths available to the HTTP server.
|
|
22
|
-
#
|
|
23
|
-
# Example:
|
|
24
|
-
#
|
|
25
|
-
# htgroup = WEBrick::HTTPAuth::Htgroup.new 'my_group_file'
|
|
26
|
-
# htgroup.add 'superheroes', %w[spiderman batman]
|
|
27
|
-
#
|
|
28
|
-
# htgroup.members('superheroes').include? 'magneto' # => false
|
|
29
|
-
|
|
30
|
-
class Htgroup
|
|
31
|
-
|
|
32
|
-
##
|
|
33
|
-
# Open a group database at +path+
|
|
34
|
-
|
|
35
|
-
def initialize(path)
|
|
36
|
-
@path = path
|
|
37
|
-
@mtime = Time.at(0)
|
|
38
|
-
@group = Hash.new
|
|
39
|
-
File.open(@path,"a").close unless File.exist?(@path)
|
|
40
|
-
reload
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
##
|
|
44
|
-
# Reload groups from the database
|
|
45
|
-
|
|
46
|
-
def reload
|
|
47
|
-
if (mtime = File::mtime(@path)) > @mtime
|
|
48
|
-
@group.clear
|
|
49
|
-
File.open(@path){|io|
|
|
50
|
-
while line = io.gets
|
|
51
|
-
line.chomp!
|
|
52
|
-
group, members = line.split(/:\s*/)
|
|
53
|
-
@group[group] = members.split(/\s+/)
|
|
54
|
-
end
|
|
55
|
-
}
|
|
56
|
-
@mtime = mtime
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
##
|
|
61
|
-
# Flush the group database. If +output+ is given the database will be
|
|
62
|
-
# written there instead of to the original path.
|
|
63
|
-
|
|
64
|
-
def flush(output=nil)
|
|
65
|
-
output ||= @path
|
|
66
|
-
tmp = Tempfile.create("htgroup", File::dirname(output))
|
|
67
|
-
begin
|
|
68
|
-
@group.keys.sort.each{|group|
|
|
69
|
-
tmp.puts(format("%s: %s", group, self.members(group).join(" ")))
|
|
70
|
-
}
|
|
71
|
-
ensure
|
|
72
|
-
tmp.close
|
|
73
|
-
if $!
|
|
74
|
-
File.unlink(tmp.path)
|
|
75
|
-
else
|
|
76
|
-
return File.rename(tmp.path, output)
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
##
|
|
82
|
-
# Retrieve the list of members from +group+
|
|
83
|
-
|
|
84
|
-
def members(group)
|
|
85
|
-
reload
|
|
86
|
-
@group[group] || []
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
##
|
|
90
|
-
# Add an Array of +members+ to +group+
|
|
91
|
-
|
|
92
|
-
def add(group, members)
|
|
93
|
-
@group[group] = members(group) | members
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
end
|