windmill-cli 1.538.0 → 1.539.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.
- package/esm/gen/core/OpenAPI.js +1 -1
- package/esm/gen/services.gen.js +8 -1
- package/esm/src/main.js +1 -1
- package/esm/wasm/py/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/ts/windmill_parser_wasm.js +1 -1
- package/esm/wasm/ts/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/windmill-utils-internal/src/parse/parse-schema.js +109 -87
- package/package.json +1 -1
- package/types/gen/services.gen.d.ts +3 -0
- package/types/gen/services.gen.d.ts.map +1 -1
- package/types/gen/types.gen.d.ts +15 -0
- package/types/gen/types.gen.d.ts.map +1 -1
- package/types/src/main.d.ts +1 -1
- package/types/windmill-utils-internal/src/gen/types.gen.d.ts +15 -0
- package/types/windmill-utils-internal/src/gen/types.gen.d.ts.map +1 -1
- package/types/windmill-utils-internal/src/parse/parse-schema.d.ts +5 -3
- package/types/windmill-utils-internal/src/parse/parse-schema.d.ts.map +1 -1
package/esm/gen/core/OpenAPI.js
CHANGED
package/esm/gen/services.gen.js
CHANGED
|
@@ -2214,6 +2214,8 @@ export const getVariable = (data) => {
|
|
|
2214
2214
|
* @param data The data for the request.
|
|
2215
2215
|
* @param data.workspace
|
|
2216
2216
|
* @param data.path
|
|
2217
|
+
* @param data.allowCache allow getting a cached value for improved performance
|
|
2218
|
+
*
|
|
2217
2219
|
* @returns string variable
|
|
2218
2220
|
* @throws ApiError
|
|
2219
2221
|
*/
|
|
@@ -2224,6 +2226,9 @@ export const getVariableValue = (data) => {
|
|
|
2224
2226
|
path: {
|
|
2225
2227
|
workspace: data.workspace,
|
|
2226
2228
|
path: data.path
|
|
2229
|
+
},
|
|
2230
|
+
query: {
|
|
2231
|
+
allow_cache: data.allowCache
|
|
2227
2232
|
}
|
|
2228
2233
|
});
|
|
2229
2234
|
};
|
|
@@ -2732,6 +2737,7 @@ export const getResource = (data) => {
|
|
|
2732
2737
|
* @param data.workspace
|
|
2733
2738
|
* @param data.path
|
|
2734
2739
|
* @param data.jobId job id
|
|
2740
|
+
* @param data.allowCache allow getting a cached value for improved performance
|
|
2735
2741
|
* @returns unknown resource value
|
|
2736
2742
|
* @throws ApiError
|
|
2737
2743
|
*/
|
|
@@ -2744,7 +2750,8 @@ export const getResourceValueInterpolated = (data) => {
|
|
|
2744
2750
|
path: data.path
|
|
2745
2751
|
},
|
|
2746
2752
|
query: {
|
|
2747
|
-
job_id: data.jobId
|
|
2753
|
+
job_id: data.jobId,
|
|
2754
|
+
allow_cache: data.allowCache
|
|
2748
2755
|
}
|
|
2749
2756
|
});
|
|
2750
2757
|
};
|
package/esm/src/main.js
CHANGED
|
@@ -38,7 +38,7 @@ export { flow, app, script, workspace, resource, resourceType, user, variable, h
|
|
|
38
38
|
// console.error(JSON.stringify(event.error, null, 4));
|
|
39
39
|
// }
|
|
40
40
|
// });
|
|
41
|
-
export const VERSION = "1.
|
|
41
|
+
export const VERSION = "1.539.0";
|
|
42
42
|
const command = new Command()
|
|
43
43
|
.name("wmill")
|
|
44
44
|
.action(() => log.info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`))
|
|
Binary file
|
|
@@ -242,7 +242,7 @@ const imports = {
|
|
|
242
242
|
const ret = Object.entries(arg0);
|
|
243
243
|
return ret;
|
|
244
244
|
},
|
|
245
|
-
|
|
245
|
+
__wbg_eval_d0dfcbbfaeff4b3c: function (arg0, arg1) {
|
|
246
246
|
const ret = eval(getStringFromWasm0(arg0, arg1));
|
|
247
247
|
return ret;
|
|
248
248
|
},
|
|
Binary file
|
|
@@ -7,39 +7,39 @@
|
|
|
7
7
|
* @param oldS - Existing schema property to update with new type information
|
|
8
8
|
*/
|
|
9
9
|
export function argSigToJsonSchemaType(t, oldS) {
|
|
10
|
-
const newS = { type:
|
|
11
|
-
if (t ===
|
|
12
|
-
newS.type =
|
|
10
|
+
const newS = { type: "" };
|
|
11
|
+
if (t === "int") {
|
|
12
|
+
newS.type = "integer";
|
|
13
13
|
}
|
|
14
|
-
else if (t ===
|
|
15
|
-
newS.type =
|
|
14
|
+
else if (t === "float") {
|
|
15
|
+
newS.type = "number";
|
|
16
16
|
}
|
|
17
|
-
else if (t ===
|
|
18
|
-
newS.type =
|
|
17
|
+
else if (t === "bool") {
|
|
18
|
+
newS.type = "boolean";
|
|
19
19
|
}
|
|
20
|
-
else if (t ===
|
|
21
|
-
newS.type =
|
|
22
|
-
newS.format =
|
|
20
|
+
else if (t === "email") {
|
|
21
|
+
newS.type = "string";
|
|
22
|
+
newS.format = "email";
|
|
23
23
|
}
|
|
24
|
-
else if (t ===
|
|
25
|
-
newS.type =
|
|
26
|
-
newS.format =
|
|
24
|
+
else if (t === "sql") {
|
|
25
|
+
newS.type = "string";
|
|
26
|
+
newS.format = "sql";
|
|
27
27
|
}
|
|
28
|
-
else if (t ===
|
|
29
|
-
newS.type =
|
|
30
|
-
newS.format =
|
|
28
|
+
else if (t === "yaml") {
|
|
29
|
+
newS.type = "string";
|
|
30
|
+
newS.format = "yaml";
|
|
31
31
|
}
|
|
32
|
-
else if (t ===
|
|
33
|
-
newS.type =
|
|
34
|
-
newS.contentEncoding =
|
|
35
|
-
newS.originalType =
|
|
32
|
+
else if (t === "bytes") {
|
|
33
|
+
newS.type = "string";
|
|
34
|
+
newS.contentEncoding = "base64";
|
|
35
|
+
newS.originalType = "bytes";
|
|
36
36
|
}
|
|
37
|
-
else if (t ===
|
|
38
|
-
newS.type =
|
|
39
|
-
newS.format =
|
|
37
|
+
else if (t === "datetime") {
|
|
38
|
+
newS.type = "string";
|
|
39
|
+
newS.format = "date-time";
|
|
40
40
|
}
|
|
41
|
-
else if (typeof t !==
|
|
42
|
-
newS.type =
|
|
41
|
+
else if (typeof t !== "string" && "oneof" in t) {
|
|
42
|
+
newS.type = "object";
|
|
43
43
|
if (t.oneof) {
|
|
44
44
|
newS.oneOf = t.oneof.map((obj) => {
|
|
45
45
|
const oldObjS = oldS.oneOf?.find((o) => o?.title === obj.label) ?? undefined;
|
|
@@ -49,21 +49,21 @@ export function argSigToJsonSchemaType(t, oldS) {
|
|
|
49
49
|
properties[prop.key] = oldObjS?.properties[prop.key];
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
properties[prop.key] = { description:
|
|
52
|
+
properties[prop.key] = { description: "", type: "" };
|
|
53
53
|
}
|
|
54
54
|
argSigToJsonSchemaType(prop.typ, properties[prop.key]);
|
|
55
55
|
}
|
|
56
56
|
return {
|
|
57
|
-
type:
|
|
57
|
+
type: "object",
|
|
58
58
|
title: obj.label,
|
|
59
59
|
properties,
|
|
60
|
-
order: oldObjS?.order ?? undefined
|
|
60
|
+
order: oldObjS?.order ?? undefined,
|
|
61
61
|
};
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
else if (typeof t !==
|
|
66
|
-
newS.type =
|
|
65
|
+
else if (typeof t !== "string" && `object` in t) {
|
|
66
|
+
newS.type = "object";
|
|
67
67
|
if (t.object.name) {
|
|
68
68
|
newS.format = `resource-${t.object.name}`;
|
|
69
69
|
}
|
|
@@ -74,102 +74,116 @@ export function argSigToJsonSchemaType(t, oldS) {
|
|
|
74
74
|
properties[prop.key] = oldS.properties[prop.key];
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
properties[prop.key] = { description:
|
|
77
|
+
properties[prop.key] = { description: "", type: "" };
|
|
78
78
|
}
|
|
79
79
|
argSigToJsonSchemaType(prop.typ, properties[prop.key]);
|
|
80
80
|
}
|
|
81
81
|
newS.properties = properties;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
else if (typeof t !==
|
|
85
|
-
newS.type =
|
|
84
|
+
else if (typeof t !== "string" && `str` in t) {
|
|
85
|
+
newS.type = "string";
|
|
86
86
|
if (t.str) {
|
|
87
|
-
newS.originalType =
|
|
87
|
+
newS.originalType = "enum";
|
|
88
88
|
newS.enum = t.str;
|
|
89
89
|
}
|
|
90
|
-
else if (oldS.originalType ==
|
|
91
|
-
newS.originalType =
|
|
90
|
+
else if (oldS.originalType == "string" && oldS.enum) {
|
|
91
|
+
newS.originalType = "string";
|
|
92
92
|
newS.enum = oldS.enum;
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
|
-
newS.originalType =
|
|
95
|
+
newS.originalType = "string";
|
|
96
96
|
newS.enum = undefined;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
else if (typeof t !==
|
|
100
|
-
newS.type =
|
|
99
|
+
else if (typeof t !== "string" && `resource` in t) {
|
|
100
|
+
newS.type = "object";
|
|
101
101
|
newS.format = `resource-${t.resource}`;
|
|
102
102
|
}
|
|
103
|
-
else if (typeof t !==
|
|
104
|
-
newS.type =
|
|
103
|
+
else if (typeof t !== "string" && `dynselect` in t) {
|
|
104
|
+
newS.type = "object";
|
|
105
105
|
newS.format = `dynselect-${t.dynselect}`;
|
|
106
106
|
}
|
|
107
|
-
else if (typeof t !==
|
|
108
|
-
newS.type =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
else if (typeof t !== "string" && `dynmultiselect` in t) {
|
|
108
|
+
newS.type = "object";
|
|
109
|
+
newS.format = `dynmultiselect-${t.dynmultiselect}`;
|
|
110
|
+
}
|
|
111
|
+
else if (typeof t !== "string" && `list` in t) {
|
|
112
|
+
newS.type = "array";
|
|
113
|
+
if (t.list === "int" || t.list === "float") {
|
|
114
|
+
newS.items = { type: "number" };
|
|
115
|
+
newS.originalType = "number[]";
|
|
112
116
|
}
|
|
113
|
-
else if (t.list ===
|
|
114
|
-
newS.items = { type:
|
|
115
|
-
newS.originalType =
|
|
117
|
+
else if (t.list === "bytes") {
|
|
118
|
+
newS.items = { type: "string", contentEncoding: "base64" };
|
|
119
|
+
newS.originalType = "bytes[]";
|
|
116
120
|
}
|
|
117
|
-
else if (t.list &&
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
else if (t.list &&
|
|
122
|
+
typeof t.list == "object" &&
|
|
123
|
+
"str" in t.list &&
|
|
124
|
+
t.list.str) {
|
|
125
|
+
newS.items = { type: "string", enum: t.list.str };
|
|
126
|
+
newS.originalType = "enum[]";
|
|
120
127
|
}
|
|
121
|
-
else if (t.list ==
|
|
122
|
-
|
|
123
|
-
newS.
|
|
128
|
+
else if (t.list == "string" ||
|
|
129
|
+
(t.list && typeof t.list == "object" && "str" in t.list)) {
|
|
130
|
+
newS.items = { type: "string", enum: oldS.items?.enum };
|
|
131
|
+
newS.originalType = "string[]";
|
|
124
132
|
}
|
|
125
|
-
else if (t.list &&
|
|
133
|
+
else if (t.list &&
|
|
134
|
+
typeof t.list == "object" &&
|
|
135
|
+
"resource" in t.list &&
|
|
136
|
+
t.list.resource) {
|
|
126
137
|
newS.items = {
|
|
127
|
-
type:
|
|
128
|
-
resourceType: t.list.resource
|
|
138
|
+
type: "resource",
|
|
139
|
+
resourceType: t.list.resource,
|
|
129
140
|
};
|
|
130
|
-
newS.originalType =
|
|
141
|
+
newS.originalType = "resource[]";
|
|
131
142
|
}
|
|
132
|
-
else if (t.list &&
|
|
143
|
+
else if (t.list &&
|
|
144
|
+
typeof t.list == "object" &&
|
|
145
|
+
"object" in t.list &&
|
|
146
|
+
t.list.object) {
|
|
133
147
|
if (t.list.object.name) {
|
|
134
148
|
newS.format = `resource-${t.list.object.name}`;
|
|
135
149
|
}
|
|
136
150
|
if (t.list.object.props && t.list.object.props.length > 0) {
|
|
137
151
|
const properties = {};
|
|
138
152
|
for (const prop of t.list.object.props) {
|
|
139
|
-
properties[prop.key] = { description:
|
|
153
|
+
properties[prop.key] = { description: "", type: "" };
|
|
140
154
|
argSigToJsonSchemaType(prop.typ, properties[prop.key]);
|
|
141
155
|
}
|
|
142
|
-
newS.items = { type:
|
|
156
|
+
newS.items = { type: "object", properties: properties };
|
|
143
157
|
}
|
|
144
158
|
else {
|
|
145
|
-
newS.items = { type:
|
|
159
|
+
newS.items = { type: "object" };
|
|
146
160
|
}
|
|
147
|
-
newS.originalType =
|
|
161
|
+
newS.originalType = "record[]";
|
|
148
162
|
}
|
|
149
163
|
else {
|
|
150
|
-
newS.items = { type:
|
|
151
|
-
newS.originalType =
|
|
164
|
+
newS.items = { type: "object" };
|
|
165
|
+
newS.originalType = "object[]";
|
|
152
166
|
}
|
|
153
167
|
}
|
|
154
168
|
else {
|
|
155
|
-
newS.type =
|
|
169
|
+
newS.type = "object";
|
|
156
170
|
}
|
|
157
171
|
const preservedFields = [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
172
|
+
"description",
|
|
173
|
+
"pattern",
|
|
174
|
+
"min",
|
|
175
|
+
"max",
|
|
176
|
+
"currency",
|
|
177
|
+
"currencyLocale",
|
|
178
|
+
"multiselect",
|
|
179
|
+
"customErrorMessage",
|
|
180
|
+
"required",
|
|
181
|
+
"showExpr",
|
|
182
|
+
"password",
|
|
183
|
+
"order",
|
|
184
|
+
"dateFormat",
|
|
185
|
+
"title",
|
|
186
|
+
"placeholder",
|
|
173
187
|
];
|
|
174
188
|
preservedFields.forEach((field) => {
|
|
175
189
|
// @ts-ignore
|
|
@@ -180,22 +194,30 @@ export function argSigToJsonSchemaType(t, oldS) {
|
|
|
180
194
|
});
|
|
181
195
|
if (oldS.type != newS.type) {
|
|
182
196
|
for (const prop of Object.getOwnPropertyNames(newS)) {
|
|
183
|
-
if (prop !=
|
|
197
|
+
if (prop != "description") {
|
|
184
198
|
// @ts-ignore
|
|
185
199
|
delete oldS[prop];
|
|
186
200
|
}
|
|
187
201
|
}
|
|
188
202
|
}
|
|
189
|
-
else if ((oldS.format ==
|
|
203
|
+
else if ((oldS.format == "date" || oldS.format === "date-time") &&
|
|
204
|
+
newS.format == "string") {
|
|
190
205
|
newS.format = oldS.format;
|
|
191
206
|
}
|
|
192
|
-
else if (newS.format ==
|
|
193
|
-
newS.format =
|
|
207
|
+
else if (newS.format == "date-time" && oldS.format == "date") {
|
|
208
|
+
newS.format = "date";
|
|
209
|
+
}
|
|
210
|
+
else if (newS.format == "date" || newS.format == "date-time") {
|
|
211
|
+
newS.format = oldS.format;
|
|
194
212
|
}
|
|
195
213
|
else if (oldS.items?.type != newS.items?.type) {
|
|
196
214
|
delete oldS.items;
|
|
197
215
|
}
|
|
198
|
-
if (oldS.
|
|
216
|
+
else if (oldS.type == "string" && oldS.format != undefined) {
|
|
217
|
+
newS.format = oldS.format;
|
|
218
|
+
}
|
|
219
|
+
if ((oldS.type != newS.type || newS.type != "string") &&
|
|
220
|
+
newS.format == undefined) {
|
|
199
221
|
oldS.format = undefined;
|
|
200
222
|
}
|
|
201
223
|
Object.assign(oldS, newS);
|
package/package.json
CHANGED
|
@@ -1108,6 +1108,8 @@ export declare const getVariable: (data: GetVariableData) => CancelablePromise<G
|
|
|
1108
1108
|
* @param data The data for the request.
|
|
1109
1109
|
* @param data.workspace
|
|
1110
1110
|
* @param data.path
|
|
1111
|
+
* @param data.allowCache allow getting a cached value for improved performance
|
|
1112
|
+
*
|
|
1111
1113
|
* @returns string variable
|
|
1112
1114
|
* @throws ApiError
|
|
1113
1115
|
*/
|
|
@@ -1363,6 +1365,7 @@ export declare const getResource: (data: GetResourceData) => CancelablePromise<G
|
|
|
1363
1365
|
* @param data.workspace
|
|
1364
1366
|
* @param data.path
|
|
1365
1367
|
* @param data.jobId job id
|
|
1368
|
+
* @param data.allowCache allow getting a cached value for improved performance
|
|
1366
1369
|
* @returns unknown resource value
|
|
1367
1370
|
* @throws ApiError
|
|
1368
1371
|
*/
|