@datapos/datapos-development 0.3.63 → 0.3.64

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
@@ -36,13 +36,12 @@ The `src/index.ts' file exposes the following utilities:
36
36
  | Name | Notes |
37
37
  | ------------------------- | ------------------------------------------------------------------------ |
38
38
  | buildConfig | Build the config.json file for the repository. |
39
- | buildConnectorConfig | |
40
- | buildContextConfig | |
41
- | buildInformerConfig | |
42
- | buildPresenterConfig | |
39
+ | buildConnectorConfig | Build the connector config.json file for the repository. |
40
+ | buildContextConfig | Build the context config.json file for the repository. |
41
+ | buildInformerConfig | Build the informer config.json file for the repository. |
42
+ | buildPresenterConfig | Build the presenter config.json file for the repository. |
43
43
  | buildPublicDirectoryIndex | Build an index for the repositories public directory. |
44
44
  | bumpVersion | Bump the repositories version number. |
45
- | clearDirectory | Clear the specified directory. |
46
45
  | sendDeploymentNotice | Send a deployment notice for the repository. |
47
46
  | syncWithGitHub | Synchronise the local repository with the main GitHub repository. |
48
47
  | uploadDirectoryToR2 | Upload a directory to Cloudflare R2 storage. |
@@ -54,22 +53,21 @@ The `src/index.ts' file exposes the following utilities:
54
53
  The table below lists the repository management commands available in this project.
55
54
  For detailed implementation, see the `scripts` section in the `package.json` file.
56
55
 
57
- | Name | Key Code | Notes |
58
- | -------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
59
- | audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
60
- | build | alt+ctrl+shift+b | Build the package using Vite. |
61
- | build...Config | | Not implemented. |
62
- | bumpVersion | alt+ctrl+shift+v | |
63
- | check | alt+ctrl+shift+c | List outdated dependencies and run retire scanner. |
64
- | document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json). |
65
- | format | alt+ctrl+shift+f | Enforce formatting style rules. |
66
- | lint | alt+ctrl+shift+l | Check the code for errors and enforce coding style rules. |
67
- | publishToNPM | alt+ctrl+shift+p | |
68
- | release | alt+ctrl+shift+r | Bump version, synchronise local repository with the main GitHub repository and publish to npm. |
69
- | sendDeploymentNotice | | Not implemented. |
70
- | syncWithGitHub | alt+ctrl+shift+s | Bump version and synchronise local repository with the main GitHub repository. |
71
- | test | alt+ctrl+shift+t | Not implemented. |
72
- | updateDependencies | alt+ctrl+shift+u | ❌ Not implemented. |
56
+ | Name | Key Code | Notes |
57
+ | ------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------- |
58
+ | audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
59
+ | build | alt+ctrl+shift+b | Build the package using Vite. |
60
+ | bump:version | alt+ctrl+shift+v | Increment patch version number. |
61
+ | check | alt+ctrl+shift+c | List outdated dependencies and run retire scanner. |
62
+ | document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json). |
63
+ | format | alt+ctrl+shift+f | Enforce formatting style rules. |
64
+ | lint | alt+ctrl+shift+l | Check the code for errors and enforce coding style rules. |
65
+ | publish:toNPM | alt+ctrl+shift+p | Publish the package to npm. |
66
+ | release | alt+ctrl+shift+r | Bump version, synchronise local repository with the main GitHub repository and publish to npm. |
67
+ | send:deployNotice | alt+ctrl+shift+n | Not implemented. |
68
+ | sync:withGitHub | alt+ctrl+shift+s | Bump version and synchronise local repository with the main GitHub repository. |
69
+ | test | alt+ctrl+shift+t | Not implemented. |
70
+ | update:dataPosDeps | alt+ctrl+shift+u | Install the latest version of all Data Positioning dependencies. |
73
71
 
74
72
  ## Compliance
75
73
 
@@ -1,14 +1,8 @@
1
1
  import { exec as m } from "child_process";
2
2
  import { promises as n } from "fs";
3
- import { promisify as w } from "util";
4
- const y = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
5
- let b = (o = 21) => {
6
- let e = "", i = crypto.getRandomValues(new Uint8Array(o |= 0));
7
- for (; o--; )
8
- e += y[i[o] & 63];
9
- return e;
10
- };
11
- const h = ["createObject", "dropObject", "removeRecords", "upsertRecords"], v = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], u = w(m);
3
+ import { nanoid as w } from "nanoid";
4
+ import { promisify as y } from "util";
5
+ const b = ["createObject", "dropObject", "removeRecords", "upsertRecords"], v = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], u = y(m);
12
6
  async function $() {
13
7
  try {
14
8
  console.info("🚀 Building configuration...");
@@ -34,7 +28,7 @@ async function J(o) {
34
28
  const p = await n.readdir(c), g = { childCount: p.length, name: `${a}`, typeId: "folder" };
35
29
  f.push(g), await i(c, p);
36
30
  } else {
37
- const p = { id: b(), lastModifiedAt: d.mtimeMs, name: a, size: d.size, typeId: "object" };
31
+ const p = { id: w(), lastModifiedAt: d.mtimeMs, name: a, size: d.size, typeId: "object" };
38
32
  f.push(p);
39
33
  }
40
34
  } catch (d) {
@@ -59,7 +53,7 @@ async function j() {
59
53
  let s = !1, t = !1;
60
54
  const r = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, f = [...i.matchAll(r)].filter((a) => !a[1] && a[2] !== "constructor").map((a) => {
61
55
  const c = a[2];
62
- return s = s || h.includes(c), t = t || v.includes(c), c;
56
+ return s = s || b.includes(c), t = t || v.includes(c), c;
63
57
  });
64
58
  f.length > 0 ? console.info(`ℹ️ Implements ${f.length} operations.`) : console.warn("⚠️ Implements no operations.");
65
59
  const l = t && s ? "bidirectional" : t ? "source" : s ? "destination" : null;
@@ -134,7 +128,7 @@ async function R() {
134
128
  console.error("❌ Error synchronising with GitHub.", o);
135
129
  }
136
130
  }
137
- async function A(o, e) {
131
+ async function P(o, e) {
138
132
  try {
139
133
  console.info("🚀 Uploading directory to R2....");
140
134
  async function i(t, r, f) {
@@ -156,7 +150,7 @@ async function A(o, e) {
156
150
  console.error("❌ Error uploading directory to R2.", i);
157
151
  }
158
152
  }
159
- async function P() {
153
+ async function A() {
160
154
  try {
161
155
  console.info("🚀 Uploading module configuration....");
162
156
  const o = JSON.parse(await n.readFile("config.json", "utf8")), e = o.id, i = {
@@ -170,7 +164,7 @@ async function P() {
170
164
  console.error("❌ Error uploading module configuration.", o);
171
165
  }
172
166
  }
173
- async function U(o, e) {
167
+ async function B(o, e) {
174
168
  try {
175
169
  console.info("🚀 Uploading module to R2....");
176
170
  const i = JSON.parse(await n.readFile("package.json", "utf8")), s = e.replace(/^(.*?\.)/, `$1v${i.version}.`), { stderr: t } = await u(`wrangler r2 object put ${s} --file=dist/${o} --content-type application/javascript --jurisdiction=eu --remote`);
@@ -191,7 +185,7 @@ export {
191
185
  E as echoScriptNotImplemented,
192
186
  I as sendDeploymentNotice,
193
187
  R as syncWithGitHub,
194
- A as uploadDirectoryToR2,
195
- P as uploadModuleConfig,
196
- U as uploadModuleToR2
188
+ P as uploadDirectoryToR2,
189
+ A as uploadModuleConfig,
190
+ B as uploadModuleToR2
197
191
  };
package/package.json CHANGED
@@ -1,20 +1,30 @@
1
1
  {
2
2
  "name": "@datapos/datapos-development",
3
+ "version": "0.3.64",
4
+ "description": "A TypeScript library of utilities for managing the Data Positioning repositories.",
3
5
  "license": "MIT",
6
+ "author": "Jonathan Terrell <terrell.jm@gmail.com>",
4
7
  "private": false,
5
8
  "type": "module",
6
- "version": "0.3.63",
7
- "files": [
8
- "dist"
9
- ],
9
+ "homepage": "https://www.datapos.app",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/data-positioning/datapos-development.git"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/data-positioning/datapos-development/issues"
16
+ },
10
17
  "module": "./dist/datapos-development.es.js",
18
+ "types": "./dist/types/src/index.d.ts",
11
19
  "exports": {
12
20
  ".": {
13
21
  "import": "./dist/datapos-development.es.js",
14
22
  "types": "./dist/types/src/index.d.ts"
15
23
  }
16
24
  },
17
- "types": "./dist/types/src/index.d.ts",
25
+ "files": [
26
+ "dist"
27
+ ],
18
28
  "devDependencies": {
19
29
  "@datapos/datapos-shared": "^0.3.140",
20
30
  "@types/node": "^24.10.0",
@@ -39,7 +49,7 @@
39
49
  "build": "vite build",
40
50
  "bump:version": "node -e \"import('./dist/datapos-development.es.js').then(m => m.bumpVersion())\"",
41
51
  "check": "npm outdated; npm-check-updates -i && retire",
42
- "document": "license-report --only=prod,peer > LICENSES.json && license-report-check --source ./LICENSES.json --allowed 'MIT' --allowed 'n/a' --allowed 'Apache-2.0' --output=table",
52
+ "document": "npm run _document:licenceReport && npm run _document:licenceCheck",
43
53
  "format": "prettier --write src/",
44
54
  "lint": "eslint .",
45
55
  "publish:toNPM": "npm publish --access public",
@@ -47,6 +57,12 @@
47
57
  "sync:withGitHub": "npm run bump:version && node -e \"import('./dist/datapos-development.es.js').then(m => m.syncWithGitHub())\"",
48
58
  "test": "node -e \"import('./dist/datapos-development.es.js').then(m => m.echoScriptNotImplemented('Test'))\"",
49
59
  "update:dataPosDeps": "npm run _update:developDeps",
60
+ "_document:licenceReport": "license-report --only=prod,peer > LICENSES.json",
61
+ "_document:licenceCheck": "license-report-check --source ./LICENSES.json --allowed 'MIT' --allowed 'n/a' --allowed 'Apache-2.0' --output=table",
50
62
  "_update:developDeps": "npm install --save-dev @datapos/datapos-development@latest"
63
+ },
64
+ "engines": {
65
+ "node": ">=22.0.0",
66
+ "npm": ">=11.0.0"
51
67
  }
52
68
  }