This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add version support Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * add support for versions and code search params in palyground URL Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * state management fix for versiom and backend test Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * - change version on click - add routing with version number in backend Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * add docker compiler file Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * more precise ink version locking Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * fix fmt and add multi-version docker calls support in backend Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * update cspell version Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * modify frontend version route to access frontend dir from args Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * - fix inconsistent version update on UI - add ink compiler scripts Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * fix rust and js formating issues Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * fix rust github workflow and playground test Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> * modify to build lastest complier using versions list and it's corresponding dockerfile Signed-off-by: Jasti Sri Radhe Shyam <[email protected]> --------- Signed-off-by: Jasti Sri Radhe Shyam <[email protected]>
- Loading branch information
1 parent
beaace9
commit c9c7c14
Showing
42 changed files
with
858 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["4.3.0", "4.2.1", "4.2.0", "4.1.0", "4.0.1", "4.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ | |
pub mod contract; | ||
pub mod frontend; | ||
pub mod gist; | ||
pub mod version; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
use std::fs; | ||
|
||
use actix_web::{ | ||
body::BoxBody, | ||
web, | ||
HttpResponse, | ||
}; | ||
|
||
pub use sandbox::VersionListResult; | ||
use serde_json::{ | ||
json, | ||
Value, | ||
}; | ||
|
||
pub struct AppVersionState { | ||
pub versions_file_path: String, | ||
} | ||
|
||
fn read_json_file(file_path: &str) -> Result<String, std::io::Error> { | ||
fs::read_to_string(file_path) | ||
} | ||
|
||
pub async fn route_version_list( | ||
data: web::Data<AppVersionState>, | ||
) -> HttpResponse<BoxBody> { | ||
let versions_file_path = &data.versions_file_path; | ||
let versions_arr_string = read_json_file(versions_file_path).unwrap(); | ||
let versions_arr_json: Value = | ||
serde_json::from_str(versions_arr_string.as_str()).expect("Failed to parse JSON"); | ||
let versions_json = json!({ | ||
"versions": versions_arr_json | ||
}); | ||
let versions_json_string = | ||
serde_json::to_string_pretty(&versions_json).expect("Failed to stringify JSON"); | ||
|
||
HttpResponse::Ok() | ||
.append_header(("Content-Type", "application/json")) | ||
.body(versions_json_string) | ||
} |
Oops, something went wrong.