Skip to content

Commit

Permalink
rename tailcall-jq to tailcall-template
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddOnTop committed Nov 20, 2024
1 parent 89d5b39 commit 5a245aa
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 55 deletions.
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ tailcall-valid = { workspace = true }
dashmap = "6.1.0"
urlencoding = "2.1.3"
tailcall-chunk = "0.2.5"
tailcall-jq = { git = "https://github.com/tailcallhq/tailcall-jq" }
tailcall-template = { git = "https://github.com/tailcallhq/tailcall-template" }

# to build rquickjs bindings on systems without builtin bindings
[target.'cfg(all(target_os = "windows", target_arch = "x86"))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion benches/impl_path_string_for_evaluation_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use tailcall::core::ir::{EvalContext, ResolverContextLike, SelectionField};
use tailcall::core::runtime::TargetRuntime;
use tailcall::core::{EnvIO, FileIO, HttpIO};
use tailcall_http_cache::HttpCacheManager;
use tailcall_jq::mustache::path::PathString;
use tailcall_template::mustache::path::PathString;

struct Http {
client: ClientWithMiddleware,
Expand Down
2 changes: 1 addition & 1 deletion benches/request_template_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tailcall::core::endpoint::Endpoint;
use tailcall::core::has_headers::HasHeaders;
use tailcall::core::http::RequestTemplate;
use tailcall::core::json::JsonLike;
use tailcall_jq::mustache::path::{PathString, PathValue, ValueString};
use tailcall_template::mustache::path::{PathString, PathValue, ValueString};

#[derive(Setters)]
struct Context {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/generator/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::path::Path;
use http::header::{HeaderMap, HeaderName, HeaderValue};
use inquire::Confirm;
use pathdiff::diff_paths;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::{ValidateInto, Validator};

use super::config::{Config, LLMConfig, Resolved, Source};
Expand Down
2 changes: 1 addition & 1 deletion src/cli/llm/infer_type_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use genai::chat::{ChatMessage, ChatRequest, ChatResponse};
use indexmap::{indexset, IndexSet};
use serde::{Deserialize, Serialize};
use serde_json::json;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;

use super::{Error, Result, Wizard};
use crate::core::config::Config;
Expand Down
2 changes: 1 addition & 1 deletion src/core/blueprint/dynamic_value.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use async_graphql_value::{ConstValue, Name};
use indexmap::IndexMap;
use serde_json::Value;
use tailcall_jq::mustache::{Mustache, Segment};
use tailcall_template::mustache::{Mustache, Segment};

#[derive(Debug, Clone, PartialEq)]
pub enum DynamicValue<A> {
Expand Down
2 changes: 1 addition & 1 deletion src/core/blueprint/operators/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fmt::Display;

use prost_reflect::prost_types::FileDescriptorSet;
use prost_reflect::FieldDescriptor;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::{Valid, ValidationError, Validator};

use super::apply_select;
Expand Down
2 changes: 1 addition & 1 deletion src/core/blueprint/operators/http.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::{Valid, ValidationError, Validator};

use crate::core::blueprint::*;
Expand Down
2 changes: 1 addition & 1 deletion src/core/config/apollo.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use serde::{Deserialize, Serialize};
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;

use crate::core::config::ConfigReaderContext;
use crate::core::is_default;
Expand Down
2 changes: 1 addition & 1 deletion src/core/config/directives/telemetry.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;

Check warning on line 1 in src/core/config/directives/telemetry.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

Diff in /home/runner/work/tailcall/tailcall/src/core/config/directives/telemetry.rs
use serde::{Deserialize, Serialize};
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_macros::{DirectiveDefinition, InputDefinition};
use tailcall_valid::Validator;

Expand Down
2 changes: 1 addition & 1 deletion src/core/config/reader_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::borrow::Cow;
use std::collections::BTreeMap;

use http::header::HeaderMap;
use tailcall_jq::mustache::path::PathString;
use tailcall_template::mustache::path::PathString;

use crate::core::has_headers::HasHeaders;
use crate::core::runtime::TargetRuntime;
Expand Down
2 changes: 1 addition & 1 deletion src/core/config/transformer/subgraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::convert::identity;
use std::fmt::{Display, Write};

Check warning on line 4 in src/core/config/transformer/subgraph.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

Diff in /home/runner/work/tailcall/tailcall/src/core/config/transformer/subgraph.rs
use std::ops::Deref;

use tailcall_jq::mustache::{Mustache, Segment};
use tailcall_template::mustache::{Mustache, Segment};
use tailcall_macros::MergeRight;
use tailcall_valid::{Valid, Validator};

Expand Down
6 changes: 3 additions & 3 deletions src/core/graphql/request_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use std::hash::{Hash, Hasher};
use derive_setters::Setters;
use http::header::{HeaderMap, HeaderValue};
use tailcall_hasher::TailcallHasher;
use tailcall_jq::mustache::path::PathGraphql;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::path::PathGraphql;
use tailcall_template::mustache::Mustache;

use crate::core::config::{GraphQLOperationType, KeyValue};
use crate::core::has_headers::HasHeaders;
Expand Down Expand Up @@ -170,7 +170,7 @@ mod tests {
use http::header::HeaderMap;
use pretty_assertions::assert_eq;
use serde_json::json;
use tailcall_jq::mustache::path::PathGraphql;
use tailcall_template::mustache::path::PathGraphql;

use crate::core::config::GraphQLOperationType;
use crate::core::graphql::request_template::RelatedFields;
Expand Down
8 changes: 4 additions & 4 deletions src/core/grpc/request_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use anyhow::Result;
use derive_setters::Setters;
use http::header::{HeaderMap, HeaderValue, CONTENT_TYPE};
use tailcall_hasher::TailcallHasher;
use tailcall_jq::mustache::path::PathString;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::path::PathString;
use tailcall_template::mustache::Mustache;
use url::Url;

use super::request::create_grpc_request;
Expand Down Expand Up @@ -136,8 +136,8 @@ mod tests {
use http::Method;
use pretty_assertions::assert_eq;
use tailcall_fixtures::protobuf;
use tailcall_jq::mustache::path::PathString;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::path::PathString;
use tailcall_template::mustache::Mustache;

use super::{RequestBody, RequestTemplate};
use crate::core::blueprint::GrpcMethod;
Expand Down
4 changes: 2 additions & 2 deletions src/core/helpers/body.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use serde_json::Value;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::Valid;

use crate::core::grpc::request_template::RequestBody;
Expand All @@ -21,7 +21,7 @@ pub fn to_body(body: Option<&Value>) -> Valid<Option<RequestBody>, String> {

#[cfg(test)]
mod tests {
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::Valid;

use super::to_body;
Expand Down
4 changes: 2 additions & 2 deletions src/core/helpers/headers.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use http::header::HeaderName;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::{Valid, ValidationError, Validator};

use crate::core::config::KeyValue;
Expand All @@ -25,7 +25,7 @@ pub fn to_mustache_headers(headers: &[KeyValue]) -> Valid<MustacheHeaders, Strin
mod tests {
use anyhow::Result;
use http::header::HeaderName;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::Validator;

use super::to_mustache_headers;
Expand Down
4 changes: 2 additions & 2 deletions src/core/helpers/url.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;
use tailcall_valid::Valid;

pub fn to_url(url: &str) -> Valid<Mustache, String> {
Expand All @@ -7,7 +7,7 @@ pub fn to_url(url: &str) -> Valid<Mustache, String> {

#[cfg(test)]
mod tests {
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;

use super::to_url;

Expand Down
2 changes: 1 addition & 1 deletion src/core/http/query_encoder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use tailcall_jq::mustache::path::ValueString;
use tailcall_template::mustache::path::ValueString;

/// Defines different strategies for encoding query parameters.
#[derive(Default, Debug, Clone)]
Expand Down
14 changes: 7 additions & 7 deletions src/core/http/request_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use std::hash::{Hash, Hasher};
use derive_setters::Setters;
use http::header::{HeaderMap, HeaderValue};
use tailcall_hasher::TailcallHasher;
use tailcall_jq::mustache::eval::Eval;
use tailcall_jq::mustache::path::{PathString, PathValue, ValueString};
use tailcall_jq::mustache::{Mustache, Segment};
use tailcall_template::mustache::eval::Eval;
use tailcall_template::mustache::path::{PathString, PathValue, ValueString};
use tailcall_template::mustache::{Mustache, Segment};
use url::Url;

use super::query_encoder::QueryEncoder;
Expand Down Expand Up @@ -311,8 +311,8 @@ mod tests {
use http::header::{HeaderMap, HeaderName};
use pretty_assertions::assert_eq;
use serde_json::json;
use tailcall_jq::mustache::path::{PathString, PathValue, ValueString};
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::path::{PathString, PathValue, ValueString};
use tailcall_template::mustache::Mustache;

use super::{Query, RequestTemplate};
use crate::core::has_headers::HasHeaders;
Expand Down Expand Up @@ -778,7 +778,7 @@ mod tests {

mod form_encoded_url {
use serde_json::json;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;

use crate::core::http::request_template::tests::Context;
use crate::core::http::RequestTemplate;
Expand Down Expand Up @@ -842,7 +842,7 @@ mod tests {

use http::header::HeaderMap;
use serde_json::json;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;

use crate::core::http::request_template::tests::Context;
use crate::core::http::RequestTemplate;
Expand Down
4 changes: 2 additions & 2 deletions src/core/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::borrow::Cow;

use serde_json::json;
use tailcall_jq::mustache::path::{PathGraphql, PathString, PathValue, ValueString};
use tailcall_template::mustache::path::{PathGraphql, PathString, PathValue, ValueString};

use crate::core::ir::{EvalContext, ResolverContextLike};

Expand Down Expand Up @@ -99,7 +99,7 @@ mod tests {
use http::header::{HeaderMap, HeaderValue};
use indexmap::IndexMap;
use once_cell::sync::Lazy;
use tailcall_jq::mustache::path::{PathString, PathValue, ValueString};
use tailcall_template::mustache::path::{PathString, PathValue, ValueString};

use crate::core::http::RequestContext;
use crate::core::ir::{EvalContext, ResolverContextLike, SelectionField};
Expand Down
2 changes: 1 addition & 1 deletion src/core/proto_reader/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use prost::Message;
use prost_reflect::prost_types::{FileDescriptorProto, FileDescriptorSet};
use serde::{Deserialize, Serialize};
use serde_json::json;
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;

use crate::core::blueprint::GrpcMethod;
use crate::core::config::{ConfigReaderContext, KeyValue};
Expand Down
2 changes: 1 addition & 1 deletion src/core/serde_value_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::borrow::Cow;

use async_graphql::{Name, Value as GraphQLValue};
use indexmap::IndexMap;
use tailcall_jq::mustache::path::PathString;
use tailcall_template::mustache::path::PathString;

use crate::core::blueprint::DynamicValue;

Expand Down
2 changes: 1 addition & 1 deletion tests/expression_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod tests {
use tailcall::core::http::RequestContext;
use tailcall::core::ir::model::IR;
use tailcall::core::ir::{EmptyResolverContext, Error, EvalContext};
use tailcall_jq::mustache::Mustache;
use tailcall_template::mustache::Mustache;

async fn eval(expr: &IR) -> Result<Value, Error> {
let runtime = tailcall::cli::runtime::init(&Blueprint::default());
Expand Down

1 comment on commit 5a245aa

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 4.15ms 2.01ms 37.16ms 80.81%
Req/Sec 6.20k 797.77 7.03k 94.42%

740435 requests in 30.01s, 3.71GB read

Requests/sec: 24670.22

Transfer/sec: 126.62MB

Please sign in to comment.