Content-Length: 3851 | pFad | http://github.com/postgresml/postgresml/pull/983.patch

thub.com From 5184cbaf2ffda3346f95e708b97dac120913cce2 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Tue, 5 Sep 2023 15:49:53 -0700 Subject: [PATCH] Make component public --- pgml-apps/cargo-pgml-components/Cargo.lock | 2 +- pgml-apps/cargo-pgml-components/Cargo.toml | 2 +- pgml-apps/cargo-pgml-components/src/components/component.rs | 4 +++- .../cargo-pgml-components/src/frontend/templates/mod.rs.tpl | 4 ++-- pgml-dashboard/src/components/component.rs | 4 +++- pgml-dashboard/src/components/mod.rs | 4 ++-- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pgml-apps/cargo-pgml-components/Cargo.lock b/pgml-apps/cargo-pgml-components/Cargo.lock index 40c0e87cf..872e6707e 100644 --- a/pgml-apps/cargo-pgml-components/Cargo.lock +++ b/pgml-apps/cargo-pgml-components/Cargo.lock @@ -126,7 +126,7 @@ dependencies = [ [[package]] name = "cargo-pgml-components" -version = "0.1.12" +version = "0.1.13" dependencies = [ "anyhow", "assert_cmd", diff --git a/pgml-apps/cargo-pgml-components/Cargo.toml b/pgml-apps/cargo-pgml-components/Cargo.toml index 74c3aace5..5779f93e7 100644 --- a/pgml-apps/cargo-pgml-components/Cargo.toml +++ b/pgml-apps/cargo-pgml-components/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-pgml-components" -version = "0.1.12" +version = "0.1.13" edition = "2021" authors = ["PostgresML "] license = "MIT" diff --git a/pgml-apps/cargo-pgml-components/src/components/component.rs b/pgml-apps/cargo-pgml-components/src/components/component.rs index 184b3cd3b..a785ed9d7 100644 --- a/pgml-apps/cargo-pgml-components/src/components/component.rs +++ b/pgml-apps/cargo-pgml-components/src/components/component.rs @@ -10,6 +10,7 @@ pub struct Component { pub value: String, } +#[macro_export] macro_rules! component { ($name:tt) => { impl From<$name> for crate::components::Component { @@ -36,7 +37,8 @@ macro_rules! component { }; } -pub(crate) use component; + +pub use component; // Render any string. impl From<&str> for Component { diff --git a/pgml-apps/cargo-pgml-components/src/frontend/templates/mod.rs.tpl b/pgml-apps/cargo-pgml-components/src/frontend/templates/mod.rs.tpl index ca15b0754..fe37ba782 100644 --- a/pgml-apps/cargo-pgml-components/src/frontend/templates/mod.rs.tpl +++ b/pgml-apps/cargo-pgml-components/src/frontend/templates/mod.rs.tpl @@ -2,8 +2,8 @@ // You shouldn't modify it manually. <% if root { %> -mod component; -pub(crate) use component::{component, Component}; +pub mod component; +pub use component::{component, Component}; <% } %> <% for component in modules.iter() { %> // <%= component.full_path() %> diff --git a/pgml-dashboard/src/components/component.rs b/pgml-dashboard/src/components/component.rs index 184b3cd3b..a785ed9d7 100644 --- a/pgml-dashboard/src/components/component.rs +++ b/pgml-dashboard/src/components/component.rs @@ -10,6 +10,7 @@ pub struct Component { pub value: String, } +#[macro_export] macro_rules! component { ($name:tt) => { impl From<$name> for crate::components::Component { @@ -36,7 +37,8 @@ macro_rules! component { }; } -pub(crate) use component; + +pub use component; // Render any string. impl From<&str> for Component { diff --git a/pgml-dashboard/src/components/mod.rs b/pgml-dashboard/src/components/mod.rs index 40205f3c2..9008682f1 100644 --- a/pgml-dashboard/src/components/mod.rs +++ b/pgml-dashboard/src/components/mod.rs @@ -1,8 +1,8 @@ // This file is automatically generated. // You shouldn't modify it manually. -mod component; -pub(crate) use component::{component, Component}; +pub mod component; +pub use component::{component, Component}; // src/components/breadcrumbs pub mod breadcrumbs;








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgresml/postgresml/pull/983.patch

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy