@dpuse/dpuse-development 0.3.620 → 0.3.623
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 +23 -63
- package/dist/dpuse-development.es.js +7 -5
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +1 -1
- package/vitest.config.ts +1 -1
package/README.md
CHANGED
|
@@ -16,14 +16,8 @@ Actions for managing DPUse projects.
|
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
cd dpuse-development
|
|
23
|
-
npm install --save-dev @dpuse/dpuse-development
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
> See the Data Positioning security documentation for additional initialization requirements.
|
|
19
|
+
> [!WARNING]
|
|
20
|
+
> 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.
|
|
27
21
|
|
|
28
22
|
## DPUse Projects
|
|
29
23
|
|
|
@@ -58,71 +52,37 @@ Support projects...
|
|
|
58
52
|
|
|
59
53
|
The package implements the following actions:
|
|
60
54
|
|
|
61
|
-
| Name
|
|
62
|
-
|
|
|
63
|
-
| auditDependencies
|
|
64
|
-
| buildDirectoryIndex
|
|
65
|
-
| buildProject
|
|
66
|
-
| checkDependencies
|
|
67
|
-
| documentDependencies
|
|
68
|
-
| formatCode
|
|
69
|
-
| lintCode
|
|
70
|
-
| releaseProject
|
|
71
|
-
| syncProjectWithGitHub
|
|
72
|
-
| testProject
|
|
73
|
-
| updateDPUseDependencies | Install the latest version of the specified Data Positioning dependencies. |
|
|
55
|
+
| Name | Notes |
|
|
56
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
57
|
+
| auditDependencies | Audit the project's dependencies for known security vulnerabilities. uses the owasp-dependency-check module to perform the checks. Updates the OWASP badge(s) at the top of this page. Also runs the 'npm outdated`command. |
|
|
58
|
+
| buildDirectoryIndex | Build an index for the specified directory path. |
|
|
59
|
+
| buildProject | Builds the package using Vite. Output to '/dist' directory. Wrangler for api. Nuxt for app-nuxt. Builds bundle analysis reports. |
|
|
60
|
+
| checkDependencies | Identifies outdated dependencies using npm `outdated` and `npm-check-updates` with option to automatically install latest versions. |
|
|
61
|
+
| 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'.. |
|
|
62
|
+
| formatCode | Uses `prettier` to enforce formatting style rules. |
|
|
63
|
+
| lintCode | Uses `eslint` to check the code for potential errors and enforces coding style rules. |
|
|
64
|
+
| releaseProject | Bump version, builds config, builds project, synchronise with `GitHub` and publish to `npm` or Cloudflare. |
|
|
65
|
+
| syncProjectWithGitHub | Synchronise the local repository with the main GitHub repository. |
|
|
66
|
+
| testProject | ❌ Not implemented. |
|
|
74
67
|
|
|
75
68
|
### Usage
|
|
76
69
|
|
|
77
|
-
All utilities are designed to be run from `package.json` scripts and assume that the project follows the standard
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
...
|
|
82
|
-
"scripts": {
|
|
83
|
-
"audit": "node -e \"import('@dpuse/dpuse-development').then(m => m.auditDependencies())\"",
|
|
84
|
-
"build": "node -e \"import('@dpuse/dpuse-development').then(m => m.buildProject())\"",
|
|
85
|
-
"check": "node -e \"import('@dpuse/dpuse-development').then(m => m.checkDependencies())\"",
|
|
86
|
-
"document": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentDependencies(['MIT']))\"",
|
|
87
|
-
"format": "node -e \"import('@dpuse/dpuse-development').then(m => m.formatCode())\"",
|
|
88
|
-
"lint": "node -e \"import('@dpuse/dpuse-development').then(m => m.lintCode())\"",
|
|
89
|
-
"release": "node -e \"import('@dpuse/dpuse-development').then(m => m.releaseProject())\"",
|
|
90
|
-
"sync": "node -e \"import('@dpuse/dpuse-development').then(m => m.syncProjectWithGitHub())\"",
|
|
91
|
-
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\"",
|
|
92
|
-
"update": "node -e \"import('@dpuse/dpuse-development').then(m => m.updateDPUseDependencies(['development']))\""
|
|
93
|
-
}
|
|
94
|
-
...
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Resources
|
|
99
|
-
|
|
100
|
-
Common resources (files) used across Data Positioning projects.
|
|
101
|
-
|
|
102
|
-
| Name | File |
|
|
103
|
-
| --------------------------------------------- | -------------------------------------------------------------------- |
|
|
104
|
-
| ESLint rules \* | [eslint.config.ts](eslint.config.ts) |
|
|
105
|
-
| Git path attributes | [.gitattributes](.gitattributes) |
|
|
106
|
-
| Git ignore rules for published repositories | [resources/.gitignore_PUBLISHED](resources/.gitignore_PUBLISHED) |
|
|
107
|
-
| Git ignore rules for unpublished repositories | [resources/.gitignore_UNPUBLISHED](resources/.gitignore_UNPUBLISHED) |
|
|
108
|
-
| LICENSE | [LICENSE](LICENSE) |
|
|
109
|
-
| Markdown lint rules | [.markdownlint.json](.markdownlint.json) |
|
|
110
|
-
| VS Code key bindings | [resources/vsCodeKeyBindings.json](resources/vsCodeKeyBindings.json) |
|
|
70
|
+
All utilities 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.
|
|
111
71
|
|
|
112
|
-
|
|
72
|
+
Please see other DPUse repositories for actual usage.
|
|
113
73
|
|
|
114
|
-
|
|
74
|
+
## Dependency Licenses
|
|
115
75
|
|
|
116
76
|
<!-- DEPENDENCY_LICENSES_START -->
|
|
117
|
-
|
|
77
|
+
> [!WARNING]
|
|
78
|
+
> Dependency licenses are not documented here: @dpuse/dpuse-development is a development-only tool and is never part of a production release
|
|
118
79
|
<!-- DEPENDENCY_LICENSES_END -->
|
|
119
80
|
|
|
120
81
|
### Dependency Tree
|
|
121
82
|
|
|
122
|
-
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.
|
|
123
|
-
|
|
124
83
|
<!-- DEPENDENCY_TREE_START -->
|
|
125
|
-
|
|
84
|
+
> [!WARNING]
|
|
85
|
+
> Dependency licenses are not documented here: @dpuse/dpuse-development is a development-only tool and is never part of a production release
|
|
126
86
|
<!-- DEPENDENCY_TREE_END -->
|
|
127
87
|
|
|
128
88
|
## Bundle Analysis
|
|
@@ -140,7 +100,7 @@ The Bundle Analysis Reports provide detailed breakdowns of the bundle's composit
|
|
|
140
100
|
|
|
141
101
|
|Chunk/Module/File|Composition|
|
|
142
102
|
|:------ |:-----------|
|
|
143
|
-
| dpuse-development.es.js | 299.
|
|
103
|
+
| dpuse-development.es.js | 299.3 kB · gz 74.7 kB · br 59.6 kB |
|
|
144
104
|
| acorn → dist/acorn.mjs | `██████████░░░░░░░░░░` 49.4% |
|
|
145
105
|
| acorn-typescript → lib/index.mjs | `███████░░░░░░░░░░░░░` 35.5% |
|
|
146
106
|
| src | `██░░░░░░░░░░░░░░░░░░` 10.7% |
|
|
@@ -155,7 +115,7 @@ The Bundle Analysis Reports provide detailed breakdowns of the bundle's composit
|
|
|
155
115
|
| formatCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
156
116
|
| auditDependencies.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
157
117
|
| lintCode.ts | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
158
|
-
| @dpuse/dpuse-shared | `█░░░░░░░░░░░░░░░░░░░` 4.
|
|
118
|
+
| @dpuse/dpuse-shared | `█░░░░░░░░░░░░░░░░░░░` 4.0% |
|
|
159
119
|
| dist/componentConfig.schema-dBVLwQIt.js | `█░░░░░░░░░░░░░░░░░░░` 3.2% |
|
|
160
120
|
| dist/dpuse-shared-componentModuleConnector.es.js | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
161
121
|
| dist/dpuse-shared-componentModuleContext.es.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% |
|
|
@@ -5873,9 +5873,11 @@ async function Yn() {
|
|
|
5873
5873
|
try {
|
|
5874
5874
|
G("Check configuration files"), q("1️⃣ Check individual files");
|
|
5875
5875
|
let e = Un((await W("config.json")).id), t = n.dirname(o(import.meta.url));
|
|
5876
|
-
await Xn(t, ".editorconfig"), await Xn(t, ".gitattributes"), await Xn(t, ".gitignore", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Xn(t, ".markdownlint.json"), await Xn(t, ".ncurc.json"), await Xn(t, "LICENSE"), await Xn(t, "tsconfig.scripts.json")
|
|
5877
|
-
|
|
5878
|
-
|
|
5876
|
+
await Xn(t, ".editorconfig"), await Xn(t, ".gitattributes"), await Xn(t, ".gitignore", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Xn(t, ".markdownlint.json"), await Xn(t, ".ncurc.json"), await Xn(t, "LICENSE"), await Xn(t, "tsconfig.scripts.json"), ["kb"].includes(e.typeId) ? console.info("ℹ️ File 'vite.config.ts' is NOT required by this project") : [
|
|
5877
|
+
"app",
|
|
5878
|
+
"api",
|
|
5879
|
+
"development"
|
|
5880
|
+
].includes(e.typeId) ? console.info("ℹ️ File 'vite.config.ts' is UNIQUE to this project") : await Xn(t, "vite.config.ts", e.typeId === "tool" ? "vite.config.tool.ts" : "vite.config.default.ts"), await Xn(t, "vitest.config.ts"), K("Configuration files checked");
|
|
5879
5881
|
} catch (e) {
|
|
5880
5882
|
console.error("❌ Error checking configuration files", e), process.exit(1);
|
|
5881
5883
|
}
|
|
@@ -5892,7 +5894,7 @@ async function Xn(e, t, r) {
|
|
|
5892
5894
|
console.info(`ℹ️ File '${t.split("_", 1)[0] ?? t}' is the same`);
|
|
5893
5895
|
return;
|
|
5894
5896
|
}
|
|
5895
|
-
console.info(`⚠️ File '${t.split("_", 1)[0] ?? t}' is NOT the same
|
|
5897
|
+
console.info(`⚠️ File '${t.split("_", 1)[0] ?? t}' is NOT the same`);
|
|
5896
5898
|
}
|
|
5897
5899
|
//#endregion
|
|
5898
5900
|
//#region src/actions/checkDependencies.ts
|
|
@@ -6089,7 +6091,7 @@ async function Dr(e = "MIT") {
|
|
|
6089
6091
|
}
|
|
6090
6092
|
async function Or() {
|
|
6091
6093
|
q("1️⃣ Skip: @dpuse/dpuse-development is a development-only tool and is never part of a production release");
|
|
6092
|
-
let e = "
|
|
6094
|
+
let e = "> [!WARNING]\n> Dependency licenses are not documented here: @dpuse/dpuse-development is a development-only tool and is never part of a production release";
|
|
6093
6095
|
await Hn("README.md", qn(qn(await zn("./README.md"), e, Cr, wr), e, Tr, Er));
|
|
6094
6096
|
}
|
|
6095
6097
|
async function kr(e) {
|