@dpuse/dpuse-development 0.3.450
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/.editorconfig +13 -0
- package/.gitattributes +3 -0
- package/.gitignore_published +10 -0
- package/.gitignore_unpublished +11 -0
- package/.markdownlint.json +5 -0
- package/.prettierrc.json +23 -0
- package/LICENSE +21 -0
- package/README.md +139 -0
- package/dist/@dpuse/dpuse-development.es.js +6809 -0
- package/dist/@dpuse/dpuse-development.es.js.map +1 -0
- package/dist/types/src/index.d.ts +12 -0
- package/dist/types/src/operations/auditDependencies.d.ts +5 -0
- package/dist/types/src/operations/checkDependencies.d.ts +7 -0
- package/dist/types/src/operations/documentDependencies.d.ts +7 -0
- package/dist/types/src/operations/formatCode.d.ts +5 -0
- package/dist/types/src/operations/lintCode.d.ts +5 -0
- package/dist/types/src/operations/manageProject.d.ts +8 -0
- package/dist/types/src/operations/test.d.ts +5 -0
- package/dist/types/src/operations/updateDPUseDependencies.d.ts +5 -0
- package/dist/types/src/utilities/cloudflare.d.ts +7 -0
- package/dist/types/src/utilities/index.d.ts +42 -0
- package/dist/types/vite.config.d.ts +5 -0
- package/dist/types/vitest.config.d.ts +5 -0
- package/eslint.config.ts +9 -0
- package/licenses/license-report-config.json +16 -0
- package/package.json +95 -0
- package/tsconfig.json +35 -0
- package/vite.config.ts +52 -0
- package/vitest.config.ts +21 -0
package/.editorconfig
ADDED
package/.gitattributes
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Common git ignore configuration for UNPUBLISHED Data Positioning projects.
|
|
2
|
+
dependency-check-bin
|
|
3
|
+
dist
|
|
4
|
+
dist-scripts
|
|
5
|
+
node_modules
|
|
6
|
+
rust/*/pkg
|
|
7
|
+
rust/*/target
|
|
8
|
+
rust/target
|
|
9
|
+
.env
|
|
10
|
+
.npmrc # In case this project is published in the future.
|
|
11
|
+
**/.DS_Store
|
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/prettierrc",
|
|
3
|
+
"arrowParens": "always",
|
|
4
|
+
"bracketSameLine": false,
|
|
5
|
+
"bracketSpacing": true,
|
|
6
|
+
"cursorOffset": -1,
|
|
7
|
+
"embeddedLanguageFormatting": "auto",
|
|
8
|
+
"endOfLine": "lf",
|
|
9
|
+
"htmlWhitespaceSensitivity": "css",
|
|
10
|
+
"insertPragma": false,
|
|
11
|
+
"jsxSingleQuote": false,
|
|
12
|
+
"plugins": [],
|
|
13
|
+
"printWidth": 180,
|
|
14
|
+
"proseWrap": "preserve",
|
|
15
|
+
"quoteProps": "as-needed",
|
|
16
|
+
"semi": true,
|
|
17
|
+
"singleAttributePerLine": false,
|
|
18
|
+
"singleQuote": true,
|
|
19
|
+
"tabWidth": 4,
|
|
20
|
+
"trailingComma": "none",
|
|
21
|
+
"useTabs": false,
|
|
22
|
+
"vueIndentScriptAndStyle": false
|
|
23
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DPUse Pty Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Data Positioning Development Library
|
|
2
|
+
|
|
3
|
+
[](https://sonarcloud.io/summary/new_code?id=data-positioning_dpuse-development)
|
|
4
|
+
<span><!-- OWASP_BADGES_START -->
|
|
5
|
+
[](https://data-positioning.github.io/dpuse-development/dependency-check-reports/dependency-check-report.html)
|
|
6
|
+
|
|
7
|
+
<!-- OWASP_BADGES_END --></span>
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@dpuse/dpuse-development)
|
|
10
|
+
[](./LICENSE)
|
|
11
|
+
|
|
12
|
+
<!-- SUMMARY_START -->
|
|
13
|
+
|
|
14
|
+
A collection of utilities for managing Data Positioning projects.
|
|
15
|
+
|
|
16
|
+
<!-- SUMMARY_END -->
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
Install as a development dependency:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cd dpuse-development
|
|
24
|
+
npm install --save-dev @dpuse/dpuse-development
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
> See the Data Positioning security documentation for additional initialization requirements.
|
|
28
|
+
|
|
29
|
+
## Utilities
|
|
30
|
+
|
|
31
|
+
The library implements the following utilities:
|
|
32
|
+
|
|
33
|
+
| Name | Notes |
|
|
34
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
35
|
+
| 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. |
|
|
36
|
+
| buildDirectoryIndex | Build an index for the specified directory path. |
|
|
37
|
+
| buildProject | Builds the package using Vite. Output to '/dist' directory. Wrangler for api. Nuxt for app-nuxt. Builds bundle analysis reports. |
|
|
38
|
+
| checkDependencies | Identifies outdated dependencies using npm `outdated` and `npm-check-updates` with option to automatically install latest versions. |
|
|
39
|
+
| 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'.. |
|
|
40
|
+
| formatCode | Uses `prettier` to enforce formatting style rules. |
|
|
41
|
+
| lintCode | Uses `eslint` to check the code for potential errors and enforces coding style rules. |
|
|
42
|
+
| releaseProject | Bump version, builds config, builds project, synchronise with `GitHub` and publish to `npm` or Cloudflare. |
|
|
43
|
+
| syncProjectWithGitHub | Synchronise the local repository with the main GitHub repository. |
|
|
44
|
+
| testProject | ❌ Not implemented. |
|
|
45
|
+
| updateDPUseDependencies | Install the latest version of the specified Data Positioning dependencies. |
|
|
46
|
+
|
|
47
|
+
### Usage
|
|
48
|
+
|
|
49
|
+
All utilities are designed to be run from `package.json` scripts and assume that the project follows the standard Data Positioning directory structure and that it includes a `config.json` file in the root directory.
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
...
|
|
54
|
+
"scripts": {
|
|
55
|
+
"audit": "node -e \"import('@dpuse/dpuse-development').then(m => m.auditDependencies())\"",
|
|
56
|
+
"build": "node -e \"import('@dpuse/dpuse-development').then(m => m.buildProject())\"",
|
|
57
|
+
"check": "node -e \"import('@dpuse/dpuse-development').then(m => m.checkDependencies())\"",
|
|
58
|
+
"document": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentDependencies(['MIT']))\"",
|
|
59
|
+
"format": "node -e \"import('@dpuse/dpuse-development').then(m => m.formatCode())\"",
|
|
60
|
+
"lint": "node -e \"import('@dpuse/dpuse-development').then(m => m.lintCode())\"",
|
|
61
|
+
"release": "node -e \"import('@dpuse/dpuse-development').then(m => m.releaseProject())\"",
|
|
62
|
+
"sync": "node -e \"import('@dpuse/dpuse-development').then(m => m.syncProjectWithGitHub())\"",
|
|
63
|
+
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\"",
|
|
64
|
+
"update": "node -e \"import('@dpuse/dpuse-development').then(m => m.updateDPUseDependencies(['development']))\""
|
|
65
|
+
}
|
|
66
|
+
...
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Resources
|
|
71
|
+
|
|
72
|
+
Common resources (files) used across Data Positioning projects.
|
|
73
|
+
|
|
74
|
+
| Name | File |
|
|
75
|
+
| --------------------------------------------- | -------------------------------------------------------------------- |
|
|
76
|
+
| ESLint rules \* | [eslint.config.ts](eslint.config.ts) |
|
|
77
|
+
| Git path attributes | [.gitattributes](.gitattributes) |
|
|
78
|
+
| Git ignore rules for published repositories | [resources/.gitignore_PUBLISHED](resources/.gitignore_PUBLISHED) |
|
|
79
|
+
| Git ignore rules for unpublished repositories | [resources/.gitignore_UNPUBLISHED](resources/.gitignore_UNPUBLISHED) |
|
|
80
|
+
| LICENSE | [LICENSE](LICENSE) |
|
|
81
|
+
| Markdown lint rules | [.markdownlint.json](.markdownlint.json) |
|
|
82
|
+
| VS Code key bindings | [resources/vsCodeKeyBindings.json](resources/vsCodeKeyBindings.json) |
|
|
83
|
+
|
|
84
|
+
## Bundle Analysis Reports
|
|
85
|
+
|
|
86
|
+
The Bundle Analysis Report provides a detailed breakdown of the bundle’s composition and module sizes, helping identify which modules contribute most to the final build. It is generated automatically on each release using the `npm` package [rollup-plugin-visualizer](https://www.npmjs.com/package/rollup-plugin-visualizer).
|
|
87
|
+
|
|
88
|
+
[View the Bundle Analysis Report](https://data-positioning.github.io/dpuse-development/bundle-analysis-reports/rollup-visualiser/index.html) created by the **rollup visualiser** plugin.
|
|
89
|
+
|
|
90
|
+
[View the Bundle Analysis Report](https://data-positioning.github.io/dpuse-development/bundle-analysis-reports/sonda/index.html) created by the **sonda** plugin.
|
|
91
|
+
|
|
92
|
+
## Dependency Check Report
|
|
93
|
+
|
|
94
|
+
The OWASP Dependency Check Report identifies known vulnerabilities in project dependencies. It is generated automatically on each release using the `npm` package [owasp-dependency-check](https://dependency-check.github.io/DependencyCheck/index.html).
|
|
95
|
+
|
|
96
|
+
[View the OWASP Dependency Check Report](https://data-positioning.github.io/dpuse-development/dependency-check-report.html)
|
|
97
|
+
|
|
98
|
+
## Dependency Licenses
|
|
99
|
+
|
|
100
|
+
The following table lists the top-level production and peer dependencies. All of these dependencies—along with their transitive dependencies—have been recursively verified to use one of the following commercially friendly licenses: **BSD-2-Clause**, **CC0-1.0**, or **MIT**. Developers cloning this repository should independently verify all **development** and **optional** dependencies. This project supports development activities only. It is not used in production or distributed in any other form.
|
|
101
|
+
|
|
102
|
+
We use the `npm` packages [license-report](https://www.npmjs.com/package/license-report), [license-report-check](https://www.npmjs.com/package/license-report-check), [license-report-recursive](https://www.npmjs.com/package/license-report-recursive) and [license-downloader](https://www.npmjs.com/package/license-downloader) to identify all dependency licenses and include copies of them. We do not use any unlicensed dependencies in either production or development.
|
|
103
|
+
|
|
104
|
+
<!-- DEPENDENCY_LICENSES_START -->
|
|
105
|
+
|
|
106
|
+
| Name | Type | Installed | Latest | Latest Released | Deps | Document |
|
|
107
|
+
| :---------------------- | :--- | :-------: | :-----: | :-------------------------- | ---: | :---------------------------------------------------------------------------------------- |
|
|
108
|
+
| @datapos/datapos-shared | MIT | 0.3.343 | 0.3.343 | this month: 2025-12-21 | 3 | [LICENSE](https://raw.githubusercontent.com/data-positioning/datapos-shared/main/LICENSE) |
|
|
109
|
+
| acorn | MIT | 8.15.0 | 8.15.0 | 6 months ago: 2025-06-09 | 0 | ⚠️ No license file |
|
|
110
|
+
| acorn-typescript | MIT | 1.4.13 | 1.4.13 | 23 months ago: 2024-01-03❗ | 1 | [LICENSE](https://raw.githubusercontent.com/TyrealHu/acorn-typescript/master/LICENSE) |
|
|
111
|
+
| acorn-walk | MIT | 8.3.4 | 8.3.4 | 15 months ago: 2024-09-09❗ | 1 | ⚠️ No license file |
|
|
112
|
+
| nanoid | MIT | 5.1.6 | 5.1.6 | 3 months ago: 2025-09-22 | 0 | [LICENSE](https://raw.githubusercontent.com/ai/nanoid/main/LICENSE) |
|
|
113
|
+
| valibot | MIT | 1.2.0 | 1.2.0 | this month: 2025-11-24 | 1 | [LICENSE.md](https://raw.githubusercontent.com/open-circle/valibot/main/LICENSE.md) |
|
|
114
|
+
|
|
115
|
+
<!-- DEPENDENCY_LICENSES_END -->
|
|
116
|
+
|
|
117
|
+
Insert link to other document for detailed explanation. Only show messages if issues arise.
|
|
118
|
+
|
|
119
|
+
1. **Installed** column:
|
|
120
|
+
|
|
121
|
+
The ⚠️ symbol indicates that the installed version does not match the latest available version.”.
|
|
122
|
+
|
|
123
|
+
1. **Latest Release** column:
|
|
124
|
+
|
|
125
|
+
The ⚠️ symbol indicates that the dependency has gone **more than 6 months** without an update but **no more than 12 months**.
|
|
126
|
+
|
|
127
|
+
The ❗ symbol indicates a dependency that has gone **more than 12 months** without an update.
|
|
128
|
+
|
|
129
|
+
If a dependency has no, or only a small number of, transitive dependencies, then it may not require frequent updates. The **Deps** column shows the number of transitive dependencies. Full details for these dependencies can be found in [licenses/licenseTree.json](licenses/licenseTree.json).
|
|
130
|
+
|
|
131
|
+
1. **Document** column:
|
|
132
|
+
|
|
133
|
+
The “⚠️ No license file” message indicates a dependency that does not include a license file.
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
This project is licensed under the MIT License, permitting free use, modification, and distribution.
|
|
138
|
+
|
|
139
|
+
[MIT](./LICENSE) © 2026 Data Positioning Pty Ltd
|