@dpuse/dpuse-development 0.3.799 → 0.3.800
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/.github/dependabot.private.rust.yml +16 -0
- package/.github/dependabot.rust.yml +22 -0
- package/.github/workflows/ci.yml +12 -0
- package/.github/workflows/codeql.yml +6 -0
- package/.github/workflows/publish.yml +20 -2
- package/README.md +11 -11
- package/dist/{apiReference-DCzx5xFp.js → apiReference-BazeHifT.js} +3 -3
- package/dist/{apiReference-DCzx5xFp.js.map → apiReference-BazeHifT.js.map} +1 -1
- package/dist/dpuse-development.es.js +304 -297
- package/dist/dpuse-development.es.js.map +1 -1
- package/dist/types/src/actions/buildProject.d.ts +3 -0
- package/dist/types/src/actions/publishProject.d.ts +1 -0
- package/dist/types/src/utilities/index.d.ts +1 -0
- package/dist/{utilities-DxgaXApN.js → utilities-Bo8LfncX.js} +27 -27
- package/dist/{utilities-DxgaXApN.js.map → utilities-Bo8LfncX.js.map} +1 -1
- package/package.json +4 -2
- package/rust-toolchain.toml +5 -0
- package/.github/publish.cloudflare.yml +0 -67
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { PackageJson } from 'type-fest';
|
|
1
2
|
/** Builds the package using Vite. Output to '/dist' directory. Builds bundle analysis reports. */
|
|
2
3
|
export declare function buildProject(): Promise<void>;
|
|
4
|
+
/** Bundles the project with Vite, first building its WebAssembly where the project has a 'build:wasm' script. */
|
|
5
|
+
export declare function bundleProject(stepIcon: string, packageJSON: PackageJson): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PackageJson } from 'type-fest';
|
|
2
2
|
import { ModuleConfig } from '@dpuse/dpuse-shared';
|
|
3
3
|
import { ModuleTypeConfig } from '../utilities';
|
|
4
|
+
/** Publishes the project to npm, uploads it to DPUse, or both, as its module type requires. Run by the 'publish.yml' workflow. */
|
|
4
5
|
export declare function publishProject(): Promise<void>;
|
|
5
6
|
export declare function registerModule(stepIcon: string, packageJSON: PackageJson, configJSON: ModuleConfig, moduleTypeConfig: ModuleTypeConfig): Promise<void>;
|
|
@@ -14,6 +14,7 @@ export declare const CONTRIBUTING_LICENSE_END_MARKER = "<!-- CONTRIBUTING_LICENS
|
|
|
14
14
|
export declare const CONTRIBUTING_LICENSE_START_MARKER = "<!-- CONTRIBUTING_LICENSE_START -->";
|
|
15
15
|
export declare const QUALITY_SECURITY_END_MARKER = "<!-- QUALITY_SECURITY_END -->";
|
|
16
16
|
export declare const QUALITY_SECURITY_START_MARKER = "<!-- QUALITY_SECURITY_START -->";
|
|
17
|
+
export declare const RUST_WORKSPACE_PATH = "rust/Cargo.toml";
|
|
17
18
|
export declare function clearDirectory(label: string | undefined, directoryPath: string): Promise<void>;
|
|
18
19
|
export declare function getDirectoryEntries(path: string): Promise<string[]>;
|
|
19
20
|
export declare function getDirectoryEntries(path: string, options: ObjectEncodingOptions): Promise<Dirent[]>;
|
|
@@ -561,7 +561,7 @@ var R = O([
|
|
|
561
561
|
typeId: /* @__PURE__ */ v("presenter"),
|
|
562
562
|
actionNames: /* @__PURE__ */ g(R),
|
|
563
563
|
presentations: /* @__PURE__ */ g(se)
|
|
564
|
-
}), B = "code-health-reports/fallow", he = `${B}/badge.json`, ge = `${B}/index.md`, V = "<!-- CONTRIBUTING_LICENSE_END -->", H = "<!-- CONTRIBUTING_LICENSE_START -->", _e = "<!-- GOVERNANCE_END -->", U = "<!-- GOVERNANCE_START -->", W = "<!-- QUALITY_SECURITY_END -->", G = "<!-- QUALITY_SECURITY_START -->", ve = [
|
|
564
|
+
}), B = "code-health-reports/fallow", he = `${B}/badge.json`, ge = `${B}/index.md`, V = "<!-- CONTRIBUTING_LICENSE_END -->", H = "<!-- CONTRIBUTING_LICENSE_START -->", _e = "<!-- GOVERNANCE_END -->", U = "<!-- GOVERNANCE_START -->", W = "<!-- QUALITY_SECURITY_END -->", G = "<!-- QUALITY_SECURITY_START -->", ve = "rust/Cargo.toml", ye = [
|
|
565
565
|
{
|
|
566
566
|
idPrefix: "dpuse-app",
|
|
567
567
|
typeId: "app",
|
|
@@ -646,8 +646,8 @@ var R = O([
|
|
|
646
646
|
publishedTo: "github",
|
|
647
647
|
uploadGroupName: void 0
|
|
648
648
|
}
|
|
649
|
-
],
|
|
650
|
-
async function
|
|
649
|
+
], be = n(r);
|
|
650
|
+
async function xe(n, r) {
|
|
651
651
|
n !== void 0 && Z(`${n} - clear(${r})`);
|
|
652
652
|
let i;
|
|
653
653
|
try {
|
|
@@ -668,15 +668,15 @@ async function be(n, r) {
|
|
|
668
668
|
}
|
|
669
669
|
}));
|
|
670
670
|
}
|
|
671
|
-
async function
|
|
671
|
+
async function Se(t, n) {
|
|
672
672
|
return e.readdir(t, n);
|
|
673
673
|
}
|
|
674
|
-
async function
|
|
674
|
+
async function Ce(t, n, r, i) {
|
|
675
675
|
t !== void 0 && Z(`${t} - exec(${n} ${r.join(" ")})`);
|
|
676
|
-
let { stdout: a, stderr: o } = await
|
|
676
|
+
let { stdout: a, stderr: o } = await be(n, r);
|
|
677
677
|
i === void 0 ? a.trim() && console.log(a.trim()) : await e.writeFile(i, a.trim(), "utf-8"), o.trim() && console.error(o.trim());
|
|
678
678
|
}
|
|
679
|
-
async function
|
|
679
|
+
async function we(e, t, n, r = !1, a = !1) {
|
|
680
680
|
return Z(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
|
|
681
681
|
i(t, n, {
|
|
682
682
|
shell: a,
|
|
@@ -686,7 +686,7 @@ async function Ce(e, t, n, r = !1, a = !1) {
|
|
|
686
686
|
});
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
async function
|
|
689
|
+
async function Te(n, r, a, o, s = !1) {
|
|
690
690
|
return Z(`${n} - spawn(${r} ${a.join(" ")}) > ${o}`), new Promise((n, c) => {
|
|
691
691
|
let l = i(r, a, {
|
|
692
692
|
shell: !1,
|
|
@@ -709,7 +709,7 @@ async function we(n, r, a, o, s = !1) {
|
|
|
709
709
|
});
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
-
async function
|
|
712
|
+
async function Ee() {
|
|
713
713
|
let e = await q("./README.md"), t = e.indexOf(U), n = e.indexOf(_e);
|
|
714
714
|
if (t === -1 || n === -1) return;
|
|
715
715
|
let r = `${G}\n${W}\n\n${H}\n${V}`;
|
|
@@ -732,27 +732,27 @@ async function J(t) {
|
|
|
732
732
|
async function Y(n, r) {
|
|
733
733
|
await e.mkdir(t.dirname(n), { recursive: !0 }), await e.writeFile(n, `${JSON.stringify(r, void 0, 4)}\n`, "utf-8");
|
|
734
734
|
}
|
|
735
|
-
async function
|
|
736
|
-
await X("README.md",
|
|
735
|
+
async function De(e, t, n) {
|
|
736
|
+
await X("README.md", Re(await q("./README.md"), e, t, n));
|
|
737
737
|
}
|
|
738
738
|
async function X(t, n) {
|
|
739
739
|
await e.writeFile(t, n, "utf-8");
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function Oe(e) {
|
|
742
742
|
console.info("\x1B[36m────────────────────────────────────────────────────────────────────────────────"), console.info(`▶️ ${e}[0m`);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function ke(e) {
|
|
745
745
|
console.info(`✅ ${e}`);
|
|
746
746
|
}
|
|
747
747
|
function Z(e) {
|
|
748
748
|
console.info(e);
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
let t =
|
|
750
|
+
function Ae(e) {
|
|
751
|
+
let t = ye.find((t) => e.startsWith(t.idPrefix));
|
|
752
752
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
753
753
|
return t;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function je(e, t) {
|
|
756
756
|
let n = e.repository, r = typeof n == "string" ? n : n?.url;
|
|
757
757
|
if (r == null || r === "") throw Error(`package.json 'repository' field is required to ${t}.`);
|
|
758
758
|
let i = r.replace(/^git\+/, "").replace(/\.git$/, ""), a = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(i);
|
|
@@ -762,17 +762,17 @@ function Ae(e, t) {
|
|
|
762
762
|
repo: a[2]
|
|
763
763
|
};
|
|
764
764
|
}
|
|
765
|
-
async function
|
|
765
|
+
async function Me(t) {
|
|
766
766
|
return await e.stat(t);
|
|
767
767
|
}
|
|
768
|
-
async function
|
|
768
|
+
async function Ne(e, t, n) {
|
|
769
769
|
switch (n.typeId) {
|
|
770
|
-
case "connector": return await
|
|
771
|
-
case "presenter": return await
|
|
772
|
-
default: return await
|
|
770
|
+
case "connector": return await Fe(e, t);
|
|
771
|
+
case "presenter": return await Ie(e, t);
|
|
772
|
+
default: return await Le(e, t);
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
|
-
async function
|
|
775
|
+
async function Pe(e, t, n = "./") {
|
|
776
776
|
if (Z(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
777
777
|
else {
|
|
778
778
|
let e = t.version, n = t.version.split(".");
|
|
@@ -786,20 +786,20 @@ async function Q(e) {
|
|
|
786
786
|
};
|
|
787
787
|
return i(n), r;
|
|
788
788
|
}
|
|
789
|
-
async function
|
|
789
|
+
async function Fe(e, t) {
|
|
790
790
|
Z(`${e} Build connector project configuration`);
|
|
791
791
|
let [n, r] = await Promise.all([K("config.json"), q("src/index.ts")]), i = /* @__PURE__ */ s(me, n);
|
|
792
792
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
793
793
|
let a = await Q(r);
|
|
794
794
|
return await $(t, n, a, I(a));
|
|
795
795
|
}
|
|
796
|
-
async function
|
|
796
|
+
async function Ie(e, t) {
|
|
797
797
|
Z(`${e} Build presenter project configuration`);
|
|
798
798
|
let [n, r] = await Promise.all([K("config.json"), q("src/index.ts")]), i = /* @__PURE__ */ s(z, n);
|
|
799
799
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
800
800
|
return await $(t, n, await Q(r));
|
|
801
801
|
}
|
|
802
|
-
async function
|
|
802
|
+
async function Le(e, t) {
|
|
803
803
|
Z(`${e} Build project configuration`);
|
|
804
804
|
let n = await K("config.json");
|
|
805
805
|
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await J("logo.svg"), n.iconDark ??= await J("logoDark.svg"), await Y("config.json", n), n;
|
|
@@ -807,11 +807,11 @@ async function Ie(e, t) {
|
|
|
807
807
|
async function $(e, t, n, r) {
|
|
808
808
|
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 Y("config.json", t), t;
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function Re(e, t, n, r) {
|
|
811
811
|
let i = e.indexOf(n), a = e.indexOf(r);
|
|
812
812
|
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
813
813
|
let o = t.trim();
|
|
814
814
|
return `${e.slice(0, Math.max(0, i + n.length))}\n\n${o}\n\n${e.slice(Math.max(0, a))}`;
|
|
815
815
|
}
|
|
816
816
|
//#endregion
|
|
817
|
-
export {
|
|
817
|
+
export { L as A, je as C, De as D, Y as E, X as O, J as S, Te as T, ke as _, ge as a, K as b, ve as c, xe as d, Ce as f, Oe as g, Me as h, B as i, I as k, Ne as l, Ae as m, H as n, W as o, Se as p, he as r, G as s, V as t, Pe as u, Z as v, we as w, q as x, Ee as y };
|