@dpuse/dpuse-development 0.3.712 → 0.3.716
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 +286 -297
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +16 -4
|
@@ -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 = {};
|
|
@@ -5978,99 +5971,99 @@ async function $n() {
|
|
|
5978
5971
|
"install",
|
|
5979
5972
|
"--prefer-online",
|
|
5980
5973
|
"--no-strict-allow-scripts"
|
|
5981
|
-
])
|
|
5982
|
-
let t = await
|
|
5983
|
-
t.length > 0 ?
|
|
5974
|
+
]);
|
|
5975
|
+
let t = await $n();
|
|
5976
|
+
t.length > 0 ? await U("4️⃣ 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
|
+
]) : J("4️⃣ No pinned install-script approvals to move"), process.platform === "darwin" ? await U("5️⃣ Remove unused install-script entries", "npm", ["install-scripts", "prune"]) : J("5️⃣ Skipped removing unused install-script entries (macOS only)"), t.length > 0 && await U("6️⃣ Run install scripts skipped in step 3", "npm", [
|
|
5988
5981
|
"rebuild",
|
|
5989
5982
|
...t,
|
|
5990
5983
|
"--no-strict-allow-scripts"
|
|
5991
|
-
])
|
|
5984
|
+
]), await U("7️⃣ Confirm every install script is reviewed", "npm", ["install", "--strict-allow-scripts"]), q("Dependencies checked");
|
|
5992
5985
|
} catch (e) {
|
|
5993
5986
|
console.error("❌ Error checking dependencies", e), process.exit(1);
|
|
5994
5987
|
}
|
|
5995
5988
|
}
|
|
5996
|
-
async function
|
|
5989
|
+
async function $n() {
|
|
5997
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("@")));
|
|
5998
5991
|
return [...new Set(t)];
|
|
5999
5992
|
}
|
|
6000
5993
|
//#endregion
|
|
6001
5994
|
//#region src/actions/documentBundleSizes.ts
|
|
6002
|
-
var
|
|
6003
|
-
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) {
|
|
6004
5997
|
try {
|
|
6005
5998
|
K("Document Bundle Sizes"), J("1️⃣ Read bundle analysis report");
|
|
6006
5999
|
let t = await W("./bundle-analysis-reports/sonda/index.json");
|
|
6007
6000
|
J("2️⃣ Insert table into 'README.md'");
|
|
6008
|
-
let n =
|
|
6009
|
-
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");
|
|
6010
6003
|
} catch (e) {
|
|
6011
6004
|
console.error("❌ Error documenting bundle sizes", e), process.exit(1);
|
|
6012
6005
|
}
|
|
6013
6006
|
}
|
|
6014
|
-
function
|
|
6015
|
-
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|", "|:------ |:-----------|"];
|
|
6016
6009
|
for (let [e, o] of i) {
|
|
6017
|
-
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);
|
|
6018
6011
|
a.push(...s);
|
|
6019
6012
|
}
|
|
6020
6013
|
return a.join("\n");
|
|
6021
6014
|
}
|
|
6022
|
-
function
|
|
6015
|
+
function sr(e, t, n, r, i) {
|
|
6023
6016
|
let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
|
|
6024
|
-
if (s.size === 1) return [`| ${e} → ${a} → ${
|
|
6025
|
-
let l = [`| ${e} → ${a} | ${
|
|
6026
|
-
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;
|
|
6027
6020
|
}
|
|
6028
|
-
function
|
|
6029
|
-
let a = [`| ${e} | ${
|
|
6021
|
+
function cr(e, t, n, r, i) {
|
|
6022
|
+
let a = [`| ${e} | ${_r(t)} |`];
|
|
6030
6023
|
for (let [e, { sizes: t, files: o }] of n) {
|
|
6031
6024
|
let n = r > 0 ? t.uncompressed / r * 100 : 0;
|
|
6032
6025
|
if (o.size === 1) {
|
|
6033
|
-
let t =
|
|
6034
|
-
a.push(`| ${
|
|
6026
|
+
let t = dr(o);
|
|
6027
|
+
a.push(`| ${nr}${e} → ${t} | ${vr(n)} |`);
|
|
6035
6028
|
continue;
|
|
6036
6029
|
}
|
|
6037
|
-
a.push(`| ${
|
|
6030
|
+
a.push(`| ${nr}${e} | ${vr(n)} |`), i || a.push(...lr(o, `${nr}${nr}`, r));
|
|
6038
6031
|
}
|
|
6039
6032
|
return a;
|
|
6040
6033
|
}
|
|
6041
|
-
function
|
|
6042
|
-
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)} |`);
|
|
6043
6036
|
}
|
|
6044
|
-
function
|
|
6037
|
+
function ur(e) {
|
|
6045
6038
|
let [t] = e;
|
|
6046
6039
|
if (t === void 0) throw Error("Expected exactly one entry");
|
|
6047
6040
|
return t;
|
|
6048
6041
|
}
|
|
6049
|
-
function
|
|
6042
|
+
function dr(e) {
|
|
6050
6043
|
let [t] = e.keys();
|
|
6051
6044
|
if (t === void 0) throw Error("Expected exactly one file");
|
|
6052
6045
|
return t;
|
|
6053
6046
|
}
|
|
6054
|
-
function
|
|
6055
|
-
let t =
|
|
6047
|
+
function fr(e) {
|
|
6048
|
+
let t = pr(e.dependencies), n = /* @__PURE__ */ new Map();
|
|
6056
6049
|
for (let r of e.resources) {
|
|
6057
6050
|
if (r.kind !== "chunk" || !r.parent) continue;
|
|
6058
|
-
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();
|
|
6059
6052
|
n.set(r.parent, o);
|
|
6060
6053
|
let s = o.get(e) ?? {
|
|
6061
|
-
sizes:
|
|
6054
|
+
sizes: yr(),
|
|
6062
6055
|
files: /* @__PURE__ */ new Map()
|
|
6063
6056
|
};
|
|
6064
|
-
o.set(e, s),
|
|
6065
|
-
let c = s.files.get(i) ??
|
|
6066
|
-
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);
|
|
6067
6060
|
}
|
|
6068
6061
|
return n;
|
|
6069
6062
|
}
|
|
6070
|
-
function
|
|
6063
|
+
function pr(e) {
|
|
6071
6064
|
return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
|
|
6072
6065
|
}
|
|
6073
|
-
function
|
|
6066
|
+
function mr(e, t) {
|
|
6074
6067
|
let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
|
|
6075
6068
|
if (n) {
|
|
6076
6069
|
let [t, r] = n;
|
|
@@ -6087,49 +6080,49 @@ function hr(e, t) {
|
|
|
6087
6080
|
file: e.slice(1)
|
|
6088
6081
|
} : e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? {
|
|
6089
6082
|
group: "wasm",
|
|
6090
|
-
file:
|
|
6083
|
+
file: hr(e)
|
|
6091
6084
|
} : {
|
|
6092
6085
|
group: "src",
|
|
6093
|
-
file:
|
|
6086
|
+
file: hr(e)
|
|
6094
6087
|
};
|
|
6095
6088
|
}
|
|
6096
|
-
function
|
|
6089
|
+
function hr(e) {
|
|
6097
6090
|
return e.split("/").at(-1) ?? e;
|
|
6098
6091
|
}
|
|
6099
|
-
function
|
|
6092
|
+
function gr(e) {
|
|
6100
6093
|
return {
|
|
6101
6094
|
uncompressed: e.uncompressed,
|
|
6102
6095
|
brotli: e.brotli ?? 0
|
|
6103
6096
|
};
|
|
6104
6097
|
}
|
|
6105
|
-
function
|
|
6106
|
-
return `${
|
|
6098
|
+
function _r(e) {
|
|
6099
|
+
return `${xr(e.uncompressed)} · brotli ${xr(e.brotli)}`;
|
|
6107
6100
|
}
|
|
6108
|
-
function
|
|
6109
|
-
let t = Math.round(e / 100 *
|
|
6110
|
-
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)}%`;
|
|
6111
6104
|
}
|
|
6112
|
-
function
|
|
6105
|
+
function yr() {
|
|
6113
6106
|
return {
|
|
6114
6107
|
uncompressed: 0,
|
|
6115
6108
|
brotli: 0
|
|
6116
6109
|
};
|
|
6117
6110
|
}
|
|
6118
|
-
function
|
|
6111
|
+
function br(e, t) {
|
|
6119
6112
|
e.uncompressed += t.uncompressed, e.brotli += t.brotli;
|
|
6120
6113
|
}
|
|
6121
|
-
function
|
|
6114
|
+
function xr(e) {
|
|
6122
6115
|
return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
|
|
6123
6116
|
}
|
|
6124
6117
|
//#endregion
|
|
6125
6118
|
//#region src/actions/documentDependencies.ts
|
|
6126
|
-
var
|
|
6127
|
-
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") {
|
|
6128
6121
|
try {
|
|
6129
6122
|
K("Document Dependencies");
|
|
6130
6123
|
let t = await W("package.json");
|
|
6131
6124
|
if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
|
|
6132
|
-
await
|
|
6125
|
+
await Or(t.name), q("Dependencies documented");
|
|
6133
6126
|
return;
|
|
6134
6127
|
}
|
|
6135
6128
|
await Nn("1️⃣ Clear downloaded licenses", "licenses/downloads"), J("2️⃣ Identify production licenses"), await new Promise((n, r) => {
|
|
@@ -6152,38 +6145,38 @@ async function Or(e = "MIT") {
|
|
|
6152
6145
|
"--all",
|
|
6153
6146
|
"--json",
|
|
6154
6147
|
"--omit=dev"
|
|
6155
|
-
], "licenses/licenseTree.json"), await
|
|
6148
|
+
], "licenses/licenseTree.json"), await kr("4️⃣ ", e), q("Dependencies documented");
|
|
6156
6149
|
} catch (e) {
|
|
6157
6150
|
console.error("❌ Error documenting dependencies", e), process.exit(1);
|
|
6158
6151
|
}
|
|
6159
6152
|
}
|
|
6160
|
-
async function
|
|
6153
|
+
async function Or(e) {
|
|
6161
6154
|
J(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
|
|
6162
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.`;
|
|
6163
|
-
await
|
|
6156
|
+
await zn("README.md", Wn(Wn(await G("./README.md"), t, Sr, Cr), "", wr, Tr));
|
|
6164
6157
|
}
|
|
6165
|
-
async function
|
|
6158
|
+
async function kr(e, t) {
|
|
6166
6159
|
J(`${e} Insert licenses into 'README.md'`);
|
|
6167
6160
|
let [n, r] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
|
|
6168
|
-
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));
|
|
6169
6162
|
await Promise.all(i.values().map(async (e) => {
|
|
6170
|
-
let t = await
|
|
6163
|
+
let t = await Nr(e.name, e.installedVersion);
|
|
6171
6164
|
e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
|
|
6172
6165
|
}));
|
|
6173
|
-
let a = `${
|
|
6174
|
-
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);
|
|
6175
6168
|
let o = [];
|
|
6176
|
-
r.dependencies != null &&
|
|
6177
|
-
let s = `${
|
|
6178
|
-
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));
|
|
6179
6172
|
}
|
|
6180
|
-
function
|
|
6181
|
-
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.`;
|
|
6182
6175
|
}
|
|
6183
|
-
function
|
|
6176
|
+
function jr(e) {
|
|
6184
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))}`;
|
|
6185
6178
|
}
|
|
6186
|
-
function
|
|
6179
|
+
function Mr(e, t) {
|
|
6187
6180
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6188
6181
|
return {
|
|
6189
6182
|
name: r,
|
|
@@ -6197,7 +6190,7 @@ function Nr(e, t) {
|
|
|
6197
6190
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6198
6191
|
};
|
|
6199
6192
|
}
|
|
6200
|
-
async function
|
|
6193
|
+
async function Nr(e, t) {
|
|
6201
6194
|
try {
|
|
6202
6195
|
let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
|
|
6203
6196
|
if (n.ok) {
|
|
@@ -6215,25 +6208,25 @@ async function Pr(e, t) {
|
|
|
6215
6208
|
publishedDate: ""
|
|
6216
6209
|
};
|
|
6217
6210
|
}
|
|
6218
|
-
function
|
|
6211
|
+
function Pr(e) {
|
|
6219
6212
|
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
|
|
6220
6213
|
return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
|
|
6221
6214
|
}
|
|
6222
|
-
function
|
|
6215
|
+
function Fr(e, t, n, r) {
|
|
6223
6216
|
let i = " ".repeat(r);
|
|
6224
6217
|
for (let [a, o] of Object.entries(e)) {
|
|
6225
|
-
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l =
|
|
6226
|
-
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);
|
|
6227
6220
|
}
|
|
6228
6221
|
}
|
|
6229
|
-
function
|
|
6222
|
+
function Ir(e) {
|
|
6230
6223
|
if (e == null) return "";
|
|
6231
|
-
let t = e.publishedDate ?
|
|
6224
|
+
let t = e.publishedDate ? Lr(e.publishedDate.split("T", 1)[0]) : "";
|
|
6232
6225
|
if (e.latestVersion === "" || e.latestVersion === e.installedVersion) return t === "" ? "" : ` — ${t}`;
|
|
6233
|
-
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} ❗`;
|
|
6234
6227
|
return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
|
|
6235
6228
|
}
|
|
6236
|
-
function
|
|
6229
|
+
function Lr(e) {
|
|
6237
6230
|
if (e == null || e === "") return "n/a";
|
|
6238
6231
|
let t = e.split("T", 1)[0];
|
|
6239
6232
|
if (t == null || t === "") return "n/a";
|
|
@@ -6242,17 +6235,17 @@ function Rr(e) {
|
|
|
6242
6235
|
}
|
|
6243
6236
|
//#endregion
|
|
6244
6237
|
//#region src/actions/documentGovernance.ts
|
|
6245
|
-
var
|
|
6246
|
-
async function
|
|
6238
|
+
var Rr = "<!-- GOVERNANCE_START -->", zr = "<!-- GOVERNANCE_END -->";
|
|
6239
|
+
async function Br() {
|
|
6247
6240
|
try {
|
|
6248
6241
|
K("Document Governance"), J("1️⃣ Insert governance content into 'README.md'");
|
|
6249
|
-
let [e, t] = await Promise.all([W("package.json"), W("config.json")]), { owner: n, repo: r } =
|
|
6250
|
-
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");
|
|
6251
6244
|
} catch (e) {
|
|
6252
6245
|
console.error("❌ Error documenting governance", e), process.exit(1);
|
|
6253
6246
|
}
|
|
6254
6247
|
}
|
|
6255
|
-
function
|
|
6248
|
+
function Vr(e) {
|
|
6256
6249
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6257
6250
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document governance.");
|
|
6258
6251
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6262,18 +6255,18 @@ function Hr(e) {
|
|
|
6262
6255
|
repo: i[2]
|
|
6263
6256
|
};
|
|
6264
6257
|
}
|
|
6265
|
-
function
|
|
6258
|
+
function Hr(e) {
|
|
6266
6259
|
let t = e.author, n = typeof t == "string" ? t : t?.name;
|
|
6267
6260
|
if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
|
|
6268
6261
|
return n.replace(/\s*<[^>]*>\s*/, "").trim();
|
|
6269
6262
|
}
|
|
6270
|
-
function
|
|
6263
|
+
function Ur(e) {
|
|
6271
6264
|
let t = (/* @__PURE__ */ new Date()).getFullYear();
|
|
6272
6265
|
if (e == null) return String(t);
|
|
6273
6266
|
let n = new Date(e).getFullYear();
|
|
6274
6267
|
return n === t ? String(t) : `${String(n)}-present`;
|
|
6275
6268
|
}
|
|
6276
|
-
function
|
|
6269
|
+
function Wr(e, t, n, r) {
|
|
6277
6270
|
let i = `https://github.com/${e}/${t}`, a = `github.com/${e}/${t}`;
|
|
6278
6271
|
return `## Security & Quality
|
|
6279
6272
|
|
|
@@ -6320,28 +6313,28 @@ This project is licensed under the MIT License, permitting free use, modificatio
|
|
|
6320
6313
|
}
|
|
6321
6314
|
//#endregion
|
|
6322
6315
|
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-Dxqinpxy.js
|
|
6323
|
-
var
|
|
6316
|
+
var Gr = {
|
|
6324
6317
|
lang: void 0,
|
|
6325
6318
|
message: void 0,
|
|
6326
6319
|
abortEarly: void 0,
|
|
6327
6320
|
abortPipeEarly: void 0
|
|
6328
6321
|
};
|
|
6329
6322
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6330
|
-
function
|
|
6323
|
+
function Kr(e) {
|
|
6331
6324
|
return e ? {
|
|
6332
6325
|
lang: e?.lang ?? void 0,
|
|
6333
6326
|
message: e?.message,
|
|
6334
6327
|
abortEarly: e?.abortEarly ?? void 0,
|
|
6335
6328
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
6336
|
-
} :
|
|
6329
|
+
} : Gr;
|
|
6337
6330
|
}
|
|
6338
6331
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6339
|
-
function
|
|
6332
|
+
function qr(e) {
|
|
6340
6333
|
let t = typeof e;
|
|
6341
6334
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
6342
6335
|
}
|
|
6343
6336
|
function X(e, t, n, r, i) {
|
|
6344
|
-
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 = {
|
|
6345
6338
|
kind: e.kind,
|
|
6346
6339
|
type: e.type,
|
|
6347
6340
|
input: a,
|
|
@@ -6358,39 +6351,39 @@ function X(e, t, n, r, i) {
|
|
|
6358
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];
|
|
6359
6352
|
}
|
|
6360
6353
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6361
|
-
function
|
|
6354
|
+
function Jr(e, t) {
|
|
6362
6355
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
6363
6356
|
}
|
|
6364
6357
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6365
|
-
function
|
|
6358
|
+
function Yr(e, t) {
|
|
6366
6359
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
6367
6360
|
}
|
|
6368
6361
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6369
|
-
function
|
|
6362
|
+
function Xr(e, t) {
|
|
6370
6363
|
let n = [...new Set(e)];
|
|
6371
6364
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
6372
6365
|
}
|
|
6373
|
-
function
|
|
6366
|
+
function Zr(e) {
|
|
6374
6367
|
return e["~standard"] = {
|
|
6375
6368
|
version: 1,
|
|
6376
6369
|
vendor: "valibot",
|
|
6377
|
-
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */
|
|
6370
|
+
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ Kr())
|
|
6378
6371
|
}, e;
|
|
6379
6372
|
}
|
|
6380
6373
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6381
|
-
function
|
|
6374
|
+
function Qr(e, t, n) {
|
|
6382
6375
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
6383
6376
|
}
|
|
6384
6377
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6385
|
-
function
|
|
6378
|
+
function $r(e, t, n) {
|
|
6386
6379
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
6387
6380
|
}
|
|
6388
6381
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6389
|
-
function
|
|
6390
|
-
return
|
|
6382
|
+
function ei(e, t) {
|
|
6383
|
+
return Zr({
|
|
6391
6384
|
kind: "schema",
|
|
6392
6385
|
type: "array",
|
|
6393
|
-
reference:
|
|
6386
|
+
reference: ei,
|
|
6394
6387
|
expects: "Array",
|
|
6395
6388
|
async: !1,
|
|
6396
6389
|
item: e,
|
|
@@ -6423,11 +6416,11 @@ function ti(e, t) {
|
|
|
6423
6416
|
});
|
|
6424
6417
|
}
|
|
6425
6418
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6426
|
-
function
|
|
6427
|
-
return
|
|
6419
|
+
function ti(e) {
|
|
6420
|
+
return Zr({
|
|
6428
6421
|
kind: "schema",
|
|
6429
6422
|
type: "boolean",
|
|
6430
|
-
reference:
|
|
6423
|
+
reference: ti,
|
|
6431
6424
|
expects: "boolean",
|
|
6432
6425
|
async: !1,
|
|
6433
6426
|
message: e,
|
|
@@ -6437,23 +6430,23 @@ function ni(e) {
|
|
|
6437
6430
|
});
|
|
6438
6431
|
}
|
|
6439
6432
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6440
|
-
function
|
|
6441
|
-
return
|
|
6433
|
+
function ni(e, t) {
|
|
6434
|
+
return Zr({
|
|
6442
6435
|
kind: "schema",
|
|
6443
6436
|
type: "literal",
|
|
6444
|
-
reference:
|
|
6445
|
-
expects: /* @__PURE__ */
|
|
6437
|
+
reference: ni,
|
|
6438
|
+
expects: /* @__PURE__ */ qr(e),
|
|
6446
6439
|
async: !1,
|
|
6447
6440
|
literal: e,
|
|
6448
6441
|
message: t,
|
|
6449
6442
|
"~run"(e, t) {
|
|
6450
|
-
return /* @__PURE__ */
|
|
6443
|
+
return /* @__PURE__ */ Jr(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
|
|
6451
6444
|
}
|
|
6452
6445
|
});
|
|
6453
6446
|
}
|
|
6454
6447
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6455
6448
|
function Z(e, t) {
|
|
6456
|
-
return
|
|
6449
|
+
return Zr({
|
|
6457
6450
|
kind: "schema",
|
|
6458
6451
|
type: "nullable",
|
|
6459
6452
|
reference: Z,
|
|
@@ -6462,16 +6455,16 @@ function Z(e, t) {
|
|
|
6462
6455
|
wrapped: e,
|
|
6463
6456
|
default: t,
|
|
6464
6457
|
"~run"(e, t) {
|
|
6465
|
-
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);
|
|
6466
6459
|
}
|
|
6467
6460
|
});
|
|
6468
6461
|
}
|
|
6469
6462
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6470
|
-
function
|
|
6471
|
-
return
|
|
6463
|
+
function ri(e) {
|
|
6464
|
+
return Zr({
|
|
6472
6465
|
kind: "schema",
|
|
6473
6466
|
type: "number",
|
|
6474
|
-
reference:
|
|
6467
|
+
reference: ri,
|
|
6475
6468
|
expects: "number",
|
|
6476
6469
|
async: !1,
|
|
6477
6470
|
message: e,
|
|
@@ -6482,7 +6475,7 @@ function ii(e) {
|
|
|
6482
6475
|
}
|
|
6483
6476
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6484
6477
|
function Q(e, t) {
|
|
6485
|
-
return
|
|
6478
|
+
return Zr({
|
|
6486
6479
|
kind: "schema",
|
|
6487
6480
|
type: "object",
|
|
6488
6481
|
reference: Q,
|
|
@@ -6497,7 +6490,7 @@ function Q(e, t) {
|
|
|
6497
6490
|
for (let r in this.entries) {
|
|
6498
6491
|
let i = this.entries[r];
|
|
6499
6492
|
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
6500
|
-
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);
|
|
6501
6494
|
if (o.issues) {
|
|
6502
6495
|
let i = {
|
|
6503
6496
|
type: "object",
|
|
@@ -6513,7 +6506,7 @@ function Q(e, t) {
|
|
|
6513
6506
|
}
|
|
6514
6507
|
}
|
|
6515
6508
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
6516
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
6509
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Qr(i);
|
|
6517
6510
|
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (X(this, "key", e, t, {
|
|
6518
6511
|
input: void 0,
|
|
6519
6512
|
expected: `"${r}"`,
|
|
@@ -6532,26 +6525,26 @@ function Q(e, t) {
|
|
|
6532
6525
|
});
|
|
6533
6526
|
}
|
|
6534
6527
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6535
|
-
function
|
|
6536
|
-
return
|
|
6528
|
+
function ii(e, t) {
|
|
6529
|
+
return Zr({
|
|
6537
6530
|
kind: "schema",
|
|
6538
6531
|
type: "optional",
|
|
6539
|
-
reference:
|
|
6532
|
+
reference: ii,
|
|
6540
6533
|
expects: `(${e.expects} | undefined)`,
|
|
6541
6534
|
async: !1,
|
|
6542
6535
|
wrapped: e,
|
|
6543
6536
|
default: t,
|
|
6544
6537
|
"~run"(e, t) {
|
|
6545
|
-
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);
|
|
6546
6539
|
}
|
|
6547
6540
|
});
|
|
6548
6541
|
}
|
|
6549
6542
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6550
|
-
function
|
|
6551
|
-
return
|
|
6543
|
+
function ai(e, t, n) {
|
|
6544
|
+
return Zr({
|
|
6552
6545
|
kind: "schema",
|
|
6553
6546
|
type: "record",
|
|
6554
|
-
reference:
|
|
6547
|
+
reference: ai,
|
|
6555
6548
|
expects: "Object",
|
|
6556
6549
|
async: !1,
|
|
6557
6550
|
key: e,
|
|
@@ -6561,7 +6554,7 @@ function oi(e, t, n) {
|
|
|
6561
6554
|
let n = e.value;
|
|
6562
6555
|
if (n && typeof n == "object") {
|
|
6563
6556
|
e.typed = !0, e.value = {};
|
|
6564
|
-
for (let r in n) if (/* @__PURE__ */
|
|
6557
|
+
for (let r in n) if (/* @__PURE__ */ Yr(n, r)) {
|
|
6565
6558
|
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
6566
6559
|
if (a.issues) {
|
|
6567
6560
|
let o = {
|
|
@@ -6601,7 +6594,7 @@ function oi(e, t, n) {
|
|
|
6601
6594
|
}
|
|
6602
6595
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6603
6596
|
function $(e) {
|
|
6604
|
-
return
|
|
6597
|
+
return Zr({
|
|
6605
6598
|
kind: "schema",
|
|
6606
6599
|
type: "string",
|
|
6607
6600
|
reference: $,
|
|
@@ -6614,19 +6607,19 @@ function $(e) {
|
|
|
6614
6607
|
});
|
|
6615
6608
|
}
|
|
6616
6609
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6617
|
-
function
|
|
6610
|
+
function oi(e) {
|
|
6618
6611
|
let t;
|
|
6619
6612
|
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
6620
6613
|
else t = n.issues;
|
|
6621
6614
|
return t;
|
|
6622
6615
|
}
|
|
6623
6616
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6624
|
-
function
|
|
6625
|
-
return
|
|
6617
|
+
function si(e, t) {
|
|
6618
|
+
return Zr({
|
|
6626
6619
|
kind: "schema",
|
|
6627
6620
|
type: "union",
|
|
6628
|
-
reference:
|
|
6629
|
-
expects: /* @__PURE__ */
|
|
6621
|
+
reference: si,
|
|
6622
|
+
expects: /* @__PURE__ */ Xr(e.map((e) => e.expects), "|"),
|
|
6630
6623
|
async: !1,
|
|
6631
6624
|
options: e,
|
|
6632
6625
|
message: t,
|
|
@@ -6645,29 +6638,29 @@ function ci(e, t) {
|
|
|
6645
6638
|
if (n) return n;
|
|
6646
6639
|
if (r) {
|
|
6647
6640
|
if (r.length === 1) return r[0];
|
|
6648
|
-
X(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6641
|
+
X(this, "type", e, t, { issues: /* @__PURE__ */ oi(r) }), e.typed = !0;
|
|
6649
6642
|
} else if (i?.length === 1) return i[0];
|
|
6650
|
-
else X(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6643
|
+
else X(this, "type", e, t, { issues: /* @__PURE__ */ oi(i) });
|
|
6651
6644
|
return e;
|
|
6652
6645
|
}
|
|
6653
6646
|
});
|
|
6654
6647
|
}
|
|
6655
|
-
var
|
|
6648
|
+
var ci = /* @__PURE__ */ Q({
|
|
6656
6649
|
en: /* @__PURE__ */ $(),
|
|
6657
6650
|
es: /* @__PURE__ */ $()
|
|
6658
|
-
}),
|
|
6651
|
+
}), li = {
|
|
6659
6652
|
id: /* @__PURE__ */ $(),
|
|
6660
6653
|
label: /* @__PURE__ */ Q({
|
|
6661
|
-
en: /* @__PURE__ */
|
|
6662
|
-
es: /* @__PURE__ */
|
|
6654
|
+
en: /* @__PURE__ */ ii(/* @__PURE__ */ $()),
|
|
6655
|
+
es: /* @__PURE__ */ ii(/* @__PURE__ */ $())
|
|
6663
6656
|
}),
|
|
6664
6657
|
description: /* @__PURE__ */ Q({
|
|
6665
|
-
en: /* @__PURE__ */
|
|
6666
|
-
es: /* @__PURE__ */
|
|
6658
|
+
en: /* @__PURE__ */ ii(/* @__PURE__ */ $()),
|
|
6659
|
+
es: /* @__PURE__ */ ii(/* @__PURE__ */ $())
|
|
6667
6660
|
}),
|
|
6668
6661
|
icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6669
6662
|
iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $())
|
|
6670
|
-
},
|
|
6663
|
+
}, ui = (e) => /* @__PURE__ */ si(e.map((e) => /* @__PURE__ */ ni(e))), di = ui([
|
|
6671
6664
|
"app",
|
|
6672
6665
|
"connector",
|
|
6673
6666
|
"connectorConnection",
|
|
@@ -6689,33 +6682,33 @@ var li = /* @__PURE__ */ Q({
|
|
|
6689
6682
|
"presenter",
|
|
6690
6683
|
"presenterPresentation",
|
|
6691
6684
|
"tool"
|
|
6692
|
-
]),
|
|
6685
|
+
]), fi = ui([
|
|
6693
6686
|
"danger",
|
|
6694
6687
|
"success",
|
|
6695
6688
|
"warning"
|
|
6696
|
-
]),
|
|
6689
|
+
]), pi = ui([
|
|
6697
6690
|
"alpha",
|
|
6698
6691
|
"beta",
|
|
6699
6692
|
"releaseCandidate",
|
|
6700
6693
|
"generalAvailability"
|
|
6701
|
-
]),
|
|
6702
|
-
color:
|
|
6694
|
+
]), mi = /* @__PURE__ */ Q({
|
|
6695
|
+
color: fi,
|
|
6703
6696
|
label: /* @__PURE__ */ $()
|
|
6704
|
-
}),
|
|
6705
|
-
...
|
|
6706
|
-
typeId:
|
|
6707
|
-
},
|
|
6708
|
-
...
|
|
6709
|
-
order: /* @__PURE__ */
|
|
6697
|
+
}), hi = {
|
|
6698
|
+
...li,
|
|
6699
|
+
typeId: di
|
|
6700
|
+
}, gi = /* @__PURE__ */ Q({
|
|
6701
|
+
...hi,
|
|
6702
|
+
order: /* @__PURE__ */ ri(),
|
|
6710
6703
|
path: /* @__PURE__ */ $()
|
|
6711
|
-
}),
|
|
6712
|
-
...
|
|
6713
|
-
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6714
|
-
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6715
|
-
status: /* @__PURE__ */ Z(
|
|
6716
|
-
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)
|
|
6717
6710
|
};
|
|
6718
|
-
({ ...
|
|
6711
|
+
({ ..._i }), ui([
|
|
6719
6712
|
"app",
|
|
6720
6713
|
"engine",
|
|
6721
6714
|
"connector",
|
|
@@ -6725,17 +6718,17 @@ var li = /* @__PURE__ */ Q({
|
|
|
6725
6718
|
]);
|
|
6726
6719
|
//#endregion
|
|
6727
6720
|
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-B_EBeUaj.js
|
|
6728
|
-
var
|
|
6729
|
-
...
|
|
6721
|
+
var vi = {
|
|
6722
|
+
..._i,
|
|
6730
6723
|
vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6731
6724
|
vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6732
6725
|
vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6733
6726
|
version: /* @__PURE__ */ $()
|
|
6734
6727
|
};
|
|
6735
|
-
({ ...
|
|
6728
|
+
({ ...vi });
|
|
6736
6729
|
//#endregion
|
|
6737
6730
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
6738
|
-
var
|
|
6731
|
+
var yi = ui([
|
|
6739
6732
|
"abortOperation",
|
|
6740
6733
|
"auditObjectContent",
|
|
6741
6734
|
"createObject",
|
|
@@ -6751,38 +6744,38 @@ var bi = di([
|
|
|
6751
6744
|
"retrieveChunks",
|
|
6752
6745
|
"retrieveRecords",
|
|
6753
6746
|
"upsertRecords"
|
|
6754
|
-
]),
|
|
6747
|
+
]), bi = ui([
|
|
6755
6748
|
"application",
|
|
6756
6749
|
"curatedDataset",
|
|
6757
6750
|
"database",
|
|
6758
6751
|
"fileStore"
|
|
6759
|
-
]),
|
|
6752
|
+
]), xi = /* @__PURE__ */ Q({ label: ci }), Si = ui([
|
|
6760
6753
|
"bidirectional",
|
|
6761
6754
|
"destination",
|
|
6762
6755
|
"source"
|
|
6763
|
-
]),
|
|
6764
|
-
authMethodId:
|
|
6756
|
+
]), Ci = /* @__PURE__ */ Q({ label: ci }), wi = /* @__PURE__ */ Q({
|
|
6757
|
+
authMethodId: ui([
|
|
6765
6758
|
"apiKey",
|
|
6766
6759
|
"disabled",
|
|
6767
6760
|
"oAuth2",
|
|
6768
6761
|
"none"
|
|
6769
6762
|
]),
|
|
6770
|
-
activeConnectionCount: /* @__PURE__ */
|
|
6771
|
-
canDescribe: /* @__PURE__ */
|
|
6772
|
-
id: /* @__PURE__ */
|
|
6773
|
-
label: /* @__PURE__ */
|
|
6774
|
-
maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6775
|
-
params: /* @__PURE__ */
|
|
6776
|
-
}),
|
|
6777
|
-
...
|
|
6778
|
-
typeId: /* @__PURE__ */
|
|
6779
|
-
actionNames: /* @__PURE__ */
|
|
6780
|
-
category: /* @__PURE__ */ Z(
|
|
6781
|
-
categoryId:
|
|
6782
|
-
implementations: /* @__PURE__ */
|
|
6783
|
-
usage: /* @__PURE__ */ Z(
|
|
6784
|
-
usageId: /* @__PURE__ */ Z(
|
|
6785
|
-
}),
|
|
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 = {
|
|
6786
6779
|
abortOperation: "Abort Operation",
|
|
6787
6780
|
auditObjectContent: "Audit Object Content",
|
|
6788
6781
|
createObject: "Create Object",
|
|
@@ -6798,12 +6791,12 @@ var bi = di([
|
|
|
6798
6791
|
retrieveChunks: "Retrieve Chunks",
|
|
6799
6792
|
retrieveRecords: "Retrieve Records",
|
|
6800
6793
|
upsertRecords: "Upsert Records"
|
|
6801
|
-
},
|
|
6794
|
+
}, Di = /* @__PURE__ */ new Set([
|
|
6802
6795
|
"createObject",
|
|
6803
6796
|
"dropObject",
|
|
6804
6797
|
"removeRecords",
|
|
6805
6798
|
"upsertRecords"
|
|
6806
|
-
]),
|
|
6799
|
+
]), Oi = /* @__PURE__ */ new Set([
|
|
6807
6800
|
"auditObjectContent",
|
|
6808
6801
|
"findObject",
|
|
6809
6802
|
"getInfo",
|
|
@@ -6814,46 +6807,46 @@ var bi = di([
|
|
|
6814
6807
|
"retrieveChunks",
|
|
6815
6808
|
"retrieveRecords"
|
|
6816
6809
|
]);
|
|
6817
|
-
function
|
|
6810
|
+
function ki(e) {
|
|
6818
6811
|
let t = !1, n = !1;
|
|
6819
|
-
for (let r of e)
|
|
6812
|
+
for (let r of e) Oi.has(r) && (t = !0), Di.has(r) && (n = !0);
|
|
6820
6813
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "source";
|
|
6821
6814
|
}
|
|
6822
|
-
function
|
|
6815
|
+
function Ai(e) {
|
|
6823
6816
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
6824
6817
|
n += "|:----|:-------:|\n";
|
|
6825
|
-
for (let e of Object.keys(
|
|
6818
|
+
for (let e of Object.keys(Ei)) n += `| ${Ei[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
6826
6819
|
return n;
|
|
6827
6820
|
}
|
|
6828
6821
|
//#endregion
|
|
6829
6822
|
//#region src/actions/documentActions.ts
|
|
6830
|
-
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 = {
|
|
6831
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.",
|
|
6832
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.",
|
|
6833
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."
|
|
6834
|
-
},
|
|
6835
|
-
async function
|
|
6827
|
+
}, Fi = "The table below lists all connector actions and highlights those supported by this connector.";
|
|
6828
|
+
async function Ii() {
|
|
6836
6829
|
try {
|
|
6837
6830
|
K("Document Actions"), J("1️⃣ Insert actions description and table into 'README.md'");
|
|
6838
|
-
let e = (await W("config.json")).actionNames ?? [], t =
|
|
6839
|
-
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");
|
|
6840
6833
|
} catch (e) {
|
|
6841
6834
|
console.error("❌ Error documenting actions", e), process.exit(1);
|
|
6842
6835
|
}
|
|
6843
6836
|
}
|
|
6844
6837
|
//#endregion
|
|
6845
6838
|
//#region src/actions/documentOpening.ts
|
|
6846
|
-
var
|
|
6847
|
-
async function
|
|
6839
|
+
var Li = "<!-- OPENING_START -->", Ri = "<!-- OPENING_END -->";
|
|
6840
|
+
async function zi() {
|
|
6848
6841
|
try {
|
|
6849
6842
|
K("Document Opening"), J("1️⃣ Insert opening content into 'README.md'");
|
|
6850
|
-
let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } =
|
|
6851
|
-
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");
|
|
6852
6845
|
} catch (e) {
|
|
6853
6846
|
console.error("❌ Error documenting opening", e), process.exit(1);
|
|
6854
6847
|
}
|
|
6855
6848
|
}
|
|
6856
|
-
function
|
|
6849
|
+
function Bi(e) {
|
|
6857
6850
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6858
6851
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document opening.");
|
|
6859
6852
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6863,17 +6856,17 @@ function Vi(e) {
|
|
|
6863
6856
|
repo: i[2]
|
|
6864
6857
|
};
|
|
6865
6858
|
}
|
|
6866
|
-
function
|
|
6859
|
+
function Vi(e) {
|
|
6867
6860
|
let t = e.license;
|
|
6868
6861
|
if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
|
|
6869
6862
|
return t;
|
|
6870
6863
|
}
|
|
6871
|
-
function
|
|
6864
|
+
function Hi(e) {
|
|
6872
6865
|
let t = e.description.en;
|
|
6873
6866
|
if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
|
|
6874
6867
|
return t;
|
|
6875
6868
|
}
|
|
6876
|
-
function
|
|
6869
|
+
function Ui(e, t, n, r) {
|
|
6877
6870
|
let i = `https://github.com/${e}/${t}`;
|
|
6878
6871
|
return `[}-blue.svg)](./LICENSE)
|
|
6879
6872
|
[](${i}/releases/latest)
|
|
@@ -6893,31 +6886,31 @@ ${r}`;
|
|
|
6893
6886
|
}
|
|
6894
6887
|
//#endregion
|
|
6895
6888
|
//#region src/actions/documentUsage.ts
|
|
6896
|
-
var
|
|
6897
|
-
async function
|
|
6889
|
+
var Wi = "<!-- USAGE_START -->", Gi = "<!-- USAGE_END -->";
|
|
6890
|
+
async function Ki() {
|
|
6898
6891
|
try {
|
|
6899
6892
|
K("Document Usage"), J("1️⃣ Insert usage content into 'README.md'");
|
|
6900
|
-
let e = await W("package.json"), t =
|
|
6901
|
-
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");
|
|
6902
6895
|
} catch (e) {
|
|
6903
6896
|
console.error("❌ Error documenting usage", e), process.exit(1);
|
|
6904
6897
|
}
|
|
6905
6898
|
}
|
|
6906
|
-
function
|
|
6899
|
+
function qi(e) {
|
|
6907
6900
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6908
6901
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
|
|
6909
6902
|
return n.replace(/^git\+/, "");
|
|
6910
6903
|
}
|
|
6911
|
-
function
|
|
6904
|
+
function Ji(e) {
|
|
6912
6905
|
return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
|
|
6913
6906
|
}
|
|
6914
|
-
function
|
|
6907
|
+
function Yi(e) {
|
|
6915
6908
|
if (e == null) throw Error("package.json version range is required to document usage.");
|
|
6916
6909
|
let t = /\d+(?:\.\d+)*/.exec(e);
|
|
6917
6910
|
if (t == null) throw Error(`Unable to parse version from '${e}'.`);
|
|
6918
6911
|
return t[0];
|
|
6919
6912
|
}
|
|
6920
|
-
function
|
|
6913
|
+
function Xi(e, t, n, r, i) {
|
|
6921
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.
|
|
6922
6915
|
|
|
6923
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.
|
|
@@ -6932,7 +6925,7 @@ _Requires [Node.js](https://nodejs.org/) ${n} or later, [npm](https://www.npmjs.
|
|
|
6932
6925
|
}
|
|
6933
6926
|
//#endregion
|
|
6934
6927
|
//#region src/actions/formatCode.ts
|
|
6935
|
-
async function
|
|
6928
|
+
async function Zi() {
|
|
6936
6929
|
try {
|
|
6937
6930
|
K("Format Code"), await U("1️⃣ Format", "prettier", [
|
|
6938
6931
|
"--write",
|
|
@@ -6947,7 +6940,7 @@ async function Qi() {
|
|
|
6947
6940
|
}
|
|
6948
6941
|
//#endregion
|
|
6949
6942
|
//#region src/actions/lintCode.ts
|
|
6950
|
-
async function
|
|
6943
|
+
async function Qi() {
|
|
6951
6944
|
try {
|
|
6952
6945
|
K("Lint Code"), await U("1️⃣ Lint", "eslint", ["."]), q("Code linted");
|
|
6953
6946
|
} catch (e) {
|
|
@@ -6956,7 +6949,7 @@ async function $i() {
|
|
|
6956
6949
|
}
|
|
6957
6950
|
//#endregion
|
|
6958
6951
|
//#region src/utilities/cloudflare.ts
|
|
6959
|
-
async function
|
|
6952
|
+
async function $i() {
|
|
6960
6953
|
let e = await W("config.json"), t = {
|
|
6961
6954
|
body: JSON.stringify(e),
|
|
6962
6955
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6964,11 +6957,11 @@ async function ea() {
|
|
|
6964
6957
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6965
6958
|
if (!n.ok) throw Error(await n.text());
|
|
6966
6959
|
}
|
|
6967
|
-
async function
|
|
6960
|
+
async function ea(e, t) {
|
|
6968
6961
|
async function n(e, t, r) {
|
|
6969
6962
|
for (let i of r) {
|
|
6970
6963
|
let r = `${e}/${i}`, a = `${t}/${i}`;
|
|
6971
|
-
(await
|
|
6964
|
+
(await Vn(r)).isDirectory() ? await n(r, a, await Pn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Fn(void 0, "wrangler", [
|
|
6972
6965
|
"r2",
|
|
6973
6966
|
"object",
|
|
6974
6967
|
"put",
|
|
@@ -6982,7 +6975,7 @@ async function ta(e, t) {
|
|
|
6982
6975
|
let r = await Pn(`${e}/${t}/`);
|
|
6983
6976
|
await n(`${e}/${t}`, t, r);
|
|
6984
6977
|
}
|
|
6985
|
-
async function
|
|
6978
|
+
async function ta(e) {
|
|
6986
6979
|
let t = e.id, n = {
|
|
6987
6980
|
body: JSON.stringify(e),
|
|
6988
6981
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6990,7 +6983,7 @@ async function na(e) {
|
|
|
6990
6983
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
6991
6984
|
if (!r.ok) throw Error(await r.text());
|
|
6992
6985
|
}
|
|
6993
|
-
async function
|
|
6986
|
+
async function na(e, t) {
|
|
6994
6987
|
let n = `v${e.version ?? "unknown"}`;
|
|
6995
6988
|
async function r(e, r = "") {
|
|
6996
6989
|
let i = await Pn(e, { withFileTypes: !0 });
|
|
@@ -7014,24 +7007,24 @@ async function ra(e, t) {
|
|
|
7014
7007
|
}
|
|
7015
7008
|
//#endregion
|
|
7016
7009
|
//#region node_modules/valibot/dist/index.mjs
|
|
7017
|
-
var
|
|
7010
|
+
var ra = {
|
|
7018
7011
|
lang: void 0,
|
|
7019
7012
|
message: void 0,
|
|
7020
7013
|
abortEarly: void 0,
|
|
7021
7014
|
abortPipeEarly: void 0
|
|
7022
7015
|
};
|
|
7023
7016
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7024
|
-
function
|
|
7017
|
+
function ia(e) {
|
|
7025
7018
|
return e ? {
|
|
7026
7019
|
lang: e?.lang ?? void 0,
|
|
7027
7020
|
message: e?.message,
|
|
7028
7021
|
abortEarly: e?.abortEarly ?? void 0,
|
|
7029
7022
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
7030
|
-
} :
|
|
7023
|
+
} : ra;
|
|
7031
7024
|
}
|
|
7032
7025
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7033
|
-
function
|
|
7034
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
7026
|
+
function aa(e, t, n) {
|
|
7027
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ ia(n));
|
|
7035
7028
|
return {
|
|
7036
7029
|
typed: r.typed,
|
|
7037
7030
|
success: !r.issues,
|
|
@@ -7041,56 +7034,56 @@ function oa(e, t, n) {
|
|
|
7041
7034
|
}
|
|
7042
7035
|
//#endregion
|
|
7043
7036
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
|
|
7044
|
-
var
|
|
7037
|
+
var oa = ui([
|
|
7045
7038
|
"list",
|
|
7046
7039
|
"render",
|
|
7047
7040
|
"setColorMode"
|
|
7048
|
-
]),
|
|
7049
|
-
...
|
|
7050
|
-
typeId: /* @__PURE__ */
|
|
7051
|
-
actionNames: /* @__PURE__ */
|
|
7052
|
-
presentations: /* @__PURE__ */
|
|
7041
|
+
]), sa = /* @__PURE__ */ Q({
|
|
7042
|
+
...vi,
|
|
7043
|
+
typeId: /* @__PURE__ */ ni("presenter"),
|
|
7044
|
+
actionNames: /* @__PURE__ */ ei(oa),
|
|
7045
|
+
presentations: /* @__PURE__ */ ei(gi)
|
|
7053
7046
|
});
|
|
7054
7047
|
//#endregion
|
|
7055
7048
|
//#region src/actions/manageProject.ts
|
|
7056
|
-
async function
|
|
7049
|
+
async function ca() {
|
|
7057
7050
|
try {
|
|
7058
7051
|
K("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), q("Project built");
|
|
7059
7052
|
} catch (e) {
|
|
7060
7053
|
console.error("❌ Error building project", e), process.exit(1);
|
|
7061
7054
|
}
|
|
7062
7055
|
}
|
|
7063
|
-
async function
|
|
7056
|
+
async function la() {
|
|
7064
7057
|
try {
|
|
7065
7058
|
K("Publish Project");
|
|
7066
|
-
let e = await W("package.json"), t = await W("config.json"), n =
|
|
7067
|
-
if (n.typeId === "app") J("1️⃣ Register module"), await
|
|
7068
|
-
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);
|
|
7069
7062
|
else if (n.uploadGroupName === void 0) J("1️⃣ Publishing NOT required");
|
|
7070
7063
|
else {
|
|
7071
7064
|
J("1️⃣ Register module");
|
|
7072
7065
|
let r = t.id.split("-").slice(2).join("-");
|
|
7073
|
-
await
|
|
7066
|
+
await na(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await ta(t);
|
|
7074
7067
|
}
|
|
7075
7068
|
q(`Project version '${e.version ?? "unknown"}' published.`);
|
|
7076
7069
|
} catch (e) {
|
|
7077
7070
|
console.error("❌ Error publishing project", e), process.exit(1);
|
|
7078
7071
|
}
|
|
7079
7072
|
}
|
|
7080
|
-
async function
|
|
7073
|
+
async function ua() {
|
|
7081
7074
|
try {
|
|
7082
7075
|
K("Release Project");
|
|
7083
7076
|
let e = await W("package.json"), t = await W("config.json");
|
|
7084
|
-
await
|
|
7085
|
-
let n =
|
|
7077
|
+
await _a("1️⃣ ", e);
|
|
7078
|
+
let n = Bn(t.id);
|
|
7086
7079
|
switch (n.typeId) {
|
|
7087
7080
|
case "connector":
|
|
7088
|
-
t = await
|
|
7081
|
+
t = await fa("2️⃣ ", e);
|
|
7089
7082
|
break;
|
|
7090
7083
|
case "presenter":
|
|
7091
|
-
t = await
|
|
7084
|
+
t = await pa("2️⃣ ", e);
|
|
7092
7085
|
break;
|
|
7093
|
-
default: t = await
|
|
7086
|
+
default: t = await da("2️⃣ ", e);
|
|
7094
7087
|
}
|
|
7095
7088
|
if (await U("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
|
|
7096
7089
|
"commit",
|
|
@@ -7100,64 +7093,60 @@ async function da() {
|
|
|
7100
7093
|
"push",
|
|
7101
7094
|
"origin",
|
|
7102
7095
|
"main:main"
|
|
7103
|
-
]), n.typeId === "app") J("7️⃣ Register module"), await
|
|
7104
|
-
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);
|
|
7105
7098
|
else if (n.uploadGroupName === void 0) J("7️⃣ Registration NOT required");
|
|
7106
7099
|
else {
|
|
7107
7100
|
J("7️⃣ Register module");
|
|
7108
7101
|
let r = t.id.split("-").slice(2).join("-");
|
|
7109
|
-
await
|
|
7102
|
+
await na(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await ta(t);
|
|
7110
7103
|
}
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
await Rn(e);
|
|
7121
|
-
}
|
|
7122
|
-
} else J(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
7123
|
-
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.`);
|
|
7124
7113
|
} catch (e) {
|
|
7125
7114
|
console.error("❌ Error releasing project", e), process.exit(1);
|
|
7126
7115
|
}
|
|
7127
7116
|
}
|
|
7128
|
-
async function
|
|
7117
|
+
async function da(e, t) {
|
|
7129
7118
|
J(`${e} Build project configuration`);
|
|
7130
7119
|
let n = await W("config.json");
|
|
7131
|
-
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;
|
|
7132
7121
|
}
|
|
7133
|
-
async function
|
|
7122
|
+
async function fa(e, t) {
|
|
7134
7123
|
J(`${e} Build connector project configuration`);
|
|
7135
|
-
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);
|
|
7136
7125
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7137
|
-
let a =
|
|
7138
|
-
return await
|
|
7126
|
+
let a = Hn(r);
|
|
7127
|
+
return await ma(t, n, a, ki(a));
|
|
7139
7128
|
}
|
|
7140
|
-
async function
|
|
7129
|
+
async function pa(e, t) {
|
|
7141
7130
|
J(`${e} Build presenter project configuration`);
|
|
7142
|
-
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);
|
|
7143
7132
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7144
|
-
return await
|
|
7133
|
+
return await ma(t, n, Hn(r));
|
|
7145
7134
|
}
|
|
7146
|
-
async function
|
|
7147
|
-
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;
|
|
7148
7137
|
}
|
|
7149
|
-
async function
|
|
7138
|
+
async function ha() {
|
|
7150
7139
|
try {
|
|
7151
7140
|
K("Synchronise Project with GitHub");
|
|
7152
7141
|
let e = await W("package.json"), t = await W("config.json");
|
|
7153
|
-
switch (await
|
|
7142
|
+
switch (await _a("1️⃣ ", e), Bn(t.id).typeId) {
|
|
7154
7143
|
case "connector":
|
|
7155
|
-
await
|
|
7144
|
+
await fa("2️⃣ ", e);
|
|
7156
7145
|
break;
|
|
7157
7146
|
case "presenter":
|
|
7158
|
-
await
|
|
7147
|
+
await pa("2️⃣ ", e);
|
|
7159
7148
|
break;
|
|
7160
|
-
default: await
|
|
7149
|
+
default: await da("2️⃣ ", e);
|
|
7161
7150
|
}
|
|
7162
7151
|
await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
|
|
7163
7152
|
"commit",
|
|
@@ -7172,22 +7161,22 @@ async function ga() {
|
|
|
7172
7161
|
console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
|
|
7173
7162
|
}
|
|
7174
7163
|
}
|
|
7175
|
-
function
|
|
7164
|
+
function ga() {
|
|
7176
7165
|
try {
|
|
7177
7166
|
K("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
7178
7167
|
} catch (e) {
|
|
7179
7168
|
console.error("❌ Error testing project", e), process.exit(1);
|
|
7180
7169
|
}
|
|
7181
7170
|
}
|
|
7182
|
-
async function
|
|
7171
|
+
async function _a(e, t, n = "./") {
|
|
7183
7172
|
if (J(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
7184
7173
|
else {
|
|
7185
7174
|
let e = t.version, n = t.version.split(".");
|
|
7186
7175
|
t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
|
|
7187
7176
|
}
|
|
7188
|
-
await
|
|
7177
|
+
await Rn(`${n}package.json`, t);
|
|
7189
7178
|
}
|
|
7190
7179
|
//#endregion
|
|
7191
|
-
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 };
|
|
7192
7181
|
|
|
7193
7182
|
//# sourceMappingURL=dpuse-development.es.js.map
|