@dpuse/dpuse-development 0.3.521 → 0.3.522
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.
|
@@ -6696,8 +6696,8 @@ async function oi() {
|
|
|
6696
6696
|
}
|
|
6697
6697
|
//#endregion
|
|
6698
6698
|
//#region src/operations/documentDependencies.ts
|
|
6699
|
-
var si = "<!-- DEPENDENCY_LICENSES_START -->", ci = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
6700
|
-
async function
|
|
6699
|
+
var si = "<!-- DEPENDENCY_LICENSES_START -->", ci = "<!-- DEPENDENCY_LICENSES_END -->", li = "<!-- DEPENDENCY_TREE_START -->", ui = "<!-- DEPENDENCY_TREE_END -->";
|
|
6700
|
+
async function di(e = "MIT") {
|
|
6701
6701
|
try {
|
|
6702
6702
|
Ar("Document Dependencies"), await Sr("licenses/downloads"), await wr("1️⃣ Identify production licenses", "license-checker-rseidelsohn", [
|
|
6703
6703
|
"--production",
|
|
@@ -6715,24 +6715,24 @@ async function li(e = "MIT") {
|
|
|
6715
6715
|
"--all",
|
|
6716
6716
|
"--json",
|
|
6717
6717
|
"--omit=dev"
|
|
6718
|
-
], "licenses/licenseTree.json"), await
|
|
6718
|
+
], "licenses/licenseTree.json"), await fi("3️⃣"), jr("Dependencies documented.");
|
|
6719
6719
|
} catch (e) {
|
|
6720
6720
|
console.error("❌ Error documenting dependencies.", e), process.exit(1);
|
|
6721
6721
|
}
|
|
6722
6722
|
}
|
|
6723
|
-
async function
|
|
6723
|
+
async function fi(e) {
|
|
6724
6724
|
$(`${e} Insert licenses into 'README.md'`);
|
|
6725
6725
|
let [t, n] = await Promise.all([Q("licenses/licenses.json"), Q("licenses/licenseTree.json")]), r = /* @__PURE__ */ new Map();
|
|
6726
|
-
for (let [e, n] of Object.entries(t)) r.set(e,
|
|
6726
|
+
for (let [e, n] of Object.entries(t)) r.set(e, pi(e, n));
|
|
6727
6727
|
await Promise.all(r.values().map(async (e) => {
|
|
6728
|
-
e.publishedDate = await
|
|
6728
|
+
e.publishedDate = await mi(e.name, e.installedVersion);
|
|
6729
6729
|
}));
|
|
6730
|
-
let i =
|
|
6731
|
-
|
|
6732
|
-
let a =
|
|
6733
|
-
await kr("README.md", Ir(await Er("./README.md"),
|
|
6730
|
+
let i = "|Name|License|Version|Published|Document|\n|:-|:-|:-:|:-|:-|\n";
|
|
6731
|
+
for (let e of r.values()) i += hi(e);
|
|
6732
|
+
let a = [];
|
|
6733
|
+
n.dependencies != null && gi(n.dependencies, r, a, 0), await kr("README.md", Ir(Ir(await Er("./README.md"), i, si, ci), a.join("\n"), li, ui));
|
|
6734
6734
|
}
|
|
6735
|
-
function
|
|
6735
|
+
function pi(e, t) {
|
|
6736
6736
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6737
6737
|
return {
|
|
6738
6738
|
name: r,
|
|
@@ -6743,7 +6743,7 @@ function di(e, t) {
|
|
|
6743
6743
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6744
6744
|
};
|
|
6745
6745
|
}
|
|
6746
|
-
async function
|
|
6746
|
+
async function mi(e, t) {
|
|
6747
6747
|
try {
|
|
6748
6748
|
let n = await fetch(`https://registry.npmjs.org/${e.replace("/", "%2F")}`);
|
|
6749
6749
|
if (n.ok) {
|
|
@@ -6753,18 +6753,18 @@ async function fi(e, t) {
|
|
|
6753
6753
|
} catch {}
|
|
6754
6754
|
return "";
|
|
6755
6755
|
}
|
|
6756
|
-
function
|
|
6757
|
-
let
|
|
6756
|
+
function hi(e) {
|
|
6757
|
+
let t = e.publishedDate ? _i(e.publishedDate.split("T", 1)[0]) : "n/a", n;
|
|
6758
|
+
return n = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[${e.licenseFileLink.slice(Math.max(0, e.licenseFileLink.lastIndexOf("/") + 1))}](${e.licenseFileLink})`, `|${e.name}|${e.licenseTypes}|${e.installedVersion}|${t}|${n}|\n`;
|
|
6759
|
+
}
|
|
6760
|
+
function gi(e, t, n, r) {
|
|
6761
|
+
let i = " ".repeat(r);
|
|
6758
6762
|
for (let [a, o] of Object.entries(e)) {
|
|
6759
|
-
let e =
|
|
6760
|
-
|
|
6763
|
+
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s?.licenseTypes ?? "n/a", l;
|
|
6764
|
+
l = s?.licenseFileLink == null || s.licenseFileLink === "" ? "⚠️ No license file" : `[${s.licenseFileLink.slice(Math.max(0, s.licenseFileLink.lastIndexOf("/") + 1))}](${s.licenseFileLink})`, n.push(`${i}- **${a}** \`${e}\` ${c} — ${l}`), o.dependencies != null && gi(o.dependencies, t, n, r + 1);
|
|
6761
6765
|
}
|
|
6762
6766
|
}
|
|
6763
|
-
function
|
|
6764
|
-
let r = n?.licenseTypes ?? "n/a", i = n?.publishedDate ? hi(n.publishedDate.split("T", 1)[0]) : "n/a", a;
|
|
6765
|
-
return a = n?.licenseFileLink == null || n.licenseFileLink === "" ? "⚠️ No license file" : `[${n.licenseFileLink.slice(Math.max(0, n.licenseFileLink.lastIndexOf("/") + 1))}](${n.licenseFileLink})`, `|${e}|${r}|${t}|${i}|${a}|\n`;
|
|
6766
|
-
}
|
|
6767
|
-
function hi(e) {
|
|
6767
|
+
function _i(e) {
|
|
6768
6768
|
if (e == null || e === "") return "n/a";
|
|
6769
6769
|
let t = e.split("T", 1)[0];
|
|
6770
6770
|
if (t == null || t === "") return "n/a";
|
|
@@ -6773,7 +6773,7 @@ function hi(e) {
|
|
|
6773
6773
|
}
|
|
6774
6774
|
//#endregion
|
|
6775
6775
|
//#region src/operations/formatCode.ts
|
|
6776
|
-
async function
|
|
6776
|
+
async function vi() {
|
|
6777
6777
|
try {
|
|
6778
6778
|
Ar("Format Code"), await Z("1️⃣ Format", "prettier", [
|
|
6779
6779
|
"--write",
|
|
@@ -6788,7 +6788,7 @@ async function gi() {
|
|
|
6788
6788
|
}
|
|
6789
6789
|
//#endregion
|
|
6790
6790
|
//#region src/operations/lintCode.ts
|
|
6791
|
-
async function
|
|
6791
|
+
async function yi() {
|
|
6792
6792
|
try {
|
|
6793
6793
|
Ar("Lint Code"), await Z("1️⃣ Lint", "eslint", ["."]), jr("Code linted.");
|
|
6794
6794
|
} catch (e) {
|
|
@@ -6797,7 +6797,7 @@ async function _i() {
|
|
|
6797
6797
|
}
|
|
6798
6798
|
//#endregion
|
|
6799
6799
|
//#region src/operations/updateDPUseDependencies.ts
|
|
6800
|
-
var
|
|
6800
|
+
var bi = [
|
|
6801
6801
|
"1️⃣",
|
|
6802
6802
|
"2️⃣",
|
|
6803
6803
|
"3️⃣",
|
|
@@ -6808,23 +6808,23 @@ var vi = [
|
|
|
6808
6808
|
"8️⃣",
|
|
6809
6809
|
"9️⃣"
|
|
6810
6810
|
];
|
|
6811
|
-
async function
|
|
6811
|
+
async function xi(e = []) {
|
|
6812
6812
|
try {
|
|
6813
6813
|
Ar("Update '@dpuse/dpuse' Dependencies");
|
|
6814
6814
|
for (let [t, n] of e.entries()) {
|
|
6815
|
-
let e =
|
|
6816
|
-
n === "eslint" ? await Z(`${e} Update '${n}'`, "npm", ["install", "@dpuse/eslint-config-dpuse@latest"]) : (await Z(`${e} Update '${n}'`, "npm", ["install", `@dpuse/dpuse-${n}@latest`]), n === "development" && await
|
|
6815
|
+
let e = bi.at(t) ?? "🔢";
|
|
6816
|
+
n === "eslint" ? await Z(`${e} Update '${n}'`, "npm", ["install", "@dpuse/eslint-config-dpuse@latest"]) : (await Z(`${e} Update '${n}'`, "npm", ["install", `@dpuse/dpuse-${n}@latest`]), n === "development" && await Si(Mr((await Q("config.json")).id)));
|
|
6817
6817
|
}
|
|
6818
6818
|
jr("'@dpuse/dpuse' dependencies updated.");
|
|
6819
6819
|
} catch (e) {
|
|
6820
6820
|
console.error("❌ Error updating '@dpuse/dpuse' dependencies.", e), process.exit(1);
|
|
6821
6821
|
}
|
|
6822
6822
|
}
|
|
6823
|
-
async function
|
|
6823
|
+
async function Si(e) {
|
|
6824
6824
|
let t = n.dirname(o(import.meta.url));
|
|
6825
|
-
await
|
|
6825
|
+
await Ci(t, "../", ".editorconfig"), await Ci(t, "../", ".gitattributes"), await Ci(t, "../", e.isPublished ? ".gitignore_published" : ".gitignore_unpublished", ".gitignore2"), await Ci(t, "../", ".markdownlint.json"), await Ci(t, "../", "LICENSE"), await Ci(t, "../", "tsconfig.json", "tsconfig2.json"), e.typeId === "eslint" || (await Ci(t, "../", "eslint.config.ts", "eslint.config2.ts"), await Ci(t, "../", "vite.config.ts", "vite.config2.ts"), await Ci(t, "../", "vitest.config.ts", "vitest.config2.ts"));
|
|
6826
6826
|
}
|
|
6827
|
-
async function
|
|
6827
|
+
async function Ci(e, t, r, i) {
|
|
6828
6828
|
let a = await Er(n.resolve(e, `${t}${r}`)), o = n.resolve(process.cwd(), r.split("_", 1)[0] ?? r), s = n.resolve(process.cwd(), i ?? r), c;
|
|
6829
6829
|
try {
|
|
6830
6830
|
c = await Er(o);
|
|
@@ -6838,6 +6838,6 @@ async function xi(e, t, r, i) {
|
|
|
6838
6838
|
await kr(s, a), console.info(`ℹ️ File '${i ?? r}' synchronised.`);
|
|
6839
6839
|
}
|
|
6840
6840
|
//#endregion
|
|
6841
|
-
export { ri as auditDependencies, Ur as buildProject, oi as checkDependencies,
|
|
6841
|
+
export { ri as auditDependencies, Ur as buildProject, oi as checkDependencies, di as documentDependencies, vi as formatCode, yi as lintCode, Wr as releaseProject, Zr as syncProjectWithGitHub, Qr as testProject, xi as updateDPUseDependencies, Rr as uploadDirectoryToR2 };
|
|
6842
6842
|
|
|
6843
6843
|
//# sourceMappingURL=dpuse-development.es.js.map
|