@dpuse/dpuse-development 0.3.783 → 0.3.788
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/README.md +60 -59
- package/dist/apiReference-CDT825AK.js +197 -0
- package/dist/apiReference-CDT825AK.js.map +1 -0
- package/dist/dpuse-development.es.js +412 -7045
- package/dist/dpuse-development.es.js.map +1 -1
- package/dist/types/src/utilities/apiReference.d.ts +1 -0
- package/dist/types/src/utilities/index.d.ts +2 -2
- package/dist/utilities-CPg6O2rR.js +819 -0
- package/dist/utilities-CPg6O2rR.js.map +1 -0
- package/package.json +6 -3
|
@@ -0,0 +1,819 @@
|
|
|
1
|
+
import { promises as e } from "node:fs";
|
|
2
|
+
import t from "node:path";
|
|
3
|
+
import { promisify as n } from "node:util";
|
|
4
|
+
import { execFile as r, spawn as i } from "node:child_process";
|
|
5
|
+
//#region node_modules/valibot/dist/index.mjs
|
|
6
|
+
var a = {
|
|
7
|
+
lang: void 0,
|
|
8
|
+
message: void 0,
|
|
9
|
+
abortEarly: void 0,
|
|
10
|
+
abortPipeEarly: void 0
|
|
11
|
+
};
|
|
12
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
13
|
+
function o(e) {
|
|
14
|
+
return e ? {
|
|
15
|
+
lang: e?.lang ?? void 0,
|
|
16
|
+
message: e?.message,
|
|
17
|
+
abortEarly: e?.abortEarly ?? void 0,
|
|
18
|
+
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
19
|
+
} : a;
|
|
20
|
+
}
|
|
21
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
22
|
+
function s(e, t, n) {
|
|
23
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ o(n));
|
|
24
|
+
return {
|
|
25
|
+
typed: r.typed,
|
|
26
|
+
success: !r.issues,
|
|
27
|
+
output: r.value,
|
|
28
|
+
issues: r.issues
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DT3mO5rS.js
|
|
33
|
+
var c = {
|
|
34
|
+
lang: void 0,
|
|
35
|
+
message: void 0,
|
|
36
|
+
abortEarly: void 0,
|
|
37
|
+
abortPipeEarly: void 0
|
|
38
|
+
};
|
|
39
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
40
|
+
function l(e) {
|
|
41
|
+
return e ? {
|
|
42
|
+
lang: e?.lang ?? void 0,
|
|
43
|
+
message: e?.message,
|
|
44
|
+
abortEarly: e?.abortEarly ?? void 0,
|
|
45
|
+
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
46
|
+
} : c;
|
|
47
|
+
}
|
|
48
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
49
|
+
function u(e) {
|
|
50
|
+
let t = typeof e;
|
|
51
|
+
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
52
|
+
}
|
|
53
|
+
function d(e, t, n, r, i) {
|
|
54
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ u(a), c = {
|
|
55
|
+
kind: e.kind,
|
|
56
|
+
type: e.type,
|
|
57
|
+
input: a,
|
|
58
|
+
expected: o,
|
|
59
|
+
received: s,
|
|
60
|
+
message: `Invalid ${t}: ${o ? `Expected ${o} but r` : "R"}eceived ${s}`,
|
|
61
|
+
requirement: e.requirement,
|
|
62
|
+
path: i?.path,
|
|
63
|
+
issues: i?.issues,
|
|
64
|
+
lang: r.lang,
|
|
65
|
+
abortEarly: r.abortEarly,
|
|
66
|
+
abortPipeEarly: r.abortPipeEarly
|
|
67
|
+
}, l = e.kind === "schema", d = i?.message ?? e.message ?? (e.reference, c.lang, void 0) ?? (l ? (c.lang, void 0) : null) ?? r.message ?? (c.lang, void 0);
|
|
68
|
+
d !== void 0 && (c.message = typeof d == "function" ? d(c) : d), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
69
|
+
}
|
|
70
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
71
|
+
function ee(e, t) {
|
|
72
|
+
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
73
|
+
}
|
|
74
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
75
|
+
function te(e, t) {
|
|
76
|
+
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
77
|
+
}
|
|
78
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
79
|
+
function f(e, t) {
|
|
80
|
+
let n = [...new Set(e)];
|
|
81
|
+
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
82
|
+
}
|
|
83
|
+
function p(e) {
|
|
84
|
+
return e["~standard"] = {
|
|
85
|
+
version: 1,
|
|
86
|
+
vendor: "valibot",
|
|
87
|
+
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ l())
|
|
88
|
+
}, e;
|
|
89
|
+
}
|
|
90
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
91
|
+
function ne(e, t, n) {
|
|
92
|
+
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
93
|
+
}
|
|
94
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
95
|
+
function m(e, t, n) {
|
|
96
|
+
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
97
|
+
}
|
|
98
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
99
|
+
function h(e, t) {
|
|
100
|
+
return p({
|
|
101
|
+
kind: "schema",
|
|
102
|
+
type: "array",
|
|
103
|
+
reference: h,
|
|
104
|
+
expects: "Array",
|
|
105
|
+
async: !1,
|
|
106
|
+
item: e,
|
|
107
|
+
message: t,
|
|
108
|
+
"~run"(e, t) {
|
|
109
|
+
let n = e.value;
|
|
110
|
+
if (Array.isArray(n)) {
|
|
111
|
+
e.typed = !0, e.value = [];
|
|
112
|
+
for (let r = 0; r < n.length; r++) {
|
|
113
|
+
let i = n[r], a = this.item["~run"]({ value: i }, t);
|
|
114
|
+
if (a.issues) {
|
|
115
|
+
let o = {
|
|
116
|
+
type: "array",
|
|
117
|
+
origin: "value",
|
|
118
|
+
input: n,
|
|
119
|
+
key: r,
|
|
120
|
+
value: i
|
|
121
|
+
};
|
|
122
|
+
for (let t of a.issues) t.path ? t.path.unshift(o) : t.path = [o], e.issues?.push(t);
|
|
123
|
+
if (e.issues ||= a.issues, t.abortEarly) {
|
|
124
|
+
e.typed = !1;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
a.typed || (e.typed = !1), e.value.push(a.value);
|
|
129
|
+
}
|
|
130
|
+
} else d(this, "type", e, t);
|
|
131
|
+
return e;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
136
|
+
function g(e) {
|
|
137
|
+
return p({
|
|
138
|
+
kind: "schema",
|
|
139
|
+
type: "boolean",
|
|
140
|
+
reference: g,
|
|
141
|
+
expects: "boolean",
|
|
142
|
+
async: !1,
|
|
143
|
+
message: e,
|
|
144
|
+
"~run"(e, t) {
|
|
145
|
+
return typeof e.value == "boolean" ? e.typed = !0 : d(this, "type", e, t), e;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
150
|
+
function _(e, t) {
|
|
151
|
+
return p({
|
|
152
|
+
kind: "schema",
|
|
153
|
+
type: "literal",
|
|
154
|
+
reference: _,
|
|
155
|
+
expects: /* @__PURE__ */ u(e),
|
|
156
|
+
async: !1,
|
|
157
|
+
literal: e,
|
|
158
|
+
message: t,
|
|
159
|
+
"~run"(e, t) {
|
|
160
|
+
return /* @__PURE__ */ ee(e.value, this.literal) ? e.typed = !0 : d(this, "type", e, t), e;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
165
|
+
function v(e, t) {
|
|
166
|
+
return p({
|
|
167
|
+
kind: "schema",
|
|
168
|
+
type: "nullable",
|
|
169
|
+
reference: v,
|
|
170
|
+
expects: `(${e.expects} | null)`,
|
|
171
|
+
async: !1,
|
|
172
|
+
wrapped: e,
|
|
173
|
+
default: t,
|
|
174
|
+
"~run"(e, t) {
|
|
175
|
+
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);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
180
|
+
function y(e) {
|
|
181
|
+
return p({
|
|
182
|
+
kind: "schema",
|
|
183
|
+
type: "number",
|
|
184
|
+
reference: y,
|
|
185
|
+
expects: "number",
|
|
186
|
+
async: !1,
|
|
187
|
+
message: e,
|
|
188
|
+
"~run"(e, t) {
|
|
189
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : d(this, "type", e, t), e;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
194
|
+
function b(e, t) {
|
|
195
|
+
return p({
|
|
196
|
+
kind: "schema",
|
|
197
|
+
type: "optional",
|
|
198
|
+
reference: b,
|
|
199
|
+
expects: `(${e.expects} | undefined)`,
|
|
200
|
+
async: !1,
|
|
201
|
+
wrapped: e,
|
|
202
|
+
default: t,
|
|
203
|
+
"~run"(e, t) {
|
|
204
|
+
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);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
209
|
+
function x(e, t, n) {
|
|
210
|
+
return p({
|
|
211
|
+
kind: "schema",
|
|
212
|
+
type: "record",
|
|
213
|
+
reference: x,
|
|
214
|
+
expects: "Object",
|
|
215
|
+
async: !1,
|
|
216
|
+
key: e,
|
|
217
|
+
value: t,
|
|
218
|
+
message: n,
|
|
219
|
+
"~run"(e, t) {
|
|
220
|
+
let n = e.value;
|
|
221
|
+
if (n && typeof n == "object") {
|
|
222
|
+
e.typed = !0, e.value = {};
|
|
223
|
+
for (let r in n) if (/* @__PURE__ */ te(n, r)) {
|
|
224
|
+
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
225
|
+
if (a.issues) {
|
|
226
|
+
let o = {
|
|
227
|
+
type: "object",
|
|
228
|
+
origin: "key",
|
|
229
|
+
input: n,
|
|
230
|
+
key: r,
|
|
231
|
+
value: i
|
|
232
|
+
};
|
|
233
|
+
for (let t of a.issues) t.path = [o], e.issues?.push(t);
|
|
234
|
+
if (e.issues ||= a.issues, t.abortEarly) {
|
|
235
|
+
e.typed = !1;
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
let o = this.value["~run"]({ value: i }, t);
|
|
240
|
+
if (o.issues) {
|
|
241
|
+
let a = {
|
|
242
|
+
type: "object",
|
|
243
|
+
origin: "value",
|
|
244
|
+
input: n,
|
|
245
|
+
key: r,
|
|
246
|
+
value: i
|
|
247
|
+
};
|
|
248
|
+
for (let t of o.issues) t.path ? t.path.unshift(a) : t.path = [a], e.issues?.push(t);
|
|
249
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
250
|
+
e.typed = !1;
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
(!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
|
|
255
|
+
}
|
|
256
|
+
} else d(this, "type", e, t);
|
|
257
|
+
return e;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
262
|
+
function S(e, t) {
|
|
263
|
+
return p({
|
|
264
|
+
kind: "schema",
|
|
265
|
+
type: "strict_object",
|
|
266
|
+
reference: S,
|
|
267
|
+
expects: "Object",
|
|
268
|
+
async: !1,
|
|
269
|
+
entries: e,
|
|
270
|
+
message: t,
|
|
271
|
+
"~run"(e, t) {
|
|
272
|
+
let n = e.value;
|
|
273
|
+
if (n && typeof n == "object") {
|
|
274
|
+
e.typed = !0, e.value = {};
|
|
275
|
+
for (let r in this.entries) {
|
|
276
|
+
let i = this.entries[r];
|
|
277
|
+
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
278
|
+
let a = r in n ? n[r] : /* @__PURE__ */ m(i), o = i["~run"]({ value: a }, t);
|
|
279
|
+
if (o.issues) {
|
|
280
|
+
let i = {
|
|
281
|
+
type: "object",
|
|
282
|
+
origin: "value",
|
|
283
|
+
input: n,
|
|
284
|
+
key: r,
|
|
285
|
+
value: a
|
|
286
|
+
};
|
|
287
|
+
for (let t of o.issues) t.path ? t.path.unshift(i) : t.path = [i], e.issues?.push(t);
|
|
288
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
289
|
+
e.typed = !1;
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
294
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ne(i);
|
|
295
|
+
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (d(this, "key", e, t, {
|
|
296
|
+
input: void 0,
|
|
297
|
+
expected: `"${r}"`,
|
|
298
|
+
path: [{
|
|
299
|
+
type: "object",
|
|
300
|
+
origin: "key",
|
|
301
|
+
input: n,
|
|
302
|
+
key: r,
|
|
303
|
+
value: n[r]
|
|
304
|
+
}]
|
|
305
|
+
}), t.abortEarly)) break;
|
|
306
|
+
}
|
|
307
|
+
if (!e.issues || !t.abortEarly) {
|
|
308
|
+
for (let r in n) if (!Object.prototype.hasOwnProperty.call(this.entries, r)) {
|
|
309
|
+
d(this, "key", e, t, {
|
|
310
|
+
input: r,
|
|
311
|
+
expected: "never",
|
|
312
|
+
path: [{
|
|
313
|
+
type: "object",
|
|
314
|
+
origin: "key",
|
|
315
|
+
input: n,
|
|
316
|
+
key: r,
|
|
317
|
+
value: n[r]
|
|
318
|
+
}]
|
|
319
|
+
});
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
} else d(this, "type", e, t);
|
|
324
|
+
return e;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
329
|
+
function C(e) {
|
|
330
|
+
return p({
|
|
331
|
+
kind: "schema",
|
|
332
|
+
type: "string",
|
|
333
|
+
reference: C,
|
|
334
|
+
expects: "string",
|
|
335
|
+
async: !1,
|
|
336
|
+
message: e,
|
|
337
|
+
"~run"(e, t) {
|
|
338
|
+
return typeof e.value == "string" ? e.typed = !0 : d(this, "type", e, t), e;
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
343
|
+
function w(e) {
|
|
344
|
+
let t;
|
|
345
|
+
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
346
|
+
else t = n.issues;
|
|
347
|
+
return t;
|
|
348
|
+
}
|
|
349
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
350
|
+
function T(e, t) {
|
|
351
|
+
return p({
|
|
352
|
+
kind: "schema",
|
|
353
|
+
type: "union",
|
|
354
|
+
reference: T,
|
|
355
|
+
expects: /* @__PURE__ */ f(e.map((e) => e.expects), "|"),
|
|
356
|
+
async: !1,
|
|
357
|
+
options: e,
|
|
358
|
+
message: t,
|
|
359
|
+
"~run"(e, t) {
|
|
360
|
+
let n, r, i;
|
|
361
|
+
for (let a of this.options) {
|
|
362
|
+
let o = a["~run"]({ value: e.value }, t);
|
|
363
|
+
if (o.typed) {
|
|
364
|
+
if (o.issues) r ? r.push(o) : r = [o];
|
|
365
|
+
else {
|
|
366
|
+
n = o;
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
} else i ? i.push(o) : i = [o];
|
|
370
|
+
}
|
|
371
|
+
if (n) return n;
|
|
372
|
+
if (r) {
|
|
373
|
+
if (r.length === 1) return r[0];
|
|
374
|
+
d(this, "type", e, t, { issues: /* @__PURE__ */ w(r) }), e.typed = !0;
|
|
375
|
+
} else if (i?.length === 1) return i[0];
|
|
376
|
+
else d(this, "type", e, t, { issues: /* @__PURE__ */ w(i) });
|
|
377
|
+
return e;
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
var E = /* @__PURE__ */ S({
|
|
382
|
+
en: /* @__PURE__ */ C(),
|
|
383
|
+
es: /* @__PURE__ */ C()
|
|
384
|
+
}), D = {
|
|
385
|
+
id: /* @__PURE__ */ C(),
|
|
386
|
+
label: /* @__PURE__ */ S({
|
|
387
|
+
en: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
388
|
+
es: /* @__PURE__ */ b(/* @__PURE__ */ C())
|
|
389
|
+
}),
|
|
390
|
+
description: /* @__PURE__ */ S({
|
|
391
|
+
en: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
392
|
+
es: /* @__PURE__ */ b(/* @__PURE__ */ C())
|
|
393
|
+
}),
|
|
394
|
+
icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
395
|
+
iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C())
|
|
396
|
+
}, O = (e) => /* @__PURE__ */ T(e.map((e) => /* @__PURE__ */ _(e))), k = O([
|
|
397
|
+
"app",
|
|
398
|
+
"connector",
|
|
399
|
+
"connectorConnection",
|
|
400
|
+
"context",
|
|
401
|
+
"contextArea",
|
|
402
|
+
"contextModel",
|
|
403
|
+
"contextModelDimension",
|
|
404
|
+
"contextModelDimensionHierarchy",
|
|
405
|
+
"contextModelEntity",
|
|
406
|
+
"contextModelEntityDataItem",
|
|
407
|
+
"contextModelEntityEvent",
|
|
408
|
+
"contextModelEntityPrimaryMeasure",
|
|
409
|
+
"contextModelSecondaryMeasure",
|
|
410
|
+
"cookbook",
|
|
411
|
+
"cookbookRecipe",
|
|
412
|
+
"dataView",
|
|
413
|
+
"engine",
|
|
414
|
+
"eventQuery",
|
|
415
|
+
"presenter",
|
|
416
|
+
"presenterPresentation",
|
|
417
|
+
"tool"
|
|
418
|
+
]), re = O([
|
|
419
|
+
"danger",
|
|
420
|
+
"success",
|
|
421
|
+
"warning"
|
|
422
|
+
]), ie = O([
|
|
423
|
+
"alpha",
|
|
424
|
+
"beta",
|
|
425
|
+
"releaseCandidate",
|
|
426
|
+
"generalAvailability"
|
|
427
|
+
]), ae = /* @__PURE__ */ S({
|
|
428
|
+
color: re,
|
|
429
|
+
label: /* @__PURE__ */ C()
|
|
430
|
+
}), A = {
|
|
431
|
+
...D,
|
|
432
|
+
typeId: k
|
|
433
|
+
}, oe = /* @__PURE__ */ S({
|
|
434
|
+
...A,
|
|
435
|
+
order: /* @__PURE__ */ y(),
|
|
436
|
+
path: /* @__PURE__ */ C()
|
|
437
|
+
}), j = {
|
|
438
|
+
...A,
|
|
439
|
+
firstCreatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
440
|
+
lastUpdatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
441
|
+
status: /* @__PURE__ */ v(ae),
|
|
442
|
+
statusId: /* @__PURE__ */ v(ie)
|
|
443
|
+
};
|
|
444
|
+
({ ...j }), O([
|
|
445
|
+
"app",
|
|
446
|
+
"engine",
|
|
447
|
+
"connector",
|
|
448
|
+
"cookbook",
|
|
449
|
+
"presenter",
|
|
450
|
+
"tool"
|
|
451
|
+
]);
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-aYmFWSrn.js
|
|
454
|
+
var M = {
|
|
455
|
+
...j,
|
|
456
|
+
vendorAccountURL: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
457
|
+
vendorDocumentationURL: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
458
|
+
vendorHomeURL: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
459
|
+
version: /* @__PURE__ */ C()
|
|
460
|
+
};
|
|
461
|
+
({ ...M });
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
464
|
+
var se = O([
|
|
465
|
+
"abortOperation",
|
|
466
|
+
"auditObjectContent",
|
|
467
|
+
"createObject",
|
|
468
|
+
"describeConnection",
|
|
469
|
+
"dropObject",
|
|
470
|
+
"findObject",
|
|
471
|
+
"getInfo",
|
|
472
|
+
"getReadableStream",
|
|
473
|
+
"getRecord",
|
|
474
|
+
"listNodes",
|
|
475
|
+
"previewObject",
|
|
476
|
+
"removeRecords",
|
|
477
|
+
"retrieveChunks",
|
|
478
|
+
"retrieveRecords",
|
|
479
|
+
"upsertRecords"
|
|
480
|
+
]), ce = O([
|
|
481
|
+
"application",
|
|
482
|
+
"curatedDataset",
|
|
483
|
+
"database",
|
|
484
|
+
"fileStore"
|
|
485
|
+
]), le = /* @__PURE__ */ S({ label: E }), ue = O([
|
|
486
|
+
"bidirectional",
|
|
487
|
+
"destination",
|
|
488
|
+
"source",
|
|
489
|
+
"unknown"
|
|
490
|
+
]), de = /* @__PURE__ */ S({ label: E }), fe = /* @__PURE__ */ S({
|
|
491
|
+
authMethodId: O([
|
|
492
|
+
"apiKey",
|
|
493
|
+
"disabled",
|
|
494
|
+
"oAuth2",
|
|
495
|
+
"none"
|
|
496
|
+
]),
|
|
497
|
+
activeConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ y()),
|
|
498
|
+
canDescribe: /* @__PURE__ */ b(/* @__PURE__ */ g()),
|
|
499
|
+
id: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
500
|
+
label: /* @__PURE__ */ b(E),
|
|
501
|
+
maxConnectionCount: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
502
|
+
params: /* @__PURE__ */ b(/* @__PURE__ */ h(/* @__PURE__ */ x(/* @__PURE__ */ C(), /* @__PURE__ */ C())))
|
|
503
|
+
}), pe = /* @__PURE__ */ S({
|
|
504
|
+
...M,
|
|
505
|
+
typeId: /* @__PURE__ */ _("connector"),
|
|
506
|
+
actionNames: /* @__PURE__ */ h(se),
|
|
507
|
+
category: /* @__PURE__ */ v(le),
|
|
508
|
+
categoryId: ce,
|
|
509
|
+
implementations: /* @__PURE__ */ x(/* @__PURE__ */ C(), fe),
|
|
510
|
+
usage: /* @__PURE__ */ v(de),
|
|
511
|
+
usageId: /* @__PURE__ */ v(ue)
|
|
512
|
+
}), N = {
|
|
513
|
+
abortOperation: "Abort Operation",
|
|
514
|
+
auditObjectContent: "Audit Object Content",
|
|
515
|
+
createObject: "Create Object",
|
|
516
|
+
describeConnection: "Describe Connection",
|
|
517
|
+
dropObject: "Drop Object",
|
|
518
|
+
findObject: "Find Object",
|
|
519
|
+
getInfo: "Get Info",
|
|
520
|
+
getReadableStream: "Get Readable Stream",
|
|
521
|
+
getRecord: "Get Record",
|
|
522
|
+
listNodes: "List Nodes",
|
|
523
|
+
previewObject: "Preview Object",
|
|
524
|
+
removeRecords: "Remove Records",
|
|
525
|
+
retrieveChunks: "Retrieve Chunks",
|
|
526
|
+
retrieveRecords: "Retrieve Records",
|
|
527
|
+
upsertRecords: "Upsert Records"
|
|
528
|
+
}, P = /* @__PURE__ */ new Set([
|
|
529
|
+
"createObject",
|
|
530
|
+
"dropObject",
|
|
531
|
+
"removeRecords",
|
|
532
|
+
"upsertRecords"
|
|
533
|
+
]), F = /* @__PURE__ */ new Set([
|
|
534
|
+
"auditObjectContent",
|
|
535
|
+
"findObject",
|
|
536
|
+
"getInfo",
|
|
537
|
+
"getReadableStream",
|
|
538
|
+
"getRecord",
|
|
539
|
+
"listNodes",
|
|
540
|
+
"previewObject",
|
|
541
|
+
"retrieveChunks",
|
|
542
|
+
"retrieveRecords"
|
|
543
|
+
]);
|
|
544
|
+
function I(e) {
|
|
545
|
+
let t = !1, n = !1;
|
|
546
|
+
for (let r of e) F.has(r) && (t = !0), P.has(r) && (n = !0);
|
|
547
|
+
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
548
|
+
}
|
|
549
|
+
function L(e) {
|
|
550
|
+
let t = new Set(e), n = "|Action|Supported|\n";
|
|
551
|
+
n += "|:----|:-------:|\n";
|
|
552
|
+
for (let e of Object.keys(N)) n += `| ${N[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
553
|
+
return n;
|
|
554
|
+
}
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
|
|
557
|
+
var R = O([
|
|
558
|
+
"list",
|
|
559
|
+
"render",
|
|
560
|
+
"setColorMode"
|
|
561
|
+
]), z = /* @__PURE__ */ S({
|
|
562
|
+
...M,
|
|
563
|
+
typeId: /* @__PURE__ */ _("presenter"),
|
|
564
|
+
actionNames: /* @__PURE__ */ h(R),
|
|
565
|
+
presentations: /* @__PURE__ */ h(oe)
|
|
566
|
+
}), B = "code-health-reports/fallow", me = `${B}/badge.json`, he = `${B}/index.md`, V = "<!-- CONTRIBUTING_LICENSE_END -->", H = "<!-- CONTRIBUTING_LICENSE_START -->", ge = "<!-- GOVERNANCE_END -->", _e = "<!-- GOVERNANCE_START -->", U = "<!-- QUALITY_SECURITY_END -->", W = "<!-- QUALITY_SECURITY_START -->", ve = [
|
|
567
|
+
{
|
|
568
|
+
idPrefix: "dpuse-app",
|
|
569
|
+
typeId: "app",
|
|
570
|
+
publishedTo: "app",
|
|
571
|
+
uploadGroupName: void 0
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
idPrefix: "dpuse-api",
|
|
575
|
+
typeId: "api",
|
|
576
|
+
publishedTo: "api",
|
|
577
|
+
uploadGroupName: void 0
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
idPrefix: "dpuse-connector",
|
|
581
|
+
typeId: "connector",
|
|
582
|
+
publishedTo: "dpuse",
|
|
583
|
+
uploadGroupName: "connectors"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
idPrefix: "dpuse-context",
|
|
587
|
+
typeId: "context",
|
|
588
|
+
publishedTo: "dpuse",
|
|
589
|
+
uploadGroupName: "contexts"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
idPrefix: "dpuse-development",
|
|
593
|
+
typeId: "development",
|
|
594
|
+
publishedTo: "npm",
|
|
595
|
+
uploadGroupName: void 0
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
idPrefix: "dpuse-engine",
|
|
599
|
+
typeId: "engine",
|
|
600
|
+
publishedTo: "dpuse",
|
|
601
|
+
uploadGroupName: "engine"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
idPrefix: "dpuse-kb",
|
|
605
|
+
typeId: "kb",
|
|
606
|
+
publishedTo: "kb",
|
|
607
|
+
uploadGroupName: void 0
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
idPrefix: "dpuse-presenter",
|
|
611
|
+
typeId: "presenter",
|
|
612
|
+
publishedTo: "dpuse",
|
|
613
|
+
uploadGroupName: "presenters"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
idPrefix: "dpuse-cookbook",
|
|
617
|
+
typeId: "cookbook",
|
|
618
|
+
publishedTo: "dpuse",
|
|
619
|
+
uploadGroupName: "cookbooks"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
idPrefix: "dpuse-resources",
|
|
623
|
+
typeId: "resources",
|
|
624
|
+
publishedTo: "sampleData",
|
|
625
|
+
uploadGroupName: void 0
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
idPrefix: "dpuse-shared",
|
|
629
|
+
typeId: "shared",
|
|
630
|
+
publishedTo: "npm",
|
|
631
|
+
uploadGroupName: void 0
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
idPrefix: "dpuse-tool",
|
|
635
|
+
typeId: "tool",
|
|
636
|
+
publishedTo: "npm",
|
|
637
|
+
uploadGroupName: "tools"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
idPrefix: "eslint-config-dpuse",
|
|
641
|
+
typeId: "eslint",
|
|
642
|
+
publishedTo: "npm",
|
|
643
|
+
uploadGroupName: void 0
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
idPrefix: "github",
|
|
647
|
+
typeId: "github",
|
|
648
|
+
publishedTo: "github",
|
|
649
|
+
uploadGroupName: void 0
|
|
650
|
+
}
|
|
651
|
+
], ye = n(r);
|
|
652
|
+
async function be(n, r) {
|
|
653
|
+
n !== void 0 && X(`${n} - clear(${r})`);
|
|
654
|
+
let i;
|
|
655
|
+
try {
|
|
656
|
+
i = await e.readdir(r, { withFileTypes: !0 });
|
|
657
|
+
} catch (e) {
|
|
658
|
+
if (e.code === "ENOENT") return;
|
|
659
|
+
throw e;
|
|
660
|
+
}
|
|
661
|
+
await Promise.all(i.map(async (n) => {
|
|
662
|
+
let i = t.join(r, n.name);
|
|
663
|
+
try {
|
|
664
|
+
await e.rm(i, {
|
|
665
|
+
recursive: !0,
|
|
666
|
+
force: !0
|
|
667
|
+
});
|
|
668
|
+
} catch (e) {
|
|
669
|
+
if (e.code !== "ENOENT") throw e;
|
|
670
|
+
}
|
|
671
|
+
}));
|
|
672
|
+
}
|
|
673
|
+
async function xe(t, n) {
|
|
674
|
+
return e.readdir(t, n);
|
|
675
|
+
}
|
|
676
|
+
async function Se(t, n, r, i) {
|
|
677
|
+
t !== void 0 && X(`${t} - exec(${n} ${r.join(" ")})`);
|
|
678
|
+
let { stdout: a, stderr: o } = await ye(n, r);
|
|
679
|
+
i === void 0 ? a.trim() && console.log(a.trim()) : await e.writeFile(i, a.trim(), "utf-8"), o.trim() && console.error(o.trim());
|
|
680
|
+
}
|
|
681
|
+
async function Ce(e, t, n, r = !1, a = !1) {
|
|
682
|
+
return X(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
|
|
683
|
+
i(t, n, {
|
|
684
|
+
shell: a,
|
|
685
|
+
stdio: "inherit"
|
|
686
|
+
}).on("close", (n) => {
|
|
687
|
+
n === 0 || r ? e() : o(/* @__PURE__ */ Error(`${t} exited with code ${String(n ?? "unknown")}`));
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
async function we(n, r, a, o, s = !1) {
|
|
692
|
+
return X(`${n} - spawn(${r} ${a.join(" ")}) > ${o}`), new Promise((n, c) => {
|
|
693
|
+
let l = i(r, a, {
|
|
694
|
+
shell: !1,
|
|
695
|
+
stdio: [
|
|
696
|
+
"inherit",
|
|
697
|
+
"pipe",
|
|
698
|
+
"inherit"
|
|
699
|
+
]
|
|
700
|
+
}), u = "";
|
|
701
|
+
l.stdout.on("data", (e) => {
|
|
702
|
+
u += String(e);
|
|
703
|
+
}), l.on("close", (i) => {
|
|
704
|
+
i === 0 || s ? (async () => {
|
|
705
|
+
try {
|
|
706
|
+
await e.mkdir(t.dirname(o), { recursive: !0 }), await e.writeFile(o, u, "utf-8"), n();
|
|
707
|
+
} catch (e) {
|
|
708
|
+
c(e instanceof Error ? e : Error(String(e)));
|
|
709
|
+
}
|
|
710
|
+
})() : c(/* @__PURE__ */ Error(`${r} exited with code ${String(i ?? "unknown")}`));
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
async function Te() {
|
|
715
|
+
let e = await K("./README.md"), t = e.indexOf(_e), n = e.indexOf(ge);
|
|
716
|
+
if (t === -1 || n === -1) return;
|
|
717
|
+
let r = `${W}\n${U}\n\n${H}\n${V}`;
|
|
718
|
+
await Y("README.md", `${e.slice(0, t)}${r}${e.slice(n + 23)}`);
|
|
719
|
+
}
|
|
720
|
+
async function G(t) {
|
|
721
|
+
return JSON.parse(await e.readFile(t, "utf-8"));
|
|
722
|
+
}
|
|
723
|
+
async function K(t) {
|
|
724
|
+
return await e.readFile(t, "utf-8");
|
|
725
|
+
}
|
|
726
|
+
async function q(t) {
|
|
727
|
+
try {
|
|
728
|
+
return await e.readFile(t, "utf-8");
|
|
729
|
+
} catch (e) {
|
|
730
|
+
if (e.code === "ENOENT") return null;
|
|
731
|
+
throw e;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
async function J(n, r) {
|
|
735
|
+
await e.mkdir(t.dirname(n), { recursive: !0 }), await e.writeFile(n, `${JSON.stringify(r, void 0, 4)}\n`, "utf-8");
|
|
736
|
+
}
|
|
737
|
+
async function Ee(e, t, n) {
|
|
738
|
+
await Y("README.md", Ie(await K("./README.md"), e, t, n));
|
|
739
|
+
}
|
|
740
|
+
async function Y(t, n) {
|
|
741
|
+
await e.writeFile(t, n, "utf-8");
|
|
742
|
+
}
|
|
743
|
+
function De(e) {
|
|
744
|
+
console.info("\x1B[36m────────────────────────────────────────────────────────────────────────────────"), console.info(`▶️ ${e}[0m`);
|
|
745
|
+
}
|
|
746
|
+
function Oe(e) {
|
|
747
|
+
console.info(`✅ ${e}`);
|
|
748
|
+
}
|
|
749
|
+
function X(e) {
|
|
750
|
+
console.info(e);
|
|
751
|
+
}
|
|
752
|
+
function ke(e) {
|
|
753
|
+
let t = ve.find((t) => e.startsWith(t.idPrefix));
|
|
754
|
+
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
755
|
+
return t;
|
|
756
|
+
}
|
|
757
|
+
function Z(e, t) {
|
|
758
|
+
let n = e.repository, r = typeof n == "string" ? n : n?.url;
|
|
759
|
+
if (r == null || r === "") throw Error(`package.json 'repository' field is required to ${t}.`);
|
|
760
|
+
let i = r.replace(/^git\+/, "").replace(/\.git$/, ""), a = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(i);
|
|
761
|
+
if (a?.[1] == null || a[2] == null) throw Error(`Unable to parse GitHub owner/repo from '${r}'.`);
|
|
762
|
+
return {
|
|
763
|
+
owner: a[1],
|
|
764
|
+
repo: a[2]
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
async function Ae(t) {
|
|
768
|
+
return await e.stat(t);
|
|
769
|
+
}
|
|
770
|
+
async function je(e, t, n) {
|
|
771
|
+
switch (n.typeId) {
|
|
772
|
+
case "connector": return await Ne(e, t);
|
|
773
|
+
case "presenter": return await Pe(e, t);
|
|
774
|
+
default: return await Fe(e, t);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
async function Me(e, t, n = "./") {
|
|
778
|
+
if (X(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
779
|
+
else {
|
|
780
|
+
let e = t.version, n = t.version.split(".");
|
|
781
|
+
t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
|
|
782
|
+
}
|
|
783
|
+
await J(`${n}package.json`, t);
|
|
784
|
+
}
|
|
785
|
+
async function Q(e) {
|
|
786
|
+
let { default: t } = await import("typescript"), n = t.createSourceFile("index.ts", e, t.ScriptTarget.Latest, !0), r = [], i = (e) => {
|
|
787
|
+
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);
|
|
788
|
+
};
|
|
789
|
+
return i(n), r;
|
|
790
|
+
}
|
|
791
|
+
async function Ne(e, t) {
|
|
792
|
+
X(`${e} Build connector project configuration`);
|
|
793
|
+
let [n, r] = await Promise.all([G("config.json"), K("src/index.ts")]), i = /* @__PURE__ */ s(pe, n);
|
|
794
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
795
|
+
let a = await Q(r);
|
|
796
|
+
return await $(t, n, a, I(a));
|
|
797
|
+
}
|
|
798
|
+
async function Pe(e, t) {
|
|
799
|
+
X(`${e} Build presenter project configuration`);
|
|
800
|
+
let [n, r] = await Promise.all([G("config.json"), K("src/index.ts")]), i = /* @__PURE__ */ s(z, n);
|
|
801
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
802
|
+
return await $(t, n, await Q(r));
|
|
803
|
+
}
|
|
804
|
+
async function Fe(e, t) {
|
|
805
|
+
X(`${e} Build project configuration`);
|
|
806
|
+
let n = await G("config.json");
|
|
807
|
+
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;
|
|
808
|
+
}
|
|
809
|
+
async function $(e, t, n, r) {
|
|
810
|
+
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;
|
|
811
|
+
}
|
|
812
|
+
function Ie(e, t, n, r) {
|
|
813
|
+
let i = e.indexOf(n), a = e.indexOf(r);
|
|
814
|
+
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
815
|
+
let o = t.trim();
|
|
816
|
+
return `${e.slice(0, Math.max(0, i + n.length))}\n\n${o}\n\n${e.slice(Math.max(0, a))}`;
|
|
817
|
+
}
|
|
818
|
+
//#endregion
|
|
819
|
+
export { Ce as C, Y as D, Ee as E, I as O, Z as S, J as T, X as _, he as a, K as b, je as c, Se as d, xe as f, Oe as g, De as h, B as i, L as k, Me as l, Ae as m, H as n, U as o, ke as p, me as r, W as s, V as t, be as u, Te as v, we as w, q as x, G as y };
|