@dpuse/dpuse-development 0.3.748 → 0.3.750
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 +36 -15
- package/dist/dpuse-development.es.js +88 -61
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -38,6 +38,9 @@ This package is published to the [public npm registry](https://www.npmjs.com/pac
|
|
|
38
38
|
npm install @dpuse/dpuse-development
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
> [!WARNING]
|
|
42
|
+
> This project is currently published to npm, but is not designed for general use. It is custom built for the DPUse CI/CD process. You are welcome to clone and customise it for your own purposes, but you will need to adapt it to your own project structure and tooling.
|
|
43
|
+
|
|
41
44
|
To work on the source instead, clone this repository. Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.
|
|
42
45
|
|
|
43
46
|
```bash
|
|
@@ -48,12 +51,27 @@ npm install
|
|
|
48
51
|
|
|
49
52
|
_Requires [Node.js](https://nodejs.org/) 24 or later, [npm](https://www.npmjs.com/) 12 or later, and [TypeScript](https://www.typescriptlang.org/) 6.0.3 or later._
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
This repository provides these commands to every DPUse project, and uses them itself:
|
|
55
|
+
|
|
56
|
+
|Command|What it does|
|
|
57
|
+
|:-|:-|
|
|
58
|
+
|`npm run build`|Builds the project.|
|
|
59
|
+
|`npm test`|Runs the tests.|
|
|
60
|
+
|`npm run lint`|Checks the code with ESLint.|
|
|
61
|
+
|`npm run format`|Formats the code with Prettier.|
|
|
62
|
+
|`npm run audit`|Checks dependencies for known vulnerabilities with npm audit.|
|
|
63
|
+
|`npm run check`|Checks configuration files against the DPUse templates and lists outdated dependencies.|
|
|
64
|
+
|`npm run update`|Updates the DPUse packages this project depends on to their latest versions.|
|
|
65
|
+
|`npm run document`|Regenerates the README's generated sections.|
|
|
66
|
+
|`npm run documentOpening`|Regenerates the README's opening section.|
|
|
67
|
+
|`npm run documentUsage`|Regenerates the README's Usage section.|
|
|
68
|
+
|`npm run documentDependencies`|Regenerates the README's dependency licence report.|
|
|
69
|
+
|`npm run documentBundleSizes`|Regenerates the README's bundle size report.|
|
|
70
|
+
|`npm run documentGovernance`|Regenerates the README's Security & Quality, Contributing and License sections.|
|
|
71
|
+
|`npm run sync`|Bumps the version, then commits and pushes to GitHub.|
|
|
72
|
+
|`npm run release`|Bumps the version, commits and pushes, and creates a GitHub release.|
|
|
54
73
|
|
|
55
|
-
|
|
56
|
-
> This project is currently published to npm, but is not designed for general use. It is custom built for the DPUse CI/CD process. You are welcome to clone and customise it for your own purposes, but you will need to adapt it to your own project structure and tooling.
|
|
74
|
+
<!-- USAGE_END -->
|
|
57
75
|
|
|
58
76
|
## DPUse Projects
|
|
59
77
|
|
|
@@ -126,17 +144,17 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
126
144
|
|
|
127
145
|
|Chunk/Module/File|Composition|
|
|
128
146
|
|:------ |:-----------|
|
|
129
|
-
| dist/dpuse-development.es.js |
|
|
130
|
-
| acorn → dist/acorn.mjs | `████████░░░░░░░░░░░░`
|
|
131
|
-
| acorn-typescript → lib/index.mjs | `███████░░░░░░░░░░░░░` 35.
|
|
132
|
-
| src | `███░░░░░░░░░░░░░░░░░`
|
|
133
|
-
| documentGovernance.ts |
|
|
147
|
+
| dist/dpuse-development.es.js | 321.9 kB · gzip 82.8 kB |
|
|
148
|
+
| acorn → dist/acorn.mjs | `████████░░░░░░░░░░░░` 40.6% |
|
|
149
|
+
| acorn-typescript → lib/index.mjs | `███████░░░░░░░░░░░░░` 35.6% |
|
|
150
|
+
| src | `███░░░░░░░░░░░░░░░░░` 13.2% |
|
|
151
|
+
| documentGovernance.ts | `░░░░░░░░░░░░░░░░░░░░` 2.5% |
|
|
134
152
|
| documentDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% |
|
|
135
153
|
| manageProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% |
|
|
136
|
-
| index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.
|
|
154
|
+
| index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
|
|
155
|
+
| documentUsage.ts | `░░░░░░░░░░░░░░░░░░░░` 1.4% |
|
|
137
156
|
| documentBundleSizes.ts | `░░░░░░░░░░░░░░░░░░░░` 1.4% |
|
|
138
157
|
| checkConfigFiles.ts | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
139
|
-
| documentUsage.ts | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
140
158
|
| documentActions.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
141
159
|
| cloudflare.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
142
160
|
| checkDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
@@ -144,9 +162,9 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
144
162
|
| formatCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
145
163
|
| auditDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
146
164
|
| lintCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
147
|
-
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░`
|
|
165
|
+
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 6.9% |
|
|
148
166
|
| @dpuse/dpuse-shared | `█░░░░░░░░░░░░░░░░░░░` 3.5% |
|
|
149
|
-
| dist/componentConfig.schema-DT3mO5rS.js | `█░░░░░░░░░░░░░░░░░░░` 2.
|
|
167
|
+
| dist/componentConfig.schema-DT3mO5rS.js | `█░░░░░░░░░░░░░░░░░░░` 2.6% |
|
|
150
168
|
| dist/dpuse-shared-componentModuleConnector.es.js | `░░░░░░░░░░░░░░░░░░░░` 0.7% |
|
|
151
169
|
| dist/moduleConfig.schema-aYmFWSrn.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
152
170
|
| dist/dpuse-shared-componentModulePresenter.es.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
@@ -187,7 +205,10 @@ Please do not open public GitHub issues for security vulnerabilities. Use [GitHu
|
|
|
187
205
|
|
|
188
206
|
[](https://scorecard.dev/viewer/?uri=github.com/dpuse/dpuse-development)
|
|
189
207
|
|
|
190
|
-
This project is working towards the [OpenSSF Best Practices](https://www.bestpractices.dev) Passing badge, a self-certification covering security policy, vulnerability reporting, build processes, code quality, and more. Currently the [OpenSSF Scorecard](https://scorecard.dev
|
|
208
|
+
This project is working towards the [OpenSSF Best Practices](https://www.bestpractices.dev) Passing badge, a self-certification covering security policy, vulnerability reporting, build processes, code quality, and more. Currently the [OpenSSF Scorecard](https://scorecard.dev) provides an independent automated assessment of the project's security practices and is an ongoing area of improvement.
|
|
209
|
+
|
|
210
|
+
> [!NOTE]
|
|
211
|
+
> Apart from the Best Practices badge above, the remaining Scorecard gaps need multi-person review or a pull-request workflow, which this solo-maintained project doesn't use.
|
|
191
212
|
|
|
192
213
|
## Contributing
|
|
193
214
|
|
|
@@ -6460,7 +6460,7 @@ ${[
|
|
|
6460
6460
|
`;
|
|
6461
6461
|
}
|
|
6462
6462
|
function di(e, t, n, r, i, a, o, s) {
|
|
6463
|
-
let c = `https://github.com/${e}/${t}`, l = `github.com/${e}/${t}`, u = `https://www.bestpractices.dev/projects/${String(a)}`, d = s !== void 0 && si(s) ? " Apart from the Best Practices badge above, the remaining Scorecard gaps need multi-person review or a pull-request workflow, which this solo-maintained project doesn't use." : "", f = a === void 0 ? "" : `[](${u})\n`, p = o.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${c}/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.` : "See [SECURITY.md](./SECURITY.md) for how to report one privately, the full disclosure policy, and expected response times.";
|
|
6463
|
+
let c = `https://github.com/${e}/${t}`, l = `github.com/${e}/${t}`, u = `https://www.bestpractices.dev/projects/${String(a)}`, d = s !== void 0 && si(s) ? "\n\n> [!NOTE]\n> Apart from the Best Practices badge above, the remaining Scorecard gaps need multi-person review or a pull-request workflow, which this solo-maintained project doesn't use." : "", f = a === void 0 ? "" : `[](${u})\n`, p = o.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${c}/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.` : "See [SECURITY.md](./SECURITY.md) for how to report one privately, the full disclosure policy, and expected response times.";
|
|
6464
6464
|
return `## Security & Quality
|
|
6465
6465
|
|
|
6466
6466
|
${ui(e, t, o)}${i === void 0 ? "" : ni(i)}### Reporting Vulnerabilities
|
|
@@ -7081,35 +7081,55 @@ var ua = "<!-- USAGE_START -->", da = "<!-- USAGE_END -->", fa = /* @__PURE__ */
|
|
|
7081
7081
|
"context",
|
|
7082
7082
|
"cookbook",
|
|
7083
7083
|
"presenter"
|
|
7084
|
-
]), pa =
|
|
7085
|
-
|
|
7084
|
+
]), pa = [
|
|
7085
|
+
["build", "Builds the project."],
|
|
7086
|
+
["build:ts", "Builds the TypeScript source."],
|
|
7087
|
+
["test", "Runs the tests."],
|
|
7088
|
+
["test:coverage", "Runs the unit tests and measures coverage."],
|
|
7089
|
+
["lint", "Checks the code with ESLint."],
|
|
7090
|
+
["format", "Formats the code with Prettier."],
|
|
7091
|
+
["audit", "Checks dependencies for known vulnerabilities with npm audit."],
|
|
7092
|
+
["check", "Checks configuration files against the DPUse templates and lists outdated dependencies."],
|
|
7093
|
+
["update", "Updates the DPUse packages this project depends on to their latest versions."],
|
|
7094
|
+
["document", "Regenerates the README's generated sections."],
|
|
7095
|
+
["documentOpening", "Regenerates the README's opening section."],
|
|
7096
|
+
["documentActions", "Regenerates the README's connector actions table."],
|
|
7097
|
+
["documentUsage", "Regenerates the README's Usage section."],
|
|
7098
|
+
["documentDependencies", "Regenerates the README's dependency licence report."],
|
|
7099
|
+
["documentBundleSizes", "Regenerates the README's bundle size report."],
|
|
7100
|
+
["documentGovernance", "Regenerates the README's Security & Quality, Contributing and License sections."],
|
|
7101
|
+
["sync", "Bumps the version, then commits and pushes to GitHub."],
|
|
7102
|
+
["release", "Bumps the version, commits and pushes, and creates a GitHub release."],
|
|
7103
|
+
["publish", "Registers the released version with DPUse."]
|
|
7104
|
+
], ma = /* @__PURE__ */ new Set(["development", "eslint"]), ha = "> [!WARNING]\n> This project is currently published to npm, but is not designed for general use. It is custom built for the DPUse CI/CD process. You are welcome to clone and customise it for your own purposes, but you will need to adapt it to your own project structure and tooling.\n\n", ga = "Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.";
|
|
7105
|
+
async function _a() {
|
|
7086
7106
|
try {
|
|
7087
7107
|
G("Document Usage"), q("1️⃣ Insert usage content into 'README.md'");
|
|
7088
|
-
let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n =
|
|
7089
|
-
await Bn(
|
|
7108
|
+
let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = va(e), r = ya(n), i = ba(e.engines?.node), a = ba(e.engines?.npm), o = ba(e.devDependencies?.typescript);
|
|
7109
|
+
await Bn(wa(xa(Hn(t.id), e.name), n, r, i, a, o, Sa(e)), ua, da), K("Usage documented");
|
|
7090
7110
|
} catch (e) {
|
|
7091
7111
|
console.error("❌ Error documenting usage", e), process.exit(1);
|
|
7092
7112
|
}
|
|
7093
7113
|
}
|
|
7094
|
-
function
|
|
7114
|
+
function va(e) {
|
|
7095
7115
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
7096
7116
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
|
|
7097
7117
|
return n.replace(/^git\+/, "");
|
|
7098
7118
|
}
|
|
7099
|
-
function
|
|
7119
|
+
function ya(e) {
|
|
7100
7120
|
return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
|
|
7101
7121
|
}
|
|
7102
|
-
function
|
|
7122
|
+
function ba(e) {
|
|
7103
7123
|
if (e == null) throw Error("package.json version range is required to document usage.");
|
|
7104
7124
|
let t = /\d+(?:\.\d+)*/.exec(e);
|
|
7105
7125
|
if (t == null) throw Error(`Unable to parse version from '${e}'.`);
|
|
7106
7126
|
return t[0];
|
|
7107
7127
|
}
|
|
7108
|
-
function
|
|
7128
|
+
function xa(e, t) {
|
|
7109
7129
|
let { typeId: n } = e;
|
|
7110
7130
|
if (fa.has(n)) return `This ${n} 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.
|
|
7111
7131
|
|
|
7112
|
-
You may view or clone this repository for your own purposes, such as building a new, similar ${n}, though there is currently no process to accept third-party ${n}s into DPUse at this stage. ${
|
|
7132
|
+
You may view or clone this repository for your own purposes, such as building a new, similar ${n}, though there is currently no process to accept third-party ${n}s into DPUse at this stage. ${ga}`;
|
|
7113
7133
|
if (e.publishedTo === "npm") {
|
|
7114
7134
|
if (t == null || t === "") throw Error("package.json 'name' field is required to document usage.");
|
|
7115
7135
|
return `This package is published to the [public npm registry](https://www.npmjs.com/package/${t}). Install it with:
|
|
@@ -7118,11 +7138,18 @@ You may view or clone this repository for your own purposes, such as building a
|
|
|
7118
7138
|
npm install ${t}
|
|
7119
7139
|
\`\`\`
|
|
7120
7140
|
|
|
7121
|
-
To work on the source instead, clone this repository. ${
|
|
7141
|
+
${ma.has(n) ? ha : ""}To work on the source instead, clone this repository. ${ga}`;
|
|
7122
7142
|
}
|
|
7123
|
-
return `You may view or clone this repository for your own purposes. ${
|
|
7143
|
+
return `You may view or clone this repository for your own purposes. ${ga}`;
|
|
7124
7144
|
}
|
|
7125
|
-
function
|
|
7145
|
+
function Sa(e) {
|
|
7146
|
+
let t = e.scripts ?? {}, n = e.name === "@dpuse/dpuse-development", r = new Set(Object.keys(t).filter((e) => n ? t[e]?.includes("dpuse-development.es.js") : t[e]?.includes("@dpuse/dpuse-development"))), i = (e) => r.has(e) || (t[e] ?? "").matchAll(/npm run ([\w:]+)/g).some(([, e = ""]) => r.has(e)), a = pa.filter(([e]) => i(e)).map(([e, t]) => `|\`${Ca(e)}\`|${t}|`);
|
|
7147
|
+
return a.length === 0 ? "" : `\n\n${n ? "This repository provides these commands to every DPUse project, and uses them itself:" : "Repository tasks run through npm scripts provided by [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development):"}\n\n|Command|What it does|\n|:-|:-|\n${a.join("\n")}`;
|
|
7148
|
+
}
|
|
7149
|
+
function Ca(e) {
|
|
7150
|
+
return e === "test" ? "npm test" : `npm run ${e}`;
|
|
7151
|
+
}
|
|
7152
|
+
function wa(e, t, n, r, i, a, o) {
|
|
7126
7153
|
return `## Usage
|
|
7127
7154
|
|
|
7128
7155
|
${e}
|
|
@@ -7133,11 +7160,11 @@ cd ${n}
|
|
|
7133
7160
|
npm install
|
|
7134
7161
|
\`\`\`
|
|
7135
7162
|
|
|
7136
|
-
_Requires [Node.js](https://nodejs.org/) ${r} or later, [npm](https://www.npmjs.com/) ${i} or later, and [TypeScript](https://www.typescriptlang.org/) ${a} or later._`;
|
|
7163
|
+
_Requires [Node.js](https://nodejs.org/) ${r} or later, [npm](https://www.npmjs.com/) ${i} or later, and [TypeScript](https://www.typescriptlang.org/) ${a} or later._${o}`;
|
|
7137
7164
|
}
|
|
7138
7165
|
//#endregion
|
|
7139
7166
|
//#region src/actions/formatCode.ts
|
|
7140
|
-
async function
|
|
7167
|
+
async function Ta() {
|
|
7141
7168
|
try {
|
|
7142
7169
|
G("Format Code"), await U("1️⃣ Format", "prettier", [
|
|
7143
7170
|
"--write",
|
|
@@ -7152,7 +7179,7 @@ async function ba() {
|
|
|
7152
7179
|
}
|
|
7153
7180
|
//#endregion
|
|
7154
7181
|
//#region src/actions/lintCode.ts
|
|
7155
|
-
async function
|
|
7182
|
+
async function Ea() {
|
|
7156
7183
|
try {
|
|
7157
7184
|
G("Lint Code"), await U("1️⃣ Lint", "eslint", ["."]), K("Code linted");
|
|
7158
7185
|
} catch (e) {
|
|
@@ -7161,7 +7188,7 @@ async function xa() {
|
|
|
7161
7188
|
}
|
|
7162
7189
|
//#endregion
|
|
7163
7190
|
//#region src/utilities/cloudflare.ts
|
|
7164
|
-
async function
|
|
7191
|
+
async function Da() {
|
|
7165
7192
|
let e = await W("config.json"), t = {
|
|
7166
7193
|
body: JSON.stringify(e),
|
|
7167
7194
|
headers: { "Content-Type": "application/json" },
|
|
@@ -7169,7 +7196,7 @@ async function Sa() {
|
|
|
7169
7196
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
7170
7197
|
if (!n.ok) throw Error(await n.text());
|
|
7171
7198
|
}
|
|
7172
|
-
async function
|
|
7199
|
+
async function Oa(e, t) {
|
|
7173
7200
|
async function n(e, t, r) {
|
|
7174
7201
|
for (let i of r) {
|
|
7175
7202
|
let r = `${e}/${i}`, a = `${t}/${i}`;
|
|
@@ -7187,7 +7214,7 @@ async function Ca(e, t) {
|
|
|
7187
7214
|
let r = await Pn(`${e}/${t}/`);
|
|
7188
7215
|
await n(`${e}/${t}`, t, r);
|
|
7189
7216
|
}
|
|
7190
|
-
async function
|
|
7217
|
+
async function ka(e) {
|
|
7191
7218
|
let t = e.id, n = {
|
|
7192
7219
|
body: JSON.stringify(e),
|
|
7193
7220
|
headers: { "Content-Type": "application/json" },
|
|
@@ -7195,7 +7222,7 @@ async function wa(e) {
|
|
|
7195
7222
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
7196
7223
|
if (!r.ok) throw Error(await r.text());
|
|
7197
7224
|
}
|
|
7198
|
-
async function
|
|
7225
|
+
async function Aa(e, t) {
|
|
7199
7226
|
let n = `v${e.version ?? "unknown"}`;
|
|
7200
7227
|
async function r(e, r = "") {
|
|
7201
7228
|
let i = await Pn(e, { withFileTypes: !0 });
|
|
@@ -7219,24 +7246,24 @@ async function Ta(e, t) {
|
|
|
7219
7246
|
}
|
|
7220
7247
|
//#endregion
|
|
7221
7248
|
//#region node_modules/valibot/dist/index.mjs
|
|
7222
|
-
var
|
|
7249
|
+
var ja = {
|
|
7223
7250
|
lang: void 0,
|
|
7224
7251
|
message: void 0,
|
|
7225
7252
|
abortEarly: void 0,
|
|
7226
7253
|
abortPipeEarly: void 0
|
|
7227
7254
|
};
|
|
7228
7255
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7229
|
-
function
|
|
7256
|
+
function Ma(e) {
|
|
7230
7257
|
return e ? {
|
|
7231
7258
|
lang: e?.lang ?? void 0,
|
|
7232
7259
|
message: e?.message,
|
|
7233
7260
|
abortEarly: e?.abortEarly ?? void 0,
|
|
7234
7261
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
7235
|
-
} :
|
|
7262
|
+
} : ja;
|
|
7236
7263
|
}
|
|
7237
7264
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7238
|
-
function
|
|
7239
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
7265
|
+
function Na(e, t, n) {
|
|
7266
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ Ma(n));
|
|
7240
7267
|
return {
|
|
7241
7268
|
typed: r.typed,
|
|
7242
7269
|
success: !r.issues,
|
|
@@ -7246,21 +7273,21 @@ function Oa(e, t, n) {
|
|
|
7246
7273
|
}
|
|
7247
7274
|
//#endregion
|
|
7248
7275
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
|
|
7249
|
-
var
|
|
7276
|
+
var Pa = ji([
|
|
7250
7277
|
"list",
|
|
7251
7278
|
"render",
|
|
7252
7279
|
"setColorMode"
|
|
7253
|
-
]),
|
|
7280
|
+
]), Fa = /* @__PURE__ */ Q({
|
|
7254
7281
|
...zi,
|
|
7255
7282
|
typeId: /* @__PURE__ */ Ci("presenter"),
|
|
7256
|
-
actionNames: /* @__PURE__ */ xi(
|
|
7283
|
+
actionNames: /* @__PURE__ */ xi(Pa),
|
|
7257
7284
|
presentations: /* @__PURE__ */ xi(Li)
|
|
7258
|
-
}),
|
|
7285
|
+
}), Ia = [
|
|
7259
7286
|
"1️⃣ ",
|
|
7260
7287
|
"2️⃣ ",
|
|
7261
7288
|
"3️⃣ ",
|
|
7262
7289
|
"4️⃣ "
|
|
7263
|
-
],
|
|
7290
|
+
], La = [{
|
|
7264
7291
|
id: "unit",
|
|
7265
7292
|
label: "Run unit tests",
|
|
7266
7293
|
command: "vitest",
|
|
@@ -7273,36 +7300,36 @@ var ka = ji([
|
|
|
7273
7300
|
arguments: ["test", "--pass-with-no-tests"],
|
|
7274
7301
|
configFileName: "playwright.config.ts"
|
|
7275
7302
|
}];
|
|
7276
|
-
async function
|
|
7303
|
+
async function Ra() {
|
|
7277
7304
|
try {
|
|
7278
7305
|
G("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
|
|
7279
7306
|
} catch (e) {
|
|
7280
7307
|
console.error("❌ Error building project", e), process.exit(1);
|
|
7281
7308
|
}
|
|
7282
7309
|
}
|
|
7283
|
-
async function
|
|
7310
|
+
async function za() {
|
|
7284
7311
|
try {
|
|
7285
7312
|
G("Publish Project");
|
|
7286
7313
|
let e = await W("package.json"), t = await W("config.json");
|
|
7287
|
-
await
|
|
7314
|
+
await Ja("1️⃣ ", e, t, Hn(t.id)), K(`Project version '${e.version ?? "unknown"}' published.`);
|
|
7288
7315
|
} catch (e) {
|
|
7289
7316
|
console.error("❌ Error publishing project", e), process.exit(1);
|
|
7290
7317
|
}
|
|
7291
7318
|
}
|
|
7292
|
-
async function
|
|
7319
|
+
async function Ba() {
|
|
7293
7320
|
try {
|
|
7294
7321
|
G("Release Project");
|
|
7295
7322
|
let e = await W("package.json"), t = await W("config.json");
|
|
7296
|
-
await
|
|
7323
|
+
await qa("1️⃣ ", e);
|
|
7297
7324
|
let n = Hn(t.id);
|
|
7298
7325
|
switch (n.typeId) {
|
|
7299
7326
|
case "connector":
|
|
7300
|
-
t = await
|
|
7327
|
+
t = await Ha("2️⃣ ", e);
|
|
7301
7328
|
break;
|
|
7302
7329
|
case "presenter":
|
|
7303
|
-
t = await
|
|
7330
|
+
t = await Ua("2️⃣ ", e);
|
|
7304
7331
|
break;
|
|
7305
|
-
default: t = await
|
|
7332
|
+
default: t = await Va("2️⃣ ", e);
|
|
7306
7333
|
}
|
|
7307
7334
|
await U("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
|
|
7308
7335
|
"commit",
|
|
@@ -7312,7 +7339,7 @@ async function Fa() {
|
|
|
7312
7339
|
"push",
|
|
7313
7340
|
"origin",
|
|
7314
7341
|
"main:main"
|
|
7315
|
-
]), await
|
|
7342
|
+
]), await Ja("7️⃣ ", e, t, n), n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
|
|
7316
7343
|
"release",
|
|
7317
7344
|
"create",
|
|
7318
7345
|
`v${e.version ?? "unknown"}`,
|
|
@@ -7325,39 +7352,39 @@ async function Fa() {
|
|
|
7325
7352
|
console.error("❌ Error releasing project", e), process.exit(1);
|
|
7326
7353
|
}
|
|
7327
7354
|
}
|
|
7328
|
-
async function
|
|
7355
|
+
async function Va(e, t) {
|
|
7329
7356
|
q(`${e} Build project configuration`);
|
|
7330
7357
|
let n = await W("config.json");
|
|
7331
7358
|
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await Rn("logo.svg"), n.iconDark ??= await Rn("logoDark.svg"), await zn("config.json", n), n;
|
|
7332
7359
|
}
|
|
7333
|
-
async function
|
|
7360
|
+
async function Ha(e, t) {
|
|
7334
7361
|
q(`${e} Build connector project configuration`);
|
|
7335
|
-
let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */
|
|
7362
|
+
let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Na(Ki, n);
|
|
7336
7363
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7337
7364
|
let a = Gn(r);
|
|
7338
|
-
return await
|
|
7365
|
+
return await Wa(t, n, a, Xi(a));
|
|
7339
7366
|
}
|
|
7340
|
-
async function
|
|
7367
|
+
async function Ua(e, t) {
|
|
7341
7368
|
q(`${e} Build presenter project configuration`);
|
|
7342
|
-
let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */
|
|
7369
|
+
let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Na(Fa, n);
|
|
7343
7370
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7344
|
-
return await
|
|
7371
|
+
return await Wa(t, n, Gn(r));
|
|
7345
7372
|
}
|
|
7346
|
-
async function
|
|
7373
|
+
async function Wa(e, t, n, r) {
|
|
7347
7374
|
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 zn("config.json", t), t;
|
|
7348
7375
|
}
|
|
7349
|
-
async function
|
|
7376
|
+
async function Ga() {
|
|
7350
7377
|
try {
|
|
7351
7378
|
G("Synchronise Project with GitHub");
|
|
7352
7379
|
let e = await W("package.json"), t = await W("config.json");
|
|
7353
|
-
switch (await
|
|
7380
|
+
switch (await qa("1️⃣ ", e), Hn(t.id).typeId) {
|
|
7354
7381
|
case "connector":
|
|
7355
|
-
await
|
|
7382
|
+
await Ha("2️⃣ ", e);
|
|
7356
7383
|
break;
|
|
7357
7384
|
case "presenter":
|
|
7358
|
-
await
|
|
7385
|
+
await Ua("2️⃣ ", e);
|
|
7359
7386
|
break;
|
|
7360
|
-
default: await
|
|
7387
|
+
default: await Va("2️⃣ ", e);
|
|
7361
7388
|
}
|
|
7362
7389
|
await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
|
|
7363
7390
|
"commit",
|
|
@@ -7372,14 +7399,14 @@ async function Ba() {
|
|
|
7372
7399
|
console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
|
|
7373
7400
|
}
|
|
7374
7401
|
}
|
|
7375
|
-
async function
|
|
7402
|
+
async function Ka(e = ["unit"], t = !1) {
|
|
7376
7403
|
try {
|
|
7377
7404
|
G("Test Project");
|
|
7378
7405
|
let n = 0;
|
|
7379
|
-
for (let r of
|
|
7406
|
+
for (let r of La) {
|
|
7380
7407
|
if (!e.includes(r.id) || await Rn(r.configFileName) === null) continue;
|
|
7381
7408
|
let i = t && r.id === "unit" ? ["--coverage"] : [];
|
|
7382
|
-
await U(`${
|
|
7409
|
+
await U(`${Ia[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
|
|
7383
7410
|
}
|
|
7384
7411
|
if (n === 0) {
|
|
7385
7412
|
console.warn("\n⚠️ No tests configured for this project.\n");
|
|
@@ -7390,7 +7417,7 @@ async function Va(e = ["unit"], t = !1) {
|
|
|
7390
7417
|
console.error("❌ Error testing project", e), process.exit(1);
|
|
7391
7418
|
}
|
|
7392
7419
|
}
|
|
7393
|
-
async function
|
|
7420
|
+
async function qa(e, t, n = "./") {
|
|
7394
7421
|
if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
7395
7422
|
else {
|
|
7396
7423
|
let e = t.version, n = t.version.split(".");
|
|
@@ -7398,17 +7425,17 @@ async function Ha(e, t, n = "./") {
|
|
|
7398
7425
|
}
|
|
7399
7426
|
await zn(`${n}package.json`, t);
|
|
7400
7427
|
}
|
|
7401
|
-
async function
|
|
7402
|
-
if (r.typeId === "app") q(`${e} Register module`), await
|
|
7403
|
-
else if (r.typeId === "engine") q(`${e} Register module`), await
|
|
7428
|
+
async function Ja(e, t, n, r) {
|
|
7429
|
+
if (r.typeId === "app") q(`${e} Register module`), await Da();
|
|
7430
|
+
else if (r.typeId === "engine") q(`${e} Register module`), await Aa(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await ka(n);
|
|
7404
7431
|
else if (r.uploadGroupName === void 0) q(`${e} Registration NOT required`);
|
|
7405
7432
|
else {
|
|
7406
7433
|
q(`${e} Register module`);
|
|
7407
7434
|
let i = n.id.split("-").slice(2).join("-");
|
|
7408
|
-
await
|
|
7435
|
+
await Aa(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await ka(n);
|
|
7409
7436
|
}
|
|
7410
7437
|
}
|
|
7411
7438
|
//#endregion
|
|
7412
|
-
export { Jn as auditDependencies,
|
|
7439
|
+
export { Jn as auditDependencies, Ra as buildProject, Yn as checkConfigFiles, nr as checkDependencies, ra as documentActions, dr as documentBundleSizes, Nr as documentDependencies, ei as documentGovernance, oa as documentOpening, _a as documentUsage, Ta as formatCode, Ea as lintCode, za as publishProject, Ba as releaseProject, Ga as syncProjectWithGitHub, Ka as testProject, Oa as uploadDirectoryToR2 };
|
|
7413
7440
|
|
|
7414
7441
|
//# sourceMappingURL=dpuse-development.es.js.map
|