@dpuse/dpuse-development 0.3.766 → 0.3.781
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 +71 -103
- package/dist/dpuse-development.es.js +1622 -1610
- package/dist/dpuse-development.es.js.map +1 -1
- package/dist/types/src/actions/auditDependencies.d.ts +1 -0
- package/dist/types/src/actions/buildProject.d.ts +2 -0
- package/dist/types/src/actions/checkDependencies.d.ts +2 -0
- package/dist/types/src/actions/checkProject.d.ts +2 -0
- package/dist/types/src/actions/documentApiReference.d.ts +1 -1
- package/dist/types/src/actions/documentBundleSizes.d.ts +1 -0
- package/dist/types/src/actions/documentContributingLicense.d.ts +2 -0
- package/dist/types/src/actions/documentDependencies.d.ts +3 -0
- package/dist/types/src/actions/documentProject.d.ts +6 -0
- package/dist/types/src/actions/documentQualitySecurity.d.ts +2 -0
- package/dist/types/src/actions/formatCode.d.ts +1 -0
- package/dist/types/src/actions/lintCode.d.ts +1 -0
- package/dist/types/src/actions/publishProject.d.ts +5 -0
- package/dist/types/src/actions/releaseProject.d.ts +3 -0
- package/dist/types/src/actions/syncProjectWithGitHub.d.ts +2 -0
- package/dist/types/src/actions/testProject.d.ts +3 -0
- package/dist/types/src/index.d.ts +7 -10
- package/dist/types/src/utilities/index.d.ts +8 -0
- package/package.json +7 -14
- package/dist/types/src/actions/documentGovernance.d.ts +0 -1
- package/dist/types/src/actions/manageProject.d.ts +0 -8
package/README.md
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
[](./code-health-reports/fallow/index.md)
|
|
10
10
|
[](https://sonarcloud.io/summary/new_code?id=dpuse_dpuse-development)
|
|
11
11
|
|
|
12
|
-
[
|
|
12
|
+
[DPUse](https://www.dpuse.app) · [Report a Vulnerability](https://github.com/dpuse/dpuse-development/security/advisories/new) · [Open an Issue](https://github.com/dpuse/dpuse-development/issues)
|
|
13
|
+
|
|
14
|
+
Actions for managing DPUse projects.
|
|
13
15
|
|
|
14
16
|
## About DPUse
|
|
15
17
|
|
|
@@ -25,7 +27,7 @@ In addition, DPUse provides [Tools](https://www.dpuse.app) used by the applicati
|
|
|
25
27
|
|
|
26
28
|
## Introduction
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
The package implements a common set of actions used to manage DPUse repositories. All actions are designed to be run from `package.json` scripts and assume that the project follows the standard DPUse directory structure and that it includes a `config.json` file in the root directory. See [API Reference](https://github.com/dpuse/dpuse-development/blob/main/API_REFERENCE.md).
|
|
29
31
|
|
|
30
32
|
<!-- OPENING_END -->
|
|
31
33
|
|
|
@@ -33,16 +35,16 @@ Actions for managing DPUse projects.
|
|
|
33
35
|
|
|
34
36
|
## Usage
|
|
35
37
|
|
|
36
|
-
This package
|
|
38
|
+
This [package](https://www.npmjs.com/package/@dpuse/dpuse-development) is available on [npm](https://www.npmjs.com/). Install it with:
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
41
|
npm install @dpuse/dpuse-development
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
> [!WARNING]
|
|
43
|
-
> This project is
|
|
45
|
+
> This project 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.
|
|
44
46
|
|
|
45
|
-
To work on the source instead, clone this repository.
|
|
47
|
+
To work on the source instead, clone this repository.
|
|
46
48
|
|
|
47
49
|
```bash
|
|
48
50
|
git clone https://github.com/dpuse/dpuse-development.git
|
|
@@ -52,55 +54,10 @@ npm install
|
|
|
52
54
|
|
|
53
55
|
_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._
|
|
54
56
|
|
|
55
|
-
This repository
|
|
56
|
-
|
|
57
|
-
|Command|What it does|
|
|
58
|
-
|:-|:-|
|
|
59
|
-
|`npm run build`|Builds the project.|
|
|
60
|
-
|`npm test`|Runs the tests.|
|
|
61
|
-
|`npm run test:coverage`|Runs the unit tests and measures coverage.|
|
|
62
|
-
|`npm run lint`|Checks the code with ESLint.|
|
|
63
|
-
|`npm run format`|Formats the code with Prettier.|
|
|
64
|
-
|`npm run audit`|Checks dependencies for known vulnerabilities with npm audit.|
|
|
65
|
-
|`npm run check`|Checks configuration files against the DPUse templates and lists outdated dependencies.|
|
|
66
|
-
|`npm run document`|Regenerates the README's generated sections.|
|
|
67
|
-
|`npm run documentOpening`|Regenerates the README's opening section.|
|
|
68
|
-
|`npm run documentUsage`|Regenerates the README's Usage section.|
|
|
69
|
-
|`npm run documentDependencies`|Regenerates the README's dependency licence report.|
|
|
70
|
-
|`npm run documentBundleSizes`|Regenerates the README's bundle size report.|
|
|
71
|
-
|`npm run documentGovernance`|Regenerates the README's Quality & Security, Contributing and License sections.|
|
|
72
|
-
|`npm run sync`|Bumps the version, then commits and pushes to GitHub.|
|
|
73
|
-
|`npm run release`|Bumps the version, commits and pushes, and creates a GitHub release.|
|
|
57
|
+
This repository manages itself using the actions it implements.
|
|
74
58
|
|
|
75
59
|
<!-- USAGE_END -->
|
|
76
60
|
|
|
77
|
-
## Architecture
|
|
78
|
-
|
|
79
|
-
The package implements the following actions:
|
|
80
|
-
|
|
81
|
-
| Name | Notes |
|
|
82
|
-
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
83
|
-
| auditDependencies | Audit the project's dependencies for known security vulnerabilities. Also runs the `npm outdated` command. |
|
|
84
|
-
| checkConfigFiles | |
|
|
85
|
-
| checkDependencies | Identifies outdated dependencies using npm `outdated` and `npm-check-updates` with option to automatically install latest versions. |
|
|
86
|
-
| documentBundleSizes | |
|
|
87
|
-
| documentDependencies | Identify licenses of the project's production and peer dependencies. Updates the table in the **Dependency Licenses** section of this page and summary files licenses.json and licenseTree.json in th licenses directory of this repository. Also downloads a copy of dependency license to `licenses/downloads'.. |
|
|
88
|
-
| documentGovernance | |
|
|
89
|
-
| documentActions | |
|
|
90
|
-
| documentAPIReference | Lists every export of each import path in `API_REFERENCE.md`. Runs on each build where the project has that file. |
|
|
91
|
-
| documentOpening | |
|
|
92
|
-
| documentUsage | |
|
|
93
|
-
| formatCode | Uses `prettier` to enforce formatting style rules. |
|
|
94
|
-
| lintCode | Uses `eslint` to check the code for potential errors and enforces coding style rules. |
|
|
95
|
-
| uploadDirectoryToR2 | |
|
|
96
|
-
| buildProject | Builds the package using Vite. Output to '/dist' directory. Builds bundle analysis reports. |
|
|
97
|
-
| publishProject | |
|
|
98
|
-
| releaseProject | Bump version, builds config, builds project, synchronise with `GitHub` and publish to `npm` or Cloudflare. |
|
|
99
|
-
| syncProjectWithGitHub | Synchronise the local repository with the main GitHub repository. |
|
|
100
|
-
| testProject | |
|
|
101
|
-
|
|
102
|
-
All actions are designed to be run from `package.json` scripts and assume that the project follows the standard DPUse directory structure and that it includes a `config.json` file in the root directory.
|
|
103
|
-
|
|
104
61
|
## API Reference
|
|
105
62
|
|
|
106
63
|
See [API_REFERENCE.md](./API_REFERENCE.md) for the complete API reference, including every exported action and type.
|
|
@@ -118,44 +75,51 @@ See [API_REFERENCE.md](./API_REFERENCE.md) for the complete API reference, inclu
|
|
|
118
75
|
|
|
119
76
|
## Bundle Analysis
|
|
120
77
|
|
|
121
|
-
This report is updated each
|
|
78
|
+
This report is updated with each release, from the bundle the release builds, 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.
|
|
122
79
|
|
|
123
80
|
_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._
|
|
124
81
|
|
|
125
|
-
|Chunk/Module/File|Composition|
|
|
126
|
-
|
|
127
|
-
| dist/dpuse-development.es.js
|
|
128
|
-
| acorn → dist/acorn.mjs
|
|
129
|
-
| acorn-typescript → lib/index.mjs
|
|
130
|
-
| src
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|  
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
82
|
+
| Chunk/Module/File | Composition |
|
|
83
|
+
| :----------------------------------------------------------------------------------------------- | :--------------------------- |
|
|
84
|
+
| dist/dpuse-development.es.js | 331.4 kB · gzip 85.3 kB |
|
|
85
|
+
| acorn → dist/acorn.mjs | `████████░░░░░░░░░░░░` 39.5% |
|
|
86
|
+
| acorn-typescript → lib/index.mjs | `███████░░░░░░░░░░░░░` 34.6% |
|
|
87
|
+
| src | `███░░░░░░░░░░░░░░░░░` 15.7% |
|
|
88
|
+
| documentQualitySecurity.ts | `░░░░░░░░░░░░░░░░░░░░` 2.5% |
|
|
89
|
+
| index.ts | `░░░░░░░░░░░░░░░░░░░░` 2.4% |
|
|
90
|
+
| documentApiReference.ts | `░░░░░░░░░░░░░░░░░░░░` 2.3% |
|
|
91
|
+
| documentDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% |
|
|
92
|
+
| documentBundleSizes.ts | `░░░░░░░░░░░░░░░░░░░░` 1.3% |
|
|
93
|
+
| checkConfigFiles.ts | `░░░░░░░░░░░░░░░░░░░░` 1.1% |
|
|
94
|
+
| documentUsage.ts | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
95
|
+
| documentActions.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
96
|
+
| documentOpening.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
97
|
+
| cloudflare.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
98
|
+
| checkDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
99
|
+
| documentContributingLicense.ts | `░░░░░░░░░░░░░░░░░░░░` 0.4% |
|
|
100
|
+
| releaseProject.ts | `░░░░░░░░░░░░░░░░░░░░` 0.3% |
|
|
101
|
+
| testProject.ts | `░░░░░░░░░░░░░░░░░░░░` 0.3% |
|
|
102
|
+
| publishProject.ts | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
103
|
+
| documentProject.ts | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
104
|
+
| syncProjectWithGitHub.ts | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
105
|
+
| formatCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
106
|
+
| auditDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
107
|
+
| buildProject.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
108
|
+
| lintCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
109
|
+
| checkProject.ts | `░░░░░░░░░░░░░░░░░░░░` 0.0% |
|
|
110
|
+
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 6.7% |
|
|
111
|
+
| @dpuse/dpuse-shared | `█░░░░░░░░░░░░░░░░░░░` 3.4% |
|
|
112
|
+
| dist/componentConfig.schema-DT3mO5rS.js | `█░░░░░░░░░░░░░░░░░░░` 2.6% |
|
|
113
|
+
| dist/dpuse-shared-componentModuleConnector.es.js | `░░░░░░░░░░░░░░░░░░░░` 0.7% |
|
|
114
|
+
| dist/moduleConfig.schema-aYmFWSrn.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
115
|
+
| dist/dpuse-shared-componentModulePresenter.es.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
116
|
+
| valibot → dist/index.mjs | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
153
117
|
|
|
154
118
|
(bundler output, whitespace & JSON) = bytes Sonda can't trace to a source file: whitespace (indentation and line breaks), code the bundler generates (region comments, the combined import/export lines, its small runtime helper and wrappers), and imported JSON such as `config.json`, which the bundler doesn't map. The JSON and the generated code are real bytes that ship; the whitespace mostly disappears once compressed.
|
|
155
119
|
|
|
156
120
|
<!-- BUNDLE_END -->
|
|
157
121
|
|
|
158
|
-
<!--
|
|
122
|
+
<!-- QUALITY_SECURITY_START -->
|
|
159
123
|
|
|
160
124
|
## Quality & Security
|
|
161
125
|
|
|
@@ -163,36 +127,36 @@ This section is updated each time `npm run document` is run. Settings come from
|
|
|
163
127
|
|
|
164
128
|
### Testing
|
|
165
129
|
|
|
166
|
-
|Check or setting|Status|What it does|
|
|
167
|
-
|
|
168
|
-
|Unit tests
|
|
169
|
-
|Property-based tests
|
|
170
|
-
|Test coverage
|
|
130
|
+
| Check or setting | Status | What it does |
|
|
131
|
+
| :------------------- | :---------------- | :------------------------------------------------------------------------------------- |
|
|
132
|
+
| Unit tests | ✅ On | Run in CI on every push to `main`. |
|
|
133
|
+
| Property-based tests | ✅ fast-check | Fuzz testing: many random inputs per test to find edge cases, run with the unit tests. |
|
|
134
|
+
| Test coverage | ✅ 99.7% of lines | Share of source lines the unit tests run. The target is 80%. |
|
|
171
135
|
|
|
172
136
|
### Code Quality
|
|
173
137
|
|
|
174
|
-
|Check or setting|Status|What it does|
|
|
175
|
-
|
|
176
|
-
|[Fallow](./code-health-reports/fallow/index.md)
|
|
177
|
-
|[SonarCloud](https://sonarcloud.io/summary/new_code?id=dpuse_dpuse-development)
|
|
138
|
+
| Check or setting | Status | What it does |
|
|
139
|
+
| :------------------------------------------------------------------------------ | :-------- | :--------------------------------------------------------------------------------------- |
|
|
140
|
+
| [Fallow](./code-health-reports/fallow/index.md) | ✅ A (85) | Unused code, duplication, complexity and dependency hygiene. |
|
|
141
|
+
| [SonarCloud](https://sonarcloud.io/summary/new_code?id=dpuse_dpuse-development) | ✅ On | Code quality and security analysis on every push: bugs, code smells and vulnerabilities. |
|
|
178
142
|
|
|
179
143
|
### Security Analysis
|
|
180
144
|
|
|
181
|
-
|Check or setting|Status|What it does|
|
|
182
|
-
|
|
183
|
-
|[CodeQL](https://github.com/dpuse/dpuse-development/security/code-scanning)
|
|
184
|
-
|Secret scanning
|
|
185
|
-
|Push protection
|
|
145
|
+
| Check or setting | Status | What it does |
|
|
146
|
+
| :-------------------------------------------------------------------------- | :--------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
|
|
147
|
+
| [CodeQL](https://github.com/dpuse/dpuse-development/security/code-scanning) | ✅ GitHub Actions, JavaScript/TypeScript | Static analysis for security vulnerabilities, using the extended security queries, on every push and pull request to `main` and weekly. |
|
|
148
|
+
| Secret scanning | ✅ On | Detects credentials, such as API keys and tokens, committed to the repository. |
|
|
149
|
+
| Push protection | ✅ On | Blocks pushes that contain credentials. |
|
|
186
150
|
|
|
187
151
|
### Dependencies
|
|
188
152
|
|
|
189
|
-
|Check or setting|Status|What it does|
|
|
190
|
-
|
|
191
|
-
|npm audit
|
|
192
|
-
|[Socket.dev](https://socket.dev)
|
|
193
|
-
|Dependabot alerts
|
|
194
|
-
|Dependabot security updates
|
|
195
|
-
|Dependabot version updates
|
|
153
|
+
| Check or setting | Status | What it does |
|
|
154
|
+
| :------------------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| npm audit | ✅ On | Fails CI when any dependency has a known vulnerability. |
|
|
156
|
+
| [Socket.dev](https://socket.dev) | ✅ On | Flags supply chain risk in dependencies: malicious packages, typosquatting and suspicious behaviour that may not yet have a CVE. |
|
|
157
|
+
| Dependabot alerts | ✅ On | Alerts when a dependency has a known vulnerability, using the GitHub Advisory Database. |
|
|
158
|
+
| Dependabot security updates | ❌ Off | Opens pull requests that update vulnerable dependencies. |
|
|
159
|
+
| Dependabot version updates | ❌ Off | Opens pull requests for new dependency versions. |
|
|
196
160
|
|
|
197
161
|
### OpenSSF 🚧
|
|
198
162
|
|
|
@@ -207,6 +171,10 @@ This project is working towards the [OpenSSF Best Practices](https://www.bestpra
|
|
|
207
171
|
|
|
208
172
|
Please do not open public GitHub issues for security vulnerabilities. Use [GitHub private vulnerability reporting](https://github.com/dpuse/dpuse-development/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.
|
|
209
173
|
|
|
174
|
+
<!-- QUALITY_SECURITY_END -->
|
|
175
|
+
|
|
176
|
+
<!-- CONTRIBUTING_LICENSE_START -->
|
|
177
|
+
|
|
210
178
|
## Contributing
|
|
211
179
|
|
|
212
180
|
This repository is maintained solely by its owner and does not, at present, accept external contributions into the canonical repo. Its source is published openly under the MIT License — every DPUse project is fully open source except DPUse Engine, which remains closed and proprietary.
|
|
@@ -219,4 +187,4 @@ This project is licensed under the MIT License, permitting free use, modificatio
|
|
|
219
187
|
|
|
220
188
|
[MIT](./LICENSE) © 2026 Jonathan Terrell
|
|
221
189
|
|
|
222
|
-
<!--
|
|
190
|
+
<!-- CONTRIBUTING_LICENSE_END -->
|