Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
459e719
feat(app): add native Android extension support
mstankovic-godaddy Aug 28, 2026
20d16a9
Merge branch 'main' into feat/add-native-extension
mstankovic-godaddy Aug 31, 2026
0561a60
Merge branch 'main' into feat/add-native-extension
mstankovic-godaddy Sep 7, 2026
cd10b28
feat(platform): register native extensions via DevX Core native-apps API
cblecken-godaddy Sep 14, 2026
1955ef3
test(platform): cover native-app client failure paths; bound error bo…
cblecken-godaddy Sep 14, 2026
5fba3ca
Merge branch 'main' into feat/add-native-extension
mstankovic-godaddy Sep 17, 2026
b350cee
Merge branch 'main' into feat/add-native-extension
mstankovic-godaddy Sep 23, 2026
00cb916
feat(platform): omit nativeExtensions unless the native-apps flag is …
mstankovic-godaddy Sep 23, 2026
fd2d114
feat(platform): hide add native-extension behind the native-apps flag
mstankovic-godaddy Sep 23, 2026
cfc11f6
docs(platform): drop native-extension from stable help and the overvi…
mstankovic-godaddy Sep 23, 2026
5980295
style(platform): format native-apps feature flag changes
mstankovic-godaddy Sep 23, 2026
6e07c7d
Merge branch 'main' into feat/add-native-extension
mstankovic-godaddy Sep 28, 2026
1357d92
remove md file
mstankovic-godaddy Sep 28, 2026
25ace80
CI tests fix
mstankovic-godaddy Sep 28, 2026
dcc6652
fix(platform): stop promising a native-app draft and split the releas…
mstankovic-godaddy Sep 28, 2026
7e837f9
PR comments
mstankovic-godaddy Sep 28, 2026
7fb401e
feat(platform): gate native-extension create on accepted agreements a…
mstankovic-godaddy Sep 30, 2026
86ef131
Merge branch 'main' into feat/add-native-extension
mstankovic-godaddy Sep 30, 2026
b147dd8
fix(platform): pass base_url by reference to ensure_ready_for_app_ini…
mstankovic-godaddy Sep 30, 2026
5adc7c0
Merge branch 'main' into feat/add-native-extension
mstankovic-godaddy Oct 2, 2026
1fae228
fix(platform): inject TTY state into native-extension onboarding gate
mstankovic-godaddy Oct 2, 2026
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
505 changes: 21 additions & 484 deletions rust/src/config/mod.rs

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions rust/src/config/native_extension.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
//! Validation for `[native_extension]` manifest configuration.

pub(super) fn validate(
errors: &mut Vec<String>,
path: &str,
support_contact: &str,
android_package_name: &str,
) {
if !is_valid_email(support_contact) {
errors.push(format!(
"{path}.support_contact must be a valid email address (got {support_contact:?})"
));
}
if android_package_name.is_empty() {
errors.push(format!("{path}.android_package_name must be non-empty"));
}
}

/// Match the email shape enforced by DevX Core's Zod v3 `email()` validator.
fn is_valid_email(value: &str) -> bool {
if value.starts_with('.') || value.contains("..") {
return false;
}
let Some((local, domain)) = value.split_once('@') else {
return false;
};
if domain.contains('@') || local.is_empty() {
return false;
}
let Some(last_local) = local.bytes().next_back() else {
return false;
};
if !local.bytes().all(|byte| {
byte.is_ascii_alphanumeric() || matches!(byte, b'_' | b'\'' | b'+' | b'-' | b'.')
}) || !(last_local.is_ascii_alphanumeric() || matches!(last_local, b'_' | b'+' | b'-'))
{
return false;
}

let mut labels = domain.split('.').peekable();
let Some(first_label) = labels.next() else {
return false;
};
if labels.peek().is_none() || !is_valid_domain_label(first_label) {
return false;
}
let remaining: Vec<&str> = labels.collect();
let Some(top_level_domain) = remaining.last() else {
return false;
};
remaining.iter().all(|label| is_valid_domain_label(label))
&& top_level_domain.len() >= 2
&& top_level_domain
.bytes()
.all(|byte| byte.is_ascii_alphabetic())
}

fn is_valid_domain_label(label: &str) -> bool {
label
.bytes()
.next()
.is_some_and(|byte| byte.is_ascii_alphanumeric())
&& label
.bytes()
.all(|byte| byte.is_ascii_alphanumeric() || byte == b'-')
}
Comment thread
mstankovic-godaddy marked this conversation as resolved.

#[cfg(test)]
mod tests {
use super::is_valid_email;

#[test]
fn rejects_malformed_addresses() {
for value in [
"",
"not-an-email",
".support@example.com",
"support..team@example.com",
"support@example",
"support@example.c",
] {
assert!(!is_valid_email(value), "unexpected valid email: {value:?}");
}
}

#[test]
fn accepts_devx_core_email_shape() {
for value in [
"support@example.com",
"native.app+alerts@sub.example.co.uk",
"team_member@example.io",
] {
assert!(is_valid_email(value), "unexpected invalid email: {value:?}");
}
}
}
1 change: 1 addition & 0 deletions rust/src/config/redirect_uris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ mod tests {
dependencies: vec![],
extensions: None,
settings: vec![],
native_extension: None,
}
}

Expand Down
8 changes: 4 additions & 4 deletions rust/src/config/settings_form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,10 @@ fn validate_field(field: &SettingsFormV1Field, errors: &mut Vec<String>, path: &
}
match field {
SettingsFormV1Field::Select { options, .. }
| SettingsFormV1Field::MultiSelect { options, .. } => {
if options.is_empty() {
errors.push(format!("{path}.options must contain at least one option"));
}
| SettingsFormV1Field::MultiSelect { options, .. }
if options.is_empty() =>
{
errors.push(format!("{path}.options must contain at least one option"));
}
SettingsFormV1Field::ListGroup { item, .. } => {
if !is_field_name(&item.id_field) {
Expand Down
Loading
Loading