Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chart editor demo project #276

Merged
merged 6 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 82 additions & 102 deletions Cargo.lock

Large diffs are not rendered by default.

798 changes: 589 additions & 209 deletions javascript/vegafusion-chart-editor/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions javascript/vegafusion-chart-editor/package-lock.json

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

6 changes: 3 additions & 3 deletions javascript/vegafusion-embed/package-lock.json

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

6 changes: 3 additions & 3 deletions javascript/vegafusion-embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"watch:lib": "tsc -w"
},
"dependencies": {
"grpc-web": "^1.3.1",
"vega-lite": "^4.17.0",
"vegafusion-wasm": "../../vegafusion-wasm/pkg",
"grpc-web": "^1.3.1"
"vegafusion-wasm": "../../vegafusion-wasm/pkg"
},
"devDependencies": {
"@babel/core": "^7.5.0",
Expand All @@ -72,4 +72,4 @@
"ts-loader": "^8.0.0",
"typescript": "~4.1.3"
}
}
}
2 changes: 2 additions & 0 deletions vegafusion-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ features = [ "derive",]
[dependencies.tonic]
version = "0.8.3"
optional = true
git = "https://github.com/hyperium/tonic.git"
rev = "b3358dc6acf11ec800571735de1e1f1e449ec96a"

[build-dependencies.prost-build]
version = "0.11.4"
Expand Down
9 changes: 8 additions & 1 deletion vegafusion-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protobuf-src = [ "vegafusion-core/protobuf-src",]
prost = "0.11.3"
futures-util = "0.3.21"
regex = "^1.5.5"
tonic-web = "0.5.0"
h2 = "0.3.16"

[dev-dependencies]
serde_json = "1.0.91"
Expand Down Expand Up @@ -49,9 +49,16 @@ features = [ "datafusion-conn",]
version = "1.18.1"
features = [ "rt-multi-thread", "macros",]

[dependencies.tonic-web]
version = "0.5.0"
git = "https://github.com/hyperium/tonic.git"
rev = "b3358dc6acf11ec800571735de1e1f1e449ec96a"

[dependencies.tonic]
version = "0.8.3"
features = [ "tls",]
git = "https://github.com/hyperium/tonic.git"
rev = "b3358dc6acf11ec800571735de1e1f1e449ec96a"

[dependencies.clap]
version = "3.2.22"
Expand Down
8 changes: 2 additions & 6 deletions vegafusion-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ impl TonicVegaFusionRuntime for VegaFusionRuntimeGrpc {
&self,
request: Request<QueryRequest>,
) -> Result<Response<QueryResult>, Status> {
println!("grpc request...");
let result = self.runtime.query_request(request.into_inner()).await;
match result {
Ok(result) => {
println!(" response");
Ok(Response::new(result))
}
Ok(result) => Ok(Response::new(result)),
Err(err) => Err(Status::unknown(err.to_string())),
}
}
Expand Down Expand Up @@ -173,7 +169,7 @@ async fn grpc_server(
let server = tonic_web::enable(server);
Server::builder()
.accept_http1(true)
.add_service(server.into_inner())
.add_service(server)
.serve(addr)
.await?;
} else {
Expand Down
2 changes: 1 addition & 1 deletion vegafusion-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ features = [ "derive",]
version = "0.2.78"

[dependencies.getrandom]
version = "0.2.3"
version = "0.2.8"
features = [ "js",]

[dependencies.chrono]
Expand Down