@datapos/datapos-development 0.3.306 → 0.3.309

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
@@ -37,22 +37,19 @@ Designed to be run from `package.json` scripts.
37
37
 
38
38
  The `src/index.ts' file exposes the following utilities:
39
39
 
40
- | Name | Notes |
41
- | ----------------------------------------- | ---------------------------------------------------------------------------- |
42
- | buildConfig | Build the config.json file for the repository. |
43
- | buildConnectorConfig | Build the connector config.json file for the repository. |
44
- | buildContextConfig | Build the context config.json file for the repository. |
45
- | buildPresenterConfig | Build the presenter config.json file for the repository. |
46
- | buildPublicDirectoryIndex | Build an index for the repositories public directory. |
47
- | bumpVersion | Bump the repositories version number. |
48
- | echoScriptNotImplemented | Echo script not implemented message to console.. |
49
- | insertLicensesIntoReadme | Insert the licenses for all production dependencies into the README.md file. |
50
- | insertOWASPDependencyCheckBadgeIntoReadme | |
51
- | sendDeploymentNotice | Send a deployment notice for the repository. |
52
- | syncWithGitHub | Synchronise the local repository with the main GitHub repository. |
53
- | uploadDirectoryToR2 | Upload a directory to Cloudflare R2 storage. |
54
- | uploadModuleConfigToDO | Upload a modules configuration to the Cloudflare `state` durable object. |
55
- | uploadModuleToR2 | Upload a module to Cloudflare R2 storage. |
40
+ | Name | Notes |
41
+ | ------------------------- | ----------------------------------------------------------------- |
42
+ | auditDependencies | |
43
+ | buildDirectoryIndex | Build an index for a given directory. |
44
+ | buildProject | |
45
+ | checkDependencies | |
46
+ | documentDependencies | |
47
+ | formatCode | |
48
+ | lintCode | |
49
+ | releaseProject | |
50
+ | syncProjectWithGitHub | Synchronise the local repository with the main GitHub repository. |
51
+ | testProject | |
52
+ | updateDataPosDependencies | |
56
53
 
57
54
  ## Reports & Compliance
58
55
 
@@ -67,14 +64,14 @@ The OWASP Dependency Check Report identifies known vulnerabilities in project de
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
65
 
69
66
  <!-- DEPENDENCY_LICENSES_START -->
70
- |Name|Type|Installed|Latest|Latest Age|Deps|Document|
67
+ |Name|Type|Installed|Latest|Latest Updated|Deps|Document|
71
68
  |:-|:-|:-:|:-:|:-|-:|:-|
72
- |@datapos/datapos-shared|MIT|0.3.296 ⚠️|0.3.298|current month - 2025-12-09|3|[LICENSE](https://raw.githubusercontent.com/data-positioning/datapos-shared/main/LICENSE)|
73
- |acorn|MIT|8.15.0|8.15.0|6 months ago - 2025-06-09 ⚠️|0|No license file ⚠️|
74
- |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)|
75
- |acorn-walk|MIT|8.3.4|8.3.4|15 months ago - 2024-09-09 ❗|1|No license file ⚠️|
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)|
70
+ |acorn|MIT|8.15.0|8.15.0|6 months ago - 2025-06-09|0|⚠️ No license file|
71
+ |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
+ |acorn-walk|MIT|8.3.4|8.3.4|15 months ago - 2024-09-09❗|1|⚠️ No license file|
76
73
  |dotenv|BSD-2-Clause|17.2.3|17.2.3|2 months ago - 2025-09-29|0|[LICENSE](https://raw.githubusercontent.com/motdotla/dotenv/master/LICENSE)|
77
- |zod|MIT|4.1.13|4.1.13|current month - 2025-12-07|0|[LICENSE](https://raw.githubusercontent.com/colinhacks/zod/main/LICENSE)|
74
+ |zod|MIT|4.1.13|4.1.13|this month - 2025-12-07|0|[LICENSE](https://raw.githubusercontent.com/colinhacks/zod/main/LICENSE)|
78
75
 
79
76
  <!-- DEPENDENCY_LICENSES_END -->
80
77
 
@@ -7897,7 +7897,7 @@ async function ml() {
7897
7897
  const e = await ce("package.json");
7898
7898
  await Ie("1️⃣", "owasp-dependency-check", [
7899
7899
  "--out",
7900
- ".",
7900
+ "dependency-check-reports",
7901
7901
  "--project",
7902
7902
  e.name ?? "unknown",
7903
7903
  "--enableRetired",
@@ -7911,7 +7911,7 @@ async function ml() {
7911
7911
  }
7912
7912
  async function Qh(e) {
7913
7913
  re(`${e} Insert OWASP Badge(s) into 'README.md'`);
7914
- const t = await ce("./dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
7914
+ const t = await ce("dependency-check-reports/dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
7915
7915
  for (const o of t.dependencies)
7916
7916
  if (o.vulnerabilities != null)
7917
7917
  for (const S of o.vulnerabilities) {
@@ -7959,13 +7959,13 @@ async function vl(e = [], t = !0) {
7959
7959
  "1️⃣ Generate 'licenses.json' file",
7960
7960
  "license-report",
7961
7961
  ["--config", `'${r}'`, "--only=prod,peer", "--output=json"],
7962
- "licenses.json"
7963
- ), await we("2️⃣ Check 'licenses.json' file", "license-report-check", ["--source", "./licenses.json", "--output=table", ...i]), t ? (await we(
7962
+ "licenses/licenses.json"
7963
+ ), await we("2️⃣ Check 'licenses.json' file", "license-report-check", ["--source", "licenses/licenses.json", "--output=table", ...i]), t ? (await we(
7964
7964
  "3️⃣ Generate 'licenseTree.json' file",
7965
7965
  "license-report-recursive",
7966
7966
  ["--only=prod,peer", "--output=tree", "--recurse", "--department.value=n/a", "--licensePeriod.value=n/a", "--material.value=n/a", "--relatedTo.value=n/a"],
7967
- "licenseTree.json"
7968
- ), await we("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "./licenseTree.json", "--output=table", ...i])) : (re("3️⃣ Skip 'licenseTree.json' file generate"), re("4️⃣ Skip 'licenseTree.json' file check")), await we("5️⃣ Download license files", "license-downloader", ["--source", "./licenses.json", "--licDir", "./licenses", "--download"]), await il("6️⃣", t), $e("Dependencies documented.");
7967
+ "licenses/licenseTree.json"
7968
+ ), await we("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...i])) : (re("3️⃣ Skip 'licenses/licenseTree.json' file generate"), re("4️⃣ Skip 'licenses/licenseTree.json' file check")), await we("5️⃣ Download license files", "license-downloader", ["--source", "licenses/licenses.json", "--licDir", "licenses/downloads", "--download"]), await il("6️⃣", t), $e("Dependencies documented.");
7969
7969
  } catch (i) {
7970
7970
  console.error("❌ Error documenting dependencies.", i), process.exit(1);
7971
7971
  }
@@ -7977,9 +7977,9 @@ async function il(e, t) {
7977
7977
  console.error("❌ No dependency license markers found in 'README.md'.");
7978
7978
  return;
7979
7979
  }
7980
- const u = await ce("licenses.json"), h = await ce("licenses/licenses.ext.json");
7980
+ const u = await ce("licenses/licenses.json"), h = await ce("licenses/downloads/licenses.ext.json");
7981
7981
  let d = [];
7982
- t && (d = await ce("licenseTree.json"));
7982
+ t && (d = await ce("licenses/licenseTree.json"));
7983
7983
  const y = [
7984
7984
  ...(() => {
7985
7985
  const w = /* @__PURE__ */ new Map();
@@ -7996,13 +7996,13 @@ async function il(e, t) {
7996
7996
  return w.values();
7997
7997
  })()
7998
7998
  ];
7999
- let o = `|Name|Type|Installed|Latest|Latest Age|Deps|Document|
7999
+ let o = `|Name|Type|Installed|Latest|Latest Updated|Deps|Document|
8000
8000
  |:-|:-|:-:|:-:|:-|-:|:-|
8001
8001
  `;
8002
8002
  for (const w of y) {
8003
8003
  const C = w.installedVersion === w.remoteVersion ? w.installedVersion : `${w.installedVersion} ⚠️`, j = w.latestRemoteModified ? rl(w.latestRemoteModified.split("T")[0]) : "n/a", Z = w.dependencyCount != null && w.dependencyCount >= 0 ? w.dependencyCount : "n/a";
8004
8004
  let pe;
8005
- w.licenseFileLink == null || w.licenseFileLink == "" ? pe = "No license file ⚠️" : pe = `[${w.licenseFileLink.slice(Math.max(0, w.licenseFileLink.lastIndexOf("/") + 1))}](${w.licenseFileLink})`, o += `|${w.name}|${w.licenseType}|${C}|${w.remoteVersion}|${j}|${Z}|${pe}|
8005
+ w.licenseFileLink == null || w.licenseFileLink == "" ? pe = "⚠️ No license file" : pe = `[${w.licenseFileLink.slice(Math.max(0, w.licenseFileLink.lastIndexOf("/") + 1))}](${w.licenseFileLink})`, o += `|${w.name}|${w.licenseType}|${C}|${w.remoteVersion}|${j}|${Z}|${pe}|
8006
8006
  `;
8007
8007
  }
8008
8008
  const S = `${i.slice(0, Math.max(0, r + kr.length))}
@@ -8016,7 +8016,7 @@ function rl(e) {
8016
8016
  if (t == null || t === "") return "n/a";
8017
8017
  const i = new Date(t), r = /* @__PURE__ */ new Date();
8018
8018
  let n = (r.getFullYear() - i.getFullYear()) * 12 + (r.getMonth() - i.getMonth());
8019
- return r.getDate() < i.getDate() && (n -= 1), n === 0 ? `current month - ${t}` : n === 1 ? `1 month ago - ${t}` : n <= 3 ? `${n} months ago - ${t}` : n <= 6 ? `${n} months ago - ${t} ⚠️` : `${n} months ago - ${t} ❗`;
8019
+ return r.getDate() < i.getDate() && (n -= 1), n === 0 ? `this month - ${t}` : n === 1 ? `1 month ago - ${t}` : n <= 6 ? `${n} months ago - ${t}` : n <= 12 ? `${n} months ago - ${t} ⚠️` : `${n} months ago - ${t}❗`;
8020
8020
  }
8021
8021
  async function xl() {
8022
8022
  try {
@@ -8081,8 +8081,8 @@ async function _l(e) {
8081
8081
  }
8082
8082
  export {
8083
8083
  ml as auditDependencies,
8084
+ _l as buildDirectoryIndex,
8084
8085
  ll as buildProject,
8085
- _l as buildPublicDirectoryIndex,
8086
8086
  yl as checkDependencies,
8087
8087
  vl as documentDependencies,
8088
8088
  xl as formatCode,