@dpuse/dpuse-development 0.3.711 → 0.3.715
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 +2 -2
- package/dist/dpuse-development.es.js +287 -294
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +15 -3
|
@@ -5811,17 +5811,10 @@ async function Ln(e) {
|
|
|
5811
5811
|
throw e;
|
|
5812
5812
|
}
|
|
5813
5813
|
}
|
|
5814
|
-
async function Rn(e) {
|
|
5815
|
-
try {
|
|
5816
|
-
await t.unlink(e);
|
|
5817
|
-
} catch (e) {
|
|
5818
|
-
if (e.code !== "ENOENT") throw e;
|
|
5819
|
-
}
|
|
5820
|
-
}
|
|
5821
|
-
async function zn(e, n) {
|
|
5814
|
+
async function Rn(e, n) {
|
|
5822
5815
|
await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
|
|
5823
5816
|
}
|
|
5824
|
-
async function
|
|
5817
|
+
async function zn(e, n) {
|
|
5825
5818
|
await t.writeFile(e, n, "utf8");
|
|
5826
5819
|
}
|
|
5827
5820
|
function K(e) {
|
|
@@ -5834,21 +5827,21 @@ function q(e) {
|
|
|
5834
5827
|
function J(e) {
|
|
5835
5828
|
console.info(`\n${e}\n`);
|
|
5836
5829
|
}
|
|
5837
|
-
function
|
|
5830
|
+
function Bn(e) {
|
|
5838
5831
|
let t = jn.find((t) => e.startsWith(t.idPrefix));
|
|
5839
5832
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
5840
5833
|
return t;
|
|
5841
5834
|
}
|
|
5842
|
-
async function
|
|
5835
|
+
async function Vn(e) {
|
|
5843
5836
|
return await t.stat(e);
|
|
5844
5837
|
}
|
|
5845
|
-
function
|
|
5838
|
+
function Hn(e) {
|
|
5846
5839
|
let t = k.extend(An()).parse(e, {
|
|
5847
5840
|
ecmaVersion: "latest",
|
|
5848
5841
|
sourceType: "module",
|
|
5849
5842
|
locations: !0
|
|
5850
5843
|
}), n = [];
|
|
5851
|
-
return
|
|
5844
|
+
return Un(t, (e) => {
|
|
5852
5845
|
if (e.type !== "MethodDefinition") return;
|
|
5853
5846
|
let t = e, r = t.key;
|
|
5854
5847
|
if (r.type !== "Identifier") return;
|
|
@@ -5856,7 +5849,7 @@ function Un(e) {
|
|
|
5856
5849
|
i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
|
|
5857
5850
|
}), n;
|
|
5858
5851
|
}
|
|
5859
|
-
function
|
|
5852
|
+
function Un(e, t) {
|
|
5860
5853
|
t(e);
|
|
5861
5854
|
for (let [n, r] of Object.entries(e)) {
|
|
5862
5855
|
if ([
|
|
@@ -5869,12 +5862,12 @@ function Wn(e, t) {
|
|
|
5869
5862
|
let e = r;
|
|
5870
5863
|
if (Array.isArray(e)) for (let n of e) {
|
|
5871
5864
|
let e = n;
|
|
5872
|
-
e && typeof e.type == "string" &&
|
|
5865
|
+
e && typeof e.type == "string" && Un(e, t);
|
|
5873
5866
|
}
|
|
5874
|
-
else e && typeof e == "object" && typeof e.type == "string" &&
|
|
5867
|
+
else e && typeof e == "object" && typeof e.type == "string" && Un(e, t);
|
|
5875
5868
|
}
|
|
5876
5869
|
}
|
|
5877
|
-
function
|
|
5870
|
+
function Wn(e, t, n, r) {
|
|
5878
5871
|
let i = e.indexOf(n), a = e.indexOf(r);
|
|
5879
5872
|
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
5880
5873
|
let o = t.trim();
|
|
@@ -5882,7 +5875,7 @@ function Gn(e, t, n, r) {
|
|
|
5882
5875
|
}
|
|
5883
5876
|
//#endregion
|
|
5884
5877
|
//#region src/actions/auditDependencies.ts
|
|
5885
|
-
async function
|
|
5878
|
+
async function Gn() {
|
|
5886
5879
|
try {
|
|
5887
5880
|
K("Audit Dependencies"), await U("1️⃣ Check using 'npm audit'", "npm", ["audit"]), q("Dependencies audited");
|
|
5888
5881
|
} catch (e) {
|
|
@@ -5891,19 +5884,19 @@ async function Kn() {
|
|
|
5891
5884
|
}
|
|
5892
5885
|
//#endregion
|
|
5893
5886
|
//#region src/actions/checkConfigFiles.ts
|
|
5894
|
-
async function
|
|
5887
|
+
async function Kn() {
|
|
5895
5888
|
try {
|
|
5896
5889
|
K("Check configuration files"), J("1️⃣ Check individual files");
|
|
5897
|
-
let e =
|
|
5898
|
-
await Y(t, ".editorconfig"), await
|
|
5890
|
+
let e = Bn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
|
|
5891
|
+
await Y(t, ".editorconfig"), await qn(e, t), await Y(t, ".gitignore", [e.publishedTo === "npm" ? ".gitignore_npm_published" : ".gitignore_default"]), await Y(t, ".markdownlint.json"), await Y(t, ".ncurc.json"), await Jn(e, t), await Y(t, "LICENSE"), await Yn(e, t), await Y(t, "tsconfig.scripts.json"), await Xn(e, t), await Zn(e, t), q("Configuration files checked");
|
|
5899
5892
|
} catch (e) {
|
|
5900
5893
|
console.error("❌ Error checking configuration files", e), process.exit(1);
|
|
5901
5894
|
}
|
|
5902
5895
|
}
|
|
5903
|
-
async function
|
|
5896
|
+
async function qn(e, t) {
|
|
5904
5897
|
["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await Y(t, ".gitattributes", [".gitattributes_default"]);
|
|
5905
5898
|
}
|
|
5906
|
-
async function
|
|
5899
|
+
async function Jn(e, t) {
|
|
5907
5900
|
[
|
|
5908
5901
|
"app",
|
|
5909
5902
|
"api",
|
|
@@ -5911,7 +5904,7 @@ async function Yn(e, t) {
|
|
|
5911
5904
|
"eslint"
|
|
5912
5905
|
].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is UNIQUE to this project") : await Y(t, "eslint.config.js", ["eslint.config.default.js"]);
|
|
5913
5906
|
}
|
|
5914
|
-
async function
|
|
5907
|
+
async function Yn(e, t) {
|
|
5915
5908
|
[
|
|
5916
5909
|
"connector",
|
|
5917
5910
|
"engine",
|
|
@@ -5919,7 +5912,7 @@ async function Xn(e, t) {
|
|
|
5919
5912
|
"tool"
|
|
5920
5913
|
].includes(e.typeId) ? await Y(t, "tsconfig.json", ["tsconfig.default.json"]) : console.info("ℹ️ File 'tsconfig.json' is UNIQUE to this project");
|
|
5921
5914
|
}
|
|
5922
|
-
async function
|
|
5915
|
+
async function Xn(e, t) {
|
|
5923
5916
|
if (["eslint", "kb"].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is NOT required by this project");
|
|
5924
5917
|
else if ([
|
|
5925
5918
|
"app",
|
|
@@ -5933,7 +5926,7 @@ async function Zn(e, t) {
|
|
|
5933
5926
|
n = e.typeId === "connector" ? ["vite.config.default.ts", "vite.config.wasm.ts"] : e.typeId === "tool" ? ["vite.config.tool.ts"] : ["vite.config.default.ts"], await Y(t, "vite.config.ts", n);
|
|
5934
5927
|
}
|
|
5935
5928
|
}
|
|
5936
|
-
async function
|
|
5929
|
+
async function Zn(e, t) {
|
|
5937
5930
|
[
|
|
5938
5931
|
"app",
|
|
5939
5932
|
"api",
|
|
@@ -5959,7 +5952,7 @@ async function Y(e, t, r = []) {
|
|
|
5959
5952
|
}
|
|
5960
5953
|
//#endregion
|
|
5961
5954
|
//#region src/actions/checkDependencies.ts
|
|
5962
|
-
async function
|
|
5955
|
+
async function Qn() {
|
|
5963
5956
|
try {
|
|
5964
5957
|
K("Check Dependencies"), await U("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), J("2️⃣ Check using 'npm-check-updates'");
|
|
5965
5958
|
let e = {};
|
|
@@ -5979,94 +5972,98 @@ async function $n() {
|
|
|
5979
5972
|
"--prefer-online",
|
|
5980
5973
|
"--no-strict-allow-scripts"
|
|
5981
5974
|
]), process.platform === "darwin" ? await U("4️⃣ Remove unused install-script entries", "npm", ["install-scripts", "prune"]) : J("4️⃣ Skipped removing unused install-script entries (macOS only)");
|
|
5982
|
-
let t = await
|
|
5975
|
+
let t = await $n();
|
|
5983
5976
|
t.length > 0 ? (await U("5️⃣ Move install-script pins to installed versions", "npm", [
|
|
5984
5977
|
"install-scripts",
|
|
5985
5978
|
"approve",
|
|
5986
5979
|
...t
|
|
5987
|
-
]), await U("6️⃣ Run install scripts skipped in step 3", "npm", [
|
|
5980
|
+
]), await U("6️⃣ Run install scripts skipped in step 3", "npm", [
|
|
5981
|
+
"rebuild",
|
|
5982
|
+
...t,
|
|
5983
|
+
"--no-strict-allow-scripts"
|
|
5984
|
+
])) : J("5️⃣ No pinned install-script approvals to move"), await U("7️⃣ Confirm every install script is reviewed", "npm", ["install", "--strict-allow-scripts"]), q("Dependencies checked");
|
|
5988
5985
|
} catch (e) {
|
|
5989
5986
|
console.error("❌ Error checking dependencies", e), process.exit(1);
|
|
5990
5987
|
}
|
|
5991
5988
|
}
|
|
5992
|
-
async function
|
|
5989
|
+
async function $n() {
|
|
5993
5990
|
let { allowScripts: e = {} } = await W(n.resolve(process.cwd(), "package.json")), t = Object.entries(e).filter(([e, t]) => t && e.lastIndexOf("@") > 0).map(([e]) => e.slice(0, e.lastIndexOf("@")));
|
|
5994
5991
|
return [...new Set(t)];
|
|
5995
5992
|
}
|
|
5996
5993
|
//#endregion
|
|
5997
5994
|
//#region src/actions/documentBundleSizes.ts
|
|
5998
|
-
var
|
|
5999
|
-
async function
|
|
5995
|
+
var er = "<!-- BUNDLE_START -->", tr = "<!-- BUNDLE_END -->", nr = " ", rr = 20, ir = "The Bundle Analysis Report is generated automatically on each release using [Sonda](https://sonda.dev/), which analyses final source maps to reveal the actual effects of tree-shaking and minification rather than relying on pre-build estimates.\n\n_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._";
|
|
5996
|
+
async function ar(e) {
|
|
6000
5997
|
try {
|
|
6001
5998
|
K("Document Bundle Sizes"), J("1️⃣ Read bundle analysis report");
|
|
6002
5999
|
let t = await W("./bundle-analysis-reports/sonda/index.json");
|
|
6003
6000
|
J("2️⃣ Insert table into 'README.md'");
|
|
6004
|
-
let n =
|
|
6005
|
-
await
|
|
6001
|
+
let n = or(t, e?.moduleLevel ?? !1);
|
|
6002
|
+
await zn("README.md", Wn(await G("./README.md"), `\n${ir}\n\n${n}\n\n(unassigned) = bytes Sonda can't trace to a specific source line (whitespace, stray keywords, bundler-injected region markers) — not actual missing/unknown code.`, er, tr)), q("Bundle sizes documented");
|
|
6006
6003
|
} catch (e) {
|
|
6007
6004
|
console.error("❌ Error documenting bundle sizes", e), process.exit(1);
|
|
6008
6005
|
}
|
|
6009
6006
|
}
|
|
6010
|
-
function
|
|
6011
|
-
let n =
|
|
6007
|
+
function or(e, t) {
|
|
6008
|
+
let n = fr(e), r = n.values().flatMap((e) => e.values().toArray()).reduce((e, t) => e + t.sizes.uncompressed, 0), i = e.resources.filter((e) => e.kind === "asset").map((e) => [e.name, gr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
|
|
6012
6009
|
for (let [e, o] of i) {
|
|
6013
|
-
let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ?
|
|
6010
|
+
let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? sr(e, o, ur(i), r, t) : cr(e, o, i, r, t);
|
|
6014
6011
|
a.push(...s);
|
|
6015
6012
|
}
|
|
6016
6013
|
return a.join("\n");
|
|
6017
6014
|
}
|
|
6018
|
-
function
|
|
6015
|
+
function sr(e, t, n, r, i) {
|
|
6019
6016
|
let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
|
|
6020
|
-
if (s.size === 1) return [`| ${e} → ${a} → ${
|
|
6021
|
-
let l = [`| ${e} → ${a} | ${
|
|
6022
|
-
return i || l.push(...
|
|
6017
|
+
if (s.size === 1) return [`| ${e} → ${a} → ${dr(s)} | ${_r(t)} · ${vr(c)} |`];
|
|
6018
|
+
let l = [`| ${e} → ${a} | ${_r(t)} · ${vr(c)} |`];
|
|
6019
|
+
return i || l.push(...lr(s, nr, r)), l;
|
|
6023
6020
|
}
|
|
6024
|
-
function
|
|
6025
|
-
let a = [`| ${e} | ${
|
|
6021
|
+
function cr(e, t, n, r, i) {
|
|
6022
|
+
let a = [`| ${e} | ${_r(t)} |`];
|
|
6026
6023
|
for (let [e, { sizes: t, files: o }] of n) {
|
|
6027
6024
|
let n = r > 0 ? t.uncompressed / r * 100 : 0;
|
|
6028
6025
|
if (o.size === 1) {
|
|
6029
|
-
let t =
|
|
6030
|
-
a.push(`| ${
|
|
6026
|
+
let t = dr(o);
|
|
6027
|
+
a.push(`| ${nr}${e} → ${t} | ${vr(n)} |`);
|
|
6031
6028
|
continue;
|
|
6032
6029
|
}
|
|
6033
|
-
a.push(`| ${
|
|
6030
|
+
a.push(`| ${nr}${e} | ${vr(n)} |`), i || a.push(...lr(o, `${nr}${nr}`, r));
|
|
6034
6031
|
}
|
|
6035
6032
|
return a;
|
|
6036
6033
|
}
|
|
6037
|
-
function
|
|
6038
|
-
return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${
|
|
6034
|
+
function lr(e, t, n) {
|
|
6035
|
+
return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${vr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
|
|
6039
6036
|
}
|
|
6040
|
-
function
|
|
6037
|
+
function ur(e) {
|
|
6041
6038
|
let [t] = e;
|
|
6042
6039
|
if (t === void 0) throw Error("Expected exactly one entry");
|
|
6043
6040
|
return t;
|
|
6044
6041
|
}
|
|
6045
|
-
function
|
|
6042
|
+
function dr(e) {
|
|
6046
6043
|
let [t] = e.keys();
|
|
6047
6044
|
if (t === void 0) throw Error("Expected exactly one file");
|
|
6048
6045
|
return t;
|
|
6049
6046
|
}
|
|
6050
|
-
function
|
|
6051
|
-
let t =
|
|
6047
|
+
function fr(e) {
|
|
6048
|
+
let t = pr(e.dependencies), n = /* @__PURE__ */ new Map();
|
|
6052
6049
|
for (let r of e.resources) {
|
|
6053
6050
|
if (r.kind !== "chunk" || !r.parent) continue;
|
|
6054
|
-
let { group: e, file: i } =
|
|
6051
|
+
let { group: e, file: i } = mr(r.name, t), a = gr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
|
|
6055
6052
|
n.set(r.parent, o);
|
|
6056
6053
|
let s = o.get(e) ?? {
|
|
6057
|
-
sizes:
|
|
6054
|
+
sizes: yr(),
|
|
6058
6055
|
files: /* @__PURE__ */ new Map()
|
|
6059
6056
|
};
|
|
6060
|
-
o.set(e, s),
|
|
6061
|
-
let c = s.files.get(i) ??
|
|
6062
|
-
s.files.set(i, c),
|
|
6057
|
+
o.set(e, s), br(s.sizes, a);
|
|
6058
|
+
let c = s.files.get(i) ?? yr();
|
|
6059
|
+
s.files.set(i, c), br(c, a);
|
|
6063
6060
|
}
|
|
6064
6061
|
return n;
|
|
6065
6062
|
}
|
|
6066
|
-
function
|
|
6063
|
+
function pr(e) {
|
|
6067
6064
|
return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
|
|
6068
6065
|
}
|
|
6069
|
-
function
|
|
6066
|
+
function mr(e, t) {
|
|
6070
6067
|
let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
|
|
6071
6068
|
if (n) {
|
|
6072
6069
|
let [t, r] = n;
|
|
@@ -6083,49 +6080,49 @@ function hr(e, t) {
|
|
|
6083
6080
|
file: e.slice(1)
|
|
6084
6081
|
} : e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? {
|
|
6085
6082
|
group: "wasm",
|
|
6086
|
-
file:
|
|
6083
|
+
file: hr(e)
|
|
6087
6084
|
} : {
|
|
6088
6085
|
group: "src",
|
|
6089
|
-
file:
|
|
6086
|
+
file: hr(e)
|
|
6090
6087
|
};
|
|
6091
6088
|
}
|
|
6092
|
-
function
|
|
6089
|
+
function hr(e) {
|
|
6093
6090
|
return e.split("/").at(-1) ?? e;
|
|
6094
6091
|
}
|
|
6095
|
-
function
|
|
6092
|
+
function gr(e) {
|
|
6096
6093
|
return {
|
|
6097
6094
|
uncompressed: e.uncompressed,
|
|
6098
6095
|
brotli: e.brotli ?? 0
|
|
6099
6096
|
};
|
|
6100
6097
|
}
|
|
6101
|
-
function
|
|
6102
|
-
return `${
|
|
6098
|
+
function _r(e) {
|
|
6099
|
+
return `${xr(e.uncompressed)} · brotli ${xr(e.brotli)}`;
|
|
6103
6100
|
}
|
|
6104
|
-
function
|
|
6105
|
-
let t = Math.round(e / 100 *
|
|
6106
|
-
return `\`${"█".repeat(t)}${"░".repeat(
|
|
6101
|
+
function vr(e) {
|
|
6102
|
+
let t = Math.round(e / 100 * rr);
|
|
6103
|
+
return `\`${"█".repeat(t)}${"░".repeat(rr - t)}\` ${e.toFixed(1)}%`;
|
|
6107
6104
|
}
|
|
6108
|
-
function
|
|
6105
|
+
function yr() {
|
|
6109
6106
|
return {
|
|
6110
6107
|
uncompressed: 0,
|
|
6111
6108
|
brotli: 0
|
|
6112
6109
|
};
|
|
6113
6110
|
}
|
|
6114
|
-
function
|
|
6111
|
+
function br(e, t) {
|
|
6115
6112
|
e.uncompressed += t.uncompressed, e.brotli += t.brotli;
|
|
6116
6113
|
}
|
|
6117
|
-
function
|
|
6114
|
+
function xr(e) {
|
|
6118
6115
|
return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
|
|
6119
6116
|
}
|
|
6120
6117
|
//#endregion
|
|
6121
6118
|
//#region src/actions/documentDependencies.ts
|
|
6122
|
-
var
|
|
6123
|
-
async function
|
|
6119
|
+
var Sr = "<!-- DEPENDENCY_LICENSES_START -->", Cr = "<!-- DEPENDENCY_LICENSES_END -->", wr = "<!-- DEPENDENCY_TREE_START -->", Tr = "<!-- DEPENDENCY_TREE_END -->", Er = "The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are simply mature and stable, requiring no active development.";
|
|
6120
|
+
async function Dr(e = "MIT") {
|
|
6124
6121
|
try {
|
|
6125
6122
|
K("Document Dependencies");
|
|
6126
6123
|
let t = await W("package.json");
|
|
6127
6124
|
if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
|
|
6128
|
-
await
|
|
6125
|
+
await Or(t.name), q("Dependencies documented");
|
|
6129
6126
|
return;
|
|
6130
6127
|
}
|
|
6131
6128
|
await Nn("1️⃣ Clear downloaded licenses", "licenses/downloads"), J("2️⃣ Identify production licenses"), await new Promise((n, r) => {
|
|
@@ -6148,38 +6145,38 @@ async function Or(e = "MIT") {
|
|
|
6148
6145
|
"--all",
|
|
6149
6146
|
"--json",
|
|
6150
6147
|
"--omit=dev"
|
|
6151
|
-
], "licenses/licenseTree.json"), await
|
|
6148
|
+
], "licenses/licenseTree.json"), await kr("4️⃣ ", e), q("Dependencies documented");
|
|
6152
6149
|
} catch (e) {
|
|
6153
6150
|
console.error("❌ Error documenting dependencies", e), process.exit(1);
|
|
6154
6151
|
}
|
|
6155
6152
|
}
|
|
6156
|
-
async function
|
|
6153
|
+
async function Or(e) {
|
|
6157
6154
|
J(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
|
|
6158
6155
|
let t = `> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`;
|
|
6159
|
-
await
|
|
6156
|
+
await zn("README.md", Wn(Wn(await G("./README.md"), t, Sr, Cr), "", wr, Tr));
|
|
6160
6157
|
}
|
|
6161
|
-
async function
|
|
6158
|
+
async function kr(e, t) {
|
|
6162
6159
|
J(`${e} Insert licenses into 'README.md'`);
|
|
6163
6160
|
let [n, r] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
|
|
6164
|
-
for (let [e, t] of Object.entries(n)) i.set(e,
|
|
6161
|
+
for (let [e, t] of Object.entries(n)) i.set(e, Mr(e, t));
|
|
6165
6162
|
await Promise.all(i.values().map(async (e) => {
|
|
6166
|
-
let t = await
|
|
6163
|
+
let t = await Nr(e.name, e.installedVersion);
|
|
6167
6164
|
e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
|
|
6168
6165
|
}));
|
|
6169
|
-
let a = `${
|
|
6170
|
-
for (let e of i.values()) a +=
|
|
6166
|
+
let a = `${Ar(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
|
|
6167
|
+
for (let e of i.values()) a += Pr(e);
|
|
6171
6168
|
let o = [];
|
|
6172
|
-
r.dependencies != null &&
|
|
6173
|
-
let s = `${
|
|
6174
|
-
await
|
|
6169
|
+
r.dependencies != null && Fr(r.dependencies, i, o, 0);
|
|
6170
|
+
let s = `${Er}\n\n${o.join("\n")}`;
|
|
6171
|
+
await zn("README.md", Wn(Wn(await G("./README.md"), a, Sr, Cr), s, wr, Tr));
|
|
6175
6172
|
}
|
|
6176
|
-
function
|
|
6177
|
-
return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${
|
|
6173
|
+
function Ar(e) {
|
|
6174
|
+
return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${jr(e.split(";"))} — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.`;
|
|
6178
6175
|
}
|
|
6179
|
-
function
|
|
6176
|
+
function jr(e) {
|
|
6180
6177
|
return e.length === 1 ? e[0] ?? "" : e.length === 2 ? `${String(e[0])} or ${String(e[1])}` : `${e.slice(0, -1).join(", ")}, or ${String(e.at(-1))}`;
|
|
6181
6178
|
}
|
|
6182
|
-
function
|
|
6179
|
+
function Mr(e, t) {
|
|
6183
6180
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6184
6181
|
return {
|
|
6185
6182
|
name: r,
|
|
@@ -6193,7 +6190,7 @@ function Nr(e, t) {
|
|
|
6193
6190
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6194
6191
|
};
|
|
6195
6192
|
}
|
|
6196
|
-
async function
|
|
6193
|
+
async function Nr(e, t) {
|
|
6197
6194
|
try {
|
|
6198
6195
|
let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
|
|
6199
6196
|
if (n.ok) {
|
|
@@ -6211,25 +6208,25 @@ async function Pr(e, t) {
|
|
|
6211
6208
|
publishedDate: ""
|
|
6212
6209
|
};
|
|
6213
6210
|
}
|
|
6214
|
-
function
|
|
6211
|
+
function Pr(e) {
|
|
6215
6212
|
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
|
|
6216
6213
|
return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
|
|
6217
6214
|
}
|
|
6218
|
-
function
|
|
6215
|
+
function Fr(e, t, n, r) {
|
|
6219
6216
|
let i = " ".repeat(r);
|
|
6220
6217
|
for (let [a, o] of Object.entries(e)) {
|
|
6221
|
-
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l =
|
|
6222
|
-
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null &&
|
|
6218
|
+
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Ir(s);
|
|
6219
|
+
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Fr(o.dependencies, t, n, r + 1);
|
|
6223
6220
|
}
|
|
6224
6221
|
}
|
|
6225
|
-
function
|
|
6222
|
+
function Ir(e) {
|
|
6226
6223
|
if (e == null) return "";
|
|
6227
|
-
let t = e.publishedDate ?
|
|
6224
|
+
let t = e.publishedDate ? Lr(e.publishedDate.split("T", 1)[0]) : "";
|
|
6228
6225
|
if (e.latestVersion === "" || e.latestVersion === e.installedVersion) return t === "" ? "" : ` — ${t}`;
|
|
6229
|
-
let n = e.latestPublishedDate ?
|
|
6226
|
+
let n = e.latestPublishedDate ? Lr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
|
|
6230
6227
|
return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
|
|
6231
6228
|
}
|
|
6232
|
-
function
|
|
6229
|
+
function Lr(e) {
|
|
6233
6230
|
if (e == null || e === "") return "n/a";
|
|
6234
6231
|
let t = e.split("T", 1)[0];
|
|
6235
6232
|
if (t == null || t === "") return "n/a";
|
|
@@ -6238,17 +6235,17 @@ function Rr(e) {
|
|
|
6238
6235
|
}
|
|
6239
6236
|
//#endregion
|
|
6240
6237
|
//#region src/actions/documentGovernance.ts
|
|
6241
|
-
var
|
|
6242
|
-
async function
|
|
6238
|
+
var Rr = "<!-- GOVERNANCE_START -->", zr = "<!-- GOVERNANCE_END -->";
|
|
6239
|
+
async function Br() {
|
|
6243
6240
|
try {
|
|
6244
6241
|
K("Document Governance"), J("1️⃣ Insert governance content into 'README.md'");
|
|
6245
|
-
let [e, t] = await Promise.all([W("package.json"), W("config.json")]), { owner: n, repo: r } =
|
|
6246
|
-
await
|
|
6242
|
+
let [e, t] = await Promise.all([W("package.json"), W("config.json")]), { owner: n, repo: r } = Vr(e), i = Wr(n, r, Hr(e), Ur(t.firstCreatedAt));
|
|
6243
|
+
await zn("README.md", Wn(await G("./README.md"), i, Rr, zr)), q("Governance documented");
|
|
6247
6244
|
} catch (e) {
|
|
6248
6245
|
console.error("❌ Error documenting governance", e), process.exit(1);
|
|
6249
6246
|
}
|
|
6250
6247
|
}
|
|
6251
|
-
function
|
|
6248
|
+
function Vr(e) {
|
|
6252
6249
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6253
6250
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document governance.");
|
|
6254
6251
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6258,18 +6255,18 @@ function Hr(e) {
|
|
|
6258
6255
|
repo: i[2]
|
|
6259
6256
|
};
|
|
6260
6257
|
}
|
|
6261
|
-
function
|
|
6258
|
+
function Hr(e) {
|
|
6262
6259
|
let t = e.author, n = typeof t == "string" ? t : t?.name;
|
|
6263
6260
|
if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
|
|
6264
6261
|
return n.replace(/\s*<[^>]*>\s*/, "").trim();
|
|
6265
6262
|
}
|
|
6266
|
-
function
|
|
6263
|
+
function Ur(e) {
|
|
6267
6264
|
let t = (/* @__PURE__ */ new Date()).getFullYear();
|
|
6268
6265
|
if (e == null) return String(t);
|
|
6269
6266
|
let n = new Date(e).getFullYear();
|
|
6270
6267
|
return n === t ? String(t) : `${String(n)}-present`;
|
|
6271
6268
|
}
|
|
6272
|
-
function
|
|
6269
|
+
function Wr(e, t, n, r) {
|
|
6273
6270
|
let i = `https://github.com/${e}/${t}`, a = `github.com/${e}/${t}`;
|
|
6274
6271
|
return `## Security & Quality
|
|
6275
6272
|
|
|
@@ -6316,28 +6313,28 @@ This project is licensed under the MIT License, permitting free use, modificatio
|
|
|
6316
6313
|
}
|
|
6317
6314
|
//#endregion
|
|
6318
6315
|
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-Dxqinpxy.js
|
|
6319
|
-
var
|
|
6316
|
+
var Gr = {
|
|
6320
6317
|
lang: void 0,
|
|
6321
6318
|
message: void 0,
|
|
6322
6319
|
abortEarly: void 0,
|
|
6323
6320
|
abortPipeEarly: void 0
|
|
6324
6321
|
};
|
|
6325
6322
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6326
|
-
function
|
|
6323
|
+
function Kr(e) {
|
|
6327
6324
|
return e ? {
|
|
6328
6325
|
lang: e?.lang ?? void 0,
|
|
6329
6326
|
message: e?.message,
|
|
6330
6327
|
abortEarly: e?.abortEarly ?? void 0,
|
|
6331
6328
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
6332
|
-
} :
|
|
6329
|
+
} : Gr;
|
|
6333
6330
|
}
|
|
6334
6331
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6335
|
-
function
|
|
6332
|
+
function qr(e) {
|
|
6336
6333
|
let t = typeof e;
|
|
6337
6334
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
6338
6335
|
}
|
|
6339
6336
|
function X(e, t, n, r, i) {
|
|
6340
|
-
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */
|
|
6337
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ qr(a), c = {
|
|
6341
6338
|
kind: e.kind,
|
|
6342
6339
|
type: e.type,
|
|
6343
6340
|
input: a,
|
|
@@ -6354,39 +6351,39 @@ function X(e, t, n, r, i) {
|
|
|
6354
6351
|
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
6355
6352
|
}
|
|
6356
6353
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6357
|
-
function
|
|
6354
|
+
function Jr(e, t) {
|
|
6358
6355
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
6359
6356
|
}
|
|
6360
6357
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6361
|
-
function
|
|
6358
|
+
function Yr(e, t) {
|
|
6362
6359
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
6363
6360
|
}
|
|
6364
6361
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6365
|
-
function
|
|
6362
|
+
function Xr(e, t) {
|
|
6366
6363
|
let n = [...new Set(e)];
|
|
6367
6364
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
6368
6365
|
}
|
|
6369
|
-
function
|
|
6366
|
+
function Zr(e) {
|
|
6370
6367
|
return e["~standard"] = {
|
|
6371
6368
|
version: 1,
|
|
6372
6369
|
vendor: "valibot",
|
|
6373
|
-
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */
|
|
6370
|
+
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ Kr())
|
|
6374
6371
|
}, e;
|
|
6375
6372
|
}
|
|
6376
6373
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6377
|
-
function
|
|
6374
|
+
function Qr(e, t, n) {
|
|
6378
6375
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
6379
6376
|
}
|
|
6380
6377
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6381
|
-
function
|
|
6378
|
+
function $r(e, t, n) {
|
|
6382
6379
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
6383
6380
|
}
|
|
6384
6381
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6385
|
-
function
|
|
6386
|
-
return
|
|
6382
|
+
function ei(e, t) {
|
|
6383
|
+
return Zr({
|
|
6387
6384
|
kind: "schema",
|
|
6388
6385
|
type: "array",
|
|
6389
|
-
reference:
|
|
6386
|
+
reference: ei,
|
|
6390
6387
|
expects: "Array",
|
|
6391
6388
|
async: !1,
|
|
6392
6389
|
item: e,
|
|
@@ -6419,11 +6416,11 @@ function ti(e, t) {
|
|
|
6419
6416
|
});
|
|
6420
6417
|
}
|
|
6421
6418
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6422
|
-
function
|
|
6423
|
-
return
|
|
6419
|
+
function ti(e) {
|
|
6420
|
+
return Zr({
|
|
6424
6421
|
kind: "schema",
|
|
6425
6422
|
type: "boolean",
|
|
6426
|
-
reference:
|
|
6423
|
+
reference: ti,
|
|
6427
6424
|
expects: "boolean",
|
|
6428
6425
|
async: !1,
|
|
6429
6426
|
message: e,
|
|
@@ -6433,23 +6430,23 @@ function ni(e) {
|
|
|
6433
6430
|
});
|
|
6434
6431
|
}
|
|
6435
6432
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6436
|
-
function
|
|
6437
|
-
return
|
|
6433
|
+
function ni(e, t) {
|
|
6434
|
+
return Zr({
|
|
6438
6435
|
kind: "schema",
|
|
6439
6436
|
type: "literal",
|
|
6440
|
-
reference:
|
|
6441
|
-
expects: /* @__PURE__ */
|
|
6437
|
+
reference: ni,
|
|
6438
|
+
expects: /* @__PURE__ */ qr(e),
|
|
6442
6439
|
async: !1,
|
|
6443
6440
|
literal: e,
|
|
6444
6441
|
message: t,
|
|
6445
6442
|
"~run"(e, t) {
|
|
6446
|
-
return /* @__PURE__ */
|
|
6443
|
+
return /* @__PURE__ */ Jr(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
|
|
6447
6444
|
}
|
|
6448
6445
|
});
|
|
6449
6446
|
}
|
|
6450
6447
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6451
6448
|
function Z(e, t) {
|
|
6452
|
-
return
|
|
6449
|
+
return Zr({
|
|
6453
6450
|
kind: "schema",
|
|
6454
6451
|
type: "nullable",
|
|
6455
6452
|
reference: Z,
|
|
@@ -6458,16 +6455,16 @@ function Z(e, t) {
|
|
|
6458
6455
|
wrapped: e,
|
|
6459
6456
|
default: t,
|
|
6460
6457
|
"~run"(e, t) {
|
|
6461
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6458
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ $r(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6462
6459
|
}
|
|
6463
6460
|
});
|
|
6464
6461
|
}
|
|
6465
6462
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6466
|
-
function
|
|
6467
|
-
return
|
|
6463
|
+
function ri(e) {
|
|
6464
|
+
return Zr({
|
|
6468
6465
|
kind: "schema",
|
|
6469
6466
|
type: "number",
|
|
6470
|
-
reference:
|
|
6467
|
+
reference: ri,
|
|
6471
6468
|
expects: "number",
|
|
6472
6469
|
async: !1,
|
|
6473
6470
|
message: e,
|
|
@@ -6478,7 +6475,7 @@ function ii(e) {
|
|
|
6478
6475
|
}
|
|
6479
6476
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6480
6477
|
function Q(e, t) {
|
|
6481
|
-
return
|
|
6478
|
+
return Zr({
|
|
6482
6479
|
kind: "schema",
|
|
6483
6480
|
type: "object",
|
|
6484
6481
|
reference: Q,
|
|
@@ -6493,7 +6490,7 @@ function Q(e, t) {
|
|
|
6493
6490
|
for (let r in this.entries) {
|
|
6494
6491
|
let i = this.entries[r];
|
|
6495
6492
|
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
6496
|
-
let a = r in n ? n[r] : /* @__PURE__ */
|
|
6493
|
+
let a = r in n ? n[r] : /* @__PURE__ */ $r(i), o = i["~run"]({ value: a }, t);
|
|
6497
6494
|
if (o.issues) {
|
|
6498
6495
|
let i = {
|
|
6499
6496
|
type: "object",
|
|
@@ -6509,7 +6506,7 @@ function Q(e, t) {
|
|
|
6509
6506
|
}
|
|
6510
6507
|
}
|
|
6511
6508
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
6512
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
6509
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Qr(i);
|
|
6513
6510
|
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (X(this, "key", e, t, {
|
|
6514
6511
|
input: void 0,
|
|
6515
6512
|
expected: `"${r}"`,
|
|
@@ -6528,26 +6525,26 @@ function Q(e, t) {
|
|
|
6528
6525
|
});
|
|
6529
6526
|
}
|
|
6530
6527
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6531
|
-
function
|
|
6532
|
-
return
|
|
6528
|
+
function ii(e, t) {
|
|
6529
|
+
return Zr({
|
|
6533
6530
|
kind: "schema",
|
|
6534
6531
|
type: "optional",
|
|
6535
|
-
reference:
|
|
6532
|
+
reference: ii,
|
|
6536
6533
|
expects: `(${e.expects} | undefined)`,
|
|
6537
6534
|
async: !1,
|
|
6538
6535
|
wrapped: e,
|
|
6539
6536
|
default: t,
|
|
6540
6537
|
"~run"(e, t) {
|
|
6541
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6538
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ $r(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6542
6539
|
}
|
|
6543
6540
|
});
|
|
6544
6541
|
}
|
|
6545
6542
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6546
|
-
function
|
|
6547
|
-
return
|
|
6543
|
+
function ai(e, t, n) {
|
|
6544
|
+
return Zr({
|
|
6548
6545
|
kind: "schema",
|
|
6549
6546
|
type: "record",
|
|
6550
|
-
reference:
|
|
6547
|
+
reference: ai,
|
|
6551
6548
|
expects: "Object",
|
|
6552
6549
|
async: !1,
|
|
6553
6550
|
key: e,
|
|
@@ -6557,7 +6554,7 @@ function oi(e, t, n) {
|
|
|
6557
6554
|
let n = e.value;
|
|
6558
6555
|
if (n && typeof n == "object") {
|
|
6559
6556
|
e.typed = !0, e.value = {};
|
|
6560
|
-
for (let r in n) if (/* @__PURE__ */
|
|
6557
|
+
for (let r in n) if (/* @__PURE__ */ Yr(n, r)) {
|
|
6561
6558
|
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
6562
6559
|
if (a.issues) {
|
|
6563
6560
|
let o = {
|
|
@@ -6597,7 +6594,7 @@ function oi(e, t, n) {
|
|
|
6597
6594
|
}
|
|
6598
6595
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6599
6596
|
function $(e) {
|
|
6600
|
-
return
|
|
6597
|
+
return Zr({
|
|
6601
6598
|
kind: "schema",
|
|
6602
6599
|
type: "string",
|
|
6603
6600
|
reference: $,
|
|
@@ -6610,19 +6607,19 @@ function $(e) {
|
|
|
6610
6607
|
});
|
|
6611
6608
|
}
|
|
6612
6609
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6613
|
-
function
|
|
6610
|
+
function oi(e) {
|
|
6614
6611
|
let t;
|
|
6615
6612
|
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
6616
6613
|
else t = n.issues;
|
|
6617
6614
|
return t;
|
|
6618
6615
|
}
|
|
6619
6616
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6620
|
-
function
|
|
6621
|
-
return
|
|
6617
|
+
function si(e, t) {
|
|
6618
|
+
return Zr({
|
|
6622
6619
|
kind: "schema",
|
|
6623
6620
|
type: "union",
|
|
6624
|
-
reference:
|
|
6625
|
-
expects: /* @__PURE__ */
|
|
6621
|
+
reference: si,
|
|
6622
|
+
expects: /* @__PURE__ */ Xr(e.map((e) => e.expects), "|"),
|
|
6626
6623
|
async: !1,
|
|
6627
6624
|
options: e,
|
|
6628
6625
|
message: t,
|
|
@@ -6641,29 +6638,29 @@ function ci(e, t) {
|
|
|
6641
6638
|
if (n) return n;
|
|
6642
6639
|
if (r) {
|
|
6643
6640
|
if (r.length === 1) return r[0];
|
|
6644
|
-
X(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6641
|
+
X(this, "type", e, t, { issues: /* @__PURE__ */ oi(r) }), e.typed = !0;
|
|
6645
6642
|
} else if (i?.length === 1) return i[0];
|
|
6646
|
-
else X(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6643
|
+
else X(this, "type", e, t, { issues: /* @__PURE__ */ oi(i) });
|
|
6647
6644
|
return e;
|
|
6648
6645
|
}
|
|
6649
6646
|
});
|
|
6650
6647
|
}
|
|
6651
|
-
var
|
|
6648
|
+
var ci = /* @__PURE__ */ Q({
|
|
6652
6649
|
en: /* @__PURE__ */ $(),
|
|
6653
6650
|
es: /* @__PURE__ */ $()
|
|
6654
|
-
}),
|
|
6651
|
+
}), li = {
|
|
6655
6652
|
id: /* @__PURE__ */ $(),
|
|
6656
6653
|
label: /* @__PURE__ */ Q({
|
|
6657
|
-
en: /* @__PURE__ */
|
|
6658
|
-
es: /* @__PURE__ */
|
|
6654
|
+
en: /* @__PURE__ */ ii(/* @__PURE__ */ $()),
|
|
6655
|
+
es: /* @__PURE__ */ ii(/* @__PURE__ */ $())
|
|
6659
6656
|
}),
|
|
6660
6657
|
description: /* @__PURE__ */ Q({
|
|
6661
|
-
en: /* @__PURE__ */
|
|
6662
|
-
es: /* @__PURE__ */
|
|
6658
|
+
en: /* @__PURE__ */ ii(/* @__PURE__ */ $()),
|
|
6659
|
+
es: /* @__PURE__ */ ii(/* @__PURE__ */ $())
|
|
6663
6660
|
}),
|
|
6664
6661
|
icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6665
6662
|
iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $())
|
|
6666
|
-
},
|
|
6663
|
+
}, ui = (e) => /* @__PURE__ */ si(e.map((e) => /* @__PURE__ */ ni(e))), di = ui([
|
|
6667
6664
|
"app",
|
|
6668
6665
|
"connector",
|
|
6669
6666
|
"connectorConnection",
|
|
@@ -6685,33 +6682,33 @@ var li = /* @__PURE__ */ Q({
|
|
|
6685
6682
|
"presenter",
|
|
6686
6683
|
"presenterPresentation",
|
|
6687
6684
|
"tool"
|
|
6688
|
-
]),
|
|
6685
|
+
]), fi = ui([
|
|
6689
6686
|
"danger",
|
|
6690
6687
|
"success",
|
|
6691
6688
|
"warning"
|
|
6692
|
-
]),
|
|
6689
|
+
]), pi = ui([
|
|
6693
6690
|
"alpha",
|
|
6694
6691
|
"beta",
|
|
6695
6692
|
"releaseCandidate",
|
|
6696
6693
|
"generalAvailability"
|
|
6697
|
-
]),
|
|
6698
|
-
color:
|
|
6694
|
+
]), mi = /* @__PURE__ */ Q({
|
|
6695
|
+
color: fi,
|
|
6699
6696
|
label: /* @__PURE__ */ $()
|
|
6700
|
-
}),
|
|
6701
|
-
...
|
|
6702
|
-
typeId:
|
|
6703
|
-
},
|
|
6704
|
-
...
|
|
6705
|
-
order: /* @__PURE__ */
|
|
6697
|
+
}), hi = {
|
|
6698
|
+
...li,
|
|
6699
|
+
typeId: di
|
|
6700
|
+
}, gi = /* @__PURE__ */ Q({
|
|
6701
|
+
...hi,
|
|
6702
|
+
order: /* @__PURE__ */ ri(),
|
|
6706
6703
|
path: /* @__PURE__ */ $()
|
|
6707
|
-
}),
|
|
6708
|
-
...
|
|
6709
|
-
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6710
|
-
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6711
|
-
status: /* @__PURE__ */ Z(
|
|
6712
|
-
statusId: /* @__PURE__ */ Z(
|
|
6704
|
+
}), _i = {
|
|
6705
|
+
...hi,
|
|
6706
|
+
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ ri()),
|
|
6707
|
+
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ ri()),
|
|
6708
|
+
status: /* @__PURE__ */ Z(mi),
|
|
6709
|
+
statusId: /* @__PURE__ */ Z(pi)
|
|
6713
6710
|
};
|
|
6714
|
-
({ ...
|
|
6711
|
+
({ ..._i }), ui([
|
|
6715
6712
|
"app",
|
|
6716
6713
|
"engine",
|
|
6717
6714
|
"connector",
|
|
@@ -6721,17 +6718,17 @@ var li = /* @__PURE__ */ Q({
|
|
|
6721
6718
|
]);
|
|
6722
6719
|
//#endregion
|
|
6723
6720
|
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-B_EBeUaj.js
|
|
6724
|
-
var
|
|
6725
|
-
...
|
|
6721
|
+
var vi = {
|
|
6722
|
+
..._i,
|
|
6726
6723
|
vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6727
6724
|
vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6728
6725
|
vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6729
6726
|
version: /* @__PURE__ */ $()
|
|
6730
6727
|
};
|
|
6731
|
-
({ ...
|
|
6728
|
+
({ ...vi });
|
|
6732
6729
|
//#endregion
|
|
6733
6730
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
6734
|
-
var
|
|
6731
|
+
var yi = ui([
|
|
6735
6732
|
"abortOperation",
|
|
6736
6733
|
"auditObjectContent",
|
|
6737
6734
|
"createObject",
|
|
@@ -6747,38 +6744,38 @@ var bi = di([
|
|
|
6747
6744
|
"retrieveChunks",
|
|
6748
6745
|
"retrieveRecords",
|
|
6749
6746
|
"upsertRecords"
|
|
6750
|
-
]),
|
|
6747
|
+
]), bi = ui([
|
|
6751
6748
|
"application",
|
|
6752
6749
|
"curatedDataset",
|
|
6753
6750
|
"database",
|
|
6754
6751
|
"fileStore"
|
|
6755
|
-
]),
|
|
6752
|
+
]), xi = /* @__PURE__ */ Q({ label: ci }), Si = ui([
|
|
6756
6753
|
"bidirectional",
|
|
6757
6754
|
"destination",
|
|
6758
6755
|
"source"
|
|
6759
|
-
]),
|
|
6760
|
-
authMethodId:
|
|
6756
|
+
]), Ci = /* @__PURE__ */ Q({ label: ci }), wi = /* @__PURE__ */ Q({
|
|
6757
|
+
authMethodId: ui([
|
|
6761
6758
|
"apiKey",
|
|
6762
6759
|
"disabled",
|
|
6763
6760
|
"oAuth2",
|
|
6764
6761
|
"none"
|
|
6765
6762
|
]),
|
|
6766
|
-
activeConnectionCount: /* @__PURE__ */
|
|
6767
|
-
canDescribe: /* @__PURE__ */
|
|
6768
|
-
id: /* @__PURE__ */
|
|
6769
|
-
label: /* @__PURE__ */
|
|
6770
|
-
maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6771
|
-
params: /* @__PURE__ */
|
|
6772
|
-
}),
|
|
6773
|
-
...
|
|
6774
|
-
typeId: /* @__PURE__ */
|
|
6775
|
-
actionNames: /* @__PURE__ */
|
|
6776
|
-
category: /* @__PURE__ */ Z(
|
|
6777
|
-
categoryId:
|
|
6778
|
-
implementations: /* @__PURE__ */
|
|
6779
|
-
usage: /* @__PURE__ */ Z(
|
|
6780
|
-
usageId: /* @__PURE__ */ Z(
|
|
6781
|
-
}),
|
|
6763
|
+
activeConnectionCount: /* @__PURE__ */ ii(/* @__PURE__ */ ri()),
|
|
6764
|
+
canDescribe: /* @__PURE__ */ ii(/* @__PURE__ */ ti()),
|
|
6765
|
+
id: /* @__PURE__ */ ii(/* @__PURE__ */ $()),
|
|
6766
|
+
label: /* @__PURE__ */ ii(ci),
|
|
6767
|
+
maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ ri()),
|
|
6768
|
+
params: /* @__PURE__ */ ii(/* @__PURE__ */ ei(/* @__PURE__ */ ai(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
|
|
6769
|
+
}), Ti = /* @__PURE__ */ Q({
|
|
6770
|
+
...vi,
|
|
6771
|
+
typeId: /* @__PURE__ */ ni("connector"),
|
|
6772
|
+
actionNames: /* @__PURE__ */ ei(yi),
|
|
6773
|
+
category: /* @__PURE__ */ Z(xi),
|
|
6774
|
+
categoryId: bi,
|
|
6775
|
+
implementations: /* @__PURE__ */ ai(/* @__PURE__ */ $(), wi),
|
|
6776
|
+
usage: /* @__PURE__ */ Z(Ci),
|
|
6777
|
+
usageId: /* @__PURE__ */ Z(Si)
|
|
6778
|
+
}), Ei = {
|
|
6782
6779
|
abortOperation: "Abort Operation",
|
|
6783
6780
|
auditObjectContent: "Audit Object Content",
|
|
6784
6781
|
createObject: "Create Object",
|
|
@@ -6794,12 +6791,12 @@ var bi = di([
|
|
|
6794
6791
|
retrieveChunks: "Retrieve Chunks",
|
|
6795
6792
|
retrieveRecords: "Retrieve Records",
|
|
6796
6793
|
upsertRecords: "Upsert Records"
|
|
6797
|
-
},
|
|
6794
|
+
}, Di = /* @__PURE__ */ new Set([
|
|
6798
6795
|
"createObject",
|
|
6799
6796
|
"dropObject",
|
|
6800
6797
|
"removeRecords",
|
|
6801
6798
|
"upsertRecords"
|
|
6802
|
-
]),
|
|
6799
|
+
]), Oi = /* @__PURE__ */ new Set([
|
|
6803
6800
|
"auditObjectContent",
|
|
6804
6801
|
"findObject",
|
|
6805
6802
|
"getInfo",
|
|
@@ -6810,46 +6807,46 @@ var bi = di([
|
|
|
6810
6807
|
"retrieveChunks",
|
|
6811
6808
|
"retrieveRecords"
|
|
6812
6809
|
]);
|
|
6813
|
-
function
|
|
6810
|
+
function ki(e) {
|
|
6814
6811
|
let t = !1, n = !1;
|
|
6815
|
-
for (let r of e)
|
|
6812
|
+
for (let r of e) Oi.has(r) && (t = !0), Di.has(r) && (n = !0);
|
|
6816
6813
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "source";
|
|
6817
6814
|
}
|
|
6818
|
-
function
|
|
6815
|
+
function Ai(e) {
|
|
6819
6816
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
6820
6817
|
n += "|:----|:-------:|\n";
|
|
6821
|
-
for (let e of Object.keys(
|
|
6818
|
+
for (let e of Object.keys(Ei)) n += `| ${Ei[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
6822
6819
|
return n;
|
|
6823
6820
|
}
|
|
6824
6821
|
//#endregion
|
|
6825
6822
|
//#region src/actions/documentActions.ts
|
|
6826
|
-
var
|
|
6823
|
+
var ji = "<!-- CONNECTOR_ACTIONS_START -->", Mi = "<!-- CONNECTOR_ACTIONS_END -->", Ni = "Connectors conform to a unified interface contract by implementing a specific subset of standard actions. These standardised actions allow the DPUse application to interact with any underlying data source in the same way, enabling Connectors to be built independently and loaded dynamically at runtime.", Pi = {
|
|
6827
6824
|
source: "This connector is a Source connector that supports only read actions. Connectors can also function as a Destination (write-only) or Bidirectional (read/write), depending on the actions they support.",
|
|
6828
6825
|
destination: "This connector is a Destination connector that supports only write actions. Connectors can also function as a Source (read-only) or Bidirectional (read/write), depending on the actions they support.",
|
|
6829
6826
|
bidirectional: "This connector is a Bidirectional connector that supports both read and write actions. Connectors can also function as a Source (read-only) or Destination (write-only), depending on the actions they support."
|
|
6830
|
-
},
|
|
6831
|
-
async function
|
|
6827
|
+
}, Fi = "The table below lists all connector actions and highlights those supported by this connector.";
|
|
6828
|
+
async function Ii() {
|
|
6832
6829
|
try {
|
|
6833
6830
|
K("Document Actions"), J("1️⃣ Insert actions description and table into 'README.md'");
|
|
6834
|
-
let e = (await W("config.json")).actionNames ?? [], t =
|
|
6835
|
-
await
|
|
6831
|
+
let e = (await W("config.json")).actionNames ?? [], t = ki(e), n = Ai(e), r = `${Ni}\n\n${Pi[t]} ${Fi}\n\n${n}`;
|
|
6832
|
+
await zn("README.md", Wn(await G("./README.md"), r, ji, Mi)), q("Actions documented");
|
|
6836
6833
|
} catch (e) {
|
|
6837
6834
|
console.error("❌ Error documenting actions", e), process.exit(1);
|
|
6838
6835
|
}
|
|
6839
6836
|
}
|
|
6840
6837
|
//#endregion
|
|
6841
6838
|
//#region src/actions/documentOpening.ts
|
|
6842
|
-
var
|
|
6843
|
-
async function
|
|
6839
|
+
var Li = "<!-- OPENING_START -->", Ri = "<!-- OPENING_END -->";
|
|
6840
|
+
async function zi() {
|
|
6844
6841
|
try {
|
|
6845
6842
|
K("Document Opening"), J("1️⃣ Insert opening content into 'README.md'");
|
|
6846
|
-
let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } =
|
|
6847
|
-
await
|
|
6843
|
+
let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } = Bi(e), i = Ui(n, r, Vi(e), Hi(t));
|
|
6844
|
+
await zn("README.md", Wn(await G("./README.md"), i, Li, Ri)), q("Opening documented");
|
|
6848
6845
|
} catch (e) {
|
|
6849
6846
|
console.error("❌ Error documenting opening", e), process.exit(1);
|
|
6850
6847
|
}
|
|
6851
6848
|
}
|
|
6852
|
-
function
|
|
6849
|
+
function Bi(e) {
|
|
6853
6850
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6854
6851
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document opening.");
|
|
6855
6852
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6859,17 +6856,17 @@ function Vi(e) {
|
|
|
6859
6856
|
repo: i[2]
|
|
6860
6857
|
};
|
|
6861
6858
|
}
|
|
6862
|
-
function
|
|
6859
|
+
function Vi(e) {
|
|
6863
6860
|
let t = e.license;
|
|
6864
6861
|
if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
|
|
6865
6862
|
return t;
|
|
6866
6863
|
}
|
|
6867
|
-
function
|
|
6864
|
+
function Hi(e) {
|
|
6868
6865
|
let t = e.description.en;
|
|
6869
6866
|
if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
|
|
6870
6867
|
return t;
|
|
6871
6868
|
}
|
|
6872
|
-
function
|
|
6869
|
+
function Ui(e, t, n, r) {
|
|
6873
6870
|
let i = `https://github.com/${e}/${t}`;
|
|
6874
6871
|
return `[}-blue.svg)](./LICENSE)
|
|
6875
6872
|
[](${i}/releases/latest)
|
|
@@ -6889,31 +6886,31 @@ ${r}`;
|
|
|
6889
6886
|
}
|
|
6890
6887
|
//#endregion
|
|
6891
6888
|
//#region src/actions/documentUsage.ts
|
|
6892
|
-
var
|
|
6893
|
-
async function
|
|
6889
|
+
var Wi = "<!-- USAGE_START -->", Gi = "<!-- USAGE_END -->";
|
|
6890
|
+
async function Ki() {
|
|
6894
6891
|
try {
|
|
6895
6892
|
K("Document Usage"), J("1️⃣ Insert usage content into 'README.md'");
|
|
6896
|
-
let e = await W("package.json"), t =
|
|
6897
|
-
await
|
|
6893
|
+
let e = await W("package.json"), t = qi(e), n = Xi(t, Ji(t), Yi(e.engines?.node), Yi(e.engines?.npm), Yi(e.devDependencies?.typescript));
|
|
6894
|
+
await zn("README.md", Wn(await G("./README.md"), n, Wi, Gi)), q("Usage documented");
|
|
6898
6895
|
} catch (e) {
|
|
6899
6896
|
console.error("❌ Error documenting usage", e), process.exit(1);
|
|
6900
6897
|
}
|
|
6901
6898
|
}
|
|
6902
|
-
function
|
|
6899
|
+
function qi(e) {
|
|
6903
6900
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6904
6901
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
|
|
6905
6902
|
return n.replace(/^git\+/, "");
|
|
6906
6903
|
}
|
|
6907
|
-
function
|
|
6904
|
+
function Ji(e) {
|
|
6908
6905
|
return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
|
|
6909
6906
|
}
|
|
6910
|
-
function
|
|
6907
|
+
function Yi(e) {
|
|
6911
6908
|
if (e == null) throw Error("package.json version range is required to document usage.");
|
|
6912
6909
|
let t = /\d+(?:\.\d+)*/.exec(e);
|
|
6913
6910
|
if (t == null) throw Error(`Unable to parse version from '${e}'.`);
|
|
6914
6911
|
return t[0];
|
|
6915
6912
|
}
|
|
6916
|
-
function
|
|
6913
|
+
function Xi(e, t, n, r, i) {
|
|
6917
6914
|
return `This connector is automatically uploaded to the DPUse Engine cloud once released and becomes instantly available to all new browser app instances, with existing instances notified of the update.
|
|
6918
6915
|
|
|
6919
6916
|
You may view or clone this repository for your own purposes, such as building a new, similar connector, though there is currently no process to accept third-party connectors into DPUse at this stage. Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.
|
|
@@ -6928,7 +6925,7 @@ _Requires [Node.js](https://nodejs.org/) ${n} or later, [npm](https://www.npmjs.
|
|
|
6928
6925
|
}
|
|
6929
6926
|
//#endregion
|
|
6930
6927
|
//#region src/actions/formatCode.ts
|
|
6931
|
-
async function
|
|
6928
|
+
async function Zi() {
|
|
6932
6929
|
try {
|
|
6933
6930
|
K("Format Code"), await U("1️⃣ Format", "prettier", [
|
|
6934
6931
|
"--write",
|
|
@@ -6943,7 +6940,7 @@ async function Qi() {
|
|
|
6943
6940
|
}
|
|
6944
6941
|
//#endregion
|
|
6945
6942
|
//#region src/actions/lintCode.ts
|
|
6946
|
-
async function
|
|
6943
|
+
async function Qi() {
|
|
6947
6944
|
try {
|
|
6948
6945
|
K("Lint Code"), await U("1️⃣ Lint", "eslint", ["."]), q("Code linted");
|
|
6949
6946
|
} catch (e) {
|
|
@@ -6952,7 +6949,7 @@ async function $i() {
|
|
|
6952
6949
|
}
|
|
6953
6950
|
//#endregion
|
|
6954
6951
|
//#region src/utilities/cloudflare.ts
|
|
6955
|
-
async function
|
|
6952
|
+
async function $i() {
|
|
6956
6953
|
let e = await W("config.json"), t = {
|
|
6957
6954
|
body: JSON.stringify(e),
|
|
6958
6955
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6960,11 +6957,11 @@ async function ea() {
|
|
|
6960
6957
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6961
6958
|
if (!n.ok) throw Error(await n.text());
|
|
6962
6959
|
}
|
|
6963
|
-
async function
|
|
6960
|
+
async function ea(e, t) {
|
|
6964
6961
|
async function n(e, t, r) {
|
|
6965
6962
|
for (let i of r) {
|
|
6966
6963
|
let r = `${e}/${i}`, a = `${t}/${i}`;
|
|
6967
|
-
(await
|
|
6964
|
+
(await Vn(r)).isDirectory() ? await n(r, a, await Pn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Fn(void 0, "wrangler", [
|
|
6968
6965
|
"r2",
|
|
6969
6966
|
"object",
|
|
6970
6967
|
"put",
|
|
@@ -6978,7 +6975,7 @@ async function ta(e, t) {
|
|
|
6978
6975
|
let r = await Pn(`${e}/${t}/`);
|
|
6979
6976
|
await n(`${e}/${t}`, t, r);
|
|
6980
6977
|
}
|
|
6981
|
-
async function
|
|
6978
|
+
async function ta(e) {
|
|
6982
6979
|
let t = e.id, n = {
|
|
6983
6980
|
body: JSON.stringify(e),
|
|
6984
6981
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6986,7 +6983,7 @@ async function na(e) {
|
|
|
6986
6983
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
6987
6984
|
if (!r.ok) throw Error(await r.text());
|
|
6988
6985
|
}
|
|
6989
|
-
async function
|
|
6986
|
+
async function na(e, t) {
|
|
6990
6987
|
let n = `v${e.version ?? "unknown"}`;
|
|
6991
6988
|
async function r(e, r = "") {
|
|
6992
6989
|
let i = await Pn(e, { withFileTypes: !0 });
|
|
@@ -7010,24 +7007,24 @@ async function ra(e, t) {
|
|
|
7010
7007
|
}
|
|
7011
7008
|
//#endregion
|
|
7012
7009
|
//#region node_modules/valibot/dist/index.mjs
|
|
7013
|
-
var
|
|
7010
|
+
var ra = {
|
|
7014
7011
|
lang: void 0,
|
|
7015
7012
|
message: void 0,
|
|
7016
7013
|
abortEarly: void 0,
|
|
7017
7014
|
abortPipeEarly: void 0
|
|
7018
7015
|
};
|
|
7019
7016
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7020
|
-
function
|
|
7017
|
+
function ia(e) {
|
|
7021
7018
|
return e ? {
|
|
7022
7019
|
lang: e?.lang ?? void 0,
|
|
7023
7020
|
message: e?.message,
|
|
7024
7021
|
abortEarly: e?.abortEarly ?? void 0,
|
|
7025
7022
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
7026
|
-
} :
|
|
7023
|
+
} : ra;
|
|
7027
7024
|
}
|
|
7028
7025
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7029
|
-
function
|
|
7030
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
7026
|
+
function aa(e, t, n) {
|
|
7027
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ ia(n));
|
|
7031
7028
|
return {
|
|
7032
7029
|
typed: r.typed,
|
|
7033
7030
|
success: !r.issues,
|
|
@@ -7037,56 +7034,56 @@ function oa(e, t, n) {
|
|
|
7037
7034
|
}
|
|
7038
7035
|
//#endregion
|
|
7039
7036
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
|
|
7040
|
-
var
|
|
7037
|
+
var oa = ui([
|
|
7041
7038
|
"list",
|
|
7042
7039
|
"render",
|
|
7043
7040
|
"setColorMode"
|
|
7044
|
-
]),
|
|
7045
|
-
...
|
|
7046
|
-
typeId: /* @__PURE__ */
|
|
7047
|
-
actionNames: /* @__PURE__ */
|
|
7048
|
-
presentations: /* @__PURE__ */
|
|
7041
|
+
]), sa = /* @__PURE__ */ Q({
|
|
7042
|
+
...vi,
|
|
7043
|
+
typeId: /* @__PURE__ */ ni("presenter"),
|
|
7044
|
+
actionNames: /* @__PURE__ */ ei(oa),
|
|
7045
|
+
presentations: /* @__PURE__ */ ei(gi)
|
|
7049
7046
|
});
|
|
7050
7047
|
//#endregion
|
|
7051
7048
|
//#region src/actions/manageProject.ts
|
|
7052
|
-
async function
|
|
7049
|
+
async function ca() {
|
|
7053
7050
|
try {
|
|
7054
7051
|
K("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), q("Project built");
|
|
7055
7052
|
} catch (e) {
|
|
7056
7053
|
console.error("❌ Error building project", e), process.exit(1);
|
|
7057
7054
|
}
|
|
7058
7055
|
}
|
|
7059
|
-
async function
|
|
7056
|
+
async function la() {
|
|
7060
7057
|
try {
|
|
7061
7058
|
K("Publish Project");
|
|
7062
|
-
let e = await W("package.json"), t = await W("config.json"), n =
|
|
7063
|
-
if (n.typeId === "app") J("1️⃣ Register module"), await
|
|
7064
|
-
else if (n.typeId === "engine") J("1️⃣ Register module"), await
|
|
7059
|
+
let e = await W("package.json"), t = await W("config.json"), n = Bn(t.id);
|
|
7060
|
+
if (n.typeId === "app") J("1️⃣ Register module"), await $i();
|
|
7061
|
+
else if (n.typeId === "engine") J("1️⃣ Register module"), await na(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await ta(t);
|
|
7065
7062
|
else if (n.uploadGroupName === void 0) J("1️⃣ Publishing NOT required");
|
|
7066
7063
|
else {
|
|
7067
7064
|
J("1️⃣ Register module");
|
|
7068
7065
|
let r = t.id.split("-").slice(2).join("-");
|
|
7069
|
-
await
|
|
7066
|
+
await na(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await ta(t);
|
|
7070
7067
|
}
|
|
7071
7068
|
q(`Project version '${e.version ?? "unknown"}' published.`);
|
|
7072
7069
|
} catch (e) {
|
|
7073
7070
|
console.error("❌ Error publishing project", e), process.exit(1);
|
|
7074
7071
|
}
|
|
7075
7072
|
}
|
|
7076
|
-
async function
|
|
7073
|
+
async function ua() {
|
|
7077
7074
|
try {
|
|
7078
7075
|
K("Release Project");
|
|
7079
7076
|
let e = await W("package.json"), t = await W("config.json");
|
|
7080
|
-
await
|
|
7081
|
-
let n =
|
|
7077
|
+
await _a("1️⃣ ", e);
|
|
7078
|
+
let n = Bn(t.id);
|
|
7082
7079
|
switch (n.typeId) {
|
|
7083
7080
|
case "connector":
|
|
7084
|
-
t = await
|
|
7081
|
+
t = await fa("2️⃣ ", e);
|
|
7085
7082
|
break;
|
|
7086
7083
|
case "presenter":
|
|
7087
|
-
t = await
|
|
7084
|
+
t = await pa("2️⃣ ", e);
|
|
7088
7085
|
break;
|
|
7089
|
-
default: t = await
|
|
7086
|
+
default: t = await da("2️⃣ ", e);
|
|
7090
7087
|
}
|
|
7091
7088
|
if (await U("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
|
|
7092
7089
|
"commit",
|
|
@@ -7096,64 +7093,60 @@ async function da() {
|
|
|
7096
7093
|
"push",
|
|
7097
7094
|
"origin",
|
|
7098
7095
|
"main:main"
|
|
7099
|
-
]), n.typeId === "app") J("7️⃣ Register module"), await
|
|
7100
|
-
else if (n.typeId === "engine") J("7️⃣ Register module"), await
|
|
7096
|
+
]), n.typeId === "app") J("7️⃣ Register module"), await $i();
|
|
7097
|
+
else if (n.typeId === "engine") J("7️⃣ Register module"), await na(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await ta(t);
|
|
7101
7098
|
else if (n.uploadGroupName === void 0) J("7️⃣ Registration NOT required");
|
|
7102
7099
|
else {
|
|
7103
7100
|
J("7️⃣ Register module");
|
|
7104
7101
|
let r = t.id.split("-").slice(2).join("-");
|
|
7105
|
-
await
|
|
7102
|
+
await na(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await ta(t);
|
|
7106
7103
|
}
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
await Rn(e);
|
|
7117
|
-
}
|
|
7118
|
-
} else J(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
7119
|
-
q(`Project version '${e.version ?? "unknown"}' released.`);
|
|
7104
|
+
n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
|
|
7105
|
+
"release",
|
|
7106
|
+
"create",
|
|
7107
|
+
`v${e.version ?? "unknown"}`,
|
|
7108
|
+
"--target",
|
|
7109
|
+
"main",
|
|
7110
|
+
"--generate-notes",
|
|
7111
|
+
"--latest"
|
|
7112
|
+
]) : J(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`), q(`Project version '${e.version ?? "unknown"}' released.`);
|
|
7120
7113
|
} catch (e) {
|
|
7121
7114
|
console.error("❌ Error releasing project", e), process.exit(1);
|
|
7122
7115
|
}
|
|
7123
7116
|
}
|
|
7124
|
-
async function
|
|
7117
|
+
async function da(e, t) {
|
|
7125
7118
|
J(`${e} Build project configuration`);
|
|
7126
7119
|
let n = await W("config.json");
|
|
7127
|
-
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
|
|
7120
|
+
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;
|
|
7128
7121
|
}
|
|
7129
|
-
async function
|
|
7122
|
+
async function fa(e, t) {
|
|
7130
7123
|
J(`${e} Build connector project configuration`);
|
|
7131
|
-
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */
|
|
7124
|
+
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ aa(Ti, n);
|
|
7132
7125
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7133
|
-
let a =
|
|
7134
|
-
return await
|
|
7126
|
+
let a = Hn(r);
|
|
7127
|
+
return await ma(t, n, a, ki(a));
|
|
7135
7128
|
}
|
|
7136
|
-
async function
|
|
7129
|
+
async function pa(e, t) {
|
|
7137
7130
|
J(`${e} Build presenter project configuration`);
|
|
7138
|
-
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */
|
|
7131
|
+
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ aa(sa, n);
|
|
7139
7132
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7140
|
-
return await
|
|
7133
|
+
return await ma(t, n, Hn(r));
|
|
7141
7134
|
}
|
|
7142
|
-
async function
|
|
7143
|
-
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
|
|
7135
|
+
async function ma(e, t, n, r) {
|
|
7136
|
+
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;
|
|
7144
7137
|
}
|
|
7145
|
-
async function
|
|
7138
|
+
async function ha() {
|
|
7146
7139
|
try {
|
|
7147
7140
|
K("Synchronise Project with GitHub");
|
|
7148
7141
|
let e = await W("package.json"), t = await W("config.json");
|
|
7149
|
-
switch (await
|
|
7142
|
+
switch (await _a("1️⃣ ", e), Bn(t.id).typeId) {
|
|
7150
7143
|
case "connector":
|
|
7151
|
-
await
|
|
7144
|
+
await fa("2️⃣ ", e);
|
|
7152
7145
|
break;
|
|
7153
7146
|
case "presenter":
|
|
7154
|
-
await
|
|
7147
|
+
await pa("2️⃣ ", e);
|
|
7155
7148
|
break;
|
|
7156
|
-
default: await
|
|
7149
|
+
default: await da("2️⃣ ", e);
|
|
7157
7150
|
}
|
|
7158
7151
|
await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
|
|
7159
7152
|
"commit",
|
|
@@ -7168,22 +7161,22 @@ async function ga() {
|
|
|
7168
7161
|
console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
|
|
7169
7162
|
}
|
|
7170
7163
|
}
|
|
7171
|
-
function
|
|
7164
|
+
function ga() {
|
|
7172
7165
|
try {
|
|
7173
7166
|
K("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
7174
7167
|
} catch (e) {
|
|
7175
7168
|
console.error("❌ Error testing project", e), process.exit(1);
|
|
7176
7169
|
}
|
|
7177
7170
|
}
|
|
7178
|
-
async function
|
|
7171
|
+
async function _a(e, t, n = "./") {
|
|
7179
7172
|
if (J(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
7180
7173
|
else {
|
|
7181
7174
|
let e = t.version, n = t.version.split(".");
|
|
7182
7175
|
t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
|
|
7183
7176
|
}
|
|
7184
|
-
await
|
|
7177
|
+
await Rn(`${n}package.json`, t);
|
|
7185
7178
|
}
|
|
7186
7179
|
//#endregion
|
|
7187
|
-
export {
|
|
7180
|
+
export { Gn as auditDependencies, ca as buildProject, Kn as checkConfigFiles, Qn as checkDependencies, Ii as documentActions, ar as documentBundleSizes, Dr as documentDependencies, Br as documentGovernance, zi as documentOpening, Ki as documentUsage, Zi as formatCode, Qi as lintCode, la as publishProject, ua as releaseProject, ha as syncProjectWithGitHub, ga as testProject, ea as uploadDirectoryToR2 };
|
|
7188
7181
|
|
|
7189
7182
|
//# sourceMappingURL=dpuse-development.es.js.map
|