@datapos/datapos-development 0.3.129 → 0.3.132

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
@@ -58,7 +58,7 @@ The `src/index.ts' file exposes the following utilities:
58
58
 
59
59
  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`.
60
60
 
61
- [View the OWASP Dependency Check Report](https://data-positioning.github.io/datapos-tool-micromark/dependency-check-reports/dependency-check-report.html)
61
+ [View the OWASP Dependency Check Report](https://data-positioning.github.io/datapos-development/dependency-check-reports/dependency-check-report.html)
62
62
 
63
63
  ### Dependency Licenses
64
64
 
@@ -3,7 +3,7 @@ import { promises as t } from "node:fs";
3
3
  import { nanoid as $ } from "nanoid";
4
4
  import { promisify as O } from "node:util";
5
5
  const S = ["createObject", "dropObject", "removeRecords", "upsertRecords"], v = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], y = O(b);
6
- async function k() {
6
+ async function j() {
7
7
  try {
8
8
  console.info("🚀 Building configuration...");
9
9
  const e = JSON.parse(await t.readFile("package.json", "utf8")), o = JSON.parse(await t.readFile("config.json", "utf8"));
@@ -12,7 +12,7 @@ async function k() {
12
12
  console.error("❌ Error building configuration.", e);
13
13
  }
14
14
  }
15
- async function C(e) {
15
+ async function k(e) {
16
16
  try {
17
17
  console.info(`🚀 Building public directory index for identifier '${e}'...`);
18
18
  const o = {};
@@ -62,7 +62,7 @@ async function J() {
62
62
  console.error("❌ Error building connector configuration.", e);
63
63
  }
64
64
  }
65
- async function A() {
65
+ async function F() {
66
66
  try {
67
67
  console.info("🚀 Building context configuration...");
68
68
  const e = JSON.parse(await t.readFile("package.json", "utf8")), o = JSON.parse(await t.readFile("config.json", "utf8")), i = await t.readFile("src/index.ts", "utf8"), n = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...i.matchAll(n)].filter((r) => r[1] == null && r[2] !== "constructor").map((r) => r[2]);
@@ -71,7 +71,7 @@ async function A() {
71
71
  console.error("❌ Error building context configuration.", e);
72
72
  }
73
73
  }
74
- async function F() {
74
+ async function R() {
75
75
  try {
76
76
  console.info("🚀 Building presenter configuration...");
77
77
  const e = JSON.parse(await t.readFile("package.json", "utf8")), o = JSON.parse(await t.readFile("config.json", "utf8")), i = await t.readFile("src/index.ts", "utf8"), n = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...i.matchAll(n)].filter((r) => !r[1] && r[2] !== "constructor").map((r) => r[2]);
@@ -80,7 +80,7 @@ async function F() {
80
80
  console.error("❌ Error building context configuration.", e);
81
81
  }
82
82
  }
83
- async function R(e = "./") {
83
+ async function A(e = "./") {
84
84
  try {
85
85
  console.info("🚀 Bumping version...");
86
86
  const o = JSON.parse(await t.readFile(`${e}package.json`, "utf8"));
@@ -102,9 +102,7 @@ async function P() {
102
102
  try {
103
103
  const i = (await t.readFile("./licenses.md", "utf8")).trim(), n = await t.readFile("./README.md", "utf8"), s = n.indexOf(e), r = n.indexOf(o);
104
104
  (s === -1 || r === -1) && (console.error("❌ Dependency license markers not found in readme file."), process.exit(1));
105
- const d = n.substring(0, s + e.length) + `
106
- ` + i + `
107
- ` + n.substring(r);
105
+ const d = n.substring(0, s + e.length) + i + n.substring(r);
108
106
  await t.writeFile("README.md", d, "utf8"), console.log("✅ Readme file updated with license information");
109
107
  } catch (i) {
110
108
  console.error("❌ Error updating readme file.", i), process.exit(1);
@@ -123,9 +121,9 @@ async function I() {
123
121
  const s = {
124
122
  critical: { color: "D32F2F", label: "critical" },
125
123
  high: { color: "EF6C00", label: "high" },
126
- moderate: { color: "F9A825", label: "moderate" },
127
- low: { color: "AFB42B", label: "low" },
128
- unknown: { color: "757575", label: "unknown" }
124
+ moderate: { color: "FBC02D", label: "moderate" },
125
+ low: { color: "6D8C31", label: "low" },
126
+ unknown: { color: "616161", label: "unknown" }
129
127
  }, r = Object.values(n).reduce((g, m) => g + m, 0);
130
128
  console.info(`✅ Total vulnerabilities found: ${r}`), console.info(
131
129
  ` Critical: ${n.critical}, High: ${n.high}, Moderate: ${n.moderate}, Low: ${n.low}, Unknown: ${n.unknown}`
@@ -206,7 +204,7 @@ async function W() {
206
204
  console.error("❌ Error uploading module configuration.", e);
207
205
  }
208
206
  }
209
- async function B(e) {
207
+ async function U(e) {
210
208
  try {
211
209
  console.info("🚀 Uploading module to R2...");
212
210
  const i = `v${JSON.parse(await t.readFile("package.json", "utf8")).version}`;
@@ -228,12 +226,12 @@ async function B(e) {
228
226
  }
229
227
  }
230
228
  export {
231
- k as buildConfig,
229
+ j as buildConfig,
232
230
  J as buildConnectorConfig,
233
- A as buildContextConfig,
234
- F as buildPresenterConfig,
235
- C as buildPublicDirectoryIndex,
236
- R as bumpVersion,
231
+ F as buildContextConfig,
232
+ R as buildPresenterConfig,
233
+ k as buildPublicDirectoryIndex,
234
+ A as bumpVersion,
237
235
  D as echoScriptNotImplemented,
238
236
  P as insertLicensesIntoReadme,
239
237
  I as insertOWASPDependencyCheckBadgeIntoReadme,
@@ -241,5 +239,5 @@ export {
241
239
  T as syncWithGitHub,
242
240
  _ as uploadDirectoryToR2,
243
241
  W as uploadModuleConfigToDO,
244
- B as uploadModuleToR2
242
+ U as uploadModuleToR2
245
243
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-development",
3
- "version": "0.3.129",
3
+ "version": "0.3.132",
4
4
  "description": "A library of utilities for managing the Data Positioning repositories.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",
@@ -65,8 +65,8 @@
65
65
  "test": "vitest",
66
66
  "update:dataPosDeps": "npm run _update:sharedDep",
67
67
  "_bump:version": "node -e \"import('./dist/datapos-development.es.js').then(m => m.bumpVersion())\"",
68
- "_check:insertOWASPBadge": "node -e \"import('./dist/datapos-development.es.js').then(m => m.insertOWASPDependencyCheckBadgeIntoReadme())\"",
69
- "_check:owasp": "set -a && source .env && set +a && owasp-dependency-check --project \"@datapos/datapos-tool-micromark\" --enableRetired --nvdApiKey \"$NVD_API_KEY\"",
68
+ "_check:owaspDependencyCheck": "set -a && source .env && set +a && owasp-dependency-check --project \"@datapos/datapos-development\" --enableRetired --nvdApiKey \"$NVD_API_KEY\" --nodePackageSkipDevDependencies",
69
+ "_check:owaspBageInsertiions": "node -e \"import('./dist/datapos-development.es.js').then(m => m.insertOWASPDependencyCheckBadgeIntoReadme())\"",
70
70
  "_document:licenceReportJSON": "license-report --only=prod,peer --department.value=n/a --licensePeriod=n/a --material=n/a --relatedTo.value=n/a > licenses.json",
71
71
  "_document:licenceReportMarkdown": "license-report --config license-report-config.json --only=prod,peer --output=markdown > licenses.md",
72
72
  "_document:licenceReportCheck": "license-report-check --source ./licenses.json --allowed 'MIT' --allowed 'n/a' --allowed 'Apache-2.0' --allowed 'CC0-1.0' --output=table",