@dpuse/dpuse-development 0.3.616 → 0.3.618
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 +6 -6
- package/dist/dpuse-development.es.js +37 -34
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,18 +140,18 @@ The Bundle Analysis Reports provide detailed breakdowns of the bundle's composit
|
|
|
140
140
|
|
|
141
141
|
|Chunk/Module/File|Composition|
|
|
142
142
|
|:------ |:-----------|
|
|
143
|
-
| dpuse-development.es.js | 299.
|
|
144
|
-
| acorn → dist/acorn.mjs | `██████████░░░░░░░░░░` 49.
|
|
143
|
+
| dpuse-development.es.js | 299.3 kB · gz 74.6 kB · br 59.5 kB |
|
|
144
|
+
| acorn → dist/acorn.mjs | `██████████░░░░░░░░░░` 49.4% |
|
|
145
145
|
| acorn-typescript → lib/index.mjs | `███████░░░░░░░░░░░░░` 35.5% |
|
|
146
|
-
| src | `██░░░░░░░░░░░░░░░░░░` 10.
|
|
146
|
+
| src | `██░░░░░░░░░░░░░░░░░░` 10.7% |
|
|
147
147
|
| manageProject.ts | `█░░░░░░░░░░░░░░░░░░░` 2.8% |
|
|
148
148
|
| documentBundleSizes.ts | `░░░░░░░░░░░░░░░░░░░░` 2.0% |
|
|
149
149
|
| documentDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 1.9% |
|
|
150
|
-
| index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.
|
|
150
|
+
| index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.9% |
|
|
151
151
|
| cloudflare.ts | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
152
|
-
| checkConfigFiles.ts | `░░░░░░░░░░░░░░░░░░░░` 0.
|
|
153
|
-
| documentActions.ts | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
152
|
+
| checkConfigFiles.ts | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
154
153
|
| checkDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
154
|
+
| documentActions.ts | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
155
155
|
| formatCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
156
156
|
| auditDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
157
157
|
| lintCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
@@ -5804,7 +5804,7 @@ async function Hn(e, n) {
|
|
|
5804
5804
|
await t.writeFile(e, n, "utf8");
|
|
5805
5805
|
}
|
|
5806
5806
|
function G(e) {
|
|
5807
|
-
let t = "
|
|
5807
|
+
let t = "────────────────────────────────────────────────────────────────────────────────";
|
|
5808
5808
|
console.info(`\n[36m${t}`), console.info(`▶️ ${e}`), console.info(`${t}[0m`);
|
|
5809
5809
|
}
|
|
5810
5810
|
function K(e) {
|
|
@@ -5862,20 +5862,22 @@ function qn(e, t, n, r) {
|
|
|
5862
5862
|
//#region src/actions/auditDependencies.ts
|
|
5863
5863
|
async function Jn() {
|
|
5864
5864
|
try {
|
|
5865
|
-
G("Audit Dependencies"), await Ln("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited
|
|
5865
|
+
G("Audit Dependencies"), await Ln("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited");
|
|
5866
5866
|
} catch (e) {
|
|
5867
|
-
console.error("❌ Error auditing dependencies
|
|
5867
|
+
console.error("❌ Error auditing dependencies", e), process.exit(1);
|
|
5868
5868
|
}
|
|
5869
5869
|
}
|
|
5870
5870
|
//#endregion
|
|
5871
5871
|
//#region src/actions/checkConfigFiles.ts
|
|
5872
5872
|
async function Yn() {
|
|
5873
5873
|
try {
|
|
5874
|
-
G("Check configuration files
|
|
5874
|
+
G("Check configuration files"), q("1️⃣ Check individual files");
|
|
5875
5875
|
let e = Un((await W("config.json")).id), t = n.dirname(o(import.meta.url));
|
|
5876
|
-
await Xn(t, ".editorconfig"), await Xn(t, ".gitattributes"), await Xn(t, ".gitignore", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Xn(t, ".markdownlint.json"), await Xn(t, ".ncurc.json"), await Xn(t, "LICENSE"), await Xn(t, "tsconfig.scripts.json")
|
|
5876
|
+
await Xn(t, ".editorconfig"), await Xn(t, ".gitattributes"), await Xn(t, ".gitignore", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Xn(t, ".markdownlint.json"), await Xn(t, ".ncurc.json"), await Xn(t, "LICENSE"), await Xn(t, "tsconfig.scripts.json");
|
|
5877
|
+
let r = e.typeId === "tool" ? "vite.config.tool.ts" : "vite.config.default.ts";
|
|
5878
|
+
await Xn(t, "vite.config.ts", e.typeId === "development" ? void 0 : r), await Xn(t, "vitest.config.ts"), K("Configuration files checked");
|
|
5877
5879
|
} catch (e) {
|
|
5878
|
-
console.error("❌ Error checking configuration files
|
|
5880
|
+
console.error("❌ Error checking configuration files", e), process.exit(1);
|
|
5879
5881
|
}
|
|
5880
5882
|
}
|
|
5881
5883
|
async function Xn(e, t, r) {
|
|
@@ -5898,11 +5900,12 @@ async function Zn() {
|
|
|
5898
5900
|
try {
|
|
5899
5901
|
G("Check Dependencies"), await Ln("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), q("2️⃣ Check using 'npm-check-updates'"), await s({
|
|
5900
5902
|
interactive: !0,
|
|
5903
|
+
upgrade: !0,
|
|
5901
5904
|
dep: "dev,prod,peer,optional",
|
|
5902
5905
|
install: "never"
|
|
5903
|
-
}), await Ln("3️⃣ Install updated dependencies", "npm", ["install", "--prefer-online"]), K("Dependencies checked
|
|
5906
|
+
}), await Ln("3️⃣ Install updated dependencies", "npm", ["install", "--prefer-online"]), K("Dependencies checked");
|
|
5904
5907
|
} catch (e) {
|
|
5905
|
-
console.error("❌ Error checking dependencies
|
|
5908
|
+
console.error("❌ Error checking dependencies", e), process.exit(1);
|
|
5906
5909
|
}
|
|
5907
5910
|
}
|
|
5908
5911
|
//#endregion
|
|
@@ -5914,9 +5917,9 @@ async function ir(e) {
|
|
|
5914
5917
|
let t = await W("./bundle-analysis-reports/rollup-visualiser/index.json");
|
|
5915
5918
|
q("2️⃣ Insert table into 'README.md'");
|
|
5916
5919
|
let n = await or(t, await ar(), e?.moduleLevel ?? !1);
|
|
5917
|
-
await Hn("README.md", qn(await zn("./README.md"), `\n${n}\n`, er, tr)), K("Bundle sizes documented
|
|
5920
|
+
await Hn("README.md", qn(await zn("./README.md"), `\n${n}\n`, er, tr)), K("Bundle sizes documented");
|
|
5918
5921
|
} catch (e) {
|
|
5919
|
-
console.error("❌ Error documenting bundle sizes
|
|
5922
|
+
console.error("❌ Error documenting bundle sizes", e), process.exit(1);
|
|
5920
5923
|
}
|
|
5921
5924
|
}
|
|
5922
5925
|
async function ar() {
|
|
@@ -5969,12 +5972,12 @@ async function or(e, t, n) {
|
|
|
5969
5972
|
}
|
|
5970
5973
|
function sr(e) {
|
|
5971
5974
|
let [t] = e;
|
|
5972
|
-
if (t === void 0) throw Error("Expected exactly one entry
|
|
5975
|
+
if (t === void 0) throw Error("Expected exactly one entry");
|
|
5973
5976
|
return t;
|
|
5974
5977
|
}
|
|
5975
5978
|
function cr(e) {
|
|
5976
5979
|
let [t] = e.keys();
|
|
5977
|
-
if (t === void 0) throw Error("Expected exactly one file
|
|
5980
|
+
if (t === void 0) throw Error("Expected exactly one file");
|
|
5978
5981
|
return t;
|
|
5979
5982
|
}
|
|
5980
5983
|
async function lr(e) {
|
|
@@ -6063,7 +6066,7 @@ async function Cr(e = "MIT") {
|
|
|
6063
6066
|
G("Document Dependencies");
|
|
6064
6067
|
let t = await W("package.json");
|
|
6065
6068
|
if (t.name === "@dpuse/dpuse-development") {
|
|
6066
|
-
await wr(), K("Dependencies documented
|
|
6069
|
+
await wr(), K("Dependencies documented");
|
|
6067
6070
|
return;
|
|
6068
6071
|
}
|
|
6069
6072
|
await Pn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
|
|
@@ -6085,14 +6088,14 @@ async function Cr(e = "MIT") {
|
|
|
6085
6088
|
"--all",
|
|
6086
6089
|
"--json",
|
|
6087
6090
|
"--omit=dev"
|
|
6088
|
-
], "licenses/licenseTree.json"), await Tr("4️⃣ "), K("Dependencies documented
|
|
6091
|
+
], "licenses/licenseTree.json"), await Tr("4️⃣ "), K("Dependencies documented");
|
|
6089
6092
|
} catch (e) {
|
|
6090
|
-
console.error("❌ Error documenting dependencies
|
|
6093
|
+
console.error("❌ Error documenting dependencies", e), process.exit(1);
|
|
6091
6094
|
}
|
|
6092
6095
|
}
|
|
6093
6096
|
async function wr() {
|
|
6094
6097
|
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
|
|
6098
|
+
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
6099
|
await Hn("README.md", qn(qn(await zn("./README.md"), e, yr, br), e, xr, Sr));
|
|
6097
6100
|
}
|
|
6098
6101
|
async function Tr(e) {
|
|
@@ -6708,9 +6711,9 @@ async function yi() {
|
|
|
6708
6711
|
try {
|
|
6709
6712
|
G("Document Actions"), q("1️⃣ Insert actions table into 'README.md'");
|
|
6710
6713
|
let e = gi((await W("config.json")).actionNames ?? []);
|
|
6711
|
-
await Hn("README.md", qn(await zn("./README.md"), e, _i, vi)), K("Actions documented
|
|
6714
|
+
await Hn("README.md", qn(await zn("./README.md"), e, _i, vi)), K("Actions documented");
|
|
6712
6715
|
} catch (e) {
|
|
6713
|
-
console.error("❌ Error documenting actions
|
|
6716
|
+
console.error("❌ Error documenting actions", e), process.exit(1);
|
|
6714
6717
|
}
|
|
6715
6718
|
}
|
|
6716
6719
|
//#endregion
|
|
@@ -6723,18 +6726,18 @@ async function bi() {
|
|
|
6723
6726
|
"*.md",
|
|
6724
6727
|
"*.ts",
|
|
6725
6728
|
...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
|
|
6726
|
-
]), K("Code formatted
|
|
6729
|
+
]), K("Code formatted");
|
|
6727
6730
|
} catch (e) {
|
|
6728
|
-
console.error("❌ Error formatting code
|
|
6731
|
+
console.error("❌ Error formatting code", e), process.exit(1);
|
|
6729
6732
|
}
|
|
6730
6733
|
}
|
|
6731
6734
|
//#endregion
|
|
6732
6735
|
//#region src/actions/lintCode.ts
|
|
6733
6736
|
async function xi() {
|
|
6734
6737
|
try {
|
|
6735
|
-
G("Lint Code"), await Ln("1️⃣ Lint", "eslint", ["."]), K("Code linted
|
|
6738
|
+
G("Lint Code"), await Ln("1️⃣ Lint", "eslint", ["."]), K("Code linted");
|
|
6736
6739
|
} catch (e) {
|
|
6737
|
-
console.error("❌ Error linting code
|
|
6740
|
+
console.error("❌ Error linting code", e), process.exit(1);
|
|
6738
6741
|
}
|
|
6739
6742
|
}
|
|
6740
6743
|
//#endregion
|
|
@@ -6860,9 +6863,9 @@ var Ai = /* @__PURE__ */ Q({
|
|
|
6860
6863
|
]);
|
|
6861
6864
|
async function Li() {
|
|
6862
6865
|
try {
|
|
6863
|
-
G("Build Project"), await Ln("1️⃣ Bundle project", "vite", ["build"]), K("Project built
|
|
6866
|
+
G("Build Project"), await Ln("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
|
|
6864
6867
|
} catch (e) {
|
|
6865
|
-
console.error("❌ Error building project
|
|
6868
|
+
console.error("❌ Error building project", e), process.exit(1);
|
|
6866
6869
|
}
|
|
6867
6870
|
}
|
|
6868
6871
|
async function Ri() {
|
|
@@ -6893,7 +6896,7 @@ async function Ri() {
|
|
|
6893
6896
|
"main:main"
|
|
6894
6897
|
]), n.typeId === "app") q("7️⃣ Register module"), await Si();
|
|
6895
6898
|
else if (n.typeId === "engine") q("7️⃣ Register module"), await Ti(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await wi(t);
|
|
6896
|
-
else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required
|
|
6899
|
+
else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required");
|
|
6897
6900
|
else {
|
|
6898
6901
|
q("7️⃣ Register module");
|
|
6899
6902
|
let r = t.id.split("-").slice(2).join("-");
|
|
@@ -6913,7 +6916,7 @@ async function Ri() {
|
|
|
6913
6916
|
} else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
6914
6917
|
K(`Project version '${e.version ?? "unknown"}' released.`);
|
|
6915
6918
|
} catch (e) {
|
|
6916
|
-
console.error("❌ Error releasing project
|
|
6919
|
+
console.error("❌ Error releasing project", e), process.exit(1);
|
|
6917
6920
|
}
|
|
6918
6921
|
}
|
|
6919
6922
|
async function zi(e, t) {
|
|
@@ -6924,20 +6927,20 @@ async function zi(e, t) {
|
|
|
6924
6927
|
async function Bi(e, t) {
|
|
6925
6928
|
q(`${e} Build connector project configuration`);
|
|
6926
6929
|
let [n, r] = await Promise.all([W("config.json"), zn("src/index.ts")]), i = /* @__PURE__ */ ki(mi, n);
|
|
6927
|
-
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid
|
|
6930
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
6928
6931
|
let a = Gn(r);
|
|
6929
6932
|
return await Wi(t, n, a, Ui(a));
|
|
6930
6933
|
}
|
|
6931
6934
|
async function Vi(e, t) {
|
|
6932
6935
|
q(`${e} Build context project configuration`);
|
|
6933
6936
|
let [n, r] = await Promise.all([W("config.json"), zn("src/index.ts")]), i = /* @__PURE__ */ ki(Mi, n);
|
|
6934
|
-
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid
|
|
6937
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
6935
6938
|
return await Wi(t, n, Gn(r));
|
|
6936
6939
|
}
|
|
6937
6940
|
async function Hi(e, t) {
|
|
6938
6941
|
q(`${e} Build presenter project configuration`);
|
|
6939
6942
|
let [n, r] = await Promise.all([W("config.json"), zn("src/index.ts")]), i = /* @__PURE__ */ ki(Pi, n);
|
|
6940
|
-
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid
|
|
6943
|
+
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
6941
6944
|
return await Wi(t, n, Gn(r));
|
|
6942
6945
|
}
|
|
6943
6946
|
function Ui(e) {
|
|
@@ -6946,7 +6949,7 @@ function Ui(e) {
|
|
|
6946
6949
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
6947
6950
|
}
|
|
6948
6951
|
async function Wi(e, t, n, r) {
|
|
6949
|
-
return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations
|
|
6952
|
+
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 Vn("config.json", t), t;
|
|
6950
6953
|
}
|
|
6951
6954
|
async function Gi() {
|
|
6952
6955
|
try {
|
|
@@ -6954,7 +6957,7 @@ async function Gi() {
|
|
|
6954
6957
|
let e = await W("package.json"), t = await W("config.json"), n = Un(t.id);
|
|
6955
6958
|
if (n.typeId === "app") q("1️⃣ Register module"), await Si();
|
|
6956
6959
|
else if (n.typeId === "engine") q("1️⃣ Register module"), await Ti(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await wi(t);
|
|
6957
|
-
else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required
|
|
6960
|
+
else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required");
|
|
6958
6961
|
else {
|
|
6959
6962
|
q("1️⃣ Register module");
|
|
6960
6963
|
let r = t.id.split("-").slice(2).join("-");
|
|
@@ -6962,7 +6965,7 @@ async function Gi() {
|
|
|
6962
6965
|
}
|
|
6963
6966
|
K(`Project version '${e.version ?? "unknown"}' published.`);
|
|
6964
6967
|
} catch (e) {
|
|
6965
|
-
console.error("❌ Error publishing project
|
|
6968
|
+
console.error("❌ Error publishing project", e), process.exit(1);
|
|
6966
6969
|
}
|
|
6967
6970
|
}
|
|
6968
6971
|
async function Ki() {
|
|
@@ -6991,14 +6994,14 @@ async function Ki() {
|
|
|
6991
6994
|
"main:main"
|
|
6992
6995
|
]), K(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
|
|
6993
6996
|
} catch (e) {
|
|
6994
|
-
console.error("❌ Error synchronising project with GitHub
|
|
6997
|
+
console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
|
|
6995
6998
|
}
|
|
6996
6999
|
}
|
|
6997
7000
|
function qi() {
|
|
6998
7001
|
try {
|
|
6999
7002
|
G("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
7000
7003
|
} catch (e) {
|
|
7001
|
-
console.error("❌ Error testing project
|
|
7004
|
+
console.error("❌ Error testing project", e), process.exit(1);
|
|
7002
7005
|
}
|
|
7003
7006
|
}
|
|
7004
7007
|
async function Ji(e, t, n = "./") {
|