@dpuse/dpuse-development 0.3.547 → 0.3.548
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.
|
@@ -5806,7 +5806,7 @@ function G(e) {
|
|
|
5806
5806
|
console.info(`\n[36m${t}`), console.info(`▶️ ${e}`), console.info(`${t}[0m`);
|
|
5807
5807
|
}
|
|
5808
5808
|
function K(e) {
|
|
5809
|
-
console.info(`\n✅
|
|
5809
|
+
console.info(`\n✅ ${e}\n`);
|
|
5810
5810
|
}
|
|
5811
5811
|
function q(e) {
|
|
5812
5812
|
console.info(`\n${e}\n`);
|
|
@@ -5860,9 +5860,9 @@ function Un(e, t, n, r) {
|
|
|
5860
5860
|
//#region src/actions/auditDependencies.ts
|
|
5861
5861
|
async function Wn() {
|
|
5862
5862
|
try {
|
|
5863
|
-
G("Audit Dependencies"), await Nn("1️⃣
|
|
5863
|
+
G("Audit Dependencies"), await Nn("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited.");
|
|
5864
5864
|
} catch (e) {
|
|
5865
|
-
console.error("❌
|
|
5865
|
+
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
5866
5866
|
}
|
|
5867
5867
|
}
|
|
5868
5868
|
//#endregion
|
|
@@ -5873,7 +5873,7 @@ async function Gn() {
|
|
|
5873
5873
|
let e = zn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
|
|
5874
5874
|
await Kn(t, "../", ".editorconfig"), await Kn(t, "../", ".gitattributes"), await Kn(t, "../", e.isPublished ? ".gitignore_published" : ".gitignore_unpublished"), await Kn(t, "../", ".markdownlint.json"), await Kn(t, "../", "LICENSE"), K("Configuration files checked..");
|
|
5875
5875
|
} catch (e) {
|
|
5876
|
-
console.error("❌
|
|
5876
|
+
console.error("❌ Error checking configuration files.", e), process.exit(1);
|
|
5877
5877
|
}
|
|
5878
5878
|
}
|
|
5879
5879
|
async function Kn(e, t, r) {
|
|
@@ -5884,22 +5884,22 @@ async function Kn(e, t, r) {
|
|
|
5884
5884
|
if (e.code !== "ENOENT") throw e;
|
|
5885
5885
|
}
|
|
5886
5886
|
if (o === i) {
|
|
5887
|
-
console.info(`ℹ️
|
|
5887
|
+
console.info(`ℹ️ File '${r.split("_", 1)[0] ?? r}' is the same`);
|
|
5888
5888
|
return;
|
|
5889
5889
|
}
|
|
5890
|
-
console.info(`⚠️
|
|
5890
|
+
console.info(`⚠️ File '${r.split("_", 1)[0] ?? r}' is NOT the same.`);
|
|
5891
5891
|
}
|
|
5892
5892
|
//#endregion
|
|
5893
5893
|
//#region src/actions/checkDependencies.ts
|
|
5894
5894
|
async function qn() {
|
|
5895
5895
|
try {
|
|
5896
|
-
G("Check Dependencies"), await Nn("1️⃣
|
|
5896
|
+
G("Check Dependencies"), await Nn("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Nn("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", [
|
|
5897
5897
|
"-i",
|
|
5898
5898
|
"--dep",
|
|
5899
5899
|
"dev,prod,peer,optional"
|
|
5900
5900
|
]), K("Dependencies checked.");
|
|
5901
5901
|
} catch (e) {
|
|
5902
|
-
console.error("❌
|
|
5902
|
+
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
5903
5903
|
}
|
|
5904
5904
|
}
|
|
5905
5905
|
//#endregion
|
|
@@ -5907,9 +5907,9 @@ async function qn() {
|
|
|
5907
5907
|
var Jn = "<!-- DEPENDENCY_LICENSES_START -->", Yn = "<!-- DEPENDENCY_LICENSES_END -->", Xn = "<!-- DEPENDENCY_TREE_START -->", Zn = "<!-- DEPENDENCY_TREE_END -->";
|
|
5908
5908
|
async function Qn(e = "MIT") {
|
|
5909
5909
|
try {
|
|
5910
|
-
G("Document Dependencies"), await An("1️⃣
|
|
5910
|
+
G("Document Dependencies"), await An("1️⃣ Clear downloaded licenses", "licenses/downloads");
|
|
5911
5911
|
let t = await W("package.json"), n = `${t.name ?? ""}@${t.version ?? ""}`;
|
|
5912
|
-
await Mn("2️⃣
|
|
5912
|
+
await Mn("2️⃣ Identify production licenses", "license-checker-rseidelsohn", [
|
|
5913
5913
|
"--production",
|
|
5914
5914
|
"--json",
|
|
5915
5915
|
"--files",
|
|
@@ -5922,14 +5922,14 @@ async function Qn(e = "MIT") {
|
|
|
5922
5922
|
`"${n}"`,
|
|
5923
5923
|
"--out",
|
|
5924
5924
|
"licenses/licenses.json"
|
|
5925
|
-
]), await Pn("3️⃣
|
|
5925
|
+
]), await Pn("3️⃣ Identify transitive dependencies", "npm", [
|
|
5926
5926
|
"ls",
|
|
5927
5927
|
"--all",
|
|
5928
5928
|
"--json",
|
|
5929
5929
|
"--omit=dev"
|
|
5930
|
-
], "licenses/licenseTree.json"), await $n("4️⃣"), K("Dependencies documented.");
|
|
5930
|
+
], "licenses/licenseTree.json"), await $n("4️⃣ "), K("Dependencies documented.");
|
|
5931
5931
|
} catch (e) {
|
|
5932
|
-
console.error("❌
|
|
5932
|
+
console.error("❌ Error documenting dependencies.", e), process.exit(1);
|
|
5933
5933
|
}
|
|
5934
5934
|
}
|
|
5935
5935
|
async function $n(e) {
|
|
@@ -5978,7 +5978,7 @@ async function tr(e, t) {
|
|
|
5978
5978
|
};
|
|
5979
5979
|
}
|
|
5980
5980
|
function nr(e) {
|
|
5981
|
-
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️
|
|
5981
|
+
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
|
|
5982
5982
|
return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
|
|
5983
5983
|
}
|
|
5984
5984
|
function rr(e, t, n, r) {
|
|
@@ -6000,7 +6000,7 @@ function ar(e) {
|
|
|
6000
6000
|
let t = e.split("T", 1)[0];
|
|
6001
6001
|
if (t == null || t === "") return "n/a";
|
|
6002
6002
|
let n = new Date(t), r = /* @__PURE__ */ new Date(), i = (r.getFullYear() - n.getFullYear()) * 12 + (r.getMonth() - n.getMonth());
|
|
6003
|
-
return r.getDate() < n.getDate() && --i, i === 0 ? `this month: ${t}` : i === 1 ? `1 month ago: ${t}` : i <= 6 ? `${String(i)} months ago: ${t}` : `${String(i)} months ago: ${t}
|
|
6003
|
+
return r.getDate() < n.getDate() && --i, i === 0 ? `this month: ${t}` : i === 1 ? `1 month ago: ${t}` : i <= 6 ? `${String(i)} months ago: ${t}` : `${String(i)} months ago: ${t} ⚠️ `;
|
|
6004
6004
|
}
|
|
6005
6005
|
//#endregion
|
|
6006
6006
|
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DTtYL9IP.js
|
|
@@ -6542,18 +6542,18 @@ function Wr(e) {
|
|
|
6542
6542
|
var Gr = "<!-- CONNECTOR_OPERATIONS_START -->", Kr = "<!-- CONNECTOR_OPERATIONS_END -->";
|
|
6543
6543
|
async function qr() {
|
|
6544
6544
|
try {
|
|
6545
|
-
G("Document Operations"), q("1️⃣
|
|
6545
|
+
G("Document Operations"), q("1️⃣ Insert operations table into 'README.md'");
|
|
6546
6546
|
let e = Wr((await W("config.json")).operations ?? []);
|
|
6547
6547
|
await Rn("README.md", Un(await Fn("./README.md"), e, Gr, Kr)), K("Operations documented.");
|
|
6548
6548
|
} catch (e) {
|
|
6549
|
-
console.error("❌
|
|
6549
|
+
console.error("❌ Error documenting operations.", e), process.exit(1);
|
|
6550
6550
|
}
|
|
6551
6551
|
}
|
|
6552
6552
|
//#endregion
|
|
6553
6553
|
//#region src/actions/formatCode.ts
|
|
6554
6554
|
async function Jr() {
|
|
6555
6555
|
try {
|
|
6556
|
-
G("Format Code"), await Nn("1️⃣
|
|
6556
|
+
G("Format Code"), await Nn("1️⃣ Format", "prettier", [
|
|
6557
6557
|
"--write",
|
|
6558
6558
|
"*.json",
|
|
6559
6559
|
"*.md",
|
|
@@ -6561,16 +6561,16 @@ async function Jr() {
|
|
|
6561
6561
|
...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
|
|
6562
6562
|
]), K("Code formatted.");
|
|
6563
6563
|
} catch (e) {
|
|
6564
|
-
console.error("❌
|
|
6564
|
+
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
6565
6565
|
}
|
|
6566
6566
|
}
|
|
6567
6567
|
//#endregion
|
|
6568
6568
|
//#region src/actions/lintCode.ts
|
|
6569
6569
|
async function Yr() {
|
|
6570
6570
|
try {
|
|
6571
|
-
G("Lint Code"), await Nn("1️⃣
|
|
6571
|
+
G("Lint Code"), await Nn("1️⃣ Lint", "eslint", ["."]), K("Code linted.");
|
|
6572
6572
|
} catch (e) {
|
|
6573
|
-
console.error("❌
|
|
6573
|
+
console.error("❌ Error linting code.", e), process.exit(1);
|
|
6574
6574
|
}
|
|
6575
6575
|
}
|
|
6576
6576
|
//#endregion
|
|
@@ -6678,49 +6678,49 @@ var ii = /* @__PURE__ */ Q({
|
|
|
6678
6678
|
]);
|
|
6679
6679
|
async function di() {
|
|
6680
6680
|
try {
|
|
6681
|
-
G("Build Project"), await Nn("1️⃣
|
|
6681
|
+
G("Build Project"), await Nn("1️⃣ Bundle project", "vite", ["build"]), K("Project built.");
|
|
6682
6682
|
} catch (e) {
|
|
6683
|
-
console.error("❌
|
|
6683
|
+
console.error("❌ Error building project.", e), process.exit(1);
|
|
6684
6684
|
}
|
|
6685
6685
|
}
|
|
6686
6686
|
async function fi() {
|
|
6687
6687
|
try {
|
|
6688
6688
|
G("Release Project");
|
|
6689
6689
|
let e = await W("package.json"), t = await W("config.json");
|
|
6690
|
-
await xi("1️⃣", e);
|
|
6690
|
+
await xi("1️⃣ ", e);
|
|
6691
6691
|
let n = zn(t.id);
|
|
6692
6692
|
switch (n.typeId) {
|
|
6693
6693
|
case "connector":
|
|
6694
|
-
t = await mi("2️⃣", e);
|
|
6694
|
+
t = await mi("2️⃣ ", e);
|
|
6695
6695
|
break;
|
|
6696
6696
|
case "context":
|
|
6697
|
-
t = await hi("2️⃣", e);
|
|
6697
|
+
t = await hi("2️⃣ ", e);
|
|
6698
6698
|
break;
|
|
6699
6699
|
case "presenter":
|
|
6700
|
-
t = await gi("2️⃣", e);
|
|
6700
|
+
t = await gi("2️⃣ ", e);
|
|
6701
6701
|
break;
|
|
6702
|
-
default: t = await pi("2️⃣", e);
|
|
6702
|
+
default: t = await pi("2️⃣ ", e);
|
|
6703
6703
|
}
|
|
6704
|
-
if (await Nn("3️⃣
|
|
6704
|
+
if (await Nn("3️⃣ Bundle project", "vite", ["build"]), await Mn("4️⃣ Stage changes", "git", ["add", "."]), await Mn("5️⃣ Commit changes", "git", [
|
|
6705
6705
|
"commit",
|
|
6706
6706
|
"-m",
|
|
6707
6707
|
`"v${e.version ?? "unknown"}"`
|
|
6708
|
-
]), await Mn("6️⃣
|
|
6708
|
+
]), await Mn("6️⃣ Push changes", "git", [
|
|
6709
6709
|
"push",
|
|
6710
6710
|
"origin",
|
|
6711
6711
|
"main:main"
|
|
6712
|
-
]), n.typeId === "app") q("7️⃣
|
|
6713
|
-
else if (n.typeId === "engine") q("7️⃣
|
|
6714
|
-
else if (n.uploadGroupName === void 0) q("7️⃣
|
|
6712
|
+
]), n.typeId === "app") q("7️⃣ Register module"), await Xr();
|
|
6713
|
+
else if (n.typeId === "engine") q("7️⃣ Register module"), await $r(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Qr(t);
|
|
6714
|
+
else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required.");
|
|
6715
6715
|
else {
|
|
6716
|
-
q("7️⃣
|
|
6716
|
+
q("7️⃣ Register module");
|
|
6717
6717
|
let r = t.id.split("-").slice(2).join("-");
|
|
6718
6718
|
await $r(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Qr(t);
|
|
6719
6719
|
}
|
|
6720
6720
|
if (n.isPublished) {
|
|
6721
6721
|
let e = ".npmrc";
|
|
6722
6722
|
try {
|
|
6723
|
-
await Rn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Nn("8️⃣
|
|
6723
|
+
await Rn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Nn("8️⃣ Publish to npm", "npm", [
|
|
6724
6724
|
"publish",
|
|
6725
6725
|
"--access",
|
|
6726
6726
|
"public"
|
|
@@ -6728,10 +6728,10 @@ async function fi() {
|
|
|
6728
6728
|
} finally {
|
|
6729
6729
|
await In(e);
|
|
6730
6730
|
}
|
|
6731
|
-
} else q(`8️⃣
|
|
6731
|
+
} else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
6732
6732
|
K(`Project version '${e.version ?? "unknown"}' released.`);
|
|
6733
6733
|
} catch (e) {
|
|
6734
|
-
console.error("❌
|
|
6734
|
+
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
6735
6735
|
}
|
|
6736
6736
|
}
|
|
6737
6737
|
async function pi(e, t) {
|
|
@@ -6742,20 +6742,20 @@ async function pi(e, t) {
|
|
|
6742
6742
|
async function mi(e, t) {
|
|
6743
6743
|
q(`${e} Build connector project configuration`);
|
|
6744
6744
|
let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ ri(Hr, n);
|
|
6745
|
-
if (!i.success) throw console.error("❌
|
|
6745
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6746
6746
|
let a = Vn(r);
|
|
6747
6747
|
return await vi(t, n, a, _i(a));
|
|
6748
6748
|
}
|
|
6749
6749
|
async function hi(e, t) {
|
|
6750
6750
|
q(`${e} Build context project configuration`);
|
|
6751
6751
|
let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ ri(oi, n);
|
|
6752
|
-
if (!i.success) throw console.error("❌
|
|
6752
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6753
6753
|
return await vi(t, n, Vn(r));
|
|
6754
6754
|
}
|
|
6755
6755
|
async function gi(e, t) {
|
|
6756
6756
|
q(`${e} Build presenter project configuration`);
|
|
6757
6757
|
let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ ri(ci, n);
|
|
6758
|
-
if (!i.success) throw console.error("❌
|
|
6758
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6759
6759
|
return await vi(t, n, Vn(r));
|
|
6760
6760
|
}
|
|
6761
6761
|
function _i(e) {
|
|
@@ -6764,46 +6764,46 @@ function _i(e) {
|
|
|
6764
6764
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
6765
6765
|
}
|
|
6766
6766
|
async function vi(e, t, n, r) {
|
|
6767
|
-
return n.length > 0 ? (console.info(`ℹ️
|
|
6767
|
+
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 Ln("config.json", t), t;
|
|
6768
6768
|
}
|
|
6769
6769
|
async function yi() {
|
|
6770
6770
|
try {
|
|
6771
6771
|
G("Synchronise Project with GitHub");
|
|
6772
6772
|
let e = await W("package.json"), t = await W("config.json");
|
|
6773
|
-
switch (await xi("1️⃣", e), zn(t.id).typeId) {
|
|
6773
|
+
switch (await xi("1️⃣ ", e), zn(t.id).typeId) {
|
|
6774
6774
|
case "connector":
|
|
6775
|
-
await mi("2️⃣", e);
|
|
6775
|
+
await mi("2️⃣ ", e);
|
|
6776
6776
|
break;
|
|
6777
6777
|
case "context":
|
|
6778
|
-
await hi("2️⃣", e);
|
|
6778
|
+
await hi("2️⃣ ", e);
|
|
6779
6779
|
break;
|
|
6780
6780
|
case "presenter":
|
|
6781
|
-
await gi("2️⃣", e);
|
|
6781
|
+
await gi("2️⃣ ", e);
|
|
6782
6782
|
break;
|
|
6783
|
-
default: await pi("2️⃣", e);
|
|
6783
|
+
default: await pi("2️⃣ ", e);
|
|
6784
6784
|
}
|
|
6785
|
-
await Mn("3️⃣
|
|
6785
|
+
await Mn("3️⃣ Stage changes", "git", ["add", "."]), await Mn("4️⃣ Commit changes", "git", [
|
|
6786
6786
|
"commit",
|
|
6787
6787
|
"-m",
|
|
6788
6788
|
`"v${e.version ?? "unknown"}"`
|
|
6789
|
-
]), await Mn("5️⃣
|
|
6789
|
+
]), await Mn("5️⃣ Push changes", "git", [
|
|
6790
6790
|
"push",
|
|
6791
6791
|
"origin",
|
|
6792
6792
|
"main:main"
|
|
6793
6793
|
]), K(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
|
|
6794
6794
|
} catch (e) {
|
|
6795
|
-
console.error("❌
|
|
6795
|
+
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
6796
6796
|
}
|
|
6797
6797
|
}
|
|
6798
6798
|
function bi() {
|
|
6799
6799
|
try {
|
|
6800
|
-
G("Test Project"), console.error("\n❌
|
|
6800
|
+
G("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
6801
6801
|
} catch (e) {
|
|
6802
|
-
console.error("❌
|
|
6802
|
+
console.error("❌ Error testing project.", e), process.exit(1);
|
|
6803
6803
|
}
|
|
6804
6804
|
}
|
|
6805
6805
|
async function xi(e, t, n = "./") {
|
|
6806
|
-
if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️
|
|
6806
|
+
if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
6807
6807
|
else {
|
|
6808
6808
|
let e = t.version, n = t.version.split(".");
|
|
6809
6809
|
t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
|