@dpuse/dpuse-development 0.3.818 → 0.3.821

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.
@@ -7,6 +7,7 @@ export interface ModuleTypeConfig {
7
7
  publishedTo: 'app' | 'api' | 'dpuse' | 'github' | 'kb' | 'npm' | 'sampleData';
8
8
  uploadGroupName: 'connectors' | 'contexts' | 'cookbooks' | 'engine' | 'presenters' | 'tools' | undefined;
9
9
  }
10
+ export declare const DEVELOPMENT_ONLY_PACKAGE_NAMES: Set<string>;
10
11
  export declare const FALLOW_DIRECTORY = "code-health-reports/fallow";
11
12
  export declare const FALLOW_BADGE_PATH = "code-health-reports/fallow/badge.json";
12
13
  export declare const FALLOW_REPORT_PATH = "code-health-reports/fallow/index.md";
@@ -33,9 +34,9 @@ export declare function logOperationHeader(text: string): void;
33
34
  export declare function logOperationSuccess(message: string): void;
34
35
  export declare function logStepHeader(text: string): void;
35
36
  export declare function getModuleConfig(configId: string): ModuleTypeConfig;
36
- export declare function resolveOwnerAndRepo(packageJSON: PackageJson, purpose: string): {
37
+ export declare function resolveOwnerAndRepository(packageJSON: PackageJson, purpose: string): {
37
38
  owner: string;
38
- repo: string;
39
+ repository: string;
39
40
  };
40
41
  export declare function getStatsForPath(path: string): Promise<Stats>;
41
42
  export declare function buildModuleConfig(stepIcon: string, packageJSON: PackageJson, moduleTypeConfig: ModuleTypeConfig): Promise<ModuleConfig>;
@@ -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 ne(e, t) {
82
+ function p(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 p(e) {
86
+ function m(e) {
87
87
  return e["~standard"] = {
88
88
  version: 1,
89
89
  vendor: "valibot",
@@ -91,19 +91,19 @@ function p(e) {
91
91
  }, e;
92
92
  }
93
93
  /* @__NO_SIDE_EFFECTS__ */
94
- function re(e, t, n) {
94
+ function ne(e, t, n) {
95
95
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
96
96
  }
97
97
  /* @__NO_SIDE_EFFECTS__ */
98
- function m(e, t, n) {
98
+ function h(e, t, n) {
99
99
  return typeof e.default == "function" ? e.default(t, n) : e.default;
100
100
  }
101
101
  /* @__NO_SIDE_EFFECTS__ */
102
- function h(e, t) {
103
- return p({
102
+ function g(e, t) {
103
+ return m({
104
104
  kind: "schema",
105
105
  type: "array",
106
- reference: h,
106
+ reference: g,
107
107
  expects: "Array",
108
108
  async: !1,
109
109
  item: e,
@@ -136,11 +136,11 @@ function h(e, t) {
136
136
  });
137
137
  }
138
138
  /* @__NO_SIDE_EFFECTS__ */
139
- function g(e) {
140
- return p({
139
+ function _(e) {
140
+ return m({
141
141
  kind: "schema",
142
142
  type: "boolean",
143
- reference: g,
143
+ reference: _,
144
144
  expects: "boolean",
145
145
  async: !1,
146
146
  message: e,
@@ -150,11 +150,11 @@ function g(e) {
150
150
  });
151
151
  }
152
152
  /* @__NO_SIDE_EFFECTS__ */
153
- function _(e, t) {
154
- return p({
153
+ function v(e, t) {
154
+ return m({
155
155
  kind: "schema",
156
156
  type: "literal",
157
- reference: _,
157
+ reference: v,
158
158
  expects: /* @__PURE__ */ d(e),
159
159
  async: !1,
160
160
  literal: e,
@@ -165,26 +165,26 @@ function _(e, t) {
165
165
  });
166
166
  }
167
167
  /* @__NO_SIDE_EFFECTS__ */
168
- function v(e, t) {
169
- return p({
168
+ function y(e, t) {
169
+ return m({
170
170
  kind: "schema",
171
171
  type: "nullable",
172
- reference: v,
172
+ reference: y,
173
173
  expects: `(${e.expects} | null)`,
174
174
  async: !1,
175
175
  wrapped: e,
176
176
  default: t,
177
177
  "~run"(e, t) {
178
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ m(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~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);
179
179
  }
180
180
  });
181
181
  }
182
182
  /* @__NO_SIDE_EFFECTS__ */
183
- function y(e) {
184
- return p({
183
+ function b(e) {
184
+ return m({
185
185
  kind: "schema",
186
186
  type: "number",
187
- reference: y,
187
+ reference: b,
188
188
  expects: "number",
189
189
  async: !1,
190
190
  message: e,
@@ -194,26 +194,26 @@ function y(e) {
194
194
  });
195
195
  }
196
196
  /* @__NO_SIDE_EFFECTS__ */
197
- function b(e, t) {
198
- return p({
197
+ function x(e, t) {
198
+ return m({
199
199
  kind: "schema",
200
200
  type: "optional",
201
- reference: b,
201
+ reference: x,
202
202
  expects: `(${e.expects} | undefined)`,
203
203
  async: !1,
204
204
  wrapped: e,
205
205
  default: t,
206
206
  "~run"(e, t) {
207
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ m(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~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);
208
208
  }
209
209
  });
210
210
  }
211
211
  /* @__NO_SIDE_EFFECTS__ */
212
- function x(e, t, n) {
213
- return p({
212
+ function S(e, t, n) {
213
+ return m({
214
214
  kind: "schema",
215
215
  type: "record",
216
- reference: x,
216
+ reference: S,
217
217
  expects: "Object",
218
218
  async: !1,
219
219
  key: e,
@@ -262,11 +262,11 @@ function x(e, t, n) {
262
262
  });
263
263
  }
264
264
  /* @__NO_SIDE_EFFECTS__ */
265
- function S(e, t) {
266
- return p({
265
+ function C(e, t) {
266
+ return m({
267
267
  kind: "schema",
268
268
  type: "strict_object",
269
- reference: S,
269
+ reference: C,
270
270
  expects: "Object",
271
271
  async: !1,
272
272
  entries: e,
@@ -278,7 +278,7 @@ function S(e, t) {
278
278
  for (let r in this.entries) {
279
279
  let i = this.entries[r];
280
280
  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__ */ m(i), o = i["~run"]({ value: a }, t);
281
+ let a = r in n ? n[r] : /* @__PURE__ */ h(i), o = i["~run"]({ value: a }, t);
282
282
  if (o.issues) {
283
283
  let i = {
284
284
  type: "object",
@@ -294,7 +294,7 @@ function S(e, t) {
294
294
  }
295
295
  }
296
296
  o.typed || (e.typed = !1), e.value[r] = o.value;
297
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ re(i);
297
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ne(i);
298
298
  else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (f(this, "key", e, t, {
299
299
  input: void 0,
300
300
  expected: `"${r}"`,
@@ -329,11 +329,11 @@ function S(e, t) {
329
329
  });
330
330
  }
331
331
  /* @__NO_SIDE_EFFECTS__ */
332
- function C(e) {
333
- return p({
332
+ function w(e) {
333
+ return m({
334
334
  kind: "schema",
335
335
  type: "string",
336
- reference: C,
336
+ reference: w,
337
337
  expects: "string",
338
338
  async: !1,
339
339
  message: e,
@@ -343,19 +343,19 @@ function C(e) {
343
343
  });
344
344
  }
345
345
  /* @__NO_SIDE_EFFECTS__ */
346
- function w(e) {
346
+ function T(e) {
347
347
  let t;
348
348
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
349
349
  else t = n.issues;
350
350
  return t;
351
351
  }
352
352
  /* @__NO_SIDE_EFFECTS__ */
353
- function T(e, t) {
354
- return p({
353
+ function E(e, t) {
354
+ return m({
355
355
  kind: "schema",
356
356
  type: "union",
357
- reference: T,
358
- expects: /* @__PURE__ */ ne(e.map((e) => e.expects), "|"),
357
+ reference: E,
358
+ expects: /* @__PURE__ */ p(e.map((e) => e.expects), "|"),
359
359
  async: !1,
360
360
  options: e,
361
361
  message: t,
@@ -374,29 +374,29 @@ function T(e, t) {
374
374
  if (n) return n;
375
375
  if (r) {
376
376
  if (r.length === 1) return r[0];
377
- f(this, "type", e, t, { issues: /* @__PURE__ */ w(r) }), e.typed = !0;
377
+ f(this, "type", e, t, { issues: /* @__PURE__ */ T(r) }), e.typed = !0;
378
378
  } else if (i?.length === 1) return i[0];
379
- else f(this, "type", e, t, { issues: /* @__PURE__ */ w(i) });
379
+ else f(this, "type", e, t, { issues: /* @__PURE__ */ T(i) });
380
380
  return e;
381
381
  }
382
382
  });
383
383
  }
384
- var E = /* @__PURE__ */ S({
385
- en: /* @__PURE__ */ C(),
386
- es: /* @__PURE__ */ C()
387
- }), ie = {
388
- id: /* @__PURE__ */ C(),
389
- label: /* @__PURE__ */ S({
390
- en: /* @__PURE__ */ b(/* @__PURE__ */ C()),
391
- es: /* @__PURE__ */ b(/* @__PURE__ */ C())
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())
392
392
  }),
393
- description: /* @__PURE__ */ S({
394
- en: /* @__PURE__ */ b(/* @__PURE__ */ C()),
395
- es: /* @__PURE__ */ b(/* @__PURE__ */ C())
393
+ description: /* @__PURE__ */ C({
394
+ en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
395
+ es: /* @__PURE__ */ x(/* @__PURE__ */ w())
396
396
  }),
397
- icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
398
- iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C())
399
- }, D = (e) => /* @__PURE__ */ T(e.map((e) => /* @__PURE__ */ _(e))), ae = D([
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([
400
400
  "app",
401
401
  "connector",
402
402
  "connectorConnection",
@@ -418,33 +418,33 @@ var E = /* @__PURE__ */ S({
418
418
  "presenter",
419
419
  "presenterPresentation",
420
420
  "tool"
421
- ]), oe = D([
421
+ ]), ae = O([
422
422
  "danger",
423
423
  "success",
424
424
  "warning"
425
- ]), O = D([
425
+ ]), oe = O([
426
426
  "alpha",
427
427
  "beta",
428
428
  "releaseCandidate",
429
429
  "generalAvailability"
430
- ]), se = /* @__PURE__ */ S({
431
- color: oe,
432
- label: /* @__PURE__ */ C()
430
+ ]), se = /* @__PURE__ */ C({
431
+ color: ae,
432
+ label: /* @__PURE__ */ w()
433
433
  }), k = {
434
- ...ie,
435
- typeId: ae
436
- }, ce = /* @__PURE__ */ S({
434
+ ...re,
435
+ typeId: ie
436
+ }, ce = /* @__PURE__ */ C({
437
437
  ...k,
438
- order: /* @__PURE__ */ y(),
439
- path: /* @__PURE__ */ C()
438
+ order: /* @__PURE__ */ b(),
439
+ path: /* @__PURE__ */ w()
440
440
  }), A = {
441
441
  ...k,
442
- firstCreatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
443
- lastUpdatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
444
- status: /* @__PURE__ */ v(se),
445
- statusId: /* @__PURE__ */ v(O)
442
+ firstCreatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
443
+ lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
444
+ status: /* @__PURE__ */ y(se),
445
+ statusId: /* @__PURE__ */ y(oe)
446
446
  };
447
- ({ ...A }), c({ en: "Data Positioning Events" }), c({ en: "Delimited Text" }), c({ en: "JSON" }), c({ en: "SPSS" }), c({ en: "XLSX" }), 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" }), D([
447
+ ({ ...A }), c({ en: "Data Positioning Events" }), c({ en: "Delimited Text" }), c({ en: "JSON" }), c({ en: "SPSS" }), c({ en: "XLSX" }), 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([
448
448
  "app",
449
449
  "engine",
450
450
  "connector",
@@ -454,13 +454,13 @@ var E = /* @__PURE__ */ S({
454
454
  ]);
455
455
  var j = {
456
456
  ...A,
457
- vendorAccountURL: /* @__PURE__ */ v(/* @__PURE__ */ C()),
458
- vendorDocumentationURL: /* @__PURE__ */ v(/* @__PURE__ */ C()),
459
- vendorHomeURL: /* @__PURE__ */ v(/* @__PURE__ */ C()),
460
- version: /* @__PURE__ */ C()
457
+ vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
458
+ vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
459
+ vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
460
+ version: /* @__PURE__ */ w()
461
461
  };
462
462
  ({ ...j });
463
- var le = D([
463
+ var le = O([
464
464
  "abortOperation",
465
465
  "auditObjectContent",
466
466
  "createObject",
@@ -476,38 +476,38 @@ var le = D([
476
476
  "retrieveChunks",
477
477
  "retrieveRecords",
478
478
  "upsertRecords"
479
- ]), ue = D([
479
+ ]), ue = O([
480
480
  "application",
481
481
  "curatedDataset",
482
482
  "database",
483
483
  "fileStore"
484
- ]), de = /* @__PURE__ */ S({ label: E }), fe = D([
484
+ ]), de = /* @__PURE__ */ C({ label: D }), fe = O([
485
485
  "bidirectional",
486
486
  "destination",
487
487
  "source",
488
488
  "unknown"
489
- ]), pe = /* @__PURE__ */ S({ label: E }), me = /* @__PURE__ */ S({
490
- authMethodId: D([
489
+ ]), pe = /* @__PURE__ */ C({ label: D }), me = /* @__PURE__ */ C({
490
+ authMethodId: O([
491
491
  "apiKey",
492
492
  "disabled",
493
493
  "oAuth2",
494
494
  "none"
495
495
  ]),
496
- activeConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ y()),
497
- canDescribe: /* @__PURE__ */ b(/* @__PURE__ */ g()),
498
- id: /* @__PURE__ */ b(/* @__PURE__ */ C()),
499
- label: /* @__PURE__ */ b(E),
500
- maxConnectionCount: /* @__PURE__ */ v(/* @__PURE__ */ y()),
501
- params: /* @__PURE__ */ b(/* @__PURE__ */ h(/* @__PURE__ */ x(/* @__PURE__ */ C(), /* @__PURE__ */ C())))
502
- }), he = /* @__PURE__ */ S({
496
+ activeConnectionCount: /* @__PURE__ */ x(/* @__PURE__ */ b()),
497
+ canDescribe: /* @__PURE__ */ x(/* @__PURE__ */ _()),
498
+ id: /* @__PURE__ */ x(/* @__PURE__ */ w()),
499
+ label: /* @__PURE__ */ x(D),
500
+ maxConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ b()),
501
+ params: /* @__PURE__ */ x(/* @__PURE__ */ g(/* @__PURE__ */ S(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
502
+ }), he = /* @__PURE__ */ C({
503
503
  ...j,
504
- typeId: /* @__PURE__ */ _("connector"),
505
- actionNames: /* @__PURE__ */ h(le),
506
- category: /* @__PURE__ */ v(de),
504
+ typeId: /* @__PURE__ */ v("connector"),
505
+ actionNames: /* @__PURE__ */ g(le),
506
+ category: /* @__PURE__ */ y(de),
507
507
  categoryId: ue,
508
- implementations: /* @__PURE__ */ x(/* @__PURE__ */ C(), me),
509
- usage: /* @__PURE__ */ v(pe),
510
- usageId: /* @__PURE__ */ v(fe)
508
+ implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), me),
509
+ usage: /* @__PURE__ */ y(pe),
510
+ usageId: /* @__PURE__ */ y(fe)
511
511
  }), M = {
512
512
  abortOperation: "Abort Operation",
513
513
  auditObjectContent: "Audit Object Content",
@@ -551,17 +551,17 @@ function I(e) {
551
551
  for (let e of Object.keys(M)) n += `| ${M[e]} | ${t.has(e) ? "✓" : ""} |\n`;
552
552
  return n;
553
553
  }
554
- D(["list"]), { ...j };
555
- var L = D([
554
+ O(["list"]), { ...j };
555
+ var L = O([
556
556
  "list",
557
557
  "render",
558
558
  "setColorMode"
559
- ]), R = /* @__PURE__ */ S({
559
+ ]), R = /* @__PURE__ */ C({
560
560
  ...j,
561
- typeId: /* @__PURE__ */ _("presenter"),
562
- actionNames: /* @__PURE__ */ h(L),
563
- presentations: /* @__PURE__ */ h(ce)
564
- }), z = "code-health-reports/fallow", ge = `${z}/badge.json`, _e = `${z}/index.md`, B = "<!-- CONTRIBUTING_LICENSE_END -->", V = "<!-- CONTRIBUTING_LICENSE_START -->", ve = "<!-- GOVERNANCE_END -->", H = "<!-- GOVERNANCE_START -->", U = "<!-- QUALITY_SECURITY_END -->", W = "<!-- QUALITY_SECURITY_START -->", ye = "rust/Cargo.toml", be = [
561
+ typeId: /* @__PURE__ */ v("presenter"),
562
+ actionNames: /* @__PURE__ */ g(L),
563
+ presentations: /* @__PURE__ */ g(ce)
564
+ }), ge = /* @__PURE__ */ new Set(["@dpuse/dpuse-development", "@dpuse/eslint-config-dpuse"]), z = "code-health-reports/fallow", _e = `${z}/badge.json`, ve = `${z}/index.md`, B = "<!-- CONTRIBUTING_LICENSE_END -->", V = "<!-- CONTRIBUTING_LICENSE_START -->", ye = "<!-- GOVERNANCE_END -->", be = "<!-- GOVERNANCE_START -->", H = "<!-- QUALITY_SECURITY_END -->", U = "<!-- QUALITY_SECURITY_START -->", xe = "rust/Cargo.toml", Se = [
565
565
  {
566
566
  idPrefix: "dpuse-app",
567
567
  typeId: "app",
@@ -646,9 +646,9 @@ var L = D([
646
646
  publishedTo: "github",
647
647
  uploadGroupName: void 0
648
648
  }
649
- ], xe = n(r);
650
- async function Se(n, r) {
651
- n !== void 0 && X(`${n} - clear(${r})`);
649
+ ], Ce = n(r);
650
+ async function we(n, r) {
651
+ n !== void 0 && Y(`${n} - clear(${r})`);
652
652
  let i;
653
653
  try {
654
654
  i = await e.readdir(r, { withFileTypes: !0 });
@@ -668,16 +668,16 @@ async function Se(n, r) {
668
668
  }
669
669
  }));
670
670
  }
671
- async function Ce(t, n) {
671
+ async function Te(t, n) {
672
672
  return e.readdir(t, n);
673
673
  }
674
- async function we(t, n, r, i) {
675
- t !== void 0 && X(`${t} - exec(${n} ${r.join(" ")})`);
676
- let { stdout: a, stderr: o } = await xe(n, r);
674
+ async function Ee(t, n, r, i) {
675
+ t !== void 0 && Y(`${t} - exec(${n} ${r.join(" ")})`);
676
+ let { stdout: a, stderr: o } = await Ce(n, r);
677
677
  i === void 0 ? a.trim() && console.log(a.trim()) : await e.writeFile(i, a.trim(), "utf-8"), o.trim() && console.error(o.trim());
678
678
  }
679
- async function Te(e, t, n, r = !1, a = !1) {
680
- return X(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
679
+ async function De(e, t, n, r = !1, a = !1) {
680
+ return Y(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
681
681
  i(t, n, {
682
682
  shell: a,
683
683
  stdio: "inherit"
@@ -686,8 +686,8 @@ async function Te(e, t, n, r = !1, a = !1) {
686
686
  });
687
687
  });
688
688
  }
689
- async function Ee(e, t, n) {
690
- return X(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, r) => {
689
+ async function Oe(e, t, n) {
690
+ return Y(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, r) => {
691
691
  let a = i(t, n, {
692
692
  shell: !1,
693
693
  stdio: [
@@ -703,8 +703,8 @@ async function Ee(e, t, n) {
703
703
  });
704
704
  });
705
705
  }
706
- async function De(n, r, a, o, s = !1) {
707
- return X(`${n} - spawn(${r} ${a.join(" ")}) > ${o}`), new Promise((n, c) => {
706
+ async function ke(n, r, a, o, s = !1) {
707
+ return Y(`${n} - spawn(${r} ${a.join(" ")}) > ${o}`), new Promise((n, c) => {
708
708
  let l = i(r, a, {
709
709
  shell: !1,
710
710
  stdio: [
@@ -726,19 +726,19 @@ async function De(n, r, a, o, s = !1) {
726
726
  });
727
727
  });
728
728
  }
729
- async function Oe() {
730
- let e = await K("./README.md"), t = e.indexOf(H), n = e.indexOf(ve);
729
+ async function Ae() {
730
+ let e = await G("./README.md"), t = e.indexOf(be), n = e.indexOf(ye);
731
731
  if (t === -1 || n === -1) return;
732
- let r = `${W}\n${U}\n\n${V}\n${B}`;
733
- await Y("README.md", `${e.slice(0, t)}${r}${e.slice(n + 23)}`);
732
+ let r = `${U}\n${H}\n\n${V}\n${B}`;
733
+ await J("README.md", `${e.slice(0, t)}${r}${e.slice(n + 23)}`);
734
734
  }
735
- async function G(t) {
735
+ async function W(t) {
736
736
  return JSON.parse(await e.readFile(t, "utf-8"));
737
737
  }
738
- async function K(t) {
738
+ async function G(t) {
739
739
  return await e.readFile(t, "utf-8");
740
740
  }
741
- async function q(t) {
741
+ async function K(t) {
742
742
  try {
743
743
  return await e.readFile(t, "utf-8");
744
744
  } catch (e) {
@@ -746,56 +746,56 @@ async function q(t) {
746
746
  throw e;
747
747
  }
748
748
  }
749
- async function J(n, r) {
749
+ async function q(n, r) {
750
750
  await e.mkdir(t.dirname(n), { recursive: !0 }), await e.writeFile(n, `${JSON.stringify(r, void 0, 4)}\n`, "utf-8");
751
751
  }
752
- async function ke(e, t, n) {
753
- await Y("README.md", Be(await K("./README.md"), e, t, n));
752
+ async function je(e, t, n) {
753
+ await J("README.md", Ve(await G("./README.md"), e, t, n));
754
754
  }
755
- async function Y(t, n) {
755
+ async function J(t, n) {
756
756
  await e.writeFile(t, n, "utf-8");
757
757
  }
758
- function Ae(e) {
758
+ function Me(e) {
759
759
  console.info("\x1B[36m────────────────────────────────────────────────────────────────────────────────"), console.info(`▶️ ${e}`);
760
760
  }
761
- function je(e) {
761
+ function Ne(e) {
762
762
  console.info(`✅ ${e}`);
763
763
  }
764
- function X(e) {
764
+ function Y(e) {
765
765
  console.info(e);
766
766
  }
767
- function Me(e) {
768
- let t = be.find((t) => e.startsWith(t.idPrefix));
767
+ function Pe(e) {
768
+ let t = Se.find((t) => e.startsWith(t.idPrefix));
769
769
  if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
770
770
  return t;
771
771
  }
772
- function Ne(e, t) {
772
+ function Fe(e, t) {
773
773
  let n = e.repository, r = typeof n == "string" ? n : n?.url;
774
774
  if (r == null || r === "") throw Error(`package.json 'repository' field is required to ${t}.`);
775
775
  let i = r.replace(/^git\+/, "").replace(/\.git$/, ""), a = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(i);
776
776
  if (a?.[1] == null || a[2] == null) throw Error(`Unable to parse GitHub owner/repo from '${r}'.`);
777
777
  return {
778
778
  owner: a[1],
779
- repo: a[2]
779
+ repository: a[2]
780
780
  };
781
781
  }
782
- async function Pe(t) {
782
+ async function Ie(t) {
783
783
  return await e.stat(t);
784
784
  }
785
- async function Fe(e, t, n) {
785
+ async function Le(e, t, n) {
786
786
  switch (n.typeId) {
787
- case "connector": return await Le(e, t);
788
- case "presenter": return await Re(e, t);
789
- default: return await ze(e, t);
787
+ case "connector": return await Re(e, t);
788
+ case "presenter": return await ze(e, t);
789
+ default: return await Be(e, t);
790
790
  }
791
791
  }
792
- async function Ie(e, t, n = "./") {
793
- if (X(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
792
+ async function X(e, t, n = "./") {
793
+ if (Y(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
794
794
  else {
795
795
  let e = t.version, n = t.version.split(".");
796
796
  t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
797
797
  }
798
- await J(`${n}package.json`, t);
798
+ await q(`${n}package.json`, t);
799
799
  }
800
800
  async function Z(e) {
801
801
  let { default: t } = await import("typescript"), n = t.createSourceFile("index.ts", e, t.ScriptTarget.Latest, !0), r = [], i = (e) => {
@@ -803,26 +803,26 @@ async function Z(e) {
803
803
  };
804
804
  return i(n), r;
805
805
  }
806
- async function Le(e, t) {
807
- X(`${e} Build connector project configuration`);
808
- let [n, r] = await Promise.all([G("config.json"), K("src/index.ts")]), i = /* @__PURE__ */ s(he, n);
806
+ async function Re(e, t) {
807
+ Y(`${e} Build connector project configuration`);
808
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ s(he, n);
809
809
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
810
810
  let a = await Z(r);
811
811
  return await Q(t, n, a, F(a));
812
812
  }
813
- async function Re(e, t) {
814
- X(`${e} Build presenter project configuration`);
815
- let [n, r] = await Promise.all([G("config.json"), K("src/index.ts")]), i = /* @__PURE__ */ s(R, n);
813
+ async function ze(e, t) {
814
+ Y(`${e} Build presenter project configuration`);
815
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ s(R, n);
816
816
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
817
817
  return await Q(t, n, await Z(r));
818
818
  }
819
- async function ze(e, t) {
820
- X(`${e} Build project configuration`);
821
- let n = await G("config.json");
822
- return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await q("logo.svg"), n.iconDark ??= await q("logoDark.svg"), await J("config.json", $(n)), n;
819
+ async function Be(e, t) {
820
+ Y(`${e} Build project configuration`);
821
+ let n = await W("config.json");
822
+ 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;
823
823
  }
824
824
  async function Q(e, t, n, r) {
825
- 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 J("config.json", $(t)), t;
825
+ 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;
826
826
  }
827
827
  function $(e) {
828
828
  let t = [
@@ -832,11 +832,11 @@ function $(e) {
832
832
  ], 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" }));
833
833
  return Object.fromEntries([...r, ...i]);
834
834
  }
835
- function Be(e, t, n, r) {
835
+ function Ve(e, t, n, r) {
836
836
  let i = e.indexOf(n), a = e.indexOf(r);
837
837
  if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
838
838
  let o = t.trim();
839
839
  return `${e.slice(0, Math.max(0, i + n.length))}\n\n${o}\n\n${e.slice(Math.max(0, a))}`;
840
840
  }
841
841
  //#endregion
842
- export { F as A, Ne as C, J as D, De as E, ke as O, q as S, Ee as T, je as _, _e as a, G as b, ye as c, Se as d, we as f, Ae as g, Pe as h, z as i, I as j, Y as k, Fe as l, Me as m, V as n, U as o, Ce as p, ge as r, W as s, B as t, Ie as u, X as v, Te as w, K as x, Oe as y };
842
+ export { J as A, K as C, ke as D, Oe as E, I as M, q as O, G as S, De as T, Me as _, z as a, Ae as b, U as c, X as d, we as f, Ie as g, Pe as h, _e as i, F as j, je as k, xe as l, Te as m, V as n, ve as o, Ee as p, ge as r, H as s, B as t, Le as u, Ne as v, Fe as w, W as x, Y as y };