-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: extension install uses dependencies.json (#3816)
- Loading branch information
1 parent
cefa5b0
commit 81cf22d
Showing
9 changed files
with
147 additions
and
108 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
77 changes: 0 additions & 77 deletions
77
src/dfx-core/src/extension/manifest/compatibility_matrix.rs
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
use url::Url; | ||
|
||
pub struct ExtensionJsonUrl(Url); | ||
|
||
impl ExtensionJsonUrl { | ||
pub fn registered(name: &str) -> Result<Self, url::ParseError> { | ||
let s = format!( | ||
"https://raw.githubusercontent.com/dfinity/dfx-extensions/main/extensions/{name}/extension.json" | ||
); | ||
Url::parse(&s).map(ExtensionJsonUrl) | ||
} | ||
|
||
pub fn to_dependencies_json(&self) -> Result<Url, url::ParseError> { | ||
self.as_url().join("dependencies.json") | ||
} | ||
|
||
pub fn as_url(&self) -> &Url { | ||
&self.0 | ||
} | ||
} |
Oops, something went wrong.