v0.2.6-pre.003-fix.003
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ksp-app-wallet-desk",
|
||||
"private": true,
|
||||
"version": "0.2.6-pre.3.fix.2",
|
||||
"version": "0.2.6-pre.3.fix.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "KSP Wallet Desk",
|
||||
"version": "0.2.6-pre.3.fix.2",
|
||||
"version": "0.2.6-pre.3.fix.3",
|
||||
"identifier": "com.sasedev.ksp-app-wallet-desk",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-config-lib/tests/ownership.rs
|
||||
// version: 5
|
||||
// version: 6
|
||||
|
||||
//! Workspace ownership audits for KSP application configuration boundaries.
|
||||
|
||||
@@ -289,7 +289,7 @@ fn environment_name_scanner_ignores_namespace_labels_but_keeps_concrete_names()
|
||||
const KSPB_PUBLIC_ENDPOINT: &str = "KSPB_PUBLIC_ENDPOINT";
|
||||
const KSPB_SECRET_TOKEN: &str = "KSPB_SECRET_TOKEN";
|
||||
const FILE_ID_COMPOSITE_KSP_APP_WALLET_DESK: &str = "cfg.composite.ksp-app-wallet-desk";
|
||||
const KSP_PUBLIC_RPC_URL_SUFFIXED: &str = "not-an-env";
|
||||
const PREFIX_KSP_PUBLIC_RPC_URL_SUFFIXED: &str = "not-an-env";
|
||||
"#;
|
||||
let mut names = std::collections::BTreeSet::<String>::new();
|
||||
collect_environment_names(source, &mut names);
|
||||
@@ -303,6 +303,9 @@ fn environment_name_scanner_ignores_namespace_labels_but_keeps_concrete_names()
|
||||
assert!(names.contains("KSPB_SECRET_TOKEN"));
|
||||
assert!(!names.contains("KSP_APP_WALLET_DESK"));
|
||||
assert!(!names.contains("KSP_PUBLIC_RPC_URL_SUFFIXED"));
|
||||
let concrete_source = r#"const ENV_NAME: &str = "KSP_PUBLIC_RPC_URL_SUFFIXED";"#;
|
||||
collect_environment_names(concrete_source, &mut names);
|
||||
assert!(names.contains("KSP_PUBLIC_RPC_URL_SUFFIXED"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-config-lib/unit_tests/document.rs
|
||||
// version: 5
|
||||
// version: 6
|
||||
|
||||
#[test]
|
||||
fn committed_logging_document_passes_registered_schema_and_semantic_validation() {
|
||||
@@ -49,15 +49,10 @@ fn committed_logging_document_exposes_reusable_operational_profiles() {
|
||||
let profiles = document.value().get("profiles").and_then(serde_json::Value::as_array);
|
||||
assert!(profiles.is_some(), "validated Logging document should retain profiles");
|
||||
if let std::option::Option::Some(profiles) = profiles {
|
||||
for profile_id in
|
||||
["console_error", "console_warn", "console_info", "console_debug", "console_trace", "file_info", "local_dev", "superdev", "supertrace"]
|
||||
{
|
||||
assert!(
|
||||
profiles.iter().any(|profile| -> bool {
|
||||
return profile.get("profile_id").and_then(serde_json::Value::as_str) == std::option::Option::Some(profile_id);
|
||||
}),
|
||||
"committed Logging document is missing profile {profile_id}"
|
||||
);
|
||||
for profile_id in ["console_error", "console_warn", "console_info", "console_debug", "console_trace", "file_info", "local_dev", "superdev", "supertrace"] {
|
||||
assert!(profiles.iter().any(|profile| -> bool {
|
||||
return profile.get("profile_id").and_then(serde_json::Value::as_str) == std::option::Option::Some(profile_id);
|
||||
}), "committed Logging document is missing profile {profile_id}");
|
||||
}
|
||||
assert_super_profile(profiles, "superdev", "debug");
|
||||
assert_super_profile(profiles, "supertrace", "trace");
|
||||
@@ -72,19 +67,18 @@ fn assert_super_profile(profiles: &[serde_json::Value], profile_id: &str, file_l
|
||||
});
|
||||
assert!(profile.is_some(), "missing super Logging profile {profile_id}");
|
||||
if let std::option::Option::Some(profile) = profile {
|
||||
let console_level =
|
||||
profile.get("console").and_then(|value| value.get("filter")).and_then(|value| value.get("level")).and_then(serde_json::Value::as_str);
|
||||
let console_level = profile
|
||||
.get("console")
|
||||
.and_then(|value| { return value.get("filter"); })
|
||||
.and_then(|value| { return value.get("level"); })
|
||||
.and_then(serde_json::Value::as_str);
|
||||
assert_eq!(console_level, std::option::Option::Some("debug"));
|
||||
let files = profile.get("files").and_then(serde_json::Value::as_array);
|
||||
assert_eq!(files.map(std::vec::Vec::len), std::option::Option::Some(7));
|
||||
if let std::option::Option::Some(files) = files {
|
||||
assert!(
|
||||
files.iter().all(|file| -> bool {
|
||||
return file.get("filter").and_then(|value| value.get("level")).and_then(serde_json::Value::as_str)
|
||||
== std::option::Option::Some(file_level);
|
||||
}),
|
||||
"all {profile_id} file sinks should use level {file_level}"
|
||||
);
|
||||
assert!(files.iter().all(|file| -> bool {
|
||||
return file.get("filter").and_then(|value| { return value.get("level"); }).and_then(serde_json::Value::as_str) == std::option::Option::Some(file_level);
|
||||
}), "all {profile_id} file sinks should use level {file_level}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user