windmill-utils-internal 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,3 +42,54 @@ export interface SchemaProperty {
|
|
|
42
42
|
oneOf?: SchemaProperty[];
|
|
43
43
|
originalType?: string;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Converts argument signature types to JSON schema properties.
|
|
47
|
+
* This function handles various Windmill-specific types and converts them
|
|
48
|
+
* to standard JSON schema format while preserving existing property metadata.
|
|
49
|
+
*
|
|
50
|
+
* @param t - The argument signature type definition (can be string or complex object types)
|
|
51
|
+
* @param oldS - Existing schema property to update with new type information
|
|
52
|
+
*/
|
|
53
|
+
export declare function argSigToJsonSchemaType(t: string | {
|
|
54
|
+
resource: string | null;
|
|
55
|
+
} | {
|
|
56
|
+
list: (string | {
|
|
57
|
+
name?: string;
|
|
58
|
+
props?: {
|
|
59
|
+
key: string;
|
|
60
|
+
typ: any;
|
|
61
|
+
}[];
|
|
62
|
+
}) | {
|
|
63
|
+
str: any;
|
|
64
|
+
} | {
|
|
65
|
+
object: {
|
|
66
|
+
name?: string;
|
|
67
|
+
props?: {
|
|
68
|
+
key: string;
|
|
69
|
+
typ: any;
|
|
70
|
+
}[];
|
|
71
|
+
};
|
|
72
|
+
} | null;
|
|
73
|
+
} | {
|
|
74
|
+
dynselect: string;
|
|
75
|
+
} | {
|
|
76
|
+
dynmultiselect: string;
|
|
77
|
+
} | {
|
|
78
|
+
str: string[] | null;
|
|
79
|
+
} | {
|
|
80
|
+
object: {
|
|
81
|
+
name?: string;
|
|
82
|
+
props?: {
|
|
83
|
+
key: string;
|
|
84
|
+
typ: any;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
} | {
|
|
88
|
+
oneof: {
|
|
89
|
+
label: string;
|
|
90
|
+
properties: {
|
|
91
|
+
key: string;
|
|
92
|
+
typ: any;
|
|
93
|
+
}[];
|
|
94
|
+
}[];
|
|
95
|
+
}, oldS: SchemaProperty): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.argSigToJsonSchemaType = argSigToJsonSchemaType;
|
|
3
4
|
/**
|
|
4
5
|
* Converts argument signature types to JSON schema properties.
|
|
5
6
|
* This function handles various Windmill-specific types and converts them
|
|
@@ -194,8 +195,6 @@ function argSigToJsonSchemaType(t, oldS) {
|
|
|
194
195
|
newS[field] = oldS[field];
|
|
195
196
|
}
|
|
196
197
|
});
|
|
197
|
-
console.log("newS", JSON.stringify(newS, null, 2));
|
|
198
|
-
console.log("oldS", JSON.stringify(oldS, null, 2));
|
|
199
198
|
if (oldS.type != newS.type) {
|
|
200
199
|
for (const prop of Object.getOwnPropertyNames(newS)) {
|
|
201
200
|
if (prop != "description") {
|