Skip to content

Commit 60d4723

Browse files
author
Nico Sammito
authored
Merge pull request #267 from code0-tech/feat/#266
Update to 0.0.58 Tucana
2 parents 40eb40c + 7f797d4 commit 60d4723

28 files changed

Lines changed: 109 additions & 60 deletions

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition = "2024"
88
[workspace.dependencies]
99
serde = "1.0.219"
1010
serde_json = "1.0.140"
11-
tucana = "0.0.56"
11+
tucana = "0.0.58"
1212
clap = "4.5.41"
1313
colored = "3.0"
1414
tabled = "0.20"

crates/cli/src/analyser/data_type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ impl Analyser {
4747
));
4848
}
4949

50-
if dt.signature == "" {
50+
if dt.r#type == "" {
5151
self.reporter.add(Diagnose::new(
5252
dt.identifier.clone(),
5353
adt.original_definition.clone(),
5454
DiagnosticKind::NullField {
55-
field_name: "signature".into(),
55+
field_name: "type".into(),
5656
},
5757
));
5858
}

crates/cli/src/analyser/flow_type.rs

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ impl Analyser {
88
let name = flow.identifier.clone();
99
let original = aft.original_definition.clone();
1010

11+
for linked in flow.linked_data_type_identifiers.clone() {
12+
if !self.data_type_identifier_exists(linked.as_str(), None) {
13+
self.reporter.add(Diagnose::new(
14+
name.clone(),
15+
original.clone(),
16+
DiagnosticKind::UndefinedDataTypeIdentifier {
17+
identifier: linked.clone(),
18+
},
19+
));
20+
}
21+
}
22+
1123
if flow.display_icon.is_empty() {
1224
self.reporter.add(Diagnose::new(
1325
name.clone(),
@@ -65,31 +77,43 @@ impl Analyser {
6577
));
6678
}
6779

68-
if let Some(identifier) = &flow.input_type_identifier
80+
if let Some(identifier) = &flow.input_type
6981
&& identifier == ""
7082
{
7183
self.reporter.add(Diagnose::new(
7284
name.clone(),
7385
original.clone(),
7486
DiagnosticKind::NullField {
75-
field_name: "input_type_identifier".into(),
87+
field_name: "input_type".into(),
7688
},
7789
));
7890
}
7991

80-
if let Some(identifier) = &flow.return_type_identifier
92+
if let Some(identifier) = &flow.return_type
8193
&& identifier == ""
8294
{
8395
self.reporter.add(Diagnose::new(
8496
name.clone(),
8597
original.clone(),
8698
DiagnosticKind::NullField {
87-
field_name: "return_type_identifier".into(),
99+
field_name: "return_type".into(),
88100
},
89101
));
90102
}
91103

92104
for setting in &flow.settings {
105+
for linked in setting.linked_data_type_identifiers.clone() {
106+
if !self.data_type_identifier_exists(linked.as_str(), None) {
107+
self.reporter.add(Diagnose::new(
108+
name.clone(),
109+
original.clone(),
110+
DiagnosticKind::UndefinedDataTypeIdentifier {
111+
identifier: linked.clone(),
112+
},
113+
));
114+
}
115+
}
116+
93117
if setting.name.is_empty() {
94118
self.reporter.add(Diagnose::new(
95119
setting.identifier.clone(),
@@ -108,12 +132,12 @@ impl Analyser {
108132
},
109133
));
110134
}
111-
if !self.data_type_identifier_exists(&setting.data_type_identifier, None) {
135+
if !self.data_type_identifier_exists(&setting.r#type, None) {
112136
self.reporter.add(Diagnose::new(
113137
name.clone(),
114138
original.clone(),
115139
DiagnosticKind::UndefinedDataTypeIdentifier {
116-
identifier: setting.data_type_identifier.clone(),
140+
identifier: setting.r#type.clone(),
117141
},
118142
));
119143
}

definitions/cron/data_type/type/cron_day_of_month.proto.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"content": "Cron Day of Month"
2626
}
2727
],
28-
"linked_data_type_identifiers": [],
29-
"signature": "string"
28+
"linkedDataTypeIdentifiers": [],
29+
"type": "string"
3030
}

definitions/cron/data_type/type/cron_day_of_week.proto.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"content": "Cron Day of Week"
2626
}
2727
],
28-
"linked_data_type_identifiers": [],
29-
"signature": "string | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN'"
28+
"linkedDataTypeIdentifiers": [],
29+
"type": "string | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN'"
3030
}

definitions/cron/data_type/type/cron_hour.proto.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"content": "Cron Hour"
2626
}
2727
],
28-
"linked_data_type_identifiers": [],
29-
"signature": "string"
28+
"linkedDataTypeIdentifiers": [],
29+
"type": "string"
3030
}

definitions/cron/data_type/type/cron_minute.proto.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"content": "Cron Minute"
2626
}
2727
],
28-
"linked_data_type_identifiers": [],
29-
"signature": "string"
28+
"linkedDataTypeIdentifiers": [],
29+
"type": "string"
3030
}

definitions/cron/data_type/type/cron_month.proto.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"content": "Cron Month"
2626
}
2727
],
28-
"linked_data_type_identifiers": [],
29-
"signature": "string | 'JAN' | 'FEB' | 'MAR' | 'APR' | 'MAY' | 'JUN' | 'JUL' | 'AUG' | 'SEP' | 'OCT' | 'NOV' | 'DEC' "
28+
"linkedDataTypeIdentifiers": [],
29+
"type": "string | 'JAN' | 'FEB' | 'MAR' | 'APR' | 'MAY' | 'JUN' | 'JUL' | 'AUG' | 'SEP' | 'OCT' | 'NOV' | 'DEC' "
3030
}

definitions/cron/flow_type/cron.proto.json

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
{
55
"identifier": "CRON_MINUTE",
66
"unique": "NONE",
7-
"dataTypeIdentifier": "CRON_MINUTE",
7+
"type": "CRON_MINUTE",
8+
"linkedDataTypeIdentifiers": [
9+
"CRON_MINUTE"
10+
],
811
"defaultValue": null,
912
"name": [
1013
{
@@ -22,7 +25,10 @@
2225
{
2326
"identifier": "CRON_HOUR",
2427
"unique": "NONE",
25-
"dataTypeIdentifier": "CRON_HOUR",
28+
"type": "CRON_HOUR",
29+
"linkedDataTypeIdentifiers": [
30+
"CRON_HOUR"
31+
],
2632
"defaultValue": null,
2733
"name": [
2834
{
@@ -40,7 +46,10 @@
4046
{
4147
"identifier": "CRON_DAY_OF_MONTH",
4248
"unique": "NONE",
43-
"dataTypeIdentifier": "CRON_DAY_OF_MONTH",
49+
"type": "CRON_DAY_OF_MONTH",
50+
"linkedDataTypeIdentifiers": [
51+
"CRON_DAY_OF_MONTH"
52+
],
4453
"defaultValue": null,
4554
"name": [
4655
{
@@ -58,7 +67,10 @@
5867
{
5968
"identifier": "CRON_MONTH",
6069
"unique": "NONE",
61-
"dataTypeIdentifier": "CRON_MONTH",
70+
"type": "CRON_MONTH",
71+
"linkedDataTypeIdentifiers": [
72+
"CRON_MONTH"
73+
],
6274
"defaultValue": null,
6375
"name": [
6476
{
@@ -76,7 +88,10 @@
7688
{
7789
"identifier": "CRON_DAY_OF_WEEK",
7890
"unique": "NONE",
79-
"dataTypeIdentifier": "CRON_DAY_OF_WEEK",
91+
"type": "CRON_DAY_OF_WEEK",
92+
"linkedDataTypeIdentifiers": [
93+
"CRON_DAY_OF_WEEK"
94+
],
8095
"defaultValue": null,
8196
"name": [
8297
{

0 commit comments

Comments
 (0)