@dpuse/dpuse-development 1.0.133 → 1.0.135
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/.github/workflows/ci.yml +30 -27
- package/.github/workflows/publish.yml +12 -27
- package/README.md +10 -7
- package/dist/{apiReference-DkUU69k2.js → apiReference-0f_cixNm.js} +1 -1
- package/dist/{apiReference-DkUU69k2.js.map → apiReference-0f_cixNm.js.map} +1 -1
- package/dist/dpuse-development.es.js +2 -2
- package/dist/dpuse-development.es.js.map +1 -1
- package/dist/{utilities-B6DCmUnC.js → utilities-DwnUjXza.js} +185 -130
- package/dist/utilities-DwnUjXza.js.map +1 -0
- package/package.json +3 -3
- package/dist/utilities-B6DCmUnC.js.map +0 -1
|
@@ -79,11 +79,11 @@ function te(e, t) {
|
|
|
79
79
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
80
80
|
}
|
|
81
81
|
/* @__NO_SIDE_EFFECTS__ */
|
|
82
|
-
function
|
|
82
|
+
function ne(e, t) {
|
|
83
83
|
let n = [...new Set(e)];
|
|
84
84
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function p(e) {
|
|
87
87
|
return e["~standard"] = {
|
|
88
88
|
version: 1,
|
|
89
89
|
vendor: "valibot",
|
|
@@ -91,7 +91,22 @@ function m(e) {
|
|
|
91
91
|
}, e;
|
|
92
92
|
}
|
|
93
93
|
/* @__NO_SIDE_EFFECTS__ */
|
|
94
|
-
function
|
|
94
|
+
function m(e, t) {
|
|
95
|
+
return {
|
|
96
|
+
kind: "validation",
|
|
97
|
+
type: "min_length",
|
|
98
|
+
reference: m,
|
|
99
|
+
async: !1,
|
|
100
|
+
expects: `>=${e}`,
|
|
101
|
+
requirement: e,
|
|
102
|
+
message: t,
|
|
103
|
+
"~run"(e, t) {
|
|
104
|
+
return e.typed && e.value.length < this.requirement && f(this, "length", e, t, { received: `${e.value.length}` }), e;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
109
|
+
function re(e, t, n) {
|
|
95
110
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
96
111
|
}
|
|
97
112
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -100,7 +115,7 @@ function h(e, t, n) {
|
|
|
100
115
|
}
|
|
101
116
|
/* @__NO_SIDE_EFFECTS__ */
|
|
102
117
|
function g(e, t) {
|
|
103
|
-
return
|
|
118
|
+
return p({
|
|
104
119
|
kind: "schema",
|
|
105
120
|
type: "array",
|
|
106
121
|
reference: g,
|
|
@@ -137,7 +152,7 @@ function g(e, t) {
|
|
|
137
152
|
}
|
|
138
153
|
/* @__NO_SIDE_EFFECTS__ */
|
|
139
154
|
function _(e) {
|
|
140
|
-
return
|
|
155
|
+
return p({
|
|
141
156
|
kind: "schema",
|
|
142
157
|
type: "boolean",
|
|
143
158
|
reference: _,
|
|
@@ -151,7 +166,7 @@ function _(e) {
|
|
|
151
166
|
}
|
|
152
167
|
/* @__NO_SIDE_EFFECTS__ */
|
|
153
168
|
function v(e, t) {
|
|
154
|
-
return
|
|
169
|
+
return p({
|
|
155
170
|
kind: "schema",
|
|
156
171
|
type: "literal",
|
|
157
172
|
reference: v,
|
|
@@ -166,7 +181,7 @@ function v(e, t) {
|
|
|
166
181
|
}
|
|
167
182
|
/* @__NO_SIDE_EFFECTS__ */
|
|
168
183
|
function y(e, t) {
|
|
169
|
-
return
|
|
184
|
+
return p({
|
|
170
185
|
kind: "schema",
|
|
171
186
|
type: "nullable",
|
|
172
187
|
reference: y,
|
|
@@ -181,7 +196,7 @@ function y(e, t) {
|
|
|
181
196
|
}
|
|
182
197
|
/* @__NO_SIDE_EFFECTS__ */
|
|
183
198
|
function b(e) {
|
|
184
|
-
return
|
|
199
|
+
return p({
|
|
185
200
|
kind: "schema",
|
|
186
201
|
type: "number",
|
|
187
202
|
reference: b,
|
|
@@ -195,7 +210,7 @@ function b(e) {
|
|
|
195
210
|
}
|
|
196
211
|
/* @__NO_SIDE_EFFECTS__ */
|
|
197
212
|
function x(e, t) {
|
|
198
|
-
return
|
|
213
|
+
return p({
|
|
199
214
|
kind: "schema",
|
|
200
215
|
type: "optional",
|
|
201
216
|
reference: x,
|
|
@@ -210,7 +225,7 @@ function x(e, t) {
|
|
|
210
225
|
}
|
|
211
226
|
/* @__NO_SIDE_EFFECTS__ */
|
|
212
227
|
function S(e, t, n) {
|
|
213
|
-
return
|
|
228
|
+
return p({
|
|
214
229
|
kind: "schema",
|
|
215
230
|
type: "record",
|
|
216
231
|
reference: S,
|
|
@@ -263,7 +278,7 @@ function S(e, t, n) {
|
|
|
263
278
|
}
|
|
264
279
|
/* @__NO_SIDE_EFFECTS__ */
|
|
265
280
|
function C(e, t) {
|
|
266
|
-
return
|
|
281
|
+
return p({
|
|
267
282
|
kind: "schema",
|
|
268
283
|
type: "strict_object",
|
|
269
284
|
reference: C,
|
|
@@ -294,7 +309,7 @@ function C(e, t) {
|
|
|
294
309
|
}
|
|
295
310
|
}
|
|
296
311
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
297
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
312
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ re(i);
|
|
298
313
|
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (f(this, "key", e, t, {
|
|
299
314
|
input: void 0,
|
|
300
315
|
expected: `"${r}"`,
|
|
@@ -330,7 +345,7 @@ function C(e, t) {
|
|
|
330
345
|
}
|
|
331
346
|
/* @__NO_SIDE_EFFECTS__ */
|
|
332
347
|
function w(e) {
|
|
333
|
-
return
|
|
348
|
+
return p({
|
|
334
349
|
kind: "schema",
|
|
335
350
|
type: "string",
|
|
336
351
|
reference: w,
|
|
@@ -351,11 +366,11 @@ function T(e) {
|
|
|
351
366
|
}
|
|
352
367
|
/* @__NO_SIDE_EFFECTS__ */
|
|
353
368
|
function E(e, t) {
|
|
354
|
-
return
|
|
369
|
+
return p({
|
|
355
370
|
kind: "schema",
|
|
356
371
|
type: "union",
|
|
357
372
|
reference: E,
|
|
358
|
-
expects: /* @__PURE__ */
|
|
373
|
+
expects: /* @__PURE__ */ ne(e.map((e) => e.expects), "|"),
|
|
359
374
|
async: !1,
|
|
360
375
|
options: e,
|
|
361
376
|
message: t,
|
|
@@ -381,10 +396,27 @@ function E(e, t) {
|
|
|
381
396
|
}
|
|
382
397
|
});
|
|
383
398
|
}
|
|
399
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
400
|
+
function ie(...e) {
|
|
401
|
+
return p({
|
|
402
|
+
...e[0],
|
|
403
|
+
pipe: e,
|
|
404
|
+
"~run"(t, n) {
|
|
405
|
+
for (let r of e) if (r.kind !== "metadata") {
|
|
406
|
+
if (t.issues && (r.kind === "schema" || r.kind === "transformation")) {
|
|
407
|
+
t.typed = !1;
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
(!t.issues || !n.abortEarly && !n.abortPipeEarly) && (t = r["~run"](t, n));
|
|
411
|
+
}
|
|
412
|
+
return t;
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
}
|
|
384
416
|
var D = /* @__PURE__ */ C({
|
|
385
417
|
en: /* @__PURE__ */ w(),
|
|
386
418
|
es: /* @__PURE__ */ w()
|
|
387
|
-
}),
|
|
419
|
+
}), O = {
|
|
388
420
|
id: /* @__PURE__ */ w(),
|
|
389
421
|
label: /* @__PURE__ */ C({
|
|
390
422
|
en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
@@ -396,7 +428,7 @@ var D = /* @__PURE__ */ C({
|
|
|
396
428
|
}),
|
|
397
429
|
icon: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
398
430
|
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ w())
|
|
399
|
-
},
|
|
431
|
+
}, k = (e) => /* @__PURE__ */ E(e.map((e) => /* @__PURE__ */ v(e))), ae = k([
|
|
400
432
|
"app",
|
|
401
433
|
"connector",
|
|
402
434
|
"connectorConnection",
|
|
@@ -418,33 +450,33 @@ var D = /* @__PURE__ */ C({
|
|
|
418
450
|
"presenter",
|
|
419
451
|
"presenterPresentation",
|
|
420
452
|
"tool"
|
|
421
|
-
]),
|
|
453
|
+
]), oe = k([
|
|
422
454
|
"danger",
|
|
423
455
|
"success",
|
|
424
456
|
"warning"
|
|
425
|
-
]),
|
|
457
|
+
]), se = k([
|
|
426
458
|
"alpha",
|
|
427
459
|
"beta",
|
|
428
460
|
"releaseCandidate",
|
|
429
461
|
"generalAvailability"
|
|
430
|
-
]),
|
|
431
|
-
color:
|
|
462
|
+
]), ce = /* @__PURE__ */ C({
|
|
463
|
+
color: oe,
|
|
432
464
|
label: /* @__PURE__ */ w()
|
|
433
|
-
}),
|
|
434
|
-
...
|
|
435
|
-
typeId:
|
|
436
|
-
},
|
|
437
|
-
...
|
|
465
|
+
}), A = {
|
|
466
|
+
...O,
|
|
467
|
+
typeId: ae
|
|
468
|
+
}, le = /* @__PURE__ */ C({
|
|
469
|
+
...A,
|
|
438
470
|
order: /* @__PURE__ */ b(),
|
|
439
471
|
path: /* @__PURE__ */ w()
|
|
440
|
-
}),
|
|
441
|
-
...
|
|
472
|
+
}), j = {
|
|
473
|
+
...A,
|
|
442
474
|
firstCreatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
443
475
|
lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
444
|
-
status: /* @__PURE__ */ y(
|
|
445
|
-
statusId: /* @__PURE__ */ y(
|
|
476
|
+
status: /* @__PURE__ */ y(ce),
|
|
477
|
+
statusId: /* @__PURE__ */ y(se)
|
|
446
478
|
};
|
|
447
|
-
({ ...
|
|
479
|
+
({ ...j }), c({ en: "Arrow" }), c({ en: "Avro" }), c({ en: "Delimited text (CSV, TSV…)" }), c({ en: "JSON" }), c({ en: "JSON Lines (JSONL)" }), c({ en: "Markdown (MD)" }), c({ en: "OpenDocument spreadsheet (ODS)" }), c({ en: "Parquet" }), c({ en: "SPSS (SAV)" }), c({ en: "SQLite" }), c({ en: "Excel (XLSX, XLSM)" }), c({ en: "XML" }), c({ en: "Newline" }), c({ en: "Carriage Return" }), c({ en: "Carriage Return/Newline" }), c({ en: "Colon" }), c({ en: "Comma" }), c({ en: "Exclamation Mark" }), c({ en: "Record Separator" }), c({ en: "Semicolon" }), c({ en: "Space" }), c({ en: "Tab" }), c({ en: "Underscore" }), c({ en: "Unit Separator" }), c({ en: "Vertical Bar" }), k([
|
|
448
480
|
"app",
|
|
449
481
|
"engine",
|
|
450
482
|
"connector",
|
|
@@ -452,15 +484,15 @@ var D = /* @__PURE__ */ C({
|
|
|
452
484
|
"presenter",
|
|
453
485
|
"tool"
|
|
454
486
|
]);
|
|
455
|
-
var
|
|
456
|
-
...
|
|
487
|
+
var M = {
|
|
488
|
+
...j,
|
|
457
489
|
vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
458
490
|
vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
459
491
|
vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
460
492
|
version: /* @__PURE__ */ w()
|
|
461
493
|
};
|
|
462
|
-
({ ...
|
|
463
|
-
var
|
|
494
|
+
({ ...M });
|
|
495
|
+
var ue = k([
|
|
464
496
|
"abortOperation",
|
|
465
497
|
"auditObjectContent",
|
|
466
498
|
"createObject",
|
|
@@ -476,22 +508,22 @@ var le = O([
|
|
|
476
508
|
"retrieveChunks",
|
|
477
509
|
"retrieveRecords",
|
|
478
510
|
"upsertRecords"
|
|
479
|
-
]),
|
|
511
|
+
]), de = k([
|
|
480
512
|
"application",
|
|
481
513
|
"curatedDataset",
|
|
482
514
|
"database",
|
|
483
515
|
"fileStore"
|
|
484
|
-
]),
|
|
516
|
+
]), fe = /* @__PURE__ */ C({ label: D }), pe = k([
|
|
485
517
|
"apiEndpoint",
|
|
486
518
|
"file",
|
|
487
519
|
"table"
|
|
488
|
-
]),
|
|
520
|
+
]), me = k([
|
|
489
521
|
"bidirectional",
|
|
490
522
|
"destination",
|
|
491
523
|
"source",
|
|
492
524
|
"unknown"
|
|
493
|
-
]),
|
|
494
|
-
authMethodId:
|
|
525
|
+
]), he = /* @__PURE__ */ C({ label: D }), ge = /* @__PURE__ */ C({
|
|
526
|
+
authMethodId: k([
|
|
495
527
|
"apiKey",
|
|
496
528
|
"disabled",
|
|
497
529
|
"oAuth2",
|
|
@@ -503,17 +535,17 @@ var le = O([
|
|
|
503
535
|
label: /* @__PURE__ */ x(D),
|
|
504
536
|
maxConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
505
537
|
params: /* @__PURE__ */ x(/* @__PURE__ */ g(/* @__PURE__ */ S(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
|
|
506
|
-
}),
|
|
507
|
-
...
|
|
538
|
+
}), _e = /* @__PURE__ */ C({
|
|
539
|
+
...M,
|
|
508
540
|
typeId: /* @__PURE__ */ v("connector"),
|
|
509
|
-
actionNames: /* @__PURE__ */ g(
|
|
510
|
-
category: /* @__PURE__ */ y(
|
|
511
|
-
categoryId:
|
|
512
|
-
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(),
|
|
513
|
-
itemTypeId:
|
|
514
|
-
usage: /* @__PURE__ */ y(
|
|
515
|
-
usageId: /* @__PURE__ */ y(
|
|
516
|
-
}),
|
|
541
|
+
actionNames: /* @__PURE__ */ g(ue),
|
|
542
|
+
category: /* @__PURE__ */ y(fe),
|
|
543
|
+
categoryId: de,
|
|
544
|
+
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), ge),
|
|
545
|
+
itemTypeId: pe,
|
|
546
|
+
usage: /* @__PURE__ */ y(he),
|
|
547
|
+
usageId: /* @__PURE__ */ y(me)
|
|
548
|
+
}), N = {
|
|
517
549
|
abortOperation: "Abort Operation",
|
|
518
550
|
auditObjectContent: "Audit Object Content",
|
|
519
551
|
createObject: "Create Object",
|
|
@@ -529,12 +561,12 @@ var le = O([
|
|
|
529
561
|
retrieveChunks: "Retrieve Chunks",
|
|
530
562
|
retrieveRecords: "Retrieve Records",
|
|
531
563
|
upsertRecords: "Upsert Records"
|
|
532
|
-
},
|
|
564
|
+
}, P = /* @__PURE__ */ new Set([
|
|
533
565
|
"createObject",
|
|
534
566
|
"dropObject",
|
|
535
567
|
"removeRecords",
|
|
536
568
|
"upsertRecords"
|
|
537
|
-
]),
|
|
569
|
+
]), F = /* @__PURE__ */ new Set([
|
|
538
570
|
"auditObjectContent",
|
|
539
571
|
"findObject",
|
|
540
572
|
"getInfo",
|
|
@@ -545,28 +577,46 @@ var le = O([
|
|
|
545
577
|
"retrieveChunks",
|
|
546
578
|
"retrieveRecords"
|
|
547
579
|
]);
|
|
548
|
-
function
|
|
580
|
+
function I(e) {
|
|
549
581
|
let t = !1, n = !1;
|
|
550
|
-
for (let r of e)
|
|
582
|
+
for (let r of e) F.has(r) && (t = !0), P.has(r) && (n = !0);
|
|
551
583
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
552
584
|
}
|
|
553
|
-
function
|
|
585
|
+
function ve(e) {
|
|
554
586
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
555
587
|
n += "|:----|:-------:|\n";
|
|
556
|
-
for (let e of Object.keys(
|
|
588
|
+
for (let e of Object.keys(N)) n += `| ${N[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
557
589
|
return n;
|
|
558
590
|
}
|
|
559
|
-
|
|
560
|
-
var
|
|
591
|
+
k(["list"]), { ...M };
|
|
592
|
+
var ye = k([
|
|
561
593
|
"list",
|
|
562
594
|
"render",
|
|
563
595
|
"setColorMode"
|
|
564
|
-
]),
|
|
565
|
-
...
|
|
596
|
+
]), be = /* @__PURE__ */ C({
|
|
597
|
+
...M,
|
|
566
598
|
typeId: /* @__PURE__ */ v("presenter"),
|
|
567
|
-
actionNames: /* @__PURE__ */ g(
|
|
568
|
-
presentations: /* @__PURE__ */ g(
|
|
569
|
-
}),
|
|
599
|
+
actionNames: /* @__PURE__ */ g(ye),
|
|
600
|
+
presentations: /* @__PURE__ */ g(le)
|
|
601
|
+
}), xe = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ ie(/* @__PURE__ */ g(k([
|
|
602
|
+
"arrow",
|
|
603
|
+
"avro",
|
|
604
|
+
"dtv",
|
|
605
|
+
"json",
|
|
606
|
+
"jsonl",
|
|
607
|
+
"markdown",
|
|
608
|
+
"ods",
|
|
609
|
+
"parquet",
|
|
610
|
+
"sav",
|
|
611
|
+
"sqlite",
|
|
612
|
+
"xlsx",
|
|
613
|
+
"xml"
|
|
614
|
+
])), /* @__PURE__ */ m(1)) }), Se = /* @__PURE__ */ g(/* @__PURE__ */ w()), Ce = /* @__PURE__ */ C({
|
|
615
|
+
...M,
|
|
616
|
+
typeId: /* @__PURE__ */ v("tool"),
|
|
617
|
+
actionNames: /* @__PURE__ */ x(Se),
|
|
618
|
+
parser: /* @__PURE__ */ x(xe)
|
|
619
|
+
}), L = /* @__PURE__ */ new Map([
|
|
570
620
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
571
621
|
["avro", "application/vnd.apache.avro"],
|
|
572
622
|
["bin", "application/octet-stream"],
|
|
@@ -579,7 +629,6 @@ var L = O([
|
|
|
579
629
|
["ods", "application/vnd.oasis.opendocument.spreadsheet"],
|
|
580
630
|
["parquet", "application/vnd.apache.parquet"],
|
|
581
631
|
["sav", "application/x-spss-sav"],
|
|
582
|
-
["spss", "application/octet-stream"],
|
|
583
632
|
["sqlite", "application/vnd.sqlite3"],
|
|
584
633
|
["tab", "text/tab-separated-values"],
|
|
585
634
|
["tsv", "text/tab-separated-values"],
|
|
@@ -589,24 +638,24 @@ var L = O([
|
|
|
589
638
|
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
590
639
|
["xml", "application/xml"]
|
|
591
640
|
]);
|
|
592
|
-
function
|
|
641
|
+
function we(e) {
|
|
593
642
|
if (!e) return;
|
|
594
|
-
let t =
|
|
643
|
+
let t = De(e);
|
|
595
644
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
596
645
|
}
|
|
597
|
-
function
|
|
598
|
-
return e != null &&
|
|
646
|
+
function Te(e) {
|
|
647
|
+
return e != null && L.has(e.toLowerCase());
|
|
599
648
|
}
|
|
600
|
-
function
|
|
601
|
-
return (e == null ? void 0 :
|
|
649
|
+
function Ee(e) {
|
|
650
|
+
return (e == null ? void 0 : L.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
602
651
|
}
|
|
603
|
-
function
|
|
652
|
+
function De(e) {
|
|
604
653
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
605
654
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
606
655
|
}
|
|
607
656
|
//#endregion
|
|
608
657
|
//#region src/utilities/index.ts
|
|
609
|
-
var
|
|
658
|
+
var Oe = /* @__PURE__ */ new Set(["@dpuse/dpuse-development", "@dpuse/eslint-config-dpuse"]), R = "code-health-reports/fallow", ke = `${R}/badge.json`, Ae = `${R}/index.md`, z = "<!-- CONTRIBUTING_LICENSE_END -->", B = "<!-- CONTRIBUTING_LICENSE_START -->", je = "<!-- GOVERNANCE_END -->", Me = "<!-- GOVERNANCE_START -->", V = "<!-- QUALITY_SECURITY_END -->", H = "<!-- QUALITY_SECURITY_START -->", Ne = "rust/Cargo.toml", Pe = [
|
|
610
659
|
{
|
|
611
660
|
idPrefix: "dpuse-app",
|
|
612
661
|
typeId: "app",
|
|
@@ -691,9 +740,9 @@ var Se = /* @__PURE__ */ new Set(["@dpuse/dpuse-development", "@dpuse/eslint-con
|
|
|
691
740
|
publishedTo: "github",
|
|
692
741
|
uploadGroupName: void 0
|
|
693
742
|
}
|
|
694
|
-
],
|
|
695
|
-
async function
|
|
696
|
-
n !== void 0 &&
|
|
743
|
+
], Fe = n(r);
|
|
744
|
+
async function Ie(n, r) {
|
|
745
|
+
n !== void 0 && J(`${n} - clear(${r})`);
|
|
697
746
|
let i;
|
|
698
747
|
try {
|
|
699
748
|
i = await e.readdir(r, { withFileTypes: !0 });
|
|
@@ -713,16 +762,16 @@ async function Ae(n, r) {
|
|
|
713
762
|
}
|
|
714
763
|
}));
|
|
715
764
|
}
|
|
716
|
-
async function
|
|
765
|
+
async function Le(t, n) {
|
|
717
766
|
return e.readdir(t, n);
|
|
718
767
|
}
|
|
719
|
-
async function
|
|
720
|
-
t !== void 0 &&
|
|
721
|
-
let { stdout: a, stderr: o } = await
|
|
768
|
+
async function Re(t, n, r, i) {
|
|
769
|
+
t !== void 0 && J(`${t} - exec(${n} ${r.join(" ")})`);
|
|
770
|
+
let { stdout: a, stderr: o } = await Fe(n, r);
|
|
722
771
|
i === void 0 ? a.trim() && console.log(a.trim()) : await e.writeFile(i, a.trim(), "utf-8"), o.trim() && console.error(o.trim());
|
|
723
772
|
}
|
|
724
|
-
async function
|
|
725
|
-
return
|
|
773
|
+
async function ze(e, t, n, r = !1, a = !1) {
|
|
774
|
+
return J(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
|
|
726
775
|
i(t, n, {
|
|
727
776
|
shell: a,
|
|
728
777
|
stdio: "inherit"
|
|
@@ -731,8 +780,8 @@ async function Ne(e, t, n, r = !1, a = !1) {
|
|
|
731
780
|
});
|
|
732
781
|
});
|
|
733
782
|
}
|
|
734
|
-
async function
|
|
735
|
-
return
|
|
783
|
+
async function Be(e, t, n) {
|
|
784
|
+
return J(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, r) => {
|
|
736
785
|
let a = i(t, n, {
|
|
737
786
|
shell: !1,
|
|
738
787
|
stdio: [
|
|
@@ -748,8 +797,8 @@ async function Pe(e, t, n) {
|
|
|
748
797
|
});
|
|
749
798
|
});
|
|
750
799
|
}
|
|
751
|
-
async function
|
|
752
|
-
return
|
|
800
|
+
async function Ve(n, r, a, o, s = !1) {
|
|
801
|
+
return J(`${n} - spawn(${r} ${a.join(" ")}) > ${o}`), new Promise((n, c) => {
|
|
753
802
|
let l = i(r, a, {
|
|
754
803
|
shell: !1,
|
|
755
804
|
stdio: [
|
|
@@ -771,19 +820,19 @@ async function Fe(n, r, a, o, s = !1) {
|
|
|
771
820
|
});
|
|
772
821
|
});
|
|
773
822
|
}
|
|
774
|
-
async function
|
|
775
|
-
let e = await
|
|
823
|
+
async function He() {
|
|
824
|
+
let e = await W("./README.md"), t = e.indexOf(Me), n = e.indexOf(je);
|
|
776
825
|
if (t === -1 || n === -1) return;
|
|
777
|
-
let r = `${
|
|
778
|
-
await
|
|
826
|
+
let r = `${H}\n${V}\n\n${B}\n${z}`;
|
|
827
|
+
await q("README.md", `${e.slice(0, t)}${r}${e.slice(n + 23)}`);
|
|
779
828
|
}
|
|
780
|
-
async function
|
|
829
|
+
async function U(t) {
|
|
781
830
|
return JSON.parse(await e.readFile(t, "utf-8"));
|
|
782
831
|
}
|
|
783
|
-
async function
|
|
832
|
+
async function W(t) {
|
|
784
833
|
return await e.readFile(t, "utf-8");
|
|
785
834
|
}
|
|
786
|
-
async function
|
|
835
|
+
async function G(t) {
|
|
787
836
|
try {
|
|
788
837
|
return await e.readFile(t, "utf-8");
|
|
789
838
|
} catch (e) {
|
|
@@ -791,36 +840,36 @@ async function K(t) {
|
|
|
791
840
|
throw e;
|
|
792
841
|
}
|
|
793
842
|
}
|
|
794
|
-
function
|
|
843
|
+
function Ue(e) {
|
|
795
844
|
let t = e.slice(e.lastIndexOf("/") + 1);
|
|
796
845
|
if (t === "LICENSE") return "text/plain";
|
|
797
|
-
let n =
|
|
798
|
-
return
|
|
846
|
+
let n = we(t);
|
|
847
|
+
return Te(n) || console.warn(`⚠️ No content type for '${e}', so it is treated as 'application/octet-stream'. Add its extension to dpuse-shared.`), Ee(n);
|
|
799
848
|
}
|
|
800
|
-
async function
|
|
849
|
+
async function K(n, r) {
|
|
801
850
|
await e.mkdir(t.dirname(n), { recursive: !0 }), await e.writeFile(n, `${JSON.stringify(r, void 0, 4)}\n`, "utf-8");
|
|
802
851
|
}
|
|
803
|
-
async function
|
|
804
|
-
await
|
|
852
|
+
async function We(e, t, n) {
|
|
853
|
+
await q("README.md", et(await W("./README.md"), e, t, n));
|
|
805
854
|
}
|
|
806
|
-
async function
|
|
855
|
+
async function q(t, n) {
|
|
807
856
|
await e.writeFile(t, n, "utf-8");
|
|
808
857
|
}
|
|
809
|
-
function
|
|
858
|
+
function Ge(e) {
|
|
810
859
|
console.info("\x1B[36m────────────────────────────────────────────────────────────────────────────────"), console.info(`▶️ ${e}[0m`);
|
|
811
860
|
}
|
|
812
|
-
function
|
|
861
|
+
function Ke(e) {
|
|
813
862
|
console.info(`✅ ${e}`);
|
|
814
863
|
}
|
|
815
|
-
function
|
|
864
|
+
function J(e) {
|
|
816
865
|
console.info(e);
|
|
817
866
|
}
|
|
818
|
-
function
|
|
819
|
-
let t =
|
|
867
|
+
function qe(e) {
|
|
868
|
+
let t = Pe.find((t) => e.startsWith(t.idPrefix));
|
|
820
869
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
821
870
|
return t;
|
|
822
871
|
}
|
|
823
|
-
function
|
|
872
|
+
function Je(e, t) {
|
|
824
873
|
let n = e.repository, r = typeof n == "string" ? n : n?.url;
|
|
825
874
|
if (r == null || r === "") throw Error(`package.json 'repository' field is required to ${t}.`);
|
|
826
875
|
let i = r.replace(/^git\+/, "").replace(/\.git$/, ""), a = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(i);
|
|
@@ -830,50 +879,56 @@ function Ve(e, t) {
|
|
|
830
879
|
repository: a[2]
|
|
831
880
|
};
|
|
832
881
|
}
|
|
833
|
-
async function
|
|
882
|
+
async function Y(t) {
|
|
834
883
|
return await e.stat(t);
|
|
835
884
|
}
|
|
836
|
-
async function
|
|
885
|
+
async function Ye(e, t, n) {
|
|
837
886
|
switch (n.typeId) {
|
|
838
|
-
case "connector": return await
|
|
839
|
-
case "presenter": return await
|
|
840
|
-
|
|
887
|
+
case "connector": return await Ze(e, t);
|
|
888
|
+
case "presenter": return await Qe(e, t);
|
|
889
|
+
case "tool": return await $e(e, t);
|
|
890
|
+
default: return await Z(e, t);
|
|
841
891
|
}
|
|
842
892
|
}
|
|
843
|
-
async function
|
|
844
|
-
if (
|
|
893
|
+
async function Xe(e, t, n = "./") {
|
|
894
|
+
if (J(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
845
895
|
else {
|
|
846
896
|
let e = t.version, n = t.version.split(".");
|
|
847
897
|
t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
|
|
848
898
|
}
|
|
849
|
-
await
|
|
899
|
+
await K(`${n}package.json`, t);
|
|
850
900
|
}
|
|
851
|
-
async function
|
|
901
|
+
async function X(e) {
|
|
852
902
|
let { default: t } = await import("typescript"), n = t.createSourceFile("index.ts", e, t.ScriptTarget.Latest, !0), r = [], i = (e) => {
|
|
853
903
|
t.isMethodDeclaration(e) && t.isClassLike(e.parent) && t.isIdentifier(e.name) && ((e.modifiers?.some((e) => e.kind === t.SyntaxKind.PrivateKeyword) ?? !1) || r.push(e.name.text)), t.forEachChild(e, i);
|
|
854
904
|
};
|
|
855
905
|
return i(n), r;
|
|
856
906
|
}
|
|
857
|
-
async function
|
|
858
|
-
|
|
859
|
-
let [n, r] = await Promise.all([
|
|
907
|
+
async function Ze(e, t) {
|
|
908
|
+
J(`${e} Build connector project configuration`);
|
|
909
|
+
let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ s(_e, n);
|
|
860
910
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
861
|
-
let a = await
|
|
862
|
-
return await Q(t, n, a,
|
|
911
|
+
let a = await X(r);
|
|
912
|
+
return await Q(t, n, a, I(a));
|
|
863
913
|
}
|
|
864
|
-
async function
|
|
865
|
-
|
|
866
|
-
let [n, r] = await Promise.all([
|
|
914
|
+
async function Qe(e, t) {
|
|
915
|
+
J(`${e} Build presenter project configuration`);
|
|
916
|
+
let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ s(be, n);
|
|
867
917
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
868
|
-
return await Q(t, n, await
|
|
918
|
+
return await Q(t, n, await X(r));
|
|
919
|
+
}
|
|
920
|
+
async function $e(e, t) {
|
|
921
|
+
let n = await Z(e, t), r = /* @__PURE__ */ s(Ce.entries.parser, n.parser);
|
|
922
|
+
if (!r.success) throw console.error("❌ The 'parser' configuration is invalid:"), console.table(r.issues), Error("Configuration is invalid");
|
|
923
|
+
return await Q(t, n, await X(await W("src/index.ts")));
|
|
869
924
|
}
|
|
870
|
-
async function
|
|
871
|
-
|
|
872
|
-
let n = await
|
|
873
|
-
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await
|
|
925
|
+
async function Z(e, t) {
|
|
926
|
+
J(`${e} Build project configuration`);
|
|
927
|
+
let n = await U("config.json");
|
|
928
|
+
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await G("logo.svg"), n.iconDark ??= await G("logoDark.svg"), await K("config.json", $(n)), n;
|
|
874
929
|
}
|
|
875
930
|
async function Q(e, t, n, r) {
|
|
876
|
-
return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : r && console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.actionNames = n, r !== void 0 && (t.usageId = r), await
|
|
931
|
+
return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : r && console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.actionNames = n, r !== void 0 && (t.usageId = r), await K("config.json", $(t)), t;
|
|
877
932
|
}
|
|
878
933
|
function $(e) {
|
|
879
934
|
let t = [
|
|
@@ -883,11 +938,11 @@ function $(e) {
|
|
|
883
938
|
], n = Object.entries(e), r = t.flatMap((e) => n.filter(([t]) => t === e)), i = n.filter(([e]) => !t.includes(e)).toSorted(([e], [t]) => e.localeCompare(t, "en", { sensitivity: "base" }));
|
|
884
939
|
return Object.fromEntries([...r, ...i]);
|
|
885
940
|
}
|
|
886
|
-
function
|
|
941
|
+
function et(e, t, n, r) {
|
|
887
942
|
let i = e.indexOf(n), a = e.indexOf(r);
|
|
888
943
|
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
889
944
|
let o = t.trim();
|
|
890
945
|
return `${e.slice(0, Math.max(0, i + n.length))}\n\n${o}\n\n${e.slice(Math.max(0, a))}`;
|
|
891
946
|
}
|
|
892
947
|
//#endregion
|
|
893
|
-
export {
|
|
948
|
+
export { We as A, G as C, Be as D, ze as E, I as M, ve as N, Ve as O, W as S, Ue as T, Ge as _, R as a, He as b, H as c, Xe as d, Ie as f, Y as g, qe as h, ke as i, q as j, K as k, Ne as l, Le as m, B as n, Ae as o, Re as p, Oe as r, V as s, z as t, Ye as u, Ke as v, Je as w, U as x, J as y };
|