@datapos/datapos-development 0.3.33 → 0.3.34

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 (2) hide show
  1. package/index.js +4 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -14,15 +14,12 @@ async function buildConfig(directoryPath) {
14
14
  }
15
15
 
16
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
- // Match class methods and top-level functions, avoiding control flow
21
- const regex = /^\s{4}(?:async\s+)?(?:private\s+|public\s+|protected\s+)?([A-Za-z_]\w*)\s*\([^)]*\)\s*(?::\s*[^{]+)?\s*\{/gm;
17
+ async function documentInterface(moduleTypeId) {
18
+ const configJSON = await readJSONFile('config.json');
19
+ const indexCode = await fs.readFile('src/index.ts', 'utf8');
20
+ const regex = /^\s{4}(?:async\s+)?(?:private\s+|public\s+|protected\s+)?([A-Za-z_]\w*)\s*\([^)]*\)\s*(?::\s*[^{]+)?\s*\{/gm; // Match class methods and top-level functions.
22
21
  const matches = [...indexCode.matchAll(regex)].map((m) => m[1]);
23
-
24
22
  configJSON.interface = matches;
25
- console.log(matches);
26
23
  await fs.writeFile(`${directoryPath || ''}config.json`, JSON.stringify(configJSON, undefined, 4));
27
24
  }
28
25
 
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.33",
7
+ "version": "0.3.34",
8
8
  "devDependencies": {
9
9
  "eslint": "^9.36.0",
10
10
  "license-report": "^6.8.0",