@dpuse/dpuse-development 1.0.134 → 1.0.137

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.
@@ -91,19 +91,34 @@ function m(e) {
91
91
  }, e;
92
92
  }
93
93
  /* @__NO_SIDE_EFFECTS__ */
94
+ function h(e, t) {
95
+ return {
96
+ kind: "validation",
97
+ type: "min_length",
98
+ reference: h,
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__ */
94
109
  function ne(e, t, n) {
95
110
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
96
111
  }
97
112
  /* @__NO_SIDE_EFFECTS__ */
98
- function h(e, t, n) {
113
+ function g(e, t, n) {
99
114
  return typeof e.default == "function" ? e.default(t, n) : e.default;
100
115
  }
101
116
  /* @__NO_SIDE_EFFECTS__ */
102
- function g(e, t) {
117
+ function _(e, t) {
103
118
  return m({
104
119
  kind: "schema",
105
120
  type: "array",
106
- reference: g,
121
+ reference: _,
107
122
  expects: "Array",
108
123
  async: !1,
109
124
  item: e,
@@ -136,11 +151,11 @@ function g(e, t) {
136
151
  });
137
152
  }
138
153
  /* @__NO_SIDE_EFFECTS__ */
139
- function _(e) {
154
+ function v(e) {
140
155
  return m({
141
156
  kind: "schema",
142
157
  type: "boolean",
143
- reference: _,
158
+ reference: v,
144
159
  expects: "boolean",
145
160
  async: !1,
146
161
  message: e,
@@ -150,11 +165,11 @@ function _(e) {
150
165
  });
151
166
  }
152
167
  /* @__NO_SIDE_EFFECTS__ */
153
- function v(e, t) {
168
+ function y(e, t) {
154
169
  return m({
155
170
  kind: "schema",
156
171
  type: "literal",
157
- reference: v,
172
+ reference: y,
158
173
  expects: /* @__PURE__ */ d(e),
159
174
  async: !1,
160
175
  literal: e,
@@ -165,26 +180,26 @@ function v(e, t) {
165
180
  });
166
181
  }
167
182
  /* @__NO_SIDE_EFFECTS__ */
168
- function y(e, t) {
183
+ function b(e, t) {
169
184
  return m({
170
185
  kind: "schema",
171
186
  type: "nullable",
172
- reference: y,
187
+ reference: b,
173
188
  expects: `(${e.expects} | null)`,
174
189
  async: !1,
175
190
  wrapped: e,
176
191
  default: t,
177
192
  "~run"(e, t) {
178
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ h(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
193
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ g(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
179
194
  }
180
195
  });
181
196
  }
182
197
  /* @__NO_SIDE_EFFECTS__ */
183
- function b(e) {
198
+ function x(e) {
184
199
  return m({
185
200
  kind: "schema",
186
201
  type: "number",
187
- reference: b,
202
+ reference: x,
188
203
  expects: "number",
189
204
  async: !1,
190
205
  message: e,
@@ -194,26 +209,26 @@ function b(e) {
194
209
  });
195
210
  }
196
211
  /* @__NO_SIDE_EFFECTS__ */
197
- function x(e, t) {
212
+ function S(e, t) {
198
213
  return m({
199
214
  kind: "schema",
200
215
  type: "optional",
201
- reference: x,
216
+ reference: S,
202
217
  expects: `(${e.expects} | undefined)`,
203
218
  async: !1,
204
219
  wrapped: e,
205
220
  default: t,
206
221
  "~run"(e, t) {
207
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ h(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
222
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ g(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
208
223
  }
209
224
  });
210
225
  }
211
226
  /* @__NO_SIDE_EFFECTS__ */
212
- function S(e, t, n) {
227
+ function C(e, t, n) {
213
228
  return m({
214
229
  kind: "schema",
215
230
  type: "record",
216
- reference: S,
231
+ reference: C,
217
232
  expects: "Object",
218
233
  async: !1,
219
234
  key: e,
@@ -262,11 +277,11 @@ function S(e, t, n) {
262
277
  });
263
278
  }
264
279
  /* @__NO_SIDE_EFFECTS__ */
265
- function C(e, t) {
280
+ function w(e, t) {
266
281
  return m({
267
282
  kind: "schema",
268
283
  type: "strict_object",
269
- reference: C,
284
+ reference: w,
270
285
  expects: "Object",
271
286
  async: !1,
272
287
  entries: e,
@@ -278,7 +293,7 @@ function C(e, t) {
278
293
  for (let r in this.entries) {
279
294
  let i = this.entries[r];
280
295
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
281
- let a = r in n ? n[r] : /* @__PURE__ */ h(i), o = i["~run"]({ value: a }, t);
296
+ let a = r in n ? n[r] : /* @__PURE__ */ g(i), o = i["~run"]({ value: a }, t);
282
297
  if (o.issues) {
283
298
  let i = {
284
299
  type: "object",
@@ -329,11 +344,11 @@ function C(e, t) {
329
344
  });
330
345
  }
331
346
  /* @__NO_SIDE_EFFECTS__ */
332
- function w(e) {
347
+ function T(e) {
333
348
  return m({
334
349
  kind: "schema",
335
350
  type: "string",
336
- reference: w,
351
+ reference: T,
337
352
  expects: "string",
338
353
  async: !1,
339
354
  message: e,
@@ -343,18 +358,18 @@ function w(e) {
343
358
  });
344
359
  }
345
360
  /* @__NO_SIDE_EFFECTS__ */
346
- function T(e) {
361
+ function E(e) {
347
362
  let t;
348
363
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
349
364
  else t = n.issues;
350
365
  return t;
351
366
  }
352
367
  /* @__NO_SIDE_EFFECTS__ */
353
- function E(e, t) {
368
+ function D(e, t) {
354
369
  return m({
355
370
  kind: "schema",
356
371
  type: "union",
357
- reference: E,
372
+ reference: D,
358
373
  expects: /* @__PURE__ */ p(e.map((e) => e.expects), "|"),
359
374
  async: !1,
360
375
  options: e,
@@ -374,29 +389,46 @@ function E(e, t) {
374
389
  if (n) return n;
375
390
  if (r) {
376
391
  if (r.length === 1) return r[0];
377
- f(this, "type", e, t, { issues: /* @__PURE__ */ T(r) }), e.typed = !0;
392
+ f(this, "type", e, t, { issues: /* @__PURE__ */ E(r) }), e.typed = !0;
378
393
  } else if (i?.length === 1) return i[0];
379
- else f(this, "type", e, t, { issues: /* @__PURE__ */ T(i) });
394
+ else f(this, "type", e, t, { issues: /* @__PURE__ */ E(i) });
380
395
  return e;
381
396
  }
382
397
  });
383
398
  }
384
- var D = /* @__PURE__ */ C({
385
- en: /* @__PURE__ */ w(),
386
- es: /* @__PURE__ */ w()
387
- }), re = {
388
- id: /* @__PURE__ */ w(),
389
- label: /* @__PURE__ */ C({
390
- en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
391
- es: /* @__PURE__ */ x(/* @__PURE__ */ w())
399
+ /* @__NO_SIDE_EFFECTS__ */
400
+ function re(...e) {
401
+ return m({
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
+ }
416
+ var O = /* @__PURE__ */ w({
417
+ en: /* @__PURE__ */ T(),
418
+ es: /* @__PURE__ */ T()
419
+ }), ie = {
420
+ id: /* @__PURE__ */ T(),
421
+ label: /* @__PURE__ */ w({
422
+ en: /* @__PURE__ */ S(/* @__PURE__ */ T()),
423
+ es: /* @__PURE__ */ S(/* @__PURE__ */ T())
392
424
  }),
393
- description: /* @__PURE__ */ C({
394
- en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
395
- es: /* @__PURE__ */ x(/* @__PURE__ */ w())
425
+ description: /* @__PURE__ */ w({
426
+ en: /* @__PURE__ */ S(/* @__PURE__ */ T()),
427
+ es: /* @__PURE__ */ S(/* @__PURE__ */ T())
396
428
  }),
397
- icon: /* @__PURE__ */ y(/* @__PURE__ */ w()),
398
- iconDark: /* @__PURE__ */ y(/* @__PURE__ */ w())
399
- }, O = (e) => /* @__PURE__ */ E(e.map((e) => /* @__PURE__ */ v(e))), ie = O([
429
+ icon: /* @__PURE__ */ b(/* @__PURE__ */ T()),
430
+ iconDark: /* @__PURE__ */ b(/* @__PURE__ */ T())
431
+ }, k = (e) => /* @__PURE__ */ D(e.map((e) => /* @__PURE__ */ y(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
- ]), ae = O([
453
+ ]), oe = k([
422
454
  "danger",
423
455
  "success",
424
456
  "warning"
425
- ]), oe = O([
457
+ ]), se = k([
426
458
  "alpha",
427
459
  "beta",
428
460
  "releaseCandidate",
429
461
  "generalAvailability"
430
- ]), se = /* @__PURE__ */ C({
431
- color: ae,
432
- label: /* @__PURE__ */ w()
433
- }), k = {
434
- ...re,
435
- typeId: ie
436
- }, ce = /* @__PURE__ */ C({
437
- ...k,
438
- order: /* @__PURE__ */ b(),
439
- path: /* @__PURE__ */ w()
462
+ ]), ce = /* @__PURE__ */ w({
463
+ color: oe,
464
+ label: /* @__PURE__ */ T()
440
465
  }), A = {
441
- ...k,
442
- firstCreatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
443
- lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
444
- status: /* @__PURE__ */ y(se),
445
- statusId: /* @__PURE__ */ y(oe)
466
+ ...ie,
467
+ typeId: ae
468
+ }, le = /* @__PURE__ */ w({
469
+ ...A,
470
+ order: /* @__PURE__ */ x(),
471
+ path: /* @__PURE__ */ T()
472
+ }), j = {
473
+ ...A,
474
+ firstCreatedAt: /* @__PURE__ */ b(/* @__PURE__ */ x()),
475
+ lastUpdatedAt: /* @__PURE__ */ b(/* @__PURE__ */ x()),
476
+ status: /* @__PURE__ */ b(ce),
477
+ statusId: /* @__PURE__ */ b(se)
446
478
  };
447
- ({ ...A }), 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" }), O([
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 j = {
456
- ...A,
457
- vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
458
- vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
459
- vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
460
- version: /* @__PURE__ */ w()
487
+ var M = {
488
+ ...j,
489
+ vendorAccountURL: /* @__PURE__ */ b(/* @__PURE__ */ T()),
490
+ vendorDocumentationURL: /* @__PURE__ */ b(/* @__PURE__ */ T()),
491
+ vendorHomeURL: /* @__PURE__ */ b(/* @__PURE__ */ T()),
492
+ version: /* @__PURE__ */ T()
461
493
  };
462
- ({ ...j });
463
- var le = O([
494
+ ({ ...M });
495
+ var ue = k([
464
496
  "abortOperation",
465
497
  "auditObjectContent",
466
498
  "createObject",
@@ -476,44 +508,62 @@ var le = O([
476
508
  "retrieveChunks",
477
509
  "retrieveRecords",
478
510
  "upsertRecords"
479
- ]), ue = O([
511
+ ]), de = k([
480
512
  "application",
481
513
  "curatedDataset",
482
514
  "database",
483
515
  "fileStore"
484
- ]), de = /* @__PURE__ */ C({ label: D }), fe = O([
516
+ ]), fe = /* @__PURE__ */ w({ label: O }), pe = k([
485
517
  "apiEndpoint",
486
518
  "file",
487
519
  "table"
488
- ]), pe = O([
520
+ ]), me = k([
489
521
  "bidirectional",
490
522
  "destination",
491
523
  "source",
492
524
  "unknown"
493
- ]), me = /* @__PURE__ */ C({ label: D }), he = /* @__PURE__ */ C({
494
- authMethodId: O([
525
+ ]), he = /* @__PURE__ */ w({ label: O }), ge = /* @__PURE__ */ w({
526
+ authMethodId: k([
495
527
  "apiKey",
496
528
  "disabled",
497
529
  "oAuth2",
498
530
  "none"
499
531
  ]),
500
- activeConnectionCount: /* @__PURE__ */ x(/* @__PURE__ */ b()),
501
- canDescribe: /* @__PURE__ */ x(/* @__PURE__ */ _()),
502
- id: /* @__PURE__ */ x(/* @__PURE__ */ w()),
503
- label: /* @__PURE__ */ x(D),
504
- maxConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ b()),
505
- params: /* @__PURE__ */ x(/* @__PURE__ */ g(/* @__PURE__ */ S(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
506
- }), ge = /* @__PURE__ */ C({
507
- ...j,
508
- typeId: /* @__PURE__ */ v("connector"),
509
- actionNames: /* @__PURE__ */ g(le),
510
- category: /* @__PURE__ */ y(de),
511
- categoryId: ue,
512
- implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), he),
513
- itemTypeId: fe,
514
- usage: /* @__PURE__ */ y(me),
515
- usageId: /* @__PURE__ */ y(pe)
516
- }), M = {
532
+ activeConnectionCount: /* @__PURE__ */ S(/* @__PURE__ */ x()),
533
+ canDescribe: /* @__PURE__ */ S(/* @__PURE__ */ v()),
534
+ id: /* @__PURE__ */ S(/* @__PURE__ */ T()),
535
+ label: /* @__PURE__ */ S(O),
536
+ maxConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ x()),
537
+ params: /* @__PURE__ */ S(/* @__PURE__ */ _(/* @__PURE__ */ C(/* @__PURE__ */ T(), /* @__PURE__ */ T())))
538
+ }), _e = /* @__PURE__ */ w({
539
+ ...M,
540
+ typeId: /* @__PURE__ */ y("connector"),
541
+ actionNames: /* @__PURE__ */ _(ue),
542
+ category: /* @__PURE__ */ b(fe),
543
+ categoryId: de,
544
+ implementations: /* @__PURE__ */ C(/* @__PURE__ */ T(), ge),
545
+ itemTypeId: pe,
546
+ usage: /* @__PURE__ */ b(he),
547
+ usageId: /* @__PURE__ */ b(me)
548
+ }), ve = /* @__PURE__ */ w({ dataFormatIds: /* @__PURE__ */ re(/* @__PURE__ */ _(k([
549
+ "arrow",
550
+ "avro",
551
+ "dtv",
552
+ "json",
553
+ "jsonl",
554
+ "markdown",
555
+ "ods",
556
+ "parquet",
557
+ "sav",
558
+ "sqlite",
559
+ "xlsx",
560
+ "xml"
561
+ ])), /* @__PURE__ */ h(1)) }), N = /* @__PURE__ */ _(/* @__PURE__ */ T()), P = /* @__PURE__ */ w({
562
+ ...M,
563
+ typeId: /* @__PURE__ */ y("tool"),
564
+ actionNames: /* @__PURE__ */ S(N),
565
+ parser: /* @__PURE__ */ S(ve)
566
+ }), F = {
517
567
  abortOperation: "Abort Operation",
518
568
  auditObjectContent: "Audit Object Content",
519
569
  createObject: "Create Object",
@@ -529,12 +579,12 @@ var le = O([
529
579
  retrieveChunks: "Retrieve Chunks",
530
580
  retrieveRecords: "Retrieve Records",
531
581
  upsertRecords: "Upsert Records"
532
- }, N = /* @__PURE__ */ new Set([
582
+ }, ye = /* @__PURE__ */ new Set([
533
583
  "createObject",
534
584
  "dropObject",
535
585
  "removeRecords",
536
586
  "upsertRecords"
537
- ]), P = /* @__PURE__ */ new Set([
587
+ ]), be = /* @__PURE__ */ new Set([
538
588
  "auditObjectContent",
539
589
  "findObject",
540
590
  "getInfo",
@@ -545,43 +595,28 @@ var le = O([
545
595
  "retrieveChunks",
546
596
  "retrieveRecords"
547
597
  ]);
548
- function F(e) {
598
+ function I(e) {
549
599
  let t = !1, n = !1;
550
- for (let r of e) P.has(r) && (t = !0), N.has(r) && (n = !0);
600
+ for (let r of e) be.has(r) && (t = !0), ye.has(r) && (n = !0);
551
601
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
552
602
  }
553
- function I(e) {
603
+ function xe(e) {
554
604
  let t = new Set(e), n = "|Action|Supported|\n";
555
605
  n += "|:----|:-------:|\n";
556
- for (let e of Object.keys(M)) n += `| ${M[e]} | ${t.has(e) ? "✓" : ""} |\n`;
606
+ for (let e of Object.keys(F)) n += `| ${F[e]} | ${t.has(e) ? "✓" : ""} |\n`;
557
607
  return n;
558
608
  }
559
- O(["list"]), { ...j };
560
- var L = O([
609
+ k(["list"]), { ...M };
610
+ var Se = k([
561
611
  "list",
562
612
  "render",
563
613
  "setColorMode"
564
- ]), _e = /* @__PURE__ */ C({
565
- ...j,
566
- typeId: /* @__PURE__ */ v("presenter"),
567
- actionNames: /* @__PURE__ */ g(L),
568
- presentations: /* @__PURE__ */ g(ce)
569
- });
570
- O([
571
- "arrow",
572
- "avro",
573
- "dtv",
574
- "json",
575
- "jsonl",
576
- "markdown",
577
- "ods",
578
- "parquet",
579
- "sav",
580
- "sqlite",
581
- "xlsx",
582
- "xml"
583
- ]), { ...j };
584
- var R = /* @__PURE__ */ new Map([
614
+ ]), Ce = /* @__PURE__ */ w({
615
+ ...M,
616
+ typeId: /* @__PURE__ */ y("presenter"),
617
+ actionNames: /* @__PURE__ */ _(Se),
618
+ presentations: /* @__PURE__ */ _(le)
619
+ }), L = /* @__PURE__ */ new Map([
585
620
  ["arrow", "application/vnd.apache.arrow.file"],
586
621
  ["avro", "application/vnd.apache.avro"],
587
622
  ["bin", "application/octet-stream"],
@@ -603,24 +638,24 @@ var R = /* @__PURE__ */ new Map([
603
638
  ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
604
639
  ["xml", "application/xml"]
605
640
  ]);
606
- function ve(e) {
641
+ function we(e) {
607
642
  if (!e) return;
608
- let t = xe(e);
643
+ let t = De(e);
609
644
  return t === void 0 ? void 0 : e.slice(t + 1);
610
645
  }
611
- function ye(e) {
612
- return e != null && R.has(e.toLowerCase());
646
+ function Te(e) {
647
+ return e != null && L.has(e.toLowerCase());
613
648
  }
614
- function be(e) {
615
- return (e == null ? void 0 : R.get(e.toLowerCase())) ?? "application/octet-stream";
649
+ function Ee(e) {
650
+ return (e == null ? void 0 : L.get(e.toLowerCase())) ?? "application/octet-stream";
616
651
  }
617
- function xe(e) {
652
+ function De(e) {
618
653
  let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
619
654
  return n > t && n < e.length - 1 ? n : void 0;
620
655
  }
621
656
  //#endregion
622
657
  //#region src/utilities/index.ts
623
- var Se = /* @__PURE__ */ new Set(["@dpuse/dpuse-development", "@dpuse/eslint-config-dpuse"]), z = "code-health-reports/fallow", Ce = `${z}/badge.json`, we = `${z}/index.md`, B = "<!-- CONTRIBUTING_LICENSE_END -->", V = "<!-- CONTRIBUTING_LICENSE_START -->", Te = "<!-- GOVERNANCE_END -->", Ee = "<!-- GOVERNANCE_START -->", H = "<!-- QUALITY_SECURITY_END -->", U = "<!-- QUALITY_SECURITY_START -->", De = "rust/Cargo.toml", Oe = [
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 = [
624
659
  {
625
660
  idPrefix: "dpuse-app",
626
661
  typeId: "app",
@@ -705,9 +740,9 @@ var Se = /* @__PURE__ */ new Set(["@dpuse/dpuse-development", "@dpuse/eslint-con
705
740
  publishedTo: "github",
706
741
  uploadGroupName: void 0
707
742
  }
708
- ], ke = n(r);
709
- async function Ae(n, r) {
710
- n !== void 0 && X(`${n} - clear(${r})`);
743
+ ], Fe = n(r);
744
+ async function Ie(n, r) {
745
+ n !== void 0 && J(`${n} - clear(${r})`);
711
746
  let i;
712
747
  try {
713
748
  i = await e.readdir(r, { withFileTypes: !0 });
@@ -727,16 +762,16 @@ async function Ae(n, r) {
727
762
  }
728
763
  }));
729
764
  }
730
- async function je(t, n) {
765
+ async function Le(t, n) {
731
766
  return e.readdir(t, n);
732
767
  }
733
- async function Me(t, n, r, i) {
734
- t !== void 0 && X(`${t} - exec(${n} ${r.join(" ")})`);
735
- let { stdout: a, stderr: o } = await ke(n, r);
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);
736
771
  i === void 0 ? a.trim() && console.log(a.trim()) : await e.writeFile(i, a.trim(), "utf-8"), o.trim() && console.error(o.trim());
737
772
  }
738
- async function Ne(e, t, n, r = !1, a = !1) {
739
- return X(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
773
+ async function ze(e, t, n, r = !1, a = !1) {
774
+ return J(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
740
775
  i(t, n, {
741
776
  shell: a,
742
777
  stdio: "inherit"
@@ -745,8 +780,8 @@ async function Ne(e, t, n, r = !1, a = !1) {
745
780
  });
746
781
  });
747
782
  }
748
- async function Pe(e, t, n) {
749
- return X(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, r) => {
783
+ async function Be(e, t, n) {
784
+ return J(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, r) => {
750
785
  let a = i(t, n, {
751
786
  shell: !1,
752
787
  stdio: [
@@ -762,8 +797,8 @@ async function Pe(e, t, n) {
762
797
  });
763
798
  });
764
799
  }
765
- async function Fe(n, r, a, o, s = !1) {
766
- return X(`${n} - spawn(${r} ${a.join(" ")}) > ${o}`), new Promise((n, c) => {
800
+ async function Ve(n, r, a, o, s = !1) {
801
+ return J(`${n} - spawn(${r} ${a.join(" ")}) > ${o}`), new Promise((n, c) => {
767
802
  let l = i(r, a, {
768
803
  shell: !1,
769
804
  stdio: [
@@ -785,19 +820,19 @@ async function Fe(n, r, a, o, s = !1) {
785
820
  });
786
821
  });
787
822
  }
788
- async function Ie() {
789
- let e = await G("./README.md"), t = e.indexOf(Ee), n = e.indexOf(Te);
823
+ async function He() {
824
+ let e = await W("./README.md"), t = e.indexOf(Me), n = e.indexOf(je);
790
825
  if (t === -1 || n === -1) return;
791
- let r = `${U}\n${H}\n\n${V}\n${B}`;
792
- await J("README.md", `${e.slice(0, t)}${r}${e.slice(n + 23)}`);
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)}`);
793
828
  }
794
- async function W(t) {
829
+ async function U(t) {
795
830
  return JSON.parse(await e.readFile(t, "utf-8"));
796
831
  }
797
- async function G(t) {
832
+ async function W(t) {
798
833
  return await e.readFile(t, "utf-8");
799
834
  }
800
- async function K(t) {
835
+ async function G(t) {
801
836
  try {
802
837
  return await e.readFile(t, "utf-8");
803
838
  } catch (e) {
@@ -805,36 +840,36 @@ async function K(t) {
805
840
  throw e;
806
841
  }
807
842
  }
808
- function Le(e) {
843
+ function Ue(e) {
809
844
  let t = e.slice(e.lastIndexOf("/") + 1);
810
845
  if (t === "LICENSE") return "text/plain";
811
- let n = ve(t);
812
- return ye(n) || console.warn(`⚠️ No content type for '${e}', so it is treated as 'application/octet-stream'. Add its extension to dpuse-shared.`), be(n);
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);
813
848
  }
814
- async function q(n, r) {
849
+ async function K(n, r) {
815
850
  await e.mkdir(t.dirname(n), { recursive: !0 }), await e.writeFile(n, `${JSON.stringify(r, void 0, 4)}\n`, "utf-8");
816
851
  }
817
- async function Re(e, t, n) {
818
- await J("README.md", Je(await G("./README.md"), e, t, n));
852
+ async function We(e, t, n) {
853
+ await q("README.md", et(await W("./README.md"), e, t, n));
819
854
  }
820
- async function J(t, n) {
855
+ async function q(t, n) {
821
856
  await e.writeFile(t, n, "utf-8");
822
857
  }
823
- function Y(e) {
858
+ function Ge(e) {
824
859
  console.info("\x1B[36m────────────────────────────────────────────────────────────────────────────────"), console.info(`▶️ ${e}`);
825
860
  }
826
- function ze(e) {
861
+ function Ke(e) {
827
862
  console.info(`✅ ${e}`);
828
863
  }
829
- function X(e) {
864
+ function J(e) {
830
865
  console.info(e);
831
866
  }
832
- function Be(e) {
833
- let t = Oe.find((t) => e.startsWith(t.idPrefix));
867
+ function qe(e) {
868
+ let t = Pe.find((t) => e.startsWith(t.idPrefix));
834
869
  if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
835
870
  return t;
836
871
  }
837
- function Ve(e, t) {
872
+ function Je(e, t) {
838
873
  let n = e.repository, r = typeof n == "string" ? n : n?.url;
839
874
  if (r == null || r === "") throw Error(`package.json 'repository' field is required to ${t}.`);
840
875
  let i = r.replace(/^git\+/, "").replace(/\.git$/, ""), a = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(i);
@@ -844,50 +879,56 @@ function Ve(e, t) {
844
879
  repository: a[2]
845
880
  };
846
881
  }
847
- async function He(t) {
882
+ async function Y(t) {
848
883
  return await e.stat(t);
849
884
  }
850
- async function Ue(e, t, n) {
885
+ async function Ye(e, t, n) {
851
886
  switch (n.typeId) {
852
- case "connector": return await Ge(e, t);
853
- case "presenter": return await Ke(e, t);
854
- default: return await qe(e, t);
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);
855
891
  }
856
892
  }
857
- async function We(e, t, n = "./") {
858
- if (X(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
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}'.`);
859
895
  else {
860
896
  let e = t.version, n = t.version.split(".");
861
897
  t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
862
898
  }
863
- await q(`${n}package.json`, t);
899
+ await K(`${n}package.json`, t);
864
900
  }
865
- async function Z(e) {
901
+ async function X(e) {
866
902
  let { default: t } = await import("typescript"), n = t.createSourceFile("index.ts", e, t.ScriptTarget.Latest, !0), r = [], i = (e) => {
867
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);
868
904
  };
869
905
  return i(n), r;
870
906
  }
871
- async function Ge(e, t) {
872
- X(`${e} Build connector project configuration`);
873
- let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ s(ge, n);
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);
874
910
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
875
- let a = await Z(r);
876
- return await Q(t, n, a, F(a));
911
+ let a = await X(r);
912
+ return await Q(t, n, a, I(a));
877
913
  }
878
- async function Ke(e, t) {
879
- X(`${e} Build presenter project configuration`);
880
- let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ s(_e, n);
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(Ce, n);
881
917
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
882
- return await Q(t, n, await Z(r));
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(P.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")));
883
924
  }
884
- async function qe(e, t) {
885
- X(`${e} Build project configuration`);
886
- let n = await W("config.json");
887
- return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await K("logo.svg"), n.iconDark ??= await K("logoDark.svg"), await q("config.json", $(n)), n;
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;
888
929
  }
889
930
  async function Q(e, t, n, r) {
890
- 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 q("config.json", $(t)), t;
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;
891
932
  }
892
933
  function $(e) {
893
934
  let t = [
@@ -897,11 +938,11 @@ function $(e) {
897
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" }));
898
939
  return Object.fromEntries([...r, ...i]);
899
940
  }
900
- function Je(e, t, n, r) {
941
+ function et(e, t, n, r) {
901
942
  let i = e.indexOf(n), a = e.indexOf(r);
902
943
  if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
903
944
  let o = t.trim();
904
945
  return `${e.slice(0, Math.max(0, i + n.length))}\n\n${o}\n\n${e.slice(Math.max(0, a))}`;
905
946
  }
906
947
  //#endregion
907
- export { Re as A, K as C, Pe as D, Ne as E, F as M, I as N, Fe as O, G as S, Le as T, Y as _, z as a, Ie as b, U as c, We as d, Ae as f, He as g, Be as h, Ce as i, J as j, q as k, De as l, je as m, V as n, we as o, Me as p, Se as r, H as s, B as t, Ue as u, ze as v, Ve as w, W as x, X as y };
948
+ export { We as A, G as C, Be as D, ze as E, I as M, xe 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 };