@datapos/datapos-development 0.3.26 → 0.3.30

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.
Files changed (3) hide show
  1. package/README.md +1 -2
  2. package/index.js +21 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@datapos/datapos-development.svg)](https://www.npmjs.com/package/@datapos/datapos-development)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
5
- [![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)](#)
6
5
 
7
6
  A library of JavaScript operations for managing the Data Positioning repositories.
8
7
 
@@ -48,7 +47,7 @@ For detailed implementation, see the `scripts` section in the `package.json` fil
48
47
  | ------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------- |
49
48
  | audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
50
49
  | build | alt+ctrl+shift+b | NOT implemented. |
51
- | check | alt+ctrl+shift+c | List outdated dependencies. |
50
+ | check | alt+ctrl+shift+c | List outdated dependencies and run retire scanner. |
52
51
  | document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json). |
53
52
  | format | alt+ctrl+shift+f | Enforce formatting style rules. |
54
53
  | lint | alt+ctrl+shift+l | Check the code for errors and enforce coding style rules. |
package/index.js CHANGED
@@ -13,6 +13,15 @@ async function buildConfig(directoryPath) {
13
13
  await fs.writeFile(`${directoryPath || ''}config.json`, JSON.stringify({ ...configJSON, id: packageJSON.name, version: packageJSON.version }, undefined, 4));
14
14
  }
15
15
 
16
+ // Operations - Document interface.
17
+ async function documentInterface(directoryPath) {
18
+ const configJSON = await readJSONFile(`${directoryPath || ''}config.json`);
19
+ const indexCode = await fs.readFile(`${directoryPath || ''}src/index.ts`, 'utf8');
20
+ const regex = /(?:async\s+)?(?:private\s+)?([A-Za-z_]\w*)\s*\([^)]*\)\s*[:{]/g;
21
+ const matches = [...indexCode.matchAll(regex)].map((m) => m[1]);
22
+ console.log(matches);
23
+ }
24
+
16
25
  // Operations - Build public directory index.
17
26
  async function buildPublicDirectoryIndex(id) {
18
27
  const index = {};
@@ -156,4 +165,15 @@ async function readJSONFile(path) {
156
165
  }
157
166
 
158
167
  // Exposures
159
- export { buildConfig, buildPublicDirectoryIndex, bumpVersion, clearDirectory, sendDeploymentNotice, syncWithGitHub, uploadDirectoryToR2, uploadModuleConfig, uploadModuleToR2 };
168
+ export {
169
+ buildConfig,
170
+ buildPublicDirectoryIndex,
171
+ bumpVersion,
172
+ clearDirectory,
173
+ documentInterface,
174
+ sendDeploymentNotice,
175
+ syncWithGitHub,
176
+ uploadDirectoryToR2,
177
+ uploadModuleConfig,
178
+ uploadModuleToR2
179
+ };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "index.js",
7
- "version": "0.3.26",
7
+ "version": "0.3.30",
8
8
  "devDependencies": {
9
9
  "eslint": "^9.36.0",
10
10
  "license-report": "^6.8.0",