@dpuse/dpuse-development 0.3.601 → 0.3.603
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 +8 -28
- package/dist/dpuse-development.es.js +194 -184
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +4 -4
|
@@ -5872,7 +5872,7 @@ async function Jn() {
|
|
|
5872
5872
|
try {
|
|
5873
5873
|
G("Check configuration files.");
|
|
5874
5874
|
let e = Hn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
|
|
5875
|
-
await Yn(t, "../", ".editorconfig"), await Yn(t, "../", ".gitattributes"), await Yn(t, "../", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Yn(t, "../", ".markdownlint.json"), await Yn(t, "../", "LICENSE"), K("Configuration files checked..");
|
|
5875
|
+
await Yn(t, "../", ".editorconfig"), await Yn(t, "../", ".gitattributes"), await Yn(t, "../", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Yn(t, "../", ".markdownlint.json"), await Yn(t, "../", ".ncurc.json"), await Yn(t, "../", "LICENSE"), await Yn(t, "../", "tsconfig.scripts.json"), await Yn(t, "../", "vitest.config.ts"), K("Configuration files checked..");
|
|
5876
5876
|
} catch (e) {
|
|
5877
5877
|
console.error("❌ Error checking configuration files.", e), process.exit(1);
|
|
5878
5878
|
}
|
|
@@ -6060,12 +6060,17 @@ function _r(e) {
|
|
|
6060
6060
|
var vr = "<!-- DEPENDENCY_LICENSES_START -->", yr = "<!-- DEPENDENCY_LICENSES_END -->", br = "<!-- DEPENDENCY_TREE_START -->", xr = "<!-- DEPENDENCY_TREE_END -->";
|
|
6061
6061
|
async function Sr(e = "MIT") {
|
|
6062
6062
|
try {
|
|
6063
|
-
G("Document Dependencies")
|
|
6063
|
+
G("Document Dependencies");
|
|
6064
6064
|
let t = await W("package.json");
|
|
6065
|
-
|
|
6065
|
+
if (t.name === "@dpuse/dpuse-development") {
|
|
6066
|
+
await Cr(), K("Dependencies documented.");
|
|
6067
|
+
return;
|
|
6068
|
+
}
|
|
6069
|
+
await Nn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
|
|
6066
6070
|
l({
|
|
6067
6071
|
start: process.cwd(),
|
|
6068
6072
|
production: !0,
|
|
6073
|
+
json: !0,
|
|
6069
6074
|
files: "licenses/downloads",
|
|
6070
6075
|
relativeModulePath: !0,
|
|
6071
6076
|
relativeLicensePath: !0,
|
|
@@ -6080,25 +6085,30 @@ async function Sr(e = "MIT") {
|
|
|
6080
6085
|
"--all",
|
|
6081
6086
|
"--json",
|
|
6082
6087
|
"--omit=dev"
|
|
6083
|
-
], "licenses/licenseTree.json"), await
|
|
6088
|
+
], "licenses/licenseTree.json"), await wr("4️⃣ "), K("Dependencies documented.");
|
|
6084
6089
|
} catch (e) {
|
|
6085
6090
|
console.error("❌ Error documenting dependencies.", e), process.exit(1);
|
|
6086
6091
|
}
|
|
6087
6092
|
}
|
|
6088
|
-
async function Cr(
|
|
6093
|
+
async function Cr() {
|
|
6094
|
+
q("1️⃣ Skip: @dpuse/dpuse-development is a development-only tool and is never part of a production release");
|
|
6095
|
+
let e = "⚠️ Dependency licenses are not documented here: @dpuse/dpuse-development is a development-only tool and is never part of a production release.";
|
|
6096
|
+
await Vn("README.md", Kn(Kn(await Rn("./README.md"), e, vr, yr), e, br, xr));
|
|
6097
|
+
}
|
|
6098
|
+
async function wr(e) {
|
|
6089
6099
|
q(`${e} Insert licenses into 'README.md'`);
|
|
6090
6100
|
let [t, n] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), r = /* @__PURE__ */ new Map();
|
|
6091
|
-
for (let [e, n] of Object.entries(t)) r.set(e,
|
|
6101
|
+
for (let [e, n] of Object.entries(t)) r.set(e, Tr(e, n));
|
|
6092
6102
|
await Promise.all(r.values().map(async (e) => {
|
|
6093
|
-
let t = await
|
|
6103
|
+
let t = await Er(e.name, e.installedVersion);
|
|
6094
6104
|
e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
|
|
6095
6105
|
}));
|
|
6096
6106
|
let i = "|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n";
|
|
6097
|
-
for (let e of r.values()) i +=
|
|
6107
|
+
for (let e of r.values()) i += Dr(e);
|
|
6098
6108
|
let a = [];
|
|
6099
|
-
n.dependencies != null &&
|
|
6109
|
+
n.dependencies != null && Or(n.dependencies, r, a, 0), await Vn("README.md", Kn(Kn(await Rn("./README.md"), i, vr, yr), a.join("\n"), br, xr));
|
|
6100
6110
|
}
|
|
6101
|
-
function
|
|
6111
|
+
function Tr(e, t) {
|
|
6102
6112
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6103
6113
|
return {
|
|
6104
6114
|
name: r,
|
|
@@ -6112,7 +6122,7 @@ function wr(e, t) {
|
|
|
6112
6122
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6113
6123
|
};
|
|
6114
6124
|
}
|
|
6115
|
-
async function
|
|
6125
|
+
async function Er(e, t) {
|
|
6116
6126
|
try {
|
|
6117
6127
|
let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
|
|
6118
6128
|
if (n.ok) {
|
|
@@ -6130,25 +6140,25 @@ async function Tr(e, t) {
|
|
|
6130
6140
|
publishedDate: ""
|
|
6131
6141
|
};
|
|
6132
6142
|
}
|
|
6133
|
-
function
|
|
6143
|
+
function Dr(e) {
|
|
6134
6144
|
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
|
|
6135
6145
|
return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
|
|
6136
6146
|
}
|
|
6137
|
-
function
|
|
6147
|
+
function Or(e, t, n, r) {
|
|
6138
6148
|
let i = " ".repeat(r);
|
|
6139
6149
|
for (let [a, o] of Object.entries(e)) {
|
|
6140
|
-
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l =
|
|
6141
|
-
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null &&
|
|
6150
|
+
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = kr(s);
|
|
6151
|
+
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Or(o.dependencies, t, n, r + 1);
|
|
6142
6152
|
}
|
|
6143
6153
|
}
|
|
6144
|
-
function
|
|
6154
|
+
function kr(e) {
|
|
6145
6155
|
if (e == null) return "";
|
|
6146
|
-
let t = e.publishedDate ?
|
|
6156
|
+
let t = e.publishedDate ? Ar(e.publishedDate.split("T", 1)[0]) : "";
|
|
6147
6157
|
if (!(e.latestVersion !== "" && e.latestVersion !== e.installedVersion)) return t === "" ? "" : ` — ${t}`;
|
|
6148
|
-
let n = e.latestPublishedDate ?
|
|
6158
|
+
let n = e.latestPublishedDate ? Ar(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
|
|
6149
6159
|
return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
|
|
6150
6160
|
}
|
|
6151
|
-
function
|
|
6161
|
+
function Ar(e) {
|
|
6152
6162
|
if (e == null || e === "") return "n/a";
|
|
6153
6163
|
let t = e.split("T", 1)[0];
|
|
6154
6164
|
if (t == null || t === "") return "n/a";
|
|
@@ -6157,43 +6167,43 @@ function kr(e) {
|
|
|
6157
6167
|
}
|
|
6158
6168
|
//#endregion
|
|
6159
6169
|
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-B7kVKqVP.js
|
|
6160
|
-
var
|
|
6170
|
+
var jr, Mr = {
|
|
6161
6171
|
lang: void 0,
|
|
6162
6172
|
message: void 0,
|
|
6163
6173
|
abortEarly: void 0,
|
|
6164
6174
|
abortPipeEarly: void 0
|
|
6165
6175
|
};
|
|
6166
6176
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6167
|
-
function
|
|
6168
|
-
return !e && !
|
|
6169
|
-
lang: e?.lang ??
|
|
6177
|
+
function Nr(e) {
|
|
6178
|
+
return !e && !jr ? Mr : {
|
|
6179
|
+
lang: e?.lang ?? jr?.lang,
|
|
6170
6180
|
message: e?.message,
|
|
6171
|
-
abortEarly: e?.abortEarly ??
|
|
6172
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
6181
|
+
abortEarly: e?.abortEarly ?? jr?.abortEarly,
|
|
6182
|
+
abortPipeEarly: e?.abortPipeEarly ?? jr?.abortPipeEarly
|
|
6173
6183
|
};
|
|
6174
6184
|
}
|
|
6175
|
-
var
|
|
6185
|
+
var Pr;
|
|
6176
6186
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6177
|
-
function
|
|
6178
|
-
return
|
|
6187
|
+
function Fr(e) {
|
|
6188
|
+
return Pr?.get(e);
|
|
6179
6189
|
}
|
|
6180
|
-
var
|
|
6190
|
+
var Ir;
|
|
6181
6191
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6182
|
-
function
|
|
6183
|
-
return
|
|
6192
|
+
function Lr(e) {
|
|
6193
|
+
return Ir?.get(e);
|
|
6184
6194
|
}
|
|
6185
|
-
var
|
|
6195
|
+
var Rr;
|
|
6186
6196
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6187
|
-
function
|
|
6188
|
-
return
|
|
6197
|
+
function zr(e, t) {
|
|
6198
|
+
return Rr?.get(e)?.get(t);
|
|
6189
6199
|
}
|
|
6190
6200
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6191
|
-
function
|
|
6201
|
+
function Br(e) {
|
|
6192
6202
|
let t = typeof e;
|
|
6193
6203
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
6194
6204
|
}
|
|
6195
6205
|
function J(e, t, n, r, i) {
|
|
6196
|
-
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */
|
|
6206
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Br(a), c = {
|
|
6197
6207
|
kind: e.kind,
|
|
6198
6208
|
type: e.type,
|
|
6199
6209
|
input: a,
|
|
@@ -6206,36 +6216,36 @@ function J(e, t, n, r, i) {
|
|
|
6206
6216
|
lang: r.lang,
|
|
6207
6217
|
abortEarly: r.abortEarly,
|
|
6208
6218
|
abortPipeEarly: r.abortPipeEarly
|
|
6209
|
-
}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */
|
|
6219
|
+
}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ zr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Lr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Fr(c.lang);
|
|
6210
6220
|
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
6211
6221
|
}
|
|
6212
|
-
var
|
|
6222
|
+
var Vr = /* @__PURE__ */ new WeakMap();
|
|
6213
6223
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6214
6224
|
function Y(e) {
|
|
6215
|
-
let t =
|
|
6225
|
+
let t = Vr.get(e);
|
|
6216
6226
|
return t || (t = {
|
|
6217
6227
|
version: 1,
|
|
6218
6228
|
vendor: "valibot",
|
|
6219
6229
|
validate(t) {
|
|
6220
|
-
return e["~run"]({ value: t }, /* @__PURE__ */
|
|
6230
|
+
return e["~run"]({ value: t }, /* @__PURE__ */ Nr());
|
|
6221
6231
|
}
|
|
6222
|
-
},
|
|
6232
|
+
}, Vr.set(e, t)), t;
|
|
6223
6233
|
}
|
|
6224
6234
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6225
|
-
function
|
|
6235
|
+
function Hr(e, t) {
|
|
6226
6236
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
6227
6237
|
}
|
|
6228
6238
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6229
|
-
function
|
|
6239
|
+
function Ur(e, t) {
|
|
6230
6240
|
let n = [...new Set(e)];
|
|
6231
6241
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
6232
6242
|
}
|
|
6233
6243
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6234
|
-
function
|
|
6244
|
+
function Wr(e, t, n) {
|
|
6235
6245
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
6236
6246
|
}
|
|
6237
6247
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6238
|
-
function
|
|
6248
|
+
function Gr(e, t, n) {
|
|
6239
6249
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
6240
6250
|
}
|
|
6241
6251
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -6279,11 +6289,11 @@ function X(e, t) {
|
|
|
6279
6289
|
};
|
|
6280
6290
|
}
|
|
6281
6291
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6282
|
-
function
|
|
6292
|
+
function Kr(e) {
|
|
6283
6293
|
return {
|
|
6284
6294
|
kind: "schema",
|
|
6285
6295
|
type: "boolean",
|
|
6286
|
-
reference:
|
|
6296
|
+
reference: Kr,
|
|
6287
6297
|
expects: "boolean",
|
|
6288
6298
|
async: !1,
|
|
6289
6299
|
message: e,
|
|
@@ -6296,12 +6306,12 @@ function Gr(e) {
|
|
|
6296
6306
|
};
|
|
6297
6307
|
}
|
|
6298
6308
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6299
|
-
function
|
|
6309
|
+
function qr(e, t) {
|
|
6300
6310
|
return {
|
|
6301
6311
|
kind: "schema",
|
|
6302
6312
|
type: "literal",
|
|
6303
|
-
reference:
|
|
6304
|
-
expects: /* @__PURE__ */
|
|
6313
|
+
reference: qr,
|
|
6314
|
+
expects: /* @__PURE__ */ Br(e),
|
|
6305
6315
|
async: !1,
|
|
6306
6316
|
literal: e,
|
|
6307
6317
|
message: t,
|
|
@@ -6327,16 +6337,16 @@ function Z(e, t) {
|
|
|
6327
6337
|
return /* @__PURE__ */ Y(this);
|
|
6328
6338
|
},
|
|
6329
6339
|
"~run"(e, t) {
|
|
6330
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6340
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ Gr(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6331
6341
|
}
|
|
6332
6342
|
};
|
|
6333
6343
|
}
|
|
6334
6344
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6335
|
-
function
|
|
6345
|
+
function Jr(e) {
|
|
6336
6346
|
return {
|
|
6337
6347
|
kind: "schema",
|
|
6338
6348
|
type: "number",
|
|
6339
|
-
reference:
|
|
6349
|
+
reference: Jr,
|
|
6340
6350
|
expects: "number",
|
|
6341
6351
|
async: !1,
|
|
6342
6352
|
message: e,
|
|
@@ -6368,7 +6378,7 @@ function Q(e, t) {
|
|
|
6368
6378
|
for (let r in this.entries) {
|
|
6369
6379
|
let i = this.entries[r];
|
|
6370
6380
|
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
6371
|
-
let a = r in n ? n[r] : /* @__PURE__ */
|
|
6381
|
+
let a = r in n ? n[r] : /* @__PURE__ */ Gr(i), o = i["~run"]({ value: a }, t);
|
|
6372
6382
|
if (o.issues) {
|
|
6373
6383
|
let i = {
|
|
6374
6384
|
type: "object",
|
|
@@ -6384,7 +6394,7 @@ function Q(e, t) {
|
|
|
6384
6394
|
}
|
|
6385
6395
|
}
|
|
6386
6396
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
6387
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
6397
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Wr(i);
|
|
6388
6398
|
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (J(this, "key", e, t, {
|
|
6389
6399
|
input: void 0,
|
|
6390
6400
|
expected: `"${r}"`,
|
|
@@ -6403,11 +6413,11 @@ function Q(e, t) {
|
|
|
6403
6413
|
};
|
|
6404
6414
|
}
|
|
6405
6415
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6406
|
-
function
|
|
6416
|
+
function Yr(e, t) {
|
|
6407
6417
|
return {
|
|
6408
6418
|
kind: "schema",
|
|
6409
6419
|
type: "optional",
|
|
6410
|
-
reference:
|
|
6420
|
+
reference: Yr,
|
|
6411
6421
|
expects: `(${e.expects} | undefined)`,
|
|
6412
6422
|
async: !1,
|
|
6413
6423
|
wrapped: e,
|
|
@@ -6416,16 +6426,16 @@ function Jr(e, t) {
|
|
|
6416
6426
|
return /* @__PURE__ */ Y(this);
|
|
6417
6427
|
},
|
|
6418
6428
|
"~run"(e, t) {
|
|
6419
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6429
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ Gr(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6420
6430
|
}
|
|
6421
6431
|
};
|
|
6422
6432
|
}
|
|
6423
6433
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6424
|
-
function
|
|
6434
|
+
function Xr(e, t, n) {
|
|
6425
6435
|
return {
|
|
6426
6436
|
kind: "schema",
|
|
6427
6437
|
type: "record",
|
|
6428
|
-
reference:
|
|
6438
|
+
reference: Xr,
|
|
6429
6439
|
expects: "Object",
|
|
6430
6440
|
async: !1,
|
|
6431
6441
|
key: e,
|
|
@@ -6438,7 +6448,7 @@ function Yr(e, t, n) {
|
|
|
6438
6448
|
let n = e.value;
|
|
6439
6449
|
if (n && typeof n == "object") {
|
|
6440
6450
|
e.typed = !0, e.value = {};
|
|
6441
|
-
for (let r in n) if (/* @__PURE__ */
|
|
6451
|
+
for (let r in n) if (/* @__PURE__ */ Hr(n, r)) {
|
|
6442
6452
|
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
6443
6453
|
if (a.issues) {
|
|
6444
6454
|
let o = {
|
|
@@ -6494,19 +6504,19 @@ function $(e) {
|
|
|
6494
6504
|
};
|
|
6495
6505
|
}
|
|
6496
6506
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6497
|
-
function
|
|
6507
|
+
function Zr(e) {
|
|
6498
6508
|
let t;
|
|
6499
6509
|
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
6500
6510
|
else t = n.issues;
|
|
6501
6511
|
return t;
|
|
6502
6512
|
}
|
|
6503
6513
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6504
|
-
function
|
|
6514
|
+
function Qr(e, t) {
|
|
6505
6515
|
return {
|
|
6506
6516
|
kind: "schema",
|
|
6507
6517
|
type: "union",
|
|
6508
|
-
reference:
|
|
6509
|
-
expects: /* @__PURE__ */
|
|
6518
|
+
reference: Qr,
|
|
6519
|
+
expects: /* @__PURE__ */ Ur(e.map((e) => e.expects), "|"),
|
|
6510
6520
|
async: !1,
|
|
6511
6521
|
options: e,
|
|
6512
6522
|
message: t,
|
|
@@ -6527,24 +6537,24 @@ function Zr(e, t) {
|
|
|
6527
6537
|
if (n) return n;
|
|
6528
6538
|
if (r) {
|
|
6529
6539
|
if (r.length === 1) return r[0];
|
|
6530
|
-
J(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6540
|
+
J(this, "type", e, t, { issues: /* @__PURE__ */ Zr(r) }), e.typed = !0;
|
|
6531
6541
|
} else if (i?.length === 1) return i[0];
|
|
6532
|
-
else J(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6542
|
+
else J(this, "type", e, t, { issues: /* @__PURE__ */ Zr(i) });
|
|
6533
6543
|
return e;
|
|
6534
6544
|
}
|
|
6535
6545
|
};
|
|
6536
6546
|
}
|
|
6537
|
-
var
|
|
6547
|
+
var $r = (e) => /* @__PURE__ */ Qr(e.map((e) => /* @__PURE__ */ qr(e))), ei = /* @__PURE__ */ Q({
|
|
6538
6548
|
en: /* @__PURE__ */ $(),
|
|
6539
6549
|
es: /* @__PURE__ */ $()
|
|
6540
|
-
}), ei = /* @__PURE__ */ Q({
|
|
6541
|
-
en: /* @__PURE__ */ Jr(/* @__PURE__ */ X(/* @__PURE__ */ $())),
|
|
6542
|
-
es: /* @__PURE__ */ Jr(/* @__PURE__ */ X(/* @__PURE__ */ $()))
|
|
6543
6550
|
}), ti = /* @__PURE__ */ Q({
|
|
6544
|
-
en: /* @__PURE__ */
|
|
6545
|
-
es: /* @__PURE__ */
|
|
6551
|
+
en: /* @__PURE__ */ Yr(/* @__PURE__ */ X(/* @__PURE__ */ $())),
|
|
6552
|
+
es: /* @__PURE__ */ Yr(/* @__PURE__ */ X(/* @__PURE__ */ $()))
|
|
6553
|
+
}), ni = /* @__PURE__ */ Q({
|
|
6554
|
+
en: /* @__PURE__ */ Yr(/* @__PURE__ */ $()),
|
|
6555
|
+
es: /* @__PURE__ */ Yr(/* @__PURE__ */ $())
|
|
6546
6556
|
});
|
|
6547
|
-
|
|
6557
|
+
$r([
|
|
6548
6558
|
"app",
|
|
6549
6559
|
"connector",
|
|
6550
6560
|
"connectorConnection",
|
|
@@ -6569,12 +6579,12 @@ Qr([
|
|
|
6569
6579
|
"presenterPresentation",
|
|
6570
6580
|
"tool"
|
|
6571
6581
|
]);
|
|
6572
|
-
var
|
|
6582
|
+
var ri = $r([
|
|
6573
6583
|
"amber",
|
|
6574
6584
|
"green",
|
|
6575
6585
|
"red",
|
|
6576
6586
|
"other"
|
|
6577
|
-
]),
|
|
6587
|
+
]), ii = $r([
|
|
6578
6588
|
"alpha",
|
|
6579
6589
|
"beta",
|
|
6580
6590
|
"generalAvailability",
|
|
@@ -6584,31 +6594,31 @@ var ni = Qr([
|
|
|
6584
6594
|
"releaseCandidate",
|
|
6585
6595
|
"unavailable",
|
|
6586
6596
|
"underReview"
|
|
6587
|
-
]),
|
|
6588
|
-
color:
|
|
6597
|
+
]), ai = /* @__PURE__ */ Q({
|
|
6598
|
+
color: ri,
|
|
6589
6599
|
label: /* @__PURE__ */ $()
|
|
6590
|
-
}),
|
|
6600
|
+
}), oi = /* @__PURE__ */ Q({
|
|
6591
6601
|
id: /* @__PURE__ */ $(),
|
|
6592
|
-
label:
|
|
6593
|
-
description:
|
|
6602
|
+
label: ni,
|
|
6603
|
+
description: ti,
|
|
6594
6604
|
icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6595
6605
|
iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6596
6606
|
iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6597
|
-
order: /* @__PURE__ */
|
|
6607
|
+
order: /* @__PURE__ */ Jr(),
|
|
6598
6608
|
path: /* @__PURE__ */ $()
|
|
6599
|
-
}),
|
|
6609
|
+
}), si = {
|
|
6600
6610
|
id: /* @__PURE__ */ $(),
|
|
6601
|
-
label:
|
|
6602
|
-
description:
|
|
6603
|
-
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6611
|
+
label: ni,
|
|
6612
|
+
description: ti,
|
|
6613
|
+
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Jr()),
|
|
6604
6614
|
icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6605
6615
|
iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6606
6616
|
iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6607
|
-
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6608
|
-
status: /* @__PURE__ */ Z(
|
|
6609
|
-
statusId: /* @__PURE__ */ Z(
|
|
6617
|
+
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Jr()),
|
|
6618
|
+
status: /* @__PURE__ */ Z(ai),
|
|
6619
|
+
statusId: /* @__PURE__ */ Z(ii)
|
|
6610
6620
|
};
|
|
6611
|
-
({ ...
|
|
6621
|
+
({ ...si }), $r([
|
|
6612
6622
|
"app",
|
|
6613
6623
|
"engine",
|
|
6614
6624
|
"connector",
|
|
@@ -6618,14 +6628,14 @@ var ni = Qr([
|
|
|
6618
6628
|
]);
|
|
6619
6629
|
//#endregion
|
|
6620
6630
|
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-Cvc9QRvr.js
|
|
6621
|
-
var
|
|
6622
|
-
...
|
|
6631
|
+
var ci = {
|
|
6632
|
+
...si,
|
|
6623
6633
|
version: /* @__PURE__ */ $()
|
|
6624
6634
|
};
|
|
6625
|
-
({ ...
|
|
6635
|
+
({ ...ci });
|
|
6626
6636
|
//#endregion
|
|
6627
6637
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
6628
|
-
var
|
|
6638
|
+
var li = $r([
|
|
6629
6639
|
"abortOperation",
|
|
6630
6640
|
"auditObjectContent",
|
|
6631
6641
|
"createObject",
|
|
@@ -6640,35 +6650,35 @@ var ci = Qr([
|
|
|
6640
6650
|
"retrieveChunks",
|
|
6641
6651
|
"retrieveRecords",
|
|
6642
6652
|
"upsertRecords"
|
|
6643
|
-
]),
|
|
6653
|
+
]), ui = $r([
|
|
6644
6654
|
"application",
|
|
6645
6655
|
"curatedDataset",
|
|
6646
6656
|
"database",
|
|
6647
6657
|
"fileStore"
|
|
6648
|
-
]),
|
|
6649
|
-
authMethodId:
|
|
6658
|
+
]), di = /* @__PURE__ */ Q({ label: ei }), fi = /* @__PURE__ */ Q({
|
|
6659
|
+
authMethodId: $r([
|
|
6650
6660
|
"apiKey",
|
|
6651
6661
|
"disabled",
|
|
6652
6662
|
"oAuth2",
|
|
6653
6663
|
"none"
|
|
6654
6664
|
]),
|
|
6655
|
-
activeConnectionCount: /* @__PURE__ */
|
|
6656
|
-
canDescribe: /* @__PURE__ */
|
|
6657
|
-
id: /* @__PURE__ */
|
|
6658
|
-
label: /* @__PURE__ */
|
|
6659
|
-
maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6660
|
-
params: /* @__PURE__ */
|
|
6661
|
-
}),
|
|
6662
|
-
typeId: /* @__PURE__ */
|
|
6663
|
-
...
|
|
6664
|
-
actionNames: /* @__PURE__ */ X(
|
|
6665
|
-
category: /* @__PURE__ */ Z(
|
|
6666
|
-
categoryId:
|
|
6667
|
-
implementations: /* @__PURE__ */
|
|
6665
|
+
activeConnectionCount: /* @__PURE__ */ Yr(/* @__PURE__ */ Jr()),
|
|
6666
|
+
canDescribe: /* @__PURE__ */ Yr(/* @__PURE__ */ Kr()),
|
|
6667
|
+
id: /* @__PURE__ */ Yr(/* @__PURE__ */ $()),
|
|
6668
|
+
label: /* @__PURE__ */ Yr(ei),
|
|
6669
|
+
maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ Jr()),
|
|
6670
|
+
params: /* @__PURE__ */ Yr(/* @__PURE__ */ X(/* @__PURE__ */ Xr(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
|
|
6671
|
+
}), pi = /* @__PURE__ */ Q({
|
|
6672
|
+
typeId: /* @__PURE__ */ qr("connector"),
|
|
6673
|
+
...ci,
|
|
6674
|
+
actionNames: /* @__PURE__ */ X(li),
|
|
6675
|
+
category: /* @__PURE__ */ Z(di),
|
|
6676
|
+
categoryId: ui,
|
|
6677
|
+
implementations: /* @__PURE__ */ Xr(/* @__PURE__ */ $(), fi),
|
|
6668
6678
|
vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6669
6679
|
vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6670
6680
|
vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $())
|
|
6671
|
-
}),
|
|
6681
|
+
}), mi = {
|
|
6672
6682
|
abortOperation: "Abort Operation",
|
|
6673
6683
|
auditObjectContent: "Audit Object Content",
|
|
6674
6684
|
createObject: "Create Object",
|
|
@@ -6684,27 +6694,27 @@ var ci = Qr([
|
|
|
6684
6694
|
retrieveRecords: "Retrieve Records",
|
|
6685
6695
|
upsertRecords: "Upsert Records"
|
|
6686
6696
|
};
|
|
6687
|
-
function
|
|
6697
|
+
function hi(e) {
|
|
6688
6698
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
6689
6699
|
n += "|:----|:-------:|\n";
|
|
6690
|
-
for (let e of Object.keys(
|
|
6700
|
+
for (let e of Object.keys(mi)) n += `| ${mi[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
6691
6701
|
return n;
|
|
6692
6702
|
}
|
|
6693
6703
|
//#endregion
|
|
6694
6704
|
//#region src/actions/documentActions.ts
|
|
6695
|
-
var
|
|
6696
|
-
async function
|
|
6705
|
+
var gi = "<!-- CONNECTOR_ACTIONS_START -->", _i = "<!-- CONNECTOR_ACTIONS_END -->";
|
|
6706
|
+
async function vi() {
|
|
6697
6707
|
try {
|
|
6698
6708
|
G("Document Actions"), q("1️⃣ Insert actions table into 'README.md'");
|
|
6699
|
-
let e =
|
|
6700
|
-
await Vn("README.md", Kn(await Rn("./README.md"), e,
|
|
6709
|
+
let e = hi((await W("config.json")).actionNames ?? []);
|
|
6710
|
+
await Vn("README.md", Kn(await Rn("./README.md"), e, gi, _i)), K("Actions documented.");
|
|
6701
6711
|
} catch (e) {
|
|
6702
6712
|
console.error("❌ Error documenting actions.", e), process.exit(1);
|
|
6703
6713
|
}
|
|
6704
6714
|
}
|
|
6705
6715
|
//#endregion
|
|
6706
6716
|
//#region src/actions/formatCode.ts
|
|
6707
|
-
async function
|
|
6717
|
+
async function yi() {
|
|
6708
6718
|
try {
|
|
6709
6719
|
G("Format Code"), await In("1️⃣ Format", "prettier", [
|
|
6710
6720
|
"--write",
|
|
@@ -6719,7 +6729,7 @@ async function vi() {
|
|
|
6719
6729
|
}
|
|
6720
6730
|
//#endregion
|
|
6721
6731
|
//#region src/actions/lintCode.ts
|
|
6722
|
-
async function
|
|
6732
|
+
async function bi() {
|
|
6723
6733
|
try {
|
|
6724
6734
|
G("Lint Code"), await In("1️⃣ Lint", "eslint", ["."]), K("Code linted.");
|
|
6725
6735
|
} catch (e) {
|
|
@@ -6728,7 +6738,7 @@ async function yi() {
|
|
|
6728
6738
|
}
|
|
6729
6739
|
//#endregion
|
|
6730
6740
|
//#region src/utilities/cloudflare.ts
|
|
6731
|
-
async function
|
|
6741
|
+
async function xi() {
|
|
6732
6742
|
let e = await W("config.json"), t = {
|
|
6733
6743
|
body: JSON.stringify(e),
|
|
6734
6744
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6736,7 +6746,7 @@ async function bi() {
|
|
|
6736
6746
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6737
6747
|
if (!n.ok) throw Error(await n.text());
|
|
6738
6748
|
}
|
|
6739
|
-
async function
|
|
6749
|
+
async function Si(e, t) {
|
|
6740
6750
|
async function n(e, t, r) {
|
|
6741
6751
|
for (let i of r) {
|
|
6742
6752
|
let r = `${e}/${i}`, a = `${t}/${i}`;
|
|
@@ -6754,7 +6764,7 @@ async function xi(e, t) {
|
|
|
6754
6764
|
let r = await Pn(`${e}/${t}/`);
|
|
6755
6765
|
await n(`${e}/${t}`, t, r);
|
|
6756
6766
|
}
|
|
6757
|
-
async function
|
|
6767
|
+
async function Ci(e) {
|
|
6758
6768
|
let t = e.id, n = {
|
|
6759
6769
|
body: JSON.stringify(e),
|
|
6760
6770
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6762,7 +6772,7 @@ async function Si(e) {
|
|
|
6762
6772
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
6763
6773
|
if (!r.ok) throw Error(await r.text());
|
|
6764
6774
|
}
|
|
6765
|
-
async function
|
|
6775
|
+
async function wi(e, t) {
|
|
6766
6776
|
let n = `v${e.version ?? "unknown"}`;
|
|
6767
6777
|
async function r(e, r = "") {
|
|
6768
6778
|
let i = await Pn(e, { withFileTypes: !0 });
|
|
@@ -6786,24 +6796,24 @@ async function Ci(e, t) {
|
|
|
6786
6796
|
}
|
|
6787
6797
|
//#endregion
|
|
6788
6798
|
//#region node_modules/valibot/dist/index.mjs
|
|
6789
|
-
var
|
|
6799
|
+
var Ti, Ei = {
|
|
6790
6800
|
lang: void 0,
|
|
6791
6801
|
message: void 0,
|
|
6792
6802
|
abortEarly: void 0,
|
|
6793
6803
|
abortPipeEarly: void 0
|
|
6794
6804
|
};
|
|
6795
6805
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6796
|
-
function
|
|
6797
|
-
return !e && !
|
|
6798
|
-
lang: e?.lang ??
|
|
6806
|
+
function Di(e) {
|
|
6807
|
+
return !e && !Ti ? Ei : {
|
|
6808
|
+
lang: e?.lang ?? Ti?.lang,
|
|
6799
6809
|
message: e?.message,
|
|
6800
|
-
abortEarly: e?.abortEarly ??
|
|
6801
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
6810
|
+
abortEarly: e?.abortEarly ?? Ti?.abortEarly,
|
|
6811
|
+
abortPipeEarly: e?.abortPipeEarly ?? Ti?.abortPipeEarly
|
|
6802
6812
|
};
|
|
6803
6813
|
}
|
|
6804
6814
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6805
|
-
function
|
|
6806
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
6815
|
+
function Oi(e, t, n) {
|
|
6816
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ Di(n));
|
|
6807
6817
|
return {
|
|
6808
6818
|
typed: r.typed,
|
|
6809
6819
|
success: !r.issues,
|
|
@@ -6813,31 +6823,31 @@ function Di(e, t, n) {
|
|
|
6813
6823
|
}
|
|
6814
6824
|
//#endregion
|
|
6815
6825
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
|
|
6816
|
-
var
|
|
6817
|
-
typeId: /* @__PURE__ */
|
|
6818
|
-
...oi,
|
|
6819
|
-
modelRefs: /* @__PURE__ */ X(ai),
|
|
6820
|
-
order: /* @__PURE__ */ qr()
|
|
6821
|
-
}), ki = Qr(["listContextFocuses"]), Ai = /* @__PURE__ */ Q({
|
|
6822
|
-
typeId: /* @__PURE__ */ Kr("context"),
|
|
6826
|
+
var ki = /* @__PURE__ */ Q({
|
|
6827
|
+
typeId: /* @__PURE__ */ qr("contextModelGroup"),
|
|
6823
6828
|
...si,
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
}), ji =
|
|
6829
|
+
modelRefs: /* @__PURE__ */ X(oi),
|
|
6830
|
+
order: /* @__PURE__ */ Jr()
|
|
6831
|
+
}), Ai = $r(["listContextFocuses"]), ji = /* @__PURE__ */ Q({
|
|
6832
|
+
typeId: /* @__PURE__ */ qr("context"),
|
|
6833
|
+
...ci,
|
|
6834
|
+
actionNames: /* @__PURE__ */ X(Ai),
|
|
6835
|
+
models: /* @__PURE__ */ X(ki)
|
|
6836
|
+
}), Mi = $r([
|
|
6827
6837
|
"list",
|
|
6828
6838
|
"render",
|
|
6829
6839
|
"setColorMode"
|
|
6830
|
-
]),
|
|
6831
|
-
typeId: /* @__PURE__ */
|
|
6832
|
-
...
|
|
6833
|
-
actionNames: /* @__PURE__ */ X(
|
|
6834
|
-
presentations: /* @__PURE__ */ X(
|
|
6835
|
-
}),
|
|
6840
|
+
]), Ni = /* @__PURE__ */ Q({
|
|
6841
|
+
typeId: /* @__PURE__ */ qr("presenter"),
|
|
6842
|
+
...ci,
|
|
6843
|
+
actionNames: /* @__PURE__ */ X(Mi),
|
|
6844
|
+
presentations: /* @__PURE__ */ X(oi)
|
|
6845
|
+
}), Pi = /* @__PURE__ */ new Set([
|
|
6836
6846
|
"createObject",
|
|
6837
6847
|
"dropObject",
|
|
6838
6848
|
"removeRecords",
|
|
6839
6849
|
"upsertRecords"
|
|
6840
|
-
]),
|
|
6850
|
+
]), Fi = /* @__PURE__ */ new Set([
|
|
6841
6851
|
"auditObjectContent",
|
|
6842
6852
|
"findObjectFolderPath",
|
|
6843
6853
|
"getReadableStream",
|
|
@@ -6847,30 +6857,30 @@ var Oi = /* @__PURE__ */ Q({
|
|
|
6847
6857
|
"retrieveChunks",
|
|
6848
6858
|
"retrieveRecords"
|
|
6849
6859
|
]);
|
|
6850
|
-
async function
|
|
6860
|
+
async function Ii() {
|
|
6851
6861
|
try {
|
|
6852
6862
|
G("Build Project"), await In("1️⃣ Bundle project", "vite", ["build"]), K("Project built.");
|
|
6853
6863
|
} catch (e) {
|
|
6854
6864
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
6855
6865
|
}
|
|
6856
6866
|
}
|
|
6857
|
-
async function
|
|
6867
|
+
async function Li() {
|
|
6858
6868
|
try {
|
|
6859
6869
|
G("Release Project");
|
|
6860
6870
|
let e = await W("package.json"), t = await W("config.json");
|
|
6861
|
-
await
|
|
6871
|
+
await qi("1️⃣ ", e);
|
|
6862
6872
|
let n = Hn(t.id);
|
|
6863
6873
|
switch (n.typeId) {
|
|
6864
6874
|
case "connector":
|
|
6865
|
-
t = await
|
|
6875
|
+
t = await zi("2️⃣ ", e);
|
|
6866
6876
|
break;
|
|
6867
6877
|
case "context":
|
|
6868
|
-
t = await
|
|
6878
|
+
t = await Bi("2️⃣ ", e);
|
|
6869
6879
|
break;
|
|
6870
6880
|
case "presenter":
|
|
6871
|
-
t = await
|
|
6881
|
+
t = await Vi("2️⃣ ", e);
|
|
6872
6882
|
break;
|
|
6873
|
-
default: t = await
|
|
6883
|
+
default: t = await Ri("2️⃣ ", e);
|
|
6874
6884
|
}
|
|
6875
6885
|
if (await In("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
|
|
6876
6886
|
"commit",
|
|
@@ -6880,13 +6890,13 @@ async function Ii() {
|
|
|
6880
6890
|
"push",
|
|
6881
6891
|
"origin",
|
|
6882
6892
|
"main:main"
|
|
6883
|
-
]), n.typeId === "app") q("7️⃣ Register module"), await
|
|
6884
|
-
else if (n.typeId === "engine") q("7️⃣ Register module"), await
|
|
6893
|
+
]), n.typeId === "app") q("7️⃣ Register module"), await xi();
|
|
6894
|
+
else if (n.typeId === "engine") q("7️⃣ Register module"), await wi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Ci(t);
|
|
6885
6895
|
else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required.");
|
|
6886
6896
|
else {
|
|
6887
6897
|
q("7️⃣ Register module");
|
|
6888
6898
|
let r = t.id.split("-").slice(2).join("-");
|
|
6889
|
-
await
|
|
6899
|
+
await wi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Ci(t);
|
|
6890
6900
|
}
|
|
6891
6901
|
if (n.publishedTo === "npm") {
|
|
6892
6902
|
let e = ".npmrc";
|
|
@@ -6905,70 +6915,70 @@ async function Ii() {
|
|
|
6905
6915
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
6906
6916
|
}
|
|
6907
6917
|
}
|
|
6908
|
-
async function
|
|
6918
|
+
async function Ri(e, t) {
|
|
6909
6919
|
q(`${e} Build project configuration`);
|
|
6910
6920
|
let n = await W("config.json");
|
|
6911
6921
|
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await Bn("config.json", n), n;
|
|
6912
6922
|
}
|
|
6913
|
-
async function
|
|
6923
|
+
async function zi(e, t) {
|
|
6914
6924
|
q(`${e} Build connector project configuration`);
|
|
6915
|
-
let [n, r] = await Promise.all([W("config.json"), Rn("src/index.ts")]), i = /* @__PURE__ */
|
|
6925
|
+
let [n, r] = await Promise.all([W("config.json"), Rn("src/index.ts")]), i = /* @__PURE__ */ Oi(pi, n);
|
|
6916
6926
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6917
6927
|
let a = Wn(r);
|
|
6918
|
-
return await
|
|
6928
|
+
return await Ui(t, n, a, Hi(a));
|
|
6919
6929
|
}
|
|
6920
|
-
async function
|
|
6930
|
+
async function Bi(e, t) {
|
|
6921
6931
|
q(`${e} Build context project configuration`);
|
|
6922
|
-
let [n, r] = await Promise.all([W("config.json"), Rn("src/index.ts")]), i = /* @__PURE__ */
|
|
6932
|
+
let [n, r] = await Promise.all([W("config.json"), Rn("src/index.ts")]), i = /* @__PURE__ */ Oi(ji, n);
|
|
6923
6933
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6924
|
-
return await
|
|
6934
|
+
return await Ui(t, n, Wn(r));
|
|
6925
6935
|
}
|
|
6926
|
-
async function
|
|
6936
|
+
async function Vi(e, t) {
|
|
6927
6937
|
q(`${e} Build presenter project configuration`);
|
|
6928
|
-
let [n, r] = await Promise.all([W("config.json"), Rn("src/index.ts")]), i = /* @__PURE__ */
|
|
6938
|
+
let [n, r] = await Promise.all([W("config.json"), Rn("src/index.ts")]), i = /* @__PURE__ */ Oi(Ni, n);
|
|
6929
6939
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6930
|
-
return await
|
|
6940
|
+
return await Ui(t, n, Wn(r));
|
|
6931
6941
|
}
|
|
6932
|
-
function
|
|
6942
|
+
function Hi(e) {
|
|
6933
6943
|
let t = !1, n = !1;
|
|
6934
|
-
for (let r of e)
|
|
6944
|
+
for (let r of e) Fi.has(r) && (t = !0), Pi.has(r) && (n = !0);
|
|
6935
6945
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
6936
6946
|
}
|
|
6937
|
-
async function
|
|
6947
|
+
async function Ui(e, t, n, r) {
|
|
6938
6948
|
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.") : console.info(`ℹ️ Supports '${r ?? "unknown"}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await Bn("config.json", t), t;
|
|
6939
6949
|
}
|
|
6940
|
-
async function
|
|
6950
|
+
async function Wi() {
|
|
6941
6951
|
try {
|
|
6942
6952
|
G("Publish Project");
|
|
6943
6953
|
let e = await W("package.json"), t = await W("config.json"), n = Hn(t.id);
|
|
6944
|
-
if (n.typeId === "app") q("1️⃣ Register module"), await
|
|
6945
|
-
else if (n.typeId === "engine") q("1️⃣ Register module"), await
|
|
6954
|
+
if (n.typeId === "app") q("1️⃣ Register module"), await xi();
|
|
6955
|
+
else if (n.typeId === "engine") q("1️⃣ Register module"), await wi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Ci(t);
|
|
6946
6956
|
else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required.");
|
|
6947
6957
|
else {
|
|
6948
6958
|
q("1️⃣ Register module");
|
|
6949
6959
|
let r = t.id.split("-").slice(2).join("-");
|
|
6950
|
-
await
|
|
6960
|
+
await wi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Ci(t);
|
|
6951
6961
|
}
|
|
6952
6962
|
K(`Project version '${e.version ?? "unknown"}' published.`);
|
|
6953
6963
|
} catch (e) {
|
|
6954
6964
|
console.error("❌ Error publishing project.", e), process.exit(1);
|
|
6955
6965
|
}
|
|
6956
6966
|
}
|
|
6957
|
-
async function
|
|
6967
|
+
async function Gi() {
|
|
6958
6968
|
try {
|
|
6959
6969
|
G("Synchronise Project with GitHub");
|
|
6960
6970
|
let e = await W("package.json"), t = await W("config.json");
|
|
6961
|
-
switch (await
|
|
6971
|
+
switch (await qi("1️⃣ ", e), Hn(t.id).typeId) {
|
|
6962
6972
|
case "connector":
|
|
6963
|
-
await
|
|
6973
|
+
await zi("2️⃣ ", e);
|
|
6964
6974
|
break;
|
|
6965
6975
|
case "context":
|
|
6966
|
-
await
|
|
6976
|
+
await Bi("2️⃣ ", e);
|
|
6967
6977
|
break;
|
|
6968
6978
|
case "presenter":
|
|
6969
|
-
await
|
|
6979
|
+
await Vi("2️⃣ ", e);
|
|
6970
6980
|
break;
|
|
6971
|
-
default: await
|
|
6981
|
+
default: await Ri("2️⃣ ", e);
|
|
6972
6982
|
}
|
|
6973
6983
|
await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
|
|
6974
6984
|
"commit",
|
|
@@ -6983,14 +6993,14 @@ async function Wi() {
|
|
|
6983
6993
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
6984
6994
|
}
|
|
6985
6995
|
}
|
|
6986
|
-
function
|
|
6996
|
+
function Ki() {
|
|
6987
6997
|
try {
|
|
6988
6998
|
G("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
6989
6999
|
} catch (e) {
|
|
6990
7000
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
6991
7001
|
}
|
|
6992
7002
|
}
|
|
6993
|
-
async function
|
|
7003
|
+
async function qi(e, t, n = "./") {
|
|
6994
7004
|
if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
6995
7005
|
else {
|
|
6996
7006
|
let e = t.version, n = t.version.split(".");
|
|
@@ -6999,6 +7009,6 @@ async function Ki(e, t, n = "./") {
|
|
|
6999
7009
|
await Bn(`${n}package.json`, t);
|
|
7000
7010
|
}
|
|
7001
7011
|
//#endregion
|
|
7002
|
-
export { qn as auditDependencies,
|
|
7012
|
+
export { qn as auditDependencies, Ii as buildProject, Jn as checkConfigFiles, Xn as checkDependencies, vi as documentActions, rr as documentBundleSizes, Sr as documentDependencies, yi as formatCode, bi as lintCode, Wi as publishProject, Li as releaseProject, Gi as syncProjectWithGitHub, Ki as testProject, Si as uploadDirectoryToR2 };
|
|
7003
7013
|
|
|
7004
7014
|
//# sourceMappingURL=dpuse-development.es.js.map
|