@datapos/datapos-development 0.3.323 → 0.3.327

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 CHANGED
@@ -5,16 +5,7 @@
5
5
  [![npm version](https://img.shields.io/npm/v/@datapos/datapos-development.svg)](https://www.npmjs.com/package/@datapos/datapos-development)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
7
7
 
8
- A library of utilities for managing the Data Positioning repositories.
9
-
10
- ## Requirements
11
-
12
- Ensure your environment meets the following prerequisites before using this library:
13
-
14
- - **Node.js** version `>=22.0.0`,
15
- - **npm** version `>=11.0.0`,
16
- - A Unix-like shell (for command shortcuts, e.g., `bash`, `zsh`, or Git Bash on Windows),
17
- - Access to the [npm registry](https://www.npmjs.com/) and [GitHub](https://github.com/) for publishing and syncing.
8
+ A library of utilities used to manage Data Positioning repositories.
18
9
 
19
10
  ## Installation
20
11
 
@@ -24,17 +15,16 @@ Install as a development (dev) dependency:
24
15
  npm install --save-dev @datapos/datapos-development
25
16
  ```
26
17
 
27
- Create `.npmrc` with access token. Access token needs to disable 2FA and allow all access.
18
+ Ensure your local `.env` file contains the following variables:
28
19
 
29
- ```ini
30
- registry=https://registry.npmjs.org/
31
- //registry.npmjs.org/:_authToken=<ACCESS TOKEN>
20
+ ```bash
21
+ GITHUB_DOWNLOAD_LICENSE_API_TOKEN="<GITHUB_API_TOKEN>"
22
+ NPM_TOKEN="<NPM_TOKEN>"
23
+ OWASP_NVD_API_KEY="<NVD_API_KEY>"
32
24
  ```
33
25
 
34
26
  ## Utilities
35
27
 
36
- Designed to be run from `package.json` scripts.
37
-
38
28
  The `src/index.ts' file exposes the following utilities:
39
29
 
40
30
  | Name | Notes |
@@ -51,6 +41,20 @@ The `src/index.ts' file exposes the following utilities:
51
41
  | testProject | |
52
42
  | updateDataPosDependencies | |
53
43
 
44
+ All of the above utilities are designed to be run from `package.json` scripts and assume that the repository follows the standard Data Positioning directory structure and includes a `config.json` file in the root directory.
45
+
46
+ ```json
47
+ {
48
+ ...
49
+ "scripts": {
50
+ ...
51
+ "build": "node -e \"import('@datapos/datapos-development').then(m => m.buildProject())\""
52
+ ...
53
+ }
54
+ ...
55
+ }
56
+ ```
57
+
54
58
  ## Reports & Compliance
55
59
 
56
60
  ### Dependency Check Report
@@ -61,12 +65,14 @@ The OWASP Dependency Check Report identifies known vulnerabilities in project de
61
65
 
62
66
  ### Dependency Licenses
63
67
 
64
- The following table lists top-level production and peer dependencies. All these dependencies (including transitive ones) have been recursively verified to use Apache-2.0, BSD-2-Clause, CC0-1.0, or MIT—commercially friendly licenses with minimal restrictions. Developers cloning this repository should independently verify dev and optional dependencies; users of the published library are covered by these checks. We do not include unlicensed dependencies. Used to support development activity and not released as part of the production release. Check if you clone. 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) and [license-report-recursive](https://www.npmjs.com/package/license-report-recursive) to identify dependency licenses.
68
+ 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: **Apache-2.0**, **BSD-2-Clause**, **CC0-1.0**, or **MIT**. Developers cloning this repository should independently verify all **development** and **optional** dependencies. This project is used solely to support development activities and is not used in production or distributed in any other form.
69
+
70
+ 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.
65
71
 
66
72
  <!-- DEPENDENCY_LICENSES_START -->
67
73
  |Name|Type|Installed|Latest|Latest Release|Deps|Document|
68
74
  |:-|:-|:-:|:-:|:-|-:|:-|
69
- |@datapos/datapos-shared|MIT|0.3.298|0.3.298|this month: 2025-12-09|3|[LICENSE](https://raw.githubusercontent.com/data-positioning/datapos-shared/main/LICENSE)|
75
+ |@datapos/datapos-shared|MIT|0.3.298 ⚠️|0.3.300|this month: 2025-12-10|3|[LICENSE](https://raw.githubusercontent.com/data-positioning/datapos-shared/main/LICENSE)|
70
76
  |acorn|MIT|8.15.0|8.15.0|6 months ago: 2025-06-09|0|⚠️ No license file|
71
77
  |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)|
72
78
  |acorn-walk|MIT|8.3.4|8.3.4|15 months ago: 2024-09-09❗|1|⚠️ No license file|
@@ -75,14 +81,31 @@ The following table lists top-level production and peer dependencies. All these
75
81
 
76
82
  <!-- DEPENDENCY_LICENSES_END -->
77
83
 
84
+ 1. **Installed** column:
85
+
86
+ A ⚠️ symbol is used to highlight any installed version that does not match the latest available version.
87
+
88
+ 1. **Latest Release** column:
89
+
90
+ A ⚠️ symbol is used to highlight any dependency that has gone **more than 6 months** without an update but **no more than 12 months**.
91
+
92
+ A **❗** symbol indicates a dependency that has gone **more than 12 months** without an update.
93
+
94
+ 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).
95
+
96
+ 1. **Document** column:
97
+
98
+ The message “⚠️ No license file” is used to highlight any dependency that does not include a license file.
99
+
78
100
  ### Bundle Analysis Report
79
101
 
80
102
  The Bundle Analysis Report provides a detailed breakdown of the bundle's composition and module sizes, helping to 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).
81
103
 
82
104
  [View the Bundle Analysis Report](https://data-positioning.github.io/datapos-development/stats.html)
83
105
 
84
- ## Repository Common Management Commands
106
+ ## Repository Management Commands
85
107
 
108
+ Implements the common Data Positioning repository management command detailed in
86
109
  The table below lists the repository management commands available in this project.
87
110
  For detailed implementation, see the `scripts` section in the `package.json` file.
88
111
 
@@ -102,6 +125,7 @@ For detailed implementation, see the `scripts` section in the `package.json` fil
102
125
  ## TODO
103
126
 
104
127
  1. Enhance `uploadDirectoryToR2`to batch upload files so more efficient and performant.
128
+ 2. Review if it is better to replace all `execCommand`calls with `spawnCommand` calls?
105
129
 
106
130
  ## License
107
131