diff --git a/Cargo.lock b/Cargo.lock index c11bea7..fb3c124 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1266,7 +1266,7 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "weaveconfig" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "biome_formatter", diff --git a/Cargo.toml b/Cargo.toml index ba4b580..46db302 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "weaveconfig" -version = "0.1.1" +version = "0.1.2" edition = "2021" description = "A unified configuration tool for monorepos" readme = "README.md" diff --git a/schema.json b/schema.json index 46d1697..753eb38 100644 --- a/schema.json +++ b/schema.json @@ -4,6 +4,10 @@ "description": "Schema for validating the _space.jsonc configuration file in weaveconfig.", "type": "object", "properties": { + "$schema": { + "type": "string", + "description": "The URI of the JSON Schema that this document adheres to." + }, "name": { "type": "string", "description": "The name of the space. This is used to identify the space in the graph. Dependencies reference spaces by their name. It must be unique within the graph." diff --git a/src/bin/weaveconfig.rs b/src/bin/weaveconfig.rs index 9187175..21f137c 100644 --- a/src/bin/weaveconfig.rs +++ b/src/bin/weaveconfig.rs @@ -11,7 +11,7 @@ use weaveconfig::generate_weaveconfig; #[derive(Parser)] #[command( name = "weaveconfig-cli", - version = "0.1.0", + version = "0.1.2", author = "Jeremy Moeglich ", about = "A CLI to manage weaveconfig configurations" )] diff --git a/src/ts_binding/format_ts_type.rs b/src/ts_binding/format_ts_type.rs index 5165d6c..66135ef 100644 --- a/src/ts_binding/format_ts_type.rs +++ b/src/ts_binding/format_ts_type.rs @@ -39,7 +39,15 @@ fn json_value_to_ts_type_helper(value: &serde_json::Value, indent: usize) -> Str let inner_indent_str = " ".repeat(indent + 1); if map.is_empty() { - "Record".to_string() + "Record".to_string() + // using never is unsound, undefined is more accurate + // const a: Record = {}; + // const b: { test: string } = { test: "test" }; + // const some_bool: boolean = false; + + // const c = some_bool ? a : b; + + // c.test // infered as string, should be string | undefined } else { let mut fields: Vec = vec![]; for (key, val) in map {