@dpuse/dpuse-development 0.3.718 → 0.3.721
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
CHANGED
|
@@ -104,12 +104,12 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
104
104
|
|
|
105
105
|
|Chunk/Module/File|Composition|
|
|
106
106
|
|:------ |:-----------|
|
|
107
|
-
| dist/dpuse-development.es.js |
|
|
107
|
+
| dist/dpuse-development.es.js | 312.6 kB · brotli 63.4 kB |
|
|
108
108
|
| acorn → dist/acorn.mjs | `████████░░░░░░░░░░░░` 41.9% |
|
|
109
109
|
| acorn-typescript → lib/index.mjs | `███████░░░░░░░░░░░░░` 36.7% |
|
|
110
|
-
| src | `██░░░░░░░░░░░░░░░░░░` 10.
|
|
110
|
+
| src | `██░░░░░░░░░░░░░░░░░░` 10.7% |
|
|
111
|
+
| manageProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.8% |
|
|
111
112
|
| documentDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 1.8% |
|
|
112
|
-
| manageProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
|
|
113
113
|
| index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.5% |
|
|
114
114
|
| documentBundleSizes.ts | `░░░░░░░░░░░░░░░░░░░░` 1.3% |
|
|
115
115
|
| checkConfigFiles.ts | `░░░░░░░░░░░░░░░░░░░░` 0.9% |
|
|
@@ -7057,17 +7057,32 @@ var sa = di([
|
|
|
7057
7057
|
typeId: /* @__PURE__ */ ri("presenter"),
|
|
7058
7058
|
actionNames: /* @__PURE__ */ ti(sa),
|
|
7059
7059
|
presentations: /* @__PURE__ */ ti(_i)
|
|
7060
|
-
})
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7060
|
+
}), la = [
|
|
7061
|
+
"1️⃣ ",
|
|
7062
|
+
"2️⃣ ",
|
|
7063
|
+
"3️⃣ ",
|
|
7064
|
+
"4️⃣ "
|
|
7065
|
+
], ua = [{
|
|
7066
|
+
id: "unit",
|
|
7067
|
+
label: "Run unit tests",
|
|
7068
|
+
command: "vitest",
|
|
7069
|
+
arguments: ["run", "--passWithNoTests"],
|
|
7070
|
+
configFileName: "vitest.config.ts"
|
|
7071
|
+
}, {
|
|
7072
|
+
id: "e2e",
|
|
7073
|
+
label: "Run end-to-end tests",
|
|
7074
|
+
command: "playwright",
|
|
7075
|
+
arguments: ["test", "--pass-with-no-tests"],
|
|
7076
|
+
configFileName: "playwright.config.ts"
|
|
7077
|
+
}];
|
|
7078
|
+
async function da() {
|
|
7064
7079
|
try {
|
|
7065
7080
|
K("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), q("Project built");
|
|
7066
7081
|
} catch (e) {
|
|
7067
7082
|
console.error("❌ Error building project", e), process.exit(1);
|
|
7068
7083
|
}
|
|
7069
7084
|
}
|
|
7070
|
-
async function
|
|
7085
|
+
async function fa() {
|
|
7071
7086
|
try {
|
|
7072
7087
|
K("Publish Project");
|
|
7073
7088
|
let e = await W("package.json"), t = await W("config.json"), n = Bn(t.id);
|
|
@@ -7084,20 +7099,20 @@ async function ua() {
|
|
|
7084
7099
|
console.error("❌ Error publishing project", e), process.exit(1);
|
|
7085
7100
|
}
|
|
7086
7101
|
}
|
|
7087
|
-
async function
|
|
7102
|
+
async function pa() {
|
|
7088
7103
|
try {
|
|
7089
7104
|
K("Release Project");
|
|
7090
7105
|
let e = await W("package.json"), t = await W("config.json");
|
|
7091
|
-
await
|
|
7106
|
+
await ba("1️⃣ ", e);
|
|
7092
7107
|
let n = Bn(t.id);
|
|
7093
7108
|
switch (n.typeId) {
|
|
7094
7109
|
case "connector":
|
|
7095
|
-
t = await
|
|
7110
|
+
t = await ha("2️⃣ ", e);
|
|
7096
7111
|
break;
|
|
7097
7112
|
case "presenter":
|
|
7098
|
-
t = await
|
|
7113
|
+
t = await ga("2️⃣ ", e);
|
|
7099
7114
|
break;
|
|
7100
|
-
default: t = await
|
|
7115
|
+
default: t = await ma("2️⃣ ", e);
|
|
7101
7116
|
}
|
|
7102
7117
|
if (await U("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
|
|
7103
7118
|
"commit",
|
|
@@ -7128,39 +7143,39 @@ async function da() {
|
|
|
7128
7143
|
console.error("❌ Error releasing project", e), process.exit(1);
|
|
7129
7144
|
}
|
|
7130
7145
|
}
|
|
7131
|
-
async function
|
|
7146
|
+
async function ma(e, t) {
|
|
7132
7147
|
J(`${e} Build project configuration`);
|
|
7133
7148
|
let n = await W("config.json");
|
|
7134
7149
|
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await Ln("logo.svg"), n.iconDark ??= await Ln("logoDark.svg"), await Rn("config.json", n), n;
|
|
7135
7150
|
}
|
|
7136
|
-
async function
|
|
7151
|
+
async function ha(e, t) {
|
|
7137
7152
|
J(`${e} Build connector project configuration`);
|
|
7138
7153
|
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ oa(Ei, n);
|
|
7139
7154
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7140
7155
|
let a = Hn(r);
|
|
7141
|
-
return await
|
|
7156
|
+
return await _a(t, n, a, Ai(a));
|
|
7142
7157
|
}
|
|
7143
|
-
async function
|
|
7158
|
+
async function ga(e, t) {
|
|
7144
7159
|
J(`${e} Build presenter project configuration`);
|
|
7145
7160
|
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ oa(ca, n);
|
|
7146
7161
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7147
|
-
return await
|
|
7162
|
+
return await _a(t, n, Hn(r));
|
|
7148
7163
|
}
|
|
7149
|
-
async function
|
|
7164
|
+
async function _a(e, t, n, r) {
|
|
7150
7165
|
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 Rn("config.json", t), t;
|
|
7151
7166
|
}
|
|
7152
|
-
async function
|
|
7167
|
+
async function va() {
|
|
7153
7168
|
try {
|
|
7154
7169
|
K("Synchronise Project with GitHub");
|
|
7155
7170
|
let e = await W("package.json"), t = await W("config.json");
|
|
7156
|
-
switch (await
|
|
7171
|
+
switch (await ba("1️⃣ ", e), Bn(t.id).typeId) {
|
|
7157
7172
|
case "connector":
|
|
7158
|
-
await
|
|
7173
|
+
await ha("2️⃣ ", e);
|
|
7159
7174
|
break;
|
|
7160
7175
|
case "presenter":
|
|
7161
|
-
await
|
|
7176
|
+
await ga("2️⃣ ", e);
|
|
7162
7177
|
break;
|
|
7163
|
-
default: await
|
|
7178
|
+
default: await ma("2️⃣ ", e);
|
|
7164
7179
|
}
|
|
7165
7180
|
await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
|
|
7166
7181
|
"commit",
|
|
@@ -7175,14 +7190,25 @@ async function ga() {
|
|
|
7175
7190
|
console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
|
|
7176
7191
|
}
|
|
7177
7192
|
}
|
|
7178
|
-
function
|
|
7193
|
+
async function ya(e = ["unit"], t = !1) {
|
|
7179
7194
|
try {
|
|
7180
|
-
K("Test Project")
|
|
7195
|
+
K("Test Project");
|
|
7196
|
+
let n = 0;
|
|
7197
|
+
for (let r of ua) {
|
|
7198
|
+
if (!e.includes(r.id) || await Ln(r.configFileName) === null) continue;
|
|
7199
|
+
let i = t && r.id === "unit" ? ["--coverage"] : [];
|
|
7200
|
+
await U(`${la[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
|
|
7201
|
+
}
|
|
7202
|
+
if (n === 0) {
|
|
7203
|
+
console.warn("\n⚠️ No tests configured for this project.\n");
|
|
7204
|
+
return;
|
|
7205
|
+
}
|
|
7206
|
+
q("Project tested");
|
|
7181
7207
|
} catch (e) {
|
|
7182
7208
|
console.error("❌ Error testing project", e), process.exit(1);
|
|
7183
7209
|
}
|
|
7184
7210
|
}
|
|
7185
|
-
async function
|
|
7211
|
+
async function ba(e, t, n = "./") {
|
|
7186
7212
|
if (J(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
7187
7213
|
else {
|
|
7188
7214
|
let e = t.version, n = t.version.split(".");
|
|
@@ -7191,6 +7217,6 @@ async function va(e, t, n = "./") {
|
|
|
7191
7217
|
await Rn(`${n}package.json`, t);
|
|
7192
7218
|
}
|
|
7193
7219
|
//#endregion
|
|
7194
|
-
export { Gn as auditDependencies,
|
|
7220
|
+
export { Gn as auditDependencies, da as buildProject, Kn as checkConfigFiles, $n as checkDependencies, Li as documentActions, or as documentBundleSizes, Or as documentDependencies, Vr as documentGovernance, Bi as documentOpening, qi as documentUsage, Qi as formatCode, $i as lintCode, fa as publishProject, pa as releaseProject, va as syncProjectWithGitHub, ya as testProject, ta as uploadDirectoryToR2 };
|
|
7195
7221
|
|
|
7196
7222
|
//# sourceMappingURL=dpuse-development.es.js.map
|