@kestra-io/ui-libs 0.0.203 → 0.0.204
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/dist/{FlowYamlUtils-XiHwEJpD.js → FlowYamlUtils-BzRZhB-1.js} +214 -212
- package/dist/{FlowYamlUtils-XiHwEJpD.js.map → FlowYamlUtils-BzRZhB-1.js.map} +1 -1
- package/dist/{FlowYamlUtils-DE2Q92JR.cjs → FlowYamlUtils-DejB6qmY.cjs} +2 -2
- package/dist/{FlowYamlUtils-DE2Q92JR.cjs.map → FlowYamlUtils-DejB6qmY.cjs.map} +1 -1
- package/dist/kestra-flowyamlutils.cjs.js +1 -1
- package/dist/kestra-flowyamlutils.es.js +1 -1
- package/dist/kestra-index.cjs.js +1 -1
- package/dist/kestra-index.es.js +1 -1
- package/dist/utils/FlowYamlUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/utils/FlowYamlUtils.test.ts +78 -7
- package/src/utils/FlowYamlUtils.ts +17 -0
- package/src/utils/YamlUtilsLegacy.test.ts +2 -0
package/dist/kestra-index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import js, { Document as zs, YAMLMap as pr } from "yaml";
|
|
2
|
-
import { g as Vp, e as Up, d as Hp, r as Gp, a as Bp, f as pf, b as Wp, c as jp, h as zp, u as Kp, i as Yp, j as Xp, k as Zp, l as Jp, m as Qp, n as em, s as tm, p as nm, o as rm, q as im, t as mf, v as am, w as om, x as Ks, y as Ys, z as sm, A as lm, B as vn, C as gf, D as us, E as um, F as Wn, G as cm, H as cs, I as ds, J as He, K as jn, L as zn, M as _n, N as Vt, O as fs, P as Kn, Q as hs, R as dm, S as vf, T as ps, U as fm, V as Ut, W as _f, X as hm, Y as yf, Z as pm, _ as mm, $ as Ef, a0 as ms, a1 as gm, a2 as vm, a3 as _m, a4 as Yn, a5 as ym, a6 as Em, a7 as bm, a8 as Cm, a9 as wm, aa as Sm, ab as bf, ac as km, ad as Lm, ae as Tm } from "./FlowYamlUtils-
|
|
2
|
+
import { g as Vp, e as Up, d as Hp, r as Gp, a as Bp, f as pf, b as Wp, c as jp, h as zp, u as Kp, i as Yp, j as Xp, k as Zp, l as Jp, m as Qp, n as em, s as tm, p as nm, o as rm, q as im, t as mf, v as am, w as om, x as Ks, y as Ys, z as sm, A as lm, B as vn, C as gf, D as us, E as um, F as Wn, G as cm, H as cs, I as ds, J as He, K as jn, L as zn, M as _n, N as Vt, O as fs, P as Kn, Q as hs, R as dm, S as vf, T as ps, U as fm, V as Ut, W as _f, X as hm, Y as yf, Z as pm, _ as mm, $ as Ef, a0 as ms, a1 as gm, a2 as vm, a3 as _m, a4 as Yn, a5 as ym, a6 as Em, a7 as bm, a8 as Cm, a9 as wm, aa as Sm, ab as bf, ac as km, ad as Lm, ae as Tm } from "./FlowYamlUtils-BzRZhB-1.js";
|
|
3
3
|
import { createElementBlock as L, openBlock as E, mergeProps as ae, createElementVNode as O, createCommentVNode as M, toDisplayString as z, getCurrentInstance as tn, inject as Om, ref as ve, shallowRef as An, computed as pe, watch as st, onMounted as yn, onUnmounted as Cf, defineComponent as Re, h as nn, createVNode as K, Text as dn, Fragment as Me, nextTick as Xn, onBeforeUnmount as wf, renderSlot as ye, createTextVNode as Et, normalizeClass as he, createBlock as ue, withCtx as te, normalizeStyle as fn, unref as W, toRef as Xs, resolveComponent as Rn, effectScope as Nm, reactive as Sf, resolveDynamicComponent as Ht, renderList as _t, createSlots as kf, normalizeProps as Im, guardReactiveProps as Am, withModifiers as Lf, withAsyncContext as Zs, toRaw as Rm, defineAsyncComponent as Dm, Comment as Pm, Suspense as Mm } from "vue";
|
|
4
4
|
import xm from "humanize-duration";
|
|
5
5
|
import cn from "moment";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowYamlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/FlowYamlUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,OAAO,EAWP,KAAK,EAC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E;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,OA+BlG"}
|
package/package.json
CHANGED
|
@@ -147,13 +147,16 @@ describe("insertBlock", () => {
|
|
|
147
147
|
refKey: "plugin1"
|
|
148
148
|
});
|
|
149
149
|
expect(result).toMatchInlineSnapshot(`
|
|
150
|
-
"
|
|
150
|
+
"
|
|
151
|
+
tasks:
|
|
151
152
|
- id: plugin1
|
|
152
153
|
type: type1
|
|
153
154
|
name: Plugin 1
|
|
155
|
+
|
|
154
156
|
- id: plugin3
|
|
155
157
|
type: type3
|
|
156
158
|
name: Plugin 3
|
|
159
|
+
|
|
157
160
|
- id: plugin2
|
|
158
161
|
type: type2
|
|
159
162
|
name: Plugin 2
|
|
@@ -201,13 +204,16 @@ describe("insertBlock", () => {
|
|
|
201
204
|
newBlock: newValue,
|
|
202
205
|
});
|
|
203
206
|
expect(result).toMatchInlineSnapshot(`
|
|
204
|
-
"
|
|
207
|
+
"
|
|
208
|
+
tasks:
|
|
205
209
|
- id: plugin1
|
|
206
210
|
type: type1
|
|
207
211
|
name: Plugin 1
|
|
212
|
+
|
|
208
213
|
- id: plugin2
|
|
209
214
|
type: type2
|
|
210
215
|
name: Plugin 2
|
|
216
|
+
|
|
211
217
|
- id: plugin3
|
|
212
218
|
type: type3
|
|
213
219
|
name: Plugin 3
|
|
@@ -224,13 +230,16 @@ describe("insertBlock", () => {
|
|
|
224
230
|
position: "before"
|
|
225
231
|
});
|
|
226
232
|
expect(result).toMatchInlineSnapshot(`
|
|
227
|
-
"
|
|
233
|
+
"
|
|
234
|
+
tasks:
|
|
228
235
|
- id: plugin3
|
|
229
236
|
type: type3
|
|
230
237
|
name: Plugin 3
|
|
238
|
+
|
|
231
239
|
- id: plugin1
|
|
232
240
|
type: type1
|
|
233
241
|
name: Plugin 1
|
|
242
|
+
|
|
234
243
|
- id: plugin2
|
|
235
244
|
type: type2
|
|
236
245
|
name: Plugin 2
|
|
@@ -247,13 +256,16 @@ describe("insertBlock", () => {
|
|
|
247
256
|
position: "before"
|
|
248
257
|
});
|
|
249
258
|
expect(result).toMatchInlineSnapshot(`
|
|
250
|
-
"
|
|
259
|
+
"
|
|
260
|
+
tasks:
|
|
251
261
|
- id: plugin1
|
|
252
262
|
type: type1
|
|
253
263
|
name: Plugin 1
|
|
264
|
+
|
|
254
265
|
- id: plugin3
|
|
255
266
|
type: type3
|
|
256
267
|
name: Plugin 3
|
|
268
|
+
|
|
257
269
|
- id: plugin2
|
|
258
270
|
type: type2
|
|
259
271
|
name: Plugin 2
|
|
@@ -279,13 +291,16 @@ describe("insertBlock", () => {
|
|
|
279
291
|
position: "before"
|
|
280
292
|
});
|
|
281
293
|
expect(result).toMatchInlineSnapshot(`
|
|
282
|
-
"
|
|
294
|
+
"
|
|
295
|
+
triggers:
|
|
283
296
|
- id: plugin1
|
|
284
297
|
type: type1
|
|
285
298
|
name: Plugin 1
|
|
299
|
+
|
|
286
300
|
- id: plugin3
|
|
287
301
|
type: type3
|
|
288
302
|
name: Plugin 3
|
|
303
|
+
|
|
289
304
|
- id: plugin2
|
|
290
305
|
type: type2
|
|
291
306
|
name: Plugin 2
|
|
@@ -317,7 +332,8 @@ describe("insertBlock", () => {
|
|
|
317
332
|
parentKey:"t1"
|
|
318
333
|
});
|
|
319
334
|
expect(result).toMatchInlineSnapshot(`
|
|
320
|
-
"
|
|
335
|
+
"
|
|
336
|
+
tasks:
|
|
321
337
|
- id: t1
|
|
322
338
|
type: type1
|
|
323
339
|
name: Plugin 1
|
|
@@ -413,7 +429,8 @@ describe("insertBlock", () => {
|
|
|
413
429
|
subBlockName: "conditions"
|
|
414
430
|
});
|
|
415
431
|
expect(result).toMatchInlineSnapshot(`
|
|
416
|
-
"
|
|
432
|
+
"
|
|
433
|
+
triggers:
|
|
417
434
|
- id: trigger1
|
|
418
435
|
type: type1
|
|
419
436
|
name: Plugin 1
|
|
@@ -1088,6 +1105,7 @@ describe("replaceBlockWithPath", () => {
|
|
|
1088
1105
|
"
|
|
1089
1106
|
`);
|
|
1090
1107
|
})
|
|
1108
|
+
|
|
1091
1109
|
test("replacing a task", () => {
|
|
1092
1110
|
const yamlString = `
|
|
1093
1111
|
tasks:
|
|
@@ -1205,6 +1223,59 @@ describe("replaceBlockWithPath", () => {
|
|
|
1205
1223
|
"
|
|
1206
1224
|
`)
|
|
1207
1225
|
})
|
|
1226
|
+
|
|
1227
|
+
test("replace a subtask with subtask", () => {
|
|
1228
|
+
const yamlString = `
|
|
1229
|
+
tasks:
|
|
1230
|
+
- id: test
|
|
1231
|
+
type: io.kestra.plugin.core.flow.Dag
|
|
1232
|
+
tasks:
|
|
1233
|
+
- dependsOn:
|
|
1234
|
+
- tweeb
|
|
1235
|
+
task:
|
|
1236
|
+
id: foo
|
|
1237
|
+
type: io.kestra.plugin.core.log.Log
|
|
1238
|
+
message: foow
|
|
1239
|
+
- task:
|
|
1240
|
+
id: tweeb
|
|
1241
|
+
type: io.kestra.plugin.core.log.Log
|
|
1242
|
+
message: tweeb
|
|
1243
|
+
`;
|
|
1244
|
+
|
|
1245
|
+
const newValue = `
|
|
1246
|
+
id: plugin4
|
|
1247
|
+
type: type4
|
|
1248
|
+
name: Plugin 4
|
|
1249
|
+
`;
|
|
1250
|
+
|
|
1251
|
+
const result = YamlUtils.replaceBlockWithPath({
|
|
1252
|
+
source: yamlString,
|
|
1253
|
+
path: "tasks[0].tasks[2].task",
|
|
1254
|
+
newContent: newValue
|
|
1255
|
+
})
|
|
1256
|
+
|
|
1257
|
+
expect(result).toMatchInlineSnapshot(`
|
|
1258
|
+
"tasks:
|
|
1259
|
+
- id: test
|
|
1260
|
+
type: io.kestra.plugin.core.flow.Dag
|
|
1261
|
+
tasks:
|
|
1262
|
+
- dependsOn:
|
|
1263
|
+
- tweeb
|
|
1264
|
+
task:
|
|
1265
|
+
id: foo
|
|
1266
|
+
type: io.kestra.plugin.core.log.Log
|
|
1267
|
+
message: foow
|
|
1268
|
+
- task:
|
|
1269
|
+
id: tweeb
|
|
1270
|
+
type: io.kestra.plugin.core.log.Log
|
|
1271
|
+
message: tweeb
|
|
1272
|
+
- task:
|
|
1273
|
+
id: plugin4
|
|
1274
|
+
type: type4
|
|
1275
|
+
name: Plugin 4
|
|
1276
|
+
"
|
|
1277
|
+
`)
|
|
1278
|
+
})
|
|
1208
1279
|
})
|
|
1209
1280
|
|
|
1210
1281
|
describe("getPathFromSectionAndId", () => {
|
|
@@ -830,6 +830,23 @@ function cleanMetadataDocument(yamlDoc: Document<YAMLMap<Scalar<string>, Node |
|
|
|
830
830
|
);
|
|
831
831
|
if (item?.value && isItemTruthy(item.value)) {
|
|
832
832
|
updatedItems.push(item);
|
|
833
|
+
if(isSeq(item.value)) {
|
|
834
|
+
if (!item.key.commentBefore) {
|
|
835
|
+
item.key.spaceBefore = true;
|
|
836
|
+
}
|
|
837
|
+
// add whitespace between items
|
|
838
|
+
item.value.items.forEach((seqItem: any, index: number) => {
|
|
839
|
+
if(index === 0) {
|
|
840
|
+
return
|
|
841
|
+
}
|
|
842
|
+
if (seqItem.commentBefore) {
|
|
843
|
+
seqItem.commentBefore.spaceBefore = true;
|
|
844
|
+
} else {
|
|
845
|
+
seqItem.spaceBefore = true;
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
}
|
|
833
850
|
}
|
|
834
851
|
}
|
|
835
852
|
yamlDoc.contents.items = updatedItems;
|
|
@@ -69,6 +69,7 @@ describe("insertTask", () => {
|
|
|
69
69
|
- id: t1
|
|
70
70
|
type: io.kestra.plugin.core.log.Log
|
|
71
71
|
message: "{{ task.id }}"
|
|
72
|
+
|
|
72
73
|
- id: t1.1
|
|
73
74
|
name: newTask
|
|
74
75
|
command: echo hello
|
|
@@ -134,6 +135,7 @@ describe("insertTask", () => {
|
|
|
134
135
|
env:
|
|
135
136
|
ENV_VAR: value
|
|
136
137
|
cwd: /path/to/dir
|
|
138
|
+
|
|
137
139
|
- id: t1
|
|
138
140
|
type: io.kestra.plugin.core.log.Log
|
|
139
141
|
message: "{{ task.id }}"
|