From ad2b1467da3c6550e0b4158c298f6a9ccca3503c Mon Sep 17 00:00:00 2001 From: Colby Allen Date: Wed, 7 Dec 2022 08:20:47 -0700 Subject: [PATCH] Renames meilisearch-http to meilisearch --- .github/workflows/publish-deb-brew-pkg.yml | 2 +- Cargo.lock | 38 +++++++++--------- Cargo.toml | 2 +- {meilisearch-http => meilisearch}/Cargo.toml | 6 +-- {meilisearch-http => meilisearch}/build.rs | 0 .../src/analytics/mock_analytics.rs | 0 .../src/analytics/mod.rs | 0 .../src/analytics/segment_analytics.rs | 0 .../src/error.rs | 0 .../src/extractors/authentication/error.rs | 0 .../src/extractors/authentication/mod.rs | 0 .../src/extractors/mod.rs | 0 .../src/extractors/payload.rs | 0 .../src/extractors/sequential_extractor.rs | 0 {meilisearch-http => meilisearch}/src/lib.rs | 0 {meilisearch-http => meilisearch}/src/main.rs | 4 +- .../src/metrics.rs | 0 .../src/option.rs | 2 +- .../src/route_metrics.rs | 0 .../src/routes/api_key.rs | 0 .../src/routes/dump.rs | 0 .../src/routes/indexes/documents.rs | 0 .../src/routes/indexes/mod.rs | 0 .../src/routes/indexes/search.rs | 0 .../src/routes/indexes/settings.rs | 0 .../src/routes/mod.rs | 0 .../src/routes/swap_indexes.rs | 0 .../src/routes/tasks.rs | 0 .../src/search.rs | 0 .../tests/assets/dumps/v1/metadata.json | 0 .../assets/dumps/v1/test/documents.jsonl | 0 .../tests/assets/dumps/v1/test/settings.json | 0 .../tests/assets/dumps/v1/test/updates.jsonl | 0 .../tests/assets/test_set.json | 0 .../tests/assets/v1_v0.20.0_movies.dump | Bin .../v1_v0.20.0_movies_with_settings.dump | Bin .../v1_v0.20.0_rubygems_with_settings.dump | Bin .../tests/assets/v2_v0.21.1_movies.dump | Bin .../v2_v0.21.1_movies_with_settings.dump | Bin .../v2_v0.21.1_rubygems_with_settings.dump | Bin .../tests/assets/v3_v0.24.0_movies.dump | Bin .../v3_v0.24.0_movies_with_settings.dump | Bin .../v3_v0.24.0_rubygems_with_settings.dump | Bin .../tests/assets/v4_v0.25.2_movies.dump | Bin .../v4_v0.25.2_movies_with_settings.dump | Bin .../v4_v0.25.2_rubygems_with_settings.dump | Bin .../tests/assets/v5_v0.28.0_test_dump.dump | Bin .../tests/auth/api_keys.rs | 0 .../tests/auth/authorization.rs | 0 .../tests/auth/mod.rs | 0 .../tests/auth/payload.rs | 0 .../tests/auth/tenant_token.rs | 0 .../tests/common/encoder.rs | 0 .../tests/common/index.rs | 0 .../tests/common/mod.rs | 4 +- .../tests/common/server.rs | 4 +- .../tests/common/service.rs | 2 +- .../tests/content_type.rs | 0 .../tests/dashboard/mod.rs | 0 .../tests/documents/add_documents.rs | 0 .../tests/documents/delete_documents.rs | 0 .../tests/documents/get_documents.rs | 0 .../tests/documents/mod.rs | 0 .../tests/documents/update_documents.rs | 0 .../tests/dumps/data.rs | 0 .../tests/dumps/mod.rs | 2 +- .../tests/index/create_index.rs | 0 .../tests/index/delete_index.rs | 0 .../tests/index/get_index.rs | 0 .../tests/index/mod.rs | 0 .../tests/index/stats.rs | 0 .../tests/index/update_index.rs | 0 .../tests/integration.rs | 0 .../tests/search/errors.rs | 0 .../tests/search/formatted.rs | 0 .../tests/search/mod.rs | 0 .../tests/search/pagination.rs | 0 .../tests/settings/distinct.rs | 0 .../tests/settings/get_settings.rs | 0 .../tests/settings/mod.rs | 0 .../tests/snapshot/mod.rs | 2 +- .../tests/stats/mod.rs | 0 .../tests/tasks/mod.rs | 0 83 files changed, 32 insertions(+), 36 deletions(-) rename {meilisearch-http => meilisearch}/Cargo.toml (98%) rename {meilisearch-http => meilisearch}/build.rs (100%) rename {meilisearch-http => meilisearch}/src/analytics/mock_analytics.rs (100%) rename {meilisearch-http => meilisearch}/src/analytics/mod.rs (100%) rename {meilisearch-http => meilisearch}/src/analytics/segment_analytics.rs (100%) rename {meilisearch-http => meilisearch}/src/error.rs (100%) rename {meilisearch-http => meilisearch}/src/extractors/authentication/error.rs (100%) rename {meilisearch-http => meilisearch}/src/extractors/authentication/mod.rs (100%) rename {meilisearch-http => meilisearch}/src/extractors/mod.rs (100%) rename {meilisearch-http => meilisearch}/src/extractors/payload.rs (100%) rename {meilisearch-http => meilisearch}/src/extractors/sequential_extractor.rs (100%) rename {meilisearch-http => meilisearch}/src/lib.rs (100%) rename {meilisearch-http => meilisearch}/src/main.rs (98%) rename {meilisearch-http => meilisearch}/src/metrics.rs (100%) rename {meilisearch-http => meilisearch}/src/option.rs (99%) rename {meilisearch-http => meilisearch}/src/route_metrics.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/api_key.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/dump.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/indexes/documents.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/indexes/mod.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/indexes/search.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/indexes/settings.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/mod.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/swap_indexes.rs (100%) rename {meilisearch-http => meilisearch}/src/routes/tasks.rs (100%) rename {meilisearch-http => meilisearch}/src/search.rs (100%) rename {meilisearch-http => meilisearch}/tests/assets/dumps/v1/metadata.json (100%) rename {meilisearch-http => meilisearch}/tests/assets/dumps/v1/test/documents.jsonl (100%) rename {meilisearch-http => meilisearch}/tests/assets/dumps/v1/test/settings.json (100%) rename {meilisearch-http => meilisearch}/tests/assets/dumps/v1/test/updates.jsonl (100%) rename {meilisearch-http => meilisearch}/tests/assets/test_set.json (100%) rename {meilisearch-http => meilisearch}/tests/assets/v1_v0.20.0_movies.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v1_v0.20.0_movies_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v1_v0.20.0_rubygems_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v2_v0.21.1_movies.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v2_v0.21.1_movies_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v2_v0.21.1_rubygems_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v3_v0.24.0_movies.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v3_v0.24.0_movies_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v3_v0.24.0_rubygems_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v4_v0.25.2_movies.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v4_v0.25.2_movies_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v4_v0.25.2_rubygems_with_settings.dump (100%) rename {meilisearch-http => meilisearch}/tests/assets/v5_v0.28.0_test_dump.dump (100%) rename {meilisearch-http => meilisearch}/tests/auth/api_keys.rs (100%) rename {meilisearch-http => meilisearch}/tests/auth/authorization.rs (100%) rename {meilisearch-http => meilisearch}/tests/auth/mod.rs (100%) rename {meilisearch-http => meilisearch}/tests/auth/payload.rs (100%) rename {meilisearch-http => meilisearch}/tests/auth/tenant_token.rs (100%) rename {meilisearch-http => meilisearch}/tests/common/encoder.rs (100%) rename {meilisearch-http => meilisearch}/tests/common/index.rs (100%) rename {meilisearch-http => meilisearch}/tests/common/mod.rs (85%) rename {meilisearch-http => meilisearch}/tests/common/server.rs (98%) rename {meilisearch-http => meilisearch}/tests/common/service.rs (98%) rename {meilisearch-http => meilisearch}/tests/content_type.rs (100%) rename {meilisearch-http => meilisearch}/tests/dashboard/mod.rs (100%) rename {meilisearch-http => meilisearch}/tests/documents/add_documents.rs (100%) rename {meilisearch-http => meilisearch}/tests/documents/delete_documents.rs (100%) rename {meilisearch-http => meilisearch}/tests/documents/get_documents.rs (100%) rename {meilisearch-http => meilisearch}/tests/documents/mod.rs (100%) rename {meilisearch-http => meilisearch}/tests/documents/update_documents.rs (100%) rename {meilisearch-http => meilisearch}/tests/dumps/data.rs (100%) rename {meilisearch-http => meilisearch}/tests/dumps/mod.rs (99%) rename {meilisearch-http => meilisearch}/tests/index/create_index.rs (100%) rename {meilisearch-http => meilisearch}/tests/index/delete_index.rs (100%) rename {meilisearch-http => meilisearch}/tests/index/get_index.rs (100%) rename {meilisearch-http => meilisearch}/tests/index/mod.rs (100%) rename {meilisearch-http => meilisearch}/tests/index/stats.rs (100%) rename {meilisearch-http => meilisearch}/tests/index/update_index.rs (100%) rename {meilisearch-http => meilisearch}/tests/integration.rs (100%) rename {meilisearch-http => meilisearch}/tests/search/errors.rs (100%) rename {meilisearch-http => meilisearch}/tests/search/formatted.rs (100%) rename {meilisearch-http => meilisearch}/tests/search/mod.rs (100%) rename {meilisearch-http => meilisearch}/tests/search/pagination.rs (100%) rename {meilisearch-http => meilisearch}/tests/settings/distinct.rs (100%) rename {meilisearch-http => meilisearch}/tests/settings/get_settings.rs (100%) rename {meilisearch-http => meilisearch}/tests/settings/mod.rs (100%) rename {meilisearch-http => meilisearch}/tests/snapshot/mod.rs (98%) rename {meilisearch-http => meilisearch}/tests/stats/mod.rs (100%) rename {meilisearch-http => meilisearch}/tests/tasks/mod.rs (100%) diff --git a/.github/workflows/publish-deb-brew-pkg.yml b/.github/workflows/publish-deb-brew-pkg.yml index 79da1e4e4..1f84b84c5 100644 --- a/.github/workflows/publish-deb-brew-pkg.yml +++ b/.github/workflows/publish-deb-brew-pkg.yml @@ -25,7 +25,7 @@ jobs: run: cargo install cargo-deb - uses: actions/checkout@v3 - name: Build deb package - run: cargo deb -p meilisearch-http -o target/debian/meilisearch.deb + run: cargo deb -p meilisearch -o target/debian/meilisearch.deb - name: Upload debian pkg to release uses: svenstaro/upload-release-action@2.3.0 with: diff --git a/Cargo.lock b/Cargo.lock index e0a864200..f824f785c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2266,25 +2266,8 @@ dependencies = [ ] [[package]] -name = "meilisearch-auth" -version = "1.0.0" -dependencies = [ - "enum-iterator", - "hmac", - "meilisearch-types", - "rand", - "roaring", - "serde", - "serde_json", - "sha2", - "thiserror", - "time", - "uuid 1.2.1", -] - -[[package]] -name = "meilisearch-http" -version = "1.0.0" +name = "meilisearch" +version = "0.30.1" dependencies = [ "actix-cors", "actix-http", @@ -2365,6 +2348,23 @@ dependencies = [ "zip", ] +[[package]] +name = "meilisearch-auth" +version = "1.0.0" +dependencies = [ + "enum-iterator", + "hmac", + "meilisearch-types", + "rand", + "roaring", + "serde", + "serde_json", + "sha2", + "thiserror", + "time", + "uuid 1.2.1", +] + [[package]] name = "meilisearch-types" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml index 2b756f87c..b3be0075a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" members = [ - "meilisearch-http", + "meilisearch", "meilisearch-types", "meilisearch-auth", "meili-snap", diff --git a/meilisearch-http/Cargo.toml b/meilisearch/Cargo.toml similarity index 98% rename from meilisearch-http/Cargo.toml rename to meilisearch/Cargo.toml index f8370cae5..b3d40b35c 100644 --- a/meilisearch-http/Cargo.toml +++ b/meilisearch/Cargo.toml @@ -3,12 +3,8 @@ authors = ["Quentin de Quelen ", "Clément Renault { - let post_query: meilisearch_http::routes::search::SearchQueryPost = + let post_query: meilisearch::routes::search::SearchQueryPost = serde_json::from_str(&$query.clone().to_string()).unwrap(); - let get_query: meilisearch_http::routes::search::SearchQuery = post_query.into(); + let get_query: meilisearch::routes::search::SearchQuery = post_query.into(); let get_query = ::serde_url_params::to_string(&get_query).unwrap(); let ($response, $status_code) = $server.search_get(&get_query).await; let _ = ::std::panic::catch_unwind(|| $block) diff --git a/meilisearch-http/tests/common/server.rs b/meilisearch/tests/common/server.rs similarity index 98% rename from meilisearch-http/tests/common/server.rs rename to meilisearch/tests/common/server.rs index f96c659a4..c3c9b7c60 100644 --- a/meilisearch-http/tests/common/server.rs +++ b/meilisearch/tests/common/server.rs @@ -8,8 +8,8 @@ use actix_web::dev::ServiceResponse; use actix_web::http::StatusCode; use byte_unit::{Byte, ByteUnit}; use clap::Parser; -use meilisearch_http::option::{IndexerOpts, MaxMemory, Opt}; -use meilisearch_http::{analytics, create_app, setup_meilisearch}; +use meilisearch::option::{IndexerOpts, MaxMemory, Opt}; +use meilisearch::{analytics, create_app, setup_meilisearch}; use once_cell::sync::Lazy; use serde_json::{json, Value}; use tempfile::TempDir; diff --git a/meilisearch-http/tests/common/service.rs b/meilisearch/tests/common/service.rs similarity index 98% rename from meilisearch-http/tests/common/service.rs rename to meilisearch/tests/common/service.rs index 945ff4c13..f7c9b8294 100644 --- a/meilisearch-http/tests/common/service.rs +++ b/meilisearch/tests/common/service.rs @@ -6,7 +6,7 @@ use actix_web::test; use actix_web::test::TestRequest; use index_scheduler::IndexScheduler; use meilisearch_auth::AuthController; -use meilisearch_http::{analytics, create_app, Opt}; +use meilisearch::{analytics, create_app, Opt}; use serde_json::Value; use crate::common::encoder::Encoder; diff --git a/meilisearch-http/tests/content_type.rs b/meilisearch/tests/content_type.rs similarity index 100% rename from meilisearch-http/tests/content_type.rs rename to meilisearch/tests/content_type.rs diff --git a/meilisearch-http/tests/dashboard/mod.rs b/meilisearch/tests/dashboard/mod.rs similarity index 100% rename from meilisearch-http/tests/dashboard/mod.rs rename to meilisearch/tests/dashboard/mod.rs diff --git a/meilisearch-http/tests/documents/add_documents.rs b/meilisearch/tests/documents/add_documents.rs similarity index 100% rename from meilisearch-http/tests/documents/add_documents.rs rename to meilisearch/tests/documents/add_documents.rs diff --git a/meilisearch-http/tests/documents/delete_documents.rs b/meilisearch/tests/documents/delete_documents.rs similarity index 100% rename from meilisearch-http/tests/documents/delete_documents.rs rename to meilisearch/tests/documents/delete_documents.rs diff --git a/meilisearch-http/tests/documents/get_documents.rs b/meilisearch/tests/documents/get_documents.rs similarity index 100% rename from meilisearch-http/tests/documents/get_documents.rs rename to meilisearch/tests/documents/get_documents.rs diff --git a/meilisearch-http/tests/documents/mod.rs b/meilisearch/tests/documents/mod.rs similarity index 100% rename from meilisearch-http/tests/documents/mod.rs rename to meilisearch/tests/documents/mod.rs diff --git a/meilisearch-http/tests/documents/update_documents.rs b/meilisearch/tests/documents/update_documents.rs similarity index 100% rename from meilisearch-http/tests/documents/update_documents.rs rename to meilisearch/tests/documents/update_documents.rs diff --git a/meilisearch-http/tests/dumps/data.rs b/meilisearch/tests/dumps/data.rs similarity index 100% rename from meilisearch-http/tests/dumps/data.rs rename to meilisearch/tests/dumps/data.rs diff --git a/meilisearch-http/tests/dumps/mod.rs b/meilisearch/tests/dumps/mod.rs similarity index 99% rename from meilisearch-http/tests/dumps/mod.rs rename to meilisearch/tests/dumps/mod.rs index 10098c60f..0759454e8 100644 --- a/meilisearch-http/tests/dumps/mod.rs +++ b/meilisearch/tests/dumps/mod.rs @@ -1,6 +1,6 @@ mod data; -use meilisearch_http::Opt; +use meilisearch::Opt; use serde_json::json; use self::data::GetDump; diff --git a/meilisearch-http/tests/index/create_index.rs b/meilisearch/tests/index/create_index.rs similarity index 100% rename from meilisearch-http/tests/index/create_index.rs rename to meilisearch/tests/index/create_index.rs diff --git a/meilisearch-http/tests/index/delete_index.rs b/meilisearch/tests/index/delete_index.rs similarity index 100% rename from meilisearch-http/tests/index/delete_index.rs rename to meilisearch/tests/index/delete_index.rs diff --git a/meilisearch-http/tests/index/get_index.rs b/meilisearch/tests/index/get_index.rs similarity index 100% rename from meilisearch-http/tests/index/get_index.rs rename to meilisearch/tests/index/get_index.rs diff --git a/meilisearch-http/tests/index/mod.rs b/meilisearch/tests/index/mod.rs similarity index 100% rename from meilisearch-http/tests/index/mod.rs rename to meilisearch/tests/index/mod.rs diff --git a/meilisearch-http/tests/index/stats.rs b/meilisearch/tests/index/stats.rs similarity index 100% rename from meilisearch-http/tests/index/stats.rs rename to meilisearch/tests/index/stats.rs diff --git a/meilisearch-http/tests/index/update_index.rs b/meilisearch/tests/index/update_index.rs similarity index 100% rename from meilisearch-http/tests/index/update_index.rs rename to meilisearch/tests/index/update_index.rs diff --git a/meilisearch-http/tests/integration.rs b/meilisearch/tests/integration.rs similarity index 100% rename from meilisearch-http/tests/integration.rs rename to meilisearch/tests/integration.rs diff --git a/meilisearch-http/tests/search/errors.rs b/meilisearch/tests/search/errors.rs similarity index 100% rename from meilisearch-http/tests/search/errors.rs rename to meilisearch/tests/search/errors.rs diff --git a/meilisearch-http/tests/search/formatted.rs b/meilisearch/tests/search/formatted.rs similarity index 100% rename from meilisearch-http/tests/search/formatted.rs rename to meilisearch/tests/search/formatted.rs diff --git a/meilisearch-http/tests/search/mod.rs b/meilisearch/tests/search/mod.rs similarity index 100% rename from meilisearch-http/tests/search/mod.rs rename to meilisearch/tests/search/mod.rs diff --git a/meilisearch-http/tests/search/pagination.rs b/meilisearch/tests/search/pagination.rs similarity index 100% rename from meilisearch-http/tests/search/pagination.rs rename to meilisearch/tests/search/pagination.rs diff --git a/meilisearch-http/tests/settings/distinct.rs b/meilisearch/tests/settings/distinct.rs similarity index 100% rename from meilisearch-http/tests/settings/distinct.rs rename to meilisearch/tests/settings/distinct.rs diff --git a/meilisearch-http/tests/settings/get_settings.rs b/meilisearch/tests/settings/get_settings.rs similarity index 100% rename from meilisearch-http/tests/settings/get_settings.rs rename to meilisearch/tests/settings/get_settings.rs diff --git a/meilisearch-http/tests/settings/mod.rs b/meilisearch/tests/settings/mod.rs similarity index 100% rename from meilisearch-http/tests/settings/mod.rs rename to meilisearch/tests/settings/mod.rs diff --git a/meilisearch-http/tests/snapshot/mod.rs b/meilisearch/tests/snapshot/mod.rs similarity index 98% rename from meilisearch-http/tests/snapshot/mod.rs rename to meilisearch/tests/snapshot/mod.rs index 1c2e33534..eba260722 100644 --- a/meilisearch-http/tests/snapshot/mod.rs +++ b/meilisearch/tests/snapshot/mod.rs @@ -1,6 +1,6 @@ use std::time::Duration; -use meilisearch_http::Opt; +use meilisearch::Opt; use tokio::time::sleep; use crate::common::server::default_settings; diff --git a/meilisearch-http/tests/stats/mod.rs b/meilisearch/tests/stats/mod.rs similarity index 100% rename from meilisearch-http/tests/stats/mod.rs rename to meilisearch/tests/stats/mod.rs diff --git a/meilisearch-http/tests/tasks/mod.rs b/meilisearch/tests/tasks/mod.rs similarity index 100% rename from meilisearch-http/tests/tasks/mod.rs rename to meilisearch/tests/tasks/mod.rs